Bug 207220

Summary: Mock breaks on RHEL 4 U4
Product: [Retired] Fedora Hosted Projects Reporter: john.l.villalovos
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dcantrell
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-20 14:26:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description john.l.villalovos 2006-09-20 00:07:52 UTC
Mock does not work with RHEL4 U4.  It appears to be an issue where the
/var/lock/rpm/ directory needs to exist in the chroot before the yum command is
run.  This is due to a change in RPM that is talked about here:
http://rhn.redhat.com/errata/RHBA-2006-0440.html

This email thread talks about the issue:
http://lists.centos.org/pipermail/centos/2006-September/069708.html

There is a patch in the email which looks like this:
patch for mock-0.6.4:

========================================================================
--- mock.orig   2006-09-05 08:59:59.000000000 +0400
+++ mock        2006-09-06 12:38:04.000000000 +0400
@@ -581,7 +581,8 @@ class Root:
                       os.path.join(self.rootdir, 'etc/rpm'),
                       os.path.join(self.rootdir, 'tmp'),
                       os.path.join(self.rootdir, 'var/tmp'),
-                     os.path.join(self.rootdir, 'etc/yum.repos.d')]:
+                     os.path.join(self.rootdir, 'etc/yum.repos.d'),
+                     os.path.join(self.rootdir, 'var/lock/rpm')]:
              self._ensure_dir(item)

          self._mount()
========================================================================

Comment 1 Clark Williams 2006-09-20 14:26:49 UTC
This is fixed in the 0.6.5 upstream mock, which hasn't landed in the FE repo's
yet. You can grab my tarball from:

http://people.redhat.com/williams/mock/mock-0.6.5.tar.gz

Hopefully the FE package will be out tomorrow.