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