ports/83082: Nylon port overwrites existing configuration files

Rob MacGregor freebsd.macgregor at blueyonder.co.uk
Thu Jul 7 06:20:18 UTC 2005

>Number:         83082
>Category:       ports
>Synopsis:       Nylon port overwrites existing configuration files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 07 06:20:17 GMT 2005
>Originator:     Rob MacGregor
>Release:        5.4
FreeBSD phoenix5.4-STABLE FreeBSD 5.4-STABLE #27: Tue May 10 18:51:04 UTC 2005     root at phoenix:/usr/obj/usr/src/sys/PHOENIX  i386

The nylon (net/nylon) port installs a sample configuration file, which is pretty common.  What isn't common however is that it installs it as the actual configuration file, overwriting any existing configuration.
Install nylon, change the configuration (such as to allow other hosts to use it), re-install nylon (portupgrade -f nylon).  Restart nylon and watch it break.
Rename net/nylon/files/nylon.conf to nylon.conf.sample and update Makefile accordingly.  Or apply the following patch to the Makefile to install nylon.conf as nylon.conf.sample:

*** Makefile.old        Thu Jul  7 06:16:37 2005
--- Makefile    Thu Jul  7 06:17:39 2005
*** 27,40 ****
  MAN1=         nylon.1
! PLIST_FILES=  bin/nylon etc/nylon.conf etc/rc.d/nylon.sh
        @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
                ${FILESDIR}/nylon.sh.in > ${WRKSRC}/nylon.sh
!       ${INSTALL_DATA} ${FILESDIR}/nylon.conf ${PREFIX}/etc
        ${INSTALL_SCRIPT} ${WRKSRC}/nylon.sh ${PREFIX}/etc/rc.d
  .include <bsd.port.mk>
--- 27,40 ----
  MAN1=         nylon.1
! PLIST_FILES=  bin/nylon etc/nylon.conf.sample etc/rc.d/nylon.sh
        @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
                ${FILESDIR}/nylon.sh.in > ${WRKSRC}/nylon.sh
!       ${INSTALL_DATA} ${FILESDIR}/nylon.conf ${PREFIX}/etc/nylon.conf.sample
        ${INSTALL_SCRIPT} ${WRKSRC}/nylon.sh ${PREFIX}/etc/rc.d
  .include <bsd.port.mk>


More information about the freebsd-ports-bugs mailing list