这里是我的 codelite.spec 文件。它编译源代码很好,但随后它给出了这个错误(是的,我添加了一些额外的行来提供上下文):
Processing files: codelite-10.0-1.fc25.x86_64
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.zYPKNH
+ umask 022
+ cd /home/username/rpmbuild/BUILD
+ cd codelite-10.0
+ DOCDIR=/home/username/rpmbuild/BUILDROOT/codelite-10.0-1.fc25.x86_64/usr/share/doc/codelite
+ export DOCDIR
+ /usr/bin/mkdir -p /home/username/rpmbuild/BUILDROOT/codelite-10.0-1.fc25.x86_64/usr/share/doc/codelite
+ cp -pr AUTHORS /home/username/rpmbuild/BUILDROOT/codelite-10.0-1.fc25.x86_64/usr/share/doc/codelite
+ cp -pr LICENSE /home/username/rpmbuild/BUILDROOT/codelite-10.0-1.fc25.x86_64/usr/share/doc/codelite
+ cp -pr COPYING /home/username/rpmbuild/BUILDROOT/codelite-10.0-1.fc25.x86_64/usr/share/doc/codelite
+ exit 0
Finding Provides: /bin/sh -c " while read FILE; do echo "${FILE}" | /usr/lib/rpm/rpmdeps -P; done | /bin/sort -u "
Finding Requires(interp):
Finding Requires(rpmlib):
Finding Requires(verify):
Finding Requires(pre):
Finding Requires(post):
Finding Requires(preun):
Finding Requires(postun):
Finding Requires(pretrans):
Finding Requires(posttrans):
Finding Requires: /bin/sh -c " while read FILE; do echo "${FILE}" | /usr/lib/rpm/rpmdeps -R; done | /bin/sort -u | /usr/bin/sed -e 'libcodeliteu.so; libpluginu.so; libwxscintillau.so; libwxsqlite3u.so;'"
/usr/bin/sed: -e expression #1, char 2: extra characters after command
Provides: application() application(codelite.desktop) codelite = 10.0-1.fc25 codelite(x86-64) = 10.0-1.fc25 libdatabaselayersqlite.so()(64bit) liblibcodelite.so()(64bit) libplugin.so()(64bit) libwxshapeframework.so()(64bit) libwxsqlite3.so()(64bit) mimehandler(application/x-codelite-project) mimehandler(application/x-codelite-workspace)
Requires(interp): /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /bin/sh
Requires(postun): /bin/sh
Requires(posttrans): /bin/sh
Processing files: codelite-debuginfo-10.0-1.fc25.x86_64
error: Empty %files file /home/username/rpmbuild/BUILD/codelite-10.0/debugfiles.list
RPM build errors:
Empty %files file /home/username/rpmbuild/BUILD/codelite-10.0/debugfiles.list
sed
此规范文件中只有一个命令,即87号线这是在%build
宏中,但此错误稍后在运行时发生%files
。你知道这个 sed 错误从何而来吗?我已尝试以下努力来修复此错误:
这两种尝试都没有成功,甚至没有改变我收到的错误消息。我正在rpmbuild -ba codelite.spec
我的 64 位 Fedora 25 系统上本地构建这个包(使用)。
答案1
%filter_from_requires
错误的是第 60 行。
该
%filter_from_requires
宏用于过滤“requires”;它对 require 的作用与%filter_from_provides
宏对提供的作用相同,并且以相同的方式调用。
关于%filter_from_provides
宏观,它说
可以向该宏提供 sed 表达式,以从自动找到的提供流中进行过滤。
在第 60 行,您没有提供 sed 表达式。
我想你可以用
%filter_from_requires /lib\(codelite\|plugin\|wxscintilla\|wxsqlite3\)u\.so/d
...或类似的东西。