1 |
%define pkg_name samba |
2 |
%define version 3.5.8 |
3 |
%define rel 1 |
4 |
%define subrel 5 |
5 |
%define vscanver 0.3.6c-beta5 |
6 |
%define libsmbmajor 0 |
7 |
%define netapimajor 0 |
8 |
%define smbsharemodesmajor 0 |
9 |
%define tallocmajor 1 |
10 |
%define tdbmajor 1 |
11 |
%define wbclientmajor 0 |
12 |
|
13 |
# Samba has started using -Wl,z,nodefs upstream, without libtool (after patch |
14 |
# submission to them, handled in samba bug 6792. To allow |
15 |
# plugins to link now, we have to avoid any such flags by default |
16 |
#define _disable_ld_no_undefined 1 |
17 |
# or, instead, filter them out of the right line in the Makefile, like before |
18 |
# see LDSHFLAGS_MODULES below |
19 |
|
20 |
%{!?lib: %global lib lib} |
21 |
%{!?mklibname: %global mklibname(ds) %lib%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}} |
22 |
|
23 |
%{?!mga_ver:%global mga_ver(r:) %{-r:%(perl -e '$_="%{1}";m/(((\\d\\.?)+)(\\w\*))(.\*)/;$pre=$4;print "0.$pre." if $pre =~ /\\w\{2,\}/;print "%{-r*}"')}%{!-r:%(perl -e '$_="%{1}";m/(((\\d\\.?)+)(\\w\*))(.\*)/;$pre=$4;print "$2";print $pre if $pre !~ /\\w{2,}/')}} |
24 |
|
25 |
%define libname %mklibname smbclient %libsmbmajor |
26 |
%define libnetapi %mklibname netapi %netapimajor |
27 |
%define netapidevel %mklibname -d netapi |
28 |
%define libsmbsharemodes %mklibname smbsharemodes %smbsharemodesmajor |
29 |
%define smbsharemodesdevel %mklibname -d smbsharemodes |
30 |
%define libtalloc %mklibname talloc %tallocmajor |
31 |
%define tallocdevel %mklibname -d talloc |
32 |
%define libtdb %mklibname tdb %tdbmajor |
33 |
%define tdbdevel %mklibname -d tdb |
34 |
%define libwbclient %mklibname wbclient %wbclientmajor |
35 |
%define wbclientdevel %mklibname -d wbclient |
36 |
|
37 |
# Version and release replaced by samba-team at release from samba cvs |
38 |
%define pversion PVERSION |
39 |
%define prelease PRELEASE |
40 |
|
41 |
#Check to see if p(version|release) has been replaced (1 if replaced) |
42 |
%define have_pversion %(if [ "%pversion" = `echo "pversion" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi) |
43 |
|
44 |
%if %have_pversion |
45 |
%define source_ver %{pversion} |
46 |
%define rel %mkrel 1.%{prelease} |
47 |
# Don't abort for stupid reasons on builds from tarballs: |
48 |
%global _unpackaged_files_terminate_build 0 |
49 |
%global _missing_doc_files_terminate_build 0 |
50 |
%else |
51 |
%define source_ver %{version} |
52 |
%endif |
53 |
|
54 |
%define prerel %mga_ver -r %rel %source_ver |
55 |
%define real_version %mga_ver %source_ver |
56 |
%define release %mkrel %prerel |
57 |
%define have_pre %([ "%version" == "%source_ver" ]; echo $?) |
58 |
|
59 |
# Check to see if we are running a build from a tarball release from samba.org |
60 |
# (%have_pversion) If so, disable vscan, unless explicitly requested |
61 |
# (--with vscan). |
62 |
#FIXME |
63 |
%define build_vscan 0 |
64 |
%if %have_pversion |
65 |
%define build_vscan 0 |
66 |
%{?_with_vscan: %define build_vscan 1} |
67 |
%endif |
68 |
|
69 |
# Default options |
70 |
%define build_talloc 1 |
71 |
%define build_tdb 1 |
72 |
%define build_ldb 1 |
73 |
%define build_ctdb 1 |
74 |
%define build_alternatives 0 |
75 |
%define build_system 0 |
76 |
%define build_acl 1 |
77 |
%define build_winbind 1 |
78 |
%define build_wins 1 |
79 |
%define build_ldap 0 |
80 |
%define build_ads 1 |
81 |
%define build_scanners 0 |
82 |
%define build_test 0 |
83 |
# CUPS supports functionality for 'printcap name = cups' (9.0 and later): |
84 |
%define build_cupspc 0 |
85 |
# %_{pre,postun}_service are provided by rpm-helper in 9.0 and later |
86 |
%define have_rpmhelper 1 |
87 |
%define build_mysql 0 |
88 |
%define build_pgsql 0 |
89 |
|
90 |
# Set defaults for each version |
91 |
%define build_talloc 0 |
92 |
%define build_tdb 0 |
93 |
%define build_ldb 0 |
94 |
|
95 |
%define build_system 1 |
96 |
|
97 |
%define build_alternatives 1 |
98 |
|
99 |
%define build_cupspc 1 |
100 |
|
101 |
# Allow commandline option overrides (borrowed from Vince's qmail srpm): |
102 |
# To use it, do rpm [-ba|--rebuild] --with 'xxx' |
103 |
# Check if the rpm was built with the defaults, otherwise we inform the user |
104 |
%define build_non_default 0 |
105 |
%{?_with_system: %global build_system 1} |
106 |
%{?_without_system: %global build_system 0} |
107 |
%{?_with_acl: %global build_acl 1} |
108 |
%{?_with_acl: %global build_non_default 1} |
109 |
%{?_without_acl: %global build_acl 0} |
110 |
%{?_without_acl: %global build_non_default 1} |
111 |
%{?_with_winbind: %global build_winbind 1} |
112 |
%{?_with_winbind: %global build_non_default 1} |
113 |
%{?_without_winbind: %global build_winbind 0} |
114 |
%{?_without_winbind: %global build_non_default 1} |
115 |
%{?_with_wins: %global build_wins 1} |
116 |
%{?_with_wins: %global build_non_default 1} |
117 |
%{?_without_wins: %global build_wins 0} |
118 |
%{?_without_wins: %global build_non_default 1} |
119 |
%{?_with_ldap: %global build_ldap 1} |
120 |
%{?_with_ldap: %global build_non_default 1} |
121 |
%{?_without_ldap: %global build_ldap 0} |
122 |
%{?_without_ldap: %global build_non_default 1} |
123 |
%{?_with_ads: %global build_ads 1} |
124 |
%{?_with_ads: %global build_non_default 1} |
125 |
%{?_without_ads: %global build_ads 0} |
126 |
%{?_without_ads: %global build_non_default 1} |
127 |
%{?_with_scanners: %global build_scanners 1} |
128 |
%{?_with_scanners: %global build_non_default 1} |
129 |
%{?_without_scanners: %global build_scanners 0} |
130 |
%{?_without_scanners: %global build_non_default 1} |
131 |
%{?_with_vscan: %global build_vscan 1} |
132 |
%{?_with_vscan: %global build_non_default 1} |
133 |
%{?_without_vscan: %global build_vscan 0} |
134 |
%{?_without_vscan: %global build_non_default 1} |
135 |
%{?_with_test: %global build_test 1} |
136 |
%{?_with_test: %global build_non_default 1} |
137 |
%{?_without_test: %global build_test 0} |
138 |
%{?_without_test: %global build_non_default 1} |
139 |
%{?_with_mysql: %global build_mysql 1} |
140 |
%{?_with_pgsql: %global build_pgsql 1} |
141 |
# As if that weren't enough, we're going to try building with antivirus |
142 |
# support as an option also |
143 |
%global build_antivir 0 |
144 |
%global build_clamav 0 |
145 |
%global build_fprot 0 |
146 |
%global build_fsav 0 |
147 |
%global build_icap 0 |
148 |
%global build_kaspersky 0 |
149 |
%global build_mks 0 |
150 |
%global build_nai 0 |
151 |
%global build_openav 0 |
152 |
%global build_sophos 0 |
153 |
%global build_symantec 0 |
154 |
%global build_trend 0 |
155 |
%if %build_vscan |
156 |
# These we build by default |
157 |
%global build_clamav 1 |
158 |
%global build_icap 1 |
159 |
%endif |
160 |
%if %build_vscan && %build_scanners |
161 |
# These scanners are built if scanners are selected |
162 |
# symantec requires their library present and must be selected |
163 |
# individually |
164 |
%global build_fprot 1 |
165 |
%global build_fsav 1 |
166 |
%global build_kaspersky 1 |
167 |
%global build_mks 1 |
168 |
%global build_nai 1 |
169 |
%global build_openav 1 |
170 |
%global build_sophos 1 |
171 |
%global build_trend 1 |
172 |
%endif |
173 |
%if %build_vscan |
174 |
%{?_with_fprot: %{expand: %%global build_fprot 1}} |
175 |
%{?_with_kaspersky: %{expand: %%global build_kaspersky 1}} |
176 |
%{?_with_mks: %{expand: %%global build_mks 1}} |
177 |
%{?_with_openav: %{expand: %%global build_openav 1}} |
178 |
%{?_with_sophos: %{expand: %%global build_sophos 1}} |
179 |
#%{?_with_symantec: %{expand: %%global build_symantec 1}} |
180 |
%{?_with_trend: %{expand: %%global build_trend 1}} |
181 |
%global vscandir samba-vscan-%{vscanver} |
182 |
%endif |
183 |
%global vfsdir examples.bin/VFS |
184 |
|
185 |
#Standard texts for descriptions: |
186 |
%define message_bugzilla() %(echo -e -n "Please file bug reports for this package at Mageia bugzilla \\n(http://bugs.mageia.org) under the product name %{1}") |
187 |
%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") |
188 |
|
189 |
#check gcc version to disable some optimisations on gcc-3.3.1 |
190 |
# gcc is not mandatory to do rpm queries on a .src.rpm, which is what the buildsystem |
191 |
# ends up doing, so we need to guard against that |
192 |
%define gcc331 %((gcc -dumpversion 2>/dev/null || echo 4.1.2) |awk '{if ($1>3.3) print 1; else print 0}') |
193 |
|
194 |
#Define sets of binaries that we can use in globs and loops: |
195 |
%global commonbin net,ntlm_auth,rpcclient,smbcacls,smbcquotas,smbpasswd,smbtree,testparm |
196 |
|
197 |
%global serverbin pdbedit,profiles,smbcontrol,smbstatus,sharesec |
198 |
%if %build_ldb |
199 |
%global serverldbbin ldbadd,ldbdel,ldbedit,ldbmodify,ldbsearch,ldbrename |
200 |
%endif |
201 |
%global serversbin nmbd,samba,smbd |
202 |
|
203 |
%global clientbin findsmb,nmblookup,smbclient,smbprint,smbspool,smbtar,smbget |
204 |
%global client_sbin mount.smb,mount.smbfs |
205 |
%global cifs_bin mount.cifs,umount.cifs,cifs.upcall |
206 |
%global client_man man1/findsmb.1,man1/nmblookup.1,man1/smbclient.1,man1/smbget.1,man1/smbtar.1,man5/smbgetrc.5,man8/smbspool.8 |
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 xml%{?_with_pgsql:,pgsql}%{?_with_mysql:,mysql} |
214 |
%endif |
215 |
|
216 |
# Determine whether this is the system samba or not. |
217 |
%if %build_system |
218 |
%define samba_major %{nil} |
219 |
%else |
220 |
%define samba_major 3 |
221 |
%endif |
222 |
# alternatives_major is %{nil} if we aren't system and not using alternatives |
223 |
%if !%build_system || %build_alternatives |
224 |
%define alternative_major 3 |
225 |
%else |
226 |
%define alternative_major %{nil} |
227 |
%endif |
228 |
|
229 |
Summary: Samba SMB server |
230 |
Name: %{pkg_name}%{samba_major} |
231 |
|
232 |
Version: %{source_ver} |
233 |
Release: %{release} |
234 |
|
235 |
License: GPLv3 |
236 |
Group: System/Servers |
237 |
Source: http://www.samba.org/samba/ftp/stable/samba-%{source_ver}.tar.gz |
238 |
Source99: http://www.samba.org/samba/ftp/stable/samba-%{source_ver}.tar.asc |
239 |
Source98: http://www.samba.org/samba/ftp/samba-pubkey.asc |
240 |
URL: http://www.samba.org |
241 |
Source1: samba.log |
242 |
Source3: samba.xinetd |
243 |
Source4: swat_48.png.bz2 |
244 |
Source5: swat_32.png.bz2 |
245 |
Source6: swat_16.png.bz2 |
246 |
Source7: README.%{name}-mageia-rpm |
247 |
Source8: samba-vscan-%{vscanver}.tar.gz |
248 |
%if %build_vscan |
249 |
%endif |
250 |
%if %build_vscan |
251 |
BuildRequires: file-devel |
252 |
%endif |
253 |
Source10: samba-print-pdf.sh.bz2 |
254 |
Source11: smb-migrate.bz2 |
255 |
|
256 |
#Sources that used to be in packaging patch: |
257 |
Source20: smbusers |
258 |
Source21: smbprint |
259 |
#Source22: smbadduser |
260 |
Source23: findsmb |
261 |
Source24: smb.init |
262 |
Source25: winbind.init |
263 |
Source26: wrepld.init |
264 |
Source27: samba.pamd |
265 |
Source28: samba.pamd0_9 |
266 |
Source29: system-auth-winbind.pamd |
267 |
Source30: smb.conf |
268 |
|
269 |
|
270 |
%if !%have_pversion |
271 |
# Version specific patches: current version |
272 |
Patch11: samba-3.0-mageia-packaging.patch |
273 |
# https://bugzilla.samba.org/show_bug.cgi?id=3571, bug 21387 |
274 |
Patch19: samba-3.0.21c-swat-fr-translaction.patch |
275 |
Patch22: samba-3.0.30-fix-recursive-ac-macro.patch |
276 |
Patch30: samba-3.5-check-undefined-before-zdefs.patch |
277 |
Patch31: samba-3.5.3-fix-nss-wins-syslog.patch |
278 |
Patch33: samba-3.5.8-fix-netapi-examples-linking.patch |
279 |
Patch34: samba-3.5.10-CVE-2011-1678.diff |
280 |
Patch35: samba-3.5.10-CVE-2011-2724.diff |
281 |
Patch36: samba-3.5.3-CVE-2011-2522,2694.diff |
282 |
Patch37: samba-3.5.13-CVE-2012-1182.patch |
283 |
Patch38: samba-3.5-CVE-2012-2111.patch |
284 |
Patch39: samba-3.5.3-CVE-2012-1586.diff |
285 |
Patch40: samba-3.5.8-CVE-2013-0213-CVE-2013-0214.patch |
286 |
%else |
287 |
# Version specific patches: upcoming version |
288 |
%endif |
289 |
# Limbo patches (applied to prereleases, but not preleases, ie destined for |
290 |
# samba CVS) |
291 |
%if %have_pversion && %have_pre |
292 |
%endif |
293 |
Requires: pam >= 0.64, samba-common = %{version} |
294 |
BuildRequires: pam-devel readline-devel libncurses-devel popt-devel |
295 |
BuildRequires: libxml2-devel |
296 |
# Samba 3.2 and later should be built with capabilities support: |
297 |
# http://lists.samba.org/archive/samba/2009-March/146821.html |
298 |
BuildRequires: libcap-devel |
299 |
BuildRequires: gnupg |
300 |
BuildRequires: avahi-client-devel |
301 |
BuildRequires: libaio-devel |
302 |
BuildRequires: libuuid-devel |
303 |
%if %build_ctdb |
304 |
BuildRequires: ctdb-devel > 1.0.77 |
305 |
%endif |
306 |
%if %build_pgsql |
307 |
BuildRequires: postgresql-devel |
308 |
%endif |
309 |
%ifnarch alpha |
310 |
%if %build_mysql |
311 |
BuildRequires: mysql-devel |
312 |
%endif |
313 |
%endif |
314 |
%if %build_acl |
315 |
BuildRequires: libacl-devel |
316 |
%endif |
317 |
BuildRequires: libcups-devel cups-common |
318 |
BuildRequires: libldap-devel |
319 |
%if %build_ads |
320 |
BuildRequires: libldap-devel krb5-devel |
321 |
%endif |
322 |
BuildRequires: keyutils-devel |
323 |
%if !%build_tdb |
324 |
BuildRequires: tdb-devel |
325 |
%endif |
326 |
%if !%build_ldb |
327 |
#BuildRequires: ldb-devel |
328 |
%endif |
329 |
%if !%build_talloc |
330 |
BuildRequires: talloc-devel |
331 |
%endif |
332 |
# for domain-join gui |
333 |
BuildRequires: gtk2-devel |
334 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root |
335 |
Requires(pre): chkconfig mktemp psmisc |
336 |
Requires(pre): coreutils sed grep |
337 |
|
338 |
%description |
339 |
Samba provides an SMB server which can be used to provide |
340 |
network services to SMB (sometimes called "Lan Manager") |
341 |
clients, including various versions of MS Windows, OS/2, |
342 |
and other Linux machines. Samba also provides some SMB |
343 |
clients, which complement the built-in SMB filesystem |
344 |
in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols |
345 |
and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) |
346 |
protocol. |
347 |
|
348 |
Samba-3.0 features working NT Domain Control capability and |
349 |
includes the SWAT (Samba Web Administration Tool) that |
350 |
allows samba's smb.conf file to be remotely managed using your |
351 |
favourite web browser. For the time being this is being |
352 |
enabled on TCP port 901 via xinetd. SWAT is now included in |
353 |
it's own subpackage, samba-swat. |
354 |
|
355 |
Please refer to the WHATSNEW.txt document for fixup information. |
356 |
This binary release includes encrypted password support. |
357 |
|
358 |
Please read the smb.conf file and ENCRYPTION.txt in the |
359 |
docs directory for implementation details. |
360 |
%if %have_pversion |
361 |
%message_bugzilla samba3 |
362 |
%endif |
363 |
%if !%build_system |
364 |
%message_system |
365 |
%endif |
366 |
%if %build_non_default |
367 |
WARNING: This RPM was built with command-line options. Please |
368 |
see README.%{name}-mageia-rpm in the documentation for |
369 |
more information. |
370 |
%endif |
371 |
|
372 |
%package server |
373 |
URL: http://www.samba.org |
374 |
Summary: Samba (SMB) server programs |
375 |
Requires: %{name}-common = %{version} |
376 |
%if %have_rpmhelper |
377 |
Requires(pre): rpm-helper |
378 |
%endif |
379 |
Group: Networking/Other |
380 |
%if %build_system |
381 |
Provides: samba |
382 |
Obsoletes: samba |
383 |
Provides: samba-server-ldap |
384 |
Obsoletes: samba-server-ldap |
385 |
Provides: samba3-server |
386 |
Obsoletes: samba3-server |
387 |
%else |
388 |
#Provides: samba-server |
389 |
%endif |
390 |
|
391 |
%description server |
392 |
Samba-server provides a SMB server which can be used to provide |
393 |
network services to SMB (sometimes called "Lan Manager") |
394 |
clients. Samba uses NetBIOS over TCP/IP (NetBT) protocols |
395 |
and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) |
396 |
protocol. |
397 |
|
398 |
Samba-3.0 features working NT Domain Control capability and |
399 |
includes the SWAT (Samba Web Administration Tool) that |
400 |
allows samba's smb.conf file to be remotely managed using your |
401 |
favourite web browser. For the time being this is being |
402 |
enabled on TCP port 901 via xinetd. SWAT is now included in |
403 |
it's own subpackage, samba-swat. |
404 |
|
405 |
Please refer to the WHATSNEW.txt document for fixup information. |
406 |
This binary release includes encrypted password support. |
407 |
|
408 |
Please read the smb.conf file and ENCRYPTION.txt in the |
409 |
docs directory for implementation details. |
410 |
%if %have_pversion |
411 |
%message_bugzilla samba3-server |
412 |
%endif |
413 |
%if !%build_system |
414 |
%message_system |
415 |
%endif |
416 |
|
417 |
%package client |
418 |
URL: http://www.samba.org |
419 |
Summary: Samba (SMB) client programs |
420 |
Group: Networking/Other |
421 |
Requires: %{name}-common = %{version} |
422 |
Requires: mount-cifs >= %{version} |
423 |
%if %build_alternatives |
424 |
#Conflicts: samba-client < 2.2.8a-9mdk |
425 |
%endif |
426 |
%if %build_system |
427 |
Provides: samba3-client |
428 |
Obsoletes: samba3-client |
429 |
Obsoletes: smbfs |
430 |
%else |
431 |
#Provides: samba-client |
432 |
%endif |
433 |
%if !%build_system && %build_alternatives |
434 |
Provides: samba-client |
435 |
%endif |
436 |
|
437 |
%description client |
438 |
Samba-client provides some SMB clients, which complement the built-in |
439 |
SMB filesystem in Linux. These allow the accessing of SMB shares, and |
440 |
printing to SMB printers. |
441 |
%if %have_pversion |
442 |
%message_bugzilla samba3-client |
443 |
%endif |
444 |
%if !%build_system |
445 |
%message_system |
446 |
%endif |
447 |
|
448 |
%package common |
449 |
URL: http://www.samba.org |
450 |
Summary: Files used by both Samba servers and clients |
451 |
Group: System/Servers |
452 |
%if %build_system |
453 |
Provides: samba-common-ldap |
454 |
Obsoletes: samba-common-ldap |
455 |
Provides: samba3-common |
456 |
Obsoletes: samba3-common |
457 |
%else |
458 |
#Provides: samba-common |
459 |
%endif |
460 |
|
461 |
%description common |
462 |
Samba-common provides files necessary for both the server and client |
463 |
packages of Samba. |
464 |
%if %have_pversion |
465 |
%message_bugzilla samba3-common |
466 |
%endif |
467 |
%if !%build_system |
468 |
%message_system |
469 |
%endif |
470 |
|
471 |
%package doc |
472 |
URL: http://www.samba.org |
473 |
Summary: Documentation for Samba servers and clients |
474 |
Group: System/Servers |
475 |
Requires: %{name}-common = %{version} |
476 |
BuildArch: noarch |
477 |
%if %build_system |
478 |
Obsoletes: samba3-doc |
479 |
Provides: samba3-doc |
480 |
%else |
481 |
#Provides: samba-doc |
482 |
%endif |
483 |
|
484 |
%description doc |
485 |
Samba-doc provides documentation files for both the server and client |
486 |
packages of Samba. |
487 |
%if %have_pversion |
488 |
%message_bugzilla samba3-doc |
489 |
%endif |
490 |
%if !%build_system |
491 |
%message_system |
492 |
%endif |
493 |
|
494 |
%package swat |
495 |
URL: http://www.samba.org |
496 |
Summary: The Samba Web Administration Tool |
497 |
Requires: %{name}-server = %{version} |
498 |
Requires: xinetd |
499 |
Group: System/Servers |
500 |
%if %build_system |
501 |
Provides: samba-swat-ldap |
502 |
Obsoletes: samba-swat-ldap |
503 |
Provides: samba3-swat |
504 |
Obsoletes: samba3-swat |
505 |
%else |
506 |
#Provides: samba-swat |
507 |
%endif |
508 |
Conflicts: %{name}-server < 3.4.0 |
509 |
Suggests: %{name}-doc |
510 |
|
511 |
%description swat |
512 |
SWAT (the Samba Web Administration Tool) allows samba's smb.conf file |
513 |
to be remotely managed using your favourite web browser. For the time |
514 |
being this is being enabled on TCP port 901 via xinetd. Note that |
515 |
SWAT does not use SSL encryption, nor does it preserve comments in |
516 |
your smb.conf file. Webmin uses SSL encryption by default, and |
517 |
preserves comments in configuration files, even if it does not display |
518 |
them, and is therefore the preferred method for remotely managing |
519 |
Samba. |
520 |
%if %have_pversion |
521 |
%message_bugzilla samba3-swat |
522 |
%endif |
523 |
%if !%build_system |
524 |
%message_system |
525 |
%endif |
526 |
|
527 |
%if %build_winbind |
528 |
%package winbind |
529 |
URL: http://www.samba.org |
530 |
Summary: Samba-winbind daemon, utilities and documentation |
531 |
Group: System/Servers |
532 |
Requires: %{name}-common = %{version} |
533 |
%endif |
534 |
%if %build_winbind && !%build_system |
535 |
Conflicts: samba-winbind |
536 |
%endif |
537 |
%if %build_winbind |
538 |
%description winbind |
539 |
Provides the winbind daemon and testing tools to allow authentication |
540 |
and group/user enumeration from a Windows or Samba domain controller. |
541 |
%endif |
542 |
%if %have_pversion |
543 |
%message_bugzilla samba3-winbind |
544 |
%endif |
545 |
%if !%build_system |
546 |
%message_system |
547 |
%endif |
548 |
|
549 |
%if %build_wins |
550 |
%package -n nss_wins%{samba_major} |
551 |
URL: http://www.samba.org |
552 |
Summary: Name Service Switch service for WINS |
553 |
Group: System/Servers |
554 |
Requires: %{name}-common = %{version} |
555 |
Requires(pre): glibc |
556 |
%endif |
557 |
%if %build_wins && !%build_system |
558 |
Conflicts: nss_wins |
559 |
%endif |
560 |
%if %build_wins |
561 |
%description -n nss_wins%{samba_major} |
562 |
Provides the libnss_wins shared library which resolves NetBIOS names to |
563 |
IP addresses. |
564 |
%endif |
565 |
%if %have_pversion |
566 |
%message_bugzilla nss_wins3 |
567 |
%endif |
568 |
%if !%build_system |
569 |
%message_system |
570 |
%endif |
571 |
|
572 |
%if %build_test |
573 |
%package test |
574 |
URL: http://www.samba.org |
575 |
Summary: Debugging and benchmarking tools for samba |
576 |
Group: System/Servers |
577 |
Requires: %{name}-common = %{version} |
578 |
%endif |
579 |
%if %build_system && %build_test |
580 |
Provides: samba3-test samba3-debug |
581 |
Obsoletes: samba3-test samba3-debug |
582 |
%endif |
583 |
%if !%build_system && %{build_test} |
584 |
Provides: samba-test samba3-debug |
585 |
Obsoletes: samba3-debug |
586 |
%endif |
587 |
%if %{build_test} |
588 |
|
589 |
%description test |
590 |
This package provides tools for benchmarking samba, and debugging |
591 |
the correct operation of tools against smb servers. |
592 |
%endif |
593 |
|
594 |
%if %build_system |
595 |
%package -n %{libname} |
596 |
URL: http://www.samba.org |
597 |
Summary: SMB Client Library |
598 |
Group: System/Libraries |
599 |
Provides: libsmbclient |
600 |
|
601 |
%description -n %{libname} |
602 |
This package contains the SMB client library, part of the samba |
603 |
suite of networking software, allowing other software to access |
604 |
SMB shares. |
605 |
%endif |
606 |
%if %have_pversion && %build_system |
607 |
%message_bugzilla %{libname} |
608 |
%endif |
609 |
|
610 |
%if %build_system |
611 |
%package -n %{libname}-devel |
612 |
URL: http://www.samba.org |
613 |
Summary: SMB Client Library Development files |
614 |
Group: Development/C |
615 |
Provides: libsmbclient-devel = %{version}-%{release} |
616 |
Requires: %{libname} = %{version}-%{release} |
617 |
|
618 |
%description -n %{libname}-devel |
619 |
This package contains the development files for the SMB client |
620 |
library, part of the samba suite of networking software, allowing |
621 |
the development of other software to access SMB shares. |
622 |
%endif |
623 |
%if %have_pversion && %build_system |
624 |
%message_bugzilla %{libname}-devel |
625 |
%endif |
626 |
|
627 |
%if %build_system |
628 |
%package -n %{libname}-static-devel |
629 |
URL: http://www.samba.org |
630 |
Summary: SMB Client Static Library Development files |
631 |
Group: Development/C |
632 |
Provides: libsmbclient-static-devel = %{version}-%{release} |
633 |
Requires: %{libname}-devel = %{version}-%{release} |
634 |
|
635 |
%description -n %{libname}-static-devel |
636 |
This package contains the static development files for the SMB |
637 |
client library, part of the samba suite of networking software, |
638 |
allowing the development of other software to access SMB shares. |
639 |
%endif |
640 |
%if %have_pversion && %build_system |
641 |
%message_bugzilla %{libname}-devel |
642 |
%endif |
643 |
|
644 |
%package -n %libnetapi |
645 |
Summary: Samba library for accessing functions in 'net' binary |
646 |
Group: System/Libraries |
647 |
|
648 |
%description -n %libnetapi |
649 |
Samba library for accessing functions in 'net' binary |
650 |
|
651 |
%package -n %netapidevel |
652 |
Group: Development/C |
653 |
Summary: Samba library for accessing functions in 'net' binary |
654 |
Provides: netapi-devel = %{version}-%{release} |
655 |
|
656 |
%description -n %netapidevel |
657 |
Samba library for accessing functions in 'net' binary |
658 |
|
659 |
%package -n %libsmbsharemodes |
660 |
Group: System/Libraries |
661 |
Summary: Samba Library for accessing smb share modes (locks etc.) |
662 |
|
663 |
%description -n %libsmbsharemodes |
664 |
Samba Library for accessing smb share modes (locks etc.) |
665 |
|
666 |
%package -n %smbsharemodesdevel |
667 |
Group: Development/C |
668 |
Summary: Samba Library for accessing smb share modes (locks etc.) |
669 |
Provides: smbsharemodes-devel = %{version}-%{release} |
670 |
|
671 |
%description -n %smbsharemodesdevel |
672 |
Samba Library for accessing smb share modes (locks etc.) |
673 |
|
674 |
%if %build_talloc |
675 |
%package -n %libtalloc |
676 |
Group: System/Libraries |
677 |
Summary: Library implementing Samba's memory allocator |
678 |
|
679 |
%description -n %libtalloc |
680 |
Library implementing Samba's memory allocator |
681 |
|
682 |
%package -n %tallocdevel |
683 |
Group: Development/C |
684 |
Summary: Library implementing Samba's memory allocator |
685 |
Provides: talloc-devel = %{version}-%{release} |
686 |
|
687 |
%description -n %tallocdevel |
688 |
Library implementing Samba's memory allocator |
689 |
%endif |
690 |
|
691 |
%if %build_tdb |
692 |
%package -n %libtdb |
693 |
Group: System/Libraries |
694 |
Summary: Library implementing Samba's embedded database |
695 |
|
696 |
%description -n %libtdb |
697 |
Library implementing Samba's embedded database |
698 |
|
699 |
%package -n %tdbdevel |
700 |
Group: Development/C |
701 |
Summary: Library implementing Samba's embedded database |
702 |
Provides: tdb-devel = %{version}-%{release} |
703 |
Requires: %libtdb |
704 |
# because /usr/include/tdb.h was moved from libsmbclient0-devel to libtdb-devel |
705 |
Conflicts: %{mklibname smbclient 0 -d} < 3.2.6-3 |
706 |
|
707 |
%description -n %tdbdevel |
708 |
Library implementing Samba's embedded database |
709 |
%endif |
710 |
|
711 |
%package -n %libwbclient |
712 |
Group: System/Libraries |
713 |
Summary: Library providing access to winbindd |
714 |
|
715 |
%description -n %libwbclient |
716 |
Library providing access to winbindd |
717 |
|
718 |
%package -n %wbclientdevel |
719 |
Group: Development/C |
720 |
Summary: Library providing access to winbindd |
721 |
Provides: wbclient-devel = %{version}-%{release} |
722 |
|
723 |
%description -n %wbclientdevel |
724 |
Library providing access to winbindd |
725 |
|
726 |
#%package passdb-ldap |
727 |
#URL: http://www.samba.org |
728 |
#Summary: Samba password database plugin for LDAP |
729 |
#Group: System/Libraries |
730 |
# |
731 |
#%description passdb-ldap |
732 |
#The passdb-ldap package for samba provides a password database |
733 |
#backend allowing samba to store account details in an LDAP |
734 |
#database |
735 |
#_if %have_pversion |
736 |
#_message_bugzilla samba3-passdb-ldap |
737 |
#_endif |
738 |
#_if !%build_system |
739 |
#_message_system |
740 |
#_endif |
741 |
|
742 |
%ifnarch alpha |
743 |
%if %{build_mysql} |
744 |
%package passdb-mysql |
745 |
URL: http://www.samba.org |
746 |
Summary: Samba password database plugin for MySQL |
747 |
Group: System/Libraries |
748 |
Requires: %{name}-server = %{version}-%{release} |
749 |
%endif |
750 |
%endif |
751 |
%ifnarch alpha |
752 |
%if %build_system && %{build_mysql} |
753 |
Obsoletes: samba3-passdb-mysql |
754 |
Provides: samba3-passdb-mysql |
755 |
%endif |
756 |
%endif |
757 |
%ifnarch alpha |
758 |
%if %{build_mysql} |
759 |
|
760 |
%description passdb-mysql |
761 |
The passdb-mysql package for samba provides a password database |
762 |
backend allowing samba to store account details in a MySQL |
763 |
database |
764 |
%endif |
765 |
%endif |
766 |
|
767 |
#does postgresql build on alpha? |
768 |
#ifnarch alpha |
769 |
%if %{build_pgsql} |
770 |
%package passdb-pgsql |
771 |
URL: http://www.samba.org |
772 |
Summary: Samba password database plugin for PostgreSQL |
773 |
Group: System/Libraries |
774 |
Requires: %{name}-server = %{version}-%{release} |
775 |
#endif |
776 |
#ifnarch alpha && %build_system |
777 |
%endif |
778 |
%if %build_system && %{build_pgsql} |
779 |
Obsoletes: samba3-passdb-pgsql |
780 |
Provides: samba3-passdb-pgsql |
781 |
%endif |
782 |
%if %{build_pgsql} |
783 |
|
784 |
%description passdb-pgsql |
785 |
The passdb-pgsql package for samba provides a password database |
786 |
backend allowing samba to store account details in a PostgreSQL |
787 |
database |
788 |
%endif |
789 |
|
790 |
#Antivirus packages: |
791 |
%if %build_antivir |
792 |
%package vscan-antivir |
793 |
Summary: On-access virus scanning for samba using Antivir |
794 |
Group: System/Servers |
795 |
Requires: %{name}-server = %{version} |
796 |
Provides: %{name}-vscan |
797 |
%description vscan-antivir |
798 |
A vfs-module for samba to implement on-access scanning using the |
799 |
Antivir antivirus scanner daemon. |
800 |
%endif |
801 |
|
802 |
|
803 |
%if %build_clamav |
804 |
%package vscan-clamav |
805 |
Summary: On-access virus scanning for samba using Clam Antivirus |
806 |
Group: System/Servers |
807 |
Requires: %{name}-server = %{version} |
808 |
Provides: %{name}-vscan |
809 |
Requires: clamd |
810 |
%description vscan-clamav |
811 |
A vfs-module for samba to implement on-access scanning using the |
812 |
Clam antivirus scanner daemon. |
813 |
%endif |
814 |
|
815 |
%if %build_fprot |
816 |
%package vscan-fprot |
817 |
Summary: On-access virus scanning for samba using FPROT |
818 |
Group: System/Servers |
819 |
Requires: %{name}-server = %{version} |
820 |
Provides: %{name}-vscan |
821 |
%description vscan-fprot |
822 |
A vfs-module for samba to implement on-access scanning using the |
823 |
FPROT antivirus software (which must be installed to use this). |
824 |
%endif |
825 |
|
826 |
%if %build_fsav |
827 |
%package vscan-fsecure |
828 |
Summary: On-access virus scanning for samba using F-Secure |
829 |
Group: System/Servers |
830 |
Requires: %{name}-server = %{version} |
831 |
Provides: %{name}-vscan |
832 |
%description vscan-fsecure |
833 |
A vfs-module for samba to implement on-access scanning using the |
834 |
F-Secure antivirus software (which must be installed to use this). |
835 |
%endif |
836 |
|
837 |
%if %build_icap |
838 |
%package vscan-icap |
839 |
Summary: On-access virus scanning for samba using ICAP |
840 |
Group: System/Servers |
841 |
Requires: %{name}-server = %{version} |
842 |
Provides: %{name}-icap |
843 |
%description vscan-icap |
844 |
A vfs-module for samba to implement on-access scanning using |
845 |
ICAP-capable antivirus software. |
846 |
%endif |
847 |
|
848 |
%if %build_kaspersky |
849 |
%package vscan-kaspersky |
850 |
Summary: On-access virus scanning for samba using Kaspersky |
851 |
Group: System/Servers |
852 |
Requires: %{name}-server = %{version} |
853 |
Provides: %{name}-vscan |
854 |
%description vscan-kaspersky |
855 |
A vfs-module for samba to implement on-access scanning using the |
856 |
Kaspersky antivirus software (which must be installed to use this). |
857 |
%endif |
858 |
|
859 |
%if %build_mks |
860 |
%package vscan-mks |
861 |
Summary: On-access virus scanning for samba using MKS |
862 |
Group: System/Servers |
863 |
Requires: %{name}-server = %{version} |
864 |
Provides: %{name}-vscan |
865 |
%description vscan-mks |
866 |
A vfs-module for samba to implement on-access scanning using the |
867 |
MKS antivirus software (which must be installed to use this). |
868 |
%endif |
869 |
|
870 |
%if %build_nai |
871 |
%package vscan-nai |
872 |
Summary: On-access virus scanning for samba using NAI McAfee |
873 |
Group: System/Servers |
874 |
Requires: %{name}-server = %{version} |
875 |
Provides: %{name}-vscan |
876 |
%description vscan-nai |
877 |
A vfs-module for samba to implement on-access scanning using the |
878 |
NAI McAfee antivirus software (which must be installed to use this). |
879 |
%endif |
880 |
|
881 |
%if %build_openav |
882 |
%package vscan-openav |
883 |
Summary: On-access virus scanning for samba using OpenAntivirus |
884 |
Group: System/Servers |
885 |
Requires: %{name}-server = %{version} |
886 |
Provides: %{name}-vscan |
887 |
%description vscan-openav |
888 |
A vfs-module for samba to implement on-access scanning using the |
889 |
OpenAntivirus antivirus software (which must be installed to use this). |
890 |
%endif |
891 |
|
892 |
%if %build_sophos |
893 |
%package vscan-sophos |
894 |
Summary: On-access virus scanning for samba using Sophos |
895 |
Group: System/Servers |
896 |
Requires: %{name}-server = %{version} |
897 |
Provides: %{name}-vscan |
898 |
%description vscan-sophos |
899 |
A vfs-module for samba to implement on-access scanning using the |
900 |
Sophos antivirus software (which must be installed to use this). |
901 |
%endif |
902 |
|
903 |
%if %build_symantec |
904 |
%package vscan-symantec |
905 |
Summary: On-access virus scanning for samba using Symantec |
906 |
Group: System/Servers |
907 |
Requires: %{name}-server = %{version} |
908 |
Provides: %{name}-vscan |
909 |
Autoreq: 0 |
910 |
%description vscan-symantec |
911 |
A vfs-module for samba to implement on-access scanning using the |
912 |
Symantec antivirus software (which must be installed to use this). |
913 |
%endif |
914 |
|
915 |
|
916 |
%if %build_trend |
917 |
%package vscan-trend |
918 |
Summary: On-access virus scanning for samba using Trend |
919 |
Group: System/Servers |
920 |
Requires: %{name}-server = %{version} |
921 |
Provides: %{name}-vscan |
922 |
%description vscan-trend |
923 |
A vfs-module for samba to implement on-access scanning using the |
924 |
Trend antivirus software (which must be installed to use this). |
925 |
%endif |
926 |
|
927 |
%package -n mount-cifs%{samba_major} |
928 |
URL: http://www.samba.org |
929 |
Summary: CIFS filesystem mount helper |
930 |
Group: Networking/Other |
931 |
Requires: keyutils > 1.2-%{mkrel 4} |
932 |
|
933 |
%description -n mount-cifs%{samba_major} |
934 |
This package provides the mount.cifs helper to mount cifs filesystems |
935 |
using the cifs filesystem driver |
936 |
|
937 |
%package domainjoin-gui |
938 |
Summary: Domainjoin GUI |
939 |
Requires: samba-common = %{version} |
940 |
Group: System/Configuration/Other |
941 |
|
942 |
%description domainjoin-gui |
943 |
The samba-domainjoin-gui package includes a domainjoin gtk application. |
944 |
|
945 |
%prep |
946 |
|
947 |
# Allow users to query build options with --with options: |
948 |
#%%define opt_status(%1) %(echo %{1}) |
949 |
%if %{?_with_options:1}%{!?_with_options:0} |
950 |
%define opt_status(%{1}) %(if [ %{1} -eq 1 ];then echo enabled;else echo disabled;fi) |
951 |
#exit 1 |
952 |
%{error: } |
953 |
%{error:Build options available are:} |
954 |
%{error:--with[out] system Build as the system samba package [or as samba3]} |
955 |
%{error:--with[out] acl Build with support for file ACLs - %opt_status %build_acl} |
956 |
%{error:--with[out] winbind Build with Winbind support - %opt_status %build_winbind} |
957 |
%{error:--with[out] wins Build with WINS name resolution support - %opt_status %build_wins} |
958 |
%{error:--with[out] ldap Build with legacy (samba2) LDAP support - %opt_status %build_ldap} |
959 |
%{error:--with[out] ads Build with Active Directory support - %opt_status %build_ads} |
960 |
%{error:--with[out] mysql Build MySQL passdb backend - %opt_status %build_mysql} |
961 |
%{error:--with[out] pgsql Build PostgreSQL passdb backend - %opt_status %build_pgsql} |
962 |
%{error:--with[out] scanners Enable on-access virus scanners - %opt_status %build_scanners} |
963 |
%{error:--with[out] test Enable testing and benchmarking tools - %opt_status %build_test} |
964 |
%{error: } |
965 |
%else |
966 |
#{error: } |
967 |
#{error: This rpm has build options available, use --with options to see them} |
968 |
#{error: } |
969 |
echo -e "\n This rpm has build options available, use --with options to see them\n" >&2 |
970 |
sleep 1 |
971 |
%endif |
972 |
|
973 |
%if %{?_with_options:1}%{!?_with_options:0} && %build_scanners |
974 |
#{error:--with scanners enables the following:%{?build_clamav:clamav,}%{?build_icap:icap,}%{?build_fprot:fprot,}%{?build_mks:mks,}%{?build_openav:openav,}%{?build_sophos:sophos,}%{?build_symantec:symantec,}%{?build_trend:trend}} |
975 |
%{error:--with scanners enables the following: antivir,clamav,icap,fprot,fsav,mks,nai,openav,sophos,trend} |
976 |
%{error: } |
977 |
%{error:To enable others (requires development libraries for the scanner):} |
978 |
%{error:--with symantec Enable on-access scanning with Symantec - %opt_status %build_symantec} |
979 |
%{error: } |
980 |
%endif |
981 |
|
982 |
%if %{?_with_options:1}%{!?_with_options:0} |
983 |
clear |
984 |
exit 1 |
985 |
%endif |
986 |
|
987 |
|
988 |
%if %build_non_default |
989 |
RPM_EXTRA_OPTIONS="\ |
990 |
%{?_with_system: --with system}\ |
991 |
%{?_without_system: --without system}\ |
992 |
%{?_with_acl: --with acl}\ |
993 |
%{?_without_acl: --without acl}\ |
994 |
%{?_with_winbind: --with winbind}\ |
995 |
%{?_without_winbind: --without winbind}\ |
996 |
%{?_with_wins: --with wins}\ |
997 |
%{?_without_wins: --without wins}\ |
998 |
%{?_with_ldap: --with ldap}\ |
999 |
%{?_without_ldap: --without ldap}\ |
1000 |
%{?_with_ads: --with ads}\ |
1001 |
%{?_without_ads: --without ads}\ |
1002 |
%{?_with_scanners: --with scanners}\ |
1003 |
%{?_without_scanners: --without scanners}\ |
1004 |
" |
1005 |
echo "Building a non-default rpm with the following command-line arguments:" |
1006 |
echo "$RPM_EXTRA_OPTIONS" |
1007 |
echo "This rpm was built with non-default options, thus, to build ">%{SOURCE7} |
1008 |
echo "an identical rpm, you need to supply the following options">>%{SOURCE7} |
1009 |
echo "at build time: $RPM_EXTRA_OPTIONS">>%{SOURCE7} |
1010 |
echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7} |
1011 |
%else |
1012 |
echo "This rpm was built with default options">%{SOURCE7} |
1013 |
echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7} |
1014 |
%endif |
1015 |
|
1016 |
|
1017 |
#Try and validate signatures on source: |
1018 |
export GNUPGHOME=%{_tmppath}/samba-gpghome |
1019 |
if [ -d "$GNUPGHOME" ] |
1020 |
then echo "Error, GNUPGHOME $GNUPGHOME exists, remove it and try again"; exit 1 |
1021 |
fi |
1022 |
install -d -m700 $GNUPGHOME |
1023 |
gpg --import %{SOURCE98} |
1024 |
VERIFYSOURCE=`basename %{SOURCE0}` |
1025 |
VERIFYSOURCE=%{_tmppath}/${VERIFYSOURCE%%.gz} |
1026 |
gzip -dc %{SOURCE0} > $VERIFYSOURCE |
1027 |
pushd %{_tmppath} |
1028 |
cp %{SOURCE99} . |
1029 |
gpg --trust-model always --verify `basename %{SOURCE99}` |
1030 |
VERIFIED=$? |
1031 |
rm -f `basename %{SOURCE99}` |
1032 |
popd |
1033 |
rm -Rf $GNUPGHOME |
1034 |
|
1035 |
rm -f $VERIFYSOURCE |
1036 |
if [ "$VERIFIED" -eq 0 ] |
1037 |
then |
1038 |
echo "Verification of %{SOURCE0} against %{SOURCE99} with key %{SOURCE98} succeeded" |
1039 |
else |
1040 |
echo "Source verification failed!" >&2 |
1041 |
exit 1 |
1042 |
fi |
1043 |
|
1044 |
|
1045 |
%if %build_vscan |
1046 |
%setup -q -a 8 -n %{pkg_name}-%{source_ver} |
1047 |
%else |
1048 |
%setup -q -n %{pkg_name}-%{source_ver} |
1049 |
%endif |
1050 |
# Version specific patches: current version |
1051 |
%if !%have_pversion |
1052 |
echo "Applying patches for current version: %{ver}" |
1053 |
%patch11 -p1 -b .mga |
1054 |
pushd source3 |
1055 |
popd |
1056 |
%patch22 -p1 |
1057 |
%patch30 -p1 -b .checkflags |
1058 |
%patch31 -p1 -b .nss_wins_log |
1059 |
%patch33 -p1 -b .netapi_link |
1060 |
%patch34 -p1 -b .CVE-2011-1678 |
1061 |
%patch35 -p0 -b .CVE-2011-2724 |
1062 |
%patch36 -p1 -b .CVE-2011-2522,2694 |
1063 |
%patch37 -p1 -b .CVE-2012-1182 |
1064 |
%patch38 -p1 -b .CVE-2012-2111 |
1065 |
%patch39 -p1 -b .CVE-2012-1586 |
1066 |
%patch40 -p1 -b .swat-vulns |
1067 |
|
1068 |
# patches from cvs/samba team |
1069 |
pushd source3 |
1070 |
popd |
1071 |
%else |
1072 |
# Version specific patches: upcoming version |
1073 |
echo "Applying patches for new versions: %{pversion}" |
1074 |
%endif |
1075 |
|
1076 |
# Limbo patches |
1077 |
%if %have_pversion && %have_pre |
1078 |
echo "Appling patches which should only be applied to prereleases" |
1079 |
%endif |
1080 |
|
1081 |
cp %{SOURCE7} . |
1082 |
|
1083 |
# Make a copy of examples so that we have a clean one for doc: |
1084 |
cp -a examples examples.bin |
1085 |
|
1086 |
%if %build_vscan |
1087 |
cp -a %{vscandir} %{vfsdir} |
1088 |
#fix stupid directory names: |
1089 |
#mv %{vfsdir}/%{vscandir}/openantivirus %{vfsdir}/%{vscandir}/oav |
1090 |
# Inline replacement of config dir |
1091 |
for av in antivir clamav fprotd fsav icap kavp mksd mcdaemon oav sophos symantec trend |
1092 |
do |
1093 |
[ -e %{vfsdir}/%{vscandir}/*/vscan-$av.h ] && perl -pi -e \ |
1094 |
's,^#define PARAMCONF "/etc/samba,#define PARAMCONF "/etc/%{name},' \ |
1095 |
%{vfsdir}/%{vscandir}/*/vscan-$av.h |
1096 |
done |
1097 |
#Inline edit vscan header: |
1098 |
perl -pi -e 's/^# define SAMBA_VERSION_MAJOR 2/# define SAMBA_VERSION_MAJOR 3/g;s/# define SAMBA_VERSION_MINOR 2/# define SAMBA_VERSION_MINOR 0/g' %{vfsdir}/%{vscandir}/include/vscan-global.h |
1099 |
# dunno why samba-vscan keeps copmatability with ancient versions |
1100 |
# of samba but breaks on samba versions with alpha chars in the name ... |
1101 |
perl -pi -e 's/SAMBA_VERSION_MAJOR==2 && SAMBA_VERSION_RELEASE>=4/SAMBA_VERSION_MAJOR==2/g' %{vfsdir}/%{vscandir}/*/vscan-*.c |
1102 |
%endif |
1103 |
|
1104 |
# Edit some files when not building system samba: |
1105 |
%if !%build_system |
1106 |
perl -pi -e 's/%{pkg_name}/%{name}/g' source3/auth/pampass.c |
1107 |
%endif |
1108 |
|
1109 |
#remove cvs internal files from docs: |
1110 |
find docs examples -name '.cvsignore' -exec rm -f {} \; |
1111 |
|
1112 |
#make better doc trees: |
1113 |
chmod -R a+rX examples docs *Manifest* README Roadmap COPYING |
1114 |
mkdir -p clean-docs/samba-doc |
1115 |
cp -a examples docs clean-docs/samba-doc |
1116 |
mv -f clean-docs/samba-doc/examples/libsmbclient clean-docs/ |
1117 |
rm -Rf clean-docs/samba-doc/docs/{docbook,manpages,htmldocs,using_samba} |
1118 |
#ln -s %{_datadir}/swat%{samba_major}/using_samba clean-docs/samba-doc/docs/using_samba |
1119 |
mkdir clean-docs/samba-doc/docs/htmldocs |
1120 |
cp docs/htmldocs/*.{html,css} clean-docs/samba-doc/docs/htmldocs |
1121 |
ln -sf %{_datadir}/swat%{samba_major}/help/{Samba3-ByExample,Samba3-HOWTO,Samba3-Developers-Guide,using_samba,manpages} clean-docs/samba-doc/docs/htmldocs/ |
1122 |
|
1123 |
%build |
1124 |
%serverbuild |
1125 |
(cd source3 |
1126 |
CFLAGS="`echo "$RPM_OPT_FLAGS"|sed -e 's/ -g / /g'` -DLDAP_DEPRECATED" |
1127 |
%if %gcc331 |
1128 |
CFLAGS=`echo "$CFLAGS"|sed -e 's/-O2/-O/g'` |
1129 |
%endif |
1130 |
./autogen.sh |
1131 |
# Don't use --with-fhs now, since it overrides libdir, it sets configdir, |
1132 |
# lockdir,piddir logfilebase,privatedir and swatdir |
1133 |
%configure --prefix=%{_prefix} \ |
1134 |
--sysconfdir=%{_sysconfdir}/%{name} \ |
1135 |
--localstatedir=/var \ |
1136 |
--with-modulesdir=%{_libdir}/%{name} \ |
1137 |
--with-privatedir=%{_sysconfdir}/%{name} \ |
1138 |
--with-lockdir=/var/cache/%{name} \ |
1139 |
--with-piddir=/var/run \ |
1140 |
--with-swatdir=%{_datadir}/swat%{samba_major} \ |
1141 |
--with-configdir=%{_sysconfdir}/%{name} \ |
1142 |
--with-logfilebase=/var/log/%{name} \ |
1143 |
--with-pammodulesdir=%{_lib}/security/ \ |
1144 |
--with-rootsbindir=/bin \ |
1145 |
%if %build_talloc |
1146 |
--with-libtalloc=yes \ |
1147 |
%else |
1148 |
--enable-external-libtalloc=yes \ |
1149 |
%endif |
1150 |
%if %build_tdb |
1151 |
--with-libtdb = yes \ |
1152 |
%else |
1153 |
--enable-external-libtdb=yes \ |
1154 |
%endif |
1155 |
%if %build_ctdb |
1156 |
--with-ctdb \ |
1157 |
--with-cluster-support \ |
1158 |
%endif |
1159 |
%if !%build_ads |
1160 |
--with-ads=no \ |
1161 |
%endif |
1162 |
--with-automount \ |
1163 |
--with-pam \ |
1164 |
--with-pam_smbpass \ |
1165 |
--with-aio-support \ |
1166 |
%if %build_ldap |
1167 |
--with-ldapsam \ |
1168 |
%endif |
1169 |
--with-syslog \ |
1170 |
--with-quotas \ |
1171 |
--with-utmp \ |
1172 |
%if %build_acl |
1173 |
--with-acl-support \ |
1174 |
%endif |
1175 |
--with-shared-modules=idmap_rid,idmap_ad \ |
1176 |
--with-cifsmount \ |
1177 |
--with-cifsumount \ |
1178 |
--with-cifsupcall \ |
1179 |
--enable-avahi \ |
1180 |
--with-dnsupdate \ |
1181 |
--program-suffix=%{samba_major} |
1182 |
# --with-expsam=%build_expsam \ |
1183 |
# --with-shared-modules=pdb_ldap,idmap_ldap \ |
1184 |
# --with-manpages-langs=en,ja,pl \ |
1185 |
#_if !%build_system |
1186 |
# --with-smbwrapper \ |
1187 |
#_endif |
1188 |
# --with-nisplussam \ |
1189 |
# --with-fhs \ |
1190 |
|
1191 |
# Remove -Wl,--no-undefined for plugins: |
1192 |
grep ^LDSHFLAGS_MODULES Makefile |
1193 |
perl -pi -e 'if ( m/^LDSHFLAGS_MODULES/ ) { $_ =~ s/-Wl,--no-undefined//g;};' Makefile |
1194 |
grep ^LDSHFLAGS_MODULES Makefile |
1195 |
|
1196 |
#Should be a patch instead? |
1197 |
%if !%build_talloc |
1198 |
perl -pi -e 's,-I./lib/talloc,,g;s,bin/libtalloc.so,,g;s,^(installlibs:: )installlibtalloc,$1,g' Makefile |
1199 |
%endif |
1200 |
%if !%build_tdb |
1201 |
perl -pi -e 's,-I./lib/tdb/include,,g;s,bin/libtdb.so,,g;s,^(installlibs:: )installlibtdb,$1,g' Makefile |
1202 |
%endif |
1203 |
%if !%build_ldb |
1204 |
perl -pi -e 's,\$\(BIN_PROGS4\),,g' Makefile |
1205 |
%endif |
1206 |
|
1207 |
perl -pi -e 's|-Wl,-rpath,%{_libdir}||g;s|-Wl,-rpath -Wl,%{_libdir}||g' Makefile |
1208 |
|
1209 |
# Generate RPC code after samba-3.5.13-CVE-2012-1182.patch |
1210 |
make samba3-idl |
1211 |
|
1212 |
make proto_exists || : |
1213 |
%make all libsmbclient smbfilter wins %{?_with_test: torture debug2html bin/log2pcap} bin/smbget |
1214 |
make -C lib/netapi/examples |
1215 |
) |
1216 |
|
1217 |
%if %build_vscan |
1218 |
echo -e "\n\nBuild antivirus VFS modules\n\n" |
1219 |
pushd %{vfsdir}/%{vscandir} |
1220 |
%configure |
1221 |
#sed -i -e 's,openantivirus,oav,g' Makefile |
1222 |
sed -i -e 's,^\(.*clamd socket name.*=\).*,\1 /var/lib/clamav/clamd.socket,g' clamav/vscan-clamav.conf |
1223 |
make |
1224 |
popd |
1225 |
%endif |
1226 |
|
1227 |
# Build antivirus vfs objects |
1228 |
%if %build_symantec |
1229 |
echo "Building Symantec" |
1230 |
make -C %{vfsdir}/%{vscandir} symantec |
1231 |
%endif |
1232 |
|
1233 |
%install |
1234 |
rm -rf $RPM_BUILD_ROOT |
1235 |
mkdir -p $RPM_BUILD_ROOT |
1236 |
|
1237 |
#Ensure all docs are readable |
1238 |
chmod a+r docs -R |
1239 |
|
1240 |
# Any entries here mean samba makefile is *really* broken: |
1241 |
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name} |
1242 |
mkdir -p $RPM_BUILD_ROOT/%{_datadir} |
1243 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs |
1244 |
|
1245 |
(cd source3 |
1246 |
make DESTDIR=$RPM_BUILD_ROOT install installclientlib installmodules) |
1247 |
|
1248 |
# we ship docs in the docs supackage, and lik it into swat, delete the extra copy: |
1249 |
rm -Rf %{buildroot}/%{_datadir}/swat/using_samba |
1250 |
|
1251 |
#install -m755 source/bin/smbget %{buildroot}/%{_bindir} |
1252 |
|
1253 |
|
1254 |
#need to stay |
1255 |
mkdir -p $RPM_BUILD_ROOT/{sbin,bin} |
1256 |
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,pam.d,xinetd.d} |
1257 |
mkdir -p $RPM_BUILD_ROOT/%{_initrddir} |
1258 |
mkdir -p $RPM_BUILD_ROOT/var/cache/%{name} |
1259 |
mkdir -p $RPM_BUILD_ROOT/var/log/%{name} |
1260 |
mkdir -p $RPM_BUILD_ROOT/var/run/%{name} |
1261 |
mkdir -p $RPM_BUILD_ROOT/var/spool/%{name} |
1262 |
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/%{name}/{netlogon,profiles,printers} |
1263 |
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/%{name}/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC} |
1264 |
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/%{name}/codepages/src |
1265 |
mkdir -p $RPM_BUILD_ROOT/%{_lib}/security |
1266 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig |
1267 |
mkdir -p $RPM_BUILD_ROOT%{_sbindir} |
1268 |
mkdir -p $RPM_BUILD_ROOT%{_bindir} |
1269 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/vfs |
1270 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts |
1271 |
|
1272 |
install -m755 source3/bin/lib*.a $RPM_BUILD_ROOT%{_libdir}/ |
1273 |
|
1274 |
# smbsh forgotten |
1275 |
#install -m 755 source/bin/smbsh $RPM_BUILD_ROOT%{_bindir}/ |
1276 |
|
1277 |
%if %build_vscan |
1278 |
%makeinstall_std -C %{vfsdir}/%{vscandir} |
1279 |
install -m 644 %{vfsdir}/%{vscandir}/*/vscan-*.conf %{buildroot}/%{_sysconfdir}/%{name} |
1280 |
%endif |
1281 |
|
1282 |
#libnss_* still not handled by make: |
1283 |
# Install the nsswitch library extension file |
1284 |
for i in wins winbind; do |
1285 |
install -m755 nsswitch/libnss_${i}.so $RPM_BUILD_ROOT/%{_lib}/libnss_${i}.so |
1286 |
done |
1287 |
# Make link for wins and winbind resolvers |
1288 |
( cd $RPM_BUILD_ROOT/%{_lib}; ln -s libnss_wins.so libnss_wins.so.2; ln -s libnss_winbind.so libnss_winbind.so.2) |
1289 |
install -d %{buildroot}/%{_libdir}/krb5/plugins |
1290 |
install -m755 source3/bin/winbind_krb5_locator.so %{buildroot}/%{_libdir}/krb5/plugins |
1291 |
|
1292 |
install -m 755 source3/lib/netapi/examples/bin/netdomjoin-gui $RPM_BUILD_ROOT/%{_sbindir}/netdomjoin-gui |
1293 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name} |
1294 |
install -m 644 source3/lib/netapi/examples/netdomjoin-gui/samba.ico $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}/samba.ico |
1295 |
install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}/logo.png |
1296 |
install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo-small.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}/logo-small.png |
1297 |
|
1298 |
%if %{build_test} |
1299 |
for i in {%{testbin}};do |
1300 |
#install -m755 source/bin/${i} $RPM_BUILD_ROOT/%{_bindir}/${i}%{samba_major} |
1301 |
done |
1302 |
%endif |
1303 |
|
1304 |
# Install other stuff |
1305 |
|
1306 |
# install -m644 examples/VFS/recycle/recycle.conf $RPM_BUILD_ROOT%{_sysconfdir}/samba/ |
1307 |
install -m644 %{SOURCE20} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/smbusers |
1308 |
install -m755 %{SOURCE21} $RPM_BUILD_ROOT/%{_bindir} |
1309 |
#install -m755 %{SOURCE22} $RPM_BUILD_ROOT/usr/bin |
1310 |
install -m755 %{SOURCE23} $RPM_BUILD_ROOT/%{_bindir} |
1311 |
install -m755 %{SOURCE24} $RPM_BUILD_ROOT/%{_initrddir}/smb%{samba_major} |
1312 |
install -m755 %{SOURCE24} $RPM_BUILD_ROOT/%{_sbindir}/%{name} |
1313 |
install -m755 %{SOURCE25} $RPM_BUILD_ROOT/%{_initrddir}/winbind |
1314 |
install -m755 %{SOURCE25} $RPM_BUILD_ROOT/%{_sbindir}/winbind |
1315 |
# install -m755 %{SOURCE26} $RPM_BUILD_ROOT/%{_initrddir}/wrepld%{samba_major} |
1316 |
install -m644 %{SOURCE28} $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/%{name} |
1317 |
install -m644 %{SOURCE29} $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/system-auth-winbind |
1318 |
# |
1319 |
install -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/%{name} |
1320 |
|
1321 |
# install pam_winbind.conf sample file |
1322 |
mkdir -p %{buildroot}%{_sysconfdir}/security |
1323 |
install -m 0644 examples/pam_winbind/pam_winbind.conf %{buildroot}%{_sysconfdir}/security/pam_winbind.conf |
1324 |
|
1325 |
install -m755 examples/LDAP/convertSambaAccount $RPM_BUILD_ROOT/%{_datadir}/%{name}/scripts/ |
1326 |
|
1327 |
# make a conf file for winbind from the default one: |
1328 |
cat %{SOURCE30}|sed -e 's/^; winbind/ winbind/g;s/^; obey pam/ obey pam/g;s/ printer admin = @adm/# printer admin = @adm/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/Mageia/smb-winbind.conf |
1329 |
install -m644 packaging/Mageia/smb-winbind.conf $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb-winbind.conf |
1330 |
|
1331 |
# Some inline fixes for smb.conf for non-winbind use |
1332 |
install -m644 %{SOURCE30} $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf |
1333 |
cat %{SOURCE30} | \ |
1334 |
sed -e 's/^; printer admin = @adm/ printer admin = @adm/g' >$RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf |
1335 |
%if %build_cupspc |
1336 |
perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf |
1337 |
perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb-winbind.conf |
1338 |
%endif |
1339 |
|
1340 |
#%if !%build_system |
1341 |
# Fix script paths in smb.conf |
1342 |
#perl -pi -e 's,%{_datadir}/samba,%{_datadir}/%{name},g' %{buildroot}/%{_sysconfdir}/%{name}/smb*.conf |
1343 |
#%endif |
1344 |
|
1345 |
|
1346 |
# cifs.upcall moved for no reason |
1347 |
rm -f %{buildroot}/%{_sbindir}/cifs.upcall.old |
1348 |
mv %{buildroot}/%{_sbindir}/cifs.upcall %{buildroot}/bin |
1349 |
#install mount.cifs |
1350 |
for i in {%{cifs_bin}};do |
1351 |
#install -m755 source3/bin/${i} %{buildroot}/bin/${i}%{alternative_major} |
1352 |
mv %{buildroot}/bin/${i} %{buildroot}/bin/${i}%{alternative_major} |
1353 |
ln -s ../bin/${i}%{alternative_major} %{buildroot}/sbin/${i}%{alternative_major} |
1354 |
done |
1355 |
|
1356 |
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/lmhosts |
1357 |
|
1358 |
# Link smbspool to CUPS (does not require installed CUPS) |
1359 |
|
1360 |
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/cups/backend |
1361 |
ln -s %{_bindir}/smbspool%{alternative_major} $RPM_BUILD_ROOT/%{_prefix}/lib/cups/backend/smb%{alternative_major} |
1362 |
|
1363 |
# xinetd support |
1364 |
|
1365 |
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d |
1366 |
install -m644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d/swat%{samba_major} |
1367 |
|
1368 |
# menu support |
1369 |
|
1370 |
mkdir -p %{buildroot}/%{_datadir}/applications |
1371 |
cat > %{buildroot}/%{_datadir}/applications/mageia-%{name}-swat.desktop << EOF |
1372 |
[Desktop Entry] |
1373 |
Name=Samba Configuration (SWAT) |
1374 |
Comment=The Swat Samba Administration Tool |
1375 |
Exec=www-browser http://localhost:901/ |
1376 |
Icon=swat%{samba_major} |
1377 |
Terminal=false |
1378 |
Type=Application |
1379 |
StartupNotify=true |
1380 |
Categories=X-MandrivaLinux-System-Configuration-Networking; |
1381 |
EOF |
1382 |
|
1383 |
mkdir -p $RPM_BUILD_ROOT%{_liconsdir} $RPM_BUILD_ROOT%{_iconsdir} $RPM_BUILD_ROOT%{_miconsdir} |
1384 |
|
1385 |
# install html man pages for swat |
1386 |
install -d %{buildroot}/%{_datadir}/swat%{samba_major}/help/manpages |
1387 |
#install -m644 docs/htmldocs/manpages-3/* %{buildroot}/%{_datadir}/swat%{samba_major}/help/manpages |
1388 |
|
1389 |
bzcat %{SOURCE4} > $RPM_BUILD_ROOT%{_liconsdir}/swat%{samba_major}.png |
1390 |
bzcat %{SOURCE5} > $RPM_BUILD_ROOT%{_iconsdir}/swat%{samba_major}.png |
1391 |
bzcat %{SOURCE6} > $RPM_BUILD_ROOT%{_miconsdir}/swat%{samba_major}.png |
1392 |
|
1393 |
bzcat %{SOURCE10}> $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/print-pdf |
1394 |
bzcat %{SOURCE11}> $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/smb-migrate |
1395 |
|
1396 |
# Fix configs when not building system samba: |
1397 |
|
1398 |
#Client binaries will have suffixes while we use alternatives, even |
1399 |
# if we are system samba |
1400 |
%if !%build_system || %build_alternatives |
1401 |
for OLD in %{buildroot}/%{_bindir}/{%{clientbin},eventlogadm} %{buildroot}/bin/{%{cifs_bin}} %{buildroot}/%{_prefix}/lib/cups/backend/smb |
1402 |
do |
1403 |
NEW=`echo ${OLD}%{alternative_major}` |
1404 |
[ -e $OLD ] && mv -f $OLD $NEW |
1405 |
done |
1406 |
for OLD in %{buildroot}/%{_mandir}/man?/{%{clientbin},eventlogadm}* %{buildroot}/%{_mandir}/man?/{%{cifs_bin}}* |
1407 |
do |
1408 |
if [ -e $OLD ] |
1409 |
then |
1410 |
BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'` |
1411 |
EXT=`echo $OLD|sed -e 's,'${BASE}',,g'` |
1412 |
NEW=`echo ${BASE}%{alternative_major}${EXT}` |
1413 |
mv $OLD $NEW |
1414 |
fi |
1415 |
done |
1416 |
%endif |
1417 |
# Server/common binaries are versioned only if not system samba: |
1418 |
%if !%build_system |
1419 |
for OLD in %{buildroot}/%{_bindir}/{%{commonbin}} %{buildroot}/%{_bindir}/{%{serverbin}%{?serverldbbin:,%serverldbbin}} %{buildroot}/%{_sbindir}/{%{serversbin},swat} |
1420 |
do |
1421 |
NEW=`echo ${OLD}%{alternative_major}` |
1422 |
mv $OLD $NEW -f ||: |
1423 |
done |
1424 |
# And the man pages too: |
1425 |
for OLD in %{buildroot}/%{_mandir}/man?/{%{commonbin},%{serverbin}%{?serverldbbin:,%serverldbbin},%{serversbin},swat,{%testbin},smb.conf,lmhosts}* |
1426 |
do |
1427 |
if [ -e $OLD ] |
1428 |
then |
1429 |
BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'` |
1430 |
# BASE=`perl -e '$name="'${OLD}'"; print "",($name =~ /(.*?)\.[0-9]/), "\n";'` |
1431 |
EXT=`echo $OLD|sed -e 's,'${BASE}',,g'` |
1432 |
NEW=`echo ${BASE}%{samba_major}${EXT}` |
1433 |
mv $OLD $NEW |
1434 |
fi |
1435 |
done |
1436 |
# Replace paths in config files and init scripts: |
1437 |
for i in smb ;do |
1438 |
perl -pi -e 's,/subsys/'$i',/subsys/'$i'%{samba_major},g' $RPM_BUILD_ROOT/%{_initrddir}/${i}%{samba_major} |
1439 |
done |
1440 |
for 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 |
1441 |
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; |
1442 |
done |
1443 |
# Fix xinetd file for swat: |
1444 |
perl -pi -e 's,/usr/sbin,%{_sbindir},g' $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d/swat%{samba_major} |
1445 |
%endif |
1446 |
|
1447 |
#Clean up unpackaged files: |
1448 |
#for i in %{_bindir}/pam_smbpass.so %{_bindir}/smbwrapper.so;do |
1449 |
#rm -f %{buildroot}/$i |
1450 |
#done |
1451 |
# the binary gets removed ... but not the man page ... |
1452 |
rm -f %{buildroot}/%{_mandir}/man1/testprns* |
1453 |
|
1454 |
# (sb) make a smb.conf.clean we can use for the merge, since an existing |
1455 |
# smb.conf won't get overwritten |
1456 |
cp $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/smb.conf $RPM_BUILD_ROOT/%{_datadir}/%{name}/smb.conf.clean |
1457 |
|
1458 |
# (sb) leave a README.mga.conf to explain what has been done |
1459 |
cat << EOF > $RPM_BUILD_ROOT/%{_datadir}/%{name}/README.mga.conf |
1460 |
In order to facilitate upgrading an existing samba install, and merging |
1461 |
previous configuration data with any new syntax used by samba3, a merge |
1462 |
script has attempted to combine your local configuration data with the |
1463 |
new conf file format. The merged data is in smb.conf, with comments like |
1464 |
|
1465 |
# *** merged from original smb.conf: *** |
1466 |
|
1467 |
near the additional entries. Any local shares should have been appended to |
1468 |
smb.conf. A log of what took place should be in: |
1469 |
|
1470 |
/var/log/samba/smb-migrate.log |
1471 |
|
1472 |
A clean samba3 smb.conf is in /usr/share/samba, named smb.conf.clean. |
1473 |
Your original conf should be /etc/samba/smb.conf.tomerge. |
1474 |
|
1475 |
The actual merge script is /usr/share/samba/scripts/smb-migrate. |
1476 |
|
1477 |
EOF |
1478 |
|
1479 |
# Development pkgconfig files |
1480 |
|
1481 |
# 1. Generate the .pc files that are not done automatically |
1482 |
# (NB: This does not work when done at the same time as configure above) |
1483 |
for i in \ |
1484 |
%if %build_talloc |
1485 |
talloc \ |
1486 |
%endif |
1487 |
%if %build_tdb |
1488 |
tdb \ |
1489 |
%endif |
1490 |
; do |
1491 |
pushd lib/$i |
1492 |
./autogen.sh -V && ./configure --prefix=%{_prefix} --libdir=%{_libdir} |
1493 |
popd |
1494 |
install -m 644 lib/$i/$i.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/ |
1495 |
done |
1496 |
|
1497 |
# 2. Install them |
1498 |
for i in smbclient smbsharemodes netapi wbclient; do |
1499 |
install -m 644 source3/pkgconfig/$i.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/ |
1500 |
done |
1501 |
|
1502 |
%if !%build_ldb |
1503 |
rm -f %{buildroot}/%{_bindir}/ldb* |
1504 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man1/ldbadd.1 |
1505 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man1/ldbdel.1 |
1506 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man1/ldbedit.1 |
1507 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man1/ldbmodify.1 |
1508 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man1/ldbrename.1 |
1509 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man1/ldbsearch.1 |
1510 |
%endif |
1511 |
|
1512 |
%if %{build_test} |
1513 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man1/log2pcap*.1* |
1514 |
%else |
1515 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man1/vfstest%{samba_major}*.1* |
1516 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man1/log2pcap*.1* |
1517 |
%endif |
1518 |
|
1519 |
rm -fr $RPM_BUILD_ROOT%{_mandir}/man8/tdb*.8* |
1520 |
|
1521 |
%if %build_winbind |
1522 |
%find_lang pam_winbind |
1523 |
%endif |
1524 |
%find_lang net |
1525 |
|
1526 |
%ifarch alpha |
1527 |
rm -f %{_bindir}/smb*m*nt%{samba_major} |
1528 |
rm -f %{_mandir}/man8/smb*m*nt*.8* |
1529 |
%endif |
1530 |
|
1531 |
%if !%build_system |
1532 |
rm -f %{_libdir}/libsmbclient.so.* |
1533 |
rm -f %{_includedir}/* |
1534 |
rm -f %{_libdir}/libsmbclient.so |
1535 |
rm -f %{_libdir}/lib*.a |
1536 |
rm -f %{_mandir}/man8/libsmbclient.8* |
1537 |
rm -f %{_libdir}/pkgconfig/smbclient.pc |
1538 |
%endif |
1539 |
|
1540 |
%if %build_vscan |
1541 |
rm -f %{buildroot} %{_libdir}/%{name}/vfs/vscan*.so |
1542 |
|
1543 |
%if !%build_antivir |
1544 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-antivir.so |
1545 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-antivir.conf |
1546 |
%endif |
1547 |
|
1548 |
%if !%build_clamav |
1549 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-clamav.so |
1550 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-clamav.conf |
1551 |
%endif |
1552 |
|
1553 |
%if !%build_fprot |
1554 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-fprotd.so |
1555 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-fprotd.conf |
1556 |
%endif |
1557 |
|
1558 |
%if !%build_fsav |
1559 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-fsav.so |
1560 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-fsav.conf |
1561 |
%endif |
1562 |
|
1563 |
%if !%build_icap |
1564 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-icap.so |
1565 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-icap.conf |
1566 |
%endif |
1567 |
|
1568 |
%if !%build_kaspersky |
1569 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-kavp.so |
1570 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-kavp.conf |
1571 |
%endif |
1572 |
|
1573 |
%if !%build_mks |
1574 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-mksd.so |
1575 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-mks*.conf |
1576 |
%endif |
1577 |
|
1578 |
%if !%build_nai |
1579 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-mcdaemon.so |
1580 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-mcdaemon.conf |
1581 |
%endif |
1582 |
|
1583 |
%if !%build_openav |
1584 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-oav.so |
1585 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-oav.conf |
1586 |
%endif |
1587 |
|
1588 |
%if !%build_sophos |
1589 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-sophos.so |
1590 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-sophos.conf |
1591 |
%endif |
1592 |
|
1593 |
%if !%build_symantec |
1594 |
rm -rf %{buildroot}%{_sysconfdir}/%{name}/vscan-symantec.conf |
1595 |
%endif |
1596 |
|
1597 |
%if !%build_trend |
1598 |
rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-trend.so |
1599 |
rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-trend.conf |
1600 |
%endif |
1601 |
%endif |
1602 |
|
1603 |
# these are provided by ldb-utils |
1604 |
rm -f %{buildroot}%{_mandir}/man1/ldbadd.1* |
1605 |
rm -f %{buildroot}%{_mandir}/man1/ldbdel.1* |
1606 |
rm -f %{buildroot}%{_mandir}/man1/ldbedit.1* |
1607 |
rm -f %{buildroot}%{_mandir}/man1/ldbmodify.1* |
1608 |
rm -f %{buildroot}%{_mandir}/man1/ldbrename.1* |
1609 |
rm -f %{buildroot}%{_mandir}/man1/ldbsearch.1* |
1610 |
|
1611 |
# these are provided by tdb-utils |
1612 |
rm -f %{buildroot}%{_mandir}/man8/tdbbackup.8* |
1613 |
rm -f %{buildroot}%{_mandir}/man8/tdbdump.8* |
1614 |
rm -f %{buildroot}%{_mandir}/man8/tdbtool.8* |
1615 |
|
1616 |
# these are not built |
1617 |
rm -f %{buildroot}%{_mandir}/man1/log2pcap.1* |
1618 |
rm -f %{buildroot}%{_mandir}/man1/vfstest.1* |
1619 |
|
1620 |
%clean |
1621 |
rm -rf $RPM_BUILD_ROOT |
1622 |
|
1623 |
%post server |
1624 |
|
1625 |
%_post_service smb%{samba_major} |
1626 |
#%_post_service wrepld%{samba_major} |
1627 |
|
1628 |
# Add a unix group for samba machine accounts |
1629 |
groupadd -frg 421 machines |
1630 |
|
1631 |
# Migrate tdb's from /var/lock/samba (taken from official samba spec file): |
1632 |
for i in /var/lock/samba/*.tdb |
1633 |
do |
1634 |
if [ -f $i ]; then |
1635 |
newname=`echo $i | sed -e's|var\/lock\/samba|var\/cache\/samba|'` |
1636 |
echo "Moving $i to $newname" |
1637 |
mv $i $newname |
1638 |
fi |
1639 |
done |
1640 |
|
1641 |
%post common |
1642 |
# Basic migration script for pre-2.2.1 users, |
1643 |
# since smb config moved from /etc to %{_sysconfdir}/samba |
1644 |
|
1645 |
# Let's create a proper %{_sysconfdir}/samba/smbpasswd file |
1646 |
[ -f %{_sysconfdir}/%{name}/smbpasswd ] || { |
1647 |
echo "Creating password file for samba..." |
1648 |
touch %{_sysconfdir}/%{name}/smbpasswd |
1649 |
} |
1650 |
|
1651 |
# And this too, in case we don't have smbd to create it for us |
1652 |
[ -f /var/cache/%{name}/unexpected.tdb ] || { |
1653 |
touch /var/cache/%{name}/unexpected.tdb |
1654 |
} |
1655 |
|
1656 |
# Let's define the proper paths for config files |
1657 |
perl -pi -e 's/(\/etc\/)(smb)/\1%{name}\/\2/' %{_sysconfdir}/%{name}/smb.conf |
1658 |
|
1659 |
# Fix the logrotate.d file from smb and nmb to smbd and nmbd |
1660 |
if [ -f %{_sysconfdir}/logrotate.d/samba ]; then |
1661 |
perl -pi -e 's/smb /smbd /' %{_sysconfdir}/logrotate.d/samba |
1662 |
perl -pi -e 's/nmb /nmbd /' %{_sysconfdir}/logrotate.d/samba |
1663 |
fi |
1664 |
|
1665 |
# And not loose our machine account SID |
1666 |
[ -f %{_sysconfdir}/MACHINE.SID ] && mv -f %{_sysconfdir}/MACHINE.SID %{_sysconfdir}/%{name}/ ||: |
1667 |
|
1668 |
# FIXME: Can be removed in mageia ? |
1669 |
%triggerpostun common -- samba-common < 3.0.1-3mdk |
1670 |
# (sb) merge any existing smb.conf with new syntax file |
1671 |
if [ $1 = 2 ]; then |
1672 |
# (sb) save existing smb.conf for merge |
1673 |
echo "Upgrade: copy smb.conf to smb.conf.tomerge for merging..." |
1674 |
cp -f %{_sysconfdir}/%{name}/smb.conf %{_sysconfdir}/%{name}/smb.conf.tomerge |
1675 |
echo "Upgrade: merging previous smb.conf..." |
1676 |
if [ -f %{_datadir}/%{name}/smb.conf.clean ]; then |
1677 |
cp %{_datadir}/%{name}/smb.conf.clean %{_sysconfdir}/%{name}/smb.conf |
1678 |
cp %{_datadir}/%{name}/README.mga.conf %{_sysconfdir}/%{name}/ |
1679 |
%{_datadir}/%{name}/scripts/smb-migrate commit |
1680 |
fi |
1681 |
fi |
1682 |
|
1683 |
%postun common |
1684 |
if [ -f %{_sysconfdir}/%{name}/README.mga.conf ];then rm -f %{_sysconfdir}/%{name}/README.mga.conf;fi |
1685 |
|
1686 |
%if %build_winbind |
1687 |
%post winbind |
1688 |
if [ $1 = 1 ]; then |
1689 |
/sbin/chkconfig winbind on |
1690 |
cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave |
1691 |
cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp |
1692 |
for i in passwd group;do |
1693 |
grep ^$i %{_sysconfdir}/nsswitch.conf |grep -v 'winbind' >/dev/null |
1694 |
if [ $? = 0 ];then |
1695 |
echo "Adding a winbind entry to the $i section of %{_sysconfdir}/nsswitch.conf" |
1696 |
awk '/^'$i'/ {print $0 " winbind"};!/^'$i'/ {print}' %{_sysconfdir}/nsswitch.conf.rpmtemp >%{_sysconfdir}/nsswitch.conf; |
1697 |
cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp |
1698 |
else |
1699 |
echo "$i entry found in %{_sysconfdir}/nsswitch.conf" |
1700 |
fi |
1701 |
done |
1702 |
if [ -f %{_sysconfdir}/nsswitch.conf.rpmtemp ];then rm -f %{_sysconfdir}/nsswitch.conf.rpmtemp;fi |
1703 |
fi |
1704 |
|
1705 |
%preun winbind |
1706 |
if [ $1 = 0 ]; then |
1707 |
echo "Removing winbind entries from %{_sysconfdir}/nsswitch.conf" |
1708 |
perl -pi -e 's/ winbind//' %{_sysconfdir}/nsswitch.conf |
1709 |
|
1710 |
/sbin/chkconfig winbind reset |
1711 |
fi |
1712 |
%endif %build_winbind |
1713 |
|
1714 |
%if %build_wins |
1715 |
%post -n nss_wins%{samba_major} |
1716 |
if [ $1 = 1 ]; then |
1717 |
cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave |
1718 |
grep '^hosts' %{_sysconfdir}/nsswitch.conf |grep -v 'wins' >/dev/null |
1719 |
if [ $? = 0 ];then |
1720 |
echo "Adding a wins entry to the hosts section of %{_sysconfdir}/nsswitch.conf" |
1721 |
awk '/^hosts/ {print $0 " wins"};!/^hosts/ {print}' %{_sysconfdir}/nsswitch.conf.rpmsave >%{_sysconfdir}/nsswitch.conf; |
1722 |
else |
1723 |
echo "wins entry found in %{_sysconfdir}/nsswitch.conf" |
1724 |
fi |
1725 |
# else |
1726 |
# echo "Upgrade, leaving nsswitch.conf intact" |
1727 |
fi |
1728 |
|
1729 |
%preun -n nss_wins%{samba_major} |
1730 |
if [ $1 = 0 ]; then |
1731 |
echo "Removing wins entry from %{_sysconfdir}/nsswitch.conf" |
1732 |
perl -pi -e 's/ wins//' %{_sysconfdir}/nsswitch.conf |
1733 |
#else |
1734 |
# echo "Leaving %{_sysconfdir}/nsswitch.conf intact" |
1735 |
fi |
1736 |
%endif %build_wins |
1737 |
|
1738 |
%preun server |
1739 |
|
1740 |
%_preun_service smb%{samba_major} |
1741 |
#%_preun_service wrepld%{samba_major} |
1742 |
|
1743 |
#if [ $1 = 0 ] ; then |
1744 |
# /sbin/chkconfig --level 35 smb reset |
1745 |
# Let's not loose /var/cache/samba |
1746 |
# |
1747 |
# if [ -d /var/cache/%{name} ]; then |
1748 |
# mv -f /var/cache/%{name} /var/cache/%{name}.BAK |
1749 |
# fi |
1750 |
#fi |
1751 |
|
1752 |
%post swat |
1753 |
if [ -f /var/lock/subsys/xinetd ]; then |
1754 |
service xinetd reload >/dev/null 2>&1 || : |
1755 |
fi |
1756 |
|
1757 |
%postun swat |
1758 |
|
1759 |
# Remove swat entry from xinetd |
1760 |
if [ $1 = 0 -a -f %{_sysconfdir}/xinetd.conf ] ; then |
1761 |
rm -f %{_sysconfdir}/xinetd.d/swat%{samba_major} |
1762 |
service xinetd reload &>/dev/null || : |
1763 |
fi |
1764 |
|
1765 |
if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi |
1766 |
|
1767 |
%if %build_alternatives |
1768 |
%post client |
1769 |
|
1770 |
update-alternatives --install %{_bindir}/smbclient smbclient \ |
1771 |
%{_bindir}/smbclient%{alternative_major} 10 \ |
1772 |
$(for i in {/sbin/{%{client_sbin}},%{_bindir}/{%{clientbin},eventlogadm}};do |
1773 |
j=`basename $i` |
1774 |
[ "$j" = "smbclient" ] || \ |
1775 |
echo -n " --slave ${i} ${j} ${i}%{alternative_major}";done) \ |
1776 |
$(for i in %{_mandir}/{%{client_man}};do |
1777 |
echo -n " --slave ${i}%{_extension} `basename $i` ${i%%.?}%{alternative_major}.${i##*.}%{_extension}";done) \ |
1778 |
--slave %{_prefix}/lib/cups/backend/smb cups_smb %{_prefix}/lib/cups/backend/smb%{alternative_major} || \ |
1779 |
update-alternatives --auto smbclient |
1780 |
|
1781 |
%preun client |
1782 |
[ $1 = 0 ] && update-alternatives --remove smbclient %{_bindir}/smbclient%{alternative_major} ||: |
1783 |
%endif |
1784 |
|
1785 |
%if %build_alternatives |
1786 |
%triggerpostun client -- samba-client, samba2-client |
1787 |
[ ! -e %{_bindir}/smbclient ] && update-alternatives --auto smbclient || : |
1788 |
%endif |
1789 |
|
1790 |
%if %build_alternatives |
1791 |
%post -n mount-cifs%{samba_major} |
1792 |
update-alternatives --install /bin/mount.cifs mount.cifs \ |
1793 |
/bin/mount.cifs%{alternative_major} 10 \ |
1794 |
--slave /sbin/mount.cifs smount.cifs /sbin/mount.cifs%{alternative_major} \ |
1795 |
--slave /bin/umount.cifs umount.cifs /bin/umount.cifs%{alternative_major} \ |
1796 |
--slave /sbin/umount.cifs sumount.cifs /sbin/umount.cifs%{alternative_major} \ |
1797 |
--slave /sbin/cifs.upcall cifs.upcall /sbin/cifs.upcall%{alternative_major} \ |
1798 |
--slave %{_mandir}/man8/mount.cifs.8%{_extension} mount.cifs.8 %{_mandir}/man8/mount.cifs%{alternative_major}.8%{_extension} \ |
1799 |
--slave %{_mandir}/man8/umount.cifs.8%{_extension} umount.cifs.8 %{_mandir}/man8/umount.cifs%{alternative_major}.8%{_extension} \ |
1800 |
--slave %{_mandir}/man8/cifs.upcall.8%{_extension} cifs.upcall.8 %{_mandir}/man8/cifs.upcall%{alternative_major}.8%{_extension} \ |
1801 |
|| update-alternatives --auto mount.cifs |
1802 |
|
1803 |
%preun -n mount-cifs%{samba_major} |
1804 |
[ $1 = 0 ] && update-alternatives --remove mount.cifs /bin/mount.cifs%{alternative_major} ||: |
1805 |
|
1806 |
%triggerpostun -n mount-cifs%{samba_major} -- %{name}-client < 3.0.11-1mdk |
1807 |
update-alternatives --auto mount.cifs |
1808 |
|
1809 |
%endif |
1810 |
|
1811 |
|
1812 |
%files server |
1813 |
%defattr(-,root,root) |
1814 |
%(for i in %{_sbindir}/{%{serversbin}}%{samba_major};do echo $i;done) |
1815 |
%(for i in %{_bindir}/{%{serverbin}%{?serverldbbin:,%serverldbbin}}%{samba_major};do echo $i;done) |
1816 |
%attr(755,root,root) /%{_lib}/security/pam_smbpass* |
1817 |
%dir %{_libdir}/%{name}/vfs |
1818 |
%{_libdir}/%{name}/vfs/*.so |
1819 |
%dir %{_libdir}/%{name}/pdb |
1820 |
%{_libdir}/%{name}/auth |
1821 |
#{_libdir}/%{name}/*.so |
1822 |
%dir %{_libdir}/%{name}/nss_info |
1823 |
%{_libdir}/%{name}/nss_info/rfc2307.so |
1824 |
%{_libdir}/%{name}/nss_info/sfu*.so |
1825 |
|
1826 |
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smbusers |
1827 |
%attr(-,root,root) %config(noreplace) %{_initrddir}/smb%{samba_major} |
1828 |
#%attr(-,root,root) %config(noreplace) %{_initrddir}/wrepld%{samba_major} |
1829 |
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} |
1830 |
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/%{name} |
1831 |
#%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/samba-slapd.include |
1832 |
%(for i in %{_mandir}/man?/{%{serverbin}%{?serverldbbin:,%serverldbbin},%{serversbin}}%{samba_major}\.[0-9]\\*;do echo $i|grep -v mkntpwd;done) |
1833 |
%attr(775,root,adm) %dir %{_localstatedir}/lib/%{name}/netlogon |
1834 |
%attr(755,root,root) %dir %{_localstatedir}/lib/%{name}/profiles |
1835 |
%attr(755,root,root) %dir %{_localstatedir}/lib/%{name}/printers |
1836 |
%attr(2775,root,adm) %dir %{_localstatedir}/lib/%{name}/printers/* |
1837 |
%attr(1777,root,root) %dir /var/spool/%{name} |
1838 |
%dir %{_datadir}/%{name} |
1839 |
%dir %{_datadir}/%{name}/scripts |
1840 |
%attr(0755,root,root) %{_datadir}/%{name}/scripts/print-pdf |
1841 |
%attr(0755,root,root) %{_datadir}/%{name}/scripts/convertSambaAccount |
1842 |
%{_mandir}/man8/idmap_*.8* |
1843 |
%{_mandir}/man8/vfs_*.8* |
1844 |
|
1845 |
%files doc |
1846 |
%defattr(-,root,root) |
1847 |
%doc README COPYING Manifest Read-Manifest-Now |
1848 |
%doc WHATSNEW.txt Roadmap |
1849 |
%doc README.%{name}-mageia-rpm |
1850 |
%doc clean-docs/samba-doc/docs/* |
1851 |
%doc clean-docs/samba-doc/examples |
1852 |
#%attr(-,root,root) %{_datadir}/swat%{samba_major}/using_samba/ |
1853 |
%attr(-,root,root) %{_datadir}/swat%{samba_major}/help/ |
1854 |
|
1855 |
%files swat |
1856 |
%defattr(-,root,root) |
1857 |
%config(noreplace) %{_sysconfdir}/xinetd.d/swat%{samba_major} |
1858 |
#%attr(-,root,root) /sbin/* |
1859 |
%{_sbindir}/swat%{samba_major} |
1860 |
%{_datadir}/applications/mageia-%{name}-swat.desktop |
1861 |
%{_miconsdir}/*.png |
1862 |
%{_liconsdir}/*.png |
1863 |
%{_iconsdir}/*.png |
1864 |
#%attr(-,root,root) %{_datadir}/swat%{samba_major}/help/ |
1865 |
%attr(-,root,root) %{_datadir}/swat%{samba_major}/images/ |
1866 |
%attr(-,root,root) %{_datadir}/swat%{samba_major}/include/ |
1867 |
%lang(ja) %{_datadir}/swat%{samba_major}/lang/ja |
1868 |
%lang(tr) %{_datadir}/swat%{samba_major}/lang/tr |
1869 |
%{_mandir}/man8/swat*.8* |
1870 |
%lang(de) %{_libdir}/%{name}/de.msg |
1871 |
%lang(en) %{_libdir}/%{name}/en.msg |
1872 |
%lang(fr) %{_libdir}/%{name}/fr.msg |
1873 |
%lang(it) %{_libdir}/%{name}/it.msg |
1874 |
%lang(ja) %{_libdir}/%{name}/ja.msg |
1875 |
%lang(nl) %{_libdir}/%{name}/nl.msg |
1876 |
%lang(pl) %{_libdir}/%{name}/pl.msg |
1877 |
%lang(tr) %{_libdir}/%{name}/tr.msg |
1878 |
%lang(fi) %{_libdir}/%{name}/fi.msg |
1879 |
%lang(ru) %{_libdir}/%{name}/ru.msg |
1880 |
#%doc swat/README |
1881 |
|
1882 |
%files client |
1883 |
%defattr(-,root,root) |
1884 |
%(for i in %{_bindir}/{%{clientbin},eventlogadm}%{alternative_major};do echo $i;done) |
1885 |
%(for i in %{_mandir}/man?/{%{clientbin}}%{alternative_major}.\\?.\\*;do echo $i|grep -v smbprint;done) |
1886 |
#xclude %{_mandir}/man?/smbget* |
1887 |
%{_mandir}/man5/smbgetrc%{alternative_major}.5* |
1888 |
%ifnarch alpha |
1889 |
#(for i in /sbin/{%{client_sbin}}%{alternative_major};do echo $i|grep -v "smb.*m.*nt";done) |
1890 |
%endif |
1891 |
%{_mandir}/man8/eventlogadm3.8* |
1892 |
# Link of smbspool to CUPS |
1893 |
%{_prefix}/lib*/cups/backend/smb%{alternative_major} |
1894 |
|
1895 |
%files common -f net.lang |
1896 |
%defattr(-,root,root) |
1897 |
%dir /var/cache/%{name} |
1898 |
%dir /var/log/%{name} |
1899 |
%dir /var/run/%{name} |
1900 |
%(for i in %{_bindir}/{%{commonbin}}%{samba_major};do echo $i;done) |
1901 |
%(for i in %{_mandir}/man?/{%{commonbin}}%{samba_major}\.[0-9]\\*;do echo $i;done) |
1902 |
#%{_libdir}/smbwrapper%{samba_major}.so |
1903 |
%dir %{_libdir}/%{name} |
1904 |
%{_libdir}/%{name}/*.dat |
1905 |
%{_libdir}/%{name}/charset |
1906 |
#%{_libdir}/%{name}/lowcase.dat |
1907 |
#%{_libdir}/%{name}/valid.dat |
1908 |
%dir %{_sysconfdir}/%{name} |
1909 |
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb.conf |
1910 |
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb-winbind.conf |
1911 |
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/lmhosts |
1912 |
%dir %{_localstatedir}/lib/%{name} |
1913 |
%attr(-,root,root) %{_localstatedir}/lib/%{name}/codepages |
1914 |
%{_mandir}/man5/smb.conf*.5* |
1915 |
%{_mandir}/man5/lmhosts*.5* |
1916 |
#%{_mandir}/man7/Samba*.7* |
1917 |
%dir %{_datadir}/swat%{samba_major} |
1918 |
%attr(0750,root,adm) %{_datadir}/%{name}/scripts/smb-migrate |
1919 |
%attr(-,root,root) %{_datadir}/%{name}/smb.conf.clean |
1920 |
%attr(-,root,root) %{_datadir}/%{name}/README.mga.conf |
1921 |
|
1922 |
%if %build_winbind |
1923 |
%files winbind -f pam_winbind.lang |
1924 |
%defattr(-,root,root) |
1925 |
%config(noreplace) %{_sysconfdir}/security/pam_winbind.conf |
1926 |
%{_sbindir}/winbindd |
1927 |
%{_sbindir}/winbind |
1928 |
%{_bindir}/wbinfo |
1929 |
%attr(755,root,root) /%{_lib}/security/pam_winbind* |
1930 |
%attr(755,root,root) /%{_lib}/libnss_winbind* |
1931 |
%{_libdir}/%{name}/idmap |
1932 |
%{_libdir}/krb5/plugins/winbind_krb5_locator.so |
1933 |
%attr(-,root,root) %config(noreplace) %{_initrddir}/winbind |
1934 |
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/system-auth-winbind* |
1935 |
%{_mandir}/man8/winbindd*.8* |
1936 |
%{_mandir}/man8/pam_winbind.8* |
1937 |
%{_mandir}/man5/pam_winbind.conf.5.* |
1938 |
%{_mandir}/man7/winbind_krb5_locator.7.* |
1939 |
%{_mandir}/man1/wbinfo*.1* |
1940 |
%endif |
1941 |
|
1942 |
%if %build_wins |
1943 |
%files -n nss_wins%{samba_major} |
1944 |
%defattr(-,root,root) |
1945 |
%attr(755,root,root) /%{_lib}/libnss_wins.so* |
1946 |
%endif |
1947 |
|
1948 |
%if %{build_test} |
1949 |
%files test |
1950 |
%defattr(-,root,root) |
1951 |
%(for i in %{_bindir}/{%{testbin}}%{samba_major};do echo $i;done) |
1952 |
%{_mandir}/man1/vfstest%{samba_major}*.1* |
1953 |
%endif |
1954 |
|
1955 |
%if %build_system |
1956 |
%files -n %{libname} |
1957 |
%defattr(-,root,root) |
1958 |
%{_libdir}/libsmbclient.so.%{libsmbmajor} |
1959 |
%endif |
1960 |
|
1961 |
%if %build_system |
1962 |
%files -n %{libname}-devel |
1963 |
%defattr(-,root,root) |
1964 |
%{_includedir}/libsmbclient.h |
1965 |
%{_libdir}/libsmbclient.so |
1966 |
%doc clean-docs/libsmbclient/* |
1967 |
%{_mandir}/man7/libsmbclient.7* |
1968 |
%{_libdir}/pkgconfig/smbclient.pc |
1969 |
%endif |
1970 |
|
1971 |
%if %build_system |
1972 |
%files -n %{libname}-static-devel |
1973 |
%defattr(-,root,root) |
1974 |
%{_libdir}/lib*.a |
1975 |
%endif |
1976 |
|
1977 |
%files -n %libnetapi |
1978 |
%defattr(-,root,root) |
1979 |
%{_libdir}/libnetapi.so.%{netapimajor}* |
1980 |
|
1981 |
%files -n %netapidevel |
1982 |
%defattr(-,root,root) |
1983 |
%{_libdir}/libnetapi*.so |
1984 |
%{_includedir}/netapi.h |
1985 |
%{_libdir}/pkgconfig/netapi.pc |
1986 |
|
1987 |
%files -n %libsmbsharemodes |
1988 |
%defattr(-,root,root) |
1989 |
%{_libdir}/libsmbsharemodes.so.%{smbsharemodesmajor}* |
1990 |
|
1991 |
%files -n %smbsharemodesdevel |
1992 |
%defattr(-,root,root) |
1993 |
%{_libdir}/libsmbsharemodes.so |
1994 |
%{_includedir}/smb_share_modes.h |
1995 |
%{_libdir}/pkgconfig/smbsharemodes.pc |
1996 |
|
1997 |
%if %build_talloc |
1998 |
%files -n %libtalloc |
1999 |
%defattr(-,root,root) |
2000 |
%{_libdir}/libtalloc.so.%{tallocmajor}* |
2001 |
|
2002 |
%files -n %tallocdevel |
2003 |
%defattr(-,root,root) |
2004 |
%{_libdir}/libtalloc.so |
2005 |
%{_includedir}/talloc.h |
2006 |
%{_libdir}/pkgconfig/talloc.pc |
2007 |
%endif |
2008 |
|
2009 |
%if %build_tdb |
2010 |
%files -n %libtdb |
2011 |
%defattr(-,root,root) |
2012 |
%{_libdir}/libtdb.so.%{tdbmajor}* |
2013 |
|
2014 |
%files -n %tdbdevel |
2015 |
%defattr(-,root,root) |
2016 |
%{_libdir}/libtdb.so |
2017 |
%{_includedir}/tdb.h |
2018 |
%{_libdir}/pkgconfig/tdb.pc |
2019 |
%endif |
2020 |
|
2021 |
%files -n %libwbclient |
2022 |
%defattr(-,root,root) |
2023 |
%{_libdir}/libwbclient.so.%{wbclientmajor} |
2024 |
|
2025 |
%files -n %wbclientdevel |
2026 |
%defattr(-,root,root) |
2027 |
%{_libdir}/libwbclient.so |
2028 |
%{_includedir}/wbclient.h |
2029 |
%{_includedir}/wbc_async.h |
2030 |
%{_libdir}/pkgconfig/wbclient.pc |
2031 |
|
2032 |
#%files passdb-ldap |
2033 |
#%defattr(-,root,root) |
2034 |
#%{_libdir}/%{name}/*/*ldap.so |
2035 |
|
2036 |
%ifnarch alpha |
2037 |
%if %{build_mysql} |
2038 |
%files passdb-mysql |
2039 |
%defattr(-,root,root) |
2040 |
%{_libdir}/%{name}/pdb/*mysql.so |
2041 |
%endif |
2042 |
%endif |
2043 |
|
2044 |
%if %{build_pgsql} |
2045 |
%files passdb-pgsql |
2046 |
%defattr(-,root,root) |
2047 |
%{_libdir}/%{name}/pdb/*pgsql.so |
2048 |
%endif |
2049 |
|
2050 |
#Files for antivirus support: |
2051 |
%if %build_antivir |
2052 |
%files vscan-antivir |
2053 |
%defattr(-,root,root) |
2054 |
%{_libdir}/%{name}/vfs/vscan-antivir.so |
2055 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-antivir.conf |
2056 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2057 |
%endif |
2058 |
|
2059 |
%if %build_clamav |
2060 |
%files vscan-clamav |
2061 |
%defattr(-,root,root) |
2062 |
%{_libdir}/%{name}/vfs/vscan-clamav.so |
2063 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-clamav.conf |
2064 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2065 |
%endif |
2066 |
|
2067 |
%if %build_fprot |
2068 |
%files vscan-fprot |
2069 |
%defattr(-,root,root) |
2070 |
%{_libdir}/%{name}/vfs/vscan-fprotd.so |
2071 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-fprotd.conf |
2072 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2073 |
%endif |
2074 |
|
2075 |
%if %build_fsav |
2076 |
%files vscan-fsecure |
2077 |
%defattr(-,root,root) |
2078 |
%{_libdir}/%{name}/vfs/vscan-fsav.so |
2079 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-fsav.conf |
2080 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2081 |
%endif |
2082 |
|
2083 |
%if %build_icap |
2084 |
%files vscan-icap |
2085 |
%defattr(-,root,root) |
2086 |
%{_libdir}/%{name}/vfs/vscan-icap.so |
2087 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-icap.conf |
2088 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2089 |
%endif |
2090 |
|
2091 |
%if %build_kaspersky |
2092 |
%files vscan-kaspersky |
2093 |
%defattr(-,root,root) |
2094 |
%{_libdir}/%{name}/vfs/vscan-kavp.so |
2095 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-kavp.conf |
2096 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2097 |
%endif |
2098 |
|
2099 |
%if %build_mks |
2100 |
%files vscan-mks |
2101 |
%defattr(-,root,root) |
2102 |
%{_libdir}/%{name}/vfs/vscan-mksd.so |
2103 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-mks*.conf |
2104 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2105 |
%endif |
2106 |
|
2107 |
%if %build_nai |
2108 |
%files vscan-nai |
2109 |
%defattr(-,root,root) |
2110 |
%{_libdir}/%{name}/vfs/vscan-mcdaemon.so |
2111 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-mcdaemon.conf |
2112 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2113 |
%endif |
2114 |
|
2115 |
%if %build_openav |
2116 |
%files vscan-openav |
2117 |
%defattr(-,root,root) |
2118 |
%{_libdir}/%{name}/vfs/vscan-oav.so |
2119 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-oav.conf |
2120 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2121 |
%endif |
2122 |
|
2123 |
%if %build_sophos |
2124 |
%files vscan-sophos |
2125 |
%defattr(-,root,root) |
2126 |
%{_libdir}/%{name}/vfs/vscan-sophos.so |
2127 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-sophos.conf |
2128 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2129 |
%endif |
2130 |
|
2131 |
%if %build_symantec |
2132 |
%files vscan-symantec |
2133 |
%defattr(-,root,root) |
2134 |
%{_libdir}/%{name}/vfs/vscan-symantec.so |
2135 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-symantec.conf |
2136 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2137 |
%endif |
2138 |
|
2139 |
%if %build_trend |
2140 |
%files vscan-trend |
2141 |
%defattr(-,root,root) |
2142 |
%{_libdir}/%{name}/vfs/vscan-trend.so |
2143 |
%config(noreplace) %{_sysconfdir}/%{name}/vscan-trend.conf |
2144 |
%doc %{vfsdir}/%{vscandir}/INSTALL |
2145 |
%endif |
2146 |
|
2147 |
%files -n mount-cifs%{samba_major} |
2148 |
%defattr(-,root,root) |
2149 |
%attr(4755,root,root) /*bin/*mount.cifs%{alternative_major} |
2150 |
/*bin/cifs.upcall%{alternative_major} |
2151 |
%{_mandir}/man8/*mount.cifs*.8* |
2152 |
%{_mandir}/man8/cifs.upcall*.8* |
2153 |
|
2154 |
%files domainjoin-gui |
2155 |
%defattr(-,root,root) |
2156 |
%{_sbindir}/netdomjoin-gui |
2157 |
%dir %{_datadir}/pixmaps/samba |
2158 |
%{_datadir}/pixmaps/samba/samba.ico |
2159 |
%{_datadir}/pixmaps/samba/logo.png |
2160 |
%{_datadir}/pixmaps/samba/logo-small.png |
2161 |
|
2162 |
#%exclude %{_mandir}/man1/smbsh*.1* |
2163 |
#%exclude %{_mandir}/man1/editreg* |
2164 |
|
2165 |
# todo: |
2166 |
# fix alternatives for mount.cifs |
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|