Bug 744727 - Configured bind mount dirs are archived in the root cache tarball.
Summary: Configured bind mount dirs are archived in the root cache tarball.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mock
Version: el6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 746096 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-10 10:30 UTC by Davi Arnaut
Modified: 2011-11-26 23:06 UTC (History)
3 users (show)

Fixed In Version: mock-1.1.17-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-24 22:59:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to exclude bind mounts from root cache images (3.43 KB, patch)
2011-10-12 20:57 UTC, Clark Williams
no flags Details | Diff
Patch to exclude bind mounts from root cache images (fixes typo) (3.43 KB, patch)
2011-10-12 21:46 UTC, Clark Williams
no flags Details | Diff
updated to not use os.path.join() (3.47 KB, patch)
2011-10-13 18:51 UTC, Clark Williams
no flags Details | Diff

Description Davi Arnaut 2011-10-10 10:30:02 UTC
Description of problem:

The root_cache plugin does not exclude user-specified bind mounts (using the bind_mount plugin) when creating the root cache tarball.

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

1.1.15

How reproducible:

Always

Steps to Reproduce:
1. Enable bind_mount and root_cache plugins. 
2. Add directory to bind mount.
3. Initialize a chroot (ends up creating a root cache).
  
Actual results:

Contents of the bind mounted directory end up in the root cache.

Expected results:

Bind mounted directories should be excluded from the root cache.

Additional info:

It would also be nice to have a exclude_dirs option for the root cache plugin.

Comment 1 Clark Williams 2011-10-12 20:57:51 UTC
Created attachment 527787 [details]
Patch to exclude bind mounts from root cache images

This patch generates --exclude= arguments for tar in the root cache plugin for any bind mountpoints found with the bind_mount plugin. In addition it adds an exclude_dir parameter for the root cache plugin.

Comment 2 Clark Williams 2011-10-12 20:58:20 UTC
Does the above patch fix the issue?

Comment 3 Clark Williams 2011-10-12 21:46:34 UTC
Created attachment 527793 [details]
Patch to exclude bind mounts from root cache images (fixes typo)

Fix stupid typo in patch

Comment 4 Davi Arnaut 2011-10-13 11:04:33 UTC
+            bind_dirs = self.rootObj.pluginConf['bind_mount_opts']['dirs']
+            dirs = []

Unused.

+            for h,c in bind_dirs:
+                self.exclude_tar_cmds.append("--exclude=" + os.path.join(".", c))

If c is an absolute path, which I think is the common case, the "." will be discarded as os.path.join throws away all previous components if any component is an absolute path.

Comment 5 Clark Williams 2011-10-13 18:31:07 UTC
Ah, good point, guess I just need to force the '.' with a string operation

Comment 6 Clark Williams 2011-10-13 18:51:51 UTC
Created attachment 528079 [details]
updated to not use os.path.join()

Comment 7 Clark Williams 2011-10-13 19:12:07 UTC
queued for 1.1.16

Comment 8 Piotr Romanus 2011-10-14 02:09:46 UTC
*** Bug 746096 has been marked as a duplicate of this bug. ***

Comment 9 Fedora Update System 2011-10-14 16:28:45 UTC
mock-1.1.16-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.16-1.fc15

Comment 10 Fedora Update System 2011-10-14 16:29:48 UTC
mock-1.0.23-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.23-1.el5

Comment 11 Fedora Update System 2011-10-14 16:30:51 UTC
mock-1.1.16-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.16-1.fc14

Comment 12 Fedora Update System 2011-10-14 16:31:54 UTC
mock-1.1.16-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.16-1.el6

Comment 13 Fedora Update System 2011-10-15 20:25:12 UTC
Package mock-1.1.16-1.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.1.16-1.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14382
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2011-10-24 22:59:40 UTC
mock-1.1.16-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 15 Fedora Update System 2011-10-24 23:05:07 UTC
mock-1.1.16-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 16 Fedora Update System 2011-11-01 15:40:42 UTC
mock-1.1.17-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.17-1.fc15

Comment 17 Fedora Update System 2011-11-01 15:42:03 UTC
mock-1.1.17-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.17-1.fc16

Comment 18 Fedora Update System 2011-11-01 15:43:14 UTC
mock-1.1.17-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.17-1.fc14

Comment 19 Fedora Update System 2011-11-01 15:44:38 UTC
mock-1.0.24-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.24-1.el5

Comment 20 Fedora Update System 2011-11-01 15:46:01 UTC
mock-1.1.17-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.17-1.el6

Comment 21 Fedora Update System 2011-11-11 01:22:59 UTC
mock-1.1.17-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2011-11-26 19:24:04 UTC
mock-1.1.17-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.

Comment 23 Fedora Update System 2011-11-26 19:25:24 UTC
mock-1.0.24-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 24 Fedora Update System 2011-11-26 23:02:42 UTC
mock-1.1.17-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 25 Fedora Update System 2011-11-26 23:06:53 UTC
mock-1.1.17-1.fc15 has been pushed to the Fedora 15 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.