redhat: do not overwite the server CellServDB
[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   if [ -h CellServDB ]; then \
1372     rm -f CellServDB; \
1373   fi; \
1374   cat CellServDB.local CellServDB.dist > CellServDB ; \
1375   chmod 644 CellServDB )
1376
1377 %post server
1378 #on an upgrade, don't enable if we were disabled
1379 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1380 if [ $1 = 1 ] ; then
1381   chkconfig --add openafs-server
1382 fi
1383 %{initdir}/openafs-server condrestart
1384 %else
1385 if [ $1 -eq 1 ] ; then 
1386     # Initial installation 
1387     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1388 fi
1389 %endif
1390
1391 %if %{build_authlibs}
1392 %post authlibs
1393 /sbin/ldconfig
1394
1395 %postun authlibs
1396 /sbin/ldconfig
1397 %endif
1398
1399 %preun
1400 if [ $1 = 0 ] ; then
1401         [ -d /afs ] && rmdir /afs
1402         :
1403 fi
1404
1405 %preun client
1406 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1407 if [ $1 = 0 ] ; then
1408         %{initdir}/openafs-client stop
1409         chkconfig --del openafs-client
1410 fi
1411 %else
1412 if [ $1 -eq 0 ] ; then
1413         # Package removal, not upgrade
1414         /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || :
1415         /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || :
1416 fi
1417 %endif
1418
1419 %preun server
1420 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1421 if [ $1 = 0 ] ; then
1422         %{initdir}/openafs-server stop
1423         chkconfig --del openafs-server
1424 fi
1425 %else
1426 if [ $1 -eq 0 ] ; then
1427         /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || :
1428         /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || :
1429 fi
1430 %endif
1431
1432 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
1433 %postun client
1434 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1435
1436 %postun server
1437 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1438 %endif
1439
1440 %if %{build_dkmspkg}
1441 %post -n dkms-%{name}
1442 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1443 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1444 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1445
1446 %preun -n dkms-%{name}
1447 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1448 %endif
1449 %endif
1450
1451 %if %{build_modules}
1452 %if !%{fedorakmod}
1453 %if %{up_package}
1454 %post kernel
1455 %{depmod} -ae %{kernvers}
1456
1457 %postun kernel
1458 %{depmod} -ae %{kernvers}
1459
1460 %endif
1461
1462 %if %{smp_package}
1463 %post kernel-smp
1464 %{depmod} -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1465
1466 %postun kernel-smp
1467 %{depmod} -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1468 %endif
1469
1470 %if %{largesmp_package}
1471 %post kernel-largesmp
1472 %{depmod} -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1473
1474 %postun kernel-largesmp
1475 %{depmod} -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1476 %endif
1477  
1478 %if %{bigmem_package}
1479 %post kernel-bigmem
1480 %{depmod} -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1481
1482 %postun kernel-bigmem
1483 %{depmod} -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1484 %endif
1485
1486 %if %{hugemem_package}
1487 %post kernel-hugemem
1488 %{depmod} -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1489
1490 %postun kernel-hugemem
1491 %{depmod} -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1492 %endif
1493 %endif
1494 %endif
1495
1496 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
1497 %triggerun -- openafs-client < 1.6.0-1
1498 # Save the current service runlevel info
1499 # User must manually run systemd-sysv-convert --apply httpd
1500 # to migrate them to systemd targets
1501 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||:
1502
1503 # Run this because the SysV package being removed won't do it
1504 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || :
1505
1506 %triggerun -- openafs-server < 1.6.0-1
1507 # Save the current service runlevel info
1508 # User must manually run systemd-sysv-convert --apply httpd
1509 # to migrate them to systemd targets
1510 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||:
1511
1512 # Run this because the SysV package being removed won't do it
1513 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || :
1514 %endif
1515
1516 ##############################################################################
1517 ###
1518 ### file lists
1519 ###
1520 ##############################################################################
1521 %if %{build_userspace}
1522
1523 %files -f openafs-file-list
1524 %defattr(-,root,root)
1525 %config(noreplace) /etc/sysconfig/openafs
1526 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1527 %{_libdir}/libafshcrypto.so.*
1528 %{_libdir}/librokenafs.so.*
1529
1530 %files docs
1531 %defattr(-,root,root)
1532 %docdir %{_docdir}/openafs-%{afsvers}
1533 %dir %{_docdir}/openafs-%{afsvers}
1534 %{_docdir}/openafs-%{afsvers}/ChangeLog
1535 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1536 %{_docdir}/openafs-%{afsvers}/pdf
1537
1538 %files client
1539 %defattr(-,root,root)
1540 %dir %{_prefix}/vice
1541 %dir %{_prefix}/vice/cache
1542 %dir %{_prefix}/vice/etc
1543 %dir %{_prefix}/vice/etc/C
1544 %{_prefix}/vice/etc/CellServDB.dist
1545 %config(noreplace) %{_prefix}/vice/etc/ThisCell
1546 %config(noreplace) %{_prefix}/vice/etc/cacheinfo
1547 %{_bindir}/afsio
1548 %{_bindir}/cmdebug
1549 %{_bindir}/up
1550 %{_prefix}/vice/etc/afsd
1551 %{_prefix}/vice/etc/C/afszcm.cat
1552 %{pamdir}/pam_afs.krb.so.1
1553 %{pamdir}/pam_afs.krb.so
1554 %{pamdir}/pam_afs.so.1
1555 %{pamdir}/pam_afs.so
1556 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1557 %{initdir}/openafs-client
1558 %else
1559 %{_unitdir}/openafs-client.service
1560 %{_sysconfdir}/sysconfig/modules/openafs-client.modules
1561 %endif
1562 %{_mandir}/man1/cmdebug.*
1563 %{_mandir}/man1/up.*
1564 %{_mandir}/man5/afs.5.gz
1565 %{_mandir}/man5/afs_cache.5.gz
1566 %{_mandir}/man5/afs_volume_header.5.gz
1567 %{_mandir}/man5/afszcm.cat.5.gz
1568 %{_mandir}/man5/cacheinfo.*
1569 %{_mandir}/man8/afsd.*
1570 %{_mandir}/man8/vsys.*
1571 %{_mandir}/man5/CellAlias.*
1572
1573 %files server
1574 %defattr(-,root,root)
1575 %dir %{_prefix}/afs
1576 %dir %{_prefix}/afs/bin
1577 %dir %{_prefix}/afs/etc
1578 %dir %{_prefix}/afs/logs
1579 %{_prefix}/afs/bin/bosserver
1580 %{_prefix}/afs/bin/bos_util
1581 %{_prefix}/afs/bin/buserver
1582 %{_prefix}/afs/bin/dafileserver
1583 %{_prefix}/afs/bin/dafssync-debug
1584 %{_prefix}/afs/bin/dasalvager
1585 %{_prefix}/afs/bin/davolserver
1586 %{_prefix}/afs/bin/fileserver
1587 %{_prefix}/afs/bin/fssync-debug
1588 # Should we support KAServer?
1589 %{_prefix}/afs/bin/kaserver
1590 %{_prefix}/afs/bin/ka-forwarder
1591 %{_prefix}/afs/bin/pt_util
1592 %{_prefix}/afs/bin/ptserver
1593 %{_prefix}/afs/bin/salvager
1594 %{_prefix}/afs/bin/salvageserver
1595 %{_prefix}/afs/bin/salvsync-debug
1596 %{_prefix}/afs/bin/state_analyzer
1597 %{_prefix}/afs/bin/upclient
1598 %{_prefix}/afs/bin/upserver
1599 %{_prefix}/afs/bin/vlserver
1600 %{_prefix}/afs/bin/volinfo
1601 %{_prefix}/afs/bin/volscan
1602 %{_prefix}/afs/bin/volserver
1603 %{_sbindir}/kadb_check
1604 %{_sbindir}/prdb_check
1605 %{_sbindir}/vldb_check
1606 %{_sbindir}/vldb_convert
1607 %{_sbindir}/voldump
1608 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1609 %{initdir}/openafs-server
1610 %else
1611 %{_unitdir}/openafs-server.service
1612 %endif
1613 %{_mandir}/man5/AuthLog.*
1614 %{_mandir}/man5/BackupLog.*
1615 %{_mandir}/man5/BosConfig.*
1616 %{_mandir}/man5/BosLog.*
1617 %{_mandir}/man5/FORCESALVAGE.*
1618 %{_mandir}/man5/FileLog.*
1619 %{_mandir}/man5/KeyFile.*
1620 %{_mandir}/man5/NetInfo.*
1621 %{_mandir}/man5/NetRestrict.*
1622 %{_mandir}/man5/NoAuth.*
1623 %{_mandir}/man5/SALVAGE.fs.*
1624 %{_mandir}/man5/SalvageLog.*
1625 %{_mandir}/man5/sysid.*
1626 %{_mandir}/man5/UserList.*
1627 %{_mandir}/man5/VLLog.*
1628 %{_mandir}/man5/VolserLog.*
1629 %{_mandir}/man5/bdb.DB0.*
1630 %{_mandir}/man5/fms.log.*
1631 %{_mandir}/man5/kaserver.DB0.*
1632 %{_mandir}/man5/kaserverauxdb.*
1633 %{_mandir}/man5/krb.conf.*
1634 %{_mandir}/man5/krb.excl.*
1635 %{_mandir}/man5/prdb.DB0.*
1636 %{_mandir}/man5/salvage.lock.*
1637 %{_mandir}/man5/tapeconfig.*
1638 %{_mandir}/man5/vldb.DB0.*
1639 %{_mandir}/man8/buserver.*
1640 %{_mandir}/man8/fileserver.*
1641 %{_mandir}/man8/dafileserver.*
1642 %{_mandir}/man8/dasalvager.*
1643 %{_mandir}/man8/davolserver.*
1644 %{_mandir}/man8/kadb_check.*
1645 %{_mandir}/man8/ka-forwarder.*
1646 %{_mandir}/man8/prdb_check.*
1647 %{_mandir}/man8/ptserver.*
1648 %{_mandir}/man8/pt_util.*
1649 %{_mandir}/man8/salvager.*
1650 %{_mandir}/man8/salvageserver.*
1651 %{_mandir}/man8/state_analyzer.*
1652 %{_mandir}/man8/upclient.*
1653 %{_mandir}/man8/upserver.*
1654 %{_mandir}/man8/vldb_check.*
1655 %{_mandir}/man8/vldb_convert.*
1656 %{_mandir}/man8/vlserver.*
1657 %{_mandir}/man8/voldump.*
1658 %{_mandir}/man8/volinfo.*
1659 %{_mandir}/man8/volscan.*
1660 %{_mandir}/man8/volserver.*
1661
1662 %if %{build_authlibs}
1663 %files authlibs
1664 %defattr(-,root,root)
1665 %{_libdir}/libafsauthent.so.*
1666 %{_libdir}/libafsrpc.so.*
1667 %{_libdir}/libkopenafs.so.*
1668 %endif
1669
1670 %files authlibs-devel
1671 %defattr(-,root,root)
1672 %{_includedir}/kopenafs.h
1673 %{_libdir}/libafsauthent.a
1674 %{_libdir}/libafscp.a
1675 %{_libdir}/libafsrpc.a
1676 %{_libdir}/libafsauthent_pic.a
1677 %{_libdir}/libafsrpc_pic.a
1678 %{_libdir}/libkopenafs.a
1679 %if %{build_authlibs}
1680 %{_libdir}/libafsauthent.so
1681 %{_libdir}/libafsrpc.so
1682 %{_libdir}/libkopenafs.so
1683 %endif
1684
1685 %files devel
1686 %defattr(-,root,root)
1687 %{_bindir}/afs_compile_et
1688 %{_bindir}/rxgen
1689 %{_includedir}/afs
1690 %{_includedir}/lock.h
1691 %{_includedir}/lwp.h
1692 %{_includedir}/preempt.h
1693 %{_includedir}/rx
1694 %{_includedir}/timer.h
1695 %{_includedir}/ubik.h
1696 %{_includedir}/ubik_int.h
1697 %{_libdir}/afs
1698 %{_libdir}/libafshcrypto.a
1699 %{_libdir}/libafshcrypto.so
1700 %{_libdir}/liblwp.a
1701 %{_libdir}/libopr.a
1702 %{_libdir}/librokenafs.a
1703 %{_libdir}/librokenafs.so
1704 %{_libdir}/librx.a
1705 %{_libdir}/librxkad.a
1706 %{_libdir}/librxstat.a
1707 %{_libdir}/libubik.a
1708 %{_libdir}/libubik_pthread.a
1709 %{_mandir}/man1/rxgen.*
1710 %{_mandir}/man1/afs_compile_et.*
1711
1712 %if %{build_dkmspkg}
1713 %files -n dkms-%{name}
1714 %defattr(-,root,root)
1715 %{_prefix}/src/%{name}-%{dkms_version}
1716 %endif
1717
1718 %files kernel-source
1719 %defattr(-,root,root)
1720 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1721 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1722 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1723 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1724
1725 %files compat
1726 %defattr(-,root,root)
1727 %{_prefix}/afsws
1728
1729 %files kpasswd
1730 %defattr(-,root,root)
1731 %{_bindir}/kapasswd
1732 %{_bindir}/kpwvalid
1733 %{_mandir}/man1/kapasswd.*
1734 %{_mandir}/man8/kpwvalid.*
1735
1736 %if %{krb5support}
1737 %files krb5
1738 %defattr(-,root,root)
1739 %{_bindir}/aklog
1740 %{_bindir}/klog.krb5
1741 %{_sbindir}/asetkey
1742 %{_mandir}/man1/aklog.*
1743 %{_mandir}/man8/asetkey.*
1744 %endif
1745
1746 %endif
1747
1748 %if %{build_modules}
1749
1750 %if !%{fedorakmod}
1751 %if %{up_package}
1752 %files kernel
1753 %defattr(-,root,root)
1754 %{kxmoddir}/fs/openafs/openafs.*
1755 %endif
1756
1757 %if %{smp_package}
1758 %files kernel-smp
1759 %defattr(-,root,root)
1760 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1761 %endif
1762
1763 %if %{largesmp_package}
1764 %files kernel-largesmp
1765 %defattr(-,root,root)
1766 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1767 %endif
1768  
1769 %if %{bigmem_package}
1770 %files kernel-bigmem
1771 %defattr(-,root,root)
1772 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1773 %endif
1774
1775 %if %{hugemem_package}
1776 %files kernel-hugemem
1777 %defattr(-,root,root)
1778 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1779 %endif
1780 %endif
1781
1782 %endif
1783
1784 ##############################################################################
1785 ###
1786 ### openafs.spec change log
1787 ###
1788 ##############################################################################
1789 %changelog
1790 * Wed Dec 12 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1791 - Make the RPM mockable
1792
1793 * Mon Oct 29 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1794 - Update to match the shipped 1.4.5 RPMS
1795 - Fix the kvariant stuff to only configure the 'standard' case once
1796 - Add openafs-kvers.sh back in
1797
1798 * Wed Oct 10 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1799 - Use Fedora style kmods, which allows us to install multiple kernel types
1800
1801 * Thu Jun 07 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1802 - Use distributed files, rather than those in packager's SOURCE directory
1803 - Remove SuidCells stuff, which was unused
1804
1805 * Fri Dec 01 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-2
1806 - integrate s390x changes
1807 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1808   that won't build the .so files.
1809
1810 * Wed Aug 23 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-1
1811 - update to 1.4.2
1812 - use installed aklog manpage.
1813 - moduleparam patch obsoleted.
1814
1815 * Tue Aug 22 2006  Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1816 - update to 1.4.2-rc1
1817 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1818   (but only add support for 2.6 kernels.  No need for the 2.4 kernels).
1819 - don't need the posixlock patch anymore.
1820
1821 * Wed Jul 12 2006  Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1822 - update to 1.4.2-beta2
1823 - add linux2.4 posixlock API patch
1824
1825 * Mon Jun 26 2006  Derek Atkins <warlord@MIT.EDU>
1826 - moduleparam and krb524 patches no longer required in OA-CVS
1827
1828 * Wed May 17 2006  Derek Atkins <warlord@MIT.EDU>
1829 - change non-target-cpu kernel dep to a file dep
1830 - make sure we use the proper kernel version for the dependency.
1831
1832 * Tue May 16 2006  Derek Atkins <warlord@MIT.EDU>
1833 - allow users to specify local CellServDB and SuidCells entries
1834   don't overwrite user's changes.  Provide a .dist an let users
1835   make entries in a ".local"
1836 - build the CellServDB and SuidCells at client startup and at
1837   client install-time
1838 - add provideskernelarch functionality to openafs-kvers-is.sh
1839 - use that functionality to Require kernel{,-<type>}-targetcpu
1840   to get better package safety due to RPM bugs where the kernel
1841   release isn't used so you can install the kernel module against
1842   any kernel of the same major version.
1843
1844 * Mon May 15 2006  Derek Atkins <warlord@MIT.EDU>
1845 - update the README in openafs-kernel-source
1846 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1847 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1848
1849 * Fri Apr 21 2006  Derek Atkins <warlord@MIT.EDU>
1850 - build requires autoconf and automake for krb5support
1851   and autoconf for standard package
1852 - dont setup the krb5 migration kit (or patches) if we don't care.
1853 - require ncurses-devel to build
1854
1855 * Wed Apr 19 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1856 - look for krb524 functions in libkrb524 if we can't find them
1857   in the standard locations.
1858
1859 * Tue Apr 18 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1860 - fix the module_param_array macro for Linux 2.6.9.
1861
1862 * Sat Apr 15 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1863 - update to 1.4.1 release.
1864 - distribute asetkey from openafs instead of krb5-migration kit
1865 - don't need to apply the FC5 patches because they are part of the distro.
1866 - install asetkey into the "proper" place
1867 - dont list a manpage twice.
1868 - package asetkey man page.  delete it when not needed.
1869
1870 * Thu Apr  6 2006  Derek Atkins <warlord@MIT.EDU>
1871 - turn authlibs back on, because RT #18767 was applied to CVS.
1872
1873 * Wed Mar 29 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1874 - update to 1.4.1rc10, build on FC5
1875 - fix the man pages (distribute into various packages)
1876 - include patches for FC5, RT #29112 and #29122
1877
1878 * Mon Dec 19 2005  Derek Atkins <warlord@MIT.EDU>
1879 - openafs-server shouldn't depend on the kernel module.
1880
1881 * Thu Nov 17 2005  Derek Atkins <warlord@MIT.EDU>
1882 - patch from Mike Polek <mike at pictage.com> to run depmod for
1883   the target kernel and not the running kernel.
1884
1885 * Tue Nov  8 2005  Derek Atkins <warlord@MIT.EDU>
1886 - build aklog from the openafs sources, not from the krb5 migration kit.
1887
1888 * Fri Nov  4 2005  Derek Atkins <warlord@MIT.EDU>
1889 - set openafs-kernel-source to Provide openafs-kernel
1890
1891 * Thu Oct 20 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1892 - update afs-krb5 res_search patch: look for res_search and __res_search
1893 - update to 1.4.0 final
1894
1895 * Mon Oct 10 2005  Derek Atkins <warlord@MIT.EDU>
1896 - remove all kdump builds.
1897
1898 * Thu Oct  6 2005  Derek Atkins <warlord@MIT.EDU>
1899 - fix openafs-kernel-version.sh so it will build an RPM for the
1900   currently-running kernel even if it's smp on 2.6.
1901
1902 * Tue Sep 27 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1903 - upgrade to 1.4.0rc5
1904 - turn off authlibs packages
1905
1906 * Fri Sep 23 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1907 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1908   it's called "openafs" and not "libafs".  This fixes the shutdown
1909   problem.
1910
1911 * Thu Sep 22 2005  Derek Atkins <warlord@MIT.EDU>
1912 - update kversis script, add 'kvers' operation
1913 - fix bug that 2.6 smp/hugemem kernels don't provide
1914   kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1915 - add patch to remove res_search from the afs-krb5 configure
1916
1917 * Thu Sep 15 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1918 - Update to 1.4.0rc4
1919 - Update the afs-krb5 krb524 patch so it actually works on
1920   some older systems like RHEL3 that still need -lkrb524.
1921 - Update the buildall script so choose better architecture support,
1922   e.g. don't build i586 on RHEL.
1923 - Update the rebuild information in the SPEC file.
1924 - Add support for finding .EL kernels in openafs-kvers-is.sh
1925 - Add additional error messages when kernel version/type parsing fails.
1926 - Update the buildall script to use the kernel srcdir directly.
1927
1928 * Wed Sep 14 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1929 - Add "hugemem" to 2.4 configs
1930 - Add checks to support scripts to determine whether to build
1931   the bigmem and/or hugemem kernels for 2.4.
1932
1933 * Mon Sep 12 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1934 - Added some afs-krb5 patches to get the migration kit to build
1935   on modern AFS and modern Kerberos.
1936 - Added authlibs and authlibs-devel packages as per UMich changes.
1937
1938 * Sun Sep 11 2005  Derek Atkins <warlord@MIT.EDU>
1939 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1940
1941 * Sat Sep 10 2005  Derek Atkins <warlord@MIT.EDU>
1942 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1943   from Red Hat.   Initial attempt at a release of 1.4.  Still need
1944   to work in a 2.6 build system.