Bug 235141 - mock 0.6.13 is unable to clean buildroot if any package sets immutable bit
mock 0.6.13 is unable to clean buildroot if any package sets immutable bit
Status: CLOSED ERRATA
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Clark Williams
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-03 18:18 EDT by Tuomo Soini
Modified: 2013-01-09 23:14 EST (History)
3 users (show)

See Also:
Fixed In Version: 0.8.4-2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-29 15:05:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch to add chattr -R -i run before trying to clean up chroot (2.94 KB, patch)
2007-04-03 18:18 EDT, Tuomo Soini
no flags Details | Diff
Improved patch to add chattr -i run (3.37 KB, patch)
2007-05-12 03:35 EDT, Tuomo Soini
no flags Details | Diff
Updated chatttr -i cleanup patch for mock 0.7, tested with 0.7.4. (2.77 KB, patch)
2007-07-23 04:41 EDT, Tuomo Soini
no flags Details | Diff
chattr -i patch upgraded for mock-0.7.6 (2.77 KB, patch)
2007-09-14 08:22 EDT, Tuomo Soini
no flags Details | Diff

  None (edit)
Description Tuomo Soini 2007-04-03 18:18:08 EDT
Description of problem:

If any rpm sets immutable bit mock is unable to clean up build chroot dir.

Version-Release number of selected component (if applicable):

mock-0.6.13

How reproducible:

Try to build rhel5 packages so that your build needs nss-3.11.5-3.el5

nss-3.11.5-3.el5 sets immutable bit to two library files.

Steps to Reproduce:
1. mock -r rhel-5-i386 build /path/sourcerpmfilename
2. mock -r rhel-5-i386 build /path/othersourcerpmfile
  
Actual results:

Mock fails to clean up /var/lib/mock/rhel-5-i386/root and second build fails.

Expected results:

second package should be built.

Proposed fix:

Mock should run chattr -R -i to clear immutable bit from files inside chroot
root dir before trying to clean it.
Comment 1 Tuomo Soini 2007-04-03 18:18:09 EDT
Created attachment 151626 [details]
Patch to add chattr -R -i run before trying to clean up chroot
Comment 2 Tuomo Soini 2007-05-12 03:35:59 EDT
Created attachment 154583 [details]
Improved patch to add chattr -i run

I improved patch so that now mock first try to clean up with rm, and if rm
fails, try to chattr -i root and run rm again after that. This change speeds up
clean because chattr -i is run only if rm fails on first run.
Comment 3 Tuomo Soini 2007-07-23 04:41:25 EDT
Created attachment 159768 [details]
Updated chatttr -i cleanup patch for mock 0.7, tested with 0.7.4.
Comment 4 Tuomo Soini 2007-09-14 08:22:50 EDT
Created attachment 195791 [details]
chattr -i patch upgraded for mock-0.7.6
Comment 5 Michael E Brown 2007-10-22 14:32:24 EDT
fixed for upcoming mock 0.8.3
Comment 6 Fedora Update System 2007-10-24 03:06:22 EDT
mock-0.8.4-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'
Comment 7 Fedora Update System 2007-10-29 15:05:35 EDT
mock-0.8.4-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2007-11-06 11:12:06 EST
mock-0.8.4-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'
Comment 9 Fedora Update System 2007-11-08 01:01:44 EST
mock-0.8.4-2.fc8 has been pushed to the Fedora 8 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.