Bug 2135203 - ERROR: Can't parse Mock configuration under root after update mock from 3.1 to 3.2
Summary: ERROR: Can't parse Mock configuration under root after update mock from 3.1 t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-17 03:24 UTC by Filipe Rosset
Modified: 2022-11-10 22:17 UTC (History)
7 users (show)

Fixed In Version: mock-3.3-1.fc38 mock-3.3-1.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-17 15:22:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Filipe Rosset 2022-10-17 03:24:12 UTC
Description of problem:

mock-3.1 working fine:
[filiperosset@raw aime]$ sudo mock -r /etc/mock/fedora-rawhide-x86_64.cfg aime-8.20221012-1.fc38.src.rpm
INFO: mock.py version 3.1 starting (python version = 3.11.0, NVR = mock-3.1-1.fc37)...
Start(bootstrap): init plugins
INFO: tmpfs initialized
INFO: selinux enabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: tmpfs initialized
INFO: selinux enabled
Finish: init plugins
^CERROR: Exiting on user interrupt, <CTRL>-C\


# update mock and mock-filesystem packages
[filiperosset@raw aime]$ sudo dnf update mock mock-filesystem -y
Last metadata expiration check: 0:57:40 ago on Sun 16 Oct 2022 11:22:31 PM -03.
Dependencies resolved.
======================================================================================================================================================
 Package                                  Architecture                    Version                              Repository                        Size
======================================================================================================================================================
Upgrading:
 mock                                     noarch                          3.2-1.fc38                           rawhide                          269 k
 mock-filesystem                          noarch                          3.2-1.fc38                           rawhide                           18 k

Transaction Summary
======================================================================================================================================================
Upgrade  2 Packages

Total download size: 287 k
Downloading Packages:
(1/2): mock-filesystem-3.2-1.fc38.noarch.rpm                                                                          352 kB/s |  18 kB     00:00
(2/2): mock-3.2-1.fc38.noarch.rpm                                                                                     2.4 MB/s | 269 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                 348 kB/s | 287 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                              1/1
  Running scriptlet: mock-filesystem-3.2-1.fc38.noarch                                                                                            1/4
  Upgrading        : mock-filesystem-3.2-1.fc38.noarch                                                                                            1/4
  Upgrading        : mock-3.2-1.fc38.noarch                                                                                                       2/4
  Cleanup          : mock-3.1-1.fc37.noarch                                                                                                       3/4
  Cleanup          : mock-filesystem-3.1-1.fc37.noarch                                                                                            4/4
  Running scriptlet: mock-filesystem-3.1-1.fc37.noarch                                                                                            4/4
  Verifying        : mock-3.2-1.fc38.noarch                                                                                                       1/4
  Verifying        : mock-3.1-1.fc37.noarch                                                                                                       2/4
  Verifying        : mock-filesystem-3.2-1.fc38.noarch                                                                                            3/4
  Verifying        : mock-filesystem-3.1-1.fc37.noarch                                                                                            4/4

Upgraded:
  mock-3.2-1.fc38.noarch                                               mock-filesystem-3.2-1.fc38.noarch

Complete!


# try to mock the very same previous build
[filiperosset@raw aime]$ sudo mock -r /etc/mock/fedora-rawhide-x86_64.cfg aime-8.20221012-1.fc38.src.rpm
ERROR: Can't parse Mock configuration under root



Version-Release number of selected component (if applicable):
mock-3.2-1.fc38.noarch 
mock-filesystem-3.2-1.fc38.noarch

How reproducible:
sudo dnf update mock mock-filesystem -y

Steps to Reproduce:
1. update from mock 3.1 to mock 3.2
2. try to mock a build from scratch 
3.

Actual results:
ERROR: Can't parse Mock configuration under root


Expected results:
mock build the src

Additional info:

Comment 1 Filipe Rosset 2022-10-17 03:32:07 UTC
Also affects Fedora 36:


[filiperosset@f36 detox]$ sudo mock -r /etc/mock/fedora-rawhide-x86_64.cfg detox-1.4.5-3.fc38.src.rpm
ERROR: Can't parse Mock configuration under root

# downgrade mock
[filiperosset@f36 detox]$ sudo dnf downgrade mock mock-filesystem -y
Last metadata expiration check: 5:41:17 ago on Sun 16 Oct 2022 06:50:07 PM -03.
Dependencies resolved.
======================================================================================================================================================
 Package                                  Architecture                    Version                              Repository                        Size
======================================================================================================================================================
Downgrading:
 mock                                     noarch                          3.1-1.fc36                           updates                          193 k
 mock-filesystem                          noarch                          3.1-1.fc36                           updates                           19 k

Transaction Summary
======================================================================================================================================================
Downgrade  2 Packages

Total download size: 212 k
Downloading Packages:
(1/2): mock-filesystem-3.1-1.fc36.noarch.rpm                                                                          173 kB/s |  19 kB     00:00
(2/2): mock-3.1-1.fc36.noarch.rpm                                                                                     1.1 MB/s | 193 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                 211 kB/s | 212 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                              1/1
  Running scriptlet: mock-filesystem-3.1-1.fc36.noarch                                                                                            1/4
  Downgrading      : mock-filesystem-3.1-1.fc36.noarch                                                                                            1/4
  Downgrading      : mock-3.1-1.fc36.noarch                                                                                                       2/4
  Cleanup          : mock-3.2-1.fc36.noarch                                                                                                       3/4
  Cleanup          : mock-filesystem-3.2-1.fc36.noarch                                                                                            4/4
  Running scriptlet: mock-filesystem-3.2-1.fc36.noarch                                                                                            4/4
  Verifying        : mock-3.1-1.fc36.noarch                                                                                                       1/4
  Verifying        : mock-3.2-1.fc36.noarch                                                                                                       2/4
  Verifying        : mock-filesystem-3.1-1.fc36.noarch                                                                                            3/4
  Verifying        : mock-filesystem-3.2-1.fc36.noarch                                                                                            4/4

Downgraded:
  mock-3.1-1.fc36.noarch                                               mock-filesystem-3.1-1.fc36.noarch

Complete!
[filiperosset@f36 detox]$ sudo mock -r /etc/mock/fedora-rawhide-x86_64.cfg detox-1.4.5-3.fc38.src.rpm
INFO: mock.py version 3.1 starting (python version = 3.10.7, NVR = mock-3.1-1.fc36)...
Start(bootstrap): init plugins
INFO: selinux enabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
INFO: Start(detox-1.4.5-3.fc38.src.rpm)  Config(fedora-rawhide-x86_64)
Start: clean chroot
Finish: clean chroot
Start(bootstrap): chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start(bootstrap): cleaning package manager metadata
Finish(bootstrap): cleaning package manager metadata
INFO: enabled HW Info plugin
Mock Version: 3.1
INFO: Mock Version: 3.1
^CERROR: Exception(detox-1.4.5-3.fc38.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
ERROR: Exiting on user interrupt, <CTRL>-C
[filiperosset@f36 detox]$

Comment 2 Filipe Rosset 2022-10-17 03:40:29 UTC
looks like if I add the user to mock group, and stop using sudo, the new version keeps working.
is this the expected behavior?

Comment 3 Pavel Raiskup 2022-10-17 08:00:23 UTC
Thank you for the report.  This was expected but turns out to be too
restrictive.

Relaxing: https://github.com/rpm-software-management/mock/pull/991

Comment 4 Fedora Update System 2022-10-17 15:19:28 UTC
FEDORA-2022-d736f03138 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-d736f03138

Comment 5 Fedora Update System 2022-10-17 15:22:34 UTC
FEDORA-2022-d736f03138 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2022-10-17 17:36:42 UTC
FEDORA-2022-3b6ee0825e has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-3b6ee0825e

Comment 7 Fedora Update System 2022-10-18 12:41:01 UTC
FEDORA-2022-3b6ee0825e has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-3b6ee0825e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-3b6ee0825e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-11-10 22:17:21 UTC
FEDORA-2022-3b6ee0825e has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.