Bug 199995 - sysutils/puppet -- the 'Service' provider will get service names wrong when rc scripts contain a 'desc' parameter
Summary: sysutils/puppet -- the 'Service' provider will get service names wrong when r...
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: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-06 14:24 UTC by Matthew Seaman
Modified: 2015-05-31 20:05 UTC (History)
1 user (show)

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


Attachments
Update to sysutils/puppet (1.29 KB, patch)
2015-05-06 14:24 UTC, Matthew Seaman
no flags Details | Diff
Poudriere build log after patching (415.75 KB, application/x-binary)
2015-05-06 14:26 UTC, Matthew Seaman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Seaman freebsd_committer freebsd_triage 2015-05-06 14:24:37 UTC
Created attachment 156427 [details]
Update to sysutils/puppet

puppet groks the 'service_name' parameter by parsing the output of 'service foo rcvar'.  Normall this works well, but in the case of eg. local_unbound, it goes comically wrong:
{{{
:% service local_unbound rcvar 
# local_unbound : local caching forwarding resolver
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#
local_unbound_enable="NO"
#   (default: "")

}}}

The indicated text comes from the 'desc' variable in /etc/rc.d/local_unbound, and leads to puppet creating a file '/etc/rc.conf.d/local_unbound : local caching forwarding resolver' (embedded spaces and colons and all).  Needless to say, this doesn't get read-in by the rc-system.  Admittedly, local_unbound is one of only two rc-scripts in the base system that contain a desc fiels (at least, in 10.1-RELEASE)

I've submitted a bug upstream, but in the mean time, the attached patch fixes the problem for me.
Comment 1 Matthew Seaman freebsd_committer freebsd_triage 2015-05-06 14:26:04 UTC
Created attachment 156428 [details]
Poudriere build log after patching
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-05-31 20:04:22 UTC
A commit references this bug:

Author: mmoll
Date: Sun May 31 20:03:21 UTC 2015
New revision: 388162
URL: https://svnweb.freebsd.org/changeset/ports/388162

Log:
  sysutils/puppet: update to 3.8.1

  add a patch to parse service names correctly [1]

  PR:		199995 [1]
  Differential Revision:	https://reviews.freebsd.org/D2676
  Submitted by:	matthew [1]
  Approved by:	swills (mentor, maintainer)

Changes:
  head/sysutils/puppet/Makefile
  head/sysutils/puppet/distinfo
  head/sysutils/puppet/files/patch-lib_puppet_provider_service_freebsd.rb
Comment 3 Michael Moll freebsd_committer freebsd_triage 2015-05-31 20:05:38 UTC
Committed together with the update to 3.8.1, thanks!