stable

mock-1.4.2-1.fc26

FEDORA-2017-3d88d9f8b5 created by msuchy 7 years ago for Fedora 26

There are new features:

  • The bootstrap feature is now disabled by default. There were too many issues with it. You can enable it localy with --bootstrap-chroot, but first see knows bugs and issues.
  • There is initial support for Fedora Modularity. You can add to config:

    config_opts['module_enable'] = ['list', 'of', 'modules'] config_opts['module_install'] = ['module1/profile', 'module2/profile']

This will call dnf module enable list of modules and dnf module install module1/profile module2/profile during the init phase.

There are some bugfixes:

  • NSpawn chroot is switched off for EL6 targets [#1456421].
  • LVM root is not umounted when umount_root is set to false [#1447658]
  • Shell in NSpawn container is now called with --login so profile.d scripts are executed [#1450516] [#1462373]
  • yum rather then yum-deprecated is used when using bootstrap chroot [#1446294]
  • Custom chroot does not use bootstrap [#1448321]
  • Mock now use dnf repoquery instead of repoquery for chroots which uses DNF.
  • LVM's scrub hook for bootstrap chroot is called [#1446297]
  • --mount will mount LVM volumes [#1448017]

There are new features:

  • Mock previously used chroot technology. Few past releases Mock offered systemd-nspawn which is modern container technology for better isolation. This release use systemd-nspawn as default. If you want to preserve previous behaviour you can use --old-chroot option.
  • Mock now uses bootstrap chroot to install target chroot. This is big change and see special paragraph at the bottom of this release notes.
  • Chroot now contains /dev/hwrng and /dev/prandom when they exists in host [#33]
  • We added %distro_section macro to Mageia configs

There are some bugfixes:

  • Resultdir is now chowned to user who executed mock so they can delete the files.
  • Previously we declared that package state plugin is enabled by default, but the plugin was in fact disabled. It is now enabled by default (as stated in mock documentation) [#1277187].
  • Creating directories for mount points have been delayed after mount of tmpfs [#57]
  • Exit code of machinectl is now ignored as machinectl set non-zero code even for non-fatal errors. Errors which are quite often not relevant nor important for mock.
  • hw_info plugin does not crash when output contains non-ASCII characters [#68]

Notes:

  • This version has not been released for EL6. If you are using EL6 and you want to use latest Mock, please upgrade you infrastructure to EL7.
  • Configs for s390 architecture has been removed as it is not supported any more.
  • Configs for aarch64 and ppc64le now use different GPG key as those architectures has been moved from Secondary to Primary.
  • Epel5 config points now to Vault.centos.org. Note that EL5 has been EOLed. We will keep epel-5 config for some time. But any issue with building for epel-5 target will not be fixed.

Bootstrap chroot

Mock is calling dnf --installroot to install packages for target architecture into target directory. This works. Mostly. The only problem that use host DNF and rpm to install packages. But this can cause problem when new RPM feature is introduces. Like Soft dependencies or Rich dependencies. When you have EL6 host and try to install Fedora rawhide package with Rich dependency then rpm will fail and you cannot do anything about it. You can upgrade your build machine to Fedora rawhide, but that is often not possible when it is part of critical infrastructure.

So we introduced Boostrap chroot. And 'we' actually means Michael Cullen who implement it. And Igor Gnatenko who proposed this idea. Big kudos for both of them.

Bootstrap chroot means that we first create very minimal chroot for target platform and we call DNF/YUM from that platform. For example: when you are on RHEL7 and you want to build package for fedora-26-x86_64, mock will first create chroot called fedora-26-x86_64-bootstrap, it will install DNF and rpm there (fc26 versions). Then it will call DNF from fedora-26-x86_64-bootstrap to install all needed packages to fedora-26-x86_64 chroot.

The disadvantage is that you will need more storage in /var/lib/mock, the build is little bit slower. But you will hardly notice that unless you disabled yum_cache and root_cache plugins for some reasons.

The advantage is that you can use stable version of OS to build packages for even most recent OS. And vice versa.

If you want to preserve previous behaviour you can use --no-bootstrap-chroot command line option or set:

    config_opts['use_bootstrap_container'] = False

in your configuration.

How to install

Updates may require up to 24 hours to propagate to mirrors. If the following command doesn't work, please retry later:

sudo dnf upgrade --refresh --advisory=FEDORA-2017-3d88d9f8b5

This update has been submitted for testing by msuchy.

7 years ago

This update has obsoleted mock-1.4.1-1.fc26, and has inherited its bugs and notes.

7 years ago
User Icon besser82 commented & provided feedback 7 years ago
karma

Works great! LGTM! =)

BZ#1448017 [lvm] --mount does not mount the bootstrap volume
BZ#1446297 "--scrub all" does not remove the bootsrap volume
BZ#1448321 Problem with dnf_install_command in custom1 chroot
BZ#1446294 No such file or directory: '/usr/bin/yum-deprecated'
BZ#1462373 module load fails with "module unknown" error when running under mock --new-chroot
BZ#1450516 Login shell with systemd-nspawn
BZ#1447658 [lvm] The buildroot volume is not kept mounted after build
BZ#1456421 Cannot build packages in epel-6 with mock-1.14 due to new chroot
BZ#1442005 --short-circuit option does not work

This update has been pushed to testing.

7 years ago
User Icon mzink commented & provided feedback 7 years ago
karma

I'm able to build epel6/rhel6 packages again, but only with explicitly specified:

  config_opts['use_nspawn'] = False

I'm not sure if this is desired state. +1 if it is. I've just adjusted my config files.

BZ#1448017 [lvm] --mount does not mount the bootstrap volume
BZ#1446297 "--scrub all" does not remove the bootsrap volume
BZ#1448321 Problem with dnf_install_command in custom1 chroot
BZ#1446294 No such file or directory: '/usr/bin/yum-deprecated'
BZ#1462373 module load fails with "module unknown" error when running under mock --new-chroot
BZ#1447658 [lvm] The buildroot volume is not kept mounted after build
BZ#1456421 Cannot build packages in epel-6 with mock-1.14 due to new chroot
User Icon pwalter commented & provided feedback 7 years ago
karma

Works

User Icon msuchy commented & provided feedback 7 years ago

@mzink yes, this is desired state. You may want to merge your .rpmnew files with rpmconf -o mock

User Icon mzink commented & provided feedback 7 years ago
karma

@msuchy - perfect. (Epel6 was working out of the box. I had to change our internal IT buildconfig which is not bundled in mock rpm)

BZ#1448017 [lvm] --mount does not mount the bootstrap volume
BZ#1446297 "--scrub all" does not remove the bootsrap volume
BZ#1448321 Problem with dnf_install_command in custom1 chroot
BZ#1446294 No such file or directory: '/usr/bin/yum-deprecated'
BZ#1462373 module load fails with "module unknown" error when running under mock --new-chroot
BZ#1450516 Login shell with systemd-nspawn
BZ#1447658 [lvm] The buildroot volume is not kept mounted after build
BZ#1456421 Cannot build packages in epel-6 with mock-1.14 due to new chroot
BZ#1442005 --short-circuit option does not work

This update has reached the stable karma threshold and can be pushed to stable now if the maintainer wishes.

7 years ago

msuchy edited this update.

7 years ago
User Icon cserpentis commented & provided feedback 7 years ago
karma

works for me

User Icon heikoada commented & provided feedback 7 years ago
karma

LGTM

This update has been submitted for stable by msuchy.

7 years ago

This update has been pushed to stable.

7 years ago

Please login to add feedback.

Metadata
Type
enhancement
Karma
5
Signed
Content Type
RPM
Test Gating
Settings
Unstable by Karma
-3
Stable by Karma
disabled
Stable by Time
disabled
Dates
submitted
7 years ago
in testing
7 years ago
in stable
7 years ago
modified
7 years ago
BZ#1442005 --short-circuit option does not work
0
2
BZ#1446294 No such file or directory: '/usr/bin/yum-deprecated'
0
2
BZ#1446297 "--scrub all" does not remove the bootsrap volume
0
2
BZ#1447658 [lvm] The buildroot volume is not kept mounted after build
0
2
BZ#1448017 [lvm] --mount does not mount the bootstrap volume
0
2
BZ#1448321 Problem with dnf_install_command in custom1 chroot
0
2
BZ#1450516 Login shell with systemd-nspawn
0
2
BZ#1456421 Cannot build packages in epel-6 with mock-1.14 due to new chroot
0
2
BZ#1462373 module load fails with "module unknown" error when running under mock --new-chroot
0
2

Automated Test Results