On 10/26/2012 01:09 AM, Raphael Hertzog wrote: >> Is there a reason this must be done in base-files? Finnix currently >> does not patch base-files, and I'd rather not unless necessary. >> Currently I have a package, finnix-release, which sets /etc/lsb-release >> and uses that for other Finnix-specific identification within the OS. >> I'd like to add /etc/dpkg/origins/finnix to finnix-release, then change >> the /etc/dpkg/origins/default symlink to finnix in the postinst, which >> should not step on the back-files package itself (since the symlink is >> done there at postinst time as well). > > Yeah, this should be fine as well. But note that you probably also want to > update /etc/os-release which is also handled by base-files which is the > cross-distro-systemd-mandated file for that kind of information. > > I have a couple of bugs open against base-files to use something similar > though so that we would provide /etc/os-release.d/debian and > /etc/os-release would be just a symlink set by the postinst. Excellent. In the meantime, I've updated finnix-release for the next release[0]. It now does: 1. /etc/lsb-release is the canonical source of the release information in the package that is updated for releases, since it was first in my case. 2. In debian/rules, a script (debian/build-os-release) reads in lsb-release and builds an equivalent /etc/os-release.finnix 3. postinst/postrm take care of diverting base-files /etc/os-release out of the way and using /etc/os-release.finnix instead 4. /etc/dpkg/origins/finnix is shipped in the package, and postinst symlinks it to /etc/dpkg/origins/default. For other derivatives going this route, #1 and #2 can be logically reversed if you want; I simply chose lsb-release as the canonical source since Finnix already had LSB support. If you'd like to take a look, apt-get source finnix-release from "deb-src http://archive.finnix.org/finnix unstable main". RF [0] Well, next-next release technically. Finnix 106 has been frozen and will be released soon, so I've opened up 107 dev.
Attachment:
signature.asc
Description: OpenPGP digital signature