From e6f8fd994567f85efd88b56e438816ee337f4f6e Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Tue, 11 Nov 2008 18:46:21 -0800 Subject: s3: Add support for make test to use a share dir outside of the prefix dir Some systems need to have the tdbs (and other files required for samba to run) on a different filesystem than the share directory that samba is exporting. This patch: - Adds an optional "shrdir" argument to selftest.sh - If shrdir is specified it will be used, otherwise the default will be used: "/tmp" - Adds a new configure option: --with-selftest-shrdir - Plumbs shrdir through Makefile.in and configure.in --- source3/script/tests/selftest.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'source3/script') diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh index 0894b2507d..d41d0f36cf 100755 --- a/source3/script/tests/selftest.sh +++ b/source3/script/tests/selftest.sh @@ -1,7 +1,7 @@ #!/bin/sh -if [ $# != 3 ]; then - echo "$0 " +if [ $# != 3 -a $# != 4 ]; then + echo "$0 []" exit 1 fi @@ -38,7 +38,6 @@ PASSWORD=test SRCDIR="`dirname $0`/../.." BINDIR="`pwd`/bin" SCRIPTDIR=$SRCDIR/script/tests -SHRDIR=$PREFIX_ABS/tmp LIBDIR=$PREFIX_ABS/lib PIDDIR=$PREFIX_ABS/pid CONFFILE=$LIBDIR/client.conf @@ -113,8 +112,23 @@ mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $LOGDIR mkdir -p $SOCKET_WRAPPER_DIR mkdir -p $WINBINDD_SOCKET_DIR chmod 755 $WINBINDD_SOCKET_DIR -mkdir -p $PREFIX_ABS/tmp -chmod 777 $PREFIX_ABS/tmp + +## +## Create an alternate shrdir if one was specified. +## +if [ $# = 4 ]; then + ALT_SHRDIR=`echo $4 | sed s+//+/+` + mkdir -p $ALT_SHRDIR || exit $? + OLD_PWD=`pwd` + cd $ALT_SHRDIR || exit $? + SHRDIR=`pwd` + cd $OLD_PWD + /bin/rm -rf $SHRDIR/* +else + SHRDIR=$PREFIX_ABS/tmp + mkdir -p $SHRDIR +fi +chmod 777 $SHRDIR ## ## Create the common config include file with the basic settings @@ -184,7 +198,7 @@ cat >$SERVERCONFFILE< Date: Thu, 30 Oct 2008 17:53:52 +0800 Subject: i18n/l10n pam_winbind MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/script/installmo.sh | 83 +++++++++++++++++++++++++++++++++++++++++++ source3/script/uninstallmo.sh | 1 + 2 files changed, 84 insertions(+) create mode 100644 source3/script/installmo.sh create mode 100644 source3/script/uninstallmo.sh (limited to 'source3/script') diff --git a/source3/script/installmo.sh b/source3/script/installmo.sh new file mode 100644 index 0000000000..a1f9c58e27 --- /dev/null +++ b/source3/script/installmo.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +DESTDIR=$1 +LOCALEDIR=`echo $2 | sed 's/\/\//\//g'` +SRCDIR=$3/ +MSGFMT=msgfmt + +case $0 in + *uninstall*) + if test ! -d "$DESTDIR/$LOCALEDIR"; then + echo "Directory $DESTDIR/$LOCALEDIR doesn't exist!" + echo "Do a \"make installmo\" or \"make install\" first." + exit 1 + fi + mode='uninstall' + ;; + *) + mode='install' + ;; +esac + +for dir in $SRCDIR/locale/*; do + MODULE=`basename $dir` + for f in $SRCDIR/locale/$MODULE/*.po; do + BASE=`basename $f` + LANGUAGE=`echo $BASE | sed 's/\.po//g'` + FNAME="$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/$MODULE.mo" + if test ! -d "$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/"; then + mkdir -p "$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/" + fi + if test "$mode" = 'install'; then + echo "Installing $f as $FNAME" + touch "$FNAME" + $MSGFMT "$f" -f -o "$FNAME" + if test ! -f "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges?" + exit 1 + fi + chmod 0644 "$FNAME" + elif test "$mode" = 'uninstall'; then + echo "removing $FNAME" + rm -f "$FNAME" + if test -f "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges?" + exit 1 + fi + else + echo "Unknown mode $mode. script called as $0." + exit 1 + fi + done + if test "$mode" = 'install'; then + cat << EOF +============================================================== +MO files for $MODULE are installed. +============================================================== +EOF + else + cat << EOF +============================================================== +MO files for $MODULE are removed. +============================================================== +EOF + fi +done + +if test "$mode" = 'install'; then + cat << EOF +============================================================== +All MO files for Samba are installed. You can use "make uninstall" +or "make uninstallmo" to remove them. +============================================================== +EOF +else + cat << EOF +============================================================== +All MO files for Samba are removed. you can use "make install" +or "make installmo" to install them. +============================================================== +EOF +fi + +exit 0 diff --git a/source3/script/uninstallmo.sh b/source3/script/uninstallmo.sh new file mode 100644 index 0000000000..5b4475f5c2 --- /dev/null +++ b/source3/script/uninstallmo.sh @@ -0,0 +1 @@ +installmo.sh -- cgit From 81fc50b4867acf63e624abeda8b3b48c4d300f93 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Tue, 2 Dec 2008 08:37:27 +0800 Subject: Fix script installmo.sh when no .po file exists --- source3/script/installmo.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/installmo.sh b/source3/script/installmo.sh index a1f9c58e27..9c4ab1eefe 100644 --- a/source3/script/installmo.sh +++ b/source3/script/installmo.sh @@ -24,6 +24,10 @@ for dir in $SRCDIR/locale/*; do for f in $SRCDIR/locale/$MODULE/*.po; do BASE=`basename $f` LANGUAGE=`echo $BASE | sed 's/\.po//g'` + if test "$LANGUAGE" = '*'; then + echo "No .po file exists!" + exit 0 + fi FNAME="$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/$MODULE.mo" if test ! -d "$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/"; then mkdir -p "$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/" -- cgit From a8595bf506ca43e7060d696f182982703885fa08 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 1 Dec 2008 14:37:13 -0800 Subject: s3:selftest: test the streams_depot module as it passes make test The streams_xattr module only passes sometimes on my laptop. metze --- source3/script/tests/selftest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh index d41d0f36cf..3b65aaa760 100755 --- a/source3/script/tests/selftest.sh +++ b/source3/script/tests/selftest.sh @@ -205,7 +205,7 @@ cat >$SERVERCONFFILE<