summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/redhat/samba-1.9.17a1.spec42
-rw-r--r--examples/redhat/samba-1.9.17a1.spec.new139
-rw-r--r--examples/redhat/samba-make.patch34
-rwxr-xr-xexamples/redhat/smbprint77
4 files changed, 244 insertions, 48 deletions
diff --git a/examples/redhat/samba-1.9.17a1.spec b/examples/redhat/samba-1.9.17a1.spec
index 41ebd8cebf..f493027e00 100644
--- a/examples/redhat/samba-1.9.17a1.spec
+++ b/examples/redhat/samba-1.9.17a1.spec
@@ -37,39 +37,32 @@ cd source
cd ..
for i in nmblookup smbclient smbpasswd smbrun smbstatus testparm testprns
do
- install -m755 -s source/$i /usr/bin
- %attr(-,0,0) /usr/bin/$i
+install -m755 -s -g0 -o0 source/$i /usr/bin
done
+
for i in addtosmbpass mksmbpasswd.sh smbtar
do
- install -m755 source/$i /usr/bin
- %attr(-,0,0) /usr/bin/$i
+install -m755 -g0 -o0 source/$i /usr/bin
done
+
for i in smbd nmbd
do
- install -m755 -s source/$i /usr/sbin
- %attr(-,0,0) /usr/bin/$i
+install -m755 -s -g0 -o0 source/$i /usr/sbin
done
+
for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1
do
- install -m644 docs/$i /usr/man/man1
- %attr(-,0,0) /usr/bin/$i
+install -m644 -g0 -o0 docs/$i /usr/man/man1
done
-install -m644 docs/smb.conf.5 /usr/man/man5
-%attr(-,0,0) /usr/man/man5/smb.conf.5
-install -m644 docs/samba.7 /usr/man/man7
-%attr(-,0,0) /usr/man/man7/samba.7
-install -m644 docs/smbd.8 /usr/man/man8
-%attr(-,0,0) /usr/man/man8/smbd.8
-install -m644 docs/nmbd.8 /usr/man/man8
-%attr(-,0,0) /usr/man/man8/nmbd.8
-install -m644 examples/simple/smb.conf /etc/smb.conf.sampl
-install -m644 examples/redhat/smb.conf /etc/smb.conf
-%attr(-,0,0) /etc/smb.conf
-install -m644 examples/printing/smbprint /usr/bin
-%attr(-,0,0) /usr/bin/smbprint
-install -m755 examples/redhat/smb.init /etc/rc.d/init.d/smb
-%attr(-,0,0) /etc/rc.d/init.d/smb
+
+install -m644 -g0 -o0 docs/smb.conf.5 /usr/man/man5
+install -m644 -g0 -o0 docs/samba.7 /usr/man/man7
+install -m644 -g0 -o0 docs/smbd.8 /usr/man/man8
+install -m644 -g0 -o0 docs/nmbd.8 /usr/man/man8
+install -m644 -g0 -o0 examples/simple/smb.conf /etc/smb.conf.sampl
+install -m644 -g0 -o0 examples/redhat/smb.conf /etc/smb.conf
+install -m644 -g0 -o0 examples/printing/smbprint /usr/bin
+install -m755 -g0 -o0 examples/redhat/smb.init /etc/rc.d/init.d/smb
ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc3.d/S91smb
ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc0.d/K35smb
ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc6.d/K35smb
@@ -78,8 +71,7 @@ mkdir -p /home/samba
mkdir -p /var/lock/samba
chown root.nobody /home/samba
chmod 775 /home/samba
-install -m 644 examples/redhat/samba.log /etc/logrotate.d/samba
-%attr(-,0,0) /etc/logrotate.d/samba
+install -m 644 -g0 -o0 examples/redhat/samba.log /etc/logrotate.d/samba
%post
/sbin/pamconfig --add --service=samba --password=none --sesslist=none
diff --git a/examples/redhat/samba-1.9.17a1.spec.new b/examples/redhat/samba-1.9.17a1.spec.new
new file mode 100644
index 0000000000..5f2d065195
--- /dev/null
+++ b/examples/redhat/samba-1.9.17a1.spec.new
@@ -0,0 +1,139 @@
+Summary: SMB client and server
+Name: samba
+Version: 1.9.17a1
+Release: 1
+Copyright: GPL
+Group: Networking
+Source: ftp://samba.anu.edu.au/pub/samba/samba-1.9.17a1.tar.gz
+Patch: samba-make.patch
+Patch2: samba-axp.patch
+Packager: John H Terpstra [Samba-Team] <jht@aquasoft.com.au>
+Requires: pamconfig
+
+%description
+Samba provides an SMB server which can be used to provide network
+services to SMB (sometimes called "Lan Manager") clients, including
+various versions of MS Windows, OS/2, and other Linux machines.
+Samba also provides some SMB clients, which complement the built-in
+SMB filesystem in Linux.
+
+Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT need
+NetBEUI (Microsoft Raw NetBIOS frame) protocol.
+
+%prep
+%setup
+%patch -p1
+
+%ifarch axp
+%patch2 -p1
+%endif
+
+%build
+cd source
+make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
+
+%install
+cd source
+cd ..
+for i in nmblookup smbclient smbpasswd smbrun smbstatus testparm testprns
+do
+install -m755 -s source/$i /usr/bin
+%attr(-,0,0) /usr/bin/$i
+done
+
+for i in addtosmbpass mksmbpasswd.sh smbtar
+do
+install -m755 source/$i /usr/bin
+%attr(-,0,0) /usr/bin/$i
+done
+
+for i in smbd nmbd
+do
+install -m755 -s source/$i /usr/sbin
+%attr(-,0,0) /usr/bin/$i
+done
+
+for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1
+do
+install -m644 docs/$i /usr/man/man1
+%attr(-,0,0) /usr/bin/$i
+done
+
+install -m644 docs/smb.conf.5 /usr/man/man5
+%attr(-,0,0) /usr/man/man5/smb.conf.5
+install -m644 docs/samba.7 /usr/man/man7
+%attr(-,0,0) /usr/man/man7/samba.7
+install -m644 docs/smbd.8 /usr/man/man8
+%attr(-,0,0) /usr/man/man8/smbd.8
+install -m644 docs/nmbd.8 /usr/man/man8
+%attr(-,0,0) /usr/man/man8/nmbd.8
+install -m644 examples/simple/smb.conf /etc/smb.conf.sampl
+install -m644 examples/redhat/smb.conf /etc/smb.conf
+%attr(-,0,0) /etc/smb.conf
+install -m644 examples/printing/smbprint /usr/bin
+%attr(-,0,0) /usr/bin/smbprint
+install -m755 examples/redhat/smb.init /etc/rc.d/init.d/smb
+%attr(-,0,0) /etc/rc.d/init.d/smb
+ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc3.d/S91smb
+ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc0.d/K35smb
+ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc6.d/K35smb
+ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc1.d/K35smb
+mkdir -p /home/samba
+mkdir -p /var/lock/samba
+chown root.nobody /home/samba
+chmod 775 /home/samba
+install -m 644 examples/redhat/samba.log /etc/logrotate.d/samba
+%attr(-,0,0) /etc/logrotate.d/samba
+
+%post
+/sbin/pamconfig --add --service=samba --password=none --sesslist=none
+
+if [ ! -f /var/log/samba ]; then
+ touch /var/log/samba
+ chmod 600 /var/log/samba
+fi
+
+%postun
+if [ "$1" = 0 ] ; then
+ /sbin/pamconfig --remove --service=samba --password=none --sesslist=none
+fi
+
+%files
+%doc docs/*.txt docs/INSTALL.sambatar docs/MIRRORS docs/PROJECTS
+%doc docs/README.DCEDFS docs/README.jis docs/README.sambatar
+%doc docs/SMBTAR.notes docs/THANKS docs/announce docs/history
+%doc docs/samba.faq docs/samba.lsm docs/wfw_slip.htm
+%doc examples
+/usr/sbin/smbd
+/usr/bin/addtosmbpass
+/usr/bin/mksmbpasswd.sh
+/usr/bin/smbclient
+/usr/sbin/nmbd
+/usr/bin/testparm
+/usr/bin/testprns
+/usr/bin/smbrun
+/usr/bin/smbstatus
+/usr/bin/nmblookup
+/usr/bin/smbpasswd
+/usr/bin/smbtar
+/usr/bin/smbprint
+%config /etc/smb.conf
+%config /etc/smb.conf.sampl
+%config /etc/rc.d/init.d/smb
+%config /etc/rc.d/rc3.d/S91smb
+%config /etc/rc.d/rc0.d/K35smb
+%config /etc/rc.d/rc1.d/K35smb
+%config /etc/rc.d/rc6.d/K35smb
+%config /etc/logrotate.d/samba
+/usr/man/man1/smbstatus.1
+/usr/man/man1/smbclient.1
+/usr/man/man1/smbrun.1
+/usr/man/man1/smbtar.1
+/usr/man/man1/testparm.1
+/usr/man/man1/testprns.1
+/usr/man/man5/smb.conf.5
+/usr/man/man7/samba.7
+/usr/man/man8/smbd.8
+/usr/man/man8/nmbd.8
+%dir /home/samba
+%dir /var/lock/samba
diff --git a/examples/redhat/samba-make.patch b/examples/redhat/samba-make.patch
index 58d76b1e67..81797baf0e 100644
--- a/examples/redhat/samba-make.patch
+++ b/examples/redhat/samba-make.patch
@@ -1,5 +1,5 @@
-*** samba-1.9.16p11/source/Makefile.orig
---- samba-1.9.16p11/source/Makefile
+*** samba-1.9.17a1/source/Makefile.orig Sun May 11 22:44:55 1997
+--- samba-1.9.17a1/source/Makefile Sun May 11 22:51:53 1997
***************
*** 5,20 ****
@@ -11,7 +11,7 @@
# architectures or share the samba binaries across NFS then
# you will probably want to change this layout.
! BASEDIR = /usr/local/samba
- BINDIR = $(BASEDIR)/bin
+! BINDIR = /usr/local/bin
! SBINDIR = $(BASEDIR)/bin
! LIBDIR = $(BASEDIR)/lib
! VARDIR = $(BASEDIR)/var
@@ -28,10 +28,10 @@
# architectures or share the samba binaries across NFS then
# you will probably want to change this layout.
! BASEDIR = /usr
- BINDIR = $(BASEDIR)/bin
+! BINDIR = $(BASEDIR)/bin
! SBINDIR = $(BASEDIR)/sbin
! LIBDIR = /etc
-! VARDIR = /var
+! VARDIR = /var/log
# The permissions to give the executables
INSTALLPERMS = 0755
@@ -55,7 +55,7 @@
# RPM_OPT_FLAGS is needed when building an RPM distribution package
# for RedHat Linux.
! FLAGS1 = $(RPM_OPT_FLAGS)
-! #FLAGS1 = -O
+! # FLAGS1 = -O
LIBS1 =
# You will need to use a ANSI C compiler. This means under SunOS 4 you can't
@@ -65,13 +65,7 @@
# This may help with some versions of make
SHELL = /bin/sh
***************
-*** 42,54 ****
- # set these to where to find various files
- # These can be overridden by command line switches (see smbd(8))
- # or in smb.conf (see smb.conf(5))
-! SMBLOGFILE = $(VARDIR)/log.smb
-! NMBLOGFILE = $(VARDIR)/log.nmb
- CONFIGFILE = $(LIBDIR)/smb.conf
+*** 48,54 ****
LMHOSTSFILE = $(LIBDIR)/lmhosts
# the directory where lock files go
@@ -79,17 +73,11 @@
# set this to the default group you want your machine to appear in
# for browsing. This can also be set in nmbd (see nmbd(8))
---- 42,54 ----
- # set these to where to find various files
- # These can be overridden by command line switches (see smbd(8))
- # or in smb.conf (see smb.conf(5))
-! SMBLOGFILE = $(VARDIR)/log/log.smb
-! NMBLOGFILE = $(VARDIR)/log/log.nmb
- CONFIGFILE = $(LIBDIR)/smb.conf
+--- 48,54 ----
LMHOSTSFILE = $(LIBDIR)/lmhosts
# the directory where lock files go
-! LOCKDIR = $(VARDIR)/lock/samba
+! LOCKDIR = /var/lock/samba
# set this to the default group you want your machine to appear in
# for browsing. This can also be set in nmbd (see nmbd(8))
@@ -113,7 +101,7 @@
# This is for AFS authentication. If you use AFS then set AFS_BASE
# according to your system layout, and uncomment the other lines as well.
***************
-*** 180,187 ****
+*** 181,188 ****
# contributed by Andrew.Tridgell@anu.edu.au
# AXPROC defines DEC Alpha Processor
# FLAGSM = -DLINUX -DAXPROC
@@ -122,7 +110,7 @@
# Use this for Linux with shadow passwords and quota
# contributed by xeno@mix.hive.no
---- 180,187 ----
+--- 181,188 ----
# contributed by Andrew.Tridgell@anu.edu.au
# AXPROC defines DEC Alpha Processor
# FLAGSM = -DLINUX -DAXPROC
diff --git a/examples/redhat/smbprint b/examples/redhat/smbprint
new file mode 100755
index 0000000000..3d7225144b
--- /dev/null
+++ b/examples/redhat/smbprint
@@ -0,0 +1,77 @@
+#!/bin/sh -x
+
+# This script is an input filter for printcap printing on a unix machine. It
+# uses the smbclient program to print the file to the specified smb-based
+# server and service.
+# For example you could have a printcap entry like this
+#
+# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
+#
+# which would create a unix printer called "smb" that will print via this
+# script. You will need to create the spool directory /usr/spool/smb with
+# appropriate permissions and ownerships for your system.
+
+# Set these to the server and service you wish to print to
+# In this example I have a WfWg PC called "lapland" that has a printer
+# exported called "printer" with no password.
+
+#
+# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
+# so that the server, service, and password can be read from
+# a /var/spool/lpd/PRINTNAME/.config file.
+#
+# In order for this to work the /etc/printcap entry must include an
+# accounting file (af=...):
+#
+# cdcolour:\
+# :cm=CD IBM Colorjet on 6th:\
+# :sd=/var/spool/lpd/cdcolour:\
+# :af=/var/spool/lpd/cdcolour/acct:\
+# :if=/usr/local/etc/smbprint:\
+# :mx=0:\
+# :lp=/dev/null:
+#
+# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
+# server=PC_SERVER
+# service=PR_SHARENAME
+# password="password"
+#
+# E.g.
+# server=PAULS_PC
+# service=CJET_371
+# password=""
+
+#
+# Debugging log file, change to /dev/null if you like.
+#
+logfile=/var/log/smb-print.log
+# logfile=/dev/null
+
+
+#
+# The last parameter to the filter is the accounting file name.
+# Extract the directory name from the file name.
+# Concat this with /.config to get the config file.
+#
+eval acct_file=\${$#}
+spool_dir=`dirname $acct_file`
+config_file=$spool_dir/.config
+
+# Should read the following variables set in the config file:
+# server
+# service
+# password
+eval `cat $config_file`
+
+#
+# Some debugging help, change the >> to > if you want to same space.
+#
+echo "server $server, service $service" >> $logfile
+
+(
+# NOTE You may wish to add the line `echo translate' if you want automatic
+# CR/LF translation when printing.
+# echo translate
+ echo "print -"
+ cat
+) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile