Whonix/Gentoo-Port

find a way to handle derivative config files

Opened this issue · 3 comments

Related to "create Gentoo ebuilds from Whonix source packages" (#11).

Some of Whonix's source packages are configuration packages. They take over ownership of configuration packages owned by other packages.

For example in Debian the file /usr/share/tor/tor-service-defaults-torrc is owned by the tor debian package. For configuration of Tor, the configuration package anon-gw-anonymizer-config takes over ownership of /usr/share/tor/tor-service-defaults-torrc using config-package-dev.

As @martincmelik suggested, to avoid conflicts with updates by Gentoo developers maybe such files could be added to /etc/dispatch-conf.conf using the configuration option frozen-files. (example)

Fortunately in such cases, files are suffixed .anondist in the source package. For example in case of anon-gw-anonymizer-config, make install installs the file to /usr/share/tor/tor-service-defaults-torrc.anondist. (Comparison, for better understanding: in case of Debian the config-package-dev package would keep care of the symlink magic. I.e. preventing conflicts with update from the mother distribution [Debian] vs the derivative [Whonix].)

TODO:
Invent a method similar to config-package-dev.

(Maybe re-using code from config-package-dev will be useful. Since config-package-dev relies on dpkg-divert it won't be that simple copy and paste but may still help.)

Does Gentoo have something similar to dpkg-divert?:
https://forums.gentoo.org/viewtopic-p-7665898.html

ebuild takeover ownership of other packages (config) files?:
https://forums.gentoo.org/viewtopic-t-1006878.html