diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-08-12 02:48:13 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-08-12 02:48:13 -0500 |
commit | 750ab8ec8f204c3ef69beb2fef182b002bb50955 (patch) | |
tree | 0363c30dd2168542887ec444db9c4eedd8daf8ef /core | |
parent | 0afc4e099a178ac36309804d4577fec7f3b7e77b (diff) | |
parent | a6c6f698fc6a97fb10525e5e112d8059555cdf29 (diff) |
Merge branch 'master' of gitpar:abslibre-mips64el
Diffstat (limited to 'core')
44 files changed, 1810 insertions, 378 deletions
diff --git a/core/dbus-core/PKGBUILD b/core/dbus-core/PKGBUILD index a9d2505b4..a40373afa 100644 --- a/core/dbus-core/PKGBUILD +++ b/core/dbus-core/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 128605 2011-06-24 14:03:41Z ibiru $ +# $Id: PKGBUILD 134377 2011-08-03 11:19:59Z ibiru $ # Maintainer: Jan de Groot <jgc@archlinux.org> # Contributor: Link Dupont <link@subpop.net> # pkgname=dbus-core -pkgver=1.4.12 +pkgver=1.4.14 pkgrel=1 pkgdesc="Freedesktop.org message bus system" url="http://www.freedesktop.org/Software/dbus" @@ -16,7 +16,7 @@ options=(!libtool) install=dbus.install source=(http://dbus.freedesktop.org/releases/dbus/dbus-${pkgver}.tar.gz dbus) -md5sums=('104f2ea94c10a896dfb1edecb5714cb1' +md5sums=('ae6de2562a57516cfabaf56903375ba9' '08f93dd19cffd1b45ab05c1fd4efb560') build() { diff --git a/core/dialog/PKGBUILD b/core/dialog/PKGBUILD index 864b82ab4..e7d35ff14 100644 --- a/core/dialog/PKGBUILD +++ b/core/dialog/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 113956 2011-03-10 22:08:22Z eric $ +# $Id: PKGBUILD 133064 2011-07-27 11:49:01Z stephane $ # Maintainer: Allan McRae <allan@archlinux.org> # Contributor: Andreas Radke <andyrtr@archlinux.org> pkgname=dialog -pkgver=1.1_20110302 +pkgver=1.1_20110707 pkgrel=1 pkgdesc="A tool to display dialog boxes from shell scripts" arch=('i686' 'x86_64' 'mips64el') @@ -11,8 +11,8 @@ url="http://invisible-island.net/dialog/" license=('LGPL2.1') depends=('ncurses') source=(ftp://invisible-island.net/${pkgname}/${pkgname}-${pkgver/_/-}.tgz) -md5sums=('2eaa82055b86006e205d2c3f74d9b800') -sha1sums=('ba4e79abaf579e0d23f247ae65196437f8d8e031') +md5sums=('34d01aaacbb2932b77774e6c1eec8d2a') +sha1sums=('31e0e3c40cd51629cc802d7ee0b1a4e1ada90f00') build() { cd "${srcdir}/$pkgname-${pkgver/_/-}" diff --git a/core/file/PKGBUILD b/core/file/PKGBUILD index 6b1d9377d..a982f8124 100644 --- a/core/file/PKGBUILD +++ b/core/file/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 131726 2011-07-14 01:54:47Z allan $ +# $Id: PKGBUILD 134479 2011-08-04 09:59:01Z allan $ # Maintainer: Allan McRae <allan@archlinux.org> # Contributor: Andreas Radke <andyrtr@archlinux.org> pkgname=file -pkgver=5.07 -pkgrel=4 +pkgver=5.08 +pkgrel=1 pkgdesc="File type identification utility" arch=('i686' 'x86_64' 'mips64el') license=('custom') @@ -12,17 +12,12 @@ groups=('base') url="http://www.darwinsys.com/file/" depends=('glibc' 'zlib') options=('!libtool') -source=(ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz - file-5.07-zip-detect.patch) -md5sums=('b8d1f9a8a644067bd0a703cebf3f4858' - 'ac155cf89af6665dfee76738c27366d8') +source=(ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz) +md5sums=('6a2a263c20278f01fe3bb0f720b27d4e') build() { cd "${srcdir}/${pkgname}-${pkgver}" - sed -i 's#\$(datadir)/misc#\$(datadir)#' configure - - # combined upstream patches to fix zip file detection - patch -Np1 -i ${srcdir}/file-5.07-zip-detect.patch + sed -i 's#\$(datadir)/misc#\$(datadir)#' configure ./configure --prefix=/usr --datadir=/usr/share/file make diff --git a/core/file/file-5.07-zip-detect.patch b/core/file/file-5.07-zip-detect.patch deleted file mode 100644 index ce433bb90..000000000 --- a/core/file/file-5.07-zip-detect.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -Naur file-5.07-orig//magic/Magdir/archive file-5.07/magic/Magdir/archive ---- file-5.07-orig//magic/Magdir/archive 2011-04-24 01:02:48.000000000 +1000 -+++ file-5.07/magic/Magdir/archive 2011-07-14 11:55:11.821178049 +1000 -@@ -1,5 +1,5 @@ - #------------------------------------------------------------------------------ --# $File: archive,v 1.63 2011/04/23 15:02:48 christos Exp $ -+# $File: archive,v 1.66 2011/05/25 17:45:54 christos Exp $ - # archive: file(1) magic for archive formats (see also "msdos" for self- - # extracting compressed archives) - # -@@ -654,12 +654,6 @@ - >>>>78 string -template Template - !:mime application/vnd.oasis.opendocument.image-template - --# StarView Metafile --# From Pierre Ducroquet <pinaraf@pinaraf.info> --0 string VCLMTF StarView MetaFile -->6 beshort x \b, version %d -->8 belong x \b, size %d -- - # EPUB (OEBPS) books using OCF (OEBPS Container Format) - # From: Adam Buchbinder <adam.buchbinder@gmail.com> - # http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. -@@ -692,8 +686,15 @@ - >>4 byte 0x09 \b, at least v0.9 to extract - >>4 byte 0x0a \b, at least v1.0 to extract - >>4 byte 0x0b \b, at least v1.1 to extract -->>0x161 string WINZIP \b, WinZIP self-extracting - >>4 byte 0x14 \b, at least v2.0 to extract -+>>4 byte 0x2d \b, at least v3.0 to extract -+>>0x161 string WINZIP \b, WinZIP self-extracting -+ -+# StarView Metafile -+# From Pierre Ducroquet <pinaraf@pinaraf.info> -+0 string VCLMTF StarView MetaFile -+>6 beshort x \b, version %d -+>8 belong x \b, size %d - - # Zoo archiver - 20 lelong 0xfdc4a7dc Zoo archive data diff --git a/core/keyutils/PKGBUILD b/core/keyutils/PKGBUILD index 0a0258b22..fe3fc5845 100644 --- a/core/keyutils/PKGBUILD +++ b/core/keyutils/PKGBUILD @@ -1,7 +1,7 @@ -# $Id: PKGBUILD 116950 2011-03-26 15:07:29Z tpowa $ +# $Id: PKGBUILD 133067 2011-07-27 11:57:16Z stephane $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> pkgname=keyutils -pkgver=1.4 +pkgver=1.5.2 pkgrel=1 pkgdesc="Linux Key Management Utilities" arch=(i686 x86_64 'mips64el') @@ -9,16 +9,16 @@ url="http://www.kernel.org" license=('GPL2' 'LGPL2.1') depends=('glibc' 'sh') backup=(etc/request-key.conf) -source=(http://people.redhat.com/~dhowells/$pkgname/$pkgname-$pkgver.tar.bz2) +source=(http://people.redhat.com/~dhowells/${pkgname}/${pkgname}-${pkgver}.tar.bz2) +md5sums=('19811ee31f683058a9aae3e6a3a23a7f') build() { - cd "$srcdir/$pkgname-$pkgver" - sed -i -e '/CFLAGS/s|:= -g -O2|+=|' Makefile + cd "${srcdir}/${pkgname}-${pkgver}" + sed -i "s|/lib64|/lib|g" Makefile make CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" } package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir" install + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install } -md5sums=('e168c1bdaf5aa93c2cbf8a5e7f8ef27b') diff --git a/core/libcap/PKGBUILD b/core/libcap/PKGBUILD index 3a5f21eef..53495e583 100644 --- a/core/libcap/PKGBUILD +++ b/core/libcap/PKGBUILD @@ -1,17 +1,17 @@ -#$Id: PKGBUILD 122049 2011-05-02 01:47:02Z allan $ +#$Id: PKGBUILD 132720 2011-07-25 12:05:15Z allan $ # Maintainer: Allan McRae <allan@archlinux.org> # Contributor: Hugo Doria <hugo@archlinux.org> pkgname=libcap -pkgver=2.21 +pkgver=2.22 pkgrel=1 pkgdesc="POSIX 1003.1e capabilities" arch=('i686' 'x86_64' 'mips64el') -url="http://www.kernel.org/pub/linux/libs/security/linux-privs/" -license=('GPL') +url="http://sites.google.com/site/fullycapable/" +license=('GPL2') depends=('glibc' 'attr') source=(http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${pkgname}-${pkgver}.tar.gz) -md5sums=('61966ef40f2dee8731b69db895e4548d') +md5sums=('b4896816b626bea445f0b3849bdd4077') build() { cd ${srcdir}/${pkgname}-${pkgver} diff --git a/core/libgssglue/PKGBUILD b/core/libgssglue/PKGBUILD index da8133b37..3d7678a0c 100644 --- a/core/libgssglue/PKGBUILD +++ b/core/libgssglue/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 123644 2011-05-12 06:23:26Z tpowa $ +# $Id: PKGBUILD 133594 2011-07-29 21:01:43Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> pkgname=libgssglue -pkgver=0.1 -pkgrel=4 +pkgver=0.3 +pkgrel=1 pkgdesc="Exports a gssapi interface which calls other random gssapi libraries" arch=('i686' 'x86_64' 'mips64el') url="http://www.citi.umich.edu/projects/nfsv4/linux/" @@ -14,7 +14,7 @@ backup=(etc/gssapi_mech.conf) options=('!libtool') source=(http://www.citi.umich.edu/projects/nfsv4/linux/$pkgname/$pkgname-$pkgver.tar.gz gssapi_mech.conf) -md5sums=('ce1b4c758e6de01b712d154c5c97e540' +md5sums=('48aaad11b7371ba3270faa322202c038' '080be866717e4e06fa6f7d6f43cb395a') build() { diff --git a/core/libsasl/0003_saslauthd_mdoc.patch b/core/libsasl/0003_saslauthd_mdoc.patch new file mode 100644 index 000000000..694f4bb67 --- /dev/null +++ b/core/libsasl/0003_saslauthd_mdoc.patch @@ -0,0 +1,35 @@ +0003_saslauthd_mdoc.dpatch by <fabbe@debian.org> + +Use the correct path for the saslauthd.conf file, and use another +date format (cosmetic). + +diff -urNad trunk~/saslauthd/saslauthd.mdoc trunk/saslauthd/saslauthd.mdoc +--- trunk~/saslauthd/saslauthd.mdoc 2006-05-29 22:52:42.000000000 +0300 ++++ trunk/saslauthd/saslauthd.mdoc 2006-07-12 15:05:25.000000000 +0300 +@@ -10,7 +10,7 @@ + .\" manpage in saslauthd.8 whenever you change this source + .\" version. Only the pre-formatted manpage is installed. + .\" +-.Dd 10 24 2002 ++.Dd October 24 2002 + .Dt SASLAUTHD 8 + .Os "CMU-SASL" + .Sh NAME +@@ -216,7 +216,7 @@ + .Em (All platforms that support OpenLDAP 2.0 or higher) + .Pp + Authenticate against an ldap server. The ldap configuration parameters are +-read from /usr/local/etc/saslauthd.conf. The location of this file can be ++read from /etc/saslauthd.conf. The location of this file can be + changed with the -O parameter. See the LDAP_SASLAUTHD file included with the + distribution for the list of available parameters. + .It Li sia +@@ -249,7 +249,7 @@ + .Bl -tag -width "/var/run/saslauthd/mux" + .It Pa /var/run/saslauthd/mux + The default communications socket. +-.It Pa /usr/local/etc/saslauthd.conf ++.It Pa /etc/saslauthd.conf + The default configuration file for ldap support. + .El + .Sh SEE ALSO diff --git a/core/libsasl/0010_maintainer_mode.patch b/core/libsasl/0010_maintainer_mode.patch new file mode 100644 index 000000000..cf3d02a08 --- /dev/null +++ b/core/libsasl/0010_maintainer_mode.patch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 0010_maintainer_mode.dpatch by <fabbe@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Enable maintainer mode to avoid auto* problems. + +@DPATCH@ +diff -urNad trunk~/configure.in trunk/configure.in +--- trunk~/configure.in 2006-05-29 22:52:46.000000000 +0300 ++++ trunk/configure.in 2006-11-01 23:24:55.000000000 +0200 +@@ -62,6 +62,8 @@ + AM_INIT_AUTOMAKE(cyrus-sasl, 2.1.22) + CMU_INIT_AUTOMAKE + ++AM_MAINTAINER_MODE ++ + # and include our config dir scripts + ACLOCAL="$ACLOCAL -I \$(top_srcdir)/config" + diff --git a/core/libsasl/0011_saslauthd_ac_prog_libtool.patch b/core/libsasl/0011_saslauthd_ac_prog_libtool.patch new file mode 100644 index 000000000..3805b4857 --- /dev/null +++ b/core/libsasl/0011_saslauthd_ac_prog_libtool.patch @@ -0,0 +1,15 @@ +0011_saslauthd_ac_prog_libtool.dpatch by <fabbe@debian.org> + +Enable libtool use. + +diff -urNad trunk~/saslauthd/configure.in trunk/saslauthd/configure.in +--- trunk~/saslauthd/configure.in 2006-05-29 22:52:42.000000000 +0300 ++++ trunk/saslauthd/configure.in 2006-11-01 23:41:51.000000000 +0200 +@@ -25,6 +25,7 @@ + AC_PROG_MAKE_SET + AC_PROG_LN_S + AC_PROG_INSTALL ++AC_PROG_LIBTOOL + + dnl Checks for build foo + CMU_C___ATTRIBUTE__ diff --git a/core/libsasl/0012_xopen_crypt_prototype.patch b/core/libsasl/0012_xopen_crypt_prototype.patch new file mode 100644 index 000000000..d50ec8343 --- /dev/null +++ b/core/libsasl/0012_xopen_crypt_prototype.patch @@ -0,0 +1,20 @@ +0012_xopen_crypt_prototype.dpatch by <dannf@debian.org> + +When _XOPEN_SOURCE is defined, the subsequent #include <unistd.h> +will define a correct function prototype for the crypt function. +This avoids segfaults on architectures where the size of a pointer +is greater than the size of an integer (ia64 and amd64 are examples). +This may be detected by looking for build log lines such as the +following: +auth_shadow.c:183: warning: implicit declaration of function ‘crypt’ +auth_shadow.c:183: warning: cast to pointer from integer of different +size + +diff -urNad trunk~/saslauthd/auth_shadow.c trunk/saslauthd/auth_shadow.c +--- trunk~/saslauthd/auth_shadow.c 2006-05-29 22:52:42.000000000 +0300 ++++ trunk/saslauthd/auth_shadow.c 2006-11-08 13:44:23.000000000 +0200 +@@ -1,3 +1,4 @@ ++#define _XOPEN_SOURCE + #define PWBUFSZ 256 /***SWB***/ + + /* MODULE: auth_shadow */ diff --git a/core/libsasl/0016_pid_file_lock_creation_mask.patch b/core/libsasl/0016_pid_file_lock_creation_mask.patch new file mode 100644 index 000000000..e9170cef3 --- /dev/null +++ b/core/libsasl/0016_pid_file_lock_creation_mask.patch @@ -0,0 +1,27 @@ +0016_pid_file_lock_creation_mask.dpatch by Sam Hocevar <sam@zoy.org> + +pid_file_lock is created with a mask of 644 instead of 0644. +This patch fixes this octal/decimal confusion as well as the +(harmless) one in the previous umask() call. + +diff -urNad trunk~/saslauthd/saslauthd-main.c trunk/saslauthd/saslauthd-main.c +--- trunk~/saslauthd/saslauthd-main.c 2006-05-29 22:52:42.000000000 +0300 ++++ trunk/saslauthd/saslauthd-main.c 2007-06-26 12:07:10.000000000 +0300 +@@ -276,7 +276,7 @@ + exit(1); + } + +- umask(077); ++ umask(0077); + + pid_file_size = strlen(run_path) + sizeof(PID_FILE_LOCK) + 1; + if ((pid_file_lock = malloc(pid_file_size)) == NULL) { +@@ -287,7 +287,7 @@ + strlcpy(pid_file_lock, run_path, pid_file_size); + strlcat(pid_file_lock, PID_FILE_LOCK, pid_file_size); + +- if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 644)) < 0) { ++ if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) { + rc = errno; + logger(L_ERR, L_FUNC, "could not open pid lock file: %s", pid_file_lock); + logger(L_ERR, L_FUNC, "open: %s", strerror(rc)); diff --git a/core/libsasl/0018_auth_rimap_quotes.patch b/core/libsasl/0018_auth_rimap_quotes.patch new file mode 100644 index 000000000..13fa999f0 --- /dev/null +++ b/core/libsasl/0018_auth_rimap_quotes.patch @@ -0,0 +1,35 @@ +0016_auth_rimap_quotes.dpatch by <fabbe@debian.org> + +All lines beginning with `## DP:' are a description of the patch. +Avoid infinite loop when username/password has a double quote character. +Upstream change: https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/sasl/saslauthd/auth_rimap.c.diff?r1=1.12;r2=1.13 + +diff -urNad etch~/saslauthd/auth_rimap.c etch/saslauthd/auth_rimap.c +--- etch~/saslauthd/auth_rimap.c 2007-03-29 15:16:20.000000000 +0300 ++++ etch/saslauthd/auth_rimap.c 2008-02-13 13:42:53.000000000 +0200 +@@ -162,6 +162,7 @@ + num_quotes = 0; + p1 = s; + while ((p1 = strchr(p1, '"')) != NULL) { ++ p1++; + num_quotes++; + } + +@@ -438,7 +439,7 @@ + syslog(LOG_WARNING, "auth_rimap: writev: %m"); + memset(qlogin, 0, strlen(qlogin)); + free(qlogin); +- memset(qpass, 0, strlen(qlogin)); ++ memset(qpass, 0, strlen(qpass)); + free(qpass); + (void)close(s); + return strdup(RESP_IERROR); +@@ -447,7 +448,7 @@ + /* don't need these any longer */ + memset(qlogin, 0, strlen(qlogin)); + free(qlogin); +- memset(qpass, 0, strlen(qlogin)); ++ memset(qpass, 0, strlen(qpass)); + free(qpass); + + /* read and parse the LOGIN response */ diff --git a/core/libsasl/0019_ldap_deprecated.patch b/core/libsasl/0019_ldap_deprecated.patch new file mode 100644 index 000000000..8825256cb --- /dev/null +++ b/core/libsasl/0019_ldap_deprecated.patch @@ -0,0 +1,22 @@ +0019_ldap_deprecated.dpatch by dann frazier <dannf@debian.org> + +The function ldap_get_values, used in saslauthd/lak.c, is deprecated. +Therefore, its prototype is not included by default when compiling +against the ldap.h headers. As a result, the compiler cannot know the +return type of the function at compile time, and will implicitly +convert to a pointer. This has implications on 64-bit systems. +This patch sets the deprecation mode on, so that the function prototype +gets included when compiling. +(Description by Fabian Fagerholm <fabbe@debian.org>) + +diff -urNad trunk~/saslauthd/lak.c trunk/saslauthd/lak.c +--- trunk~/saslauthd/lak.c 2006-06-04 12:26:20.000000000 +0300 ++++ trunk/saslauthd/lak.c 2008-02-15 14:32:11.000000000 +0200 +@@ -55,6 +55,7 @@ + #include <openssl/des.h> + #endif + ++#define LDAP_DEPRECATED 1 + #include <ldap.h> + #include <lber.h> + #include <sasl.h> diff --git a/core/libsasl/0022_gcc4.4_preprocessor_syntax.patch b/core/libsasl/0022_gcc4.4_preprocessor_syntax.patch new file mode 100644 index 000000000..a49b553f0 --- /dev/null +++ b/core/libsasl/0022_gcc4.4_preprocessor_syntax.patch @@ -0,0 +1,26 @@ +0022_gcc4.4_preprocessor_syntax.dpatch by <fabbe@paniq.net> + +The #elif preprocessor directive requires a test condition. +GCC 4.4 enforces this rule. + +diff -urNad trunk~/plugins/digestmd5.c trunk/plugins/digestmd5.c +--- trunk~/plugins/digestmd5.c 2006-06-04 12:26:19.000000000 +0300 ++++ trunk/plugins/digestmd5.c 2009-01-26 13:29:40.000000000 +0200 +@@ -2715,7 +2715,7 @@ + "DIGEST-MD5", /* mech_name */ + #ifdef WITH_RC4 + 128, /* max_ssf */ +-#elif WITH_DES ++#elif defined(WITH_DES) + 112, + #else + 1, +@@ -4034,7 +4034,7 @@ + "DIGEST-MD5", + #ifdef WITH_RC4 /* mech_name */ + 128, /* max ssf */ +-#elif WITH_DES ++#elif defined(WITH_DES) + 112, + #else + 1, diff --git a/core/libsasl/0025_ld_as_needed.patch b/core/libsasl/0025_ld_as_needed.patch new file mode 100644 index 000000000..67b48b4a4 --- /dev/null +++ b/core/libsasl/0025_ld_as_needed.patch @@ -0,0 +1,27 @@ +Author: Matthias Klose <doko@ubuntu.com> +Desription: Fix FTBFS, add $(SASL_DB_LIB) as dependency to libsasldb, and use +it. +--- a/saslauthd/Makefile.am ++++ b/saslauthd/Makefile.am +@@ -16,7 +16,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c + saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@ + saslauthd_LDADD = @SASL_KRB_LIB@ \ + @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \ +- @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@ ++ @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@ + + testsaslauthd_SOURCES = testsaslauthd.c utils.c + testsaslauthd_LDADD = @LIB_SOCKET@ +--- a/sasldb/Makefile.am ++++ b/sasldb/Makefile.am +@@ -55,8 +55,8 @@ noinst_LIBRARIES = libsasldb.a + + libsasldb_la_SOURCES = allockey.c sasldb.h + EXTRA_libsasldb_la_SOURCES = $(extra_common_sources) +-libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND) +-libsasldb_la_LIBADD = $(SASL_DB_BACKEND) ++libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND) $(SASL_DB_LIB) ++libsasldb_la_LIBADD = $(SASL_DB_BACKEND) $(SASL_DB_LIB) + + # Prevent make dist stupidity + libsasldb_a_SOURCES = diff --git a/core/libsasl/0026_drop_krb5support_dependency.patch b/core/libsasl/0026_drop_krb5support_dependency.patch new file mode 100644 index 000000000..cc00867ef --- /dev/null +++ b/core/libsasl/0026_drop_krb5support_dependency.patch @@ -0,0 +1,14 @@ +Author: Roberto C. Sanchez <roberto@connexer.com> +Description: Drop gratuitous dependency on krb5support +--- a/cmulocal/sasl2.m4 ++++ b/cmulocal/sasl2.m4 +@@ -112,9 +112,6 @@ if test "$gssapi" != no; then + fi + + if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then +- # check for libkrb5support first +- AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET}) +- + gss_failed=0 + AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1, + ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}) diff --git a/core/libsasl/0027_db5_support.patch b/core/libsasl/0027_db5_support.patch new file mode 100644 index 000000000..522824074 --- /dev/null +++ b/core/libsasl/0027_db5_support.patch @@ -0,0 +1,24 @@ +Author: Ondřej Surý <ondrej@debian.org> +Description: Support newer Berkeley DB versions +--- a/sasldb/db_berkeley.c ++++ b/sasldb/db_berkeley.c +@@ -101,7 +101,7 @@ static int berkeleydb_open(const sasl_ut + ret = db_create(mbdb, NULL, 0); + if (ret == 0 && *mbdb != NULL) + { +-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1 ++#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)) + ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660); + #else + ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660); +--- a/utils/dbconverter-2.c ++++ b/utils/dbconverter-2.c +@@ -214,7 +214,7 @@ static int berkeleydb_open(const char *p + ret = db_create(mbdb, NULL, 0); + if (ret == 0 && *mbdb != NULL) + { +-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1 ++#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)) + ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, DB_CREATE, 0664); + #else + ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, DB_CREATE, 0664); diff --git a/core/libsasl/0030-dont_use_la_files_for_opening_plugins.patch b/core/libsasl/0030-dont_use_la_files_for_opening_plugins.patch new file mode 100644 index 000000000..14a322496 --- /dev/null +++ b/core/libsasl/0030-dont_use_la_files_for_opening_plugins.patch @@ -0,0 +1,134 @@ +--- a/lib/dlopen.c ++++ b/lib/dlopen.c +@@ -247,105 +247,6 @@ static int _sasl_plugin_load(char *plugi + return result; + } + +-/* this returns the file to actually open. +- * out should be a buffer of size PATH_MAX +- * and may be the same as in. */ +- +-/* We'll use a static buffer for speed unless someone complains */ +-#define MAX_LINE 2048 +- +-static int _parse_la(const char *prefix, const char *in, char *out) +-{ +- FILE *file; +- size_t length; +- char line[MAX_LINE]; +- char *ntmp = NULL; +- +- if(!in || !out || !prefix || out == in) return SASL_BADPARAM; +- +- /* Set this so we can detect failure */ +- *out = '\0'; +- +- length = strlen(in); +- +- if (strcmp(in + (length - strlen(LA_SUFFIX)), LA_SUFFIX)) { +- if(!strcmp(in + (length - strlen(SO_SUFFIX)),SO_SUFFIX)) { +- /* check for a .la file */ +- strcpy(line, prefix); +- strcat(line, in); +- length = strlen(line); +- *(line + (length - strlen(SO_SUFFIX))) = '\0'; +- strcat(line, LA_SUFFIX); +- file = fopen(line, "r"); +- if(file) { +- /* We'll get it on the .la open */ +- fclose(file); +- return SASL_FAIL; +- } +- } +- strcpy(out, prefix); +- strcat(out, in); +- return SASL_OK; +- } +- +- strcpy(line, prefix); +- strcat(line, in); +- +- file = fopen(line, "r"); +- if(!file) { +- _sasl_log(NULL, SASL_LOG_WARN, +- "unable to open LA file: %s", line); +- return SASL_FAIL; +- } +- +- while(!feof(file)) { +- if(!fgets(line, MAX_LINE, file)) break; +- if(line[strlen(line) - 1] != '\n') { +- _sasl_log(NULL, SASL_LOG_WARN, +- "LA file has too long of a line: %s", in); +- return SASL_BUFOVER; +- } +- if(line[0] == '\n' || line[0] == '#') continue; +- if(!strncmp(line, "dlname=", sizeof("dlname=") - 1)) { +- /* We found the line with the name in it */ +- char *end; +- char *start; +- size_t len; +- end = strrchr(line, '\''); +- if(!end) continue; +- start = &line[sizeof("dlname=")-1]; +- len = strlen(start); +- if(len > 3 && start[0] == '\'') { +- ntmp=&start[1]; +- *end='\0'; +- /* Do we have dlname="" ? */ +- if(ntmp == end) { +- _sasl_log(NULL, SASL_LOG_DEBUG, +- "dlname is empty in .la file: %s", in); +- return SASL_FAIL; +- } +- strcpy(out, prefix); +- strcat(out, ntmp); +- } +- break; +- } +- } +- if(ferror(file) || feof(file)) { +- _sasl_log(NULL, SASL_LOG_WARN, +- "Error reading .la: %s\n", in); +- fclose(file); +- return SASL_FAIL; +- } +- fclose(file); +- +- if(!(*out)) { +- _sasl_log(NULL, SASL_LOG_WARN, +- "Could not find a dlname line in .la file: %s", in); +- return SASL_FAIL; +- } +- +- return SASL_OK; +-} + #endif /* DO_DLOPEN */ + + /* loads a plugin library */ +@@ -499,18 +400,18 @@ int _sasl_load_plugins(const add_plugin_ + if (length + pos>=PATH_MAX) continue; /* too big */ + + if (strcmp(dir->d_name + (length - strlen(SO_SUFFIX)), +- SO_SUFFIX) +- && strcmp(dir->d_name + (length - strlen(LA_SUFFIX)), +- LA_SUFFIX)) ++ SO_SUFFIX)) + continue; + ++ /* We only use .so files for loading plugins */ ++ + memcpy(name,dir->d_name,length); + name[length]='\0'; + +- result = _parse_la(prefix, name, tmp); +- if(result != SASL_OK) +- continue; +- ++ /* Create full name with path */ ++ strncpy(tmp, prefix, PATH_MAX); ++ strncat(tmp, name, PATH_MAX); ++ + /* skip "lib" and cut off suffix -- + this only need be approximate */ + strcpy(plugname, name + 3); diff --git a/core/libsasl/PKGBUILD b/core/libsasl/PKGBUILD index 4b6dee538..4ea188ad9 100644 --- a/core/libsasl/PKGBUILD +++ b/core/libsasl/PKGBUILD @@ -1,56 +1,204 @@ -# $Id: PKGBUILD 127649 2011-06-17 13:03:28Z stephane $ +# $Id: PKGBUILD 134437 2011-08-03 20:35:03Z jgc $ # Maintainer: Jan de Groot <jgc@archlinux.org> +# This package spans multiple repositories. +# Always build from cyrus-sasl/trunk and merge changes to libsasl/trunk. + +#pkgbase=('cyrus-sasl') +#pkgname=('cyrus-sasl' 'cyrus-sasl-gssapi' 'cyrus-sasl-ldap' 'cyrus-sasl-sql') pkgname=libsasl pkgver=2.1.23 -pkgrel=6 +pkgrel=7 pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library" arch=('i686' 'x86_64' 'mips64el') url="http://cyrusimap.web.cmu.edu/downloads.html#sasl" license=('custom') -depends=('db>=4.8') -optdepends=('cyrus-sasl: saslauthd' - 'cyrus-sasl-plugins: authentication plugins other than sasldb') +options=('!makeflags' '!libtool') +makedepends=('postgresql-libs' 'libmysqlclient' 'libldap' 'krb5' 'openssl') source=(ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-${pkgver}.tar.gz - cyrus-sasl-2.1.19-checkpw.c.patch - cyrus-sasl-db.patch) -options=('!makeflags') + cyrus-sasl-2.1.19-checkpw.c.patch + cyrus-sasl-2.1.22-crypt.patch + cyrus-sasl-2.1.22-qa.patch + cyrus-sasl-2.1.22-automake-1.10.patch + cyrus-sasl-2.1.23-authd-fix.patch + 0003_saslauthd_mdoc.patch + 0010_maintainer_mode.patch + 0011_saslauthd_ac_prog_libtool.patch + 0012_xopen_crypt_prototype.patch + 0016_pid_file_lock_creation_mask.patch + 0018_auth_rimap_quotes.patch + 0019_ldap_deprecated.patch + 0022_gcc4.4_preprocessor_syntax.patch + 0025_ld_as_needed.patch + 0026_drop_krb5support_dependency.patch + 0027_db5_support.patch + 0030-dont_use_la_files_for_opening_plugins.patch + saslauthd.conf.d + saslauthd) md5sums=('2eb0e48106f0e9cd8001e654f267ecbc' 'e27ddff076342e7a3041c4759817d04b' - '0658201497aad359c0d66b0ab8032859') + 'd7e6886e88af04d05f3dec7f0a59ccf7' + '79b8a5e8689989e2afd4b7bda595a7b1' + 'f4131b077ddb5240b375d749162f1b7a' + 'c7ad2c70c1ef814eb4b119f316c064f2' + 'caeeac3feba19cbbd36e7345cc805600' + 'f45d8b60e8f74dd7f7c2ec1665fa602a' + '9d93880514cb5ff5da969f1ceb64a661' + 'dfdc052a7e678db9f687482c5d52f34e' + '4a09f6b24b91f8450892a78e378860da' + '213abe7c5dfe0d7f446992787da1e780' + '5a0321177ad30cb5518c8b6812e3961a' + '0c965748970eea29fa295524821d43f0' + '62bf892fe4d1df41ff748e91a1afaf67' + 'b7848957357e7c02d6490102be496bf9' + 'd86a5aa2e3b5b7c1bad6f8b548b7ea36' + '8e7106f32e495e9ade69014fd1b3352a' + '49219af5641150edec288a3fdb65e7c1' + '75542f613185d5a90520ad0d7d926a20') build() { cd "${srcdir}/cyrus-sasl-${pkgver}" - patch -Np0 -i ${srcdir}/cyrus-sasl-2.1.19-checkpw.c.patch - patch -Np1 -i ${srcdir}/cyrus-sasl-db.patch + patch -Np1 -i "${srcdir}/cyrus-sasl-2.1.19-checkpw.c.patch" + patch -Np1 -i "${srcdir}/cyrus-sasl-2.1.22-crypt.patch" + patch -Np1 -i "${srcdir}/cyrus-sasl-2.1.22-qa.patch" + patch -Np1 -i "${srcdir}/cyrus-sasl-2.1.22-automake-1.10.patch" + patch -Np0 -i "${srcdir}/cyrus-sasl-2.1.23-authd-fix.patch" + patch -Np1 -i "${srcdir}/0003_saslauthd_mdoc.patch" + patch -Np1 -i "${srcdir}/0010_maintainer_mode.patch" + patch -Np1 -i "${srcdir}/0011_saslauthd_ac_prog_libtool.patch" + patch -Np1 -i "${srcdir}/0012_xopen_crypt_prototype.patch" + patch -Np1 -i "${srcdir}/0016_pid_file_lock_creation_mask.patch" + patch -Np1 -i "${srcdir}/0018_auth_rimap_quotes.patch" + patch -Np1 -i "${srcdir}/0019_ldap_deprecated.patch" + patch -Np1 -i "${srcdir}/0022_gcc4.4_preprocessor_syntax.patch" + patch -Np1 -i "${srcdir}/0025_ld_as_needed.patch" + patch -Np1 -i "${srcdir}/0026_drop_krb5support_dependency.patch" + patch -Np1 -i "${srcdir}/0027_db5_support.patch" + patch -Np1 -i "${srcdir}/0030-dont_use_la_files_for_opening_plugins.patch" + + rm -f config/config.guess config/config.sub + rm -f config/ltconfig config/ltmain.sh config/libtool.m4 + rm -fr autom4te.cache + libtoolize -c + aclocal -I config -I cmulocal + automake -a -c + autoheader + autoconf + + pushd saslauthd + rm -f config/config.guess config/config.sub + rm -f config/ltconfig config/ltmain.sh config/libtool.m4 + rm -fr autom4te.cache + libtoolize -c + aclocal -I config -I ../cmulocal -I ../config + automake -a -c + autoheader + autoconf + popd + ./configure --prefix=/usr \ - --host=$CHOST \ - --build=$CHOST \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-anon \ - --disable-cram \ - --disable-digest \ - --disable-gssapi \ - --enable-login \ - --disable-otp \ - --enable-plain \ - --mandir=/usr/share/man - for dir in include lib sasldb plugins utils; do - pushd ${dir} - make - popd - done + --host=$CHOST \ + --build=$CHOST \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-static \ + --enable-shared \ + --enable-alwaystrue \ + --enable-checkapop \ + --enable-cram \ + --enable-digest \ + --disable-otp \ + --disable-srp \ + --disable-srp-setpass \ + --disable-krb4 \ + --enable-gssapi \ + --enable-auth-sasldb \ + --enable-plain \ + --enable-anon \ + --enable-login \ + --enable-ntlm \ + --disable-passdss \ + --enable-sql \ + --enable-ldapdb \ + --disable-macos-framework \ + --with-pam \ + --with-saslauthd=/var/run/saslauthd \ + --with-ldap \ + --with-configdir=/etc/sasl2:/etc/sasl:/usr/lib/sasl2 \ + --sysconfdir=/etc \ + --with-devrandom=/dev/urandom + make } -package() { +package_libsasl() { + pkgdesc="Cyrus Simple Authentication Service Layer (SASL) Library" + depends=('openssl') + provides=('cyrus-sasl-plugins') + conflicts=('cyrus-sasl-plugins') + cd "${srcdir}/cyrus-sasl-${pkgver}" for dir in include lib sasldb plugins utils; do - pushd ${dir} || return 1 + pushd ${dir} make DESTDIR="${pkgdir}" install popd done + rm -f "${pkgdir}"/usr/lib/sasl2/libsql.so* + rm -f "${pkgdir}"/usr/lib/sasl2/libgssapiv2.so* + rm -f "${pkgdir}"/usr/lib/sasl2/libldapdb.so* + install -m755 -d "${pkgdir}/usr/share/licenses/libsasl" + install -m644 COPYING "${pkgdir}/usr/share/licenses/libsasl/" +} + +package_cyrus-sasl() { + depends=("libsasl=${pkgver}-${pkgrel}") + pkgdesc="Cyrus saslauthd SASL authentication daemon" + + cd "${srcdir}/cyrus-sasl-${pkgver}/saslauthd" + make DESTDIR="${pkgdir}" install + install -m755 -d "${pkgdir}/etc/rc.d" + install -m755 -d "${pkgdir}/etc/conf.d" + install -m755 "${srcdir}/saslauthd" "${pkgdir}/etc/rc.d/" + install -m644 "${srcdir}/saslauthd.conf.d" "${pkgdir}/etc/conf.d/saslauthd" + + install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl" + ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl/" +} + +package_cyrus-sasl-gssapi() { + pkgdesc="GSSAPI authentication mechanism for Cyrus SASL" + depends=("libsasl=${pkgver}-${pkgrel}" 'krb5') + replaces=('cyrus-sasl-plugins') + + cd "${srcdir}/cyrus-sasl-${pkgver}/plugins" + install -m755 -d "${pkgdir}/usr/lib/sasl2" + cp -a .libs/libgssapiv2.so* "${pkgdir}/usr/lib/sasl2/" + + install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi" + ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi/" +} + +package_cyrus-sasl-ldap() { + pkgdesc="ldapdb auxprop module for Cyrus SASL" + depends=("libsasl=${pkgver}-${pkgrel}" 'libldap') + replaces=('cyrus-sasl-plugins') + + cd "${srcdir}/cyrus-sasl-${pkgver}/plugins" + install -m755 -d "${pkgdir}/usr/lib/sasl2" + cp -a .libs/libldapdb.so* "${pkgdir}/usr/lib/sasl2/" + + install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap" + ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap/" +} + +package_cyrus-sasl-sql() { + pkgdesc="SQL auxprop module for Cyrus SASL" + depends=("libsasl=${pkgver}-${pkgrel}" 'postgresql-libs' 'libmysqlclient') + replaces=('cyrus-sasl-plugins') + + cd "${srcdir}/cyrus-sasl-${pkgver}/plugins" + install -m755 -d "${pkgdir}/usr/lib/sasl2" + cp -a .libs/libsql.so* "${pkgdir}/usr/lib/sasl2/" - # install license - install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" + install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-sql" + ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-sql/" } diff --git a/core/libsasl/cyrus-sasl-2.1.22-as-needed.patch b/core/libsasl/cyrus-sasl-2.1.22-as-needed.patch new file mode 100644 index 000000000..1294cb507 --- /dev/null +++ b/core/libsasl/cyrus-sasl-2.1.22-as-needed.patch @@ -0,0 +1,11 @@ +--- saslauthd/configure.in.orig 2006-05-23 15:53:17.000000000 -0700 ++++ saslauthd/configure.in 2006-05-23 15:53:33.000000000 -0700 +@@ -77,7 +77,7 @@ + AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support]) + SASL_DB_PATH_CHECK() + SASL_DB_CHECK() +- SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al" ++ SASL_DB_LIB="../sasldb/.libs/libsasldb.a $SASL_DB_LIB" + fi + + AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ], diff --git a/core/libsasl/cyrus-sasl-2.1.22-automake-1.10.patch b/core/libsasl/cyrus-sasl-2.1.22-automake-1.10.patch new file mode 100644 index 000000000..8cd71c0c5 --- /dev/null +++ b/core/libsasl/cyrus-sasl-2.1.22-automake-1.10.patch @@ -0,0 +1,94 @@ +Re-merged patch by Robert Scheck <redhat@linuxnetz.de> for cyrus-sasl >= 2.1.22, which was +originally written by Jacek Konieczny <jajcus@pld-linux.org> and makes cyrus-sasl building +using automake 1.10. + +--- cyrus-sasl-2.1.22/plugins/Makefile.am 2006-05-17 18:46:16.000000000 +0200 ++++ cyrus-sasl-2.1.22/plugins/Makefile.am.am110 2007-02-16 15:42:07.000000000 +0100 +@@ -82,73 +82,73 @@ + libntlm.la libpassdss.la libsasldb.la libsql.la libldapdb.la + + libplain_la_SOURCES = plain.c plain_init.c $(common_sources) +-libplain_la_LDFLAGS = -version-info $(plain_version) ++libplain_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(plain_version) + libplain_la_DEPENDENCIES = $(COMPAT_OBJS) + libplain_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS) + + libanonymous_la_SOURCES = anonymous.c anonymous_init.c $(common_sources) +-libanonymous_la_LDFLAGS = -version-info $(anonymous_version) ++libanonymous_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(anonymous_version) + libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS) + libanonymous_la_LIBADD = $(COMPAT_OBJS) + + libkerberos4_la_SOURCES = kerberos4.c kerberos4_init.c $(common_sources) +-libkerberos4_la_LDFLAGS = -version-info $(kerberos4_version) ++libkerberos4_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(kerberos4_version) + libkerberos4_la_DEPENDENCIES = $(COMPAT_OBJS) + libkerberos4_la_LIBADD = $(SASL_KRB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS) + + libgssapiv2_la_SOURCES = gssapi.c gssapiv2_init.c $(common_sources) +-libgssapiv2_la_LDFLAGS = -version-info $(gssapiv2_version) ++libgssapiv2_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(gssapiv2_version) + libgssapiv2_la_DEPENDENCIES = $(COMPAT_OBJS) + libgssapiv2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS) + + libcrammd5_la_SOURCES = cram.c crammd5_init.c $(common_sources) +-libcrammd5_la_LDFLAGS = -version-info $(crammd5_version) ++libcrammd5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(crammd5_version) + libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS) + libcrammd5_la_LIBADD = $(COMPAT_OBJS) + + libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c $(common_sources) +-libdigestmd5_la_LDFLAGS = -version-info $(digestmd5_version) ++libdigestmd5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(digestmd5_version) + libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS) + libdigestmd5_la_LIBADD = $(LIB_DES) $(LIB_SOCKET) $(COMPAT_OBJS) + + liblogin_la_SOURCES = login.c login_init.c $(common_sources) +-liblogin_la_LDFLAGS = -version-info $(login_version) ++liblogin_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(login_version) + liblogin_la_DEPENDENCIES = $(COMPAT_OBJS) + liblogin_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS) + + libsrp_la_SOURCES = srp.c srp_init.c $(common_sources) +-libsrp_la_LDFLAGS = -version-info $(srp_version) ++libsrp_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(srp_version) + libsrp_la_DEPENDENCIES = $(COMPAT_OBJS) + libsrp_la_LIBADD = $(SRP_LIBS) $(COMPAT_OBJS) + + libotp_la_SOURCES = otp.c otp_init.c otp.h $(common_sources) +-libotp_la_LDFLAGS = -version-info $(otp_version) ++libotp_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(otp_version) + libotp_la_DEPENDENCIES = $(COMPAT_OBJS) + libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS) + + libntlm_la_SOURCES = ntlm.c ntlm_init.c $(common_sources) +-libntlm_la_LDFLAGS = -version-info $(ntlm_version) ++libntlm_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ntlm_version) + libntlm_la_DEPENDENCIES = $(COMPAT_OBJS) + libntlm_la_LIBADD = $(NTLM_LIBS) $(COMPAT_OBJS) + + libpassdss_la_SOURCES = passdss.c passdss_init.c $(common_sources) +-libpassdss_la_LDFLAGS = -version-info $(passdss_version) ++libpassdss_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(passdss_version) + libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS) + libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(COMPAT_OBJS) + + # Auxprop Plugins + libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources) +-libsasldb_la_LDFLAGS = -version-info $(sasldb_version) ++libsasldb_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(sasldb_version) + libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS) + libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(COMPAT_OBJS) + + libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c $(common_sources) +-libldapdb_la_LDFLAGS = $(LIB_LDAP) -version-info $(ldapdb_version) ++libldapdb_la_LDFLAGS = $(AM_LDFLAGS) $(LIB_LDAP) -version-info $(ldapdb_version) + libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS) + libldapdb_la_LIBADD = $(COMPAT_OBJS) + + libsql_la_SOURCES = sql.c sql_init.c $(common_sources) +-libsql_la_LDFLAGS = $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) -version-info $(sql_version) ++libsql_la_LDFLAGS = $(AM_LDFLAGS) $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) -version-info $(sql_version) + libsql_la_DEPENDENCIES = $(COMPAT_OBJS) + libsql_la_LIBADD = $(COMPAT_OBJS) + diff --git a/core/libsasl/cyrus-sasl-2.1.22-crypt.patch b/core/libsasl/cyrus-sasl-2.1.22-crypt.patch new file mode 100644 index 000000000..fd356327b --- /dev/null +++ b/core/libsasl/cyrus-sasl-2.1.22-crypt.patch @@ -0,0 +1,71 @@ +http://bugs.gentoo.org/152544 + +--- cyrus-sasl-2.1.22/lib/Makefile.am ++++ cyrus-sasl-2.1.22/lib/Makefile.am +@@ -45,6 +45,7 @@ sasl_version = 2:22:0 + + INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb + ++AM_CFLAGS = -fPIC + EXTRA_DIST = windlopen.c staticopen.h NTMakefile + EXTRA_LIBRARIES = libsasl2.a + noinst_LIBRARIES = @SASL_STATIC_LIBS@ +--- cyrus-sasl-2.1.22/plugins/Makefile.am ++++ cyrus-sasl-2.1.22/plugins/Makefile.am +@@ -63,6 +63,7 @@ srp_version = 2:22:0 + + INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include + AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) ++AM_CFLAGS = -fPIC + + COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@ + +--- cyrus-sasl-2.1.22/sasldb/Makefile.am ++++ cyrus-sasl-2.1.22/sasldb/Makefile.am +@@ -48,6 +48,7 @@ INCLUDES=-I$(top_srcdir)/include -I$(top + + extra_common_sources = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c + ++AM_CFLAGS = -fPIC + EXTRA_DIST = NTMakefile + + noinst_LTLIBRARIES = libsasldb.la +--- cyrus-sasl-2.1.22/utils/Makefile.am ++++ cyrus-sasl-2.1.22/utils/Makefile.am +@@ -42,7 +42,7 @@ + # + ################################################################ + +-all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET) ++all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET) $(LIB_CRYPT) + all_sasl_static_libs = ../lib/.libs/libsasl2.a $(SASL_DB_LIB) $(LIB_SOCKET) $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(SASL_KRB_LIB) $(LIB_DES) $(PLAIN_LIBS) $(SRP_LIBS) $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) + + sbin_PROGRAMS = @SASL_DB_UTILS@ @SMTPTEST_PROGRAM@ pluginviewer +--- cyrus-sasl-2.1.22/sample/Makefile.am ++++ cyrus-sasl-2.1.22/sample/Makefile.am +@@ -54,10 +54,10 @@ sample_server_SOURCES = sample-server.c + server_SOURCES = server.c common.c common.h + client_SOURCES = client.c common.c common.h + +-server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) +-client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) ++server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT) ++client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT) + +-sample_client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) +-sample_server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) ++sample_client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT) ++sample_server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT) + + EXTRA_DIST = NTMakefile +--- cyrus-sasl-2.1.22/lib/Makefile.am ++++ cyrus-sasl-2.1.22/lib/Makefile.am +@@ -63,7 +63,7 @@ lib_LTLIBRARIES = libsasl2.la + libsasl2_la_SOURCES = $(common_sources) $(common_headers) + libsasl2_la_LDFLAGS = -version-info $(sasl_version) + libsasl2_la_DEPENDENCIES = $(LTLIBOBJS) +-libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) ++libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) $(LIB_CRYPT) + + if MACOSX + framedir = /Library/Frameworks/SASL2.framework diff --git a/core/libsasl/cyrus-sasl-2.1.22-qa.patch b/core/libsasl/cyrus-sasl-2.1.22-qa.patch new file mode 100644 index 000000000..4f7b04f13 --- /dev/null +++ b/core/libsasl/cyrus-sasl-2.1.22-qa.patch @@ -0,0 +1,22 @@ +fix missing prototype warnings + +--- cyrus-sasl-2.1.22/lib/auxprop.c ++++ cyrus-sasl-2.1.22/lib/auxprop.c +@@ -43,6 +43,7 @@ + */ + + #include <config.h> ++#include <stdio.h> + #include <sasl.h> + #include <prop.h> + #include <ctype.h> +--- cyrus-sasl-2.1.22/pwcheck/pwcheck_getspnam.c ++++ cyrus-sasl-2.1.22/pwcheck/pwcheck_getspnam.c +@@ -24,6 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERF + ******************************************************************/ + + #include <shadow.h> ++#include <string.h> + + extern char *crypt(); + diff --git a/core/libsasl/cyrus-sasl-2.1.23-authd-fix.patch b/core/libsasl/cyrus-sasl-2.1.23-authd-fix.patch new file mode 100644 index 000000000..f5f372d17 --- /dev/null +++ b/core/libsasl/cyrus-sasl-2.1.23-authd-fix.patch @@ -0,0 +1,28 @@ +fix warnings: + +auth_sasldb.c: In function ‘auth_sasldb’: +auth_sasldb.c:144: warning: implicit declaration of function ‘gethostname’ + +auth_sasldb.c:153: warning: passing argument 8 of ‘_sasldb_getdata’ from incompatible pointer type +../sasldb/sasldb.h:60: note: expected ‘size_t *’ but argument is of type ‘int *’ + +--- saslauthd/auth_sasldb.c ++++ saslauthd/auth_sasldb.c +@@ -41,6 +41,7 @@ + #include <string.h> + #include <stdlib.h> + #include <pwd.h> ++#include <unistd.h> + /* END PUBLIC DEPENDENCIES */ + + #define RETURN(x) return strdup(x) +@@ -131,7 +132,8 @@ + /* VARIABLES */ + char pw[1024]; /* pointer to passwd file entry */ + sasl_utils_t utils; +- int ret, outsize; ++ int ret; ++ size_t outsize; + const char *use_realm; + char realm_buf[MAXHOSTNAMELEN]; + /* END VARIABLES */ diff --git a/core/libsasl/cyrus-sasl-db.patch b/core/libsasl/cyrus-sasl-db.patch deleted file mode 100644 index 08758ab85..000000000 --- a/core/libsasl/cyrus-sasl-db.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -urN aaa/cyrus-sasl-2.1.22/cmulocal/berkdb.m4 cyrus-sasl-2.1.22/cmulocal/berkdb.m4 ---- aaa/cyrus-sasl-2.1.22/cmulocal/berkdb.m4 2005-04-26 21:14:07.000000000 +0200 -+++ cyrus-sasl-2.1.22/cmulocal/berkdb.m4 2006-10-02 20:36:17.137852392 +0200 -@@ -213,7 +213,7 @@ - fi - - saved_LIBS=$LIBS -- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db -+ for dbname in db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db - do - LIBS="$saved_LIBS -l$dbname" - AC_TRY_LINK([#include <db.h>], ---- cyrus-sasl-2.1.23/sasldb/db_berkeley.c.orig 2009-04-28 17:09:18.000000000 +0200 -+++ cyrus-sasl-2.1.23/sasldb/db_berkeley.c 2010-05-18 21:02:20.418940098 +0200 -@@ -100,7 +100,7 @@ - ret = db_create(mbdb, NULL, 0); - if (ret == 0 && *mbdb != NULL) - { --#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1 -+#if (DB_VERSION_MAJOR > 4) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) - ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660); - #else - ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660); ---- cyrus-sasl-2.1.23/utils/dbconverter-2.c.orig 2003-02-13 20:56:17.000000000 +0100 -+++ cyrus-sasl-2.1.23/utils/dbconverter-2.c 2010-05-18 21:11:09.982932556 +0200 -@@ -214,7 +214,7 @@ - ret = db_create(mbdb, NULL, 0); - if (ret == 0 && *mbdb != NULL) - { --#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1 -+#if (DB_VERSION_MAJOR > 4) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) - ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, DB_CREATE, 0664); - #else - ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, DB_CREATE, 0664); diff --git a/core/libsasl/saslauthd b/core/libsasl/saslauthd new file mode 100644 index 000000000..6afafae0b --- /dev/null +++ b/core/libsasl/saslauthd @@ -0,0 +1,49 @@ +#!/bin/bash + +# source application-specific settings +[ -f /etc/conf.d/saslauthd ] && . /etc/conf.d/saslauthd + +. /etc/rc.conf +. /etc/rc.d/functions + +DAEMON_NAME="saslauthd" +SASLAUTHD_BIN=/usr/sbin/saslauthd +SASLAUTHD_RUN=/var/run/saslauthd +SASLAUTHD_PID=$SASLAUTHD_RUN/saslauthd.pid + +case "$1" in + start) + stat_busy "Starting $DAEMON_NAME" + [ ! -d /var/run/saslauthd ] && install -d /var/run/saslauthd + if $SASLAUTHD_BIN $SASLAUTHD_OPTS >/dev/null; then + add_daemon $DAEMON_NAME + stat_done + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $DAEMON_NAME" + [ -f $SASLAUTHD_PID ] && kill `cat $SASLAUTHD_PID` &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm_daemon $DAEMON_NAME + stat_done + fi + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 +# vim: ts=2 sw=2 et ft=sh diff --git a/core/libsasl/saslauthd.conf.d b/core/libsasl/saslauthd.conf.d new file mode 100644 index 000000000..167211290 --- /dev/null +++ b/core/libsasl/saslauthd.conf.d @@ -0,0 +1 @@ +SASLAUTHD_OPTS="-a pam" diff --git a/core/libtirpc/PKGBUILD b/core/libtirpc/PKGBUILD index 25784b3bd..fac744d86 100644 --- a/core/libtirpc/PKGBUILD +++ b/core/libtirpc/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 132087 2011-07-20 00:51:34Z eric $ +# $Id: PKGBUILD 133597 2011-07-29 21:03:33Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> pkgname=libtirpc pkgver=0.2.2 -pkgrel=1 +pkgrel=2 pkgdesc="Transport Independent RPC library (SunRPC replacement)" arch=(i686 x86_64 mips64el) url="http://libtirpc.sourceforge.net/" @@ -12,17 +12,26 @@ depends=('libgssglue') backup=('etc/netconfig') options=('!libtool') source=(http://downloads.sourceforge.net/sourceforge/libtirpc/${pkgname}-${pkgver}.tar.bz2 - libtirpc-0.2.1-fortify.patch) + libtirpc-0.2.1-fortify.patch + libtirpc-0.2.3rc1.patch + libtirpc-fix-segfault-0.2.2.patch) md5sums=('74c41c15c2909f7d11d9c7bfa7db6273' - '2e5c067f1651469dfbbdc91d3c9c60e8') + '2e5c067f1651469dfbbdc91d3c9c60e8' + 'ac2a1657b44f4a99c37d8265b05b9133' + '5a3ab55934cad4e8b38fc90c54756472') build() { cd "${srcdir}/${pkgname}-${pkgver}" # fix http://bugs.gentoo.org/293593 # https://bugs.archlinux.org/task/20082 patch -Np1 -i ../libtirpc-0.2.1-fortify.patch + # add patches from fedora git to make nfs-utils compile again + patch -Np1 -i ../libtirpc-0.2.3rc1.patch + patch -Np1 -i ../libtirpc-fix-segfault-0.2.2.patch + sh autogen.sh + autoreconf -fisv ./configure --prefix=/usr --enable-gss - make + make } package() { diff --git a/core/libtirpc/libtirpc-0.2.3rc1.patch b/core/libtirpc/libtirpc-0.2.3rc1.patch new file mode 100644 index 000000000..d57a59e1f --- /dev/null +++ b/core/libtirpc/libtirpc-0.2.3rc1.patch @@ -0,0 +1,637 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index 7ee8cbc..6731ff9 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -50,7 +50,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln + rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ + rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_generic.c \ + svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ +- auth_time.c auth_des.c authdes_prot.c des_crypt.c ++ auth_time.c auth_des.c authdes_prot.c + + ## XDR + libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c +diff --git a/src/auth_des.c b/src/auth_des.c +index 37e7667..f0c8b8c 100644 +--- a/src/auth_des.c ++++ b/src/auth_des.c +@@ -223,6 +223,7 @@ authdes_pk_seccreate(const char *servername, netobj *pkey, u_int window, + goto failed; + } + ad->ad_nis_srvr = NULL; /* not needed any longer */ ++ auth_get(auth); /* Reference for caller */ + return (auth); + + failed: +@@ -472,6 +473,12 @@ authdes_destroy(AUTH *auth) + FREE(auth, sizeof(AUTH)); + } + ++static bool_t ++authdes_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xfunc, caddr_t xwhere) ++{ ++ return ((*xfunc)(xdrs, xwhere)); ++} ++ + static struct auth_ops * + authdes_ops(void) + { +@@ -487,6 +494,8 @@ authdes_ops(void) + ops.ah_validate = authdes_validate; + ops.ah_refresh = authdes_refresh; + ops.ah_destroy = authdes_destroy; ++ ops.ah_wrap = authdes_wrap; ++ ops.ah_unwrap = authdes_wrap; + } + mutex_unlock(&authdes_ops_lock); + return (&ops); +diff --git a/src/auth_gss.c b/src/auth_gss.c +index df3017a..a992049 100644 +--- a/src/auth_gss.c ++++ b/src/auth_gss.c +@@ -200,6 +200,8 @@ authgss_create(CLIENT *clnt, gss_name_t name, struct rpc_gss_sec *sec) + + if (!authgss_refresh(auth)) + auth = NULL; ++ else ++ auth_get(auth); /* Reference for caller */ + + clnt->cl_auth = save_auth; + +@@ -555,9 +557,20 @@ authgss_destroy_context(AUTH *auth) + + if (gd->gc.gc_ctx.length != 0) { + if (gd->established) { ++ AUTH *save_auth = NULL; ++ ++ /* Make sure we use the right auth_ops */ ++ if (gd->clnt->cl_auth != auth) { ++ save_auth = gd->clnt->cl_auth; ++ gd->clnt->cl_auth = auth; ++ } ++ + gd->gc.gc_proc = RPCSEC_GSS_DESTROY; + clnt_call(gd->clnt, NULLPROC, (xdrproc_t)xdr_void, NULL, + (xdrproc_t)xdr_void, NULL, AUTH_TIMEOUT); ++ ++ if (save_auth != NULL) ++ gd->clnt->cl_auth = save_auth; + } + gss_release_buffer(&min_stat, &gd->gc.gc_ctx); + /* XXX ANDROS check size of context - should be 8 */ +diff --git a/src/auth_none.c b/src/auth_none.c +index a439ec6..008c589 100644 +--- a/src/auth_none.c ++++ b/src/auth_none.c +@@ -155,6 +155,12 @@ authnone_destroy(AUTH *client) + { + } + ++static bool_t ++authnone_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xfunc, caddr_t xwhere) ++{ ++ return ((*xfunc)(xdrs, xwhere)); ++} ++ + static struct auth_ops * + authnone_ops() + { +@@ -170,6 +176,8 @@ authnone_ops() + ops.ah_validate = authnone_validate; + ops.ah_refresh = authnone_refresh; + ops.ah_destroy = authnone_destroy; ++ ops.ah_wrap = authnone_wrap; ++ ops.ah_unwrap = authnone_wrap; + } + mutex_unlock(&ops_lock); + return (&ops); +diff --git a/src/auth_unix.c b/src/auth_unix.c +index c2469da..4b9b13f 100644 +--- a/src/auth_unix.c ++++ b/src/auth_unix.c +@@ -162,6 +162,7 @@ authunix_create(machname, uid, gid, len, aup_gids) + */ + auth->ah_cred = au->au_origcred; + marshal_new_auth(auth); ++ auth_get(auth); /* Reference for caller */ + return (auth); + #ifndef _KERNEL + cleanup_authunix_create: +@@ -396,6 +397,12 @@ marshal_new_auth(auth) + XDR_DESTROY(xdrs); + } + ++static bool_t ++authunix_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xfunc, caddr_t xwhere) ++{ ++ return ((*xfunc)(xdrs, xwhere)); ++} ++ + static struct auth_ops * + authunix_ops() + { +@@ -411,6 +418,8 @@ authunix_ops() + ops.ah_validate = authunix_validate; + ops.ah_refresh = authunix_refresh; + ops.ah_destroy = authunix_destroy; ++ ops.ah_wrap = authunix_wrap; ++ ops.ah_unwrap = authunix_wrap; + } + mutex_unlock(&ops_lock); + return (&ops); +diff --git a/src/authgss_prot.c b/src/authgss_prot.c +index 9d7fa09..0168318 100644 +--- a/src/authgss_prot.c ++++ b/src/authgss_prot.c +@@ -161,6 +161,7 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr, + databuflen = end - start - 4; + XDR_SETPOS(xdrs, start + 4); + databuf.value = XDR_INLINE(xdrs, databuflen); ++ databuf.length = databuflen; + + xdr_stat = FALSE; + +@@ -169,7 +170,6 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr, + XDR_SETPOS(xdrs, start); + if (!xdr_u_int(xdrs, (u_int *)&databuflen)) + return (FALSE); +- databuf.length = databuflen; + + /* Checksum rpc_gss_data_t. */ + maj_stat = gss_get_mic(&min_stat, ctx, qop, +diff --git a/src/clnt_dg.c b/src/clnt_dg.c +index 79fed5d..4a1f60a 100644 +--- a/src/clnt_dg.c ++++ b/src/clnt_dg.c +@@ -366,7 +366,7 @@ call_again: + + if ((! XDR_PUTINT32(xdrs, (int32_t *)&proc)) || + (! AUTH_MARSHALL(cl->cl_auth, xdrs)) || +- (! (*xargs)(xdrs, argsp))) { ++ (! AUTH_WRAP(cl->cl_auth, xdrs, xargs, argsp))) { + cu->cu_error.re_status = RPC_CANTENCODEARGS; + goto out; + } +@@ -400,8 +400,8 @@ get_reply: + * (We assume that this is actually only executed once.) + */ + reply_msg.acpted_rply.ar_verf = _null_auth; +- reply_msg.acpted_rply.ar_results.where = resultsp; +- reply_msg.acpted_rply.ar_results.proc = xresults; ++ reply_msg.acpted_rply.ar_results.where = NULL; ++ reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; + + fd.fd = cu->cu_fd; + fd.events = POLLIN; +@@ -512,6 +512,10 @@ get_reply: + &reply_msg.acpted_rply.ar_verf)) { + cu->cu_error.re_status = RPC_AUTHERROR; + cu->cu_error.re_why = AUTH_INVALIDRESP; ++ } else if (! AUTH_UNWRAP(cl->cl_auth, &reply_xdrs, ++ xresults, resultsp)) { ++ if (cu->cu_error.re_status == RPC_SUCCESS) ++ cu->cu_error.re_status = RPC_CANTDECODERES; + } + if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { + xdrs->x_op = XDR_FREE; +diff --git a/src/clnt_vc.c b/src/clnt_vc.c +index 359063c..097cae8 100644 +--- a/src/clnt_vc.c ++++ b/src/clnt_vc.c +@@ -364,7 +364,7 @@ call_again: + if ((! XDR_PUTBYTES(xdrs, ct->ct_u.ct_mcallc, ct->ct_mpos)) || + (! XDR_PUTINT32(xdrs, (int32_t *)&proc)) || + (! AUTH_MARSHALL(cl->cl_auth, xdrs)) || +- (! (*xdr_args)(xdrs, args_ptr))) { ++ (! AUTH_WRAP(cl->cl_auth, xdrs, xdr_args, args_ptr))) { + if (ct->ct_error.re_status == RPC_SUCCESS) + ct->ct_error.re_status = RPC_CANTENCODEARGS; + (void)xdrrec_endofrecord(xdrs, TRUE); +@@ -420,7 +420,8 @@ call_again: + &reply_msg.acpted_rply.ar_verf)) { + ct->ct_error.re_status = RPC_AUTHERROR; + ct->ct_error.re_why = AUTH_INVALIDRESP; +- } else if (! (*xdr_results)(xdrs, results_ptr)) { ++ } else if (! AUTH_UNWRAP(cl->cl_auth, xdrs, ++ xdr_results, results_ptr)) { + if (ct->ct_error.re_status == RPC_SUCCESS) + ct->ct_error.re_status = RPC_CANTDECODERES; + } +diff --git a/src/svc.c b/src/svc.c +index b4a63d0..08cd6c9 100644 +--- a/src/svc.c ++++ b/src/svc.c +@@ -77,9 +77,6 @@ static struct svc_callout + + extern rwlock_t svc_lock; + extern rwlock_t svc_fd_lock; +-#ifdef HAVE_LIBGSSAPI +-extern struct svc_auth_ops svc_auth_gss_ops; +-#endif + + static struct svc_callout *svc_find (rpcprog_t, rpcvers_t, + struct svc_callout **, char *); +@@ -717,11 +714,9 @@ svc_getreq_common (fd) + SVC_DESTROY (xprt); + break; + } +- else if ((xprt->xp_auth != NULL) +-#ifdef HAVE_LIBGSSAPI +- && (xprt->xp_auth->svc_ah_ops != &svc_auth_gss_ops) +-#endif +- ) { ++ else if ((xprt->xp_auth != NULL) && ++ (xprt->xp_auth->svc_ah_private == NULL)) ++ { + xprt->xp_auth = NULL; + } + } +diff --git a/src/svc_auth.c b/src/svc_auth.c +index c6b3a0b..e80d5f9 100644 +--- a/src/svc_auth.c ++++ b/src/svc_auth.c +@@ -98,8 +98,8 @@ _authenticate(rqst, msg) + rqst->rq_xprt->xp_verf.oa_length = 0; + cred_flavor = rqst->rq_cred.oa_flavor; + switch (cred_flavor) { +- case AUTH_NULL: +- dummy = _svcauth_null(rqst, msg); ++ case AUTH_NONE: ++ dummy = _svcauth_none(rqst, msg); + return (dummy); + case AUTH_SYS: + dummy = _svcauth_unix(rqst, msg); +@@ -132,15 +132,6 @@ _authenticate(rqst, msg) + return (AUTH_REJECTEDCRED); + } + +-/*ARGSUSED*/ +-enum auth_stat +-_svcauth_null(rqst, msg) +- struct svc_req *rqst; +- struct rpc_msg *msg; +-{ +- return (AUTH_OK); +-} +- + /* + * Allow the rpc service to register new authentication types that it is + * prepared to handle. When an authentication flavor is registered, +diff --git a/src/svc_auth_unix.c b/src/svc_auth_unix.c +index ce83859..9585069 100644 +--- a/src/svc_auth_unix.c ++++ b/src/svc_auth_unix.c +@@ -43,6 +43,8 @@ + + #include <rpc/rpc.h> + ++extern SVCAUTH svc_auth_none; ++ + /* + * Unix longhand authenticator + */ +@@ -67,6 +69,8 @@ _svcauth_unix(rqst, msg) + assert(rqst != NULL); + assert(msg != NULL); + ++ rqst->rq_xprt->xp_auth = &svc_auth_none; ++ + area = (struct area *) rqst->rq_clntcred; + aup = &area->area_aup; + aup->aup_machname = area->area_machname; +@@ -142,5 +146,6 @@ _svcauth_short(rqst, msg) + struct svc_req *rqst; + struct rpc_msg *msg; + { ++ rqst->rq_xprt->xp_auth = &svc_auth_none; + return (AUTH_REJECTEDCRED); + } +diff --git a/src/svc_dg.c b/src/svc_dg.c +index 66a56ee..5ef9df2 100644 +--- a/src/svc_dg.c ++++ b/src/svc_dg.c +@@ -134,6 +134,7 @@ svc_dg_create(fd, sendsize, recvsize) + su->su_cache = NULL; + xprt->xp_fd = fd; + xprt->xp_p2 = su; ++ xprt->xp_auth = NULL; + xprt->xp_verf.oa_base = su->su_verfbody; + svc_dg_ops(xprt); + xprt->xp_rtaddr.maxlen = sizeof (struct sockaddr_storage); +@@ -234,10 +235,27 @@ svc_dg_reply(xprt, msg) + bool_t stat = FALSE; + size_t slen; + ++ xdrproc_t xdr_results; ++ caddr_t xdr_location; ++ bool_t has_args; ++ ++ if (msg->rm_reply.rp_stat == MSG_ACCEPTED && ++ msg->rm_reply.rp_acpt.ar_stat == SUCCESS) { ++ has_args = TRUE; ++ xdr_results = msg->acpted_rply.ar_results.proc; ++ xdr_location = msg->acpted_rply.ar_results.where; ++ ++ msg->acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; ++ msg->acpted_rply.ar_results.where = NULL; ++ } else ++ has_args = FALSE; ++ + xdrs->x_op = XDR_ENCODE; + XDR_SETPOS(xdrs, 0); + msg->rm_xid = su->su_xid; +- if (xdr_replymsg(xdrs, msg)) { ++ if (xdr_replymsg(xdrs, msg) && ++ (!has_args || ++ (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { + struct msghdr *msg = &su->su_msghdr; + struct iovec iov; + +@@ -264,7 +282,12 @@ svc_dg_getargs(xprt, xdr_args, args_ptr) + xdrproc_t xdr_args; + void *args_ptr; + { +- return (*xdr_args)(&(su_data(xprt)->su_xdrs), args_ptr); ++ if (! SVCAUTH_UNWRAP(xprt->xp_auth, &(su_data(xprt)->su_xdrs), ++ xdr_args, args_ptr)) { ++ (void)svc_freeargs(xprt, xdr_args, args_ptr); ++ return FALSE; ++ } ++ return TRUE; + } + + static bool_t +@@ -288,6 +311,10 @@ svc_dg_destroy(xprt) + xprt_unregister(xprt); + if (xprt->xp_fd != -1) + (void)close(xprt->xp_fd); ++ if (xprt->xp_auth != NULL) { ++ SVCAUTH_DESTROY(xprt->xp_auth); ++ xprt->xp_auth = NULL; ++ } + XDR_DESTROY(&(su->su_xdrs)); + (void) mem_free(rpc_buffer(xprt), su->su_iosz); + (void) mem_free(su, sizeof (*su)); +diff --git a/src/svc_vc.c b/src/svc_vc.c +index aaaf2d7..74632e2 100644 +--- a/src/svc_vc.c ++++ b/src/svc_vc.c +@@ -172,6 +172,7 @@ svc_vc_create(fd, sendsize, recvsize) + xprt->xp_p1 = r; + xprt->xp_p2 = NULL; + xprt->xp_p3 = NULL; ++ xprt->xp_auth = NULL; + xprt->xp_verf = _null_auth; + svc_vc_rendezvous_ops(xprt); + xprt->xp_port = (u_short)-1; /* It is the rendezvouser */ +@@ -283,6 +284,7 @@ makefd_xprt(fd, sendsize, recvsize) + xdrrec_create(&(cd->xdrs), sendsize, recvsize, + xprt, read_vc, write_vc); + xprt->xp_p1 = cd; ++ xprt->xp_auth = NULL; + xprt->xp_verf.oa_base = cd->verf_body; + svc_vc_ops(xprt); /* truely deals with calls */ + xprt->xp_port = 0; /* this is a connection, not a rendezvouser */ +@@ -412,6 +414,10 @@ __svc_vc_dodestroy(xprt) + XDR_DESTROY(&(cd->xdrs)); + mem_free(cd, sizeof(struct cf_conn)); + } ++ if (xprt->xp_auth != NULL) { ++ SVCAUTH_DESTROY(xprt->xp_auth); ++ xprt->xp_auth = NULL; ++ } + if (xprt->xp_rtaddr.buf) + mem_free(xprt->xp_rtaddr.buf, xprt->xp_rtaddr.maxlen); + if (xprt->xp_ltaddr.buf) +@@ -610,7 +616,11 @@ svc_vc_recv(xprt, msg) + } + + xdrs->x_op = XDR_DECODE; +- (void)xdrrec_skiprecord(xdrs); ++ /* ++ * No need skip records with nonblocking connections ++ */ ++ if (cd->nonblock == FALSE) ++ (void)xdrrec_skiprecord(xdrs); + if (xdr_callmsg(xdrs, msg)) { + cd->x_id = msg->rm_xid; + return (TRUE); +@@ -628,8 +638,13 @@ svc_vc_getargs(xprt, xdr_args, args_ptr) + + assert(xprt != NULL); + /* args_ptr may be NULL */ +- return ((*xdr_args)(&(((struct cf_conn *)(xprt->xp_p1))->xdrs), +- args_ptr)); ++ ++ if (! SVCAUTH_UNWRAP(xprt->xp_auth, ++ &(((struct cf_conn *)(xprt->xp_p1))->xdrs), ++ xdr_args, args_ptr)) { ++ return FALSE; ++ } ++ return TRUE; + } + + static bool_t +@@ -658,15 +673,35 @@ svc_vc_reply(xprt, msg) + XDR *xdrs; + bool_t rstat; + ++ xdrproc_t xdr_results; ++ caddr_t xdr_location; ++ bool_t has_args; ++ + assert(xprt != NULL); + assert(msg != NULL); + + cd = (struct cf_conn *)(xprt->xp_p1); + xdrs = &(cd->xdrs); + ++ if (msg->rm_reply.rp_stat == MSG_ACCEPTED && ++ msg->rm_reply.rp_acpt.ar_stat == SUCCESS) { ++ has_args = TRUE; ++ xdr_results = msg->acpted_rply.ar_results.proc; ++ xdr_location = msg->acpted_rply.ar_results.where; ++ ++ msg->acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; ++ msg->acpted_rply.ar_results.where = NULL; ++ } else ++ has_args = FALSE; ++ + xdrs->x_op = XDR_ENCODE; + msg->rm_xid = cd->x_id; +- rstat = xdr_replymsg(xdrs, msg); ++ rstat = FALSE; ++ if (xdr_replymsg(xdrs, msg) && ++ (!has_args || ++ (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { ++ rstat = TRUE; ++ } + (void)xdrrec_endofrecord(xdrs, TRUE); + return (rstat); + } +diff --git a/src/xdr_rec.c b/src/xdr_rec.c +index 4e815d7..2aca623 100644 +--- a/src/xdr_rec.c ++++ b/src/xdr_rec.c +@@ -64,7 +64,6 @@ + #include <rpc/clnt.h> + #include <stddef.h> + #include "rpc_com.h" +-#include <unistd.h> + static bool_t xdrrec_getlong(XDR *, long *); + static bool_t xdrrec_putlong(XDR *, const long *); + static bool_t xdrrec_getbytes(XDR *, char *, u_int); +@@ -330,22 +329,22 @@ xdrrec_getpos(xdrs) + RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private; + off_t pos; + +- pos = lseek((int)(u_long)rstrm->tcp_handle, (off_t)0, 1); +- if (pos != -1) +- switch (xdrs->x_op) { ++ switch (xdrs->x_op) { + +- case XDR_ENCODE: +- pos += rstrm->out_finger - rstrm->out_base; +- break; ++ case XDR_ENCODE: ++ pos = rstrm->out_finger - rstrm->out_base ++ - BYTES_PER_XDR_UNIT; ++ break; + +- case XDR_DECODE: +- pos -= rstrm->in_boundry - rstrm->in_finger; +- break; ++ case XDR_DECODE: ++ pos = rstrm->in_boundry - rstrm->in_finger ++ - BYTES_PER_XDR_UNIT; ++ break; + +- default: +- pos = (off_t) -1; +- break; +- } ++ default: ++ pos = (off_t) -1; ++ break; ++ } + return ((u_int) pos); + } + +diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h +index 734e6b9..5f66e67 100644 +--- a/tirpc/rpc/auth.h ++++ b/tirpc/rpc/auth.h +@@ -203,8 +203,22 @@ typedef struct __auth { + + } *ah_ops; + void *ah_private; ++ int ah_refcnt; + } AUTH; + ++static __inline int ++auth_get(AUTH *auth) ++{ ++ return __sync_add_and_fetch(&auth->ah_refcnt, 1); ++} ++ ++static __inline int ++auth_put(AUTH *auth) ++{ ++ return __sync_sub_and_fetch(&auth->ah_refcnt, 1); ++} ++ ++ + + /* + * Authentication ops. +@@ -234,10 +248,23 @@ typedef struct __auth { + #define auth_refresh(auth, msg) \ + ((*((auth)->ah_ops->ah_refresh))(auth, msg)) + +-#define AUTH_DESTROY(auth) \ +- ((*((auth)->ah_ops->ah_destroy))(auth)) +-#define auth_destroy(auth) \ +- ((*((auth)->ah_ops->ah_destroy))(auth)) ++#define AUTH_DESTROY(auth) \ ++ do { \ ++ int refs; \ ++ if ((refs = auth_put((auth))) == 0) \ ++ ((*((auth)->ah_ops->ah_destroy))(auth));\ ++ log_debug("%s: auth_put(), refs %d\n", \ ++ __func__, refs); \ ++ } while (0) ++ ++#define auth_destroy(auth) \ ++ do { \ ++ int refs; \ ++ if ((refs = auth_put((auth))) == 0) \ ++ ((*((auth)->ah_ops->ah_destroy))(auth));\ ++ log_debug("%s: auth_put(), refs %d\n", \ ++ __func__, refs); \ ++ } while (0) + + #define AUTH_WRAP(auth, xdrs, xfunc, xwhere) \ + ((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \ +@@ -373,7 +400,7 @@ __END_DECLS + __BEGIN_DECLS + struct svc_req; + struct rpc_msg; +-enum auth_stat _svcauth_null (struct svc_req *, struct rpc_msg *); ++enum auth_stat _svcauth_none (struct svc_req *, struct rpc_msg *); + enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *); + enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *); + __END_DECLS +diff --git a/tirpc/rpc/des.h b/tirpc/rpc/des.h +index e3d6897..d2881ad 100644 +--- a/tirpc/rpc/des.h ++++ b/tirpc/rpc/des.h +@@ -33,6 +33,9 @@ + * Copyright (c) 1986 by Sun Microsystems, Inc. + */ + ++#ifndef _RPC_DES_H_ ++#define _RPC_DES_H_ ++ + #define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */ + #define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */ + +@@ -80,3 +83,5 @@ struct desparams { + * Software DES. + */ + extern int _des_crypt( char *, int, struct desparams * ); ++ ++#endif +diff --git a/tirpc/rpc/svc_auth.h b/tirpc/rpc/svc_auth.h +index 659e90c..14269d1 100644 +--- a/tirpc/rpc/svc_auth.h ++++ b/tirpc/rpc/svc_auth.h +@@ -44,17 +44,23 @@ + /* + * Interface to server-side authentication flavors. + */ +-typedef struct { ++typedef struct SVCAUTH { + struct svc_auth_ops { +- int (*svc_ah_wrap)(void); +- int (*svc_ah_unwrap)(void); +- int (*svc_ah_destroy)(void); ++ int (*svc_ah_wrap)(struct SVCAUTH *, XDR *, xdrproc_t, ++ caddr_t); ++ int (*svc_ah_unwrap)(struct SVCAUTH *, XDR *, xdrproc_t, ++ caddr_t); ++ int (*svc_ah_destroy)(struct SVCAUTH *); + } *svc_ah_ops; + caddr_t svc_ah_private; + } SVCAUTH; + +-#define SVCAUTH_DESTROY(cred) ((*(cred)->svc_ah_ops->svc_ah_destroy)()) +-#define svcauth_destroy(cred) ((*(cred)->svc_ah_ops->svc_ah_destroy)()) ++#define SVCAUTH_WRAP(auth, xdrs, xfunc, xwhere) \ ++ ((*((auth)->svc_ah_ops->svc_ah_wrap))(auth, xdrs, xfunc, xwhere)) ++#define SVCAUTH_UNWRAP(auth, xdrs, xfunc, xwhere) \ ++ ((*((auth)->svc_ah_ops->svc_ah_unwrap))(auth, xdrs, xfunc, xwhere)) ++#define SVCAUTH_DESTROY(auth) \ ++ ((*((auth)->svc_ah_ops->svc_ah_destroy))(auth)) + + /* + * Server side authenticator diff --git a/core/libtirpc/libtirpc-fix-segfault-0.2.2.patch b/core/libtirpc/libtirpc-fix-segfault-0.2.2.patch new file mode 100644 index 000000000..8a04c16de --- /dev/null +++ b/core/libtirpc/libtirpc-fix-segfault-0.2.2.patch @@ -0,0 +1,28 @@ +diff -up libtirpc-0.2.2/src/svc_dg.c.orig libtirpc-0.2.2/src/svc_dg.c +--- libtirpc-0.2.2/src/svc_dg.c.orig 2011-07-19 15:02:41.087631000 -0400 ++++ libtirpc-0.2.2/src/svc_dg.c 2011-07-19 15:04:43.154243000 -0400 +@@ -254,8 +254,8 @@ svc_dg_reply(xprt, msg) + XDR_SETPOS(xdrs, 0); + msg->rm_xid = su->su_xid; + if (xdr_replymsg(xdrs, msg) && +- (!has_args || +- (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { ++ (!has_args || (xprt->xp_auth && ++ SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { + struct msghdr *msg = &su->su_msghdr; + struct iovec iov; + +diff -up libtirpc-0.2.2/src/svc_vc.c.orig libtirpc-0.2.2/src/svc_vc.c +--- libtirpc-0.2.2/src/svc_vc.c.orig 2011-07-19 15:05:28.577588000 -0400 ++++ libtirpc-0.2.2/src/svc_vc.c 2011-07-19 15:05:40.058928000 -0400 +@@ -698,8 +698,8 @@ svc_vc_reply(xprt, msg) + msg->rm_xid = cd->x_id; + rstat = FALSE; + if (xdr_replymsg(xdrs, msg) && +- (!has_args || +- (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { ++ (!has_args || (xprt->xp_auth && ++ SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { + rstat = TRUE; + } + (void)xdrrec_endofrecord(xdrs, TRUE); diff --git a/core/mdadm/PKGBUILD b/core/mdadm/PKGBUILD index 581422507..6bd73e08b 100644 --- a/core/mdadm/PKGBUILD +++ b/core/mdadm/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 129978 2011-06-30 18:05:23Z thomas $ +# $Id: PKGBUILD 134363 2011-08-03 06:56:40Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Judd Vinet <jvinet@zeroflux.org> pkgname=mdadm pkgver=3.2.2 -pkgrel=2 +pkgrel=3 pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID" arch=(i686 x86_64 'mips64el') license=('GPL') @@ -17,7 +17,8 @@ source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2 mdadm.conf mdadm_install mdadm_hook - disable-werror.patch) + disable-werror.patch + linux-3.0.patch) install=mdadm.install replaces=('raidtools') md5sums=('12ee2fbf3beddb60601fb7a4c4905651' @@ -25,12 +26,14 @@ md5sums=('12ee2fbf3beddb60601fb7a4c4905651' '00cbed931db4f15b6ce49e3e7d433966' '4bb000166fb13e82ceaa2422fdfaac7e' '36f7cc564ed3267888d90208e0eb7adc' - '4ad87b74a4bc9a34621280abe0e0c3e4') + '4ad87b74a4bc9a34621280abe0e0c3e4' + 'c499b3edbf2c400c8a1984e18c7ce7fa') build() { cd $srcdir/$pkgname-$pkgver patch -Np0 -i ../disable-werror.patch - make CXFLAGS="$CFLAGS" + patch -Np1 -i ../linux-3.0.patch + make CXiFLAGS="$CFLAGS" } package() { diff --git a/core/mdadm/linux-3.0.patch b/core/mdadm/linux-3.0.patch new file mode 100644 index 000000000..cd9d5473c --- /dev/null +++ b/core/mdadm/linux-3.0.patch @@ -0,0 +1,45 @@ +From f161d047eed634b3380262767f955eb888502e88 Mon Sep 17 00:00:00 2001 +From: NeilBrown <neilb@suse.de> +Date: Fri, 17 Jun 2011 22:49:24 +1000 +Subject: [PATCH 1/1] util: correctly parse shorter linux version numbers. + +The next version of Linux might be 3.0. If it is, get_linux_version +will fail. +So make it more robust. + +Reported-by: Namhyung Kim <namhyung@gmail.com> +Reported-by: Milan Broz <mbroz@redhat.com> +Signed-off-by: NeilBrown <neilb@suse.de> +--- + util.c | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/util.c b/util.c +index 10bbe56..55d171a 100644 +--- a/util.c ++++ b/util.c +@@ -146,16 +146,16 @@ int get_linux_version() + { + struct utsname name; + char *cp; +- int a,b,c; ++ int a = 0, b = 0,c = 0; + if (uname(&name) <0) + return -1; + + cp = name.release; + a = strtoul(cp, &cp, 10); +- if (*cp != '.') return -1; +- b = strtoul(cp+1, &cp, 10); +- if (*cp != '.') return -1; +- c = strtoul(cp+1, NULL, 10); ++ if (*cp == '.') ++ b = strtoul(cp+1, &cp, 10); ++ if (*cp == '.') ++ c = strtoul(cp+1, &cp, 10); + + return (a*1000000)+(b*1000)+c; + } +-- +1.7.2.3 + diff --git a/core/nfs-utils/PKGBUILD b/core/nfs-utils/PKGBUILD index 7545884c9..00db67256 100644 --- a/core/nfs-utils/PKGBUILD +++ b/core/nfs-utils/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 131837 2011-07-16 00:22:48Z dreisner $ +# $Id: PKGBUILD 134117 2011-08-01 17:55:07Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Contributor: John Proctor <jproctor@prium.net> # Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org> @@ -6,8 +6,8 @@ # Contributor: Marco Lima <cipparello gmail com> pkgname=nfs-utils -pkgver=1.2.3 -pkgrel=3 +pkgver=1.2.4 +pkgrel=2 pkgdesc="Support programs for Network File Systems" arch=('i686' 'x86_64' 'mips64el') url='http://nfs.sourceforge.net' @@ -24,9 +24,10 @@ source=(http://downloads.sourceforge.net/project/nfs/${pkgname}/${pkgver}/${pkgn idmapd.conf start-statd.patch nfs-utils-1.1.4-mtab-sym.patch - nfs-utils-1.1.4-no-exec.patch) + nfs-utils-1.1.4-no-exec.patch + kernel-3.0-segfault.patch) install=nfs-utils.install -md5sums=('1131dc5f27c4f3905a6e7ee0d594fd4d' +md5sums=('938dc0574f3eb9891a8ed4746f806277' 'fc508e10cdf5e8ddd80373b1b2bc99a1' 'f73f197a16b02c3e248488ec35c4cf43' '5ae080f6117cef3140f02bc162bdc755' @@ -35,13 +36,14 @@ md5sums=('1131dc5f27c4f3905a6e7ee0d594fd4d' 'eb4f4027fab6fc1201f1ca04f5954c76' 'e24f81a8c8657672e262c61235d34b4a' '7674106eaaa4c149bccd4f05fe3604e9' - '4f4827dfc93008dfadd0a530ad0872b2') + '4f4827dfc93008dfadd0a530ad0872b2' + 'ab92e67f3d0ee2935faab9cdabef8003') build() { cd $srcdir/${pkgname}-${pkgver} patch -Np1 -i ../nfs-utils-1.1.4-mtab-sym.patch - patch -Np1 -i ../nfs-utils-1.1.4-no-exec.patch - + #patch -Np1 -i ../nfs-utils-1.1.4-no-exec.patch + patch -Np1 -i ../kernel-3.0-segfault.patch # arch specific patch patch -Np0 -i $srcdir/start-statd.patch @@ -67,6 +69,7 @@ package() { install -D -m 644 ../nfs-common.conf "$pkgdir/"etc/conf.d/nfs-common.conf install -D -m 644 ../nfs-server.conf "$pkgdir/"etc/conf.d/nfs-server.conf # directories + mkdir "$pkgdir/"etc/exports.d mkdir "$pkgdir/"var/lib/nfs/rpc_pipefs mkdir "$pkgdir/"var/lib/nfs/v4recovery } diff --git a/core/nfs-utils/kernel-3.0-segfault.patch b/core/nfs-utils/kernel-3.0-segfault.patch new file mode 100644 index 000000000..3dba94a05 --- /dev/null +++ b/core/nfs-utils/kernel-3.0-segfault.patch @@ -0,0 +1,53 @@ +mount.nfs segfaults if kernel version number does not contain +at least 3 components delimited with a dot. + +Avoid this by matching up to three unsigned integers inialised +to zero, separated by dots. + +A version that does not start with an integer is probably a future +version where the versioning evolved to another scheme. +Return UINT_MAX which is guaranteed to be higher than existing +versions. This would also make it possible to easily identify +versions that do not start with an integer. + +Signed-off-by: Luk Claes <luk@...> +--- + utils/mount/version.h | 16 +++++++++------- + 1 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/utils/mount/version.h b/utils/mount/version.h +index af61a6f..531cf68 100644 +--- a/utils/mount/version.h ++++ b/utils/mount/version.h +@@ -23,8 +23,8 @@ + #ifndef _NFS_UTILS_MOUNT_VERSION_H + #define _NFS_UTILS_MOUNT_VERSION_H + +-#include <stdlib.h> +-#include <string.h> ++#include <stdio.h> ++#include <limits.h> + + #include <sys/utsname.h> + +@@ -37,14 +37,16 @@ static inline unsigned int MAKE_VERSION(unsigned int p, unsigned int q, + static inline unsigned int linux_version_code(void) + { + struct utsname my_utsname; +- unsigned int p, q, r; ++ unsigned int p, q = 0, r = 0; + ++ /* UINT_MAX as backward compatibility code should not be run */ + if (uname(&my_utsname)) +- return 0; ++ return UINT_MAX; + +- p = (unsigned int)atoi(strtok(my_utsname.release, ".")); +- q = (unsigned int)atoi(strtok(NULL, ".")); +- r = (unsigned int)atoi(strtok(NULL, ".")); ++ /* UINT_MAX as future versions might not start with an integer */ ++ if (sscanf(my_utsname.release, "%u.%u.%u", &p, &q, &r) < 1) ++ return UINT_MAX; ++ + return MAKE_VERSION(p, q, r); + } diff --git a/core/pam/PKGBUILD b/core/pam/PKGBUILD index 49b0d68d0..6b9a7f5b9 100644 --- a/core/pam/PKGBUILD +++ b/core/pam/PKGBUILD @@ -1,22 +1,22 @@ -# $Id: PKGBUILD 127852 2011-06-18 20:12:05Z stephane $ +# $Id: PKGBUILD 134648 2011-08-07 10:12:55Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Contributor: judd <jvinet@zeroflux.org> pkgname=pam -pkgver=1.1.3 -pkgrel=2 +pkgver=1.1.4 +pkgrel=1 pkgdesc="PAM (Pluggable Authentication Modules) library" arch=('i686' 'x86_64' 'mips64el') license=('GPL2') url="http://www.kernel.org/pub/linux/libs/pam/" -depends=('glibc' 'db' 'cracklib') -makedepends=('flex' 'docbook-xml>=4.4' 'docbook-xsl') +depends=('glibc' 'db' 'cracklib' 'libtirpc') +makedepends=('flex' 'w3m' 'docbook-xml>=4.4' 'docbook-xsl') backup=(etc/security/{access.conf,group.conf,limits.conf,namespace.conf,namespace.init,pam_env.conf,time.conf} etc/pam.d/other etc/default/passwd etc/environment) source=(http://www.kernel.org/pub/linux/libs/pam/library/Linux-PAM-$pkgver.tar.bz2 ftp://ftp.suse.com/pub/people/kukuk/pam/pam_unix2/pam_unix2-2.6.tar.bz2 other) options=('!libtool' '!emptydirs') -md5sums=('6db7fcb5db6253350e3a4648ceac40e7' +md5sums=('e9af5fb27bb22edb55d077e2888b3ebc' 'e2788389a6c59224110a45fcff30e02b' '6e6c8719e5989d976a14610f340bd33a') diff --git a/core/pcmciautils/60-pcmcia.rules b/core/pcmciautils/60-pcmcia.rules deleted file mode 100644 index aa3c1a2d3..000000000 --- a/core/pcmciautils/60-pcmcia.rules +++ /dev/null @@ -1,30 +0,0 @@ -# PCMCIA devices: -# -ACTION!="add", GOTO="pcmciautils_end" -# modprobe $env{MODALIAS} loads all possibly appropriate modules -SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \ - RUN+="/lib/udev/load-modules.sh $env{MODALIAS}" - -# Very few CIS firmware entries (which we use for matching) -# are so broken that we need to read out random bytes of it -# instead of the manufactor, card or product ID. Then the -# matching is done in userspace. -SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \ - RUN+="/lib/udev/pcmcia-check-broken-cis" - -# However, the "weak" matching by func_id is only allowed _after_ modprobe -# returns, so that "strong" matches have a higher priority. -SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", ATTR{allow_func_id_match}="1" - -# PCMCIA sockets: -# -# modprobe the pcmcia bus module so that 16-bit PCMCIA devices work -SUBSYSTEM=="pcmcia_socket", \ - RUN+="/lib/udev/load-modules.sh pcmcia" - -# if this is a PCMCIA socket which needs a resource database, -# pcmcia-socket-startup sets it up -SUBSYSTEM=="pcmcia_socket", \ - RUN+="/lib/udev/pcmcia-socket-startup" - -LABEL="pcmciautils_end" diff --git a/core/pcmciautils/PKGBUILD b/core/pcmciautils/PKGBUILD index 319a0ae16..6c165e745 100644 --- a/core/pcmciautils/PKGBUILD +++ b/core/pcmciautils/PKGBUILD @@ -1,20 +1,18 @@ -# $Id: PKGBUILD 113400 2011-03-08 14:24:47Z stephane $ +# $Id: PKGBUILD 134400 2011-08-03 16:55:02Z tomegun $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> pkgname=pcmciautils -pkgver=017 -pkgrel=2 +pkgver=018 +pkgrel=1 pkgdesc="Utilities for inserting and removing PCMCIA cards" arch=(i686 x86_64 'mips64el') url="http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html" license=('GPL') groups=('base') -depends=('glibc' 'sysfsutils' 'module-init-tools>=3.2pre9') +# sysfsutils will not be required in the next release +depends=('udev' 'sysfsutils') conflicts=('pcmcia-cs') -source=(http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmciautils-${pkgver}.tar.bz2 - 60-pcmcia.rules) +source=(http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmciautils-${pkgver}.tar.bz2) options=(!makeflags) -md5sums=('5245af28eeba57ec0606a874d44d10f7' - 'f88ac464ab9c75fe1565af551e6553a2') build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -25,8 +23,5 @@ build() { package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install - # fix lspcmcia symlink - ln -sf pccardctl "${pkgdir}"/sbin/lspcmcia - # add fixed rules file - install -D -m644 "${srcdir}"/60-pcmcia.rules "${pkgdir}"/lib/udev/rules.d/ } +md5sums=('5d85669b3440baa4532363da6caaf1b4') diff --git a/core/udev/81-arch.rules b/core/udev/81-arch.rules index cd4e3e9b4..71f1a883b 100644 --- a/core/udev/81-arch.rules +++ b/core/udev/81-arch.rules @@ -26,8 +26,7 @@ KERNEL=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0660" SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", GROUP="optical" # permissions for SCSI CD devices -SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", SYMLINK+="scd%n", GROUP="optical" -SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", GROUP="optical" +SUBSYSTEMS=="scsi", KERNEL=="s[rg][0-9]*", ATTRS{type}=="5", GROUP="optical" # permissions for removable devices like cardreaders or sticks KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="0", GROUP="storage" @@ -61,23 +60,12 @@ KERNEL=="radio[0-9]*", GROUP="video" KERNEL=="video0", SYMLINK+="video" KERNEL=="vtx0", SYMLINK+="vtx" -# video devices -### xorg resets those permissions, adjust your xorg.conf! -KERNEL=="3dfx*", GROUP="video" -KERNEL=="fb[0-9]*", GROUP="video" - # misc KERNEL=="sgi_fetchop", MODE="0666" KERNEL=="sonypi", MODE="0666" # USB devices KERNEL=="legousbtower*", MODE="0666" - -# kbd devices -KERNEL=="kbd", MODE="0664" - -# miscellaneous -KERNEL=="rtc|rtc0", GROUP="audio", MODE="0664" ####################################### # Permissions and Symlinks - end ####################################### diff --git a/core/udev/PKGBUILD b/core/udev/PKGBUILD index 474fceb5b..f959e9b3c 100644 --- a/core/udev/PKGBUILD +++ b/core/udev/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 126202 2011-06-02 14:49:12Z tomegun $ +# $Id: PKGBUILD 134147 2011-08-02 11:38:00Z tomegun $ # Maintainer: Aaron Griffin <aaron@archlinux.org> # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Maintainer: Thomas Bächler <thomas@archlinux.org> @@ -6,8 +6,8 @@ pkgbase="udev" pkgname=('udev' 'udev-compat') -pkgver=171 -pkgrel=2 +pkgver=173 +pkgrel=3 arch=(i686 x86_64 mips64el) url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" license=('GPL') @@ -16,25 +16,26 @@ groups=('base') options=(!makeflags !libtool) makedepends=('glibc' 'coreutils' 'util-linux' 'pciutils' 'libusb-compat' 'glib2' 'kernel26' 'gperf' 'libxslt' 'gobject-introspection') source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.bz2 - 81-arch.rules - static-audio-nodes-group.patch - static-nodes-permissions.patch) + bluetooth.patch + 81-arch.rules) build() { cd $srcdir/$pkgbase-$pkgver - # fix https://bugs.archlinux.org/task/24362 (will be in udev-172) - patch -Np1 -i ../static-audio-nodes-group.patch - patch -Np1 -i ../static-nodes-permissions.patch + # fix https://bugs.archlinux.org/task/25356 (submitted upstream) + patch -Np1 -i ../bluetooth.patch if [ "$CARCH" = "mips64el" ]; then msg "Remove -Wl,--gc-sections" - sed -i "753d" Makefile - sed -i "753d" Makefile.in + sed -i "/--gc-sections/d" Makefile.* fi - ./configure --sysconfdir=/etc --with-rootlibdir=/lib --libexecdir=/lib/udev\ - --sbindir=/sbin --with-systemdsystemunitdir=/lib/systemd/system\ - --disable-rule-generator + ./configure --sysconfdir=/etc\ + --with-rootlibdir=/lib\ + --libexecdir=/lib/udev\ + --sbindir=/sbin\ + --with-systemdsystemunitdir=/lib/systemd/system\ + --disable-rule-generator\ + --enable-udev_acl make } @@ -43,8 +44,7 @@ package_udev() { depends=('glibc' 'coreutils' 'util-linux' 'libusb-compat' 'glib2' 'module-init-tools>=3.11' 'pciutils') install=udev.install - backup=(etc/udev/udev.conf - etc/modprobe.d/framebuffer_blacklist.conf) + backup=(etc/udev/udev.conf) conflicts=('pcmcia-cs' 'hotplug' 'initscripts<2009.07') replaces=('devfsd') @@ -54,14 +54,33 @@ package_udev() { install -D -m644 $srcdir/81-arch.rules $pkgdir/lib/udev/rules.d/81-arch.rules # create framebuffer blacklist - mkdir -p $pkgdir/etc/modprobe.d/ + mkdir -p $pkgdir/lib/modprobe.d/ for mod in $(find /lib/modules/*/kernel/drivers/video -name '*fb.ko.gz' -exec basename {} .ko.gz \;); do echo "blacklist $mod" - done | sort -u > $pkgdir/etc/modprobe.d/framebuffer_blacklist.conf + done | sort -u > $pkgdir/lib/modprobe.d/framebuffer_blacklist.conf + # these static devices are created for convenience, to autoload the modules if necessary + # /dev/loop0 + mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0 + chgrp disk ${pkgdir}/lib/udev/devices/loop0 + + # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group + for i in $pkgdir/lib/udev/rules.d/*.rules; do + sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g; + s#GROUP="tape"#GROUP="storage"#g; + s#GROUP="cdrom"#GROUP="optical"#g' $i + done +} + +package_udev-compat() { + pkgdesc="The userspace dev tools (udev) - additional rules for older kernels" + depends=('udev') + groups=('') + cd $srcdir/$pkgbase-$pkgver + install -d -m755 ${pkgdir}/lib/${pkgbase}/rules.d + install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules # create static devices in /lib/udev/devices/ - mkdir ${pkgdir}/lib/udev/devices/pts - mkdir ${pkgdir}/lib/udev/devices/shm + mkdir -p ${pkgdir}/lib/udev/devices/{pts,shm} mknod -m 0600 ${pkgdir}/lib/udev/devices/console c 5 1 mknod -m 0666 ${pkgdir}/lib/udev/devices/null c 1 3 @@ -75,9 +94,6 @@ package_udev() { ln -snf /proc/kcore ${pkgdir}/lib/udev/devices/core # these static devices are created for convenience, to autoload the modules if necessary - # /dev/loop0 - mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0 - chgrp disk ${pkgdir}/lib/udev/devices/loop0 # /dev/net/tun mkdir ${pkgdir}/lib/udev/devices/net mknod -m 0666 ${pkgdir}/lib/udev/devices/net/tun c 10 200 @@ -85,24 +101,7 @@ package_udev() { mknod -m 0666 ${pkgdir}/lib/udev/devices/fuse c 10 229 # /dev/ppp mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0 - - # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group - for i in $pkgdir/lib/udev/rules.d/*.rules; do - sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g; - s#GROUP="tape"#GROUP="storage"#g; - s#GROUP="cdrom"#GROUP="optical"#g' $i - done -} - -package_udev-compat() { - pkgdesc="The userspace dev tools (udev) - additional rules for older kernels" - depends=('udev') - groups=('') - cd $srcdir/$pkgbase-$pkgver - install -d -m755 ${pkgdir}/lib/${pkgbase}/rules.d - install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules } -md5sums=('bdf4617284be2ecac11767437417e209' - '6ee44e3feb8e0f037947e7d4ca273f12' - '4f625aea95a5597afd8cdf189421f193' - 'f9e50b8dfcd2215f5423ff9bc04ecf68') +md5sums=('91a88a359b60bbd074b024883cc0dbde' + '36cb9bfb55a8d931b7498d2e46730745' + 'ec529eb1ddaabb70c61b38f80bb8462a') diff --git a/core/udev/bluetooth.patch b/core/udev/bluetooth.patch new file mode 100644 index 000000000..96f5d6901 --- /dev/null +++ b/core/udev/bluetooth.patch @@ -0,0 +1,36 @@ +From 7462d61442f606cc118722e0572ac8db48fa2540 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org> +Date: Tue, 2 Aug 2011 10:56:33 +0200 +Subject: [PATCH] rules: input - fix detection of bluetooth hid devices in + Xorg + +Commit c49df20758e0f22778cfc93b598f2929f4c86272 prevented udev from +creating broken symlinks for bluetooth hid devices. Unfortunately, +it also removed the ID_INPUT=1 and ID_INPUT_{KEY,MOUSE}=1 properties +from those devices. Xorg relies on these properties for cold- and +hotplugging of input devices. + +With this patch, udev still omits the broken symlinks, but also +imports the input_id properties again. +--- + rules/rules.d/60-persistent-input.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/60-persistent-input.rules b/rules/rules.d/60-persistent-input.rules +index 65a6381..28d50d2 100644 +--- a/rules/rules.d/60-persistent-input.rules ++++ b/rules/rules.d/60-persistent-input.rules +@@ -2,9 +2,9 @@ + + ACTION=="remove", GOTO="persistent_input_end" + SUBSYSTEM!="input", GOTO="persistent_input_end" +-SUBSYSTEMS=="bluetooth", GOTO="persistent_input_end" + + ENV{ID_INPUT}=="", IMPORT{program}="input_id %p" ++SUBSYSTEMS=="bluetooth", GOTO="persistent_input_end" + SUBSYSTEMS=="usb", ENV{ID_BUS}=="", IMPORT{program}="usb_id --export %p" + + # determine class name for persistent symlinks +-- +1.7.6 + diff --git a/core/udev/static-audio-nodes-group.patch b/core/udev/static-audio-nodes-group.patch deleted file mode 100644 index b1fc4f935..000000000 --- a/core/udev/static-audio-nodes-group.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3e227830ad6494700e18ae03297e8fb833ff26bf Mon Sep 17 00:00:00 2001 -From: Kay Sievers <kay.sievers@vrfy.org> -Date: Fri, 27 May 2011 02:50:29 +0200 -Subject: [PATCH] rules: apply 'audio' group of the static snd/{seq,timer} - nodes - ---- - rules/rules.d/50-udev-default.rules | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules -index cd745ef..cacb533 100644 ---- a/rules/rules.d/50-udev-default.rules -+++ b/rules/rules.d/50-udev-default.rules -@@ -38,7 +38,8 @@ SUBSYSTEM=="graphics", GROUP="video" - SUBSYSTEM=="drm", GROUP="video" - - # sound --SUBSYSTEM=="sound", GROUP="audio" -+SUBSYSTEM=="sound", GROUP="audio", \ -+ OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer" - - # DVB (video) - SUBSYSTEM=="dvb", GROUP="video" --- -1.7.5.3 - diff --git a/core/udev/static-nodes-permissions.patch b/core/udev/static-nodes-permissions.patch deleted file mode 100644 index 51e6ad6bc..000000000 --- a/core/udev/static-nodes-permissions.patch +++ /dev/null @@ -1,57 +0,0 @@ -From c112873b5bc9ebbae39c32f502bc6211f33546cc Mon Sep 17 00:00:00 2001 -From: Kay Sievers <kay.sievers@vrfy.org> -Date: Mon, 30 May 2011 02:12:02 +0200 -Subject: [PATCH 1/2] rules: static_node - use 0660 if group is given to get - the cigar - ->> On Tue, May 24, 2011 at 15:33, Tom Gundersen <teg@jklm.no> wrote: -> -> Close, but no cigar. Looks like the static nodes are not assigned -> permissions 0660 even if a gid is set (the nodes have perms 0600). -> -> Cheers, -> -> Tom ---- - udev/udev-rules.c | 10 ++++++++-- - 1 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 48395e7..56a258d 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -2709,8 +2709,9 @@ void udev_rules_apply_static_dev_perms(struct udev_rules *rules) - case TK_A_STATIC_NODE: { - char filename[UTIL_PATH_SIZE]; - struct stat stats; -+ - /* we assure, that the permissions tokens are sorted before the static token */ -- if (mode == 0 && uid == 0 && gid == 0) -+ if (uid == 0 && gid == 0) - goto next; - util_strscpyl(filename, sizeof(filename), udev_get_dev_path(rules->udev), "/", - &rules->buf[cur->key.value_off], NULL); -@@ -2718,14 +2719,19 @@ void udev_rules_apply_static_dev_perms(struct udev_rules *rules) - goto next; - if (!S_ISBLK(stats.st_mode) && !S_ISCHR(stats.st_mode)) - goto next; -- if (mode != 0 && mode != (stats.st_mode & 0777)) { -+ -+ if (mode == 0 && gid > 0) -+ mode = 0660; -+ if (mode != (stats.st_mode & 0777)) { - chmod(filename, mode); - info(rules->udev, "chmod '%s' %#o\n", filename, mode); - } -+ - if ((uid != 0 && uid != stats.st_uid) || (gid != 0 && gid != stats.st_gid)) { - chown(filename, uid, gid); - info(rules->udev, "chown '%s' %u %u\n", filename, uid, gid); - } -+ - utimensat(AT_FDCWD, filename, NULL, 0); - break; - } --- -1.7.5.2 - diff --git a/core/udev/udev.install b/core/udev/udev.install index 5c02dd15b..272ab60c0 100644 --- a/core/udev/udev.install +++ b/core/udev/udev.install @@ -2,40 +2,47 @@ # arg 2: the old package version post_upgrade() { - if [ "$(vercmp $2 100)" -lt 0 ]; then - echo "ATTENTION UDEV:" - echo "----------" - echo "udev >=098 rules syntax has changed, please update your own rules." - echo "udev >=099 Added persistent network and CD/DVD Symlink generator rules." - echo "Please read the instructions carefully before reboot." - echo "They are located in /etc/udev/readme-udev-arch.txt" - echo "----------" - fi - if [ "$(vercmp $2 169)" -lt 0 ]; then - echo "ATTENTION UDEV:" - echo "---------------" - echo "Kernel 2.6.32 or newer is now required." - echo "OSS emulation modules are not loaded by default, add to rc.conf if needed." - echo "Arch specific cd symlinks are now no longer created." - echo "cd and net persistent rules will no longer be autogenerated," - echo "see <https://wiki.archlinux.org/index.php/Udev> for details." - echo "Errors are now logged (possibly to the console) by default." - echo "---------------" - fi if [ "$(vercmp $2 172)" -lt 0 ]; then echo "ATTENTION UDEV:" - echo "---------------" - echo "Arch's custom blacklisting logic has been removed. MOD_AUTOLOAD and" - echo "blacklisting in MODULES no longer works." - echo "See 'man modprobe.conf' for a replacement to blacklisting." - echo "To disable a module mod1 on the kernel command line, use" - echo "mod1.disable=1" - echo "or" - echo "modprobe.blacklist=mod1" + echo "----------" + if [ "$(vercmp $2 168)" -lt 0 ]; then + echo "Kernel 2.6.32 or newer is now required." + echo " --" + echo "OSS emulation modules are not loaded by default, add to rc.conf if needed." + echo " --" + echo "Arch specific cd symlinks are now no longer created." + echo " --" + echo "cd and net persistent rules will no longer be autogenerated," + echo "see <https://wiki.archlinux.org/index.php/Udev> for details." + echo " --" + echo "Errors are now logged (possibly to the console) by default." + echo " --" + fi + if [ "$(vercmp $2 171)" -lt 0 ]; then + echo "Arch's custom blacklisting logic has been removed. MOD_AUTOLOAD and" + echo "blacklisting in MODULES no longer works." + echo "See 'man modprobe.conf' for a replacement to blacklisting." + echo "To disable a module mod1 on the kernel command line, use" + echo "mod1.disable=1" + echo "or" + echo "modprobe.blacklist=mod1" + echo " --" + echo "The following modules are no longer unconditionally loaded:" + echo " pcspkr irtty-sir analog lp ppdev ide-generic" + echo "Add them to MODULES in rc.conf if you need them." + echo " --" + fi + echo "Support for non-devtmpfs self-compiled kernels have been moved to udev-compat." + echo " --" + echo "Blacklisting of framebuffer devices has moved from /etc/modprobe.d to" + echo "/lib/modprobe.d. Any customizations shoud be done to the file in /etc, as it" + echo "takes precedence." + echo " --" + echo "kbd and rtc devices are no longer world readable." echo " --" - echo "The following modules are no longer unconditionally loaded:" - echo " pcspkr irtty-sir analog lp ppdev ide-generic" - echo "Add them to MODULES in rc.conf if you need them." + echo "rtc is no longer in the audio group and fb devices are no longer in" + echo "the video group, as permissions and ownership of fb devices are controlled" + echo "by X." echo "---------------" fi } |