NetBSD Problem Report #48137

From www@NetBSD.org  Mon Aug 19 12:00:43 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9AF61710B3
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 19 Aug 2013 12:00:43 +0000 (UTC)
Message-Id: <20130819120042.17F1C711A4@mollari.NetBSD.org>
Date: Mon, 19 Aug 2013 12:00:42 +0000 (UTC)
From: emmanuel@libera.cc
Reply-To: emmanuel@libera.cc
To: gnats-bugs@NetBSD.org
Subject: Puppet 3.1.1 from pkgsrc fails on NetBSD host
X-Send-Pr-Version: www-1.0

>Number:         48137
>Category:       pkg
>Synopsis:       Puppet 3.1.1 from pkgsrc fails on NetBSD host
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tonnerre
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 19 12:05:00 +0000 2013
>Closed-Date:    Wed Jan 01 23:52:18 +0000 2014
>Last-Modified:  Wed Jan 01 23:52:18 +0000 2014
>Originator:     Emmanuel Kasper
>Release:        
>Organization:
openForce
>Environment:
uname -srm
NetBSD 6.0.1_PATCH i386
>Description:
Puppet on NetBSD 5 and 6 fails to apply the simplest manifest possible with the following error:

puppet apply --verbose -e "file { '/tmp/foobar': ensure => present}"

Error: Could not create resources for managing Puppet's files and directories in sections [:main, :ssl, :agent]: undefined method `exists?' for nil:NilClass
Error: Could not create resources for managing Puppet's files and directories in sections [:main, :ssl, :agent]: undefined method `exists?' for nil:NilClass
undefined method `exists?' for nil:NilClass

>How-To-Repeat:
puppet apply --verbose -e "file { '/tmp/foobar': ensure => present}"
>Fix:
The following patch, mostly taken from http://projects.puppetlabs.com/issues/9586 and reformated for the current puppet release, fixes the problem ( tested on netbsd 5 and 6 )

--- lib/puppet/provider/user/useradd.rb.orig    2013-08-14 18:03:00.000000000 +0
200
+++ lib/puppet/provider/user/useradd.rb 2013-08-14 18:04:21.000000000 +0200
@@ -5,13 +5,13 @@
     install Ruby's shadow password library (often known as `ruby-libshadow`)
     if you wish to manage user passwords."

-  commands :add => "useradd", :delete => "userdel", :modify => "usermod", :pass
word => "chage"
+  commands :add => "useradd", :delete => "userdel", :modify => "usermod", :pass
word => "passwd"

   options :home, :flag => "-d", :method => :dir
   options :comment, :method => :gecos
   options :groups, :flag => "-G"
-  options :password_min_age, :flag => "-m"
-  options :password_max_age, :flag => "-M"
+  options :password_min_age, :flag => "-e"
+  options :password_max_age, :flag => "-f"

   verify :gid, "GID must be an integer" do |value|
     value.is_a? Integer

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->tonnerre
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Mon, 19 Aug 2013 20:15:07 +0000
Responsible-Changed-Why:
Over to maintainer.


From: "Tonnerre Lombard" <tonnerre@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48137 CVS commit: pkgsrc/sysutils/puppet
Date: Wed, 1 Jan 2014 23:46:38 +0000

 Module Name:	pkgsrc
 Committed By:	tonnerre
 Date:		Wed Jan  1 23:46:38 UTC 2014

 Modified Files:
 	pkgsrc/sysutils/puppet: Makefile distinfo
 Added Files:
 	pkgsrc/sysutils/puppet/patches: patch-ae

 Log Message:
 Fix detection of useradd user management under NetBSD.

 NetBSD doesn't have chage but can use the -e and -f flags to passwd to
 achieve the same.

 Closes PR pkg/48137.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 pkgsrc/sysutils/puppet/Makefile
 cvs rdiff -u -r1.8 -r1.9 pkgsrc/sysutils/puppet/distinfo
 cvs rdiff -u -r0 -r1.3 pkgsrc/sysutils/puppet/patches/patch-ae

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: tonnerre@NetBSD.org
State-Changed-When: Wed, 01 Jan 2014 23:52:18 +0000
State-Changed-Why:
A fix has been committed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.