svn commit: samba r14476 - in trunk/packaging/RHEL: .
jerry at samba.org
jerry at samba.org
Thu Mar 16 13:48:19 GMT 2006
Author: jerry
Date: 2006-03-16 13:48:18 +0000 (Thu, 16 Mar 2006)
New Revision: 14476
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14476
Log:
sync RHEL packaging with SAMBA_3_0
Modified:
trunk/packaging/RHEL/makerpms.sh.tmpl
trunk/packaging/RHEL/samba.spec.tmpl
Changeset:
Modified: trunk/packaging/RHEL/makerpms.sh.tmpl
===================================================================
--- trunk/packaging/RHEL/makerpms.sh.tmpl 2006-03-16 13:48:01 UTC (rev 14475)
+++ trunk/packaging/RHEL/makerpms.sh.tmpl 2006-03-16 13:48:18 UTC (rev 14476)
@@ -11,6 +11,8 @@
# /usr/src/redhat directory
#
+EXTRA_OPTIONS="$1"
+
SPECDIR=`rpm --eval %_specdir`
SRCDIR=`rpm --eval %_sourcedir`
@@ -39,7 +41,9 @@
( cd ../../source; if [ -f Makefile ]; then make distclean; fi )
( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} )
+echo -n "Creating samba-${VERSION}.tar.bz2 ... "
( cd ../../.. ; tar --exclude=.svn -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 )
+echo "Done."
##
## copy additional source files
@@ -51,9 +55,9 @@
##
## Build
##
-echo Getting Ready to build release package
+echo "$(basename $0): Getting Ready to build release package"
cd ${SPECDIR}
-${RPM} -ba --clean --rmsource $SPECFILE
+${RPM} -ba --clean --rmsource $EXTRA_OPTIONS $SPECFILE
-echo Done.
+echo "$(basename $0): Done."
Modified: trunk/packaging/RHEL/samba.spec.tmpl
===================================================================
--- trunk/packaging/RHEL/samba.spec.tmpl 2006-03-16 13:48:01 UTC (rev 14475)
+++ trunk/packaging/RHEL/samba.spec.tmpl 2006-03-16 13:48:18 UTC (rev 14476)
@@ -17,17 +17,17 @@
Source998: filter-requires-samba.sh
Source999: setup.tar.bz2
-Requires: pam >= 0.64 %{auth} samba-common = %{version}
-Requires: logrotate >= 3.4 initscripts >= 5.54-1
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
Prereq: /sbin/chkconfig /bin/mktemp /usr/bin/killall
Prereq: fileutils sed /etc/init.d
-BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel
+
+Requires: pam >= 0.64 %{auth}
+Requires: samba-common = %{version}-%{release}
+Requires: logrotate >= 3.4 initscripts >= 5.54-1
Provides: samba = %{version}
-Obsoletes: samba-common, samba-client, samba-swat
+Prefix: /usr
BuildRoot: %{_tmppath}/%{name}-%{version}-root
-Prefix: /usr
+BuildRequires: pam-devel, readline-devel, ncurses-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel
# Working around perl dependency problem from docs
%define __perl_requires %{SOURCE998}
@@ -45,11 +45,13 @@
NetBIOS frame) protocol.
+#######################################################################
%package client
Summary: Samba (SMB) client programs.
Group: Applications/System
-Requires: samba-common = %{version}
+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
@@ -57,19 +59,23 @@
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
@@ -77,6 +83,21 @@
Web browser.
+#######################################################################
+%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
@@ -98,17 +119,15 @@
EXTRA="-D_LARGEFILE64_SOURCE"
%endif
-## run autogen if missing the configure script
-if [ ! -f "configure" ]; then
- ./autogen.sh
-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/cache/samba \
+ --with-lockdir=/var/lib/samba \
--with-logfilebase=/var/log/samba \
--with-mandir=%{_mandir} \
--with-piddir=/var/run \
@@ -117,11 +136,13 @@
--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 \
@@ -131,8 +152,19 @@
make showlayout
-make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" proto pch
+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
@@ -167,7 +199,7 @@
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/cache/samba/winbindd_privileged
+mkdir -p $RPM_BUILD_ROOT/var/lib/samba/winbindd_privileged
mkdir -p $RPM_BUILD_ROOT/var/{log,run/winbindd,spool}/samba
cd source
@@ -213,8 +245,8 @@
install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass.so
# we need a symlink for mount to recognise the smb and smbfs filesystem types
-ln -sf %{_prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
-ln -sf %{_prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
+ln -sf %{_prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
+ln -sf %{_prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
# Install the miscellany
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts
@@ -255,19 +287,32 @@
rm -rf $RPM_BUILD_ROOT
%post
-/sbin/chkconfig --add smb
+## 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
- rm -rf /var/log/samba/* /var/cache/samba/*
+ /sbin/chkconfig --del winbind
+ # rm -rf /var/log/samba/* /var/lib/samba/*
/sbin/service smb stop >/dev/null 2>&1
fi
exit 0
%postun
if [ "$1" -ge "1" ]; then
- %{initdir}/smb condrestart >/dev/null 2>&1
+ %{initdir}/smb restart >/dev/null 2>&1
fi
@@ -278,54 +323,56 @@
fi
%post common
-/sbin/chkconfig --add winbind
/sbin/ldconfig
-%preun common
-if [ $1 = 0 ] ; then
- /sbin/chkconfig --del winbind
- /sbin/service winbind stop >/dev/null 2>&1
-fi
-exit 0
+%postun common
+/sbin/ldconfig
-%postun common -p /sbin/ldconfig
+#######################################################################
+## Files section ##
+#######################################################################
-%triggerpostun -- samba < 1.9.18p7
-if [ $1 != 0 ]; then
- /sbin/chkconfig --add smb
-fi
-
-%triggerpostun -- samba < 2.0.5a-3
-if [ $1 != 0 ]; then
- [ ! -d /var/lock/samba ] && mkdir -m 0755 /var/lock/samba
- [ ! -d /var/spool/samba ] && mkdir -m 1777 /var/spool/samba
- chmod 644 /etc/services
- [ -f /etc/inetd.conf ] && chmod 644 /etc/inetd.conf
-fi
-
%files
%defattr(-,root,root)
-%doc README COPYING Manifest
-%doc WHATSNEW.txt Roadmap
-%doc docs
-%doc examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting
-%doc examples/printing
-%attr(755,root,root) /%{_lib}/security/pam_smbpass.so
+%config(noreplace) %{_sysconfdir}/sysconfig/samba
+%config(noreplace) %{_sysconfdir}/samba/smbusers
+%attr(755,root,root) %config %{initdir}/smb
+%attr(755,root,root) %config %{initdir}/winbind
+%config(noreplace) %{_sysconfdir}/logrotate.d/samba
+%config(noreplace) %{_sysconfdir}/pam.d/samba
+
+%attr(0755,root,root) %dir /var/log/samba
+%attr(0755,root,root) %dir /var/lib/samba
+%attr(1777,root,root) %dir /var/spool/samba
+
%{_sbindir}/samba
%{_sbindir}/winbind
+
%{_sbindir}/smbd
%{_sbindir}/nmbd
+%{_sbindir}/winbindd
+
+%attr(755,root,root) /%{_lib}/libnss_wins.so*
+%attr(755,root,root) /%{_lib}/libnss_winbind.so*
+%attr(755,root,root) /%{_lib}/security/pam_winbind.so
+%attr(755,root,root) /%{_lib}/security/pam_smbpass.so
+
%{_bindir}/mksmbpasswd.sh
%{_bindir}/smbcontrol
%{_bindir}/smbstatus
%{_bindir}/tdbbackup
%{_bindir}/tdbtool
-%config(noreplace) %{_sysconfdir}/sysconfig/samba
-%config(noreplace) %{_sysconfdir}/samba/smbusers
-%attr(755,root,root) %config %{initdir}/smb
-%config(noreplace) %{_sysconfdir}/logrotate.d/samba
-%config(noreplace) %{_sysconfdir}/pam.d/samba
+%{_bindir}/tdbdump
+%{_bindir}/wbinfo
+%{_bindir}/ntlm_auth
+%{_bindir}/pdbedit
+%{_bindir}/eventlogadm
+
+%{_libdir}/samba/idmap/*.so
+%{_libdir}/samba/vfs/*.so
+%{_libdir}/samba/auth/*.so
+
%{_mandir}/man1/smbcontrol.1*
%{_mandir}/man1/smbstatus.1*
%{_mandir}/man1/vfstest.1*
@@ -336,44 +383,51 @@
%{_mandir}/man8/smbd.8*
%{_mandir}/man7/pam_winbind.7*
%{_mandir}/man8/tdbbackup.8*
-%{_mandir}/man7/libsmbclient.7*
+%{_mandir}/man8/tdbdump.8*
+%{_mandir}/man8/winbindd.8*
+%{_mandir}/man1/ntlm_auth.1*
+%{_mandir}/man1/wbinfo.1*
-%{_libdir}/samba/vfs
-%attr(0700,root,root) %dir /var/log/samba
-%attr(1777,root,root) %dir /var/spool/samba
+##########
+%files doc
+%defattr(-,root,root)
+%doc README COPYING Manifest
+%doc WHATSNEW.txt Roadmap
+%doc docs
+%doc examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting
+%doc examples/printing
+%doc %{_datadir}/swat/help
+
+##########
+
%files swat
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/xinetd.d/swat
-%{_datadir}/swat
+%dir %{_datadir}/swat
+%{_datadir}/swat/include
+%{_datadir}/swat/images
+%{_datadir}/swat/lang
%{_sbindir}/swat
%{_mandir}/man8/swat.8*
-%attr(755,root,root) %{_libdir}/samba/*.msg
+##########
+
%files client
%defattr(-,root,root)
/sbin/mount.smb
/sbin/mount.smbfs
/sbin/mount.cifs
/sbin/umount.cifs
-%{_libdir}/samba/lowcase.dat
-%{_libdir}/samba/upcase.dat
-%{_libdir}/samba/valid.dat
+
%{_bindir}/rpcclient
%{_bindir}/smbcacls
%{_bindir}/smbmount
%{_bindir}/smbmnt
%{_bindir}/smbumount
%{_bindir}/findsmb
-%{_bindir}/tdbdump
-%{_mandir}/man8/tdbdump.8*
-%{_mandir}/man8/smbmnt.8*
-%{_mandir}/man8/smbmount.8*
-%{_mandir}/man8/smbumount.8*
-%{_mandir}/man8/mount.cifs.8.*
-%{_mandir}/man8/umount.cifs.8.*
-%{_mandir}/man8/smbspool.8*
+%{_bindir}/smbcquotas
%{_bindir}/nmblookup
%{_bindir}/smbget
%{_bindir}/smbclient
@@ -382,6 +436,13 @@
%{_bindir}/smbtar
%{_bindir}/net
%{_bindir}/smbtree
+
+%{_mandir}/man8/smbmnt.8*
+%{_mandir}/man8/smbmount.8*
+%{_mandir}/man8/smbumount.8*
+%{_mandir}/man8/mount.cifs.8.*
+%{_mandir}/man8/umount.cifs.8.*
+%{_mandir}/man8/smbspool.8*
%{_mandir}/man1/smbget.1*
%{_mandir}/man5/smbgetrc.5*
%{_mandir}/man1/findsmb.1*
@@ -392,45 +453,37 @@
%{_mandir}/man1/smbtar.1*
%{_mandir}/man1/smbtree.1*
%{_mandir}/man8/net.8*
+%{_mandir}/man1/smbcquotas.1*
+##########
+
%files common
%defattr(-,root,root)
-/%{_lib}/libnss_wins.so*
-/%{_lib}/libnss_winbind.so*
-/%{_lib}/security/pam_winbind.so
+%dir %{_sysconfdir}/samba
+%config(noreplace) %{_sysconfdir}/samba/smb.conf
+%config(noreplace) %{_sysconfdir}/samba/lmhosts
+
%{_includedir}/libsmbclient.h
%{_libdir}/libsmbclient.a
-%{_libdir}/libsmbclient.so
-%{_libdir}/libsmbclient.so.0
+%{_libdir}/libsmbclient.so*
%{_includedir}/libmsrpc.h
%{_libdir}/libmsrpc.a
-%{_libdir}/libmsrpc.so
-%{_libdir}/libmsrpc.so.0
-%{_libdir}/samba/charset/CP*.so
-%{_libdir}/samba/idmap/*.so
-%{_libdir}/samba/auth/script.so
+%{_libdir}/libmsrpc.so*
+
+%{_libdir}/samba/*.dat
+%{_libdir}/samba/*.msg
+%{_libdir}/samba/charset/*.so
+
%{_bindir}/testparm
%{_bindir}/smbpasswd
-%{_bindir}/wbinfo
-%{_bindir}/ntlm_auth
-%{_bindir}/pdbedit
-%{_bindir}/eventlogadm
%{_bindir}/profiles
-%{_bindir}/smbcquotas
-%{_sbindir}/winbindd
-%config(noreplace) %{_sysconfdir}/samba/smb.conf
-%config(noreplace) %{_sysconfdir}/samba/lmhosts
-%dir %{_sysconfdir}/samba
-%{initdir}/winbind
-%{_mandir}/man1/ntlm_auth.1*
+
%{_mandir}/man1/profiles.1*
-%{_mandir}/man1/smbcquotas.1*
%{_mandir}/man1/testparm.1*
%{_mandir}/man5/smb.conf.5*
%{_mandir}/man5/lmhosts.5*
%{_mandir}/man8/smbpasswd.8*
-%{_mandir}/man1/wbinfo.1*
-%{_mandir}/man8/winbindd.8*
+%{_mandir}/man7/libsmbclient.7*
%changelog
* Fri Jan 16 2004 Gerald (Jerry) Carter <jerry at samba,org>
More information about the samba-cvs
mailing list