commit 211d85c1a8c3609b298af2f7095d8380abb3f5e8c20a038f9f6eb2727d5d11c8 Author: Dirk Stoecker Date: Thu Feb 20 09:32:31 2014 +0000 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Apache-AuthNetLDAP?expand=0&rev=18 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Apache-AuthNetLDAP-0.29-apache2.diff b/Apache-AuthNetLDAP-0.29-apache2.diff new file mode 100644 index 0000000..5e6fac8 --- /dev/null +++ b/Apache-AuthNetLDAP-0.29-apache2.diff @@ -0,0 +1,108 @@ +--- Apache-AuthNetLDAP-0.29/AuthNetLDAP.pm ++++ Apache-AuthNetLDAP-0.29/AuthNetLDAP.pm +@@ -4,7 +4,7 @@ + use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); + + use Net::LDAP; +-use mod_perl; ++use mod_perl2; + + require Exporter; + +@@ -19,18 +19,18 @@ + + # setting the constants to help identify which version of mod_perl + # is installed +-use constant MP2 => ($mod_perl::VERSION >= 1.99); ++use constant MP2 => 1; + + # test for the version of mod_perl, and use the appropriate libraries + BEGIN { + if (MP2) { +- require Apache::Const; +- require Apache::Access; +- require Apache::Connection; +- require Apache::Log; +- require Apache::RequestRec; +- require Apache::RequestUtil; +- Apache::Const->import(-compile => 'HTTP_UNAUTHORIZED','OK','DECLINED'); ++ require Apache2::Const; ++ require Apache2::Access; ++ require Apache2::Connection; ++ require Apache2::Log; ++ require Apache2::RequestRec; ++ require Apache2::RequestUtil; ++ Apache2::Const->import(-compile => 'HTTP_UNAUTHORIZED','OK','DECLINED'); + } else { + require Apache::Constants; + Apache::Constants->import('HTTP_UNAUTHORIZED','OK','DECLINED'); +@@ -72,7 +72,7 @@ + if ($password eq "") { + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $user: no password supplied",$r->uri) : $r->log_reason("user $user: no password supplied",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + + +@@ -128,7 +128,7 @@ + { + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $user: LDAP Connection Failed: $error",$r->uri) : $r->log_reason("user $user: LDAP Connection Failed: $error",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + + unless ($mesg->count()) +@@ -138,11 +138,11 @@ + # If user is not found in ldap database, check for the next auth handler before failing + if (lc($allowaltauth) eq "yes") + { +- return MP2 ? Apache::DECLINED : Apache::Constants::DECLINED; ++ return MP2 ? Apache2::Const::DECLINED : Apache::Constants::DECLINED; + } + else + { +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + } + +@@ -156,18 +156,18 @@ + $altfieldvalue =~ s/\s+$//; + if ($altfieldvalue eq $password) + { +- return MP2 ? Apache::OK : Apache::Constants::OK; ++ return MP2 ? Apache2::Const::OK : Apache::Constants::OK; + } + else + { + # If user is not found in ldap database, check for the next auth handler before failing + if (lc($allowaltauth) eq "yes") + { +- return MP2 ? Apache::DECLINED : Apache::Constants::DECLINED; ++ return MP2 ? Apache2::Const::DECLINED : Apache::Constants::DECLINED; + } + else + { +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + } + } +@@ -180,13 +180,13 @@ + { + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $user: failed bind: $error",$r->uri) : $r->log_reason("user $user: failed bind: $error",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + my $error = $mesg->code(); + my $dn = $entry->dn(); + # MP2 ? $r->log_error("AUTHDEBUG user $dn:$password bind: $error",$r->uri) : $r->log_reason("AUTHDEBUG user $dn:$password bind: $error",$r->uri); + +- return MP2 ? Apache::OK : Apache::Constants::OK; ++ return MP2 ? Apache2::Const::OK : Apache::Constants::OK; + } + # Autoload methods go after =cut, and are processed by the autosplit program. + diff --git a/Apache-AuthNetLDAP-0.29.tar.gz b/Apache-AuthNetLDAP-0.29.tar.gz new file mode 100644 index 0000000..7e9f3e6 --- /dev/null +++ b/Apache-AuthNetLDAP-0.29.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fd9e025e8c28b526de25bd29c1008bbe7ee1d1457113460db029facbbd00fba +size 6952 diff --git a/Apache-AuthzNetLDAP-0.07-apache2.diff b/Apache-AuthzNetLDAP-0.07-apache2.diff new file mode 100644 index 0000000..676d958 --- /dev/null +++ b/Apache-AuthzNetLDAP-0.07-apache2.diff @@ -0,0 +1,140 @@ +--- Apache-AuthzNetLDAP-0.07/AuthzNetLDAP.pm ++++ Apache-AuthzNetLDAP-0.07/AuthzNetLDAP.pm +@@ -9,7 +9,7 @@ + require AutoLoader; + + use Net::LDAP; +-use mod_perl; ++use mod_perl2; + + @ISA = qw(Exporter DynaLoader); + # Items to export into callers namespace by default. Note: do not export +@@ -23,20 +23,20 @@ + + # setting the constants to help identify which version of mod_perl + # is installed +-use constant MP2 => ($mod_perl::VERSION >= 1.99); ++use constant MP2 => 1; + + # test for the version of mod_perl, and use the appropriate libraries + BEGIN { + if (MP2) { +- require Apache::Const; +- require Apache::Access; +- require Apache::Connection; +- require Apache::Log; +- require Apache::RequestRec; +- require Apache::RequestUtil; ++ require Apache2::Const; ++ require Apache2::Access; ++ require Apache2::Connection; ++ require Apache2::Log; ++ require Apache2::RequestRec; ++ require Apache2::RequestUtil; + require URI; + require URI::ldap; +- Apache::Const->import(-compile => 'HTTP_UNAUTHORIZED','OK', 'DECLINED'); ++ Apache2::Const->import(-compile => 'HTTP_UNAUTHORIZED','OK', 'DECLINED'); + } else { + require Apache::Constants; + require URI; +@@ -63,7 +63,7 @@ + + my $requires = $r->requires; + +- return MP2 ? Apache::DECLINED : Apache::Constants::DECLINED unless $requires; ++ return MP2 ? Apache2::Const::DECLINED : Apache::Constants::DECLINED unless $requires; + + + my $username = MP2 ? $r->user : $r->connection->user; +@@ -88,7 +88,7 @@ + { + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $username: LDAP Connection Failed: $error",$r->uri) : $r->log_reason("user $username: LDAP Connection Failed: $error",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + + #first let's get the user's DN +@@ -105,7 +105,7 @@ + { + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $username: LDAP Connection Failed: $error",$r->uri) : $r->log_reason("user $username: LDAP Connection Failed: $error",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + my $entry = $mesg->shift_entry(); + +@@ -120,7 +120,7 @@ + my ($requirement,@rest) = split(/\s+/, $req->{requirement}); + if (lc $requirement eq 'user') + { +- foreach (@rest) {return MP2 ? Apache::OK : Apache::Constants::OK if $username eq $_;} ++ foreach (@rest) {return MP2 ? Apache2::Const::OK : Apache::Constants::OK if $username eq $_;} + } + elsif (lc $requirement eq 'group') + { +@@ -129,23 +129,23 @@ + my ($foo,$group) = split(/"/,$req->{requirement}); + my $isMember = Apache::AuthzNetLDAP::_getIsMember($ldap,$r,$group,$entry->dn()); + MP2 ? $r->log_error("user $username: group($group) DEBUG - isMember: $isMember",$r->uri) : $r->log_reason("user $username: group($group) DEBUG - isMember: $isMember",$r->uri); +- return MP2 ? Apache::OK : Apache::Constants::OK if $isMember; ++ return MP2 ? Apache2::Const::OK : Apache::Constants::OK if $isMember; + } + elsif (lc $requirement eq 'ldap-url') + { + my ($foo,$url) = split (/ldap-url/,$req->{requirement}); + my $isMember = Apache::AuthzNetLDAP::_checkURL($r,$ldap,$entry->dn(),$url); + MP2 ? $r->log_error("user $username: group($url) DEBUG - isMember: $isMember",$r->uri) : $r->log_reason("user $username: group($url) DEBUG - isMember: $isMember",$r->uri); +- return MP2 ? Apache::OK : Apache::Constants::OK if $isMember; ++ return MP2 ? Apache2::Const::OK : Apache::Constants::OK if $isMember; + } + elsif (lc $requirement eq 'valid-user') { +- return MP2 ? Apache::OK : Apache::Constants::OK; ++ return MP2 ? Apache2::Const::OK : Apache::Constants::OK; + } + } + + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $username: group (test) LDAP membership check failed with ismember: DEBUG REMOVE COMMENT",$r->uri) : $r->log_reason("user $username: group (test) LDAP membership check failed with ismember: DEBUG REMOVE COMMENT",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + + + +@@ -206,7 +206,7 @@ + { + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri) : $r->log_reason("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + my $entry = $mesg->pop_entry(); + +@@ -236,7 +236,7 @@ + { + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri) : $r->log_reason("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + + #if we find an entry it returns true +@@ -280,7 +280,7 @@ + { + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri) : $r->log_reason("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + + #if make it this far then you must be a member +@@ -312,7 +312,7 @@ + { + $r->note_basic_auth_failure; + MP2 ? $r->log_error("user $userDN: group ($urlval) LDAP search Failed: $error",$r->uri) : $r->log_reason("user $userDN: group ($urlval) LDAP search Failed: $error",$r->uri); +- return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; ++ return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + } + + #if we find an entry it returns true diff --git a/Apache-AuthzNetLDAP-0.07.tar.bz2 b/Apache-AuthzNetLDAP-0.07.tar.bz2 new file mode 100644 index 0000000..13aa798 --- /dev/null +++ b/Apache-AuthzNetLDAP-0.07.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6b2b6f39bd376aaccc57b7be706bdcf73421223180a76823d0fb4c7f10fb2b9 +size 6169 diff --git a/perl-Apache-AuthNetLDAP.changes b/perl-Apache-AuthNetLDAP.changes new file mode 100644 index 0000000..c0b8a8a --- /dev/null +++ b/perl-Apache-AuthNetLDAP.changes @@ -0,0 +1,115 @@ +------------------------------------------------------------------- +Fri Nov 18 11:09:59 UTC 2011 - coolo@suse.com + +- use original .tar.gz + +------------------------------------------------------------------- +Wed Feb 2 13:39:38 UTC 2011 - vcizek@novell.com + +- bzipped source tarball + +------------------------------------------------------------------- +Wed Dec 1 13:30:37 UTC 2010 - coolo@novell.com + +- switch to perl_requires macro + +------------------------------------------------------------------- +Mon Nov 29 18:29:17 UTC 2010 - coolo@novell.com + +- remove /var/adm/perl-modules + +------------------------------------------------------------------- +Sun Jan 10 15:43:32 CET 2010 - jengelh@medozas.de + +- enable parallel build + +------------------------------------------------------------------- +Wed Jan 25 21:39:26 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Aug 1 21:02:30 CEST 2005 - mjancar@suse.cz + +- fix for apache2 + +------------------------------------------------------------------- +Fri Aug 13 18:21:07 CEST 2004 - mjancar@suse.cz + +- update to 0.29 + +------------------------------------------------------------------- +Tue Jun 15 18:50:01 CEST 2004 - ro@suse.de + +- updated requires + +------------------------------------------------------------------- +Wed May 05 11:55:32 CEST 2004 - mjancar@suse.cz + +- update neededforbuild + +------------------------------------------------------------------- +Wed Oct 22 09:56:11 CEST 2003 - mjancar@suse.cz + +- update to 0.26 + +------------------------------------------------------------------- +Fri Aug 22 11:51:37 CEST 2003 - mjancar@suse.cz + +- require the perl version we build with + +------------------------------------------------------------------- +Thu Jul 24 15:15:42 CEST 2003 - mjancar@suse.cz + +- update Apache-AuthNetLDAP to 0.25 +- update Apache-AuthzNetLDAP to 0.07 + +------------------------------------------------------------------- +Tue Jul 22 12:37:33 CEST 2003 - mjancar@suse.cz + +- adapt to perl-5.8.1 +- use %perl_process_packlist + +------------------------------------------------------------------- +Mon Jun 23 14:01:16 CEST 2003 - ro@suse.de + +- added directories to filelist + +------------------------------------------------------------------- +Tue May 20 12:40:14 CEST 2003 - mjancar@suse.cz + +- remove unpackaged files + +------------------------------------------------------------------- +Mon Jul 22 16:16:34 CEST 2002 - prehak@suse.cz + +- doesn't require any specific apache version, + simply require apache [#16775] + +------------------------------------------------------------------- +Tue Jul 9 17:08:27 CEST 2002 - prehak@suse.cz + +- updated to version 0.19 +- Apache-AuthzNetLDAP updated to 03 + +------------------------------------------------------------------- +Tue Jul 2 17:40:06 MEST 2002 - mls@suse.de + +- remove race in .packlist generation + +------------------------------------------------------------------- +Mon Nov 5 14:48:51 CET 2001 - poeml@suse.de + +- use apache-devel-packages macro in #neededforbuild + (expat.rpm is needed by apxs) + +------------------------------------------------------------------- +Fri Feb 23 16:24:24 CET 2001 - ro@suse.de + +- changed neededforbuild to + +------------------------------------------------------------------- +Tue Nov 21 13:41:08 MET 2000 - rolf@suse.de + +- extracted from perlmod package +- update to authnetldap.018 diff --git a/perl-Apache-AuthNetLDAP.spec b/perl-Apache-AuthNetLDAP.spec new file mode 100644 index 0000000..55ae4c8 --- /dev/null +++ b/perl-Apache-AuthNetLDAP.spec @@ -0,0 +1,96 @@ +# +# spec file for package perl-Apache-AuthNetLDAP +# +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + + +Name: perl-Apache-AuthNetLDAP +%define cpan_name Apache-AuthNetLDAP +BuildRequires: apache2-devel apache2-mod_perl libapr-util1-devel pcre-devel perl-ldap +BuildRequires: perl-macros +Version: 0.29 +Release: 229 +%define zver 0.07 +Provides: Apache-AuthNetLDAP +Requires: apache2 +Requires: apache2-mod_perl perl-ldap perl-Convert-ASN1 perl-URI +Conflicts: perlmod +AutoReqProv: on +Group: Development/Libraries/Perl +License: Artistic +Url: http://cpan.org/modules/by-module/Apache/ +Summary: use Net::LDAP for user authentication in Apache +Source0: Apache-AuthNetLDAP-%{version}.tar.gz +Source1: Apache-AuthzNetLDAP-%{zver}.tar.bz2 +Patch0: Apache-AuthNetLDAP-%{version}-apache2.diff +Patch10: Apache-AuthzNetLDAP-%{zver}-apache2.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%{perl_requires} + +%description +Apache::AuthNetLDAP - mod_perl module that uses the Net::LDAP module +for user authentication for Apache. This module authenticates users +via LDAP using the Net::LDAP module. This module is Graham Barr's +"pure" Perl LDAP API. It also uses all of the same parameters as the +Apache::AuthPerLDAP, but I have added two extra parameters. + + + +Authors: +-------- + Mark Wilcox + +%prep +%setup -n %{name}-%{version} -q -b0 -b1 -c +%patch0 +%patch10 + +%build +for i in Apache-AuthNetLDAP-%{version} Apache-AuthzNetLDAP-%{zver} ; do + cd $i + install -d -m755 lib/Apache + mv *.pm lib/Apache + cat MANIFEST | sed s/^.*pm$/lib\\/Apache\\/\&/ >MANIFEST.tmp + mv MANIFEST.tmp MANIFEST + perl Makefile.PL + make %{?_smp_mflags} + make test + cd - +done + +%install +rm -rf $RPM_BUILD_ROOT +for i in Apache-AuthNetLDAP-%{version} Apache-AuthzNetLDAP-%{zver} ; do + cd $i + %perl_make_install + cd - +done +%perl_process_packlist + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +%doc Apache-AuthNetLDAP-%{version}/Changes +%doc %{_mandir}/man?/* +%{perl_vendorlib}/Apache +%{perl_vendorlib}/auto/Apache +%{perl_vendorarch}/auto/Apache-AuthNetLDAP +%{perl_vendorarch}/auto/Apache-AuthzNetLDAP + +%changelog