rpm-build
rpm_packaging_guide:Working with SPEC files:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/rpm_packaging_guide/index#doc-wrapper
示例:https://cbs.centos.org/kojifiles/packages/gnutls/3.7.6/20.el9sbase_901/data/logs/x86_64/build.log
chmod -Rf a+rX,u+w,g-w,o-w .
git init -q
git config user.name rpm-build && git config user.email '<rpm-build>' && git config gc.auto 0
git add --force .
git commit -q --allow-empty -a --author 'rpm-build <rpm-build>' -m 'base'
xpatch=gnutls-3.6.7-no-now-guile.patch; cat $xpatch | git apply --index --reject -p1 -; git commit -q -m $xpatch --author 'rpm-build <rpm-build>'
# 如果有多个patch
# xpatch=($(grep -E '^Patch' gnutls.spec | awk '{print $2}'))
# echo ${xpatch[@]}
# for x in ${xpatch[@]}; do echo ">>> "$x; cat /builddir/gnutls-3.3.29-9.el7_6.src/$x | git apply --index --reject -p1 -; git commit -q -m $xpatch --author 'rpm-build <rpm-build>'; done
# 打包
git archive --format tar.gz --output /xxxpath/xxx.tar.gz master
本文来自博客园,作者:LiYanbin,转载请注明原文链接:https://www.cnblogs.com/stellar-liyanbin/p/18002668
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统