Bug 1051474 - mock rpm db created in mode 600
Summary: mock rpm db created in mode 600
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-10 11:32 UTC by Zenon Panoussis
Modified: 2014-04-19 09:19 UTC (History)
2 users (show)

Fixed In Version: mock-1.1.38-1.el6
Clone Of:
Environment:
Last Closed: 2014-01-13 11:10:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
package_state: raise privs when accessing chroot rpmdb (1.14 KB, patch)
2014-02-21 16:12 UTC, Clark Williams
no flags Details | Diff

Description Zenon Panoussis 2014-01-10 11:32:28 UTC
Moved from bug #1050218.

Using mock-1.1.32-1 on rhel7, yum-utils-1.1.31-19, I get a repeat of bug #98204. 

result/root.log:

DEBUG util.py:314:  Executing command: /usr/bin/repoquery -c /tmp/tmpvWkMW6 --installed -a --qf '%{nevra} %{buildtime} %{size} %{pkgid} %{yumdb_info.from_repo}' > /var/lib/mock/rhel7-beta1-i686/result/installed_pkgs with env {'LANG': 'en_US.utf8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG util.py:264:  error: cannot open Packages index using db5 - Permission denied (13)
DEBUG util.py:264:  error: cannot open Packages database in /var/lib/mock/rhel7-beta1-i686/root/var/lib/rpm

# ls -l /var/lib/mock/rhel7-beta1-i686/root/var/lib/rpm/
total 24996
-rw------- 1 root mock  1544192 Jan  8 21:55 Basenames
-rw------- 1 root mock     8192 Jan  8 21:55 Conflictname
-rw------- 1 root mock   233472 Jan  8 21:55 Dirnames
-rw------- 1 root mock     8192 Jan  8 21:55 Group
-rw------- 1 root mock    16384 Jan  8 21:55 Installtid
-rw------- 1 root mock    20480 Jan  8 21:55 Name
-rw------- 1 root mock     8192 Jan  8 21:55 Obsoletename
-rw------- 1 root mock 23400448 Jan  8 21:55 Packages
-rw------- 1 root mock   147456 Jan  8 21:55 Providename
-rw------- 1 root mock   139264 Jan  8 21:55 Requirename
-rw------- 1 root mock    32768 Jan  8 21:55 Sha1header
-rw------- 1 root mock    24576 Jan  8 21:55 Sigmd5
-rw------- 1 root mock     8192 Jan  8 21:54 Triggername

# rpm -q yum-utils
yum-utils-1.1.31-19.el7.noarch

Changing the permissions doesn't help; they go back to 600 when mock does chroot init. 

Workaround: initialise the chroot, change the rpm db permissions manually to 660 and then run mock with --no-clean --disable-plugin=package_state.

Comment 1 Zenon Panoussis 2014-01-10 11:37:19 UTC
> ...I get a repeat of bug #98204. 

Sorry, that should be bug #982043.

Comment 2 Zenon Panoussis 2014-01-13 11:10:20 UTC
In order to build RHEL7.i686 I bootstrapped with necessary binary packages from fc19, built the packages for the build environment and their build dependencies, then rebuilt them by pulling my newly created el7 dependencies instead of fc19, then created the mock environment with that. I assumed there was no fedoraness left in there by then, and I assumed wrong. After yet another rebuild, this problem has gone away by itself. Clossing.

Comment 3 Clark Williams 2014-02-21 16:12:03 UTC
Created attachment 866114 [details]
package_state: raise privs when accessing chroot rpmdb

Please try this patch to see if it fixes your permissions problem

Comment 4 Fedora Update System 2014-03-25 20:24:23 UTC
mock-1.1.37-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc19

Comment 5 Fedora Update System 2014-03-25 20:26:50 UTC
mock-1.1.37-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc20

Comment 6 Fedora Update System 2014-03-25 20:28:56 UTC
mock-1.1.37-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.37-1.el6

Comment 7 Fedora Update System 2014-03-27 17:47:29 UTC
mock-1.1.37-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc20

Comment 8 Fedora Update System 2014-03-27 17:49:21 UTC
mock-1.1.37-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc19

Comment 9 Fedora Update System 2014-03-27 17:51:16 UTC
mock-1.1.37-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.37-2.el6

Comment 10 Fedora Update System 2014-03-31 19:04:03 UTC
mock-1.1.38-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc19

Comment 11 Fedora Update System 2014-03-31 19:06:23 UTC
mock-1.1.38-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.38-1.el6

Comment 12 Fedora Update System 2014-03-31 19:08:22 UTC
mock-1.1.38-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc20

Comment 13 Fedora Update System 2014-04-09 13:18:15 UTC
mock-1.1.38-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2014-04-18 15:37:12 UTC
mock-1.1.38-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2014-04-19 09:19:34 UTC
mock-1.1.38-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, 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.