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