summaryrefslogtreecommitdiff
path: root/packaging/Mandrake
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/Mandrake')
-rw-r--r--packaging/Mandrake/samba-print-pdf.sh40
-rw-r--r--packaging/Mandrake/samba2.spec.tmpl666
-rw-r--r--packaging/Mandrake/smb.conf47
-rwxr-xr-xpackaging/Mandrake/smb.init2
4 files changed, 536 insertions, 219 deletions
diff --git a/packaging/Mandrake/samba-print-pdf.sh b/packaging/Mandrake/samba-print-pdf.sh
index 3d88f9fb88..07c92b484b 100644
--- a/packaging/Mandrake/samba-print-pdf.sh
+++ b/packaging/Mandrake/samba-print-pdf.sh
@@ -10,10 +10,14 @@
# Arguments:
# $1 = file (usually passed with %s from samba)
# $2 = unix prefix to where to place the file (~%u should work)
-# $3 = windows prefix to the same location (\\%L\%u should work)
+# $3 = windows prefix to the same location (//%L/%u should work)
# $4 = user/computer to send a notification to (%u or %m)
# $5 = IP address of client (%I)
-
+# $6 = Name of destination file without extension (%J)
+# $7 = PDF setting (prepress,print,screen etc)
+#
+# If you want to customise any of the following configuration defaults,
+# you can place them in the file /etc/samba/print-pdf.conf.
PS2PDF=ps2pdf13
OPTIONS="-dAutoFilterColorImages=false -sColorImageFilter=FlateEncode"
@@ -22,6 +26,13 @@ KEEP_PS=1
PERMS=640
INFILE=$(basename $INPUT)
BASEFILE=pdf-service
+PREFIX="$2"
+NAME="$6"
+WINBASE=$(echo "$3"|sed -e 's,/,\\\\,g')
+
+# Source config file if it exists:
+CONFFILE=/etc/samba/print-pdf.conf
+[ -e $CONFFILE ] && . $CONFFILE
#make a temp file to use for the output of the PDF
OUTPUT=`mktemp -q $2/$BASEFILE-XXXXXX`
@@ -29,30 +40,39 @@ if [ $? -ne 0 ]; then
echo "$0: Can't create temp file $2/$BASEFILE-XXXXXX, exiting..."
exit 1
fi
+if [ "$NAME" != "" ]; then
+ FINALOUTPUT="$PREFIX/$NAME"
+else
+ FINALOUTPUT="$OUTPUT"
+fi
+if [ "$7" != "" ]; then
+ OPTIONS="$OPTIONS -dPDFSETTINGS=/${7#pdf-}"
+else
+ OPTIONS="$OPTIONS -dPDFSETTINGS=/default"
+fi
-WIN_OUTPUT="$3\\`basename $OUTPUT`"
+WIN_OUTPUT="$WINBASE\\"`basename "$FINALOUTPUT"`
# create the PDF:
-$PS2PDF $OPTIONS $INPUT $OUTPUT.pdf >/dev/null 2>&1
+$PS2PDF $OPTIONS $INPUT "$OUTPUT".pdf >/dev/null 2>&1
+mv -f "$OUTPUT".pdf "$FINALOUTPUT".pdf
# Generate a message to send to the user, and deal with the original file:
MESSAGE=$(echo "Your PDF file has been created as $WIN_OUTPUT.pdf\n")
if [ $KEEP_PS ];then
- mv $INPUT $OUTPUT.ps
+ mv -f $INPUT "${FINALOUTPUT}".ps
MESSAGE=$(echo "$MESSAGE and your postscript file as $WIN_OUTPUT.ps")
# Fix permissions on the generated files
- chmod $PERMS $OUTPUT.ps
+ chmod $PERMS "${FINALOUTPUT}".ps
else
rm -f $INPUT
- chmod $PERMS $OUTPUT.ps $OUTPUT.pdf
+ chmod $PERMS "${FINALOUTPUT}".ps "${FINALOUTPUT}".pdf
# Fix permissions on the generated files
fi
-chmod $PERMS $OUTPUT.ps $OUTPUT.pdf
-
#Remove empty file from mktemp:
-rm -f $OUTPUT
+[ "x$NAME" -eq "x" ] && rm -f $OUTPUT
# Send notification to user
echo -e $MESSAGE|smbclient -M $4 -I $5 -U "PDF Generator" >/dev/null 2>&1
diff --git a/packaging/Mandrake/samba2.spec.tmpl b/packaging/Mandrake/samba2.spec.tmpl
index e21a148486..47f61eea64 100644
--- a/packaging/Mandrake/samba2.spec.tmpl
+++ b/packaging/Mandrake/samba2.spec.tmpl
@@ -1,7 +1,22 @@
-%define pkg_name samba
-%define ver 2.2.5
-%define rel 17mdk
-%define vscanver 0.2.5c
+# Note that this file exists in Mandrake packaging cvs (as samba3.spec)
+# and samba cvs (as packaging/Mandrake/samba2.spec.tmpl).
+# Keep in mind that any changes should take both locations into account
+# Considerable effort has gone into making this possible, so that only
+# one spec file is maintained, please don't break it.
+# It should be possible, without any changes to this file, to build
+# binary packages on most recent Mandrake releases:
+# 1)from official source releases, using 'cd packaging/Mandrake; sh makerpms.sh'
+# 2)from cvs snapshots, using 'cd packaging/Mandrake; sh makerpms-cvs.sh <ver>'
+# 3)using official source releases and updated Mandrake packaging, by
+# 'rpm -ba samba.spec'
+# As such, any sources or patches used in a build from a samba release or
+# cvs should be submitted for inclusion in samba cvs.
+
+%define pkg_name samba
+%define ver 3.0alpha22
+%define rel 2mdk
+%define vscanver 0.3.1
+%define libsmbmajor 0
# Determine whether this is the system samba or not.
%define build_system 0
@@ -9,40 +24,35 @@
%define samba_major %{null}
%else
%define samba_major 3
-%global _iconsdir %{_datadir}/icons/
-%global _miconsdir %{_datadir}/icons/mini
-%global _liconsdir %{_datadir}/icons/large
-%global _menudir %{_libdir}/menu
-#%%%%global __prefix /opt/samba%{samba_major}
-
-%global _mandir %{_datadir}/man
%endif
-# 2.2.4 and 1 replace by samba-team at release
+# Version and release replaced by samba-team at release from samba cvs
%define pversion PVERSION
%define prelease PRELEASE
-# For testing this setup:
-#%define pversion1 2.2.5
-#%define prelease1 %(date +%Y%m%d)
#Check to see if p(version|release) has been replaced (1 if replaced)
%define have_pversion %(if [ "%pversion" = `echo "pversion" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)
%define have_prelease %(if [ "%prelease" = `echo "prelease" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)
+%if %have_pversion
+%define source_ver %{pversion}
+%else
+%define source_ver %{ver}
+%endif
+
# We might have a prerelease:
-%define have_pre %(echo %pversion|awk '{p=0} /[a-z,A-Z][a-z,A-Z]/ {p=1} {print p}')
+%define have_pre %(echo %source_ver|awk '{p=0} /[a-z,A-Z][a-z,A-Z]/ {p=1} {print p}')
%if %have_pre
-%define pre_ver %(perl -e '$name="%pversion"; print ($name =~ /(.*?)[a-z]/);')
-%define pre_pre %(echo %pversion|sed -e 's/%pre_ver//g')
+%define pre_ver %(perl -e '$name="%source_ver"; print ($name =~ /(.*?)[a-z]/);')
+%define pre_pre %(echo %source_ver|sed -e 's/%pre_ver//g')
%endif
-
# Check to see if we are running a build from a tarball release from samba.org
# (%have_pversion) If so, disable vscan, unless explicitly requested
# (--with vscan).
-%define build_vscan 1
+%define build_vscan 1
%if %have_pversion
-%define build_vscan 0
+%define build_vscan 0
%{?_with_vscan: %define build_vscan 1}
%endif
@@ -51,7 +61,6 @@
#%define build_cooker %(if [[ `cat /etc/mandrake-release|grep Cooker` ]];then echo 1; else echo 0; fi)
%define build_mdk91 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.1 ];then echo 1; else echo 0; fi)
%define build_mdk90 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.0 ];then echo 1; else echo 0; fi)
-%define build_mdk83 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.3 ];then echo 1; else echo 0; fi)
%define build_mdk82 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.2 ];then echo 1; else echo 0; fi)
%define build_mdk81 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.1 ];then echo 1; else echo 0; fi)
%define build_mdk80 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.0 ];then echo 1; else echo 0; fi)
@@ -62,19 +71,20 @@
%define build_acl 1
%define build_winbind 1
%define build_wins 1
-%define build_ldap 1
+%define build_ldap 0
%define build_ads 1
+%define build_scanners 0
+# CUPS supports functionality for 'printcap name = cups' (9.0 and later):
+%define build_cupspc 0
# Set defaults for each version
%if %build_mdk91
+%define build_cupspc 1
%endif
%if %build_mdk90
%endif
-%if %build_mdk83
-%endif
-
%if %build_mdk82
%endif
@@ -119,60 +129,69 @@
%{?_with_ads: %{expand: %%define build_non_default 1}}
%{?_without_ads: %{expand: %%define build_ads 0}}
%{?_without_ads: %{expand: %%define build_non_default 1}}
+%{?_with_scanners: %{expand: %%define build_scanners 1}}
+%{?_with_scanners: %{expand: %%define build_non_default 1}}
# As if that weren't enough, we're going to try building with antivirus
# support as an option also
-%define build_fprot 0
+%define build_fprot 0
%define build_kaspersky 0
-%define build_mks 0
-%define build_openantivirus 0
-%define build_sophos 0
-%define build_symantec 0
+%define build_mks 0
+%define build_openav 0
+%define build_sophos 0
+%define build_symantec 0
%define build_trend 0
+%if %build_vscan && %build_scanners
+#These can be enabled here by default
+# (kaspersky requires their library present)
+%define build_fprot 1
+%define build_mks 1
+%define build_openav 1
+%define build_sophos 1
+%define build_trend 1
+%endif
%if %build_vscan
%{?_with_fprot: %{expand: %%global build_fprot 1}}
%{?_with_kaspersky: %{expand: %%global build_kaspersky 1}}
%{?_with_mks: %{expand: %%global build_mks 1}}
-%{?_with_openav: %{expand: %%global build_openantivirus 1}}
+%{?_with_openav: %{expand: %%global build_openav 1}}
%{?_with_sophos: %{expand: %%global build_sophos 1}}
-%{?_with_symantec: %{expand: %%global build_symantec 1}}
+#%{?_with_symantec: %{expand: %%global build_symantec 1}}
%{?_with_trend: %{expand: %%global build_trend 1}}
-%define vscandir "samba-vscan-%{vscanver}"
+%global vscandir samba-vscan-%{vscanver}
%endif
-%define vfsdir "examples.bin/VFS"
+%global vfsdir examples.bin/VFS
#Workaround missing macros in 8.x:
%{!?perl_vendorlib: %{expand: %%global perl_vendorlib %{perl_sitearch}/../}}
Summary: Samba SMB server.
Name: %{pkg_name}%{samba_major}
-%if %have_pversion && %have_pre
+
+%if %have_pre
Version: %{pre_ver}
-%define source_ver %{pversion}
-%endif
-%if %have_pversion && !%have_pre
-Version: %{pversion}
-%define source_ver %{pversion}
-%endif
-%if !%have_pversion
-Version: %{ver}
-%define source_ver %{ver}
+%else
+Version: %{source_ver}
%endif
+
%if %have_prelease && !%have_pre
Release: 1.%{prelease}mdk
%endif
%if %have_prelease && %have_pre
Release: 0.%{pre_pre}.%{prelease}mdk
%endif
-%if !%have_prelease
+%if !%have_prelease && !%have_pre
Release: %{rel}
%endif
+%if !%have_prelease && %have_pre
+Release: 0.%{pre_pre}.%{rel}
+%endif
+
License: GPL
Group: System/Servers
Source: ftp://samba.org/pub/samba/samba-%{source_ver}.tar.bz2
URL: http://www.samba.org
Source1: samba.log
-Source2: mount.smb
Source3: samba.xinetd
Source4: swat_48.xpm.bz2
Source5: swat_32.xpm.bz2
@@ -183,23 +202,25 @@ Source8: samba-vscan-%{vscanver}.tar.bz2
%endif
Source10: samba-print-pdf.sh.bz2
Patch1: smbw.patch.bz2
-Patch2: samba-glibc21.patch.bz2
-#Patch3: network-recycle_bin.patch.bz2
-Patch5: samba-2.2.0-gawk.patch.bz2
-Patch12: samba-2.2.0-buildroot.patch.bz2
-#Patch16: samba-mkdir.patch.bz2
-Patch17: samba-3.0-smbmount-sbin.patch.bz2
-#Patches 20-22 to get packaging synced from 2.2.2 to 3.0
-Patch20: samba-3.0-smb.conf.patch.bz2
-Patch21: samba-3.0-winbind.init.patch.bz2
-Patch22: samba-3.0-system-auth-winbind.patch.bz2
-Patch23: samba-3alpha20-destdir.patch.bz2
-#Patch24: samba-3.0alpha13-installman.patch.bz2
-Patch25: samba-3.0alpha13-config_lang.patch.bz2
-#Patch 26 belongs with 20-22
-Patch26: samba-3.0-smb.init.patch.bz2
+Patch2: samba-2.2.0-gawk.patch.bz2
+Patch3: samba-2.2.0-buildroot.patch.bz2
+Patch4: samba-3.0-smbmount-sbin.patch.bz2
+%if !%have_pversion
+# Version specific patches: current version
+Patch101: samba-Makefile-3.0alpha21.patch.bz2
+Patch102: samba-3.0alpha22-mandrake-packaging.patch.bz2
+Patch110: samba-2.2.7a-fix-build.patch.bz2
+%else
+# Version specific patches: upcoming version
+%endif
+# Limbo patches (applied to prereleases, but not preleases, ie destined for
+# samba CVS)
+%if %have_pversion && %have_pre
+%endif
Requires: pam >= 0.64, samba-common = %{version}
BuildRequires: pam-devel autoconf readline-devel
+BuildRequires: libxml2-devel
+BuildRequires: mysql-devel
%if %build_acl
BuildRequires: libacl-devel
%endif
@@ -208,9 +229,7 @@ BuildRequires: cups-devel
%else
BuildRequires: libcups-devel
%endif
-%if %build_ldap
BuildRequires: libldap-devel
-%endif
%if %build_ads
BuildRequires: libldap-devel krb5-devel
%endif
@@ -257,14 +276,15 @@ more information.
URL: http://www.samba.org
Summary: Samba (SMB) server programs.
Requires: %{name}-common = %{version}
+PreReq: rpm-helper
Group: Networking/Other
+%if %build_system
Provides: samba
Obsoletes: samba
-%if %build_system
Obsoletes: samba-server-ldap
Obsoletes: samba3-server
%else
-Provides: samba-server
+#Provides: samba-server
%endif
%description server
@@ -308,11 +328,11 @@ URL: http://www.samba.org
Summary: Samba (SMB) client programs.
Group: Networking/Other
Requires: %{name}-common = %{version}
-Obsoletes: smbfs
%if %build_system
Obsoletes: samba3-client
+Obsoletes: smbfs
%else
-Provides: samba-client
+#Provides: samba-client
%endif
%description client
@@ -333,7 +353,7 @@ Group: System/Servers
Obsoletes: samba-common-ldap
Obsoletes: samba3-common
%else
-Provides: samba-common
+#Provides: samba-common
%endif
%description common
@@ -353,7 +373,7 @@ Requires: %{name}-common = %{version}
%if %build_system
Obsoletes: samba3-doc
%else
-Provides: samba-doc
+#Provides: samba-doc
%endif
%description doc
@@ -375,7 +395,7 @@ Group: System/Servers
Obsoletes: samba-swat-ldap
Obsoletes: samba3-swat
%else
-Provides: samba-swat
+#Provides: samba-swat
%endif
%description swat
@@ -426,12 +446,93 @@ NOTE: This is a prerelease of samba-%{samba_major}, not intended
for production use. If something breaks, file a bug report.
%endif
+%package debug
+URL: http://www.samba.org
+Summary: Debugging and benchmarking tools for samba
+Group: System/Servers
+Requires: %{name}-common = %{version}
+%if %build_system
+Obsoletes: samba3-debug
+%else
+Provides: samba-debug
+%endif
+
+%description debug
+This package provides tools for benchmarking samba, and debugging
+the correct operation of tools against smb servers.
+
+%if %build_system
+%package -n libsmbclient%{libsmbmajor}
+URL: http://www.samba.org
+Summary: SMB Client Library
+Group: System/Libraries
+Provides: libsmbclient
+
+%description -n libsmbclient%{libsmbmajor}
+This package contains the SMB client library, part of the samba
+suite of networking software, allowing other software to access
+SMB shares.
+
+%endif
+%if !%build_system
+NOTE: This is a prerelease of samba-%{samba_major}, not intended
+for production use. If something breaks, file a bug report.
+%endif
+
+%if %build_system
+%package -n libsmbclient%{libsmbmajor}-devel
+URL: http://www.samba.org
+Summary: SMB Client Library Development files
+Group: System/Libraries
+Provides: libsmbclient-devel
+
+%description -n libsmbclient%{libsmbmajor}-devel
+This package contains the development files for the SMB client
+library, part of the samba suite of networking software, allowing
+the development of other software to access SMB shares.
+
+%endif
+%if !%build_system
+NOTE: This is a prerelease of samba-%{samba_major}, not intended
+for production use. If something breaks, file a bug report.
+%endif
+
+%package passdb-mysql
+URL: http://www.samba.org
+Summary: Samba password database plugin for MySQL
+Group: System/Libraries
+
+%description passdb-mysql
+The passdb-mysql package for samba provides a password database
+backend allowing samba to store account details in a MySQL
+database
+
+%if !%build_system
+NOTE: This is a prerelease of samba-%{samba_major}, not intended
+for production use. If something breaks, file a bug report.
+%endif
+
+%package passdb-xml
+URL: http://www.samba.org
+Summary: Samba password database plugin for XML files
+Group: System/Libraries
+
+%description passdb-xml
+The passdb-xml package for samba provides a password database
+backend allowing samba to store account details in XML files.
+
+%if !%build_system
+NOTE: This is a prerelease of samba-%{samba_major}, not intended
+for production use. If something breaks, file a bug report.
+%endif
+
#Antivirus packages:
%if %build_fprot
%package vscan-fprot
Summary: On-access virus scanning for samba using FPROT
Group: System/Servers
Requires: %{name}-server = %{version}
+Provides: %{name}-vscan
Autoreq: 0
%description vscan-fprot
A vfs-module for samba to implement on-access scanning using the
@@ -443,6 +544,7 @@ FPROT antivirus software (which must be installed to use this).
Summary: On-access virus scanning for samba using Kaspersky
Group: System/Servers
Requires: %{name}-server = %{version}
+Provides: %{name}-vscan
Autoreq: 0
%description vscan-kaspersky
A vfs-module for samba to implement on-access scanning using the
@@ -454,19 +556,21 @@ Kaspersky antivirus software (which must be installed to use this).
Summary: On-access virus scanning for samba using MKS
Group: System/Servers
Requires: %{name}-server = %{version}
+Provides: %{name}-vscan
Autoreq: 0
%description vscan-mks
A vfs-module for samba to implement on-access scanning using the
MKS antivirus software (which must be installed to use this).
%endif
-%if %build_openantivirus
-%package vscan-openantivirus
+%if %build_openav
+%package vscan-openav
Summary: On-access virus scanning for samba using OpenAntivirus
Group: System/Servers
Requires: %{name}-server = %{version}
+Provides: %{name}-vscan
Autoreq: 0
-%description vscan-openantivirus
+%description vscan-openav
A vfs-module for samba to implement on-access scanning using the
OpenAntivirus antivirus software (which must be installed to use this).
%endif
@@ -476,6 +580,7 @@ OpenAntivirus antivirus software (which must be installed to use this).
Summary: On-access virus scanning for samba using Sophos
Group: System/Servers
Requires: %{name}-server = %{version}
+Provides: %{name}-vscan
Autoreq: 0
%description vscan-sophos
A vfs-module for samba to implement on-access scanning using the
@@ -487,6 +592,7 @@ Sophos antivirus software (which must be installed to use this).
Summary: On-access virus scanning for samba using Symantec
Group: System/Servers
Requires: %{name}-server = %{version}
+Provides: %{name}-vscan
Autoreq: 0
%description vscan-symantec
A vfs-module for samba to implement on-access scanning using the
@@ -498,6 +604,7 @@ Symantec antivirus software (which must be installed to use this).
Summary: On-access virus scanning for samba using Trend
Group: System/Servers
Requires: %{name}-server = %{version}
+Provides: %{name}-vscan
Autoreq: 0
%description vscan-trend
A vfs-module for samba to implement on-access scanning using the
@@ -551,29 +658,51 @@ echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7}
%endif
#%patch111 -p1
%patch1 -p1 -b .smbw
-#%patch3 -p1 -b .net-r_bin
-%patch5 -p1 -b .gawk
-#%patch6 -p1
-%patch12 -p1 -b .buildroot
-%patch17 -p1 -b .sbin
-%patch20 -p1 -b .samba222
-%patch21 -p1 -b .samba222
-%patch22 -p1 -b .samba222
-%patch23 -p1 -b .destdir
-#%patch24 -p1 -b .langen
-%patch25 -p1 -b .multilang
-%patch26 -p1 -b .samba222
+%patch2 -p1 -b .gawk
+%patch3 -p1 -b .buildroot
+%patch4 -p1 -b .sbin
+# Version specific patches: current version
+%if !%have_pversion
+echo "Applying patches for current version: %{ver}"
+(cd source
+%patch101
+)
+%patch102 -p1 -b .mdk
+%patch110 -p1
+%else
+# Version specific patches: upcoming version
+echo "Applying patches for new versions: %{pversion}"
+%endif
+
+# Limbo patches
+%if %have_pversion && %have_pre
+echo "Appling patches which should only be applied to prereleases"
+%endif
+
+# Fix quota compilation in glibc>2.3
+%if %build_mdk91
+#grep "<linux/quota.h>" source/smbd/quotas.c >/dev/null && \
+perl -pi -e 's@<linux/quota.h>@<sys/quota.h>@' source/smbd/quotas.c
+%endif
+
cp %{SOURCE7} .
# Make a copy of examples so that we have a clean one for doc:
cp -a examples examples.bin
%if %build_vscan
-# put antivirus files in examples.bin/VFS/
-for av in fprot kaspersky mks openantivirus sophos symantec trend; do
- cp -a %{vscandir}/$av %{vfsdir}
+cp -a %{vscandir} %{vfsdir}
+#fix stupid directory names:
+mv %{vfsdir}/%{vscandir}/openantivirus %{vfsdir}/%{vscandir}/oav
+%endif
+# Inline replacement of config dir
+for av in fprot kaspersky mks oav sophos trend; do
+ [ -e %{vfsdir}/%{vscandir}/$av/vscan-$av.h ] && perl -pi -e \
+ 's,^#define PARAMCONF "/etc/samba,#define PARAMCONF "/etc/%{name},' \
+ %{vfsdir}/%{vscandir}/$av/vscan-$av.h
done
-%endif
+#Inline edit vscan header:
+perl -pi -e 's/^# define SAMBA_VERSION_MAJOR 2/# define SAMBA_VERSION_MAJOR 3/g' %{vfsdir}/%{vscandir}/include/vscan-global.h
# Edit some files when not building system samba:
%if !%build_system
@@ -586,100 +715,115 @@ perl -pi -e 's/%{pkg_name}/%{name}/g' source/auth/pampass.c
autoconf
CPPFLAGS="-I/usr/include/openssl"; export CPPFLAGS
CFLAGS="$RPM_OPT_FLAGS"
+# Don't use --with-fhs now, since it overrides libdir, it sets configdir,
+# lockdir,piddir logfilebase,privatedir and swatdir
%configure --prefix=%{_prefix} \
- --with-fhs \
- --libdir=/etc/%{name} \
--sysconfdir=/etc/%{name} \
--localstatedir=/var \
- --with-configdir=/etc/%{name} \
- --with-codepagedir=/var/lib/%{name}/codepages \
+ --libdir=%{_libdir}/%{name} \
--with-privatedir=/etc/%{name} \
+ --with-lockdir=/var/cache/%{name} \
+ --with-piddir=/var/run/%{name} \
--with-swatdir=%{_datadir}/swat%{samba_major} \
- --with-smbmount \
- --with-syslog \
+ --with-configdir=/etc/%{name} \
+ --with-logfilebase=/var/log/%{name} \
+%if !%build_ads
+ --with-ads=no \
+%endif
--with-automount \
+ --with-smbmount \
--with-pam \
- --with-vfs \
+ --with-pam_smbpass \
+%if %build_ldap
+ --with-ldapsam \
+%endif
+ --with-tdbsam \
+ --with-syslog \
+ --with-quotas \
--with-utmp \
- --with-msdfs \
- --with-smbwrapper \
- --with-manpages-langs=en \
- --with-logfilebase=/var/log/%{name} \
- --with-lockdir=/var/cache/%{name} \
- --with-piddir=/var/run/%{name} \
-%if !%build_system
- --program-suffix=%{samba_major} \
-%endif
+ --with-manpages-langs=en \
%if %build_acl
--with-acl-support \
%endif
-%if !%build_ldap
- --with-ldap=no \
-%endif
-%if !%build_ads
- --with-ads=no \
-%endif
- --with-quotas
+ --disable-mysqltest \
+ --program-suffix=%{samba_major}
# --with-pam_smbpass \
# --with-manpages-langs=en,ja,pl \
-
-#make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" all
+# --with-ldap=no \
+#%if !%build_system
+# --with-smbwrapper \
+#%endif
+# --with-nisplussam \
+# --with-fhs \
+
+# For some reason passdb/pdb_xml.c doesn't like the flags below ...
+# and the samba team doesn't always make proto before release ...
+make proto_exists
+make passdb/pdb_xml.o torture
+# torture target broken in alpha22 (only on 9.0?)
make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \
- all smbfilter smbwrapper smbcacls pam_smbpass nsswitch nsswitch/libnss_wins.so debug2html
+ all libsmbclient debug2html smbfilter wins modules
+# all libsmbclient debug2html smbfilter wins torture modules
# Build VFS modules (experimental)
-cd ../%vfsdir
-%configure --prefix=%{prefix} \
- --mandir=%{prefix}/share/man
-make
+#cd ../%vfsdir
+#_configure --prefix=%{prefix} \
+# --mandir=%{prefix}/share/man
+#make
#make CFLAGS="$RPM_OPT_FLAGS -I../../source -I../../source/include -I../../source/ubiqx \
# -I../../source/smbwrapper -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
)
# Build mkntpasswd in examples/LDAP/ for smbldaptools
-(
-cd examples.bin/LDAP/smbldap-tools/mkntpwd
-make
-)
+#(
+#cd examples.bin/LDAP/smbldap-tools/mkntpwd
+#make
+#)
# Build antivirus vfs objects:
%if %build_fprot
+echo -e "\n\nBuild antivirus VFS modules\n\n"
echo "Building fprot"
+(cd %{vfsdir}/%{vscandir}/fprot;make)
%endif
%if %build_kaspersky
echo "Building Kaspersky"
-(cd %{vfsdir}/kaspersky;make)
+(cd %{vfsdir}/%{vscandir}/kaspersky;make)
%endif
%if %build_mks
echo "Building mks"
-(cd %{vfsdir}/mks;make)
+(cd %{vfsdir}/%{vscandir}/mks;make)
%endif
-%if %build_openantivirus
+%if %build_openav
echo "Building OpenAntivirus"
-(cd %{vfsdir}/openantivirus;make)
+(cd %{vfsdir}/%{vscandir}/oav;make)
%endif
%if %build_sophos
echo "building sophos"
-(cd %{vfsdir}/sophos;make)
+(cd %{vfsdir}/%{vscandir}/sophos;make)
%endif
%if %build_symantec
echo "Building symantec"
-(cd %{vfsdir}/symantec;make)
+(cd %{vfsdir}/%{vscandir}/symantec;make)
%endif
%if %build_trend
echo "Building Trend"
-(cd %{vfsdir}/trend;make)
+(cd %{vfsdir}/%{vscandir}/trend;make)
%endif
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
+#Ensure all docs are readable
+chmod a+r docs -R
+
# Any entries here mean samba makefile is *really* broken:
mkdir -p $RPM_BUILD_ROOT/etc/%{name}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs
(cd source
-make DESTDIR=$RPM_BUILD_ROOT install)
+make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir}/%{name} install installclientlib installmodules)
#need to stay
mkdir -p $RPM_BUILD_ROOT/sbin
@@ -689,18 +833,21 @@ mkdir -p $RPM_BUILD_ROOT/var/cache/%{name}
mkdir -p $RPM_BUILD_ROOT/var/log/%{name}
mkdir -p $RPM_BUILD_ROOT/var/run/%{name}
mkdir -p $RPM_BUILD_ROOT/var/spool/%{name}
-mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}/{netlogon,profiles,printers}
-mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
-mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}/codepages/src
-mkdir -p $RPM_BUILD_ROOT/lib/security
-mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
+mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/%{name}/{netlogon,profiles,printers}
+mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/%{name}/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
+mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/%{name}/codepages/src
+mkdir -p $RPM_BUILD_ROOT/%{_lib}/security
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts
#smbwrapper and pam_winbind not handled by make, pam_smbpass.so doesn't build
-install -m 755 source/bin/smbwrapper.so $RPM_BUILD_ROOT%{_libdir}/smbwrapper%{samba_major}.so
-#install -m 755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security/pam_smbpass.so
-install -m 755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security/pam_winbind%{samba_major}.so
+#install -m 755 source/bin/smbwrapper.so $RPM_BUILD_ROOT%{_libdir}/smbwrapper%{samba_major}.so
+install -m 755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass%{samba_major}.so
+install -m 755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/%{_lib}/security/pam_winbind%{samba_major}.so
+
+# smbsh forgotten
+#install -m 755 source/bin/smbsh $RPM_BUILD_ROOT%{_bindir}/
# Install VFS modules
#install -m755 %vfsdir/audit.so $RPM_BUILD_ROOT/%{_libdir}/samba/vfs
@@ -711,10 +858,12 @@ install -m 755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security/pam_w
# Antivirus support:
# mkdir -p $RPM_BUILD_ROOT%{_libdir}/samba/vfs/vscan
- for av in fprotd kavp mksd oav sophos symantec trend; do
- if [ -d %{vfsdir}/$av -a -e %{vfsdir}/$av/vscan-$av.so ];then
- cp %{vfsdir}/$av/vscan-$av.so \
- $RPM_BUILD_ROOT%{_libdir}/samba/vfs/
+ for av in fprot kavp mks oav sophos symantec trend; do
+ if [ -d %{vfsdir}/%{vscandir}/$av -a -e %{vfsdir}/%{vscandir}/$av/vscan-$av*.so ];then
+ cp %{vfsdir}/%{vscandir}/$av/vscan-$av*.so \
+ $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs/
+ cp %{vfsdir}/%{vscandir}/$av/vscan-$av*.conf \
+ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
fi
done
@@ -728,15 +877,21 @@ done
#libnss_* not handled by make:
# Install the nsswitch library extension file
for i in wins winbind; do
- install -m755 source/nsswitch/libnss_${i}.so $RPM_BUILD_ROOT/lib/libnss_${i}%{samba_major}.so
+ install -m755 source/nsswitch/libnss_${i}.so $RPM_BUILD_ROOT/%{_lib}/libnss_${i}%{samba_major}.so
done
# Make link for wins and winbind resolvers
-( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins%{samba_major}.so libnss_wins%{samba_major}.so.2; ln -s libnss_winbind%{samba_major}.so libnss_winbind%{samba_major}.so.2)
+( cd $RPM_BUILD_ROOT/%{_lib}; ln -s libnss_wins%{samba_major}.so libnss_wins%{samba_major}.so.2; ln -s libnss_winbind%{samba_major}.so libnss_winbind%{samba_major}.so.2)
+
+%if 1
+# Debugging stuff (broken in alpha22)
+for i in smbtorture msgtest masktest locktest locktest2 nsstest vfstest debug2html;do
+ install -m755 source/bin/$i $RPM_BUILD_ROOT/%{_bindir}
+done
+%endif
# Install other stuff
# install -m644 examples/VFS/recycle/recycle.conf $RPM_BUILD_ROOT/etc/samba/
- install -m644 packaging/Mandrake/smb.conf $RPM_BUILD_ROOT/etc/%{name}/smb.conf
install -m644 packaging/Mandrake/smbusers $RPM_BUILD_ROOT/etc/%{name}/smbusers
install -m755 packaging/Mandrake/smbprint $RPM_BUILD_ROOT/%{_bindir}
#install -m755 packaging/RedHat/smbadduser $RPM_BUILD_ROOT/usr/bin
@@ -744,11 +899,12 @@ done
install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb%{samba_major}
install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/%{_sbindir}/%{name}
install -m755 packaging/Mandrake/winbind.init $RPM_BUILD_ROOT/etc/rc.d/init.d/winbind%{samba_major}
+ install -m755 packaging/Mandrake/wrepld.init $RPM_BUILD_ROOT/etc/rc.d/init.d/wrepld%{samba_major}
install -m755 packaging/Mandrake/winbind.init $RPM_BUILD_ROOT/%{_sbindir}/winbind%{samba_major}
install -m644 packaging/Mandrake/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/%{name}
install -m644 packaging/Mandrake/system-auth-winbind.pamd $RPM_BUILD_ROOT/etc/pam.d/system-auth-winbind%{samba_major}
#
- install -m644 $RPM_SOURCE_DIR/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+ install -m644 %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
# install -m644 packaging/Mandrake/samba-slapd-include.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/samba-slapd.include
# Install smbldap-tools scripts:
@@ -779,10 +935,21 @@ install -m700 examples/LDAP/import_smbpasswd.pl $RPM_BUILD_ROOT/%{_datadir}/%{na
cat packaging/Mandrake/smb.conf|sed -e 's/^; winbind/ winbind/g;s/^; obey pam/ obey pam/g; s/^; printer admin = @"D/ printer admin = @"D/g;s/^; password server = \*/ password server = \*/g;s/^; template/ template/g; s/^ security = user/ security = domain/g' > packaging/Mandrake/smb-winbind.conf
install -m644 packaging/Mandrake/smb-winbind.conf $RPM_BUILD_ROOT/etc/%{name}/smb-winbind.conf
+# Some inline fixes for smb.conf for non-winbind use
+install -m644 packaging/Mandrake/smb.conf $RPM_BUILD_ROOT/etc/%{name}/smb.conf
+cat packaging/Mandrake/smb.conf | \
+sed -e 's/^; printer admin = @adm/ printer admin = @adm/g' >$RPM_BUILD_ROOT/etc/%{name}/smb.conf
+%if %build_cupspc
+perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' $RPM_BUILD_ROOT/etc/%{name}/smb.conf
+perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' $RPM_BUILD_ROOT/etc/%{name}/smb-winbind.conf
+%endif
+
# Link smbmount to /sbin/mount.smb and /sbin/mount.smbfs
#I don't think it's possible for make to do this ...
- ln -s $RPM_BUILD_ROOT/%{_bindir}/smbmount%{samba_major} $RPM_BUILD_ROOT/sbin/mount.smb%{samba_major}
- ln -s $RPM_BUILD_ROOT/%{_bindir}/smbmount%{samba_major} $RPM_BUILD_ROOT/sbin/mount.smbfs%{samba_major}
+(cd $RPM_BUILD_ROOT/sbin
+ ln -s ..%{_bindir}/smbmount%{samba_major} mount.smb%{samba_major}
+ ln -s ..%{_bindir}/smbmount%{samba_major} mount.smbfs%{samba_major}
+)
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/%{name}/lmhosts
# Link smbspool to CUPS (does not require installed CUPS)
@@ -798,11 +965,11 @@ install -m700 examples/LDAP/import_smbpasswd.pl $RPM_BUILD_ROOT/%{_datadir}/%{na
# menu support
mkdir -p $RPM_BUILD_ROOT%{_menudir}
-cat > $RPM_BUILD_ROOT%{_menudir}/%{name} << EOF
-?package(%{name}):command="gnome-moz-remote http://localhost:901/" needs="gnome" \
+cat > $RPM_BUILD_ROOT%{_menudir}/%{name}-swat << EOF
+?package(%{name}-swat):command="gnome-moz-remote http://localhost:901/" needs="gnome" \
icon="swat%{samba_major}.xpm" section="Configuration/Networking" title="Samba Configuration" \
longtitle="The Swat Samba Administration Tool"
-?package(%{name}):command="sh -c '\$BROWSER http://localhost:901/'" needs="x11" \
+?package(%{name}-swat):command="sh -c '\$BROWSER http://localhost:901/'" needs="x11" \
icon="swat%{samba_major}.xpm" section="Configuration/Networking" title="Samba Configuration" \
longtitle="The Swat Samba Administration Tool"
EOF
@@ -837,8 +1004,8 @@ done
for i in smb winbind;do
perl -pi -e 's,/subsys/'$i',/subsys/'$i'%{samba_major},g' $RPM_BUILD_ROOT/etc/rc.d/init.d/${i}%{samba_major}
done
-for i in /etc/%{name}/smb.conf /etc/rc.d/init.d/smb%{samba_major} %{_sbindir}/%{name} /etc/rc.d/init.d/winbind%{samba_major} %{_sbindir}/winbind%{samba_major} /etc/logrotate.d/%{name} /etc/xinetd.d/swat%{samba_major}; do
- perl -pi -e 's,/%{pkg_name},/%{name},g; s,smbd,%{_sbindir}/smbd%{samba_major},g; s,nmbd,%{_sbindir}/nmbd%{samba_major},g; s,winbindd,%{_sbindir}/winbindd%{samba_major},g; s,/usr/sbin/swat,%{_sbindir}/swat%{samba_major},g' $RPM_BUILD_ROOT/$i;
+for i in /etc/%{name}/smb.conf /etc/rc.d/init.d/smb%{samba_major} %{_sbindir}/%{name} /etc/rc.d/init.d/winbind%{samba_major} %{_sbindir}/winbind%{samba_major} /etc/logrotate.d/%{name} /etc/xinetd.d/swat%{samba_major} /etc/rc.d/init.d/wrepld%{samba_major}; do
+ perl -pi -e 's,/%{pkg_name},/%{name},g; s,smbd,%{_sbindir}/smbd%{samba_major},g; s,nmbd,%{_sbindir}/nmbd%{samba_major},g; s,winbindd,%{_sbindir}/winbindd%{samba_major},g; s,/usr/sbin/swat,%{_sbindir}/swat%{samba_major},g;s,wrepld,%{_sbindir}/wrepld%{samba_major},g' $RPM_BUILD_ROOT/$i;
done
# Fix pam files
perl -pi -e 's/winbind/winbind%{samba_major}/g' $RPM_BUILD_ROOT/etc/pam.d/system-auth-winbind%{samba_major}
@@ -846,12 +1013,18 @@ perl -pi -e 's/winbind/winbind%{samba_major}/g' $RPM_BUILD_ROOT/etc/pam.d/system
perl -pi -e 's,/usr/sbin,%{_sbindir},g' $RPM_BUILD_ROOT/etc/xinetd.d/swat%{samba_major}
%endif
+#Clean up unpackaged files:
+for i in %{_bindir}/pam_smbpass.so %{_bindir}/smbwrapper.so;do
+rm -f %{buildroot}/$i
+done
+
%clean
rm -rf $RPM_BUILD_ROOT
%post server
-/sbin/chkconfig --level 35 smb%{samba_major} on
+%_post_service smb%{samba_major}
+%_post_service wrepld%{samba_major}
# Add a unix group for samba machine accounts
groupadd -frg 421 machines
@@ -895,6 +1068,12 @@ fi
# Let's define the proper paths for config files
perl -pi -e 's/(\/etc\/)(smb)/\1%{name}\/\2/' /etc/%{name}/smb.conf
+# Let's replace lpstat with cups in older smb.conf:
+%if %build_cupspc
+echo "Updating samba printing configuration if necessary..."
+perl -pi -e 's/= lpstat/= cups/' /etc/%{name}/smb.conf
+%endif
+
# Fix the logrotate.d file from smb and nmb to smbd and nmbd
if [ -f /etc/logrotate.d/samba ]; then
perl -pi -e 's/smb /smbd /' /etc/logrotate.d/samba
@@ -956,12 +1135,12 @@ if [ $1 = 0 ]; then
fi
%endif %build_wins
-%preun
+%preun server
-/sbin/chkconfig --level 35 smb%{samba_major} reset
+%_preun_service smb%{samba_major}
+%_preun_service wrepld%{samba_major}
if [ $1 = 0 ] ; then
-%_preun_service smb%{samba_major}
# /sbin/chkconfig --level 35 smb reset
# Let's not loose /var/cache/samba
@@ -1017,18 +1196,26 @@ fi
%{_sbindir}/%{name}
%{_sbindir}/smbd%{samba_major}
%{_sbindir}/nmbd%{samba_major}
-#%{_sbindir}/smbcontrol
+%{_sbindir}/wrepld%{samba_major}
+%{_bindir}/smbcontrol%{samba_major}
#%{_sbindir}/mkntpwd
-#%{prefix}/bin/addtosmbpass
+%{_bindir}/addtosmbpass%{samba_major}
%{_bindir}/mksmbpasswd.sh
%{_bindir}/smbstatus%{samba_major}
%{_bindir}/convert_smbpasswd%{samba_major}
%{_bindir}/pdbedit%{samba_major}
%{_bindir}/smbgroupedit%{samba_major}
-#%attr(755,root,root) /lib/security/pam_smbpass*
+%{_bindir}/tdbbackup%{samba_major}
+%{_bindir}/profiles%{samba_major}
+%attr(755,root,root) /%{_lib}/security/pam_smbpass*
+%{_libdir}/%{name}/vfs/vfs_audit.so
+%{_libdir}/%{name}/vfs/vfs_netatalk.so
+%{_libdir}/%{name}/vfs/vfs_recycle.so
+%{_libdir}/%{name}/vfs/vfs_extd_audit.so
#/usr/share/swat
%attr(-,root,root) %config(noreplace) /etc/%{name}/smbusers
-%attr(-,root,root) %config /etc/rc.d/init.d/smb%{samba_major}
+%attr(-,root,root) %config %{_initrddir}/smb%{samba_major}
+%attr(-,root,root) %config %{_initrddir}/wrepld%{samba_major}
%attr(-,root,root) %config(noreplace) /etc/logrotate.d/%{name}
%attr(-,root,root) %config(noreplace) /etc/pam.d/%{name}
#%attr(-,root,root) %config(noreplace) /etc/%{name}/samba-slapd.include
@@ -1037,17 +1224,15 @@ fi
%{_mandir}/man7/samba*.7*
%{_mandir}/man8/smbd*.8*
%{_mandir}/man8/nmbd*.8*
+%{_mandir}/man8/pdbedit*.8*
+%{_mandir}/man8/smbgroupedit*.8*
%{_mandir}/man1/smbcontrol*.1*
-%{_mandir}/man5/lmhosts*.5*
-%{_mandir}/man5/smb.conf*.5*
-%attr(775,root,root) %dir /var/lib/%{name}/netlogon
-%attr(775,root,root) %dir /var/lib/%{name}/profiles
-%attr(775,root,root) %dir /var/lib/%{name}/printers/*
-%dir /var/cache/%{name}
-%dir /var/log/%{name}
+%attr(775,root,root) %dir %{_localstatedir}/%{name}/netlogon
+%attr(775,root,root) %dir %{_localstatedir}/%{name}/profiles
+%attr(775,root,root) %dir %{_localstatedir}/%{name}/printers/*
%attr(1777,root,root) %dir /var/spool/%{name}
%dir %{_datadir}/%{name}/scripts
-#%attr(0755,root,root) %{_datadir}/%{name}/scripts/print-pdf
+%attr(0755,root,root) %{_datadir}/%{name}/scripts/print-pdf
#%attr(0750,root,root) %{_datadir}/%{name}/scripts/smbldap*.pl
#%attr(0640,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smbldap_conf.pm
#%attr(0644,root,root) %{_datadir}/%{name}/scripts/smbldap_tools.pm
@@ -1070,13 +1255,15 @@ fi
%config(noreplace) /etc/xinetd.d/swat%{samba_major}
#%attr(-,root,root) /sbin/*
%{_sbindir}/swat%{samba_major}
-%{_menudir}/%{name}
+%{_menudir}/%{name}-swat
%{_miconsdir}/*.xpm
%{_liconsdir}/*.xpm
%{_iconsdir}/*.xpm
%attr(-,root,root) %{_datadir}/swat%{samba_major}/help/*
%attr(-,root,root) %{_datadir}/swat%{samba_major}/images/*
%attr(-,root,root) %{_datadir}/swat%{samba_major}/include/*
+%lang(ja) %{_datadir}/swat%{samba_major}/lang/ja
+%lang(tr) %{_datadir}/swat%{samba_major}/lang/tr
%{_mandir}/man8/swat*.8*
%files client
@@ -1086,7 +1273,7 @@ fi
/sbin/mount.smbfs%{samba_major}
%attr(755,root,root) %{_bindir}/smbmount%{samba_major}
%attr(4755,root,root) %{_bindir}/smbumount%{samba_major}
-#%attr(4755,root,root) %{_sbindir}/smbmnt
+%attr(4755,root,root) %{_bindir}/smbmnt%{samba_major}
%{_mandir}/man8/smbmnt*.8*
%{_mandir}/man8/smbmount*.8*
%{_mandir}/man8/smbumount*.8*
@@ -1103,6 +1290,7 @@ fi
/%{_mandir}/man1/findsmb*.1*
/%{_mandir}/man1/smbclient*.1*
/%{_mandir}/man1/smbtar*.1*
+/%{_mandir}/man8/smbspool*.8*
%files common
%defattr(-,root,root)
@@ -1115,32 +1303,40 @@ fi
%{_bindir}/testprns%{samba_major}
#%{_bindir}/make_printerdef
%{_bindir}/rpcclient%{samba_major}
-%{_bindir}/smbsh%{samba_major}
+#%{_bindir}/smbsh%{samba_major}
%{_bindir}/smbpasswd%{samba_major}
+%{_bindir}/smbcacls%{samba_major}
%{_bindir}/net%{samba_major}
%{_bindir}/smbtree%{samba_major}
-%{_libdir}/smbwrapper%{samba_major}.so
+%{_bindir}/ntlm_auth%{samba_major}
+#%{_libdir}/smbwrapper%{samba_major}.so
+%{_libdir}/%{name}/*.dat
+#%{_libdir}/%{name}/lowcase.dat
+#%{_libdir}/%{name}/valid.dat
%attr(-,root,root) %config(noreplace) /etc/%{name}/smb.conf
%attr(-,root,root) %config(noreplace) /etc/%{name}/smb-winbind.conf
%attr(-,root,root) %config(noreplace) /etc/%{name}/lmhosts
-%attr(-,root,root) /var/lib/%{name}/codepages
-%{_mandir}/man1/make_smbcodepage*.1*
-%{_mandir}/man1/make_unicodemap*.1*
+%attr(-,root,root) %{_localstatedir}/%{name}/codepages
+#%{_mandir}/man1/make_smbcodepage*.1*
+#%{_mandir}/man1/make_unicodemap*.1*
%{_mandir}/man1/testparm*.1*
-%{_mandir}/man1/smbsh*.1*
+%{_mandir}/man1/rpcclient*.1*
+%exclude %{_mandir}/man1/smbsh*.1*
%{_mandir}/man1/testprns*.1*
%{_mandir}/man5/smb.conf*.5*
%{_mandir}/man5/lmhosts*.5*
%{_mandir}/man8/smbpasswd*.8*
-/%{_mandir}/man1/smbcacls*.1*
+%{_mandir}/man1/smbcacls*.1*
+%{_mandir}/man8/net*.8*
%if %build_winbind
%files winbind
%defattr(-,root,root)
%{_sbindir}/winbindd%{samba_major}
+%{_sbindir}/winbind%{samba_major}
%{_bindir}/wbinfo%{samba_major}
-%attr(755,root,root) /lib/security/pam_winbind*
-%attr(755,root,root) /lib/libnss_winbind%{samba_major}*
+%attr(755,root,root) /%{_lib}/security/pam_winbind*
+%attr(755,root,root) /%{_lib}/libnss_winbind%{samba_major}*
%attr(-,root,root) %config /etc/rc.d/init.d/winbind%{samba_major}
%attr(-,root,root) %config(noreplace) /etc/pam.d/system-auth-winbind*
%{_mandir}/man8/winbindd*.8*
@@ -1150,60 +1346,146 @@ fi
%if %build_wins
%files -n nss_wins%{samba_major}
%defattr(-,root,root)
-%attr(755,root,root) /lib/libnss_wins%{samba_major}.so*
+%attr(755,root,root) /%{_lib}/libnss_wins%{samba_major}.so*
+%endif
+
+%if 1
+%files debug
+%defattr(-,root,root)
+%{_bindir}/debug2html%{samba_major}
+%{_bindir}/smbtorture%{samba_major}
+%{_bindir}/msgtest%{samba_major}
+%{_bindir}/masktest%{samba_major}
+%{_bindir}/locktest%{samba_major}
+%{_bindir}/locktest2%{samba_major}
+%{_bindir}/nsstest%{samba_major}
+%{_bindir}/vfstest%{samba_major}
+%{_mandir}/man1/vfstest%{samba_major}*.1*
+%else
+%exclude %{_mandir}/man1/vfstest%{samba_major}*.1*
+%endif
+
+%if %build_system
+%files -n libsmbclient%{libsmbmajor}
+%defattr(-,root,root)
+%{_libdir}/libsmbclient.so*
+%else
+%exclude %{_libdir}/libsmbclient.so*
+%endif
+
+%if %build_system
+%files -n libsmbclient%{libsmbmajor}-devel
+%defattr(-,root,root)
+%{_includedir}/*
+%else
+%exclude %{_includedir}/*
%endif
+%files passdb-mysql
+%defattr(-,root,root)
+%{_libdir}/%{name}/*/pdb_mysql.so
+
+%files passdb-xml
+%defattr(-,root,root)
+%{_libdir}/%{name}/*/pdb_xml.so
+
#Files for antivirus support:
%if %build_fprot
%files vscan-fprot
%defattr(-,root,root)
%{_libdir}/%{name}/vfs/vscan-fprotd.so
-%doc examples.bin/VFS/fprot/INSTALL
+%config(noreplace) %{_sysconfdir}/%{name}/vscan-fprotd.conf
+%doc %{vfsdir}/%{vscandir}/INSTALL
%endif
%if %build_kaspersky
%files vscan-kaspersky
%defattr(-,root,root)
%{_libdir}/%{name}/vfs/vscan-kavp.so
-%doc examples.bin/VFS/kaspersky/INSTALL
+%config(noreplace) %{_sysconfdir}/%{name}/vscan-kavp.conf
+%doc %{vfsdir}/%{vscandir}/INSTALL
%endif
%if %build_mks
%files vscan-mks
%defattr(-,root,root)
%{_libdir}/%{name}/vfs/vscan-mksd.so
-%doc examples.bin/VFS/mks/INSTALL
+%config(noreplace) %{_sysconfdir}/%{name}/vscan-mks*.conf
+%doc %{vfsdir}/%{vscandir}/INSTALL
%endif
-%if %build_openantivirus
-%files vscan-openantivirus
+%if %build_openav
+%files vscan-openav
%defattr(-,root,root)
%{_libdir}/%{name}/vfs/vscan-oav.so
-%doc examples.bin/VFS/openantivirus/INSTALL
+%config(noreplace) %{_sysconfdir}/%{name}/vscan-oav.conf
+%doc %{vfsdir}/%{vscandir}/INSTALL
%endif
%if %build_sophos
%files vscan-sophos
%defattr(-,root,root)
%{_libdir}/%{name}/vfs/vscan-sophos.so
-%doc examples.bin/VFS/sophos/INSTALL
+%config(noreplace) %{_sysconfdir}/%{name}/vscan-sophos.conf
+%doc %{vfsdir}/%{vscandir}/INSTALL
%endif
%if %build_symantec
%files vscan-symantec
%defattr(-,root,root)
%{_libdir}/%{name}/vfs/vscan-symantec.so
-%doc examples.bin/VFS/symantec/INSTALL
+%config(noreplace) %{_sysconfdir}/%{name}/vscan-symantec.conf
+%doc %{vfsdir}/%{vscandir}/INSTALL
%endif
%if %build_trend
%files vscan-trend
%defattr(-,root,root)
%{_libdir}/%{name}/vfs/vscan-trend.so
-%doc examples.bin/VFS/trend/INSTALL
+%config(noreplace) %{_sysconfdir}/%{name}/vscan-trend.conf
+%doc %{vfsdir}/%{vscandir}/INSTALL
%endif
%changelog
+* Thu Mar 06 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha22.2mdk
+- Alpha22
+- Add profiles binary to server and ntlm_auth to common
+- smbwrapper and torture target broken (only in 9.0?)
+- remove unused source 2
+
+* Tue Mar 04 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha21.4mdk
+- Don't provide samba-{server,client,common} when not system samba (bug #2617)
+- Don't build libsmbclient packages when not system samba
+- Fix conflict between samba-server and samba3-server (pam_smbpass)
+- Fix smbwrapper (from 2.2.7a-5mdk for bug #2356)
+- Fix codepage/charset example (bug #1574)
+
+* Thu Jan 23 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha21.3mdk
+- samba-vscan 0.3.1 (and make it build again), including required inline edits
+- Make all vscan packages provide samba(3)-vscan
+- Build all vscan except kav (requires kaspersky lib) with --with-scanners
+- Add vscan-(scanner).conf files
+- Explicitly add ldapsam for 2.2 compatability when building --with ldap,
+ default build now uses new ldap passdb backend (ie you always get ldap)
+- Enable (experimental) tdb passdb backend
+- Fix file ownership conflicts between server and common
+- Cleanup configure, to match order of --help
+- Fix libdir location, was being overridden by --with-fhs
+- Split off a libsmbclient and -devel package
+- Add wins replication init script (patch 102)
+- Workaround passdb/pdb_xml.c not compiling
+- Workaround missing install targets for smbsh/smbwrapper.so in cvs
+- Inline patch smbd/quotas.c for Mandrake >9.0
+
+* Wed Nov 27 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha21.2mdk
+- Remove patch 20,21,22,23,25,26 (upstream)
+- New destdir patch from cvs (18)
+- package installed but non-packaged files
+- new debug subpackage for vfstest and related files (it was that or nuke the
+ manpage ;-))
+- use _libdir for libdir instead of _sysconfdir
+- Update samba-vscan (untested)
+
* Mon Oct 28 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha20.3mdk
- Fix mount.smbfs3 pointing to smbmount not in package
- Remove unnecessary lines from install (now done by make)
diff --git a/packaging/Mandrake/smb.conf b/packaging/Mandrake/smb.conf
index f68d48cb4b..f2643b774a 100644
--- a/packaging/Mandrake/smb.conf
+++ b/packaging/Mandrake/smb.conf
@@ -77,6 +77,8 @@
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
+# Allow users to map to guest:
+ map to guest = bad user
# Security mode. Most people will want user level security. See
# security_level.txt for details.
@@ -212,27 +214,39 @@
; logon home = \\%L\%U\.profile
# The add user script is used by a domain member to add local user accounts
-# that have been authenticated by the domain controller, or by the domain
+# that have been authenticated by the domain controller.
+# Script for domain member for adding local accounts for authenticated users:
+; add user script = /usr/sbin/useradd -s /bin/false %u
+
+# The add machine script is use by a samba server configured as a domain
# controller to add local machine accounts when adding machines to the domain.
# The script must work from the command line when replacing the macros,
# or the operation will fail. Check that groups exist if forcing a group.
# Script for domain controller for adding machines:
-; add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
+; add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
# Script for domain controller with LDAP backend for adding machines (please
# configure in /etc/samba/smbldap_conf.pm first):
-; add user script = /usr/share/samba/scripts/smbldap-useradd.pl -w -d /dev/null -g machines -c 'Machine Account' -s /bin/false %u
-# Script for domain member for adding local accounts for authenticated users:
-; add user script = /usr/sbin/useradd -s /bin/false %u
+; add machine script = /usr/share/samba/scripts/smbldap-useradd.pl -w -d /dev/null -g machines -c 'Machine Account' -s /bin/false %u
# Domain groups:
-# domain admin group is a list of unix users or groups who are made members
-# of the Domain Admin group
-; domain admin group = root @wheel
-#
-# domain guest groups is a list of unix users or groups who are made members
-# of the Domain Guests group
-; domain guest group = nobody @guest
-
+# Domain groups are now configured by using the smbgroupedit tool
+
+# Samba Password Database configuration:
+# Samba now has runtime-configurable password database backends. Multiple
+# passdb backends may be used, but users will only be added to the first one
+# Default:
+; passdb backend = smbpasswd unixsam
+# TDB backen with fallback to smbpasswd and unixsam
+; passdb backend = tdbsam_nua smbpasswd unixsam
+# LDAP with fallback to smbpasswd unixsam
+# Enable SSL by using an ldaps url, or enable tls with 'ldap ssl' below.
+; passdb backend = ldapsam_nua:ldaps://ldap.mydomain.com smbpasswd unixsam
+
+# Non-unix account range:
+# This is a range of unix user-id's that samba will map non-unix RIDs to,
+# such as machine accounts, when using a _nua passdb backend
+ non unix account range = 10000-20000
+
# LDAP configuration for Domain Controlling:
# The account (dn) that samba uses to access the LDAP server
# This account needs to have write access to the LDAP tree
@@ -297,8 +311,8 @@
# UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.),
# ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.)
# This is an example for french users:
-; client code page = 850
-; character set = ISO8859-1
+; dos charset = 850
+; unix charset = ISO8859-1
#============================ Share Definitions ==============================
@@ -372,6 +386,7 @@
browseable = yes
read only = yes
write list = @adm root
+ guest ok = yes
# A useful application of samba is to make a PDF-generation service
# To streamline this, install windows postscript drivers (preferably colour)
@@ -383,7 +398,7 @@
printable = Yes
comment = PDF Generator (only valid users)
#print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP &
- print command = /usr/share/samba/scripts/print-pdf %s ~%u \\\\\\\\%L\\\\%u %m %I &
+ print command = /usr/share/samba/scripts/print-pdf %s ~%u //%L/%u %m %I "%J" &
# This one is useful for people to share files
;[tmp]
diff --git a/packaging/Mandrake/smb.init b/packaging/Mandrake/smb.init
index bdc1518709..c5d3c8dc21 100755
--- a/packaging/Mandrake/smb.init
+++ b/packaging/Mandrake/smb.init
@@ -29,7 +29,7 @@ start() {
# If CUPS is used as printing system, reload smb after a 1 minute delay
# to allow the printers to appear properly as samba shares.
if killall -0 cupsd 2>/dev/null; then
- ( sleep 60 && killproc smbd -HUP ) &
+ ( sleep 60 && killproc smbd -HUP 1>/dev/null) &
fi
export TMPDIR="/var/tmp"
echo -n "Starting SMB services: "