The problem with having the packaging install the preseed files is threefold:
* The files are owned by maas-region-api, so replacing them via packaging
is likely to create a conflict. (That said, I'm not sure if dpkg/APT has
some way to handle such issues, so there may be an official way to handle
such issues.)
* The preseed files may be modified by the maniacs-setup script to point to
the MAAS server rather than to ppa.launchpad.net, but only if the user has
configured the MAAS server as a local mirror. Currently, maniacs-setup
requires user interaction to verify this detail. This could be
streamlined to not require user interaction, but care will need to be
taken to not break something else in the process.
* If "maniacs-setup -p" were to be run as part of the post-install script
for the maas-cert-server package, it would currently break on initial
install because maniacs-setup would not have been run the first time,
which is an effective requirement for running it with "-p". This could
be handled by having the script plant a flag somewhere when it's done
its initial run and having the post-install script, or maniacs-setup
itself, look for this flag and refuse to run with options if it's not
found.
The philosophy behind the current approach is that the preseed files are configuration files, and it's therefore legitimate for users to modify them. The maniacs-setup script helps automate that modification (and lots more). Running "maniacs-setup -p" in the maas-cert-server package's post-install script could in principle be done, but doing so safely and in a way that won't cause further breakage could be tricky, which is why I've never coded it to do so to date.
When we've released updated preseed files, we've sent out e-mails urging people to run "maniacs-setup -p" to install the updated files. In the long term, improvements to the way all this is handled are desirable, but this specific issue is part of a much bigger picture. (There have been suggestions to enable maniacs-setup to operate completely non-interactively, for instance, and to have it do a better job of network discovery.) IMHO, it's better to tackle all of these issues simultaneously, since they interact with each other, than to try to fix them piecemeal.
The problem with having the packaging install the preseed files is threefold:
* The files are owned by maas-region-api, so replacing them via packaging
is likely to create a conflict. (That said, I'm not sure if dpkg/APT has
some way to handle such issues, so there may be an official way to handle
such issues.)
* The preseed files may be modified by the maniacs-setup script to point to
the MAAS server rather than to ppa.launchpad.net, but only if the user has
configured the MAAS server as a local mirror. Currently, maniacs-setup
requires user interaction to verify this detail. This could be
streamlined to not require user interaction, but care will need to be
taken to not break something else in the process.
* If "maniacs-setup -p" were to be run as part of the post-install script
for the maas-cert-server package, it would currently break on initial
install because maniacs-setup would not have been run the first time,
which is an effective requirement for running it with "-p". This could
be handled by having the script plant a flag somewhere when it's done
its initial run and having the post-install script, or maniacs-setup
itself, look for this flag and refuse to run with options if it's not
found.
The philosophy behind the current approach is that the preseed files are configuration files, and it's therefore legitimate for users to modify them. The maniacs-setup script helps automate that modification (and lots more). Running "maniacs-setup -p" in the maas-cert-server package's post-install script could in principle be done, but doing so safely and in a way that won't cause further breakage could be tricky, which is why I've never coded it to do so to date.
When we've released updated preseed files, we've sent out e-mails urging people to run "maniacs-setup -p" to install the updated files. In the long term, improvements to the way all this is handled are desirable, but this specific issue is part of a much bigger picture. (There have been suggestions to enable maniacs-setup to operate completely non-interactively, for instance, and to have it do a better job of network discovery.) IMHO, it's better to tackle all of these issues simultaneously, since they interact with each other, than to try to fix them piecemeal.