Date: Mon, 26 May 2014 17:42:39 GMT From: Bartosz Cisek <bartosz.cisek@rst.com.pl> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/190276: puppet agent wrongly calculates INDEX uri Message-ID: <201405261742.s4QHgdpB013937@cgiserv.freebsd.org> Resent-Message-ID: <201405261750.s4QHo1ux019064@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 190276 >Category: ports >Synopsis: puppet agent wrongly calculates INDEX uri >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 26 17:50:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Bartosz Cisek >Release: 9.2-p3 >Organization: RST sp. z o.o. sp.k. >Environment: FreeBSD devnull.rst.com.pl 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #0 r260922: Mon Jan 20 21:44:56 CET 2014 root@devnull.rst.com.pl:/usr/obj/usr/src/sys/XENHVM amd64 >Description: Hi, Puppet package provider for FreeBSD contains hardcoded URI for INDEX file that points to STABLE branch. In result installation of package can't complete without overwriting default 'source' parameter which should contain URI pointing to systems INDEX file (in our case 9.2-release) I thing the same problem was reported earlier to puppet without success. http://projects.puppetlabs.com/issues/18194 I was looking in puppet repo on github for version of package provier shipped with FreeBSD but was unable to locate it. >How-To-Repeat: 1. Install puppet agent 2. Prepare manifest containing definition of package resource: package { 'sysutils/munin-node': ensure => installed, } 3. Start puppet apply --debug <manifest_file>.pp On system other than STABLE branch it will fail, as provider has hardcoded definition of URI. >Fix: Provided patch allows puppet to prepare URI aligned to used system version. Removal of leading slash prevents from encoding it as %20 in step where hostname is concatenated with dirname. File /usr/local/lib/ruby/site_ruby/1.9/puppet/provider/package/freebsd.rb --- freebsd-orig.rb 2014-05-26 18:36:44.000000000 +0200 +++ freebsd.rb 2014-05-26 18:37:17.000000000 +0200 @@ -96,12 +96,12 @@ def uri_path Facter.loadfacts File.join( - "/", "pub", "FreeBSD", "ports", + "pub", "FreeBSD", "ports", Facter.value(:hardwareisa), [ "packages", - Facter.value(:kernelmajversion).split(".")[0], - "stable", + Facter.value(:operatingsystemrelease).split("-")[0], + Facter.value(:operatingsystemrelease).split("-")[1].downcase, ].join("-") ) << "/" end >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405261742.s4QHgdpB013937>