[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to take ownership of a file owned by a different package?



Hi!

A Debian derivative (Whonix [1]) is maintained by me.

The Tor Debian package [2] owns Tor's configuration file /etc/tor/torrc.
This is fine from Debian user perspective, but as a Debian derivative,
I'd like to use the Tor Debian package and just ship a configuration
file adjusted for the derivative.

I've been reading the Debian policy manual [3] and man page of
dpkg-divert. I think dpkg-divert is the correct tool for such situations?

As test, I used:
sudo dpkg-divert --package whonix-gateway --divert /etc/tor/torrc.real
--rename /etc/tor/torrc

Checking /etc/tor/torrc.real contains the upstream version and
/etc/tor/torrc does not exist anymore as expected.

Should the upstream maintainer of the Debian Tor package [2] decide to
modify /etc/tor/torrc, I think the user shouldn't see the following (as
wanted). Is this correct?

> Configuration file `/etc/tor/torrc'
> ==> Modified (by you or by a script) since installation.
> ==> Package distributor has shipped an updated version.
> What would you like to do about it ? Your options are:
> ...

But when installing the whonix-gateway .deb, I still see

> Configuration file `/etc/tor/torrc'
> ==> Modified (by you or by a script) since installation.
> ==> Package distributor has shipped an updated version.
> What would you like to do about it ? Your options are:
> ...

So something is wrong.

In essence, I want to remove ownership of /etc/tor/torrc from the tor
debian package and add ownership of /etc/tor/torrc to the whonix-gateway
deb. How can I do that?

Cheers,
adrelanos

[1] https://github.com/adrelanos/Whonix
[2] http://packages.debian.org/tor
[3] http://www.debian.org/doc/debian-policy/ap-pkg-diversions.html




Reply to: