Bug 208628 - sysutils/puppet38 path to sysutils/daemontools'es commands
Summary: sysutils/puppet38 path to sysutils/daemontools'es commands
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: freebsd-ruby (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-08 08:03 UTC by Alexey
Modified: 2017-01-04 21:29 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2016-04-08 08:03:23 UTC
Due FreeBSD port's executables installed to /usr/local by default, puppet's default path-es to executables have to be changed to /usr/local/bin/ instead of default /usr/bin
(and default root dir for svcscan is /var/service, not /service)


without changes puppet generate an error when we try to use service{ provider => daemontools;}
Debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist
 Provider daemontools is not functional on this host


next patch fix the problem

--- ./puppet-3.8.4/lib/puppet/provider/service/daemontools.rb.orig	2016-04-08 10:46:37.767082000 +0300
+++ ./puppet-3.8.4/lib/puppet/provider/service/daemontools.rb	2016-04-08 10:47:49.370475000 +0300
@@ -39,7 +39,7 @@
 
   EOT
 
-  commands :svc  => "/usr/bin/svc", :svstat => "/usr/bin/svstat"
+  commands :svc  => "/usr/local/bin/svc", :svstat => "/usr/local/bin/svstat"
 
   class << self
     attr_writer :defpath
@@ -88,7 +88,7 @@
   # find the service dir on this node
   def servicedir
     unless @servicedir
-      ["/service", "/etc/service","/var/lib/svscan"].each do |path|
+      ["/var/service", "/etc/service","/var/lib/svscan"].each do |path|
         if Puppet::FileSystem.exist?(path)
           @servicedir = path
           break

And same have to be for puppet37 and 4 branches
Comment 1 Zach Leslie freebsd_committer freebsd_triage 2017-01-04 19:30:53 UTC
This should be applied to the sysutils/puppet4 port also.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-01-04 21:20:43 UTC
A commit references this bug:

Author: swills
Date: Wed Jan  4 21:19:46 UTC 2017
New revision: 430595
URL: https://svnweb.freebsd.org/changeset/ports/430595

Log:
  sysutils/puppet{38,4}: fix path to daemontools'es commands

  PR:		208628
  Submitted by:	Alexey <fbsd98816551@avksrv.org>
  Approved by:	Zach Leslie <freebsd@zleslie.info> (maintainer of sysutils/puppet4)

Changes:
  head/sysutils/puppet38/Makefile
  head/sysutils/puppet38/files/patch-lib_puppet_provider_service_daemontools.rb
  head/sysutils/puppet4/Makefile
  head/sysutils/puppet4/files/patch-lib_puppet_provider_service_daemontools.rb
Comment 3 Steve Wills freebsd_committer freebsd_triage 2017-01-04 21:29:10 UTC
Fixed, thanks for the patch, sorry it took so long.