summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-08-20 05:39:59 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-08-20 05:39:59 +0000
commit86697678e93f1a432db4b340099a6b34740495f6 (patch)
treeb03e6465ab55acd0d11507bcb584626ed5e48c17
parent89d5f1345fed2acdc703cc3a51e25662097a9c6e (diff)
fix zlib; add dropbear ipkg
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@139 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--obsolete-buildroot/Makefile10
-rw-r--r--obsolete-buildroot/make/jffs2root.mk2
-rw-r--r--obsolete-buildroot/make/zlib.mk2
-rw-r--r--obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/conffiles1
-rw-r--r--obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/control9
-rwxr-xr-xobsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/postinst29
-rwxr-xr-xobsolete-buildroot/sources/openwrt/ipkg/dropbear/S51dropbear2
-rw-r--r--obsolete-buildroot/sources/openwrt/ipkg/dropbear/dropbear.patch81
8 files changed, 130 insertions, 6 deletions
diff --git a/obsolete-buildroot/Makefile b/obsolete-buildroot/Makefile
index e534b44c4..0b67b1539 100644
--- a/obsolete-buildroot/Makefile
+++ b/obsolete-buildroot/Makefile
@@ -97,7 +97,7 @@ INSTALL_LIBGCJ:=false
#############################################################
TARGETS:=host-sed openwrt-code.bin
-PACKAGES:=oidentd iproute2 sched-modules wshaper zlib openssl openssh pppoecd
+PACKAGES:=oidentd iproute2 sched-modules wshaper zlib openssl openssh pppoecd dropbear
#############################################################
#
@@ -192,9 +192,11 @@ world: $(DL_DIR) $(TARGETS_SOURCE) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(T
packages: ipkg-utils $(PACKAGES_IPK)
-@mkdir -p $(BASE_DIR)/packages
- cd $(BASE_DIR)/packages
- -mv $(BUILD_DIR)/*.ipk .
- $(IPKG_MAKE_INDEX) . > Packages
+ { \
+ cd $(BASE_DIR)/packages; \
+ mv $(BUILD_DIR)/*.ipk .; \
+ $(IPKG_MAKE_INDEX) . > Packages; \
+ }
@echo "ALL DONE."
.PHONY: all world clean dirclean distclean source $(TARGETS) \
diff --git a/obsolete-buildroot/make/jffs2root.mk b/obsolete-buildroot/make/jffs2root.mk
index 569ae7e39..d5983e9ab 100644
--- a/obsolete-buildroot/make/jffs2root.mk
+++ b/obsolete-buildroot/make/jffs2root.mk
@@ -7,7 +7,7 @@
MTD_DIR:=$(BUILD_DIR)/mtd-20011217
MTD_SOURCE=mtd_20011217.orig.tar.gz
MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd
-MKFS_JFFS2=$(shell which mkfs.jffs2 || echo $(MTD_DIR)/util/mkfs.jffs2)
+MKFS_JFFS2=${shell which mkfs.jffs2 || echo $(MTD_DIR)/util/mkfs.jffs2}
$(DL_DIR)/$(MTD_SOURCE):
$(WGET) -P $(DL_DIR) $(MTD_SITE)/$(MTD_SOURCE)
diff --git a/obsolete-buildroot/make/zlib.mk b/obsolete-buildroot/make/zlib.mk
index 9cc004ccc..85b01d75b 100644
--- a/obsolete-buildroot/make/zlib.mk
+++ b/obsolete-buildroot/make/zlib.mk
@@ -71,7 +71,7 @@ $(ZLIB_IPK): uclibc $(STAGING_DIR)/lib/libz.so.1.1.4
cp -dpf $(STAGING_DIR)/lib/libz.so* $(ZLIB_IPK_DIR)/lib;
-$(STRIP) --strip-unneeded $(ZLIB_IPK_DIR)/lib/libz.so*
touch -c $(ZLIB_IPK_DIR)/lib/libz.so.1.1.4
- cd $(ZLIB_IPK_DIR); $(IPKG_BUILDPACKAGE)
+ cd $(BUILD_DIR); $(IPKG_BUILD) $(ZLIB_IPK_DIR)
zlib-ipk: $(ZLIB_IPK)
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/conffiles b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/conffiles
new file mode 100644
index 000000000..917cdba0c
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/conffiles
@@ -0,0 +1 @@
+/etc/init.d/S51dropbear
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/control b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/control
new file mode 100644
index 000000000..aa91ec552
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/control
@@ -0,0 +1,9 @@
+Package: dropbear
+Version: 0.44test2
+Architecture: mipsel
+Maintainer: Leigh Dyer <lsd@linuxgamers.net>
+Source: http://matt.ucc.asn.au/dropbear/testing/dropbear-0.44test2.tar.bz2
+Section: net
+Priority: optional
+Depends:
+Description: Lightweight SSH client and server system
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/postinst b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/postinst
new file mode 100755
index 000000000..bfe8b4731
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/CONTROL/postinst
@@ -0,0 +1,29 @@
+#!/bin/sh
+echo
+mkdir -p /etc/dropbear
+[ ! -f /etc/dropbear/dropbear_dss_host_key ] && {
+/tmp/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
+}
+rm /tmp/dropbearkey
+[ ! -f /etc/passwd ] && {
+cat > /etc/passwd << EOF
+root::0:0:root:/tmp:/bin/ash
+EOF
+cat > /etc/shells << EOF
+/bin/ash
+EOF
+cat > /etc/group << EOF
+root:*:0:
+EOF
+passwd
+}
+
+cat << EOF
+==========================================
+dropbear is now configured to run on boot.
+==========================================
+To start it now, run the following command:
+
+/usr/bin/dropbear
+
+EOF
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/dropbear/S51dropbear b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/S51dropbear
new file mode 100755
index 000000000..e9c237bf2
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/S51dropbear
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/bin/dropbear
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/dropbear/dropbear.patch b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/dropbear.patch
new file mode 100644
index 000000000..bb8de6ba2
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/dropbear/dropbear.patch
@@ -0,0 +1,81 @@
+Only in dropbear-0.44test2: .configured
+diff -r -u dropbear-0.44test2-old/cli-session.c dropbear-0.44test2/cli-session.c
+--- dropbear-0.44test2-old/cli-session.c 2004-08-17 21:22:59.000000000 +1000
++++ dropbear-0.44test2/cli-session.c 2004-08-19 21:50:59.000000000 +1000
+@@ -112,9 +112,14 @@
+ cli_ses.tty_raw_mode = 0;
+ cli_ses.winchange = 0;
+
++ /* We store stdin's flags, so we can set them back on exit (otherwise
++ * busybox's ash isn't happy */
++ cli_ses.stdincopy = dup(STDIN_FILENO);
++ cli_ses.stdinflags = fcntl(STDIN_FILENO, F_GETFL, 0);
++
+ /* Auth */
+ cli_ses.lastpubkey = NULL;
+- cli_ses.lastauthtype = NULL;
++ cli_ses.lastauthtype = 0;
+
+ /* For printing "remote host closed" for the user */
+ ses.remoteclosed = cli_remoteclosed;
+@@ -240,6 +245,12 @@
+ if (!sessinitdone) {
+ return;
+ }
++
++ /* Set stdin back to non-blocking - busybox ash dies nastily
++ * if we don't revert the flags */
++ TRACE(("close stdincopy = %d", cli_ses.stdincopy));
++ fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags);
++
+ cli_tty_cleanup();
+
+ }
+diff -r -u dropbear-0.44test2-old/options.h dropbear-0.44test2/options.h
+--- dropbear-0.44test2-old/options.h 2004-08-17 21:23:00.000000000 +1000
++++ dropbear-0.44test2/options.h 2004-08-20 13:40:44.000000000 +1000
+@@ -87,7 +87,7 @@
+ * for hostkey as well as for verifying signatures with pubkey auth.
+ * Removing either of these won't save very much space.
+ * SSH2 RFC Draft requires dss, recommends rsa */
+-#define DROPBEAR_RSA
++//#define DROPBEAR_RSA
+ #define DROPBEAR_DSS
+
+ /* Define DSS_PROTOK to use PuTTY's method of generating the value k for dss,
+diff -r -u dropbear-0.44test2-old/session.h dropbear-0.44test2/session.h
+--- dropbear-0.44test2-old/session.h 2004-08-17 21:23:00.000000000 +1000
++++ dropbear-0.44test2/session.h 2004-08-19 21:50:59.000000000 +1000
+@@ -212,6 +212,8 @@
+
+ int tty_raw_mode; /* Whether we're in raw mode (and have to clean up) */
+ struct termios saved_tio;
++ int stdincopy;
++ int stdinflags;
+
+ int winchange; /* Set to 1 when a windowchange signal happens */
+
+diff -r -u dropbear-0.44test2-old/svr-auth.c dropbear-0.44test2/svr-auth.c
+--- dropbear-0.44test2-old/svr-auth.c 2004-08-17 21:23:00.000000000 +1000
++++ dropbear-0.44test2/svr-auth.c 2004-08-20 15:06:15.000000000 +1000
+@@ -102,6 +102,8 @@
+ return;
+ }
+
++ ses.connecttimeout = 0;
++
+ /* send the banner if it exists, it will only exist once */
+ if (svr_opts.banner) {
+ send_msg_userauth_banner();
+diff -r -u dropbear-0.44test2-old/svr-runopts.c dropbear-0.44test2/svr-runopts.c
+--- dropbear-0.44test2-old/svr-runopts.c 2004-08-17 21:23:00.000000000 +1000
++++ dropbear-0.44test2/svr-runopts.c 2004-08-20 11:56:31.000000000 +1000
+@@ -302,7 +302,7 @@
+ }
+ #endif
+ #ifdef DROPBEAR_DSS
+- type = DROPBEAR_SIGNKEY_RSA;
++ type = DROPBEAR_SIGNKEY_DSS;
+ ret = readhostkey(dsskeyfile, hostkey, &type);
+ if (ret == DROPBEAR_FAILURE) {
+ disablekey(DROPBEAR_SIGNKEY_DSS, dsskeyfile);