1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-10 12:58:35 +03:00

r13376: break docs out to a separate package; cleanup /var/cache/samba -> /var/lib/samba

This commit is contained in:
Gerald Carter 2006-02-07 17:21:20 +00:00 committed by Gerald (Jerry) Carter
parent 24c6b9fecb
commit 9cb372605c

View File

@ -17,17 +17,17 @@ Source: samba-%{version}.tar.bz2
Source998: filter-requires-samba.sh Source998: filter-requires-samba.sh
Source999: setup.tar.bz2 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: /sbin/chkconfig /bin/mktemp /usr/bin/killall
Prereq: fileutils sed /etc/init.d Prereq: fileutils sed /etc/init.d
BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel
Provides: samba = %{version}
Obsoletes: samba-common, samba-client, samba-swat
BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: pam >= 0.64 %{auth}
Requires: samba-common = %{version}-%{release}
Requires: logrotate >= 3.4 initscripts >= 5.54-1
Provides: samba = %{version}
Prefix: /usr Prefix: /usr
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pam-devel, readline-devel, ncurses-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel
# Working around perl dependency problem from docs # Working around perl dependency problem from docs
%define __perl_requires %{SOURCE998} %define __perl_requires %{SOURCE998}
@ -45,11 +45,13 @@ TCP/IP (NetBT) protocols and does NOT need the NetBEUI (Microsoft Raw
NetBIOS frame) protocol. NetBIOS frame) protocol.
#######################################################################
%package client %package client
Summary: Samba (SMB) client programs. Summary: Samba (SMB) client programs.
Group: Applications/System Group: Applications/System
Requires: samba-common = %{version} Requires: samba-common = %{version}-%{release}
Obsoletes: smbfs Obsoletes: smbfs
Provides: samba-client = %{version}-%{release}
%description client %description client
The samba-client package provides some SMB clients to compliment the The samba-client package provides some SMB clients to compliment the
@ -57,19 +59,23 @@ built-in SMB filesystem in Linux. These clients allow access of SMB
shares and printing to SMB printers. shares and printing to SMB printers.
#######################################################################
%package common %package common
Summary: Files used by both Samba servers and clients. Summary: Files used by both Samba servers and clients.
Group: Applications/System Group: Applications/System
Provides: samba-common = %{version}-%{release}
%description common %description common
Samba-common provides files necessary for both the server and client Samba-common provides files necessary for both the server and client
packages of Samba. packages of Samba.
#######################################################################
%package swat %package swat
Summary: The Samba SMB server configuration program. Summary: The Samba SMB server configuration program.
Group: Applications/System Group: Applications/System
Requires: samba = %{version} xinetd Requires: samba = %{version} xinetd
Provides: samba-swat = %{version}-%{release}
%description swat %description swat
The samba-swat package includes the new SWAT (Samba Web Administration The samba-swat package includes the new SWAT (Samba Web Administration
@ -77,6 +83,21 @@ Tool), for remotely managing Samba's smb.conf file using your favorite
Web browser. 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 %prep
%setup -q %setup -q
@ -98,10 +119,8 @@ autoconf
EXTRA="-D_LARGEFILE64_SOURCE" EXTRA="-D_LARGEFILE64_SOURCE"
%endif %endif
## run autogen if missing the configure script ## always run autogen.sh
if [ ! -f "configure" ]; then ./autogen.sh
./autogen.sh
fi
CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
@ -117,11 +136,13 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
--with-swatdir=%{_datadir}/swat \ --with-swatdir=%{_datadir}/swat \
--enable-cups \ --enable-cups \
--with-acl-support \ --with-acl-support \
--with-ads \
--with-automount \ --with-automount \
--with-fhs \ --with-fhs \
--with-pam_smbpass \ --with-pam_smbpass \
--with-libsmbclient \ --with-libsmbclient \
--with-libsmbsharemodes \ --with-libsmbsharemodes \
--without-smbwrapper \
--with-pam \ --with-pam \
--with-quotas \ --with-quotas \
--with-shared-modules=idmap_rid,idmap_ad \ --with-shared-modules=idmap_rid,idmap_ad \
@ -213,8 +234,8 @@ ln -s /%{_libdir}/libmsrpc.so $RPM_BUILD_ROOT%{_libdir}/libmsrpc.so.0
install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass.so 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 # 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}/sbin/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.smb
# Install the miscellany # Install the miscellany
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts
@ -259,17 +280,23 @@ rm -rf $RPM_BUILD_ROOT
## deal with an upgrade from a broken 3.0.21a.1 RPM ## deal with an upgrade from a broken 3.0.21a.1 RPM
if [ "$1" -eq "2" ]; then if [ "$1" -eq "2" ]; then
if [ ! -d /var/lib/samba -a -d /var/cache/samba ]; then if [ -d /var/cache/samba ]; then
mv /var/cache/samba/* /var/lib/samba/ for file in `ls /var/cache/samba/*tdb`; do
rm -f /var/cache/samba /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
fi fi
fi
/bin/mv /var/cache/samba /var/cache/samba.moved
fi
%preun %preun
if [ $1 = 0 ] ; then if [ $1 = 0 ] ; then
/sbin/chkconfig --del smb /sbin/chkconfig --del smb
# rm -rf /var/log/samba/* /var/cache/samba/* # rm -rf /var/log/samba/* /var/lib/samba/*
/sbin/service smb stop >/dev/null 2>&1 /sbin/service smb stop >/dev/null 2>&1
fi fi
exit 0 exit 0
@ -312,29 +339,51 @@ if [ $1 != 0 ]; then
[ -f /etc/inetd.conf ] && chmod 644 /etc/inetd.conf [ -f /etc/inetd.conf ] && chmod 644 /etc/inetd.conf
fi fi
#######################################################################
## Files section ##
#######################################################################
%files %files
%defattr(-,root,root) %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}/samba
%{_sbindir}/winbind %{_sbindir}/winbind
%{_sbindir}/smbd %{_sbindir}/smbd
%{_sbindir}/nmbd %{_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}/mksmbpasswd.sh
%{_bindir}/smbcontrol %{_bindir}/smbcontrol
%{_bindir}/smbstatus %{_bindir}/smbstatus
%{_bindir}/tdbbackup %{_bindir}/tdbbackup
%{_bindir}/tdbtool %{_bindir}/tdbtool
%config(noreplace) %{_sysconfdir}/sysconfig/samba %{_bindir}/tdbdump
%config(noreplace) %{_sysconfdir}/samba/smbusers %{_bindir}/wbinfo
%attr(755,root,root) %config %{initdir}/smb %{_bindir}/ntlm_auth
%config(noreplace) %{_sysconfdir}/logrotate.d/samba %{_bindir}/pdbedit
%config(noreplace) %{_sysconfdir}/pam.d/samba %{_bindir}/eventlogadm
%{_libdir}/samba/idmap/*.so
%{_libdir}/samba/vfs/*.so
%{_libdir}/samba/auth/*.so
%{_mandir}/man1/smbcontrol.1* %{_mandir}/man1/smbcontrol.1*
%{_mandir}/man1/smbstatus.1* %{_mandir}/man1/smbstatus.1*
%{_mandir}/man1/vfstest.1* %{_mandir}/man1/vfstest.1*
@ -345,20 +394,36 @@ fi
%{_mandir}/man8/smbd.8* %{_mandir}/man8/smbd.8*
%{_mandir}/man7/pam_winbind.7* %{_mandir}/man7/pam_winbind.7*
%{_mandir}/man8/tdbbackup.8* %{_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 %files swat
%defattr(-,root,root) %defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/xinetd.d/swat %config(noreplace) %{_sysconfdir}/xinetd.d/swat
%{_datadir}/swat %dir %{_datadir}/swat
%{_datadir}/swat/include
%{_datadir}/swat/images
%{_datadir}/swat/lang
%{_sbindir}/swat %{_sbindir}/swat
%{_mandir}/man8/swat.8* %{_mandir}/man8/swat.8*
%attr(755,root,root) %{_libdir}/samba/*.msg
##########
%files client %files client
%defattr(-,root,root) %defattr(-,root,root)
@ -366,23 +431,14 @@ fi
/sbin/mount.smbfs /sbin/mount.smbfs
/sbin/mount.cifs /sbin/mount.cifs
/sbin/umount.cifs /sbin/umount.cifs
%{_libdir}/samba/lowcase.dat
%{_libdir}/samba/upcase.dat
%{_libdir}/samba/valid.dat
%{_bindir}/rpcclient %{_bindir}/rpcclient
%{_bindir}/smbcacls %{_bindir}/smbcacls
%{_bindir}/smbmount %{_bindir}/smbmount
%{_bindir}/smbmnt %{_bindir}/smbmnt
%{_bindir}/smbumount %{_bindir}/smbumount
%{_bindir}/findsmb %{_bindir}/findsmb
%{_bindir}/tdbdump %{_bindir}/smbcquotas
%{_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}/nmblookup %{_bindir}/nmblookup
%{_bindir}/smbget %{_bindir}/smbget
%{_bindir}/smbclient %{_bindir}/smbclient
@ -391,6 +447,13 @@ fi
%{_bindir}/smbtar %{_bindir}/smbtar
%{_bindir}/net %{_bindir}/net
%{_bindir}/smbtree %{_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}/man1/smbget.1*
%{_mandir}/man5/smbgetrc.5* %{_mandir}/man5/smbgetrc.5*
%{_mandir}/man1/findsmb.1* %{_mandir}/man1/findsmb.1*
@ -401,45 +464,37 @@ fi
%{_mandir}/man1/smbtar.1* %{_mandir}/man1/smbtar.1*
%{_mandir}/man1/smbtree.1* %{_mandir}/man1/smbtree.1*
%{_mandir}/man8/net.8* %{_mandir}/man8/net.8*
%{_mandir}/man1/smbcquotas.1*
##########
%files common %files common
%defattr(-,root,root) %defattr(-,root,root)
/%{_lib}/libnss_wins.so* %dir %{_sysconfdir}/samba
/%{_lib}/libnss_winbind.so*
/%{_lib}/security/pam_winbind.so
%{_includedir}/libsmbclient.h
%{_libdir}/libsmbclient.a
%{_libdir}/libsmbclient.so
%{_libdir}/libsmbclient.so.0
%{_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
%{_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/smb.conf
%config(noreplace) %{_sysconfdir}/samba/lmhosts %config(noreplace) %{_sysconfdir}/samba/lmhosts
%dir %{_sysconfdir}/samba
%{initdir}/winbind %{_includedir}/libsmbclient.h
%{_mandir}/man1/ntlm_auth.1* %{_libdir}/libsmbclient.a
%{_libdir}/libsmbclient.so*
%{_includedir}/libmsrpc.h
%{_libdir}/libmsrpc.a
%{_libdir}/libmsrpc.so*
%{_libdir}/samba/*.dat
%{_libdir}/samba/*.msg
%{_libdir}/samba/charset/*.so
%{_bindir}/testparm
%{_bindir}/smbpasswd
%{_bindir}/profiles
%{_mandir}/man1/profiles.1* %{_mandir}/man1/profiles.1*
%{_mandir}/man1/smbcquotas.1*
%{_mandir}/man1/testparm.1* %{_mandir}/man1/testparm.1*
%{_mandir}/man5/smb.conf.5* %{_mandir}/man5/smb.conf.5*
%{_mandir}/man5/lmhosts.5* %{_mandir}/man5/lmhosts.5*
%{_mandir}/man8/smbpasswd.8* %{_mandir}/man8/smbpasswd.8*
%{_mandir}/man1/wbinfo.1* %{_mandir}/man7/libsmbclient.7*
%{_mandir}/man8/winbindd.8*
%changelog %changelog
* Fri Jan 16 2004 Gerald (Jerry) Carter <jerry@samba,org> * Fri Jan 16 2004 Gerald (Jerry) Carter <jerry@samba,org>