Bug 235141 - mock 0.6.13 is unable to clean buildroot if any package sets immutable bit
Summary: mock 0.6.13 is unable to clean buildroot if any package sets immutable bit
Status: CLOSED ERRATA
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock   
(Show other bugs)
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-03 22:18 UTC by Tuomo Soini
Modified: 2013-01-10 04:14 UTC (History)
3 users (show)

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


Attachments (Terms of Use)
Patch to add chattr -R -i run before trying to clean up chroot (2.94 KB, patch)
2007-04-03 22:18 UTC, Tuomo Soini
no flags Details | Diff
Improved patch to add chattr -i run (3.37 KB, patch)
2007-05-12 07:35 UTC, 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 08:41 UTC, Tuomo Soini
no flags Details | Diff
chattr -i patch upgraded for mock-0.7.6 (2.77 KB, patch)
2007-09-14 12:22 UTC, Tuomo Soini
no flags Details | Diff

Description Tuomo Soini 2007-04-03 22:18:08 UTC
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 22:18:09 UTC
Created attachment 151626 [details]
Patch to add chattr -R -i run before trying to clean up chroot

Comment 2 Tuomo Soini 2007-05-12 07:35:59 UTC
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 08:41:25 UTC
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 12:22:50 UTC
Created attachment 195791 [details]
chattr -i patch upgraded for mock-0.7.6

Comment 5 Michael E Brown 2007-10-22 18:32:24 UTC
fixed for upcoming mock 0.8.3

Comment 6 Fedora Update System 2007-10-24 07:06:22 UTC
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 19:05:35 UTC
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 16:12:06 UTC
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 06:01:44 UTC
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.