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