ee88c068e762f05dfb113356b7717a686436efb7
[openafs.git] / src / packaging / RedHat / openafs.spec.in
1 # Openafs Spec $Revision$
2
3 %define afsvers @VERSION@
4 %define pkgvers @LINUX_PKGVER@
5 # for beta/rc releases make pkgrel 0.<tag>
6 # for real releases make pkgrel 1 (or more for extra releases)
7 %define pkgrel @LINUX_PKGREL@
8
9 %{!?fedorakmod: %define fedorakmod 1}
10 %{!?build_dkmspkg: %define build_dkmspkg 1}
11
12 # Determine presence of rpmbuild command line --define arguments used for
13 # option specification
14 %define kernvers_on_cmdline %{?kernvers:1}%{!?kernvers:0}
15 %define build_userspace_on_cmdline %{?build_userspace:1}%{!?build_userspace:0}
16 %define build_modules_on_cmdline %{?build_modules:1}%{!?build_modules:0}
17 %define build_authlibs_on_cmdline %{?build_authlibs:1}%{!?build_authlibs:0}
18
19 %if 0%{?rhel} >= 5
20 %define fedorakmod 1
21 %endif
22 %if 0%{?fedora}
23 %define fedorakmod 1
24 %endif
25
26 %if !%{fedorakmod}
27 # Determine the version of the kernel to build against
28 # - automatically select running kernel if there are sources in /lib/modules
29 # - note that this can be overridden on the command line
30 #
31 %if !%{kernvers_on_cmdline}
32 %define kernvers %(%{_sourcedir}/openafs-kernel-version.sh)
33 %endif
34
35 # If we're building for a 2.4 series kernel, then fedora style kmods aren't
36 # appropriate - disable them.
37
38 %define kern24 %([ `echo "%{kernvers}" | sed -e 's/^\([0-9]*\.[0-9]*\)\..*/\1/'` = "2.4" ] && echo 1 || echo 0)
39
40 %if %{kern24}
41 %define fedorakmod 0
42 %endif
43 %endif
44
45 %if %{fedorakmod}
46 %define kmodtool bash %{_sourcedir}/openafs-kmodtool
47
48 %define kmod_name openafs
49 %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
50
51 %define upvar ""
52 %{!?kvariants: %define kvariants %{?upvar}}
53
54 %if %{?ksrcdir:1}%{!?ksrcdir:0}
55   if ( -d %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}) ; then
56     %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
57   else
58     %define ksrcdir %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}}
59   fi
60 %endif
61
62 %else # Legacy kernel build stuff 
63
64 %define kversis %{_sourcedir}/openafs-kvers-is.sh
65 %define kvers %(%{kversis} parsev %{kernvers})
66 %define kvers_is_24 %(%{kversis} %{kvers} "2.4")
67 %define kvers_is_26 %(%{kversis} %{kvers} "2.6")
68 %define ktype %(%{kversis} parset %{kernvers})
69 %define kversion %(%{kversis} kvers %{kernvers})
70
71 # This is where to look for kernel build include files.  Default
72 # is /lib/modules/<kvers>/build, but you can define kbase and
73 # kend on the commandline to change that.
74 #
75 %if %{?kbase:0}%{!?kbase:1}
76 %define kbase /lib/modules/
77 %endif
78 %if %{?kend:0}%{!?kend:1}
79 %define kend /build
80 %endif
81 # Let the buildscript define the ksrcdir directly -- needed for RHEL4
82 %if %{?ksrcdir:0}%{!?ksrcdir:1}
83 %define ksrcdir %{kbase}%{kernvers}%{kend}
84 %endif
85
86 %if %{?kmoddir:0}%{!?kmoddir:1}
87 %define kmoddir /lib/modules
88 %endif
89 %define kxmoddir %{kmoddir}/%{kernvers}
90
91 # End legacy kernel build stuff
92 %endif 
93
94 %define dkms_version %{pkgvers}-%{pkgrel}%{?dist}
95
96 # Set 'debugspec' to 1 if you want to debug the spec file.  This will
97 # not remove the installed tree as part of the %clean operation
98 %if %{?debugspec:0}%{!?debugspec:1}
99 %define debugspec 0
100 %endif
101
102 # Set 'krb5support' to 1 if you want to build the openafs-krb5 package
103 # to distribute aklog and asetkey
104 %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
105
106 # Set 'bootkernelsupport' to 1 if you want to build the
107 # kernel module for Red Hat BOOT Kernels on x86.
108 %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
109
110 # Define the location of your init.d directory
111 %define initdir /etc/rc.d/init.d
112
113 #determine if the kernel provides an arch-specific Provides
114 %define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
115
116 # Define the location of the PAM security module directory
117 %define pamdir /%{_lib}/security
118
119 #######################################################################
120 # You probably don't need to change anything beyond this line
121 # NOTE: If you do, please email me!!!
122
123 # Determine which elements of OpenAFS to build.  For non-x86 arches
124 # (subject to the ExclusiveArch setting, below), we build both userspace
125 # and modules.  For most x86 arches, we build just the kernel modules.  For
126 # i386, we build just the userspace.  If you're running an i386 kernel,
127 # you'll need to tweak that last bit.
128 %if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
129
130 %define build_userspace 1
131 %define build_modules 1
132 %ifarch %{ix86} x86_64 ia64
133 %define build_authlibs 1
134 %else
135 %define build_authlibs 0
136 %endif
137
138 %else
139 %if !%{build_userspace_on_cmdline}
140 %define build_userspace 0
141 %endif
142 %if !%{build_modules_on_cmdline}
143 %define build_modules 0
144 %endif
145 %endif
146
147 %if !%{build_authlibs_on_cmdline}
148 %if %{build_userspace_on_cmdline}
149 %define build_authlibs 1
150 %else
151 %define build_authlibs 0
152 %endif
153 %endif
154
155 %if %{build_modules}
156 %if !%{fedorakmod}
157
158 # Define the set of kernel module variations to be built:
159 # For 2.4 kernels we just build everything at once for a particular
160 # kernel.   So we build up, smp, and bigmem all at once.
161 # For 2.6 kernels we have to build against the specific kernel headers
162 # for a particular kernel variation.  AFS will handle the specific smp or
163 # non-smp determination.  So just always build as if it's "up" -- the kernel
164 # version will have the 'variation' type already in the version #.
165
166 %define up_package 0
167 %define smp_package 0
168 %define bigmem_package 0
169 %define hugemem_package 0
170 %define largesmp_package 0
171
172 #######################################################################
173 # 2.4
174 %if %{kvers_is_24}
175 %define kdepend kernel-source
176 %define up_package 1
177 %define smp_package 1
178 %define smp_ext smp
179
180 %define bigmem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} bigmem) 
181 %if %{bigmem_package}
182 %define bigmem_ext bigmem
183 %endif
184
185 %define hugemem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} hugemem) 
186 %if %{hugemem_package}
187 %define hugemem_ext hugemem
188 %endif
189
190 %define kvariations up smp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
191
192 #######################################################################
193 # 2.6
194 %else
195 %if %{kvers_is_26}
196 %define kvariations up
197 %ifarch s390x
198 %define ktype "smp"
199 %define up_package 1
200 %else
201 %define up_package %(%{kversis} "%{ktype}" "")
202 %define smp_package %(%{kversis} "%{ktype}" "smp")
203 %define hugemem_package %(%{kversis} "%{ktype}" "hugemem")
204 %define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
205 %endif
206
207 %if !%{up_package} && !%{smp_package} && !%{hugemem_package} && !%{largesmp_package}
208 %error "unknown kernel type: %{ktype}"
209 %endif
210
211 %if !%{kernvers_on_cmdline}
212 %define kdepend %{ksrcdir}/include/linux/version.h
213 %endif
214
215 #######################################################################
216 # other kernels?
217 %else
218 %error "unknown kernel version: ${kvers} (parsed from %{kernvers})"
219 %endif
220 %endif
221
222 # End of legacy kernel module build
223 %endif 
224 %endif
225
226 # Make sure RPM doesn't complain about installed but non-packaged files.
227 #define __check_files  %{nil}
228
229 Summary: OpenAFS distributed filesystem
230 Name: openafs
231 Version: %{pkgvers}
232 Release: %{pkgrel}%{?dist}
233 License: IBM Public License
234 URL: http://www.openafs.org
235 BuildRoot: %{_tmppath}/%{name}-%{version}-root
236 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
237 Group: Networking/Filesystems
238 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
239 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
240 BuildRequires: systemd-units
241 %endif
242 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 6
243 BuildRequires: perl-devel
244 %endif
245 BuildRequires: perl(ExtUtils::Embed)
246 %if %{krb5support}
247 BuildRequires: krb5-devel
248 %endif
249 %if %{build_modules}
250 BuildRequires: kernel-devel
251 %endif
252
253 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
254
255 #    http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
256 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
257 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
258 %define srcdir openafs-%{afsvers}
259
260 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
261 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
262
263 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2013-01-28
264
265 Source30: openafs-kernel-version.sh
266 Source996: openafs-kvers-is.sh
267 Source997: openafs-buildfedora.pl
268 Source998: openafs-buildall.sh
269 Source999: openafs-kmodtool
270
271 %description
272 The AFS distributed filesystem.  AFS is a distributed filesystem
273 allowing cross-platform sharing of files among multiple computers.
274 Facilities are provided for access control, authentication, backup and
275 administrative management.
276
277 This package provides common files shared across all the various
278 OpenAFS packages but are not necessarily tied to a client or server.
279
280 The OpenAFS SRPM can be rebuilt with the following options to control
281 what gets built:
282
283  --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version 
284                                   to build modules against. The default is
285                                   to build against the currently-running
286                                   kernel.
287  --define "kbase /lib/modules/"   The base location to look for kernel headers
288  --define "kend /build"           The 'end' location to look for kernels
289                                   The build will define ksrvdir as
290                                   %%{kbase}<kernvers>%%{kend}
291
292  --without krb5                   Disable krb5 support (default: with krb5)
293  --with bitmap-later              Enable "bitmap later" support
294  --with bos-restricted            Enable "bos restricted" mode
295  --with supergroups               Enable "supergroups"
296
297  --target=i386                    The target architecture to build for.
298                                   When building for a non-default target
299                                   the build may choose whether to build
300                                   userspace or kernel modules automatically.
301                                   The defaults are probably what you want.
302
303  --define "build_userspace 1"     Request building of userspace tools
304  --define "build_modules 1"       Request building of kernel modules
305                                   You probably never need to specify these.
306
307  --define "kmoddir /lib/modules"  This is the base location where modules
308                                   will be installed.  You probably don't
309                                   need to change this ever.
310
311  --define "fedorakmod 0"          Disable the building of 'Fedora' style kernel 
312                                   modules, and use the old format.
313
314  --define "kvariants <variants>"  When building Fedora style kernel modules,
315                                   this defines the set of kernel variants
316                                   to build.
317                                   <variants> is a space seperated list which
318                                   may contain one or more of
319                                   '' (for the generic kernel), smp, PAE, xen
320                                   or kdump 
321
322 To a kernel module for your running kernel, just run:
323   rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
324
325 ##############################################################################
326 #
327 # build the userspace side of things if so requested
328 #
329 ##############################################################################
330 %if %{build_userspace}
331
332 %package client
333 Requires: binutils, openafs = %{version}
334 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
335 Requires: systemd-units
336 Requires(post): systemd-units, systemd-sysv
337 Requires(preun): systemd-units
338 Requires(postun): systemd-units
339 %endif
340
341 %if %{fedorakmod}
342 Requires: %{name}-kmod >= %{version}
343 Provides: %{name}-kmod-common = %{version}
344 %else
345 Requires: openafs-kernel
346 %endif
347
348 Summary: OpenAFS Filesystem Client
349 Group: Networking/Filesystem
350
351 %description client
352 The AFS distributed filesystem.  AFS is a distributed filesystem
353 allowing cross-platform sharing of files among multiple computers.
354 Facilities are provided for access control, authentication, backup and
355 administrative management.
356
357 This package provides basic client support to mount and manipulate
358 AFS.
359
360 %package server
361 Requires: openafs = %{version}
362 Summary: OpenAFS Filesystem Server
363 Group: Networking/Filesystems
364 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
365 Requires: systemd-units
366 Requires(post): systemd-units, systemd-sysv
367 Requires(preun): systemd-units
368 Requires(postun): systemd-units
369 %endif
370
371 %description server
372 The AFS distributed filesystem.  AFS is a distributed filesystem
373 allowing cross-platform sharing of files among multiple computers.
374 Facilities are provided for access control, authentication, backup and
375 administrative management.
376
377 This package provides basic server support to host files in an AFS
378 Cell.
379
380 %if %{build_dkmspkg}
381 %package -n dkms-%{name}
382 Summary:        DKMS-ready kernel source for AFS distributed filesystem
383 Group:          Development/Kernel
384 Provides:       openafs-kernel = %{version}
385 %if %{fedorakmod}
386 Provides: %{name}-kmod = %{version}
387 %endif
388 Requires(pre):  dkms
389 Requires(pre):  flex
390 Requires(post): dkms
391 Requires:       %{name}-kmod-common = %{version}
392
393 %description -n dkms-%{name}
394 The AFS distributed filesystem.  AFS is a distributed filesystem
395 allowing cross-platform sharing of files among multiple computers.
396 Facilities are provided for access control, authentication, backup and
397 administrative management.
398
399 This package provides the source code to allow DKMS to build an
400 AFS kernel module.
401 %endif
402
403 %if %{build_authlibs}
404 %package authlibs
405 Summary: OpenAFS authentication shared libraries
406 Group: Networking/Filesystems
407
408 %description authlibs
409 The AFS distributed filesystem.  AFS is a distributed filesystem
410 allowing cross-platform sharing of files among multiple computers.
411 Facilities are provided for access control, authentication, backup and
412 administrative management.
413
414 This package provides a shared version of libafsrpc and libafsauthent. 
415 None of the programs included with OpenAFS currently use these shared 
416 libraries; however, third-party software that wishes to perform AFS 
417 authentication may link against them.
418 %endif
419
420 %package authlibs-devel
421 %if %{build_authlibs}
422 Requires: openafs-authlibs = %{version}-%{release}
423 %endif
424 Requires: openafs-devel = %{version}-%{release}
425 Summary: OpenAFS shared library development
426 Group: Development/Filesystems
427
428 %description authlibs-devel
429 The AFS distributed filesystem.  AFS is a distributed filesystem
430 allowing cross-platform sharing of files among multiple computers.
431 Facilities are provided for access control, authentication, backup and
432 administrative management.
433
434 This package includes the static versions of libafsrpc and 
435 libafsauthent, and symlinks required for building against the dynamic 
436 libraries.
437
438 %package devel
439 Summary: OpenAFS Development Libraries and Headers
440 Group: Development/Filesystems
441 Requires: openafs = %{version}-%{release}
442
443 %description devel
444 The AFS distributed filesystem.  AFS is a distributed filesystem
445 allowing cross-platform sharing of files among multiple computers.
446 Facilities are provided for access control, authentication, backup and
447 administrative management.
448
449 This package provides static development libraries and headers needed
450 to compile AFS applications.  Note: AFS currently does not provide
451 shared libraries.
452
453 %package docs
454 Summary: OpenAFS user and administrator documentation
455 Requires: openafs = %{version}-%{release}
456 Group: Networking/Filesystems
457
458 %description docs
459 The AFS distributed filesystem.  AFS is a distributed filesystem
460 allowing cross-platform sharing of files among multiple computers.
461 Facilities are provided for access control, authentication, backup and
462 administrative management.
463
464 This package provides HTML documentation for OpenAFS users and system
465 administrators.
466
467 %package kernel-source
468 Summary: OpenAFS Kernel Module source tree
469 Group: Networking/Filesystems
470 Provides: openafs-kernel = %{version}
471 %if %{fedorakmod}
472 Provides: %{name}-kmod = %{version}
473 %endif
474
475 %description kernel-source
476 The AFS distributed filesystem.  AFS is a distributed filesystem
477 allowing cross-platform sharing of files among multiple computers.
478 Facilities are provided for access control, authentication, backup and
479 administrative management.
480
481 This package provides the source code to build your own AFS kernel
482 module.
483
484 %package compat
485 Summary: OpenAFS client compatibility symlinks
486 Requires: openafs = %{version}, openafs-client = %{version}
487 Group: Networking/Filesystems
488 Obsoletes: openafs-client-compat
489
490 %description compat
491 The AFS distributed filesystem.  AFS is a distributed filesystem
492 allowing cross-platform sharing of files among multiple computers.
493 Facilities are provided for access control, authentication, backup and
494 administrative management.
495
496 This package provides compatibility symlinks in /usr/afsws.  It is
497 completely optional, and is only necessary to support legacy
498 applications and scripts that hard-code the location of AFS client
499 programs.
500
501 %package kpasswd
502 Summary: OpenAFS KA kpasswd support
503 Requires: openafs
504 Group: Networking/Filesystems
505
506 %description kpasswd
507 The AFS distributed filesystem.  AFS is a distributed filesystem
508 allowing cross-platform sharing of files among multiple computers.
509 Facilities are provided for access control, authentication, backup and
510 administrative management.
511
512 This package provides the compatibility symlink for kpasswd, in case
513 you are using KAserver instead of Krb5.
514
515 %if %{krb5support}
516 %package krb5
517 Summary: OpenAFS programs to use with krb5
518 Requires: openafs = %{version}
519 Group: Networking/Filesystems
520 BuildRequires: krb5-devel
521
522 %description krb5
523 The AFS distributed filesystem.  AFS is a distributed filesystem
524 allowing cross-platform sharing of files among multiple computers.
525 Facilities are provided for access control, authentication, backup and
526 administrative management.
527
528 This package provides compatibility programs so you can use krb5
529 to authenticate to AFS services, instead of using AFS's homegrown
530 krb4 lookalike services.
531 %endif
532
533 %endif
534
535 ##############################################################################
536 #
537 # build the kernel modules if so requested
538 #
539 ##############################################################################
540 %if %{build_modules}
541
542 %if %{fedorakmod}
543 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
544
545 %else
546
547 # Legacy kernel compilation code here ...
548 %define modkversion %(echo %{kernvers} | cut -d- -f1)
549 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
550 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
551
552 %if %{up_package}
553 %package kernel
554 Summary: OpenAFS Kernel Module (compiled for UP)
555 Release: %{modpkgrel}
556 Group: Networking/Filesystems
557 Provides: openafs-kernel = %{version}
558 %if %{kprovidesarch}
559 Requires: kernel-%{_target_cpu} = %{kversion}
560 %else
561 Requires: /boot/config-%{kernvers}
562 %endif
563
564 %description kernel
565 The AFS distributed filesystem.  AFS is a distributed filesystem
566 allowing cross-platform sharing of files among multiple computers.
567 Facilities are provided for access control, authentication, backup and
568 administrative management.
569
570 This package provides a precompiled AFS kernel module for %{kernvers}.
571 %endif
572
573 %if %{smp_package}
574 %package kernel-smp
575 Summary: OpenAFS Kernel Module (compiled for SMP)
576 Release: %{modpkgrel}
577 Provides: openafs-kernel = %{version}
578 %if %{kprovidesarch}
579 Requires: kernel-smp-%{_target_cpu} = %{kversion}
580 %else
581 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
582 %endif
583 Group: Networking/Filesystems
584
585 %description kernel-smp
586 The AFS distributed filesystem.  AFS is a distributed filesystem
587 allowing cross-platform sharing of files among multiple computers.
588 Facilities are provided for access control, authentication, backup and
589 administrative management.
590
591 This package provides a precompiled AFS kernel module for %{kernvers}.
592 %endif
593
594 %if %{largesmp_package}
595 %package kernel-largesmp
596 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
597 Release: %{modpkgrel}
598 Provides: openafs-kernel = %{version}
599 %if %{kprovidesarch}
600 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
601 %else
602 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
603 %endif
604 Group: Networking/Filesystems
605
606 %description kernel-largesmp
607 The AFS distributed filesystem.  AFS is a distributed filesystem
608 allowing cross-platform sharing of files among multiple computers.
609 Facilities are provided for access control, authentication, backup and
610 administrative management.
611
612 This package provides a precompiled AFS kernel module for %{kernvers}.
613 %endif
614  
615 %if %{bigmem_package}
616 %package kernel-bigmem
617 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
618 Release: %{modpkgrel}
619 Provides: openafs-kernel = %{version}
620 %if %{kprovidesarch}
621 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
622 %else
623 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
624 %endif
625 Group: Networking/Filesystems
626
627 %description kernel-bigmem
628 The AFS distributed filesystem.  AFS is a distributed filesystem
629 allowing cross-platform sharing of files among multiple computers.
630 Facilities are provided for access control, authentication, backup and
631 administrative management.
632
633 This package provides a precompiled AFS kernel module for %{kernvers}.
634 %endif
635
636 %if %{hugemem_package}
637 %package kernel-hugemem
638 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
639 Release: %{modpkgrel}
640 Provides: openafs-kernel = %{version}
641 %if %{kprovidesarch}
642 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
643 %else
644 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
645 %endif
646 Group: Networking/Filesystems
647
648 %description kernel-hugemem
649 The AFS distributed filesystem.  AFS is a distributed filesystem
650 allowing cross-platform sharing of files among multiple computers.
651 Facilities are provided for access control, authentication, backup and
652 administrative management.
653
654 This package provides a precompiled AFS kernel module for %{kernvers}.
655 %endif
656
657 %endif
658 # End legacy kernel compilation code ...
659 %endif
660
661 ##############################################################################
662 #
663 # PREP
664 #
665 ##############################################################################
666
667 %prep
668
669 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
670 : @@@
671 : @@@ kernel version:     %{kernvers}
672 %if %{fedorakmod}
673 : @@@ kernel variations:  %{kvariants}
674 %else
675 : @@@ base kernel version:%{kversion}
676 : @@@ kernel modules dir: %{kxmoddir}
677 : @@@ kernel source dir:  %{ksrcdir}
678 %if %{kvers_is_24}
679 : @@@ kernel variations:  %{kvariations}
680 %else
681 %if %{up_package}
682 : @@@ kernel type:        up
683 %else
684 : @@@ kernel type:        %{ktype}
685 %endif
686 %endif
687 %endif
688 : @@@ PAM modules dir:    %{pamdir}
689 : @@@ build userspace:    %{build_userspace}
690 : @@@ build modules:      %{build_modules}
691 : @@@ arch:               %{_arch}
692 : @@@ target cpu:         %{_target_cpu}
693 : @@@
694 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
695
696 # Install OpenAFS src and doc
697 #%setup -q -n %{srcdir}
698 %setup -q -b 1 -n %{srcdir}
699
700 ##############################################################################
701 #
702 # building
703 #
704 ##############################################################################
705 %build
706 %if !%{fedorakmod}
707 case %{kernvers} in
708    2.4.*)
709        kv='24'
710        ;;
711    2.6.* | 3.*)
712        kv='26'
713        ;;
714    *)
715        echo "I don't know how to build linux-`expr %{kernvers} : '\(^[0-9]*[.][0-9]*\)'`"
716        exit 1
717        ;;
718 esac
719 %else
720 kv='26'
721 %endif
722
723 case %{_arch} in
724        x86_64)                         sysname=amd64_linux${kv}        ;;
725        alpha*)                         sysname=alpha_linux_${kv}       ;;
726        i386|i486|i586|i686|athlon)     sysname=i386_linux${kv}         ;;
727        *)                              sysname=%{_arch}_linux${kv}     ;;
728 esac
729
730 %ifarch %{ix86}
731 archlist="i386 i586 i686 athlon"
732 %if %{bootkernelsupport}
733   archlist="${archlist} BOOT"
734 %endif
735 %else
736 archlist=%{_arch}
737 %endif
738
739 #
740 # PrintDefine var value statements file
741 #
742 PrintDefine() {
743     case $3 in
744     *ifn*)
745         echo "#ifndef $1" >> $4
746         ;;
747     esac
748     case $3 in
749     *und*)
750         echo "#undef $1" >> $4
751         ;;
752     esac
753     case $3 in
754     *def*)
755         echo "#define $1 $2" >> $4
756         ;;
757     esac
758     case $3 in
759     *end*)
760         echo "#endif" >> $4
761         ;;
762     esac
763     case $3 in
764     *inc*)
765         echo "#include $1" >> $4
766         ;;
767     esac
768     case $3 in
769     *nl*)
770         echo "" >> $4
771         ;;
772     esac
773 }
774
775 # PrintRedhatKernelFix arch mp file
776 PrintRedhatKernelFix() {
777     arch="$1"
778     up=0
779     smp=0
780     largesmp=0
781     ent=0
782     bigmem=0
783     hugemem=0
784     boot=0
785     bootsmp=0
786
787     case "$2" in
788        up)     up=1;;
789        smp)    smp=1;;
790        largesmp) largesmp=1;;
791        bigmem) bigmem=1;;
792        hugemem) hugemem=1;;
793        *)
794                echo "$2 not supported"
795                exit 2;;
796     esac
797
798     file="$3"
799
800     rm -f $file
801     touch $file
802
803     PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
804
805     PrintDefine __BOOT_KERNEL_ENTERPRISE $ent     und,def,nl $file
806     PrintDefine __BOOT_KERNEL_BIGMEM     $bigmem  und,def,nl $file
807     PrintDefine __BOOT_KERNEL_HUGEMEM    $hugemem und,def,nl $file
808     PrintDefine __BOOT_KERNEL_SMP        $smp     und,def,nl $file
809     PrintDefine __BOOT_KERNEL_LARGESMP   $largesmp und,def,nl $file
810     PrintDefine __BOOT_KERNEL_UP         $up      und,def,nl $file
811     PrintDefine __BOOT_KERNEL_BOOT       $boot    und,def,nl $file
812     PrintDefine __BOOT_KERNEL_BOOTSMP    $bootsmp und,def,nl $file
813
814     PrintDefine '"/boot/kernel.h"' "" inc,nl $file      # include file
815
816     for ar in $archlist ; do
817         if [ "$ar" = "$arch" ]; then
818             PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
819         else
820             PrintDefine "__MODULE_KERNEL_$ar" "" und $file      # undef
821         fi
822     done
823     echo "" >> $file
824
825     PrintDefine "" "" end $file
826
827     if [ %{debugspec} = 1 ] ; then
828         echo "Kernel Configuration File for Red Hat kernels:"
829         cat $file
830     fi
831 }
832
833 config_opts="--enable-redhat-buildsys \
834         %{?_with_bitmap_later:--enable-bitmap-later} \
835         %{?_with_bos_restricted:--enable-bos-restricted-mode} \
836         %{?_with_supergroups:--enable-supergroups} \
837         --enable-transarc-paths"
838
839 # Configure AFS
840
841 # If we're using Fedora kmods, work out which is the best kernel module to 
842 # use for the userland configuration step. If no variants have been specified,
843 # then use the standard kernel. If variants are specified, use the standard kernel
844 # if it's listed, otherwise pick the first listed kernel.
845 ksrc=""
846 %if %{fedorakmod} 
847   for kvariant in %{kvariants} ; do
848     if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
849       if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
850         ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
851       elif [ -d %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant} ] ; then
852         ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant}
853       else
854         ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
855       fi
856     fi
857   done
858 %endif
859 if [ -z "$ksrc" ] ; then
860 ksrc=%{ksrcdir}
861 fi
862
863 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
864
865 %if %{krb5support}
866 %if %{?krb5config:1}%{!?krb5config:0}
867 KRB5_CONFIG="%{krb5config}"
868 export KRB5_CONFIG
869 %endif
870 %endif
871
872 ./configure --with-afs-sysname=${sysname} \
873        --prefix=%{_prefix} \
874        --libdir=%{_libdir} \
875        --bindir=%{_bindir} \
876        --sbindir=%{_sbindir} \
877        --disable-strip-binaries \
878        --enable-debug \
879        --with-linux-kernel-packaging \
880 %if %{build_modules}
881        --with-linux-kernel-headers=${ksrc} \
882 %endif
883 %if %{krb5support}
884         --with-krb5 \
885 %endif
886        $config_opts \
887        || exit 1
888
889 # Build the libafs tree
890 make only_libafs_tree || exit 1
891
892 # Configure each of our kernel modules
893
894 %if %{fedorakmod} && %{build_modules}
895 for kvariant in %{kvariants} ; do
896   if [ -n "${kvariant}" ] ; then
897
898     if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
899       ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
900
901     elif [ -d %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant} ] ; then
902       # Fedora 20 started putting kernel sources in e.g.
903       # 3.12.5-302.fc20.i686+PAE, instead of:
904       # 3.12.5-302.fc20.i686.PAE
905       ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant}
906
907     else
908       ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
909     fi
910
911     cp -R libafs_tree _kmod_build_${kvariant}
912     pushd _kmod_build_${kvariant}
913     ./configure --with-afs-sysname=${sysname} \
914         --prefix=%{_prefix} \
915         --libdir=%{_libdir} \
916         --bindir=%{_bindir} \
917         --sbindir=%{_sbindir} \
918         --with-linux-kernel-packaging \
919         --with-linux-kernel-headers=${ksrc} \
920         --enable-disconnected \
921 %if %{krb5support}
922         --with-krb5-conf=/usr/kerberos/bin/krb5-config \
923 %endif
924         $config_opts \
925         || exit 1
926     popd
927   fi
928 done
929 %endif
930
931 %if %{build_userspace}
932 # Build the user-space AFS stuff
933 make dest_nolibafs || exit 1
934 %endif
935
936 %if %{build_modules}
937 %if %{fedorakmod}
938 for kvariant in %{kvariants}
939 do
940   if [ -n "${kvariant}" ] ; then
941     pushd _kmod_build_$kvariant;
942     make all
943     popd
944   else
945     make dest_only_libafs
946   fi
947 done
948
949 %else
950 # Begin legacy kernel module building code
951
952 %if %{kvers_is_24}
953 # Build all the kernel modules for linux 2.4.x
954 for variation in %{kvariations}
955 do
956     if [ ${variation} = up ]
957     then
958        local_smp_def=-DREDHAT_FIX
959        suffix=
960     else
961        local_smp_def="-DAFS_SMP -DREDHAT_FIX"
962        suffix=${variation}
963     fi
964
965     PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
966     make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
967         LINUX_MODULE_NAME="${suffix}" MPS=SP
968
969 done
970 rm -f src/config/redhat-fix.h
971
972 %elseif %{kvers_is_26}
973 # Build the kernel module for this version of linux 2.6.x
974 # Notice how much easier this is than 2.4.  On the other hand,
975 # we require much more external support to build multiple modules.
976
977   # the MPS=SP just means that we don't add a '.mp' to the name.
978   make dest_only_libafs MPS=SP
979
980 %endif
981 # End legacy kernel module building code
982 %endif
983 %endif
984
985
986 ##############################################################################
987 #
988 # installation
989 #
990 ##############################################################################
991 %install
992
993 export DONT_GPRINTIFY=1
994
995 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
996 %if !%{fedorakmod}
997 case %{kernvers} in
998    2.4.*)
999        kv='24'
1000        kmodend=.o
1001        ;;
1002    2.6.* | 3.*)
1003        kv='26'
1004        kmodend=.ko
1005        ;;
1006    *)
1007        echo "I don't know how to build linux-`expr %{kernvers} : '\(^[0-9]*[.][0-9]*\)'`"
1008        exit 1
1009        ;;
1010 esac
1011 %else
1012 kv='26'
1013 %endif
1014
1015 case %{_arch} in
1016        x86_64)                         sysname=amd64_linux${kv}        ;;
1017        alpha*)                         sysname=alpha_linux_${kv}       ;;
1018        i386|i486|i586|i686|athlon)     sysname=i386_linux${kv}         ;;
1019        *)                              sysname=%{_arch}_linux${kv}     ;;
1020 esac
1021
1022 # Build install tree
1023 %if %{build_userspace}
1024 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
1025 mkdir -p $RPM_BUILD_ROOT%{_libdir}
1026 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
1027 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1028 mkdir -p $RPM_BUILD_ROOT%{initdir}
1029 %else
1030 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
1031 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
1032 %endif
1033 mkdir -p $RPM_BUILD_ROOT/etc/openafs
1034 mkdir -p $RPM_BUILD_ROOT%{pamdir}
1035 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
1036 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
1037 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1038 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1039 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1040 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1041
1042 # Copy files from dest to the appropriate places in BuildRoot
1043 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1044 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1045 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1046 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1047 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1048
1049 # Set the executable bit on libraries in libdir, so rpmbuild knows to 
1050 # create "Provides" entries in the package metadata for the libraries
1051 chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
1052
1053 # Fix the location of restorevol, since it should be available for
1054 # any user in /usr/bin
1055 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1056
1057 # Link kpasswd to kapasswd
1058 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1059
1060 # Copy root.client config files
1061 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1062 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1063 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1064 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1065 %else
1066 install -m 755 src/packaging/RedHat/openafs-client.service $RPM_BUILD_ROOT%{_unitdir}/openafs-client.service
1067 install -m 755 src/packaging/RedHat/openafs-client.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/openafs-client.modules
1068 install -m 755 src/packaging/RedHat/openafs-server.service $RPM_BUILD_ROOT%{_unitdir}/openafs-server.service
1069 %endif
1070
1071 # Copy PAM modules
1072 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1073
1074 # PAM symlinks
1075 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1076 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1077
1078 # Populate /usr/vice/etc
1079 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1080 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1081 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1082 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1083
1084 #
1085 # install dkms source
1086 #
1087 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1088 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1089
1090 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<"EOF"
1091
1092 PACKAGE_VERSION="%{dkms_version}"
1093
1094 # Items below here should not have to change with each driver version
1095 PACKAGE_NAME="%{name}"
1096 MAKE[0]='./configure --with-linux-kernel-headers=${kernel_source_dir} --with-linux-kernel-packaging && make && case "${kernelver_array[0]}${kernelver[0]}" in 2.4.*) mv src/libafs/MODLOAD-*/libafs-* openafs.o ;; *) mv src/libafs/MODLOAD-*/openafs.ko . ;; esac'
1097 CLEAN="make -C src/libafs clean"
1098
1099 BUILT_MODULE_NAME[0]="$PACKAGE_NAME"
1100 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/$PACKAGE_NAME/"
1101 STRIP[0]=no
1102 AUTOINSTALL=yes
1103
1104 EOF
1105
1106 #
1107 # install kernel-source
1108 #
1109
1110 # Install the kernel module source tree
1111 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1112 tar cf - -C libafs_tree . | \
1113         tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1114
1115 # Next, copy the LICENSE Files, README
1116 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1117 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1118 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1119
1120 #
1121 # Install DOCUMENTATION
1122 #
1123
1124 # Build the DOC directory
1125 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1126 tar cf - -C doc LICENSE html pdf | \
1127     tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1128 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1129 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1130
1131 #
1132 # man pages
1133 #
1134 tar cf - -C doc/man-pages man1 man5 man8 | \
1135     tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1136
1137 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1138 %if %{krb5support}
1139 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1140 %else
1141 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1142 %endif
1143
1144 # remove unused man pages
1145 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1146     dkload knfs package runntp symlink symlink_list symlink_make \
1147     symlink_remove; do
1148         rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1149 done
1150
1151 # rename kpasswd to kapasswd
1152 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1153
1154 # gzip man pages
1155 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1156
1157 # create list of man pages that go in the 'openafs' package
1158 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1159         |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|^xstat|udebug|unlog|^uss|^vos' \
1160         |egrep -v '^afs_compile_et' \
1161         >openafs-man1files
1162
1163 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1164         |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1165         >openafs-man5files
1166
1167 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1168         |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1169         >openafs-man8files
1170
1171 #
1172 # create filelist
1173 #
1174 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1175 %{_bindir}/afsmonitor
1176 %{_bindir}/bos
1177 %{_bindir}/fs
1178 %{_bindir}/kapasswd
1179 %{_bindir}/klog
1180 %{_bindir}/klog.krb
1181 %{_bindir}/pagsh
1182 %{_bindir}/pagsh.krb
1183 %{_bindir}/pts
1184 %{_bindir}/restorevol
1185 %{_bindir}/scout
1186 %{_bindir}/sys
1187 %{_bindir}/tokens
1188 %{_bindir}/tokens.krb
1189 %{_bindir}/translate_et
1190 %{_bindir}/xstat_cm_test
1191 %{_bindir}/xstat_fs_test
1192 %{_bindir}/udebug
1193 %{_bindir}/unlog
1194 %{_sbindir}/backup
1195 %{_sbindir}/butc
1196 %{_sbindir}/fms
1197 %{_sbindir}/fstrace
1198 %{_sbindir}/kas
1199 %{_sbindir}/read_tape
1200 %{_sbindir}/rxdebug
1201 %{_sbindir}/uss
1202 %{_sbindir}/vos
1203 %{_sbindir}/vsys
1204 EOF-openafs-file-list
1205
1206 # add man pages to the list
1207 cat openafs-man1files \
1208         | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1209         >>openafs-file-list
1210 cat openafs-man5files \
1211         | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1212         >>openafs-file-list
1213 cat openafs-man8files \
1214         | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1215         >>openafs-file-list
1216
1217 #
1218 # Install compatiblity links
1219 #
1220 for d in bin:bin etc:sbin; do
1221   olddir=`echo $d | sed 's/:.*$//'`
1222   newdir=`echo $d | sed 's/^.*://'`
1223   mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1224   for f in `cat openafs-file-list`; do
1225     if echo $f | grep -q /$newdir/; then
1226       fb=`basename $f`
1227       ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1228     fi
1229   done
1230 done
1231
1232 #
1233 # Remove files we're not installing
1234 #
1235
1236 # remove duplicated files from /usr/afs/bin
1237 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1238   rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1239 done
1240
1241 # the rest are not needed.
1242 for f in dlog dpass install knfs livesys ; do
1243   rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1244 done
1245
1246 # not supported on Linux or duplicated
1247 for f in kdb rmtsysd kpwvalid ; do
1248   rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1249 done
1250 # sometimes install sucks and puts down a directory. kill it all.
1251 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1252
1253 # remove man pages from programs deleted above
1254 for f in 1/dlog 1/dpass 1/livesys 8/kdb 8/kpwvalid 8/xfs_size_check 1/package_test 5/package 8/package ; do
1255   rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1256 done
1257
1258 # PAM modules are doubly-installed  Remove the version we don't need
1259 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1260   rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1261 done
1262
1263 %if !%{build_authlibs}
1264 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1265 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1266 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1267 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1268 %endif
1269
1270 %endif
1271
1272 %if %{build_modules}
1273 %if %{fedorakmod}
1274 for kvariant in %{kvariants}
1275 do
1276   if [ -n "$kvariant" ] ; then
1277     if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1278       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1279       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1280     elif [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}+${kvariant}-SP ] ; then
1281       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}+${kvariant}-SP
1282       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}+${kvariant}/extra/openafs
1283     else
1284       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1285       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1286     fi
1287   else
1288     if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1289       srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1290       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1291     else
1292       srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1293       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1294     fi
1295   fi
1296
1297   mkdir -p ${dstdir}
1298   install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1299 done
1300 %else
1301 # Install the kernel modules
1302 for variation in %{kvariations}
1303 do
1304     if [ ${variation} = up ]
1305     then
1306        kvar=%{kxmoddir}
1307        modname=openafs${kmodend}
1308     else
1309        kvar=%{kxmoddir}${variation}
1310        modname=openafs${kmodend}
1311     fi
1312
1313     srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1314     dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1315
1316     mkdir -p ${dstdir}
1317
1318     install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1319 done
1320 %endif
1321 %endif
1322
1323 ##############################################################################
1324 ###
1325 ### clean
1326 ###
1327 ##############################################################################
1328 %clean
1329 rm -f openafs-file-list
1330 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1331         rm -fr $RPM_BUILD_ROOT
1332
1333
1334 ##############################################################################
1335 ###
1336 ### scripts
1337 ###
1338 ##############################################################################
1339 %if %{build_userspace}
1340
1341 %pre compat
1342 if [ -e %{_prefix}/afsws ]; then
1343         /bin/rm -fr %{_prefix}/afsws
1344 fi
1345
1346 %post client
1347 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1348 chkconfig --add openafs-client
1349 %else
1350 if [ $1 -eq 1 ] ; then 
1351     # Initial installation 
1352     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1353 fi
1354 %endif
1355 if [ ! -d /afs ]; then
1356         mkdir /afs
1357         chown root.root /afs
1358         chmod 0755 /afs
1359         [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1360 fi
1361
1362 # Create the CellServDB
1363 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1364
1365 ( cd /usr/vice/etc ; \
1366   cat CellServDB.local CellServDB.dist > CellServDB ; \
1367   chmod 644 CellServDB )
1368
1369 %post server
1370 #on an upgrade, don't enable if we were disabled
1371 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1372 if [ $1 = 1 ] ; then
1373   chkconfig --add openafs-server
1374 fi
1375 %{initdir}/openafs-server condrestart
1376 %else
1377 if [ $1 -eq 1 ] ; then 
1378     # Initial installation 
1379     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1380 fi
1381 %endif
1382
1383 %if %{build_authlibs}
1384 %post authlibs
1385 /sbin/ldconfig
1386
1387 %postun authlibs
1388 /sbin/ldconfig
1389 %endif
1390
1391 %preun
1392 if [ $1 = 0 ] ; then
1393         [ -d /afs ] && rmdir /afs
1394         :
1395 fi
1396
1397 %preun client
1398 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1399 if [ $1 = 0 ] ; then
1400         %{initdir}/openafs-client stop
1401         chkconfig --del openafs-client
1402 fi
1403 %else
1404 if [ $1 -eq 0 ] ; then
1405         # Package removal, not upgrade
1406         /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || :
1407         /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || :
1408 fi
1409 %endif
1410
1411 %preun server
1412 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1413 if [ $1 = 0 ] ; then
1414         %{initdir}/openafs-server stop
1415         chkconfig --del openafs-server
1416 fi
1417 %else
1418 if [ $1 -eq 0 ] ; then
1419         /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || :
1420         /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || :
1421 fi
1422 %endif
1423
1424 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
1425 %postun client
1426 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1427
1428 %postun server
1429 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1430 %endif
1431
1432 %if %{build_dkmspkg}
1433 %post -n dkms-%{name}
1434 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1435 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1436 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1437
1438 %preun -n dkms-%{name}
1439 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1440 %endif
1441 %endif
1442
1443 %if %{build_modules}
1444 %if !%{fedorakmod}
1445 %if %{up_package}
1446 %post kernel
1447 /sbin/depmod -ae %{kernvers}
1448
1449 %postun kernel
1450 /sbin/depmod -ae %{kernvers}
1451
1452 %endif
1453
1454 %if %{smp_package}
1455 %post kernel-smp
1456 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1457
1458 %postun kernel-smp
1459 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1460 %endif
1461
1462 %if %{largesmp_package}
1463 %post kernel-largesmp
1464 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1465
1466 %postun kernel-largesmp
1467 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1468 %endif
1469  
1470 %if %{bigmem_package}
1471 %post kernel-bigmem
1472 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1473
1474 %postun kernel-bigmem
1475 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1476 %endif
1477
1478 %if %{hugemem_package}
1479 %post kernel-hugemem
1480 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1481
1482 %postun kernel-hugemem
1483 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1484 %endif
1485 %endif
1486 %endif
1487
1488 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
1489 %triggerun -- openafs-client < 1.6.0-1
1490 # Save the current service runlevel info
1491 # User must manually run systemd-sysv-convert --apply httpd
1492 # to migrate them to systemd targets
1493 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||:
1494
1495 # Run this because the SysV package being removed won't do it
1496 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || :
1497
1498 %triggerun -- openafs-server < 1.6.0-1
1499 # Save the current service runlevel info
1500 # User must manually run systemd-sysv-convert --apply httpd
1501 # to migrate them to systemd targets
1502 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||:
1503
1504 # Run this because the SysV package being removed won't do it
1505 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || :
1506 %endif
1507
1508 ##############################################################################
1509 ###
1510 ### file lists
1511 ###
1512 ##############################################################################
1513 %if %{build_userspace}
1514
1515 %files -f openafs-file-list
1516 %defattr(-,root,root)
1517 %config(noreplace) /etc/sysconfig/openafs
1518 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1519 %{_libdir}/libafshcrypto.so.*
1520 %{_libdir}/librokenafs.so.*
1521
1522 %files docs
1523 %defattr(-,root,root)
1524 %docdir %{_docdir}/openafs-%{afsvers}
1525 %dir %{_docdir}/openafs-%{afsvers}
1526 %{_docdir}/openafs-%{afsvers}/ChangeLog
1527 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1528 %{_docdir}/openafs-%{afsvers}/pdf
1529
1530 %files client
1531 %defattr(-,root,root)
1532 %dir %{_prefix}/vice
1533 %dir %{_prefix}/vice/cache
1534 %dir %{_prefix}/vice/etc
1535 %dir %{_prefix}/vice/etc/C
1536 %{_prefix}/vice/etc/CellServDB.dist
1537 %config(noreplace) %{_prefix}/vice/etc/ThisCell
1538 %config(noreplace) %{_prefix}/vice/etc/cacheinfo
1539 %{_bindir}/afsio
1540 %{_bindir}/cmdebug
1541 %{_bindir}/up
1542 %{_prefix}/vice/etc/afsd
1543 %{_prefix}/vice/etc/C/afszcm.cat
1544 %{pamdir}/pam_afs.krb.so.1
1545 %{pamdir}/pam_afs.krb.so
1546 %{pamdir}/pam_afs.so.1
1547 %{pamdir}/pam_afs.so
1548 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1549 %{initdir}/openafs-client
1550 %else
1551 %{_unitdir}/openafs-client.service
1552 %{_sysconfdir}/sysconfig/modules/openafs-client.modules
1553 %endif
1554 %{_mandir}/man1/cmdebug.*
1555 %{_mandir}/man1/copyauth.*
1556 %{_mandir}/man1/up.*
1557 %{_mandir}/man5/afs.5.gz
1558 %{_mandir}/man5/afs_cache.5.gz
1559 %{_mandir}/man5/afs_volume_header.5.gz
1560 %{_mandir}/man5/afszcm.cat.5.gz
1561 %{_mandir}/man5/cacheinfo.*
1562 %{_mandir}/man8/afsd.*
1563 %{_mandir}/man8/rmtsysd.*
1564 %{_mandir}/man8/vsys.*
1565 %{_mandir}/man5/CellAlias.*
1566
1567 %files server
1568 %defattr(-,root,root)
1569 %dir %{_prefix}/afs
1570 %dir %{_prefix}/afs/bin
1571 %dir %{_prefix}/afs/etc
1572 %dir %{_prefix}/afs/logs
1573 %{_prefix}/afs/bin/bosserver
1574 %{_prefix}/afs/bin/bos_util
1575 %{_prefix}/afs/bin/buserver
1576 %{_prefix}/afs/bin/dafileserver
1577 %{_prefix}/afs/bin/dafssync-debug
1578 %{_prefix}/afs/bin/dasalvager
1579 %{_prefix}/afs/bin/davolserver
1580 %{_prefix}/afs/bin/fileserver
1581 %{_prefix}/afs/bin/fssync-debug
1582 # Should we support KAServer?
1583 %{_prefix}/afs/bin/kaserver
1584 %{_prefix}/afs/bin/ka-forwarder
1585 %{_prefix}/afs/bin/pt_util
1586 %{_prefix}/afs/bin/ptserver
1587 %{_prefix}/afs/bin/salvager
1588 %{_prefix}/afs/bin/salvageserver
1589 %{_prefix}/afs/bin/salvsync-debug
1590 %{_prefix}/afs/bin/state_analyzer
1591 %{_prefix}/afs/bin/upclient
1592 %{_prefix}/afs/bin/upserver
1593 %{_prefix}/afs/bin/vlserver
1594 %{_prefix}/afs/bin/volinfo
1595 %{_prefix}/afs/bin/volserver
1596 %{_sbindir}/kadb_check
1597 %{_sbindir}/prdb_check
1598 %{_sbindir}/vldb_check
1599 %{_sbindir}/vldb_convert
1600 %{_sbindir}/voldump
1601 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1602 %{initdir}/openafs-server
1603 %else
1604 %{_unitdir}/openafs-server.service
1605 %endif
1606 %{_mandir}/man5/AuthLog.*
1607 %{_mandir}/man5/BackupLog.*
1608 %{_mandir}/man5/BosConfig.*
1609 %{_mandir}/man5/BosLog.*
1610 %{_mandir}/man5/FORCESALVAGE.*
1611 %{_mandir}/man5/FileLog.*
1612 %{_mandir}/man5/KeyFile.*
1613 %{_mandir}/man5/NetInfo.*
1614 %{_mandir}/man5/NetRestrict.*
1615 %{_mandir}/man5/NoAuth.*
1616 %{_mandir}/man5/SALVAGE.fs.*
1617 %{_mandir}/man5/SalvageLog.*
1618 %{_mandir}/man5/sysid.*
1619 %{_mandir}/man5/UserList.*
1620 %{_mandir}/man5/VLLog.*
1621 %{_mandir}/man5/VolserLog.*
1622 %{_mandir}/man5/bdb.DB0.*
1623 %{_mandir}/man5/fms.log.*
1624 %{_mandir}/man5/kaserver.DB0.*
1625 %{_mandir}/man5/kaserverauxdb.*
1626 %{_mandir}/man5/krb.conf.*
1627 %{_mandir}/man5/krb.excl.*
1628 %{_mandir}/man5/prdb.DB0.*
1629 %{_mandir}/man5/salvage.lock.*
1630 %{_mandir}/man5/tapeconfig.*
1631 %{_mandir}/man5/vldb.DB0.*
1632 %{_mandir}/man8/buserver.*
1633 %{_mandir}/man8/fileserver.*
1634 %{_mandir}/man8/dafileserver.*
1635 %{_mandir}/man8/dasalvager.*
1636 %{_mandir}/man8/davolserver.*
1637 %{_mandir}/man8/kadb_check.*
1638 %{_mandir}/man8/ka-forwarder.*
1639 %{_mandir}/man8/prdb_check.*
1640 %{_mandir}/man8/ptserver.*
1641 %{_mandir}/man8/pt_util.*
1642 %{_mandir}/man8/salvager.*
1643 %{_mandir}/man8/salvageserver.*
1644 %{_mandir}/man8/state_analyzer.*
1645 %{_mandir}/man8/upclient.*
1646 %{_mandir}/man8/upserver.*
1647 %{_mandir}/man8/vldb_check.*
1648 %{_mandir}/man8/vldb_convert.*
1649 %{_mandir}/man8/vlserver.*
1650 %{_mandir}/man8/voldump.*
1651 %{_mandir}/man8/volinfo.*
1652 %{_mandir}/man8/volserver.*
1653
1654 %if %{build_authlibs}
1655 %files authlibs
1656 %defattr(-,root,root)
1657 %{_libdir}/libafsauthent.so.*
1658 %{_libdir}/libafsrpc.so.*
1659 %{_libdir}/libkopenafs.so.*
1660 %endif
1661
1662 %files authlibs-devel
1663 %defattr(-,root,root)
1664 %{_includedir}/kopenafs.h
1665 %{_libdir}/libafsauthent.a
1666 %{_libdir}/libafscp.a
1667 %{_libdir}/libafsrpc.a
1668 %{_libdir}/libafsauthent_pic.a
1669 %{_libdir}/libafsrpc_pic.a
1670 %{_libdir}/libkopenafs.a
1671 %if %{build_authlibs}
1672 %{_libdir}/libafsauthent.so
1673 %{_libdir}/libafsrpc.so
1674 %{_libdir}/libkopenafs.so
1675 %endif
1676
1677 %files devel
1678 %defattr(-,root,root)
1679 %{_bindir}/afs_compile_et
1680 %{_bindir}/rxgen
1681 %{_includedir}/afs
1682 %{_includedir}/lock.h
1683 %{_includedir}/lwp.h
1684 %{_includedir}/preempt.h
1685 %{_includedir}/rx
1686 %{_includedir}/timer.h
1687 %{_includedir}/ubik.h
1688 %{_includedir}/ubik_int.h
1689 %{_libdir}/afs
1690 %{_libdir}/libafshcrypto.a
1691 %{_libdir}/libafshcrypto.so
1692 %{_libdir}/liblwp.a
1693 %{_libdir}/libopr.a
1694 %{_libdir}/librokenafs.a
1695 %{_libdir}/librokenafs.so
1696 %{_libdir}/librx.a
1697 %{_libdir}/librxkad.a
1698 %{_libdir}/librxstat.a
1699 %{_libdir}/libubik.a
1700 %{_libdir}/libubik_pthread.a
1701 %{_mandir}/man1/rxgen.*
1702 %{_mandir}/man1/afs_compile_et.*
1703
1704 %if %{build_dkmspkg}
1705 %files -n dkms-%{name}
1706 %defattr(-,root,root)
1707 %{_prefix}/src/%{name}-%{dkms_version}
1708 %endif
1709
1710 %files kernel-source
1711 %defattr(-,root,root)
1712 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1713 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1714 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1715 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1716
1717 %files compat
1718 %defattr(-,root,root)
1719 %{_prefix}/afsws
1720
1721 %files kpasswd
1722 %defattr(-,root,root)
1723 %{_bindir}/kpasswd
1724 %{_bindir}/kpwvalid
1725
1726 %if %{krb5support}
1727 %files krb5
1728 %defattr(-,root,root)
1729 %{_bindir}/aklog
1730 %{_bindir}/klog.krb5
1731 %{_sbindir}/asetkey
1732 %{_mandir}/man1/aklog.*
1733 %{_mandir}/man8/asetkey.*
1734 %endif
1735
1736 %endif
1737
1738 %if %{build_modules}
1739
1740 %if !%{fedorakmod}
1741 %if %{up_package}
1742 %files kernel
1743 %defattr(-,root,root)
1744 %{kxmoddir}/fs/openafs/openafs.*
1745 %endif
1746
1747 %if %{smp_package}
1748 %files kernel-smp
1749 %defattr(-,root,root)
1750 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1751 %endif
1752
1753 %if %{largesmp_package}
1754 %files kernel-largesmp
1755 %defattr(-,root,root)
1756 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1757 %endif
1758  
1759 %if %{bigmem_package}
1760 %files kernel-bigmem
1761 %defattr(-,root,root)
1762 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1763 %endif
1764
1765 %if %{hugemem_package}
1766 %files kernel-hugemem
1767 %defattr(-,root,root)
1768 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1769 %endif
1770 %endif
1771
1772 %endif
1773
1774 ##############################################################################
1775 ###
1776 ### openafs.spec change log
1777 ###
1778 ##############################################################################
1779 %changelog
1780 * Wed Dec 12 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1781 - Make the RPM mockable
1782
1783 * Mon Oct 29 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1784 - Update to match the shipped 1.4.5 RPMS
1785 - Fix the kvariant stuff to only configure the 'standard' case once
1786 - Add openafs-kvers.sh back in
1787
1788 * Wed Oct 10 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1789 - Use Fedora style kmods, which allows us to install multiple kernel types
1790
1791 * Thu Jun 07 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1792 - Use distributed files, rather than those in packager's SOURCE directory
1793 - Remove SuidCells stuff, which was unused
1794
1795 * Fri Dec 01 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-2
1796 - integrate s390x changes
1797 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1798   that won't build the .so files.
1799
1800 * Wed Aug 23 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-1
1801 - update to 1.4.2
1802 - use installed aklog manpage.
1803 - moduleparam patch obsoleted.
1804
1805 * Tue Aug 22 2006  Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1806 - update to 1.4.2-rc1
1807 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1808   (but only add support for 2.6 kernels.  No need for the 2.4 kernels).
1809 - don't need the posixlock patch anymore.
1810
1811 * Wed Jul 12 2006  Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1812 - update to 1.4.2-beta2
1813 - add linux2.4 posixlock API patch
1814
1815 * Mon Jun 26 2006  Derek Atkins <warlord@MIT.EDU>
1816 - moduleparam and krb524 patches no longer required in OA-CVS
1817
1818 * Wed May 17 2006  Derek Atkins <warlord@MIT.EDU>
1819 - change non-target-cpu kernel dep to a file dep
1820 - make sure we use the proper kernel version for the dependency.
1821
1822 * Tue May 16 2006  Derek Atkins <warlord@MIT.EDU>
1823 - allow users to specify local CellServDB and SuidCells entries
1824   don't overwrite user's changes.  Provide a .dist an let users
1825   make entries in a ".local"
1826 - build the CellServDB and SuidCells at client startup and at
1827   client install-time
1828 - add provideskernelarch functionality to openafs-kvers-is.sh
1829 - use that functionality to Require kernel{,-<type>}-targetcpu
1830   to get better package safety due to RPM bugs where the kernel
1831   release isn't used so you can install the kernel module against
1832   any kernel of the same major version.
1833
1834 * Mon May 15 2006  Derek Atkins <warlord@MIT.EDU>
1835 - update the README in openafs-kernel-source
1836 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1837 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1838
1839 * Fri Apr 21 2006  Derek Atkins <warlord@MIT.EDU>
1840 - build requires autoconf and automake for krb5support
1841   and autoconf for standard package
1842 - dont setup the krb5 migration kit (or patches) if we don't care.
1843 - require ncurses-devel to build
1844
1845 * Wed Apr 19 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1846 - look for krb524 functions in libkrb524 if we can't find them
1847   in the standard locations.
1848
1849 * Tue Apr 18 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1850 - fix the module_param_array macro for Linux 2.6.9.
1851
1852 * Sat Apr 15 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1853 - update to 1.4.1 release.
1854 - distribute asetkey from openafs instead of krb5-migration kit
1855 - don't need to apply the FC5 patches because they are part of the distro.
1856 - install asetkey into the "proper" place
1857 - dont list a manpage twice.
1858 - package asetkey man page.  delete it when not needed.
1859
1860 * Thu Apr  6 2006  Derek Atkins <warlord@MIT.EDU>
1861 - turn authlibs back on, because RT #18767 was applied to CVS.
1862
1863 * Wed Mar 29 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1864 - update to 1.4.1rc10, build on FC5
1865 - fix the man pages (distribute into various packages)
1866 - include patches for FC5, RT #29112 and #29122
1867
1868 * Mon Dec 19 2005  Derek Atkins <warlord@MIT.EDU>
1869 - openafs-server shouldn't depend on the kernel module.
1870
1871 * Thu Nov 17 2005  Derek Atkins <warlord@MIT.EDU>
1872 - patch from Mike Polek <mike at pictage.com> to run depmod for
1873   the target kernel and not the running kernel.
1874
1875 * Tue Nov  8 2005  Derek Atkins <warlord@MIT.EDU>
1876 - build aklog from the openafs sources, not from the krb5 migration kit.
1877
1878 * Fri Nov  4 2005  Derek Atkins <warlord@MIT.EDU>
1879 - set openafs-kernel-source to Provide openafs-kernel
1880
1881 * Thu Oct 20 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1882 - update afs-krb5 res_search patch: look for res_search and __res_search
1883 - update to 1.4.0 final
1884
1885 * Mon Oct 10 2005  Derek Atkins <warlord@MIT.EDU>
1886 - remove all kdump builds.
1887
1888 * Thu Oct  6 2005  Derek Atkins <warlord@MIT.EDU>
1889 - fix openafs-kernel-version.sh so it will build an RPM for the
1890   currently-running kernel even if it's smp on 2.6.
1891
1892 * Tue Sep 27 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1893 - upgrade to 1.4.0rc5
1894 - turn off authlibs packages
1895
1896 * Fri Sep 23 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1897 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1898   it's called "openafs" and not "libafs".  This fixes the shutdown
1899   problem.
1900
1901 * Thu Sep 22 2005  Derek Atkins <warlord@MIT.EDU>
1902 - update kversis script, add 'kvers' operation
1903 - fix bug that 2.6 smp/hugemem kernels don't provide
1904   kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1905 - add patch to remove res_search from the afs-krb5 configure
1906
1907 * Thu Sep 15 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1908 - Update to 1.4.0rc4
1909 - Update the afs-krb5 krb524 patch so it actually works on
1910   some older systems like RHEL3 that still need -lkrb524.
1911 - Update the buildall script so choose better architecture support,
1912   e.g. don't build i586 on RHEL.
1913 - Update the rebuild information in the SPEC file.
1914 - Add support for finding .EL kernels in openafs-kvers-is.sh
1915 - Add additional error messages when kernel version/type parsing fails.
1916 - Update the buildall script to use the kernel srcdir directly.
1917
1918 * Wed Sep 14 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1919 - Add "hugemem" to 2.4 configs
1920 - Add checks to support scripts to determine whether to build
1921   the bigmem and/or hugemem kernels for 2.4.
1922
1923 * Mon Sep 12 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1924 - Added some afs-krb5 patches to get the migration kit to build
1925   on modern AFS and modern Kerberos.
1926 - Added authlibs and authlibs-devel packages as per UMich changes.
1927
1928 * Sun Sep 11 2005  Derek Atkins <warlord@MIT.EDU>
1929 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1930
1931 * Sat Sep 10 2005  Derek Atkins <warlord@MIT.EDU>
1932 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1933   from Red Hat.   Initial attempt at a release of 1.4.  Still need
1934   to work in a 2.6 build system.