summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFantix King2012-10-18 08:00:46 +0000
committerFantix King2015-12-30 02:55:10 +0800
commitee6f7e1cbf7c15893fe95ae64299a56d6cb9f43d (patch)
tree481aa3f7221c7053a7ebb1959547364a9e258a64
downloadaur-ee6f7e1cbf7c15893fe95ae64299a56d6cb9f43d.tar.gz
1.1.6-0.1
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD56
-rw-r--r--__libc_lock_define_initialized.patch21
3 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c17644b87b5a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+# Generated by mksrcinfo v8
+# Tue Dec 29 18:54:59 UTC 2015
+pkgbase = libx32-pam
+ pkgdesc = PAM (Pluggable Authentication Modules) library (x32 ABI)
+ pkgver = 1.1.6
+ pkgrel = 0.1
+ url = http://www.kernel.org/pub/linux/libs/pam/
+ arch = x86_64
+ license = GPL2
+ makedepends = libx32-flex
+ makedepends = gcc-multilib-x32
+ depends = libx32-glibc
+ depends = libx32-libtirpc
+ depends = libx32-db
+ depends = libx32-cracklib
+ depends = pam
+ options = !libtool
+ options = !emptydirs
+ source = https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-1.1.6.tar.bz2
+ source = ftp://ftp.suse.com/pub/people/kukuk/pam/pam_unix2/pam_unix2-2.6.tar.bz2
+ source = __libc_lock_define_initialized.patch
+ md5sums = 7b73e58b7ce79ffa321d408de06db2c4
+ md5sums = e2788389a6c59224110a45fcff30e02b
+ md5sums = 7d3c716fb7b0136e10abf57392c23bde
+
+pkgname = libx32-pam
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..73a91ffbc282
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Upstream Maintainer: josephgbr <rafael.f.f1 at gmail.com>
+# Maintainer: Fantix King <fantix.king at gmail.com>
+
+_pkgbase=pam
+pkgname=libx32-${_pkgbase}
+pkgver=1.1.6
+pkgrel=0.1
+pkgdesc="PAM (Pluggable Authentication Modules) library (x32 ABI)"
+arch=('x86_64')
+license=('GPL2')
+url="http://www.kernel.org/pub/linux/libs/pam/"
+depends=('libx32-glibc' 'libx32-libtirpc' 'libx32-db' 'libx32-cracklib' "${_pkgbase}")
+makedepends=('libx32-flex' 'gcc-multilib-x32')
+options=('!libtool' '!emptydirs')
+source=(https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-${pkgver}.tar.bz2
+ ftp://ftp.suse.com/pub/people/kukuk/pam/pam_unix2/pam_unix2-2.6.tar.bz2
+ __libc_lock_define_initialized.patch)
+md5sums=('7b73e58b7ce79ffa321d408de06db2c4'
+ 'e2788389a6c59224110a45fcff30e02b'
+ '7d3c716fb7b0136e10abf57392c23bde')
+
+build() {
+ export CC='gcc -mx32'
+ export CXX='g++ -mx32'
+ export PKG_CONFIG_PATH='/usr/libx32/pkgconfig'
+
+ cd "${srcdir}/Linux-PAM-${pkgver}"
+ ./configure --libdir=/usr/libx32
+ make
+
+ cd "${srcdir}/pam_unix2-2.6"
+ sed -e 's|pam_syslog (pam_handle_t|pam_syslog (const pam_handle_t|g' \
+ -i src/public.h src/support.c
+ patch -Np1 -i ../__libc_lock_define_initialized.patch
+ ./configure --libdir=/usr/libx32
+ make
+}
+
+package() {
+ cd "${srcdir}/Linux-PAM-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ cd "${srcdir}/pam_unix2-2.6"
+ #make DESTDIR="${pkgdir}" install
+ install src/pam_unix2.so "${pkgdir}/usr/libx32/security/pam_unix2.so"
+
+ # fix some missing symlinks from old pam for compatibility
+ cd "${pkgdir}/usr/libx32/security"
+ ln -s pam_unix.so pam_unix_acct.so
+ ln -s pam_unix.so pam_unix_auth.so
+ ln -s pam_unix.so pam_unix_passwd.so
+ ln -s pam_unix.so pam_unix_session.so
+
+ # cleanup for libx32 package
+ rm -rf "${pkgdir}"/{etc,sbin,usr/{include,share}}
+}
diff --git a/__libc_lock_define_initialized.patch b/__libc_lock_define_initialized.patch
new file mode 100644
index 000000000000..c5e72bcbbddd
--- /dev/null
+++ b/__libc_lock_define_initialized.patch
@@ -0,0 +1,21 @@
+diff -Naur pam_unix2-2.6/src/read-files.c pam_unix2-2.6.new/src/read-files.c
+--- pam_unix2-2.6/src/read-files.c 2012-07-16 00:44:08.042427627 +0200
++++ pam_unix2-2.6.new/src/read-files.c 2012-07-16 00:38:30.643576530 +0200
+@@ -341,7 +341,7 @@
+ char *buffer, size_t buflen, int *errnop)
+ {
+ /* Locks the static variables in this file. */
+- __libc_lock_define_initialized (static, lock)
++ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+ enum nss_status status;
+ FILE *stream = NULL;
+
+@@ -371,7 +371,7 @@
+ char *buffer, size_t buflen, int *errnop)
+ {
+ /* Locks the static variables in this file. */
+- __libc_lock_define_initialized (static, lock)
++ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+ enum nss_status status;
+ FILE *stream = NULL;
+