Browse Source

add etables, finetune squid package, more busybox finetuning

Waldemar Brodkorb 15 years ago
parent
commit
d89c077bd8

+ 1 - 0
package/Config.in

@@ -236,6 +236,7 @@ menu "Firewall / Routing / Bridging"
 source "package/arpd/Config.in"
 source "package/arpd/Config.in"
 source "package/bridge-utils/Config.in"
 source "package/bridge-utils/Config.in"
 source "package/cutter/Config.in"
 source "package/cutter/Config.in"
+source "package/ebtables/Config.in"
 source "package/ether-wake/Config.in"
 source "package/ether-wake/Config.in"
 source "package/iproute2/Config.in"
 source "package/iproute2/Config.in"
 source "package/ipset/Config.in"
 source "package/ipset/Config.in"

+ 1 - 0
package/Makefile

@@ -83,6 +83,7 @@ package-$(ADK_PACKAGE_DSNIFF) += dsniff
 package-$(ADK_PACKAGE_E2FSPROGS) += e2fsprogs
 package-$(ADK_PACKAGE_E2FSPROGS) += e2fsprogs
 package-$(ADK_PACKAGE_LIBUUID) += e2fsprogs
 package-$(ADK_PACKAGE_LIBUUID) += e2fsprogs
 package-$(ADK_PACKAGE_LIBBLKID) += e2fsprogs
 package-$(ADK_PACKAGE_LIBBLKID) += e2fsprogs
+package-$(ADK_PACKAGE_EBTABLES) += ebtables
 package-$(ADK_PACKAGE_ELINKS) += elinks
 package-$(ADK_PACKAGE_ELINKS) += elinks
 package-$(ADK_PACKAGE_ESOUND) += esound
 package-$(ADK_PACKAGE_ESOUND) += esound
 package-$(ADK_PACKAGE_ETHER_WAKE) += ether-wake
 package-$(ADK_PACKAGE_ETHER_WAKE) += ether-wake

+ 3 - 3
package/base-files/extra/etc/profile

@@ -1,12 +1,12 @@
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+export TERM=vt220
 if [[ $(id -u) = 0 ]]; then
 if [[ $(id -u) = 0 ]]; then
 	export PS1='# '
 	export PS1='# '
 else
 else
 	export PS1='$ '
 	export PS1='$ '
+	export HOME=/tmp
 fi
 fi
-export HOME=/tmp
 cat /etc/banner 2>&-
 cat /etc/banner 2>&-
-[ -x /usr/bin/less ] || alias less=more
+[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
-[ -x /usr/bin/vim ] || alias vim=vi
 [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
 [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
 [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 "$@"; }
 [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 "$@"; }

+ 5 - 6
package/base-files/extra/sbin/update

@@ -7,9 +7,8 @@ if [ $who -ne 0 ]; then
 fi
 fi
 
 
 cd /
 cd /
-
+umount -f /etc
 mount -o remount,rw /
 mount -o remount,rw /
-umount /etc
 
 
 check_exit() {
 check_exit() {
 	if [ $? -ne 0 ];then
 	if [ $? -ne 0 ];then
@@ -19,17 +18,17 @@ check_exit() {
 }
 }
 
 
 extract_from_file() {
 extract_from_file() {
-        tar -xzvf $1
+        cat $1 | gunzip -c | tar -xvf -
 	check_exit
 	check_exit
 }
 }
 
 
 extract_from_ssh() {
 extract_from_ssh() {
-        ssh $1 "cat $2" | tar -xzvf -
+        ssh $1 "cat $2" | gunzip -c | tar -xvf -
 	check_exit
 	check_exit
 }
 }
 
 
 extract_from_http() {
 extract_from_http() {
-        wget -O - $1 | tar -xzvf -
+        wget -O - $1 | gunzip -c | tar -xvf -
 	check_exit
 	check_exit
 }
 }
                 
                 
@@ -60,7 +59,7 @@ case $1 in
 esac
 esac
 
 
 sync
 sync
-mount --bind /etc /tmp/.cfgfs/root
+mount -o bind /etc /tmp/.cfgfs/root
 
 
 echo "Check with cfgfs status if you need to merge and save any changes in /etc."
 echo "Check with cfgfs status if you need to merge and save any changes in /etc."
 echo "You should reboot now."
 echo "You should reboot now."

+ 2 - 2
package/busybox/config/Config.in

@@ -65,7 +65,7 @@ config BUSYBOX_SHOW_USAGE
 
 
 config BUSYBOX_FEATURE_VERBOSE_USAGE
 config BUSYBOX_FEATURE_VERBOSE_USAGE
 	bool "Show verbose applet usage messages"
 	bool "Show verbose applet usage messages"
-	default n
+	default y
 	select BUSYBOX_SHOW_USAGE
 	select BUSYBOX_SHOW_USAGE
 	help
 	help
 	  All BusyBox applets will show more verbose help messages when
 	  All BusyBox applets will show more verbose help messages when
@@ -155,7 +155,7 @@ config BUSYBOX_FEATURE_CLEAN_UP
 
 
 config BUSYBOX_FEATURE_PIDFILE
 config BUSYBOX_FEATURE_PIDFILE
 	bool "Support writing pidfiles"
 	bool "Support writing pidfiles"
-	default n
+	default y
 	help
 	help
 	  This option makes some applets (e.g. crond, syslogd, inetd) write
 	  This option makes some applets (e.g. crond, syslogd, inetd) write
 	  a pidfile in /var/run. Some applications rely on them.
 	  a pidfile in /var/run. Some applications rely on them.

+ 5 - 5
package/busybox/config/archival/Config.in

@@ -7,19 +7,19 @@ menu "Archival Utilities"
 
 
 config BUSYBOX_FEATURE_SEAMLESS_LZMA
 config BUSYBOX_FEATURE_SEAMLESS_LZMA
 	bool "Make tar, rpm, modprobe etc understand .lzma data"
 	bool "Make tar, rpm, modprobe etc understand .lzma data"
-	default n
+	default y
 	help
 	help
 	  Make tar, rpm, modprobe etc understand .lzma data.
 	  Make tar, rpm, modprobe etc understand .lzma data.
 
 
 config BUSYBOX_FEATURE_SEAMLESS_BZ2
 config BUSYBOX_FEATURE_SEAMLESS_BZ2
 	bool "Make tar, rpm, modprobe etc understand .bz2 data"
 	bool "Make tar, rpm, modprobe etc understand .bz2 data"
-	default n
+	default y
 	help
 	help
 	  Make tar, rpm, modprobe etc understand .bz2 data.
 	  Make tar, rpm, modprobe etc understand .bz2 data.
 
 
 config BUSYBOX_FEATURE_SEAMLESS_GZ
 config BUSYBOX_FEATURE_SEAMLESS_GZ
 	bool "Make tar, rpm, modprobe etc understand .gz data"
 	bool "Make tar, rpm, modprobe etc understand .gz data"
-	default n
+	default y
 	help
 	help
 	  Make tar, rpm, modprobe etc understand .gz data.
 	  Make tar, rpm, modprobe etc understand .gz data.
 
 
@@ -163,7 +163,7 @@ config BUSYBOX_GUNZIP
 
 
 config BUSYBOX_GZIP
 config BUSYBOX_GZIP
 	bool "gzip"
 	bool "gzip"
-	default n
+	default y
 	help
 	help
 	  gzip is used to compress files.
 	  gzip is used to compress files.
 	  It's probably the most widely used UNIX compression program.
 	  It's probably the most widely used UNIX compression program.
@@ -276,7 +276,7 @@ config BUSYBOX_FEATURE_TAR_LONG_OPTIONS
 
 
 config BUSYBOX_FEATURE_TAR_UNAME_GNAME
 config BUSYBOX_FEATURE_TAR_UNAME_GNAME
 	bool "Enable use of user and group names"
 	bool "Enable use of user and group names"
-	default n
+	default p
 	depends on BUSYBOX_TAR
 	depends on BUSYBOX_TAR
 	help
 	help
 	  Enables use of user and group names in tar. This affects contents
 	  Enables use of user and group names in tar. This affects contents

+ 3 - 3
package/busybox/config/init/Config.in

@@ -21,7 +21,7 @@ config BUSYBOX_FEATURE_USE_INITTAB
 
 
 config BUSYBOX_FEATURE_KILL_REMOVED
 config BUSYBOX_FEATURE_KILL_REMOVED
 	bool "Support killing processes that have been removed from inittab"
 	bool "Support killing processes that have been removed from inittab"
-	default y
+	default n
 	depends on BUSYBOX_FEATURE_USE_INITTAB
 	depends on BUSYBOX_FEATURE_USE_INITTAB
 	help
 	help
 	  When respawn entries are removed from inittab and a SIGHUP is
 	  When respawn entries are removed from inittab and a SIGHUP is
@@ -41,7 +41,7 @@ config BUSYBOX_FEATURE_KILL_DELAY
 
 
 config BUSYBOX_FEATURE_INIT_SCTTY
 config BUSYBOX_FEATURE_INIT_SCTTY
 	bool "Run commands with leading dash with controlling tty"
 	bool "Run commands with leading dash with controlling tty"
-	default n
+	default y
 	depends on BUSYBOX_INIT
 	depends on BUSYBOX_INIT
 	help
 	help
 	  If this option is enabled, init will try to give a controlling
 	  If this option is enabled, init will try to give a controlling
@@ -56,7 +56,7 @@ config BUSYBOX_FEATURE_INIT_SCTTY
 
 
 config BUSYBOX_FEATURE_INIT_SYSLOG
 config BUSYBOX_FEATURE_INIT_SYSLOG
 	bool "Enable init to write to syslog"
 	bool "Enable init to write to syslog"
-	default n
+	default y
 	depends on BUSYBOX_INIT
 	depends on BUSYBOX_INIT
 
 
 config BUSYBOX_FEATURE_EXTRA_QUIET
 config BUSYBOX_FEATURE_EXTRA_QUIET

+ 1 - 1
package/busybox/config/networking/Config.in

@@ -60,7 +60,7 @@ config BUSYBOX_ARPING
 
 
 config BUSYBOX_BRCTL
 config BUSYBOX_BRCTL
 	bool "brctl"
 	bool "brctl"
-	depends on !ADK_PACKAGE_BRCTL
+	depends on !ADK_PACKAGE_BRIDGE_UTILS
 	default n
 	default n
 	help
 	help
 	  Manage ethernet bridges.
 	  Manage ethernet bridges.

+ 6 - 0
package/ebtables/Config.in

@@ -0,0 +1,6 @@
+config ADK_PACKAGE_EBTABLES
+	prompt "ebtables.......................... Ethernet bridging firewall tool"
+	tristate
+	default n
+	help
+	  http://ebtables.sourceforge.net/

+ 28 - 0
package/ebtables/Makefile

@@ -0,0 +1,28 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:=		iptables
+PKG_VERSION:=		2.0.9
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		44f13990132c20299c1994cd6f425140
+PKG_DESCR:=		ethernet bridging firewall tool
+PKG_SECTION:=		net
+PKG_URL:=		http://ebtables.sourceforge.net
+PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=ebtables/}
+
+DISTFILES:=		${PKG_NAME}-v${PKG_VERSION}-1.tar.gz
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,EBTABLES,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_STYLE:=	gnu
+BUILD_STYLE:=		auto
+INSTALL_STYLE:=		auto
+
+post-install:
+	${INSTALL_DIR} ${IDIR_EBTABLES}/usr/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk

+ 1 - 0
package/squid/Config.in

@@ -4,6 +4,7 @@ config ADK_PACKAGE_SQUID
 	tristate
 	tristate
 	default n
 	default n
 	select ADK_PACKAGE_LIBOPENSSL
 	select ADK_PACKAGE_LIBOPENSSL
+	select ADK_PACKAGE_LIBPTHREAD
 	help
 	help
 	  Squid is a high-performance proxy caching server for web clients, 
 	  Squid is a high-performance proxy caching server for web clients, 
 	  supporting FTP, gopher, and HTTP data objects. Unlike traditional 
 	  supporting FTP, gopher, and HTTP data objects. Unlike traditional 

+ 6 - 6
package/squid/Makefile

@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
 
 
 PKG_NAME:=		squid
 PKG_NAME:=		squid
 PKG_VERSION:=		3.0.STABLE20
 PKG_VERSION:=		3.0.STABLE20
-PKG_RELEASE:=		1
+PKG_RELEASE:=		2
 PKG_MD5SUM:=		b69577cfc5cfb6808ec426e3a933220d
 PKG_MD5SUM:=		b69577cfc5cfb6808ec426e3a933220d
 PKG_DESCR:=		squid web and cache proxy
 PKG_DESCR:=		squid web and cache proxy
 PKG_SECTION:=		net
 PKG_SECTION:=		net
@@ -113,12 +113,9 @@ CONFIGURE_ARGS+=	--datadir=/usr/share/squid \
 			--enable-x-accelerator-vary \
 			--enable-x-accelerator-vary \
 			--with-pthreads \
 			--with-pthreads \
 			--with-dl \
 			--with-dl \
-			--enable-icmp \
 			--enable-kill-parent-hack \
 			--enable-kill-parent-hack \
 			--enable-arp-acl \
 			--enable-arp-acl \
 			--enable-ssl \
 			--enable-ssl \
-			--disable-htcp \
-			--disable-esi \
 			--enable-err-languages=English \
 			--enable-err-languages=English \
 			--enable-default-err-language=English \
 			--enable-default-err-language=English \
 			--enable-linux-netfilter \
 			--enable-linux-netfilter \
@@ -128,6 +125,9 @@ CONFIGURE_ARGS+=	--datadir=/usr/share/squid \
 			--enable-cache-digests \
 			--enable-cache-digests \
 			--enable-referer-log \
 			--enable-referer-log \
 			--enable-delay-pools \
 			--enable-delay-pools \
+			--disable-snmp \
+			--disable-esi \
+			--disable-htcp \
 			--disable-wccp \
 			--disable-wccp \
 			--disable-wccpv2 \
 			--disable-wccpv2 \
 			--enable-useragent-log \
 			--enable-useragent-log \
@@ -149,8 +149,8 @@ endif
 
 
 post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
 post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
 	${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
 	${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
-	${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \
+	${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf ${IDIR_SQUID}/etc/squid/
-			${WRKINST}/etc/squid/squid.conf ${IDIR_SQUID}/etc/squid/
+	${INSTALL_DATA} ./files/squid.conf ${IDIR_SQUID}/etc/squid/
 	${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid
 	${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid
 	${CP} ${WRKINST}/usr/share/squid/* ${IDIR_SQUID}/usr/share/squid/
 	${CP} ${WRKINST}/usr/share/squid/* ${IDIR_SQUID}/usr/share/squid/
 	${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid
 	${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid

+ 27 - 0
package/squid/files/squid.conf

@@ -0,0 +1,27 @@
+visible_hostname linux
+http_port 3128
+# acl
+acl manager proto cache_object
+acl localhost src 127.0.0.1/32
+acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
+acl localnet src 10.0.0.0/8	# RFC1918 possible internal network
+acl localnet src 172.16.0.0/12	# RFC1918 possible internal network
+acl localnet src 192.168.0.0/16	# RFC1918 possible internal network
+acl SSL_ports port 443
+acl Safe_ports port 80		# http
+acl Safe_ports port 21		# ftp
+acl Safe_ports port 443		# https
+acl Safe_ports port 70		# gopher
+acl Safe_ports port 210		# wais
+acl Safe_ports port 1025-65535	# unregistered ports
+acl Safe_ports port 280		# http-mgmt
+acl Safe_ports port 488		# gss-http
+acl Safe_ports port 591		# filemaker
+acl Safe_ports port 777		# multiling http
+acl CONNECT method CONNECT
+http_access allow manager localhost
+http_access deny manager
+http_access deny !Safe_ports
+http_access deny CONNECT !SSL_ports
+http_access allow localnet
+http_access deny all

+ 1 - 1
target/alix1c/Makefile

@@ -13,7 +13,7 @@ kernel-install:
 ifeq ($(FS),ext2-cf)
 ifeq ($(FS),ext2-cf)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 	@echo
 	@echo
-	@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL),"
+	@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
 	@echo "To install everything to CompactFlash use scripts/install.sh"
 	@echo "To install everything to CompactFlash use scripts/install.sh"
 	@echo 'Login as user root with password linux123 via ssh or console'
 	@echo 'Login as user root with password linux123 via ssh or console'
 endif
 endif

+ 1 - 1
target/alix2d/Makefile

@@ -13,7 +13,7 @@ kernel-install:
 ifeq ($(FS),ext2-cf)
 ifeq ($(FS),ext2-cf)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 	@echo
 	@echo
-	@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL),"
+	@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
 	@echo "To install everything to CompactFlash use scripts/install.sh"
 	@echo "To install everything to CompactFlash use scripts/install.sh"
 	@echo 'Login as user root with password linux123 via ssh or console'
 	@echo 'Login as user root with password linux123 via ssh or console'
 endif
 endif