Subject: pkg/36617: security/PAM from pkgsrc-2007Q2 fails to build
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <metaridley@mchsi.com>
List: pkgsrc-bugs
Date: 07/08/2007 23:35:00
>Number: 36617
>Category: pkg
>Synopsis: security/PAM from pkgsrc-2007Q2 fails to build
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 08 23:35:00 +0000 2007
>Originator: Dave Vollenweider
>Release: Linux 2.6.17.13 i386
>Organization:
>Environment:
Linux kensuke 2.6.17.13 #7 Mon Dec 11 14:02:05 CST 2006 i686 pentium2 i386 GNU/Linux
>Description:
security/PAM (LinuxPAM) fails to build the pam_unixdb.la library and, if libcrack is enabled as an option, pam_cracklib.la library. pam_userdb.la not being built seems to come from a problem with the security/db4 package. These are the variables that were used by pkgsrc before I applied the workaround:
The following variables will affect the build process of this package,
PAM-0.77nb5. Their current value is shown below:
* BDB185_DEFAULT = db4
* BDB_DEFAULT = db4
Based on these variables, the following variables have been set:
* BDBBASE (defined, but empty)
* BDB_LIBS = -ldb4
* BDB_TYPE = db4
The build process says that pam_userdb is going to be built, but it isn't. This is what happened instead:
make[2]: Entering directory `/usr/pkgsrc/security/PAM/work/Linux-PAM-0.77/module
s/pam_userdb'
This module will not be compiled on this system
make[2]: Leaving directory `/usr/pkgsrc/security/PAM/work/Linux-PAM-0.77/modules
/pam_userdb'
And, despite me putting in the libcrack option for this package, pam_cracklib wasn't built:
make[2]: Entering directory `/usr/pkgsrc/security/PAM/work/Linux-PAM-0.77/module
s/pam_cracklib'
This module will not be compiled on this system
make[2]: Leaving directory `/usr/pkgsrc/security/PAM/work/Linux-PAM-0.77/modules
/pam_cracklib'
As a result, these two files are missing and the build process stops when trying to create a binary package:
pkg_create: can't stat `/usr/pkg/lib/security/pam_cracklib.la'
pkg_create: can't stat `/usr/pkg/lib/security/pam_userdb.la'
=> Registering installation for PAM-0.77nb5
pkg_admin: PAM-0.77nb5: File `/usr/pkg/lib/security/pam_cracklib.la' is in +CONT
ENTS but not on filesystem!
pkg_admin: PAM-0.77nb5: File `/usr/pkg/lib/security/pam_userdb.la' is in +CONTEN
TS but not on filesystem!
PAM-0.77nb5 requires installed package db4-4.5.20.2
PAM-0.77nb5 requires installed package libcrack-2.7nb1
===> Building binary package for PAM-0.77nb5
pkg_create: can't stat `/usr/pkg/lib/security/pam_cracklib.la'
pkg_create: can't stat `/usr/pkg/lib/security/pam_userdb.la'
tar: Unable to access lib/security/pam_cracklib.la (No such file or directory)
tar: Unable to access lib/security/pam_userdb.la (No such file or directory)
tar: WARNING! These file names were not selected:
lib/security/pam_cracklib.la
lib/security/pam_userdb.la
pkg_create: /usr/pkg/bin/tar command failed with code 1
Creating package /usr/pkgsrc/packages/pkgsrc-2007Q2/All/PAM-0.77nb5.tgz
Using SrcDir value of /usr/pkg
Registering conflicts: openpam-[0-9]*.
ERROR: pkg_create -K pkg failed (2)
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/security/PAM
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/security/PAM
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/security/PAM
>How-To-Repeat:
Try building the package again with the libcrack option enabled and without the workaround for the pam_userdb below.
>Fix:
For the pam_userdb problem, installing a package containing db1 for the Linux distribution seems to work. For my installation, which is Slackware, I used a package provided to me by someone who responded to my inquiry on the pkgsrc-users mailing list:
http://linux.blackmouse.biz/pub/blackmouse-current/i586/base/db1-1.85-i586-=
1.tgz
Installing this package and trying to build it again resulted in these variables:
The following variables will affect the build process of this package,
PAM-0.77nb5. Their current value is shown below:
* BDB185_DEFAULT = db1
* BDB_DEFAULT = db4
Based on these variables, the following variables have been set:
* BDBBASE = /usr
* BDB_LIBS = -ldb1
* BDB_TYPE = db1
the pam_userdb module pam_userdb.ls was compiled and installed successfully. As for the problem with libcrack, I do not have a fix or workaround for it other than to not enable the librack option.