[Dnsmasq-discuss] dnsmasq's use of /var/lib/misc/
Jima
jima at beer.tclug.org
Tue Dec 4 18:13:07 GMT 2007
On Tue, 4 Dec 2007, Simon Kelley wrote:
> I chose /var/lib/misc originally for no good reason, I just looked for a
> directory which already existed so that "make install" would be simpler.
> I'm sure that /var/lib/dnsmasq is more technically correct, but
> unilaterally making the change in the distributed tarball will break
> existing installations and upset people.
But you have no qualms with a downstream-applied patch? That's probably
the route I'd go.
> For distro packages, I can't any reason not to change: a little script
> which moves any existing leasefile as part of the upgrade is all that's
> required.
I kinda-sorta thought that through, but the conclusion I came to was it
wouldn't affect static leases, and dynamic ones would just get reassigned.
I didn't think through how trivial the fix would be, though, so I think
I'll go for it. (Oh, wait, I already have a %post section that checks for
upgrades, so this is even more trivial.)
There's some other related hackery (i.e., "what if the user has
dhcp-leasefile configured in dnsmasq.conf?"), but...kind of a necessary
evil for proper selinux support. :-|
> As I'm sure you're aware the default leasefile location is specified in
> src/config.h
`grep -r` FTW. ;-)
> If you want to avoid any patches to the distributed source, an
> alternative is to invoke dnsmasq from the package-provided startup
> script as "dnsmasq -l /var/lib/dnsmasq/dnsmasq.leases" I use a similar
> technique in the debian package to change the default user from "nobody"
> to "dnsmasq" without having to maintain a patch.
Speaking of that, I probably should change the user at some point, too.
:-|
I think I'll go with a patch. The barrier to entry is pretty easy, and
I'm already maintaining three patches...no huge deal. (Actually, I could
merge it with the enable-dbus one, which already mucks around in
config.h.)
FWIW, I think I'll take this opportunity to push 2.41test20 to Rawhide.
Thanks for the feedback.
Jima
More information about the Dnsmasq-discuss
mailing list