summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-07-20 16:58:02 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-07-20 16:58:02 +0200
commit126fb42bf9e5eee309fc3dcb889e49e6c88da15a (patch)
tree501912dc0d34f0ec6baa38bb99b71d3c8f8655b5
parent7907e3ee7302ac3fd428989a07b0df74f0c52853 (diff)
parentd9ab4fecc47e7597ae42e95aabaef3e01d91c732 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
-rw-r--r--mk/modules.mk1
-rw-r--r--mk/package.mk6
-rwxr-xr-xpackage/base-files/src/init2
-rw-r--r--package/haserl/Makefile4
-rw-r--r--package/haserl/patches/patch-src_haserl_c12
-rw-r--r--package/openssl/Makefile12
-rw-r--r--package/pkgmaker24
-rw-r--r--package/strongswan/Makefile48
-rw-r--r--package/strongswan/files/strongswan.init29
-rw-r--r--package/strongswan/files/strongswan.postinst3
-rw-r--r--target/linux/config/Config.in.ipsec1
11 files changed, 108 insertions, 34 deletions
diff --git a/mk/modules.mk b/mk/modules.mk
index 032f0a85c..49233d6cb 100644
--- a/mk/modules.mk
+++ b/mk/modules.mk
@@ -292,6 +292,7 @@ $(eval $(call KMOD_template,INET_ESP,inet-esp,\
,65))
$(eval $(call KMOD_template,INET_IPCOMP,inet-ipcomp,\
+ $(MODULES_DIR)/kernel/net/ipv4/xfrm4_tunnel \
$(MODULES_DIR)/kernel/net/xfrm/xfrm_ipcomp \
$(MODULES_DIR)/kernel/net/ipv4/ipcomp \
,70))
diff --git a/mk/package.mk b/mk/package.mk
index acc387a48..0393a06bd 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -37,6 +37,10 @@ endif
ifeq ($(ADK_DEBUG),)
TCPPFLAGS+= -DNDEBUG
endif
+
+# does not change CONFIGURE_ARGS in minimal mode
+ifneq ($(filter minimal,${CONFIG_STYLE}),)
+
ifneq ($(ADK_DEBUG),)
CONFIGURE_ARGS+= --enable-debug
else
@@ -47,6 +51,8 @@ ifeq ($(ADK_ENABLE_IPV6),y)
CONFIGURE_ARGS+= --enable-ipv6
endif
+endif
+
CONFIGURE_ENV+= CONFIG_SHELL='$(strip ${SHELL})' \
CFLAGS='$(strip ${TCFLAGS})' \
CXXFLAGS='$(strip ${TCXXFLAGS})' \
diff --git a/package/base-files/src/init b/package/base-files/src/init
index 173e91b0b..7da1e150f 100755
--- a/package/base-files/src/init
+++ b/package/base-files/src/init
@@ -4,8 +4,8 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin
mount -nt proc proc /proc
mount -o nosuid,nodev,noexec -t sysfs sysfs /sys
[ ! -f /etc/notmpfs ] && {
- size=2048
size=$(cat /etc/tmpfs 2>/dev/null)
+ [ -z $size ] && size=2048
mount none /tmp -t tmpfs -o size=${size}k
mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
}
diff --git a/package/haserl/Makefile b/package/haserl/Makefile
index 956c20c67..b40ffdc9c 100644
--- a/package/haserl/Makefile
+++ b/package/haserl/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= haserl
-PKG_VERSION:= 0.8.0
+PKG_VERSION:= 0.9.26
PKG_RELEASE:= 1
-PKG_MD5SUM:= bd9195d086566f56634c0bcbbbcbebea
+PKG_MD5SUM:= 8cd64e591209751a062ad4e08f1d10dd
PKG_DESCR:= a CGI wrapper to embed shell scripts in HTML documents
PKG_SECTION:= lang
PKG_URL:= http://haserl.sourceforge.net
diff --git a/package/haserl/patches/patch-src_haserl_c b/package/haserl/patches/patch-src_haserl_c
deleted file mode 100644
index 208f9073b..000000000
--- a/package/haserl/patches/patch-src_haserl_c
+++ /dev/null
@@ -1,12 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- haserl-0.8.0.orig/src/haserl.c 2004-11-10 18:59:35.000000000 +0100
-+++ haserl-0.8.0/src/haserl.c 2008-10-09 14:21:28.000000000 +0200
-@@ -131,7 +131,7 @@ int myputenv (char *newbuf, char *prefix
- if (strlen(prefix)) { memcpy (entry, prefix, strlen(prefix)); }
- memcpy ((char *) (entry + strlen(prefix)), newbuf, strlen(newbuf));
-
-- keylen = (size_t) (index (entry, '=') - entry);
-+ keylen = (size_t) (strchr (entry, '=') - entry);
-
- if ( keylen <= 0 ) {
- free (entry);
diff --git a/package/openssl/Makefile b/package/openssl/Makefile
index 43b860369..0ab3c2e7f 100644
--- a/package/openssl/Makefile
+++ b/package/openssl/Makefile
@@ -21,6 +21,10 @@ PKG_DESCR_DEV:= development files for openssl
PKG_SECTION_DEV:= devel
PKG_DEPENDS_DEV:= libopenssl
+PKG_FLAVOURS:= WITH_EC
+PKGFD_WITH_EC:= enable Elliptic Curve crypto
+PKGSUB_WITH_EC:= libopenssl
+
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
@@ -37,13 +41,17 @@ BUILD_STYLE:= manual
INSTALL_TARGET:= install_sw
FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
-OPENSSL_OPTIONS = shared no-ec no-err no-krb5 no-threads zlib-dynamic no-engines no-camellia no-idea no-rc5 no-mdc2 no-sha0 no-smime no-aes192 no-ripemd no-cast
+OPENSSL_OPTIONS:= shared no-err no-krb5 no-threads zlib-dynamic no-engines no-camellia no-idea no-rc5 no-mdc2 no-sha0 no-smime no-aes192 no-ripemd no-cast
+
+ifeq ($(ADK_PACKAGE_OPENSSL_WITH_EC),)
+OPENSSL_OPTIONS+= no-ec
+endif
do-configure:
(cd $(WRKBUILD); \
PATH=$(TARGET_PATH) \
OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
- bash -x ./Configure linux-embedded \
+ ./Configure linux-embedded \
--prefix=/usr \
--openssldir=/etc/ssl \
-I$(STAGING_DIR)/usr/include \
diff --git a/package/pkgmaker b/package/pkgmaker
index 34bd129e6..e391c680b 100644
--- a/package/pkgmaker
+++ b/package/pkgmaker
@@ -72,10 +72,12 @@ for dn in */Makefile; do
PKGDESC_\${x} PKGDEPS_\${x} PKGDFLT_\${x} PKGSECT_\${x} CFLINE_\${x}) \
\$(foreach x,\${PKG_FLAVOURS},PKGFD_\${x}) \
\$(foreach x,\${PKG_FLAVOURS},PKGFS_\${x}) \
+ \$(foreach x,\${PKG_FLAVOURS},PKGSUB_\${x}) \
\$(foreach x,\${PKG_CHOICES},PKGCD_\${x}) \
\$(foreach x,\${PKG_CHOICES},PKGCS_\${x}) \
PKG_HOST_DEPENDS PKG_TARGET_DEPENDS")
+
# dnu: directory name, uppercase, y/-+/_X/
typeset -u dnu=${dn//-/_}
dnu=${dnu//+/X}
@@ -282,23 +284,25 @@ EOF
endchoice
EOF
-
# Handle flavours (per directory)
for pfcu in $PKG_FLAVOURS; do # pfcu: pkg flavour conf opt.
+ fh=4
eval pfd=\$PKGFD_$pfcu # pfd: pkg flavour description
eval pfs=\$PKGFS_$pfcu # pfs: pkg flavour dependencies
- print
- print config ADK_PACKAGE_${dnu}_$pfcu
- print "\tbool \"${pfd:-$PKG_NAME -> flavour $pfcu}\""
- print \\tdefault n
- print \\tdepends on ADK_COMPILE_$dnu
+ eval sub=\$PKGSUB_$pfcu # sub: add to subpackage
+ [[ -n ${sub} ]] && exec 5>>../pkgconfigs.d/$dn/Config.in.$sub && fh=5
+ print -u$fh
+ print -u$fh config ADK_PACKAGE_${dnu}_$pfcu
+ print -u$fh "\tbool \"${pfd:-$PKG_NAME -> flavour $pfcu}\""
+ print -u$fh \\tdefault n
+ print -u$fh \\tdepends on ADK_COMPILE_$dnu
for pfso in $pfs; do
typeset -u pfso=${pfso#!}
- print \\tselect ADK_PACKAGE_${pfso}
+ print -u$fh \\tselect ADK_PACKAGE_${pfso}
done
- print \\thelp
- print "\t flavour ADK_PACKAGE_${dnu}_$pfcu for $PKG_NAME"
- done >&4
+ print -u$fh \\thelp
+ print -u$fh "\t flavour ADK_PACKAGE_${dnu}_$pfcu for $PKG_NAME"
+ done
cd ..
done
diff --git a/package/strongswan/Makefile b/package/strongswan/Makefile
index 88887d2b3..f1668b4bf 100644
--- a/package/strongswan/Makefile
+++ b/package/strongswan/Makefile
@@ -5,29 +5,63 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= strongswan
PKG_VERSION:= 4.4.0
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= 22dae13782f493ec675d54b67d79a66d
PKG_DESCR:= IPsec software
PKG_SECTION:= net/security
-PKG_DEPENDS:= libgmp ip libpthread kmod-net-key kmod-xfrm-user
-PKG_DEPENDS+= kmod-inet-ah kmod-inet-esp kmod-inet-ipcomp
+PKG_DEPENDS:= ip libpthread kmod-net-key kmod-xfrm-user
+PKG_DEPENDS+= kmod-inet-ah kmod-inet-esp
PKG_DEPENDS+= kmod-inet-xfrm-mode-tunnel kmod-inet-xfrm-mode-transport
-PKG_DEPENDS+= kmod-crypto-sha1 kmod-crypto-sha256 kmod-crypto-md5
+PKG_DEPENDS+= kmod-crypto-sha1 kmod-crypto-md5
PKG_DEPENDS+= kmod-crypto-null kmod-crypto-des kmod-crypto-aes
PKG_DEPENDS+= kmod-crypto-hmac kmod-crypto-cbc kmod-crypto-authenc
-PKG_DEPENDS+= kmod-crypto-deflate
+ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_OPENSSL},y)
+PKG_BUILDDEP+= openssl
+endif
+ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GNUTLS},y)
+PKG_BUILDDEP+= gnutls
+endif
+ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GMP},y)
PKG_BUILDDEP+= gmp
+endif
PKG_URL:= http://strongswan.org/index.htm
PKG_SITES:= http://download.strongswan.org/
+PKG_CHOICES:= WITH_GMP WITH_OPENSSL WITH_GNUTLS
+PKGCD_WITH_GMP:= use GMP for crypto
+PKGCS_WITH_GMP:= libgmp
+PKGCD_WITH_OPENSSL:= use OpenSSL for crypto
+PKGCS_WITH_OPENSSL:= libopenssl
+PKGCD_WITH_GNUTLS:= use GnuTLS for crypto
+PKGCS_WITH_GNUTLS:= libgnutls
+
+ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_OPENSSL},y)
+CFLINE_STRONGSWAN:= select ADK_PACKAGE_OPENSSL_WITH_EC
+endif
+
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,STRONGSWAN,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_OPENSSL},y)
+CONFIGURE_ARGS+= --enable-openssl \
+ --disable-gcrypt \
+ --disable-gmp
+endif
+ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GNUTLS},y)
+CONFIGURE_ARGS+= --enable-gcrypt \
+ --disable-openssl \
+ --disable-gmp
+endif
+ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GMP},y)
+CONFIGURE_ARGS+= --enable-gmp \
+ --disable-openssl \
+ --disable-gcrypt
+endif
+
CONFIGURE_ARGS+= --disable-tools \
--disable-fips-prf \
- --enable-kernel-pfkey \
- --disable-xcbc
+ --enable-kernel-pfkey
post-install:
$(INSTALL_DIR) $(IDIR_STRONGSWAN)/etc
diff --git a/package/strongswan/files/strongswan.init b/package/strongswan/files/strongswan.init
new file mode 100644
index 000000000..60360b378
--- /dev/null
+++ b/package/strongswan/files/strongswan.init
@@ -0,0 +1,29 @@
+#!/bin/sh
+#PKG strongswan
+#INIT 60
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${ipsec:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ ipsec start
+ ;;
+stop)
+ ipsec stop
+ ;;
+restart)
+ sh $0 stop
+ sleep 3
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/strongswan/files/strongswan.postinst b/package/strongswan/files/strongswan.postinst
new file mode 100644
index 000000000..a5f8e11b2
--- /dev/null
+++ b/package/strongswan/files/strongswan.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf ipsec ipsec NO
diff --git a/target/linux/config/Config.in.ipsec b/target/linux/config/Config.in.ipsec
index 05c5da5ba..04bad1f09 100644
--- a/target/linux/config/Config.in.ipsec
+++ b/target/linux/config/Config.in.ipsec
@@ -33,6 +33,7 @@ config ADK_KPACKAGE_KMOD_INET_IPCOMP
prompt "kmod-inet-ipcomp.................. IP Payload Compression"
tristate
select ADK_KPACKAGE_KMOD_CRYPTO_DEFLATE
+ select ADK_KPACKAGE_KMOD_INET_TUNNEL
default n
help
Support for IP Payload Compression Protocol (IPComp) (RFC3173),