Bug 633435 - /var/log/lastlog and /var/log/faillog included in cache.tar.gz
/var/log/lastlog and /var/log/faillog included in cache.tar.gz
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: mock (Show other bugs)
el5
All Linux
low Severity low
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-13 15:01 EDT by Nico Kadel-Garcia
Modified: 2013-01-10 01:13 EST (History)
5 users (show)

See Also:
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 00:57:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Nico Kadel-Garcia 2010-09-13 15:01:17 EDT
Description of problem:
    Unnecessary and oversized /var/log/lastlog and /var/log/faillog are included in cache.tar.gz when building mock cache. This tremendously slows cache rebuilding process and takes unnecessary cache space on systems with large uid values.

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

How reproducible:
    Rebuild any SRPM with mock, 

Steps to Reproduce:
1. mock any-package.src.rpm -r epel-5-i386
2. tar tpzvf /var/cache/mock/epel-5-i386/root_cache/root.tar.gz | grep /var/log/

Actual results:
    Huge ./var/log/faillog and ./var/log/lastlog files are in tarball.

Expected results:
    Only yum.log should have anything in it.

Additional info:
    This is easily avoided by adding following exclusions to /usr/lib/python2.4/site-packages/mock/plugins/root_cache.py:


--- /usr/lib/python2.4/site-packages/mock/plugins/root_cache.py.default 2010-08-27 10:55:34.000000000 -0400
+++ /usr/lib/python2.4/site-packages/mock/plugins/root_cache.py 2010-09-13 14:34:14.000000000 -0400
@@ -120,6 +120,8 @@
                                                        "--exclude=./dev",
                                                        "--exclude=./tmp/ccache",
                                                        "--exclude=./var/cache/yum",
+                                                       "--exclude=./var/log/lastlog",
+                                                       "--exclude=./var/log/faillog",
                                                        "."],
                         shell=False
                         )
Comment 1 Nico Kadel-Garcia 2010-09-13 15:02:33 EDT
Setting priority as "low". This isn't critical, merely helpful in systems with low disk space for /var/cache/mock/.
Comment 2 Clark Williams 2010-09-13 15:15:01 EDT
Nico,

Take a look at:  https://bugzilla.redhat.com/show_bug.cgi?id=585973

I think that the proposed patch there will do what you want (it essentially truncates lastlog|faillog to zero size before creating the cache tarball).
Comment 3 Nico Kadel-Garcia 2010-09-13 21:13:56 EDT
Eeeewww. Manipulating these files to zero them this way raises interesting questions of what running tools inside the mock "chroot" cage will do. Why bother when you can simply exclude them from the tarball?
Comment 4 Clark Williams 2010-09-14 09:50:24 EDT
well, this is long before the directory is used as a chroot. We're not running under a chroot(2) but creating the template for use in creating a chroot directory. 

It looks like some packages depend on the existance of faillog and lastlog, so I tend to lean towards creating empty files in the tarball.
Comment 5 Clark Williams 2010-09-16 12:06:56 EDT
Queued for next release
Comment 6 Fedora Update System 2010-09-20 10:35:10 EDT
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
Comment 7 Fedora Update System 2010-09-20 10:35:30 EDT
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
Comment 8 Fedora Update System 2010-09-20 10:42:28 EDT
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
Comment 9 Fedora Update System 2010-09-20 10:44:03 EDT
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
Comment 10 Fedora Update System 2010-09-20 13:53:13 EDT
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
Comment 11 Fedora Update System 2010-09-23 00:56:47 EDT
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.
Comment 12 Fedora Update System 2010-09-30 02:16:57 EDT
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.
Comment 13 Fedora Update System 2010-10-20 11:44:12 EDT
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
Comment 14 Fedora Update System 2010-10-20 11:46:35 EDT
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
Comment 15 Fedora Update System 2010-12-14 11:14:24 EST
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
Comment 16 Fedora Update System 2011-01-18 15:04:35 EST
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
Comment 17 Fedora Update System 2011-02-19 21:26:46 EST
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
Comment 18 Fedora Update System 2011-02-19 21:29:51 EST
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
Comment 19 Fedora Update System 2011-02-19 21:32:42 EST
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
Comment 20 Fedora Update System 2011-02-19 21:35:35 EST
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
Comment 21 Fedora Update System 2011-03-03 03:25:27 EST
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.
Comment 22 Fedora Update System 2011-03-03 03:34:12 EST
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.
Comment 23 Fedora Update System 2011-05-13 16:34:30 EDT
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
Comment 24 Fedora Update System 2011-05-13 16:39:04 EDT
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
Comment 25 Fedora Update System 2011-05-13 16:43:19 EDT
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
Comment 26 Fedora Update System 2011-05-13 16:47:39 EDT
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
Comment 27 Fedora Update System 2011-05-13 16:51:58 EDT
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
Comment 28 Fedora Update System 2011-05-19 00:35:53 EDT
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.
Comment 29 Fedora Update System 2011-05-24 22:43:14 EDT
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.
Comment 30 Fedora Update System 2011-05-24 23:17:31 EDT
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.
Comment 31 Fedora Update System 2011-06-02 15:07:22 EDT
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.
Comment 32 Fedora Update System 2011-06-02 15:17:16 EDT
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.

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