Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1050218 - mock rpm db created in mode 600, YumBaseError not defined
Summary: mock rpm db created in mode 600, YumBaseError not defined
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-08 21:17 UTC by Zenon Panoussis
Modified: 2014-06-18 07:17 UTC (History)
3 users (show)

Fixed In Version: yum-utils-1.1.31-21.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1097560 (view as bug list)
Environment:
Last Closed: 2014-06-13 09:56:16 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Zenon Panoussis 2014-01-08 21:17:32 UTC
There is a repeat of bug #982043 on el7. The strange thing is that the fix in that bug was yum-utils-1.1.31-19 and that's precisely what is in el7.

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 by initialising the chroot, changing the rpm db permissions manually to 660 and then running mock with --no-clean runs into the next problem:

DEBUG util.py:314:  Executing command: /usr/bin/repoquery -c /tmp/tmpT8pf5x --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:  Traceback (most recent call last):
DEBUG util.py:264:    File "/usr/bin/repoquery", line 1547, in <module>
DEBUG util.py:264:      main(sys.argv)
DEBUG util.py:264:    File "/usr/bin/repoquery", line 1415, in main
DEBUG util.py:264:      except YumBaseError, e:
DEBUG util.py:264:  NameError: global name 'YumBaseError' is not defined
DEBUG util.py:354:  Child return code was: 1

Comment 2 Zenon Panoussis 2014-01-08 21:37:13 UTC
The trick with --disable-plugin=package_state still works.

Comment 3 Valentina Mukhamedzhanova 2014-01-10 10:11:59 UTC
The YumBaseError is fixed upstream, ack to the second part of the bug.

Comment 4 Valentina Mukhamedzhanova 2014-01-10 10:25:09 UTC
Please file the first part (mock rpm db created in mode 600) of this bug report as a bug in mock.

Comment 6 Zenon Panoussis 2014-01-10 11:33:31 UTC
(In reply to Valentina Mukhamedzhanova from comment #4)
> Please file the first part (mock rpm db created in mode 600) of this bug
> report as a bug in mock.

That's bug #1051474 now.

Comment 9 Ludek Smid 2014-06-13 09:56:16 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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