From owner-svn-ports-head@freebsd.org Sat Dec 12 17:31:18 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDC7C9D8149; Sat, 12 Dec 2015 17:31:18 +0000 (UTC) (envelope-from mmoll@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 7B6031E86; Sat, 12 Dec 2015 17:31:18 +0000 (UTC) (envelope-from mmoll@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBCHVHGK068825; Sat, 12 Dec 2015 17:31:17 GMT (envelope-from mmoll@FreeBSD.org) Received: (from mmoll@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBCHVHKf068823; Sat, 12 Dec 2015 17:31:17 GMT (envelope-from mmoll@FreeBSD.org) Message-Id: <201512121731.tBCHVHKf068823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmoll set sender to mmoll@FreeBSD.org using -f From: Michael Moll Date: Sat, 12 Dec 2015 17:31:17 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r403618 - in head/sysutils/puppet: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2015 17:31:18 -0000 Author: mmoll Date: Sat Dec 12 17:31:17 2015 New Revision: 403618 URL: https://svnweb.freebsd.org/changeset/ports/403618 Log: sysutils/puppet: refresh pkgng provider and remove pkg_* patches Deleted: head/sysutils/puppet/files/optpatch-package_origin head/sysutils/puppet/files/optpatch-package_root Modified: head/sysutils/puppet/Makefile head/sysutils/puppet/files/patch-lib_puppet_provider_package_pkgng.rb Modified: head/sysutils/puppet/Makefile ============================================================================== --- head/sysutils/puppet/Makefile Sat Dec 12 17:30:06 2015 (r403617) +++ head/sysutils/puppet/Makefile Sat Dec 12 17:31:17 2015 (r403618) @@ -3,6 +3,7 @@ PORTNAME= puppet PORTVERSION= 3.8.4 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://downloads.puppetlabs.com/puppet/ @@ -32,30 +33,9 @@ SUB_FILES+= pkg-message SUB_LIST= RUBY=${RUBY} OPTIONS_DEFINE= DOCS EXAMPLES -OPTIONS_DEFAULT= PACKAGE_ORIGIN -OPTIONS_RADIO= PATCHES -OPTIONS_RADIO_PATCHES= PACKAGE_ORIGIN PACKAGE_ROOT -PACKAGE_ORIGIN_DESC= Use port origin as package name -PACKAGE_ROOT_DESC= Use PACKAGEROOT instead of PACKAGESITE -PATCHES_DESC= Optional exclusive patches - -.include - -.if ${PORT_OPTIONS:MPACKAGE_ROOT} -.if ! ${PORT_OPTIONS:MPACKAGE_ORIGIN} -EXTRA_PATCHES+= ${FILESDIR}/optpatch-package_root -.else -BROKEN= PACKAGE_ROOT option patch is incompatible with PACKAGE_ORIGIN patch. -.endif -.endif .include -.if ${PORT_OPTIONS:MPACKAGE_ORIGIN} -EXTRA_PATCHES+= ${FILESDIR}/optpatch-package_origin -RUN_DEPENDS+= rubygem-bzip2-ruby>=0:${PORTSDIR}/archivers/rubygem-bzip2-ruby -.endif - post-patch: @${REINPLACE_CMD} -e "s|/etc/puppet|${ETCDIR}|" \ ${WRKSRC}/install.rb \ Modified: head/sysutils/puppet/files/patch-lib_puppet_provider_package_pkgng.rb ============================================================================== --- head/sysutils/puppet/files/patch-lib_puppet_provider_package_pkgng.rb Sat Dec 12 17:30:06 2015 (r403617) +++ head/sysutils/puppet/files/patch-lib_puppet_provider_package_pkgng.rb Sat Dec 12 17:31:17 2015 (r403618) @@ -1,6 +1,6 @@ --- /dev/null +++ lib/puppet/provider/package/pkgng.rb -@@ -0,0 +1,150 @@ +@@ -0,0 +1,142 @@ +require 'puppet/provider/package' + +Puppet::Type.type(:package).provide :pkgng, :parent => Puppet::Provider::Package do @@ -16,13 +16,11 @@ + has_feature :upgradeable + + def self.get_query -+ @pkg_query = @pkg_query || pkg(['query', '-a', '%n %v %o']) -+ @pkg_query ++ pkg(['query', '-a', '%n %v %o']) + end + + def self.get_version_list -+ @version_list = @version_list || pkg(['version', '-voRL=']) -+ @version_list ++ @version_info_list ||= pkg(['version', '-voRL=']) + end + + def self.get_latest_version(origin) @@ -84,19 +82,20 @@ + source = resource[:source] + source = URI(source) unless source.nil? + -+ # If resource[:name] is actually an origin (e.g. 'www/curl' instead of -+ # just 'curl'), drop the category prefix. pkgng doesn't support version -+ # pinning with the origin syntax (pkg install curl-1.2.3 is valid, but -+ # pkg install www/curl-1.2.3 is not). -+ if resource[:name] =~ /\// -+ installname = resource[:name].split('/')[1] -+ else -+ installname = resource[:name] -+ end -+ + # Ensure we handle the version -+ if resource[:ensure] =~ /\./ -+ installname += '-' + resource[:ensure] ++ case resource[:ensure] ++ when true, false, Symbol ++ installname = resource[:name] ++ else ++ # If resource[:name] is actually an origin (e.g. 'www/curl' instead of ++ # just 'curl'), drop the category prefix. pkgng doesn't support version ++ # pinning with the origin syntax (pkg install curl-1.2.3 is valid, but ++ # pkg install www/curl-1.2.3 is not). ++ if resource[:name] =~ /\// ++ installname = resource[:name].split('/')[1] + '-' + resource[:ensure] ++ else ++ installname = resource[:name] + '-' + resource[:ensure] ++ end + end + + if not source # install using default repo logic @@ -107,6 +106,7 @@ + else # add package located at URL + args = ['add', '-q', source.to_s] + end ++ + pkg(args) + end + @@ -115,7 +115,6 @@ + end + + def query -+ debug @property_hash + if @property_hash[:ensure] == nil + return nil + else @@ -125,22 +124,11 @@ + end + + def version -+ debug @property_hash[:version].inspect + @property_hash[:version] + end + -+ def version= -+ pkg(['install', '-qy', "#{resource[:name]}-#{resource[:version]}"]) -+ end -+ -+ def origin -+ debug @property_hash[:origin].inspect -+ @property_hash[:origin] -+ end -+ + # Upgrade to the latest version + def update -+ debug 'pkgng: update called' + install + end + @@ -150,4 +138,8 @@ + @property_hash[:latest] + end + ++ def origin ++ @property_hash[:origin] ++ end ++ +end