From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 24 07:30:07 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0385C16A46B for ; Thu, 24 May 2007 07:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id D8BAB13C44B for ; Thu, 24 May 2007 07:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l4O7U6SN025495 for ; Thu, 24 May 2007 07:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l4O7U6aq025494; Thu, 24 May 2007 07:30:06 GMT (envelope-from gnats) Resent-Date: Thu, 24 May 2007 07:30:06 GMT Resent-Message-Id: <200705240730.l4O7U6aq025494@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, Tomoyuki Sakurai Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34D1A16A400 for ; Thu, 24 May 2007 07:29:34 +0000 (UTC) (envelope-from cherry@spica.trombik.org) Received: from spica.trombik.org (spica.trombik.org [211.19.48.12]) by mx1.freebsd.org (Postfix) with ESMTP id 5C0B413C44C for ; Thu, 24 May 2007 07:29:33 +0000 (UTC) (envelope-from cherry@spica.trombik.org) Received: by spica.trombik.org (Postfix, from userid 999) id 024A522D54; Thu, 24 May 2007 16:12:50 +0900 (JST) Message-Id: <20070524071251.024A522D54@spica.trombik.org> Date: Thu, 24 May 2007 16:12:50 +0900 (JST) From: Tomoyuki Sakurai To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/112927: [MAINTAINER] sysutils/puppet: update to 0.22.4 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 07:30:07 -0000 >Number: 112927 >Category: ports >Synopsis: [MAINTAINER] sysutils/puppet: update to 0.22.4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu May 24 07:30:06 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Tomoyuki Sakurai >Release: FreeBSD 6.1-RELEASE-p11 i386 >Organization: >Environment: System: FreeBSD spica.trombik.org 6.1-RELEASE-p11 FreeBSD 6.1-RELEASE-p11 #6: Sun Jan 7 04:14:41 JST >Description: - Update to 0.22.4 - Fix: run portupgrade with BATCH=yes by default - Fix: now ports.rb can handle packages that have a dash in their name Added file(s): - files/patch-define_batch - files/patch-package-name-with-dash Removed file(s): - files/patch-2385 Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- puppet-0.22.4.patch begins here --- diff -ruN --exclude=CVS /usr/ports/sysutils/puppet/Makefile /usr/home/cherry/svn/ports/sysutils/puppet/Makefile --- /usr/ports/sysutils/puppet/Makefile Wed Apr 18 04:41:20 2007 +++ /usr/home/cherry/svn/ports/sysutils/puppet/Makefile Tue May 8 16:26:49 2007 @@ -6,7 +6,7 @@ # PORTNAME= puppet -PORTVERSION= 0.22.3 +PORTVERSION= 0.22.4 CATEGORIES= sysutils MASTER_SITES= http://www.reductivelabs.com/downloads/puppet/ EXTRACT_SUFX= .tgz @@ -24,6 +24,9 @@ DOCS= CHANGELOG TODO README LICENSE COPYING .include + +post-patch: + ${RM} ${WRKSRC}/bin/*.orig || true do-install: cd ${WRKSRC} && \ diff -ruN --exclude=CVS /usr/ports/sysutils/puppet/distinfo /usr/home/cherry/svn/ports/sysutils/puppet/distinfo --- /usr/ports/sysutils/puppet/distinfo Wed Apr 18 04:41:20 2007 +++ /usr/home/cherry/svn/ports/sysutils/puppet/distinfo Tue May 8 16:26:49 2007 @@ -1,3 +1,3 @@ -MD5 (puppet-0.22.3.tgz) = da40886077c500c0bac980e7b755b836 -SHA256 (puppet-0.22.3.tgz) = 39ecaca8466f5402e84cb2ce392def6d5d903fa33201de0d2e4816288d860e8a -SIZE (puppet-0.22.3.tgz) = 629126 +MD5 (puppet-0.22.4.tgz) = 9bb853104f2616c7f2c8fa4e2f39b537 +SHA256 (puppet-0.22.4.tgz) = 7b26b50711c89ca1e1c12967a363c6f0bc6c04ddcd741358f74c107d04352042 +SIZE (puppet-0.22.4.tgz) = 642077 diff -ruN --exclude=CVS /usr/ports/sysutils/puppet/files/patch-2385 /usr/home/cherry/svn/ports/sysutils/puppet/files/patch-2385 --- /usr/ports/sysutils/puppet/files/patch-2385 Wed Apr 18 04:41:20 2007 +++ /usr/home/cherry/svn/ports/sysutils/puppet/files/patch-2385 Thu Jan 1 09:00:00 1970 @@ -1,203 +0,0 @@ -http://reductivelabs.com/trac/puppet/changeset/2385 -http://reductivelabs.com/trac/puppet/ticket/565 -Index: test/util/utiltest.rb -=================================================================== ---- test/util/utiltest.rb (revision 2377) -+++ test/util/utiltest.rb (revision 2385) -@@ -277,11 +277,15 @@ - # Now try it with a single quote - assert_nothing_raised do - output = Puppet::Util.execute([command, "yay'test", "funtest"]) -- # output = Puppet::Util.execute(command) -- - end - assert_equal("yay'test\nfuntest\n", output) - -+ # Now make sure we can squelch output (#565) -+ assert_nothing_raised do -+ output = Puppet::Util.execute([command, "yay'test", "funtest"], :squelch => true) -+ end -+ assert_equal(nil, output) -+ - # Now test that we correctly fail if the command returns non-zero - assert_raise(Puppet::ExecutionFailure) do - out = Puppet::Util.execute(["touch", "/no/such/file/could/exist"]) -@@ -289,7 +293,7 @@ - - # And that we can tell it not to fail - assert_nothing_raised() do -- out = Puppet::Util.execute(["touch", "/no/such/file/could/exist"], false) -+ out = Puppet::Util.execute(["touch", "/no/such/file/could/exist"], :failonfail => false) - end - - if Process.uid == 0 -@@ -298,7 +302,7 @@ - group = nonrootgroup - file = tempfile() - assert_nothing_raised do -- Puppet::Util.execute(["touch", file], true, user.name, group.name) -+ Puppet::Util.execute(["touch", file], :uid => user.name, :gid => group.name) - end - assert(FileTest.exists?(file), "file was not created") - assert_equal(user.uid, File.stat(file).uid, "uid was not set correctly") -@@ -308,6 +312,24 @@ - # assert_equal(group.gid, File.stat(file).gid, - # "gid was not set correctly") - end -+ -+ # (#565) Test the case of patricide. -+ patricidecommand = tempfile() -+ File.open(patricidecommand, "w") { |f| -+ f.puts %{#!/bin/bash\n/bin/bash -c 'kill -TERM \$PPID' &;\n while [ 1 ]; do echo -n ''; done;\n} -+ } -+ File.chmod(0755, patricidecommand) -+ assert_nothing_raised do -+ output = Puppet::Util.execute([patricidecommand], :squelch => true) -+ end -+ assert_equal(nil, output) -+ # See what happens if we try and read the pipe to the command... -+ assert_raise(Puppet::ExecutionFailure) do -+ output = Puppet::Util.execute([patricidecommand]) -+ end -+ assert_nothing_raised do -+ output = Puppet::Util.execute([patricidecommand], :failonfail => false) -+ end - end - - # Check whether execute() accepts strings in addition to arrays. -Index: lib/puppet/util.rb -=================================================================== ---- lib/puppet/util.rb (revision 2377) -+++ lib/puppet/util.rb (revision 2385) -@@ -267,7 +267,8 @@ - end - - # Execute the desired command, and return the status and output. -- def execute(command, failonfail = true, uid = nil, gid = nil) -+ # def execute(command, failonfail = true, uid = nil, gid = nil) -+ def execute(command, arguments = {:failonfail => true}) - if command.is_a?(Array) - command = command.flatten.collect { |i| i.to_s } - str = command.join(" ") -@@ -284,30 +285,35 @@ - Puppet.debug "Executing '%s'" % str - end - -- if uid -- uid = Puppet::Util::SUIDManager.convert_xid(:uid, uid) -+ if arguments[:uid] -+ arguments[:uid] = Puppet::Util::SUIDManager.convert_xid(:uid, arguments[:uid]) - end -- if gid -- gid = Puppet::Util::SUIDManager.convert_xid(:gid, gid) -+ if arguments[:gid] -+ arguments[:gid] = Puppet::Util::SUIDManager.convert_xid(:gid, arguments[:gid]) - end - - @@os ||= Facter.value(:operatingsystem) - output = nil -- IO.popen("-") do |f| -- if f -- output = f.read -+ child_pid, child_status = nil -+ # The idea here is to avoid IO#read whenever possible. -+ if arguments[:squelch] -+ child_pid = Kernel.fork -+ if child_pid -+ # Parent process executes this -+ child_status = Process.waitpid2(child_pid)[1] - else -+ # Child process executes this - begin - $stdin.reopen("/dev/null") -- $stderr.close -- $stderr = $stdout.dup -- if gid -- Process.egid = gid -- Process.gid = gid unless @@os == "Darwin" -+ $stdout.reopen("/dev/null") -+ $stderr.reopen("/dev/null") -+ if arguments[:gid] -+ Process.egid = arguments[:gid] -+ Process.gid = arguments[:gid] unless @@os == "Darwin" - end -- if uid -- Process.euid = uid -- Process.uid = uid unless @@os == "Darwin" -+ if arguments[:uid] -+ Process.euid = arguments[:uid] -+ Process.uid = arguments[:uid] unless @@os == "Darwin" - end - if command.is_a?(Array) - Kernel.exec(*command) -@@ -317,13 +323,44 @@ - rescue => detail - puts detail.to_s - exit!(1) -- end -- end -- end -+ end # begin; rescue -+ end # if child_pid; else -+ else -+ IO.popen("-") do |f| -+ if f -+ # Parent process executes this -+ output = f.read -+ else -+ # Parent process executes this -+ begin -+ $stdin.reopen("/dev/null") -+ $stderr.close -+ $stderr = $stdout.dup -+ if arguments[:gid] -+ Process.egid = arguments[:gid] -+ Process.gid = arguments[:gid] unless @@os == "Darwin" -+ end -+ if arguments[:uid] -+ Process.euid = arguments[:uid] -+ Process.uid = arguments[:uid] unless @@os == "Darwin" -+ end -+ if command.is_a?(Array) -+ Kernel.exec(*command) -+ else -+ Kernel.exec(command) -+ end -+ rescue => detail -+ puts detail.to_s -+ exit!(1) -+ end # begin; rescue -+ end # if f; else -+ end # IO.popen do |f| -+ child_status = $? -+ end # if arguments[:squelch]; else - -- if failonfail -- unless $? == 0 -- raise ExecutionFailure, "Execution of '%s' returned %s: %s" % [str, $?.exitstatus, output] -+ if arguments[:failonfail] -+ unless child_status == 0 -+ raise ExecutionFailure, "Execution of '%s' returned %s: %s" % [str, child_status.inspect, output] - end - end - -Index: lib/puppet/provider/service/base.rb -=================================================================== ---- lib/puppet/provider/service/base.rb (revision 2377) -+++ lib/puppet/provider/service/base.rb (revision 2385) -@@ -114,12 +114,12 @@ - # A simple wrapper so execution failures are a bit more informative. - def texecute(type, command, fof = true) - begin -- output = execute(command, fof) -+ # #565: Services generally produce no output, so squelch them. -+ execute(command, :failonfail => fof, :squelch => true) - rescue Puppet::ExecutionFailure => detail - @model.fail "Could not %s %s: %s" % [type, @model.ref, detail] - end -- -- return output -+ return nil - end - - # Use either a specified command or the default for our provider. diff -ruN --exclude=CVS /usr/ports/sysutils/puppet/files/patch-define_batch /usr/home/cherry/svn/ports/sysutils/puppet/files/patch-define_batch --- /usr/ports/sysutils/puppet/files/patch-define_batch Thu Jan 1 09:00:00 1970 +++ /usr/home/cherry/svn/ports/sysutils/puppet/files/patch-define_batch Wed May 9 01:38:55 2007 @@ -0,0 +1,13 @@ +always define PATCH. without it, puppetd hangs when upgrading INTERACTIVE port. +http://reductivelabs.com/trac/puppet/ticket/624 +--- lib/puppet/provider/package/ports.rb.orig Tue May 8 14:55:34 2007 ++++ lib/puppet/provider/package/ports.rb Tue May 8 14:55:57 2007 +@@ -19,7 +19,7 @@ + # -p: create a package + # -N: install if the package is missing, otherwise upgrade + # -P: prefer binary packages +- cmd = %w{-p -N -P} << @model[:name] ++ cmd = %w{-p -N -P -M BATCH=yes} << @model[:name] + + output = portupgrade(*cmd) + if output =~ /\*\* No such / diff -ruN --exclude=CVS /usr/ports/sysutils/puppet/files/patch-package-name-with-dash /usr/home/cherry/svn/ports/sysutils/puppet/files/patch-package-name-with-dash --- /usr/ports/sysutils/puppet/files/patch-package-name-with-dash Thu Jan 1 09:00:00 1970 +++ /usr/home/cherry/svn/ports/sysutils/puppet/files/patch-package-name-with-dash Mon May 14 10:04:20 2007 @@ -0,0 +1,13 @@ +support package that contains '-' in its name, like syslog-ng +http://reductivelabs.com/trac/puppet/ticket/628 +--- lib/puppet/provider/package/ports.rb.orig Wed May 9 17:12:39 2007 ++++ lib/puppet/provider/package/ports.rb Wed May 9 17:13:57 2007 +@@ -47,7 +47,7 @@ + match = $2 + info = $3 + +- unless pkgstuff =~ /^(\w+)-([0-9].+)$/ ++ unless pkgstuff =~ /^(\S+)-([^-\s]+)$/ + raise Puppet::PackageError, + "Could not match package info '%s'" % pkgstuff + end diff -ruN --exclude=CVS /usr/ports/sysutils/puppet/files/puppetd.in /usr/home/cherry/svn/ports/sysutils/puppet/files/puppetd.in --- /usr/ports/sysutils/puppet/files/puppetd.in Wed Apr 18 04:41:20 2007 +++ /usr/home/cherry/svn/ports/sysutils/puppet/files/puppetd.in Tue May 8 16:26:49 2007 @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: ports/sysutils/puppet/files/puppetd.in,v 1.2 2007/04/17 19:41:20 miwi Exp $ +# $FreeBSD$ # # PROVIDE: puppetd # REQUIRE: NETWORK diff -ruN --exclude=CVS /usr/ports/sysutils/puppet/files/puppetmasterd.in /usr/home/cherry/svn/ports/sysutils/puppet/files/puppetmasterd.in --- /usr/ports/sysutils/puppet/files/puppetmasterd.in Wed Apr 18 04:41:20 2007 +++ /usr/home/cherry/svn/ports/sysutils/puppet/files/puppetmasterd.in Mon May 14 10:15:26 2007 @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: ports/sysutils/puppet/files/puppetmasterd.in,v 1.2 2007/04/17 19:41:20 miwi Exp $ +# $FreeBSD$ # # PROVIDE: puppetmasterd # REQUIRE: NETWORK @@ -8,6 +8,9 @@ # Add the following lines to /etc/rc.conf to enable puppetmasterd: # # puppetmasterd_enable="YES" +# puppetmasterd_confdir: Set to %%PREFIX%%/etc/puppet by default +# puppetmasterd_flags: Set to --confdir $puppetmasterd_confdir --rundir /var/run" by default +# . %%RC_SUBR%% @@ -16,6 +19,21 @@ command="%%PREFIX%%/bin/${name}" command_interpreter="%%PREFIX%%/bin/ruby18" +start_precmd="puppetmasterd_checkconfig" +restart_precmd="puppetmasterd_checkconfig" + +puppetmasterd_checkconfig() { + echo -n "Performing sanity check of ${name} configuration: " + ${command} --parseonly ${puppetmasterd_flags} >/dev/null 2>&1 + rv=$? + if [ $rv != 0 ]; then + echo "FAILED, ${name} exited with status ${rv}" + ${command} --parseonly ${puppetmasterd_flags} + return 1 + else + echo "OK" + fi +} load_rc_config "$name" : ${puppetmasterd_enable="NO"} diff -ruN --exclude=CVS /usr/ports/sysutils/puppet/pkg-plist /usr/home/cherry/svn/ports/sysutils/puppet/pkg-plist --- /usr/ports/sysutils/puppet/pkg-plist Wed Apr 18 04:41:20 2007 +++ /usr/home/cherry/svn/ports/sysutils/puppet/pkg-plist Tue May 8 16:26:49 2007 @@ -1,4 +1,4 @@ -@comment $FreeBSD: ports/sysutils/puppet/pkg-plist,v 1.3 2007/04/17 19:41:20 miwi Exp $ +@comment $FreeBSD: ports/sysutils/puppet/pkg-plist,v 1.1 2007/03/06 20:13:56 miwi Exp $ bin/puppetd bin/puppetca bin/puppet @@ -139,9 +139,8 @@ %%RUBY_SITELIBDIR%%/puppet/rails/external/tagging/init.rb %%RUBY_SITELIBDIR%%/puppet/rails/database/schema.rb %%RUBY_SITELIBDIR%%/puppet/rails/database/001_add_indexes.rb -%%RUBY_SITELIBDIR%%/puppet/feature/ldap.rb +%%RUBY_SITELIBDIR%%/puppet/feature/base.rb %%RUBY_SITELIBDIR%%/puppet/feature/rails.rb -%%RUBY_SITELIBDIR%%/puppet/feature/usage.rb %%RUBY_SITELIBDIR%%/puppet/network/authconfig.rb %%RUBY_SITELIBDIR%%/puppet/network/client_request.rb %%RUBY_SITELIBDIR%%/puppet/network/authorization.rb @@ -246,6 +245,7 @@ %%RUBY_SITELIBDIR%%/puppet/provider/package/sunfreeware.rb %%RUBY_SITELIBDIR%%/puppet/provider/package/ports.rb %%RUBY_SITELIBDIR%%/puppet/provider/package/apt.rb +%%RUBY_SITELIBDIR%%/puppet/provider/package/aptrpm.rb %%RUBY_SITELIBDIR%%/puppet/provider/package/apple.rb %%RUBY_SITELIBDIR%%/puppet/provider/package/gem.rb %%RUBY_SITELIBDIR%%/puppet/provider/package/aptitude.rb @@ -253,6 +253,7 @@ %%RUBY_SITELIBDIR%%/puppet/provider/package/darwinport.rb %%RUBY_SITELIBDIR%%/puppet/provider/package/sun.rb %%RUBY_SITELIBDIR%%/puppet/provider/package/yum.rb +%%RUBY_SITELIBDIR%%/puppet/provider/package/rug.rb %%RUBY_SITELIBDIR%%/puppet/provider/package/openbsd.rb %%RUBY_SITELIBDIR%%/puppet/provider/package/blastwave.rb @dirrmtry %%RUBY_SITELIBDIR%%/puppet/provider/cron @@ -315,6 +316,7 @@ %%PORTDOCS%%%%EXAMPLESDIR%%/code/selectors %%PORTDOCS%%%%EXAMPLESDIR%%/code/execs %%PORTDOCS%%%%EXAMPLESDIR%%/code/nodes +%%PORTDOCS%%%%EXAMPLESDIR%%/code/mac_automount.pp %%PORTDOCS%%%%EXAMPLESDIR%%/code/filerecursion %%PORTDOCS%%%%EXAMPLESDIR%%/code/components %%PORTDOCS%%%%EXAMPLESDIR%%/code/file.bl --- puppet-0.22.4.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: