summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/Mandrake/empty.patch0
-rw-r--r--packaging/Mandrake/makerpms.sh.tmpl5
-rw-r--r--packaging/Mandrake/samba.log4
-rw-r--r--packaging/Mandrake/samba2.spec.tmpl165
-rw-r--r--packaging/Mandrake/smb.conf13
-rwxr-xr-xpackaging/Mandrake/smb.init2
-rw-r--r--packaging/README.UnixWare6
-rw-r--r--packaging/RedHat/makerpms.sh.tmpl47
-rw-r--r--packaging/RedHat/samba.log4
-rw-r--r--packaging/RedHat/samba.pamd6
-rw-r--r--packaging/RedHat/samba.pamd.stack6
-rw-r--r--packaging/RedHat/samba.xinetd15
-rw-r--r--packaging/RedHat/samba2.spec.tmpl302
-rw-r--r--packaging/RedHat/smb.conf6
-rwxr-xr-xpackaging/RedHat/smb.init2
15 files changed, 317 insertions, 266 deletions
diff --git a/packaging/Mandrake/empty.patch b/packaging/Mandrake/empty.patch
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/packaging/Mandrake/empty.patch
diff --git a/packaging/Mandrake/makerpms.sh.tmpl b/packaging/Mandrake/makerpms.sh.tmpl
index 3b13bcab64d..c4ad9c6b581 100644
--- a/packaging/Mandrake/makerpms.sh.tmpl
+++ b/packaging/Mandrake/makerpms.sh.tmpl
@@ -7,8 +7,9 @@ USERID=`id -u`
GRPID=`id -g`
VERSION='PVERSION'
-( cd ../../.. ; chown -R ${USERID}.${GRPID} ${SRCDIR}/samba-$VERSION )
-( cd ../../.. ; tar --exclude-dir=CVS czvf ${SRCDIR}/samba-PVERSION.tar.gz samba-$VERSION )
+( cd ../../.. ; mv samba samba-$VERSION; chown -R ${USERID}.${GRPID} ${SRCDIR}/samba-$VERSION )
+( cd ../../.. ; tar --exclude=CVS -czvf ${SRCDIR}/samba-$VERSION.tar.gz samba-$VERSION )
+( cd ../../.. ; mv samba-$VERSION samba )
cp -a *.spec $SPECDIR
cp -a *.patch smb.* samba.log $SRCDIR
cd $SPECDIR
diff --git a/packaging/Mandrake/samba.log b/packaging/Mandrake/samba.log
index 4e8b44b60e7..7dc1667bafe 100644
--- a/packaging/Mandrake/samba.log
+++ b/packaging/Mandrake/samba.log
@@ -1,4 +1,4 @@
-/var/log/samba/log.nmb {
+/var/log/samba/log.nmbd {
notifempty
missingok
postrotate
@@ -6,7 +6,7 @@
endscript
}
-/var/log/samba/log.smb {
+/var/log/samba/log.smbd {
notifempty
missingok
postrotate
diff --git a/packaging/Mandrake/samba2.spec.tmpl b/packaging/Mandrake/samba2.spec.tmpl
index 750b88e3925..5bc92535f80 100644
--- a/packaging/Mandrake/samba2.spec.tmpl
+++ b/packaging/Mandrake/samba2.spec.tmpl
@@ -5,7 +5,7 @@ Release: PRELEASE
Copyright: GNU GPL version 2
Group: Networking
Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz
-Packager: John H Terpstra [Samba-Team] <jht@samba.org>
+Packager: Gerald (Jerry) Carter [Samba-Team] <jerry@samba.org>
Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
Prereq: chkconfig fileutils
BuildRoot: /var/tmp/samba
@@ -39,6 +39,12 @@ Please read the smb.conf file and ENCRYPTION.txt in the
docs directory for implementation details.
%changelog
+* Mon May 21 2001 Gerald (Jerry) Carter <jerry@samba.org>
+ - removed docs/htmldocs and docs/manpages from /usr/share/docs
+ These het installed in /usr/share/swat already
+ - Fix for codepages and src not getting installed in the RPM
+ - Fixed minor typos
+
* Mon Apr 23 2001 Gerald (Jerry) Carter <jerry@samba.org>
- Added a few bug fixes to release the first Mandrake RPMS
@@ -62,20 +68,22 @@ EXTRA="-D_LARGEFILE64_SOURCE"
NUMCPU=`grep processor /proc/cpuinfo | wc -l`
CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
- --prefix=%{prefix} \
+ --prefix=%{prefix} \
--with-fhs \
- --libdir=/etc \
+ --libdir=/etc/samba \
--localstatedir=/var \
- --with-configdir=/etc \
- --with-lockdir=/var/lock/samba \
- --with-swatdir=%{prefix}/share/swat \
- --with-quotas \
- --with-smbmount \
- --with-pam \
- --with-syslog \
- --with-utmp \
- --with-netatalk \
- --with-sambabook=%{prefix}/share/swat/using_samba
+ --with-codepagedir=%{prefix}/share/samba/codepages \
+ --with-configdir=/etc/samba \
+ --with-lockdir=/var/lock/samba \
+ --with-swatdir=%{prefix}/share/swat \
+ --with-quotas \
+ --with-smbmount \
+ --with-pam \
+ --with-pam_smbpass \
+ --with-syslog \
+ --with-utmp \
+ --with-netatalk \
+ --with-sambabook=%{prefix}/share/swat/using_samba
make -j${NUMCPU} proto
make -j${NUMCPU} all smbfilter nsswitch/libnss_wins.so debug2html
@@ -83,13 +91,15 @@ make -j${NUMCPU} all smbfilter nsswitch/libnss_wins.so debug2html
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,samba,xinetd.d,codepages/src}
+mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,samba,xinetd.d}
+mkdir -p $RPM_BUILD_ROOT/etc/samba/security
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
-mkdir -p $RPM_BUILD_ROOT/lib
+mkdir -p $RPM_BUILD_ROOT/lib/security
mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin}
mkdir -p $RPM_BUILD_ROOT/home/samba
mkdir -p $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs}
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/man/{man1,man5,man7,man8}
mkdir -p $RPM_BUILD_ROOT/var/lock/samba
@@ -98,40 +108,32 @@ mkdir -p $RPM_BUILD_ROOT/var/spool/samba
# Install standard binary files
for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
- make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool
+ make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \
+ smbmount smbumount smbmnt
do
-install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
+ install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
done
-for i in smbtar
+for i in smbtar
do
-install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
+ install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
done
# Install secure binary files
-for i in smbd nmbd swat smbmount smbumount smbmnt debug2html \
- smbfilter
+for i in smbd nmbd swat debug2html smbfilter
do
-install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
+ install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
done
# we need a symlink for mount to recognise the smb and smbfs filesystem types
-ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
-ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
+ln -sf %{prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
+ln -sf %{prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
-# Install level 1 man pages
-for i in *.1
-do
-install -m644 docs/manpages/$i $RPM_BUILD_ROOT%{prefix}/share/man/man1
-done
-
# Install codepage source files
-for i in 437 737 775 850 852 861 866 932 936 949 950 1251
-do
-install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT/etc/codepages/src
+for i in 437 737 775 850 852 861 866 932 936 949 950 1251; do
+ install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src
done
-for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
-do
-install -m644 source/codepages/CP$i.TXT $RPM_BUILD_ROOT/etc/codepages/src
+for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R; do
+ install -m644 source/codepages/CP$i.TXT $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src
done
# Install the nsswitch library extenstion file
@@ -139,40 +141,43 @@ install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
# Make link for wins resolver
( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; )
+# PAM Authentication file
+install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security
+
# Install SWAT helper files
-for i in swat/help/*.html docs/htmldocs/*.html
-do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
+for i in swat/help/*.html docs/htmldocs/*.html; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
done
-for i in swat/images/*.gif
-do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
+for i in swat/images/*.gif; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
done
-for i in swat/include/*.html
-do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
+for i in swat/include/*.html; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
done
# This is the O'Reily Samba Book - on-line
-for i in docs/htmldocs/using_samba/*.html
-do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba
+for i in docs/htmldocs/using_samba/*.html; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba
done
-for i in docs/htmldocs/using_samba/figs/*.gif
-do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/figs
+for i in docs/htmldocs/using_samba/figs/*.gif; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/figs
done
-for i in docs/htmldocs/using_samba/gifs/*.gif
-do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/gifs
+for i in docs/htmldocs/using_samba/gifs/*.gif; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/gifs
done
# Install the miscellany
install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
+# Install level 1 man pages
+for i in *.1; do
+ install -m644 docs/manpages/$i $RPM_BUILD_ROOT%{prefix}/share/man/man1
+done
install -m644 docs/manpages/smb.conf.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5
install -m644 docs/manpages/lmhosts.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5
install -m644 docs/manpages/smbpasswd.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5
+
install -m644 docs/manpages/samba.7 $RPM_BUILD_ROOT%{prefix}/share/man/man7
+
install -m644 docs/manpages/smbd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
install -m644 docs/manpages/nmbd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
install -m644 docs/manpages/smbpasswd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
@@ -180,9 +185,12 @@ install -m644 docs/manpages/swat.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
install -m644 docs/manpages/smbmount.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
install -m644 docs/manpages/smbmnt.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
install -m644 docs/manpages/smbumount.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbspool.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+
install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
-install -m644 packaging/Mandrake/smb.con* $RPM_BUILD_ROOT/etc/
-install -m644 packaging/Mandrake/smbusers $RPM_BUILD_ROOT/etc/smbusers
+
+install -m644 packaging/Mandrake/smb.con* $RPM_BUILD_ROOT/etc/samba/
+install -m644 packaging/Mandrake/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
install -m755 packaging/Mandrake/smbprint $RPM_BUILD_ROOT%{prefix}/bin
install -m755 packaging/Mandrake/findsmb $RPM_BUILD_ROOT%{prefix}/bin
install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
@@ -190,11 +198,14 @@ install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
install -m644 packaging/Mandrake/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
install -m644 packaging/Mandrake/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
install -m644 packaging/Mandrake/samba.xinetd $RPM_BUILD_ROOT/etc/xinetd.d/swat
-echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/lmhosts
+echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts
+
+##
+## remove these directories so they don't get installed twice
+##
+/bin/rm -rf docs/htmldocs
+/bin/rm -rf docs/manpages
-# Link smbmount to /sbin/mount.smb and /sbin/mount.smbfs
-ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
-ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
%clean
rm -rf $RPM_BUILD_ROOT
@@ -204,14 +215,14 @@ rm -rf $RPM_BUILD_ROOT
/sbin/chkconfig smb off
# Build codepage load files
-cd /etc
+cd %{prefix}/share/samba/codepages
for i in 437 737 775 850 852 861 866 932 936 949 950 1251
do
-%{prefix}/bin/make_smbcodepage c $i /etc/codepages/src/codepage_def.$i /etc/codepages/codepage.$i
+%{prefix}/bin/make_smbcodepage c $i %{prefix}/share/samba/codepages/src/codepage_def.$i %{prefix}/share/samba/codepages/codepage.$i
done
for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
do
-%{prefix}/bin/make_unicodemap $i /etc/codepages/src/CP$i.TXT /etc/codepages/unicode_map.$i
+%{prefix}/bin/make_unicodemap $i %{prefix}/share/samba/codepages/src/CP$i.TXT %{prefix}/share/samba/codepages/unicode_map.$i
done
# Add swat entry to /etc/services if not already there
@@ -219,25 +230,14 @@ if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
fi
-# Add swat entry to /etc/inetd.conf if needed
-if [ -f /etc/inetd.conf ]; then
- if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
- echo '#swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf
- killall -1 inetd || :
- fi
-fi
-
%preun
if [ $1 = 0 ] ; then
/sbin/chkconfig --del smb
- # We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
+ # We want to remove the browse.dat file
if [ -e /var/lock/samba/browse.dat ]; then
rm -f /var/lock/samba/browse.dat
fi
- if [ -e /var/lock/samba/wins.dat ]; then
- rm -f /var/lock/samba/wins.dat
- fi
fi
%postun
@@ -256,10 +256,6 @@ if [ $1 = 0 ] ; then
# Remove swat entries from /etc/inetd.conf and /etc/services
cd /etc
tmpfile=/etc/tmp.$$
- if [ -f /etc/inetd.conf ]; then
- sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
- mv $tmpfile inetd.conf
- fi
sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
mv $tmpfile services
fi
@@ -283,9 +279,9 @@ fi
%attr(-,root,root) %{prefix}/share/swat/images/*
%attr(-,root,root) %{prefix}/share/swat/include/*
%attr(-,root,root) %{prefix}/share/swat/using_samba/*
-%attr(-,root,root) %config(noreplace) /etc/lmhosts
-%attr(-,root,root) %config(noreplace) /etc/smb.conf
-%attr(-,root,root) %config(noreplace) /etc/smbusers
+%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
+%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
+%attr(-,root,root) %config(noreplace) /etc/samba/smbusers
%attr(-,root,root) /etc/rc.d/init.d/smb
%attr(-,root,root) /etc/logrotate.d/samba
%attr(-,root,root) %config(noreplace) /etc/pam.d/samba
@@ -293,8 +289,9 @@ fi
%attr(-,root,root) %{prefix}/share/man/man5/*
%attr(-,root,root) %{prefix}/share/man/man7/*
%attr(-,root,root) %{prefix}/share/man/man8/*
-%attr(-,root,root) %dir /etc/codepages/*
-%attr(-,root,root) %dir /etc/codepages/src/*
+%attr(-,root,root) %dir /etc/samba/
+%attr(-,root,root) %dir /usr/share/samba/codepages/*
+%attr(-,root,root) %dir /usr/share/samba/codepages/src/*
%attr(-,root,root) %dir /var/lock/samba
%attr(-,root,root) %dir /var/log/samba
%attr(1777,root,root) %dir /var/spool/samba
diff --git a/packaging/Mandrake/smb.conf b/packaging/Mandrake/smb.conf
index db0528d8aa8..a14e90ec16b 100644
--- a/packaging/Mandrake/smb.conf
+++ b/packaging/Mandrake/smb.conf
@@ -79,7 +79,7 @@
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
; encrypt passwords = yes
-; smb passwd file = /etc/smbpasswd
+; smb passwd file = /etc/samba/private/smbpasswd
# The following are needed to allow password changing from Windows to
# update the Linux sytsem password also.
@@ -198,16 +198,21 @@
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
-; path = /home/samba/netlogon
+; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
+#Uncomment the following 2 lines if you would like your login scripts to
+#be created dynamically by ntlogon (check that you have it in the correct
+#locationn (the default of the ntlogon rpm available in contribs)
+;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon
+;root postexec = rm -f /var/lib/samba/netlogon/%U.bat
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
-; path = /home/samba/profiles
+; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
@@ -222,7 +227,7 @@
[printers]
comment = All Printers
path = /var/spool/samba
- browseable = yes
+ browseable = no
# to allow user 'guest account' to print.
guest ok = yes
writable = no
diff --git a/packaging/Mandrake/smb.init b/packaging/Mandrake/smb.init
index 31b2deee57c..8855f04efba 100755
--- a/packaging/Mandrake/smb.init
+++ b/packaging/Mandrake/smb.init
@@ -20,7 +20,7 @@ fi
[ ${NETWORKING} = "no" ] && exit 0
# Check that smb.conf exists.
-[ -f /etc/smb.conf ] || exit 0
+[ -f /etc/samba/smb.conf ] || exit 0
RETVAL=0
diff --git a/packaging/README.UnixWare b/packaging/README.UnixWare
new file mode 100644
index 00000000000..a4b08954ecc
--- /dev/null
+++ b/packaging/README.UnixWare
@@ -0,0 +1,6 @@
+Date: January 9, 2001
+Maintainer: John H Terpstra
+Subject: UnixWare Packaging Files
+Modifications: Initial release 20010109
+
+Note: The packaging build files for UnixWare are located under ~samba/packaging/Caldera/UnixWare.
diff --git a/packaging/RedHat/makerpms.sh.tmpl b/packaging/RedHat/makerpms.sh.tmpl
index 1767176a1fe..44b89a45ec8 100644
--- a/packaging/RedHat/makerpms.sh.tmpl
+++ b/packaging/RedHat/makerpms.sh.tmpl
@@ -1,36 +1,25 @@
#!/bin/sh
# Copyright (C) John H Terpstra 1998
# Updated for RPM 3 by Jochen Wiedmann, joe@ispsoft.de
-#
+# Changed for a generic tar file rebuild by abartlet@pcug.org.au
USERID=`id -u`
GRPID=`id -g`
+VERSION='PVERSION'
-rpm3var () {
- echo "rpm3var start $1" >>/tmp/log
- var=`rpm --showrc \
- | awk "/-[0-9]+[:=][[:blank:]]+$1[[:blank:]]/ {print \\$3}"`
- echo "var=$var" >>/tmp/log
- while test -n "`echo $var | egrep '%{[_a-zA-Z]+}'`"; do
- v=`echo $var | sed 's/.*%{\([_a-zA-Z]\+\)}.*/\1/'`
- echo "Loop: v=$v" >>/tmp/log
- w="`rpm3var $v`"
- var=`echo $var | sed "s,%{\\([_a-zA-Z]\\+\\)},$w,g"`
- echo "Loop: var=$var" >>/tmp/log
- done
- echo "rpm3var stop $1 $var" >>/tmp/log
- echo $var
-}
+rm -f ../../samba2.*.spec
case `rpm --version | awk '{print $3}'` in
2.*)
- RPMDIR=`rpm --showrc | awk '/^rpmdir/ { print $3}'`
- SPECDIR=`rpm --showrc | awk '/^specdir/ { print $3}'`
- SRCDIR=`rpm --showrc | awk '/^sourcedir/ { print $3}'`
+ sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba2.rpm2.spec
+ cp samba2.rpm2.spec ../../
;;
3.*)
- RPMDIR=`rpm3var _rpmdir`
- SPECDIR=`rpm3var _specdir`
- SRCDIR=`rpm3var _sourcedir`
+ sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba2.rpm3.spec
+ cp samba2.rpm3.spec ../../
+ ;;
+ 4.*)
+ sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba2.spec > samba2.rpm4.spec
+ cp samba2.rpm4.spec ../../
;;
*)
echo "Unknown RPM version: `rpm --version`"
@@ -38,10 +27,12 @@ case `rpm --version | awk '{print $3}'` in
;;
esac
-( cd ../../.. ; chown -R ${USERID}.${GRPID} ${SRCDIR}/samba-PVERSION )
-( cd ../../.. ; tar czvf ${SRCDIR}/samba-PVERSION.tar.gz samba-PVERSION )
+( cd ../../source; if [ -f Makefile ]; then make distclean; fi )
+( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} )
+( cd ../../.. ; tar --exclude=CVS -czvf samba-${VERSION}.tar.gz samba-${VERSION}/samba2.*.spec samba-${VERSION} )
+
+rpm -ta -v ../../../samba-${VERSION}.tar.gz
+
+
+
-cp -a *.spec $SPECDIR
-cp -a *.patch smb.* samba.log $SRCDIR
-cd $SPECDIR
-rpm -ba -v samba2.spec
diff --git a/packaging/RedHat/samba.log b/packaging/RedHat/samba.log
index c8ab3852e27..4b244099c4f 100644
--- a/packaging/RedHat/samba.log
+++ b/packaging/RedHat/samba.log
@@ -1,10 +1,10 @@
-/var/log/samba/log.nmb {
+/var/log/samba/log.nmbd {
postrotate
/usr/bin/killall -HUP nmbd
endscript
}
-/var/log/samba/log.smb {
+/var/log/samba/log.smbd {
postrotate
/usr/bin/killall -HUP smbd
endscript
diff --git a/packaging/RedHat/samba.pamd b/packaging/RedHat/samba.pamd
index f38e70184af..1b4a93fb19e 100644
--- a/packaging/RedHat/samba.pamd
+++ b/packaging/RedHat/samba.pamd
@@ -1,2 +1,4 @@
-auth required /lib/security/pam_pwdb.so nullok shadow
-account required /lib/security/pam_pwdb.so
+auth required /lib/security/pam_pwdb.so nullok shadow
+account required /lib/security/pam_pwdb.so
+session required /lib/security/pam_pwdb.so
+password required /lib/security/pam_pwdb.so
diff --git a/packaging/RedHat/samba.pamd.stack b/packaging/RedHat/samba.pamd.stack
new file mode 100644
index 00000000000..6a948f92cbd
--- /dev/null
+++ b/packaging/RedHat/samba.pamd.stack
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth required pam_nologin.so
+auth required pam_stack.so service=system-auth
+account required pam_stack.so service=system-auth
+session required pam_stack.so service=system-auth
+password required pam_stack.so service=system-auth
diff --git a/packaging/RedHat/samba.xinetd b/packaging/RedHat/samba.xinetd
new file mode 100644
index 00000000000..8c38b354218
--- /dev/null
+++ b/packaging/RedHat/samba.xinetd
@@ -0,0 +1,15 @@
+# default: off
+# description: SWAT is the Samba Web Admin Tool. Use swat \
+# to configure your Samba server. To use SWAT, \
+# connect to port 901 with your favorite web browser.
+service swat
+{
+ port = 901
+ socket_type = stream
+ wait = no
+ only_from = localhost
+ user = root
+ server = /usr/sbin/swat
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl
index 73ca9513366..44a8fe998e3 100644
--- a/packaging/RedHat/samba2.spec.tmpl
+++ b/packaging/RedHat/samba2.spec.tmpl
@@ -4,11 +4,9 @@ Version: PVERSION
Release: PRELEASE
Copyright: GNU GPL version 2
Group: Networking
-Source: ftp://samba.org/pub/samba/samba-PVERSION.tar.gz
-Patch: makefile-path.patch
-Patch1: smbw.patch
+Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz
Packager: John H Terpstra [Samba-Team] <jht@samba.org>
-Requires: pam >= 0.64 kernel >= 2.2.1 glibc >= 2.1.2
+Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
Prereq: chkconfig fileutils
BuildRoot: /var/tmp/samba
Prefix: /usr
@@ -45,6 +43,22 @@ for Shadow passwords and quotas. Do NOT recompile with the
SHADOW_PWD option enabled
%changelog
+* Sat Mar 31 2001 Andrew Bartlett <abartlet@pcug.org.au>
+ - Changed prefix/share/man for _mandir/share/man
+ - Changed this for a sed macro MANDIR_MACRO
+ - This allows us to build both RH7 (RPM4)
+ and older versions from same specfile.
+ - Made makerpms.sh use the rpm -ta command rather
+ than attempting to devine the correct location to
+ put the file. Also removes some /tmp symlink games.
+ - Allows build on RPM4
+ - Increased PAM requirements to allow us to use
+ system-auth (this pam is in 6.x errata at least)
+
+* Tue Mar 27 2001 John H Terpstra <jht@samba.org>
+ - Fixed typos introduced by Sum Wun.
+ - Build for Red Hat 7.x
+
* Sun Nov 12 2000 John H Terpstra <jht@samba.org>
- Updated for Samba-2.2 releases
- Added libnss_wins.so stuff
@@ -118,77 +132,73 @@ SHADOW_PWD option enabled
- Fixed smb.conf file path for log files
- Fixed smb.conf file path for incoming smb print spool directory
- Added a number of options to smb.conf file
- - Added smbadduser command (missed from all previous RPMs) - Doooh!
- Added smbuser file and smb.conf file updates for username map
%prep
%setup
-%patch -p1
-%patch1 -p1
%build
cd source
%ifarch ia64
libtoolize --copy --force # get it to recognize IA-64
-autoconf
autoheader
+autoconf
EXTRA="-D_LARGEFILE64_SOURCE"
%endif
NUMCPU=`grep processor /proc/cpuinfo | wc -l`
CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
- --prefix=%{prefix}\
- --libdir=/etc \
- --with-lockdir=/var/lock/samba \
- --with-privatedir=/etc \
- --with-swatdir=%{prefix}/share/swat \
+ --prefix=%{prefix} \
+ --localstatedir=/var \
+ --with-configdir=/etc/samba \
+ --with-privatedir=/etc/samba \
+ --with-codepagedir=/etc/codepages \
+ --with-fhs \
--with-quotas \
--with-smbmount \
--with-pam \
- --with-profile \
--with-syslog \
--with-utmp \
- --with-vfs \
- --with-msdfs \
--with-netatalk \
- --with-sambabook=%{prefix}/share/swat/using_samba
-make -j${NUMCPU} all smbfilter nsswitch/libnss_wins.so
-make -j${NUMCPU} smbtorture debug2html locktest2
-make -j${NUMCPU} masktest bin/smbspool
-#make -j${NUMCPU} rpctorture locktest smbwrapper bin/wbinfo
+ --with-sambabook=%{prefix}/share/swat/using_samba \
+ --with-swatdir=%{prefix}/share/swat
+make -j${NUMCPU} proto
+make -j${NUMCPU} all nsswitch/libnss_wins.so
+make -j${NUMCPU} debug2html
+make -j${NUMCPU} bin/smbspool
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/sbin
+mkdir -p $RPM_BUILD_ROOT/etc/samba
mkdir -p $RPM_BUILD_ROOT/etc/codepages/src
-mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d}
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/{init.d,rc0.d,rc1.d,rc2.d,rc3.d,rc5.d,rc6.d}
-mkdir -p $RPM_BUILD_ROOT/home/samba
+mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,samba}
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin}
-mkdir -p $RPM_BUILD_ROOT/sbin
-mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include}
-mkdir -p $RPM_BUILD_ROOT%{prefix}/man/{man1,man5,man7,man8}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include,using_samba}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs}
+mkdir -p $RPM_BUILD_ROOTMANDIR_MACRO
mkdir -p $RPM_BUILD_ROOT/var/lock/samba
mkdir -p $RPM_BUILD_ROOT/var/log/samba
mkdir -p $RPM_BUILD_ROOT/var/spool/samba
+mkdir -p $RPM_BUILD_ROOT/lib
# Install standard binary files
for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
- make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool
-# smbsh smbwrapper.so
+ make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \
+ smbcacls smbcontrol
do
install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
done
-for i in addtosmbpass mksmbpasswd.sh smbtar
+for i in mksmbpasswd.sh smbtar
do
install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
done
# Install secure binary files
-for i in smbd nmbd swat smbmount smbumount smbmnt debug2html \
- smbtorture smbfilter locktest2 masktest
-# wbinfo
+for i in smbd nmbd swat smbmount smbumount smbmnt debug2html
do
install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
done
@@ -197,23 +207,25 @@ done
ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
-# Install level 1 man pages
-for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1 make_smbcodepage.1 nmblookup.1
-do
-install -m644 docs/manpages/$i $RPM_BUILD_ROOT%{prefix}/man/man1
-done
+# This allows us to get away without duplicating code that
+# sombody else can maintain for us.
+cd source
+make LIBDIR=$RPM_BUILD_ROOT/etc/samba \
+ BINDIR=$RPM_BUILD_ROOT%{prefix}/bin \
+ MANDIR=$RPM_BUILD_ROOTMANDIR_MACRO \
+ CODEPAGEDIR=$RPM_BUILD_ROOT/etc/codepages \
+ SWATDIR=$RPM_BUILD_ROOT/usr/share/swat \
+ SAMBABOOK=$RPM_BUILD_ROOT/usr/share/swat/using_samba \
+ installman installcp installswat
+cd ..
# Install codepage source files
-for i in 437 737 775 850 852 861 866 932 936 949 950 1251
-do
-install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT/etc/codepages/src
-done
-for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+for i in source/codepages/codepage_def.* source/codepages/*.TXT
do
-install -m644 source/codepages/CP$i.TXT $RPM_BUILD_ROOT/etc/codepages/src
+install -m644 $i $RPM_BUILD_ROOT/etc/codepages/src
done
-# Install the nsswitch library extension file
+# Install the nsswitch library extenstion file
install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
# Make link for wins resolver
( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; )
@@ -230,80 +242,92 @@ done
for i in swat/include/*.html
do
install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
-done# This is the O'Reily Samba Book - on-line
-for i in docs/htmldocs/using_samba/*.html
-do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba
-done
-for i in docs/htmldocs/using_samba/figs/*.gif
-do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/figs
-done
-for i in docs/htmldocs/using_samba/gifs/*.gif
-do
-install -m644 $i $RPM_BUILD_ROOT%{prefix/share/swat/using_samba/gifs
done
# Install the miscellany
install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
-install -m644 docs/manpages/smb.conf.5 $RPM_BUILD_ROOT%{prefix}/man/man5
-install -m644 docs/manpages/lmhosts.5 $RPM_BUILD_ROOT%{prefix}/man/man5
-install -m644 docs/manpages/smbpasswd.5 $RPM_BUILD_ROOT%{prefix}/man/man5
-install -m644 docs/manpages/samba.7 $RPM_BUILD_ROOT%{prefix}/man/man7
-install -m644 docs/manpages/smbd.8 $RPM_BUILD_ROOT%{prefix}/man/man8
-install -m644 docs/manpages/nmbd.8 $RPM_BUILD_ROOT%{prefix}/man/man8
-install -m644 docs/manpages/swat.8 $RPM_BUILD_ROOT%{prefix}/man/man8
-install -m644 docs/manpages/smbmnt.8 $RPM_BUILD_ROOT%{prefix}/man/man8
-install -m644 docs/manpages/smbmount.8 $RPM_BUILD_ROOT%{prefix}/man/man8
-install -m644 docs/manpages/smbpasswd.8 $RPM_BUILD_ROOT%{prefix}/man/man8
-install -m644 docs/manpages/smbspool.8 $RPM_BUILD_ROOT%{prefix}/man/man8
-install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/smb.conf
-install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/smbusers
install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin
install -m755 packaging/RedHat/findsmb $RPM_BUILD_ROOT%{prefix}/bin
-install -m755 packaging/RedHat/smbadduser $RPM_BUILD_ROOT%{prefix}/bin
install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
-install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
-echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/lmhosts
+install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf
+install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
+install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
+install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/samba/samba.stack
+install -m644 packaging/RedHat/samba.xinetd $RPM_BUILD_ROOT/etc/samba/samba.xinetd
+echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add smb
+/sbin/chkconfig smb off
-# Build codepage load files
-for i in 437 737 850 852 861 866 932 936 949 950 1251
-do
-%{prefix}/bin/make_smbcodepage c $i /etc/codepages/src/codepage_def.$i /etc/codepages/codepage.$i
-done
-for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
-do
-%{prefix/bin/make_unicodemap $i /etc/codepages/src/CP$i.TXT /etc/codepages/unicode_map.$i
-done
+echo "Looking for old /etc/smb.conf..."
+if [ -f /etc/smb.conf ]; then
+ echo "Moving old /etc/smb.conf to /etc/samba/smb.conf"
+ mv /etc/smb.conf /etc/samba/smb.conf
+fi
+
+echo "Looking for old /etc/smbusers..."
+if [ -f /etc/smbusers ]; then
+ echo "Moving old /etc/smbusers to /etc/samba/smbusers"
+ mv /etc/smbusers /etc/samba/smbusers
+fi
-# Add swat entry to /etc/services if not already there
+echo "Looking for old /etc/lmhosts..."
+if [ -f /etc/lmhosts ]; then
+ echo "Moving old /etc/lmhosts to /etc/samba/lmhosts"
+ mv /etc/lmhosts /etc/samba/lmhosts
+fi
+
+echo "Looking for old /etc/MACHINE.SID..."
+if [ -f /etc/MACHINE.SID ]; then
+ echo "Moving old /etc/MACHINE.SID to /etc/samba/MACHINE.SID"
+ mv /etc/MACHINE.SID /etc/samba/MACHINE.SID
+fi
+
+echo "Looking for old /etc/smbpasswd..."
+if [ -f /etc/smbpasswd ]; then
+ echo "Moving old /etc/smbpasswd to /etc/samba/smbpasswd"
+ mv /etc/smbpasswd /etc/samba/smbpasswd
+fi
+
+# Add swat entry to /etc/services if not already there.
if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
fi
-# Add swat entry to /etc/inetd.conf if needed
-if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
- echo 'swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf
-killall -1 inetd || :
+# Add swat entry to /etc/inetd.conf if needed.
+if [ -f /etc/inetd.conf ]; then
+ if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
+ echo 'swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf
+ killall -1 inetd || :
+ fi
+fi
+
+# Add swat entry to xinetd.d if needed.
+if [ -d $RPM_BUILD_ROOT/etc/xinetd.d ]; then
+ mv /etc/samba/samba.xinetd /etc/xinetd.d/swat
+else
+ rm -f /etc/samba/samba.xinetd
+fi
+
+# Install the correct version of the samba pam file, depending on pam version.
+if [ -f /lib/security/pam_stack.so ]; then
+ echo "Installing stack version of /etc/pam.d/samba..."
+ mv /etc/samba/samba.stack /etc/pam.d/samba
+else
+ echo "Installing non-stack version of /etc/pam.d/samba..."
+ rm -f /etc/samba/samba.stack
fi
%preun
if [ $1 = 0 ] ; then
/sbin/chkconfig --del smb
- for n in /etc/codepages/*; do
- if [ $n != /etc/codepages/src ]; then
- rm -rf $n
- fi
- done
# We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
if [ -e /var/lock/samba/browse.dat ]; then
rm -f /var/lock/samba/browse.dat
@@ -311,6 +335,28 @@ if [ $1 = 0 ] ; then
if [ -e /var/lock/samba/wins.dat ]; then
rm -f /var/lock/samba/wins.dat
fi
+
+ # Remove the transient tdb files.
+ if [ -e /var/lock/samba/brlock.tdb ]; then
+ rm -f /var/lock/samba/brlock.tdb
+ fi
+
+ if [ -e /var/lock/samba/unexpected.tdb ]; then
+ rm -f /var/lock/samba/unexpected.tdb
+ fi
+
+ if [ -e /var/lock/samba/connections.tdb ]; then
+ rm -f /var/lock/samba/connections.tdb
+ fi
+
+ if [ -e /var/lock/samba/locking.tdb ]; then
+ rm -f /var/lock/samba/locking.tdb
+ fi
+
+ if [ -e /var/lock/samba/messages.tdb ]; then
+ rm -f /var/lock/samba/messages.tdb
+ fi
+
fi
%postun
@@ -322,24 +368,25 @@ if [ $1 = 0 ] ; then
if [ -e /var/log/samba ]; then
rm -rf /var/log/samba
fi
- if [ -e /var/lock/samba ]; then
- rm -rf /var/lock/samba
- fi
# Remove swat entries from /etc/inetd.conf and /etc/services
cd /etc
tmpfile=/etc/tmp.$$
- sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
- mv $tmpfile inetd.conf
+ if [ -f /etc/inetd.conf ]; then
+ # preserve inetd.conf permissions.
+ cp -p /etc/inetd.conf $tmpfile
+ sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
+ mv $tmpfile inetd.conf
+ fi
+ # preserve services permissions.
+ cp -p /etc/services $tmpfile
sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
- mv $tmpfile services
-fi
+ mv $tmpfile /etc/services
-if [ -f /sbin/mount.smb ]; then
- rm -f /sbin/mount.smb
-fi
-if [ -f /sbin/mount.smbfs ]; then
- rm -f /sbin/mount.smbfs
+ # Remove swat entry from /etc/xinetd.d
+ if [ -f /etc/xinetd.d/swat ]; then
+ rm -r /etc/xinetd.d/swat
+ fi
fi
%triggerpostun -- samba < samba-2.0.0
@@ -347,7 +394,6 @@ if [ $0 != 0 ]; then
/sbin/chkconfig --add smb
fi
-
%files
%doc README COPYING Manifest Read-Manifest-Now
%doc WHATSNEW.txt Roadmap
@@ -362,8 +408,6 @@ fi
%attr(-,root,root) %{prefix}/sbin/smbumount
%attr(-,root,root) /sbin/mount.smbfs
%attr(-,root,root) /sbin/mount.smb
-%attr(0750,root,root) %{prefix}/sbin/samba
-%attr(-,root,root) %{prefix}/bin/addtosmbpass
%attr(-,root,root) %{prefix}/bin/mksmbpasswd.sh
%attr(-,root,root) %{prefix}/bin/smbclient
%attr(-,root,root) %{prefix}/bin/smbspool
@@ -379,43 +423,27 @@ fi
%attr(-,root,root) %{prefix}/bin/smbpasswd
%attr(-,root,root) %{prefix}/bin/smbtar
%attr(-,root,root) %{prefix}/bin/smbprint
-%attr(-,root,root) %{prefix}/bin/smbadduser
+%attr(-,root,root) %{prefix}/bin/smbcontrol
+%attr(-,root,root) %{prefix}/bin/smbcacls
%attr(755,root,root) /lib/libnss_wins.s*
%attr(-,root,root) %{prefix}/share/swat/help/*
%attr(-,root,root) %{prefix}/share/swat/images/*
%attr(-,root,root) %{prefix}/share/swat/include/header.html
%attr(-,root,root) %{prefix}/share/swat/include/footer.html
%attr(-,root,root) %{prefix}/share/swat/using_samba/*
-%attr(-,root,root) %config(noreplace) /etc/lmhosts
-%attr(-,root,root) %config(noreplace) /etc/smb.conf
-%attr(-,root,root) %config(noreplace) /etc/smbusers
+%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
+%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
+%attr(-,root,root) %config(noreplace) /etc/samba/smbusers
+%attr(-,root,root) /etc/samba/samba.stack
+%attr(-,root,root) /etc/samba/samba.xinetd
%attr(-,root,root) /etc/rc.d/init.d/smb
%attr(-,root,root) /etc/logrotate.d/samba
-%attr(-,root,root) /etc/pam.d/samba
-%attr(-,root,root) /etc/codepages/src/codepage_def.*
-%attr(-,root,root) %{prefix}/man/man1/make_smbcodepage.1
-%attr(-,root,root) %{prefix}/man/man1/make_unicodemap.1
-%attr(-,root,root) %{prefix}/man/man1/nmblookup.1
-%attr(-,root,root) %{prefix}/man/man1/smbclient.1
-%attr(-,root,root) %{prefix}/man/man1/smbrun.1
-%attr(-,root,root) %{prefix}/man/man1/smbstatus.1
-%attr(-,root,root) %{prefix}/man/man1/smbtar.1
-%attr(-,root,root) %{prefix}/man/man1/testparm.1
-%attr(-,root,root) %{prefix}/man/man1/testprns.1
-%attr(-,root,root) %{prefix}/man/man5/lmhosts.5
-%attr(-,root,root) %{prefix}/man/man5/smb.conf.5
-%attr(-,root,root) %{prefix}/man/man5/smbpasswd.5
-%attr(-,root,root) %{prefix}/man/man7/samba.7
-%attr(-,root,root) %{prefix}/man/man8/nmbd.8
-%attr(-,root,root) %{prefix}/man/man8/smbd.8
-%attr(-,root,root) %{prefix}/man/man8/smbmnt.8
-%attr(-,root,root) %{prefix}/man/man8/smbmount.8
-%attr(-,root,root) %{prefix}/man/man8/smbpasswd.8
-%attr(-,root,root) %{prefix}/man/man8/smbspool.8
-%attr(-,root,root) %{prefix}/man/man8/swat.8
-%attr(-,root,nobody) %dir /home/samba
-%attr(-,root,root) %dir /etc/codepages
-%attr(-,root,root) %dir /etc/codepages/src
-%attr(-,root,root) %dir /var/lock/samba
+%attr(-,root,root) %config(noreplace) /etc/pam.d/samba
+%attr(-,root,root) MANDIR_MACRO/man1/*
+%attr(-,root,root) MANDIR_MACRO/man5/*
+%attr(-,root,root) MANDIR_MACRO/man7/*
+%attr(-,root,root) MANDIR_MACRO/man8/*
+%attr(-,root,root) %dir /etc/codepages/*
+%attr(755,root,root) %dir /var/lock/samba
%attr(-,root,root) %dir /var/log/samba
%attr(1777,root,root) %dir /var/spool/samba
diff --git a/packaging/RedHat/smb.conf b/packaging/RedHat/smb.conf
index 2f286778970..71ff9463884 100644
--- a/packaging/RedHat/smb.conf
+++ b/packaging/RedHat/smb.conf
@@ -63,7 +63,7 @@
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
; encrypt passwords = yes
-; smb passwd file = /etc/smbpasswd
+; smb passwd file = /etc/samba/smbpasswd
# The following are needed to allow password changing from Windows to
# update the Linux sytsem password also.
@@ -76,12 +76,12 @@
; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
# Unix users can map to different SMB User names
-; username map = /etc/smbusers
+; username map = /etc/samba/smbusers
# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
-; include = /etc/smb.conf.%m
+; include = /etc/samba/smb.conf.%m
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
diff --git a/packaging/RedHat/smb.init b/packaging/RedHat/smb.init
index 6529977d236..260439281a3 100755
--- a/packaging/RedHat/smb.init
+++ b/packaging/RedHat/smb.init
@@ -14,7 +14,7 @@
[ ${NETWORKING} = "no" ] && exit 0
# Check that smb.conf exists.
-[ -f /etc/smb.conf ] || exit 0
+[ -f /etc/samba/smb.conf ] || exit 0
# See how we were called.
case "$1" in