[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2386-g66c4d58

Michael Adam obnox at samba.org
Sat May 10 00:21:03 GMT 2008


The branch, v3-3-test has been updated
       via  66c4d58f38557df618f026ddb661190dc02af719 (commit)
       via  35543d8815b004d3b29771f07998ee7ee820b567 (commit)
       via  711af98d2ce708421a413fe46a386ea9e19d2517 (commit)
       via  7520007efd31d7a81cacc3c2744e6a95dbdc08d4 (commit)
       via  405b0f8273ddd397d050b519419193dd8c978aba (commit)
       via  e7023592cbca002d94c47f73a2dc6c3e0a4c4a40 (commit)
       via  4aaaf792fe3b972d7ca5737bf7343fbda766d9b0 (commit)
      from  c1f300c76e882f2d108596aa3dbc211d545c665a (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit 66c4d58f38557df618f026ddb661190dc02af719
Author: Michael Adam <obnox at samba.org>
Date:   Sat May 10 01:28:58 2008 +0200

    packaging: remove references to smbmount and friends from samba-ctdb spec file
    
    Michael

commit 35543d8815b004d3b29771f07998ee7ee820b567
Author: Michael Adam <obnox at samba.org>
Date:   Sat May 10 01:26:52 2008 +0200

    packaging: fix GPL version in samba-ctdb specfile.
    
    Michael

commit 711af98d2ce708421a413fe46a386ea9e19d2517
Author: Michael Adam <obnox at samba.org>
Date:   Sat May 10 01:23:10 2008 +0200

    packaging: rename RHEL4-CTDB --> RHEL-CTDB
    
    Michael

commit 7520007efd31d7a81cacc3c2744e6a95dbdc08d4
Author: Michael Adam <obnox at samba.org>
Date:   Sat May 10 02:18:55 2008 +0200

    packaging: add x perms to samba-ctdb filter-requires-samba.sh script.
    
    Michael

commit 405b0f8273ddd397d050b519419193dd8c978aba
Author: Michael Adam <obnox at samba.org>
Date:   Sat May 10 02:18:08 2008 +0200

    packaging: add x perms to samba-ctdb makerpms.sh script.
    
    Michael

commit e7023592cbca002d94c47f73a2dc6c3e0a4c4a40
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri May 9 11:21:16 2008 +1000

    fixed version in spec file

commit 4aaaf792fe3b972d7ca5737bf7343fbda766d9b0
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri May 9 10:06:03 2008 +1000

    merge in spec file from Michael

-----------------------------------------------------------------------

Summary of changes:
 packaging/RHEL-CTDB/README                         |    3 +
 packaging/RHEL-CTDB/configure.rpm                  |   34 ++
 packaging/RHEL-CTDB/makerpms.sh                    |  102 ++++
 packaging/RHEL-CTDB/samba.spec                     |  543 ++++++++++++++++++++
 packaging/RHEL-CTDB/setup/filter-requires-samba.sh |    4 +
 packaging/RHEL-CTDB/setup/samba.log                |    9 +
 packaging/RHEL-CTDB/setup/samba.pamd               |    4 +
 packaging/RHEL-CTDB/setup/samba.sysconfig          |    6 +
 packaging/RHEL-CTDB/setup/smb.conf                 |  271 ++++++++++
 packaging/RHEL-CTDB/setup/smb.init                 |  135 +++++
 packaging/RHEL-CTDB/setup/smbprint                 |   84 +++
 packaging/RHEL-CTDB/setup/smbusers                 |    3 +
 packaging/RHEL-CTDB/setup/swat                     |   15 +
 packaging/RHEL-CTDB/setup/swat.desktop             |    8 +
 packaging/RHEL-CTDB/setup/winbind.init             |  100 ++++
 packaging/RHEL4-CTDB/README                        |    3 -
 packaging/RHEL4-CTDB/configure.rpm                 |   34 --
 packaging/RHEL4-CTDB/makerpms.sh                   |  102 ----
 packaging/RHEL4-CTDB/samba.spec                    |  514 ------------------
 .../RHEL4-CTDB/setup/filter-requires-samba.sh      |    4 -
 packaging/RHEL4-CTDB/setup/samba.log               |    9 -
 packaging/RHEL4-CTDB/setup/samba.pamd              |    4 -
 packaging/RHEL4-CTDB/setup/samba.sysconfig         |    6 -
 packaging/RHEL4-CTDB/setup/smb.conf                |  271 ----------
 packaging/RHEL4-CTDB/setup/smb.init                |  135 -----
 packaging/RHEL4-CTDB/setup/smbprint                |   84 ---
 packaging/RHEL4-CTDB/setup/smbusers                |    3 -
 packaging/RHEL4-CTDB/setup/swat                    |   15 -
 packaging/RHEL4-CTDB/setup/swat.desktop            |    8 -
 packaging/RHEL4-CTDB/setup/winbind.init            |  100 ----
 30 files changed, 1321 insertions(+), 1292 deletions(-)
 create mode 100644 packaging/RHEL-CTDB/README
 create mode 100644 packaging/RHEL-CTDB/configure.rpm
 create mode 100755 packaging/RHEL-CTDB/makerpms.sh
 create mode 100644 packaging/RHEL-CTDB/samba.spec
 create mode 100755 packaging/RHEL-CTDB/setup/filter-requires-samba.sh
 create mode 100644 packaging/RHEL-CTDB/setup/samba.log
 create mode 100644 packaging/RHEL-CTDB/setup/samba.pamd
 create mode 100644 packaging/RHEL-CTDB/setup/samba.sysconfig
 create mode 100644 packaging/RHEL-CTDB/setup/smb.conf
 create mode 100644 packaging/RHEL-CTDB/setup/smb.init
 create mode 100644 packaging/RHEL-CTDB/setup/smbprint
 create mode 100644 packaging/RHEL-CTDB/setup/smbusers
 create mode 100644 packaging/RHEL-CTDB/setup/swat
 create mode 100644 packaging/RHEL-CTDB/setup/swat.desktop
 create mode 100644 packaging/RHEL-CTDB/setup/winbind.init
 delete mode 100644 packaging/RHEL4-CTDB/README
 delete mode 100644 packaging/RHEL4-CTDB/configure.rpm
 delete mode 100644 packaging/RHEL4-CTDB/makerpms.sh
 delete mode 100644 packaging/RHEL4-CTDB/samba.spec
 delete mode 100644 packaging/RHEL4-CTDB/setup/filter-requires-samba.sh
 delete mode 100644 packaging/RHEL4-CTDB/setup/samba.log
 delete mode 100644 packaging/RHEL4-CTDB/setup/samba.pamd
 delete mode 100644 packaging/RHEL4-CTDB/setup/samba.sysconfig
 delete mode 100644 packaging/RHEL4-CTDB/setup/smb.conf
 delete mode 100644 packaging/RHEL4-CTDB/setup/smb.init
 delete mode 100644 packaging/RHEL4-CTDB/setup/smbprint
 delete mode 100644 packaging/RHEL4-CTDB/setup/smbusers
 delete mode 100644 packaging/RHEL4-CTDB/setup/swat
 delete mode 100644 packaging/RHEL4-CTDB/setup/swat.desktop
 delete mode 100644 packaging/RHEL4-CTDB/setup/winbind.init


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL-CTDB/README b/packaging/RHEL-CTDB/README
new file mode 100644
index 0000000..1316820
--- /dev/null
+++ b/packaging/RHEL-CTDB/README
@@ -0,0 +1,3 @@
+In order to keep the docs out of the bzr tree, first get a release 
+tarball of samba, then invoke makerpms.sh with the DOCS_DIR variable
+pointing to the docs dir of that samba tarball.
diff --git a/packaging/RHEL-CTDB/configure.rpm b/packaging/RHEL-CTDB/configure.rpm
new file mode 100644
index 0000000..e1a58dd
--- /dev/null
+++ b/packaging/RHEL-CTDB/configure.rpm
@@ -0,0 +1,34 @@
+
+CFLAGS="-Wall -g -D_GNU_SOURCE" ./configure \
+	--prefix=/usr \
+	--localstatedir=/var \
+	--with-configdir=/etc/samba \
+	--with-libdir=/usr/lib/samba \
+	--with-lockdir=/var/lib/samba \
+	--with-logfilebase=/var/log/samba \
+	--with-mandir=/usr/man \
+	--with-piddir=/var/run \
+	--with-privatedir=/etc/samba \
+	--with-sambabook=/usr/share/swat/using_samba \
+	--with-swatdir=/usr/share/swat \
+	--enable-cups \
+	--with-acl-support \
+	--with-ads \
+	--with-automount \
+	--with-fhs \
+	--with-pam_smbpass \
+	--with-libsmbclient \
+	--with-libsmbsharemodes \
+	--without-smbwrapper \
+	--with-pam \
+	--with-quotas \
+	--with-shared-modules=idmap_rid,idmap_ad \
+	--with-smbmount \
+	--with-syslog \
+	--with-utmp \
+	--with-cluster-support \
+	--with-ctdb=/usr/include \
+	--without-ldb \
+	--with-dnsupdate \
+	--with-aio-support \
+	$*
diff --git a/packaging/RHEL-CTDB/makerpms.sh b/packaging/RHEL-CTDB/makerpms.sh
new file mode 100755
index 0000000..6715194
--- /dev/null
+++ b/packaging/RHEL-CTDB/makerpms.sh
@@ -0,0 +1,102 @@
+#!/bin/sh
+# Copyright (C) John H Terpstra 1998-2002
+#               Gerald (Jerry) Carter 2003
+
+# The following allows environment variables to override the target directories
+#   the alternative is to have a file in your home directory calles .rpmmacros
+#   containing the following:
+#   %_topdir  /home/mylogin/redhat
+#
+# Note: Under this directory rpm expects to find the same directories that are under the
+#   /usr/src/redhat directory
+#
+
+# set DOCS_DIR to the path to a release tarball docs dir in order to get docs
+EXTRA_OPTIONS="$1"
+
+SPECDIR=`rpm --eval %_specdir`
+SRCDIR=`rpm --eval %_sourcedir`
+
+# At this point the SPECDIR and SRCDIR vaiables must have a value!
+
+USERID=`id -u`
+GRPID=`id -g`
+VERSION='3.2.0'
+REVISION='ctdb'
+SPECFILE="samba.spec"
+RPMVER=`rpm --version | awk '{print $3}'`
+RPM="rpmbuild"
+
+##
+## Check the RPM version (paranoid)
+##
+case $RPMVER in
+    4*)
+       echo "Supported RPM version [$RPMVER]"
+       ;;
+    *)
+       echo "Unknown RPM version: `rpm --version`"
+       exit 1
+       ;;
+esac
+
+pushd .
+cd ../../source
+if [ -f Makefile ]; then 
+	make distclean
+fi
+popd
+
+pushd .
+cd ../../
+SRCTREE=`basename $PWD`
+if [ $DOCS_DIR ] && [ -d $DOCS_DIR ]; then
+    mv docs docs-orig
+    ln -s $DOCS_DIR docs
+fi
+cd ../
+chown -R ${USERID}.${GRPID} $SRCTREE
+if [ ! -d samba-${VERSION} ]; then
+	ln -s $SRCTREE samba-${VERSION} || exit 1
+fi
+echo -n "Creating samba-${VERSION}.tar.bz2 ... "
+tar --exclude=.svn --exclude=.bzr --exclude=.bzrignore --exclude=docs-orig -chf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2
+echo "Done."
+if [ $? -ne 0 ]; then
+	popd
+	cd ../../
+	# restore original structure if docs were specified
+	if [ ${DOCS_DIR} ] && [ -d docs-orig ] && [ -L docs ]; then
+	    rm docs
+	    mv docs-orig docs
+	fi
+        echo "Build failed!"
+        exit 1
+fi
+
+popd
+
+
+##
+## copy additional source files
+##
+chmod 755 setup/filter-requires-samba.sh
+tar --exclude=.svn -jcvf - setup > ${SRCDIR}/setup.tar.bz2
+cp -p ${SPECFILE} ${SPECDIR}
+
+##
+## Build
+##
+echo "$(basename $0): Getting Ready to build release package"
+cd ${SPECDIR}
+${RPM} -ba --clean --rmsource $EXTRA_OPTIONS $SPECFILE
+
+# restore original structure if docs were specified
+cd ../../
+if [ ${DOCS_DIR} ] && [ -d docs-orig ] && [ -L docs ]; then
+    rm docs
+    mv -f docs-orig docs
+fi
+
+echo "$(basename $0): Done."
+
diff --git a/packaging/RHEL-CTDB/samba.spec b/packaging/RHEL-CTDB/samba.spec
new file mode 100644
index 0000000..35e11cb
--- /dev/null
+++ b/packaging/RHEL-CTDB/samba.spec
@@ -0,0 +1,543 @@
+%define initdir %{_sysconfdir}/rc.d/init.d
+%define auth %(test -f /etc/pam.d/system-auth && echo /etc/pam.d/system-auth || echo)
+
+Summary: Samba SMB client and server
+Vendor: Samba Team
+Packager: Samba Team <samba at samba.org>
+Name:         samba
+Version:      3.2.0
+Release:      ctdb.test.090508
+Epoch:        0
+License: GNU GPL version 3
+Group: System Environment/Daemons
+URL: http://www.samba.org/
+
+Source: samba-%{version}.tar.bz2
+
+# Don't depend on Net::LDAP
+Source998: filter-requires-samba.sh
+Source999: setup.tar.bz2
+
+Prereq: /sbin/chkconfig /bin/mktemp /usr/bin/killall
+Prereq: fileutils sed /etc/init.d
+
+Requires: pam >= 0.64 %{auth} 
+Requires: samba-common = %{version}-%{release}
+Requires: logrotate >= 3.4 initscripts >= 5.54-1
+Provides: samba = %{version}
+
+Prefix: /usr
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel, ctdb
+
+# Working around perl dependency problem from docs
+%define __perl_requires %{SOURCE998}
+
+# rpm screws up the arch lib dir when using --target on RHEL5
+%ifarch i386 i486 i586 i686 ppc s390
+%define _libarch lib
+%else
+%define _libarch %_lib
+%endif
+
+
+%description
+Samba is the protocol by which a lot of PC-related machines share
+files, printers, and other information (such as lists of available
+files and printers). The Windows NT, OS/2, and Linux operating systems
+support this natively, and add-on packages can enable the same thing
+for DOS, Windows, VMS, UNIX of all kinds, MVS, and more. This package
+provides an SMB server that can be used to provide network services to
+SMB (sometimes called "Lan Manager") clients. Samba uses NetBIOS over
+TCP/IP (NetBT) protocols and does NOT need the NetBEUI (Microsoft Raw
+NetBIOS frame) protocol.
+
+
+######################################################################
+%package client
+Summary: Samba (SMB) client programs.
+Group: Applications/System
+Requires: samba-common = %{version}-%{release}
+Obsoletes: smbfs
+Provides: samba-client = %{version}-%{release}
+
+%description client
+The samba-client package provides some SMB clients to compliment the
+built-in SMB filesystem in Linux. These clients allow access of SMB
+shares and printing to SMB printers.
+
+
+#######################################################################
+%package common
+Summary: Files used by both Samba servers and clients.
+Group: Applications/System
+Provides: samba-common = %{version}-%{release}
+
+%description common
+Samba-common provides files necessary for both the server and client
+packages of Samba.
+
+
+#######################################################################
+%package swat
+Summary: The Samba SMB server configuration program.
+Group: Applications/System
+Requires: samba = %{version} xinetd
+Provides: samba-swat = %{version}-%{release}
+
+%description swat
+The samba-swat package includes the new SWAT (Samba Web Administration
+Tool), for remotely managing Samba's smb.conf file using your favorite
+Web browser.
+
+%ifarch i386 i486 i586 i686 ppc s390
+%package winbind-32bit
+Summary:        Samba winbind compatibility package for 32bit apps on 64bit archs
+Group:          Applications/System
+
+%description winbind-32bit
+Compatibility package for 32 bit apps on 64 bit architecures
+%endif
+
+
+#######################################################################
+%package doc
+Summary:      Samba Documentation
+Group:        Documentation/Other
+Provides:     samba-doc = %{version}-%{release}
+Prereq:       /usr/bin/find /bin/rm /usr/bin/xargs
+
+%description doc
+The samba-doc package includes the HTML versions of the Samba manpages
+utilized by SWAT as well as the HTML and PDF version of "Using Samba",
+"Samba By Example", and "The Official Samba HOWTO and Reference Guide".
+
+
+#######################################################################
+
+%prep
+%setup -q
+
+# setup the vendor files (init scripts, etc...)
+%setup -T -D -a 999 -n samba-%{version} -q
+
+%build
+
+/bin/cp setup/filter-requires-samba.sh %{SOURCE998}
+
+cd source
+# RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
+
+## check for ccache
+# ccache -h 2>&1 > /dev/null
+#if [ $? -eq 0 ]; then
+#	CC="ccache gcc"
+#else
+	CC="gcc"
+#fi 
+
+## always run autogen.sh
+./autogen.sh
+
+CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
+	--prefix=%{_prefix} \
+	--localstatedir=/var \
+        --with-configdir=%{_sysconfdir}/samba \
+        --with-libdir=%{_libdir}/samba \
+        --with-lockdir=/var/lib/samba \
+        --with-logfilebase=/var/log/samba \
+        --with-mandir=%{_mandir} \
+        --with-piddir=/var/run \
+	--with-privatedir=%{_sysconfdir}/samba \
+        --with-sambabook=%{_datadir}/swat/using_samba \
+        --with-swatdir=%{_datadir}/swat \
+	--enable-cups \
+        --with-acl-support \
+	--with-ads \
+        --with-automount \
+        --with-fhs \
+	--with-pam_smbpass \
+	--with-libsmbclient \
+	--with-libsmbsharemodes \
+        --without-smbwrapper \
+	--with-pam \
+	--with-quotas \
+	--with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2 \
+	--with-syslog \
+	--with-utmp \
+	--with-cluster-support \
+	--with-ctdb=/usr/include \
+	--without-ldb \
+	--with-dnsupdate \
+	--with-aio-support
+
+make showlayout
+
+make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"  proto 
+
+## check for gcc 3.4 or later
+CC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
+CC_MAJOR=`echo ${CC_VERSION} | cut -d. -f 1`
+CC_MINOR=`echo ${CC_VERSION} | cut -d. -f 2`
+if [ ${CC_MAJOR} -ge 3 ]; then
+        if [ ${CC_MAJOR} -gt 3 -o ${CC_MINOR} -ge 4 ]; then
+                make pch
+        fi
+fi
+
+
+make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" %{?_smp_mflags} \
+	all modules pam_smbpass
+
+## build the cifs fs mount helper
+cd client
+gcc  -o mount.cifs $RPM_OPT_FLAGS  -D_GNU_SOURCE -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE mount.cifs.c
+gcc  -o umount.cifs $RPM_OPT_FLAGS  -D_GNU_SOURCE -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE umount.cifs.c
+cd ..
+
+# Remove some permission bits to avoid to many dependencies
+cd ..
+find examples docs -type f | xargs -r chmod -x
+
+%install
+# Clean up in case there is trash left from a previous build
+rm -rf $RPM_BUILD_ROOT
+
+# Create the target build directory hierarchy
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/swat/{help,include,using_samba/{figs,gifsa}}
+mkdir -p $RPM_BUILD_ROOT%{_includedir}
+mkdir -p $RPM_BUILD_ROOT%{_initrddir}
+mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/samba/{auth,charset,idmap,vfs,pdb}
+mkdir -p $RPM_BUILD_ROOT/%{_libarch}/security
+mkdir -p $RPM_BUILD_ROOT%{_mandir}
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/{bin,sbin}
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
+mkdir -p $RPM_BUILD_ROOT/sbin
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,pam.d,samba}
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{pam.d,logrotate.d}
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{samba,sysconfig}
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d
+mkdir -p $RPM_BUILD_ROOT/var/lib/samba/winbindd_privileged
+mkdir -p $RPM_BUILD_ROOT/var/{log,run/winbindd,spool}/samba
+
+cd source
+make DESTDIR=$RPM_BUILD_ROOT \
+        install
+cd ..
+
+# pam_smbpass
+cp source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_libarch}/security/pam_smbpass.so
+
+# NSS & PAM winbind support
+install -m 755 source/bin/pam_winbind.so $RPM_BUILD_ROOT/%{_libarch}/security/pam_winbind.so
+install -m 755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/%{_libarch}/libnss_winbind.so
+install -m 755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/%{_libarch}/libnss_wins.so
+( cd $RPM_BUILD_ROOT/%{_libarch};
+  ln -sf libnss_winbind.so  libnss_winbind.so.2;
+  ln -sf libnss_wins.so  libnss_wins.so.2 )
+
+# make install puts libsmbclient.so in the wrong place on x86_64
+rm -f $RPM_BUILD_ROOT/usr/lib*/samba/libsmbclient.so $RPM_BUILD_ROOT/usr/lib*/samba/libsmbclient.a || true
+install -m 755 source/bin/libsmbclient.so $RPM_BUILD_ROOT%{_libdir}/libsmbclient.so
+install -m 755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{_libdir}/libsmbclient.a
+install -m 644 source/include/libsmbclient.h $RPM_BUILD_ROOT%{_includedir}
+ln -s %{_libdir}/libsmbclient.so $RPM_BUILD_ROOT%{_libdir}/libsmbclient.so.0
+
+# make install puts libmsrpc.so in the wrong place on x86_64
+#rm -f $RPM_BUILD_ROOT/usr/lib*/samba/libmsrpc.so $RPM_BUILD_ROOT/usr/lib*/samba/libmsrpc.a || true
+#install -m 755 source/bin/libmsrpc.so $RPM_BUILD_ROOT%{_libdir}/libmsrpc.so
+#install -m 755 source/bin/libmsrpc.a $RPM_BUILD_ROOT%{_libdir}/libmsrpc.a
+#install -m 644 source/include/libmsrpc.h $RPM_BUILD_ROOT%{_includedir}
+#rm -f $RPM_BUILD_ROOT%{_libdir}/samba/libmsrpc.*
+#ln -s /%{_libdir}/libmsrpc.so $RPM_BUILD_ROOT%{_libdir}/libmsrpc.so.0
+
+# make install puts libsmbsharemodes.so in the wrong place on x86_64
+rm -f $RPM_BUILD_ROOT/usr/lib*/samba/libsmbsharemodes.so $RPM_BUILD_ROOT/usr/lib*/samba/libsmbsharemodes.a || true
+install -m 755 source/bin/libsmbsharemodes.so $RPM_BUILD_ROOT%{_libdir}/libsmbsharemodes.so
+install -m 755 source/bin/libsmbsharemodes.a $RPM_BUILD_ROOT%{_libdir}/libsmbsharemodes.a
+install -m 644 source/include/smb_share_modes.h $RPM_BUILD_ROOT%{_includedir}
+rm -f $RPM_BUILD_ROOT%{_libdir}/samba/libsmbsharemodes.*
+ln -s /%{_libdir}/libsmbsharemodes.so $RPM_BUILD_ROOT%{_libdir}/libsmbsharemodes.so.0
+
+# Install pam_smbpass.so
+install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_libarch}/security/pam_smbpass.so
+
+#
+ln -s %{_libdir}/samba/libwbclient.so $RPM_BUILD_ROOT/%{_libdir}/libwbclient.so.0
+ln -s %{_libdir}/samba/libtalloc.so $RPM_BUILD_ROOT/%{_libdir}/libtalloc.so.1
+ln -s %{_libdir}/samba/libtdb.so $RPM_BUILD_ROOT/%{_libdir}/libtdb.so.0
+ln -s %{_libdir}/samba/libnetapi.so $RPM_BUILD_ROOT/%{_libdir}/libnetapi.so.0
+
+## cleanup
+/bin/rm -rf $RPM_BUILD_ROOT/usr/lib*/samba/security
+
+# Install the miscellany
+echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts
+
+install -m644 setup/samba.log $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/samba
+install -m644 setup/swat $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/swat
+install -m644 setup/samba.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/samba
+install -m755 setup/smb.init $RPM_BUILD_ROOT%{initdir}/smb
+install -m755 setup/winbind.init $RPM_BUILD_ROOT%{initdir}/winbind
+install -m644 setup/samba.pamd $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/samba
+install -m755 setup/smbprint $RPM_BUILD_ROOT%{_bindir}
+install -m644 setup/smbusers $RPM_BUILD_ROOT%{_sysconfdir}/samba/smbusers
+install -m644 setup/smb.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba/smb.conf
+install -m755 source/client/mount.cifs $RPM_BUILD_ROOT/sbin/mount.cifs
+install -m755 source/client/umount.cifs $RPM_BUILD_ROOT/sbin/umount.cifs
+install -m755 source/script/mksmbpasswd.sh $RPM_BUILD_ROOT%{_bindir}
+
+/bin/rm $RPM_BUILD_ROOT%{_sbindir}/*mount.cifs
+
+ln -s ../..%{initdir}/smb  $RPM_BUILD_ROOT%{_sbindir}/samba
+ln -s ../..%{initdir}/winbind  $RPM_BUILD_ROOT%{_sbindir}/winbind
+
+# Remove "*.old" files
+find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \;
+
+## don't duplicate the docs.  These are installed by/with SWAT
+rm -rf docs/htmldocs
+rm -rf docs/manpages
+( cd docs; ln -s %{_prefix}/share/swat/help htmldocs )
+
+##
+## Clean out man pages for tools not installed here
+##
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/log2pcap.1*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smbsh.1*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man5/vfstest.1*
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+## deal with an upgrade from a broken 3.0.21b RPM
+if [ "$1" -eq "2" ]; then
+	if [ -d /var/cache/samba ]; then
+		for file in `ls /var/cache/samba/*tdb`; do
+			/bin/cp -up $file /var/lib/samba/`basename $file`
+		done
+		mkdir -p /var/lib/samba/eventlog
+		for file in `ls /var/cache/samba/eventlog/*tdb`; do
+			/bin/cp -up $file /var/lib/samba/eventlog/`basename $file`
+		done
+		/bin/mv /var/cache/samba /var/cache/samba.moved
+        fi
+fi
+
+%preun
+if [ $1 = 0 ] ; then
+    /sbin/chkconfig --del smb
+    /sbin/chkconfig --del winbind
+    # rm -rf /var/log/samba/* /var/lib/samba/*
+    /sbin/service smb stop >/dev/null 2>&1
+fi


-- 
Samba Shared Repository


More information about the samba-cvs mailing list