with fc25,use mock to build libcap-2.25-2.fc25.src.rpm has build erro,bug use rpmbuild -ba libcap-2.25-2.fc25.src.rpm it's ok, why? -------------------------------- # mock mock libcap-2.25-2.fc25.src.rpm --resultdir=/home/mock/mock-result-3 Complete! Finish: build setup for libcap-2.25-2.fc25.src.rpm Start: rpmbuild libcap-2.25-2.fc25.src.rpm 构建目标平台:x86_64 为目标x86_64构建 执行(%prep): /bin/sh -e /var/tmp/rpm-tmp.LJ6xhX + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf libcap-2.25 + /usr/bin/gzip -dc /builddir/build/SOURCES/libcap-2.25.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd libcap-2.25 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + echo 'Patch #0 (libcap-2.25-buildflags.patch):' Patch #0 (libcap-2.25-buildflags.patch): + /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 patching file Make.Rules + exit 0 执行(%build): /bin/sh -e /var/tmp/rpm-tmp.9zv7YR + umask 022 + cd /builddir/build/BUILD + cd libcap-2.25 + make prefix=/usr lib=lib64 LIBDIR=/usr/lib64 SBINDIR=/usr/sbin INCDIR=/usr/include MANDIR=/usr/share/man PKGCONFIGDIR=/usr/lib64/pkgconfig/ make -C libcap all make[1]: Entering directory '/builddir/build/BUILD/libcap-2.25/libcap' => making cap_names.list.h from /builddir/build/BUILD/libcap-2.25/libcap/../libcap/include/uapi/linux/capability.h perl -e 'while ($l=<>) { if ($l =~ /^\#define[ \t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$/) { $tok=$1; $val=$2; $tok =~ tr/A-Z/a-z/; print "{\"$tok\",$val},\n"; } }' /builddir/build/BUILD/libcap-2.25/libcap/../libcap/include/uapi/linux/capability.h | fgrep -v 0x > cap_names.list.h /bin/sh: perl: command not found Makefile:47: recipe for target 'cap_names.list.h' failed make[1]: Leaving directory '/builddir/build/BUILD/libcap-2.25/libcap' make[1]: *** [cap_names.list.h] Error 1 Makefile:12: recipe for target 'all' failed make: *** [all] Error 2 RPM 构建错误: 错误:/var/tmp/rpm-tmp.9zv7YR (%build) 退出状态不好 /var/tmp/rpm-tmp.9zv7YR (%build) 退出状态不好 ERROR: Exception(libcap-2.25-2.fc25.src.rpm) Config(redflag-9-x86_64) 1 minutes 33 seconds INFO: Results and/or logs in: /home/mock/mock-result-3/ INFO: Cleaning up build root ('cleanup_on_failure=True') Start: clean chroot Finish: clean chroot ERROR: Command failed. See logs for output. # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/libcap.spec ----------------------------------- 2.rpmbuild -ba libcap-2.25-2.fc25.src.rpm can build sucess. why so?
It looks to me like perl doesn't get pulled into the mock buildroot anymore whereeas you have it installed in your running system. Try adding a build requirement 'perl' and report back if this fixes your issue.
http://pkgs.fedoraproject.org/cgit/rpms/libcap.git/commit/?id=b4907a9c77373163c84f9ea7a064a34f7dd4fd4c is missing the F-25 branch, IIRC there wasn't a mass rebuild in F-25 so the included build is older than the perl change.
thanks. closed this bug