Bug 1470484 - Use "mock" and "rpmbuild " to build 'libcap-2.25-2.fc25.src.rpm' , one build sucess one build error
Use "mock" and "rpmbuild " to build 'libcap-2.25-2.fc25.src.rpm' , one build ...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: libcap (Show other bugs)
25
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Karsten Hopp
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-12 23:32 EDT by lsy
Modified: 2017-07-31 21:06 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-31 21:06:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description lsy 2017-07-12 23:32:00 EDT
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?
Comment 1 Karsten Hopp 2017-07-14 04:33:36 EDT
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.
Comment 2 Dan Horák 2017-07-14 04:49:16 EDT
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.
Comment 3 lsy 2017-07-31 21:06:51 EDT
thanks. closed this bug

Note You need to log in before you can comment on or make changes to this bug.