315eb00671aebf6b660493e125313bdaff54e800
[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 %{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 %ifarch x86_64 ia64 s390 s390x
191 %define build_userspace 1
192 %define build_modules 1
193 %ifarch x86_64 ia64
194 %define build_authlibs 1
195 %else
196 %define build_authlibs 0
197 %endif
198 %endif
199
200 %ifarch %{ix86}
201 %define build_userspace 0
202 %define build_modules 1
203 %define build_authlibs 1
204 %endif
205
206 %ifarch i386
207 %define build_userspace 1
208 %define build_modules 0
209 %define build_authlibs 1
210 %endif
211
212 %endif
213
214 # deal with cmdline specification
215 %if %{build_userspace_on_cmdline} || %{build_modules_on_cmdline}
216 %if !%{build_userspace_on_cmdline}
217 %define build_userspace 0
218 %endif
219 %if !%{build_modules_on_cmdline}
220 %define build_modules 0
221 %endif
222 %endif
223
224 %if !%{build_authlibs_on_cmdline}
225 %if %{build_userspace_on_cmdline}
226 %define build_authlibs 1
227 %else
228 %define build_authlibs 0
229 %endif
230 %endif
231
232 # Make sure RPM doesn't complain about installed but non-packaged files.
233 #define __check_files  %{nil}
234
235 Summary: OpenAFS distributed filesystem
236 Name: openafs
237 Version: %{pkgvers}
238 Release: %{pkgrel}%{?dist}
239 License: IBM Public License
240 URL: http://www.openafs.org
241 BuildRoot: %{_tmppath}/%{name}-%{version}-root
242 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
243 Group: Networking/Filesystems
244 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
245 %if %{krb5support}
246 BuildRequires: krb5-devel
247 %endif
248 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
249
250 #    http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
251 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
252 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
253 %define srcdir openafs-%{afsvers}
254
255 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
256 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
257
258 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2010-12-13
259
260 Source30: openafs-kernel-version.sh
261 Source996: openafs-kvers-is.sh
262 Source997: openafs-buildfedora.pl
263 Source998: openafs-buildall.sh
264 Source999: openafs-kmodtool
265
266 %description
267 The AFS distributed filesystem.  AFS is a distributed filesystem
268 allowing cross-platform sharing of files among multiple computers.
269 Facilities are provided for access control, authentication, backup and
270 administrative management.
271
272 This package provides common files shared across all the various
273 OpenAFS packages but are not necessarily tied to a client or server.
274
275 The OpenAFS SRPM can be rebuilt with the following options to control
276 what gets built:
277
278  --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version 
279                                   to build modules against. The default is
280                                   to build against the currently-running
281                                   kernel.
282  --define "kbase /lib/modules/"   The base location to look for kernel headers
283  --define "kend /build"           The 'end' location to look for kernels
284                                   The build will define ksrvdir as
285                                   %%{kbase}<kernvers>%%{kend}
286
287  --without krb5                   Disable krb5 support (default: with krb5)
288  --with bitmap-later              Enable "bitmap later" support
289  --with bos-restricted            Enable "bos restricted" mode
290  --with largefiles                Enable "largefile fileserver" mode
291  --with supergroups               Enable "supergroups"
292
293  --target=i386                    The target architecture to build for.
294                                   When building for a non-default target
295                                   the build may choose whether to build
296                                   userspace or kernel modules automatically.
297                                   The defaults are probably what you want.
298
299  --define "build_userspace 1"     Request building of userspace tools
300  --define "build_modules 1"       Request building of kernel modules
301                                   You probably never need to specify these.
302
303  --define "kmoddir /lib/modules"  This is the base location where modules
304                                   will be installed.  You probably don't
305                                   need to change this ever.
306
307  --define "fedorakmod 0"          Disable the building of 'Fedora' style kernel 
308                                   modules, and use the old format.
309
310  --define "kvariants <variants>"  When building Fedora style kernel modules,
311                                   this defines the set of kernel variants
312                                   to build.
313                                   <variants> is a space seperated list which
314                                   may contain one or more of
315                                   '' (for the generic kernel), smp, PAE, xen
316                                   or kdump 
317
318 To a kernel module for your running kernel, just run:
319   rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
320
321 ##############################################################################
322 #
323 # build the userspace side of things if so requested
324 #
325 ##############################################################################
326 %if %{build_userspace}
327
328 %package client
329 Requires: binutils, openafs = %{version}
330
331 %if %{fedorakmod}
332 Requires: %{name}-kmod >= %{version}
333 Provides: %{name}-kmod-common = %{version}
334 %else
335 Requires: openafs-kernel
336 %endif
337
338 Summary: OpenAFS Filesystem Client
339 Group: Networking/Filesystem
340
341 %description client
342 The AFS distributed filesystem.  AFS is a distributed filesystem
343 allowing cross-platform sharing of files among multiple computers.
344 Facilities are provided for access control, authentication, backup and
345 administrative management.
346
347 This package provides basic client support to mount and manipulate
348 AFS.
349
350 %package server
351 Requires: openafs = %{version}
352 Summary: OpenAFS Filesystem Server
353 Group: Networking/Filesystems
354
355 %description server
356 The AFS distributed filesystem.  AFS is a distributed filesystem
357 allowing cross-platform sharing of files among multiple computers.
358 Facilities are provided for access control, authentication, backup and
359 administrative management.
360
361 This package provides basic server support to host files in an AFS
362 Cell.
363
364 %if %{build_dkmspkg}
365 %package -n dkms-%{name}
366 Summary:        DKMS-ready kernel source for AFS distributed filesystem
367 Group:          Development/Kernel
368 Provides:       openafs-kernel = %{version}
369 %if %{fedorakmod}
370 Provides: %{name}-kmod = %{version}
371 %endif
372 Requires(pre):  dkms
373 Requires(pre):  flex
374 Requires(post): dkms
375 Requires:       %{name}-kmod-common = %{version}
376
377 %description -n dkms-%{name}
378 The AFS distributed filesystem.  AFS is a distributed filesystem
379 allowing cross-platform sharing of files among multiple computers.
380 Facilities are provided for access control, authentication, backup and
381 administrative management.
382
383 This package provides the source code to allow DKMS to build an
384 AFS kernel module.
385 %endif
386
387 %if %{build_authlibs}
388 %package authlibs
389 Summary: OpenAFS authentication shared libraries
390 Group: Networking/Filesystems
391
392 %description authlibs
393 The AFS distributed filesystem.  AFS is a distributed filesystem
394 allowing cross-platform sharing of files among multiple computers.
395 Facilities are provided for access control, authentication, backup and
396 administrative management.
397
398 This package provides a shared version of libafsrpc and libafsauthent. 
399 None of the programs included with OpenAFS currently use these shared 
400 libraries; however, third-party software that wishes to perform AFS 
401 authentication may link against them.
402 %endif
403
404 %package authlibs-devel
405 %if %{build_authlibs}
406 Requires: openafs-authlibs = %{version}
407 %endif
408 Requires: openafs-devel = %{version}
409 Summary: OpenAFS shared library development
410 Group: Development/Filesystems
411
412 %description authlibs-devel
413 The AFS distributed filesystem.  AFS is a distributed filesystem
414 allowing cross-platform sharing of files among multiple computers.
415 Facilities are provided for access control, authentication, backup and
416 administrative management.
417
418 This package includes the static versions of libafsrpc and 
419 libafsauthent, and symlinks required for building against the dynamic 
420 libraries.
421
422 %package devel
423 Summary: OpenAFS Development Libraries and Headers
424 Group: Development/Filesystems
425
426 %description devel
427 The AFS distributed filesystem.  AFS is a distributed filesystem
428 allowing cross-platform sharing of files among multiple computers.
429 Facilities are provided for access control, authentication, backup and
430 administrative management.
431
432 This package provides static development libraries and headers needed
433 to compile AFS applications.  Note: AFS currently does not provide
434 shared libraries.
435
436 %package docs
437 Summary: OpenAFS user and administrator documentation
438 Requires: openafs = %{version}
439 Group: Networking/Filesystems
440
441 %description docs
442 The AFS distributed filesystem.  AFS is a distributed filesystem
443 allowing cross-platform sharing of files among multiple computers.
444 Facilities are provided for access control, authentication, backup and
445 administrative management.
446
447 This package provides HTML documentation for OpenAFS users and system
448 administrators.
449
450 %package kernel-source
451 Summary: OpenAFS Kernel Module source tree
452 Group: Networking/Filesystems
453 Provides: openafs-kernel = %{version}
454 %if %{fedorakmod}
455 Provides: %{name}-kmod = %{version}
456 %endif
457
458 %description kernel-source
459 The AFS distributed filesystem.  AFS is a distributed filesystem
460 allowing cross-platform sharing of files among multiple computers.
461 Facilities are provided for access control, authentication, backup and
462 administrative management.
463
464 This package provides the source code to build your own AFS kernel
465 module.
466
467 %package compat
468 Summary: OpenAFS client compatibility symlinks
469 Requires: openafs = %{version}, openafs-client = %{version}
470 Group: Networking/Filesystems
471 Obsoletes: openafs-client-compat
472
473 %description compat
474 The AFS distributed filesystem.  AFS is a distributed filesystem
475 allowing cross-platform sharing of files among multiple computers.
476 Facilities are provided for access control, authentication, backup and
477 administrative management.
478
479 This package provides compatibility symlinks in /usr/afsws.  It is
480 completely optional, and is only necessary to support legacy
481 applications and scripts that hard-code the location of AFS client
482 programs.
483
484 %package kpasswd
485 Summary: OpenAFS KA kpasswd support
486 Requires: openafs
487 Group: Networking/Filesystems
488
489 %description kpasswd
490 The AFS distributed filesystem.  AFS is a distributed filesystem
491 allowing cross-platform sharing of files among multiple computers.
492 Facilities are provided for access control, authentication, backup and
493 administrative management.
494
495 This package provides the compatibility symlink for kpasswd, in case
496 you are using KAserver instead of Krb5.
497
498 %if %{krb5support}
499 %package krb5
500 Summary: OpenAFS programs to use with krb5
501 Requires: openafs = %{version}
502 Group: Networking/Filesystems
503 BuildRequires: krb5-devel
504
505 %description krb5
506 The AFS distributed filesystem.  AFS is a distributed filesystem
507 allowing cross-platform sharing of files among multiple computers.
508 Facilities are provided for access control, authentication, backup and
509 administrative management.
510
511 This package provides compatibility programs so you can use krb5
512 to authenticate to AFS services, instead of using AFS's homegrown
513 krb4 lookalike services.
514 %endif
515
516 %endif
517
518 ##############################################################################
519 #
520 # build the kernel modules if so requested
521 #
522 ##############################################################################
523 %if %{build_modules}
524
525 %if %{fedorakmod}
526 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
527
528 %else
529
530 # Legacy kernel compilation code here ...
531 %define modkversion %(echo %{kernvers} | cut -d- -f1)
532 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
533 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
534
535 %if %{up_package}
536 %package kernel
537 Summary: OpenAFS Kernel Module (compiled for UP)
538 Release: %{modpkgrel}
539 Group: Networking/Filesystems
540 Provides: openafs-kernel = %{version}
541 %if %{kprovidesarch}
542 Requires: kernel-%{_target_cpu} = %{kversion}
543 %else
544 Requires: /boot/config-%{kernvers}
545 %endif
546
547 %description kernel
548 The AFS distributed filesystem.  AFS is a distributed filesystem
549 allowing cross-platform sharing of files among multiple computers.
550 Facilities are provided for access control, authentication, backup and
551 administrative management.
552
553 This package provides a precompiled AFS kernel module for %{kernvers}.
554 %endif
555
556 %if %{smp_package}
557 %package kernel-smp
558 Summary: OpenAFS Kernel Module (compiled for SMP)
559 Release: %{modpkgrel}
560 Provides: openafs-kernel = %{version}
561 %if %{kprovidesarch}
562 Requires: kernel-smp-%{_target_cpu} = %{kversion}
563 %else
564 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
565 %endif
566 Group: Networking/Filesystems
567
568 %description kernel-smp
569 The AFS distributed filesystem.  AFS is a distributed filesystem
570 allowing cross-platform sharing of files among multiple computers.
571 Facilities are provided for access control, authentication, backup and
572 administrative management.
573
574 This package provides a precompiled AFS kernel module for %{kernvers}.
575 %endif
576
577 %if %{largesmp_package}
578 %package kernel-largesmp
579 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
580 Release: %{modpkgrel}
581 Provides: openafs-kernel = %{version}
582 %if %{kprovidesarch}
583 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
584 %else
585 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
586 %endif
587 Group: Networking/Filesystems
588
589 %description kernel-largesmp
590 The AFS distributed filesystem.  AFS is a distributed filesystem
591 allowing cross-platform sharing of files among multiple computers.
592 Facilities are provided for access control, authentication, backup and
593 administrative management.
594
595 This package provides a precompiled AFS kernel module for %{kernvers}.
596 %endif
597  
598 %if %{bigmem_package}
599 %package kernel-bigmem
600 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
601 Release: %{modpkgrel}
602 Provides: openafs-kernel = %{version}
603 %if %{kprovidesarch}
604 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
605 %else
606 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
607 %endif
608 Group: Networking/Filesystems
609
610 %description kernel-bigmem
611 The AFS distributed filesystem.  AFS is a distributed filesystem
612 allowing cross-platform sharing of files among multiple computers.
613 Facilities are provided for access control, authentication, backup and
614 administrative management.
615
616 This package provides a precompiled AFS kernel module for %{kernvers}.
617 %endif
618
619 %if %{hugemem_package}
620 %package kernel-hugemem
621 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
622 Release: %{modpkgrel}
623 Provides: openafs-kernel = %{version}
624 %if %{kprovidesarch}
625 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
626 %else
627 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
628 %endif
629 Group: Networking/Filesystems
630
631 %description kernel-hugemem
632 The AFS distributed filesystem.  AFS is a distributed filesystem
633 allowing cross-platform sharing of files among multiple computers.
634 Facilities are provided for access control, authentication, backup and
635 administrative management.
636
637 This package provides a precompiled AFS kernel module for %{kernvers}.
638 %endif
639
640 %endif
641 # End legacy kernel compilation code ...
642 %endif
643
644 ##############################################################################
645 #
646 # PREP
647 #
648 ##############################################################################
649
650 %prep
651
652 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
653 : @@@
654 : @@@ kernel version:     %{kernvers}
655 %if %{fedorakmod}
656 : @@@ kernel variations:  %{kvariants}
657 %else
658 : @@@ base kernel version:%{kversion}
659 : @@@ kernel modules dir: %{kxmoddir}
660 : @@@ kernel source dir:  %{ksrcdir}
661 %if %{kvers_is_24}
662 : @@@ kernel variations:  %{kvariations}
663 %else
664 %if %{up_package}
665 : @@@ kernel type:        up
666 %else
667 : @@@ kernel type:        %{ktype}
668 %endif
669 %endif
670 %endif
671 : @@@ PAM modules dir:    %{pamdir}
672 : @@@ build userspace:    %{build_userspace}
673 : @@@ build modules:      %{build_modules}
674 : @@@ arch:               %{_arch}
675 : @@@ target cpu:         %{_target_cpu}
676 : @@@
677 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
678
679 # Install OpenAFS src and doc
680 #%setup -q -n %{srcdir}
681 %setup -q -b 1 -n %{srcdir}
682
683 ##############################################################################
684 #
685 # building
686 #
687 ##############################################################################
688 %build
689
690 case %{kernvers} in
691    2.4.*)
692        kv='24'
693        ;;
694    2.6.*)
695        kv='26'
696        ;;
697    *)
698        echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
699        exit 1
700        ;;
701 esac
702
703 case %{_arch} in
704        x86_64)                         sysname=amd64_linux${kv}        ;;
705        alpha*)                         sysname=alpha_linux_${kv}       ;;
706        i386|i486|i586|i686|athlon)     sysname=i386_linux${kv}         ;;
707        *)                              sysname=%{_arch}_linux${kv}     ;;
708 esac
709
710 %ifarch %{ix86}
711 archlist="i386 i586 i686 athlon"
712 %if %{bootkernelsupport}
713   archlist="${archlist} BOOT"
714 %endif
715 %else
716 archlist=%{_arch}
717 %endif
718
719 #
720 # PrintDefine var value statements file
721 #
722 PrintDefine() {
723     case $3 in
724     *ifn*)
725         echo "#ifndef $1" >> $4
726         ;;
727     esac
728     case $3 in
729     *und*)
730         echo "#undef $1" >> $4
731         ;;
732     esac
733     case $3 in
734     *def*)
735         echo "#define $1 $2" >> $4
736         ;;
737     esac
738     case $3 in
739     *end*)
740         echo "#endif" >> $4
741         ;;
742     esac
743     case $3 in
744     *inc*)
745         echo "#include $1" >> $4
746         ;;
747     esac
748     case $3 in
749     *nl*)
750         echo "" >> $4
751         ;;
752     esac
753 }
754
755 # PrintRedhatKernelFix arch mp file
756 PrintRedhatKernelFix() {
757     arch="$1"
758     up=0
759     smp=0
760     largesmp=0
761     ent=0
762     bigmem=0
763     hugemem=0
764     boot=0
765     bootsmp=0
766
767     case "$2" in
768        up)     up=1;;
769        smp)    smp=1;;
770        largesmp) largesmp=1;;
771        bigmem) bigmem=1;;
772        hugemem) hugemem=1;;
773        *)
774                echo "$2 not supported"
775                exit 2;;
776     esac
777
778     file="$3"
779
780     rm -f $file
781     touch $file
782
783     PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
784
785     PrintDefine __BOOT_KERNEL_ENTERPRISE $ent     und,def,nl $file
786     PrintDefine __BOOT_KERNEL_BIGMEM     $bigmem  und,def,nl $file
787     PrintDefine __BOOT_KERNEL_HUGEMEM    $hugemem und,def,nl $file
788     PrintDefine __BOOT_KERNEL_SMP        $smp     und,def,nl $file
789     PrintDefine __BOOT_KERNEL_LARGESMP   $largesmp und,def,nl $file
790     PrintDefine __BOOT_KERNEL_UP         $up      und,def,nl $file
791     PrintDefine __BOOT_KERNEL_BOOT       $boot    und,def,nl $file
792     PrintDefine __BOOT_KERNEL_BOOTSMP    $bootsmp und,def,nl $file
793
794     PrintDefine '"/boot/kernel.h"' "" inc,nl $file      # include file
795
796     for ar in $archlist ; do
797         if [ "$ar" = "$arch" ]; then
798             PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
799         else
800             PrintDefine "__MODULE_KERNEL_$ar" "" und $file      # undef
801         fi
802     done
803     echo "" >> $file
804
805     PrintDefine "" "" end $file
806
807     if [ %{debugspec} = 1 ] ; then
808         echo "Kernel Configuration File for Red Hat kernels:"
809         cat $file
810     fi
811 }
812
813 config_opts="--enable-redhat-buildsys \
814         %{?_with_bitmap_later:--enable-bitmap-later} \
815         %{?_with_bos_restricted:--enable-bos-restricted-mode} \
816         %{?_with_largefiles:--enable-largefile-fileserver} \
817         %{?_with_supergroups:--enable-supergroups} \
818         --enable-transarc-paths"
819
820 # Configure AFS
821
822 # If we're using Fedora kmods, work out which is the best kernel module to 
823 # use for the userland configuration step. If no variants have been specified,
824 # then use the standard kernel. If variants are specified, use the standard kernel
825 # if it's listed, otherwise pick the first listed kernel.
826 ksrc=""
827 %if %{fedorakmod} 
828   for kvariant in %{kvariants} ; do
829     if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
830       if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
831         ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
832       else
833         ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
834       fi
835     fi
836   done
837 %endif
838 if [ -z "$ksrc" ] ; then
839 ksrc=%{ksrcdir}
840 fi
841
842 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
843
844 %if %{krb5support}
845 %if %{?krb5config:1}%{!?krb5config:0}
846 KRB5_CONFIG="%{krb5config}"
847 export KRB5_CONFIG
848 %endif
849 %endif
850
851 ./configure --with-afs-sysname=${sysname} \
852        --prefix=%{_prefix} \
853        --libdir=%{_libdir} \
854        --bindir=%{_bindir} \
855        --sbindir=%{_sbindir} \
856        --disable-strip-binaries \
857        --with-linux-kernel-packaging \
858 %if %{build_modules}
859        --with-linux-kernel-headers=${ksrc} \
860 %endif
861 %if %{krb5support}
862         --with-krb5 \
863 %endif
864        $config_opts \
865        || exit 1
866
867 # Build the libafs tree
868 make only_libafs_tree || exit 1
869
870 # Configure each of our kernel modules
871
872 %if %{fedorakmod} && %{build_modules}
873 for kvariant in %{kvariants} ; do
874   if [ -n "${kvariant}" ] ; then
875     if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
876       ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
877     else
878       ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
879     fi
880
881     cp -R libafs_tree _kmod_build_${kvariant}
882     pushd _kmod_build_${kvariant}
883     ./configure --with-afs-sysname=${sysname} \
884         --prefix=%{_prefix} \
885         --libdir=%{_libdir} \
886         --bindir=%{_bindir} \
887         --sbindir=%{_sbindir} \
888         --with-linux-kernel-packaging \
889         --with-linux-kernel-headers=${ksrc} \
890         --enable-disconnected \
891 %if %{krb5support}
892         --with-krb5-conf=/usr/kerberos/bin/krb5-config \
893 %endif
894         $config_opts \
895         || exit 1
896     popd
897   fi
898 done
899 %endif
900
901 %if %{build_userspace}
902 # Build the user-space AFS stuff
903 make dest_nolibafs || exit 1
904 %endif
905
906 %if %{build_modules}
907 %if %{fedorakmod}
908 for kvariant in %{kvariants}
909 do
910   if [ -n "${kvariant}" ] ; then
911     pushd _kmod_build_$kvariant;
912     make all
913     popd
914   else
915     make dest_only_libafs
916   fi
917 done
918
919 %else
920 # Begin legacy kernel module building code
921
922 %if %{kvers_is_24}
923 # Build all the kernel modules for linux 2.4.x
924 for variation in %{kvariations}
925 do
926     if [ ${variation} = up ]
927     then
928        local_smp_def=-DREDHAT_FIX
929        suffix=
930     else
931        local_smp_def="-DAFS_SMP -DREDHAT_FIX"
932        suffix=${variation}
933     fi
934
935     PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
936     make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
937         LINUX_MODULE_NAME="${suffix}" MPS=SP
938
939 done
940 rm -f src/config/redhat-fix.h
941
942 %elseif %{kvers_is_26}
943 # Build the kernel module for this version of linux 2.6.x
944 # Notice how much easier this is than 2.4.  On the other hand,
945 # we require much more external support to build multiple modules.
946
947   # the MPS=SP just means that we don't add a '.mp' to the name.
948   make dest_only_libafs MPS=SP
949
950 %endif
951 # End legacy kernel module building code
952 %endif
953 %endif
954
955
956 ##############################################################################
957 #
958 # installation
959 #
960 ##############################################################################
961 %install
962
963 export DONT_GPRINTIFY=1
964
965 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
966
967 case %{kernvers} in
968    2.4.*)
969        kv='24'
970        kmodend=.o
971        ;;
972    2.6.*)
973        kv='26'
974        kmodend=.ko
975        ;;
976    *)
977        echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
978        exit 1
979        ;;
980 esac
981
982 case %{_arch} in
983        x86_64)                         sysname=amd64_linux${kv}        ;;
984        alpha*)                         sysname=alpha_linux_${kv}       ;;
985        i386|i486|i586|i686|athlon)     sysname=i386_linux${kv}         ;;
986        *)                              sysname=%{_arch}_linux${kv}     ;;
987 esac
988
989 # Build install tree
990 %if %{build_userspace}
991 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
992 mkdir -p $RPM_BUILD_ROOT%{_libdir}
993 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
994 mkdir -p $RPM_BUILD_ROOT%{initdir}
995 mkdir -p $RPM_BUILD_ROOT/etc/openafs
996 mkdir -p $RPM_BUILD_ROOT%{pamdir}
997 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
998 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
999 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1000 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1001 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1002 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1003
1004 # Copy files from dest to the appropriate places in BuildRoot
1005 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1006 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1007 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1008 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1009 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1010
1011 # Set the executable bit on libraries in libdir, so rpmbuild knows to 
1012 # create "Provides" entries in the package metadata for the libraries
1013 chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
1014
1015 # Fix the location of restorevol, since it should be available for
1016 # any user in /usr/bin
1017 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1018
1019 # Link kpasswd to kapasswd
1020 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1021
1022 # Copy root.client config files
1023 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1024 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1025 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1026
1027 # Copy PAM modules
1028 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1029
1030 # PAM symlinks
1031 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1032 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1033
1034 # Populate /usr/vice/etc
1035 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1036 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1037 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1038 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1039
1040 #
1041 # install dkms source
1042 #
1043 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1044 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1045
1046 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1047
1048 PACKAGE_VERSION="%{dkms_version}"
1049
1050 # Items below here should not have to change with each driver version
1051 PACKAGE_NAME="%{name}"
1052 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"
1053 CLEAN="make -C src/libafs clean"
1054
1055 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1056 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1057 STRIP[0]=no
1058 AUTOINSTALL=yes
1059
1060 EOF
1061
1062 #
1063 # install kernel-source
1064 #
1065
1066 # Install the kernel module source tree
1067 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1068 tar cf - -C libafs_tree . | \
1069         tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1070
1071 # Next, copy the LICENSE Files, README
1072 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1073 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1074 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1075
1076 #
1077 # Install DOCUMENTATION
1078 #
1079
1080 # Build the DOC directory
1081 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1082 tar cf - -C doc LICENSE html pdf | \
1083     tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1084 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1085 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1086
1087 #
1088 # man pages
1089 #
1090 tar cf - -C doc/man-pages man1 man5 man8 | \
1091     tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1092
1093 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1094 %if %{krb5support}
1095 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1096 %else
1097 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1098 %endif
1099
1100 # remove unused man pages
1101 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1102     dkload knfs package runntp symlink symlink_list symlink_make \
1103     symlink_remove; do
1104         rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1105 done
1106
1107 # rename kpasswd to kapasswd
1108 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1109
1110 # gzip man pages
1111 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1112
1113 # create list of man pages that go in the 'openafs' package
1114 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1115         |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|udebug|unlog|^uss|^vos' \
1116         |egrep -v '^afs_compile_et' \
1117         >openafs-man1files
1118
1119 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1120         |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1121         >openafs-man5files
1122
1123 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1124         |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1125         >openafs-man8files
1126
1127 #
1128 # create filelist
1129 #
1130 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1131 %{_bindir}/afsmonitor
1132 %{_bindir}/bos
1133 %{_bindir}/fs
1134 %{_bindir}/kapasswd
1135 %{_bindir}/klog
1136 %{_bindir}/klog.krb
1137 %{_bindir}/pagsh
1138 %{_bindir}/pagsh.krb
1139 %{_bindir}/pts
1140 %{_bindir}/restorevol
1141 %{_bindir}/scout
1142 %{_bindir}/sys
1143 %{_bindir}/tokens
1144 %{_bindir}/tokens.krb
1145 %{_bindir}/translate_et
1146 %{_bindir}/udebug
1147 %{_bindir}/unlog
1148 %{_sbindir}/backup
1149 %{_sbindir}/butc
1150 %{_sbindir}/fms
1151 %{_sbindir}/fstrace
1152 %{_sbindir}/kas
1153 %{_sbindir}/read_tape
1154 %{_sbindir}/rxdebug
1155 %{_sbindir}/uss
1156 %{_sbindir}/vos
1157 %{_sbindir}/vsys
1158 EOF-openafs-file-list
1159
1160 # add man pages to the list
1161 cat openafs-man1files \
1162         | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1163         >>openafs-file-list
1164 cat openafs-man5files \
1165         | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1166         >>openafs-file-list
1167 cat openafs-man8files \
1168         | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1169         >>openafs-file-list
1170
1171 #
1172 # Install compatiblity links
1173 #
1174 for d in bin:bin etc:sbin; do
1175   olddir=`echo $d | sed 's/:.*$//'`
1176   newdir=`echo $d | sed 's/^.*://'`
1177   mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1178   for f in `cat openafs-file-list`; do
1179     if echo $f | grep -q /$newdir/; then
1180       fb=`basename $f`
1181       ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1182     fi
1183   done
1184 done
1185
1186 #
1187 # Remove files we're not installing
1188 #
1189
1190 # remove duplicated files from /usr/afs/bin
1191 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1192   rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1193 done
1194
1195 # the rest are not needed.
1196 for f in dlog dpass install knfs livesys xstat_cm_test xstat_fs_test ; do
1197   rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1198 done
1199
1200 # not supported on Linux or duplicated
1201 for f in kdb rmtsysd kpwvalid ; do
1202   rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1203 done
1204 # sometimes install sucks and puts down a directory. kill it all.
1205 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1206
1207 # remove man pages from programs deleted above
1208 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
1209   rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1210 done
1211
1212 # PAM modules are doubly-installed  Remove the version we don't need
1213 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1214   rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1215 done
1216
1217 %if !%{build_authlibs}
1218 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1219 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1220 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1221 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1222 %endif
1223
1224 %endif
1225
1226 %if %{build_modules}
1227 %if %{fedorakmod}
1228 for kvariant in %{kvariants}
1229 do
1230   if [ -n "$kvariant" ] ; then
1231     if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1232       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1233       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1234     else
1235       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1236       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1237     fi
1238   else
1239     if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1240       srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1241       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1242     else
1243       srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1244       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1245     fi
1246   fi
1247
1248   mkdir -p ${dstdir}
1249   install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1250 done
1251 %else
1252 # Install the kernel modules
1253 for variation in %{kvariations}
1254 do
1255     if [ ${variation} = up ]
1256     then
1257        kvar=%{kxmoddir}
1258        modname=openafs${kmodend}
1259     else
1260        kvar=%{kxmoddir}${variation}
1261        modname=openafs${kmodend}
1262     fi
1263
1264     srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1265     dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1266
1267     mkdir -p ${dstdir}
1268
1269     install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1270 done
1271 %endif
1272 %endif
1273
1274 ##############################################################################
1275 ###
1276 ### clean
1277 ###
1278 ##############################################################################
1279 %clean
1280 rm -f openafs-file-list
1281 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1282         rm -fr $RPM_BUILD_ROOT
1283
1284
1285 ##############################################################################
1286 ###
1287 ### scripts
1288 ###
1289 ##############################################################################
1290 %if %{build_userspace}
1291
1292 %pre compat
1293 if [ -e %{_prefix}/afsws ]; then
1294         /bin/rm -fr %{_prefix}/afsws
1295 fi
1296
1297 %post client
1298 chkconfig --add openafs-client
1299 if [ ! -d /afs ]; then
1300         mkdir /afs
1301         chown root.root /afs
1302         chmod 0755 /afs
1303         [ -x /sbin/restorecon ] && /sbin/restorecon /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 %{_libdir}/libafshcrypto.so.*
1428 %{_libdir}/librokenafs.so.*
1429
1430 %files docs
1431 %defattr(-,root,root)
1432 %docdir %{_docdir}/openafs-%{afsvers}
1433 %dir %{_docdir}/openafs-%{afsvers}
1434 %{_docdir}/openafs-%{afsvers}/ChangeLog
1435 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1436 %{_docdir}/openafs-%{afsvers}/pdf
1437
1438 %files client
1439 %defattr(-,root,root)
1440 %dir %{_prefix}/vice
1441 %dir %{_prefix}/vice/cache
1442 %dir %{_prefix}/vice/etc
1443 %dir %{_prefix}/vice/etc/C
1444 %{_prefix}/vice/etc/CellServDB.dist
1445 %config %{_prefix}/vice/etc/ThisCell
1446 %config %{_prefix}/vice/etc/cacheinfo
1447 %{_bindir}/afsio
1448 %{_bindir}/cmdebug
1449 %{_bindir}/up
1450 %{_prefix}/vice/etc/afsd
1451 %{_prefix}/vice/etc/C/afszcm.cat
1452 %{pamdir}/pam_afs.krb.so.1
1453 %{pamdir}/pam_afs.krb.so
1454 %{pamdir}/pam_afs.so.1
1455 %{pamdir}/pam_afs.so
1456 %{initdir}/openafs-client
1457 %{_mandir}/man1/cmdebug.*
1458 %{_mandir}/man1/copyauth.*
1459 %{_mandir}/man1/up.*
1460 %{_mandir}/man5/afs.5.gz
1461 %{_mandir}/man5/afs_cache.5.gz
1462 %{_mandir}/man5/afs_volume_header.5.gz
1463 %{_mandir}/man5/afszcm.cat.5.gz
1464 %{_mandir}/man5/cacheinfo.*
1465 %{_mandir}/man8/afsd.*
1466 %{_mandir}/man8/rmtsysd.*
1467 %{_mandir}/man8/vsys.*
1468 %{_mandir}/man5/CellAlias.*
1469
1470 %files server
1471 %defattr(-,root,root)
1472 %dir %{_prefix}/afs
1473 %dir %{_prefix}/afs/bin
1474 %dir %{_prefix}/afs/etc
1475 %dir %{_prefix}/afs/logs
1476 %{_prefix}/afs/bin/bosserver
1477 %{_prefix}/afs/bin/bos_util
1478 %{_prefix}/afs/bin/buserver
1479 %{_prefix}/afs/bin/dafileserver
1480 %{_prefix}/afs/bin/dafssync-debug
1481 %{_prefix}/afs/bin/dasalvager
1482 %{_prefix}/afs/bin/davolserver
1483 %{_prefix}/afs/bin/fileserver
1484 %{_prefix}/afs/bin/fssync-debug
1485 # Should we support KAServer?
1486 %{_prefix}/afs/bin/kaserver
1487 %{_prefix}/afs/bin/ka-forwarder
1488 %{_prefix}/afs/bin/pt_util
1489 %{_prefix}/afs/bin/ptserver
1490 %{_prefix}/afs/bin/salvager
1491 %{_prefix}/afs/bin/salvageserver
1492 %{_prefix}/afs/bin/salvsync-debug
1493 %{_prefix}/afs/bin/state_analyzer
1494 %{_prefix}/afs/bin/upclient
1495 %{_prefix}/afs/bin/upserver
1496 %{_prefix}/afs/bin/vlserver
1497 %{_prefix}/afs/bin/volinfo
1498 %{_prefix}/afs/bin/volserver
1499 %{_sbindir}/kadb_check
1500 %{_sbindir}/prdb_check
1501 %{_sbindir}/vldb_check
1502 %{_sbindir}/vldb_convert
1503 %{_sbindir}/voldump
1504 %{initdir}/openafs-server
1505 %{_mandir}/man5/AuthLog.*
1506 %{_mandir}/man5/BackupLog.*
1507 %{_mandir}/man5/BosConfig.*
1508 %{_mandir}/man5/BosLog.*
1509 %{_mandir}/man5/FORCESALVAGE.*
1510 %{_mandir}/man5/FileLog.*
1511 %{_mandir}/man5/KeyFile.*
1512 %{_mandir}/man5/NetInfo.*
1513 %{_mandir}/man5/NetRestrict.*
1514 %{_mandir}/man5/NoAuth.*
1515 %{_mandir}/man5/SALVAGE.fs.*
1516 %{_mandir}/man5/SalvageLog.*
1517 %{_mandir}/man5/sysid.*
1518 %{_mandir}/man5/UserList.*
1519 %{_mandir}/man5/VLLog.*
1520 %{_mandir}/man5/VolserLog.*
1521 %{_mandir}/man5/bdb.DB0.*
1522 %{_mandir}/man5/fms.log.*
1523 %{_mandir}/man5/kaserver.DB0.*
1524 %{_mandir}/man5/kaserverauxdb.*
1525 %{_mandir}/man5/krb.conf.*
1526 %{_mandir}/man5/krb.excl.*
1527 %{_mandir}/man5/prdb.DB0.*
1528 %{_mandir}/man5/salvage.lock.*
1529 %{_mandir}/man5/tapeconfig.*
1530 %{_mandir}/man5/vldb.DB0.*
1531 %{_mandir}/man8/buserver.*
1532 %{_mandir}/man8/fileserver.*
1533 %{_mandir}/man8/dafileserver.*
1534 %{_mandir}/man8/dasalvager.*
1535 %{_mandir}/man8/davolserver.*
1536 %{_mandir}/man8/kadb_check.*
1537 %{_mandir}/man8/ka-forwarder.*
1538 %{_mandir}/man8/prdb_check.*
1539 %{_mandir}/man8/ptserver.*
1540 %{_mandir}/man8/pt_util.*
1541 %{_mandir}/man8/salvager.*
1542 %{_mandir}/man8/salvageserver.*
1543 %{_mandir}/man8/state_analyzer.*
1544 %{_mandir}/man8/upclient.*
1545 %{_mandir}/man8/upserver.*
1546 %{_mandir}/man8/vldb_check.*
1547 %{_mandir}/man8/vldb_convert.*
1548 %{_mandir}/man8/vlserver.*
1549 %{_mandir}/man8/voldump.*
1550 %{_mandir}/man8/volinfo.*
1551 %{_mandir}/man8/volserver.*
1552
1553 %if %{build_authlibs}
1554 %files authlibs
1555 %defattr(-,root,root)
1556 %{_libdir}/libafsauthent.so.*
1557 %{_libdir}/libafsrpc.so.*
1558 %{_libdir}/libkopenafs.so.*
1559 %endif
1560
1561 %files authlibs-devel
1562 %defattr(-,root,root)
1563 %{_includedir}/kopenafs.h
1564 %{_libdir}/libafsauthent.a
1565 %{_libdir}/libafscp.a
1566 %{_libdir}/libafsrpc.a
1567 %{_libdir}/libafsauthent_pic.a
1568 %{_libdir}/libafsrpc_pic.a
1569 %{_libdir}/libkopenafs.a
1570 %if %{build_authlibs}
1571 %{_libdir}/libafsauthent.so
1572 %{_libdir}/libafsrpc.so
1573 %{_libdir}/libkopenafs.so
1574 %endif
1575
1576 %files devel
1577 %defattr(-,root,root)
1578 %{_bindir}/afs_compile_et
1579 %{_bindir}/rxgen
1580 %{_includedir}/afs
1581 %{_includedir}/lock.h
1582 %{_includedir}/lwp.h
1583 %{_includedir}/preempt.h
1584 %{_includedir}/rx
1585 %{_includedir}/timer.h
1586 %{_includedir}/ubik.h
1587 %{_includedir}/ubik_int.h
1588 %{_libdir}/afs
1589 %{_libdir}/libafshcrypto.a
1590 %{_libdir}/libafshcrypto.so
1591 %{_libdir}/liblwp.a
1592 %{_libdir}/librokenafs.a
1593 %{_libdir}/librokenafs.so
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.