Bug 225687 - dns/bind99, dns/bind910, dns/bind911, dns/bind912: rc script defaults to wrong pid location
Summary: dns/bind99, dns/bind910, dns/bind911, dns/bind912: rc script defaults to wron...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mathieu Arnold
URL:
Keywords: easy, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2018-02-05 15:29 UTC by John W. O'Brien
Modified: 2018-02-07 22:50 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments
dns/bind9x: Fix pid file location in rc script (3.03 KB, patch)
2018-02-05 15:29 UTC, John W. O'Brien
john: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John W. O'Brien 2018-02-05 15:29:44 UTC
Created attachment 190343 [details]
dns/bind9x: Fix pid file location in rc script

Synopsis
========

All versions of the BIND 9 port supply an rc script (files/named.in) that determine the location of the pid file by searching the config file and falling back to a hard-coded default. The rc default and the location specified in the sample config file are the same, which is unnecessary, but the rc default is not the same as the default location compiled into the named binary, which is necessary.


Ports affected
==============

    dns/bind99
    dns/bind910
    dns/bind911
    dns/bind912


Expected behavior
=================

1. Specify the pid location in the config file

The named binary writes a pid file to the specified location.

The named rc script finds the pid location with get_pidfile_from_conf.


2. Don't specify the pid location in the config file

The named binary writes a pid file to /var/run/named/named.pid.

The named rc script finds no pid location with get_pidfile_from_conf and defaults to /var/run/named/named.pid


Observed behavior
=================

1. Specify the pid location in the config file [PASS]

The named binary writes a pid file to the specified location.

The named rc script finds the pid location with get_pidfile_from_conf.


2. Don't specify the pid location in the config file [FAIL]

The named binary writes a pid file to /var/run/named/named.pid.

The named rc script finds no pid location with get_pidfile_from_conf and defaults to /var/run/named/pid, which does not exist.



Fix
===

The attached patch updates the RC scripts so the default PID location matches the binary default.
Comment 1 commit-hook freebsd_committer 2018-02-07 14:29:17 UTC
A commit references this bug:

Author: mat
Date: Wed Feb  7 14:29:10 UTC 2018
New revision: 461145
URL: https://svnweb.freebsd.org/changeset/ports/461145

Log:
  Teach named where its pid file should be by default, to be consistent
  with the default configuration, rc script, man pages...

  PR:		225687
  Reported by:	John W. O'Brien
  Sponsored by:	Absolight

Changes:
  head/dns/bind9-devel/Makefile
  head/dns/bind9-devel/files/patch-bin_named_include_named_globals.h
  head/dns/bind910/Makefile
  head/dns/bind910/files/patch-bin_named_include_named_globals.h
  head/dns/bind911/Makefile
  head/dns/bind911/files/patch-bin_named_include_named_globals.h
  head/dns/bind912/Makefile
  head/dns/bind912/files/patch-bin_named_include_named_globals.h
  head/dns/bind99/Makefile
  head/dns/bind99/files/patch-bin_named_include_named_globals.h
Comment 2 John W. O'Brien 2018-02-07 14:40:21 UTC
(In reply to commit-hook from comment #1)

This is not fixed. There remains disagreement between globals.h and the rc script (run/named.pid vs run/named/pid).
Comment 3 Mathieu Arnold freebsd_committer 2018-02-07 15:37:05 UTC
No there is not.
Comment 4 John W. O'Brien 2018-02-07 22:50:36 UTC
(In reply to Mathieu Arnold from comment #3)

I beg your pardon. I misread the diff. Thank you.