Bug 224844 - sysutils/zrepl initscript broken for FreeBSD 10.3
Summary: sysutils/zrepl initscript broken for FreeBSD 10.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Ben Woods
URL:
Keywords: patch, patch-ready
Depends on: 224948
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-02 18:23 UTC by Bernhard
Modified: 2018-04-29 14:20 UTC (History)
0 users

See Also:
woodsb02: maintainer-feedback+


Attachments
Patch to fix sysutils/zrepl init script on FreeBSD version < 11.1-RELEASE (3.10 KB, patch)
2018-01-06 06:45 UTC, Ben Woods
woodsb02: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard 2018-01-02 18:23:09 UTC
Hi,

I believe, this port is broken for at least FreeBSD 10.3, as its initscript uses newer commandline options from /usr/bin/daemon available in later versions of FreeBSD:

root@basilika:~ # service zrepl start
Starting zrepl.
daemon: illegal option -- S
usage: daemon [-cfr] [-p child_pidfile] [-P supervisor_pidfile] [-u user]
command arguments ...
/usr/local/etc/rc.d/zrepl: WARNING: failed to start zrepl

root@basilika:~ # uname -a
FreeBSD basilika.example.com 10.3-RELEASE-p20 FreeBSD 10.3-RELEASE-p20 #0: Wed Jul 12 03:13:07 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

Removing all those non-existant options from the initscript brings zrepl to a somehow working state with errorlog ending up in /var/log/messages

Wish you all a happy new year 2018,

best regards,

Bernhard
Comment 1 Ben Woods freebsd_committer 2018-01-06 06:45:12 UTC
Created attachment 189456 [details]
Patch to fix sysutils/zrepl init script on FreeBSD version < 11.1-RELEASE

The attached patch removes the daemon syslog feature on FreeBSD versions < 11.1.

This has little effect to the usefulness of zrepl logging, as the daemon itself has inbuilt syslog support which is enabled by default in the sample config file /usr/local/etc/zrepl/zrepl.yml. The only output to stdout/stderr from zrepl will be if the syslog feature is not working (unlikely).
Comment 2 Ben Woods freebsd_committer 2018-01-06 07:02:58 UTC
This patch first needs the Mk/Uses/go.mk framework updated to allow ports to override make targets and include <bsd.port.pre.mk>. PR#224948
Comment 3 commit-hook freebsd_committer 2018-04-27 07:35:55 UTC
A commit references this bug:

Author: woodsb02
Date: Fri Apr 27 07:35:14 UTC 2018
New revision: 468402
URL: https://svnweb.freebsd.org/changeset/ports/468402

Log:
  sysutils/zrepl: Fix rc.d init script on FreeBSD < 11.1

  This change removes the daemon syslog feature on FreeBSD < 11.1.
  This has little effect to the usefulness of zrepl logging, as the daemon
  itself has inbuilt syslog support which is enabled by default in the
  sample config file /usr/local/etc/zrepl/zrepl.yml. The only output to
  stdout/stderr from zrepl will be if its inbuilt syslog feature is not
  working.

  PR:		224844
  Reported by:	Bernhard <bernhard.kneip@postadigitale.de>
  MFH:		2018Q2

Changes:
  head/sysutils/zrepl/Makefile
  head/sysutils/zrepl/files/zrepl.in
Comment 4 commit-hook freebsd_committer 2018-04-29 14:19:06 UTC
A commit references this bug:

Author: woodsb02
Date: Sun Apr 29 14:18:46 UTC 2018
New revision: 468629
URL: https://svnweb.freebsd.org/changeset/ports/468629

Log:
  MFH: r468402

  sysutils/zrepl: Fix rc.d init script on FreeBSD < 11.1

  This change removes the daemon syslog feature on FreeBSD < 11.1.
  This has little effect to the usefulness of zrepl logging, as the daemon
  itself has inbuilt syslog support which is enabled by default in the
  sample config file /usr/local/etc/zrepl/zrepl.yml. The only output to
  stdout/stderr from zrepl will be if its inbuilt syslog feature is not
  working.

  PR:		224844
  Reported by:	Bernhard <bernhard.kneip@postadigitale.de>

  Approved by:	ports-secteam (riggs)

Changes:
_U  branches/2018Q2/
  branches/2018Q2/sysutils/zrepl/Makefile
  branches/2018Q2/sysutils/zrepl/files/zrepl.in
Comment 5 Ben Woods freebsd_committer 2018-04-29 14:20:19 UTC
Now also merged to the ports r2018Q2 quarterly branch.
Thanks for reporting Bernhard!