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

config_opts['update_before_build'] = False option is not respected anymore #1420

Open
voxik opened this issue Aug 6, 2024 · 6 comments
Open

Comments

@voxik
Copy link
Contributor

voxik commented Aug 6, 2024

Short description of the problem

"Update before build" is really bad option. But luckily, there is config_opts['update_before_build'] override which enabled to switch this functionality off. However, this option is not currently respected and my packages are always updated. E.g. I do:

$ mock -r fedora-rawhide-x86_64 --pm-cmd downgrade https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/ruby-devel-3.3.1-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/ruby-libs-3.3.1-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/rubygem-bigdecimal-3.1.5-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/noarch/rubygems-devel-3.5.9-7.fc41.noarch.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/rubygem-io-console-0.7.1-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/rubygem-psych-5.1.2-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/noarch/rubygem-rdoc-6.6.3.1-7.fc41.noarch.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/noarch/rubygems-3.5.9-7.fc41.noarch.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/ruby-3.3.1-7.fc41.x86_64.rpm
INFO: mock.py version 5.6 starting (python version = 3.13.0, NVR = mock-5.6-3.fc41), args: /usr/libexec/mock/mock -r fedora-rawhide-x86_64 --pm-cmd downgrade https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/ruby-devel-3.3.1-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/ruby-libs-3.3.1-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/rubygem-bigdecimal-3.1.5-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/noarch/rubygems-devel-3.5.9-7.fc41.noarch.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/rubygem-io-console-0.7.1-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/rubygem-psych-5.1.2-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/noarch/rubygem-rdoc-6.6.3.1-7.fc41.noarch.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/noarch/rubygems-3.5.9-7.fc41.noarch.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/ruby-3.3.1-7.fc41.x86_64.rpm
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
INFO: Running pm-cmd downgrade https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/ruby-devel-3.3.1-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/ruby-libs-3.3.1-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/rubygem-bigdecimal-3.1.5-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/noarch/rubygems-devel-3.5.9-7.fc41.noarch.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/rubygem-io-console-0.7.1-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/rubygem-psych-5.1.2-7.fc41.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/noarch/rubygem-rdoc-6.6.3.1-7.fc41.noarch.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/noarch/rubygems-3.5.9-7.fc41.noarch.rpm https://kojipkgs.fedoraproject.org//packages/ruby/3.3.1/7.fc41/x86_64/ruby-3.3.1-7.fc41.x86_64.rpm
Mock Version: 5.6
INFO: Mock Version: 5.6
Start: chroot init
WARNING: For multilib systems, both architectures of nosync library need to be installed
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start: cleaning package manager metadata
Finish: cleaning package manager metadata
INFO: enabled HW Info plugin
INFO: Package manager dnf5 detected and used (fallback)
Finish: chroot init
Updating and loading repositories:
 fedora                                 100% |  98.4 KiB/s |  22.6 KiB |  00m00s
Repositories loaded.
 https://kojipkgs.fedoraproject.org//pa 100% |   8.0 KiB/s |  14.5 KiB |  00m02s
 https://kojipkgs.fedoraproject.org//pa 100% | 166.1 KiB/s |  39.4 KiB |  00m00s
 https://kojipkgs.fedoraproject.org//pa 100% | 165.1 KiB/s | 351.3 KiB |  00m02s
 https://kojipkgs.fedoraproject.org//pa 100% | 203.6 KiB/s | 463.4 KiB |  00m02s
 https://kojipkgs.fedoraproject.org//pa 100% | 554.7 KiB/s |  68.2 KiB |  00m00s
 https://kojipkgs.fedoraproject.org//pa 100% | 785.2 KiB/s | 289.7 KiB |  00m00s
 https://kojipkgs.fedoraproject.org//pa 100% | 197.7 KiB/s |  24.1 KiB |  00m00s
 https://kojipkgs.fedoraproject.org//pa 100% | 413.0 KiB/s |  50.4 KiB |  00m00s
 https://kojipkgs.fedoraproject.org//pa 100% |   7.7 MiB/s |   3.9 MiB |  00m01s
Package                         Arch   Version        Repository        Size
Downgrading:
 ruby                           x86_64 3.3.1-7.fc41   @commandline  89.4 KiB
   replacing ruby               x86_64 3.3.4-13.fc41  fedora        89.5 KiB
 ruby-devel                     x86_64 3.3.1-7.fc41   @commandline   1.6 MiB
   replacing ruby-devel         x86_64 3.3.4-13.fc41  fedora         1.6 MiB
 ruby-libs                      x86_64 3.3.1-7.fc41   @commandline  14.5 MiB
   replacing ruby-libs          x86_64 3.3.4-13.fc41  fedora        14.5 MiB
 rubygem-bigdecimal             x86_64 3.1.5-7.fc41   @commandline 133.7 KiB
   replacing rubygem-bigdecimal x86_64 3.1.5-13.fc41  fedora       133.7 KiB
 rubygems                       noarch 3.5.9-7.fc41   @commandline   1.4 MiB
   replacing rubygems           noarch 3.5.11-13.fc41 fedora         1.4 MiB
 rubygems-devel                 noarch 3.5.9-7.fc41   @commandline  12.5 KiB
   replacing rubygems-devel     noarch 3.5.11-13.fc41 fedora        12.5 KiB

Transaction Summary:
 Replacing:         6 packages
 Downgrading:       6 packages

Total size of inbound packages is 5 MiB. Need to download 0 B.
After this operation 61 KiB will be freed (install 18 MiB, remove 18 MiB).

Running transaction
The lowest available version of the "rubygem-io-console.x86_64" package is already installed, cannot downgrade it.
The lowest available version of the "rubygem-psych.x86_64" package is already installed, cannot downgrade it.
The lowest available version of the "rubygem-rdoc.noarch" package is already installed, cannot downgrade it.

[ 1/14] Verify package files            100% | 315.0   B/s |   6.0   B |  00m00s
[ 2/14] Prepare transaction             100% | 545.0   B/s |  12.0   B |  00m00s
[ 3/14] Downgrading ruby-libs-0:3.3.1-7 100% | 142.8 MiB/s |  14.6 MiB |  00m00s
[ 4/14] Downgrading rubygems-0:3.5.9-7. 100% |  48.9 MiB/s |   1.5 MiB |  00m00s
[ 5/14] Downgrading ruby-0:3.3.1-7.fc41 100% |  12.7 MiB/s |  91.1 KiB |  00m00s
[ 6/14] Downgrading ruby-devel-0:3.3.1- 100% |  59.5 MiB/s |   1.6 MiB |  00m00s
[ 7/14] Downgrading rubygem-bigdecimal- 100% |  19.0 MiB/s | 136.5 KiB |  00m00s
[ 8/14] Downgrading rubygems-devel-0:3. 100% |   2.2 MiB/s |  13.3 KiB |  00m00s
[ 9/14] Erasing ruby-devel-0:3.3.4-13.f 100% |  30.0 KiB/s | 215.0   B |  00m00s
[10/14] Erasing ruby-0:3.3.4-13.fc41.x8 100% |   1.8 KiB/s |  11.0   B |  00m00s
[11/14] Erasing rubygem-bigdecimal-0:3. 100% |   2.9 KiB/s |  18.0   B |  00m00s
[12/14] Erasing rubygems-devel-0:3.5.11 100% | 833.0   B/s |   5.0   B |  00m00s
[13/14] Erasing rubygems-0:3.5.11-13.fc 100% |  42.5 KiB/s | 305.0   B |  00m00s
warning: posix.fork(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead
warning: posix.wait(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead
warning: posix.exec(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead
[14/14] Erasing ruby-libs-0:3.3.4-13.fc 100% |   3.9 KiB/s | 604.0   B |  00m00s
>>> Running trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64
>>> Stop trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64
Warning: skipped PGP checks for 6 package(s).
Finish: run

But with a build, the packages are updated again:

$ mock -r fedora-rawhide-x86_64 rubygem-pg-1.5.4-4.fc41.src.rpm -n 
INFO: mock.py version 5.6 starting (python version = 3.13.0, NVR = mock-5.6-3.fc41), args: /usr/libexec/mock/mock -r fedora-rawhide-x86_64 rubygem-pg-1.5.4-4.fc41.src.rpm -n
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
INFO: Start(rubygem-pg-1.5.4-4.fc41.src.rpm)  Config(fedora-rawhide-x86_64)
Mock Version: 5.6
INFO: Mock Version: 5.6
Start: chroot init
WARNING: For multilib systems, both architectures of nosync library need to be installed
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start: cleaning package manager metadata
Finish: cleaning package manager metadata
INFO: enabled HW Info plugin
INFO: Package manager dnf5 detected and used (fallback)
INFO: Buildroot is handled by package management from host and used with --installroot:
  rpm-4.19.92-5.fc41.x86_64
  rpm-sequoia-1.6.0-3.fc41.x86_64
  python3-dnf-4.21.0-2.fc41.noarch
  python3-dnf-plugins-core-4.8.0-2.fc41.noarch
  dnf5-5.2.2.0-1.fc41.x86_64
  dnf5-plugins-5.2.2.0-1.fc41.x86_64
Finish: chroot init
Start: build phase for rubygem-pg-1.5.4-4.fc41.src.rpm
Start: build setup for rubygem-pg-1.5.4-4.fc41.src.rpm
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1721347200
Wrote: /builddir/build/SRPMS/rubygem-pg-1.5.4-4.fc41.src.rpm
Updating and loading repositories:
 fedora                                 100% | 114.9 KiB/s |  22.6 KiB |  00m00s
Repositories loaded.
Package "gcc-14.1.1-7.fc41.x86_64" is already installed.
Package "libpq-devel-16.3-5.fc41.x86_64" is already installed.
Package "postgresql-server-16.3-3.fc41.x86_64" is already installed.
Package "ruby-libs-3.3.1-7.fc41.x86_64" is already installed.
Package "ruby-devel-3.3.1-7.fc41.x86_64" is already installed.
Package "rubygem-bigdecimal-3.1.5-7.fc41.x86_64" is already installed.
Package "rubygem-rspec-3.13.0-2.fc41.noarch" is already installed.
Package "rubygems-devel-3.5.9-7.fc41.noarch" is already installed.

Package                         Arch   Version        Repository        Size
Upgrading:
 ruby                           x86_64 3.3.4-13.fc41  fedora        89.5 KiB
   replacing ruby               x86_64 3.3.1-7.fc41   @commandline  89.4 KiB
 ruby-devel                     x86_64 3.3.4-13.fc41  fedora         1.6 MiB
   replacing ruby-devel         x86_64 3.3.1-7.fc41   @commandline   1.6 MiB
 ruby-libs                      x86_64 3.3.4-13.fc41  fedora        14.5 MiB
   replacing ruby-libs          x86_64 3.3.1-7.fc41   @commandline  14.5 MiB
 rubygem-bigdecimal             x86_64 3.1.5-13.fc41  fedora       133.7 KiB
   replacing rubygem-bigdecimal x86_64 3.1.5-7.fc41   @commandline 133.7 KiB
 rubygems                       noarch 3.5.11-13.fc41 fedora         1.4 MiB
   replacing rubygems           noarch 3.5.9-7.fc41   @commandline   1.4 MiB
 rubygems-devel                 noarch 3.5.11-13.fc41 fedora        12.5 KiB
   replacing rubygems-devel     noarch 3.5.9-7.fc41   @commandline  12.5 KiB

Transaction Summary:
 Upgrading:         6 packages
 Replacing:         6 packages

Total size of inbound packages is 5 MiB. Need to download 0 B.
After this operation 61 KiB will be used (install 18 MiB, remove 18 MiB).
[1/6] ruby-libs-0:3.3.4-13.fc41.x86_64  100% |   0.0   B/s |   0.0   B |  00m00s
>>> Already downloaded
[2/6] ruby-devel-0:3.3.4-13.fc41.x86_64 100% |   0.0   B/s |   0.0   B |  00m00s
>>> Already downloaded
[3/6] rubygem-bigdecimal-0:3.1.5-13.fc4 100% |   0.0   B/s |   0.0   B |  00m00s
>>> Already downloaded
[4/6] rubygems-devel-0:3.5.11-13.fc41.n 100% |   0.0   B/s |   0.0   B |  00m00s
>>> Already downloaded
[5/6] ruby-0:3.3.4-13.fc41.x86_64       100% |   0.0   B/s |   0.0   B |  00m00s
>>> Already downloaded
[6/6] rubygems-0:3.5.11-13.fc41.noarch  100% |   0.0   B/s |   0.0   B |  00m00s
>>> Already downloaded
--------------------------------------------------------------------------------
[6/6] Total                             100% |   0.0   B/s |   0.0   B |  00m00s
Running transaction
[ 1/14] Verify package files            100% | 428.0   B/s |   6.0   B |  00m00s
[ 2/14] Prepare transaction             100% | 521.0   B/s |  12.0   B |  00m00s
[ 3/14] Upgrading ruby-libs-0:3.3.4-13. 100% | 142.0 MiB/s |  14.6 MiB |  00m00s
[ 4/14] Upgrading rubygems-0:3.5.11-13. 100% |  49.1 MiB/s |   1.5 MiB |  00m00s
[ 5/14] Upgrading ruby-0:3.3.4-13.fc41. 100% |  11.1 MiB/s |  91.1 KiB |  00m00s
[ 6/14] Upgrading ruby-devel-0:3.3.4-13 100% |  59.5 MiB/s |   1.6 MiB |  00m00s
[ 7/14] Upgrading rubygem-bigdecimal-0: 100% |  16.7 MiB/s | 136.6 KiB |  00m00s
[ 8/14] Upgrading rubygems-devel-0:3.5. 100% |   2.2 MiB/s |  13.3 KiB |  00m00s
[ 9/14] Erasing ruby-devel-0:3.3.1-7.fc 100% |  30.0 KiB/s | 215.0   B |  00m00s
[10/14] Erasing ruby-0:3.3.1-7.fc41.x86 100% |   1.8 KiB/s |  11.0   B |  00m00s
[11/14] Erasing rubygem-bigdecimal-0:3. 100% |   2.8 KiB/s |  17.0   B |  00m00s
[12/14] Erasing rubygems-devel-0:3.5.9- 100% | 833.0   B/s |   5.0   B |  00m00s
[13/14] Erasing rubygems-0:3.5.9-7.fc41 100% |  29.7 KiB/s | 304.0   B |  00m00s
warning: posix.fork(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead
warning: posix.wait(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead
warning: posix.exec(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead
[14/14] Erasing ruby-libs-0:3.3.1-7.fc4 100% |   3.4 KiB/s | 602.0   B |  00m00s
>>> Running trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64
>>> Stop trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64

... snip ...

Output of rpm -q mock

$ rpm -q mock
mock-5.6-3.fc41.noarch

Any additional notes

Output of `mock --debug-config`

$ mock -r fedora-rawhide-x86_64 rubygem-pg-1.5.4-4.fc41.src.rpm -n --debug-config 
INFO: mock.py version 5.6 starting (python version = 3.13.0, NVR = mock-5.6-3.fc41), args: /usr/libexec/mock/mock -r fedora-rawhide-x86_64 rubygem-pg-1.5.4-4.fc41.src.rpm -n --debug-config
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
config_opts['additional_packages'] = []
config_opts['bootstrap_image'] = 'registry.fedoraproject.org/fedora:rawhide'
config_opts['build_log_fmt_str'] = '%(message)s'
config_opts['cache_alterations'] = False
config_opts['chroot_name'] = 'fedora-rawhide-x86_64'
config_opts['chroot_setup_cmd'] = 'install @{% if mirrored %}buildsys-{% endif %}build'
config_opts['chrootuid'] = 1000
config_opts['clean'] = False
config_opts['cleanup_on_failure'] = False
config_opts['cleanup_on_success'] = False
config_opts['config_file'] = '/etc/mock/fedora-rawhide-x86_64.cfg'
config_opts['config_path'] = '/etc/mock'
config_opts['config_paths'] = ['/etc/mock/fedora-rawhide-x86_64.cfg',
 '/etc/mock/templates/fedora-rawhide.tpl',
 '/home/vondruch/.config/mock.cfg',
 '/etc/mock/site-defaults.cfg',
 '/etc/mock/chroot-aliases.cfg']
config_opts['description'] = 'Fedora Rawhide'
config_opts['dist'] = 'rawhide'
config_opts['dnf.conf'] = ('\n'
 '[main]\n'
 'keepcache=1\n'
 'system_cachedir=/var/cache/dnf\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'
 'module_platform_id=platform:f{{ releasever }}\n'
 'protected_packages=\n'
 'user_agent={{ user_agent }}\n'
 '\n'
 '{%- macro rawhide_gpg_keys() -%}\n'
 'file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary\n'
 '{%- for version in [releasever|int, releasever|int - 1]\n'
 '%} file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ '
 'version }}-primary\n'
 '{%- endfor %}\n'
 '{%- endmacro %}\n'
 '\n'
 '# repos\n'
 '\n'
 '[local]\n'
 'name=local\n'
 'baseurl=https://kojipkgs.fedoraproject.org/repos/rawhide/latest/$basearch/\n'
 'cost=2000\n'
 'enabled={{ not mirrored }}\n'
 'skip_if_unavailable=False\n'
 '\n'
 '[local-source]\n'
 'name=local-source\n'
 'baseurl=https://kojipkgs.fedoraproject.org/repos/rawhide/latest/src/\n'
 'cost=2000\n'
 'enabled=0\n'
 'skip_if_unavailable=False\n'
 '\n'
 '{% if mirrored %}\n'
 '[fedora]\n'
 'name=fedora\n'
 'metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch\n'
 'gpgkey={{ rawhide_gpg_keys() }}\n'
 'gpgcheck=1\n'
 'skip_if_unavailable=False\n'
 '\n'
 '[fedora-debuginfo]\n'
 'name=Fedora Rawhide - Debug\n'
 'metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide-debug&arch=$basearch\n'
 'enabled=0\n'
 'gpgkey={{ rawhide_gpg_keys() }}\n'
 'gpgcheck=1\n'
 'skip_if_unavailable=False\n'
 '\n'
 '[fedora-source]\n'
 'name=fedora-source\n'
 'metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide-source&arch=$basearch\n'
 'gpgkey={{ rawhide_gpg_keys() }}\n'
 'gpgcheck=1\n'
 'enabled=0\n'
 'skip_if_unavailable=False\n'
 '{% endif %}\n')
config_opts['dnf_builddep_opts'] = ['--nobest']
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': 'fedora.local',
 '%_platform_multiplier': 1,
 '%_rpmfilename': '%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm',
 '%_topdir': '/builddir/build'}
config_opts['mirrored'] = True
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['nosync'] = True
config_opts['nspawn_args'] = ['--capability=cap_ipc_lock',
 '--bind=/tmp/mock-resolv.jytkwvgc:/etc/resolv.conf',
 '--bind=/dev/btrfs-control',
 '--bind=/dev/mapper/control',
 '--bind=/dev/fuse',
 '--bind=/dev/loop-control',
 '--bind=/dev/loop0',
 '--bind=/dev/loop1',
 '--bind=/dev/loop2',
 '--bind=/dev/loop3',
 '--bind=/dev/loop4',
 '--bind=/dev/loop5',
 '--bind=/dev/loop6',
 '--bind=/dev/loop7',
 '--bind=/dev/loop8',
 '--bind=/dev/loop9',
 '--bind=/dev/loop10',
 '--bind=/dev/loop11']
config_opts['package_manager'] = 'dnf5'
config_opts['plugin_conf'] = {'__init___enable': False,
 '__init___opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                   'cache_topdir': '/var/cache/mock',
                   'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                   'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                   'root': 'fedora-rawhide-x86_64'},
 'bind_mount_enable': True,
 'bind_mount_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                     'cache_topdir': '/var/cache/mock',
                     'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                     'create_dirs': False,
                     'dirs': [],
                     'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                     'root': 'fedora-rawhide-x86_64'},
 'ccache_enable': False,
 'ccache_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                 'cache_topdir': '/var/cache/mock',
                 'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                 'compress': None,
                 'dir': '/var/cache/mock/fedora-rawhide-x86_64/ccache/u1000/',
                 'max_cache_size': '4G',
                 'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                 'root': 'fedora-rawhide-x86_64'},
 'chroot_scan_enable': False,
 'chroot_scan_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                      'cache_topdir': '/var/cache/mock',
                      'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                      'only_failed': True,
                      'regexes': ['^[^k]?core(\\.\\d+)?$', '\\.log$'],
                      'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                      'root': 'fedora-rawhide-x86_64',
                      'write_tar': False},
 'compress_logs_enable': False,
 'compress_logs_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                        'cache_topdir': '/var/cache/mock',
                        'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                        'command': 'gzip',
                        'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                        'root': 'fedora-rawhide-x86_64'},
 'hw_info_enable': True,
 'hw_info_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                  'cache_topdir': '/var/cache/mock',
                  'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                  'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                  'root': 'fedora-rawhide-x86_64'},
 'lvm_root_enable': False,
 'lvm_root_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                   'cache_topdir': '/var/cache/mock',
                   'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                   'pool_name': 'mockbuild',
                   'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                   'root': 'fedora-rawhide-x86_64'},
 'mount_enable': True,
 'mount_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                'cache_topdir': '/var/cache/mock',
                'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                'dirs': [],
                'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                'root': 'fedora-rawhide-x86_64'},
 'overlayfs_enable': False,
 'overlayfs_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                    'cache_topdir': '/var/cache/mock',
                    'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                    'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                    'root': 'fedora-rawhide-x86_64'},
 'package_state_enable': True,
 'package_state_opts': {'available_pkgs': False,
                        'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                        'cache_topdir': '/var/cache/mock',
                        'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                        'installed_pkgs': True,
                        'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                        'root': 'fedora-rawhide-x86_64'},
 'pm_request_enable': False,
 'pm_request_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                     'cache_topdir': '/var/cache/mock',
                     'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                     'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                     'root': 'fedora-rawhide-x86_64'},
 'procenv_enable': False,
 'procenv_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                  'cache_topdir': '/var/cache/mock',
                  'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                  'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                  'root': 'fedora-rawhide-x86_64'},
 'root_cache_enable': True,
 'root_cache_opts': {'age_check': True,
                     'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                     'cache_topdir': '/var/cache/mock',
                     'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                     'compress_program': 'pigz',
                     'decompress_program': None,
                     'dir': '/var/cache/mock/fedora-rawhide-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/fedora-rawhide-x86_64/result',
                     'root': 'fedora-rawhide-x86_64'},
 'rpkg_preprocessor_enable': False,
 'rpkg_preprocessor_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                            'cache_topdir': '/var/cache/mock',
                            'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                            'cmd': '/usr/bin/preproc-rpmspec %(source_spec)s '
                                   '--output %(target_spec)s',
                            'requires': ['preproc-rpmspec'],
                            'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                            'root': 'fedora-rawhide-x86_64'},
 'rpmautospec_enable': False,
 'rpmautospec_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                      'cache_topdir': '/var/cache/mock',
                      'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                      'cmd_base': ['/usr/bin/rpmautospec', 'process-distgit'],
                      'requires': ['rpmautospec'],
                      'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                      'root': 'fedora-rawhide-x86_64'},
 'selinux_enable': True,
 'selinux_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                  'cache_topdir': '/var/cache/mock',
                  'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                  'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                  'root': 'fedora-rawhide-x86_64'},
 'showrc_enable': False,
 'showrc_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                 'cache_topdir': '/var/cache/mock',
                 'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                 'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                 'root': 'fedora-rawhide-x86_64'},
 'sign_enable': False,
 'sign_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
               'cache_topdir': '/var/cache/mock',
               'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
               'cmd': 'rpmsign',
               'opts': '--addsign %(rpms)s',
               'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
               'root': 'fedora-rawhide-x86_64'},
 'tmpfs_enable': False,
 'tmpfs_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                'cache_topdir': '/var/cache/mock',
                'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                'keep_mounted': False,
                'max_fs_size': None,
                'mode': '0755',
                'required_ram_mb': 900,
                'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                'root': 'fedora-rawhide-x86_64'},
 'yum_cache_enable': True,
 'yum_cache_opts': {'basedir': '/var/lib/mock/fedora-rawhide-x86_64',
                    'cache_topdir': '/var/cache/mock',
                    'cachedir': '/var/cache/mock/fedora-rawhide-x86_64',
                    'max_age_days': 30,
                    'max_metadata_age_days': 30,
                    'online': True,
                    'resultdir': '/var/lib/mock/fedora-rawhide-x86_64/result',
                    'root': 'fedora-rawhide-x86_64'}}
config_opts['print_main_output'] = True
config_opts['releasever'] = '41'
config_opts['repo_arch'] = 'x86_64'
config_opts['root'] = 'fedora-rawhide-{{ 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['update_before_build'] = False
config_opts['use_bootstrap'] = False
config_opts['verbose'] = 1
Finish: run
@voxik
Copy link
Contributor Author

voxik commented Aug 6, 2024

Version of DNF might also be relevant:

$ rpm -q dnf5
dnf5-5.2.2.0-1.fc41.x86_64

@FrostyX FrostyX moved this from Needs triage to In 3 months in CPT Kanban Aug 7, 2024
@praiskup praiskup moved this from In 3 months to Needs triage in CPT Kanban Sep 26, 2024
@praiskup praiskup moved this from Needs triage to In 3 months in CPT Kanban Sep 26, 2024
@praiskup
Copy link
Member

praiskup commented Oct 1, 2024

Thank you for the report! But I can't reproduce this:

# cleanup things
mock -r fedora-rawhide-x86_64 --scrub=all

# install older mock-filesystem
 mock -r fedora-rawhide-x86_64 --install https://kojipkgs.fedoraproject.org//packages/mock/5.6/3.fc41/noarch/mock-filesystem-5.6-3.fc41.noarch.rpm

# rebuild new mock
mock -n -r fedora-rawhide-x86_64 /tmp/tito/mock-5.9-1.git.3819.2fa2dbd.fc41.src.rpm

# check the version
mock -r fedora-rawhide-x86_64 --shell 'rpm -q mock-filesystem'
...
Start: shell
mock-filesystem-5.6-3.fc41.noarch
Finish: shell
Finish: run

# does the new package exist?
mock -r fedora-rawhide-x86_64 --update mock-filesystem
...
Upgrading:
 mock-filesystem             noarch 5.8-1.fc42 fedora        17.7 KiB
   replacing mock-filesystem noarch 5.6-3.fc41 @commandline  17.6 KiB

See this:

Wrote: /builddir/build/SRPMS/rubygem-pg-1.5.4-4.fc41.src.rpm
Updating and loading repositories:
 fedora                                 100% | 114.9 KiB/s |  22.6 KiB |  00m00s

This transaction is not responsible for updating the chroot, but for installing BuildRequires.
I bet that some of those packages in the transaction triggered the upgrade of ruby stack.

@praiskup
Copy link
Member

praiskup commented Oct 1, 2024

Hmm, reading better -> the transaction actually only updates the 6 packages, that are
previosly marked as is already installed. Seems like some semantics of dnf builddep
changed.

@praiskup
Copy link
Member

praiskup commented Oct 1, 2024

Reported against DNF5 for now: rpm-software-management/dnf5#1747

@praiskup
Copy link
Member

praiskup commented Oct 3, 2024

@voxik don't you remember when this worked the last time? Do you think we should skip the builddep with update_before_build = False? Any ideas?

@voxik
Copy link
Contributor Author

voxik commented Oct 3, 2024

@voxik don't you remember when this worked the last time?

I wish.

Do you think we should skip the builddep with update_before_build = False? Any ideas?

You mean skipping installation of dependencies? That would be bad. During package updates, I very often comment out all BRs and add them back one by one just to check all are still needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants