Browse Source

Merge branch 'master' of git+ssh://openadk.org/git/openadk

Waldemar Brodkorb 15 years ago
parent
commit
3d8d90f636

+ 11 - 1
package/Depends.mk

@@ -19,22 +19,32 @@ cbtt-compile: mysql-compile zlib-compile
 collectd-compile: libpthread-compile
 cryptinit-compile: cryptsetup-compile
 cryptsetup-compile: libgcrypt-compile popt-compile e2fsprogs-compile lvm-compile
+
 ifeq (${ADK_COMPILE_CTORRENT_WITH_UCLIBCXX},y)
 ctorrent-compile: uclibc++-compile
 endif
 ctorrent-compile: openssl-compile
+
 cups-compile: zlib-compile
 curl-compile: openssl-compile zlib-compile
-cxxtools-compile: libiconv-compile
+
 ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y)
 cxxtools-compile: uclibc++-compile
 endif
+cxxtools-compile: libiconv-compile
+
 cyrus-sasl-compile: openssl-compile
+
+ifeq (${ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX},y)
+dansguardian-compile: uclibc++-compile
+endif
 dansguardian-compile: pcre-compile zlib-compile
+
 ifneq (${ADK_PACKAGE_DAVFS2_FUSE}${ADK_PACKAGE_DAVFS2_BOTH},)
 davfs2-compile: fuse-compile
 endif
 davfs2-compile: libiconv-compile neon-compile
+
 dbus-compile: expat-compile
 deco-compile: ncurses-compile
 dhcpv6-compile: libnl-compile ncurses-compile

+ 24 - 0
package/base-files/extra/etc/network/if-post-down.d/bridge

@@ -0,0 +1,24 @@
+#!/bin/sh
+  
+if [ ! -x /usr/sbin/brctl ]
+then
+  exit 0
+fi
+
+case "$IF_BRIDGE_PORTS" in
+    "")
+        exit 0
+        ;;
+    none)
+        INTERFACES=""
+        ;;
+    *)
+        INTERFACES="$IF_BRIDGE_PORTS"
+        ;;
+esac
+  
+for IF in $INTERFACES; do
+  ip link set down dev $IF && brctl delif $IFACE $IF
+done
+
+ip link set down dev $IFACE || exit 1

+ 32 - 0
package/base-files/extra/etc/network/if-pre-up.d/bridge

@@ -0,0 +1,32 @@
+#!/bin/sh
+
+if [ ! -x /usr/sbin/brctl ]
+then
+  exit 0
+fi
+
+case "$IF_BRIDGE_PORTS" in
+    "")
+        exit 0
+        ;;
+    none)
+        INTERFACES=""
+        ;;
+    *)
+        INTERFACES="$IF_BRIDGE_PORTS"
+        ;;
+esac
+
+brctl addbr $IFACE || exit 1
+
+for IF in $INTERFACES; do
+  if ! grep -q $IF /proc/net/dev; then
+    echo "Error: interface '$IF' does not exist!"
+    brctl delbr $IFACE
+    exit 1
+  fi
+  brctl addif $IFACE $IF
+  ip link set up dev $IF
+done
+
+exit 0

+ 66 - 0
package/base-files/extra/sbin/update

@@ -0,0 +1,66 @@
+#!/bin/sh
+
+who=$(id -u)
+if [ $who -ne 0 ]; then
+  echo 'Exit. System update must be run as root.'
+  exit 1
+fi
+
+cd /
+
+mount -o remount,rw /
+umount /etc
+
+check_exit() {
+	if [ $? -ne 0 ];then
+		echo "Update failed."
+		exit 1
+	fi
+}
+
+extract_from_file() {
+        tar -xzvf $1
+	check_exit
+}
+
+extract_from_ssh() {
+        ssh $1 "cat $2" | tar -xzvf -
+	check_exit
+}
+
+extract_from_http() {
+        wget -O - $1 | tar -xzvf -
+	check_exit
+}
+                
+case $1 in
+        file://*|/*)
+                url=$(echo $1|sed -e "s#file://##")
+		echo "Updating system from $1"
+                extract_from_file $url
+                ;;
+        ssh://*)
+                host=$(echo $1|sed -e "s#ssh://\(.*\):.*#\1#")
+                file=$(echo $1|sed -e "s#ssh://.*:\(.*\)#\1#")
+		echo "Updating system from $1"
+                extract_from_ssh $host $file
+                ;;
+        http://*|ftp://*)
+		echo "Updating system from $1"
+                extract_from_http $1
+                ;;
+        *)
+                echo "No or wrong uri given. exit."
+		echo "Use one of the following uri:"
+		echo "http://myserver/myupdate.tar.gz"
+		echo "ssh://myuser@myserver:/my/path/myupdate.tar.gz"
+		echo "file:///mypath/myupdate.tar.gz"
+                exit 1
+                ;;
+esac
+
+sync
+mount --bind /etc /tmp/.cfgfs/root
+
+echo "Check with cfgfs status if you need to merge and save any changes in /etc."
+echo "You should reboot now."

+ 0 - 0
package/busybox/files/bridge.pre-up


+ 0 - 71
package/busybox/files/ipv6

@@ -1,71 +0,0 @@
-#!/bin/sh
-	
-ipv6_up() {
-	env | grep -q IF_IPV6_ || return 0
-
-	# IPV6-FLUSH
-	if [ "$IF_IPV6_FLUSH" == "1" ] || [ "$IF_IPV6_FLUSH" == "yes" ] || [ "$IF_IPV6_FLUSH" == "YES" ]
-	then
-	        ip -6 addr flush $IFACE
-	        logger -t IPv6 "deactivated IPv6 for interface $IFACE"
-	fi
-	# IPV6-AUTOCONF
-	if [ "$IF_IPV6_AUTOCONF" == "1" ] || [ "$IF_IPV6_AUTOCONF" == "yes" ] || [ "$IF_IPV6_AUTOCONF" == "YES" ]
-	then
-	        echo 1 > /proc/sys/net/ipv6/conf/$IFACE/autoconf
-	        logger -t IPv6 "autoconf enabled for $IFACE"
-	fi
-	if [ "$IF_IPV6_AUTOCONF" == "0" ] || [ "$IF_IPV6_AUTOCONF" == "no" ] || [ "$IF_IPV6_AUTOCONF" == "NO" ]
-	then
-	        echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf
-	        logger -t IPv6 "autoconf disabled for $IFACE"
-	fi
-	# IPV6-ACCEPT-RA
-	if [ "$IF_IPV6_ACCEPT_RA" == "1" ] || [ "$IF_IPV6_ACCEPT_RA" == "yes" ] || [ "$IF_IPV6_ACCEPT_RA" == "YES" ]
-	then
-	
-	        echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
-	        logger -t IPv6 "accept-ra enabled for $IFACE"
-	fi
-	if [ "$IF_IPV6_ACCEPT_RA" == "0" ] || [ "$IF_IPV6_ACCEPT_RA" == "no" ] || [ "$IF_IPV6_ACCEPT_RA" == "NO" ]
-	then
-	        echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
-	        logger -t IPv6 "accept-ra disabled for $IFACE"
-	fi
-	# IPV6-ACCEPT-REDIRECTS
-	if [ "$IF_IPV6_ACCEPT_REDIRECTS" == "1" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "yes" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "YES" ]
-	then
-	
-	        echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_redirects
-	        logger -t IPv6 "accept-redirects enabled for $IFACE"
-	fi
-	if [ "$IF_IPV6_ACCEPT_REDIRECTS" == "0" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "no" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "NO" ]
-	then
-	        echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_redirects
-	        logger -t IPv6 "accept-redirects disabled for $IFACE"
-	fi
-	# IPV6-FORWARDING
-	if [ "$IF_IPV6_FORWARDING" == "1" ] || [ "$IF_IPV6_FORWARDING" == "yes" ] || [ "$IF_IPV6_FORWARDING" == "YES" ]
-	then
-	
-	        echo 1 > /proc/sys/net/ipv6/conf/$IFACE/forwarding
-	        logger -t IPv6 "forwarding enabled for $IFACE"
-	fi
-	if [ "$IF_IPV6_FORWARDING" == "0" ] || [ "$IF_IPV6_FORWARDING" == "no" ] || [ "$IF_IPV6_FORWARDING" == "NO" ]
-	then
-	        echo 0 > /proc/sys/net/ipv6/conf/$IFACE/forwarding
-	        logger -t IPv6 "forwarding disabled for $IFACE"
-	fi
-	# IPV6-USE-TEMPADDR
-	if [ "$IF_IPV6_USE_TEMPADDR" == "1" ] || [ "$IF_IPV6_USE_TEMPADDR" == "yes" ] || [ "$IF_IPV6_USE_TEMPADDR" == "YES" ]
-	then
-	
-	        echo 1 > /proc/sys/net/ipv6/conf/$IFACE/use_tempaddr
-	        logger -t IPv6 "use_tempaddr enabled for $IFACE"
-	fi
-	if [ "$IF_IPV6_USE_TEMPADDR" == "0" ] || [ "$IF_IPV6_USE_TEMPADDR" == "no" ] || [ "$IF_IPV6_USE_TEMPADDR" == "NO" ]
-	then
-	        echo 0 > /proc/sys/net/ipv6/conf/$IFACE/use_tempaddr
-	        logger -t IPv6 "use_tempaddr disabled for $IFACE"
-	fi
-}

+ 0 - 0
package/busybox/files/ipv6.up


+ 0 - 0
package/busybox/files/vlan.pre-up


+ 2 - 3
package/cfinstall/src/cfinstall

@@ -13,7 +13,7 @@ rootsize=$(($maxsize-2))
 parted -s /dev/sda unit cyl mkpartfs primary ext2 0 $rootsize
 parted -s /dev/sda unit cyl mkpart primary fat32 $rootsize $maxsize
 parted -s /dev/sda set 1 boot on
-sfdisk --change-id /dev/sda 2 88
+sfdisk --change-id /dev/sda 2 88 >/dev/null 2>&1
 if [ $? -eq 0 ];then
         printf "Successfully created partition ${rootpart}\n"
 else
@@ -46,7 +46,7 @@ menuentry "GNU/Linux (OpenADK)" {
         linux /boot/vmlinuz-adk root=/dev/sda1 ro init=/init panic=10
 }
 EOF
-chroot /mnt grub-install /dev/sda
+chroot /mnt grub-install /dev/sda >/dev/null 2>&1
 umount /mnt/proc
 umount /mnt/sys
 umount /mnt/dev
@@ -59,4 +59,3 @@ mknod -m 666 /mnt/dev/tty c 5 0
 umount /mnt
 printf "Successfully installed.\n"
 exit 0
-

+ 6 - 0
package/dansguardian/Makefile

@@ -23,6 +23,12 @@ include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,DANSGUARDIAN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+ifeq ($(ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX),y)
+CONFIGURE_ENV+=		CXXFLAGS="-fno-threadsafe-statics -fno-builtin -nostdinc++ \
+			-I${STAGING_DIR}/usr/include/uClibc++" \
+			LIBS="-nodefaultlibs -luClibc++ -lgcc -lm"
+endif
+
 CONFIGURE_STYLE:=	gnu
 CONFIGURE_ARGS+=	--enable-orig-ip \
 			--with-proxyuser=proxy \

+ 3 - 1
package/grub-bin/Config.in

@@ -4,10 +4,12 @@ config ADK_PACKAGE_GRUB_BIN
 	depends on \
 		ADK_LINUX_X86_64_SHUTTLE || \
 		ADK_LINUX_X86_WRAP || \
-		ADK_LINUX_X86_ALIX1C
+		ADK_LINUX_X86_ALIX1C || \
+		ADK_LINUX_X86_ALIX2D
 	select BUSYBOX_FEATURE_STAT_FORMAT
 	default y if ADK_LINUX_X86_64_SHUTTLE
 	default y if ADK_LINUX_X86_ALIX1C
+	default y if ADK_LINUX_X86_ALIX2D
 	default y if ADK_LINUX_X86_WRAP
 	help
 

+ 1 - 0
package/squid/Config.in

@@ -26,6 +26,7 @@ config ADK_COMPILE_SQUID_WITH_STDCXX
 config ADK_COMPILE_SQUID_WITH_UCLIBCXX
         bool "Embedded uClibc++ library"
         select ADK_PACKAGE_UCLIBCXX
+	depends on ADK_BROKEN
         help
 
 endchoice

+ 13 - 0
package/squid/Makefile

@@ -78,6 +78,12 @@ $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,squid_unix_grou
 $(eval $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_FAKEAUTH,fakeauth_auth))
 $(eval $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_SMB_AUTH,ntlm_auth))
 
+ifeq ($(ADK_COMPILE_SQUID_WITH_UCLIBCXX),y)
+CONFIGURE_ENV+=		CXXFLAGS="-fno-threadsafe-statics -fno-builtin -nostdinc++ \
+			-I${STAGING_DIR}/usr/include/uClibc++" \
+			LIBS="-nodefaultlibs -luClibc++ -ldl -lm"
+endif
+
 CONFIGURE_STYLE:=	autotool gnu
 CONFIGURE_ENV+=		ac_cv_sizeof_void_p=4 \
 			ac_cv_sizeof_short=2 \
@@ -134,6 +140,13 @@ CONFIGURE_ARGS+=	--datadir=/usr/share/squid \
 BUILD_STYLE:=		auto
 INSTALL_STYLE:=		auto
 
+ifeq (${ADK_COMPILE_SQUID_WITH_UCLIBCXX},y)
+# add workaround because libtool tries to link libstdc++
+post-configure:
+	${SED} 's#postdeps="-lstdc.*#postdeps="-lm"#' \
+	    ${WRKBUILD}/libtool
+endif
+
 post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
 	${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
 	${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \