Hi @ankursinha, Thanks for the reply and the warm welcome to the community.
The build.log
shows the output below. But i fail to understand why the file is not found. Is it necessay to explicity mention it in the spec file to install these files in the chroot environment? - But if this is the workaround, wouldn’t rpmbuild
tool be enough for this since i thought maybe i could automate the whole building process using mock?
It would be great if someone can point me in the right direction, Thanks.
Mock Version: 3.1
Mock Version: 3.1
Mock Version: 3.1
Mock Version: 3.1
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target x86_64 --nodeps /builddir/build/SPECS/package.spec'], chrootPath='/var/lib/mock/centos-stream+epel-9-x86_64/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': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f02f585e400>timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=True)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target x86_64 --nodeps /builddir/build/SPECS/package.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': 'C.UTF-8'} and shell False
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1567123200
Wrote: /builddir/build/SRPMS/package-1.0.8-0.src.rpm
Child return code was: 0
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target x86_64 --nodeps /builddir/build/SPECS/package.spec'], chrootPath='/var/lib/mock/centos-stream+epel-9-x86_64/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': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f02f585e400>timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=True)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target x86_64 --nodeps /builddir/build/SPECS/package.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': 'C.UTF-8'} and shell False
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1567123200
Processing files: package-1.0.8-0.noarch
RPM build errors:
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/hosts.0
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/hosts.128
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/profile.d/10-cardis.sh
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/profile.d/10-java.sh
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/logrotate.d/cardis
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/udev/rules.d/99-cardis.rules
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/bin/fuser
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/netcat
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/sd
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/kd
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/fuser
error: File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/lsof
error: Directory not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/var/log/cardis
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/hosts.0
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/hosts.128
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/profile.d/10-cardis.sh
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/profile.d/10-java.sh
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/logrotate.d/cardis
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/etc/udev/rules.d/99-cardis.rules
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/bin/fuser
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/netcat
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/sd
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/kd
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/fuser
File not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/usr/bin/lsof
Directory not found: /builddir/build/BUILDROOT/package-1.0.8-0.x86_64/var/log/cardis
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/mockbuild/trace_decorator.py", line 93, in trace
result = func(*args, **kw)
File "/usr/lib/python3.9/site-packages/mockbuild/util.py", line 598, 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 --noclean --target x86_64 --nodeps /builddir/build/SPECS/package.spec
Mock Version: 3.1
Mock Version: 3.1
@