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