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