Bug 633435 - /var/log/lastlog and /var/log/faillog included in cache.tar.gz
Summary: /var/log/lastlog and /var/log/faillog included in cache.tar.gz
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mock
Version: el5
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-13 19:01 UTC by Nico Kadel-Garcia
Modified: 2013-01-10 06:13 UTC (History)
5 users (show)

Fixed In Version: mock-1.1.10-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-23 04:57:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nico Kadel-Garcia 2010-09-13 19:01:17 UTC
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 19:02:33 UTC
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 19:15:01 UTC
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-14 01:13:56 UTC
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 13:50:24 UTC
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 16:06:56 UTC
Queued for next release

Comment 6 Fedora Update System 2010-09-20 14:35:10 UTC
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 14:35:30 UTC
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 14:42:28 UTC
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 14:44:03 UTC
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 17:53:13 UTC
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 04:56:47 UTC
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 06:16:57 UTC
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 15:44:12 UTC
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 15:46:35 UTC
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 16:14:24 UTC
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 20:04:35 UTC
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-20 02:26:46 UTC
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-20 02:29:51 UTC
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-20 02:32:42 UTC
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-20 02:35:35 UTC
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 08:25:27 UTC
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 08:34:12 UTC
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 20:34:30 UTC
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 20:39:04 UTC
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 20:43:19 UTC
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 20:47:39 UTC
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 20:51:58 UTC
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 04:35:53 UTC
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-25 02:43:14 UTC
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-25 03:17:31 UTC
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 19:07:22 UTC
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 19:17:16 UTC
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.