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