Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 585973
Summary: | root cache fails to untar with <fail|last>log | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Clement VARALDI <varaldcl> |
Component: | mock | Assignee: | Clark Williams <williams> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | el5 | CC: | dcantrell, mebrown, nkadel, varaldcl, vedran, williams |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | mock-1.1.10-1.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-09-23 04:57:05 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
Clement VARALDI
2010-04-26 14:53:36 UTC
are /var/log/lastlog and /var/log/faillog sparse files? Sounds like we should nuke those files before creating the cache image... Hi, they are. The trouble is packages actually "can" use those files, so we can nuke them but when untaring files, we might have to re-create them... Please note that mockobjects is a java testing utility and has nothing to do with this issue. There does not appear to be a mock component selectable for rhel 5 in this bugzilla. Where did you get the mock rpm from? Hi I don't remember having reported this bug on mockobjects but rather on Fedora/mock. Could you please change the product/component? (I don't have the permissions to do it) Thanks Anyway, here are the information requested: # rpm -qi mock Name : mock Relocations: (not relocatable) Version : 1.0.2 Vendor: Fedora Project Release : 1.el5 Build Date: Wed 23 Dec 2009 11:50:56 PM CET Install Date: Thu 28 Jan 2010 09:21:21 AM CET Build Host: localhost Group : Development/Tools Source RPM: mock-1.0.2-1.el5.src.rpm Size : 0 License: GPLv2+ Signature : DSA/SHA1, Thu 28 Jan 2010 09:16:29 AM CET, Key ID 6de4113d19e1a11f Packager : Fedora Project URL : http://fedoraproject.org/wiki/Projects/Mock Summary : Builds packages inside chroots Description : Mock takes a srpm and builds it in a chroot taken on reassigning the project back to Fedora epel and setting the correct component. What about truncating both /var/log/lastlog and /var/log/faillog to empty files before creating the cache? That might sound like a good idea but truncating (at least) the faillog file on the server would erase all information from pam_tally, which is against our security policies... Sorry, I meant the files in the chroot, not the actual files on the host system. Looking at adding the patch below. This will truncate both lastlog and faillog files in the chroot directory, before the cache tarball is created. Make sense? diff --git a/py/mock/plugins/root_cache.py b/py/mock/plugins/root_cache.py index 007627c..6a3ca1a 100644 --- a/py/mock/plugins/root_cache.py +++ b/py/mock/plugins/root_cache.py @@ -106,6 +106,11 @@ class RootCache(object): for tmp in glob(self.rootObj.makeChrootPath('var/lib/rpm/__db*')): os.unlink(tmp) + # truncate the sparse files in /var/log + for logfile in ('/var/log/lastlog', '/var/log/faillog'): + f = open(self.rootObj.makeChrootPath(logfile), "w") + f.truncate(0) + f.close() # never rebuild cache unless it was a clean build. if self.rootObj.chrootWasCleaned: I just reported this in bug 633435, which can be marked as a duplicate, and in fact submitted the same patch there as here, to exclude those files from the tarball. To the idea of zeroing the files: why bother zeroing and invalidating a file that you can simply exclude? about your zeroing files, the fact is (tell me if I'm wrong) we can't truncate "root faillog" (but we can truncate the chroot one). Reading the diff, it seems that for the sparse files, you *create* new ones inside the chroot env when creating the root cache? If that's the case then it looks fine :) yes, the intend is to create empty files in the chroot. That way anyone that depends on their existence will work and we're not paying a huge size penalty for a couple of sparse files. Queue for next release mock-1.1.5-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.5-1.fc14 mock-1.1.5-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mock-1.1.5-1.fc13 mock-1.0.12-1.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/mock-1.0.12-1.fc12 mock-1.0.12-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.12-1.el5 mock-1.0.12-1.el5 has been pushed to the Fedora EPEL 5 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'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/mock-1.0.12-1.el5 Hi, tested, and it seems to work as expected: # tar ztvf cache.tar.gz | egrep "/var/log/(fail|last)log" -rw-r--r-- root/root 0 2010-09-21 12:23:58 ./var/log/lastlog -rw------- root/root 0 2010-09-21 12:23:58 ./var/log/faillog mock-1.1.5-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.5-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. mock-1.0.13-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.13-1.el5 mock-1.0.13-1.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/mock-1.0.13-1.fc12 mock-1.0.14-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.14-1.el5 mock-1.0.15-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.15-1.el5 mock-1.1.9-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc13 mock-1.0.16-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.16-1.el5 mock-1.1.9-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.9-1.el6 mock-1.1.9-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc14 mock-1.1.9-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.9-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.10-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc15 mock-1.1.10-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc14 mock-1.0.17-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.17-1.el5 mock-1.1.10-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc13 mock-1.1.10-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6 mock-1.1.10-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.10-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.10-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. mock-1.0.17-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.10-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. |