[Starlingx-discuss] [Starlingx-disscuss][Build]Fail to build rpm packages when build StarlingX ISO

胡天昊 hu.tianhao at 99cloud.net
Mon Jul 29 06:40:12 UTC 2019


Hi guys,

Recently I got a problem when I try to build StarlingX ISO.  When I run the 'build-pkgs' command following the 'stx.2019.05 Build guide ', I can't build rpm packages successfully.
Followings are errors in build.log.


ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/sm-common.spec'], chrootPath='/localdisk/loadbuild/test/starlingx/std/mock/b0/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8', 'BUILD_BY': 'test', 'BUILD_DATE': '2019-07-29 04:02:46 +0000', 'REPO': '/localdisk/designer/test/starlingx/cgcs-root', 'WRS_GIT_BRANCH': 'HEAD', 'CGCS_GIT_BRANCH': 'HEAD'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7fa58100acf8>timeout=0uid=1001gid=751user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/sm-common.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8', 'BUILD_BY': 'test', 'BUILD_DATE': '2019-07-29 04:02:46 +0000', 'REPO': '/localdisk/designer/test/starlingx/cgcs-root', 'WRS_GIT_BRANCH': 'HEAD', 'CGCS_GIT_BRANCH': 'HEAD'} and shell False
BUILDSTDERR: /etc/profile: line 45: /dev/null: Permission denied
BUILDSTDERR: /etc/profile: line 70: /dev/null: Permission denied
BUILDSTDERR: /etc/profile: line 70: /dev/null: Permission denied
BUILDSTDERR: /etc/profile: line 70: /dev/null: Permission denied
BUILDSTDERR: /etc/profile: line 70: /dev/null: Permission denied
BUILDSTDERR: warning: Macro expanded in comment on line 26: %_unitdir I think
BUILDSTDERR: warning: Macro expanded in comment on line 111: %{_unitdir}/*
BUILDSTDERR: warning: Macro expanded in comment on line 112: %{_bindir}/*



BUILDSTDERR: /usr/lib/rpm/find-debuginfo.sh: line 272: /dev/null: Permission denied
BUILDSTDERR: /usr/lib/rpm/find-debuginfo.sh: line 272: /dev/null: Permission denied
BUILDSTDERR: /usr/lib/rpm/find-debuginfo.sh: line 272: /dev/null: Permission denied
BUILDSTDERR: /usr/lib/rpm/find-debuginfo.sh: line 272: /dev/null: Permission denied
BUILDSTDERR: /usr/lib/rpm/find-debuginfo.sh: line 272: /dev/null: Permission denied
BUILDSTDERR: /usr/lib/rpm/find-debuginfo.sh: line 500: /dev/null: Permission denied
BUILDSTDERR: *** ERROR: DWARF compression requested, but no dwz installed
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.VbkqZP (%install)
BUILDSTDERR:     Macro expanded in comment on line 26: %_unitdir I think
BUILDSTDERR:     Macro expanded in comment on line 111: %{_unitdir}/*
BUILDSTDERR:     Macro expanded in comment on line 112: %{_bindir}/*
BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.VbkqZP (%install)
RPM build errors:
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 736, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed:
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/sm-common.spec





But if I run the 'sudo mock -r test-starlingx-tis-r5-pike-std.cfg sm-common-1.0.0-20.tis.src.rpm' command, rpm packages can be built successfully.
I think this is probably a permission problem. But even I change owner and group of these files, the 'build-pkgs' command still failed for same reason.
I really can't understand this problem,can anybody give me some comments for it? 


Thanks
Tianhao




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.starlingx.io/pipermail/starlingx-discuss/attachments/20190729/00808554/attachment.html>


More information about the Starlingx-discuss mailing list