![为什么在构建 rpm 时档案中的二进制文件(jaeger)被错误复制?](https://linux22.com/image/1581123/%E4%B8%BA%E4%BB%80%E4%B9%88%E5%9C%A8%E6%9E%84%E5%BB%BA%20rpm%20%E6%97%B6%E6%A1%A3%E6%A1%88%E4%B8%AD%E7%9A%84%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6%EF%BC%88jaeger%EF%BC%89%E8%A2%AB%E9%94%99%E8%AF%AF%E5%A4%8D%E5%88%B6%EF%BC%9F.png)
尝试将 jaeger-all-in-one 打包到 rpm 中
源代码在这里: https://github.com/patsevanton/jaeger-all-in-one-rpm
rpm is created - but the copied binary is of a different size.
37M Nov 28 11:14 /root/rpmbuild/BUILD/jaeger-1.8.2-linux-amd64/jaeger-all-in-one
32M Jan 29 10:54 /usr/local/bin/jaeger-all-in-one
为什么在构建 rpm 时档案中的二进制文件(jaeger)被错误复制?
答案1
需要将 %global __strip /bin/true 添加到 spec 文件