From b047da059a1042a27ba68b1bdc50dd187bd362f4 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 4 Dec 2009 18:10:24 +0100 Subject: update kernel to 2.6.32 - update some applications asterisk, curl, strace, radvd, rpm - fix allconfig - /dev for full build seems to need more than 64k --- Makefile | 8 +- mk/build.mk | 46 +- mk/modules.mk | 5 - package/asterisk/Makefile | 8 +- .../asterisk/patches/patch-channels_chan_iax2_c | 20 + package/asterisk/patches/patch-channels_chan_oss_c | 37 + package/asterisk/patches/patch-main_astobj2_c | 11 + package/asterisk/patches/patch-main_translate_c | 11 + package/asterisk/patches/patch-menuselect-tree | 12 + package/asterisk/patches/patch-res_res_features_c | 11 + package/base-files/extra/init | 2 +- package/base-files/extra/sbin/update | 12 +- package/curl/Makefile | 12 +- package/curl/patches/patch-configure | 11 +- package/openntpd/Makefile | 2 +- package/openntpd/files/ntpd.init | 4 +- package/openntpd/files/openntpd.postinst | 3 +- package/radvd/Makefile | 4 +- package/rpm/Makefile | 6 +- package/strace/Makefile | 4 +- package/strace/patches/patch-config_h_in | 15 - package/strace/patches/patch-configure | 26 - package/strace/patches/patch-configure_ac | 18 - .../strace/patches/patch-linux_arm_syscallent_h | 15 - package/strace/patches/patch-net_c | 10 + package/strace/patches/patch-process_c | 109 - package/strace/patches/patch-signal_c | 42 - package/strace/patches/patch-syscall_c | 81 - package/strace/patches/patch-system_c | 11 - package/strace/patches/patch-util_c | 53 - package/tor/Makefile | 6 +- package/tor/patches/patch-configure | 12 - package/tor/patches/patch-contrib_suse_tor_sh | 11 + package/tor/patches/patch-contrib_tor_sh | 11 + package/tor/patches/patch-contrib_torctl | 27 + package/tor/patches/patch-src_common_util_h | 33 +- package/tor/patches/patch-src_or_eventdns_c | 18 + package/tor/patches/patch-tor_spec | 11 + package/udev/Makefile | 3 + rules.mk | 5 - scripts/scan-pkgs.sh | 9 - target/Config.in | 1 + target/alix1c/target.mk | 4 +- target/linux/config/Config.in.block | 4 +- target/linux/config/Config.in.netdevice | 11 + target/linux/config/Config.in.netfilter | 7 - target/linux/patches/2.6.30.5/aufs2-2.6.30.patch | 24453 ------------------ target/linux/patches/2.6.30.5/cygwin-compat.patch | 66 - target/linux/patches/2.6.30.5/freebsd-compat.patch | 11 - target/linux/patches/2.6.30.5/mips-delay-fix.patch | 27 - target/linux/patches/2.6.30.5/mtd-root.patch | 62 - target/linux/patches/2.6.30.5/ocf.patch | 23653 ------------------ target/linux/patches/2.6.30.5/startup.patch | 20 - target/linux/patches/2.6.30.5/swconfig.patch | 1075 - target/linux/patches/2.6.30.5/yaffs2.patch | 15066 ------------ target/linux/patches/2.6.31.4/aufs2.patch | 24453 ------------------ target/linux/patches/2.6.31.4/cris-initrd.patch | 14 - target/linux/patches/2.6.31.4/cygwin-compat.patch | 66 - target/linux/patches/2.6.31.4/freebsd-compat.patch | 11 - target/linux/patches/2.6.31.4/mtd-root.patch | 62 - target/linux/patches/2.6.31.4/ocf.patch | 23653 ------------------ target/linux/patches/2.6.31.4/startup.patch | 20 - target/linux/patches/2.6.31.4/swconfig.patch | 1075 - target/linux/patches/2.6.31.4/yaffs2.patch | 15066 ------------ target/linux/patches/2.6.32/aufs2.patch | 24455 +++++++++++++++++++ target/linux/patches/2.6.32/cris-initrd.patch | 14 + target/linux/patches/2.6.32/cygwin-compat.patch | 66 + target/linux/patches/2.6.32/freebsd-compat.patch | 11 + target/linux/patches/2.6.32/mtd-root.patch | 62 + target/linux/patches/2.6.32/ocf.patch | 23653 ++++++++++++++++++ target/linux/patches/2.6.32/scsi-header.patch | 41 + target/linux/patches/2.6.32/startup.patch | 20 + target/linux/patches/2.6.32/swconfig.patch | 1075 + target/linux/patches/2.6.32/yaffs2.patch | 15066 ++++++++++++ 74 files changed, 64782 insertions(+), 129316 deletions(-) create mode 100644 package/asterisk/patches/patch-channels_chan_iax2_c create mode 100644 package/asterisk/patches/patch-channels_chan_oss_c create mode 100644 package/asterisk/patches/patch-main_astobj2_c create mode 100644 package/asterisk/patches/patch-main_translate_c create mode 100644 package/asterisk/patches/patch-menuselect-tree create mode 100644 package/asterisk/patches/patch-res_res_features_c delete mode 100644 package/strace/patches/patch-config_h_in delete mode 100644 package/strace/patches/patch-configure delete mode 100644 package/strace/patches/patch-configure_ac delete mode 100644 package/strace/patches/patch-linux_arm_syscallent_h create mode 100644 package/strace/patches/patch-net_c delete mode 100644 package/strace/patches/patch-process_c delete mode 100644 package/strace/patches/patch-signal_c delete mode 100644 package/strace/patches/patch-syscall_c delete mode 100644 package/strace/patches/patch-system_c delete mode 100644 package/strace/patches/patch-util_c delete mode 100644 package/tor/patches/patch-configure create mode 100644 package/tor/patches/patch-contrib_suse_tor_sh create mode 100644 package/tor/patches/patch-contrib_tor_sh create mode 100644 package/tor/patches/patch-contrib_torctl create mode 100644 package/tor/patches/patch-src_or_eventdns_c create mode 100644 package/tor/patches/patch-tor_spec delete mode 100644 target/linux/patches/2.6.30.5/aufs2-2.6.30.patch delete mode 100644 target/linux/patches/2.6.30.5/cygwin-compat.patch delete mode 100644 target/linux/patches/2.6.30.5/freebsd-compat.patch delete mode 100644 target/linux/patches/2.6.30.5/mips-delay-fix.patch delete mode 100644 target/linux/patches/2.6.30.5/mtd-root.patch delete mode 100644 target/linux/patches/2.6.30.5/ocf.patch delete mode 100644 target/linux/patches/2.6.30.5/startup.patch delete mode 100644 target/linux/patches/2.6.30.5/swconfig.patch delete mode 100644 target/linux/patches/2.6.30.5/yaffs2.patch delete mode 100644 target/linux/patches/2.6.31.4/aufs2.patch delete mode 100644 target/linux/patches/2.6.31.4/cris-initrd.patch delete mode 100644 target/linux/patches/2.6.31.4/cygwin-compat.patch delete mode 100644 target/linux/patches/2.6.31.4/freebsd-compat.patch delete mode 100644 target/linux/patches/2.6.31.4/mtd-root.patch delete mode 100644 target/linux/patches/2.6.31.4/ocf.patch delete mode 100644 target/linux/patches/2.6.31.4/startup.patch delete mode 100644 target/linux/patches/2.6.31.4/swconfig.patch delete mode 100644 target/linux/patches/2.6.31.4/yaffs2.patch create mode 100644 target/linux/patches/2.6.32/aufs2.patch create mode 100644 target/linux/patches/2.6.32/cris-initrd.patch create mode 100644 target/linux/patches/2.6.32/cygwin-compat.patch create mode 100644 target/linux/patches/2.6.32/freebsd-compat.patch create mode 100644 target/linux/patches/2.6.32/mtd-root.patch create mode 100644 target/linux/patches/2.6.32/ocf.patch create mode 100644 target/linux/patches/2.6.32/scsi-header.patch create mode 100644 target/linux/patches/2.6.32/startup.patch create mode 100644 target/linux/patches/2.6.32/swconfig.patch create mode 100644 target/linux/patches/2.6.32/yaffs2.patch diff --git a/Makefile b/Makefile index 79064a3f0..eaddd6ca3 100644 --- a/Makefile +++ b/Makefile @@ -132,14 +132,12 @@ allconfig: .prereq_done allmodconfig: .prereq_done @${GMAKE_INV} _mconfig W=-o RCONFIG=Config.in -allmoddefconfig: .prereq_done - @if [ -z "$(TARGET)" ];then echo "You need to specify a target"; exit 1;fi - cp $(TOPDIR)/target/$(TARGET)/default.config $(TOPDIR)/.defconfig - @${GMAKE_INV} _mconfig W="-m -o -D .defconfig" RCONFIG=Config.in - package_index: .prereq_done @${GMAKE_INV} package_index +bulk: .prereq_done + @${GMAKE_INV} bulk + world: .prereq_done @${GMAKE_INV} world diff --git a/mk/build.mk b/mk/build.mk index aa97026cb..34ae7935a 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -13,7 +13,24 @@ CONFIG = config DEFCONFIG= ADK_DEVELSYSTEM=n \ ADK_DEBUG=n \ ADK_STATIC=n \ - ADK_FORCE_PARALLEL=n + ADK_FORCE_PARALLEL=n \ + BUSYBOX_SELINUX=n \ + BUSYBOX_LOCALE_SUPPORT=n \ + BUSYBOX_FEATURE_PREFER_APPLETS=n \ + BUSYBOX_FEATURE_SUID=n \ + BUSYBOX_SELINUXENABLED=n \ + BUSYBOX_FEATURE_INSTALLER=n \ + BUSYBOX_PAM=n \ + BUSYBOX_FLASH_LOCK=n \ + BUSYBOX_FLASH_UNLOCK=n \ + BUSYBOX_FLASH_ERASEALL=n \ + BUSYBOX_PIE=n \ + BUSYBOX_DEBUG=n \ + BUSYBOX_NOMMU=n \ + BUSYBOX_WERROR=n \ + BUSYBOX_STATIC=n \ + ADK_KERNEL_RT2X00_DEBUG=n \ + ADK_KERNEL_ATH5K_DEBUG=n noconfig_targets:= menuconfig \ _config \ @@ -227,7 +244,26 @@ modconfig: echo $$symbol >> $(TOPDIR)/all.config; \ done; \ fi + @if [ ! -z "$(FS)" ];then \ + grep "^config" target/Config.in \ + |grep -i "$(FS)" \ + |sed -e "s#^config \(.*\)#\1=y#" \ + >> $(TOPDIR)/all.config; \ + fi + @if [ ! -z "$(PKG)" ];then \ + grep "^config" target/Config.in \ + |grep -i "$(PKG)" \ + |sed -e "s#^config \(.*\)#\1=y#" \ + >> $(TOPDIR)/all.config; \ + fi + @if [ ! -z "$(LIBC)" ];then \ + grep "^config" target/Config.in \ + |grep -i "$(LIBC)" \ + |sed -e "s#^config \(.*\)#\1=y#" \ + >> $(TOPDIR)/all.config; \ + fi ifneq (,$(filter %_qemu,${TARGET})) + @echo ADK_LINUX_QEMU=y >> $(TOPDIR)/all.config endif ifneq (,$(filter %_rescue,${TARGET})) @@ -248,6 +284,14 @@ _mconfig: ${CONFIG}/conf _mconfig2 _config _mconfig2: ${CONFIG}/conf modconfig @${CONFIG}/conf -m ${RCONFIG} >/dev/null +# build all targets and combinations +bulk: + mkdir $(TOPDIR)/bulk + $(MAKE) TARGET=alix1c LIBC=uclibc FS=nfsroot PKG=ipkg allmodconfig + $(MAKE) v + $(CP) $(BIN_DIR) $(TOPDIR)/bulk + $(MAKE) cleantarget + distclean: @$(MAKE) -C $(CONFIG) clean @rm -rf $(BUILD_DIR) $(TOOLS_BUILD_DIR) $(BIN_DIR) $(DISTDIR) \ diff --git a/mk/modules.mk b/mk/modules.mk index 19ab1b14d..cbaaca78f 100644 --- a/mk/modules.mk +++ b/mk/modules.mk @@ -58,7 +58,6 @@ $(eval $(call KMOD_template,ATH5K,mac80211-ath5k,\ ,20, kmod-led-class)) $(eval $(call KMOD_template,RT2X00,mac80211-rt2x00,\ - $(MODULES_DIR)/kernel/drivers/input/input-polldev \ $(MODULES_DIR)/kernel/drivers/net/wireless/rt2x00/rt2x00lib \ $(MODULES_DIR)/kernel/drivers/net/wireless/rt2x00/rt2x00pci \ ,17)) @@ -490,10 +489,6 @@ $(eval $(call KMOD_template,IP_NF_TARGET_NETMAP,nf-ip-target-netmap,\ $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_NETMAP \ ,65)) -$(eval $(call KMOD_template,IP_NF_TARGET_SAME,nf-ip-target-same,\ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/ipt_SAME \ -,65)) - # # Mangle # diff --git a/package/asterisk/Makefile b/package/asterisk/Makefile index d234b8a57..ecb33b52d 100644 --- a/package/asterisk/Makefile +++ b/package/asterisk/Makefile @@ -4,9 +4,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= asterisk -PKG_VERSION:= 1.4.26.3 +PKG_VERSION:= 1.4.27.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= 04017dfdc8caeb8f4663b5dc4a9e1019 +PKG_MD5SUM:= e09ca163a6e90018c92c65a50b9ec398 PKG_DESCR:= Open Source PBX PKG_SECTION:= net PKG_DEPENDS:= libncurses libpthread libopenssl libcurl @@ -121,8 +121,8 @@ pre-configure: post-build: cd ${WRKBUILD}/sounds ; \ - tar xzf asterisk-core-sounds-en-gsm-1.4.15.tar.gz ; \ - rm asterisk-core-sounds-en-gsm-1.4.15.tar.gz + tar xzf asterisk-core-sounds-en-gsm-1.4.16.tar.gz ; \ + rm asterisk-core-sounds-en-gsm-1.4.16.tar.gz @echo @echo "---> have to install ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} <---" @echo diff --git a/package/asterisk/patches/patch-channels_chan_iax2_c b/package/asterisk/patches/patch-channels_chan_iax2_c new file mode 100644 index 000000000..f39c2bf5b --- /dev/null +++ b/package/asterisk/patches/patch-channels_chan_iax2_c @@ -0,0 +1,20 @@ +--- asterisk-1.4.27.1.orig/channels/chan_iax2.c 2009-11-10 18:15:57.000000000 +0100 ++++ asterisk-1.4.27.1/channels/chan_iax2.c 2009-12-03 20:57:05.000000000 +0100 +@@ -7076,7 +7076,7 @@ static int try_transfer(struct chan_iax2 + + memset(&ied, 0, sizeof(ied)); + if (ies->apparent_addr) +- bcopy(ies->apparent_addr, &new, sizeof(new)); ++ memcpy(&new, ies->apparent_addr, sizeof(new)); + if (ies->callno) + newcall = ies->callno; + if (!newcall || !new.sin_addr.s_addr || !new.sin_port) { +@@ -7235,7 +7235,7 @@ static int iax2_ack_registry(struct iax_ + + memset(&us, 0, sizeof(us)); + if (ies->apparent_addr) +- bcopy(ies->apparent_addr, &us, sizeof(us)); ++ memcpy(&us, ies->apparent_addr, sizeof(us)); + if (ies->username) + ast_copy_string(peer, ies->username, sizeof(peer)); + if (ies->refresh) diff --git a/package/asterisk/patches/patch-channels_chan_oss_c b/package/asterisk/patches/patch-channels_chan_oss_c new file mode 100644 index 000000000..33e9aaad7 --- /dev/null +++ b/package/asterisk/patches/patch-channels_chan_oss_c @@ -0,0 +1,37 @@ +--- asterisk-1.4.27.1.orig/channels/chan_oss.c 2009-08-10 21:15:57.000000000 +0200 ++++ asterisk-1.4.27.1/channels/chan_oss.c 2009-12-03 20:58:13.000000000 +0100 +@@ -562,7 +562,7 @@ static void send_sound(struct chan_oss_p + l = FRAME_SIZE - ofs; + if (l > s->datalen - start) /* don't overflow the source */ + l = s->datalen - start; +- bcopy(s->data + start, myframe + ofs, l * 2); ++ memcpy(myframe + ofs, s->data + start, l * 2); + if (0) + ast_log(LOG_WARNING, "send_sound sound %d/%d of %d into %d\n", l_sampsent, l, s->samplen, ofs); + l_sampsent += l; +@@ -573,14 +573,14 @@ static void send_sound(struct chan_oss_p + if (l > 0) { + if (l > FRAME_SIZE - ofs) + l = FRAME_SIZE - ofs; +- bcopy(silence, myframe + ofs, l * 2); ++ memcpy(myframe + ofs, silence, l * 2); + l_sampsent += l; + } else { /* silence is over, restart sound if loop */ + if (s->repeat == 0) { /* last block */ + o->cursound = -1; + o->nosound = 0; /* allow audio data */ + if (ofs < FRAME_SIZE) /* pad with silence */ +- bcopy(silence, myframe + ofs, (FRAME_SIZE - ofs) * 2); ++ memcpy(myframe + ofs, silence, (FRAME_SIZE - ofs) * 2); + } + l_sampsent = 0; + } +@@ -905,7 +905,7 @@ static struct ast_frame *oss_read(struct + + /* XXX can be simplified returning &ast_null_frame */ + /* prepare a NULL frame in case we don't have enough data to return */ +- bzero(f, sizeof(struct ast_frame)); ++ memset(f, 0, sizeof(struct ast_frame)); + f->frametype = AST_FRAME_NULL; + f->src = oss_tech.type; + diff --git a/package/asterisk/patches/patch-main_astobj2_c b/package/asterisk/patches/patch-main_astobj2_c new file mode 100644 index 000000000..d8aaf114b --- /dev/null +++ b/package/asterisk/patches/patch-main_astobj2_c @@ -0,0 +1,11 @@ +--- asterisk-1.4.27.1.orig/main/astobj2.c 2009-10-06 03:16:36.000000000 +0200 ++++ asterisk-1.4.27.1/main/astobj2.c 2009-12-03 20:54:12.000000000 +0100 +@@ -236,7 +236,7 @@ int ao2_ref(void *user_data, const int d + /* for safety, zero-out the astobj2 header and also the + * first word of the user-data, which we make sure is always + * allocated. */ +- bzero(obj, sizeof(struct astobj2 *) + sizeof(void *) ); ++ memset(obj, 0, sizeof(struct astobj2 *) + sizeof(void *) ); + free(obj); + } + diff --git a/package/asterisk/patches/patch-main_translate_c b/package/asterisk/patches/patch-main_translate_c new file mode 100644 index 000000000..36d7c3058 --- /dev/null +++ b/package/asterisk/patches/patch-main_translate_c @@ -0,0 +1,11 @@ +--- asterisk-1.4.27.1.orig/main/translate.c 2009-10-21 18:44:49.000000000 +0200 ++++ asterisk-1.4.27.1/main/translate.c 2009-12-03 20:53:36.000000000 +0100 +@@ -442,7 +442,7 @@ static void rebuild_matrix(int samples) + if (option_debug) + ast_log(LOG_DEBUG, "Resetting translation matrix\n"); + +- bzero(tr_matrix, sizeof(tr_matrix)); ++ memset(tr_matrix, 0, sizeof(tr_matrix)); + + /* first, compute all direct costs */ + AST_LIST_TRAVERSE(&translators, t, list) { diff --git a/package/asterisk/patches/patch-menuselect-tree b/package/asterisk/patches/patch-menuselect-tree new file mode 100644 index 000000000..6bac1894d --- /dev/null +++ b/package/asterisk/patches/patch-menuselect-tree @@ -0,0 +1,12 @@ +--- asterisk-1.4.27.1.orig/menuselect-tree 2009-11-30 19:30:41.000000000 +0100 ++++ asterisk-1.4.27.1/menuselect-tree 2009-12-03 20:55:04.000000000 +0100 +@@ -59,9 +59,6 @@ + + dahdi + +- +- chan_local +- + + + diff --git a/package/asterisk/patches/patch-res_res_features_c b/package/asterisk/patches/patch-res_res_features_c new file mode 100644 index 000000000..a237fbf97 --- /dev/null +++ b/package/asterisk/patches/patch-res_res_features_c @@ -0,0 +1,11 @@ +--- asterisk-1.4.27.1.orig/res/res_features.c 2009-10-20 19:46:37.000000000 +0200 ++++ asterisk-1.4.27.1/res/res_features.c 2009-12-03 20:53:57.000000000 +0100 +@@ -279,7 +279,7 @@ static void *ast_bridge_call_thread(void + ast_bridge_call(tobj->peer, tobj->chan, &tobj->bconfig); + ast_hangup(tobj->chan); + ast_hangup(tobj->peer); +- bzero(tobj, sizeof(*tobj)); /*! \todo XXX for safety */ ++ memset(tobj, 0, sizeof(*tobj)); /*! \todo XXX for safety */ + free(tobj); + return NULL; + } diff --git a/package/base-files/extra/init b/package/base-files/extra/init index db8c3a676..e11446366 100755 --- a/package/base-files/extra/init +++ b/package/base-files/extra/init @@ -8,7 +8,7 @@ mount -o nosuid,nodev,noexec -t sysfs sysfs /sys mount none /tmp -t tmpfs -o size=${size}k mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 } -mount -o nosuid,size=64k,mode=0755 -t tmpfs mdev /dev +mount -o nosuid,size=128k,mode=0755 -t tmpfs mdev /dev mkdir /dev/pts /dev/shm mount -o nosuid,noexec -t devpts devpts /dev/pts exec 0<>/dev/console >&0 2>&0 diff --git a/package/base-files/extra/sbin/update b/package/base-files/extra/sbin/update index 10d6e58c2..0cd4ee713 100755 --- a/package/base-files/extra/sbin/update +++ b/package/base-files/extra/sbin/update @@ -6,9 +6,6 @@ if [ $who -ne 0 ]; then exit 1 fi -cd / -umount -f /etc -mount -o remount,rw / check_exit() { if [ $? -ne 0 ];then @@ -17,17 +14,26 @@ check_exit() { fi } +prepare() { + cd / + umount -f /etc + mount -o remount,rw / +} + extract_from_file() { + prepare cat $1 | gunzip -c | tar -xf - check_exit } extract_from_ssh() { + prepare ssh $1 "cat $2" | gunzip -c | tar -xf - check_exit } extract_from_http() { + prepare wget -O - $1 | gunzip -c | tar -xf - check_exit } diff --git a/package/curl/Makefile b/package/curl/Makefile index a0e27d77c..69768dc63 100644 --- a/package/curl/Makefile +++ b/package/curl/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= curl -PKG_VERSION:= 7.19.6 +PKG_VERSION:= 7.19.7 PKG_RELEASE:= 1 -PKG_MD5SUM:= 6625de9d42d1b8d3af372d3241a576fd +PKG_MD5SUM:= ecb2e37e45c9933e2a963cabe03670ab PKG_DESCR:= a client-side URL transfer tool PKG_SECTION:= net PKG_URL:= http://curl.haxx.se @@ -28,7 +28,7 @@ $(eval $(call PKG_template,CURL,curl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS $(eval $(call PKG_template,LIBCURL,libcurl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR_1},${PKG_SECTION_1})) $(eval $(call PKG_template,LIBCURL_DEV,libcurl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR_1},${PKG_SECTION_1})) -CONFIGURE_STYLE= gnu +CONFIGURE_STYLE:= gnu CONFIGURE_ENV+= curl_typeof_curl_socklen_t=socklen_t CONFIGURE_ARGS+= --disable-thread \ --enable-cookies \ @@ -50,14 +50,14 @@ CONFIGURE_ARGS+= --disable-thread \ --without-ca-bundle \ --without-gnutls \ --without-libidn -BUILD_STYLE= auto -INSTALL_STYLE= auto +BUILD_STYLE:= auto +INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_CURL}/usr/bin ${IDIR_LIBCURL}/usr/lib ${INSTALL_DIR} ${IDIR_LIBCURL_DEV}/usr/include/curl ${CP} ${WRKINST}/usr/bin/curl ${IDIR_CURL}/usr/bin/ - ${CP} ${WRKINST}/usr/lib/libcurl.so.* ${IDIR_LIBCURL}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libcurl.so* ${IDIR_LIBCURL}/usr/lib/ ${CP} ${WRKINST}/usr/include/curl/*.h ${IDIR_LIBCURL_DEV}/usr/include/curl/ include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/curl/patches/patch-configure b/package/curl/patches/patch-configure index 3cb59e18e..21c0b095d 100644 --- a/package/curl/patches/patch-configure +++ b/package/curl/patches/patch-configure @@ -1,6 +1,6 @@ ---- curl-7.19.6.orig/configure 2009-07-22 22:11:25.000000000 +0200 -+++ curl-7.19.6/configure 2009-10-01 14:05:37.578930054 +0200 -@@ -25479,16 +25479,6 @@ fi +--- curl-7.19.7.orig/configure 2009-11-04 13:26:02.000000000 +0100 ++++ curl-7.19.7/configure 2009-12-03 21:07:01.000000000 +0100 +@@ -19233,15 +19233,6 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -9,11 +9,10 @@ - - LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL" - export LD_LIBRARY_PATH -- { $as_echo "$as_me:$LINENO: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5 +- { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5 -$as_echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;} - fi - fi -- - fi + fi diff --git a/package/openntpd/Makefile b/package/openntpd/Makefile index f341614d1..5c8cf0fd5 100644 --- a/package/openntpd/Makefile +++ b/package/openntpd/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= openntpd PKG_VERSION:= 3.9p1 -PKG_RELEASE:= 17 +PKG_RELEASE:= 18 PKG_MD5SUM:= afc34175f38d08867c1403d9008600b3 PKG_DESCR:= NTP server daemon PKG_SECTION:= net diff --git a/package/openntpd/files/ntpd.init b/package/openntpd/files/ntpd.init index 42e068860..fd655e9cc 100644 --- a/package/openntpd/files/ntpd.init +++ b/package/openntpd/files/ntpd.init @@ -7,7 +7,7 @@ case $1 in autostop) ;; autostart) - [[ $ntpd_flags = NO ]] && exit 0 + test x"${ntpd:-NO}" = x"NO" && exit 0 exec sh $0 start ;; start) @@ -15,7 +15,7 @@ start) /usr/sbin/ntpd $ntpd_flags ;; stop) - kill $(pidof ntpd|cut -d ' ' -f 3) + pkill ntpd ;; restart) sh $0 stop diff --git a/package/openntpd/files/openntpd.postinst b/package/openntpd/files/openntpd.postinst index 53bc8c387..c6d0bd33d 100644 --- a/package/openntpd/files/openntpd.postinst +++ b/package/openntpd/files/openntpd.postinst @@ -4,4 +4,5 @@ gid=$(get_next_gid) add_group ntp $gid add_user ntp $(get_next_uid) $gid /tmp/.ntp add_service ntp 123/udp -add_rcconf 'e.g. "-s"' ntpd_flags +add_rcconf ntpd_flags ntpd_flags "-s" +add_rcconf ntpd ntpd NO diff --git a/package/radvd/Makefile b/package/radvd/Makefile index e2d7ab460..6c3662b71 100644 --- a/package/radvd/Makefile +++ b/package/radvd/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= radvd -PKG_VERSION:= 1.2 +PKG_VERSION:= 1.5 PKG_RELEASE:= 1 -PKG_MD5SUM:= 614876420d76cd2bb5bcb49760c8b9e3 +PKG_MD5SUM:= 78598b60ed9d64920739189c3dc0934d PKG_DESCR:= Routing Advertisement Daemon for IPv6 PKG_SECTION:= net PKG_DEPENDS:= kmod-ipv6 diff --git a/package/rpm/Makefile b/package/rpm/Makefile index c7cf91c97..8526288be 100644 --- a/package/rpm/Makefile +++ b/package/rpm/Makefile @@ -4,10 +4,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:= rpm -PKG_VERSION:= 4.7.0 +PKG_VERSION:= 4.7.2 PKG_RELEASE:= 1 -PKG_MD5SUM:= 74791d638c571ec79f06227d453a6a03 -PKG_DESCR:= GNU rpm +PKG_MD5SUM:= 224715646325df4cd3904e3ac9e16186 +PKG_DESCR:= Package Manager PKG_SECTION:= base PKG_URL:= http://www.rpm.org PKG_SITES:= http://rpm.org/releases/rpm-4.7.x/ diff --git a/package/strace/Makefile b/package/strace/Makefile index 0eda1d6c9..44f56502a 100644 --- a/package/strace/Makefile +++ b/package/strace/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= strace -PKG_VERSION:= 4.5.18 +PKG_VERSION:= 4.5.19 PKG_RELEASE:= 1 -PKG_MD5SUM:= e9449fcee97e6a8ed73934c883c870e0 +PKG_MD5SUM:= 2415e435d61e40315a298c80aced0cda PKG_DESCR:= System call trace program PKG_SECTION:= misc PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=strace/} diff --git a/package/strace/patches/patch-config_h_in b/package/strace/patches/patch-config_h_in deleted file mode 100644 index ea06ade61..000000000 --- a/package/strace/patches/patch-config_h_in +++ /dev/null @@ -1,15 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- strace-4.5.18.orig/config.h.in 2008-08-28 23:36:28.000000000 +0200 -+++ strace-4.5.18/config.h.in 2009-01-02 21:24:05.414089778 +0100 -@@ -409,6 +409,11 @@ - /* Define for the AMD x86-64 architecture. */ - #undef X86_64 - -+/* Define for the CRISv10 architecture. */ -+#undef CRISV10 -+ -+/* Define for the CRISv32 architecture. */ -+#undef CRISV32 - /* Enable GNU extensions on systems that have them. */ - #ifndef _GNU_SOURCE - # undef _GNU_SOURCE diff --git a/package/strace/patches/patch-configure b/package/strace/patches/patch-configure deleted file mode 100644 index eadd57304..000000000 --- a/package/strace/patches/patch-configure +++ /dev/null @@ -1,26 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- strace-4.5.18.orig/configure 2008-08-28 23:36:06.000000000 +0200 -+++ strace-4.5.18/configure 2009-01-02 21:26:59.664979346 +0100 -@@ -2531,6 +2531,22 @@ cat >>confdefs.h <<\_ACEOF - _ACEOF - - ;; -+cris|crisv10) -+ arch=crisv10 -+ -+cat >>confdefs.h <<\_ACEOF -+#define CRISV10 1 -+_ACEOF -+ -+ ;; -+crisv32) -+ arch=crisv32 -+ -+cat >>confdefs.h <<\_ACEOF -+#define CRISV32 1 -+_ACEOF -+ -+ ;; - *) - { echo "$as_me:$LINENO: result: NO!" >&5 - echo "${ECHO_T}NO!" >&6; } diff --git a/package/strace/patches/patch-configure_ac b/package/strace/patches/patch-configure_ac deleted file mode 100644 index 28abf1d1a..000000000 --- a/package/strace/patches/patch-configure_ac +++ /dev/null @@ -1,18 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- strace-4.5.18.orig/configure.ac 2008-08-28 23:15:56.000000000 +0200 -+++ strace-4.5.18/configure.ac 2009-01-02 21:24:05.482095139 +0100 -@@ -103,6 +103,14 @@ x86?64*) - arch=x86_64 - AC_DEFINE([X86_64], 1, [Define for the AMD x86-64 architecture.]) - ;; -+cris|crisv10) -+ arch=crisv10 -+ AC_DEFINE([CRISV10], 1, [Define for the CRISv10 architecture.]) -+ ;; -+crisv32) -+ arch=crisv32 -+ AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.]) -+ ;; - *) - AC_MSG_RESULT([NO!]) - AC_MSG_ERROR([architecture $host_cpu is not supported by strace]) diff --git a/package/strace/patches/patch-linux_arm_syscallent_h b/package/strace/patches/patch-linux_arm_syscallent_h deleted file mode 100644 index 387490267..000000000 --- a/package/strace/patches/patch-linux_arm_syscallent_h +++ /dev/null @@ -1,15 +0,0 @@ ---- strace-4.5.18.orig/linux/arm/syscallent.h 2008-07-18 03:23:49.000000000 +0200 -+++ strace-4.5.18/linux/arm/syscallent.h 2009-11-22 21:27:48.660576873 +0100 -@@ -431,6 +431,7 @@ - { 5, 0, printargs, "SYS_398" }, /* 398 */ - { 5, 0, printargs, "SYS_399" }, /* 399 */ - -+#ifndef __ARM_EABI__ - #if SYS_socket_subcall != 400 - #error fix me - #endif -@@ -481,3 +482,4 @@ - { 4, TI, sys_shmdt, "shmdt" }, /* 440 */ - { 4, TI, sys_shmget, "shmget" }, /* 441 */ - { 4, TI, sys_shmctl, "shmctl" }, /* 442 */ -+#endif diff --git a/package/strace/patches/patch-net_c b/package/strace/patches/patch-net_c new file mode 100644 index 000000000..a0dc31029 --- /dev/null +++ b/package/strace/patches/patch-net_c @@ -0,0 +1,10 @@ +--- strace-4.5.19.orig/net.c 2009-09-01 21:53:29.000000000 +0200 ++++ strace-4.5.19/net.c 2009-12-03 23:35:36.000000000 +0100 +@@ -53,6 +53,7 @@ + #include + #if defined(LINUX) + #include ++#include + #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC__ + __GLIBC_MINOR__ >= 3) + # include + #else diff --git a/package/strace/patches/patch-process_c b/package/strace/patches/patch-process_c deleted file mode 100644 index 7309200d0..000000000 --- a/package/strace/patches/patch-process_c +++ /dev/null @@ -1,109 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- strace-4.5.18.orig/process.c 2008-07-18 04:16:47.000000000 +0200 -+++ strace-4.5.18/process.c 2009-01-02 21:24:05.490094969 +0100 -@@ -584,7 +584,7 @@ extern void print_ldt_entry(); - # define ARG_PTID (known_scno(tcp) == SYS_clone2 ? 3 : 2) - # define ARG_CTID (known_scno(tcp) == SYS_clone2 ? 4 : 3) - # define ARG_TLS (known_scno(tcp) == SYS_clone2 ? 5 : 4) --# elif defined S390 || defined S390X -+# elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32 - # define ARG_STACK 0 - # define ARG_FLAGS 1 - # define ARG_PTID 2 -@@ -740,6 +740,10 @@ int new; - 0x100000 | new) < 0) - return -1; - return 0; -+#elif defined(CRISV10) || defined(CRISV32) -+ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_R9), new) < 0) -+ return -1; -+ return 0; - #elif defined(ARM) - /* Some kernels support this, some (pre-2.6.16 or so) don't. */ - # ifndef PTRACE_SET_SYSCALL -@@ -3003,7 +3007,77 @@ const struct xlat struct_user_offsets[] - { 69, "fpcsr" }, - { 70, "fpeir" }, - #endif -+#ifdef CRISV10 -+ { 4*PT_FRAMETYPE, "4*PT_FRAMETYPE" }, -+ { 4*PT_ORIG_R10, "4*PT_ORIG_R10" }, -+ { 4*PT_R13, "4*PT_R13" }, -+ { 4*PT_R12, "4*PT_R12" }, -+ { 4*PT_R11, "4*PT_R11" }, -+ { 4*PT_R10, "4*PT_R10" }, -+ { 4*PT_R9, "4*PT_R9" }, -+ { 4*PT_R8, "4*PT_R8" }, -+ { 4*PT_R7, "4*PT_R7" }, -+ { 4*PT_R6, "4*PT_R6" }, -+ { 4*PT_R5, "4*PT_R5" }, -+ { 4*PT_R4, "4*PT_R4" }, -+ { 4*PT_R3, "4*PT_R3" }, -+ { 4*PT_R2, "4*PT_R2" }, -+ { 4*PT_R1, "4*PT_R1" }, -+ { 4*PT_R0, "4*PT_R0" }, -+ { 4*PT_MOF, "4*PT_MOF" }, -+ { 4*PT_DCCR, "4*PT_DCCR" }, -+ { 4*PT_SRP, "4*PT_SRP" }, -+ { 4*PT_IRP, "4*PT_IRP" }, -+ { 4*PT_CSRINSTR, "4*PT_CSRINSTR" }, -+ { 4*PT_CSRADDR, "4*PT_CSRADDR" }, -+ { 4*PT_CSRDATA, "4*PT_CSRDATA" }, -+ { 4*PT_USP, "4*PT_USP" }, -+#endif -+#ifdef CRISV32 -+ { 4*PT_ORIG_R10, "4*PT_ORIG_R10" }, -+ { 4*PT_R0, "4*PT_R0" }, -+ { 4*PT_R1, "4*PT_R1" }, -+ { 4*PT_R2, "4*PT_R2" }, -+ { 4*PT_R3, "4*PT_R3" }, -+ { 4*PT_R4, "4*PT_R4" }, -+ { 4*PT_R5, "4*PT_R5" }, -+ { 4*PT_R6, "4*PT_R6" }, -+ { 4*PT_R7, "4*PT_R7" }, -+ { 4*PT_R8, "4*PT_R8" }, -+ { 4*PT_R9, "4*PT_R9" }, -+ { 4*PT_R10, "4*PT_R10" }, -+ { 4*PT_R11, "4*PT_R11" }, -+ { 4*PT_R12, "4*PT_R12" }, -+ { 4*PT_R13, "4*PT_R13" }, -+ { 4*PT_ACR, "4*PT_ACR" }, -+ { 4*PT_SRS, "4*PT_SRS" }, -+ { 4*PT_MOF, "4*PT_MOF" }, -+ { 4*PT_SPC, "4*PT_SPC" }, -+ { 4*PT_CCS, "4*PT_CCS" }, -+ { 4*PT_SRP, "4*PT_SRP" }, -+ { 4*PT_ERP, "4*PT_ERP" }, -+ { 4*PT_EXS, "4*PT_EXS" }, -+ { 4*PT_EDA, "4*PT_EDA" }, -+ { 4*PT_USP, "4*PT_USP" }, -+ { 4*PT_PPC, "4*PT_PPC" }, -+ { 4*PT_BP_CTRL, "4*PT_BP_CTRL" }, -+ { 4*PT_BP+4, "4*PT_BP+4" }, -+ { 4*PT_BP+8, "4*PT_BP+8" }, -+ { 4*PT_BP+12, "4*PT_BP+12" }, -+ { 4*PT_BP+16, "4*PT_BP+16" }, -+ { 4*PT_BP+20, "4*PT_BP+20" }, -+ { 4*PT_BP+24, "4*PT_BP+24" }, -+ { 4*PT_BP+28, "4*PT_BP+28" }, -+ { 4*PT_BP+32, "4*PT_BP+32" }, -+ { 4*PT_BP+36, "4*PT_BP+36" }, -+ { 4*PT_BP+40, "4*PT_BP+40" }, -+ { 4*PT_BP+44, "4*PT_BP+44" }, -+ { 4*PT_BP+48, "4*PT_BP+48" }, -+ { 4*PT_BP+52, "4*PT_BP+52" }, -+ { 4*PT_BP+56, "4*PT_BP+56" }, -+#endif - -+#if !defined(CRISV10) && !defined(CRISV32) - #if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) - { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" }, - #endif -@@ -3041,6 +3115,7 @@ const struct xlat struct_user_offsets[] - #if defined(I386) || defined(X86_64) - { uoff(u_debugreg), "offsetof(struct user, u_debugreg)" }, - #endif /* I386 */ -+#endif /* !CRISV10/!CRISV32 */ - #endif /* !IA64 */ - #endif /* !ALPHA */ - #endif /* !POWERPC/!SPARC */ diff --git a/package/strace/patches/patch-signal_c b/package/strace/patches/patch-signal_c deleted file mode 100644 index 76795fbf6..000000000 --- a/package/strace/patches/patch-signal_c +++ /dev/null @@ -1,42 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- strace-4.5.18.orig/signal.c 2008-08-20 03:59:40.000000000 +0200 -+++ strace-4.5.18/signal.c 2009-01-02 21:24:05.502094888 +0100 -@@ -1485,9 +1485,38 @@ struct tcb *tcp; - } - return 0; - #else -+#if defined(CRISV10) || defined(CRISV32) -+ struct sigcontext sc; -+ -+ if (entering(tcp)) { -+ long regs[PT_MAX+1]; -+ -+ tcp->u_arg[0] = 0; -+ -+ if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long)regs) < 0) { -+ perror("sigreturn: PTRACE_GETREGS"); -+ return 0; -+ } -+ if (umove(tcp, regs[PT_USP], &sc) < 0) -+ return 0; -+ tcp->u_arg[0] = 1; -+ tcp->u_arg[1] = sc.oldmask; -+ } else { -+ sigset_t sigm; -+ -+ long_to_sigset(tcp->u_arg[1], &sigm); -+ tcp->u_rval = tcp->u_error = 0; -+ if (tcp->u_arg[0] == 0) -+ return 0; -+ tcp->auxstr = sprintsigmask("mask now ", &sigm, 0); -+ return RVAL_NONE | RVAL_STR; -+ } -+ return 0; -+#else - #warning No sys_sigreturn() for this architecture - #warning (no problem, just a reminder :-) - return 0; -+#endif /* !CRISV10/!CRISV32 */ - #endif /* MIPS */ - #endif /* LINUX_MIPSN32 || LINUX_MIPSN64 */ - #endif /* SPARC || SPARC64 */ diff --git a/package/strace/patches/patch-syscall_c b/package/strace/patches/patch-syscall_c deleted file mode 100644 index 700d9be09..000000000 --- a/package/strace/patches/patch-syscall_c +++ /dev/null @@ -1,81 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- strace-4.5.18.orig/syscall.c 2008-08-25 05:16:26.000000000 +0200 -+++ strace-4.5.18/syscall.c 2009-01-02 21:24:05.514097112 +0100 -@@ -772,6 +772,8 @@ internal_syscall(struct tcb *tcp) - static long r9; - #elif defined(X86_64) - static long rax; -+#elif defined(CRISV10) || defined(CRISV32) -+ static long r10; - #endif - #endif /* LINUX */ - #ifdef FREEBSD -@@ -1273,7 +1275,10 @@ struct tcb *tcp; - return 0; - } - } --#endif /* SH64 */ -+#elif defined(CRISV10) || defined(CRISV32) -+ if (upeek(pid, 4*PT_R9, &scno) < 0) -+ return -1; -+#endif /* CRISV10/CRISV32 */ - #endif /* LINUX */ - #ifdef SUNOS4 - if (upeek(pid, uoff(u_arg[7]), &scno) < 0) -@@ -1468,6 +1473,14 @@ struct tcb *tcp; - fprintf(stderr, "stray syscall exit: r8 = %ld\n", r8); - return 0; - } -+#elif defined(CRISV10) || defined(CRISV32) -+ if (upeek(pid, 4*PT_R10, &r10) < 0) -+ return -1; -+ if (r10 != -ENOSYS && !(tcp->flags & TCB_INSYSCALL)) { -+ if (debug) -+ fprintf(stderr, "stray syscall exit: r10 = %ld\n", r10); -+ return 0; -+ } - #endif - #endif /* LINUX */ - return 1; -@@ -1649,6 +1662,17 @@ struct tcb *tcp; - tcp->u_rval = r9; - u_error = 0; - } -+#else -+#if defined(CRISV10) || defined(CRISV32) -+ if (r10 && (unsigned) -r10 < nerrnos) { -+ tcp->u_rval = -1; -+ u_error = -r10; -+ } -+ else { -+ tcp->u_rval = r10; -+ u_error = 0; -+ } -+#endif /* CRISV10/CRISV32 */ - #endif /* SH64 */ - #endif /* SH */ - #endif /* HPPA */ -@@ -2169,6 +2193,23 @@ struct tcb *tcp; - return -1; - } - } -+#elif defined(CRISV10) || defined(CRISV32) -+ { -+ int i; -+ static const int crisregs[] = { -+ 4*PT_ORIG_R10, 4*PT_R11, 4*PT_R12, -+ 4*PT_R13, 4*PT_MOF, 4*PT_SRP -+ }; -+ -+ if (tcp->scno >= 0 && tcp->scno < nsyscalls) -+ tcp->u_nargs = sysent[tcp->scno].nargs; -+ else -+ tcp->u_nargs = 0; -+ for (i = 0; i < tcp->u_nargs; i++) { -+ if (upeek(pid, crisregs[i], &tcp->u_arg[i]) < 0) -+ return -1; -+ } -+ } - #else /* Other architecture (like i386) (32bits specific) */ - { - int i; diff --git a/package/strace/patches/patch-system_c b/package/strace/patches/patch-system_c deleted file mode 100644 index 85ad4a434..000000000 --- a/package/strace/patches/patch-system_c +++ /dev/null @@ -1,11 +0,0 @@ ---- strace-4.5.18.orig/system.c 2007-01-17 00:22:36.000000000 +0100 -+++ strace-4.5.18/system.c 2009-11-22 21:29:57.404591477 +0100 -@@ -70,7 +70,7 @@ - #include - #endif - --#ifdef SYS_cacheflush -+#if defined SYS_cacheflush && !defined ARM - #include - #endif - diff --git a/package/strace/patches/patch-util_c b/package/strace/patches/patch-util_c deleted file mode 100644 index 17112f30e..000000000 --- a/package/strace/patches/patch-util_c +++ /dev/null @@ -1,53 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- strace-4.5.18.orig/util.c 2008-08-19 06:47:51.000000000 +0200 -+++ strace-4.5.18/util.c 2009-01-02 21:24:05.530098238 +0100 -@@ -1097,6 +1097,12 @@ struct tcb *tcp; - #elif defined(SH64) - if (upeek(tcp->pid, REG_PC ,&pc) < 0) - return -1; -+#elif defined(CRISV10) -+ if (upeek(tcp->pid, 4*PT_IRP, &pc) < 0) -+ return -1; -+#elif defined(CRISV32) -+ if (upeek(tcp->pid, 4*PT_ERP, &pc) < 0) -+ return -1; - #endif - return pc; - #endif /* LINUX */ -@@ -1245,6 +1251,22 @@ struct tcb *tcp; - return; - } - tprintf("[%08lx] ", pc); -+#elif defined(CRISV10) -+ long pc; -+ -+ if (upeek(tcp->pid, 4*PT_IRP, &pc) < 0) { -+ PRINTBADPC; -+ return; -+ } -+ tprintf("[%08lx] ", (unsigned long)pc); -+#elif defined(CRISV32) -+ long pc; -+ -+ if (upeek(tcp->pid, 4*PT_ERP, &pc) < 0) { -+ PRINTBADPC; -+ return; -+ } -+ tprintf("[%08lx] ", (unsigned long)pc); - #endif /* !architecture */ - #endif /* LINUX */ - -@@ -1444,6 +1466,13 @@ typedef struct regs arg_setup_state; - # define arg0_offset (REG_OFFSET+16) - # define arg1_offset (REG_OFFSET+24) - # define restore_arg0(tcp, state, val) 0 -+# elif defined CRISV10 || defined CRISV32 -+# define arg0_offset (4*PT_R11) -+# define arg1_offset (4*PT_ORIG_R10) -+# define restore_arg0(tcp, state, val) 0 -+# define restore_arg1(tcp, state, val) 0 -+# define arg0_index 1 -+# define arg1_index 0 - # else - # define arg0_offset 0 - # define arg1_offset 4 diff --git a/package/tor/Makefile b/package/tor/Makefile index cf952da0d..4eebf0243 100644 --- a/package/tor/Makefile +++ b/package/tor/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= tor -PKG_VERSION:= 0.1.1.26 -PKG_RELEASE:= 9 -PKG_MD5SUM:= 0667df7a1f670bee5163b607aea172ba +PKG_VERSION:= 0.2.1.20 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 0d62ee2332fdd95de43debac7435df19 PKG_DESCR:= An anonymous Internet communication system PKG_SECTION:= net PKG_DEPENDS:= libevent libopenssl libpthread zlib diff --git a/package/tor/patches/patch-configure b/package/tor/patches/patch-configure deleted file mode 100644 index b87f3dde8..000000000 --- a/package/tor/patches/patch-configure +++ /dev/null @@ -1,12 +0,0 @@ -$Id$ ---- tor-0.1.1.26.orig/configure 2006-12-15 01:12:11.000000000 +0100 -+++ tor-0.1.1.26/configure 2007-02-17 21:46:29.000000000 +0100 -@@ -15193,7 +15193,7 @@ _ACEOF - # Set CFLAGS _after_ all the above checks, since our warnings are stricter - # than autoconf's macros like. - if test $ac_cv_c_compiler_gnu = yes; then -- CFLAGS="$CFLAGS -Wall -g -O2" -+ CFLAGS="$CFLAGS -Wall" - else - CFLAGS="$CFLAGS -g -O" - fi diff --git a/package/tor/patches/patch-contrib_suse_tor_sh b/package/tor/patches/patch-contrib_suse_tor_sh new file mode 100644 index 000000000..2bc55db33 --- /dev/null +++ b/package/tor/patches/patch-contrib_suse_tor_sh @@ -0,0 +1,11 @@ +--- tor-0.2.1.20.orig/contrib/suse/tor.sh 2009-10-15 18:16:23.000000000 +0200 ++++ tor-0.2.1.20/contrib/suse/tor.sh 2009-12-03 23:45:45.000000000 +0100 +@@ -43,7 +43,7 @@ rc_reset + # Increase open file descriptors a reasonable amount + ulimit -n 8192 + +-TORCTL=/usr/local/bin/torctl ++TORCTL=/usr/bin/torctl + + # torctl will use these environment variables + TORUSER=_tor diff --git a/package/tor/patches/patch-contrib_tor_sh b/package/tor/patches/patch-contrib_tor_sh new file mode 100644 index 000000000..4f953b0fd --- /dev/null +++ b/package/tor/patches/patch-contrib_tor_sh @@ -0,0 +1,11 @@ +--- tor-0.2.1.20.orig/contrib/tor.sh 2009-10-15 18:16:22.000000000 +0200 ++++ tor-0.2.1.20/contrib/tor.sh 2009-12-03 23:45:44.000000000 +0100 +@@ -26,7 +26,7 @@ fi + # Increase open file descriptors a reasonable amount + ulimit -n 8192 + +-TORCTL=/usr/local/bin/torctl ++TORCTL=/usr/bin/torctl + + # torctl will use these environment variables + TORUSER=_tor diff --git a/package/tor/patches/patch-contrib_torctl b/package/tor/patches/patch-contrib_torctl new file mode 100644 index 000000000..b531711db --- /dev/null +++ b/package/tor/patches/patch-contrib_torctl @@ -0,0 +1,27 @@ +--- tor-0.2.1.20.orig/contrib/torctl 2009-10-15 18:16:22.000000000 +0200 ++++ tor-0.2.1.20/contrib/torctl 2009-12-03 23:45:44.000000000 +0100 +@@ -24,19 +24,19 @@ + EXEC=tor + # + # the path to your binary, including options if necessary +-TORBIN="/usr/local/bin/$EXEC" ++TORBIN="/usr/bin/$EXEC" + # + # the path to the configuration file +-TORCONF="/usr/local/etc/tor/torrc" ++TORCONF="/etc/tor/torrc" + # + # the path to your PID file +-PIDFILE="/usr/local/var/run/tor/tor.pid" ++PIDFILE="/var/run/tor/tor.pid" + # + # The path to the log file +-LOGFILE="/usr/local/var/log/tor/tor.log" ++LOGFILE="/var/log/tor/tor.log" + # + # The path to the datadirectory +-TORDATA="/usr/local/var/lib/tor" ++TORDATA="/var/lib/tor" + # + TORARGS="--pidfile $PIDFILE --log \"notice file $LOGFILE\" --runasdaemon 1" + TORARGS="$TORARGS --datadirectory $TORDATA" diff --git a/package/tor/patches/patch-src_common_util_h b/package/tor/patches/patch-src_common_util_h index 4052d16f1..f6607ffc1 100644 --- a/package/tor/patches/patch-src_common_util_h +++ b/package/tor/patches/patch-src_common_util_h @@ -1,12 +1,23 @@ -$Id$ ---- tor-0.1.1.26.orig/src/common/util.h 2006-09-24 19:47:57.000000000 +0200 -+++ tor-0.1.1.26/src/common/util.h 2007-02-17 23:09:46.000000000 +0100 -@@ -36,7 +36,7 @@ - * And I'm not just saying that because some of our asserts check - * security-critical properties. - */ +--- tor-0.2.1.20.orig/src/common/util.h 2009-06-19 08:13:53.000000000 +0200 ++++ tor-0.2.1.20/src/common/util.h 2009-12-03 23:47:21.000000000 +0100 +@@ -24,20 +24,6 @@ + #define O_TEXT 0 + #endif + +-/* Replace assert() with a variant that sends failures to the log before +- * calling assert() normally. +- */ +-#ifdef NDEBUG +-/* Nobody should ever want to build with NDEBUG set. 99% of our asserts will +- * be outside the critical path anyway, so it's silly to disable bug-checking +- * throughout the entire program just because a few asserts are slowing you +- * down. Profile, optimize the critical path, and keep debugging on. +- * +- * And I'm not just saying that because some of our asserts check +- * security-critical properties. +- */ -#error "Sorry; we don't support building with NDEBUG." -+#define tor_assert(expr) ((void)(0)) - #else - #define tor_assert(expr) do { \ - if (!(expr)) { \ +-#endif + + /** Like assert(3), but send assertion failures to the log as well as to + * stderr. */ diff --git a/package/tor/patches/patch-src_or_eventdns_c b/package/tor/patches/patch-src_or_eventdns_c new file mode 100644 index 000000000..138469f09 --- /dev/null +++ b/package/tor/patches/patch-src_or_eventdns_c @@ -0,0 +1,18 @@ +--- tor-0.2.1.20.orig/src/or/eventdns.c 2009-09-17 08:02:18.000000000 +0200 ++++ tor-0.2.1.20/src/or/eventdns.c 2009-12-03 23:49:27.000000000 +0100 +@@ -375,7 +375,6 @@ error_is_eagain(int err) + #define TOLOWER(c) TOR_TOLOWER(c) + #define TOUPPER(c) TOR_TOUPPER(c) + +-#ifndef NDEBUG + static const char * + debug_ntoa(u32 address) + { +@@ -404,7 +403,6 @@ debug_ntop(const struct sockaddr *sa) + } + return ""; + } +-#endif + + static evdns_debug_log_fn_type evdns_log_fn = NULL; + diff --git a/package/tor/patches/patch-tor_spec b/package/tor/patches/patch-tor_spec new file mode 100644 index 000000000..a4bc4adaa --- /dev/null +++ b/package/tor/patches/patch-tor_spec @@ -0,0 +1,11 @@ +--- tor-0.2.1.20.orig/tor.spec 2009-10-15 18:16:22.000000000 +0200 ++++ tor-0.2.1.20/tor.spec 2009-12-03 23:45:44.000000000 +0100 +@@ -101,7 +101,7 @@ + %endif + + %if %{!?_localstatedir:1}%{?_localstatedir:0} +-%define _localstatedir /usr/local/var ++%define _localstatedir /var + %endif + + ## Package information diff --git a/package/udev/Makefile b/package/udev/Makefile index dd7a8c2fe..90ffefe66 100644 --- a/package/udev/Makefile +++ b/package/udev/Makefile @@ -19,6 +19,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,UDEV,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIGURE_STYLE:= gnu +CONFIGURE_ARGS+= --disable-extras \ + --disable-logging \ + --disable-introspection BUILD_STYLE:= auto INSTALL_STYLE:= auto diff --git a/rules.mk b/rules.mk index 8d1d5e914..390b05d0a 100644 --- a/rules.mk +++ b/rules.mk @@ -42,8 +42,3 @@ HOSTLDFLAGS?= TARGET_CFLAGS:= $(strip -fwrapv -fno-ident ${TARGET_CFLAGS}) TARGET_CC:= $(strip ${TARGET_CC}) TARGET_CXX:= $(strip ${TARGET_CXX}) - -#ifneq (${show},) -#_show: -# @echo '$($(show))' -#endif diff --git a/scripts/scan-pkgs.sh b/scripts/scan-pkgs.sh index b1292f7e2..4118383d5 100644 --- a/scripts/scan-pkgs.sh +++ b/scripts/scan-pkgs.sh @@ -31,9 +31,6 @@ if [[ -n $ADK_NATIVE ]];then if [[ -n $ADK_TARGET_PACKAGE_RPM ]]; then NEED_RPM="$NEED_RPM rpm" fi -fi - -if [[ -n $ADK_NATIVE ]];then if [[ -n $ADK_PACKAGE_SQUID ]]; then NEED_GXX="$NEED_GXX squid" fi @@ -86,7 +83,6 @@ if [[ -n $ADK_PACKAGE_LIBPCAP ]]; then NEED_BISON="$NEED_BISON libpcap" fi - if [[ -n $NEED_GETTEXT ]]; then if ! which xgettext >/dev/null 2>&1; then echo >&2 You need gettext to build $NEED_GETTEXT @@ -190,9 +186,4 @@ if [[ -n $NEED_FLEX ]]; then fi fi -#if [[ -n $ADK_COMPILE_MYSQL && $OStype != Linux ]]; then -# echo >&2 mySQL does not build on non-GNU/Linux. -# out=1 -#fi - exit $out diff --git a/target/Config.in b/target/Config.in index 52757e37c..420bd7b35 100644 --- a/target/Config.in +++ b/target/Config.in @@ -419,6 +419,7 @@ config ADK_LINUX_MIPS_RB532 select ADK_KERNEL_BLK_DEV_SD help Support for Mikrotik RB532. + endchoice choice diff --git a/target/alix1c/target.mk b/target/alix1c/target.mk index 18f3c923e..9f958a84b 100644 --- a/target/alix1c/target.mk +++ b/target/alix1c/target.mk @@ -1,7 +1,7 @@ ARCH:= x86 CPU_ARCH:= i586 -KERNEL_VERSION:= 2.6.31.5 +KERNEL_VERSION:= 2.6.32 KERNEL_RELEASE:= 1 -KERNEL_MD5SUM:= 926bff46d24e2f303e4ee92234e394d8 +KERNEL_MD5SUM:= 260551284ac224c3a43c4adac7df4879 TARGET_OPTIMIZATION:= -Os -pipe TARGET_CFLAGS_ARCH:= -march=geode diff --git a/target/linux/config/Config.in.block b/target/linux/config/Config.in.block index cd4781b15..cedaa941b 100644 --- a/target/linux/config/Config.in.block +++ b/target/linux/config/Config.in.block @@ -65,7 +65,7 @@ config ADK_KPACKAGE_KMOD_SATA_AHCI tristate select ADK_KERNEL_BLOCK select ADK_KERNEL_ATA - select ADK_KPACKAGE_KMOD_BLK_DEV_SD + select ADK_KERNEL_BLK_DEV_SD depends on !ADK_KERNEL_SATA_AHCI default n help @@ -188,7 +188,7 @@ config ADK_KPACKAGE_KMOD_SCSI config ADK_KPACKAGE_KMOD_BLK_DEV_SD prompt "kmod-scsi-disk.................... SCSI disk support" - depends on !ADK_KERNEL_SCSI + depends on !ADK_KERNEL_BLK_DEV_SD depends on ADK_KPACKAGE_KMOD_SCSI tristate help diff --git a/target/linux/config/Config.in.netdevice b/target/linux/config/Config.in.netdevice index a894c2114..2ab36a10f 100644 --- a/target/linux/config/Config.in.netdevice +++ b/target/linux/config/Config.in.netdevice @@ -109,9 +109,18 @@ config ADK_MOD_KERNEL_CFG80211 tristate default n +config ADK_MOD_KERNEL_LIB80211 + tristate + default n + +config ADK_KERNEL_ATH_COMMON + tristate + default n + config ADK_MOD_KERNEL_MAC80211 tristate select ADK_MOD_KERNEL_CFG80211 + select ADK_MOD_KERNEL_LIB80211 select ADK_KPACKAGE_KMOD_CRYPTO_AES select ADK_KPACKAGE_KMOD_CRYPTO_ECB select ADK_KPACKAGE_KMOD_CRYPTO_ARC4 @@ -128,6 +137,7 @@ config ADK_KPACKAGE_KMOD_MAC80211 prompt "kmod-mac80211................... mac80211 softmac" tristate select ADK_MOD_KERNEL_CFG80211 + select ADK_MOD_KERNEL_LIB80211 select ADK_KPACKAGE_KMOD_CRYPTO_AES select ADK_KPACKAGE_KMOD_CRYPTO_ECB select ADK_KPACKAGE_KMOD_CRYPTO_ARC4 @@ -141,6 +151,7 @@ config ADK_KPACKAGE_KMOD_ATH5K prompt "kmod-mac80211-ath5k............ Atheros 5xxx wireless cards" tristate select ADK_KERNEL_MAC80211_LEDS + select ADK_KERNEL_ATH_COMMON depends on ADK_KPACKAGE_KMOD_MAC80211 default n help diff --git a/target/linux/config/Config.in.netfilter b/target/linux/config/Config.in.netfilter index fc3c2682f..ef2e1285a 100644 --- a/target/linux/config/Config.in.netfilter +++ b/target/linux/config/Config.in.netfilter @@ -417,13 +417,6 @@ config ADK_KPACKAGE_KMOD_IP_NF_TARGET_NETMAP address part intact. It is similar to Fast NAT, except that Netfilter's connection tracking doesn't work well with Fast NAT. -config ADK_KPACKAGE_KMOD_IP_NF_TARGET_SAME - tristate 'SAME target support' - depends on ADK_KPACKAGE_KMOD_NF_NAT - help - This option adds a `SAME' target, which works like the standard SNAT - target, but attempts to give clients the same IP for all connections. - config ADK_KPACKAGE_KMOD_IP_NF_MANGLE tristate 'Packet mangling' depends on ADK_KPACKAGE_KMOD_NF_NAT diff --git a/target/linux/patches/2.6.30.5/aufs2-2.6.30.patch b/target/linux/patches/2.6.30.5/aufs2-2.6.30.patch deleted file mode 100644 index 212ab427f..000000000 --- a/target/linux/patches/2.6.30.5/aufs2-2.6.30.patch +++ /dev/null @@ -1,24453 +0,0 @@ -diff -Naurp linux-2.6.30/Documentation/ABI/testing/debugfs-aufs linux-2.6.30.patched/Documentation/ABI/testing/debugfs-aufs ---- linux-2.6.30/Documentation/ABI/testing/debugfs-aufs 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.30.patched/Documentation/ABI/testing/debugfs-aufs 2009-08-23 17:24:54.001941277 +0200 -@@ -0,0 +1,40 @@ -+What: /debug/aufs/si_/ -+Date: March 2009 -+Contact: J. R. Okajima -+Description: -+ Under /debug/aufs, a directory named si_ is created -+ per aufs mount, where is a unique id generated -+ internally. -+ -+What: /debug/aufs/si_/xib -+Date: March 2009 -+Contact: J. R. Okajima -+Description: -+ It shows the consumed blocks by xib (External Inode Number -+ Bitmap), its block size and file size. -+ When the aufs mount option 'noxino' is specified, it -+ will be empty. About XINO files, see -+ Documentation/filesystems/aufs/aufs.5 in detail. -+ -+What: /debug/aufs/si_/xino0, xino1 ... xinoN -+Date: March 2009 -+Contact: J. R. Okajima -+Description: -+ It shows the consumed blocks by xino (External Inode Number -+ Translation Table), its link count, block size and file -+ size. -+ When the aufs mount option 'noxino' is specified, it -+ will be empty. About XINO files, see -+ Documentation/filesystems/aufs/aufs.5 in detail. -+ -+What: /debug/aufs/si_/xigen -+Date: March 2009 -+Contact: J. R. Okajima -+Description: -+ It shows the consumed blocks by xigen (External Inode -+ Generation Table), its block size and file size. -+ If CONFIG_AUFS_EXPORT is disabled, this entry will not -+ be created. -+ When the aufs mount option 'noxino' is specified, it -+ will be empty. About XINO files, see -+ Documentation/filesystems/aufs/aufs.5 in detail. -diff -Naurp linux-2.6.30/Documentation/ABI/testing/sysfs-aufs linux-2.6.30.patched/Documentation/ABI/testing/sysfs-aufs ---- linux-2.6.30/Documentation/ABI/testing/sysfs-aufs 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.30.patched/Documentation/ABI/testing/sysfs-aufs 2009-08-23 17:24:54.001941277 +0200 -@@ -0,0 +1,25 @@ -+What: /sys/fs/aufs/si_/ -+Date: March 2009 -+Contact: J. R. Okajima -+Description: -+ Under /sys/fs/aufs, a directory named si_ is created -+ per aufs mount, where is a unique id generated -+ internally. -+ -+What: /sys/fs/aufs/si_/br0, br1 ... brN -+Date: March 2009 -+Contact: J. R. Okajima -+Description: -+ It shows the abolute path of a member directory (which -+ is called branch) in aufs, and its permission. -+ -+What: /sys/fs/aufs/si_/xi_path -+Date: March 2009 -+Contact: J. R. Okajima -+Description: -+ It shows the abolute path of XINO (External Inode Number -+ Bitmap, Translation Table and Generation Table) file -+ even if it is the default path. -+ When the aufs mount option 'noxino' is specified, it -+ will be empty. About XINO files, see -+ Documentation/filesystems/aufs/aufs.5 in detail. -diff -Naurp linux-2.6.30/fs/aufs/aufs.h linux-2.6.30.patched/fs/aufs/aufs.h ---- linux-2.6.30/fs/aufs/aufs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.30.patched/fs/aufs/aufs.h 2009-08-23 17:24:54.005965979 +0200 -@@ -0,0 +1,51 @@ -+/* -+ * Copyright (C) 2005-2009 Junjiro R. Okajima -+ * -+ * This program, aufs is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+/* -+ * all header files -+ */ -+ -+#ifndef __AUFS_H__ -+#define __AUFS_H__ -+ -+#ifdef __KERNEL__ -+ -+#include "debug.h" -+ -+#include "branch.h" -+#include "cpup.h" -+#include "dcsub.h" -+#include "dbgaufs.h" -+#include "dentry.h" -+#include "dir.h" -+#include "file.h" -+#include "fstype.h" -+#include "inode.h" -+#include "loop.h" -+#include "module.h" -+#include "opts.h" -+#include "rwsem.h" -+#include "spl.h" -+#include "super.h" -+#include "sysaufs.h" -+#include "vfsub.h" -+#include "whout.h" -+#include "wkq.h" -+ -+#endif /* __KERNEL__ */ -+#endif /* __AUFS_H__ */ -diff -Naurp linux-2.6.30/fs/aufs/branch.c linux-2.6.30.patched/fs/aufs/branch.c ---- linux-2.6.30/fs/aufs/branch.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.30.patched/fs/aufs/branch.c 2009-08-23 17:24:54.005965979 +0200 -@@ -0,0 +1,974 @@ -+/* -+ * Copyright (C) 2005-2009 Junjiro R. Okajima -+ * -+ * This program, aufs is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+/* -+ * branch management -+ */ -+ -+#include -+#include "aufs.h" -+ -+/* -+ * free a single branch -+ */ -+static void au_br_do_free(struct au_branch *br) -+{ -+ int i; -+ struct au_wbr *wbr; -+ -+ if (br->br_xino.xi_file) -+ fput(br->br_xino.xi_file); -+ mutex_destroy(&br->br_xino.xi_nondir_mtx); -+ -+ AuDebugOn(atomic_read(&br->br_count)); -+ -+ wbr = br->br_wbr; -+ if (wbr) { -+ for (i = 0; i < AuBrWh_Last; i++) -+ dput(wbr->wbr_wh[i]); -+ AuDebugOn(atomic_read(&wbr->wbr_wh_running)); -+ AuRwDestroy(&wbr->wbr_wh_rwsem); -+ } -+ -+ /* some filesystems acquire extra lock */ -+ lockdep_off(); -+ mntput(br->br_mnt); -+ lockdep_on(); -+ -+ kfree(wbr); -+ kfree(br); -+} -+ -+/* -+ * frees all branches -+ */ -+void au_br_free(struct au_sbinfo *sbinfo) -+{ -+ aufs_bindex_t bmax; -+ struct au_branch **br; -+ -+ AuRwMustWriteLock(&sbinfo->si_rwsem); -+ -+ bmax = sbinfo->si_bend + 1; -+ br = sbinfo->si_branch; -+ while (bmax--) -+ au_br_do_free(*br++); -+} -+ -+/* -+ * find the index of a branch which is specified by @br_id. -+ */ -+int au_br_index(struct super_block *sb, aufs_bindex_t br_id) -+{ -+ aufs_bindex_t bindex, bend; -+ -+ bend = au_sbend(sb); -+ for (bindex = 0; bindex <= bend; bindex++) -+ if (au_sbr_id(sb, bindex) == br_id) -+ return bindex; -+ return -1; -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* -+ * add a branch -+ */ -+ -+static int test_overlap(struct super_block *sb, struct dentry *h_d1, -+ struct dentry *h_d2) -+{ -+ if (unlikely(h_d1 == h_d2)) -+ return 1; -+ return !!au_test_subdir(h_d1, h_d2) -+ || !!au_test_subdir(h_d2, h_d1) -+ || au_test_loopback_overlap(sb, h_d1, h_d2) -+ || au_test_loopback_overlap(sb, h_d2, h_d1); -+} -+ -+/* -+ * returns a newly allocated branch. @new_nbranch is a number of branches -+ * after adding a branch. -+ */ -+static struct au_branch *au_br_alloc(struct super_block *sb, int new_nbranch, -+ int perm) -+{ -+ struct au_branch *add_branch; -+ struct dentry *root; -+ -+ root = sb->s_root; -+ add_branch = kmalloc(sizeof(*add_branch), GFP_NOFS); -+ if (unlikely(!add_branch)) -+ goto out; -+ -+ add_branch->br_wbr = NULL; -+ if (au_br_writable(perm)) { -+ /* may be freed separately at changing the branch permission */ -+ add_branch->br_wbr = kmalloc(sizeof(*add_branch->br_wbr), -+ GFP_NOFS); -+ if (unlikely(!add_branch->br_wbr)) -+ goto out_br; -+ } -+ -+ if (unlikely(au_sbr_realloc(au_sbi(sb), new_nbranch) -+ || au_di_realloc(au_di(root), new_nbranch) -+ || au_ii_realloc(au_ii(root->d_inode), new_nbranch))) -+ goto out_wbr; -+ return add_branch; /* success */ -+ -+ out_wbr: -+ kfree(add_branch->br_wbr); -+ out_br: -+ kfree(add_branch); -+ out: -+ return ERR_PTR(-ENOMEM); -+} -+ -+/* -+ * test if the branch permission is legal or not. -+ */ -+static int test_br(struct inode *inode, int brperm, char *path) -+{ -+ int err; -+ -+ err = 0; -+ if (unlikely(au_br_writable(brperm) && IS_RDONLY(inode))) { -+ AuErr("write permission for readonly mount or inode, %s\n", -+ path); -+ err = -EINVAL; -+ } -+ -+ return err; -+} -+ -+/* -+ * returns: -+ * 0: success, the caller will add it -+ * plus: success, it is already unified, the caller should ignore it -+ * minus: error -+ */ -+static int test_add(struct super_block *sb, struct au_opt_add *add, int remount) -+{ -+ int err; -+ aufs_bindex_t bend, bindex; -+ struct dentry *root; -+ struct inode *inode, *h_inode; -+ -+ root = sb->s_root; -+ bend = au_sbend(sb); -+ if (unlikely(bend >= 0 -+ && au_find_dbindex(root, add->path.dentry) >= 0)) { -+ err = 1; -+ if (!remount) { -+ err = -EINVAL; -+ AuErr("%s duplicated\n", add->pathname); -+ } -+ goto out; -+ } -+ -+ err = -ENOSPC; /* -E2BIG; */ -+ if (unlikely(AUFS_BRANCH_MAX <= add->bindex -+ || AUFS_BRANCH_MAX - 1 <= bend)) { -+ AuErr("number of branches exceeded %s\n", add->pathname); -+ goto out; -+ } -+ -+ err = -EDOM; -+ if (unlikely(add->bindex < 0 || bend + 1 < add->bindex)) { -+ AuErr("bad index %d\n", add->bindex); -+ goto out; -+ } -+ -+ inode = add->path.dentry->d_inode; -+ err = -ENOENT; -+ if (unlikely(!inode->i_nlink)) { -+ AuErr("no existence %s\n", add->pathname); -+ goto out; -+ } -+ -+ err = -EINVAL; -+ if (unlikely(inode->i_sb == sb)) { -+ AuErr("%s must be outside\n", add->pathname); -+ goto out; -+ } -+ -+ if (unlikely(au_test_fs_unsuppoted(inode->i_sb))) { -+ AuErr("unsupported filesystem, %s (%s)\n", -+ add->pathname, au_sbtype(inode->i_sb)); -+ goto out; -+ } -+ -+ err = test_br(add->path.dentry->d_inode, add->perm, add->pathname); -+ if (unlikely(err)) -+ goto out; -+ -+ if (bend < 0) -+ return 0; /* success */ -+ -+ err = -EINVAL; -+ for (bindex = 0; bindex <= bend; bindex++) -+ if (unlikely(test_overlap(sb, add->path.dentry, -+ au_h_dptr(root, bindex)))) { -+ AuErr("%s is overlapped\n", add->pathname); -+ goto out; -+ } -+ -+ err = 0; -+ if (au_opt_test(au_mntflags(sb), WARN_PERM)) { -+ h_inode = au_h_dptr(root, 0)->d_inode; -+ if ((h_inode->i_mode & S_IALLUGO) != (inode->i_mode & S_IALLUGO) -+ || h_inode->i_uid != inode->i_uid -+ || h_inode->i_gid != inode->i_gid) -+ AuWarn("uid/gid/perm %s %u/%u/0%o, %u/%u/0%o\n", -+ add->pathname, -+ inode->i_uid, inode->i_gid, -+ (inode->i_mode & S_IALLUGO), -+ h_inode->i_uid, h_inode->i_gid, -+ (h_inode->i_mode & S_IALLUGO)); -+ } -+ -+ out: -+ return err; -+} -+ -+/* -+ * initialize or clean the whiteouts for an adding branch -+ */ -+static int au_br_init_wh(struct super_block *sb, struct au_branch *br, -+ int new_perm, struct dentry *h_root) -+{ -+ int err, old_perm; -+ aufs_bindex_t bindex; -+ struct mutex *h_mtx; -+ struct au_wbr *wbr; -+ struct au_hinode *hdir; -+ -+ wbr = br->br_wbr; -+ old_perm = br->br_perm; -+ br->br_perm = new_perm; -+ hdir = NULL; -+ h_mtx = NULL; -+ bindex = au_br_index(sb, br->br_id); -+ if (0 <= bindex) { -+ hdir = au_hi(sb->s_root->d_inode, bindex); -+ au_hin_imtx_lock_nested(hdir, AuLsc_I_PARENT); -+ } else { -+ h_mtx = &h_root->d_inode->i_mutex; -+ mutex_lock_nested(h_mtx, AuLsc_I_PARENT); -+ } -+ if (!wbr) -+ err = au_wh_init(h_root, br, sb); -+ else { -+ wbr_wh_write_lock(wbr); -+ err = au_wh_init(h_root, br, sb); -+ wbr_wh_write_unlock(wbr); -+ } -+ if (hdir) -+ au_hin_imtx_unlock(hdir); -+ else -+ mutex_unlock(h_mtx); -+ br->br_perm = old_perm; -+ -+ if (!err && wbr && !au_br_writable(new_perm)) { -+ kfree(wbr); -+ br->br_wbr = NULL; -+ } -+ -+ return err; -+} -+ -+static int au_wbr_init(struct au_branch *br, struct super_block *sb, -+ int perm, struct path *path) -+{ -+ int err; -+ struct au_wbr *wbr; -+ -+ wbr = br->br_wbr; -+ au_rw_init(&wbr->wbr_wh_rwsem); -+ memset(wbr->wbr_wh, 0, sizeof(wbr->wbr_wh)); -+ atomic_set(&wbr->wbr_wh_running, 0); -+ wbr->wbr_bytes = 0; -+ -+ err = au_br_init_wh(sb, br, perm, path->dentry); -+ -+ return err; -+} -+ -+/* intialize a new branch */ -+static int au_br_init(struct au_branch *br, struct super_block *sb, -+ struct au_opt_add *add) -+{ -+ int err; -+ -+ err = 0; -+ memset(&br->br_xino, 0, sizeof(br->br_xino)); -+ mutex_init(&br->br_xino.xi_nondir_mtx); -+ br->br_perm = add->perm; -+ br->br_mnt = add->path.mnt; /* set first, mntget() later */ -+ atomic_set(&br->br_count, 0); -+ br->br_xino_upper = AUFS_XINO_TRUNC_INIT; -+ atomic_set(&br->br_xino_running, 0); -+ br->br_id = au_new_br_id(sb); -+ -+ if (au_br_writable(add->perm)) { -+ err = au_wbr_init(br, sb, add->perm, &add->path); -+ if (unlikely(err)) -+ goto out; -+ } -+ -+ if (au_opt_test(au_mntflags(sb), XINO)) { -+ err = au_xino_br(sb, br, add->path.dentry->d_inode->i_ino, -+ au_sbr(sb, 0)->br_xino.xi_file, /*do_test*/1); -+ if (unlikely(err)) { -+ AuDebugOn(br->br_xino.xi_file); -+ goto out; -+ } -+ } -+ -+ sysaufs_br_init(br); -+ mntget(add->path.mnt); -+ -+ out: -+ return err; -+} -+ -+static void au_br_do_add_brp(struct au_sbinfo *sbinfo, aufs_bindex_t bindex, -+ struct au_branch *br, aufs_bindex_t bend, -+ aufs_bindex_t amount) -+{ -+ struct au_branch **brp; -+ -+ AuRwMustWriteLock(&sbinfo->si_rwsem); -+ -+ brp = sbinfo->si_branch + bindex; -+ memmove(brp + 1, brp, sizeof(*brp) * amount); -+ *brp = br; -+ sbinfo->si_bend++; -+ if (unlikely(bend < 0)) -+ sbinfo->si_bend = 0; -+} -+ -+static void au_br_do_add_hdp(struct au_dinfo *dinfo, aufs_bindex_t bindex, -+ aufs_bindex_t bend, aufs_bindex_t amount) -+{ -+ struct au_hdentry *hdp; -+ -+ AuRwMustWriteLock(&dinfo->di_rwsem); -+ -+ hdp = dinfo->di_hdentry + bindex; -+ memmove(hdp + 1, hdp, sizeof(*hdp) * amount); -+ au_h_dentry_init(hdp); -+ dinfo->di_bend++; -+ if (unlikely(bend < 0)