From owner-freebsd-ports-bugs@FreeBSD.ORG Mon May 26 17:50:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A16AB6E for ; Mon, 26 May 2014 17:50:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3662E2B31 for ; Mon, 26 May 2014 17:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QHo1Pv019074 for ; Mon, 26 May 2014 17:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4QHo1ux019064; Mon, 26 May 2014 17:50:01 GMT (envelope-from gnats) Resent-Date: Mon, 26 May 2014 17:50:01 GMT Resent-Message-Id: <201405261750.s4QHo1ux019064@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bartosz Cisek Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B17E7ABB for ; Mon, 26 May 2014 17:42:40 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 851702B07 for ; Mon, 26 May 2014 17:42:40 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QHgdSL013938 for ; Mon, 26 May 2014 17:42:39 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4QHgdpB013937; Mon, 26 May 2014 17:42:39 GMT (envelope-from nobody) Message-Id: <201405261742.s4QHgdpB013937@cgiserv.freebsd.org> Date: Mon, 26 May 2014 17:42:39 GMT From: Bartosz Cisek To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/190276: puppet agent wrongly calculates INDEX uri X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 17:50:01 -0000 >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 .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: