Bug 213597

Summary: net/netatalk3: rc.d script incorrectly substituted after r423537
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Joe Marcus Clarke <marcus>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (marcus)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Dimitry Andric freebsd_committer freebsd_triage 2016-10-18 17:56:26 UTC
In r423537 net/netatalk3 was updated to use the new options framework (see also bug 213192).  Unfortunately, the update has broken the substitution of %%ZEROCONF%% in the rc.d script:

$ make showconfig
===> The following configuration options are available for netatalk3-3.1.10,1:
     ACL=off: Enable ACL support
     DBUS=off: D-Bus IPC system support
     KERBEROS=off: Kerberos support
     KERBEROS5=off: Kerberos 5 support
     LDAP=off: LDAP protocol support
     LIBWRAP=off: TCP wrapper support
     MYSQL=off: Enable MySQL CNID backend support
     PAM=off: Pluggable authentication module support
     SENDFILE=off: Enable Sendfile support
====> Zeroconf(Bonjour) support: you can only select none or one of them
     AVAHI=off: Zeroconf support via Avahi
     MDNSRESPONDER=on: Zeroconf support via mDNSResponder
===> Use 'make config' to modify these settings
$ make
... build build build ...
===> Staging rc.d startup script(s)
$ head /wkrdirs/usr/ports/net/netatalk3/work/stage/usr/local/etc/rc.d/netatalk
#!/bin/sh
#
# $FreeBSD: head/net/netatalk3/files/netatalk.in 398560 2015-10-04 01:23:32Z marcus $
#
# PROVIDE: netatalk
# REQUIRE: DAEMON %%ZEROCONF%%
# KEYWORD: shutdown
#
# AFP fileserver for Mac clients.  Add the following to /etc/rc.conf to
# enable:

I also tried with ZEROCONF completely off, but it results in the same issue.

However, I am unsure how to get the functionality of the earlier Makefile, which had:

SUB_LIST+=              ZEROCONF=""

in case of zeroconf being turned off,

SUB_LIST+=              ZEROCONF="avahi_daemon"

in case of avahi, and

SUB_LIST+=              ZEROCONF="mdnsd"

in case of mdnsresponder.
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-10-18 18:30:28 UTC
A commit references this bug:

Author: marcus
Date: Tue Oct 18 18:30:24 UTC 2016
New revision: 424199
URL: https://svnweb.freebsd.org/changeset/ports/424199

Log:
  * Properly expand %%ZEROCONF%% in the rc.d script
  * While here, ensure zeroconf support is disabled at configure time if neither Avahi or mDNSResponder
    has been chosen

  PR:		213597

Changes:
  head/net/netatalk3/Makefile
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2016-10-18 18:31:11 UTC
Fixed in 3.1.0_2, as well as making sure to disable Zeroconf support is so requested.