rpm-software-management / mock

Mock is a tool for a reproducible build of RPM packages.
GNU General Public License v2.0
384 stars 235 forks source link

Mock/buildroot: respect nspawn_args when bootstrapping chroot #1410

Closed thozza closed 2 months ago

thozza commented 4 months ago

The 'nspawn_args' configuration value was not used when executing the systemd-nspawn command during the chroot bootstrapping. Make sure that the value is used during the chroot bootstrapping in case systemd-nspawn isolation is used.

This issue was found when trying to workaround an issue [1] when SELinux policy forbid systemd-machine to create a varlink socket and thus start. This resulted in systemd-nspawn not being able to register a machine. To workaround this, I added the following snippet to the configuration:

config_opts['nspawn_args'] = ['--register=no']

so that systemd-nspawn does not try to register the machine with systemd-machine. However, this had no effect. I could see that the argument was not used when executing systemd-nspawn and it still failed.

[1] https://issues.redhat.com/browse/RHEL-49567

packit-as-a-service[bot] commented 4 months ago

We were not able to find or create Copr project packit/rpm-software-management-mock-1410 specified in the config with the following error:

Packit received HTTP 500 Internal Server Error from Copr Service. Check the Copr status page: https://copr.fedorainfracloud.org/status/stats/, or ask for help in Fedora Build System matrix channel https://matrix.to/#/#buildsys:fedoraproject.org.

Unless the HTTP status code above is >= 500, please check your configuration for:

  1. typos in owner and project name (groups need to be prefixed with @)
  2. whether the project name doesn't contain not allowed characters (only letters, digits, underscores, dashes and dots must be used)
  3. whether the project itself exists (Packit creates projects only in its own namespace)
  4. whether Packit is allowed to build in your Copr project
  5. whether your Copr project/group is not private
praiskup commented 4 months ago

Notes for myself:

praiskup commented 2 months ago

I've tried to fix this in #1456, as it is a bit more complicated, but I kept you as co-author.