Red Hat Bugzilla – Bug 1285519
RFE: provide a way to prevent creating artifacts with internal pathnames, e.g. anaconda-ks.cfg
Last modified: 2016-11-03 19:19:20 EDT
Description of problem: It would be useful to have a flag or option that prevents creating the anaconda-ks.cfg file under /root. There is currently no way to avoid this file since the file is written after %post. The use case that I'm trying to solve is delivering image builds that are initially generated from kickstarts. These image builds all contain the anaconda-ks.cfg file today because we can't remove it without post-processing using something like guestfish or virt-customize. This results in internal build locations and other internal information being included in the images.
I guess that not only anaconda-ks.cfg, but also installation logs should not be copied to /var/log/anaconda/, since they also contain internal locations.
(In reply to Jan Stodola from comment #1) > I guess that not only anaconda-ks.cfg, but also installation logs should not > be copied to /var/log/anaconda/, since they also contain internal locations. Yeah, that also makes sense, but I guess it should probably be a separate option so that we don't lump them together with kickstarts. So maybe inst.save_kickstart and inst.save_logs ? And if "inst.save_kickstart=0 inst.save_kickstart=0" would be added to boot command line both kickstarts and logs would not be saved to the system.
ok, two options make sense.
A patch[0] adding this for Fedora has been posted for review. [0] https://lists.fedorahosted.org/archives/list/anaconda-patches%40lists.fedorahosted.org/message/W4WDSKJ6OUKBSE2SXFWCP6A2M6OZL37X/
We should also consider dropping other caches liek yum's cache or so. Basically this has quite a bit of overlap with virt-sysprep IMO.
(In reply to Fabian Deutsch from comment #5) > We should also consider dropping other caches liek yum's cache or so. > Basically this has quite a bit of overlap with virt-sysprep IMO. We are thinking about making a single boot option that users can use to provide a comma separated list of things Anaconda should not save on the installed system. For example: inst.nosave=logs,kickstarts or inst.nosave=all To disable saving of all the "artifacts" that can be specified by the nosave option. This should be quite easy to extend to various kinds of things as needed.
That sounds like a nice approach. Please consider to put this in a somewhat isolated library, maybe this can be pulled into a separate tool for existing images.
*** Bug 1342663 has been marked as a duplicate of this bug. ***
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2016-2158.html