Browse Source

another musl fix round

Waldemar Brodkorb 10 years ago
parent
commit
ca463b8788

+ 1 - 1
mk/pkg-bottom.mk

@@ -180,7 +180,7 @@ ifneq (,$(filter dev,${PKG_OPTS}))
 	done
 endif
 	@-cd ${WRKINST}; \
-	    if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "eglibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libgcc" -a "${PKG_NAME}" != "libthread-db" -a "${PKG_NAME}" != "musl" ];then \
+	    if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "eglibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libgcc" -a "${PKG_NAME}" != "libthread-db" -a "${PKG_NAME}" != "musl" -a "${PKG_NAME}" != "pam" ];then \
 	    find lib \( -name lib\*.so\* -o -name lib\*.a \) \
 	    	-exec echo 'WARNING: ${PKG_NAME} installs files in /lib -' \
 		' fix this!' >&2 \; -quit 2>/dev/null; fi;\

+ 10 - 29
package/bluez/Makefile

@@ -4,47 +4,34 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		bluez
-PKG_VERSION:=		4.101
-PKG_RELEASE:=		2
-PKG_MD5SUM:=		fb42cb7038c380eb0e2fa208987c96ad
+PKG_VERSION:=		5.12
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		981b34c2ae7e2ed2e25a167d8a902a25
 PKG_DESCR:=		bluetooth applications
 PKG_SECTION:=		bluetooth
-PKG_DEPENDS:=		kmod-bt libbluetooth
+PKG_DEPENDS:=		kmod-bt glib dbus libreadline
+PKG_BUILDDEP:=		autotool glib dbus readline
 PKG_URL:=		http://www.bluez.org/
 PKG_SITES:=		http://mirror.anl.gov/pub/linux/bluetooth/
-PKG_LIBNAME:=		libbluetooth
 PKG_OPTS:=		dev
 
-PKG_SUBPKGS:=		BLUEZ LIBBLUETOOTH
-PKGSC_LIBBLUETOOTH:=	libs
-PKGSD_LIBBLUETOOTH:=	bluetooth libraries
-PKGSS_LIBBLUETOOTH:=	glib libusb dbus libusb-compat
-PKGSB_LIBBLUETOOTH:=	glib libusb dbus libusb-compat
-
 PKG_ARCH_DEPENDS:=	!avr32
 
-ifeq ($(ADK_STATIC),y)
-PKG_OPTS+=              libmix
-endif
-
 include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,BLUEZ,bluez,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-$(eval $(call PKG_template,LIBBLUETOOTH,libbluetooth,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBBLUETOOTH},${PKGSD_LIBBLUETOOTH},${PKGSC_LIBBLUETOOTH},${PKG_OPTS}))
 
+AUTOTOOL_STYLE:=	autoreconf
 ifeq ($(ADK_STATIC),y)
 XAKE_FLAGS+=		CCLD="$(TARGET_CC) -all-static -pthread"
 endif
 TARGET_CFLAGS:=         $(filter-out -flto,$(TARGET_CFLAGS))
+TARGET_LDFLAGS+=	-lncurses
 CONFIGURE_ENV+=		ac_cv_prog_cc_pie=no
 CONFIGURE_ARGS+=	--enable-tools \
-			--enable-alsa \
-			--enable-usb \
-			--enable-bccmd \
-			--enable-hidd \
-			--enable-pand \
-			--enable-dund \
-			--enable-netlink \
+			--disable-udev \
+			--disable-systemd \
+			--disable-obex \
 			--disable-pie \
 			--disable-cups
 
@@ -52,16 +39,10 @@ bluez-install:
 	${INSTALL_DIR} $(IDIR_BLUEZ)/etc/dbus-1/system.d
 	${INSTALL_DIR} ${IDIR_BLUEZ}/usr/bin
 	${CP} ${WRKINST}/usr/bin/* ${IDIR_BLUEZ}/usr/bin
-	${INSTALL_DIR} ${IDIR_BLUEZ}/usr/sbin
-	${CP} ${WRKINST}/usr/sbin/* ${IDIR_BLUEZ}/usr/sbin
 	${INSTALL_DIR} ${IDIR_BLUEZ}/etc/bluetooth
 	$(INSTALL_DATA) ./files/main.conf \
 		${IDIR_BLUEZ}/etc/bluetooth
 	$(INSTALL_DATA) ./files/bluetooth.conf \
 		$(IDIR_BLUEZ)/etc/dbus-1/system.d
 
-libbluetooth-install:
-	${INSTALL_DIR} ${IDIR_LIBBLUETOOTH}/usr/lib
-	${CP} ${WRKINST}/usr/lib/libbluetooth.so* ${IDIR_LIBBLUETOOTH}/usr/lib
-
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 10 - 0
package/bluez/patches/patch-Makefile_am

@@ -0,0 +1,10 @@
+--- bluez-5.12.orig/Makefile.am	2013-12-10 07:59:06.000000000 +0100
++++ bluez-5.12/Makefile.am	2013-12-21 20:18:52.000000000 +0100
+@@ -245,6 +245,7 @@ unit_tests += unit/test-sdp
+ 
+ unit_test_sdp_SOURCES = unit/test-sdp.c \
+ 				src/shared/util.h src/shared/util.c \
++				src/log.h src/log.c \
+ 				src/sdpd.h src/sdpd-database.c \
+ 				src/sdpd-service.c src/sdpd-request.c
+ unit_test_sdp_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@

+ 11 - 0
package/bluez/patches/patch-Makefile_in

@@ -0,0 +1,11 @@
+--- bluez-5.12.orig/Makefile.in	2013-12-10 07:59:32.000000000 +0100
++++ bluez-5.12/Makefile.in	2013-12-21 20:02:59.000000000 +0100
+@@ -157,7 +157,7 @@ DIST_COMMON = README $(am__configure_dep
+ @ANDROID_TRUE@	android/bluetoothd android/haltest
+ @ANDROID_TRUE@am__append_30 = android/libhal-internal.la
+ @HID2HCI_TRUE@am__append_31 = $(rules_DATA)
+-TESTS = $(am__EXEEXT_8)
++TESTS = 
+ subdir = .
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \

+ 10 - 0
package/bluez/patches/patch-plugins_wiimote_c

@@ -0,0 +1,10 @@
+--- bluez-5.12.orig/plugins/wiimote.c	2013-12-10 07:59:06.000000000 +0100
++++ bluez-5.12/plugins/wiimote.c	2013-12-21 19:29:22.000000000 +0100
+@@ -28,6 +28,7 @@
+ #include <stdbool.h>
+ 
+ #include <bluetooth/bluetooth.h>
++#include <fcntl.h>
+ #include <glib.h>
+ 
+ #include "plugin.h"

+ 10 - 0
package/bluez/patches/patch-profiles_network_bnep_c

@@ -0,0 +1,10 @@
+--- bluez-5.12.orig/profiles/network/bnep.c	2013-12-10 07:59:06.000000000 +0100
++++ bluez-5.12/profiles/network/bnep.c	2013-12-21 19:31:52.000000000 +0100
+@@ -32,6 +32,7 @@
+ #include <sys/param.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
+ #include <sys/wait.h>
+ #include <net/if.h>
+ #include <linux/sockios.h>

+ 4 - 4
package/bluez/patches/patch-tools_bccmd_c

@@ -1,6 +1,6 @@
---- bluez-4.92.orig/tools/bccmd.c	2010-11-30 15:50:48.000000000 +0100
-+++ bluez-4.92/tools/bccmd.c	2011-05-17 18:19:30.856601139 +0200
-@@ -1183,6 +1183,7 @@ int main(int argc, char *argv[])
+--- bluez-5.12.orig/tools/bccmd.c	2013-09-16 10:36:07.000000000 +0200
++++ bluez-5.12/tools/bccmd.c	2013-12-21 19:19:21.000000000 +0100
+@@ -1159,6 +1159,7 @@ int main(int argc, char *argv[])
  			case 115200: bcsp_rate = B115200; break;
  			case 230400: bcsp_rate = B230400; break;
  			case 460800: bcsp_rate = B460800; break;
@@ -8,7 +8,7 @@
  			case 500000: bcsp_rate = B500000; break;
  			case 576000: bcsp_rate = B576000; break;
  			case 921600: bcsp_rate = B921600; break;
-@@ -1202,6 +1203,7 @@ int main(int argc, char *argv[])
+@@ -1178,6 +1179,7 @@ int main(int argc, char *argv[])
  #ifdef B4000000
  			case 4000000: bcsp_rate = B4000000; break;
  #endif

+ 10 - 0
package/bluez/patches/patch-tools_csr_usb_c

@@ -0,0 +1,10 @@
+--- bluez-5.12.orig/tools/csr_usb.c	2013-09-16 10:36:07.000000000 +0200
++++ bluez-5.12/tools/csr_usb.c	2013-12-21 19:22:48.000000000 +0100
+@@ -29,6 +29,7 @@
+ #include <errno.h>
+ #include <ctype.h>
+ #include <fcntl.h>
++#include <limits.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>

+ 4 - 4
package/bluez/patches/patch-tools_hciattach_c

@@ -1,6 +1,6 @@
---- bluez-4.92.orig/tools/hciattach.c	2010-11-30 15:50:48.000000000 +0100
-+++ bluez-4.92/tools/hciattach.c	2011-05-17 18:18:20.776610031 +0200
-@@ -107,6 +107,7 @@ static int uart_speed(int s)
+--- bluez-5.12.orig/tools/hciattach.c	2012-12-24 18:46:55.000000000 +0100
++++ bluez-5.12/tools/hciattach.c	2013-12-21 19:19:21.000000000 +0100
+@@ -101,6 +101,7 @@ static int uart_speed(int s)
  		return B230400;
  	case 460800:
  		return B460800;
@@ -8,7 +8,7 @@
  	case 500000:
  		return B500000;
  	case 576000:
-@@ -137,6 +138,7 @@ static int uart_speed(int s)
+@@ -135,6 +136,7 @@ static int uart_speed(int s)
  	case 4000000:
  		return B4000000;
  #endif

+ 10 - 0
package/bluez/patches/patch-tools_hciconfig_c

@@ -0,0 +1,10 @@
+--- bluez-5.12.orig/tools/hciconfig.c	2013-10-15 15:41:07.000000000 +0200
++++ bluez-5.12/tools/hciconfig.c	2013-12-21 19:26:45.000000000 +0100
+@@ -30,6 +30,7 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <ctype.h>
++#include <fcntl.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>

+ 15 - 0
package/bluez/patches/patch-unit_test-sdp_c

@@ -0,0 +1,15 @@
+--- bluez-5.12.orig/unit/test-sdp.c	2013-10-15 15:41:07.000000000 +0200
++++ bluez-5.12/unit/test-sdp.c	2013-12-21 20:23:50.000000000 +0100
+@@ -128,12 +128,6 @@ static void sdp_debug(const char *str, v
+ 	g_print("%s%s\n", prefix, str);
+ }
+ 
+-void btd_debug(const char *format, ...);
+-
+-void btd_debug(const char *format, ...)
+-{
+-}
+-
+ static void context_quit(struct context *context)
+ {
+ 	g_main_loop_quit(context->main_loop);

+ 6 - 0
package/gperf/Makefile

@@ -9,16 +9,22 @@ PKG_RELEASE:=		1
 PKG_MD5SUM:=		c1f1db32fb6598d6a93e6e88796a8632
 PKG_DESCR:=		perfect hash function generator
 PKG_SECTION:=		lang
+PKG_BUILDDEP:=		gperf-host
 PKG_DEPENDS:=		libstdc++
 PKG_URL:=		http://www.gnu.org/software/gperf/
 PKG_SITES:=		${MASTER_SITE_GNU:=${PKG_NAME}/}
 
+include ${TOPDIR}/mk/host.mk
 include ${TOPDIR}/mk/package.mk
 
+$(eval $(call HOST_template,GPERF,gperf,${PKG_VERSION}-${PKG_RELEASE}))
 $(eval $(call PKG_template,GPERF,gperf,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+HOST_STYLE:=		auto
+
 gperf-install:
 	${INSTALL_DIR} ${IDIR_GPERF}/usr/bin
 	${INSTALL_BIN} ${WRKINST}/usr/bin/gperf ${IDIR_GPERF}/usr/bin
 
+include ${TOPDIR}/mk/host-bottom.mk
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 24 - 0
package/kmod/patches/patch-libkmod_libkmod-util_c

@@ -0,0 +1,24 @@
+--- kmod-15.orig/libkmod/libkmod-util.c	2013-07-15 17:45:31.000000000 +0200
++++ kmod-15/libkmod/libkmod-util.c	2013-12-21 18:02:49.000000000 +0100
+@@ -28,6 +28,7 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <string.h>
++#include <limits.h>
+ #include <ctype.h>
+ 
+ #include "libkmod.h"
+@@ -323,8 +324,12 @@ static inline int is_dir(const char *pat
+ int mkdir_p(const char *path, int len, mode_t mode)
+ {
+ 	char *start, *end;
++	char buf[PATH_MAX+1];
+ 
+-	start = strndupa(path, len);
++	snprintf(buf, sizeof buf, "%s", path);
++	assert(len < sizeof(buf));
++	buf[len] = 0;
++	start = buf;
+ 	end = start + len;
+ 
+ 	/*

+ 7 - 5
package/libgcrypt/Makefile

@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		libgcrypt
 PKG_VERSION:=		1.5.0
-PKG_RELEASE:=		3
+PKG_RELEASE:=		4
 PKG_MD5SUM:=		78f8f8bec4580f75b25816f7896d0389
 PKG_DESCR:=		GNU crypto library
 PKG_SECTION:=		libs
@@ -22,13 +22,15 @@ $(eval $(call PKG_template,LIBGCRYPT,libgcrypt,${PKG_VERSION}-${PKG_RELEASE},${P
 CONFIGURE_ARGS+=	--disable-asm \
 			--with-gpg-error-prefix="${STAGING_TARGET_DIR}/usr"
 
-libgcrypt-install:
-	${INSTALL_DIR} ${IDIR_LIBGCRYPT}/usr/lib
-	${CP} ${WRKINST}/usr/lib/libgcrypt.so* \
-		${IDIR_LIBGCRYPT}/usr/lib
+post-install:
 	# provides own automake macros
 	${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/share/aclocal
 	${CP} ${WRKINST}//usr/share/aclocal/libgcrypt.m4 \
 		${STAGING_HOST_DIR}/usr/share/aclocal
 
+libgcrypt-install:
+	${INSTALL_DIR} ${IDIR_LIBGCRYPT}/usr/lib
+	${CP} ${WRKINST}/usr/lib/libgcrypt.so* \
+		${IDIR_LIBGCRYPT}/usr/lib
+
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 6 - 5
package/pam/Makefile

@@ -4,13 +4,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		pam
-PKG_VERSION:=		1.1.4
-PKG_RELEASE:=		2
-PKG_MD5SUM:=		ff8f3c4382b78ac211e11bcd56ab17bf
+PKG_VERSION:=		1.1.8
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		5107bbf54042400b6200e8367cc7feef
 PKG_DESCR:=		Pluggable Authentication Modules
 PKG_BUILDDEP:=		flex
 PKG_SECTION:=		misc
-PKG_SITES:=		http://openadk.org/distfiles/
+PKG_URL:=		http://www.linux-pam.org/
+PKG_SITES:=		http://www.linux-pam.org/library/
 PKG_OPTS:=		dev
 
 DISTFILES:=		Linux-PAM-$(PKG_VERSION).tar.gz
@@ -20,7 +21,7 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,PAM,pam,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
-XAKE_FLAGS+=		GCC_HONOUR_COPTS=s
+#XAKE_FLAGS+=		GCC_HONOUR_COPTS=s
 CONFIGURE_ARGS+=	--disable-nis \
 			--enable-db=no
 

+ 0 - 24
package/pam/patches/patch-Makefile_in

@@ -1,24 +0,0 @@
---- Linux-PAM-1.1.4.orig/Makefile.in	2011-06-24 12:48:16.000000000 +0200
-+++ Linux-PAM-1.1.4/Makefile.in	2011-10-07 11:42:21.000000000 +0200
-@@ -75,8 +75,8 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re
-   distclean-recursive maintainer-clean-recursive
- ETAGS = etags
- CTAGS = ctags
--DIST_SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc \
--	examples xtests
-+DIST_SUBDIRS = libpam tests libpamc libpam_misc modules po conf \
-+	examples
- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
- distdir = $(PACKAGE)-$(VERSION)
- top_distdir = $(distdir)
-@@ -258,8 +258,8 @@ top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
--@STATIC_MODULES_FALSE@SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
--@STATIC_MODULES_TRUE@SUBDIRS = modules libpam libpamc libpam_misc tests po conf doc examples xtests
-+@STATIC_MODULES_FALSE@SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples
-+@STATIC_MODULES_TRUE@SUBDIRS = modules libpam libpamc libpam_misc tests po conf examples
- CLEANFILES = *~
- M4_FILES = m4/gettext.m4 m4/iconv.m4 m4/intlmacosx.m4 \
- 	m4/japhar_grep_cflags.m4 m4/jh_path_xml_catalog.m4 \

+ 0 - 11
package/pam/patches/patch-conf_Makefile_in

@@ -1,11 +0,0 @@
---- Linux-PAM-1.1.4.orig/conf/Makefile.in	2011-06-24 12:48:02.000000000 +0200
-+++ Linux-PAM-1.1.4/conf/Makefile.in	2011-10-07 11:32:37.000000000 +0200
-@@ -236,7 +236,7 @@ target_alias = @target_alias@
- top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
--SUBDIRS = pam_conv1
-+SUBDIRS = 
- CLEANFILES = *~
- EXTRA_DIST = install_conf md5itall pam.conf
- all: all-recursive

+ 12 - 3
package/pam/patches/patch-configure

@@ -1,6 +1,6 @@
---- Linux-PAM-1.1.4.orig/configure	2011-06-24 12:48:18.000000000 +0200
-+++ Linux-PAM-1.1.4/configure	2011-10-12 14:51:42.323559002 +0200
-@@ -2766,8 +2766,6 @@ then
+--- Linux-PAM-1.1.8.orig/configure	2013-09-19 10:01:32.000000000 +0200
++++ Linux-PAM-1.1.8/configure	2013-12-21 18:40:31.000000000 +0100
+@@ -10718,8 +10718,6 @@ then
  	if test ${libdir} = '${exec_prefix}/lib'
  	then
  		case "`uname -m`" in
@@ -9,3 +9,12 @@
  		    *)
  			libdir="/lib" ;;
  		esac
+@@ -13299,7 +13297,7 @@ $as_echo "$ac_cv_search_crypt" >&6; }
+ ac_res=$ac_cv_search_crypt
+ if test "$ac_res" != no; then :
+   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+-  LIBCRYPT="-l$ac_lib"
++  LIBCRYPT=""
+ else
+   LIBCRYPT=""
+ fi

+ 11 - 0
package/pam/patches/patch-modules_Makefile_in

@@ -0,0 +1,11 @@
+--- Linux-PAM-1.1.8.orig/modules/Makefile.in	2013-09-19 10:01:33.000000000 +0200
++++ Linux-PAM-1.1.8/modules/Makefile.in	2013-12-21 18:45:07.000000000 +0100
+@@ -274,7 +274,7 @@ SUBDIRS = pam_access pam_cracklib pam_de
+ 	pam_group pam_issue pam_keyinit pam_lastlog pam_limits \
+ 	pam_listfile pam_localuser pam_loginuid pam_mail \
+ 	pam_mkhomedir pam_motd pam_namespace pam_nologin \
+-	pam_permit pam_pwhistory pam_rhosts pam_rootok pam_securetty \
++	pam_permit pam_pwhistory pam_rootok pam_securetty \
+ 	pam_selinux pam_sepermit pam_shells pam_stress \
+ 	pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \
+ 	pam_tty_audit pam_umask \

+ 12 - 7
package/pam/patches/patch-modules_pam_group_pam_group_c

@@ -1,12 +1,17 @@
---- Linux-PAM-1.1.4.orig/modules/pam_group/pam_group.c	2011-06-21 11:04:56.000000000 +0200
-+++ Linux-PAM-1.1.4/modules/pam_group/pam_group.c	2011-10-12 14:31:55.693559001 +0200
-@@ -656,7 +656,8 @@ static int check_account(pam_handle_t *p
+--- Linux-PAM-1.1.8.orig/modules/pam_group/pam_group.c	2013-06-18 16:11:21.000000000 +0200
++++ Linux-PAM-1.1.8/modules/pam_group/pam_group.c	2013-12-21 18:30:19.000000000 +0100
+@@ -655,10 +655,13 @@ static int check_account(pam_handle_t *p
+ 	    continue;
  	}
  	/* If buffer starts with @, we are using netgroups */
++#ifdef HAVE_INNETGR
  	if (buffer[0] == '@')
--	  good &= innetgr (&buffer[1], NULL, user, NULL);
-+	    pam_syslog(pamh, LOG_ERR, "%s: no netgroup supported by C library", PAM_GROUP_CONF);
-+	  //good &= innetgr (&buffer[1], NULL, user, NULL);
+ 	  good &= innetgr (&buffer[1], NULL, user, NULL);
  	/* otherwise, if the buffer starts with %, it's a UNIX group */
- 	else if (buffer[0] == '%')
+-	else if (buffer[0] == '%')
++	else
++#endif
++	if (buffer[0] == '%')
            good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
+ 	else
+ 	  good &= logic_field(pamh,user, buffer, count, is_same);

+ 21 - 0
package/pam/patches/patch-modules_pam_lastlog_pam_lastlog_c

@@ -0,0 +1,21 @@
+--- Linux-PAM-1.1.8.orig/modules/pam_lastlog/pam_lastlog.c	2013-06-18 16:11:21.000000000 +0200
++++ Linux-PAM-1.1.8/modules/pam_lastlog/pam_lastlog.c	2013-12-21 18:34:07.000000000 +0100
+@@ -10,6 +10,7 @@
+ 
+ #include "config.h"
+ 
++#include <paths.h>
+ #include <fcntl.h>
+ #include <time.h>
+ #include <errno.h>
+@@ -50,6 +51,10 @@ struct lastlog {
+ # define _PATH_BTMP "/var/log/btmp"
+ #endif
+ 
++#ifndef __GLIBC__
++#define logwtmp(args...)
++#endif
++
+ /* XXX - time before ignoring lock. Is 1 sec enough? */
+ #define LASTLOG_IGNORE_LOCK_TIME     1
+ 

+ 9 - 38
package/pam/patches/patch-modules_pam_succeed_if_pam_succeed_if_c

@@ -1,52 +1,23 @@
---- Linux-PAM-1.1.4.orig/modules/pam_succeed_if/pam_succeed_if.c	2011-06-21 11:04:56.000000000 +0200
-+++ Linux-PAM-1.1.4/modules/pam_succeed_if/pam_succeed_if.c	2012-07-31 12:02:24.000000000 +0200
-@@ -230,6 +230,7 @@ evaluate_notingroup(pam_handle_t *pamh, 
- 	return PAM_AUTH_ERR;
- }
- /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
-+/*
+--- Linux-PAM-1.1.8.orig/modules/pam_succeed_if/pam_succeed_if.c	2013-06-18 16:11:21.000000000 +0200
++++ Linux-PAM-1.1.8/modules/pam_succeed_if/pam_succeed_if.c	2013-12-21 18:30:19.000000000 +0100
+@@ -233,16 +233,20 @@ evaluate_notingroup(pam_handle_t *pamh,
  static int
  evaluate_innetgr(const char *host, const char *user, const char *group)
  {
-@@ -237,7 +238,9 @@ evaluate_innetgr(const char *host, const
++#ifdef HAVE_INNETGR
+ 	if (innetgr(group, host, user, NULL) == 1)
  		return PAM_SUCCESS;
++#endif
  	return PAM_AUTH_ERR;
  }
-+*/
  /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
-+/*
  static int
  evaluate_notinnetgr(const char *host, const char *user, const char *group)
  {
-@@ -245,6 +248,7 @@ evaluate_notinnetgr(const char *host, co
++#ifdef HAVE_INNETGR
+ 	if (innetgr(group, host, user, NULL) == 0)
  		return PAM_SUCCESS;
++#endif
  	return PAM_AUTH_ERR;
  }
-+*/
  
- /* Match a triple. */
- static int
-@@ -357,19 +361,23 @@ evaluate(pam_handle_t *pamh, int debug,
- 		return evaluate_notingroup(pamh, user, right);
- 	}
- 	/* (Rhost, user) is in this netgroup. */
-+	/*
- 	if (strcasecmp(qual, "innetgr") == 0) {
- 		const void *rhost;
- 		if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
- 			rhost = NULL;
- 		return evaluate_innetgr(rhost, user, right);
- 	}
-+	*/
- 	/* (Rhost, user) is not in this group. */
-+	/*
- 	if (strcasecmp(qual, "notinnetgr") == 0) {
- 		const void *rhost;
- 		if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
- 			rhost = NULL;
- 		return evaluate_notinnetgr(rhost, user, right);
- 	}
-+	*/
- 	/* Fail closed. */
- 	return PAM_SERVICE_ERR;
- }

+ 8 - 7
package/pam/patches/patch-modules_pam_time_pam_time_c

@@ -1,13 +1,14 @@
---- Linux-PAM-1.1.4.orig/modules/pam_time/pam_time.c	2011-06-21 11:04:56.000000000 +0200
-+++ Linux-PAM-1.1.4/modules/pam_time/pam_time.c	2012-07-31 12:02:24.000000000 +0200
-@@ -555,7 +555,9 @@ check_account(pam_handle_t *pamh, const 
+--- Linux-PAM-1.1.8.orig/modules/pam_time/pam_time.c	2013-06-18 16:11:21.000000000 +0200
++++ Linux-PAM-1.1.8/modules/pam_time/pam_time.c	2013-12-21 18:30:19.000000000 +0100
+@@ -554,9 +554,11 @@ check_account(pam_handle_t *pamh, const
+ 	       continue;
  	  }
  	  /* If buffer starts with @, we are using netgroups */
++#ifdef HAVE_INNETGR
  	  if (buffer[0] == '@')
--	    good &= innetgr (&buffer[1], NULL, user, NULL);
-+	    //good &= innetgr (&buffer[1], NULL, user, NULL);
-+	       pam_syslog(pamh, LOG_ERR,
-+			  "%s: no netgroup support in C library", PAM_TIME_CONF);
+ 	    good &= innetgr (&buffer[1], NULL, user, NULL);
  	  else
++#endif
  	    good &= logic_field(pamh, user, buffer, count, is_same);
  	  D(("with user: %s", good ? "passes":"fails" ));
+ 

+ 0 - 107
package/pam/patches/patch-modules_pam_timestamp_hmacfile

@@ -1,107 +0,0 @@
---- Linux-PAM-1.1.4.orig/modules/pam_timestamp/hmacfile	2011-06-21 11:37:55.000000000 +0200
-+++ Linux-PAM-1.1.4/modules/pam_timestamp/hmacfile	2012-07-31 12:03:27.000000000 +0200
-@@ -1,4 +1,4 @@
--#! /bin/sh
-+#! /bin/bash
- 
- # hmacfile - temporary wrapper script for .libs/hmacfile
- # Generated by ltmain.sh (GNU libtool) 2.2.6
-@@ -11,7 +11,7 @@
- 
- # Sed substitution that helps us do robust quoting.  It backslashifies
- # metacharacters that are still active within double-quoted strings.
--Xsed='/bin/sed -e 1s/^X//'
-+Xsed='/Volumes/adk/openadk/scripts/sed -e 1s/^X//'
- sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
- 
- # Be Bourne compatible
-@@ -32,13 +32,13 @@ DUALCASE=1; export DUALCASE # for MKS sh
- # if CDPATH is set.
- (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
- 
--relink_command=""
-+relink_command="(cd /Volumes/adk/openadk/build_qemu_i686_eglibc/w-pam-1.1.4-2/Linux-PAM-1.1.4/modules/pam_timestamp; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/Volumes/adk/openadk/scripts:/Volumes/adk/openadk/bin/tools:/Volumes/adk/openadk/host_i686_eglibc/bin:/Volumes/adk/openadk/host_i686_eglibc/usr/bin:/Volumes/adk/openadk/target_i686_eglibc/scripts:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/MacGPG2/bin:/usr/X11/bin; export PATH; /Volumes/adk/openadk/host_i686_eglibc/bin/i686-openadk-linux-gnu-gcc -I../../libpam/include -I../../libpamc/include -march=i686 -fwrapv -fno-ident -fhonour-copts -fomit-frame-pointer -Os -pipe -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wwrite-strings -Winline -Wshadow -Wl,-O2 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/Volumes/adk/openadk/target_i686_eglibc/usr/lib -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -o \$progdir/\$file hmacfile.o hmacsha1.o sha1.o  -L/Volumes/adk/openadk/target_i686_eglibc/lib -L/Volumes/adk/openadk/target_i686_eglibc/usr/lib -L/Volumes/adk/openadk/build_qemu_i686_eglibc/w-pam-1.1.4-2/Linux-PAM-1.1.4/libpam /Volumes/adk/openadk/build_qemu_i686_eglibc/w-pam-1.1.4-2/Linux-PAM-1.1.4/libpam/.libs/libpam.so -ldl -Wl,-rpath -Wl,/Volumes/adk/openadk/build_qemu_i686_eglibc/w-pam-1.1.4-2/Linux-PAM-1.1.4/libpam/.libs)"
- 
- # This environment variable determines our operation mode.
- if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
-   # install mode needs the following variables:
-   generated_by_libtool_version='2.2.6'
--  notinst_deplibs=' /data/git/Linux-PAM/libpam/libpam.la'
-+  notinst_deplibs=' /Volumes/adk/openadk/build_qemu_i686_eglibc/w-pam-1.1.4-2/Linux-PAM-1.1.4/libpam/libpam.la'
- else
-   # When we are sourced in execute mode, $file and $ECHO are already set.
-   if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
-@@ -53,7 +53,7 @@ else
-       :
-     else
-       # Restart under the correct shell, and then maybe $ECHO will work.
--      exec /bin/sh "$0" --no-reexec ${1+"$@"}
-+      exec /bin/bash "$0" --no-reexec ${1+"$@"}
-     fi
-   fi
- 
-@@ -62,7 +62,7 @@ else
-   test "x$thisdir" = "x$file" && thisdir=.
- 
-   # Follow symbolic links until we get to the real thisdir.
--  file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
-+  file=`ls -ld "$file" | /Volumes/adk/openadk/scripts/sed -n 's/.*-> //p'`
-   while test -n "$file"; do
-     destdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
- 
-@@ -75,7 +75,7 @@ else
-     fi
- 
-     file=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'`
--    file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
-+    file=`ls -ld "$thisdir/$file" | /Volumes/adk/openadk/scripts/sed -n 's/.*-> //p'`
-   done
- 
- 
-@@ -98,20 +98,38 @@ else
-   absdir=`cd "$thisdir" && pwd`
-   test -n "$absdir" && thisdir="$absdir"
- 
--  program='hmacfile'
-+  program=lt-'hmacfile'
-   progdir="$thisdir/.libs"
- 
-+  if test ! -f "$progdir/$program" ||
-+     { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /Volumes/adk/openadk/scripts/sed 1q`; \
-+       test "X$file" != "X$progdir/$program"; }; then
- 
--  if test -f "$progdir/$program"; then
--    # Add our own library path to LD_LIBRARY_PATH
--    LD_LIBRARY_PATH="/data/git/Linux-PAM/libpam/.libs:$LD_LIBRARY_PATH"
-+    file="$$-$program"
- 
--    # Some systems cannot cope with colon-terminated LD_LIBRARY_PATH
--    # The second colon is a workaround for a bug in BeOS R4 sed
--    LD_LIBRARY_PATH=`$ECHO "X$LD_LIBRARY_PATH" | $Xsed -e 's/::*$//'`
-+    if test ! -d "$progdir"; then
-+      mkdir "$progdir"
-+    else
-+      rm -f "$progdir/$file"
-+    fi
- 
--    export LD_LIBRARY_PATH
-+    # relink executable if necessary
-+    if test -n "$relink_command"; then
-+      if relink_command_output=`eval $relink_command 2>&1`; then :
-+      else
-+	echo "$relink_command_output" >&2
-+	rm -f "$progdir/$file"
-+	exit 1
-+      fi
-+    fi
-+
-+    mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null ||
-+    { rm -f "$progdir/$program";
-+      mv -f "$progdir/$file" "$progdir/$program"; }
-+    rm -f "$progdir/$file"
-+  fi
- 
-+  if test -f "$progdir/$program"; then
-     if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
-       # Run the actual program with our arguments.
- 

+ 0 - 10
package/pam/patches/patch-modules_pam_unix_pam_unix_acct_c

@@ -1,10 +0,0 @@
---- Linux-PAM-1.1.4.orig/modules/pam_unix/pam_unix_acct.c	2011-06-21 11:04:56.000000000 +0200
-+++ Linux-PAM-1.1.4/modules/pam_unix/pam_unix_acct.c	2012-07-31 13:08:58.000000000 +0200
-@@ -47,6 +47,7 @@
- #include <time.h>		/* for time() */
- #include <errno.h>
- #include <sys/wait.h>
-+#include <sys/resource.h>
- 
- #include <security/_pam_macros.h>
- 

+ 1 - 1
package/systemd/Makefile

@@ -11,7 +11,7 @@ PKG_DESCR:=		System and Service Manager
 PKG_SECTION:=		utils
 PKG_DEPENDS:=		libblkid libcap
 PKG_BUILDDEP:=		autotool usbutils glib kmod util-linux libcap
-PKG_BUILDDEP+=		libgcrypt
+PKG_BUILDDEP+=		libgcrypt gperf-host
 PKG_URL:=		http://freedesktop.org/wiki/Software/systemd/
 PKG_SITES:=		http://www.freedesktop.org/software/systemd/
 PKG_LIBNAME:=		libudev