Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: '/bin/rpm' #1293

Open
daniel-lucio opened this issue Jan 22, 2024 · 3 comments
Open

Comments

@daniel-lucio
Copy link

daniel-lucio commented Jan 22, 2024

Short description of the problem

Can't build a SRPM. I have tried multiple

Output of rpm -q mock

mock-5.1.1-1.mga9
OUTPUT HERE
DEBUG: Executing command: ['/bin/rpm', '-Uvh', '--nodeps', '/builddir/build/originals/signalwire-client-c-2.2.0-1.mga9.src.rpm'] 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
INFO: EXCEPTION: [FileNotFoundError(2, 'No such file or directory')]
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.10/site-packages/mockbuild/backend.py", line 662, in install_srpm
    output, return_code = self.buildroot.doChroot(
  File "/usr/lib/python3.10/site-packages/mockbuild/buildroot.py", line 386, in doChroot
    result = util.do_with_status(command, chrootPath=self.make_chroot_path(),
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.10/site-packages/mockbuild/util.py", line 545, in do_with_status
    child = subprocess.Popen(
  File "/usr/lib64/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/bin/rpm'
Finish: build setup for signalwire-client-c-2.2.0-1.mga9.src.rpm
Finish: build phase for signalwire-client-c-2.2.0-1.mga9.src.rpm

Steps to reproduce issue

  1. mock --define "scl php73" --define '_scl_prefix /opt/remi' --rebuild /home/dieu/rpmbuild/SRPMS/signalwire-client-c-2.2.0-1.mga9.src.rpm --resultdir=~/rpmbuild/RPMS/"%(dist)s"/"%(target_arch)s"/ -r okay8 --verbose --verbose --enable-network --trace --yum --no-clean

Do not forget to mention full commandline with the mock command you executed.
mock --define "scl php73" --define '_scl_prefix /opt/remi' --rebuild /home/dieu/rpmbuild/SRPMS/signalwire-client-c-2.2.0-1.mga9.src.rpm --resultdir=~/rpmbuild/RPMS/"%(dist)s"/"%(target_arch)s"/ -r okay8 --verbose --verbose --enable-network --trace --yum --no-clean

Any additional notes

Output of `mock --debug-config`

INFO: mock.py version 5.1.1 starting (python version = 3.10.11, NVR = mock-5.1.1-1.mga9)...
Start(bootstrap): init plugins
INFO: selinux disabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: selinux disabled
Finish: init plugins
INFO: Signal handler active
Start: run
config_opts['additional_packages'] = []
config_opts['bootstrap_image'] = 'docker.io/library/mageia:{{ releasever }}'
config_opts['build_log_fmt_str'] = '%(message)s'
config_opts['cache_alterations'] = False
config_opts['chroot_name'] = 'default'
config_opts['chroot_setup_cmd'] = ('install basesystem-minimal-core rpm-build rpm-mageia-setup '
 'rpm-mageia-setup-build')
config_opts['chrootuid'] = 1000
config_opts['cleanup_on_failure'] = False
config_opts['cleanup_on_success'] = False
config_opts['config_file'] = '/etc/mock/default.cfg'
config_opts['config_path'] = '/etc/mock'
config_opts['description'] = 'Mageia {{ releasever }}'
config_opts['dist'] = 'mga{{ releasever }}'
config_opts['dnf.conf'] = ('\n'
 '[main]\n'
 'keepcache=1\n'
 'debuglevel=2\n'
 'reposdir=/dev/null\n'
 'logfile=/var/log/yum.log\n'
 'retries=20\n'
 'obsoletes=1\n'
 'gpgcheck=0\n'
 'assumeyes=1\n'
 'syslog_ident=mock\n'
 'syslog_device=\n'
 'install_weak_deps=0\n'
 'metadata_expire=0\n'
 'best=1\n'
 'protected_packages=\n'
 'user_agent={{ user_agent }}\n'
 '\n'
 '# repos\n'
 '\n'
 '[mageia]\n'
 'name=Mageia $releasever - {{ target_arch }}\n'
 '#baseurl=http://mirrors.kernel.org/mageia/distrib/$releasever/{{ target_arch '
 '}}/media/core/release/\n'
 '#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch={{ '
 'target_arch }}@§ion=core&repo=release\n'
 'mirrorlist=https://www.mageia.org/mirrorlist/?release=$releasever&arch={{ '
 'target_arch }}§ion=core&repo=release\n'
 'fastestmirror=1\n'
 'gpgcheck=1\n'
 'gpgkey=file:///usr/share/distribution-gpg-keys/mageia/RPM-GPG-KEY-Mageia\n'
 'enabled=1\n'
 'skip_if_unavailable=False\n'
 '\n'
 '[updates]\n'
 'name=Mageia $releasever - {{ target_arch }} - Updates\n'
 '#baseurl=http://mirrors.kernel.org/mageia/distrib/$releasever/{{ target_arch '
 '}}/media/core/updates/\n'
 '#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch={{ '
 'target_arch }}@§ion=core&repo=updates\n'
 'mirrorlist=https://www.mageia.org/mirrorlist/?release=$releasever&arch={{ '
 'target_arch }}§ion=core&repo=updates\n'
 'fastestmirror=1\n'
 'gpgcheck=1\n'
 'gpgkey=file:///usr/share/distribution-gpg-keys/mageia/RPM-GPG-KEY-Mageia\n'
 'enabled=1\n'
 'skip_if_unavailable=False\n'
 '\n'
 '[mageia-debuginfo]\n'
 'name=Mageia $releasever - {{ target_arch }} - Debug\n'
 '#baseurl=http://mirrors.kernel.org/mageia/distrib/$releasever/{{ target_arch '
 '}}/media/debug/core/release/\n'
 '#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch={{ '
 'target_arch }}@§ion=core&repo=release&debug=true\n'
 'mirrorlist=https://www.mageia.org/mirrorlist/?release=$releasever&arch={{ '
 'target_arch }}§ion=core&repo=release&debug=1\n'
 'fastestmirror=1\n'
 'gpgcheck=1\n'
 'gpgkey=file:///usr/share/distribution-gpg-keys/mageia/RPM-GPG-KEY-Mageia\n'
 'enabled=0\n'
 'skip_if_unavailable=False\n'
 '\n'
 '[updates-debuginfo]\n'
 'name=Mageia $releasever - {{ target_arch }} - Updates - Debug\n'
 '#baseurl=http://mirrors.kernel.org/mageia/distrib/$releasever/{{ target_arch '
 '}}/media/debug/core/updates/\n'
 '#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch={{ '
 'target_arch }}@§ion=core&repo=updates&debug=true\n'
 'mirrorlist=https://www.mageia.org/mirrorlist/?release=$releasever&arch={{ '
 'target_arch }}§ion=core&repo=updates&debug=1\n'
 'fastestmirror=1\n'
 'gpgcheck=1\n'
 'gpgkey=file:///usr/share/distribution-gpg-keys/mageia/RPM-GPG-KEY-Mageia\n'
 'enabled=0\n'
 'skip_if_unavailable=False\n')
config_opts['enable_disable_repos'] = []
config_opts['extra_chroot_dirs'] = ['/run/lock']
config_opts['files'] = {'etc/hosts': '127.0.0.1 localhost localhost.localdomain\n'
              '::1       localhost localhost.localdomain localhost6 '
              'localhost6.localdomain6\n'}
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['macros'] = {'%_buildhost': 'andres.okay.com.mx',
 '%_platform_multiplier': 1,
 '%_rpmfilename': '%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm',
 '%_topdir': '/builddir/build',
 '%distro_section': 'core'}
config_opts['no-config'] = {'epel-8': {'alternatives': {'alma+epel-8': {'description': ['Builds against '
                                                             'AlmaLinux 8 '
                                                             'repositories, '
                                                             'together with '
                                                             'the official '
                                                             'EPEL '
                                                             'repositories.',
                                                             'Project page: '
                                                             'https://almalinux.org/']},
                             'centos-stream+epel-8': {'description': ['Builds '
                                                                      'against '
                                                                      'CentOS '
                                                                      'Stream '
                                                                      '8 '
                                                                      'repositories '
                                                                      '(some '
                                                                      'packages '
                                                                      'may be '
                                                                      'a bit '
                                                                      'ahead '
                                                                      'the Red '
                                                                      'Hat '
                                                                      'Enterprise '
                                                                      'Linux '
                                                                      '8) '
                                                                      'together '
                                                                      'with '
                                                                      'the '
                                                                      'official '
                                                                      'EPEL 8 '
                                                                      'repositories.',
                                                                      'Project '
                                                                      'page: '
                                                                      'https://www.centos.org/centos-stream/']},
                             'circlelinux+epel-8': {'description': ['Builds '
                                                                    'against '
                                                                    'Circle '
                                                                    'Linux 8 '
                                                                    'repositories, '
                                                                    'together '
                                                                    'with the '
                                                                    'official '
                                                                    'EPEL '
                                                                    'repositories.',
                                                                    'Project '
                                                                    'page: '
                                                                    'https://cclinux.org/']},
                             'rhel+epel-8': {'description': ['Builds against '
                                                             'Red Hat '
                                                             'Enterprise Linux '
                                                             '8 repositories, '
                                                             'together with '
                                                             'the official '
                                                             'EPEL '
                                                             'repositories.',
                                                             'This mimics what '
                                                             'is done in the '
                                                             'official EPEL '
                                                             'build system, '
                                                             'but you need a '
                                                             'Red Hat '
                                                             'subscription:',
                                                             'https://rpm-software-management.github.io/mock/Feature-rhelchroots']},
                             'rocky+epel-8': {'description': ['Builds against '
                                                              'Rocky Linux 8 '
                                                              'repositories, '
                                                              'together with '
                                                              'the official '
                                                              'EPEL '
                                                              'repositories.',
                                                              'Project page: '
                                                              'https://rockylinux.org/']}}},
 'epel-9': {'alternatives': {'alma+epel-9': {'description': ['Builds against '
                                                             'AlmaLinux 9 '
                                                             'repositories, '
                                                             'together with '
                                                             'the official '
                                                             'EPEL '
                                                             'repositories.',
                                                             'Project page: '
                                                             'https://almalinux.org/']},
                             'centos-stream+epel-9': {'description': ['Builds '
                                                                      'against '
                                                                      'CentOS '
                                                                      'Stream '
                                                                      '9 '
                                                                      'repositories '
                                                                      '(some '
                                                                      'packages '
                                                                      'may be '
                                                                      'a bit '
                                                                      'ahead '
                                                                      'the Red '
                                                                      'Hat '
                                                                      'Enterprise '
                                                                      'Linux '
                                                                      '9) '
                                                                      'together '
                                                                      'with '
                                                                      'the '
                                                                      'official '
                                                                      'EPEL '
                                                                      'repositories.',
                                                                      'Project '
                                                                      'page: '
                                                                      'https://www.centos.org/centos-stream/']},
                             'rhel+epel-9': {'description': ['Builds against '
                                                             'Red Hat '
                                                             'Enterprise Linux '
                                                             '9 repositories, '
                                                             'together with '
                                                             'the official '
                                                             'EPEL '
                                                             'repositories.',
                                                             'This mimics what '
                                                             'is done in the '
                                                             'official EPEL '
                                                             'build system, '
                                                             'but you need a '
                                                             'Red Hat '
                                                             'subscription:',
                                                             'https://rpm-software-management.github.io/mock/Feature-rhelchroots']},
                             'rocky+epel-9': {'description': ['Builds against '
                                                              'Rocky Linux 9 '
                                                              'repositories, '
                                                              'together with '
                                                              'the official '
                                                              'EPEL '
                                                              'repositories.',
                                                              'Project page: '
                                                              'https://rockylinux.org/']}}}}
config_opts['nspawn_args'] = ['--capability=cap_ipc_lock',
 '--bind=/tmp/mock-resolv.cn1mc3zn:/etc/resolv.conf']
config_opts['plugin_conf'] = {'bind_mount_enable': True,
 'bind_mount_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                     'cache_topdir': '/var/cache/mock',
                     'cachedir': '/var/cache/mock/mageia-9-x86_64',
                     'create_dirs': False,
                     'dirs': [],
                     'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                     'root': 'mageia-9-x86_64'},
 'ccache_enable': False,
 'ccache_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                 'cache_topdir': '/var/cache/mock',
                 'cachedir': '/var/cache/mock/mageia-9-x86_64',
                 'compress': None,
                 'dir': '/var/cache/mock/mageia-9-x86_64/ccache/u1000/',
                 'max_cache_size': '4G',
                 'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                 'root': 'mageia-9-x86_64'},
 'chroot_scan_enable': False,
 'chroot_scan_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                      'cache_topdir': '/var/cache/mock',
                      'cachedir': '/var/cache/mock/mageia-9-x86_64',
                      'only_failed': True,
                      'regexes': ['^[^k]?core(\\.\\d+)?$', '\\.log$'],
                      'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                      'root': 'mageia-9-x86_64'},
 'compress_logs_enable': False,
 'compress_logs_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                        'cache_topdir': '/var/cache/mock',
                        'cachedir': '/var/cache/mock/mageia-9-x86_64',
                        'command': 'gzip',
                        'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                        'root': 'mageia-9-x86_64'},
 'hw_info_enable': True,
 'hw_info_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                  'cache_topdir': '/var/cache/mock',
                  'cachedir': '/var/cache/mock/mageia-9-x86_64',
                  'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                  'root': 'mageia-9-x86_64'},
 'lvm_root_enable': False,
 'lvm_root_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                   'cache_topdir': '/var/cache/mock',
                   'cachedir': '/var/cache/mock/mageia-9-x86_64',
                   'pool_name': 'mockbuild',
                   'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                   'root': 'mageia-9-x86_64'},
 'mount_enable': True,
 'mount_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                'cache_topdir': '/var/cache/mock',
                'cachedir': '/var/cache/mock/mageia-9-x86_64',
                'dirs': [],
                'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                'root': 'mageia-9-x86_64'},
 'overlayfs_enable': False,
 'overlayfs_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                    'cache_topdir': '/var/cache/mock',
                    'cachedir': '/var/cache/mock/mageia-9-x86_64',
                    'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                    'root': 'mageia-9-x86_64'},
 'package_state_enable': True,
 'package_state_opts': {'available_pkgs': False,
                        'basedir': '/var/lib/mock/mageia-9-x86_64',
                        'cache_topdir': '/var/cache/mock',
                        'cachedir': '/var/cache/mock/mageia-9-x86_64',
                        'installed_pkgs': True,
                        'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                        'root': 'mageia-9-x86_64'},
 'pm_request_enable': False,
 'pm_request_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                     'cache_topdir': '/var/cache/mock',
                     'cachedir': '/var/cache/mock/mageia-9-x86_64',
                     'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                     'root': 'mageia-9-x86_64'},
 'procenv_enable': False,
 'procenv_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                  'cache_topdir': '/var/cache/mock',
                  'cachedir': '/var/cache/mock/mageia-9-x86_64',
                  'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                  'root': 'mageia-9-x86_64'},
 'root_cache_enable': True,
 'root_cache_opts': {'age_check': True,
                     'basedir': '/var/lib/mock/mageia-9-x86_64',
                     'cache_topdir': '/var/cache/mock',
                     'cachedir': '/var/cache/mock/mageia-9-x86_64',
                     'compress_program': 'pigz',
                     'decompress_program': None,
                     'dir': '/var/cache/mock/mageia-9-x86_64/root_cache/',
                     'exclude_dirs': ['./proc',
                                      './sys',
                                      './dev',
                                      './tmp/ccache',
                                      './var/cache/yum',
                                      './var/cache/dnf',
                                      './var/log'],
                     'extension': '.gz',
                     'max_age_days': 15,
                     'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                     'root': 'mageia-9-x86_64'},
 'rpkg_preprocessor_enable': False,
 'rpkg_preprocessor_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                            'cache_topdir': '/var/cache/mock',
                            'cachedir': '/var/cache/mock/mageia-9-x86_64',
                            'cmd': '/usr/bin/preproc-rpmspec %(source_spec)s '
                                   '--output %(target_spec)s',
                            'requires': ['preproc-rpmspec'],
                            'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                            'root': 'mageia-9-x86_64'},
 'selinux_enable': True,
 'selinux_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                  'cache_topdir': '/var/cache/mock',
                  'cachedir': '/var/cache/mock/mageia-9-x86_64',
                  'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                  'root': 'mageia-9-x86_64'},
 'showrc_enable': False,
 'showrc_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                 'cache_topdir': '/var/cache/mock',
                 'cachedir': '/var/cache/mock/mageia-9-x86_64',
                 'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                 'root': 'mageia-9-x86_64'},
 'sign_enable': False,
 'sign_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
               'cache_topdir': '/var/cache/mock',
               'cachedir': '/var/cache/mock/mageia-9-x86_64',
               'cmd': 'rpmsign',
               'opts': '--addsign %(rpms)s',
               'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
               'root': 'mageia-9-x86_64'},
 'tmpfs_enable': False,
 'tmpfs_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                'cache_topdir': '/var/cache/mock',
                'cachedir': '/var/cache/mock/mageia-9-x86_64',
                'keep_mounted': False,
                'max_fs_size': None,
                'mode': '0755',
                'required_ram_mb': 900,
                'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                'root': 'mageia-9-x86_64'},
 'yum_cache_enable': True,
 'yum_cache_opts': {'basedir': '/var/lib/mock/mageia-9-x86_64',
                    'cache_topdir': '/var/cache/mock',
                    'cachedir': '/var/cache/mock/mageia-9-x86_64',
                    'max_age_days': 30,
                    'max_metadata_age_days': 30,
                    'online': True,
                    'resultdir': '/var/lib/mock/mageia-9-x86_64/result',
                    'root': 'mageia-9-x86_64'}}
config_opts['print_main_output'] = True
config_opts['releasever'] = '9'
config_opts['root'] = 'mageia-{{ releasever }}-{{ target_arch }}'
config_opts['root_log_fmt_str'] = '%(levelname)s %(filename)s:%(lineno)d:  %(message)s'
config_opts['rpmbuild_arch'] = 'x86_64'
config_opts['state_log_fmt_str'] = '%(asctime)s - %(message)s'
config_opts['target_arch'] = 'x86_64'
config_opts['use_bootstrap_image'] = False
config_opts['verbose'] = 1
Finish: run
@xsuchy
Copy link
Member

xsuchy commented Jan 22, 2024

Did you try this approach https://github.com/hhorak/mock-example ? This is what people building SCL usually do.

@daniel-lucio
Copy link
Author

It fails even without the --defines,

mock --rebuild /home/dieu/rpmbuild/SRPMS/okay-release-1-10.mga9.src.rpm --resultdir=~/rpmbuild/RPMS/"%(dist)s"/"%(target_arch)s"/ -r okay8 --enable-network --trace --disable-plugin=selinux --no-cleanup-after

Fails, I can find some useful log:

INFO: ENTER ['copy_srpm_into_chroot'](<mockbuild.backend.Commands object at 0x7fdc46ca3f40>, '/home/dieu/rpmbuild/SRPMS/okay-release-1-10.mga9.src.rpm')
INFO: ENTER ['make_chroot_path'](<mockbuild.buildroot.Buildroot object at 0x7fdc46cdd720>, '/builddir/build', 'originals')
INFO: ENTER ['install_srpm'](<mockbuild.backend.Commands object at 0x7fdc46ca3f40>, '/builddir/build/originals/okay-release-1-10.mga9.src.rpm')
INFO: ENTER ['nuke_rpm_db'](<mockbuild.buildroot.Buildroot object at 0x7fdc46cdd720>)
INFO: ENTER ['make_chroot_path'](<mockbuild.buildroot.Buildroot object at 0x7fdc46cdd720>, 'var/lib/rpm/__db*')
INFO: ENTER ['make_chroot_path'](<mockbuild.buildroot.Buildroot object at 0x7fdc46cdd720>)
INFO: EXCEPTION: [FileNotFoundError(2, 'No such file or directory')]
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.10/site-packages/mockbuild/backend.py", line 662, in install_srpm
    output, return_code = self.buildroot.doChroot(
  File "/usr/lib/python3.10/site-packages/mockbuild/buildroot.py", line 386, in doChroot
    result = util.do_with_status(command, chrootPath=self.make_chroot_path(),
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.10/site-packages/mockbuild/util.py", line 545, in do_with_status
    child = subprocess.Popen(
  File "/usr/lib64/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/bin/rpm'

I can confirm that '/builddir/build/originals/okay-release-1-10.mga9.src.rpm' exists in the rootjail.

@praiskup
Copy link
Member

Thank you for the report.

This is weird. How come /bin/rpm is missing in the build root?

Note the traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.10/site-packages/mockbuild/backend.py", line 662, in install_srpm
    output, return_code = self.buildroot.doChroot(

It is very short. Who calls install_srpm? Anyway, what is happening
here is that Mock tries to call /bin/rpm in chroot, and that binary is
missing there. One option that comes to my mind is that there's no
/bin -> /usr/bin symlink and that you, because SCL, override the PATH
variable.

@FrostyX FrostyX moved this from Needs triage to Someday in future in CPT Kanban Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants