1# Note that this file exists in Mandrake packaging cvs (as samba3.spec)
2# and samba cvs (as packaging/Mandrake/samba2.spec.tmpl).
3# Keep in mind that any changes should take both locations into account
4# Considerable effort has gone into making this possible, so that only
5# one spec file is maintained, please don't break it.
6# It should be possible, without any changes to this file, to build
7# binary packages on most recent Mandrake releases:
8# 1)from official source releases, using 'cd packaging/Mandrake; sh makerpms.sh'
9# 2)from cvs snapshots, using 'cd packaging/Mandrake; sh makerpms-cvs.sh <ver>'
10# 3)using official source releases and updated Mandrake packaging, by
11#   'rpm -ba samba.spec'
12# As such, any sources or patches used in a build from a samba release or
13# cvs should be submitted for inclusion in samba cvs.
14
15%define pkg_name	samba
16%define ver 		3.0.1pre3
17%define rel 		5mdk
18%define vscanver 	0.3.3beta1
19%define libsmbmajor 	0
20
21%{!?lib: %global lib lib}
22%{!?mklibname: %global mklibname(ds) %lib%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}}
23
24%define libname %mklibname smbclient %libsmbmajor
25
26# Version and release replaced by samba-team at release from samba cvs
27%define pversion 3.0.2
28%define prelease 1
29
30#Check to see if p(version|release) has been replaced (1 if replaced)
31%define have_pversion %(if [ "%pversion" = `echo "pversion" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)
32%define have_prelease %(if [ "%prelease" = `echo "prelease" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)
33
34%if %have_pversion
35%define source_ver 	%{pversion}
36# Don't abort for stupid reasons on builds from tarballs:
37%global	_unpackaged_files_terminate_build	0
38%global	_missing_doc_files_terminate_build	0
39%else
40%define source_ver 	%{ver}
41%endif
42
43# We might have a prerelease:
44%define have_pre %(echo %source_ver|awk '{p=0} /[a-z,A-Z][a-z,A-Z]/ {p=1} {print p}')
45%if %have_pre
46%define pre_ver %(perl -e '$name="%source_ver"; print ($name =~ /(.*?)[a-z]/);')
47%define pre_pre %(echo %source_ver|sed -e 's/%pre_ver//g')
48%endif
49
50# Check to see if we are running a build from a tarball release from samba.org
51# (%have_pversion) If so, disable vscan, unless explicitly requested
52# (--with vscan).
53%define build_vscan 	1
54%if %have_pversion
55%define build_vscan 	0
56%{?_with_vscan: %define build_vscan 1}
57%endif
58
59# We now do detection of the Mandrake release we are building on:
60#%define build_cooker %(if [ `awk '{print $3}' /etc/mandrake-release` = "Cooker" ];then echo 1; else echo 0; fi)
61#%define build_cooker %(if [[ `cat /etc/mandrake-release|grep Cooker` ]];then echo 1; else echo 0; fi)
62%define build_mdk100 %(if [ `awk '{print $4}' /etc/mandrake-release` = 10.0 ];then echo 1; else echo 0; fi)
63%define build_mdk92 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.2 ];then echo 1; else echo 0; fi)
64%define build_mdk91 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.1 ];then echo 1; else echo 0; fi)
65%define build_mdk90 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.0 ];then echo 1; else echo 0; fi)
66%define build_mdk82 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.2 ];then echo 1; else echo 0; fi)
67%define build_mdk81 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.1 ];then echo 1; else echo 0; fi)
68%define build_mdk80 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.0 ];then echo 1; else echo 0; fi)
69%define build_mdk72 %(if [ `awk '{print $4}' /etc/mandrake-release` = 7.2 ];then echo 1; else echo 0; fi)
70%define build_non_default 0
71
72# Default options
73%define build_alternatives	0
74%define build_system	0
75%define build_acl 	1
76%define build_winbind 	1
77%define build_wins 	1
78%define build_ldap 	0
79%define build_ads	1
80%define build_scanners	0
81# CUPS supports functionality for 'printcap name = cups' (9.0 and later):
82%define build_cupspc	0
83# %_{pre,postun}_service are provided by rpm-helper in 9.0 and later
84%define have_rpmhelper	1
85
86# Set defaults for each version
87%if %build_mdk100
88%define build_system	1
89%define build_alternatives	1
90%define build_cupspc	1
91%endif
92
93%if %build_mdk92
94%define build_alternatives	1
95%define build_cupspc	1
96%endif
97
98%if %build_mdk91
99%define build_cupspc	1
100%endif
101
102%if %build_mdk90
103%endif
104
105%if %build_mdk82
106%define have_rpmhelper	0
107%endif
108
109%if %build_mdk81
110%define build_winbind	0
111%define build_wins	0
112%define have_rpmhelper	0
113%endif
114
115%if %build_mdk80
116%define build_acl	0
117%define build_winbind	0
118%define build_wins	0
119%define build_ads	0
120%define have_rpmhelper	1
121%endif
122
123%if %build_mdk72
124%define build_acl	0
125%define build_winbind	0
126%define build_wins	0
127%define build_ads	0
128%define have_rpmhelper	1
129%endif
130
131
132# Allow commandline option overrides (borrowed from Vince's qmail srpm):
133# To use it, do rpm [-ba|--rebuild] --with 'xxx'
134# Check if the rpm was built with the defaults, otherwise we inform the user
135%define build_non_default 0
136%{?_with_system: %global build_system 1}
137%{?_without_system: %global build_system 0}
138%{?_with_acl: %global build_acl 1}
139%{?_with_acl: %global build_non_default 1}
140%{?_without_acl: %global build_acl 0}
141%{?_without_acl: %global build_non_default 1}
142%{?_with_winbind: %global build_winbind 1}
143%{?_with_winbind: %global build_non_default 1}
144%{?_without_winbind: %global build_winbind 0}
145%{?_without_winbind: %global build_non_default 1}
146%{?_with_wins: %global build_wins 1}
147%{?_with_wins: %global build_non_default 1}
148%{?_without_wins: %global build_wins 0}
149%{?_without_wins: %global build_non_default 1}
150%{?_with_ldap: %global build_ldap 1}
151%{?_with_ldap: %global build_non_default 1}
152%{?_without_ldap: %global build_ldap 0}
153%{?_without_ldap: %global build_non_default 1}
154%{?_with_ads: %global build_ads 1}
155%{?_with_ads: %global build_non_default 1}
156%{?_without_ads: %global build_ads 0}
157%{?_without_ads: %global build_non_default 1}
158%{?_with_scanners: %global build_scanners 1}
159%{?_with_scanners: %global build_non_default 1}
160
161# As if that weren't enough, we're going to try building with antivirus
162# support as an option also
163%define build_fprot 	0
164%define build_kaspersky 0
165%define build_mks 	0
166%define build_openav	0
167%define build_sophos 	0
168%define build_symantec 	0
169%define build_trend 0
170%if %build_vscan && %build_scanners
171#These can be enabled here by default
172# (kaspersky requires their library present)
173%define build_fprot 	1
174%define build_mks 	1
175%define build_openav 	1
176%define build_sophos 	1
177%define build_trend 	1
178%endif
179%if %build_vscan
180%{?_with_fprot: %{expand: %%global build_fprot 1}}
181%{?_with_kaspersky: %{expand: %%global build_kaspersky 1}}
182%{?_with_mks: %{expand: %%global build_mks 1}}
183%{?_with_openav: %{expand: %%global build_openav 1}}
184%{?_with_sophos: %{expand: %%global build_sophos 1}}
185#%{?_with_symantec: %{expand: %%global build_symantec 1}}
186%{?_with_trend: %{expand: %%global build_trend 1}}
187%global vscandir samba-vscan-%{vscanver}
188%endif
189%global vfsdir examples.bin/VFS
190
191#Standard texts for descriptions:
192%define message_bugzilla() %(echo -e -n "Please file bug reports for this package at Mandrake bugzilla \\n(http://qa.mandrakesoft.com) under the product name %{1}")
193%define message_system %(echo -e -n "NOTE: These packages of samba-%{version}, are provided, parallel installable\\nwith samba-2.2.x, to allow easy migration from samba-2.2.x to samba-%{version},\\nbut are not officially supported")
194
195#check gcc version to disable some optimisations on gcc-3.3.1
196%define gcc331 %(gcc -dumpversion|awk '{if ($1>3.3) print 1; else print 0}')
197
198#Define sets of binaries that we can use in globs and loops:
199%global commonbin net,ntlm_auth,rpcclient,smbcacls,smbcquotas,smbpasswd,smbtree,testparm,testprns
200
201%global serverbin 	editreg,pdbedit,profiles,smbcontrol,smbstatus,tdbbackup,tdbdump
202%global serversbin nmbd,samba,smbd,mkntpwd
203
204%global clientbin 	findsmb,nmblookup,smbclient,smbmnt,smbmount,smbprint,smbspool,smbtar,smbumount
205%global client_bin 	mount.cifs
206%global client_sbin 	mount.smb,mount.smbfs
207
208%global testbin 	debug2html,smbtorture,msgtest,masktest,locktest,locktest2,nsstest,vfstest
209
210%ifarch alpha
211%define build_expsam xml
212%else
213%define build_expsam mysql,xml
214%endif
215
216#Workaround missing macros in 8.x:
217%{!?perl_vendorlib: %{expand: %%global perl_vendorlib %{perl_sitearch}/../}}
218
219# Determine whether this is the system samba or not.
220%if %build_system
221%define samba_major	%{nil}
222%else
223%define samba_major	3
224%endif
225# alternatives_major is %{nil} if we aren't system and not using alternatives
226%if !%build_system || %build_alternatives
227%define alternative_major 3
228%else
229%define alternative_major %{nil}
230%endif
231
232Summary: Samba SMB server.
233Name: %{pkg_name}%{samba_major}
234
235%if %have_pre
236Version: %{pre_ver}
237%else
238Version: %{source_ver}
239%endif
240
241%if %have_prelease && !%have_pre
242Release: 1.%{prelease}mdk
243%endif
244%if %have_prelease && %have_pre
245Release: 0.%{pre_pre}.%{prelease}mdk
246%endif
247%if !%have_prelease && !%have_pre
248Release: %{rel}
249%endif
250%if !%have_prelease && %have_pre
251Release: 0.%{pre_pre}.%{rel}
252%endif
253
254License: GPL
255Group: System/Servers
256Source: ftp://samba.org/pub/samba/samba-%{source_ver}.tar.bz2
257URL:	http://www.samba.org
258Source1: samba.log
259Source3: samba.xinetd
260Source4: swat_48.png.bz2
261Source5: swat_32.png.bz2
262Source6: swat_16.png.bz2
263Source7: README.%{name}-mandrake-rpm
264%if %build_vscan
265Source8: samba-vscan-%{vscanver}.tar.bz2
266%endif
267Source10: samba-print-pdf.sh.bz2
268Patch1: smbw.patch.bz2
269Patch4: samba-3.0-smbmount-sbin.patch.bz2
270%if !%have_pversion
271# Version specific patches: current version
272%else
273# Version specific patches: upcoming version
274%endif
275# Limbo patches (applied to prereleases, but not preleases, ie destined for
276# samba CVS)
277%if %have_pversion && %have_pre
278%endif
279Requires: pam >= 0.64, samba-common = %{version}
280BuildRequires: pam-devel readline-devel libncurses-devel popt-devel
281BuildRequires: libxml2-devel
282%ifnarch alpha
283BuildRequires: mysql-devel
284%endif
285%if %build_acl
286BuildRequires: libacl-devel
287%endif
288%if %build_mdk72
289BuildRequires: cups-devel
290%else
291BuildRequires: libcups-devel
292%endif
293BuildRequires: libldap-devel
294%if %build_ads
295BuildRequires: libldap-devel krb5-devel
296%endif
297BuildRoot: %{_tmppath}/%{name}-%{version}-root
298Prefix: /usr
299Prereq: /sbin/chkconfig /bin/mktemp /usr/bin/killall
300Prereq: fileutils sed /bin/grep
301
302%description
303Samba provides an SMB server which can be used to provide
304network services to SMB (sometimes called "Lan Manager")
305clients, including various versions of MS Windows, OS/2,
306and other Linux machines. Samba also provides some SMB
307clients, which complement the built-in SMB filesystem
308in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
309and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
310protocol.
311
312Samba-3.0 features working NT Domain Control capability and
313includes the SWAT (Samba Web Administration Tool) that
314allows samba's smb.conf file to be remotely managed using your
315favourite web browser. For the time being this is being
316enabled on TCP port 901 via xinetd. SWAT is now included in
317it's own subpackage, samba-swat.
318
319Please refer to the WHATSNEW.txt document for fixup information.
320This binary release includes encrypted password support.
321
322Please read the smb.conf file and ENCRYPTION.txt in the
323docs directory for implementation details.
324%if %have_pversion
325%message_bugzilla samba3
326%endif 
327%if !%build_system
328%message_system
329%endif
330%if %build_non_default
331WARNING: This RPM was built with command-line options. Please
332see README.%{name}-mandrake-rpm in the documentation for
333more information.
334%endif
335
336%package server
337URL:	http://www.samba.org
338Summary: Samba (SMB) server programs.
339Requires: %{name}-common = %{version}
340%if %have_rpmhelper
341PreReq:		rpm-helper
342%endif
343Group: Networking/Other
344%if %build_system
345Provides: samba
346Obsoletes: samba
347Provides:  samba-server-ldap
348Obsoletes: samba-server-ldap
349Provides:  samba3-server
350Obsoletes: samba3-server
351%else
352#Provides: samba-server
353%endif
354
355%description server
356Samba-server provides a SMB server which can be used to provide
357network services to SMB (sometimes called "Lan Manager")
358clients. Samba uses NetBIOS over TCP/IP (NetBT) protocols
359and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
360protocol.
361
362Samba-3.0 features working NT Domain Control capability and
363includes the SWAT (Samba Web Administration Tool) that
364allows samba's smb.conf file to be remotely managed using your
365favourite web browser. For the time being this is being
366enabled on TCP port 901 via xinetd. SWAT is now included in
367it's own subpackage, samba-swat.
368
369Please refer to the WHATSNEW.txt document for fixup information.
370This binary release includes encrypted password support.
371
372Please read the smb.conf file and ENCRYPTION.txt in the
373docs directory for implementation details.
374%if %have_pversion
375%message_bugzilla samba3-server
376%endif
377%if !%build_system
378%message_system
379%endif
380
381%package client
382URL:	http://www.samba.org
383Summary: Samba (SMB) client programs.
384Group: Networking/Other
385Requires: %{name}-common = %{version}
386%if %build_alternatives
387#Conflicts:	samba-client < 2.2.8a-9mdk
388%endif
389%if %build_system
390Provides:  samba3-client
391Obsoletes: samba3-client
392Obsoletes: smbfs
393%else
394#Provides: samba-client
395%endif
396%if !%build_system && %build_alternatives
397Provides: samba-client
398%endif
399
400%description client
401Samba-client provides some SMB clients, which complement the built-in
402SMB filesystem in Linux. These allow the accessing of SMB shares, and
403printing to SMB printers.
404%if %have_pversion
405%message_bugzilla samba3-client
406%endif
407%if !%build_system
408%message_system
409%endif
410
411%package common
412URL:	http://www.samba.org
413Summary: Files used by both Samba servers and clients.
414Group: System/Servers
415%if %build_system
416Provides:  samba-common-ldap
417Obsoletes: samba-common-ldap
418Provides:  samba3-common
419Obsoletes: samba3-common
420%else
421#Provides: samba-common
422%endif
423
424%description common
425Samba-common provides files necessary for both the server and client
426packages of Samba.
427%if %have_pversion
428%message_bugzilla samba3-common
429%endif
430%if !%build_system
431%message_system
432%endif
433
434%package doc
435URL:	http://www.samba.org
436Summary: Documentation for Samba servers and clients.
437Group: System/Servers
438Requires: %{name}-common = %{version}
439%if %build_system
440Obsoletes: samba3-doc
441Provides:  samba3-doc
442%else
443#Provides: samba-doc
444%endif
445
446%description doc
447Samba-doc provides documentation files for both the server and client
448packages of Samba.
449%if %have_pversion
450%message_bugzilla samba3-doc
451%endif
452%if !%build_system
453%message_system
454%endif
455
456%package swat
457URL:	http://www.samba.org
458Summary: The Samba Web Administration Tool.
459Requires: %{name}-server = %{version}
460Requires: xinetd
461Group: System/Servers
462%if %build_system
463Provides:  samba-swat-ldap
464Obsoletes: samba-swat-ldap
465Provides:  samba3-swat
466Obsoletes: samba3-swat
467%else
468#Provides: samba-swat
469%endif
470
471%description swat
472SWAT (the Samba Web Administration Tool) allows samba's smb.conf file
473to be remotely managed using your favourite web browser. For the time
474being this is being enabled on TCP port 901 via xinetd. Note that
475SWAT does not use SSL encryption, nor does it preserve comments in
476your smb.conf file. Webmin uses SSL encryption by default, and
477preserves comments in configuration files, even if it does not display
478them, and is therefore the preferred method for remotely managing
479Samba.
480%if %have_pversion
481%message_bugzilla samba3-swat
482%endif
483%if !%build_system
484%message_system
485%endif
486
487%if %build_winbind
488%package winbind
489URL:	http://www.samba.org
490Summary: Samba-winbind daemon, utilities and documentation
491Group: System/Servers
492Requires: %{name}-common = %{version}
493%endif
494%if %build_winbind && !%build_system
495Conflicts: samba-winbind
496%endif
497%if %build_winbind
498%description winbind
499Provides the winbind daemon and testing tools to allow authentication 
500and group/user enumeration from a Windows or Samba domain controller.
501%endif
502%if %have_pversion
503%message_bugzilla samba3-winbind
504%endif
505%if !%build_system
506%message_system
507%endif
508
509%if %build_wins
510%package -n nss_wins%{samba_major}
511URL:	http://www.samba.org
512Summary: Name Service Switch service for WINS
513Group: System/Servers
514Requires: %{name}-common = %{version}
515PreReq: glibc
516%endif
517%if %build_wins && !%build_system
518Conflicts: nss_wins
519%endif
520%if %build_wins
521%description -n nss_wins%{samba_major}
522Provides the libnss_wins shared library which resolves NetBIOS names to 
523IP addresses.
524%endif
525%if %have_pversion
526%message_bugzilla nss_wins3
527%endif
528%if !%build_system
529%message_system
530%endif
531
532%if %{?_with_test:1}%{!?_with_test:0}
533%package test
534URL:	http://www.samba.org
535Summary: Debugging and benchmarking tools for samba
536Group: System/Servers
537Requires: %{name}-common = %{version}
538%endif
539%if %build_system && %{?_with_test:1}%{!?_with_test:0}
540Provides:  samba3-test samba3-debug
541Obsoletes: samba3-test samba3-debug
542%endif
543%if !%build_system && %{?_with_test:1}%{!?_with_test:0}
544Provides: samba-test samba3-debug
545Obsoletes: samba3-debug
546%endif
547%if %{?_with_test:1}%{!?_with_test:0}
548
549%description test
550This package provides tools for benchmarking samba, and debugging
551the correct operation of tools against smb servers.
552%endif
553
554%if %build_system
555%package -n %{libname}
556URL:		http://www.samba.org
557Summary: 	SMB Client Library
558Group:		System/Libraries
559Provides:	libsmbclient
560
561%description -n %{libname}
562This package contains the SMB client library, part of the samba
563suite of networking software, allowing other software to access
564SMB shares.
565%endif
566%if %have_pversion && %build_system
567%message_bugzilla %{libname}
568%endif
569
570%if %build_system
571%package -n %{libname}-devel
572URL:		http://www.samba.org
573Summary: 	SMB Client Library Development files
574Group:		System/Libraries
575Provides:	libsmbclient-devel
576Requires:       %{libname} = %{version}-%{release}
577
578%description -n %{libname}-devel
579This package contains the development files for the SMB client
580library, part of the samba suite of networking software, allowing
581the development of other software to access SMB shares.
582%endif
583%if %have_pversion && %build_system
584%message_bugzilla %{libname}-devel
585%endif
586
587%if %build_system
588%package -n %{libname}-static-devel
589URL:            http://www.samba.org
590Summary:        SMB Client Static Library Development files
591Group:          System/Libraries
592Provides:       libsmbclient-static-devel = %{version}-%{release}
593Requires:       %{libname}-devel = %{version}-%{release}
594
595%description -n %{libname}-static-devel
596This package contains the static development files for the SMB
597client library, part of the samba suite of networking software,
598allowing the development of other software to access SMB shares.
599%endif
600%if %have_pversion && %build_system
601%message_bugzilla %{libname}-devel
602%endif
603
604#%package passdb-ldap
605#URL:		http://www.samba.org
606#Summary:	Samba password database plugin for MySQL
607#Group:		System/Libraries
608#
609#%description passdb-ldap
610#The passdb-ldap package for samba provides a password database
611#backend allowing samba to store account details in an LDAP
612#database
613#_if %have_pversion
614#_message_bugzilla samba3-passdb-ldap
615#_endif
616#_if !%build_system
617#_message_system
618#_endif
619
620%ifnarch alpha
621%package passdb-mysql
622URL:		http://www.samba.org
623Summary:	Samba password database plugin for MySQL
624Group:		System/Libraries
625Requires:	%{name}-server = %{version}-%{release}
626%endif
627%ifnarch alpha && %build_system
628Obsoletes:	samba3-passdb-mysql 
629Provides:	samba3-passdb-mysql 
630%endif
631%ifnarch alpha
632
633%description passdb-mysql
634The passdb-mysql package for samba provides a password database
635backend allowing samba to store account details in a MySQL
636database
637%endif
638
639%package passdb-xml
640URL:		http://www.samba.org
641Summary:	Samba password database plugin for XML files
642Group:		System/Libraries
643Requires:	%{name}-server = %{version}-%{release}
644%if %build_system
645Obsoletes:	samba3-passdb-xml 
646Provides:	samba3-passdb-xml 
647%endif
648
649%description passdb-xml
650The passdb-xml package for samba provides a password database
651backend allowing samba to store account details in XML files.
652%if %have_pversion
653%message_bugzilla samba3-passdb-xml
654%endif
655%if !%build_system
656%message_system
657%endif
658
659#Antivirus packages:
660%if %build_fprot
661%package vscan-fprot
662Summary: On-access virus scanning for samba using FPROT
663Group: System/Servers
664Requires: %{name}-server = %{version}
665Provides: %{name}-vscan
666Autoreq: 0
667%description vscan-fprot
668A vfs-module for samba to implement on-access scanning using the
669FPROT antivirus software (which must be installed to use this).
670%endif
671
672%if %build_kaspersky
673%package vscan-kaspersky
674Summary: On-access virus scanning for samba using Kaspersky
675Group: System/Servers
676Requires: %{name}-server = %{version}
677Provides: %{name}-vscan
678Autoreq: 0
679%description vscan-kaspersky
680A vfs-module for samba to implement on-access scanning using the
681Kaspersky antivirus software (which must be installed to use this).
682%endif
683
684%if %build_mks
685%package vscan-mks
686Summary: On-access virus scanning for samba using MKS
687Group: System/Servers
688Requires: %{name}-server = %{version}
689Provides: %{name}-vscan
690Autoreq: 0
691%description vscan-mks
692A vfs-module for samba to implement on-access scanning using the
693MKS antivirus software (which must be installed to use this).
694%endif
695
696%if %build_openav
697%package vscan-openav
698Summary: On-access virus scanning for samba using OpenAntivirus
699Group: System/Servers
700Requires: %{name}-server = %{version}
701Provides: %{name}-vscan
702Autoreq: 0
703%description vscan-openav
704A vfs-module for samba to implement on-access scanning using the
705OpenAntivirus antivirus software (which must be installed to use this).
706%endif
707
708%if %build_sophos
709%package vscan-sophos
710Summary: On-access virus scanning for samba using Sophos
711Group: System/Servers
712Requires: %{name}-server = %{version}
713Provides: %{name}-vscan
714Autoreq: 0
715%description vscan-sophos
716A vfs-module for samba to implement on-access scanning using the
717Sophos antivirus software (which must be installed to use this).
718%endif
719
720%if %build_symantec
721%package vscan-symantec
722Summary: On-access virus scanning for samba using Symantec
723Group: System/Servers
724Requires: %{name}-server = %{version}
725Provides: %{name}-vscan
726Autoreq: 0
727%description vscan-symantec
728A vfs-module for samba to implement on-access scanning using the
729Symantec antivirus software (which must be installed to use this).
730%endif
731
732%if %build_trend
733%package vscan-trend
734Summary: On-access virus scanning for samba using Trend
735Group: System/Servers
736Requires: %{name}-server = %{version}
737Provides: %{name}-vscan
738Autoreq: 0
739%description vscan-trend
740A vfs-module for samba to implement on-access scanning using the
741Trend antivirus software (which must be installed to use this).
742%endif
743
744%prep
745
746# Allow users to query build options with --with options:
747#%define opt_status(%1)	%(echo %{1})
748%if %{?_with_options:1}%{!?_with_options:0}
749%define opt_status(%{1})	%(if [ %{1} -eq 1 ];then echo enabled;else echo disabled;fi)
750#exit 1
751%{error: }
752%{error:Build options available are:}
753%{error:--with[out] system   Build as the system samba package [or as samba3]}
754%{error:--with[out] acl      Build with support for file ACLs          - %opt_status %build_acl}
755%{error:--with[out] winbind  Build with Winbind support                - %opt_status %build_winbind}
756%{error:--with[out] wins     Build with WINS name resolution support   - %opt_status %build_wins}
757%{error:--with[out] ldap     Build with legacy (samba2) LDAP support   - %opt_status %build_ldap}
758%{error:--with[out] ads      Build with Active Directory support       - %opt_status %build_ads}
759%{error:--with[out] scanners Enable on-access virus scanners           - %opt_status %build_scanners}
760%{error: }
761%else
762%{error: }
763%{error: This rpm has build options available, use --with options to see them}
764%{error: }
765%endif
766
767%if %{?_with_options:1}%{!?_with_options:0} && %build_scanners
768%{error:--with scanners enables fprot,mks,openav,sophos and trend by default}
769%{error: }
770%{error:To enable others (requires development libraries for the scanner):}
771%{error:--with kaspersky     Enable on-access scanning with Kaspersky  - %opt_status %build_kaspersky}
772%{error: }
773%endif
774
775%if %{?_with_options:1}%{!?_with_options:0}
776clear
777exit 1
778%endif
779
780
781%if %build_non_default
782RPM_EXTRA_OPTIONS="\
783%{?_with_system: --with system}\
784%{?_without_system: --without system}\
785%{?_with_acl: --with acl}\
786%{?_without_acl: --without acl}\
787%{?_with_winbind: --with winbind}\
788%{?_without_winbind: --without winbind}\
789%{?_with_wins: --with wins}\
790%{?_without_wins: --without wins}\
791%{?_with_ldap: --with ldap}\
792%{?_without_ldap: --without ldap}\
793%{?_with_ads: --with ads}\
794%{?_without_ads: --without ads}\
795%{?_with_scanners: --with scanners}\
796%{?_without_scanners: --without scanners}\
797"
798echo "Building a non-default rpm with the following command-line arguments:"
799echo "$RPM_EXTRA_OPTIONS"
800echo "This rpm was built with non-default options, thus, to build ">%{SOURCE7}
801echo "an identical rpm, you need to supply the following options">>%{SOURCE7}
802echo "at build time: $RPM_EXTRA_OPTIONS">>%{SOURCE7}
803echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7}
804%else
805echo "This rpm was built with default options">%{SOURCE7}
806echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7}
807%endif
808
809%if %build_vscan
810%setup -q -a 8 -n %{pkg_name}-%{source_ver}
811%else
812%setup -q -n %{pkg_name}-%{source_ver}
813%endif
814#%patch111 -p1
815%patch1 -p1 -b .smbw
816%patch4 -p1 -b .sbin
817# Version specific patches: current version
818%if !%have_pversion
819echo "Applying patches for current version: %{ver}"
820%else
821# Version specific patches: upcoming version
822echo "Applying patches for new versions: %{pversion}"
823%endif
824
825# Limbo patches
826%if %have_pversion && %have_pre
827echo "Appling patches which should only be applied to prereleases"
828%endif
829
830# Fix quota compilation in glibc>2.3
831%if %build_mdk91 || %build_mdk92
832#grep "<linux/quota.h>" source/smbd/quotas.c >/dev/null && \
833perl -pi -e 's@<linux/quota.h>@<sys/quota.h>@' source/smbd/quotas.c
834%endif
835
836cp %{SOURCE7} .
837
838# Make a copy of examples so that we have a clean one for doc:
839cp -a examples examples.bin
840
841%if %build_vscan
842cp -a %{vscandir} %{vfsdir}
843#fix stupid directory names:
844mv %{vfsdir}/%{vscandir}/openantivirus %{vfsdir}/%{vscandir}/oav
845%endif
846# Inline replacement of config dir
847for av in fprot kaspersky mks oav sophos trend; do
848	[ -e %{vfsdir}/%{vscandir}/$av/vscan-$av.h ] && perl -pi -e \
849	's,^#define PARAMCONF "/etc/samba,#define PARAMCONF "/etc/%{name},' \
850	%{vfsdir}/%{vscandir}/$av/vscan-$av.h
851done
852#Inline edit vscan header:
853perl -pi -e 's/^# define SAMBA_VERSION_MAJOR 2/# define SAMBA_VERSION_MAJOR 3/g' %{vfsdir}/%{vscandir}/include/vscan-global.h
854
855# Edit some files when not building system samba:
856%if !%build_system
857perl -pi -e 's/%{pkg_name}/%{name}/g' source/auth/pampass.c
858%endif
859
860#remove cvs internal files from docs:
861find docs examples -name '.cvsignore' -exec rm -f {} \;
862
863#make better doc trees:
864mkdir -p clean-docs/samba-doc
865cp -a examples docs clean-docs/samba-doc
866mv -f clean-docs/samba-doc/examples/libsmbclient clean-docs/
867rm -Rf clean-docs/samba-doc/docs/{docbook,manpages,htmldocs,using_samba}
868ln -s %{_datadir}/swat%{samba_major}/using_samba/ clean-docs/samba-doc/docs/using_samba
869ln -sf %{_datadir}/swat%{samba_major}/help/ clean-docs/samba-doc/docs/htmldocs
870
871%build
872#%serverbuild
873(cd source
874CFLAGS=`echo "$RPM_OPT_FLAGS"|sed -e 's/-g//g'`
875%if %gcc331
876#CFLAGS=`echo "$CFLAGS"|sed -e 's/-O2/-Os/g'`
877%endif
878# Don't use --with-fhs now, since it overrides libdir, it sets configdir, 
879# lockdir,piddir logfilebase,privatedir and swatdir
880%configure      --prefix=%{_prefix} \
881                --sysconfdir=%{_sysconfdir}/%{name} \
882                --localstatedir=/var \
883                --libdir=%{_libdir}/%{name} \
884                --with-privatedir=%{_sysconfdir}/%{name} \
885		--with-lockdir=/var/cache/%{name} \
886		--with-piddir=/var/run/%{name} \
887                --with-swatdir=%{_datadir}/swat%{samba_major} \
888                --with-configdir=%{_sysconfdir}/%{name} \
889		--with-logfilebase=/var/log/%{name} \
890%if !%build_ads
891		--with-ads=no	\
892%endif
893                --with-automount \
894                --with-smbmount \
895                --with-pam \
896                --with-pam_smbpass \
897%if %build_ldap
898		--with-ldapsam \
899%endif
900		--with-tdbsam \
901                --with-syslog \
902                --with-quotas \
903                --with-utmp \
904		--with-manpages-langs=en \
905%if %build_acl
906		--with-acl-support      \
907%endif
908		--disable-mysqltest \
909		--with-expsam=%build_expsam \
910		--program-suffix=%{samba_major} 
911#		--with-shared-modules=pdb_ldap,idmap_ldap \
912#		--with-manpages-langs=en,ja,pl	\
913#_if !%build_system
914#                --with-smbwrapper \
915#_endif		
916#		--with-nisplussam \
917#                --with-fhs \
918
919#Fix the make file so we don't create debug information on 9.2
920%if %build_mdk92
921perl -pi -e 's/-g //g' Makefile
922%endif
923
924perl -pi -e 's|-Wl,-rpath,%{_libdir}||g;s|-Wl,-rpath -Wl,%{_libdir}||g' Makefile
925
926make proto_exists
927%make all libsmbclient smbfilter wins modules %{?_with_test: torture debug2html bin/log2pcap} bin/editreg client/mount.cifs
928
929
930# Build VFS modules (experimental)
931#cd ../%vfsdir
932#_configure	--prefix=%{prefix} \
933#		--mandir=%{prefix}/share/man
934#make
935#make CFLAGS="$RPM_OPT_FLAGS -I../../source -I../../source/include -I../../source/ubiqx \
936#	-I../../source/smbwrapper -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
937)
938
939# Build mkntpasswd in examples/LDAP/ for smbldaptools
940make -C examples.bin/LDAP/smbldap-tools/mkntpwd
941
942# Build antivirus vfs objects:
943%if %build_fprot
944echo -e "\n\nBuild antivirus VFS modules\n\n"
945echo "Building fprot"
946(cd %{vfsdir}/%{vscandir}/fprot;make)
947%endif
948%if %build_kaspersky
949echo "Building Kaspersky"
950(cd %{vfsdir}/%{vscandir}/kavp
951    perl -p -i -e "s|/usr/local/|/usr/|g" Makefile.KAV4
952    make -f Makefile.KAV4
953)
954%endif
955%if %build_mks
956echo "Building mks"
957(cd %{vfsdir}/%{vscandir}/mks;make)
958%endif
959%if %build_openav
960echo "Building OpenAntivirus"
961(cd %{vfsdir}/%{vscandir}/oav;make)
962%endif
963%if %build_sophos
964echo "building sophos"
965(cd %{vfsdir}/%{vscandir}/sophos;make)
966%endif
967%if %build_symantec
968echo "Building symantec"
969(cd %{vfsdir}/%{vscandir}/symantec;make)
970%endif
971%if %build_trend
972echo "Building Trend"
973(cd %{vfsdir}/%{vscandir}/trend;make)
974%endif
975
976%install
977rm -rf $RPM_BUILD_ROOT
978mkdir -p $RPM_BUILD_ROOT
979
980#Ensure all docs are readable
981chmod a+r docs -R
982
983# Any entries here mean samba makefile is *really* broken:
984mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
985mkdir -p $RPM_BUILD_ROOT/%{_datadir}
986mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs
987
988(cd source
989make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir}/%{name} install installclientlib installmodules)
990
991install -m755 source/bin/editreg %{buildroot}/%{_bindir}
992
993#need to stay
994mkdir -p $RPM_BUILD_ROOT/{sbin,bin}
995mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,pam.d,xinetd.d}
996mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
997mkdir -p $RPM_BUILD_ROOT/var/cache/%{name}
998mkdir -p $RPM_BUILD_ROOT/var/log/%{name}
999mkdir -p $RPM_BUILD_ROOT/var/run/%{name}
1000mkdir -p $RPM_BUILD_ROOT/var/spool/%{name}
1001mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/%{name}/{netlogon,profiles,printers}
1002mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/%{name}/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
1003mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/%{name}/codepages/src
1004mkdir -p $RPM_BUILD_ROOT/%{_lib}/security
1005mkdir -p $RPM_BUILD_ROOT%{_libdir}
1006mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs
1007mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts
1008
1009#smbwrapper and pam_winbind not handled by make, pam_smbpass.so doesn't build
1010#install -m 755 source/bin/smbwrapper.so $RPM_BUILD_ROOT%{_libdir}/smbwrapper%{samba_major}.so
1011install -m 755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass%{samba_major}.so
1012install -m 755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/%{_lib}/security/pam_winbind.so
1013
1014install -m755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{_libdir}/libsmbclient.a
1015pushd $RPM_BUILD_ROOT/%{_libdir}
1016[ -f libsmbclient.so ] && mv -f libsmbclient.so libsmbclient.so.%{libsmbmajor}
1017ln -sf libsmbclient.so.%{libsmbmajor} libsmbclient.so
1018popd
1019
1020# smbsh forgotten
1021#install -m 755 source/bin/smbsh $RPM_BUILD_ROOT%{_bindir}/
1022
1023# Install VFS modules
1024#install -m755 %vfsdir/audit.so $RPM_BUILD_ROOT/%{_libdir}/samba/vfs
1025#for i in block recycle
1026#do
1027# install -m755 %vfsdir/$i/$i.so $RPM_BUILD_ROOT/%{_libdir}/samba/vfs
1028#done
1029
1030# Antivirus support:
1031#	mkdir -p $RPM_BUILD_ROOT%{_libdir}/samba/vfs/vscan
1032	for av in fprot kavp mks oav sophos symantec trend; do
1033		if [ -d %{vfsdir}/%{vscandir}/$av -a -e %{vfsdir}/%{vscandir}/$av/vscan-$av*.so ];then
1034			cp %{vfsdir}/%{vscandir}/$av/vscan-$av*.so \
1035				$RPM_BUILD_ROOT%{_libdir}/%{name}/vfs/
1036			cp %{vfsdir}/%{vscandir}/$av/vscan-$av*.conf \
1037				$RPM_BUILD_ROOT%{_sysconfdir}/%{name}
1038		fi
1039	done
1040	
1041#libnss_* not handled by make:
1042# Install the nsswitch library extension file
1043for i in wins winbind; do
1044  install -m755 source/nsswitch/libnss_${i}.so $RPM_BUILD_ROOT/%{_lib}/libnss_${i}.so
1045done
1046# Make link for wins and winbind resolvers
1047( cd $RPM_BUILD_ROOT/%{_lib}; ln -s libnss_wins.so libnss_wins.so.2; ln -s libnss_winbind.so libnss_winbind.so.2)
1048
1049%if %{?_with_test:1}%{!?_with_test:0}
1050for i in {%{testbin}};do
1051  install -m755 source/bin/${i} $RPM_BUILD_ROOT/%{_bindir}/${i}%{samba_major}
1052done
1053%endif
1054
1055# Install other stuff
1056
1057#        install -m644 examples/VFS/recycle/recycle.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba/
1058        install -m644 packaging/Mandrake/smbusers $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/smbusers
1059        install -m755 packaging/Mandrake/smbprint $RPM_BUILD_ROOT/%{_bindir}
1060        #install -m755 packaging/RedHat/smbadduser $RPM_BUILD_ROOT/usr/bin
1061        install -m755 packaging/Mandrake/findsmb $RPM_BUILD_ROOT/%{_bindir}
1062        install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/%{_initrddir}/smb%{samba_major}
1063        install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/%{_sbindir}/%{name}
1064	install -m755 packaging/Mandrake/winbind.init $RPM_BUILD_ROOT/%{_initrddir}/winbind
1065#	install -m755 packaging/Mandrake/wrepld.init $RPM_BUILD_ROOT/%{_initrddir}/wrepld%{samba_major}
1066	install -m755 packaging/Mandrake/winbind.init $RPM_BUILD_ROOT/%{_sbindir}/winbind
1067        install -m644 packaging/Mandrake/samba.pamd $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/%{name}
1068	install -m644 packaging/Mandrake/system-auth-winbind.pamd $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/system-auth-winbind
1069#
1070        install -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/%{name}
1071#	install -m644 packaging/Mandrake/samba-slapd-include.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/samba-slapd.include
1072
1073# Install smbldap-tools scripts:
1074for i in examples/LDAP/smbldap-tools/*.pl; do
1075	install -m 750 $i $RPM_BUILD_ROOT/%{_datadir}/%{name}/scripts/
1076	ln -s %{_datadir}/%{name}/scripts/`basename $i` $RPM_BUILD_ROOT/%{_bindir}/`basename $i|sed -e 's/\.pl//g'`%{samba_major}
1077done
1078
1079install -m 750 examples/LDAP/smbldap-tools/smbldap_tools.pm $RPM_BUILD_ROOT/%{_datadir}/%{name}/scripts/
1080
1081# The conf file	
1082install -m 640 examples/LDAP/smbldap-tools/smbldap_conf.pm $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
1083
1084#Fix the smbldap-tools when not system samba:
1085%if !%build_system
1086perl -pi -e 's/^(use|package)(\s+)smbldap_(\w+);$/${1}${2}smbldap_${3}%{samba_major};/g' \
1087%{buildroot}/%{_sysconfdir}/%{name}/smbldap_conf.pm \
1088%{buildroot}/%{_datadir}/%{name}/scripts/smbldap*.p?
1089perl -pi -e 's,/usr/local/sbin/mkntpwd,/usr/sbin/mkntpwd%{samba_major},g;s,553,421,g' %{buildroot}/%{_sysconfdir}/%{name}/smbldap_conf.pm
1090perl -pi -e 's,\$smbldap_conf::SID,\$smbldap_conf3::SID,g' %{buildroot}/%{_datadir}/%{name}/scripts/smbldap*.p?
1091%endif
1092perl -pi -e 's,/usr/local/sbin/smbldap-passwd.pl,%{_datadir}/%{name}/scripts/smbldap-passwd.pl,g' %{buildroot}/%{_datadir}/%{name}/scripts/smbldap-useradd.pl 
1093
1094# Link both smbldap*.pm into vendor-perl (any better ideas?)
1095mkdir -p %{buildroot}/%{perl_vendorlib}
1096ln -s %{_sysconfdir}/%{name}/smbldap_conf.pm $RPM_BUILD_ROOT/%{perl_vendorlib}/smbldap_conf%{samba_major}.pm
1097ln -s %{_datadir}/%{name}/scripts/smbldap_tools.pm $RPM_BUILD_ROOT/%{perl_vendorlib}/smbldap_tools%{samba_major}.pm
1098#mkntpwd
1099install -m750 examples.bin/LDAP/smbldap-tools/mkntpwd/mkntpwd %{buildroot}/%{_sbindir}/mkntpwd%{samba_major}
1100
1101# Samba smbpasswd migration script:
1102install -m755 examples/LDAP/convertSambaAccount $RPM_BUILD_ROOT/%{_datadir}/%{name}/scripts/
1103
1104# make a conf file for winbind from the default one:
1105	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
1106        install -m644 packaging/Mandrake/smb-winbind.conf $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb-winbind.conf
1107
1108# Some inline fixes for smb.conf for non-winbind use
1109install -m644 packaging/Mandrake/smb.conf $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf
1110cat packaging/Mandrake/smb.conf | \
1111sed -e 's/^;   printer admin = @adm/   printer admin = @adm/g' >$RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf
1112%if %build_cupspc
1113perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf
1114perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb-winbind.conf
1115%endif
1116
1117#%if !%build_system
1118# Fix script paths in smb.conf
1119#perl -pi -e 's,%{_datadir}/samba,%{_datadir}/%{name},g' %{buildroot}/%{_sysconfdir}/%{name}/smb*.conf
1120#%endif
1121
1122
1123#install mount.cifs
1124install -m755 source/client/mount.cifs %{buildroot}/bin/mount.cifs%{samba_major}
1125
1126        echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/lmhosts
1127
1128# Link smbspool to CUPS (does not require installed CUPS)
1129
1130        mkdir -p $RPM_BUILD_ROOT/%{_libdir}/cups/backend
1131        ln -s %{_bindir}/smbspool%{alternative_major} $RPM_BUILD_ROOT/%{_libdir}/cups/backend/smb%{alternative_major}
1132
1133# xinetd support
1134
1135        mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d
1136        install -m644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d/swat%{samba_major}
1137
1138# menu support
1139
1140mkdir -p $RPM_BUILD_ROOT%{_menudir}
1141cat > $RPM_BUILD_ROOT%{_menudir}/%{name}-swat << EOF
1142?package(%{name}-swat):\
1143command="gnome-moz-remote http://localhost:901/" \
1144needs="gnome" \
1145icon="swat%{samba_major}.png" \
1146section="Configuration/Networking" \
1147title="Samba Configuration (SWAT)" \
1148longtitle="The Swat Samba Administration Tool"
1149?package(%{name}-swat):\
1150command="sh -c '\$BROWSER http://localhost:901/'" \ 
1151needs="x11" \
1152icon="swat%{samba_major}.png" \
1153section="Configuration/Networking" \
1154title="Samba Configuration (SWAT)" \
1155longtitle="The Swat Samba Administration Tool"
1156EOF
1157
1158mkdir -p $RPM_BUILD_ROOT%{_liconsdir} $RPM_BUILD_ROOT%{_iconsdir} $RPM_BUILD_ROOT%{_miconsdir}
1159
1160bzcat %{SOURCE4} > $RPM_BUILD_ROOT%{_liconsdir}/swat%{samba_major}.png
1161bzcat %{SOURCE5} > $RPM_BUILD_ROOT%{_iconsdir}/swat%{samba_major}.png
1162bzcat %{SOURCE6} > $RPM_BUILD_ROOT%{_miconsdir}/swat%{samba_major}.png
1163
1164bzcat %{SOURCE10}> $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/print-pdf
1165
1166# Fix configs when not building system samba:
1167
1168#Client binaries will have suffixes while we use alternatives, even
1169# if we are system samba
1170%if !%build_system || %build_alternatives
1171for OLD in %{buildroot}/%{_bindir}/{%{clientbin}} %{buildroot}/bin/%{client_bin} %{buildroot}/%{_libdir}/cups/backend/smb
1172do
1173    NEW=`echo ${OLD}%{alternative_major}`
1174    [ -e $OLD ] && mv -f $OLD $NEW
1175done
1176for OLD in %{buildroot}/%{_mandir}/man?/{%{clientbin}}* %{buildroot}/%{_mandir}/man?/%{client_bin}*
1177do
1178    if [ -e $OLD ]
1179    then
1180        BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'`
1181        EXT=`echo $OLD|sed -e 's,'${BASE}',,g'`
1182        NEW=`echo ${BASE}%{alternative_major}${EXT}`
1183        mv $OLD $NEW
1184    fi
1185done		
1186%endif
1187# Link smbmount to /sbin/mount.smb and /sbin/mount.smbfs
1188#I don't think it's possible for make to do this ...
1189(cd $RPM_BUILD_ROOT/sbin
1190        ln -s ..%{_bindir}/smbmount%{alternative_major} mount.smb%{alternative_major}
1191        ln -s ..%{_bindir}/smbmount%{alternative_major} mount.smbfs%{alternative_major}
1192)
1193# Server/common binaries are versioned only if not system samba:
1194%if !%build_system
1195for OLD in %{buildroot}/%{_bindir}/{%{commonbin}} %{buildroot}/%{_bindir}/{%{serverbin}} %{buildroot}/%{_sbindir}/{%{serversbin},swat}
1196do
1197    NEW=`echo ${OLD}%{alternative_major}`
1198    mv $OLD $NEW -f ||:
1199done
1200# And the man pages too:
1201for OLD in %{buildroot}/%{_mandir}/man?/{%{commonbin},%{serverbin},%{serversbin},swat,{%testbin},smb.conf,lmhosts}*
1202do
1203    if [ -e $OLD ]
1204    then
1205        BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'`
1206#        BASE=`perl -e '$name="'${OLD}'"; print "",($name =~ /(.*?)\.[0-9]/), "\n";'`
1207	EXT=`echo $OLD|sed -e 's,'${BASE}',,g'`
1208	NEW=`echo ${BASE}%{samba_major}${EXT}`
1209	mv $OLD $NEW
1210    fi
1211done		
1212# Replace paths in config files and init scripts:
1213for i in smb ;do
1214	perl -pi -e 's,/subsys/'$i',/subsys/'$i'%{samba_major},g' $RPM_BUILD_ROOT/%{_initrddir}/${i}%{samba_major}
1215done
1216for i in %{_sysconfdir}/%{name}/smb.conf %{_initrddir}/smb%{samba_major} %{_sbindir}/%{name} %{_initrddir}/winbind /%{_sysconfdir}/logrotate.d/%{name} /%{_sysconfdir}/xinetd.d/swat%{samba_major} %{_initrddir}/wrepld%{samba_major}; do
1217	perl -pi -e 's,/%{pkg_name},/%{name},g; s,smbd,%{_sbindir}/smbd%{samba_major},g; s,nmbd,%{_sbindir}/nmbd%{samba_major},g; s,/usr/sbin/swat,%{_sbindir}/swat%{samba_major},g;s,wrepld,%{_sbindir}/wrepld%{samba_major},g' $RPM_BUILD_ROOT/$i;
1218done
1219# Fix xinetd file for swat:
1220perl -pi -e 's,/usr/sbin,%{_sbindir},g' $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d/swat%{samba_major}
1221%endif
1222
1223#Clean up unpackaged files:
1224for i in %{_bindir}/pam_smbpass.so %{_bindir}/smbwrapper.so;do
1225rm -f %{buildroot}/$i
1226done
1227
1228%clean
1229rm -rf $RPM_BUILD_ROOT
1230
1231%post server
1232
1233%_post_service smb%{samba_major}
1234#%_post_service wrepld%{samba_major}
1235
1236# Add a unix group for samba machine accounts
1237groupadd -frg 421 machines
1238
1239# Migrate tdb's from /var/lock/samba (taken from official samba spec file):
1240for i in /var/lock/samba/*.tdb
1241do
1242if [ -f $i ]; then
1243	newname=`echo $i | sed -e's|var\/lock\/samba|var\/cache\/samba|'`
1244	echo "Moving $i to $newname"
1245	mv $i $newname
1246fi
1247done
1248
1249%post common
1250# Basic migration script for pre-2.2.1 users,
1251# since smb config moved from /etc to %{_sysconfdir}/samba
1252
1253# Let's create a proper %{_sysconfdir}/samba/smbpasswd file
1254[ -f %{_sysconfdir}/%{name}/smbpasswd ] || {
1255	echo "Creating password file for samba..."
1256	touch %{_sysconfdir}/%{name}/smbpasswd
1257}
1258
1259# And this too, in case we don't have smbd to create it for us
1260[ -f /var/cache/%{name}/unexpected.tdb ] || {
1261	touch /var/cache/%{name}/unexpected.tdb
1262}
1263
1264# Let's define the proper paths for config files
1265perl -pi -e 's/(\/etc\/)(smb)/\1%{name}\/\2/' %{_sysconfdir}/%{name}/smb.conf
1266
1267# Fix the logrotate.d file from smb and nmb to smbd and nmbd
1268if [ -f %{_sysconfdir}/logrotate.d/samba ]; then
1269        perl -pi -e 's/smb /smbd /' %{_sysconfdir}/logrotate.d/samba
1270        perl -pi -e 's/nmb /nmbd /' %{_sysconfdir}/logrotate.d/samba
1271fi
1272
1273# And not loose our machine account SID
1274[ -f %{_sysconfdir}/MACHINE.SID ] && mv -f %{_sysconfdir}/MACHINE.SID %{_sysconfdir}/%{name}/ ||:
1275
1276%if %build_winbind
1277%post winbind
1278if [ $1 = 1 ]; then
1279    /sbin/chkconfig winbind on
1280    cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave
1281    cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp
1282    for i in passwd group;do
1283        grep ^$i %{_sysconfdir}/nsswitch.conf |grep -v 'winbind' >/dev/null
1284        if [ $? = 0 ];then
1285            echo "Adding a winbind entry to the $i section of %{_sysconfdir}/nsswitch.conf"
1286            awk '/^'$i'/ {print $0 " winbind"};!/^'$i'/ {print}' %{_sysconfdir}/nsswitch.conf.rpmtemp >%{_sysconfdir}/nsswitch.conf;
1287	    cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp
1288        else
1289            echo "$i entry found in %{_sysconfdir}/nsswitch.conf"
1290        fi
1291    done
1292    if [ -f %{_sysconfdir}/nsswitch.conf.rpmtemp ];then rm -f %{_sysconfdir}/nsswitch.conf.rpmtemp;fi
1293fi
1294
1295%preun winbind
1296if [ $1 = 0 ]; then
1297	echo "Removing winbind entries from %{_sysconfdir}/nsswitch.conf"
1298	perl -pi -e 's/ winbind//' %{_sysconfdir}/nsswitch.conf
1299
1300	/sbin/chkconfig winbind reset
1301fi
1302%endif %build_winbind
1303
1304%if %build_wins
1305%post -n nss_wins%{samba_major}
1306if [ $1 = 1 ]; then
1307    cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave
1308    grep '^hosts' %{_sysconfdir}/nsswitch.conf |grep -v 'wins' >/dev/null
1309    if [ $? = 0 ];then
1310        echo "Adding a wins entry to the hosts section of %{_sysconfdir}/nsswitch.conf"
1311        awk '/^hosts/ {print $0 " wins"};!/^hosts/ {print}' %{_sysconfdir}/nsswitch.conf.rpmsave >%{_sysconfdir}/nsswitch.conf;
1312    else
1313        echo "wins entry found in %{_sysconfdir}/nsswitch.conf"
1314    fi
1315#    else
1316#        echo "Upgrade, leaving nsswitch.conf intact"
1317fi
1318
1319%preun -n nss_wins%{samba_major}
1320if [ $1 = 0 ]; then
1321	echo "Removing wins entry from %{_sysconfdir}/nsswitch.conf"
1322	perl -pi -e 's/ wins//' %{_sysconfdir}/nsswitch.conf
1323#else
1324#	echo "Leaving %{_sysconfdir}/nsswitch.conf intact"
1325fi
1326%endif %build_wins
1327
1328%preun server
1329
1330%_preun_service smb%{samba_major}
1331#%_preun_service wrepld%{samba_major}
1332
1333if [ $1 = 0 ] ; then
1334#    /sbin/chkconfig --level 35 smb reset
1335# Let's not loose /var/cache/samba
1336
1337    if [ -d /var/cache/%{name} ]; then
1338      mv -f /var/cache/%{name} /var/cache/%{name}.BAK
1339    fi
1340fi
1341
1342%post swat
1343if [ -f /var/lock/subsys/xinetd ]; then
1344        service xinetd reload >/dev/null 2>&1 || :
1345fi
1346%update_menus
1347
1348%postun swat
1349
1350# Remove swat entry from xinetd
1351if [ $1 = 0 -a -f %{_sysconfdir}/xinetd.conf ] ; then
1352rm -f %{_sysconfdir}/xinetd.d/swat%{samba_major}
1353	service xinetd reload &>/dev/null || :
1354fi
1355
1356if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi
1357
1358%clean_menus
1359
1360%if %build_system
1361%post -n %{libname} -p /sbin/ldconfig
1362%postun -n %{libname} -p /sbin/ldconfig
1363%endif
1364
1365%if %build_alternatives
1366%post client
1367
1368update-alternatives --install %{_bindir}/smbclient smbclient \
1369%{_bindir}/smbclient%{alternative_major} 10 \
1370$(for i in {/bin/mount.cifs,/sbin/{%{client_sbin}},%{_bindir}/{%{clientbin}}};do
1371j=`basename $i`
1372[ "$j" = "smbclient" ] || \
1373echo -n " --slave ${i} ${j} ${i}%{alternative_major}";done) \
1374--slave %{_libdir}/cups/backend/smb cups_smb %{_libdir}/cups/backend/smb%{alternative_major} || \
1375update-alternatives --auto smbclient
1376
1377%preun client
1378[ $1 = 0 ] && update-alternatives --remove smbclient %{_bindir}/smbclient%{alternative_major} ||:
1379%endif
1380
1381%if %build_alternatives
1382%triggerpostun client -- samba-client, samba2-client
1383[ ! -e %{_bindir}/smbclient ] && update-alternatives --auto smbclient || :
1384%endif
1385
1386%files server
1387%defattr(-,root,root)
1388#%attr(-,root,root) /sbin/*
1389%(for i in %{_sbindir}/{%{serversbin}}%{samba_major};do echo $i;done)
1390#%{_sbindir}/%{name}
1391#%{_sbindir}/smbd%{samba_major}
1392#%{_sbindir}/nmbd%{samba_major}
1393#%{_sbindir}/mkntpwd%{samba_major}
1394#%{_sbindir}/wrepld%{samba_major}
1395%(for i in %{_bindir}/{%{serverbin}}%{samba_major};do echo $i;done)
1396#%{_bindir}/smbcontrol%{samba_major}
1397#%{_bindir}/smbstatus%{samba_major}
1398#%{_bindir}/pdbedit%{samba_major}
1399#%{_bindir}/tdbbackup%{samba_major}
1400#%{_bindir}/profiles%{samba_major}
1401#%{_bindir}/editreg%{samba_major}
1402%attr(755,root,root) /%{_lib}/security/pam_smbpass*
1403%dir %{_libdir}/%{name}/vfs
1404%{_libdir}/%{name}/vfs/*.so
1405%dir %{_libdir}/%{name}/pdb
1406
1407%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smbusers
1408%attr(-,root,root) %config(noreplace) %{_initrddir}/smb%{samba_major}
1409#%attr(-,root,root) %config(noreplace) %{_initrddir}/wrepld%{samba_major}
1410%attr(-,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
1411%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/%{name}
1412#%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/samba-slapd.include
1413%{_mandir}/man1/smbstatus*.1*
1414%{_mandir}/man5/smbpasswd*.5*
1415%{_mandir}/man7/samba*.7*
1416%{_mandir}/man8/smbd*.8*
1417%{_mandir}/man8/nmbd*.8*
1418%{_mandir}/man8/pdbedit*.8*
1419%{_mandir}/man1/smbcontrol*.1*
1420%{_mandir}/man8/tdbbackup*.8*
1421%{_mandir}/man1/profiles*.1*
1422%{_mandir}/man1/editreg*.1*
1423%attr(775,root,adm) %dir %{_localstatedir}/%{name}/netlogon
1424%attr(755,root,root) %dir %{_localstatedir}/%{name}/profiles
1425%attr(755,root,root) %dir %{_localstatedir}/%{name}/printers
1426%attr(2775,root,adm) %dir %{_localstatedir}/%{name}/printers/*
1427%attr(1777,root,root) %dir /var/spool/%{name}
1428%dir %{_datadir}/%{name}
1429%dir %{_datadir}/%{name}/scripts
1430%attr(0755,root,root) %{_datadir}/%{name}/scripts/print-pdf
1431%attr(0750,root,adm) %{_datadir}/%{name}/scripts/smbldap*.pl
1432%attr(0750,root,adm) %{_bindir}/smbldap*
1433%attr(0640,root,adm) %config(noreplace) %{_sysconfdir}/%{name}/smbldap_conf.pm
1434%attr(0644,root,root) %{_datadir}/%{name}/scripts/smbldap_tools.pm
1435%{perl_vendorlib}/*.pm
1436#%attr(0700,root,root) %{_datadir}/%{name}/scripts/*port_smbpasswd.pl
1437%attr(0755,root,root) %{_datadir}/%{name}/scripts/convertSambaAccount
1438
1439
1440%files doc
1441%defattr(-,root,root)
1442%doc README COPYING Manifest Read-Manifest-Now
1443%doc WHATSNEW.txt Roadmap
1444%doc README.%{name}-mandrake-rpm
1445%doc clean-docs/samba-doc/docs
1446%doc clean-docs/samba-doc/examples
1447%attr(-,root,root) %{_datadir}/swat%{samba_major}/using_samba/
1448
1449%files swat
1450%defattr(-,root,root)
1451%config(noreplace) %{_sysconfdir}/xinetd.d/swat%{samba_major}
1452#%attr(-,root,root) /sbin/*
1453%{_sbindir}/swat%{samba_major}
1454%{_menudir}/%{name}-swat
1455%{_miconsdir}/*.png
1456%{_liconsdir}/*.png
1457%{_iconsdir}/*.png
1458%attr(-,root,root) %{_datadir}/swat%{samba_major}/help/
1459%attr(-,root,root) %{_datadir}/swat%{samba_major}/images/
1460%attr(-,root,root) %{_datadir}/swat%{samba_major}/include/
1461%lang(ja) %{_datadir}/swat%{samba_major}/lang/ja
1462%lang(tr) %{_datadir}/swat%{samba_major}/lang/tr
1463%{_mandir}/man8/swat*.8*
1464%lang(de) %{_libdir}/%{name}/de.msg
1465%lang(en) %{_libdir}/%{name}/en.msg
1466%lang(fr) %{_libdir}/%{name}/fr.msg
1467%lang(it) %{_libdir}/%{name}/it.msg
1468%lang(ja) %{_libdir}/%{name}/ja.msg
1469%lang(nl) %{_libdir}/%{name}/nl.msg
1470%lang(pl) %{_libdir}/%{name}/pl.msg
1471%lang(tr) %{_libdir}/%{name}/tr.msg
1472#%doc swat/README
1473
1474%files client
1475%defattr(-,root,root)
1476%(for i in %{_bindir}/{%{clientbin}}%{alternative_major};do echo $i;done)
1477%(for i in %{_mandir}/man?/{%{clientbin}}%{alternative_major}.?.*;do echo $i|grep -v smbprint;done)
1478%ifnarch alpha
1479%(for i in /sbin/{%{client_sbin}}%{alternative_major};do echo $i;done)
1480%attr(4755,root,root) /bin/mount.cifs%{alternative_major}
1481%attr(755,root,root) %{_bindir}/smbmount%{alternative_major}
1482%attr(4755,root,root) %{_bindir}/smbumount%{alternative_major}
1483%attr(4755,root,root) %{_bindir}/smbmnt%{alternative_major}
1484%{_mandir}/man8/smbmnt*.8*
1485%{_mandir}/man8/smbmount*.8*
1486%{_mandir}/man8/smbumount*.8*
1487%{_mandir}/man8/mount.cifs*.8*
1488%else
1489%exclude %{_bindir}/smb*m*nt%{samba_major}
1490%exclude %{_mandir}/man8/smb*m*nt*.8*
1491%endif
1492# Link of smbspool to CUPS
1493/%{_libdir}/cups/backend/smb%{alternative_major}
1494
1495%files common
1496%defattr(-,root,root)
1497%dir /var/cache/%{name}
1498%dir /var/log/%{name}
1499%dir /var/run/%{name}
1500%(for i in %{_bindir}/{%{commonbin}}%{samba_major};do echo $i;done)
1501%(for i in %{_mandir}/man?/{%{commonbin}}%{samba_major}\.[0-9]*;do echo $i;done)
1502#%{_libdir}/smbwrapper%{samba_major}.so
1503%dir %{_libdir}/%{name}
1504%{_libdir}/%{name}/*.dat
1505%{_libdir}/%{name}/charset
1506#%{_libdir}/%{name}/lowcase.dat
1507#%{_libdir}/%{name}/valid.dat
1508%dir %{_sysconfdir}/%{name}
1509%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb.conf
1510%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb-winbind.conf
1511%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/lmhosts
1512%dir %{_localstatedir}/%{name}
1513%attr(-,root,root) %{_localstatedir}/%{name}/codepages
1514%{_mandir}/man5/smb.conf*.5*
1515%{_mandir}/man5/lmhosts*.5*
1516#%{_mandir}/man7/Samba*.7*
1517%dir %{_datadir}/swat%{samba_major}
1518
1519%if %build_winbind
1520%files winbind
1521%defattr(-,root,root)
1522%{_sbindir}/winbindd
1523%{_sbindir}/winbind
1524%{_bindir}/wbinfo
1525%attr(755,root,root) /%{_lib}/security/pam_winbind*
1526%attr(755,root,root) /%{_lib}/libnss_winbind*
1527%attr(-,root,root) %config(noreplace) %{_initrddir}/winbind
1528%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/system-auth-winbind*
1529%{_mandir}/man8/winbindd*.8*
1530%{_mandir}/man1/wbinfo*.1*
1531%endif
1532
1533%if %build_wins
1534%files -n nss_wins%{samba_major}
1535%defattr(-,root,root)
1536%attr(755,root,root) /%{_lib}/libnss_wins.so*
1537%endif
1538
1539%if %{?_with_test:1}%{!?_with_test:0}
1540%files test
1541%defattr(-,root,root)
1542%(for i in %{_bindir}/{%{testbin}}%{samba_major};do echo $i;done)
1543%{_mandir}/man1/vfstest%{samba_major}*.1*
1544%exclude %{_mandir}/man1/log2pcap*.1*
1545%else
1546%exclude %{_mandir}/man1/vfstest%{samba_major}*.1*
1547%exclude %{_mandir}/man1/log2pcap*.1*
1548%endif
1549
1550%if %build_system
1551%files -n %{libname}
1552%defattr(-,root,root)
1553%{_libdir}/libsmbclient.so.*
1554%else
1555%exclude %{_libdir}/libsmbclient.so.*
1556%endif
1557
1558%if %build_system
1559%files -n %{libname}-devel
1560%defattr(-,root,root)
1561%{_includedir}/*
1562%{_libdir}/libsmbclient.so
1563%doc clean-docs/libsmbclient/*
1564%else
1565%exclude %{_includedir}/*
1566%exclude %{_libdir}/libsmbclient.so
1567%endif
1568
1569%if %build_system
1570%files -n %{libname}-static-devel
1571%defattr(-,root,root)
1572%{_libdir}/libsmbclient.a
1573%else
1574%exclude %{_libdir}/libsmbclient.a
1575%endif
1576
1577#%files passdb-ldap
1578#%defattr(-,root,root)
1579#%{_libdir}/%{name}/*/*ldap.so
1580
1581%ifnarch alpha
1582%files passdb-mysql
1583%defattr(-,root,root)
1584%{_libdir}/%{name}/pdb/*mysql.so
1585%endif
1586
1587%files passdb-xml
1588%defattr(-,root,root)
1589%{_libdir}/%{name}/pdb/*xml.so
1590
1591#Files for antivirus support:
1592%if %build_fprot
1593%files vscan-fprot
1594%defattr(-,root,root)
1595%{_libdir}/%{name}/vfs/vscan-fprotd.so
1596%config(noreplace) %{_sysconfdir}/%{name}/vscan-fprotd.conf
1597%doc %{vfsdir}/%{vscandir}/INSTALL
1598%endif
1599
1600%if %build_kaspersky
1601%files vscan-kaspersky
1602%defattr(-,root,root)
1603%{_libdir}/%{name}/vfs/vscan-kavp.so
1604%config(noreplace) %{_sysconfdir}/%{name}/vscan-kavp.conf
1605%doc %{vfsdir}/%{vscandir}/INSTALL
1606%endif
1607
1608%if %build_mks
1609%files vscan-mks
1610%defattr(-,root,root)
1611%{_libdir}/%{name}/vfs/vscan-mksd.so
1612%config(noreplace) %{_sysconfdir}/%{name}/vscan-mks*.conf
1613%doc %{vfsdir}/%{vscandir}/INSTALL
1614%endif
1615
1616%if %build_openav
1617%files vscan-openav
1618%defattr(-,root,root)
1619%{_libdir}/%{name}/vfs/vscan-oav.so
1620%config(noreplace) %{_sysconfdir}/%{name}/vscan-oav.conf
1621%doc %{vfsdir}/%{vscandir}/INSTALL
1622%endif
1623
1624%if %build_sophos
1625%files vscan-sophos
1626%defattr(-,root,root)
1627%{_libdir}/%{name}/vfs/vscan-sophos.so
1628%config(noreplace) %{_sysconfdir}/%{name}/vscan-sophos.conf
1629%doc %{vfsdir}/%{vscandir}/INSTALL
1630%endif
1631
1632%if %build_symantec
1633%files vscan-symantec
1634%defattr(-,root,root)
1635%{_libdir}/%{name}/vfs/vscan-symantec.so
1636%config(noreplace) %{_sysconfdir}/%{name}/vscan-symantec.conf
1637%doc %{vfsdir}/%{vscandir}/INSTALL
1638%endif
1639
1640%if %build_trend
1641%files vscan-trend
1642%defattr(-,root,root)
1643%{_libdir}/%{name}/vfs/vscan-trend.so
1644%config(noreplace) %{_sysconfdir}/%{name}/vscan-trend.conf
1645%doc %{vfsdir}/%{vscandir}/INSTALL
1646%endif
1647
1648%exclude %{_mandir}/man1/smbsh*.1*
1649
1650%changelog
1651* Fri Dec 05 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre3.5mdk
1652- Allow winbind to start if old winbind ranges are used (ease upgrades)
1653
1654* Tue Nov 18 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre3.4mdk
1655- Fix build as system on 8.2 (and probably earlier)
1656
1657* Sun Nov 16 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre3.3mdk
1658- Ensure printer drivers keep permissions by default (setgid and inherit perms)
1659
1660* Fri Nov 14 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre3.2mdk
1661- 3.0.1pre3
1662- Add support for Mandrake 10.0 (as system samba)
1663- Fix alternatives triggers
1664- Fix obsoletes
1665
1666* Mon Nov 10 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre2.2mdk
1667- 3.0.1pre2
1668- misc spec files (pointed out by Luca Olivetti)
1669- Fix path to smbldap-passwd.pl
1670- Only allow one copy of winbind and nss_wins
1671- Add trigger for alternatives
1672
1673* Sun Oct 12 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.1-0.pre1.2mdk
1674- 3.0.1pre1
1675- remove buildroot patch (p3), fixed upstream
1676
1677* Thu Sep 25 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-2mdk
1678- 3.0.0 final
1679
1680* Sat Sep 13 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc4.2mdk
1681- rc4
1682- Don't update alternatives in pre/post scripts when not using alternatives
1683- Fix case of --with-system without alternatives
1684- Final fixes to smbldap-tools for non-system case
1685- Remove duplicate docs (really - 1 character typo ...)
1686- Update configs (fix winbind init script, add example scripts in smb.conf)
1687
1688* Tue Sep 09 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc3.2mdk
1689- rc3
1690- Fix mount.smb{,fs} alternatives (spotted by Laurent Culioli)
1691
1692* Thu Sep 04 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc2.3mdk
1693- Fix alternatives
1694- Fix libname (can I blame guillomovitch's evil line-wrapping spec mode?)
1695- Fix smbldap-tools package/use names when not system samba
1696- Don't conflict samba3-client with samba-client for now so we can install it
1697
1698* Fri Aug 29 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc2.2mdk
1699- rc2
1700- Remove patches 100-102 (upstream)
1701- Fix libname
1702- Alternatavise client
1703- Better solution to avoid rpath
1704
1705* Fri Aug 22 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc1.3mdk
1706- Fix build with test package (p100), but not by default (too big)
1707- Fix (p101) for SID resolution when member of samba-2.2.x domain
1708- Fix libsmbclient packages (thanks Gotz)
1709- version mount.cifs, patch from CVS (p102), and setuid it
1710- Clean up docs (guillomovitch spam ;-)
1711
1712* Sat Aug 16 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.rc1.2mdk
1713- rc1
1714- disable test subpackage since it's broken again
1715
1716* Mon Jul 28 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta3.3mdk
1717- Rebuild for kerberos-1.3 on cooker
1718- Put printer directories back
1719- Add mount.cifs
1720- Go back to standard optimisations
1721
1722* Thu Jul 17 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta3.2mdk
1723- beta3
1724- remove -g from cflags to avoid large static libraries
1725- drop optimisation from O2 to O1 for gcc 3.3.1
1726- own some directories for distriblint's benefit
1727- use chrpath on distro's that have it to drastically reduce rpmlint score
1728
1729* Mon Jul 14 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta2.3mdk
1730- place non-conditional excludes at the end of files list, to prevent causing
1731  rpm in Mandrake <=8.2 from segfaulting when processing files.
1732- Update default config  
1733
1734* Wed Jul 02 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta2.2mdk
1735- 3.0.0beta2
1736- manually build editreg
1737- Add some new man pages
1738
1739* Tue Jun 10 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta1.3mdk
1740- add provision for passdb-ldap subpackage (it doesn't build like that yet)
1741- avoid debugging info on cooker/9.2 for the moment
1742- We probably don't need to autoconf (and can thus build on 8.1)
1743- We can probably build without kerberos support (and thus on 8.0)
1744- Don't require mysql-devel on alpha's (maybe we want to be able to disable
1745  mysql support for other arches?)
1746- We shouldn't need to specifically add openssl to include path, since ssl
1747  support is deprecated.
1748- png icons, change menu title to not conflict with ksambaplugin  
1749- update to samba-vscan-0.3.3beta1, but it still does not build the vscan
1750  modules.
1751- add -static-devel package
1752- Add buildrequires for lib packages that are picked up if installed
1753  (ncurses, popt) in an attempt to get slbd to build samba3
1754- Fix default config (P100)
1755
1756* Sun Jun 08 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0.0-0.beta1.2mdk
1757- Get packages into cooker (klama doesn't want to build this package ..)
1758- samba-vscan-0.3.2b
1759
1760* Fri Jun 06 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha24.2mdk
1761- Rename debug package to test and other fixes for rpm-4.2
1762- prepare for beta1
1763
1764* Wed Apr 30 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha24.1mdk
1765- Remove some files removed upstream
1766- In builds from source, don't terminate on missing docs or unpackaged files
1767  (if only we could do it for other missing files ...)
1768
1769* Mon Apr 28 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha24.0mdk
1770- Reenable debug package by (--without debug to not build it), fixed post-a23
1771- Add bugzilla note for builds from source (also intended for packages made
1772  available on samba FTP site) at samba team request
1773- Fix build from CVS (run autogen.sh, pass options to all rpm commands)
1774- Appease distriblint, but not much to be done about /usr/share/swat3/ since
1775  samba-doc owns some subdirs, and samba-swat others, and they can be installed
1776  independantly.
1777- Apply kaspersky vscan build fix from samba2  
1778- Final for alpha24
1779
1780* Wed Apr 23 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha23.3mdk
1781- Small fixes in preparation for testing as system samba
1782- Make debug package optional (--with debug) since it's often broken
1783- Add support for 9.2 (including in-line smbd quota patch for glibc2.3)
1784- Add --with options option, which will just show you the available options and exit
1785
1786* Sun Apr 06 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha23.2mdk
1787- Alpha23
1788- buildrequire autconf2.5
1789- samba-vscan 0.3.2a
1790- Remove patch 102 (upstreamed)
1791
1792* Thu Mar 06 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha22.2mdk
1793- Alpha22
1794- Add profiles binary to server and ntlm_auth to common
1795- smbwrapper and torture target broken (only in 9.0?)
1796- remove unused source 2
1797
1798* Tue Mar 04 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha21.4mdk
1799- Don't provide samba-{server,client,common} when not system samba (bug #2617)
1800- Don't build libsmbclient packages when not system samba
1801- Fix conflict between samba-server and samba3-server (pam_smbpass)
1802- Fix smbwrapper (from 2.2.7a-5mdk for bug #2356)
1803- Fix codepage/charset example (bug #1574)
1804
1805* Thu Jan 23 2003 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha21.3mdk
1806- samba-vscan 0.3.1 (and make it build again), including required inline edits
1807- Make all vscan packages provide samba(3)-vscan
1808- Build all vscan except kav (requires kaspersky lib) with --with-scanners
1809- Add vscan-(scanner).conf files
1810- Explicitly add ldapsam for 2.2 compatability when building --with ldap,
1811  default build now uses new ldap passdb backend (ie you always get ldap)
1812- Enable (experimental) tdb passdb backend
1813- Fix file ownership conflicts between server and common
1814- Cleanup configure, to match order of --help
1815- Fix libdir location, was being overridden by --with-fhs
1816- Split off a libsmbclient and -devel package
1817- Add wins replication init script (patch 102)
1818- Workaround passdb/pdb_xml.c not compiling
1819- Workaround missing install targets for smbsh/smbwrapper.so in cvs
1820- Inline patch smbd/quotas.c for Mandrake >9.0
1821
1822* Wed Nov 27 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha21.2mdk
1823- Remove patch 20,21,22,23,25,26 (upstream)
1824- New destdir patch from cvs (18)
1825- package installed but non-packaged files
1826- new debug subpackage for vfstest and related files (it was that or nuke the 
1827  manpage ;-))
1828- use _libdir for libdir instead of _sysconfdir
1829- Update samba-vscan (untested)
1830
1831* Mon Oct 28 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha20.3mdk
1832- Fix mount.smbfs3 pointing to smbmount not in package
1833- Remove unnecessary lines from install (now done by make)
1834- Build with ldap and ads on all releases by default
1835- Put av-stuff back
1836
1837* Mon Oct 21 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha20.2mdk
1838- When not building as system samba, avoid conflicting with system samba
1839- Macro-ize as much as possible for above (aka finish cleanups)
1840- Fix paths in init scripts and logrotate and xinetd
1841- Fix provides and obsoletes so as to provide samba, but not obsolete
1842  current stable until we have a stable release (when it's the system samba).
1843- Add warnings to descriptions when not system samba.
1844- This is now parallel installable with the normal samba release, for easy
1845  testing. It shouldn't touch existing installations. Of course, only
1846  one samba at a time on the same interface!
1847
1848* Sat Sep 28 2002 Buchan Milne <bgmilne@linux-mandrake.com> 3.0-0.alpha20.1mdk
1849- Merge with 2.2.6pre2.2mdk
1850- Detect alpha- and beta-, along with pre-releases
1851
1852* Tue Feb 05 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha14-0.1mdk
1853- Sync with 2.2.3-2mdk (new --without options, detect when 
1854  building for a different distribution.
1855
1856* Mon Feb 04 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha14-0.0mdk
1857- Sync with 2.2.2-10mdk, which added build-time options --with ldap,
1858  winbind, acl, wins, mdk72, mdk80, mdk81, mdk82, cooker. Added
1859  warning in description if built with these options.
1860
1861* Wed Jan 23 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha13-0.2mdk
1862- Added if's for build_ads, which hopefully will add Active Directory
1863  Support (by request).
1864
1865* Thu Jan 17 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha13-0.1mdk
1866- More syncing with 2.2 rpm (post and postun scripts)
1867- Testing without ldap
1868
1869* Thu Jan 17 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha13-0.0mdk
1870- 3.0-alpha13
1871- Fixed installman.sh patch.
1872
1873* Wed Jan 09 2002 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha12-0.1mdk
1874- Fixed %post and %preun for nss_wins, added %post and %preun for
1875  samba-winbind (chkconfig and winbind entries in nsswitch.conf)
1876
1877* Sun Dec 23 2001 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha12-0.0mdk
1878- 3.0-alpha12
1879- Sync up with changes made in 2.2.2 to support Mandrake 8.0, 7.2
1880- Added new subpackage for swat
1881- More if's for ldap.
1882
1883* Thu Dec 20 2001 Buchan Milne <bgmilne@cae.co.za> 3.0-alpha11-0.0mdk
1884- 3.0-alpha11
1885
1886* Wed Dec 19 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha10-0.0mdk
1887- 3.0-alpha10
1888
1889* Tue Dec 18 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha9-0.0mdk
1890- 3.0-alpha9
1891
1892* Mon Dec 17 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha8-0.1mdk
1893- Added net command to %files common, pdbedit and smbgroupedit to
1894  %files, s/%{prefix}\/bin/%{_bindir}/ (the big cleanup).
1895  Added patch to smb.init from 2.2.2 (got missed with 3.0-alpha1 patches)
1896
1897* Sun Dec 16 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha8-0.0mdk
1898- Patch for installman.sh to handle lang=en correctly (p24)
1899- added --with-manpages-langs=en,ja,pl (translated manpages), but there
1900  aren't any manpages for these languages yet ... so we still
1901  need %dir and %doc entries for them ...
1902- patch (p25) to configure.in to support more than 2 languages.
1903- addtosmbpass seems to have returned for now, but make_* have disappeared!
1904
1905* Fri Dec 14 2001 Buchan Milne <bgmilne@cae.co.za> 3.0alpha6-0.0mdk
1906- DESTDIR patch for Makefile.in (p23), remove a lot of %%install scripts
1907  this forces move of smbcontrol and smbmnt to %{prefix}/bin
1908  removed --with-pam_smbpass as it doesn't compile.
1909
1910* Thu Dec 06 2001 Buchan Milne <bgmilne@cae.co.za> 3.0-0.0alpha1mdk
1911- Samba 3.0alpha1 released (we missed Samba 3.0alpha0!)
1912- Redid smbmount-sbin patch and smb.conf patch (20), removed xfs quota patch 
1913  (applied upstream), removed ook-patch (codepage directory totally different).
1914- Added winbind.init (21) and system-auth-winbind.pamd (22). Patches 20-23 
1915  should be applied upstream before 3.0 ships ...
1916
1917* Wed Dec 05 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-6mdk
1918- fixed typo in system-auth-winbind.pamd (--Thanks J. Gluck).
1919- fixed %post xxx problem (smb not started in chkconfig --Thanks Viet & B. Kenworthy).
1920
1921* Fri Nov 23 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-5mdk
1922- Had to remove the network recycle bin patch: it seems to mess up 
1923  file deletion from windows (files appear to be "already in use")
1924
1925* Tue Nov 13 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-4mdk
1926- added network recycle bin patch:
1927  <http://www.amherst.edu/~bbstone/howto/samba.html>
1928- added "recycle bin = .recycled" parameter in smb.conf [homes].
1929- fixed winbind/nss_wins perms (oh no I don't own that stuff ;o)
1930
1931* Mon Nov 12 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-3mdk
1932- added %build 8.0 and 7.2, for tweakers to play around.
1933- changed configure options:
1934  . removed --with-mmap, --with-netatalk (obsolete).
1935  . added --with-msdfs, --with-vfs (seems stable, but still need testing).
1936
1937* Mon Nov 12 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-2mdk
1938- rebuilt with winbind and nss_wins enabled.
1939
1940* Wed Oct 31 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-1mdk
1941- Rebuilt on cooker.
1942
1943* Wed Oct 31 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.992mdk
1944- Patch for smb.conf to fix incorrect lpq command, typo in winbind,
1945  and add sample linpopup command. Added print driver directories.
1946- New XFS quota patch (untested!, samba runs, but do quotas work? We
1947  can't check yet since the kernel doesn't seem to support XFS quotas!)
1948
1949* Fri Oct 19 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-0.99mdk
1950- New samba.spec, almost ready for winbind operations. OLA for Buchan Milne
1951  Who did a tremendous integration work on 2.2.2.
1952  Rebuild on cooker, please test XFS (ACLs and quotas) again...
1953  
1954* Mon Oct 15 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.9mdk
1955- Samba-2.2.2. released! Use %defines to determine which subpackages
1956  are built and which Mandrake release we are buiding on/for (hint: define 
1957  build_mdk81 1 for Mandrake 8.1 updates)
1958
1959* Sun Oct 14 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011014mdk
1960- %post and %postun for nss_wins
1961
1962* Wed Oct 10 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011010mdk
1963- New CVS snapshot, /etc/pam.d/system-auth-winbind added
1964  with configuration to allow easy winbind setup.
1965  
1966* Sun Oct 7 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011007mdk
1967- Added new package nss_wins and moved smbpasswd to common (required by
1968  winbind).
1969
1970* Sat Oct 6 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011006mdk
1971- Added new package winbind.
1972
1973* Mon Oct 1 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011001mdk
1974- Removed patch to smb init.d file (applied in cvs)
1975
1976* Sun Sep 30 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20010930mdk
1977- Added winbind init script, which still needs to check for running nmbd.
1978
1979* Thu Sep 27 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20010927mdk
1980- Built from samba-2.2.2-pre cvs, added winbindd, wbinfo, nss_winbind and 
1981  pam_winbind, moved pam_smbpass from samba-common to samba. We still
1982  need a start-up script for winbind, or need to modify existing one.
1983  
1984* Mon Sep 10 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-15mdk
1985- Enabled acl support (XFS acls now supported by kernel-2.4.8-21mdk thx Chmou)
1986  Added smbd patch to support XFS quota (Nathan Scott)
1987  
1988* Mon Sep 10 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-14mdk
1989- Oops! smbpasswd created in wrong directory...
1990
1991* Tue Sep 06 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-13mdk
1992- Removed a wrong comment in smb.conf.
1993  Added creation of smbpasswd during install.
1994
1995* Mon Aug 27 2001 Pixel <pixel@mandrakesoft.com> 2.2.1a-12mdk
1996- really less verbose %%post
1997
1998* Sat Aug 25 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.1a-11mdk
1999- Fix shared libs in /usr/bin silliness.
2000
2001* Thu Aug 23 2001 Pixel <pixel@mandrakesoft.com> 2.2.1a-10mdk
2002- less verbose %%post
2003
2004* Wed Aug 22 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1a-9mdk
2005- Added smbcacls (missing in %files), modification to smb.conf: ([printers]
2006  is still needed, even with point-and-print!, user add script should
2007  use name and not gid, since we may not get the gid . New script for
2008  putting manpages in place (still need to be added in %files!). Moved
2009  smbcontrol to sbin and added it and its man page to %files.
2010
2011* Wed Aug 22 2001 Pixel <pixel@mandrakesoft.com> 2.2.1a-8mdk
2012- cleanup /var/lib/samba/codepage/src
2013
2014* Tue Aug 21 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-7mdk
2015- moved codepage generation to %%install and codepage dir to /var/lib/samba
2016
2017* Tue Aug 21 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-6mdk
2018- /lib/* was in both samba and samba-common
2019  Introducing samba-doc: "alas, for the sake of thy modem, shalt thou remember
2020  when Samba was under the Megabyte..."
2021
2022* Fri Aug 03 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-5mdk
2023- Added "the gc touch" to smbinit through the use of killall -0 instead of
2024  grep cupsd | grep -v grep (too many greps :o)
2025
2026* Wed Jul 18 2001 Stefan van der Eijk <stefan@eijk.nu> 2.2.1a-4mdk
2027- BuildRequires: libcups-devel
2028- Removed BuildRequires: openssl-devel
2029
2030* Fri Jul 13 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-3mdk
2031- replace chkconfig --add/del with --level 35 on/reset.
2032
2033* Fri Jul 13 2001 Geoffrey Lee <snailtalk@mandrakesoft.cm> 2.2.1a-2mdk
2034- Replace discription s/inetd/xinetd/, we all love xinetd, blah.
2035
2036* Thu Jul 12 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1a-1mdk
2037- Bugfix release. Fixed add user script, added print$ share and printer admin
2038  We need to test interaction of new print support with CUPS, but printer
2039  driver uploads should work.
2040
2041* Wed Jul 11 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-17mdk
2042- fixed smb.conf a bit, rebuilt on cooker.
2043
2044* Tue Jul 10 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1-16mdk
2045- Finally, samba 2.2.1 has actually been release. At least we were ready!
2046  Cleaned up smb.conf, and added some useful entries for domain controlling.
2047  Migrated changes made in samba's samba2.spec for 2.2.1  to this file.
2048  Added groupadd command in post to create a group for samba machine accounts.
2049  (We should still check the postun, samba removes pam, logs and cache)
2050
2051* Tue Jun 26 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-15mdk
2052- fixed smbwrapper compile options.
2053
2054* Tue Jun 26 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-14mdk
2055- added LFS support.
2056  added smbwrapper support (smbsh)
2057
2058* Wed Jun 20 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-13mdk
2059- /sbin/mount.smb and /sbin/mount.smbfs now point to the correct location
2060  of smbmount (/usr/bin/smbmount)
2061
2062* Tue Jun 19 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-12mdk
2063- smbmount and smbumount are now in /usr/bin and SUID.
2064  added ||: to triggerpostun son you don't get error 1 anymore when rpm -e
2065  Checked the .bz2 sources with file *: everything is OK now (I'm so stupid ;o)!
2066
2067* Tue Jun 19 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.1-11mdk
2068- s/Copyright/License/;
2069- Stop Sylvester from pretending .gz source to be .bz2 source via filename
2070  aka really bzip2 the source.
2071
2072* Mon Jun 18 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-10mdk
2073- changed Till's startup script modifications: now samba is being reloaded
2074  automatically 1 minute after it has started (same reasons as below in 9mdk)
2075  added _post_ and _preun_ for service smb
2076  fixed creation of /var/lib/samba/{netlogon,profiles} (%dir was missing)
2077
2078* Thu Jun 14 2001 Till Kamppeter <till@mandrakesoft.com> 2.2.1-9mdk
2079- Modified the Samba startup script so that in case of CUPS being used as
2080  printing system Samba only starts when the CUPS daemon is ready to accept
2081  requests. Otherwise the CUPS queues would not appear as Samba shares.
2082
2083* Mon Jun 11 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-8mdk
2084- patched smbmount.c to have it call smbmnt in sbin (thanks Seb).
2085
2086* Wed May 30 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-7mdk
2087- put SWAT menu icons back in place.
2088
2089* Mon May 28 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-6mdk
2090- OOPS! fixed smbmount symlinks
2091
2092* Mon May 28 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-5mdk
2093- removed inetd postun script, replaced with xinetd.
2094  updated binary list (smbcacls...)
2095  cleaned samba.spec
2096
2097* Mon May 28 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1-4mdk
2098- Changed configure options to point to correct log and codepage directories,
2099  added crude script to fix logrotate file for new log file names, updated
2100  patches to work with current CVS.
2101
2102* Thu May 24 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-3mdk
2103- Cleaned and updated the %files section.
2104
2105* Sat May 19 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1-2mdk
2106- Moved all samba files from /etc to /etc/samba (Thanks DomS!).
2107  Fixed fixinit patch (/etc/samba/smb.conf)
2108
2109* Fri May 18 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.1-1mdk
2110- Now use packaging/Mandrake/smb.conf, removed unused and obsolete
2111  patches, moved netlogon and profile shares to /var/lib/samba in the
2112  smb.conf to match the spec file. Added configuration for ntlogon to
2113  smb.conf. Removed pam-foo, fixinit and makefilepath patches. Removed
2114  symlink I introduced in 2.2.0-1mdk
2115
2116* Thu May 3 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.0-5mdk
2117- Added more configure options. Changed Description field (thx John T).
2118
2119* Wed Apr 25 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.0-4mdk
2120- moved netlogon and profiles to /var/lib/samba by popular demand ;o)
2121
2122* Tue Apr 24 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.0-3mdk
2123- moved netlogon and profiles back to /home.
2124
2125* Fri Apr 20 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.0-2mdk
2126- fixed post inetd/xinetd script&
2127
2128* Thu Apr 19 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.0-1mdk
2129- Upgrade to 2.2.0. Merged most of 2.0.7-25mdk's patches (beware
2130  nasty "ln -sf samba-%{ver} ../samba-2.0.7" hack to force some patches
2131  to take. smbadduser and addtosmbpass seem to have disappeared. Moved
2132  all Mandrake-specific files to packaging/Mandrake and made patches
2133  from those shipped with samba. Moved netlogon to /home/samba and added
2134  /home/samba/profiles. Added winbind,smbfilter and debug2html to make command.
2135
2136* Thu Apr 12 2001 Frederic Crozat <fcrozat@mandrakesoft.com> 2.0.7-25mdk
2137- Fix menu entry and provide separate menu entry for GNOME
2138  (nautilus doesn't support HTTP authentication yet)
2139- Add icons in package
2140
2141* Fri Mar 30 2001 Frederic Lepied <flepied@mandrakesoft.com> 2.0.7-24mdk
2142- use new server macros
2143
2144* Wed Mar 21 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-23mdk
2145- check whether /etc/inetd.conf exists (upgrade) or not (fresh install).
2146
2147* Thu Mar 15 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-22mdk
2148- spec cosmetics, added '-r' option to lpr-cups command line so files are
2149  removed from /var/spool/samba after printing.
2150
2151* Tue Mar 06 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-21mdk
2152- merged last rh patches.
2153
2154* Thu Nov 23 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-20mdk
2155- removed dependencies on cups and cups-devel so one can install samba without using cups
2156- added /home/netlogon
2157
2158* Mon Nov 20 2000 Till Kamppeter <till@mandrakesoft.com> 2.0.7-19mdk
2159- Changed default print command in /etc/smb.conf, so that the Windows
2160  driver of the printer has to be used on the client.
2161- Fixed bug in smbspool which prevented from printing from a
2162  Linux-Samba-CUPS client to a Windows server through the guest account.
2163
2164* Mon Oct 16 2000 Till Kamppeter <till@mandrakesoft.com> 2.0.7-18mdk
2165- Moved "smbspool" (Samba client of CUPS) to the samba-client package
2166
2167* Sat Oct 7 2000 Stefan van der Eijk <s.vandereijk@chello.nl> 2.0.7-17mdk
2168- Added RedHat's "quota" patch to samba-glibc21.patch.bz2, this fixes
2169  quota related compile problems on the alpha.
2170
2171* Wed Oct 4 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-16mdk
2172- Fixed 'guest ok = ok' flag in smb.conf
2173
2174* Tue Oct 3 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-15mdk
2175- Allowed guest account to print in smb.conf
2176- added swat icon in menu
2177
2178* Tue Oct 3 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-14mdk
2179- Removed rh ssl patch and --with-ssl flag: not appropriate for 7.2
2180
2181* Tue Oct 3 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-13mdk
2182- Changed fixinit patch.
2183- Changed smb.conf for better CUPS configuration.
2184- Thanks Fred for doing this ---vvv.
2185
2186* Tue Oct  3 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.0.7-12mdk
2187- menu entry for web configuration tool.
2188- merge with rh: xinetd + ssl + pam_stack.
2189- Added smbadduser rh-bugfix w/o relocation of config-files.
2190
2191* Mon Oct  2 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.0.7-11mdk
2192- added build requires on cups-devel and pam-devel.
2193
2194* Mon Oct  2 2000 Till Kamppeter <till@mandrakesoft.com> 2.0.7-10mdk
2195- Fixed smb.conf entry for CUPS: "printcap name = lpstat", "lpstats" was
2196  wrong.
2197
2198* Mon Sep 25 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-9mdk
2199- Cosmetic changes to make rpmlint more happy
2200
2201* Wed Sep 11 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-8mdk
2202- added linkage to the using_samba book in swat
2203
2204* Fri Sep 01 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-7mdk
2205- Added CUPS support to smb.conf
2206- Added internationalization options to smb.conf [Global]
2207
2208* Wed Aug 30 2000 Till Kamppeter <till@mandrakesoft.com> 2.0.7-6mdk
2209- Put "smbspool" to the files to install
2210
2211* Wed Aug 30 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-5mdk
2212- Did some cleaning in the patches
2213
2214* Fri Jul 28 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-4mdk
2215- relocated man pages from /usr/man to /usr/share/man for compatibility reasons
2216
2217* Fri Jul 28 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-3mdk
2218- added make_unicodemap and build of unicode_map.$i in the spec file
2219
2220* Fri Jul 28 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-2mdk
2221- renamed /etc/codepage/codepage.$i into /etc/codepage/unicode_map.$i to fix smbmount bug.
2222
2223* Fri Jul 07 2000 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.7-1mdk
2224- 2.0.7
2225
2226* Wed Apr 05 2000 Francis Galiegue <fg@mandrakesoft.com> 2.0.6-4mdk
2227
2228- Titi sucks, does not put versions in changelog
2229- Fixed groups for -common and -client
2230- /usr/sbin/samba is no config file
2231
2232* Thu Mar 23 2000 Thierry Vignaud <tvignaud@mandrakesoft.com>
2233- fix buggy post install script (pixel)
2234
2235* Fri Mar 17 2000 Francis Galiegue <francis@mandrakesoft.com> 2.0.6-2mdk
2236
2237- Changed group according to 7.1 specs
2238- Some spec file changes
2239- Let spec-helper do its job
2240
2241* Thu Nov 25 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
2242- 2.0.6.
2243
2244* Tue Nov  2 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
2245- Merge with rh changes.
2246- Split in 3 packages.
2247
2248* Fri Aug 13 1999 Pablo Saratxaga <pablo@@mandrakesoft.com>
2249- corrected a bug with %post (the $1 parameter is "1" in case of
2250  a first install, not "0". That parameter is the number of packages
2251  of the same name that will exist after running all the steps if nothing
2252  is removed; so it is "1" after first isntall, "2" for a second install
2253  or an upgrade, and "0" for a removal)
2254
2255* Wed Jul 28 1999 Pablo Saratxaga <pablo@@mandrakesoft.com>
2256- made smbmnt and smbumount suid root, and only executable by group 'smb'
2257  add to 'smb' group any user that should be allowed to mount/unmount
2258  SMB shared directories
2259
2260* Fri Jul 23 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
2261- 2.0.5a (bug security fix).
2262
2263* Wed Jul 21 1999 Axalon Bloodstone <axalon@linux-mandrake.com>
2264- 2.0.5
2265- cs/da/de/fi/fr/it/tr descriptions/summaries
2266
2267* Sun Jun 13 1999 Bernhard Rosenkrnzer <bero@mandrakesoft.com>
2268- 2.0.4b
2269- recompile on a system that works ;)
2270
2271* Wed Apr 21 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
2272- Mandrake adaptations.
2273- Bzip2 man-pages.
2274
2275* Fri Mar 26 1999 Bill Nottingham <notting@redhat.com>
2276- add a mount.smb to make smb mounting a little easier.
2277- smb filesystems apparently do not work on alpha. Oops.
2278
2279* Thu Mar 25 1999 Bill Nottingham <notting@redhat.com>
2280- always create codepages
2281
2282* Tue Mar 23 1999 Bill Nottingham <notting@redhat.com>
2283- logrotate changes
2284
2285* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
2286- auto rebuild in the new build environment (release 3)
2287
2288* Fri Mar 19 1999 Preston Brown <pbrown@redhat.com>
2289- updated init script to use graceful restart (not stop/start)
2290
2291* Tue Mar  9 1999 Bill Nottingham <notting@redhat.com>
2292- update to 2.0.3
2293
2294* Thu Feb 18 1999 Bill Nottingham <notting@redhat.com>
2295- update to 2.0.2
2296
2297* Mon Feb 15 1999 Bill Nottingham <notting@redhat.com>
2298- swat swat
2299
2300* Tue Feb  9 1999 Bill Nottingham <notting@redhat.com>
2301- fix bash2 breakage in post script
2302
2303* Fri Feb  5 1999 Bill Nottingham <notting@redhat.com>
2304- update to 2.0.0
2305
2306* Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com>
2307- make sure all binaries are stripped
2308
2309* Thu Sep 17 1998 Jeff Johnson <jbj@redhat.com>
2310- update to 1.9.18p10.
2311- fix %triggerpostun.
2312
2313* Tue Jul 07 1998 Erik Troan <ewt@redhat.com>
2314- updated postun triggerscript to check $0
2315- clear /etc/codepages from %preun instead of %postun
2316
2317* Mon Jun 08 1998 Erik Troan <ewt@redhat.com>
2318- made the %postun script a tad less agressive; no reason to remove
2319  the logs or lock file (after all, if the lock file is still there,
2320  samba is still running)
2321- the %postun and %preun should only exectute if this is the final
2322  removal
2323- migrated %triggerpostun from Red Hat's samba package to work around
2324  packaging problems in some Red Hat samba releases
2325
2326* Sun Apr 26 1998 John H Terpstra <jht@samba.anu.edu.au>
2327- minor tidy up in preparation for release of 1.9.18p5
2328- added findsmb utility from SGI package
2329
2330* Wed Mar 18 1998 John H Terpstra <jht@samba.anu.edu.au>
2331- Updated version and codepage info.
2332- Release to test name resolve order
2333
2334* Sat Jan 24 1998 John H Terpstra <jht@samba.anu.edu.au>
2335- Many optimisations (some suggested by Manoj Kasichainula <manojk@io.com>
2336- Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb
2337- Compounded make line
2338- Updated smb.init restart mechanism
2339- Use compound mkdir -p line instead of individual calls to mkdir
2340- Fixed smb.conf file path for log files
2341- Fixed smb.conf file path for incoming smb print spool directory
2342- Added a number of options to smb.conf file
2343- Added smbadduser command (missed from all previous RPMs) - Doooh!
2344- Added smbuser file and smb.conf file updates for username map
2345