[packages/courier-authlib] - updated to 0.71.4 - updated authdaemonrc,md5sum-passwords,nostatic patches - removed obsolete no_l

qboosh qboosh at pld-linux.org
Mon May 23 18:22:25 CEST 2022


commit 12ed59dffc19c46e8f91eaf652c56927929577d5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon May 23 18:23:18 2022 +0200

    - updated to 0.71.4
    - updated authdaemonrc,md5sum-passwords,nostatic patches
    - removed obsolete no_la patch
    - added authcustom,autopam subpackages

 courier-authlib-authdaemonrc.patch     |  6 +--
 courier-authlib-md5sum-passwords.patch | 62 ++++------------------
 courier-authlib-no_la.patch            | 36 -------------
 courier-authlib-nostatic.patch         |  8 +--
 courier-authlib.spec                   | 96 ++++++++++++++++++++++++++++------
 5 files changed, 98 insertions(+), 110 deletions(-)
---
diff --git a/courier-authlib.spec b/courier-authlib.spec
index d563a61..88bbb0d 100644
--- a/courier-authlib.spec
+++ b/courier-authlib.spec
@@ -5,17 +5,16 @@
 Summary:	Courier authentication library
 Summary(pl.UTF-8):	Biblioteka uwierzytelniania Couriera
 Name:		courier-authlib
-Version:	0.69.0
+Version:	0.71.4
 Release:	1
 License:	GPL v3 with OpenSSL exception
 Group:		Networking/Daemons
 Source0:	http://downloads.sourceforge.net/courier/%{name}-%{version}.tar.bz2
-# Source0-md5:	581ed4b8a39d00b11f7fe1e534ce57ff
+# Source0-md5:	9c0a5657760065c4a49fcb7fc8b4b0e1
 Source1:	%{name}.init
 Patch0:		%{name}-md5sum-passwords.patch
 Patch1:		%{name}-authdaemonrc.patch
 Patch2:		%{name}-nostatic.patch
-Patch3:		%{name}-no_la.patch
 URL:		http://www.courier-mta.org/authlib/
 BuildRequires:	autoconf >= 2.63
 BuildRequires:	automake
@@ -48,6 +47,9 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		schemadir	/usr/share/openldap/schema
 
+# refers to tcpremoteip variable from daemon
+%define		skip_post_check_so	libauthpam.so.*
+
 %description
 The Courier authentication library provides authentication services
 for other Courier applications.
@@ -89,6 +91,19 @@ zainstalować, aby zbudować resztę pakietów Couriera. Po ich zbudowaniu
 i zainstalowaniu ten pakiet można usunąć. Pliki z tego pakietu nie są
 potrzebne w czasie działania programów.
 
+%package authcustom
+Summary:	Custom module for the Courier authentication library
+Summary(pl.UTF-8):	Moduł custom dla biblioteki uwierzytelniania Couriera
+Group:		Networking/Daemons
+Requires(pre,postun):	sed >= 4.0
+Requires:	%{name} = %{version}-%{release}
+
+%description authcustom
+Custom module for the Courier authentication library.
+
+%description authcustom -l pl.UTF-8
+Moduł custom dla biblioteki uwierzytelniania Couriera.
+
 %package authldap
 Summary:	LDAP support for the Courier authentication library
 Summary(pl.UTF-8):	Obsługa LDAP dla biblioteki uwierzytelniania Couriera
@@ -129,6 +144,19 @@ Ten pakiet dodaje obsługę MySQL do biblioteki uwierzytelniania
 Couriera. Należy go zainstalować aby móc uwierzytelniać się z użyciem
 MySQL.
 
+%package authpam
+Summary:	PAM module for the Courier authentication library
+Summary(pl.UTF-8):	Moduł PAM dla biblioteki uwierzytelniania Couriera
+Group:		Networking/Daemons
+Requires(pre,postun):	sed >= 4.0
+Requires:	%{name} = %{version}-%{release}
+
+%description authpam
+PAM module for the Courier authentication library.
+
+%description authpam -l pl.UTF-8
+Moduł PAM dla biblioteki uwierzytelniania Couriera.
+
 %package authpgsql
 Summary:	PostgreSQL support for the Courier authentication library
 Summary(pl.UTF-8):	Obsługa PostgreSQL dla biblioteki uwierzytelniania Couriera
@@ -228,7 +256,6 @@ Ten pakiet zawiera schemat Couriera authldap.schema dla openldapa.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
 
 %build
 %{__libtoolize}
@@ -289,6 +316,20 @@ if [ "$1" = "0" ]; then
 	%service courier-authlib stop
 fi
 
+%post authcustom
+if [ "$1" = 1 ]; then
+	# add to authmodulelist list if package is first installed
+	%{__sed} -i -e '/^authmodulelist=/{/\bauthcustom\b/!s/"$/ authcustom"/}' /etc/authlib/authdaemonrc
+fi
+%service -q courier-authlib restart
+
+%postun authcustom
+if [ "$1" = 0 ]; then
+	# remove from authmodulelist if package is removed
+	%{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthldap\b \?//}' /etc/authlib/authdaemonrc
+fi
+%service -q courier-authlib restart
+
 %post authldap
 if [ "$1" = 1 ]; then
 	# add to authmodulelist list if package is first installed
@@ -317,6 +358,20 @@ if [ "$1" = 0 ]; then
 fi
 %service -q courier-authlib restart
 
+%post authpam
+if [ "$1" = 1 ]; then
+	# add to authmodulelist list if package is first installed
+	%{__sed} -i -e '/^authmodulelist=/{/\bauthpam\b/!s/"$/ authpam"/}' /etc/authlib/authdaemonrc
+fi
+%service -q courier-authlib restart
+
+%postun authpam
+if [ "$1" = 0 ]; then
+	# remove from authmodulelist if package is removed
+	%{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthpam\b \?//}' /etc/authlib/authdaemonrc
+fi
+%service -q courier-authlib restart
+
 %post authpgsql
 if [ "$1" = 1 ]; then
 	# add to authmodulelist list if package is first installed
@@ -560,46 +615,57 @@ fi
 %files libs
 %defattr(644,root,root,755)
 %dir %{_libdir}/courier-authlib
-%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauth.so
-%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauthcommon.so
-%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauthsasl.so
-%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauthsaslclient.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauth.so.*
+%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauthcommon.so.*
+%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauthsasl.so.*
+%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauthsaslclient.so.*
 
 %files devel
 %defattr(644,root,root,755)
 %doc authlib.html auth_*.html
 %attr(755,root,root) %{_bindir}/courierauthconfig
-%{_includedir}/courier_auth_config.h
+%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauth.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauthcommon.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauthsasl.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libcourierauthsaslclient.so
 %{_includedir}/courierauth*.h
 %{_mandir}/man3/auth_*.3*
 %{_mandir}/man3/authlib.3*
 
+%files authcustom
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/courier-authlib/libauthcustom.so*
+
 %if %{with ldap}
 %files authldap
 %defattr(644,root,root,755)
 %doc authldap.schema README.ldap
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authldaprc
-%attr(755,root,root) %{_libdir}/courier-authlib/libauthldap.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libauthldap.so*
 %endif
 
 %files authmysql
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authmysqlrc
-%attr(755,root,root) %{_libdir}/courier-authlib/libauthmysql.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libauthmysql.so*
+
+%files authpam
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/courier-authlib/libauthpam.so*
 
 %files authpgsql
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authpgsqlrc
-%attr(755,root,root) %{_libdir}/courier-authlib/libauthpgsql.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libauthpgsql.so*
 
 %files authpipe
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/courier-authlib/libauthpipe.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libauthpipe.so*
 
 %files authsqlite
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authsqliterc
-%attr(755,root,root) %{_libdir}/courier-authlib/libauthsqlite.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libauthsqlite.so*
 
 %files authuserdb
 %defattr(644,root,root,755)
@@ -609,7 +675,7 @@ fi
 %attr(755,root,root) %{_sbindir}/userdb
 %attr(755,root,root) %{_sbindir}/userdb-test-cram-md5
 %attr(755,root,root) %{_sbindir}/userdbpw
-%attr(755,root,root) %{_libdir}/courier-authlib/libauthuserdb.so
+%attr(755,root,root) %{_libdir}/courier-authlib/libauthuserdb.so*
 %{_mandir}/man8/makeuserdb.8*
 %{_mandir}/man8/pw2userdb.8*
 %{_mandir}/man8/userdb.8*
diff --git a/courier-authlib-authdaemonrc.patch b/courier-authlib-authdaemonrc.patch
index 15d4331..8087b55 100644
--- a/courier-authlib-authdaemonrc.patch
+++ b/courier-authlib-authdaemonrc.patch
@@ -1,8 +1,8 @@
 make authmodulelist be only modules that are installed with core package
 the other modules are appended to list by sed.
 
---- ./authdaemonrc.in~	2005-07-05 15:25:08.000000000 +0300
-+++ ./authdaemonrc.in	2005-09-19 17:42:11.000000000 +0300
+--- courier-authlib-0.71.4/authdaemonrc.in.orig	2022-05-21 22:10:44.871319461 +0200
++++ courier-authlib-0.71.4/authdaemonrc.in	2022-05-21 22:11:30.434405958 +0200
 @@ -24,7 +24,7 @@
  # by removing them from the following list.  The available modules you
  # can use are: @ALLMODULES@
@@ -10,5 +10,5 @@ the other modules are appended to list by sed.
 -authmodulelist="@ALLMODULES@"
 +authmodulelist="authpam authcustom"
  
- ##NAME: authmodulelistorig:3
+ ##NAME: authmodulelistorig:4
  #
diff --git a/courier-authlib-md5sum-passwords.patch b/courier-authlib-md5sum-passwords.patch
index 21ca448..0385ae1 100644
--- a/courier-authlib-md5sum-passwords.patch
+++ b/courier-authlib-md5sum-passwords.patch
@@ -1,57 +1,15 @@
-diff -ur courier-authlib-0.56.orig/checkpasswordmd5.c courier-authlib-0.56/checkpasswordmd5.c
---- courier-authlib-0.56.orig/checkpasswordmd5.c	2004-10-21 02:10:49.000000000 +0200
-+++ courier-authlib-0.56/checkpasswordmd5.c	2005-08-09 12:27:03.000000000 +0200
-@@ -25,7 +25,11 @@
+--- courier-authlib-0.71.4/checkpasswordmd5.c.orig	2022-05-21 21:47:03.355687139 +0200
++++ courier-authlib-0.71.4/checkpasswordmd5.c	2022-05-21 21:52:29.367254317 +0200
+@@ -24,7 +24,11 @@ int authcheckpasswordmd5(const char *pas
  
  	if (strncasecmp(encrypted_password, "{MD5}", 5) == 0)
  	{
 -               return (strcmp(encrypted_password+5, md5_hash_courier(password)));
-+        	int a = strcmp(encrypted_password+5, md5_hash_courier(password));
-+		if (a != 0)
-+		    return (strcasecmp(encrypted_password+5, md5_hash_hex(password)));
-+		else
-+		    return(a);
++               int a = strcmp(encrypted_password+5, md5_hash_courier(password));
++               if (a != 0)
++                   return (strcasecmp(encrypted_password+5, md5_hash_raw(password)));
++               else
++                   return(a);
  	}
- 	return (-1);
- }
---- courier-authlib-0.68.0.orig/libs/md5/md5.h	2002-12-12 05:23:58.000000000 +0100
-+++ courier-authlib-0.68.0/md5/libs/md5.h	2005-08-09 12:26:27.000000000 +0200
-@@ -56,6 +56,7 @@
- 
- const char *md5_hash_courier(const char *);
- const char *md5_hash_raw(const char *);
-+const char *md5_hash_hex(const char *);
- 
- #ifdef	__cplusplus
- } ;
---- courier-authlib-0.68.0.orig/libs/md5/md5_hash.c	2002-12-12 05:23:58.000000000 +0100
-+++ courier-authlib-0.68.0/libs/md5/md5_hash.c	2005-08-09 12:24:05.000000000 +0200
-@@ -11,6 +11,8 @@
- static const char base64tab[]=
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- 
-+static const char hextab[] = "0123456789abcdef";
-+
- const char *md5_hash_courier(const char *passw)
- {
- MD5_DIGEST md5buf;
-@@ -44,3 +46,19 @@
- 	hash_buffer[j]=0;
- 	return (hash_buffer);
- }
-+
-+const char *md5_hash_hex(const char *passw) {
-+    MD5_DIGEST md5buf;
-+    static char hash_buffer[2*sizeof(md5buf)+1];
-+    int i, j = 0;
-+
-+    md5_digest(passw, strlen(passw), md5buf);
-+
-+    for (i=0; i<sizeof(md5buf); i++) {
-+	hash_buffer[j++] = hextab[(md5buf[i] & 0xF0) >> 4];
-+	hash_buffer[j++] = hextab[md5buf[i] & 0x0F];
-+    }
-+
-+    hash_buffer[j]=0;
-+    return (hash_buffer);
-+}
+ 	if (strncasecmp(encrypted_password, "{MD5RAW}", 8) == 0)
+ 	{
diff --git a/courier-authlib-no_la.patch b/courier-authlib-no_la.patch
deleted file mode 100644
index 921bf12..0000000
--- a/courier-authlib-no_la.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- courier-authlib-0.68.0/authdaemond.c.orig	2017-01-28 03:57:11.000000000 +0100
-+++ courier-authlib-0.68.0/authdaemond.c	2018-03-19 19:12:27.664936669 +0100
-@@ -114,7 +114,10 @@
- 
- 		fprintf(stderr, "INFO: Installing %s\n", buf);
- 		p += i;
--		h=lt_dlopenext(buf);
-+		sprintf(buf2, "courier_%s_init", buf+3);
-+
-+		strcat(buf, ".so");
-+		h=lt_dlopen(buf);
- 
- 		if (h == NULL)
- 		{
-@@ -122,8 +125,6 @@
- 			continue;
- 		}
- 
--		sprintf(buf2, "courier_%s_init", buf+3);
--
- 		pt=lt_dlsym(h, buf2);
- 		if (pt == NULL)
- 		{
---- courier-authlib-0.68.0/authinfo.c.orig	2013-08-25 20:44:47.000000000 +0200
-+++ courier-authlib-0.68.0/authinfo.c	2018-03-21 20:10:48.566256960 +0100
-@@ -105,8 +105,8 @@
- 			       
- 		if (strcmp(argv[n], "--ldflags") == 0)
- 		{
--			printf("-L%s\n",
--			       PKGLIBDIR);
-+			printf("-L%s -Wl,-rpath,%s\n",
-+			       PKGLIBDIR, PKGLIBDIR);
- 		}
- 		if (strcmp(argv[n], "--cppflags") == 0)
- 		{
diff --git a/courier-authlib-nostatic.patch b/courier-authlib-nostatic.patch
index c212b8d..70bdb8d 100644
--- a/courier-authlib-nostatic.patch
+++ b/courier-authlib-nostatic.patch
@@ -105,13 +105,13 @@
  
  EXTRA_DIST=testsuite.txt hmac.c
  
---- courier-authlib-0.68.0.orig/userdb/Makefile.am	2008-05-08 19:20:40.000000000 +0200
-+++ courier-authlib-0.68.0/userdb/Makefile.am	2008-05-29 15:33:17.000000000 +0200
-@@ -17,7 +17,6 @@
+--- courier-authlib-0.71.4/userdb/Makefile.am.orig	2022-05-21 22:11:47.387647448 +0200
++++ courier-authlib-0.71.4/userdb/Makefile.am	2022-05-21 22:12:28.227426200 +0200
+@@ -16,7 +16,6 @@ noinst_DATA=makeuserdb.html userdb.html
  
  userdbpw_SOURCES=userdbpw.c
  userdbpw_LDADD=libuserdb.la @HMACLIB@ @MD5LIB@ @SHA1LIB@ @CRYPTLIBS@
 -userdbpw_LDFLAGS=-static
  
- man8=makeuserdb.8 userdb.8 userdbpw.8
+ man8=makeuserdb.8 userdb.8 userdbpw.8 pw2userdb.8
  man_MANS=$(man8)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/courier-authlib.git/commitdiff/12ed59dffc19c46e8f91eaf652c56927929577d5



More information about the pld-cvs-commit mailing list