diff --git a/Config.in b/Config.in index f1a743aaa2..19d3ae14ef 100644 --- a/Config.in +++ b/Config.in @@ -52,6 +52,13 @@ config BR2_BZCAT Default is "bzcat" Other possible values include "bunzip2 -c" or "bzip2 -d -c". +config BR2_XZCAT + string "xzcat command" + default "xzcat" + help + Command to be used to extract a xz'ed file to stdout. + Default is "xzcat" + config BR2_TAR_OPTIONS string "Tar options" default "" diff --git a/Makefile b/Makefile index bb531691e4..720dc21fcc 100644 --- a/Makefile +++ b/Makefile @@ -271,6 +271,7 @@ KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \ ZCAT:=$(call qstrip,$(BR2_ZCAT)) BZCAT:=$(call qstrip,$(BR2_BZCAT)) +XZCAT:=$(call qstrip,$(BR2_XZCAT)) TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX)) diff --git a/README.md b/README.md index f6592c10a7..88de06db79 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ to python 2.7. Earlier pythons (or python3) will not work. # Set up a key to sign the image ```shell +% mkdir ~/.android % keytool -genkey -keystore ~/.android/debug.keystore -v -alias \ androiddebugkey -dname "CN=Android Debug,O=Android,C=US" -keypass \ android -storepass android -keyalg RSA -keysize 2048 -validity 10000 diff --git a/package/Makefile.package.in b/package/Makefile.package.in index 7afd0d0444..9247543711 100644 --- a/package/Makefile.package.in +++ b/package/Makefile.package.in @@ -61,6 +61,7 @@ INFLATE.gz = $(ZCAT) INFLATE.tbz = $(BZCAT) INFLATE.tbz2 = $(BZCAT) INFLATE.tgz = $(ZCAT) +INFLATE.xz = $(XZCAT) INFLATE.tar = cat # MESSAGE Macro -- display a message in bold type diff --git a/package/thirdparty/samba30/S91smb b/package/thirdparty/samba30/S91smb new file mode 100755 index 0000000000..c190771b7d --- /dev/null +++ b/package/thirdparty/samba30/S91smb @@ -0,0 +1,80 @@ +#!/bin/sh +# +# Stolen from RedHat FC5. +# + +# Check that smb.conf exists. +[ -f /etc/samba/smb.conf ] || exit 0 + +# Make directories. +mkdir -p /var/cache/samba +mkdir -p /var/log/samba +mkdir -p /var/lock/subsys + +RETVAL=0 + +start() { + echo -n "Starting SMB services: " + smbd -D + RETVAL=$? + echo "done" + + echo -n "Starting NMB services: " + nmbd -D + RETVAL2=$? + echo "done" + + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \ + RETVAL=1 + return $RETVAL +} + +stop() { + echo -n "Shutting down SMB services: " + kill -9 `pidof smbd` + RETVAL=$? + rm -f /var/run/smbd.pid + echo "done" + + echo -n "Shutting down NMB services: " + kill -9 `pidof nmbd` + RETVAL2=$? + rm -f /var/run/nmbd.pid + + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb + echo "done" + return $RETVAL +} + +restart() { + stop + start +} + +reload() { + echo -n "Reloading smb.conf file: " + kill -HUP `pidof smbd` + RETVAL=$? + echo "done" + return $RETVAL +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $? diff --git a/package/thirdparty/samba30/samba30.mk b/package/thirdparty/samba30/samba30.mk index 2298196f7e..77574d88cf 100644 --- a/package/thirdparty/samba30/samba30.mk +++ b/package/thirdparty/samba30/samba30.mk @@ -79,7 +79,7 @@ SAMBA30_CONF_OPT = \ SAMBA30_INSTALL_TARGET_OPT = \ DESTDIR=$(TARGET_DIR) -C $(SAMBA30_DIR)/$(SAMBA30_SUBDIR) \ - installclientlib + installclientlib installservers installbin SAMBA30_INSTALL_STAGING_OPT = \ DESTDIR=$(STAGING_DIR) -C $(SAMBA30_DIR)/$(SAMBA30_SUBDIR) \ @@ -87,7 +87,7 @@ SAMBA30_INSTALL_STAGING_OPT = \ SAMBA30_UNINSTALL_TARGET_OPT = \ DESTDIR=$(TARGET_DIR) -C $(SAMBA30_DIR)/$(SAMBA30_SUBDIR) \ - uninstallclientlib + uninstallclientlibs uninstallservers uninstallbin SAMBA30_UNINSTALL_STAGING_OPT = \ DESTDIR=$(STAGING_DIR) -C $(SAMBA30_DIR)/$(SAMBA30_SUBDIR) \ @@ -102,11 +102,61 @@ SAMBA30_TXTTARGETS_ = \ usr/include/tdb.h \ usr/include/wbclient.h +# binaries to keep +SAMBA30_BINTARGETS_y = \ + usr/sbin/smbd \ + usr/bin/smbpasswd \ + usr/lib/libsmbclient.so* + +# binaries to remove +SAMBA30_BINTARGETS_ = \ + usr/lib/libsmbsharemodes* \ + usr/bin/eventlogadm \ + usr/bin/net \ + usr/bin/nmblookup \ + usr/bin/ntlm_auth \ + usr/bin/pdbedit \ + usr/bin/profiles \ + usr/bin/rpcclient \ + usr/bin/smbcacls \ + usr/bin/smbclient \ + usr/bin/smbcontrol \ + usr/bin/smbcquotas \ + usr/bin/smbget \ + usr/bin/smbspool \ + usr/bin/smbstatus \ + usr/bin/smbtree \ + usr/sbin/swat \ + usr/bin/tdbbackup \ + usr/bin/tdbdump \ + usr/bin/tdbtool \ + usr/bin/testparm + define SAMBA30_REMOVE_UNNEEDED_HEADERS rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA30_TXTTARGETS_)) endef +define SAMBA30_REMOVE_UNNEEDED_BINARIES + rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA30_BINTARGETS_)) +endef + +define SAMBA30_INSTALL_INITSCRIPTS_CONFIG + + # install start/stop script + @if [ ! -f $(TARGET_DIR)/etc/init.d/S91smb ]; then \ + $(INSTALL) -m 0755 -D package/thirdparty/samba30/S91smb $(TARGET_DIR)/etc/init.d/S91smb; \ + fi + + # install config + @if [ ! -f $(TARGET_DIR)/etc/samba/smb.conf ]; then \ + $(INSTALL) -m 0755 -D package/thirdparty/samba30/simple.conf $(TARGET_DIR)/etc/samba/smb.conf; \ + fi +endef + + SAMBA30_POST_INSTALL_TARGET_HOOKS += SAMBA30_REMOVE_UNNEEDED_HEADERS +SAMBA30_POST_INSTALL_TARGET_HOOKS += SAMBA30_REMOVE_UNNEEDED_BINARIES +SAMBA30_POST_INSTALL_TARGET_HOOKS += SAMBA30_INSTALL_INITSCRIPTS_CONFIG define SAMBA30_AUTOGEN @$(call MESSAGE,"Reconfiguring") diff --git a/package/thirdparty/samba30/simple.conf b/package/thirdparty/samba30/simple.conf new file mode 100644 index 0000000000..038f85e477 --- /dev/null +++ b/package/thirdparty/samba30/simple.conf @@ -0,0 +1,30 @@ +#======================= Global Settings ===================================== +[global] +workgroup = MYGROUP +server string = MYDATA +max log size = 50 +security = share +encrypt passwords = yes +smb passwd file = /etc/samba/smbpasswd +log file = /var/log/samba/log.smbd +socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 + +load printers = no +printing = bsd +printcap name = /dev/null +disable spoolss = yes + +#============================ Share Definitions ============================== +idmap uid = 16777216-33554431 +idmap gid = 16777216-33554431 +template shell = /bin/false +winbind use default domain = no + +[HardDrives] +path = /media +public = yes +only guest = yes +writable = yes +printable = no +force user = root +