Bug 175558 - port installation via sysutils/puppet does not work
Summary: port installation via sysutils/puppet does not work
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 10:00 UTC by Daniel Walrond
Modified: 2013-01-28 01:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Walrond 2013-01-25 10:00:01 UTC
I have done a fresh ZFS install of 9.1 using http://mfsbsd.vx.sk/.

Then...

# portsnap fetch
# portsnap extract
# cd /usr/ports/sysutils/puppet
# make install clean

Which installs puppet version 3.0.2.

On the FreeBSD host I ran:

# puppet agent --test

On the Puppetmaster I sign the key generated from the previous command.

On the FreeBSD host I ran:

# puppet agent --test --noop

Everything looked sane, then running

# puppet agent --test

I get the following errors:

Info: Retrieving plugin
Info: Caching catalog for store03.navetas.com
Info: Applying configuration version '1359052122'
Error: Could not set 'present' on ensure: uninitialized class variable @@lock in Object at 8:/etc/puppet/modules/ssmtp/manifests/freebsd.pp
Error: Could not set 'present' on ensure: uninitialized class variable @@lock in Object at 8:/etc/puppet/modules/ssmtp/manifests/freebsd.pp
Wrapped exception:
uninitialized class variable @@lock in Object
Error: /Stage[main]/Ssmtp::Freebsd/Package[mail/ssmtp]/ensure: change from absent to present failed: Could not set 'present' on ensure: uninitialized class variable @@lock in Object at 8:/etc/puppet/modules/ssmtp/manifests/freebsd.pp
Notice: /Stage[main]/Ssmtp::Freebsd/File[/usr/local/etc/ssmtp/ssmtp.conf]: Dependency Package[mail/ssmtp] has failures: true
Warning: /Stage[main]/Ssmtp::Freebsd/File[/usr/local/etc/ssmtp/ssmtp.conf]: Skipping because of failed dependencies
Notice: /Stage[main]/Ssmtp::Freebsd/File[/etc/mail/mailer.conf]: Dependency Package[mail/ssmtp] has failures: true
Warning: /Stage[main]/Ssmtp::Freebsd/File[/etc/mail/mailer.conf]: Skipping because of failed dependencies
Notice: Finished catalog run in 0.36 seconds

If I then install the port mail/ssmtp and rerun puppet and install items which depend on the port being install and completes normally.

# cd /usr/ports/mail/ssmtp/
# make install clean
# puppet agent --test

Compared with a very similar host running FreeBSD 9.0 and Puppet 3.0.1, I do not have this problem.

How-To-Repeat: The puppet code to recreate this

node store03 {
  include test
}

class test {
  package 'editors/nano': ensure => installed;
}
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-26 07:53:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-01-28 01:25:04 UTC
Author: swills
Date: Mon Jan 28 01:24:55 2013
New Revision: 311088
URL: http://svnweb.freebsd.org/changeset/ports/311088

Log:
  - Revert previous change to patch file. The goal was to prevent a warning with
    Ruby 1.9, but this just caused problems with Ruby 1.8.
  
  PR:		ports/175558

Modified:
  head/sysutils/puppet/Makefile
  head/sysutils/puppet/files/optpatch-package_origin

Modified: head/sysutils/puppet/Makefile
==============================================================================
--- head/sysutils/puppet/Makefile	Mon Jan 28 01:08:15 2013	(r311087)
+++ head/sysutils/puppet/Makefile	Mon Jan 28 01:24:55 2013	(r311088)
@@ -3,7 +3,7 @@
 
 PORTNAME=	puppet
 PORTVERSION=	3.0.2
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	http://downloads.puppetlabs.com/puppet/
 

Modified: head/sysutils/puppet/files/optpatch-package_origin
==============================================================================
--- head/sysutils/puppet/files/optpatch-package_origin	Mon Jan 28 01:08:15 2013	(r311087)
+++ head/sysutils/puppet/files/optpatch-package_origin	Mon Jan 28 01:24:55 2013	(r311088)
@@ -30,8 +30,8 @@
  
 -  def self.listcmd
 -    command(:pkginfo)
-+  class_variable_set(:@@lock, Mutex.new)
-+  class_variable_set(:@@ports_index, new)
++  @@lock = Mutex.new
++  @@ports_index = nil
 +
 +  # fix bug in URI::FTP merge method that tries to set typecode
 +  # even when other is a string.
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Steve Wills freebsd_committer freebsd_triage 2013-01-28 01:25:53 UTC
State Changed
From-To: open->closed

Fix committed, let me know if you still have trouble.