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.
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.
Does the above patch fix the issue?
Created attachment 527793 [details] Patch to exclude bind mounts from root cache images (fixes typo) Fix stupid typo in patch
+ 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.
Ah, good point, guess I just need to force the '.' with a string operation
Created attachment 528079 [details] updated to not use os.path.join()
queued for 1.1.16
*** Bug 746096 has been marked as a duplicate of this bug. ***
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
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
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
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
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).
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.
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.
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
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
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
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
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
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.
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.
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.
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.
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.