在rpm打包的时候,遇到以下几个问题:
- make dist-gzip时,发生错误:
tar: xxx: file name is too long (max 99); not dumped
这是因为xxx文件的路径字符串长度超过了99个字符,从前面输出的tar命令中可以看到tar chof,其中o表示打包的格式是--format=V7
其中V7是一种很古老的打包格式,但是有路径长度限制为99个字符,可以参考:
https://man7.org/linux/man-pages/man1/tar.1.html
https://www.gnu.org/software/automake/manual/html_node/List-of-Automake-options.html
解决方式:
打包格式改为ustar或者pax格式,在AM_INIT_AUTOMAKE中加入tar-ustar或者tar-pax
- 执行rpmbuild命令的时候,报错:
illegal char '-' in version rpmbuild
这是因为rpmbuild的配置文件中指定VERSION的值的字符串中有-字符,不满足rpm的规范,不能包含- / ~ .. 这4类字符串,对于减号、斜杠、波浪号、两个连续点号:
https://stackoverflow.com/questions/35053495/what-characters-are-not-allowed-in-the-rpm-release
https://twiki.cern.ch/twiki/bin/view/Main/RPMAndDebVersioning
解决方式:
将VERSION中的这种字符串替换为满足规范的字符串
标签:tar,笔记,问题,rpmbuild,https,字符串,rpm,打包
From: https://www.cnblogs.com/lifewithlight/p/16725232.html