Merge pull request #1429 from jow-/sysstat-musl-compat
authorLuka Perkov <luka.perkov@sartura.hr>
Thu, 18 Jun 2015 21:48:30 +0000 (23:48 +0200)
committerLuka Perkov <luka.perkov@sartura.hr>
Thu, 18 Jun 2015 21:48:30 +0000 (23:48 +0200)
sysstat: fix musl compatibility

86 files changed:
admin/zabbix/Makefile
admin/zabbix/patches/100-musl-compat.patch [new file with mode: 0644]
ipv6/aiccu/Makefile
ipv6/aiccu/patches/100-cross_compile.patch
ipv6/aiccu/patches/200-add_dn_skipname.patch
ipv6/aiccu/patches/300-resolver-uclibc.patch
ipv6/aiccu/patches/400-musl-compat.patch [new file with mode: 0644]
lang/lzmq/Makefile
lang/perl/Makefile
lang/perl/patches/100-musl-compat.patch [new file with mode: 0644]
libs/gnutls/Makefile
libs/gnutls/patches/001-camellia256-gcm-corrected-regression.patch [deleted file]
libs/libdaq/Makefile
libs/libdaq/patches/001-compile.patch
libs/libdaq/patches/100-musl-compat.patch [new file with mode: 0644]
libs/libpam/Makefile
libs/libpam/patches/000-OE-libpam-xtests.patch [deleted file]
libs/libpam/patches/000-OE-pam-no-innetgr.patch [deleted file]
libs/libpam/patches/0001-build-always-use-lib-instead-of-lib64.patch [new file with mode: 0644]
libs/libpam/patches/0002-build-ignore-pam_rhosts-if-neither-ruserok-nor-ruser.patch [new file with mode: 0644]
libs/libpam/patches/0003-build-ignore-pam_lastlog-when-logwtmp-is-not-availab.patch [new file with mode: 0644]
libs/libpam/patches/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch [new file with mode: 0644]
libs/libpam/patches/0005-build-fix-doc-build.patch [new file with mode: 0644]
libs/libpam/patches/0006-pam_unix-fix-compilation-in-case-rpc-rpc.h-is-missin.patch [new file with mode: 0644]
libs/libpam/patches/0007-Check-if-innetgr-is-available-at-compile-time.patch [new file with mode: 0644]
libs/libpam/patches/001-no_nis.patch [deleted file]
libs/libpam/patches/002-no_yywrap.patch [deleted file]
libs/libpam/patches/003-no_doc.patch [deleted file]
libs/libpam/patches/004-fix_lib64.patch [deleted file]
libs/libpam/patches/005-fix_ruserok.patch [deleted file]
libs/libpam/patches/006-fix_xdr.patch [deleted file]
libs/libpam/patches/007-cve-2014-2583.patch [deleted file]
libs/libv4l/Makefile
libs/libv4l/patches/005-test_for_posix_ioctl.patch [new file with mode: 0644]
libs/libv4l/patches/020-add-missing-includes.patch
libs/libv4l/patches/030-musl_compatibility.patch [new file with mode: 0644]
libs/zmq/Makefile
libs/zmq/patches/disable_pedantic_on_linux_with_ulibc++.patch
libs/zmq/patches/map_with_const_string_with_ublic++.patch [new file with mode: 0644]
libs/zmq/patches/streamoff_missing_with_ulibc++.patch
libs/zmq/patches/tools_gcc_fix.patch [deleted file]
multimedia/gst1-libav/Makefile
multimedia/mjpg-streamer/patches/005-musl_compatibility.patch [new file with mode: 0644]
net/bridge-utils/Makefile
net/bridge-utils/patches/100-musl-compat.patch [new file with mode: 0644]
net/gnunet/Makefile
net/gnunet/patches/010-cross-compile-fixes.patch [deleted file]
net/gnunet/patches/011-no-fpu-includes.patch [deleted file]
net/gnunet/patches/100-musl-malloc.patch [deleted file]
net/gnunet/patches/101-include-byteswap.patch [deleted file]
net/luci-app-sqm/Makefile
net/luci-app-sqm/files/sqm-cbi.lua
net/ocserv/Makefile
net/ocserv/files/ocserv.conf.template
net/ocserv/files/ocserv.init
net/openconnect/Makefile
net/pptpd/Makefile
net/pptpd/patches/100-musl-compat.patch [new file with mode: 0644]
net/socat/Makefile
net/socat/patches/100-musl-compat.patch [new file with mode: 0644]
net/transmission/files/transmission.config
net/transmission/files/transmission.init
net/vnstat/patches/100-musl-compat.patch [new file with mode: 0644]
net/vsftpd/Makefile
net/vsftpd/patches/006-musl-compatibility.patch [new file with mode: 0644]
net/xinetd/Makefile
net/xinetd/patches/004-ident-bind.patch
sound/mocp/Makefile
utils/acpid/Makefile [new file with mode: 0644]
utils/acpid/files/acpid.hotplug [new file with mode: 0644]
utils/acpid/files/acpid.init [new file with mode: 0644]
utils/acpid/files/default [new file with mode: 0644]
utils/acpid/patches/001-musl-compat.patch [new file with mode: 0644]
utils/acpid/patches/002-dont-use-isfdtype.patch [new file with mode: 0644]
utils/avrdude/Makefile
utils/avrdude/patches/100-musl-compat.patch [new file with mode: 0644]
utils/f2fs-tools/patches/010-include-byteswap-h.patch [new file with mode: 0644]
utils/flashrom/Makefile
utils/flashrom/patches/0002-fix-musl-compatibility.patch [new file with mode: 0644]
utils/hdparm/Makefile
utils/hdparm/patches/001-fix-includes.patch [deleted file]
utils/picocom/Makefile
utils/picocom/patches/100-musl-compat.patch [new file with mode: 0644]
utils/rng-tools/Makefile
utils/screen/Makefile
utils/screen/patches/200-musl-compat.patch [new file with mode: 0644]

index 9f2c86e36fa252b7407a8f120e438b70d869dfca..e764b7701addc21fb3fd974a130248e7e6ae427d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zabbix
 PKG_VERSION:=2.4.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/zabbix
diff --git a/admin/zabbix/patches/100-musl-compat.patch b/admin/zabbix/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..2b6fee6
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,7 +51,7 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string
+   syslog.h time.h errno.h sys/types.h sys/stat.h netinet/in.h \
+   math.h sys/socket.h dirent.h ctype.h \
+   mtent.h fcntl.h sys/param.h arpa/inet.h \
+-  sys/vfs.h sys/pstat.h sys/sysinfo.h sys/statvfs.h sys/statfs.h \
++  sys/vfs.h sys/pstat.h sys/statvfs.h sys/statfs.h \
+   sys/socket.h sys/loadavg.h arpa/inet.h \
+   sys/vmmeter.h strings.h vm/vm_param.h \
+   sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
+@@ -63,6 +63,11 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string
+   sys/timeb.h Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
+   execinfo.h libperfstat.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \
+   dlfcn.h sys/utsname.h)
++AC_CHECK_HEADERS(sys/sysinfo.h, [], [], [
++#ifdef HAVE_LINUX_KERNEL_H
++#  include <linux/kernel.h>
++#endif
++])
+ AC_CHECK_HEADERS(resolv.h, [], [], [
+ #ifdef HAVE_SYS_TYPES_H
+ #  include <sys/types.h>
index 50839f359a3c2794e7a16ac0c295a4c015f4dc19..0034c0b7091eeb1263ac628dee6f78b13a296d73 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2012 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=aiccu
 PKG_VERSION:=20070115
-PKG_RELEASE:=12
+PKG_RELEASE:=13
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.sixxs.net/archive/sixxs/aiccu/unix
index dbdc50aaa61f6965401aad92af0cc908f2181ed9..6ef8ad5d6260972729afcbe2e694abfa500b4414 100644 (file)
@@ -1,6 +1,6 @@
---- aiccu/unix-console/Makefile.orig   2007-09-02 23:19:39.000000000 +0200
-+++ aiccu/unix-console/Makefile        2007-09-02 23:20:11.000000000 +0200
-@@ -25,7 +25,8 @@
+--- a/unix-console/Makefile
++++ b/unix-console/Makefile
+@@ -25,7 +25,8 @@ CWARNS += -W -Wall -Wshadow -Wpointer-ar
  # CWARNS += -Wpacked
  
  #CFLAGS       += $(CWARNS) -D_GNU_SOURCE -D_DEBUG -g3 -O0
@@ -10,7 +10,7 @@
  CC      = @gcc
  RM      = rm
  
-@@ -40,25 +41,25 @@
+@@ -40,25 +41,25 @@ CFLAGS     += -D AICCU_CONSOLE
  # GnuTLS Support ?
  # Used by TIC to secure that communication
  # Currently defaultly builds only on Linux, but other platforms might easily also support it
@@ -41,7 +41,7 @@
  CFLAGS        += -D AICCU_TYPE="\"freebsd4\""
  SRCS  += ../common/aiccu_freebsd4.c
  OBJS  += ../common/aiccu_freebsd4.o
-@@ -71,7 +72,7 @@
+@@ -71,7 +72,7 @@ endif
  endif
  
  # DragonFlyBSD
@@ -50,7 +50,7 @@
  CFLAGS        += -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\""
  SRCS  += ../common/aiccu_freebsd4.c
  OBJS  += ../common/aiccu_freebsd4.o
-@@ -79,7 +80,7 @@
+@@ -79,7 +80,7 @@ CFLAGS       += -pthread
  endif
  
  # NetBSD
@@ -59,7 +59,7 @@
  CFLAGS        += -D_NETBSD -D AICCU_TYPE="\"kame\""
  
  # Check if net/if_tun.h has TUNSIFHEAD and enable support for it
-@@ -97,10 +98,10 @@
+@@ -97,10 +98,10 @@ CFLAGS     += -pthread -D_NETBSD_SOURCE
  endif
  
  # OpenBSD
@@ -72,7 +72,7 @@
  CFLAGS        += -D AICCU_TYPE="\"openbsd2\""
  SRCS  += ../common/aiccu_openbsd2.c
  OBJS  += ../common/aiccu_openbsd2.o
-@@ -114,7 +115,7 @@
+@@ -114,7 +115,7 @@ CFLAGS     += -pthread
  endif
  
  # Darwin
@@ -81,7 +81,7 @@
  CFLAGS        += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\""
  SRCS  += ../common/aiccu_darwin.c
  OBJS  += ../common/aiccu_darwin.o
-@@ -122,7 +123,7 @@
+@@ -122,7 +123,7 @@ LDFLAGS    += -lresolv
  endif
  
  # SunOS / Solaris
@@ -90,7 +90,7 @@
  CFLAGS        += -D_SUNOS -D AICCU_TYPE="\"sunos\""
  SRCS  += ../common/aiccu_sunos.c
  OBJS  += ../common/aiccu_sunos.o
-@@ -130,7 +131,7 @@
+@@ -130,7 +131,7 @@ LDFLAGS    += -lsocket -lnsl -lresolv
  endif
  
  # AIX
index ca6afcea1e9631e31267797519a2ebc99a029e77..3ce1e9234c024bb9fc4c7bf240efb4183a7b8e76 100644 (file)
@@ -1,6 +1,5 @@
-diff -Nru aiccu.old/common/dn_skipname.c aiccu/common/dn_skipname.c
---- aiccu.old/common/dn_skipname.c     1970-01-01 02:00:00.000000000 +0200
-+++ aiccu/common/dn_skipname.c 2006-11-04 00:50:23.000000000 +0200
+--- /dev/null
++++ b/common/dn_skipname.c
 @@ -0,0 +1,51 @@
 +#include <errno.h>
 +#include <resolv.h>
@@ -53,11 +52,10 @@ diff -Nru aiccu.old/common/dn_skipname.c aiccu/common/dn_skipname.c
 +      return (ptr - saveptr);
 +}
 +
-diff -Nru aiccu.old/unix-console/Makefile aiccu/unix-console/Makefile
---- aiccu.old/unix-console/Makefile    2006-11-04 00:51:20.000000000 +0200
-+++ aiccu/unix-console/Makefile        2006-11-04 00:48:51.000000000 +0200
+--- a/unix-console/Makefile
++++ b/unix-console/Makefile
 @@ -10,9 +10,9 @@
- #  $Date: 2006-07-25 09:20:48 $
+ #  $Date: 2007-01-15 11:04:27 $
  # **********************************************************/
  
 -SRCS  = main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c
index fbd6a5093e01eb69c8a14342f005965b5a269910..1a5f11626e057779aaef6afe115c65b42e721879 100644 (file)
@@ -1,29 +1,40 @@
---- aiccu/common/resolver.c.orig       2007-09-02 23:10:58.000000000 +0200
-+++ aiccu/common/resolver.c    2007-09-02 23:11:01.000000000 +0200
+--- a/common/resolver.c
++++ b/common/resolver.c
 @@ -26,7 +26,7 @@
  
  int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record))
  {
 -#ifdef _LINUX
-+#if defined(_LINUX) && !defined(__UCLIBC__)
++#if defined(_LINUX) && defined(__GLIBC__)
        struct __res_state      res;
  #endif
        unsigned char           answer[8192];
-@@ -38,7 +38,7 @@
+@@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype
        uint16_t                type = 0, class = 0;
        uint32_t                ttl = 0;
  
 -#ifdef _LINUX
-+#if defined(_LINUX) && !defined(__UCLIBC__)
++#if defined(_LINUX) && defined(__GLIBC__)
        memset(&res, 0, sizeof(res));
        res.options = RES_DEBUG;
        res_ninit(&res);
-@@ -47,7 +47,7 @@
+@@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype
  #endif
  
        memset(answer, 0, sizeof(answer));
 -#ifdef _LINUX
-+#if defined(_LINUX) && !defined(__UCLIBC__)
++#if defined(_LINUX) && defined(__GLIBC__)
        ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer));
  #else
        ret = res_query(label, C_IN, rrtype, answer, sizeof(answer));
+--- a/common/dn_skipname.c
++++ b/common/dn_skipname.c
+@@ -9,7 +9,7 @@
+  * return:
+  *      0 on success, -1 (with errno set) on failure.
+  */
+-int ns_name_skip(const u_char **ptrptr, const u_char *eom)
++static int ns_name_skip(const u_char **ptrptr, const u_char *eom)
+ {
+       const u_char *cp;
+       u_int n;
diff --git a/ipv6/aiccu/patches/400-musl-compat.patch b/ipv6/aiccu/patches/400-musl-compat.patch
new file mode 100644 (file)
index 0000000..2e732d8
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/common/common.h
++++ b/common/common.h
+@@ -50,6 +50,7 @@
+ #include <signal.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/uio.h>
+ #include <fcntl.h>
+ #if defined(_SUNOS) || defined(_AIX) || defined(_DARWIN)
+@@ -91,7 +92,9 @@
+       #include <sys/select.h>
+       #include <net/if.h>
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+       #include <netinet/if_ether.h>
++#endif
+ #ifdef linux
+       #include <netpacket/packet.h>
+       #include <linux/if_tun.h>
+--- a/common/dn_skipname.c
++++ b/common/dn_skipname.c
+@@ -1,5 +1,6 @@
+ #include <errno.h>
+ #include <resolv.h>
++#include <sys/types.h>
+ /* Ripped from glibc 2.4 sources. */
index a62d7e0759263ddaaa8575b12a5504528dcc3719..b17b945d3d35187c264ada5062676d66b659f788 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lzmq
-PKG_VERSION:=0.4.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.4.3
+PKG_RELEASE:=1
 PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/tar.gz/v0.4.2?
-PKG_MD5SUM:=ec9e15bd1495f4c87959fe22a368523d
+PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/tar.gz/v$(PKG_VERSION)?
+PKG_MD5SUM:=c4e51a60a5a26987bdce59e45d674a9e
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
index c915bbf66dff696fc3090975ce26bd5c9deaf860..5780a6240e6afcdcbbb3d695c7d621f0f0053496 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl
 PKG_VERSION:=5.20.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
                http://www.cpan.org/src/5.0/perl-5.20.0.tar.gz \
@@ -128,6 +128,26 @@ define Build/Configure
                -e 's!%%HOSTGENERATE%%!$(HOST_PERL_PREFIX)/bin/generate_uudmap!g' \
                files/config.sh-$(patsubst i386,i486,$(ARCH))$(PERL_CONFIG_SUFFIX).in \
                > $(PKG_BUILD_DIR)/config.sh
+  ifeq ($(CONFIG_USE_MUSL),y)
+       sed -i \
+               -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
+               -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
+               -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
+               -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
+               -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
+               -e "s,\(getprotobyname_r=\)'define',\1'undef',g" \
+               -e "s,\(getpwent_r=\)'define',\1'undef',g" \
+               -e "s,\(getservent_r=\)'define',\1'undef',g" \
+               -e "s,\(gethostent_r=\)'define',\1'undef',g" \
+               -e "s,\(getnetent_r=\)'define',\1'undef',g" \
+               -e "s,\(getnetbyaddr_r=\)'define',\1'undef',g" \
+               -e "s,\(getprotoent_r=\)'define',\1'undef',g" \
+               -e "s,\(getprotobynumber_r=\)'define',\1'undef',g" \
+               -e "s,\(getgrent_r=\)'define',\1'undef',g" \
+               -e "s,\(i_fcntl=\)'undef',\1'define',g" \
+               -e "s,\(h_fcntl=\)'false',\1'true',g" \
+               $(PKG_BUILD_DIR)/config.sh
+  endif
        (cd $(PKG_BUILD_DIR) && ./Configure -S)
        install -m 0644 $(PKG_BUILD_DIR)/config.h $(PKG_BUILD_DIR)/xconfig.h
 endef
diff --git a/lang/perl/patches/100-musl-compat.patch b/lang/perl/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..8dbad78
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/pp.c
++++ b/pp.c
+@@ -43,7 +43,7 @@ extern Pid_t getpid (void);
+  * Some BSDs and Cygwin default to POSIX math instead of IEEE.
+  * This switches them over to IEEE.
+  */
+-#if defined(LIBM_LIB_VERSION)
++#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__))
+     _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
+ #endif
index 61e188ae9b92f2f8aff76fe883f24a48e5118a6d..8d716af9fa3713726d58d199374700643d00977b 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnutls
-PKG_VERSION:=3.4.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.4.2
+PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4
-PKG_MD5SUM:=2d04f34fa25b45f9dcb9104c0394e12e
+PKG_MD5SUM:=4fb4a6253e09aa070e6c467cbb51ba33
 #PKG_FIXUP:=autoreconf gettext-version
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
 PKG_LICENSE:=LGPLv2.1+
diff --git a/libs/gnutls/patches/001-camellia256-gcm-corrected-regression.patch b/libs/gnutls/patches/001-camellia256-gcm-corrected-regression.patch
deleted file mode 100644 (file)
index e29e38e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From 6adde30fcea02d3cb541b5a5bfb3b12074f1f3e9 Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@redhat.com>
-Date: Thu, 14 May 2015 14:00:11 +0200
-Subject: [PATCH] camellia256-gcm: corrected regression
-
-Reported by Manuel Pegourie-Gonnard.
----
- lib/nettle/cipher.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/nettle/cipher.c b/lib/nettle/cipher.c
-index 59e70dd..74e4203 100644
---- a/lib/nettle/cipher.c
-+++ b/lib/nettle/cipher.c
-@@ -302,7 +302,7 @@ static const struct nettle_cipher_st builtin_ciphers[] = {
-          .ctx_size = sizeof(struct gcm_camellia256_ctx),
-          .encrypt = _gcm_encrypt,
-          .decrypt = _gcm_decrypt,
--         .set_encrypt_key = (nettle_set_key_func*)gcm_camellia128_set_key,
-+         .set_encrypt_key = (nettle_set_key_func*)gcm_camellia256_set_key,
-          .set_decrypt_key = (nettle_set_key_func*)gcm_camellia256_set_key,
-          
-          .tag = (nettle_hash_digest_func*)gcm_camellia256_digest,
--- 
-2.1.4
-
index 9c634df7bad2d8a2ff1cdbc15736d39addecb780..3b269f137a0ac76a06d8dc801313211242836566 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdaq
 PKG_VERSION:=2.0.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
        @SF/snort
index 6eadb9ee628c871a0e81eee20fc2c16e69a5e97f..b8dd94241e8c7ece2fa9658688736d0aeba5c4a3 100644 (file)
@@ -1,8 +1,8 @@
---- daq-1.1.1/configure        2012-07-10 21:32:51.000000000 +0200
-+++ daq-new/configure  2012-08-03 15:47:07.654945651 +0200
-@@ -12717,10 +12717,11 @@
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpcap version >= \"1.0.0\"" >&5
- $as_echo_n "checking for libpcap version >= \"1.0.0\"... " >&6; }
+--- a/configure
++++ b/configure
+@@ -12967,10 +12967,11 @@ if ${daq_cv_libpcap_version_1x+:} false;
+ else
      if test "$cross_compiling" = yes; then :
 -  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
diff --git a/libs/libdaq/patches/100-musl-compat.patch b/libs/libdaq/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..c510564
--- /dev/null
@@ -0,0 +1,42 @@
+--- a/os-daq-modules/daq_ipfw.c
++++ b/os-daq-modules/daq_ipfw.c
+@@ -23,10 +23,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+--- a/os-daq-modules/daq_ipq.c
++++ b/os-daq-modules/daq_ipq.c
+@@ -24,10 +24,10 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
+ #include <netinet/ip.h>
+--- a/os-daq-modules/daq_nfq.c
++++ b/os-daq-modules/daq_nfq.c
+@@ -24,10 +24,10 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
+ #include <netinet/ip.h>
index e9c4a3c7017adae9209d262b549a6df6f2a2262a..ee9ecc659440ab217931b0c4a4d250f0f31d6ce3 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpam
-PKG_VERSION:=1.1.8
-PKG_RELEASE:=4
+PKG_VERSION:=1.2.0
+PKG_RELEASE:=2
 
 PKG_SOURCE:=Linux-PAM-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.linux-pam.org/library/
-PKG_MD5SUM:=35b6091af95981b1b2cd60d813b5e4ee
+PKG_MD5SUM:=ee4a480d77b341c99e8b1375f8f180c0
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
@@ -45,6 +45,8 @@ define Build/Configure
                --disable-selinux \
                --disable-nls \
                --disable-rpath \
+               --disable-nis \
+               --disable-regenerate-docu \
                --enable-db=no \
        )
 endef
diff --git a/libs/libpam/patches/000-OE-libpam-xtests.patch b/libs/libpam/patches/000-OE-libpam-xtests.patch
deleted file mode 100644 (file)
index 19fbaa2..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-This patch is used to create a new sub package libpam-xtests to do more checks.
-
-Upstream-Status: Pending
-
-Signed-off-by: Kang Kai <kai.kang@windriver.com>
---- a/xtests/Makefile.am
-+++ b/xtests/Makefile.am
-@@ -7,7 +7,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_src
- LDADD = $(top_builddir)/libpam/libpam.la \
-       $(top_builddir)/libpam_misc/libpam_misc.la
--CLEANFILES = *~ $(XTESTS)
-+CLEANFILES = *~
- EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
-       tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
-@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS)
- xtests: $(XTESTS) run-xtests.sh
-       "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS}
-+
-+all: $(XTESTS)
-+
-+install: install_xtests
-+
-+install_xtests:
-+      $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests
-+      for file in $(EXTRA_DIST) ; do \
-+              $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \
-+      done
-+      for file in $(XTESTS); do \
-+              $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \
-+      done
-+
-+.PHONY: all install_xtests
diff --git a/libs/libpam/patches/000-OE-pam-no-innetgr.patch b/libs/libpam/patches/000-OE-pam-no-innetgr.patch
deleted file mode 100644 (file)
index f7f5b48..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-innetgr may not be there so make sure that when innetgr is not present
-then we inform about it and not use it.
-
--Khem
---- a/modules/pam_group/pam_group.c
-+++ b/modules/pam_group/pam_group.c
-@@ -656,7 +656,11 @@ static int check_account(pam_handle_t *p
-       }
-       /* If buffer starts with @, we are using netgroups */
-       if (buffer[0] == '@')
-+#ifdef HAVE_INNETGR
-         good &= innetgr (&buffer[1], NULL, user, NULL);
-+#else
-+      pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support");
-+#endif
-       /* otherwise, if the buffer starts with %, it's a UNIX group */
-       else if (buffer[0] == '%')
-           good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
---- a/modules/pam_time/pam_time.c
-+++ b/modules/pam_time/pam_time.c
-@@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const
-         }
-         /* If buffer starts with @, we are using netgroups */
-         if (buffer[0] == '@')
--          good &= innetgr (&buffer[1], NULL, user, NULL);
-+#ifdef HAVE_INNETGR
-+             good &= innetgr (&buffer[1], NULL, user, NULL);
-+#else
-+             pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support");
-+#endif
-         else
--          good &= logic_field(pamh, user, buffer, count, is_same);
-+             good &= logic_field(pamh, user, buffer, count, is_same);
-         D(("with user: %s", good ? "passes":"fails" ));
-         /* here we get the time field */
---- a/modules/pam_succeed_if/pam_succeed_if.c
-+++ b/modules/pam_succeed_if/pam_succeed_if.c
-@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh,
- }
- /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
- static int
--evaluate_innetgr(const char *host, const char *user, const char *group)
-+evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
- {
-+#ifdef HAVE_INNETGR
-       if (innetgr(group, host, user, NULL) == 1)
-               return PAM_SUCCESS;
-+#else
-+        pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
-+#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)
-+evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
- {
-+#ifdef HAVE_INNETGR
-       if (innetgr(group, host, user, NULL) == 0)
-               return PAM_SUCCESS;
-+#else
-+      pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
-+#endif
-       return PAM_AUTH_ERR;
- }
-@@ -387,14 +396,14 @@ evaluate(pam_handle_t *pamh, int debug,
-               const void *rhost;
-               if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
-                       rhost = NULL;
--              return evaluate_innetgr(rhost, user, right);
-+              return evaluate_innetgr(pamh, 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);
-+              return evaluate_notinnetgr(pamh, rhost, user, right);
-       }
-       /* Fail closed. */
-       return PAM_SERVICE_ERR;
diff --git a/libs/libpam/patches/0001-build-always-use-lib-instead-of-lib64.patch b/libs/libpam/patches/0001-build-always-use-lib-instead-of-lib64.patch
new file mode 100644 (file)
index 0000000..25d9a4a
--- /dev/null
@@ -0,0 +1,36 @@
+From 1948dd03d69c1a50e92d7e8868b7d6eabd4873c1 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 17 Jun 2015 16:11:31 +0800
+Subject: [PATCH 1/7] build: always use /lib instead of /lib64.
+
+* configure.ac: OpenWrt does not use /lib64.
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ configure.ac |   10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fd0e310..306b6e2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,15 +25,7 @@ dnl If we use /usr as prefix, use /etc for config files
+         then
+                 sysconfdir="/etc"
+         fi
+-      if test ${libdir} = '${exec_prefix}/lib'
+-      then
+-              case "`uname -m`" in
+-                  x86_64|ppc64|s390x|sparc64)
+-                      libdir="/lib64" ;;
+-                  *)
+-                      libdir="/lib" ;;
+-              esac
+-      fi
++      libdir="/lib"
+       if test ${sbindir} = '${exec_prefix}/sbin'
+         then
+                 sbindir="/sbin"
+-- 
+1.7.10.4
+
diff --git a/libs/libpam/patches/0002-build-ignore-pam_rhosts-if-neither-ruserok-nor-ruser.patch b/libs/libpam/patches/0002-build-ignore-pam_rhosts-if-neither-ruserok-nor-ruser.patch
new file mode 100644 (file)
index 0000000..abafcbb
--- /dev/null
@@ -0,0 +1,77 @@
+From 1a2e6c979118dce5e79604e88c008c7879d1e4e6 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 17 Jun 2015 18:19:23 +0800
+Subject: [PATCH 2/7] build: ignore pam_rhosts if neither ruserok nor
+ ruserok_af is available.
+
+* configure.ac: check for ruserok and ruserok_af
+* modules/Makefile.am: ignore pam_rhosts/ if it's disabled
+* modules/pam_rhosts/pam_rhosts.c: include stdlib.h for malloc and free
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ configure.ac                    |    5 ++++-
+ modules/Makefile.am             |   11 ++++++++---
+ modules/pam_rhosts/pam_rhosts.c |    1 +
+ 3 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 306b6e2..084071a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -534,7 +534,10 @@ AC_CHECK_FUNCS(fseeko getdomainname gethostname gettimeofday lckpwdf mkdir selec
+ AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname)
+ AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r)
+ AC_CHECK_FUNCS(getgrouplist getline getdelim)
+-AC_CHECK_FUNCS(inet_ntop inet_pton innetgr ruserok_af)
++AC_CHECK_FUNCS(inet_ntop inet_pton innetgr)
++AC_CHECK_FUNCS([ruserok_af ruserok], [break])
++
++AM_CONDITIONAL([COND_BUILD_PAM_RHOSTS], [test "$ac_cv_func_ruserok_af" = yes -o "$ac_cv_func_ruserok" = yes])
+ AC_CHECK_FUNCS(unshare, [UNSHARE=yes], [UNSHARE=no])
+ AM_CONDITIONAL([HAVE_UNSHARE], [test "$UNSHARE" = yes])
+diff --git a/modules/Makefile.am b/modules/Makefile.am
+index 0c80cea..9ad26a9 100644
+--- a/modules/Makefile.am
++++ b/modules/Makefile.am
+@@ -2,16 +2,21 @@
+ # Copyright (c) 2005, 2006, 2008 Thorsten Kukuk <kukuk@thkukuk.de>
+ #
+-SUBDIRS = pam_access pam_cracklib pam_debug pam_deny pam_echo \
++if COND_BUILD_PAM_RHOSTS
++      MAYBE_PAM_RHOSTS = pam_rhosts
++endif
++
++SUBDIRS := pam_access pam_cracklib pam_debug pam_deny pam_echo \
+       pam_env pam_exec pam_faildelay pam_filter pam_ftp \
+       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 \
+-      pam_unix pam_userdb pam_warn pam_wheel pam_xauth
++      pam_unix pam_userdb pam_warn pam_wheel pam_xauth \
++      $(MAYBE_PAM_RHOSTS)
+ CLEANFILES = *~
+diff --git a/modules/pam_rhosts/pam_rhosts.c b/modules/pam_rhosts/pam_rhosts.c
+index bc9e76f..51ef13e 100644
+--- a/modules/pam_rhosts/pam_rhosts.c
++++ b/modules/pam_rhosts/pam_rhosts.c
+@@ -35,6 +35,7 @@
+ #include <pwd.h>
+ #include <netdb.h>
+ #include <string.h>
++#include <stdlib.h>
+ #include <syslog.h>
+ #define PAM_SM_AUTH  /* only defines this management group */
+-- 
+1.7.10.4
+
diff --git a/libs/libpam/patches/0003-build-ignore-pam_lastlog-when-logwtmp-is-not-availab.patch b/libs/libpam/patches/0003-build-ignore-pam_lastlog-when-logwtmp-is-not-availab.patch
new file mode 100644 (file)
index 0000000..2f3f19c
--- /dev/null
@@ -0,0 +1,60 @@
+From bac1ee3033cf22e31730fe3e77ca82bd5ebba692 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 17 Jun 2015 21:18:05 +0800
+Subject: [PATCH 3/7] build: ignore pam_lastlog when logwtmp is not available.
+
+* configure.ac: check logwtmp and set COND_BUILD_PAM_LASTLOG
+* modules/pam_lastlog/Makefile.am: check COND_BUILD_PAM_LASTLOG
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ configure.ac        |    2 ++
+ modules/Makefile.am |    8 ++++++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 084071a..ca4bf5b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -536,8 +536,10 @@ AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r
+ AC_CHECK_FUNCS(getgrouplist getline getdelim)
+ AC_CHECK_FUNCS(inet_ntop inet_pton innetgr)
+ AC_CHECK_FUNCS([ruserok_af ruserok], [break])
++AC_CHECK_FUNCS([logwtmp])
+ AM_CONDITIONAL([COND_BUILD_PAM_RHOSTS], [test "$ac_cv_func_ruserok_af" = yes -o "$ac_cv_func_ruserok" = yes])
++AM_CONDITIONAL([COND_BUILD_PAM_LASTLOG], [test "$ac_cv_func_logwtmp" = yes])
+ AC_CHECK_FUNCS(unshare, [UNSHARE=yes], [UNSHARE=no])
+ AM_CONDITIONAL([HAVE_UNSHARE], [test "$UNSHARE" = yes])
+diff --git a/modules/Makefile.am b/modules/Makefile.am
+index 9ad26a9..b98dc5c 100644
+--- a/modules/Makefile.am
++++ b/modules/Makefile.am
+@@ -6,9 +6,13 @@ if COND_BUILD_PAM_RHOSTS
+       MAYBE_PAM_RHOSTS = pam_rhosts
+ endif
++if COND_BUILD_PAM_LASTLOG
++      MAYBE_PAM_LASTLOG = pam_lastlog
++endif
++
+ SUBDIRS := pam_access pam_cracklib pam_debug pam_deny pam_echo \
+       pam_env pam_exec pam_faildelay pam_filter pam_ftp \
+-      pam_group pam_issue pam_keyinit pam_lastlog pam_limits \
++      pam_group pam_issue pam_keyinit pam_limits \
+       pam_listfile pam_localuser pam_loginuid pam_mail \
+       pam_mkhomedir pam_motd pam_namespace pam_nologin \
+       pam_permit pam_pwhistory pam_rootok pam_securetty \
+@@ -16,7 +20,7 @@ SUBDIRS := pam_access pam_cracklib pam_debug pam_deny pam_echo \
+       pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \
+       pam_tty_audit pam_umask \
+       pam_unix pam_userdb pam_warn pam_wheel pam_xauth \
+-      $(MAYBE_PAM_RHOSTS)
++      $(MAYBE_PAM_RHOSTS) $(MAYBE_PAM_LASTLOG)
+ CLEANFILES = *~
+-- 
+1.7.10.4
+
diff --git a/libs/libpam/patches/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch b/libs/libpam/patches/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch
new file mode 100644 (file)
index 0000000..04e6173
--- /dev/null
@@ -0,0 +1,28 @@
+From a35daea1b8be768d1b0be6eae157fbf3e5380f92 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 17 Jun 2015 18:22:31 +0800
+Subject: [PATCH 4/7] build: fix build when crypt() is not part of crypt_libs.
+
+* configure.ac: ditto.
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ configure.ac |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index ca4bf5b..6553c78 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -408,7 +408,7 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"],
+   [crypt_libs="crypt"])
+ BACKUP_LIBS=$LIBS
+-AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
++AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_lib:+-l$ac_lib}", LIBCRYPT="")
+ AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
+ LIBS=$BACKUP_LIBS
+ AC_SUBST(LIBCRYPT)
+-- 
+1.7.10.4
+
diff --git a/libs/libpam/patches/0005-build-fix-doc-build.patch b/libs/libpam/patches/0005-build-fix-doc-build.patch
new file mode 100644 (file)
index 0000000..cd9b0a8
--- /dev/null
@@ -0,0 +1,133 @@
+From 1563e57ea8ab9d123f765129a6840929ef58ff7a Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 17 Jun 2015 20:38:41 +0800
+Subject: [PATCH 5/7] build: fix doc build.
+
+* Makefile.am: ignore doc/ directory if not ENABLE_REGENERATE_MAN
+* doc/adg/Makefile.am: remove check on ENABLE_REGENERATE_MAN
+* doc/man/Makefile.am: ditto
+* doc/mwg/Makefile.am: ditto
+* doc/sag/Makefile.am: ditto
+* doc/specs/Makefile.am: ignore CC from command line
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ Makefile.am           |    5 ++++-
+ doc/adg/Makefile.am   |    3 ---
+ doc/man/Makefile.am   |    2 --
+ doc/mwg/Makefile.am   |    3 ---
+ doc/sag/Makefile.am   |    2 --
+ doc/specs/Makefile.am |    2 +-
+ 6 files changed, 5 insertions(+), 12 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 3db4e37..5e6592a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -4,7 +4,10 @@
+ AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
+-SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
++if ENABLE_REGENERATE_MAN
++      MAYBE_DOC = doc
++endif
++SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests $(MAYBE_DOC)
+ CLEANFILES = *~
+diff --git a/doc/adg/Makefile.am b/doc/adg/Makefile.am
+index 77bd7a9..bec5edc 100644
+--- a/doc/adg/Makefile.am
++++ b/doc/adg/Makefile.am
+@@ -9,7 +9,6 @@ EXTRA_DIST = $(XMLS)
+ XMLS = Linux-PAM_ADG.xml $(shell ls $(srcdir)/pam_*.xml)
+ DEP_XMLS = $(shell ls $(top_srcdir)/doc/man/pam_*.xml)
+-if ENABLE_REGENERATE_MAN
+ MAINTAINERCLEANFILES = Linux-PAM_ADG.txt Linux-PAM_ADG.pdf html/*.html
+ all: Linux-PAM_ADG.txt html/Linux-PAM_ADG.html Linux-PAM_ADG.pdf
+@@ -51,8 +50,6 @@ html/Linux-PAM_ADG.html: $(XMLS) $(DEP_XMLS)
+ distclean-local:
+       -rm -rf html Linux-PAM_ADG.txt Linux-PAM_ADG.pdf
+-endif
+-
+ install-data-local:
+       $(mkinstalldirs) $(DESTDIR)$(docdir)
+       $(mkinstalldirs) $(DESTDIR)$(pdfdir)
+diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
+index 78c891d..b1dc421 100644
+--- a/doc/man/Makefile.am
++++ b/doc/man/Makefile.am
+@@ -45,7 +45,6 @@ XMLS = pam.3.xml pam.8.xml \
+       misc_conv.3.xml pam_misc_paste_env.3.xml pam_misc_drop_env.3.xml \
+       pam_misc_setenv.3.xml
+-if ENABLE_REGENERATE_MAN
+ PAM.8: pam.8
+ pam_get_authtok_noverify.3: pam_get_authtok.3
+ pam_get_authtok_verify.3: pam_get_authtok.3
+@@ -60,4 +59,3 @@ pam_get_item.3: pam_item_types_std.inc.xml pam_item_types_ext.inc.xml
+ pam_set_data.3: pam_item_types_std.inc.xml pam_item_types_ext.inc.xml
+ pam.conf.5: pam.conf-desc.xml pam.conf-dir.xml pam.conf-syntax.xml
+ -include $(top_srcdir)/Make.xml.rules
+-endif
+diff --git a/doc/mwg/Makefile.am b/doc/mwg/Makefile.am
+index 2bbb2d0..f57e297 100644
+--- a/doc/mwg/Makefile.am
++++ b/doc/mwg/Makefile.am
+@@ -9,7 +9,6 @@ EXTRA_DIST = $(XMLS)
+ XMLS = Linux-PAM_MWG.xml $(shell ls $(srcdir)/pam_*.xml)
+ DEP_XMLS = $(shell ls $(top_srcdir)/doc/man/pam_*.xml)
+-if ENABLE_REGENERATE_MAN
+ MAINTAINERCLEANFILES = Linux-PAM_MWG.txt Linux-PAM_MWG.pdf html/*.html
+ all: Linux-PAM_MWG.txt html/Linux-PAM_MWG.html Linux-PAM_MWG.pdf
+@@ -51,8 +50,6 @@ html/Linux-PAM_MWG.html: $(XMLS) $(DEP_XMLS)
+ distclean-local:
+       -rm -rf html Linux-PAM_MWG.txt Linux-PAM_MWG.pdf
+-endif
+-
+ install-data-local:
+       $(mkinstalldirs) $(DESTDIR)$(docdir)
+       $(mkinstalldirs) $(DESTDIR)$(pdfdir)
+diff --git a/doc/sag/Makefile.am b/doc/sag/Makefile.am
+index 31816aa..a8b655f 100644
+--- a/doc/sag/Makefile.am
++++ b/doc/sag/Makefile.am
+@@ -10,7 +10,6 @@ XMLS = Linux-PAM_SAG.xml $(shell ls $(srcdir)/pam_*.xml)
+ DEP_XMLS = $(shell ls $(top_srcdir)/modules/pam_*/pam_*.xml)
+-if ENABLE_REGENERATE_MAN
+ MAINTAINERCLEANFILES = Linux-PAM_SAG.txt Linux-PAM_SAG.pdf html/*.html
+ all: Linux-PAM_SAG.txt html/Linux-PAM_SAG.html Linux-PAM_SAG.pdf
+@@ -51,7 +50,6 @@ html/Linux-PAM_SAG.html: $(XMLS) $(DEP_XMLS)
+ distclean-local:
+       -rm -rf html Linux-PAM_SAG.txt Linux-PAM_SAG.pdf
+-endif
+ install-data-local:
+       $(mkinstalldirs) $(DESTDIR)$(docdir)
+diff --git a/doc/specs/Makefile.am b/doc/specs/Makefile.am
+index 99ecc70..39c850f 100644
+--- a/doc/specs/Makefile.am
++++ b/doc/specs/Makefile.am
+@@ -11,7 +11,7 @@ draft-morgan-pam-current.txt: padout draft-morgan-pam.raw
+ AM_YFLAGS = -d
+-CC = @CC_FOR_BUILD@
++override CC = @CC_FOR_BUILD@
+ CPPFLAGS = @BUILD_CPPFLAGS@
+ CFLAGS = @BUILD_CFLAGS@
+ LDFLAGS = @BUILD_LDFLAGS@
+-- 
+1.7.10.4
+
diff --git a/libs/libpam/patches/0006-pam_unix-fix-compilation-in-case-rpc-rpc.h-is-missin.patch b/libs/libpam/patches/0006-pam_unix-fix-compilation-in-case-rpc-rpc.h-is-missin.patch
new file mode 100644 (file)
index 0000000..014684f
--- /dev/null
@@ -0,0 +1,29 @@
+From 2e3ed4c6fb09f84fede589047d37d11783202d34 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 17 Jun 2015 18:16:18 +0800
+Subject: [PATCH 6/7] pam_unix: fix compilation in case rpc/rpc.h is missing.
+
+* modules/pam_unix/pam_unix_passwd.c: conditional compile on the
+  availability of rpc/rpc.h
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ modules/pam_unix/pam_unix_passwd.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
+index 2d330e5..970724a 100644
+--- a/modules/pam_unix/pam_unix_passwd.c
++++ b/modules/pam_unix/pam_unix_passwd.c
+@@ -336,7 +336,7 @@ static int _do_setpass(pam_handle_t* pamh, const char *forwho,
+       }
+       if (on(UNIX_NIS, ctrl) && _unix_comesfromsource(pamh, forwho, 0, 1)) {
+-#ifdef HAVE_NIS
++#if defined(HAVE_NIS) && defined(HAVE_RPC_RPC_H)
+         if ((master=getNISserver(pamh, ctrl)) != NULL) {
+               struct timeval timeout;
+               struct yppasswd yppwd;
+-- 
+1.7.10.4
+
diff --git a/libs/libpam/patches/0007-Check-if-innetgr-is-available-at-compile-time.patch b/libs/libpam/patches/0007-Check-if-innetgr-is-available-at-compile-time.patch
new file mode 100644 (file)
index 0000000..f79b01a
--- /dev/null
@@ -0,0 +1,106 @@
+From c681bd104627139eac2f40fe303e1f67676233e8 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 17 Jun 2015 15:33:43 +0800
+Subject: [PATCH 7/7] Check if innetgr is available at compile time.
+
+innetgr may not be there so make sure that when innetgr is not present
+then we inform about it and not use it.
+
+* modules/pam_group/pam_group.c: ditto
+* modules/pam_succeed_if/pam_succeed_if.c: ditto
+* modules/pam_time/pam_time.c: ditto
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
+---
+ modules/pam_group/pam_group.c           |    4 ++++
+ modules/pam_succeed_if/pam_succeed_if.c |   17 +++++++++++++----
+ modules/pam_time/pam_time.c             |    4 ++++
+ 3 files changed, 21 insertions(+), 4 deletions(-)
+
+diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c
+index be5f20f..6a065ca 100644
+--- a/modules/pam_group/pam_group.c
++++ b/modules/pam_group/pam_group.c
+@@ -656,7 +656,11 @@ static int check_account(pam_handle_t *pamh, const char *service,
+       }
+       /* If buffer starts with @, we are using netgroups */
+       if (buffer[0] == '@')
++#ifdef HAVE_INNETGR
+         good &= innetgr (&buffer[1], NULL, user, NULL);
++#else
++        pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support");
++#endif
+       /* otherwise, if the buffer starts with %, it's a UNIX group */
+       else if (buffer[0] == '%')
+           good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
+diff --git a/modules/pam_succeed_if/pam_succeed_if.c b/modules/pam_succeed_if/pam_succeed_if.c
+index aa828fc..c0c68a0 100644
+--- a/modules/pam_succeed_if/pam_succeed_if.c
++++ b/modules/pam_succeed_if/pam_succeed_if.c
+@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh, const char *user, const char *group)
+ }
+ /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
+ static int
+-evaluate_innetgr(const char *host, const char *user, const char *group)
++evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
+ {
++#ifdef HAVE_INNETGR
+       if (innetgr(group, host, user, NULL) == 1)
+               return PAM_SUCCESS;
++#else
++      pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
++#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)
++evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
+ {
++#ifdef HAVE_INNETGR
+       if (innetgr(group, host, user, NULL) == 0)
+               return PAM_SUCCESS;
++#else
++      pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
++#endif
+       return PAM_AUTH_ERR;
+ }
+@@ -387,14 +396,14 @@ evaluate(pam_handle_t *pamh, int debug,
+               const void *rhost;
+               if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
+                       rhost = NULL;
+-              return evaluate_innetgr(rhost, user, right);
++              return evaluate_innetgr(pamh, 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);
++              return evaluate_notinnetgr(pamh, rhost, user, right);
+       }
+       /* Fail closed. */
+       return PAM_SERVICE_ERR;
+diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c
+index c94737c..0b34a14 100644
+--- a/modules/pam_time/pam_time.c
++++ b/modules/pam_time/pam_time.c
+@@ -555,7 +555,11 @@ check_account(pam_handle_t *pamh, const char *service,
+         }
+         /* If buffer starts with @, we are using netgroups */
+         if (buffer[0] == '@')
++#ifdef HAVE_INNETGR
+           good &= innetgr (&buffer[1], NULL, user, NULL);
++#else
++          pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support");
++#endif
+         else
+           good &= logic_field(pamh, user, buffer, count, is_same);
+         D(("with user: %s", good ? "passes":"fails" ));
+-- 
+1.7.10.4
+
diff --git a/libs/libpam/patches/001-no_nis.patch b/libs/libpam/patches/001-no_nis.patch
deleted file mode 100644 (file)
index c9988c7..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
---- a/modules/pam_access/pam_access.c
-+++ b/modules/pam_access/pam_access.c
-@@ -44,7 +44,7 @@
- #include <arpa/inet.h>
- #include <netdb.h>
- #include <sys/socket.h>
--#ifdef HAVE_RPCSVC_YPCLNT_H
-+#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
- #include <rpcsvc/ypclnt.h>
- #endif
- #ifdef HAVE_LIBAUDIT
---- a/modules/pam_unix/pam_unix_passwd.c
-+++ b/modules/pam_unix/pam_unix_passwd.c
-@@ -79,18 +79,18 @@
- #include "passverify.h"
- #include "bigcrypt.h"
--#if (HAVE_YP_GET_DEFAULT_DOMAIN || HAVE_GETDOMAINNAME) && HAVE_YP_MASTER
-+#if (HAVE_YP_GET_DEFAULT_DOMAIN || HAVE_GETDOMAINNAME) && HAVE_YP_MASTER && USE_NIS
- # define HAVE_NIS
- #endif
- #ifdef HAVE_NIS
- # include <rpc/rpc.h>
--# if HAVE_RPCSVC_YP_PROT_H
-+# if HAVE_RPCSVC_YP_PROT_H && USE_NIS
- #  include <rpcsvc/yp_prot.h>
- # endif
--# if HAVE_RPCSVC_YPCLNT_H
-+# if HAVE_RPCSVC_YPCLNT_H && USE_NIS
- #  include <rpcsvc/ypclnt.h>
- # endif
---- a/modules/pam_unix/support.c
-+++ b/modules/pam_unix/support.c
-@@ -19,7 +19,7 @@
- #include <ctype.h>
- #include <syslog.h>
- #include <sys/resource.h>
--#ifdef HAVE_RPCSVC_YPCLNT_H
-+#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
- #include <rpcsvc/ypclnt.h>
- #endif
-@@ -402,7 +402,7 @@ int _unix_getpwnam(pam_handle_t *pamh, c
-               }
-       }
--#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND)
-+#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND) && (USE_NIS)
-       if (!matched && nis) {
-               char *userinfo = NULL, *domain = NULL;
-               int len = 0, i;
---- a/modules/pam_unix/yppasswd_xdr.c
-+++ b/modules/pam_unix/yppasswd_xdr.c
-@@ -15,6 +15,10 @@
- #ifdef HAVE_RPC_RPC_H
- #include <rpc/rpc.h>
-+#ifdef USE_NIS
-+#include <rpcsvc/yp_prot.h>
-+#include <rpcsvc/ypclnt.h>
-+#endif
- #include "yppasswd.h"
- bool_t
diff --git a/libs/libpam/patches/002-no_yywrap.patch b/libs/libpam/patches/002-no_yywrap.patch
deleted file mode 100644 (file)
index 0d73e4b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/conf/pam_conv1/pam_conv_l.c
-+++ b/conf/pam_conv1/pam_conv_l.c
-@@ -534,7 +534,9 @@ void yyset_lineno (int line_number  );
- #ifdef __cplusplus
- extern "C" int yywrap (void );
- #else
--extern int yywrap (void );
-+int yywrap (void ) {
-+      return 1;
-+}
- #endif
- #endif
---- a/doc/specs/parse_l.c
-+++ b/doc/specs/parse_l.c
-@@ -520,7 +520,9 @@ void yyset_lineno (int line_number  );
- #ifdef __cplusplus
- extern "C" int yywrap (void );
- #else
--extern int yywrap (void );
-+int yywrap (void ) {
-+      return 1;
-+}
- #endif
- #endif
diff --git a/libs/libpam/patches/003-no_doc.patch b/libs/libpam/patches/003-no_doc.patch
deleted file mode 100644 (file)
index d366215..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4,7 +4,7 @@
- AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
--SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
-+SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
- CLEANFILES = *~
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -288,7 +288,7 @@ top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
--SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
-+SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
- CLEANFILES = *~
- EXTRA_DIST = pgp.keys.asc CHANGELOG ChangeLog-CVS Copyright Make.xml.rules
- ACLOCAL_AMFLAGS = -I m4
diff --git a/libs/libpam/patches/004-fix_lib64.patch b/libs/libpam/patches/004-fix_lib64.patch
deleted file mode 100644 (file)
index 5605d82..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/configure.in
-+++ b/configure.in
-@@ -28,12 +28,7 @@ dnl If we use /usr as prefix, use /etc f
-         fi
-       if test ${libdir} = '${exec_prefix}/lib'
-       then
--              case "`uname -m`" in
--                  x86_64|ppc64|s390x|sparc64)
--                      libdir="/lib64" ;;
--                  *)
--                      libdir="/lib" ;;
--              esac
-+              libdir="/lib"
-       fi
-       if test ${sbindir} = '${exec_prefix}/sbin'
-         then
diff --git a/libs/libpam/patches/005-fix_ruserok.patch b/libs/libpam/patches/005-fix_ruserok.patch
deleted file mode 100644 (file)
index 1f0f463..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
---- a/modules/pam_rhosts/pam_rhosts.c
-+++ b/modules/pam_rhosts/pam_rhosts.c
-@@ -43,6 +43,361 @@
- #include <security/pam_modutil.h>
- #include <security/pam_ext.h>
-+#ifdef __UCLIBC__
-+
-+#include <stdio.h>
-+#include <sys/stat.h>
-+
-+
-+int  __check_rhosts_file = 1;
-+
-+/* Extremely paranoid file open function. */
-+static FILE *
-+iruserfopen (const char *file, uid_t okuser)
-+{
-+  struct stat st;
-+  char *cp = NULL;
-+  FILE *res = NULL;
-+
-+  /* If not a regular file, if owned by someone other than user or
-+     root, if writeable by anyone but the owner, or if hardlinked
-+     anywhere, quit.  */
-+  if (lstat (file, &st))
-+    cp = "lstat failed";
-+  else if (!S_ISREG (st.st_mode))
-+    cp = "not regular file";
-+  else
-+    {
-+      res = fopen (file, "r");
-+      if (!res)
-+      cp = "cannot open";
-+      else if (fstat (fileno (res), &st) < 0)
-+      cp = "fstat failed";
-+      else if (st.st_uid && st.st_uid != okuser)
-+      cp = "bad owner";
-+      else if (st.st_mode & (S_IWGRP|S_IWOTH))
-+      cp = "writeable by other than owner";
-+      else if (st.st_nlink > 1)
-+      cp = "hard linked somewhere";
-+    }
-+
-+  /* If there were any problems, quit.  */
-+  if (cp != NULL)
-+    {
-+      if (res)
-+      fclose (res);
-+      return NULL;
-+    }
-+
-+  return res;
-+}
-+
-+/*
-+ * Returns 1 for blank lines (or only comment lines) and 0 otherwise
-+ */
-+static int
-+__isempty(char *p)
-+{
-+    while (*p && isspace (*p)) {
-+      ++p;
-+    }
-+
-+    return (*p == '\0' || *p == '#') ? 1 : 0 ;
-+}
-+
-+/* Returns 1 on positive match, 0 on no match, -1 on negative match.  */
-+static int
-+__icheckhost (u_int32_t raddr, char *lhost, const char *rhost)
-+{
-+      struct hostent *hp;
-+      u_int32_t laddr;
-+      int negate=1;    /* Multiply return with this to get -1 instead of 1 */
-+      char **pp;
-+
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+      int save_errno;
-+      size_t buflen;
-+      char *buffer;
-+      struct hostent hostbuf;
-+      int herr;
-+#endif
-+
-+#ifdef HAVE_NETGROUP
-+      /* Check nis netgroup.  */
-+      if (strncmp ("+@", lhost, 2) == 0)
-+              return innetgr (&lhost[2], rhost, NULL, NULL);
-+
-+      if (strncmp ("-@", lhost, 2) == 0)
-+              return -innetgr (&lhost[2], rhost, NULL, NULL);
-+#endif /* HAVE_NETGROUP */
-+
-+      /* -host */
-+      if (strncmp ("-", lhost,1) == 0) {
-+              negate = -1;
-+              lhost++;
-+      } else if (strcmp ("+",lhost) == 0) {
-+              return 1;                    /* asking for trouble, but ok.. */
-+      }
-+
-+      /* Try for raw ip address first. */
-+      if (isdigit (*lhost) && (laddr = inet_addr (lhost)) != INADDR_NONE)
-+              return negate * (! (raddr ^ laddr));
-+
-+      /* Better be a hostname. */
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+      buflen = 1024;
-+      buffer = malloc(buflen);
-+      save_errno = errno;
-+
-+      while (gethostbyname_r (lhost, &hostbuf, buffer, buflen, &hp, &herr)
-+             != 0) {
-+          free(buffer);
-+          return (0);
-+      }
-+      free(buffer);
-+      __set_errno (save_errno);
-+#else
-+      hp = gethostbyname(lhost);
-+#endif /* __UCLIBC_HAS_REENTRANT_RPC__ */
-+
-+      if (hp == NULL)
-+              return 0;
-+
-+      /* Spin through ip addresses. */
-+      for (pp = hp->h_addr_list; *pp; ++pp)
-+              if (!memcmp (&raddr, *pp, sizeof (u_int32_t)))
-+                      return negate;
-+
-+      /* No match. */
-+      return (0);
-+}
-+
-+/* Returns 1 on positive match, 0 on no match, -1 on negative match.  */
-+static int
-+__icheckuser (const char *luser, const char *ruser)
-+{
-+
-+    /*
-+      luser is user entry from .rhosts/hosts.equiv file
-+      ruser is user id on remote host
-+      */
-+
-+#ifdef HAVE_NETGROUP
-+    /* [-+]@netgroup */
-+    if (strncmp ("+@", luser, 2) == 0)
-+      return innetgr (&luser[2], NULL, ruser, NULL);
-+
-+    if (strncmp ("-@", luser,2) == 0)
-+      return -innetgr (&luser[2], NULL, ruser, NULL);
-+#endif /* HAVE_NETGROUP */
-+
-+    /* -user */
-+    if (strncmp ("-", luser, 1) == 0)
-+      return -(strcmp (&luser[1], ruser) == 0);
-+
-+    /* + */
-+    if (strcmp ("+", luser) == 0)
-+      return 1;
-+
-+    /* simple string match */
-+    return strcmp (ruser, luser) == 0;
-+}
-+
-+/*
-+ * Returns 0 if positive match, -1 if _not_ ok.
-+ */
-+static int
-+__ivaliduser2(FILE *hostf, u_int32_t raddr,   const char *luser,
-+                        const char *ruser, const char *rhost)
-+{
-+    register const char *user;
-+    register char *p;
-+    int hcheck, ucheck;
-+    char *buf = NULL;
-+    size_t bufsize = 0;
-+    int retval = -1;
-+
-+    while (getline (&buf, &bufsize, hostf) > 0) {
-+      buf[bufsize - 1] = '\0'; /* Make sure it's terminated.  */
-+        p = buf;
-+
-+      /* Skip empty or comment lines */
-+      if (__isempty (p)) {
-+          continue;
-+      }
-+
-+      /* Skip lines that are too long. */
-+      if (strchr (p, '\n') == NULL) {
-+          int ch = getc_unlocked (hostf);
-+
-+          while (ch != '\n' && ch != EOF)
-+            ch = getc_unlocked (hostf);
-+          continue;
-+      }
-+
-+      for (;*p && !isspace(*p); ++p) {
-+          *p = tolower (*p);
-+      }
-+
-+      /* Next we want to find the permitted name for the remote user.  */
-+      if (*p == ' ' || *p == '\t') {
-+          /* <nul> terminate hostname and skip spaces */
-+          for (*p++='\0'; *p && isspace (*p); ++p);
-+
-+          user = p;                   /* this is the user's name */
-+          while (*p && !isspace (*p))
-+              ++p;                    /* find end of user's name */
-+      } else
-+          user = p;
-+
-+      *p = '\0';              /* <nul> terminate username (+host?) */
-+
-+      /* buf -> host(?) ; user -> username(?) */
-+
-+      /* First check host part */
-+      hcheck = __icheckhost (raddr, buf, rhost);
-+
-+      if (hcheck < 0)
-+          break;
-+
-+      if (hcheck) {
-+          /* Then check user part */
-+          if (! (*user))
-+              user = luser;
-+
-+          ucheck = __icheckuser (user, ruser);
-+
-+          /* Positive 'host user' match? */
-+          if (ucheck > 0) {
-+              retval = 0;
-+              break;
-+          }
-+
-+          /* Negative 'host -user' match? */
-+          if (ucheck < 0)
-+              break;
-+
-+          /* Neither, go on looking for match */
-+      }
-+    }
-+
-+    free (buf);
-+
-+    return retval;
-+}
-+
-+static int
-+iruserok2 (u_int32_t raddr, int superuser, const char *ruser, const char *luser,
-+                 const char *rhost)
-+{
-+      FILE *hostf = NULL;
-+      int isbad = -1;
-+
-+      if (!superuser)
-+              hostf = iruserfopen (_PATH_HEQUIV, 0);
-+
-+      if (hostf) {
-+              isbad = __ivaliduser2 (hostf, raddr, luser, ruser, rhost);
-+              fclose (hostf);
-+
-+              if (!isbad)
-+                      return 0;
-+      }
-+
-+      if (__check_rhosts_file || superuser) {
-+              char *pbuf;
-+              struct passwd *pwd;
-+              size_t dirlen;
-+              uid_t uid;
-+
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+              size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
-+              struct passwd pwdbuf;
-+              char *buffer = stack_heap_alloc(buflen);
-+
-+              if (getpwnam_r (luser, &pwdbuf, buffer,
-+                          buflen, &pwd) != 0 || pwd == NULL)
-+              {
-+                      stack_heap_free(buffer);
-+                      return -1;
-+              }
-+              stack_heap_free(buffer);
-+#else
-+              if ((pwd = getpwnam(luser)) == NULL)
-+                      return -1;
-+#endif
-+
-+              dirlen = strlen (pwd->pw_dir);
-+              pbuf = malloc (dirlen + sizeof "/.rhosts");
-+              strcpy (pbuf, pwd->pw_dir);
-+              strcat (pbuf, "/.rhosts");
-+
-+              /* Change effective uid while reading .rhosts.  If root and
-+                 reading an NFS mounted file system, can't read files that
-+                 are protected read/write owner only.  */
-+              uid = geteuid ();
-+              seteuid (pwd->pw_uid);
-+              hostf = iruserfopen (pbuf, pwd->pw_uid);
-+              free(pbuf);
-+
-+              if (hostf != NULL) {
-+                      isbad = __ivaliduser2 (hostf, raddr, luser, ruser, rhost);
-+                      fclose (hostf);
-+              }
-+
-+              seteuid (uid);
-+              return isbad;
-+      }
-+      return -1;
-+}
-+
-+int ruserok(const char *rhost, int superuser, const char *ruser,
-+                      const char *luser)
-+{
-+        struct hostent *hp;
-+      u_int32_t addr;
-+      char **ap;
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+      size_t buflen;
-+      char *buffer;
-+      int herr;
-+      struct hostent hostbuf;
-+#endif
-+
-+#ifdef __UCLIBC_HAS_REENTRANT_RPC__
-+      buflen = 1024;
-+      buffer = stack_heap_alloc(buflen);
-+
-+      while (gethostbyname_r (rhost, &hostbuf, buffer,
-+                  buflen, &hp, &herr) != 0 || hp == NULL)
-+      {
-+          if (herr != NETDB_INTERNAL || errno != ERANGE) {
-+              stack_heap_free(buffer);
-+              return -1;
-+          } else
-+          {
-+              /* Enlarge the buffer.  */
-+              buflen *= 2;
-+              stack_heap_free(buffer);
-+              buffer = stack_heap_alloc(buflen);
-+          }
-+      }
-+      stack_heap_free(buffer);
-+#else
-+      if ((hp = gethostbyname(rhost)) == NULL) {
-+              return -1;
-+      }
-+#endif
-+      for (ap = hp->h_addr_list; *ap; ++ap) {
-+              memmove(&addr, *ap, sizeof(addr));
-+              if (iruserok2(addr, superuser, ruser, luser, rhost) == 0)
-+                      return 0;
-+      }
-+      return -1;
-+}
-+
-+#endif /* __UCLIBC__ */
-+
- PAM_EXTERN
- int pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc,
-                        const char **argv)
diff --git a/libs/libpam/patches/006-fix_xdr.patch b/libs/libpam/patches/006-fix_xdr.patch
deleted file mode 100644 (file)
index 9769506..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
---- a/modules/pam_unix/yppasswd_xdr.c
-+++ b/modules/pam_unix/yppasswd_xdr.c
-@@ -21,6 +21,268 @@
- #endif
- #include "yppasswd.h"
-+#ifdef __UCLIBC__
-+
-+static const char xdr_zero[BYTES_PER_XDR_UNIT] = {0, 0, 0, 0};
-+
-+/*
-+ * XDR integers
-+ */
-+bool_t
-+xdr_int (XDR *xdrs, int *ip)
-+{
-+
-+#if INT_MAX < LONG_MAX
-+  long l;
-+
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_ENCODE:
-+      l = (long) *ip;
-+      return XDR_PUTLONG (xdrs, &l);
-+
-+    case XDR_DECODE:
-+      if (!XDR_GETLONG (xdrs, &l))
-+      {
-+        return FALSE;
-+      }
-+      *ip = (int) l;
-+    case XDR_FREE:
-+      return TRUE;
-+    }
-+  return FALSE;
-+#elif INT_MAX == LONG_MAX
-+  return xdr_long (xdrs, (long *) ip);
-+#elif INT_MAX == SHRT_MAX
-+  return xdr_short (xdrs, (short *) ip);
-+#else
-+#error unexpected integer sizes in xdr_int()
-+#endif
-+}
-+
-+/*
-+ * XDR null terminated ASCII strings
-+ * xdr_string deals with "C strings" - arrays of bytes that are
-+ * terminated by a NULL character.  The parameter cpp references a
-+ * pointer to storage; If the pointer is null, then the necessary
-+ * storage is allocated.  The last parameter is the max allowed length
-+ * of the string as specified by a protocol.
-+ */
-+bool_t
-+xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
-+{
-+  char *sp = *cpp;    /* sp is the actual string pointer */
-+  u_int size;
-+  u_int nodesize;
-+
-+  /*
-+   * first deal with the length since xdr strings are counted-strings
-+   */
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_FREE:
-+      if (sp == NULL)
-+      {
-+        return TRUE;          /* already free */
-+      }
-+      /* fall through... */
-+    case XDR_ENCODE:
-+      if (sp == NULL)
-+      return FALSE;
-+      size = strlen (sp);
-+      break;
-+    case XDR_DECODE:
-+      break;
-+    }
-+  if (!xdr_u_int (xdrs, &size))
-+    {
-+      return FALSE;
-+    }
-+  if (size > maxsize)
-+    {
-+      return FALSE;
-+    }
-+  nodesize = size + 1;
-+
-+  /*
-+   * now deal with the actual bytes
-+   */
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_DECODE:
-+      if (nodesize == 0)
-+      {
-+        return TRUE;
-+      }
-+      if (sp == NULL)
-+      *cpp = sp = (char *) mem_alloc (nodesize);
-+      if (sp == NULL)
-+      {
-+#ifdef USE_IN_LIBIO
-+        if (_IO_fwide (stderr, 0) > 0)
-+          (void) fwprintf (stderr, L"%s",
-+                             _("xdr_string: out of memory\n"));
-+        else
-+#endif
-+          (void) fputs (_("xdr_string: out of memory\n"), stderr);
-+        return FALSE;
-+      }
-+      sp[size] = 0;
-+      /* fall into ... */
-+
-+    case XDR_ENCODE:
-+      return xdr_opaque (xdrs, sp, size);
-+
-+    case XDR_FREE:
-+      mem_free (sp, nodesize);
-+      *cpp = NULL;
-+      return TRUE;
-+    }
-+  return FALSE;
-+}
-+
-+/*
-+ * XDR long integers
-+ * The definition of xdr_long() is kept for backward
-+ * compatibility. Instead xdr_int() should be used.
-+ */
-+bool_t
-+xdr_long (XDR *xdrs, long *lp)
-+{
-+  if (xdrs->x_op == XDR_ENCODE
-+      && (sizeof (int32_t) == sizeof (long)
-+        || (int32_t) *lp == *lp))
-+    return XDR_PUTLONG (xdrs, lp);
-+
-+  if (xdrs->x_op == XDR_DECODE)
-+    return XDR_GETLONG (xdrs, lp);
-+
-+  if (xdrs->x_op == XDR_FREE)
-+    return TRUE;
-+
-+  return FALSE;
-+}
-+
-+/*
-+ * XDR unsigned integers
-+ */
-+bool_t
-+xdr_u_int (XDR *xdrs, u_int *up)
-+{
-+#if UINT_MAX < ULONG_MAX
-+  u_long l;
-+
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_ENCODE:
-+      l = (u_long) * up;
-+      return XDR_PUTLONG (xdrs, (long *) &l);
-+
-+    case XDR_DECODE:
-+      if (!XDR_GETLONG (xdrs, (long *) &l))
-+      {
-+        return FALSE;
-+      }
-+      *up = (u_int) l;
-+    case XDR_FREE:
-+      return TRUE;
-+    }
-+  return FALSE;
-+#elif UINT_MAX == ULONG_MAX
-+  return xdr_u_long (xdrs, (u_long *) up);
-+#elif UINT_MAX == USHRT_MAX
-+  return xdr_short (xdrs, (short *) up);
-+#else
-+#error unexpected integer sizes in xdr_u_int()
-+#endif
-+}
-+
-+/*
-+ * XDR opaque data
-+ * Allows the specification of a fixed size sequence of opaque bytes.
-+ * cp points to the opaque object and cnt gives the byte length.
-+ */
-+bool_t
-+xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
-+{
-+  u_int rndup;
-+  static char crud[BYTES_PER_XDR_UNIT];
-+
-+  /*
-+   * if no data we are done
-+   */
-+  if (cnt == 0)
-+    return TRUE;
-+
-+  /*
-+   * round byte count to full xdr units
-+   */
-+  rndup = cnt % BYTES_PER_XDR_UNIT;
-+  if (rndup > 0)
-+    rndup = BYTES_PER_XDR_UNIT - rndup;
-+
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_DECODE:
-+      if (!XDR_GETBYTES (xdrs, cp, cnt))
-+      {
-+        return FALSE;
-+      }
-+      if (rndup == 0)
-+      return TRUE;
-+      return XDR_GETBYTES (xdrs, (caddr_t)crud, rndup);
-+
-+    case XDR_ENCODE:
-+      if (!XDR_PUTBYTES (xdrs, cp, cnt))
-+      {
-+        return FALSE;
-+      }
-+      if (rndup == 0)
-+      return TRUE;
-+      return XDR_PUTBYTES (xdrs, xdr_zero, rndup);
-+
-+    case XDR_FREE:
-+      return TRUE;
-+    }
-+  return FALSE;
-+}
-+
-+/*
-+ * XDR unsigned long integers
-+ * The definition of xdr_u_long() is kept for backward
-+ * compatibility. Instead xdr_u_int() should be used.
-+ */
-+bool_t
-+xdr_u_long (XDR *xdrs, u_long *ulp)
-+{
-+  switch (xdrs->x_op)
-+    {
-+    case XDR_DECODE:
-+      {
-+      long int tmp;
-+
-+      if (XDR_GETLONG (xdrs, &tmp) == FALSE)
-+        return FALSE;
-+
-+      *ulp = (uint32_t) tmp;
-+      return TRUE;
-+      }
-+
-+    case XDR_ENCODE:
-+      if (sizeof (uint32_t) != sizeof (u_long)
-+        && (uint32_t) *ulp != *ulp)
-+      return FALSE;
-+
-+      return XDR_PUTLONG (xdrs, (long *) ulp);
-+
-+    case XDR_FREE:
-+      return TRUE;
-+    }
-+  return FALSE;
-+}
-+
-+#endif /* UCLIBC */
-+
- bool_t
- xdr_xpasswd(XDR * xdrs, xpasswd * objp)
- {
diff --git a/libs/libpam/patches/007-cve-2014-2583.patch b/libs/libpam/patches/007-cve-2014-2583.patch
deleted file mode 100644 (file)
index 8d24bea..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 9dcead87e6d7f66d34e7a56d11a30daca367dffb Mon Sep 17 00:00:00 2001
-From: "Dmitry V. Levin" <ldv@altlinux.org>
-Date: Wed, 26 Mar 2014 22:17:23 +0000
-Subject: pam_timestamp: fix potential directory traversal issue (ticket #27)
-
-pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of
-the timestamp pathname it creates, so extra care should be taken to
-avoid potential directory traversal issues.
-
-* modules/pam_timestamp/pam_timestamp.c (check_tty): Treat
-"." and ".." tty values as invalid.
-(get_ruser): Treat "." and ".." ruser values, as well as any ruser
-value containing '/', as invalid.
-
-Fixes CVE-2014-2583.
-
-Reported-by: Sebastian Krahmer <krahmer@suse.de>
-
-diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c
-index 5193733..b3f08b1 100644
---- a/modules/pam_timestamp/pam_timestamp.c
-+++ b/modules/pam_timestamp/pam_timestamp.c
-@@ -158,7 +158,7 @@ check_tty(const char *tty)
-               tty = strrchr(tty, '/') + 1;
-       }
-       /* Make sure the tty wasn't actually a directory (no basename). */
--      if (strlen(tty) == 0) {
-+      if (!strlen(tty) || !strcmp(tty, ".") || !strcmp(tty, "..")) {
-               return NULL;
-       }
-       return tty;
-@@ -243,6 +243,17 @@ get_ruser(pam_handle_t *pamh, char *ruserbuf, size_t ruserbuflen)
-               if (pwd != NULL) {
-                       ruser = pwd->pw_name;
-               }
-+      } else {
-+              /*
-+               * This ruser is used by format_timestamp_name as a component
-+               * of constructed timestamp pathname, so ".", "..", and '/'
-+               * are disallowed to avoid potential path traversal issues.
-+               */
-+              if (!strcmp(ruser, ".") ||
-+                  !strcmp(ruser, "..") ||
-+                  strchr(ruser, '/')) {
-+                      ruser = NULL;
-+              }
-       }
-       if (ruser == NULL || strlen(ruser) >= ruserbuflen) {
-               *ruserbuf = '\0';
--- 
-cgit v0.10.2
-
index baf3c7d7515dd880dabc202e77d91ecd6ccef6df..841ffa50e6f871f11820dc72c59888bf91d73d07 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=v4l-utils
-PKG_VERSION:=1.6.2
+PKG_VERSION:=1.6.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.linuxtv.org/downloads/v4l-utils
-PKG_MD5SUM:=9cb3c178f937954e65bf30920af433ef
+PKG_MD5SUM:=307858616be6374f63bf946307f15a7f
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
@@ -22,6 +22,7 @@ PKG_LICENSE:=GPL-2.0 LGPL-2.1
 PKG_LICENSE_FILES:=COPYING COPYING.libv4l
 
 PKG_USE_MIPS16:=0
+PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
 PKG_BUILD_DEPENDS:=argp-standalone
diff --git a/libs/libv4l/patches/005-test_for_posix_ioctl.patch b/libs/libv4l/patches/005-test_for_posix_ioctl.patch
new file mode 100644 (file)
index 0000000..e945bbf
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -80,6 +80,20 @@ gl_VISIBILITY
+ AC_CHECK_HEADERS([sys/klog.h])
+ AC_CHECK_FUNCS([klogctl])
++AC_CACHE_CHECK([for ioctl with POSIX signature],
++  [gl_cv_func_ioctl_posix_signature],
++  [AC_COMPILE_IFELSE(
++     [AC_LANG_PROGRAM(
++        [[#include <sys/ioctl.h>]],
++        [[int ioctl (int, int, ...);]])
++     ],
++     [gl_cv_func_ioctl_posix_signature=yes],
++     [gl_cv_func_ioctl_posix_signature=no])
++  ])
++if test "x$gl_cv_func_ioctl_posix_signature" = xyes; then
++  AC_DEFINE([HAVE_POSIX_IOCTL], [1], [Have ioctl with POSIX signature])
++fi
++
+ # Check host os
+ case "$host_os" in
+   linux*)
index 70107d397dd9df2af48ed9005fd2ed85041bd490..34e0511ab7c5fa4a1257370722da10670368a63b 100644 (file)
@@ -8,3 +8,21 @@
  #include <fcntl.h>
  #include <errno.h>
  #include <sys/ioctl.h>
+@@ -36,6 +37,7 @@
+ #include <dirent.h>
+ #include <config.h>
+ #include <signal.h>
++#include <time.h>
+ #include <linux/videodev2.h>
+ #include <libv4l2.h>
+--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
++++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+@@ -14,6 +14,7 @@
+ #include <sys/mman.h>
+ #include <dirent.h>
+ #include <math.h>
++#include <time.h>
+ #include "v4l2-ctl.h"
diff --git a/libs/libv4l/patches/030-musl_compatibility.patch b/libs/libv4l/patches/030-musl_compatibility.patch
new file mode 100644 (file)
index 0000000..bd3f0d7
--- /dev/null
@@ -0,0 +1,92 @@
+--- a/lib/libv4lconvert/libv4lsyscall-priv.h
++++ b/lib/libv4lconvert/libv4lsyscall-priv.h
+@@ -35,14 +35,19 @@
+    which is broken on some systems and doesn't include them itself :( */
+ #ifdef linux
++#define __NEED_off_t
+ #include <sys/time.h>
+ #include <syscall.h>
+ #include <linux/types.h>
+ #include <linux/ioctl.h>
+ /* On 32 bits archs we always use mmap2, on 64 bits archs there is no mmap2 */
+ #ifdef __NR_mmap2
++#undef SYS_mmap2
+ #define       SYS_mmap2 __NR_mmap2
+ #define       MMAP2_PAGE_SHIFT 12
++#if !(defined(__UCLIBC__) || defined(__GLIBC__))
++typedef off_t __off_t;
++#endif
+ #else
+ #define       SYS_mmap2 SYS_mmap
+ #define       MMAP2_PAGE_SHIFT 0
+--- a/lib/libv4l1/v4l1compat.c
++++ b/lib/libv4l1/v4l1compat.c
+@@ -62,7 +62,7 @@ LIBV4L_PUBLIC int open(const char *file,
+       return fd;
+ }
+-#ifdef linux
++#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
+ LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
+ {
+       int fd;
+@@ -94,7 +94,11 @@ LIBV4L_PUBLIC int dup(int fd)
+       return v4l1_dup(fd);
+ }
++#ifdef HAVE_POSIX_IOCTL
++LIBV4L_PUBLIC int ioctl(int fd, int request, ...)
++#else
+ LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...)
++#endif
+ {
+       void *arg;
+       va_list ap;
+@@ -112,12 +116,12 @@ LIBV4L_PUBLIC ssize_t read(int fd, void
+ }
+ LIBV4L_PUBLIC void *mmap(void *start, size_t length, int prot, int flags, int fd,
+-              __off_t offset)
++              off_t offset)
+ {
+       return v4l1_mmap(start, length, prot, flags, fd, offset);
+ }
+-#ifdef linux
++#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
+ LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
+               __off64_t offset)
+ {
+--- a/lib/libv4l2/v4l2convert.c
++++ b/lib/libv4l2/v4l2convert.c
+@@ -86,7 +86,7 @@ LIBV4L_PUBLIC int open(const char *file,
+       return fd;
+ }
+-#ifdef linux
++#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
+ LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
+ {
+       int fd;
+@@ -121,7 +121,11 @@ LIBV4L_PUBLIC int dup(int fd)
+       return v4l2_dup(fd);
+ }
++#ifdef HAVE_POSIX_IOCTL
++LIBV4L_PUBLIC int ioctl(int fd, int request, ...)
++#else
+ LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...)
++#endif
+ {
+       void *arg;
+       va_list ap;
+@@ -144,7 +148,7 @@ LIBV4L_PUBLIC void *mmap(void *start, si
+       return v4l2_mmap(start, length, prot, flags, fd, offset);
+ }
+-#ifdef linux
++#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
+ LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
+               __off64_t offset)
+ {
index 515d6faced003e3cb373f9a6d5417f6a5addbcc1..dd845815a2b20cc8a397be0d0694e6269e08590d 100644 (file)
@@ -10,8 +10,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zeromq
-PKG_VERSION:=4.0.5
-PKG_RELEASE:=2
+PKG_VERSION:=4.1.1
+PKG_RELEASE:=1
 PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=LICENCE.txt
@@ -58,6 +58,12 @@ CONFIGURE_ARGS += \
        --enable-static \
        --enable-shared
 
+ifneq ($(CONFIG_PACKAGE_libsodium),)
+  CONFIGURE_ARGS+= --with-libsodium
+else
+  CONFIGURE_ARGS+= --without-libsodium
+endif
+
 # add make variable overrides here
 MAKE_FLAGS +=
 
index 9d1f06eb00ff6196d4515c66f8e7db6a1ce1a9c7..74e0091e96726121fe93dc41b2887e51bcac7864 100644 (file)
@@ -1,5 +1,5 @@
---- zeromq-4.0.4_org/configure.ac      2014-06-04 10:19:35.140061796 +0800
-+++ zeromq-4.0.4/configure.ac  2014-06-04 11:08:17.231997926 +0800
+--- a/configure.ac     2014-06-04 10:19:35.140061796 +0800
++++ b/configure.ac     2014-06-04 11:08:17.231997926 +0800
 @@ -127,8 +127,10 @@
      *linux*)
          # Define on Linux to enable all library features. Define if using a gnu compiler
diff --git a/libs/zmq/patches/map_with_const_string_with_ublic++.patch b/libs/zmq/patches/map_with_const_string_with_ublic++.patch
new file mode 100644 (file)
index 0000000..c1a14fc
--- /dev/null
@@ -0,0 +1,41 @@
+--- a/src/metadata.hpp 2015-06-17 21:39:33.629934688 +0800
++++ b/src/metadata.hpp 2014-10-14 22:07:36.000000000 +0800
+@@ -31,7 +31,7 @@
+     {
+         public:
+-            typedef std::map <std::string, const std::string> dict_t;
++            typedef std::map <std::string, std::string> dict_t;
+             metadata_t (const dict_t &dict);
+             virtual ~metadata_t ();
+--- a/src/socket_base.cpp      2015-06-17 21:42:26.289413233 +0800
++++ b/src/socket_base.cpp      2015-06-02 18:31:00.000000000 +0800
+@@ -20,6 +20,7 @@
+ #include <new>
+ #include <string>
+ #include <algorithm>
++#include <ctype.h>
+ #include "platform.hpp"
+--- a/src/stream_engine.cpp    2015-06-17 21:57:29.599443517 +0800
++++ b/src/stream_engine.cpp    2015-06-02 18:31:00.000000000 +0800
+@@ -198,7 +198,7 @@
+             //  Compile metadata.
+             typedef metadata_t::dict_t properties_t;
+             properties_t properties;
+-            properties.insert(std::make_pair("Peer-Address", peer_address));
++            properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
+             zmq_assert (metadata == NULL);
+             metadata = new (std::nothrow) metadata_t (properties);
+         }
+@@ -805,7 +805,7 @@
+     //  If we have a peer_address, add it to metadata
+     if (!peer_address.empty()) {
+-        properties.insert(std::make_pair("Peer-Address", peer_address));
++        properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
+     }
+     //  Add ZAP properties.
index 543d6ecf3a44eabb018ef902faefe085bef04327..0d1127bdb79b0ca6368d718ce3a86b026cebb1e2 100644 (file)
@@ -1,5 +1,5 @@
---- zeromq-4.0.4_org/src/blob.hpp      2014-06-04 10:19:12.680062287 +0800
-+++ zeromq-4.0.4/src/blob.hpp  2014-06-04 10:30:31.168047457 +0800
+--- a/src/blob.hpp     2014-06-04 10:19:12.680062287 +0800
++++ b/src/blob.hpp     2014-06-04 10:30:31.168047457 +0800
 @@ -21,6 +21,7 @@
  #define __ZMQ_BLOB_HPP_INCLUDED__
  
diff --git a/libs/zmq/patches/tools_gcc_fix.patch b/libs/zmq/patches/tools_gcc_fix.patch
deleted file mode 100644 (file)
index a91e846..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-diff -ruNa zeromq-4.0.4_org/tools/Makefile.am zeromq-4.0.4/tools/Makefile.am
---- zeromq-4.0.4_org/tools/Makefile.am 2014-06-03 20:01:12.392379933 +0800
-+++ zeromq-4.0.4/tools/Makefile.am     2014-06-03 19:59:18.616382420 +0800
-@@ -1,5 +1,5 @@
- EXTRA_DIST = curve_keygen.c 
-+CFLAGS += -std=c99
--
- INCLUDES = -I$(top_srcdir)/include
- bin_PROGRAMS = curve_keygen
index 3137e000ea340c99cc11ee3b3d73ca9505927e72..36a25293a970351983c70a4559e0f88e53e2f3b0 100644 (file)
@@ -185,7 +185,7 @@ CONFIGURE_ARGS += \
        --disable-yasm"
 
 # XXX: trick to force use of embedded Libav headers
-TARGET_CFLAGS += $(TARGET_CPPFLAGS)
+TARGET_CFLAGS += $(TARGET_CPPFLAGS) -D_GNU_SOURCE
 TARGET_CPPFLAGS :=
 
 TARGET_LDFLAGS += $(FPIC)
diff --git a/multimedia/mjpg-streamer/patches/005-musl_compatibility.patch b/multimedia/mjpg-streamer/patches/005-musl_compatibility.patch
new file mode 100644 (file)
index 0000000..c758eb9
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/mjpg_streamer.h
++++ b/mjpg_streamer.h
+@@ -29,6 +29,10 @@
+ #define MAX_OUTPUT_PLUGINS 10
+ #define MAX_PLUGIN_ARGUMENTS 32
++#define __NEED_pthread_t
++#define __NEED_pthread_mutex_t
++#define __NEED_pthread_cond_t
++
+ #include <linux/types.h>          /* for videodev2.h */
+ #include <linux/videodev2.h>
index 7b9691cc915098471cb0a418e9e8138945236cf5..0075c0edb3a1adfa3849c3ca651babcebd1b4277 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=bridge-utils
 PKG_VERSION:=1.5
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git
diff --git a/net/bridge-utils/patches/100-musl-compat.patch b/net/bridge-utils/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..5655643
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/libbridge/libbridge.h
++++ b/libbridge/libbridge.h
+@@ -19,6 +19,8 @@
+ #ifndef _LIBBRIDGE_H
+ #define _LIBBRIDGE_H
++#include <sys/types.h>
++#include <sys/select.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <linux/if.h>
index f5c44c96df1fa486a0559e85d080a15b35f86e83..ad2c37044dd889c9e31d2562189459f7b433103d 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=35933
+PKG_SOURCE_VERSION:=35949
 PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
 PKG_RELEASE:=1
 
diff --git a/net/gnunet/patches/010-cross-compile-fixes.patch b/net/gnunet/patches/010-cross-compile-fixes.patch
deleted file mode 100644 (file)
index 515f75c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -194,7 +194,7 @@ AM_CONDITIONAL(GNU, test "$build_target"
- AC_MSG_RESULT([$build_target])
- AC_SUBST(build_target)
- AM_CONDITIONAL([am__fastdepOBJC], false)
--AC_UNALIGNED_64_ACCESS
-+# AC_UNALIGNED_64_ACCESS
- # some other checks for standard libs
- AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])
diff --git a/net/gnunet/patches/011-no-fpu-includes.patch b/net/gnunet/patches/011-no-fpu-includes.patch
deleted file mode 100644 (file)
index 60eb0b4..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/src/dht/gnunet-service-dht_neighbours.c
-+++ b/src/dht/gnunet-service-dht_neighbours.c
-@@ -45,7 +45,6 @@
- #include "gnunet-service-dht_neighbours.h"
- #include "gnunet-service-dht_nse.h"
- #include "gnunet-service-dht_routing.h"
--#include <fenv.h>
- #include "dht.h"
- #define LOG_TRAFFIC(kind,...) GNUNET_log_from (kind, "dht-traffic",__VA_ARGS__)
---- a/src/dht/gnunet-service-wdht_neighbours.c
-+++ b/src/dht/gnunet-service-wdht_neighbours.c
-@@ -44,7 +44,6 @@
- #include "gnunet-service-wdht_datacache.h"
- #include "gnunet-service-wdht_neighbours.h"
- #include "gnunet-service-wdht_nse.h"
--#include <fenv.h>
- #include <stdlib.h>
- #include <string.h>
- #include "dht.h"
---- a/src/dht/gnunet-service-xdht_neighbours.c
-+++ b/src/dht/gnunet-service-xdht_neighbours.c
-@@ -41,7 +41,6 @@
- #include "gnunet-service-xdht_datacache.h"
- #include "gnunet-service-xdht_neighbours.h"
- #include "gnunet-service-xdht_routing.h"
--#include <fenv.h>
- #include "dht.h"
- /**
diff --git a/net/gnunet/patches/100-musl-malloc.patch b/net/gnunet/patches/100-musl-malloc.patch
deleted file mode 100644 (file)
index ef881c8..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
---- a/src/util/gnunet-service-resolver.c
-+++ b/src/util/gnunet-service-resolver.c
-@@ -603,7 +603,7 @@ main (int argc, char *const *argv)
-   return ret;
- }
--#ifdef LINUX
-+#if defined(LINUX) && defined(__GLIBC__)
- #include <malloc.h>
- /**
---- a/src/arm/gnunet-service-arm.c
-+++ b/src/arm/gnunet-service-arm.c
-@@ -1563,7 +1563,7 @@ main (int argc, char *const *argv)
- }
--#ifdef LINUX
-+#if defined(LINUX) && defined(__GLIBC__)
- #include <malloc.h>
- /**
---- a/src/nse/gnunet-service-nse.c
-+++ b/src/nse/gnunet-service-nse.c
-@@ -1629,7 +1629,7 @@ main (int argc,
- }
--#ifdef LINUX
-+#if defined(LINUX) && defined(__GLIBC__)
- #include <malloc.h>
- /**
---- a/src/regex/gnunet-daemon-regexprofiler.c
-+++ b/src/regex/gnunet-daemon-regexprofiler.c
-@@ -382,7 +382,7 @@ main (int argc, char *const *argv)
- }
--#ifdef LINUX
-+#if defined(LINUX) && defined(__GLIBC__)
- #include <malloc.h>
- /**
---- a/src/revocation/gnunet-service-revocation.c
-+++ b/src/revocation/gnunet-service-revocation.c
-@@ -933,7 +933,7 @@ main (int argc,
- }
--#ifdef LINUX
-+#if defined(LINUX) && defined(__GLIBC__)
- #include <malloc.h>
---- a/src/statistics/gnunet-service-statistics.c
-+++ b/src/statistics/gnunet-service-statistics.c
-@@ -1077,7 +1077,7 @@ main (int argc, char *const *argv)
-                               &run, NULL)) ? 0 : 1;
- }
--#ifdef LINUX
-+#if defined(LINUX) && defined(__GLIBC__)
- #include <malloc.h>
- /**
---- a/src/topology/gnunet-daemon-topology.c
-+++ b/src/topology/gnunet-daemon-topology.c
-@@ -1327,7 +1327,7 @@ main (int argc, char *const *argv)
- }
--#ifdef LINUX
-+#if defined(LINUX) && defined(__GLIBC__)
- #include <malloc.h>
- /**
diff --git a/net/gnunet/patches/101-include-byteswap.patch b/net/gnunet/patches/101-include-byteswap.patch
deleted file mode 100644 (file)
index 8901263..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/include/gnunet_common.h
-+++ b/src/include/gnunet_common.h
-@@ -49,6 +49,8 @@
- #include <stdarg.h>
- #endif
-+#include <byteswap.h>
-+
- #ifdef __cplusplus
- extern "C"
- {
index f0bb2a0ac6654bbf4068f28b98eb2b26664ab9b8..c4fbc128338e0e775d817f568e668259008de612 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luci-app-sqm
 PKG_VERSION:=3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPLv2
 LUCI_DIR:=/usr/lib/lua/luci
 
index 8379025979e176b0469681d3026a9e7366e26e5e..49ab13057d2e19e61c654eef268a36b9fb997f3a 100644 (file)
@@ -52,11 +52,11 @@ end
 n.rmempty = false
 
 
-dl = s:taboption("tab_basic", Value, "download", translate("Download speed (kbit/s) (ingress):"))
+dl = s:taboption("tab_basic", Value, "download", translate("Download speed (kbit/s) (ingress) set to 0 to selectively disable ingress shaping:"))
 dl.datatype = "and(uinteger,min(0))"
 dl.rmempty = false
 
-ul = s:taboption("tab_basic", Value, "upload", translate("Upload speed (kbit/s) (egress):"))
+ul = s:taboption("tab_basic", Value, "upload", translate("Upload speed (kbit/s) (egress) set to 0 to selectively disable egress shaping:"))
 ul.datatype = "and(uinteger,min(0))"
 ul.rmempty = false
 
index c88e78c5f9a352fb2e3d58686ee95596c4c20f95..a72e34fd7e8efd8600d5be85950c194ad5d54f40 100644 (file)
@@ -9,7 +9,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ocserv
 PKG_VERSION:=0.10.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+PKG_USE_MIPS16:=0
 
 PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
index b5bbec31ed276047af0871d833af2aa1903b5f5a..dce96d832598cd49c7b59ee51dc1b64573132718 100644 (file)
@@ -18,7 +18,7 @@ auth = "|AUTH|"
 # A banner to be displayed on clients
 banner = "Welcome to OpenWRT"
 
-isolate-workers = true
+#isolate-workers = true
 
 # When the server has a dynamic DNS address (that may change),
 # should set that to true to ask the client to resolve again on
index d4d014dd8af69f2c873978767ca8c21db4e822c4..c4597a40f25c5bf22a1d92a2d4863c78fca8ae58 100644 (file)
@@ -1,8 +1,7 @@
 #!/bin/sh /etc/rc.common
 
-SERVICE_USE_PID=1
-
 START=50
+USE_PROCD=1
 
 setup_config() {
        config_get port         $1 port "4443"
@@ -96,7 +95,7 @@ setup_dns() {
        echo "dns = $ip" >> /var/etc/ocserv.conf
 }
 
-start() {
+start_service() {
        local hostname iface
 
        hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2`
@@ -162,23 +161,8 @@ start() {
        chmod 600 /var/etc/ocpasswd
        config_foreach setup_users ocservusers
 
-       service_start /usr/sbin/ocserv -c /var/etc/ocserv.conf
-}
-
-stop() {
-       service_stop /usr/sbin/ocserv
-}
-       
-reload() {
-       rm -f /var/etc/ocpasswd
-       touch /var/etc/ocpasswd
-       chmod 600 /var/etc/ocpasswd
-       config_foreach setup_users ocservusers
-
-       /usr/bin/occtl show status >/dev/null 2>&1
-       if test $? != 0;then
-               start
-       else
-               /usr/bin/occtl reload
-       fi
+       procd_open_instance
+       procd_set_param command /usr/sbin/ocserv -f -c /var/etc/ocserv.conf
+       procd_set_param respawn
+       procd_close_instance
 }
index 605d65380febf2d307429ce50932da15a25511af..38ac391c1877e571af13847cb058533944f67626 100644 (file)
@@ -8,12 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openconnect
-PKG_VERSION:=7.05
+PKG_VERSION:=7.06
 PKG_RELEASE:=1
+PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
-PKG_MD5SUM:=10cd4f61e8a11cdf793da2b0fd7a6003
+PKG_MD5SUM:=80f397911e1fed43d897d99be3d5f1a1
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_OPENCONNECT_GNUTLS \
index a2fb91fa99d01e7170c7921ee52869f4a7c89d43..d17d1962e4ffcaa55fd4adf6a6169221ede3c8d4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pptpd
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/poptop
diff --git a/net/pptpd/patches/100-musl-compat.patch b/net/pptpd/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..6ce625a
--- /dev/null
@@ -0,0 +1,38 @@
+--- a/bcrelay.c
++++ b/bcrelay.c
+@@ -667,7 +667,7 @@ static void mainloop(int argc, char **ar
+                  * there is no need to concern about the physical/link layer header because it is
+                  * filled in automatically (based on the contents of sa).
+                  */
+-                if ((nrsent = sendto(cur_ifsnr[j].sock_nr, ipp_p, rlen, MSG_DONTWAIT|MSG_TRYHARD, (struct sockaddr *)&sa, salen)) < 0)
++                if ((nrsent = sendto(cur_ifsnr[j].sock_nr, ipp_p, rlen, MSG_DONTWAIT|MSG_DONTROUTE, (struct sockaddr *)&sa, salen)) < 0)
+                 {
+                   if (errno == ENETDOWN) {
+                     syslog(LOG_NOTICE, "ignored ENETDOWN from sendto(), a network interface was going down?");
+--- a/compat.c
++++ b/compat.c
+@@ -11,10 +11,10 @@
+ #include "compat.h"
+ #include "our_syslog.h"
+-#ifndef HAVE_STRLCPY
+ #include <string.h>
+ #include <stdio.h>
++#ifndef HAVE_STRLCPY
+ void strlcpy(char *dst, const char *src, size_t size)
+ {
+         strncpy(dst, src, size - 1);
+--- /dev/null
++++ b/net/ppp_defs.h
+@@ -0,0 +1,10 @@
++#ifndef _NET_PPP_DEFS_H
++#define _NET_PPP_DEFS_H 1
++
++#define __need_time_t
++#include <time.h>
++
++#include <asm/types.h>
++#include <linux/ppp_defs.h>
++
++#endif /* net/ppp_defs.h */
index 361a4d5cf8b2c6feb0144cb2529df34957175dbc..b89ffcad296f1a3c8807d5d6469334155619bb71 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=socat
 PKG_VERSION:=1.7.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
diff --git a/net/socat/patches/100-musl-compat.patch b/net/socat/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..ae5c8d0
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/sysincludes.h
++++ b/sysincludes.h
+@@ -79,6 +79,9 @@
+ #endif
+ #if HAVE_NETDB_H && (_WITH_IP4 || _WITH_IP6)
+ #include <netdb.h>    /* struct hostent, gethostbyname() */
++#if !(__UCLIBC__ || __GLIBC__)
++#define NETDB_INTERNAL -1
++#endif
+ #endif
+ #if HAVE_SYS_UN_H && WITH_UNIX
+ #include <sys/un.h>   /* struct sockaddr_un, unix domain sockets */
+@@ -139,8 +142,10 @@
+ #include <netpacket/packet.h>
+ #endif
+ #if HAVE_NETINET_IF_ETHER_H
++#if defined(__UCLIBC__) || defined(__GLIBC__)
+ #include <netinet/if_ether.h>
+ #endif
++#endif
+ #if HAVE_LINUX_IF_TUN_H
+ #include <linux/if_tun.h>
+ #endif
index a8fd56d9b1f65fbe76eed23562f2b4572548e249..31e2d5af4a6fa1a5244d1e265deca13ae2080bc3 100644 (file)
@@ -2,6 +2,7 @@ config transmission
        option enabled 0
        option config_dir '/tmp/transmission'
        #option user 'nobody'
+       option mem_percentage 50
        option alt_speed_down 50
        option alt_speed_enabled false
        option alt_speed_time_begin  540
index 669e710ec3d6b3d9258251d32886f4619ecf30ac..535ace8bb1362ac5649229030b4f21401ac75a76 100644 (file)
@@ -1,7 +1,9 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2010-2012 OpenWrt.org
+# Copyright (C) 2010-2015 OpenWrt.org
 
 START=99
+USE_PROCD=1
+
 
 LIST_SEP="
 "
@@ -40,14 +42,25 @@ section_enabled() {
        [ $enabled -gt 0 ]
 }
 
-start_instance() {
-       local s="$1"
+transmission() {
+       local cfg="$1"
+       local USE
+
        local user
+       local download_dir
+       local mem_percentage
 
        section_enabled "$section" || return 1
 
-       config_get config_dir "$s" 'config_dir' '/var/etc/transmission'
-       config_get user "$s" 'user'
+       config_get config_dir "$cfg" 'config_dir' '/var/etc/transmission'
+       config_get user "$cfg" 'user'
+       config_get download_dir "$cfg" 'download_dir' '/var/etc/transmission'
+       config_get mem_percentage "$cfg" 'mem_percentage' '50'
+
+       local MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo)
+       if test "$MEM" -gt 1;then
+               USE=$(expr $MEM \* $mem_percentage \* 10)
+       fi
 
        config_file="$config_dir/settings.json"
        [ -d $config_dir ] || {
@@ -58,7 +71,7 @@ start_instance() {
 
        echo "{" > $config_file
 
-       append_params "$s" \
+       append_params "$cfg" \
                alt_speed_down alt_speed_enabled alt_speed_time_begin alt_speed_time_day \
                alt_speed_time_enabled alt_speed_time_end alt_speed_up blocklist_enabled \
                cache_size_mb download_queue_enabled download_queue_size \
@@ -76,7 +89,7 @@ start_instance() {
                umask upload_slots_per_torrent utp_enabled scrape_paused_torrents \
                watch_dir_enabled
 
-       append_params_quotes "$s" \
+       append_params_quotes "$cfg" \
                blocklist_url bind_address_ipv4 bind_address_ipv6 download_dir incomplete_dir \
                peer_congestion_algorithm peer_socket_tos rpc_bind_address rpc_password rpc_url \
                rpc_username rpc_whitelist script_torrent_done_filename watch_dir
@@ -84,28 +97,25 @@ start_instance() {
        echo "\""invalid-key"\": false" >> $config_file
        echo "}" >> $config_file
 
-       SERVICE_UID="$user" \
-       service_start /usr/bin/transmission-daemon -g $config_dir
-}
-
-stop_instance() {
-       local s="$1"
-       local user
-
-       section_enabled "$section" || return 1
-
-       config_get user "$s" 'user'
-
-       SERVICE_UID="$user" \
-       service_stop /usr/bin/transmission-daemon
+       procd_open_instance
+       procd_set_param command /usr/bin/transmission-daemon -g $config_dir -f
+       procd_set_param respawn retry=60
+       procd_set_param user "$user"
+       if test -z "$USE";then
+               procd_set_param limits core="0 0"
+       else
+               procd_set_param limits core="0 0" as="$USE $USE"
+               logger -t transmission "Starting with $USE virt mem"
+       fi
+
+       procd_add_jail transmission log
+       procd_add_jail_mount $config_file
+       procd_add_jail_mount_rw $download_dir
+       procd_close_instance
 }
 
-start() {
+start_service() {
        config_load 'transmission'
-       config_foreach start_instance 'transmission'
+       config_foreach transmission 'transmission'
 }
 
-stop() {
-       config_load 'transmission'
-       config_foreach stop_instance 'transmission'
-}
diff --git a/net/vnstat/patches/100-musl-compat.patch b/net/vnstat/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..0512389
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/src/common.h
++++ b/src/common.h
+@@ -22,6 +22,7 @@
+ #include <pwd.h>
+ #include <grp.h>
+ #include <libgen.h>
++#include <fcntl.h>
+ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
+ #include <sys/param.h>
index a5c55ad061f69c628cf6f25f7b1795cad86c3dc4..f24a79b8b1cdb232e3bdace33b22244c0c89414b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vsftpd
 PKG_VERSION:=3.0.2
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://security.appspot.com/downloads/
@@ -49,8 +49,15 @@ endef
 
 Package/vsftpd-tls/conffiles=$(Package/vsftpd/conffiles)
 
+ifneq ($(CONFIG_USE_MUSL),)
+  NLSSTRING:=-lcrypt
+else
+  NLSSTRING:=-lcrypt -lnsl
+endif
+
 ifeq ($(BUILD_VARIANT),notls)
  define Build/Compile
+       $(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                CC="$(TARGET_CC)" \
                CFLAGS="$(TARGET_CFLAGS)" \
@@ -63,6 +70,7 @@ ifeq ($(BUILD_VARIANT),tls)
  define Build/Compile
        $(SED) 's/#undef VSF_BUILD_SSL/#define VSF_BUILD_SSL/' $(PKG_BUILD_DIR)/builddefs.h
        $(SED) 's/-lcrypt -lnsl/-lcrypt -lnsl -lssl -lcrypto/' $(PKG_BUILD_DIR)/Makefile
+       $(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                CC="$(TARGET_CC)" \
                CFLAGS="$(TARGET_CFLAGS)" \
diff --git a/net/vsftpd/patches/006-musl-compatibility.patch b/net/vsftpd/patches/006-musl-compatibility.patch
new file mode 100644 (file)
index 0000000..9eefec7
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/sysdeputil.c
++++ b/sysdeputil.c
+@@ -58,7 +58,9 @@
+ #define VSF_SYSDEP_HAVE_SHADOW
+ #define VSF_SYSDEP_HAVE_USERSHELL
+ #define VSF_SYSDEP_HAVE_LIBCAP
+-#define VSF_SYSDEP_HAVE_UTMPX
++#if defined(__GLIBC__) || defined(__UCLIBC__)
++  #define VSF_SYSDEP_HAVE_UTMPX
++#endif
+ #define __USE_GNU
+ #include <utmpx.h>
index 65c5368c915438a978dacde2bd63b9af4d1b840f..c1586b725b0c1dcb83a2f83d23cd97bb55c5af3b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xinetd
 PKG_VERSION:=2.3.15
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.xinetd.org
@@ -42,6 +42,7 @@ define Package/xinetd/conffiles
 endef
 
 TARGET_CFLAGS += -DNO_RPC
+TARGET_CPPFLAGS += -DHAVE_RLIM_T
 
 CONFIGURE_ARGS += \
        --without-libwrap \
index ddabab8a1f042b641e41df7c31ac089c6fde0095..0da01484d2657706504151614c25d39c1e633771 100644 (file)
@@ -10,7 +10,7 @@ Reviewed-By: Adam Tkac <atkac@redhat.com>
 #diff -up xinetd-2.3.14/xinetd/ident.c.orig xinetd-2.3.14/xinetd/ident.c
 --- a/xinetd/ident.c
 +++ b/xinetd/ident.c
-@@ -97,7 +98,13 @@ idresult_e log_remote_user( const struct
+@@ -97,7 +97,13 @@ idresult_e log_remote_user( const struct
     }
  
     CLEAR( sin_contact );
@@ -25,7 +25,7 @@ Reviewed-By: Adam Tkac <atkac@redhat.com>
     sin_contact = sin_remote;
     memcpy( &sin_bind, &sin_local, sizeof(sin_bind) ) ;
     local_port = 0;
-@@ -121,7 +128,13 @@ idresult_e log_remote_user( const struct
+@@ -127,7 +133,13 @@ idresult_e log_remote_user( const struct
        msg( LOG_ERR, func, "socket creation: %m" ) ;
        return( IDR_ERROR ) ;
     }
index 5552ec96251913efe0cc014c0274da3cfb7f013b..d1917bfbe1167606b5098319378427fb625917ca 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=moc
 PKG_VERSION:=2.5.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://ftp.daper.net/pub/soft/moc/stable/
@@ -38,6 +38,8 @@ define Package/moc/description
        MOC (music on console) is a console audio player for LINUX/UNIX designed to be powerful and easy to use.
 endef
 
+TARGET_CFLAGS+=-D_GNU_SOURCE
+
 define Build/Configure
        $(call Build/Configure/Default, \
                $(if $(CONFIG_BUILD_PATENTED),,--without-mp3) \
diff --git a/utils/acpid/Makefile b/utils/acpid/Makefile
new file mode 100644 (file)
index 0000000..657ff70
--- /dev/null
@@ -0,0 +1,68 @@
+#
+# Copyright (C) 2012-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=acpid
+PKG_VERSION:=2.0.23
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@SF/acpid2 
+PKG_MD5SUM:=d7bcdcdefcd53b03730e50ba842554ea
+PKG_MAINTAINER:=Thomas Heil<heil@terminal-consulting.de>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/acpid
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=The ACPI Daemon (acpid) With Netlink Support
+  URL:=http://tedfelix.com/linux/acpid-netlink.html
+  DEPENDS:=@(TARGET_x86||TARGET_x86_64) +kmod-input-evdev 
+endef
+
+define Package/acpid/description
+  The ACPI Daemon (acpid) With Netlink Support
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CC="$(TARGET_CC)" \
+               LD="$(TARGET_CC)" \
+               LDFLAGS="$(TARGET_LDFLAGS)" \
+               all
+endef
+
+define Package/acpid/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/acpid $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/acpi_listen $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/acpi/events
+       $(INSTALL_CONF) ./files/default $(1)/etc/acpi/events/default
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_CONF) ./files/acpid.init $(1)/etc/init.d/acpid
+       chmod 0750 $(1)/etc/init.d/acpid
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/input/
+       $(INSTALL_CONF) ./files/acpid.hotplug $(1)/etc/hotplug.d/input/
+endef
+
+define Package/acpid/postinst
+#!/bin/sh
+[ -n "$${IPKG_INSTROOT}" ] || {
+       echo "waiting for input devices to come up"
+       /etc/init.d/acpid enable
+       sleep 5
+       /etc/init.d/acpid start
+       echo "please try the power button"
+       exit 0
+}
+endef
+
+$(eval $(call BuildPackage,acpid))
diff --git a/utils/acpid/files/acpid.hotplug b/utils/acpid/files/acpid.hotplug
new file mode 100644 (file)
index 0000000..6e08d01
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+. /lib/functions.sh
+
+if [ "$ACTION" = add ] && [ "$DEVICENAME" = event0 ]; then
+        ( /etc/init.d/acpid/stop; sleep 3; /usr/sbin/acpid )&
+fi
diff --git a/utils/acpid/files/acpid.init b/utils/acpid/files/acpid.init
new file mode 100644 (file)
index 0000000..3365aa0
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/ash /etc/rc.common
+# Copyright (C) 2009-2010 OpenWrt.org
+
+START=99
+STOP=80
+
+ACPID_BIN="/usr/sbin/acpid"
+ACPID_PID="/var/run/acpid.pid"
+
+start() {
+    [ -x "$ACPID_BIN" ] || return 1
+    start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID
+}
+
+boot() {
+       # Do nothing on boot
+       [ -x "$ACPID_BIN" ] || return 1
+       start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID
+       exit 0
+}
+
+stop() {
+       service_kill ${ACPID_BIN##*/} $ACPID_PID
+       rm -f $ACPID_PID
+}
diff --git a/utils/acpid/files/default b/utils/acpid/files/default
new file mode 100644 (file)
index 0000000..cf8d9a3
--- /dev/null
@@ -0,0 +1,5 @@
+# This is a sample ACPID configuration
+
+event=button/power.*
+action=/sbin/poweroff 
+
diff --git a/utils/acpid/patches/001-musl-compat.patch b/utils/acpid/patches/001-musl-compat.patch
new file mode 100644 (file)
index 0000000..086361f
--- /dev/null
@@ -0,0 +1,129 @@
+Index: acpid-2.0.23/tempfailure.h
+===================================================================
+--- /dev/null
++++ acpid-2.0.23/tempfailure.h
+@@ -0,0 +1,8 @@
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++  (__extension__                                                              \
++    ({ long int __result;                                                     \
++       do __result = (long int) (expression);                                 \
++       while (__result == -1L && errno == EINTR);                             \
++       __result; }))
++#endif
+Index: acpid-2.0.23/acpi_listen.c
+===================================================================
+--- acpid-2.0.23.orig/acpi_listen.c
++++ acpid-2.0.23/acpi_listen.c
+@@ -39,6 +39,8 @@
+ #include "acpid.h"
+ #include "ud_socket.h"
++#include "tempfailure.h"
++
+ static int handle_cmdline(int *argc, char ***argv);
+ static char *read_line(int fd);
+Index: acpid-2.0.23/acpid.c
+===================================================================
+--- acpid-2.0.23.orig/acpid.c
++++ acpid-2.0.23/acpid.c
+@@ -41,6 +41,7 @@
+ #include "input_layer.h"
+ #include "inotify_handler.h"
+ #include "netlink.h"
++#include "tempfailure.h"
+ static int handle_cmdline(int *argc, char ***argv);
+ static void close_fds(void);
+Index: acpid-2.0.23/event.c
+===================================================================
+--- acpid-2.0.23.orig/event.c
++++ acpid-2.0.23/event.c
+@@ -40,6 +40,9 @@
+ #include "sock.h"
+ #include "ud_socket.h"
+ #include "event.h"
++
++#include "tempfailure.h"
++
+ /*
+  * What is a rule?  It's polymorphic, pretty much.
+  */
+Index: acpid-2.0.23/input_layer.c
+===================================================================
+--- acpid-2.0.23.orig/input_layer.c
++++ acpid-2.0.23/input_layer.c
+@@ -47,6 +47,8 @@
+ #define DIM(a)  (sizeof(a) / sizeof(a[0]))
++#include "tempfailure.h"
++
+ struct evtab_entry {
+       struct input_event event;
+       const char *str;
+Index: acpid-2.0.23/kacpimon/libnetlink.c
+===================================================================
+--- acpid-2.0.23.orig/kacpimon/libnetlink.c
++++ acpid-2.0.23/kacpimon/libnetlink.c
+@@ -26,6 +26,8 @@
+ #include "libnetlink.h"
++#include "../tempfailure.h"
++
+ void rtnl_close(struct rtnl_handle *rth)
+ {
+       if (rth->fd >= 0) {
+Index: acpid-2.0.23/netlink.c
+===================================================================
+--- acpid-2.0.23.orig/netlink.c
++++ acpid-2.0.23/netlink.c
+@@ -46,6 +46,7 @@
+ #include "connection_list.h"
+ #include "netlink.h"
++#include "tempfailure.h"
+ static void
+ format_netlink(struct nlmsghdr *msg)
+Index: acpid-2.0.23/proc.c
+===================================================================
+--- acpid-2.0.23.orig/proc.c
++++ acpid-2.0.23/proc.c
+@@ -34,6 +34,8 @@
+ #include "proc.h"
++#include "tempfailure.h"
++
+ const char *eventfile = ACPID_EVENTFILE;
+ static char *read_line(int fd);
+Index: acpid-2.0.23/ud_socket.c
+===================================================================
+--- acpid-2.0.23.orig/ud_socket.c
++++ acpid-2.0.23/ud_socket.c
+@@ -22,6 +22,8 @@
+ #include "log.h"
+ #include "ud_socket.h"
++#include "tempfailure.h"
++
+ int
+ ud_create_socket(const char *name, mode_t socketmode)
+ {
+Index: acpid-2.0.23/libnetlink.c
+===================================================================
+--- acpid-2.0.23.orig/libnetlink.c
++++ acpid-2.0.23/libnetlink.c
+@@ -26,6 +26,8 @@
+ #include "libnetlink.h"
++#include "tempfailure.h"
++
+ void rtnl_close(struct rtnl_handle *rth)
+ {
+       if (rth->fd >= 0) {
diff --git a/utils/acpid/patches/002-dont-use-isfdtype.patch b/utils/acpid/patches/002-dont-use-isfdtype.patch
new file mode 100644 (file)
index 0000000..cd4e062
--- /dev/null
@@ -0,0 +1,21 @@
+Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed
+since released versions of uClibc don't support isfdtype().
+
+Signed-off-by: Gustavo Zaarias <gustavo@zacarias.com.ar>
+
+Index: acpid-2.0.23/sock.c
+===================================================================
+--- acpid-2.0.23.orig/sock.c
++++ acpid-2.0.23/sock.c
+@@ -53,7 +53,10 @@ int non_root_clients;
+ int
+ is_socket(int fd)
+ {
+-    return (isfdtype(fd, S_IFSOCK) == 1);
++      int v;
++      socklen_t l = sizeof(int);
++
++      return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
+ }
+ /* accept a new client connection */
index 79a5f09345fe6708583b52fc715943e3182d6a97..c3750c061da66b1740734b98dbd7cdef5f34b7ee 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=avrdude
 PKG_VERSION:=6.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/avrdude
@@ -40,6 +40,9 @@ CONFIGURE_ARGS+= \
        --disable-doc \
        --disable-parport \
 
+TARGET_CFLAGS+= \
+       -D_GNU_SOURCE \
+
 define Package/avrdude/conffiles
 /etc/avrdude.conf
 endef
diff --git a/utils/avrdude/patches/100-musl-compat.patch b/utils/avrdude/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..6baedc0
--- /dev/null
@@ -0,0 +1,60 @@
+--- a/dfu.h
++++ b/dfu.h
+@@ -25,6 +25,7 @@
+ #ifdef HAVE_LIBUSB
+ #if defined(HAVE_USB_H)
++#  include <sys/types.h>
+ #  include <usb.h>
+ #elif defined(HAVE_LUSB0_USB_H)
+ #  include <lusb0_usb.h>
+--- a/pickit2.c
++++ b/pickit2.c
+@@ -50,6 +50,7 @@
+ #include <string.h>
+ #include <inttypes.h>
+ #include <unistd.h>
++#include <sys/types.h>
+ #include "avrdude.h"
+ #include "avr.h"
+--- a/ser_avrdoper.c
++++ b/ser_avrdoper.c
+@@ -248,6 +248,7 @@ static int usbGetReport(union filedescri
+ /* ------------------------------------------------------------------------ */
+ #if defined(HAVE_USB_H)
++#  include <sys/types.h>
+ #  include <usb.h>
+ #elif defined(HAVE_LUSB0_USB_H)
+ #  include <lusb0_usb.h>
+--- a/usbtiny.c
++++ b/usbtiny.c
+@@ -41,6 +41,7 @@
+ #if defined(HAVE_LIBUSB)      // we use LIBUSB to talk to the board
+ #if defined(HAVE_USB_H)
++#  include <sys/types.h>
+ #  include <usb.h>
+ #elif defined(HAVE_LUSB0_USB_H)
+ #  include <lusb0_usb.h>
+--- a/usbasp.c
++++ b/usbasp.c
+@@ -54,6 +54,7 @@
+ # endif
+ #else
+ # if defined(HAVE_USB_H)
++#  include <sys/types.h>
+ #  include <usb.h>
+ # elif defined(HAVE_LUSB0_USB_H)
+ #  include <lusb0_usb.h>
+--- a/usb_libusb.c
++++ b/usb_libusb.c
+@@ -36,6 +36,7 @@
+ #include <sys/time.h>
+ #if defined(HAVE_USB_H)
++#  include <sys/types.h>
+ #  include <usb.h>
+ #elif defined(HAVE_LUSB0_USB_H)
+ #  include <lusb0_usb.h>
diff --git a/utils/f2fs-tools/patches/010-include-byteswap-h.patch b/utils/f2fs-tools/patches/010-include-byteswap-h.patch
new file mode 100644 (file)
index 0000000..b8c9ff3
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/include/f2fs_fs.h
++++ b/include/f2fs_fs.h
+@@ -12,6 +12,7 @@
+ #include <inttypes.h>
+ #include <linux/types.h>
+ #include <sys/types.h>
++#include <byteswap.h>
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
index 702e63bed1aaae9bee183c395276568e81fd5278..af7b5e1dd0fa8547e6da48b6ebf5388dfdcb3f52 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flashrom
 PKG_VERSION:=0.9.8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.flashrom.org/releases
diff --git a/utils/flashrom/patches/0002-fix-musl-compatibility.patch b/utils/flashrom/patches/0002-fix-musl-compatibility.patch
new file mode 100644 (file)
index 0000000..b52f8b2
--- /dev/null
@@ -0,0 +1,12 @@
+diff -uprN a/linux_spi.c b/linux_spi.c
+--- a/linux_spi.c      2015-06-17 20:50:36.492963100 +0200
++++ b/linux_spi.c      2015-06-17 20:50:00.444860800 +0200
+@@ -22,7 +22,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <errno.h>
+ #include <ctype.h>
+ #include <unistd.h>
index 8841213e33d37a858289f8797aff0bcf2060f783..3fb70c7eba51a0cc03a2b96afbe1acafd3642c21 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hdparm
-PKG_VERSION:=9.45
+PKG_VERSION:=9.47
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_MD5SUM:=1c75d0751a44928b6c4bc81fb16d7fe8
+PKG_MD5SUM:=560c1d8af7f696239cbbca7cd146304a
 PKG_MAINTAINER:=Richard Kunze <richard.kunze@web.de>
 PKG_LICENSE:=BSD-Style Open Source License
 
diff --git a/utils/hdparm/patches/001-fix-includes.patch b/utils/hdparm/patches/001-fix-includes.patch
deleted file mode 100644 (file)
index 44343fb..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/hdparm.h
-+++ b/hdparm.h
-@@ -2,6 +2,7 @@
- //#undef __KERNEL_STRICT_NAMES
- #include <linux/types.h>
-+#include <sys/types.h>
- #if !defined(__GNUC__) && !defined(__attribute__)
- #define __attribute__(x)
---- a/sysfs.c
-+++ b/sysfs.c
-@@ -12,6 +12,7 @@
- #include <stdio.h>
- #include <fcntl.h>
- #include <errno.h>
-+#include <limits.h>
- #include <dirent.h>
- #include <sys/stat.h>
- #include <linux/types.h>
index b5251b41239fed35ca27171fd9ce97f4398d38b1..31a1ad644bdca3066a4daf4a5aeeb1cf25fe1080 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=picocom
 PKG_VERSION:=1.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://picocom.googlecode.com/files
diff --git a/utils/picocom/patches/100-musl-compat.patch b/utils/picocom/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..5f7d750
--- /dev/null
@@ -0,0 +1,17 @@
+Index: picocom-1.7/term.c
+===================================================================
+--- picocom-1.7.orig/term.c
++++ picocom-1.7/term.c
+@@ -33,10 +33,11 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
+-#ifdef __linux__
++#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__))
+ #include <termio.h>
+ #else
+ #include <termios.h>
++#include <sys/ioctl.h>
+ #endif /* of __linux__ */
+ #include "term.h"
index d45a197c4cfa1b858108385eb441d1d8e43cb120..8ec18c2ce5d8a704bf5bdef78c05aeef18990880 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2014 OpenWrt.org
+# Copyright (C) 2011-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rng-tools
 PKG_VERSION:=5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/gkernel/rng-tools/$(PKG_VERSION)/
@@ -19,7 +19,7 @@ PKG_MAINTAINER:=Hannu Nyman <hannu.nyman@iki.fi>
 
 PKG_FIXUP:=autoreconf
 
-PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone
+PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -35,6 +35,11 @@ CONFIGURE_VARS += \
     LIBS="-largp"
 endif
 
+ifdef CONFIG_USE_MUSL
+CONFIGURE_VARS += \
+    LIBS="-largp"
+endif
+
 CONFIGURE_ARGS += \
        --without-libgcrypt
 
index 3adfb0ab3309ea591c4628d586c7ed7606818d92..634121424c3032f7d602c829826b3bbd6b9408ea 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=screen
 PKG_VERSION:=4.2.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/screen
diff --git a/utils/screen/patches/200-musl-compat.patch b/utils/screen/patches/200-musl-compat.patch
new file mode 100644 (file)
index 0000000..2586bb9
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/utmp.c
++++ b/utmp.c
+@@ -33,6 +33,7 @@
+ #include "config.h"
+ #include "screen.h"
+ #include "extern.h"
++#include "os.h"
+ #ifdef HAVE_UTEMPTER
+ #include <utempter.h>