On 03/27/2017 05:19 PM, Sam Morris wrote: > On Mon, 2017-03-27 at 08:25 +0200, Michael Stapelberg wrote: >> Thanks for the hint. I think it would make sense to fix this in >> vmdebootstrap itself, because it isn’t a Raspberry Pi-specific issue. > > https://codesearch.debian.net/search?q=rm+-f+%2Fetc%2Fssh%2Fssh_host_*&perpkg=1 > > It seems that every image-building tool has to re-implement the process > of removing SSH host keys, /etc/machine-id, /var/lib/dbus/machine-id > and so on before the image is actually created. > > What do you think of a more general approach to allow packages > themselves to participate in the process of preparing a system for > imaging? > > This could be a simple as having image-builders execute "run-parts > /usr/lib/preimage", that directory being populated by participating > packages; or a new "preimage" maintainer script, and a "dpkg-preimage" > command that invokes the preimage scripts for all installed packages. > > Thoughts?
Good idea. If one was to implement it, I'd use it for the OpenStack images.
