summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-11-27 16:11:13 +0000
committerGerald Carter <jerry@samba.org>2002-11-27 16:11:13 +0000
commit5e26f1d6a567c5f93271a5cf4fdb0ac6c285065d (patch)
treef23a4b84970e4ffef46cde5013af779eb4472083
parentbea9e3416f594bc876870630a1e2e4a32159664e (diff)
downloadsamba-5e26f1d6a567c5f93271a5cf4fdb0ac6c285065d.tar.gz
samba-5e26f1d6a567c5f93271a5cf4fdb0ac6c285065d.tar.bz2
samba-5e26f1d6a567c5f93271a5cf4fdb0ac6c285065d.zip
syncing packaging files with SAMBA_3_0
(This used to be commit cdeb6281f75fe8422015a1af52bf515ff8288ba8)
-rwxr-xr-xpackaging/RedHat/findsmb145
-rw-r--r--packaging/RedHat/samba2.spec.tmpl83
2 files changed, 40 insertions, 188 deletions
diff --git a/packaging/RedHat/findsmb b/packaging/RedHat/findsmb
deleted file mode 100755
index 04bc608050..0000000000
--- a/packaging/RedHat/findsmb
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/usr/bin/perl
-#
-# Prints info on all smb responding machines on a subnet.
-# This script needs to be run on a machine without nmbd running and be
-# run as root to get correct info from WIN95 clients.
-#
-# syntax:
-# findsmb [subnet broadcast address]
-#
-# with no agrument it will list machines on the current subnet
-#
-# There will be a "+" in front of the workgroup name for machines that are
-# local master browsers for that workgroup. There will be an "*" in front
-# of the workgroup name for machines that are the domain master browser for
-# that workgroup.
-#
-
-$SAMBABIN = "/usr/bin";
-
-for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
- $_ = shift;
- if (m/-d|-D/) {
- $DEBUG = 1;
- } else {
- if ($_) {
- $BCAST = "-B $_";
- }
- }
-}
-
-sub ipsort # do numeric sort on last field of IP address
-{
- @t1 = split(/\./,$a);
- @t2 = split(/\./,$b);
- @t1[3] <=> @t2[3];
-}
-
-# look for all machines that respond to a name lookup
-
-open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") ||
- die("Can't run nmblookup '*'.\n");
-
-# get rid of all lines that are not a response IP address,
-# strip everything but IP address and sort by last field in address
-
-@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>);
-
-# print header info
-
-print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n";
-print "---------------------------------------------------------------------\n";
-
-foreach $ip (@ipaddrs) # loop through each IP address found
-{
- $ip =~ s/\n//; # strip newline from IP address
-
-# find the netbios names registered by each machine
-
- open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
- die("Can't get nmb name list.\n");
- @nmblookup = <NMBLOOKUP>;
- close NMBLOOKUP;
-
-# get the first <00> name
-
- @name = grep(/<00>/,@nmblookup);
- $_ = @name[0];
- if ($_) { # we have a netbios name
- if (/GROUP/) { # is it a group name
- ($name, $aliases, $type, $length, @addresses) =
- gethostbyaddr(pack('C4',split('\.',$ip)),2);
- if (! $name) { # could not get name
- $name = "unknown nis name";
- }
- } else {
-# The Netbios name can contain lot of characters also '<' '>'
-# and spaces. The follwing cure inside name space but not
-# names starting or ending with spaces
- /(.{1,15})\s+<00>\s+/;
- $name = $1;
- }
-
-# do an smbclient command on the netbios name.
-
- open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
- die("Can't do smbclient command.\n");
- @smb = <SMB>;
- close SMB;
-
- if ($DEBUG) { # if -d flag print results of nmblookup and smbclient
- print "===============================================================\n";
- print @nmblookup;
- print @smb;
- }
-
-# look for the OS= string
-
- @info = grep(/OS=/,@smb);
- $_ = @info[0];
- if ($_) { # we found response
- s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
-
- } else { # no OS= string in response (WIN95 client)
-
-# for WIN95 clients get workgroup name from nmblookup response
- @name = grep(/<00> - <GROUP>/,@nmblookup);
- $_ = @name[0];
- if ($_) {
-# Same as before for space and characters
- /(.{1,15})\s+<00>\s+/;
- $_ = "[$1]";
- } else {
- $_ = "Unknown Workgroup";
- }
- }
-
-# see if machine registered a local master browser name
- if (grep(/<1d>/,@nmblookup)) {
- $master = '+'; # indicate local master browser
- if (grep(/<1b>/,@nmblookup)) { # how about domain master browser?
- $master = '*'; # indicate domain master browser
- }
- } else {
- $master = ' '; # not a browse master
- }
-
-# line up info in 3 columns
-
- print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n";
-
- } else { # no netbios name found
-# try getting the host name
- ($name, $aliases, $type, $length, @addresses) =
- gethostbyaddr(pack('C4',split('\.',$ip)),2);
- if (! $name) { # could not get name
- $name = "unknown nis name";
- }
- if ($DEBUG) { # if -d flag print results of nmblookup
- print "===============================================================\n";
- print @nmblookup;
- }
- print "$ip".' 'x(16-length($ip))."$name\n";
- }
-}
-
diff --git a/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl
index 5e4cca8477..011626af07 100644
--- a/packaging/RedHat/samba2.spec.tmpl
+++ b/packaging/RedHat/samba2.spec.tmpl
@@ -14,7 +14,6 @@ BuildRoot: /var/tmp/samba
Prefix: /usr
%description
-Users are advised to use Samba-2.2 as a Windows NT4
Samba provides an SMB/CIFS server which can be used to provide
network file and print services to SMB/CIFS clients, including
various versions of MS Windows, OS/2, and other Linux machines.
@@ -23,6 +22,9 @@ built-in SMB filesystem in Linux. Samba uses NetBIOS over TCP/IP
(NetBT) protocols and does NOT need NetBEUI (Microsoft Raw NetBIOS
frame) protocol.
+Samba 3.0 also introduces UNICODE support and kerberos/ldap
+integration as a member server in a Windows 2000 domain.
+
Please refer to the WHATSNEW.txt document for fixup information.
%changelog
@@ -51,7 +53,6 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
--with-privatedir=/etc/samba \
--with-fhs \
--with-quotas \
- --with-msdfs \
--with-smbmount \
--with-pam \
--with-pam_smbpass \
@@ -61,15 +62,12 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
--with-swatdir=%{prefix}/share/swat \
--with-libsmbclient
make -j${NUMCPU} proto
-make -j${NUMCPU} all nsswitch/libnss_wins.so
+make -j${NUMCPU} all nsswitch/libnss_wins.so modules
make -j${NUMCPU} debug2html
make -j${NUMCPU} bin/smbspool
-## Build VFS modules
-#cd ../examples/VFS
-#make
-
-
+# Remove some permission bits to avoid to many dependencies
+find examples docs -type f | xargs -r chmod -x
%install
rm -rf $RPM_BUILD_ROOT
@@ -91,7 +89,8 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}/{lib,include}
# Install standard binary files
for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
- rpcclient smbspool smbcacls smbcontrol wbinfo smbmnt
+ rpcclient smbspool smbcacls smbcontrol wbinfo smbmnt net smbgroupedit \
+ smbcacls pdbedit tdbbackup smbtree
do
install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
done
@@ -102,7 +101,7 @@ do
done
# Install secure binary files
-for i in smbd nmbd swat smbmount smbumount debug2html winbindd
+for i in smbd nmbd swat smbmount smbumount debug2html winbindd wrepld
do
install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
done
@@ -115,14 +114,15 @@ ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
# sombody else can maintain for us.
cd source
make BASEDIR=$RPM_BUILD_ROOT/usr \
- LIBDIR=$RPM_BUILD_ROOT/etc/samba \
+ CONFIGDIR=$RPM_BUILD_ROOT/etc/samba \
+ LIBDIR=$RPM_BUILD_ROOT%{prefix}/lib/samba \
VARDIR=$RPM_BUILD_ROOT/var \
SBINDIR=$RPM_BUILD_ROOT%{prefix}/sbin \
BINDIR=$RPM_BUILD_ROOT%{prefix}/bin \
MANDIR=$RPM_BUILD_ROOTMANDIR_MACRO \
- SWATDIR=$RPM_BUILD_ROOT/usr/share/swat \
- SAMBABOOK=$RPM_BUILD_ROOT/usr/share/swat/using_samba \
- installman installswat
+ SWATDIR=$RPM_BUILD_ROOT%{prefix}/share/swat \
+ SAMBABOOK=$RPM_BUILD_ROOT%{prefix}/share/swat/using_samba \
+ installman installswat installdat installmodules
cd ..
# Install the nsswitch wins library
@@ -138,35 +138,26 @@ install -m755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security
# Install pam_smbpass.so
install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security
-# Install the VFS modules
-#install -m755 examples/VFS/recycle.so $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
-#install -m755 examples/VFS/audit.so $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
-#install -m755 examples/VFS/netatalk.so $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
-
-# clean out VFS directory since it will get installed as documentation later
-#(cd examples/VFS; make clean)
-
# libsmbclient
install -m 755 source/bin/libsmbclient.so $RPM_BUILD_ROOT%{prefix}/lib/
install -m 755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{prefix}/lib/
install -m 644 source/include/libsmbclient.h $RPM_BUILD_ROOT%{prefix}/include/
# Install SWAT helper files
-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
-done
-for i in swat/include/*.html
-do
- install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
-done
+#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
+#done
+#for i in swat/include/*.html
+#do
+# install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
+#done
# Install the miscellany
-install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin
install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
install -m755 packaging/RedHat/winbind.init $RPM_BUILD_ROOT/etc/rc.d/init.d/winbind
@@ -365,11 +356,6 @@ if [ $1 = 0 ] ; then
fi
fi
-%triggerpostun -- samba < samba-2.0.0
-if [ $0 != 0 ]; then
- /sbin/chkconfig --add smb
-fi
-
%files
%defattr(-,root,root)
%doc README COPYING Manifest Read-Manifest-Now
@@ -384,6 +370,9 @@ fi
%{prefix}/sbin/smbmount
%{prefix}/sbin/smbumount
%{prefix}/sbin/winbindd
+%{prefix}/sbin/wrepld
+%{prefix}/sbin/samba
+%{prefix}/sbin/debug2html
/sbin/mount.smbfs
/sbin/mount.smb
%{prefix}/bin/mksmbpasswd.sh
@@ -399,17 +388,25 @@ fi
%{prefix}/bin/smbtar
%{prefix}/bin/smbprint
%{prefix}/bin/smbcontrol
-%{prefix}/bin/smbcacls
%{prefix}/bin/wbinfo
+%{prefix}/bin/net
+%{prefix}/bin/smbgroupedit
+%{prefix}/bin/smbcacls
+%{prefix}/bin/pdbedit
+%{prefix}/bin/tdbbackup
+%{prefix}/bin/smbtree
%attr(755,root,root) /lib/libnss_wins.s*
%attr(755,root,root) %{prefix}/lib/samba/vfs/*.so
+%attr(755,root,root) %{prefix}/lib/samba/*.dat
%{prefix}/include/libsmbclient.h
%{prefix}/lib/libsmbclient.a
%{prefix}/lib/libsmbclient.so
%{prefix}/share/swat/help/*
%{prefix}/share/swat/images/*
-%{prefix}/share/swat/include/header.html
-%{prefix}/share/swat/include/footer.html
+%{prefix}/share/swat/include/*.html
+%{prefix}/share/swat/lang/*/help/*
+%{prefix}/share/swat/lang/*/images/*
+%{prefix}/share/swat/lang/*/include/*.html
%{prefix}/share/swat/using_samba/*
%config(noreplace) /etc/samba/lmhosts
%config(noreplace) /etc/samba/smb.conf