%define auth %(test -f /etc/pam.d/system-auth && echo /etc/pam.d/system-auth || echo)
%define vscan_version 0.3.5

%define libiconv 1
%define prefix_osstech 0

%ifos linux
%define vscan 1
%else
%define vscan 0
%endif

%ifos linux
%define nss_libdir	/lib
%define nss_prefix	lib
%define nss_suffix	.2
%define pam_libdir	/lib/security
%undefine pam_prefix
%define pam_suffix	.0
%undefine sysconf_ext
%endif
%ifos %{solaris}
%define nss_libdir	/usr/lib
%define nss_libdir64	/usr/%{_lib64}
%undefine nss_prefix
%define nss_suffix	.1
%define pam_libdir	/usr/lib/security
%define pam_libdir64	/usr/%{_libsecurity64}
%undefine pam_prefix
%define pam_suffix	.1
%define sysconf_ext	.default
%endif

%define pam_smbpass %{?pam_prefix}pam_smbpass.so
%define pam_smbpass_real %{pam_smbpass}%{pam_suffix}
%define pam_winbind %{?pam_prefix}pam_winbind.so
%define pam_winbind_real %{pam_winbind}%{pam_suffix}
%define nss_wins %{?nss_prefix}nss_wins.so
%define nss_wins_real %{nss_wins}%{nss_suffix}
%define nss_winbind %{?nss_prefix}nss_winbind.so
%define nss_winbind_real %{nss_winbind}%{nss_suffix}

%if %{prefix_osstech}
%define prefix_opt	1
%define _prefix		/opt/osstech
%define _exec_prefix	/opt/osstech
%define _exec_prefix	/opt/osstech
%define _sysconfdir	%{_prefix}/etc
%define _initrddir	/etc/init.d
%define _localstatedir	%{_prefix}/var
%define _infodir	%{_prefix}/share/info
%define _mandir		%{_prefix}/share/man
%endif

Summary: The Samba Suite of programs
Name: samba
Epoch: 1000
Version: 3.0.24
Release: 1.12_OSSTECH%{?prefix_opt:_OPT}
License: GPL
Group: System Environment/Daemons
URL: http://www.samba.org/
Vendor: OSS Technology Co., Japan <http://www.osstech.co.jp/>

#TAG: change for non-pre
#Source: http://www.samba.org/samba/ftp/samba/%{name}-%{version}rc3.tar.gz
Source: http://www.samba.org/samba/ftp/samba/%{name}-%{version}.tar.gz

# Red Hat specific replacement-files
Source1: samba.log
Source2: samba.xinetd
Source3: swat.desktop
Source4: samba.sysconfig
Source5: smb.init
Source6: samba.pamd
Source7: smbprint
Source8: winbind.init
Source9: smb.conf.default
Source10: nmb.init

# OSSTECH
Source100: samba-vscan-%{vscan_version}.tar.bz2
Source101: samba-usrmgr_sh.tar.gz
Source102: samba-3.0.1-docs_ja_20040227.tar.gz
# Solaris
Source200: smb.init.solaris
Source201: winbind.init.solaris
Source202: samba-preremove-pkg.sh

# Don't depend on Net::LDAP
Source999: filter-requires-samba.sh

# upstream patches.  Applied first so that they'll break our patches rather
# than the other way around
# (none right now)

# generic patches
Patch101: samba-2.2.0-smbw.patch
Patch102: samba-3.0.0beta1-pipedir.patch
Patch103: samba-3.0.23-logfiles.patch
Patch104: samba-3.0.0rc3-nmbd-netbiosname.patch
#Patch105: samba-3.0.23-smb.conf.patch
Patch106: samba-3.0.23d-man.patch
# The passwd part has been applied, but not the group part
Patch107: samba-3.0.23rc3-passwd.patch
#Patch108: samba-3.0.8-non-ascii-domain.patch
Patch110: samba-3.0.21pre1-smbspool.patch
Patch111: samba-3.0.13-smbclient.patch
#Patch112: samba-3.0.15pre2-bug106483.patch
#Patch113: samba-3.0.21-warnings.patch
Patch114: samba-3.0.24-msdfs-root-no.patch
Patch115: samba-3.0.24-vista-patchset.patch
Patch116: samba-3.0.24-arch_macro.patch
Patch117: samba-3.0.24-pam_winbind-fixes.patch
Patch118: samba-3.0.24-tar_options.patch
Patch119: samba-3.0.24-enable_pam_nss_tests.patch
Patch120: samba-3.0.24-nss_wins.patch
Patch121: samba-3.0.24-vista_msdfs_errcodes.patch

Patch150: samba-3.0.23d-ignore-hide_xxxx-for-msdfs.patch
Patch151: samba-3.0.11-timeout.patch
Patch152: samba-3.0.20a-try_chown.patch
Patch153: samba-3.0.23d-bug-2239.patch

#OSSTECH patches
Patch200: samba-3.0.23d-i18nman.patch
Patch201: samba-3.0.23d-idmap_rid_multipledomain_support.patch
Patch202: samba-3.0.23d-strupper_m.patch
Patch203: samba-3.0.23d-struplower.patch
Patch204: samba-3.0.24-winbind-groupname.patch
Patch205: samba-3.0.24-ldapsam-algorithmic-rid.patch
Patch206: samba-3.0.24-krb5_locate_kdc.patch
Patch207: samba-3.0.24-ldap_open-debug.patch
#OSSTECH backport patches
Patch301: samba-3.0.24-vista-patchset-misc.patch
Patch302: samba-3.0.24-memalign-for-mlock.patch
Patch303: samba-3.0.25svn-winbindd_group-memoryleak.patch
Patch304: samba-3.0.25svn-become_root-to-access-ldap.patch
Patch305: samba-3.0.24-idmap_ad-use-attr_uidnumber.patch
Patch306: samba-3.0.25svn-wbinfo-groupinfo.patch
Patch307: samba-3.0.24-winbind-ads-enum-groupmembers.patch
Patch308: samba-3.0.24-arch_macro-sesssetup.patch
Patch309: samba-3.0.24-chain_reply-new_size.patch

Requires(pre): samba-common = %{epoch}:%{version}-%{release}
Requires: pam >= 0:0.64 %{auth}
Requires: logrotate >= 0:3.4
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post): /sbin/chkconfig, /sbin/service
Requires(preun): /sbin/chkconfig, /sbin/service
%ifos linux
BuildRequires: pam-devel, readline-devel, ncurses-devel, libacl-devel, krb5-devel, openldap-devel, openssl-devel, cups-devel
BuildRequires: autoconf, libtool
%if %{libiconv}
BuildRequires: libiconv-devel
%endif
%endif

# Working around perl dependency problem from docs
%define __perl_requires %{SOURCE999}


%description

Samba is the suite of programs by which a lot of PC-related machines
share files, printers, and other information (such as lists of
available files and printers). The Windows NT, OS/2, and Linux
operating systems support this natively, and add-on packages can
enable the same thing for DOS, Windows, VMS, UNIX of all kinds, MVS,
and more. This package provides an SMB/CIFS server that can be used to
provide network services to SMB/CIFS clients.
Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT
need the NetBEUI (Microsoft Raw NetBIOS frame) protocol.


%package client
Summary: Samba client programs
Group: Applications/System
Requires: samba-common = %{epoch}:%{version}-%{release}
Obsoletes: smbfs

%description client
The samba-client package provides some SMB/CIFS clients to complement
the built-in SMB/CIFS filesystem in Linux. These clients allow access
of SMB/CIFS shares and printing to SMB/CIFS printers.


%package common
Summary: Files used by both Samba servers and clients
Group: Applications/System
Requires(pre): /usr/sbin/groupadd
Requires(post): /sbin/chkconfig, /sbin/service, coreutils
Requires(preun): /sbin/chkconfig, /sbin/service

%description common
Samba-common provides files necessary for both the server and client
packages of Samba.


%package swat
Summary: The Samba SMB server Web configuration program
Group: Applications/System
Requires: samba = %{epoch}:%{version}-%{release}, xinetd

%description swat
The samba-swat package includes the new SWAT (Samba Web Administration
Tool), for remotely managing Samba's smb.conf file using your favorite
Web browser.


%package doc
Summary: Documentation for the Samba suite
Group: Documentation
Requires: samba-common = %{epoch}:%{version}-%{release}

%description doc
The samba-doc package includes all the non-manpage documentation for the
Samba suite.


%package -n libsmbclient
Summary: The SMB client library
Group: Applications/System

%description -n libsmbclient
The libsmbclient contains the SMB client library from the Samba suite.

%package -n libsmbclient-devel
Summary: Developer tools for the SMB client library
Group: Development
Requires: libsmbclient = %{epoch}:%{version}-%{release}

%description -n libsmbclient-devel
The libsmbclient-devel package contains the header files and libraries needed to
develop programs that link against the SMB client library in the Samba suite.


%prep
# TAG: change for non-pre
# % setup -q -n samba-3.0.23rc3
%setup -q

# copy Red Hat specific scripts
mkdir packaging/Fedora
cp packaging/RedHat-9/{samba.log,smb.conf,smbusers,samba.pamd.stack} packaging/Fedora/
cp %{SOURCE5} packaging/Fedora/
cp %{SOURCE6} packaging/Fedora/
cp %{SOURCE7} packaging/Fedora/
cp %{SOURCE8} packaging/Fedora/winbind.init
cp %{SOURCE9} packaging/Fedora/
cp %{SOURCE10} packaging/Fedora/

# Upstream patches
#(none)
# generic patches
%patch101 -p1 -b .smbw
%patch102 -p1 -b .pipedir
%patch103 -p1 -b .logfiles
%patch104 -p1 -b .nmbd-netbiosname
#%patch105 -p1 -b .upstream
%patch106 -p1 -b .man
%patch107 -p1 -b .passwd
#%patch108 -p1 -b .non-ascii-domain
%patch110 -p1 -b .smbspool
%patch111 -p1 -b .smbclient
#%patch112 -p1 -b .bug106483
#%patch113 -p1 -b .warnings
%patch114 -p1 -b .dfsroot
%patch115 -p1 -b .vista
%patch116 -p0 -b .arch_macro
%patch117 -p0 -b .pam_winbind
%patch118 -p0 -b .tar_options
%patch119 -p0 -b .pam_nss_test
%patch120 -p0 -b .nss_wins
%patch121 -p1 -b .msdfs

%patch150 -p1 -b .bug3319
%patch151 -p1 -b .timeout
%patch152 -p1 -b .try_chown
%patch153 -p1 -b .bug2239

%patch200 -p1 -b .i18nman
%patch201 -p1 -b .idmap_rid
%patch202 -p1 -b .strupper_m
%patch203 -p1 -b .struplower
%patch204 -p1 -b .winbind_groupname
%patch205 -p1 -b .ldapsam-algorithmic-rid
%patch206 -p1 -b .krb5_locate_kdc
%patch207 -p1 -b .ldap_open-debug
%patch301 -p1 -b .vista-misc
%patch302 -p1 -b .memalign
%patch303 -p1 -b .winbind_memoryleak
%patch304 -p1 -b .become_root
%patch305 -p1 -b .idmap_ad
%patch306 -p1 -b .wbinfo-groupinfo
%patch307 -p1 -b .winbind-ads-enum-groupmembers
%patch308 -p1 -b .arch_macro-sesssetup
%patch309 -p1 -b .chain_reply-new_size

# Convert /bin/sh script to /bin/bash script if /bin/sh is not BASH
# because some scripts have BASHism.
%ifos %{solaris}
if [ -z "`env - /bin/sh -c 'echo $BASH'`" ]; then
    { find . -name "*.sh"; find source/script -type f ! -name "*.sh"; } \
    |xargs perl -p -i'.dist' -e's"^#!/bin/sh$"#!/bin/bash"'
fi
%endif

# crap
rm -f examples/VFS/.cvsignore
mv source/VERSION source/VERSION.orig
sed -e 's/SAMBA_VERSION_VENDOR_SUFFIX=$/&\"%{release}\"/' < source/VERSION.orig > source/VERSION
cd source
script/mkversion.sh
cd ..

# samba-vscan VFS module
%if %{vscan}
pushd examples/VFS
tar xfj %{SOURCE100}
popd
%endif

# For USRMGR shell scripts
pushd examples
tar xfz %{SOURCE101}
popd

# Samba Japanese man pages
tar xfz %{SOURCE102}

%ifos %{solaris}
sed "s#^\(sysconfdir=\).*#\1'%{_sysconfdir}'#;s#^\(sbindir=\).*#\1'%{_sbindir}'#" \
    <%{SOURCE200} >packaging/Solaris/smb.init
#sed "s#^\(sysconfdir=\).*#\1'%{_sysconfdir}'#;s#^\(sbindir=\).*#\1'%{_sbindir}'#" \
#    <%{SOURCE200} >packaging/Solaris/nmb.init
sed "s#^\(sysconfdir=\).*#\1'%{_sysconfdir}'#;s#^\(sbindir=\).*#\1'%{_sbindir}'#" \
    <%{SOURCE201} >packaging/Solaris/winbind.init
%endif

%build
pushd source
sh autogen.sh
%ifarch i386 sparc
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
%endif
%ifarch ia64
libtoolize --copy --force     # get it to recognize IA-64
autoheader
autoconf
EXTRA="-D_LARGEFILE64_SOURCE"
%endif
LDFLAGS="-Wl,-R/opt/osstech/lib"; export LDFLAGS
LD_LIBRARY_PATH="/opt/osstech/lib"; export LD_LIBRARY_PATH
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DLDAP_DEPRECATED" %configure \
	--with-acl-support \
	--with-automount \
	--with-libsmbclient \
	--with-mmap \
	--with-pam \
	--with-pam_smbpass \
	--with-quotas \
	--with-sys-quotas \
	--with-syslog \
	--with-utmp \
	--with-vfs \
	--with-ads \
%ifos linux
	--with-smbmount \
	--without-smbwrapper \
%endif
%if %{libiconv}
	--with-libiconv=/opt/osstech \
%endif
%ifos %{solaris}
	--with-krb5=/opt/osstech \
%endif
	--with-lockdir=%{_localstatedir}/cache/samba \
	--with-piddir=%{_localstatedir}/run \
	--with-mandir=%{_mandir} \
	--with-privatedir=%{_sysconfdir}/samba \
	--with-logfilebase=%{_localstatedir}/log/samba \
	--with-libdir=%{_libdir}/samba \
	--with-configdir=%{_sysconfdir}/samba \
	--with-swatdir=%{_datadir}/swat \
	--with-shared-modules=idmap_ad,idmap_rid \
	--with-manpages-langs="C ja"

make  CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DLDAP_DEPRECATED" \
	proto

%ifos %{solaris}
## Build 64-bit nss_winbind.so and pam_winbind.so with -lsocket
make  CFLAGS="$CFLAG_64 $RPM_OPT_FLAGS -D_GNU_SOURCE -DLDAP_DEPRECATED" %{?_smp_mflags} \
      SHLD="`sed -n 's/^SHLD *= *//p' Makefile` -lsocket" \
	libnss_winbind pam_winbind
mv nsswitch/libnss_winbind.so{,.64}
mv bin/pam_winbind.so{,.64}
make clean
## Build 32-bit nss_winbind.so and pam_winbind.so with -lsocket
make  CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DLDAP_DEPRECATED" %{?_smp_mflags} \
      SHLD="`sed -n 's/^SHLD *= *//p' Makefile` -lsocket" \
	libnss_winbind pam_winbind
%endif

make  CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DLDAP_DEPRECATED" %{?_smp_mflags} \
	all nsswitch/libnss_wins.so modules test_pam_modules test_nss_modules

make  CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" \
	debug2html

make  CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" \
	smbfilter

%ifos linux
( cd client ; gcc -o mount.cifs $RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE mount.cifs.c )
( cd client ; gcc -o umount.cifs $RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE umount.cifs.c )
%endif

popd

## Building vscan modules
%if %{vscan}
pushd examples/VFS/samba-vscan-%{vscan_version}
./configure
make
popd
%endif


%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT/usr/{sbin,bin}
mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/{pam.d,logrotate.d}
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{log,spool}/samba
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/samba
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/samba/winbindd_privileged
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/samba/scripts
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/swat/using_samba
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/samba/codepages 
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/winbindd

cd source

%makeinstall \
	BINDIR=$RPM_BUILD_ROOT%{_bindir} \
	BASEDIR=$RPM_BUILD_ROOT%{_prefix} \
	SBINDIR=$RPM_BUILD_ROOT%{_sbindir} \
	DATADIR=$RPM_BUILD_ROOT%{_datadir} \
	LOCKDIR=$RPM_BUILD_ROOT%{_localstatedir}/cache/samba \
	PRIVATEDIR=$RPM_BUILD_ROOT%{_sysconfdir}/samba \
	LIBDIR=$RPM_BUILD_ROOT%{_libdir}/samba \
	CONFIGDIR=$RPM_BUILD_ROOT%{_sysconfdir}/samba \
	MANDIR=$RPM_BUILD_ROOT%{_mandir} \
	VARDIR=$RPM_BUILD_ROOT%{_localstatedir}/log/samba \
	CODEPAGEDIR=$RPM_BUILD_ROOT%{_datadir}/samba/codepages \
	SWATDIR=$RPM_BUILD_ROOT%{_datadir}/swat \
	SAMBABOOK=$RPM_BUILD_ROOT%{_datadir}/swat/using_samba \
	PIDDIR=$RPM_BUILD_ROOT%{_localstatedir}/run

cd ..

# Install other stuff
install -m644 packaging/Fedora/smb.conf.default $RPM_BUILD_ROOT%{_sysconfdir}/samba/smb.conf%{?sysconf_ext}
install -m755 source/script/mksmbpasswd.sh $RPM_BUILD_ROOT%{_bindir}
install -m644 packaging/Fedora/smbusers $RPM_BUILD_ROOT%{_sysconfdir}/samba/smbusers%{?sysconf_ext}
install -m755 packaging/Fedora/smbprint $RPM_BUILD_ROOT%{_bindir}
%ifos %{solaris}
install -m755 packaging/Solaris/smb.init $RPM_BUILD_ROOT%{_initrddir}/smb
#install -m755 packaging/Solaris/nmb.init $RPM_BUILD_ROOT%{_initrddir}/nmb
install -m755 packaging/Solaris/winbind.init $RPM_BUILD_ROOT%{_initrddir}/winbind
%else
install -m755 packaging/Fedora/smb.init $RPM_BUILD_ROOT%{_initrddir}/smb
#install -m755 packaging/Fedora/nmb.init $RPM_BUILD_ROOT%{_initrddir}/nmb
install -m755 packaging/Fedora/winbind.init $RPM_BUILD_ROOT%{_initrddir}/winbind
%endif
#ln -s ../..%{_initrddir}/smb  $RPM_BUILD_ROOT%{_sbindir}/samba
install -m644 packaging/Fedora/samba.pamd.stack $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/samba%{?sysconf_ext}
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/samba%{?sysconf_ext}
%ifos linux
ln -s ../usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
ln -s ../usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
%endif
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts%{?sysconf_ext}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema
install -m644 examples/LDAP/samba.schema $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema/samba.schema

# pam_smbpass
mkdir -p $RPM_BUILD_ROOT%{pam_libdir}
install -m 755 \
	source/bin/pam_smbpass.so \
	$RPM_BUILD_ROOT%{pam_libdir}/%{pam_smbpass_real}
ln -sf %{pam_smbpass_real} $RPM_BUILD_ROOT%{pam_libdir}/%{pam_smbpass}
install -m 755 \
	source/bin/pam_winbind.so \
	$RPM_BUILD_ROOT%{pam_libdir}/%{pam_winbind_real}
ln -sf %{pam_winbind_real}  $RPM_BUILD_ROOT%{pam_libdir}/%{pam_winbind}
%ifos %{solaris}
mkdir -p $RPM_BUILD_ROOT%{pam_libdir64}
install -m 755 \
	source/bin/pam_winbind.so.64 \
	$RPM_BUILD_ROOT%{pam_libdir64}/%{pam_winbind_real}
ln -sf %{pam_winbind_real}  $RPM_BUILD_ROOT%{pam_libdir64}/%{pam_winbind}
%endif

# winbind
mkdir -p $RPM_BUILD_ROOT%{nss_libdir}
install -m 755 \
	source/nsswitch/libnss_winbind.so \
	$RPM_BUILD_ROOT%{nss_libdir}/%{nss_winbind_real}
ln -sf %{nss_winbind_real}  $RPM_BUILD_ROOT%{nss_libdir}/%{nss_winbind}
install -m 755 \
	source/nsswitch/libnss_wins.so \
	$RPM_BUILD_ROOT/%{nss_libdir}/%{nss_wins_real}
ln -sf %{nss_wins_real}  $RPM_BUILD_ROOT%{nss_libdir}/%{nss_wins}
%ifos %{solaris}
mkdir -p $RPM_BUILD_ROOT%{nss_libdir64}
install -m 755 \
	source/nsswitch/libnss_winbind.so.64 \
	$RPM_BUILD_ROOT%{nss_libdir64}/%{nss_winbind_real}
ln -sf %{nss_winbind_real}  $RPM_BUILD_ROOT%{nss_libdir64}/%{nss_winbind}
%endif

# libsmbclient

# make install puts libsmbclient.so in the wrong place on x86_64
rm -f $RPM_BUILD_ROOT%{_prefix}/lib*/samba/libsmbclient.so $RPM_BUILD_ROOT%{_prefix}/lib*/samba/libsmbclient.a $RPM_BUILD_ROOT%{_prefix}/lib || true
mkdir -p $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_includedir}
install -m 755 source/bin/libsmbclient.so $RPM_BUILD_ROOT%{_libdir}/libsmbclient.so.0
%ifos linux
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/
%endif
ln -s libsmbclient.so.0 $RPM_BUILD_ROOT%{_libdir}/libsmbclient.so
install -m 644 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{_libdir}/libsmbclient.a
install -m 644 source/include/libsmbclient.h $RPM_BUILD_ROOT%{_includedir}

#libmsrpc

#this lib is not really useful or usable (libmsrpc.h requires the samba source)
#so better to remove it until upstream fixes it
rm -f $RPM_BUILD_ROOT%{_prefix}/lib*/samba/libmsrpc.so
rm -f $RPM_BUILD_ROOT%{_includedir}/libmsrpc.h

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/swat%{?sysconf_ext}

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/samba%{?sysconf_ext}
%ifos linux
install -m755 source/client/mount.cifs $RPM_BUILD_ROOT/sbin/mount.cifs
install -m755 source/client/umount.cifs $RPM_BUILD_ROOT/sbin/umount.cifs
%else
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/mount.cifs.8*
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/smbmnt.8*
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/smbmount.8*
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/smbumount.8*
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/umount.cifs.8*
rm -f $RPM_BUILD_ROOT/%{_mandir}/ja/man8/mount.cifs.8*
rm -f $RPM_BUILD_ROOT/%{_mandir}/ja/man8/smbmnt.8*
rm -f $RPM_BUILD_ROOT/%{_mandir}/ja/man8/smbmount.8*
rm -f $RPM_BUILD_ROOT/%{_mandir}/ja/man8/smbumount.8*
%endif

rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/editreg.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/log2pcap.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smbsh.1*
#rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smbget.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/man5/smbgetrc.5*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/vfstest.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/testprns.1*
#rm -f $RPM_BUILD_ROOT%{_mandir}/man8/smbmount.8*
#rm -f $RPM_BUILD_ROOT%{_mandir}/man8/smbmnt.8*
#rm -f $RPM_BUILD_ROOT%{_mandir}/man8/smbumount.8*

# remove uninstalled Japanese man pages
rm -f $RPM_BUILD_ROOT%{_mandir}/ja/man1/editreg.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/ja/man1/log2pcap.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/ja/man1/testprns.1*

# why are these getting installed in the wrong place?
rm -f $RPM_BUILD_ROOT%{_libdir}/samba/security/pam_{smbpass,winbind}.so
rm -f $RPM_BUILD_ROOT%{_sbindir}/{u,}mount.cifs

## Installing vscan
%if %{vscan}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/samba/vscan/
pushd examples/VFS/samba-vscan-%{vscan_version}
install -m 755 ./*.so   $RPM_BUILD_ROOT%{_libdir}/samba/vfs/
install -m 644 clamav/vscan-clamav.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba/vscan
install -m 644 fprot/vscan-fprotd.conf  $RPM_BUILD_ROOT%{_sysconfdir}/samba/vscan/
install -m 644 icap/vscan-icap.conf     $RPM_BUILD_ROOT%{_sysconfdir}/samba/vscan/
install -m 644 kaspersky/vscan-kavp.conf        $RPM_BUILD_ROOT%{_sysconfdir}/samba/vscan/
install -m 644 mks/vscan-mks32.conf     $RPM_BUILD_ROOT%{_sysconfdir}/samba/vscan/
install -m 644 openantivirus/vscan-oav.conf       $RPM_BUILD_ROOT%{_sysconfdir}/samba/vscan/
install -m 644 sophos/vscan-sophos.conf   $RPM_BUILD_ROOT%{_sysconfdir}/samba/vscan/
install -m 644 trend/vscan-trend.conf     $RPM_BUILD_ROOT%{_sysconfdir}/samba/vscan/
popd
%endif

# Install USRMGR scripts
pushd examples/samba-usrmgr_sh
mkdir -p $RPM_BUILD_ROOT%{_libdir}/samba/bin/
install -m 755 addshare.pl $RPM_BUILD_ROOT%{_libdir}/samba/bin/addshare.pl
install -m 755 chgshare.pl $RPM_BUILD_ROOT%{_libdir}/samba/bin/chgshare.pl
install -m 755 delshare.pl $RPM_BUILD_ROOT%{_libdir}/samba/bin/delshare.pl
popd

%ifos %{solaris}
mv $RPM_BUILD_ROOT%{_bindir}/profiles $RPM_BUILD_ROOT%{_bindir}/smbprofiles
mv $RPM_BUILD_ROOT%{_mandir}/man1/profiles.1 $RPM_BUILD_ROOT%{_mandir}/man1/smbprofiles.1
mv $RPM_BUILD_ROOT%{_mandir}/ja/man1/profiles.1 $RPM_BUILD_ROOT%{_mandir}/ja/man1/smbprofiles.1

sbuild-pkgmk \
	--revision "$(expr "%{release}" : '\([^_]*\)_')" \
	%{?prefix_opt:--extraname "opt"} \
	--summary "%{summary}" \
	--vendor "%{vendor}" \
        --pre-remove %{SOURCE202} \
	--attr "%{_localstatedir}/spool/samba:1777::" \
	--attr "%{_localstatedir}/cache/samba/winbindd_privileged:750::" \
	--attr "%{_localstatedir}/log/samba:700::" \
	"$RPM_BUILD_ROOT" \
	"osstech-%{name}" \
	"%{version}" \
	"%{_rpmdir}"
%endif

%clean
rm -rf $RPM_BUILD_ROOT

#%pre

%post
/sbin/chkconfig --add smb
#/sbin/chkconfig --add nmb
if [ "$1" -ge "1" ]; then
        /sbin/service smb condrestart >/dev/null 2>&1 || :
        #/sbin/service nmb condrestart >/dev/null 2>&1 || :
fi
exit 0

%preun
if [ $1 = 0 ] ; then
    /sbin/service smb stop >/dev/null 2>&1 || :
    #/sbin/service nmb stop >/dev/null 2>&1 || :
    /sbin/chkconfig --del smb
    #/sbin/chkconfig --del nmb
fi
exit 0

#%postun


%pre common
/usr/sbin/groupadd -g 88 wbpriv >/dev/null 2>&1 || :

%post common
/sbin/chkconfig --add winbind
/sbin/ldconfig

if [ "$1" -ge "1" ]; then
        /sbin/service winbind condrestart >/dev/null 2>&1 || :
fi

%preun common
if [ $1 = 0 ] ; then
    /sbin/service winbind stop >/dev/null 2>&1 || :
    /sbin/chkconfig --del winbind
fi
exit 0

%postun common
/sbin/ldconfig


%post -n libsmbclient
/sbin/ldconfig

%postun -n libsmbclient
/sbin/ldconfig

%files
%defattr(-,root,root)
%{_sbindir}/smbd
%{_sbindir}/nmbd
%{_bindir}/mksmbpasswd.sh
%{_bindir}/smbstatus
%{_bindir}/eventlogadm
%config(noreplace) %{_sysconfdir}/samba/smbusers%{?sysconf_ext}
%attr(755,root,root) %config %{_initrddir}/smb
%config(noreplace) %{_sysconfdir}/logrotate.d/samba%{?sysconf_ext}
%config(noreplace) %{_sysconfdir}/pam.d/samba%{?sysconf_ext}
%{_mandir}/man7/samba.7*
%{_mandir}/man8/nmbd.8*
%{_mandir}/man8/smbd.8*
%{_libdir}/samba/vfs
%{_libdir}/samba/auth
%attr(1777,root,root) %dir %{_localstatedir}/spool/samba
%dir %{_sysconfdir}/openldap/schema
%{_sysconfdir}/openldap/schema/samba.schema
# Japanese man pages
%{_mandir}/ja/man7/samba.7*
%{_mandir}/ja/man8/nmbd.8*
%{_mandir}/ja/man8/smbd.8*

%doc examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting
%doc examples/printing

%if %{vscan}
%config(noreplace) %{_sysconfdir}/samba/vscan/*.conf%{?sysconf_ext}
%endif

%{_libdir}/samba/bin/*


%files swat
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/xinetd.d/swat%{?sysconf_ext}
%{_datadir}/swat
%{_sbindir}/swat
%{_mandir}/man8/swat.8*
%{_mandir}/ja/man8/swat.8*
%attr(755,root,root) %{_libdir}/samba/*.msg

%files client
%defattr(-,root,root)
%ifos linux
/sbin/mount.cifs
/sbin/umount.cifs
/sbin/mount.smb
/sbin/mount.smbfs
%endif
%{_bindir}/rpcclient
%{_bindir}/smbcacls
%ifos linux
%{_bindir}/smbmount
%{_bindir}/smbmnt
%{_bindir}/smbumount
%endif
%{_bindir}/findsmb
%{_bindir}/smbget
%{_bindir}/nmblookup
%{_bindir}/smbclient
%{_bindir}/smbprint
%{_bindir}/smbspool
%{_bindir}/smbtar
%{_bindir}/smbtree
%{_mandir}/man1/findsmb.1*
%{_mandir}/man1/nmblookup.1*
%{_mandir}/man1/rpcclient.1*
%{_mandir}/man1/smbcacls.1*
%{_mandir}/man1/smbclient.1*
%{_mandir}/man1/smbtar.1*
%{_mandir}/man1/smbtree.1*
%{_mandir}/man1/smbget.1*
%{_mandir}/man8/smbspool.8*
%ifos linux
%{_mandir}/man8/mount.cifs.8*
%{_mandir}/man8/umount.cifs.8*
%{_mandir}/man8/smbmnt.8*
%{_mandir}/man8/smbmount.8*
%{_mandir}/man8/smbumount.8*
%endif
# Japanese man pages
%{_mandir}/ja/man1/findsmb.1*
%{_mandir}/ja/man1/nmblookup.1*
%{_mandir}/ja/man1/rpcclient.1*
%{_mandir}/ja/man1/smbcacls.1*
%{_mandir}/ja/man1/smbclient.1*
%{_mandir}/ja/man1/smbtar.1*
%{_mandir}/ja/man1/smbtree.1*
%{_mandir}/ja/man8/smbspool.8*
%ifos linux
%{_mandir}/ja/man8/mount.cifs.8*
%{_mandir}/ja/man8/smbmnt.8*
%{_mandir}/ja/man8/smbmount.8*
%{_mandir}/ja/man8/smbumount.8*
%endif


%files common
%defattr(-,root,root)
%{pam_libdir}/%{pam_smbpass_real}
%{pam_libdir}/%{pam_smbpass}
%dir %{_libdir}/samba
%{_libdir}/samba/charset
%{_libdir}/samba/lowcase.dat
%{_libdir}/samba/upcase.dat
%{_libdir}/samba/valid.dat
#%{_libdir}/samba/libmsrpc.so
%{nss_libdir}/%{nss_wins_real}
%{nss_libdir}/%{nss_wins}
%{nss_libdir}/%{nss_winbind_real}
%{nss_libdir}/%{nss_winbind}
%{pam_libdir}/%{pam_winbind_real}
%{pam_libdir}/%{pam_winbind}

%{_bindir}/net
%{_bindir}/testparm
%{_bindir}/smbpasswd
%{_bindir}/wbinfo
%{_bindir}/ntlm_auth
%{_bindir}/pdbedit
%ifos %{solaris}
%{_bindir}/smbprofiles
%else
%{_bindir}/profiles
%endif
%{_bindir}/smbcquotas
%{_bindir}/smbcontrol
%{_bindir}/tdbbackup
%{_bindir}/tdbdump
%{_bindir}/tdbtool
%{_sbindir}/winbindd
%{_libdir}/samba/idmap
%dir %{_localstatedir}/cache/samba
%dir %{_localstatedir}/run/winbindd
%attr(750,root,wbpriv) %dir %{_localstatedir}/cache/samba/winbindd_privileged
%dir %{_localstatedir}/lib/samba/scripts
%config(noreplace) %{_sysconfdir}/samba/smb.conf%{?sysconf_ext}
%config(noreplace) %{_sysconfdir}/samba/lmhosts%{?sysconf_ext}
%config(noreplace) %{_sysconfdir}/sysconfig/samba%{?sysconf_ext}
%dir %{_datadir}/samba
#%dir %{_datadir}/samba/codepages
%dir %{_sysconfdir}/samba
%attr(0700,root,root) %dir %{_localstatedir}/log/samba
%{_initrddir}/winbind
%{_mandir}/man1/ntlm_auth.1*
%ifos %{solaris}
%{_mandir}/man1/smbprofiles.1*
%else
%{_mandir}/man1/profiles.1*
%endif
%{_mandir}/man1/smbcquotas.1*
%{_mandir}/man1/smbcontrol.1*
%{_mandir}/man1/wbinfo.1*
#%{_mandir}/man1/vfstest.1*
%{_mandir}/man1/testparm.1*
%{_mandir}/man1/smbstatus.1*
%{_mandir}/man5/smbpasswd.5*
%{_mandir}/man5/smb.conf.5*
%{_mandir}/man5/lmhosts.5*
%{_mandir}/man7/pam_winbind.7*
%{_mandir}/man7/libsmbclient.7*
%{_mandir}/man8/smbpasswd.8*
%{_mandir}/man8/pdbedit.8*
%{_mandir}/man8/net.8*
%{_mandir}/man8/winbindd.8*
%{_mandir}/man8/tdbbackup.8*
%{_mandir}/man8/tdbdump.8*
# Japanese man pages
%{_mandir}/ja/man1/ntlm_auth.1*
%ifos %{solaris}
%{_mandir}/ja/man1/smbprofiles.1*
%else
%{_mandir}/ja/man1/profiles.1*
%endif
%{_mandir}/ja/man1/smbcquotas.1*
%{_mandir}/ja/man1/smbcontrol.1*
%{_mandir}/ja/man1/wbinfo.1*
%{_mandir}/ja/man1/vfstest.1*
%{_mandir}/ja/man1/testparm.1*
%{_mandir}/ja/man1/smbstatus.1*
%{_mandir}/ja/man5/smbpasswd.5*
%{_mandir}/ja/man5/smb.conf.5*
%{_mandir}/ja/man5/lmhosts.5*
%{_mandir}/ja/man8/smbpasswd.8*
%{_mandir}/ja/man8/pdbedit.8*
%{_mandir}/ja/man8/net.8*
%{_mandir}/ja/man8/winbindd.8*
%{_mandir}/ja/man8/tdbbackup.8*

%doc README COPYING Manifest 
%doc WHATSNEW.txt Roadmap


%files doc
%defattr(-,root,root)
%doc docs/REVISION docs/Samba3-Developers-Guide.pdf docs/Samba3-ByExample.pdf
%doc docs/Samba3-HOWTO.pdf docs/THANKS docs/history
%doc docs/htmldocs
%doc docs/registry

%files -n libsmbclient
%defattr(-,root,root)
%{_libdir}/libsmbclient.so.0

%files -n libsmbclient-devel
%defattr(-,root,root)
%{_libdir}/libsmbclient.so
%{_libdir}/libsmbclient.a
%{_includedir}/libsmbclient.h
#%{_includedir}/libmsrpc.h

%changelog
* Tue Apr 13 2007 SATOH Fumiyasu <fumiyas@osstech.co.jp> 3.0.24-1.12_OSSTECH
- Solaris: Add 'on' and 'off' subcommand to smb.init.solaris and
  winbind.init.solaris to enable/disable init script.
- Solaris: Build pam_winbind.so with -lsocket to fix unresolved
  symbols problem. (Same problem as Fedora bug #226387)
- Solaris: Add preremove script to stop daemons on package removal.
- New patch: samba-3.0.24-chain_reply-new_size.patch
  Fix long-standing bug in our chain processing code.
  Should fix a bug with WinPE. Probably a candidate
  for the Vista patchset.
- Remove "if [ -z "$nc" ]; then .. fi" hack from build stage.
- Merge changes from samba-3.0.24-3.fc7 through samba-3.0.24-12.fc7:
  + Wed Apr 4 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-12.fc7
  - fixes in smb.conf
  - advice in smb.conf to put scripts in /var/lib/samba/scripts
  - create /var/lib/samba/scripts so that selinux can be happy
  - fix Vista problems with msdfs errors
  + Tue Apr 03 2007 Guenther Deschner <gdeschner@redhat.com> 3.0.24-11.fc7
  - enable PAM and NSS dlopen checks during build
  - fix unresolved symbols in libnss_wins.so (bug #198230)
  + Thu Mar 29 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-9.fc7
  - integrate most of merge review proposed changes (bug #226387)
  + Mon Mar 26 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-7.fc7
  - add a sepoarate init script for nmbd called nmb, we need to be able
    to restart nmbd without dropping al smbd connections unnecessarily
  + Fri Mar 23 2007 Simo Sorce <ssorce@redhat.com>
  - add samba.schema to /etc/openldap/schema
  * Thu Mar 22 2007 Florian La Roche <laroche@redhat.com>
  - adjust the Requires: for the scripts, add "chkconfig --add smb"
  + Thu Mar 15 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-3.fc7
  - Split out libsmbclient, devel and doc packages
  - Remove kill -HUP from rotate, samba use -HUP for other things
    noit to reopen logs

* Tue Apr  4 2007 SATOH Fumiyasu <fumiyas@osstech.co.jp> 3.0.24-1.11_OSSTECH
- New patch: samba-3.0.24-ldapsam-algorithmic-rid.patch [OST-Tech:272]
  Fallback to algorithmic rid for backward compatibility when
  sambaAlgorithmicRidBase exists or sambaNextRid does not exist
  in sambaDomain object class.
- New patch: samba-3.0.24-krb5_locate_kdc.patch
  Wrap krb5_locate_kdc call as smb_krb5_locate_kdc to prevent incorrect
  linking and crashes on Solaris.
- New patch: samba-3.0.24-ldap_open-debug.patch
  Report debug information on ldap_open() failure instead of
  just displaying "Operations Error".
- New patch: samba-3.0.24-arch_macro-sesssetup.patch
  BUG 4484: Add more checks to set %a for Vista clients (based on
  absence of native OS and Lanman strings in the session setup request)
- Add libiconv macro to be able to disable libiconv.
- Add prefix_osstech macro to change the prefix to /opt/osstech.

* Fri Mar 30 2007 SATOH Fumiyasu <fumiyas@osstech.co.jp> 3.0.24-1.10_OSSTECH
- Use libiconv's iconv(3) instead of glibc version.
- New patch: samba-3.0.24-winbind-ads-enum-groupmembers.patch
  Fix memleak when enumerating group membership from an AD group.
- Merge changes from samba-3.0.24-2.fc7 through samba-3.0.24-10.fc7:
  + Fri Mar 30 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-10.fc7
  - set passdb backend = tdbsam as default in smb.conf
  + Wed Mar 28 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-8.fc7
  - fix for bug #176649 (smbclient fails to login in tar creating mode)
  + Mon Mar 26 2007 Simo Sorce <ssorce@redhat.com>
  - remove patch for bug 106483 as it introduces a new bug that prevents
    the use of a credentials file with the smbclient tar command
  + Mon Mar 26 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-7.fc7
  - make winbindd start earlier in the init process, at the same time
    ypbind is usually started as well
  + Tue Mar 20 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-6.fc7
  - do not put comments inline on smb.conf options, they may be read
    as part of the value (for example log files names)
  + Mon Mar 19 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-5.fc7
  - install our own (enhanced) default smb.conf file
  - Fix pam_winbind acct_mgmt PAM result code (prevented local users from
    logging in). Fixed by Guenther.
  - move some files from samba to samba-common as they are used with
    winbindd as well
  + Fri Mar 16 2007 Guenther Deschner <gdeschner@redhat.com> 3.0.24-4.fc7
  - fix arch macro which reported Vista to Samba clients.
  + Thu Mar 15 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-3.fc7
  - Remove libmsrpc.[h|so] for now as they are not really usable
  + Tue Feb 20 2007 Simo Sorce <ssorce@redhat.com> 3.0.24-2.fc7
  - New upstream release
  - Fix packaging issue wrt idmap modules used only by smbd
  - Addedd Vista Patchset for compatibility with Windows Vista
  - Change default of "msdfs root", it seem to cause problems with
    some applications and it has been proposed to change it for
    3.0.25 upstream

* Tue Mar 13 2007 SATOH Fumiyasu <fumiyas@osstech.co.jp> 3.0.24-1.9_OSSTECH
- Solaris: Use sbuild-pkgmk instead of mkpkg to build Solaris package.
- Solaris: Set suitable mode to /var/spool/samba, /var/cache/samba/winbindd_privileged
  and /var/log/samba.
- Solaris: Rename configuration files to *.default from *.example.
- Solaris: Make 64-bit version nss_winbind.so and pam_winbind.so.
- Adjust patch number to make classifying patches easy.
  (Patch No.205-210 -> Patch No.300-305)
- Backport wbinfo(1) --group-info option from Samba 3.0.25pre1.
- Reconstruct Vista patch set.

* Tue Mar  6 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.24-1.8_OSSTECH
- change the prefix(from /opt/osstech to /usr/sbin) in init scripts for Solaris

* Tue Mar 6 2007 SATOH Fumiyasu <fumiyas@osstech.co.jp> 3.0.24-1.7_OSSTECH
- Generate Solaris package by using customized mkpkg in install section.
  mkpkg: http://blogs.sun.com/thaniwa/entry/ja_solaris_pkg_part_2
  [OST-Tech:198]
- replace memalign patch for Solaris(Patch No.302) [OST-Tech:197]

* Mon Mar  5 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.24-1.6_OSSTECH
- Fix NULL pointer in idmap_ad(Patch No.305)    [OST-Tech:189]
- Fix SIGSEGV in winbindd (Patch No.204)        [OST-Tech:194]

* Fri Mar  2 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.24-1.5_OSSTECH
- Fix memalign for Solaris(Patch No.302)        [OST-Tech:183]
- Fix memory leak in winbindd (Patch No.303)    [OST-Tech:182]
- Fix become root to access ldap (Patch No.304) [OST-Tech:178]
- Add Epoch Tag to samba.spec                   [OST-Tech:119]

* Wed Feb 28 2007 SATOH Fumiyasu <fumiyas@osstech.co.jp> 3.0.24-1.4_OSSTECH
- Modify spec file to build package on Solaris happy.
- Add "--with-sys-quotas" and "--with-ads" to configure
  to use it explicitly.
- Convert /bin/sh scripts in source to /bin/bash scripts
  if /bin/sh is not BASH.
- Add "if [ -z "$nc" ]; then .. fi" clause in build stage to skip
  autoheader, autoconf, configure and misc when $nc is set
  (for testing "make" stage only in build by doing "nc=1
  rpmbuild -bc --short-circuit samba.spec").

* Wed Feb 14 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.24-1.3_OSSTECH
- fix bug4188 (Patch No.301)

* Fri Feb  9 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.24-1.2_OSSTECH
- add vista patch set at 20070209(Patch No.206)

* Tue Feb  6 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.24-1.1_OSSTECH
- security update to 3.0.24

* Mon Feb  5 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.23d-1.8_OSSTECH
- fix memory leak in winbindd (Patch No.204)

* Thu Feb  1 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.23d-1.7_OSSTECH
- fix winbind groupname (Patch No.204)
- fix printer driver upload for Vista (Patch No.300)

* Tue Jan 23 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.23d-1.6_OSSTECH
- fix null terminate of status page (Patch No.202)
- fix strupper_m and strlower_m for i18n (Patch No.203)

* Wed Jan 10 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.23d-1.5_OSSTECH
- extend the timeout time(Patch No.151)
- fix group ACL manipulation(Patch No.152)
- fix Excel related bugs(#2239) (Patch No.153)

* Tue Jan  9 2007 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.23d-1.4_OSSTECH
- fix a patch No.150

* Wed Dec 27 2006 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.23d-1.3_OSSTECH
- fix MSDFS link should visible(#3319) (Patch No.150)
- add multiple domain support for idmap_rid(Patch No.201)

* Fri Dec 15 2006 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.23d-1.2_OSSTECH
- add smbmount client
- remove Require gnutls-devel for Cent3

* Mon Dec 11 2006 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.23d-1.1_OSSTECH
- update to 3.0.23d
- add japanese man pages
- add i18n man pages patch(Patch No.200)

* Tue Oct 17 2006 Yasuma Takeda <yasuma@osstech.co.jp> 3.0.23c-2.2_OSSTECH
- Add usrmgr scripts

* Tue Sep 12 2006 Yasuma Takeda <yasuma@osstech.org> 3.0.23c-2.1OSSTECH
- Add vscan modules

* Fri Sep 1 2006 Jay Fenlason <fenlason@redhat.com> 3.0.23c-2
- New upstream release.

* Tue Aug 8 2006 Jay Fenlason <fenlason@redhat.com> 3.0.23b-2
- New upstream release.

* Mon Jul 24 2006 Jay Fenlason <fenlason@redhat.com> 3.0.23a-3
- Fix the -logfiles patch to close
  bz#199607 Samba compiled with wrong log path.
  bz#199206 smb.conf has incorrect log file path

* Mon Jul 24 2006 Jay Fenlason <fenlason@redhat.com> 3.0.23a-2
- Upgrade to new upstream 3.0.23a
- include upstream samr_alias patch

* Tue Jul 11 2006 Jay Fenlason <fenlason@redhat.com> 3.0.23-2
- New upstream release.
- Use modified filter-requires-samba.sh from packaging/RHEL/setup/
  to get rid of bogus dependency on perl(Unicode::MapUTF8)
- Update the -logfiles and -smb.conf patches to work with 3.0.23

* Thu Jul 6 2006 Jay Fenlason <fenlason@redhat.com> 3.0.23-0.RC3
- New upstream RC release.
- Update the -logfiles, and -passwd patches for
  3.0.23rc3
- Include the change to smb.init from Bastien Nocera <bnocera@redhat.com>)
  to close
  bz#182560 Wrong retval for initscript when smbd is dead
- Update this spec file to build with 3.0.23rc3
- Remove the -install.mount.smbfs patch, since we don't install
  mount.smbfs any more.

* Wed Jun 14 2006 Tomas Mraz <tmraz@redhat.com> - 2.0.21c-3
- rebuilt with new gnutls

* Fri Mar 17 2006 Jay Fenlason <fenlason@redhat.com> 2.0.21c-2
- New upstream version.

* Mon Feb 13 2006 Jay Fenlason <fenlason@redhat.com> 3.0.21b-2
- New upstream version.
- Since the rawhide kernel has dropped support for smbfs, remove smbmount
  and smbumount.  Users should use mount.cifs instead.
- Upgrade to 3.0.21b

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0:3.0.20b-2.1.1
- bump again for double-long bug on ppc(64)

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt

* Mon Nov 13 2005 Jay Fenlason <fenlason@redhat.com> 3.0.20b-2
- turn on -DLDAP_DEPRECATED to allow access to ldap functions that have
  been depricated in 2.3.11, but which don't have well-documented
  replacements (ldap_simple_bind_s(), for example).
- Upgrade to 3.0.20b, which includes all the previous upstream patches.
- Updated the -warnings patch for 3.0.20a.
- Include  --with-shared-modules=idmap_ad,idmap_rid to close
  bz#156810 --with-shared-modules=idmap_ad,idmap_rid
- Include the new samba.pamd from Tomas Mraz (tmraz@redhat.com) to close
  bz#170259 pam_stack is deprecated

* Sun Nov 13 2005 Warren Togami <wtogami@redhat.com> 3.0.20-3
- epochs from deps, req exact release
- rebuild against new openssl

* Mon Aug 22 2005 Jay Fenlason <fenlason@redhat.com> 3.0.20-2
- New upstream release
  Includes five upstream patches -bug3010_v1, -groupname_enumeration_v3,
    -regcreatekey_winxp_v1, -usrmgr_groups_v1, and -winbindd_v1
  This obsoletes the -pie and -delim patches
  the -warning and -gcc4 patches are obsolete too
  The -man, -passwd, and -smbspool patches were updated to match 3.0.20pre1
  Also, the -quoting patch was implemented differently upstream
  There is now a umount.cifs executable and manpage
  We run autogen.sh as part of the build phase
  The testprns command is now gone
  libsmbclient now has a man page
- Include -bug106483 patch to close
  bz#106483 smbclient: -N negates the provided password, despite documentation
- Added the -warnings patch to quiet some compiler warnings.
- Removed many obsolete patches from CVS.

* Mon May 2 2005 Jay Fenlason <fenlason@redhat.com> 3.0.14a-2
- New upstream release.
- the -64bit-timestamps, -clitar, -establish_trust, user_rights_v1,
  winbind_find_dc_v2 patches are now obsolete.

* Thu Apr 7 2005 Jay Fenlason <fenlason@redhat.com> 3.0.13-2
- New upstream release
- add my -quoting patch, to fix swat with strings that contain
  html meta-characters, and to use correct quote characters in
  lists, closing bz#134310
- include the upstream winbindd_2k3sp1 patch
- include the -smbclient patch.
- include the -hang patch from upstream.

* Thu Mar 24 2005 Florian La Roche <laroche@redhat.com>
- add a "exit 0" to the postun of the main samba package

* Wed Mar  2 2005 Tomas Mraz <tmraz@redhat.com> 3.0.11-5
- rebuild with openssl-0.9.7e

* Thu Feb 24 2005 Jay Fenlason <fenlason@redhat.com> 3.0.11-4
- Use the updated filter-requires-samba.sh file, so we don't accidentally
  pick up a dependency on perl(Crypt::SmbHash)

* Fri Feb 18 2005 Jay Fenlason <fenlason@redhat.com> 3.0.11-3
- add -gcc4 patch to compile with gcc 4.
- remove the now obsolete -smbclient-kerberos.patch
- Include four upstream patches from
  http://samba.org/~jerry/patches/post-3.0.11/
  (Slightly modified the winbind_find_dc_v2 patch to apply easily with
  rpmbuild).

* Fri Feb 4 2005 Jay Fenlason <fenlason@redhat.com> 3.0.11-2
- include -smbspool patch to close bz#104136

* Wed Jan 12 2005 Jay Fenlason <fenlason@redhat.com> 3.0.10-4
- Update the -man patch to fix ntlm_auth.1 too.
- Move pam_smbpass.so to the -common package, so both the 32
  and 64-bit versions will be installed on multiarch platforms.
  This closes bz#143617
- Added new -delim patch to fix mount.cifs so it can accept
  passwords with commas in them (via environment or credentials
  file) to close bz#144198

* Wed Jan 12 2005 Tim Waugh <twaugh@redhat.com> 3.0.10-3
- Rebuilt for new readline.

* Fri Dec 17 2004 Jay Fenlason <fenlason@redhat.com> 3.0.10-2
- New upstream release that closes CAN-2004-1154  bz#142544
- Include the -64bit patch from Nalin.  This closes bz#142873
- Update the -logfiles patch to work with 3.0.10
- Create /var/run/winbindd and make it part of the -common rpm to close
  bz#142242

* Mon Nov 22 2004 Jay Fenlason <fenlason@redhat.com> 3.0.9-2
- New upstream release.  This obsoletes the -secret patch.
  Include my changetrustpw patch to make "net ads changetrustpw" stop
  aborting.  This closes #134694
- Remove obsolete triggers for ancient samba versions.
- Move /var/log/samba to the -common rpm.  This closes #76628
- Remove the hack needed to get around the bad docs files in the
  3.0.8 tarball.
- Change the comment in winbind.init to point at the correct pidfile.
  This closes #76641

* Mon Nov 22 2004 Than Ngo <than@redhat.com> 3.0.8-4
- fix unresolved symbols in libsmbclient which caused applications
  such as KDE's konqueror to fail when accessing smb:// URLs. #139894

* Thu Nov 11 2004 Jay Fenlason <fenlason@redhat.com> 3.0.8-3.1
- Rescue the install.mount.smbfs patch from Juanjo Villaplana
  (villapla@si.uji.es) to prevent building the srpm from trashing your
  installed /usr/bin/smbmount

* Tue Nov 9 2004 Jay Fenlason <fenlason@redhat.com> 3.0.8-3
- Include the corrected docs tarball, and use it instead of the
  obsolete docs from the upstream 3.0.8 tarball.
- Update the logfiles patch to work with the updated docs.

* Mon Nov 8 2004 Jay Fenlason <fenlason@redhat.com> 3.0.8-2
- New upstream version fixes CAN-2004-0930.  This obsoletes the
  disable-sendfile, salt, signing-shortkey and fqdn patches.
- Add my <fenlason@redhat.com> ugly non-ascii-domain patch.
- Updated the pie patch for 3.0.8.
- Updated the logfiles patch for 3.0.8.

* Tue Oct 26 2004 Jay Fenlason <fenlason@redhat.com> 3.0.8-0.pre2
- New upstream version
- Add Nalin's signing-shortkey patch.

* Tue Oct 19 2004 Jay Fenlason <fenlason@redhat.com> 3.0.8-0.pre1.3
- disable the -salt patch, because it causes undefined references in
  libsmbclient that prevent gnome-vfs from building.

* Fri Oct 15 2004 Jay Fenlason <fenlason@redhat.com> 3.0.8-0.pre1.2
- Re-enable the x_fclose patch that was accidentally disabled
  in 3.0.8-0.pre1.1.  This closes #135832
- include Nalin's -fqdn and -salt patches.

* Wed Oct 13 2004 Jay Fenlason <fenlason@redhat.com> 3.0.8-0.pre1.1
- Include disable-sendfile patch to default "use sendfile" to "no".
  This closes #132779

* Wed Oct 6 2004 Jay Fenlason <fenlason@redhat.com>
- Include patch from Steven Lawrance (slawrance@yahoo.com) that modifies
  smbmnt to work with 32-bit uids.

* Mon Sep 27 2004 Jay Fenlason <fenlason@redhat.com> 3.0.8-0.pre1
- new upstream release.  This obsoletes the ldapsam_compat patches.

* Wed Sep 15 2004 Jay Fenlason <fenlason@redhat.com> 3.0.7-4
- Update docs section to not carryover the docs/manpages directory
  This moved many files from /usr/share/doc/samba-3.0.7/docs/* to
  /usr/share/doc/samba-3.0.7/*
- Modify spec file as suggested by Rex Dieter (rdieter@math.unl.edu)
  to correctly create libsmbclient.so.0 and to use %_initrddir instead
  of rolling our own.  This closes #132642
- Add patch to default "use sendfile" to no, since sendfile appears to
  be broken
- Add patch from Volker Lendecke <vl@samba.org> to help make
  ldapsam_compat work again.
- Add patch from "Vince Brimhall" <vbrimhall@novell.com> for ldapsam_compat
  These two patches close bugzilla #132169

* Mon Sep 13 2004 Jay Fenlason <fenlason@redhat.com> 3.0.7-3
- Upgrade to 3.0.7, which fixes CAN-2004-0807 CAN-2004-0808
  This obsoletes the 3.0.6-schema patch.
- Update BuildRequires line to include openldap-devel openssl-devel
  and cups-devel

* Mon Aug 16 2004 Jay Fenlason <fenlason@redhat.com> 3.0.6-3
- New upstream version.
- Include post 3.0.6 patch from "Gerald (Jerry) Carter" <jerry@samba.org>
  to fix a duplicate in the LDAP schema.
- Include 64-bit timestamp patch from Ravikumar (rkumar@hp.com)
  to allow correct timestamp handling on 64-bit platforms and fix #126109.
- reenable the -pie patch.  Samba is too widely used, and too vulnerable
  to potential security holes to disable an important security feature
  like -pie.  The correct fix is to have the toolchain not create broken
  executables when programs compiled -pie are stripped.
- Remove obsolete patches.
- Modify this spec file to put libsmbclient.{a,so} in the right place on
  x86_64 machines.

* Wed Aug  5 2004 Jason Vas Dias <jvdias@redhat.com> 3.0.5-3
- Removed '-pie' patch - 3.0.5 uses -fPIC/-PIC, and the combination
- resulted in executables getting corrupt stacks, causing smbmnt to
- get a SIGBUS in the mount() call (bug 127420).

* Fri Jul 30 2004 Jay Fenlason <fenlason@redhat.com> 3.0.5-2
- Upgrade to 3.0.5, which is a regression from 3.0.5pre1 for a
  security fix.
- Include the 3.0.4-backport patch from the 3E branch.  This restores
  some of the 3.0.5pre1 and 3.0.5rc1 functionality.

* Tue Jul 20 2004 Jay Fenlason <fenlason@redhat.com> 3.0.5-0.pre1.1
- Backport base64_decode patche to close CAN-2004-0500
- Backport hash patch to close CAN-2004-0686
- use_authtok patch from Nalin Dahyabhai <nalin@redhat.com>
- smbclient-kerberos patch from Alexander Larsson <alexl@redhat.com>
- passwd patch uses "*" instead of "x" for "hashed" passwords for
  accounts created by winbind.  "x" means "password is in /etc/shadow" to
  brain-damaged pam_unix module.

* Fri Jul 2 2004 Jay Fenlason <fenlason@redhat.com> 3.0.5.0pre1.0
- New upstream version
- use % { SOURCE1 } instead of a hardcoded path
- include -winbind patch from Gerald (Jerry) Carter (jerry@samba.org)
  https://bugzilla.samba.org/show_bug.cgi?id=1315
  to make winbindd work against Windows versions that do not have
  128 bit encryption enabled.
- Moved %{_bindir}/net to the -common package, so that folks who just
  want to use winbind, etc don't have to install -client in order to
  "net join" their domain.
- New upstream version obsoletes the patches added in 3.0.3-5
- Remove smbgetrc.5 man page, since we don't ship smbget.

* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Tue May 4 2004 Jay Fenlason <fenlason@redhat.com> 3.0.3-5
- Patch to allow password changes from machines patched with
  Microsoft hotfix MS04-011.
- Include patches for https://bugzilla.samba.org/show_bug.cgi?id=1302
  and https://bugzilla.samba.org/show_bug.cgi?id=1309

* Thu Apr 29 2004 Jay Fenlason <fenlason@redhat.com> 3.0.3-4
- Samba 3.0.3 released.

* Wed Apr 21 2004 jay Fenlason <fenlason@redhat.com> 3.0.3-3.rc1
- New upstream version
- updated spec file to make libsmbclient.so executable.  This closes
  bugzilla #121356

* Mon Apr 5 2004 Jay Fenlason <fenlason@redhat.com> 3.0.3-2.pre2
- New upstream version  
- Updated configure line to remove --with-fhs and to explicitly set all
  the directories that --with-fhs was setting.  We were overriding most of
  them anyway.  This closes #118598

* Mon Mar 15 2004 Jay Fenlason <fenlason@redhat.com> 3.0.3-1.pre1
- New upstream version.
- Updated -pie and -logfiles patches for 3.0.3pre1
- add krb5-devel to buildrequires, fixes #116560
- Add patch from Miloslav Trmac (mitr@volny.cz) to allow non-root to run
  "service smb status".  This fixes #116559

* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Mon Feb 16 2004 Jay Fenlason <fenlason@redhat.com> 3.0.2a-1
- Upgrade to 3.0.2a

* Mon Feb 16 2004 Karsten Hopp <karsten@redhat.de> 3.0.2-7 
- fix ownership in -common package

* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Fri Feb 13 2004 Jay Fenlason <fenlason@redhat.com>
- Change all requires lines to list an explicit epoch.  Closes #102715
- Add an explicit Epoch so that %{epoch} is defined.

* Mon Feb 9 2004 Jay Fenlason <fenlason@redhat.com> 3.0.2-5
- New upstream version: 3.0.2 final includes security fix for #114995
  (CAN-2004-0082)
- Edit postun script for the -common package to restart winbind when
  appropriate.  Fixes bugzilla #114051.

* Mon Feb 2 2004 Jay Fenlason <fenlason@redhat.com> 3.0.2-3rc2
- add %dir entries for %{_libdir}/samba and %{_libdir}/samba/charset
- Upgrade to new upstream version
- build mount.cifs for the new cifs filesystem in the 2.6 kernel.

* Mon Jan 19 2004 Jay Fenlason <fenlason@redhat.com> 3.0.2-1rc1
- Upgrade to new upstream version

* Wed Dec 17 2003 Felipe Alfaro Solana <felipe_alfaro@linuxmail.org> 3.0.1-1
- Update to 3.0.1
- Removed testparm patch as it's already merged
- Removed Samba.7* man pages
- Fixed .buildroot patch
- Fixed .pie patch
- Added new /usr/bin/tdbdump file

* Thu Sep 25 2003 Jay Fenlason <fenlason@redhat.com> 3.0.0-15
- New 3.0.0 final release
- merge nmbd-netbiosname and testparm patches from 3E branch
- updated the -logfiles patch to work against 3.0.0
- updated the pie patch
- update the VERSION file during build
- use make -j if avaliable
- merge the winbindd_privileged change from 3E
- merge the "rm /usr/lib" patch that allows Samba to build on 64-bit
  platforms despite the broken Makefile

* Mon Aug 18 2003 Jay Fenlason <fenlason@redhat.com>
- Merge from samba-3E-branch after samba-3.0.0rc1 was released

* Wed Jul 23 2003 Jay Fenlason <fenlason@redhat.com> 3.0.0-3beta3
- Merge from 3.0.0-2beta3.3E
- (Correct log file names (#100981).)
- (Fix pidfile directory in samab.log)
- (Remove obsolete samba-3.0.0beta2.tar.bz2.md5 file)
- (Move libsmbclient to the -common package (#99449))

* Tue Jun 22 2003 Nalin Dahyabhai <nalin@redhat.com> 2.2.8a-4
- rebuild

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Wed May 28 2003 Jay Fenlason <fenlason@redhat.com> 2.2.8a-2
- add libsmbclient.so for gnome-vfs-extras
- Edit specfile to specify /var/run for pid files
- Move /tmp/.winbindd/socket to /var/run/winbindd/socket

* Wed May 14 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- add proper ldconfig calls

* Thu Apr 24 2003 Jay Fenlason <fenlason@redhat.com> 2.2.8a-1
- upgrade to 2.2.8a
- remove old .md5 files
- add "pid directory = /var/run" to the smb.conf file.  Fixes #88495
- Patch from jra@dp.samba.org to fix a delete-on-close regression

* Mon Mar 24 2003 Jay Fenlason <fenlason@redhat.com> 2.2.8-0
- Upgrade to 2.2.8
- removed commented out patches.
- removed old patches and .md5 files from the repository.
- remove duplicate /sbin/chkconfig --del winbind which causes
  warnings when removing samba.
- Fixed minor bug in smbprint that causes it to fail when called with
  more than 10 parameters: the accounting file (and spool directory
  derived from it) were being set wrong due to missing {}.  This closes
  bug #86473.
- updated smb.conf patch, includes new defaults to close bug #84822.

* Mon Feb 24 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Thu Feb 20 2003 Jonathan Blandford <jrb@redhat.com> 2.2.7a-5
- remove swat.desktop file

* Thu Feb 20 2003 Nalin Dahyabhai <nalin@redhat.com> 2.2.7a-4
- relink libnss_wins.so with SHLD="%{__cc} -lnsl" to force libnss_wins.so to
  link with libnsl, avoiding unresolved symbol errors on functions in libnsl

* Mon Feb 10 2003 Jay Fenlason <fenlason@redhat.com> 2.2.7a-3
- edited spec file to put .so files in the correct directories
  on 64-bit platforms that have 32-bit compatability issues
  (sparc64, x86_64, etc).  This fixes bugzilla #83782.
- Added samba-2.2.7a-error.patch from twaugh.  This fixes
  bugzilla #82454.

* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Thu Jan  9 2003 Jay Fenlason <fenlason@redhat.com> 2.2.7a-1
- Update to 2.2.7a
- Change default printing system to CUPS
- Turn on pam_smbpass
- Turn on msdfs

* Sat Jan  4 2003 Jeff Johnson <jbj@redhat.com> 2.2.7-5
- use internal dep generator.

* Sat Dec 14 2002 Tim Powers <timp@redhat.com> 2.2.7-4
- don't use rpms internal dep generator

* Mon Dec 02 2002 Elliot Lee <sopwith@redhat.com> 2.2.7-3
- Fix missing doc files.
- Fix multilib issues

* Wed Nov 20 2002 Bill Nottingham <notting@redhat.com> 2.2.7-2
- update to 2.2.7
- add patch for LFS in smbclient (<tcallawa@redhat.com>)

* Wed Aug 28 2002 Trond Eivind Glomsød <teg@redhat.com> 2.2.5-10
- logrotate fixes (#65007)

* Mon Aug 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.5-9
- /usr/lib was used in place of %%{_libdir} in three locations (#72554)

* Mon Aug  5 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.5-8
- Initscript fix (#70720)

* Fri Jul 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.5-7
- Enable VFS support and compile the "recycling" module (#69796)
- more selective includes of the examples dir 

* Tue Jul 23 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.5-6
- Fix the lpq parser for better handling of LPRng systems (#69352)

* Tue Jul 23 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.5-5
- desktop file fixes (#69505)

* Wed Jun 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.5-4
- Enable ACLs

* Tue Jun 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.5-3
- Make it not depend on Net::LDAP - those are doc files and examples

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu Jun 20 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.5-1
- 2.2.5

* Fri Jun 14 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.4-5
- Move the post/preun of winbind into the -common subpackage, 
  where the script is (#66128)

* Tue Jun  4 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.4-4
- Fix pidfile locations so it runs properly again (2.2.4 
  added a new directtive - #65007)

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue May 14 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.4-2
- Fix #64804

* Thu May  9 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.4-1
- 2.2.4
- Removed some zero-length and CVS internal files
- Make it build

* Wed Apr 10 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.3a-6
- Don't use /etc/samba.d in smbadduser, it should be /etc/samba

* Thu Apr  4 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.3a-5
- Add libsmbclient.a w/headerfile for KDE (#62202)

* Tue Mar 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.3a-4
- Make the logrotate script look the correct place for the pid files 

* Thu Mar 14 2002 Nalin Dahyabhai <nalin@redhat.com> 2.2.3a-3
- include interfaces.o in pam_smbpass.so, which needs symbols from interfaces.o
  (patch posted to samba-list by Ilia Chipitsine)

* Thu Feb 21 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.3a-2
- Rebuild

* Thu Feb  7 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.3a-1
- 2.2.3a

* Mon Feb  4 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.2.3-1
- 2.2.3

* Thu Nov 29 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.2.2-8
- New pam configuration file for samba

* Tue Nov 27 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.2.2-7
- Enable PAM session controll and password sync

* Tue Nov 13 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.2.2-6
- Move winbind files to samba-common. Add separate initscript for
  winbind 
- Fixes for winbind - protect global variables with mutex, use
  more secure getenv

* Thu Nov  8 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.2.2-5
- Teach smbadduser about "getent passwd" 
- Fix more pid-file references
- Add (conditional) winbindd startup to the initscript, configured in
  /etc/sysconfig/samba

* Wed Nov  7 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.2.2-4
- Fix pid-file reference in logrotate script
- include pam and nss modules for winbind

* Mon Nov  5 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.2.2-3
- Add "--with-utmp" to configure options (#55372)
- Include winbind, pam_smbpass.so, rpcclient and smbcacls
- start using /var/cache/samba, we need to keep state and there is
  more than just locks involved

* Sat Nov 03 2001 Florian La Roche <Florian.LaRoche@redhat.de> 2.2.2-2
- add "reload" to the usage string in the startup script

* Mon Oct 15 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.2.2-1
- 2.2.2

* Tue Sep 18 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.2.1a-5
- Add patch from Jeremy Allison to fix IA64 alignment problems (#51497)

* Mon Aug 13 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Don't include smbpasswd in samba, it's in samba-common (#51598)
- Add a disabled "obey pam restrictions" statement - it's not
  active, as we use encrypted passwords, but if the admin turns
  encrypted passwords off the choice is available. (#31351)

* Wed Aug  8 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Use /var/cache/samba instead of /var/lock/samba 
- Remove "domain controller" keyword from smb.conf, it's 
  deprecated (from #13704)
- Sync some examples with smb.conf.default
- Fix password synchronization (#16987)

* Fri Jul 20 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Tweaks of BuildRequires (#49581)

* Wed Jul 11 2001 Trond Eivind Glomsrød <teg@redhat.com>
- 2.2.1a bugfix release

* Tue Jul 10 2001 Trond Eivind Glomsrød <teg@redhat.com>
- 2.2.1, which should work better for XP

* Sat Jun 23 2001 Trond Eivind Glomsrød <teg@redhat.com>
- 2.2.0a security fix
- Mark lograte and pam configuration files as noreplace

* Fri Jun 22 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Add the /etc/samba directory to samba-common

* Thu Jun 21 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Add improvements to the smb.conf as suggested in #16931

* Tue Jun 19 2001 Trond Eivind Glomsrød <teg@redhat.com>
  (these changes are from the non-head version)
- Don't include /usr/sbin/samba, it's the same as the initscript
- unset TMPDIR, as samba can't write into a TMPDIR owned 
  by root (#41193)
- Add pidfile: lines for smbd and nmbd and a config: line
  in the initscript  (#15343)
- don't use make -j
- explicitly include /usr/share/samba, not just the files in it

* Tue Jun 19 2001 Bill Nottingham <notting@redhat.com>
- mount.smb/mount.smbfs go in /sbin, *not* %%{_sbindir}

* Fri Jun  8 2001 Preston Brown <pbrown@redhat.com>
- enable encypted passwords by default

* Thu Jun  7 2001 Helge Deller <hdeller@redhat.de> 
- build as 2.2.0-1 release
- skip the documentation-directories docbook, manpages and yodldocs
- don't include *.sgml documentation in package
- moved codepage-directory to /usr/share/samba/codepages
- make it compile with glibc-2.2.3-10 and kernel-headers-2.4.2-2   

* Mon May 21 2001 Helge Deller <hdeller@redhat.de> 
- updated to samba 2.2.0
- moved codepages to %{_datadir}/samba/codepages
- use all available CPUs for building rpm packages
- use %{_xxx} defines at most places in spec-file
- "License:" replaces "Copyright:"
- dropped excludearch sparc
- de-activated japanese patches 100 and 200 for now 
  (they need to be fixed and tested wth 2.2.0)
- separated swat.desktop file from spec-file and added
  german translations
- moved /etc/sysconfig/samba to a separate source-file
- use htmlview instead of direct call to netscape in 
  swat.desktop-file

* Mon May  7 2001 Bill Nottingham <notting@redhat.com>
- device-remove security fix again (<tridge@samba.org>)

* Fri Apr 20 2001 Bill Nottingham <notting@redhat.com>
- fix tempfile security problems, officially (<tridge@samba.org>)
- update to 2.0.8

* Sun Apr  8 2001 Bill Nottingham <notting@redhat.com>
- turn of SSL, kerberos

* Thu Apr  5 2001 Bill Nottingham <notting@redhat.com>
- fix tempfile security problems (patch from <Marcus.Meissner@caldera.de>)

* Thu Mar 29 2001 Bill Nottingham <notting@redhat.com>
- fix quota support, and quotas with the 2.4 kernel (#31362, #33915)

* Mon Mar 26 2001 Nalin Dahyabhai <nalin@redhat.com>
- tweak the PAM code some more to try to do a setcred() after initgroups()
- pull in all of the optflags on i386 and sparc
- don't explicitly enable Kerberos support -- it's only used for password
  checking, and if PAM is enabled it's a no-op anyway

* Mon Mar  5 2001 Tim Waugh <twaugh@redhat.com>
- exit successfully from preun script (bug #30644).

* Fri Mar  2 2001 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new environment

* Wed Feb 14 2001 Bill Nottingham <notting@redhat.com>
- updated japanese stuff (#27683)

* Fri Feb  9 2001 Bill Nottingham <notting@redhat.com>
- fix trigger (#26859)

* Wed Feb  7 2001 Bill Nottingham <notting@redhat.com>
- add i18n support, japanese patch (#26253)

* Wed Feb  7 2001 Trond Eivind Glomsrød <teg@redhat.com>
- i18n improvements in initscript (#26537)

* Wed Jan 31 2001 Bill Nottingham <notting@redhat.com>
- put smbpasswd in samba-common (#25429)

* Wed Jan 24 2001 Bill Nottingham <notting@redhat.com>
- new i18n stuff

* Sun Jan 21 2001 Bill Nottingham <notting@redhat.com>
- rebuild

* Thu Jan 18 2001 Bill Nottingham <notting@redhat.com>
- i18n-ize initscript
- add a sysconfig file for daemon options (#23550)
- clarify smbpasswd man page (#23370)
- build with LFS support (#22388)
- avoid extraneous pam error messages (#10666)
- add Urban Widmark's bug fixes for smbmount (#19623)
- fix setgid directory modes (#11911)
- split swat into subpackage (#19706)

* Wed Oct 25 2000 Nalin Dahyabhai <nalin@redhat.com>
- set a default CA certificate path in smb.conf (#19010)
- require openssl >= 0.9.5a-20 to make sure we have a ca-bundle.crt file

* Mon Oct 16 2000 Bill Nottingham <notting@redhat.com>
- fix swat only_from line (#18726, others)
- fix attempt to write outside buildroot on install (#17943)

* Mon Aug 14 2000 Bill Nottingham <notting@redhat.com>
- add smbspool back in (#15827)
- fix absolute symlinks (#16125)

* Sun Aug 6 2000 Philipp Knirsch <pknirsch@redhat.com>
- bugfix for smbadduser script (#15148)

* Mon Jul 31 2000 Matt Wilson <msw@redhat.com>
- patch configure.ing (patch11) to disable cups test
- turn off swat by default

* Fri Jul 28 2000 Bill Nottingham <notting@redhat.com>
- fix condrestart stuff

* Fri Jul 21 2000 Bill Nottingham <notting@redhat.com>
- add copytruncate to logrotate file (#14360)
- fix init script (#13708)

* Sat Jul 15 2000 Bill Nottingham <notting@redhat.com>
- move initscript back
- remove 'Using Samba' book from %%doc 
- move stuff to /etc/samba (#13708)
- default configuration tweaks (#13704)
- some logrotate tweaks

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Tue Jul 11 2000 Bill Nottingham <notting@redhat.com>
- fix logrotate script (#13698)

* Thu Jul  6 2000 Bill Nottingham <notting@redhat.com>
- fix initscripts req (prereq /etc/init.d)

* Wed Jul 5 2000 Than Ngo <than@redhat.de>
- add initdir macro to handle the initscript directory
- add a new macro to handle /etc/pam.d/system-auth

* Thu Jun 29 2000 Nalin Dahyabhai <nalin@redhat.com>
- enable Kerberos 5 and SSL support
- patch for duplicate profile.h headers

* Thu Jun 29 2000 Bill Nottingham <notting@redhat.com>
- fix init script

* Tue Jun 27 2000 Bill Nottingham <notting@redhat.com>
- rename samba logs (#11606)

* Mon Jun 26 2000 Bill Nottingham <notting@redhat.com>
- initscript munging

* Fri Jun 16 2000 Bill Nottingham <notting@redhat.com>
- configure the swat stuff usefully
- re-integrate some specfile tweaks that got lost somewhere

* Thu Jun 15 2000 Bill Nottingham <notting@redhat.com>
- rebuild to get rid of cups dependency

* Wed Jun 14 2000 Nalin Dahyabhai <nalin@redhat.com>
- tweak logrotate configurations to use the PID file in /var/lock/samba

* Sun Jun 11 2000 Bill Nottingham <notting@redhat.com>
- rebuild in new environment

* Thu Jun  1 2000 Nalin Dahyabhai <nalin@redhat.com>
- change PAM setup to use system-auth

* Mon May  8 2000 Bill Nottingham <notting@redhat.com>
- fixes for ia64

* Sat May  6 2000 Bill Nottingham <notting@redhat.com>
- switch to %%configure

* Wed Apr 26 2000 Nils Philippsen <nils@redhat.de>
- version 2.0.7

* Sun Mar 26 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- simplify preun

* Thu Mar 16 2000 Bill Nottingham <notting@redhat.com>
- fix yp_get_default_domain in autoconf
- only link against readline for smbclient
- fix log rotation (#9909)

* Fri Feb 25 2000 Bill Nottingham <notting@redhat.com>
- fix trigger, again.

* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
- fix trigger.

* Fri Feb  4 2000 Bill Nottingham <notting@redhat.com>
- turn on quota support

* Mon Jan 31 2000 Cristian Gafton <gafton@redhat.com>
- rebuild to fox dependencies
- man pages are compressed

* Fri Jan 21 2000 Bill Nottingham <notting@redhat.com>
- munge post scripts slightly

* Wed Jan 19 2000 Bill Nottingham <notting@redhat.com>
- turn on mmap again. Wheee.
- ship smbmount on alpha

* Mon Dec  6 1999 Bill Nottingham <notting@redhat.com>
- turn off mmap. ;)

* Wed Dec  1 1999 Bill Nottingham <notting@redhat.com>
- change /var/log/samba to 0700
- turn on mmap support

* Thu Nov 11 1999 Bill Nottingham <notting@redhat.com>
- update to 2.0.6

* Fri Oct 29 1999 Bill Nottingham <notting@redhat.com>
- add a %defattr for -common

* Tue Oct  5 1999 Bill Nottingham <notting@redhat.com>
- shift some files into -client
- remove /home/samba from package.

* Tue Sep 28 1999 Bill Nottingham <notting@redhat.com>
- initscript oopsie. killproc <name> -HUP, not other way around.

* Sat Sep 26 1999 Bill Nottingham <notting@redhat.com>
- script cleanups. Again.

* Wed Sep 22 1999 Bill Nottingham <notting@redhat.com>
- add a patch to fix dropped reconnection attempts

* Mon Sep  6 1999 Jeff Johnson <jbj@redhat.com>
- use cp rather than mv to preserve /etc/services perms (#4938 et al).
- use mktemp to generate /etc/tmp.XXXXXX file name.
- add prereqs on sed/mktemp/killall (need to move killall to /bin).
- fix trigger syntax (i.e. "samba < 1.9.18p7" not "samba < samba-1.9.18p7")

* Mon Aug 30 1999 Bill Nottingham <notting@redhat.com>
- sed "s|nawk|gawk|" /usr/bin/convert_smbpasswd

* Sat Aug 21 1999 Bill Nottingham <notting@redhat.com>
- fix typo in mount.smb

* Fri Aug 20 1999 Bill Nottingham <notting@redhat.com>
- add a %trigger to work around (sort of) broken scripts in
  previous releases

* Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
- initscript munging

* Mon Aug  9 1999 Bill Nottingham <notting@redhat.com>
- add domain parsing to mount.smb

* Fri Aug  6 1999 Bill Nottingham <notting@redhat.com>
- add a -common package, shuffle files around.

* Fri Jul 23 1999 Bill Nottingham <notting@redhat.com>
- add a chmod in %postun so /etc/services & inetd.conf don't become unreadable

* Wed Jul 21 1999 Bill Nottingham <notting@redhat.com>
- update to 2.0.5
- fix mount.smb - smbmount options changed again.........
- fix postun. oops.
- update some stuff from the samba team's spec file.

* Fri Jun 18 1999 Bill Nottingham <notting@redhat.com>
- split off clients into separate package
- don't run samba by default

* Mon Jun 14 1999 Bill Nottingham <notting@redhat.com>
- fix one problem with mount.smb script
- fix smbpasswd on sparc with a really ugly kludge

* Thu Jun 10 1999 Dale Lovelace <dale@redhat.com>
- fixed logrotate script

* Tue May 25 1999 Bill Nottingham <notting@redhat.com>
- turn of 64-bit locking on 32-bit platforms

* Thu May 20 1999 Bill Nottingham <notting@redhat.com>
- so many releases, so little time
- explicitly uncomment 'printing = bsd' in sample config

* Tue May 18 1999 Bill Nottingham <notting@redhat.com>
- update to 2.0.4a
- fix mount.smb arg ordering

* Fri Apr 16 1999 Bill Nottingham <notting@redhat.com>
- go back to stop/start for restart (-HUP didn't work in testing)

* Fri Mar 26 1999 Bill Nottingham <notting@redhat.com>
- add a mount.smb to make smb mounting a little easier.
- smb filesystems apparently don't work on alpha. Oops.

* Thu Mar 25 1999 Bill Nottingham <notting@redhat.com>
- always create codepages

* Tue Mar 23 1999 Bill Nottingham <notting@redhat.com>
- logrotate changes

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 3)

* Fri Mar 19 1999 Preston Brown <pbrown@redhat.com>
- updated init script to use graceful restart (not stop/start)

* Tue Mar  9 1999 Bill Nottingham <notting@redhat.com>
- update to 2.0.3

* Thu Feb 18 1999 Bill Nottingham <notting@redhat.com>
- update to 2.0.2

* Mon Feb 15 1999 Bill Nottingham <notting@redhat.com>
- swat swat

* Tue Feb  9 1999 Bill Nottingham <notting@redhat.com>
- fix bash2 breakage in post script

* Fri Feb  5 1999 Bill Nottingham <notting@redhat.com>
- update to 2.0.0

* Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com>
- make sure all binaries are stripped

* Thu Sep 17 1998 Jeff Johnson <jbj@redhat.com>
- update to 1.9.18p10.
- fix %triggerpostun.

* Tue Jul 07 1998 Erik Troan <ewt@redhat.com>
- updated postun triggerscript to check $0
- clear /etc/codepages from %preun instead of %postun

* Mon Jun 08 1998 Erik Troan <ewt@redhat.com>
- made the %postun script a tad less agressive; no reason to remove
  the logs or lock file (after all, if the lock file is still there,
  samba is still running)
- the %postun and %preun should only exectute if this is the final
  removal
- migrated %triggerpostun from Red Hat's samba package to work around
  packaging problems in some Red Hat samba releases

* Sun Apr 26 1998 John H Terpstra <jht@samba.anu.edu.au>
- minor tidy up in preparation for release of 1.9.18p5
- added findsmb utility from SGI package

* Wed Mar 18 1998 John H Terpstra <jht@samba.anu.edu.au>
- Updated version and codepage info.
- Release to test name resolve order

* Sat Jan 24 1998 John H Terpstra <jht@samba.anu.edu.au>
- Many optimisations (some suggested by Manoj Kasichainula <manojk@io.com>
- Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb
- Compounded make line
- Updated smb.init restart mechanism
- Use compound mkdir -p line instead of individual calls to mkdir
- 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

