[Samba] samba-2.2.5 -- a minor "make install" problem and 2 suggestions
Peter Breitenlohner
peb at mppmu.mpg.de
Fri Jun 21 06:48:03 GMT 2002
Hi,
I would like to ask you to consider the attached patch for inclusion into
the next samba release. The patch addresses the following three points:
1. 'make install' with VPATH fails at one point
( $(srcdir)/script/findsmb vs. script/findsmb )
2. support for 'make DESTDIR=<somewhere> install' (e.g. to build a binary
package)
3. support for 'configure --without-swat' to disable building and installing
swat (in the way our systems are set up we most definitely don't need swat).
regards
Peter Breitenlohner <peb at mppmu.mpg.de>
-------------- next part --------------
diff -ur -x configure -x autom4te.cache samba-2.2.5.orig/source/Makefile.in samba-2.2.5/source/Makefile.in
--- samba-2.2.5.orig/source/Makefile.in 2002-06-19 03:13:24.000000000 +0200
+++ samba-2.2.5/source/Makefile.in 2002-06-21 11:42:14.000000000 +0200
@@ -94,7 +94,7 @@
WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@
WINBIND_LPROGS = @WINBIND_LTARGETS@
-SPROGS = bin/smbd bin/nmbd bin/swat
+SPROGS = bin/smbd bin/nmbd @SWAT_PROG@
PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/tdbbackup bin/make_printerdef @RUNPROG@
PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAPPROG@ @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@
MPROGS = @MPROGS@
@@ -103,7 +103,7 @@
TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest bin/locktest2
SHLIBS = libsmbclient
-SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/findsmb
+SCRIPTS = $(srcdir)/script/smbtar script/findsmb
QUOTAOBJS=@QUOTAOBJS@
@@ -687,32 +687,32 @@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(TDBBACKUP_OBJ)
-install: installbin installman installscripts installcp installswat
+install: installbin installman installscripts installcp @INSTALL_SWAT@
installdirs:
- $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(BASEDIR)
- $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(SBINDIR)
- $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(BINDIR)
- $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(LIBDIR)
- $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(VARDIR)
- $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(PIDDIR)
- $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(CODEPAGEDIR)
+ $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(DESTDIR)$(BASEDIR)
+ $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(DESTDIR)$(SBINDIR)
+ $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(DESTDIR)$(BINDIR)
+ $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(DESTDIR)$(LIBDIR)
+ $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(DESTDIR)$(VARDIR)
+ $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(DESTDIR)$(PIDDIR)
+ $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) $(DESTDIR)$(CODEPAGEDIR)
installservers: all installdirs
- @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
+ @$(SHELL) $(srcdir)/script/installbin.sh '$(DESTDIR)' $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
installbin: all installdirs
- @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS) $(WINBIND_SPROGS)
- @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS) $(WINBIND_PROGS)
+ @$(SHELL) $(srcdir)/script/installbin.sh '$(DESTDIR)' $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS) $(WINBIND_SPROGS)
+ @$(SHELL) $(srcdir)/script/installbin.sh '$(DESTDIR)' $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS) $(WINBIND_PROGS)
installscripts: installdirs
- @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
+ @$(SHELL) $(srcdir)/script/installscripts.sh '$(DESTDIR)' $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
installcp: installdirs installbin
- @$(SHELL) $(srcdir)/script/installcp.sh $(srcdir) $(LIBDIR) $(CODEPAGEDIR) $(BINDIR) $(CODEPAGELIST)
+ @$(SHELL) $(srcdir)/script/installcp.sh '$(DESTDIR)' $(srcdir) $(LIBDIR) $(CODEPAGEDIR) $(BINDIR) $(CODEPAGELIST)
installswat: installdirs
- @$(SHELL) $(srcdir)/script/installswat.sh $(SWATDIR) $(srcdir)
+ @$(SHELL) $(srcdir)/script/installswat.sh '$(DESTDIR)' $(SWATDIR) $(srcdir)
installclientlib:
-$(INSTALLCMD) bin/libsmbclient.so
@@ -725,7 +725,7 @@
@$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS) ${WINBIND_PROGS}
installman:
- @$(SHELL) $(srcdir)/script/installman.sh $(MANDIR) $(srcdir) "@ROFF@"
+ @$(SHELL) $(srcdir)/script/installman.sh '$(DESTDIR)' $(MANDIR) $(srcdir) "@ROFF@"
uninstall: uninstallman uninstallbin uninstallscripts uninstallcp
diff -ur -x configure -x autom4te.cache samba-2.2.5.orig/source/configure.in samba-2.2.5/source/configure.in
--- samba-2.2.5.orig/source/configure.in 2002-06-19 03:13:42.000000000 +0200
+++ samba-2.2.5/source/configure.in 2002-06-21 11:42:35.000000000 +0200
@@ -74,6 +74,29 @@
esac])
#################################################
+# check if swat should be included
+SWAT_PROG=bin/swat
+INSTALL_SWAT=installswat
+AC_MSG_CHECKING(whether to include swat)
+AC_ARG_WITH(swat,
+[ --with-swat Include swat (default=yes)],
+[ case "$withval" in
+ no)
+ AC_MSG_RESULT(no)
+ SWAT_PROG=
+ INSTALL_SWAT=
+ ;;
+ *)
+ AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+AC_SUBST(SWAT_PROG)
+AC_SUBST(INSTALL_SWAT)
+
+
+#################################################
# set SWAT directory location
AC_ARG_WITH(swatdir,
[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)],
diff -ur -x configure -x autom4te.cache samba-2.2.5.orig/source/script/convert_smbpasswd samba-2.2.5/source/script/convert_smbpasswd
--- samba-2.2.5.orig/source/script/convert_smbpasswd 1998-11-05 03:50:17.000000000 +0100
+++ samba-2.2.5/source/script/convert_smbpasswd 2002-06-20 19:13:00.000000000 +0200
@@ -7,7 +7,7 @@
# with trying to work out how to get the seconds since 1970
# in awk or the shell. JRA.
#
-nawk 'BEGIN {FS=":"}
+gawk 'BEGIN {FS=":"}
{
if( $0 ~ "^#" ) {
print $0
diff -ur -x configure -x autom4te.cache samba-2.2.5.orig/source/script/installbin.sh samba-2.2.5/source/script/installbin.sh
--- samba-2.2.5.orig/source/script/installbin.sh 2001-01-12 20:28:02.000000000 +0100
+++ samba-2.2.5/source/script/installbin.sh 2002-06-20 19:16:05.000000000 +0200
@@ -1,17 +1,21 @@
#!/bin/sh
+DESTDIR=$1
+shift
+
INSTALLPERMS=$1
-BASEDIR=$2
-BINDIR=$3
-LIBDIR=$4
-VARDIR=$5
+BASEDIR=$DESTDIR$2
+BIN_DIR=$3
+BINDIR=$DESTDIR$3
+LIBDIR=$DESTDIR$4
+VARDIR=$DESTDIR$5
shift
shift
shift
shift
shift
-for d in $BASEDIR $BINDIR $LIBDIR $VARDIR $BASEDIR/private; do
+for d in $BASEDIR $BINDIR $LIBDIR $VARDIR $BASEDIR/private $DESTDIR/sbin; do
if [ ! -d $d ]; then
mkdir $d
if [ ! -d $d ]; then
@@ -34,7 +38,7 @@
# this is a special case, mount needs this in a specific location
if [ $p2 = smbmount ]; then
- ln -sf $BINDIR/$p2 /sbin/mount.smbfs
+ ln -sf $BIN_DIR/$p2 $DESTDIR/sbin/mount.smbfs
fi
done
diff -ur -x configure -x autom4te.cache samba-2.2.5.orig/source/script/installcp.sh samba-2.2.5/source/script/installcp.sh
--- samba-2.2.5.orig/source/script/installcp.sh 1999-12-13 14:27:43.000000000 +0100
+++ samba-2.2.5/source/script/installcp.sh 2002-06-20 19:16:55.000000000 +0200
@@ -1,8 +1,12 @@
#!/bin/sh
+
+DESTDIR=$1
+shift
+
srcdir=$1
-LIBDIR=$2
-CODEPAGEDIR=$3
-BINDIR=$4
+LIBDIR=$DESTDIR$2
+CODEPAGEDIR=$DESTDIR$3
+BINDIR=$DESTDIR$4
shift
shift
diff -ur -x configure -x autom4te.cache samba-2.2.5.orig/source/script/installman.sh samba-2.2.5/source/script/installman.sh
--- samba-2.2.5.orig/source/script/installman.sh 1998-11-17 21:50:05.000000000 +0100
+++ samba-2.2.5/source/script/installman.sh 2002-06-20 19:17:34.000000000 +0200
@@ -1,7 +1,10 @@
#!/bin/sh
#5 July 96 Dan.Shearer at unisa.edu.au removed hardcoded values
-MANDIR=$1
+DESTDIR=$1
+shift
+
+MANDIR=$DESTDIR$1
SRCDIR=$2/
if [ $# -ge 3 ] ; then
GROFF=$3 # sh cmd line, including options
diff -ur -x configure -x autom4te.cache samba-2.2.5.orig/source/script/installscripts.sh samba-2.2.5/source/script/installscripts.sh
--- samba-2.2.5.orig/source/script/installscripts.sh 1999-12-13 14:27:44.000000000 +0100
+++ samba-2.2.5/source/script/installscripts.sh 2002-06-20 19:18:28.000000000 +0200
@@ -2,8 +2,11 @@
# this script courtesy of James_K._Foote.PARC at xerox.com
# 5 July 96 Dan.Shearer at UniSA.Edu.Au Don't hardcode script names, get from Make
+DESTDIR=$1
+shift
+
INSTALLPERMS=$1
-BINDIR=$2
+BINDIR=$DESTDIR$2
shift
shift
diff -ur -x configure -x autom4te.cache samba-2.2.5.orig/source/script/installswat.sh samba-2.2.5/source/script/installswat.sh
--- samba-2.2.5.orig/source/script/installswat.sh 2001-04-16 03:34:11.000000000 +0200
+++ samba-2.2.5/source/script/installswat.sh 2002-06-20 19:19:02.000000000 +0200
@@ -1,7 +1,10 @@
#!/bin/sh
#fist version March 1998, Andrew Tridgell
-SWATDIR=$1
+DESTDIR=$1
+shift
+
+SWATDIR=$DESTDIR$1
SRCDIR=$2/
BOOKDIR=$SWATDIR/using_samba
More information about the samba
mailing list