16851083 Move Perl Authen:PAM module from Desktop consolidation to Userland
authorBrian Cameron <brian.cameron@oracle.com>
Wed, 19 Jun 2013 15:41:13 -0700
changeset 1360 ed2174a87b88
parent 1359 0d0ad1e7bd3f
child 1361 01948c44fa6a
16851083 Move Perl Authen:PAM module from Desktop consolidation to Userland
components/perl_modules/authen-pam/Makefile
components/perl_modules/authen-pam/authen-pam-GENFRAG.p5m
components/perl_modules/authen-pam/authen-pam-PERLVER.p5m
components/perl_modules/authen-pam/authen-pam.license
components/perl_modules/authen-pam/patches/01-solaris.patch
components/perl_modules/authen-pam/resolve.deps
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/authen-pam/Makefile	Wed Jun 19 15:41:13 2013 -0700
@@ -0,0 +1,63 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+include ../../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		Authen-PAM
+COMPONENT_VERSION=	0.16
+COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE_HASH=	\
+    sha256:0e949bd9a2a9df0f829971030fe9169cbaf6cec78b92faf22f547ff6c6155c9b
+COMPONENT_ARCHIVE_URL=	\
+    http://www.cpan.org/modules/by-module/Authen/$(COMPONENT_ARCHIVE)
+COMPONENT_PROJECT_URL=	http://search.cpan.org/~nikip/
+COMPONENT_BUGDB=	perl-mod/authen-pam
+
+# build threaded 5.12 support too
+PERL_VERSIONS += 5.12-mt
+
+include $(WS_TOP)/make-rules/prep.mk
+include $(WS_TOP)/make-rules/ips.mk
+include $(WS_TOP)/make-rules/makemaker.mk
+
+# Enable ASLR for this component
+ASLR_MODE = $(ASLR_ENABLE)
+
+# man pages go in the common area
+COMPONENT_INSTALL_ENV += INSTALLVENDORMAN3DIR=$(USRSHAREMAN3DIR)
+
+COMPONENT_TEST_TARGETS = test
+
+build:		$(BUILD_32_and_64)
+
+install:	$(INSTALL_32_and_64)
+
+#
+# Must have xml-parser installed for these tests to pass.
+#
+test:		$(TEST_32_and_64)
+
+BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
+
+include $(WS_TOP)/make-rules/depend.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/authen-pam/authen-pam-GENFRAG.p5m	Wed Jun 19 15:41:13 2013 -0700
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+# perl-authen-pam was previously in the 'desktop' consolidation. This optional
+# dependency is here to facilitate the safe transfer of the package 
+# to the 'userland' consolidation.
+depend type=optional fmri=consolidation/desktop/[email protected]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/authen-pam/authen-pam-PERLVER.p5m	Wed Jun 19 15:41:13 2013 -0700
@@ -0,0 +1,65 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+<transform depend pkg.debug.depend.path=usr.*/5.12-mt/bin ->  set pkg.debug.depend.file perl-threaded>
+<transform depend pkg.debug.depend.path=(usr.*/5.12)-mt(/bin) ->  set pkg.debug.depend.path %<1>%<2>  >
+#
+<transform file path=usr.*/5.12-mt/(man|XML)/.* -> drop >
+# convert 5.12-mt to 5.12 in the path because that is where the threaded
+# perl bits really are.
+<transform file path=(usr.*/5.12)-mt(/.+) -> set path %<1>%<2>>
+<transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
+<transform set name=pkg.fmri value=(.*)512-mt(.+) -> set value %<1>threaded-512%<2>>
+<transform depend fmri=(.*)512-mt(.*) -> set fmri %<1>threaded-512%<2>>
+<transform depend predicate=(.*)512-mt(.*) -> set predicate %<1>threaded-512%<2>>
+
+set name=pkg.fmri value=pkg:/library/perl-5/authen-pam-$(PLV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="Authen::PAM - PAM Perl Module"
+set name=pkg.description value="the Authen::PAM Perl module for using PAM"
+set name=com.oracle.info.description value="the Authen::PAM Perl module"
+set name=com.oracle.info.tpno value=9303
+set name=info.classification \
+    value="org.opensolaris.category.2008:Development/Perl"
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=org.opensolaris.arc-caseid value=LSARC/2004/251
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+
+license authen-pam.license license=Artistic
+
+#file path=usr/perl5/$(PERLVER)/lib/$(PERL_ARCH)/perllocal.pod
+file path=usr/perl5/$(PERLVER)/man/man3/Authen::PAM.3
+file path=usr/perl5/$(PERLVER)/man/man3/Authen::PAM::FAQ.3
+file path=usr/perl5/vendor_perl/$(PERLVER)/$(PERL_ARCH)/Authen/PAM.pm
+file path=usr/perl5/vendor_perl/$(PERLVER)/$(PERL_ARCH)/Authen/PAM/FAQ.pod
+file path=usr/perl5/vendor_perl/$(PERLVER)/$(PERL_ARCH)/auto/Authen/PAM/.packlist
+file path=usr/perl5/vendor_perl/$(PERLVER)/$(PERL_ARCH)/auto/Authen/PAM/PAM.bs
+file path=usr/perl5/vendor_perl/$(PERLVER)/$(PERL_ARCH)/auto/Authen/PAM/PAM.so
+
+# force a dependency on the Perl runtime
+depend fmri=__TBD pkg.debug.depend.file=perl \
+    pkg.debug.depend.path=usr/perl5/$(PERLVER)/bin type=require
+
+# force a dependency on the authen-pam package
+depend fmri=library/perl-5/authen-pam@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) \
+    type=require 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/authen-pam/authen-pam.license	Wed Jun 19 15:41:13 2013 -0700
@@ -0,0 +1,129 @@
+Copyright (c) 1986 - 2010, Larry Wall and others
+
+			 The "Artistic License"
+
+				Preamble
+
+The intent of this document is to state the conditions under which a
+Package may be copied, such that the Copyright Holder maintains some
+semblance of artistic control over the development of the package,
+while giving the users of the package the right to use and distribute
+the Package in a more-or-less customary fashion, plus the right to make
+reasonable modifications.
+
+Definitions:
+
+	"Package" refers to the collection of files distributed by the
+	Copyright Holder, and derivatives of that collection of files
+	created through textual modification.
+
+	"Standard Version" refers to such a Package if it has not been
+	modified, or has been modified in accordance with the wishes
+	of the Copyright Holder as specified below.
+
+	"Copyright Holder" is whoever is named in the copyright or
+	copyrights for the package.
+
+	"You" is you, if you're thinking about copying or distributing
+	this Package.
+
+	"Reasonable copying fee" is whatever you can justify on the
+	basis of media cost, duplication charges, time of people involved,
+	and so on.  (You will not be required to justify it to the
+	Copyright Holder, but only to the computing community at large
+	as a market that must bear the fee.)
+
+	"Freely Available" means that no fee is charged for the item
+	itself, though there may be fees involved in handling the item.
+	It also means that recipients of the item may redistribute it
+	under the same conditions they received it.
+
+1. You may make and give away verbatim copies of the source form of the
+Standard Version of this Package without restriction, provided that you
+duplicate all of the original copyright notices and associated disclaimers.
+
+2. You may apply bug fixes, portability fixes and other modifications
+derived from the Public Domain or from the Copyright Holder.  A Package
+modified in such a way shall still be considered the Standard Version.
+
+3. You may otherwise modify your copy of this Package in any way, provided
+that you insert a prominent notice in each changed file stating how and
+when you changed that file, and provided that you do at least ONE of the
+following:
+
+    a) place your modifications in the Public Domain or otherwise make them
+    Freely Available, such as by posting said modifications to Usenet or
+    an equivalent medium, or placing the modifications on a major archive
+    site such as uunet.uu.net, or by allowing the Copyright Holder to include
+    your modifications in the Standard Version of the Package.
+
+    b) use the modified Package only within your corporation or organization.
+
+    c) rename any non-standard executables so the names do not conflict
+    with standard executables, which must also be provided, and provide
+    a separate manual page for each non-standard executable that clearly
+    documents how it differs from the Standard Version.
+
+    d) make other distribution arrangements with the Copyright Holder.
+
+4. You may distribute the programs of this Package in object code or
+executable form, provided that you do at least ONE of the following:
+
+    a) distribute a Standard Version of the executables and library files,
+    together with instructions (in the manual page or equivalent) on where
+    to get the Standard Version.
+
+    b) accompany the distribution with the machine-readable source of
+    the Package with your modifications.
+
+    c) give non-standard executables non-standard names, and clearly
+    document the differences in manual pages (or equivalent), together
+    with instructions on where to get the Standard Version.
+
+    d) make other distribution arrangements with the Copyright Holder.
+
+5. You may charge a reasonable copying fee for any distribution of this
+Package.  You may charge any fee you choose for support of this
+Package.  You may not charge a fee for this Package itself.  However,
+you may distribute this Package in aggregate with other (possibly
+commercial) programs as part of a larger (possibly commercial) software
+distribution provided that you do not advertise this Package as a
+product of your own.  You may embed this Package's interpreter within
+an executable of yours (by linking); this shall be construed as a mere
+form of aggregation, provided that the complete Standard Version of the
+interpreter is so embedded.
+
+6. The scripts and library files supplied as input to or produced as
+output from the programs of this Package do not automatically fall
+under the copyright of this Package, but belong to whoever generated
+them, and may be sold commercially, and may be aggregated with this
+Package.  If such scripts or library files are aggregated with this
+Package via the so-called "undump" or "unexec" methods of producing a
+binary executable image, then distribution of such an image shall
+neither be construed as a distribution of this Package nor shall it
+fall under the restrictions of Paragraphs 3 and 4, provided that you do
+not represent such an executable image as a Standard Version of this
+Package.
+
+7. C subroutines (or comparably compiled subroutines in other
+languages) supplied by you and linked into this Package in order to
+emulate subroutines and variables of the language defined by this
+Package shall not be considered part of this Package, but are the
+equivalent of input as in Paragraph 6, provided these subroutines do
+not change the language in any way that would cause it to fail the
+regression tests for the language.
+
+8. Aggregation of this Package with a commercial distribution is always
+permitted provided that the use of this Package is embedded; that is,
+when no overt attempt is made to make this Package's interfaces visible
+to the end user of the commercial distribution.  Such use shall not be
+construed as a distribution of this Package.
+
+9. The name of the Copyright Holder may not be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+				The End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/authen-pam/patches/01-solaris.patch	Wed Jun 19 15:41:13 2013 -0700
@@ -0,0 +1,63 @@
+This patch addes pam_chauthtok(3PAM) and PAM_NO_AUTHTOK_CHECK features.
+Also refer to pam_authtok_check(5).
+
+--- /usr/tmp/clean/Authen-PAM-0.16/PAM.xs	Thu Jun 30 11:16:30 2005
++++ Authen-PAM-0.16/PAM.xs	Fri Apr  7 10:57:51 2006
+@@ -292,6 +292,12 @@
+       #else
+ 	  goto not_there;
+       #endif
++      else if (strcmp(name, "NO_AUTHTOK_CHECK") == 0)
++      #if defined(HAVE_PAM_NO_AUTHTOK_CHECK)
++	  return PAM_NO_AUTHTOK_CHECK;
++      #else
++	  goto not_there;
++      #endif
+       else if (strcmp(name, "MODULE_UNKNOWN") == 0)
+       #if defined(HAVE_PAM_MODULE_UNKNOWN)  /* Linux-PAM only */
+ 	  return PAM_MODULE_UNKNOWN;
+--- /usr/tmp/clean/Authen-PAM-0.16/PAM.pm.in	Thu Jun 30 11:10:14 2005
++++ Authen-PAM-0.16/PAM.pm.in	Fri Apr  7 10:57:51 2006
+@@ -49,6 +49,7 @@
+ 
+ 	PAM_ESTABLISH_CRED PAM_DELETE_CRED PAM_REINITIALIZE_CRED
+ 	PAM_REFRESH_CRED PAM_CHANGE_EXPIRED_AUTHTOK
++	PAM_NO_AUTHTOK_CHECK
+ 
+ 	PAM_PROMPT_ECHO_OFF PAM_PROMPT_ECHO_ON PAM_ERROR_MSG
+ 	PAM_TEXT_INFO PAM_RADIO_TYPE PAM_BINARY_PROMPT
+@@ -163,6 +164,12 @@
+     return _pam_start($_[0], $_[1], \&pam_default_conv, $_[2]) if @_ == 3;
+     return _pam_start($_[0], undef, \&pam_default_conv, $_[1]) if @_ == 2;
+     croak("Wrong number of arguments in pam_start function");
++}
++
++sub pam_chauthtok {
++    return _pam_chauthtok(@_) if @_ == 2;
++    return _pam_chauthtok($_[0], 0) if @_ == 1;
++    croak("Wrong number of arguments in pam_chauthtok function");
+ }
+ 
+ # Autoload methods go after =cut, and are processed by the autosplit program.
+--- /usr/tmp/clean/Authen-PAM-0.16/PAM_config.h.in	Mon Jun  6 14:29:13 2005
++++ Authen-PAM-0.16/PAM_config.h.in	Fri Apr  7 10:57:51 2006
+@@ -60,6 +60,9 @@
+ /* Is the symbol PAM_REINITIALIZE_CRED defined? */
+ #undef HAVE_PAM_REINITIALIZE_CRED
+ 
++/* Is the symbol PAM_NO_AUTHTOK_CHECK defined? */
++#undef HAVE_PAM_NO_AUTHTOK_CHECK
++
+ /* pam_appl.h in /usr/include/security */
+ #undef HAVE_SECURITY_PAM_APPL_H
+ 
+--- /usr/tmp/clean/Authen-PAM-0.16/configure.ac	Thu Jun 30 11:25:59 2005
++++ Authen-PAM-0.16/configure.ac	Fri Apr  7 10:57:51 2006
+@@ -75,6 +75,7 @@
+ AC_CHECK_PAM_CONST(PAM_MODULE_UNKNOWN)
+ AC_CHECK_PAM_CONST(PAM_RADIO_TYPE)
+ AC_CHECK_PAM_CONST(PAM_BINARY_PROMPT)
++AC_CHECK_PAM_CONST(PAM_NO_AUTHTOK_CHECK)
+ 
+ # Checks if the dl library supports the RTLD_GLOBAL flag
+ # but only if perl was compiled with the dl_open library
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/authen-pam/resolve.deps	Wed Jun 19 15:41:13 2013 -0700
@@ -0,0 +1,4 @@
+runtime/perl-512
+runtime/perl-516
+runtime/perl-threaded-512
+system/library