Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2012 15:52:42 GMT
From:      Dan McGregor <dan.mcgregor@usask.ca>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/169328: net/avahi-app unconditionally overwrites modified configuration files
Message-ID:  <201206221552.q5MFqgfv007279@red.freebsd.org>
Resent-Message-ID: <201206221600.q5MG0A5T000286@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         169328
>Category:       ports
>Synopsis:       net/avahi-app unconditionally overwrites modified configuration files
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 22 16:00:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Dan McGregor
>Release:        9.0-STABLE
>Organization:
>Environment:
FreeBSD shadrach.dyndns.org 9.0-STABLE FreeBSD 9.0-STABLE #0 r237403M: Thu Jun 21 13:14:23 CST 2012     dan@shadrach.dyndns.org:/usr/obj/usr/src/sys/SHADRACH  amd64
>Description:
This may well be an upstream bug, but when performing a make reinstall or make install of avahi-app the configuration files avahi-daemon and hosts are installed in $LOCALBASE/etc/avahi, even if the files already exist.

The relevant lines of the build log are:

test -z "/usr/local/etc/avahi" || .././install-sh -c -d "/usr/local/etc/avahi"
 install  -o root -g wheel -m 444 avahi-daemon.conf hosts '/usr/local/etc/avahi'
gmake[1] : on quitte le répertoire « /usr/obj/usr/ports/net/avahi-app/work/avahi-0.6.29/avahi-daemon »

Later on in the install it installs them conditionally (this is after the gmake install phase):

install  -o root -g wheel -m 444 /usr/obj/usr/ports/net/avahi-app/work/avahi-0.6.29/avahi-daemon/hosts  /usr/local/etc/avahi/hosts.dist
if [ ! -f /usr/local/etc/avahi/hosts ]; then  install  -o root -g wheel -m 444 /usr/obj/usr/ports/net/avahi-app/work/avahi-0.6.29/avahi-daemon/hosts  /usr/local/etc/avahi;  fi
install  -o root -g wheel -m 444 /usr/obj/usr/ports/net/avahi-app/work/avahi-0.6.29/avahi-daemon/avahi-daemon.conf  /usr/local/etc/avahi/avahi-daemon.conf.dist
if [ ! -f /usr/local/etc/avahi/avahi-daemon.conf ]; then  install  -o root -g wheel -m 444 /usr/obj/usr/ports/net/avahi-app/work/avahi-0.6.29/avahi-daemon/avahi-daemon.conf  /usr/local/etc/avahi;  fi

This makes upgrades awkward.
>How-To-Repeat:
Install net/avahi-app
edit $LOCALBASE/etc/avahi/hosts or avahi-daemon.conf
upgrade net/avahi-app
cd $LOCALBASE/etc/avahi
diff hosts.dist hosts
diff avahi-daemon.conf.dist avahi-daemon.conf
>Fix:
I suggest we disable installing config files in the gmake install phase and only perform the latter.  I don't know enough about autotools though to know how to do that.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206221552.q5MFqgfv007279>