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
posted @   LiYanbin  阅读(7)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
点击右上角即可分享
微信分享提示