Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524036 - net-dns/dnsmasq-2.71-r1 overwrites /var/lib/misc/dnsmasq.leases
Summary: net-dns/dnsmasq-2.71-r1 overwrites /var/lib/misc/dnsmasq.leases
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-29 14:49 UTC by Harm Geerts
Modified: 2014-10-07 01:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harm Geerts 2014-09-29 14:49:39 UTC
The change made to fix #520396 causes the /var/lib/misc/dnsmasq.leases file to be overwritten when (re)installing dnsmasq.

In addition #522874 reports the migration problem when dnsmasq was installed prior to merging <net-dns/dnsmasq-2.71-r1
This luckily prevents users that upgrade from losing the lease file.

The ebuild should only install dnsmasq.leases if it doesn't exist and preferably not let portage track it so it is not removed when dnsmasq is unmerged.

Reproducible: Always

Steps to Reproduce:
1. emerge =net-dns/dnsmasq-2.71-r1
2. echo "lease data" > /var/lib/misc/dnsmasq.leases
3. emerge =net-dns/dnsmasq-2.71-r1
4. test -s /var/lib/misc/dnsmasq.leases || echo "I lost my leases"
Actual Results:  
/var/lib/misc/dnsmasq.leases is overwritten with an empty file.

Expected Results:  
/var/lib/misc/dnsmasq.leases should not be touched if it exists.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-29 15:31:41 UTC
CONFIG_PROTECT (make.conf(5)) is your friend.
Comment 2 Harm Geerts 2014-09-29 15:45:24 UTC
I'm well aware of it but I don't think it applies here as dnsmasq.leases is not a configuration file.

Would a different solution to fix #520396 be to create the leases file from the init script instead of the ebuild?
Comment 3 Patrick McLean gentoo-dev 2014-10-07 01:04:57 UTC
This is fixed in net-dns/dnsmasq-2.72