RedHat: Update configure options, again
[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 %if %{krb5support}
899 %if %{?krb5config:1}%{!?krb5config:0}
900 KRB5_CONFIG="%{krb5config}"
901 export KRB5_CONFIG
902 %endif
903 %endif
904
905 # Configure each of our kernel modules
906
907 %if %{fedorakmod} && %{build_modules}
908 for kvariant in %{kvariants} ; do
909   if [ -n "${kvariant}" ] ; then
910
911     if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
912       ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
913
914     elif [ -d %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant} ] ; then
915       # Fedora 20 started putting kernel sources in e.g.
916       # 3.12.5-302.fc20.i686+PAE, instead of:
917       # 3.12.5-302.fc20.i686.PAE
918       ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant}
919
920     else
921       ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
922     fi
923
924     cp -R libafs_tree _kmod_build_${kvariant}
925     pushd _kmod_build_${kvariant}
926     ./configure --with-afs-sysname=${sysname} \
927         --prefix=%{_prefix} \
928         --libdir=%{_libdir} \
929         --bindir=%{_bindir} \
930         --sbindir=%{_sbindir} \
931         --with-linux-kernel-packaging \
932         --with-linux-kernel-headers=${ksrc} \
933 %if %{krb5support}
934         --with-krb5 \
935 %endif
936         $config_opts \
937         || exit 1
938     popd
939   fi
940 done
941 %endif
942
943 %if %{build_userspace}
944 # Build the user-space AFS stuff
945 make dest_nolibafs || exit 1
946 %endif
947
948 %if %{build_modules}
949 %if %{fedorakmod}
950 for kvariant in %{kvariants}
951 do
952   if [ -n "${kvariant}" ] ; then
953     pushd _kmod_build_$kvariant;
954     make all
955     popd
956   else
957     make dest_only_libafs
958   fi
959 done
960
961 %else
962 # Begin legacy kernel module building code
963
964 %if %{kvers_is_24}
965 # Build all the kernel modules for linux 2.4.x
966 for variation in %{kvariations}
967 do
968     if [ ${variation} = up ]
969     then
970        local_smp_def=-DREDHAT_FIX
971        suffix=
972     else
973        local_smp_def="-DAFS_SMP -DREDHAT_FIX"
974        suffix=${variation}
975     fi
976
977     PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
978     make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
979         LINUX_MODULE_NAME="${suffix}" MPS=SP
980
981 done
982 rm -f src/config/redhat-fix.h
983
984 %elseif %{kvers_is_26}
985 # Build the kernel module for this version of linux 2.6.x
986 # Notice how much easier this is than 2.4.  On the other hand,
987 # we require much more external support to build multiple modules.
988
989   # the MPS=SP just means that we don't add a '.mp' to the name.
990   make dest_only_libafs MPS=SP
991
992 %endif
993 # End legacy kernel module building code
994 %endif
995 %endif
996
997
998 ##############################################################################
999 #
1000 # installation
1001 #
1002 ##############################################################################
1003 %install
1004
1005 export DONT_GPRINTIFY=1
1006
1007 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
1008 %if !%{fedorakmod}
1009 case %{kernvers} in
1010    2.4.*)
1011        kv='24'
1012        kmodend=.o
1013        ;;
1014    2.6.* | 3.*)
1015        kv='26'
1016        kmodend=.ko
1017        ;;
1018    *)
1019        echo "I don't know how to build linux-`expr %{kernvers} : '\(^[0-9]*[.][0-9]*\)'`"
1020        exit 1
1021        ;;
1022 esac
1023 %else
1024 kv='26'
1025 %endif
1026
1027 case %{_arch} in
1028        x86_64)                         sysname=amd64_linux${kv}        ;;
1029        alpha*)                         sysname=alpha_linux_${kv}       ;;
1030        i386|i486|i586|i686|athlon)     sysname=i386_linux${kv}         ;;
1031        *)                              sysname=%{_arch}_linux${kv}     ;;
1032 esac
1033
1034 # Build install tree
1035 %if %{build_userspace}
1036 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
1037 mkdir -p $RPM_BUILD_ROOT%{_libdir}
1038 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
1039 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1040 mkdir -p $RPM_BUILD_ROOT%{initdir}
1041 %else
1042 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
1043 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
1044 %endif
1045 mkdir -p $RPM_BUILD_ROOT/etc/openafs
1046 mkdir -p $RPM_BUILD_ROOT%{pamdir}
1047 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
1048 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
1049 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1050 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1051 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1052 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1053
1054 # Copy files from dest to the appropriate places in BuildRoot
1055 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1056 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1057 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1058 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1059 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1060
1061 # Set the executable bit on libraries in libdir, so rpmbuild knows to 
1062 # create "Provides" entries in the package metadata for the libraries
1063 chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
1064
1065 # Fix the location of restorevol, since it should be available for
1066 # any user in /usr/bin
1067 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1068
1069 # Rename kpasswd to kapasswd
1070 mv -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1071
1072 # Copy root.client config files
1073 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1074 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1075 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1076 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1077 %else
1078 install -m 755 src/packaging/RedHat/openafs-client.service $RPM_BUILD_ROOT%{_unitdir}/openafs-client.service
1079 install -m 755 src/packaging/RedHat/openafs-client.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/openafs-client.modules
1080 install -m 755 src/packaging/RedHat/openafs-server.service $RPM_BUILD_ROOT%{_unitdir}/openafs-server.service
1081 %endif
1082
1083 # Copy PAM modules
1084 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1085
1086 # PAM symlinks
1087 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1088 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1089
1090 # Populate /usr/vice/etc
1091 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1092 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1093 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1094 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1095
1096 #
1097 # install dkms source
1098 #
1099 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1100 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1101
1102 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<"EOF"
1103
1104 PACKAGE_VERSION="%{dkms_version}"
1105
1106 # Items below here should not have to change with each driver version
1107 PACKAGE_NAME="%{name}"
1108 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'
1109 CLEAN="make -C src/libafs clean"
1110
1111 BUILT_MODULE_NAME[0]="$PACKAGE_NAME"
1112 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/$PACKAGE_NAME/"
1113 STRIP[0]=no
1114 AUTOINSTALL=yes
1115
1116 EOF
1117
1118 #
1119 # install kernel-source
1120 #
1121
1122 # Install the kernel module source tree
1123 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1124 tar cf - -C libafs_tree . | \
1125         tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1126
1127 # Next, copy the LICENSE Files, README
1128 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1129 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1130 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1131
1132 #
1133 # Install DOCUMENTATION
1134 #
1135
1136 # Build the DOC directory
1137 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1138 tar cf - -C doc LICENSE html pdf | \
1139     tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1140 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1141 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1142
1143 #
1144 # man pages
1145 #
1146 tar cf - -C doc/man-pages man1 man5 man8 | \
1147     tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1148
1149 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1150 %if %{krb5support}
1151 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1152 %else
1153 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1154 %endif
1155
1156 # remove unused man pages
1157 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1158     dkload knfs package runntp symlink symlink_list symlink_make \
1159     symlink_remove; do
1160         rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1161 done
1162
1163 # rename kpasswd to kapasswd
1164 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1165
1166 # gzip man pages
1167 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1168
1169 # create list of man pages that go in the 'openafs' package
1170 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1171         |egrep '^afs|^fs|^kas|^klog|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|^xstat|udebug|unlog|^uss|^vos' \
1172         |egrep -v '^afs_compile_et' \
1173         >openafs-man1files
1174
1175 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1176         |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1177         >openafs-man5files
1178
1179 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1180         |egrep '^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1181         >openafs-man8files
1182
1183 #
1184 # create filelist
1185 #
1186 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1187 %{_bindir}/afsmonitor
1188 %{_bindir}/bos
1189 %{_bindir}/fs
1190 %{_bindir}/klog
1191 %{_bindir}/klog.krb
1192 %{_bindir}/pagsh
1193 %{_bindir}/pagsh.krb
1194 %{_bindir}/pts
1195 %{_bindir}/restorevol
1196 %{_bindir}/scout
1197 %{_bindir}/sys
1198 %{_bindir}/tokens
1199 %{_bindir}/tokens.krb
1200 %{_bindir}/translate_et
1201 %{_bindir}/xstat_cm_test
1202 %{_bindir}/xstat_fs_test
1203 %{_bindir}/udebug
1204 %{_bindir}/unlog
1205 %{_sbindir}/backup
1206 %{_sbindir}/butc
1207 %{_sbindir}/fms
1208 %{_sbindir}/fstrace
1209 %{_sbindir}/kas
1210 %{_sbindir}/read_tape
1211 %{_sbindir}/rxdebug
1212 %{_sbindir}/uss
1213 %{_sbindir}/vos
1214 %{_sbindir}/vsys
1215 EOF-openafs-file-list
1216
1217 # add man pages to the list
1218 cat openafs-man1files \
1219         | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1220         >>openafs-file-list
1221 cat openafs-man5files \
1222         | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1223         >>openafs-file-list
1224 cat openafs-man8files \
1225         | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1226         >>openafs-file-list
1227
1228 #
1229 # Install compatiblity links
1230 #
1231 for d in bin:bin etc:sbin; do
1232   olddir=`echo $d | sed 's/:.*$//'`
1233   newdir=`echo $d | sed 's/^.*://'`
1234   mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1235   for f in `cat openafs-file-list`; do
1236     if echo $f | grep -q /$newdir/; then
1237       fb=`basename $f`
1238       ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1239     fi
1240   done
1241 done
1242
1243 #
1244 # Remove files we're not installing
1245 #
1246
1247 # remove duplicated files from /usr/afs/bin
1248 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1249   rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1250 done
1251
1252 # the rest are not needed.
1253 for f in dlog dpass install knfs livesys ; do
1254   rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1255 done
1256
1257 # not supported on Linux or duplicated
1258 for f in kdb rmtsysd kpwvalid ; do
1259   rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1260 done
1261 # sometimes install sucks and puts down a directory. kill it all.
1262 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1263
1264 # remove man pages from programs deleted above
1265 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
1266   rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1267 done
1268
1269 # PAM modules are doubly-installed  Remove the version we don't need
1270 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1271   rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1272 done
1273
1274 %if !%{build_authlibs}
1275 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1276 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1277 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1278 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1279 %endif
1280
1281 %endif
1282
1283 %if %{build_modules}
1284 %if %{fedorakmod}
1285 for kvariant in %{kvariants}
1286 do
1287   if [ -n "$kvariant" ] ; then
1288     if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1289       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1290       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1291     elif [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}+${kvariant}-SP ] ; then
1292       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}+${kvariant}-SP
1293       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}+${kvariant}/extra/openafs
1294     else
1295       srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1296       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1297     fi
1298   else
1299     if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1300       srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1301       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1302     else
1303       srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1304       dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1305     fi
1306   fi
1307
1308   mkdir -p ${dstdir}
1309   install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1310 done
1311 %else
1312 # Install the kernel modules
1313 for variation in %{kvariations}
1314 do
1315     if [ ${variation} = up ]
1316     then
1317        kvar=%{kxmoddir}
1318        modname=openafs${kmodend}
1319     else
1320        kvar=%{kxmoddir}${variation}
1321        modname=openafs${kmodend}
1322     fi
1323
1324     srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1325     dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1326
1327     mkdir -p ${dstdir}
1328
1329     install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1330 done
1331 %endif
1332 %endif
1333
1334 ##############################################################################
1335 ###
1336 ### clean
1337 ###
1338 ##############################################################################
1339 %clean
1340 rm -f openafs-file-list
1341 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1342         rm -fr $RPM_BUILD_ROOT
1343
1344
1345 ##############################################################################
1346 ###
1347 ### scripts
1348 ###
1349 ##############################################################################
1350 %if %{build_userspace}
1351
1352 %pre compat
1353 if [ -e %{_prefix}/afsws ]; then
1354         /bin/rm -fr %{_prefix}/afsws
1355 fi
1356
1357 %post client
1358 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1359 chkconfig --add openafs-client
1360 %else
1361 if [ $1 -eq 1 ] ; then 
1362     # Initial installation 
1363     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1364 fi
1365 %endif
1366 if [ ! -d /afs ]; then
1367         mkdir /afs
1368         chown root.root /afs
1369         chmod 0755 /afs
1370         [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1371 fi
1372
1373 # Create the CellServDB
1374 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1375
1376 ( cd /usr/vice/etc ; \
1377   if [ -h CellServDB ]; then \
1378     rm -f CellServDB; \
1379   fi; \
1380   cat CellServDB.local CellServDB.dist > CellServDB ; \
1381   chmod 644 CellServDB )
1382
1383 %post server
1384 #on an upgrade, don't enable if we were disabled
1385 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1386 if [ $1 = 1 ] ; then
1387   chkconfig --add openafs-server
1388 fi
1389 %{initdir}/openafs-server condrestart
1390 %else
1391 if [ $1 -eq 1 ] ; then 
1392     # Initial installation 
1393     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1394 fi
1395 %endif
1396
1397 %if %{build_authlibs}
1398 %post authlibs
1399 /sbin/ldconfig
1400
1401 %postun authlibs
1402 /sbin/ldconfig
1403 %endif
1404
1405 %preun
1406 if [ $1 = 0 ] ; then
1407         [ -d /afs ] && rmdir /afs
1408         :
1409 fi
1410
1411 %preun client
1412 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1413 if [ $1 = 0 ] ; then
1414         %{initdir}/openafs-client stop
1415         chkconfig --del openafs-client
1416 fi
1417 %else
1418 if [ $1 -eq 0 ] ; then
1419         # Package removal, not upgrade
1420         /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || :
1421         /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || :
1422 fi
1423 %endif
1424
1425 %preun server
1426 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1427 if [ $1 = 0 ] ; then
1428         %{initdir}/openafs-server stop
1429         chkconfig --del openafs-server
1430 fi
1431 %else
1432 if [ $1 -eq 0 ] ; then
1433         /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || :
1434         /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || :
1435 fi
1436 %endif
1437
1438 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
1439 %postun client
1440 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1441
1442 %postun server
1443 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1444 %endif
1445
1446 %if %{build_dkmspkg}
1447 %post -n dkms-%{name}
1448 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1449 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1450 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1451
1452 %preun -n dkms-%{name}
1453 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1454 %endif
1455 %endif
1456
1457 %if %{build_modules}
1458 %if !%{fedorakmod}
1459 %if %{up_package}
1460 %post kernel
1461 %{depmod} -ae %{kernvers}
1462
1463 %postun kernel
1464 %{depmod} -ae %{kernvers}
1465
1466 %endif
1467
1468 %if %{smp_package}
1469 %post kernel-smp
1470 %{depmod} -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1471
1472 %postun kernel-smp
1473 %{depmod} -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1474 %endif
1475
1476 %if %{largesmp_package}
1477 %post kernel-largesmp
1478 %{depmod} -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1479
1480 %postun kernel-largesmp
1481 %{depmod} -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1482 %endif
1483  
1484 %if %{bigmem_package}
1485 %post kernel-bigmem
1486 %{depmod} -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1487
1488 %postun kernel-bigmem
1489 %{depmod} -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1490 %endif
1491
1492 %if %{hugemem_package}
1493 %post kernel-hugemem
1494 %{depmod} -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1495
1496 %postun kernel-hugemem
1497 %{depmod} -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1498 %endif
1499 %endif
1500 %endif
1501
1502 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
1503 %triggerun -- openafs-client < 1.6.0-1
1504 # Save the current service runlevel info
1505 # User must manually run systemd-sysv-convert --apply httpd
1506 # to migrate them to systemd targets
1507 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||:
1508
1509 # Run this because the SysV package being removed won't do it
1510 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || :
1511
1512 %triggerun -- openafs-server < 1.6.0-1
1513 # Save the current service runlevel info
1514 # User must manually run systemd-sysv-convert --apply httpd
1515 # to migrate them to systemd targets
1516 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||:
1517
1518 # Run this because the SysV package being removed won't do it
1519 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || :
1520 %endif
1521
1522 ##############################################################################
1523 ###
1524 ### file lists
1525 ###
1526 ##############################################################################
1527 %if %{build_userspace}
1528
1529 %files -f openafs-file-list
1530 %defattr(-,root,root)
1531 %config(noreplace) /etc/sysconfig/openafs
1532 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1533 %{_libdir}/libafshcrypto.so.*
1534 %{_libdir}/librokenafs.so.*
1535
1536 %files docs
1537 %defattr(-,root,root)
1538 %docdir %{_docdir}/openafs-%{afsvers}
1539 %dir %{_docdir}/openafs-%{afsvers}
1540 %{_docdir}/openafs-%{afsvers}/ChangeLog
1541 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1542 %{_docdir}/openafs-%{afsvers}/pdf
1543
1544 %files client
1545 %defattr(-,root,root)
1546 %dir %{_prefix}/vice
1547 %dir %{_prefix}/vice/cache
1548 %dir %{_prefix}/vice/etc
1549 %dir %{_prefix}/vice/etc/C
1550 %{_prefix}/vice/etc/CellServDB.dist
1551 %config(noreplace) %{_prefix}/vice/etc/ThisCell
1552 %config(noreplace) %{_prefix}/vice/etc/cacheinfo
1553 %{_bindir}/afsio
1554 %{_bindir}/cmdebug
1555 %{_bindir}/up
1556 %{_prefix}/vice/etc/afsd
1557 %{_prefix}/vice/etc/C/afszcm.cat
1558 %{pamdir}/pam_afs.krb.so.1
1559 %{pamdir}/pam_afs.krb.so
1560 %{pamdir}/pam_afs.so.1
1561 %{pamdir}/pam_afs.so
1562 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1563 %{initdir}/openafs-client
1564 %else
1565 %{_unitdir}/openafs-client.service
1566 %{_sysconfdir}/sysconfig/modules/openafs-client.modules
1567 %endif
1568 %{_mandir}/man1/cmdebug.*
1569 %{_mandir}/man1/up.*
1570 %{_mandir}/man5/afs.5.gz
1571 %{_mandir}/man5/afs_cache.5.gz
1572 %{_mandir}/man5/afs_volume_header.5.gz
1573 %{_mandir}/man5/afszcm.cat.5.gz
1574 %{_mandir}/man5/cacheinfo.*
1575 %{_mandir}/man8/afsd.*
1576 %{_mandir}/man8/vsys.*
1577 %{_mandir}/man5/CellAlias.*
1578
1579 %files server
1580 %defattr(-,root,root)
1581 %dir %{_prefix}/afs
1582 %dir %{_prefix}/afs/bin
1583 %dir %{_prefix}/afs/etc
1584 %dir %{_prefix}/afs/logs
1585 %{_prefix}/afs/bin/bosserver
1586 %{_prefix}/afs/bin/bos_util
1587 %{_prefix}/afs/bin/buserver
1588 %{_prefix}/afs/bin/dafileserver
1589 %{_prefix}/afs/bin/dafssync-debug
1590 %{_prefix}/afs/bin/dasalvager
1591 %{_prefix}/afs/bin/davolserver
1592 %{_prefix}/afs/bin/fileserver
1593 %{_prefix}/afs/bin/fssync-debug
1594 # Should we support KAServer?
1595 %{_prefix}/afs/bin/kaserver
1596 %{_prefix}/afs/bin/ka-forwarder
1597 %{_prefix}/afs/bin/pt_util
1598 %{_prefix}/afs/bin/ptserver
1599 %{_prefix}/afs/bin/salvager
1600 %{_prefix}/afs/bin/salvageserver
1601 %{_prefix}/afs/bin/salvsync-debug
1602 %{_prefix}/afs/bin/state_analyzer
1603 %{_prefix}/afs/bin/upclient
1604 %{_prefix}/afs/bin/upserver
1605 %{_prefix}/afs/bin/vlserver
1606 %{_prefix}/afs/bin/volinfo
1607 %{_prefix}/afs/bin/volscan
1608 %{_prefix}/afs/bin/volserver
1609 %{_sbindir}/kadb_check
1610 %{_sbindir}/prdb_check
1611 %{_sbindir}/vldb_check
1612 %{_sbindir}/vldb_convert
1613 %{_sbindir}/voldump
1614 %if 0%{?fedora} < 15 && 0%{?rhel} < 7
1615 %{initdir}/openafs-server
1616 %else
1617 %{_unitdir}/openafs-server.service
1618 %endif
1619 %{_mandir}/man5/AuthLog.*
1620 %{_mandir}/man5/BackupLog.*
1621 %{_mandir}/man5/BosConfig.*
1622 %{_mandir}/man5/BosLog.*
1623 %{_mandir}/man5/FORCESALVAGE.*
1624 %{_mandir}/man5/FileLog.*
1625 %{_mandir}/man5/KeyFile.*
1626 %{_mandir}/man5/NetInfo.*
1627 %{_mandir}/man5/NetRestrict.*
1628 %{_mandir}/man5/NoAuth.*
1629 %{_mandir}/man5/SALVAGE.fs.*
1630 %{_mandir}/man5/SalvageLog.*
1631 %{_mandir}/man5/sysid.*
1632 %{_mandir}/man5/UserList.*
1633 %{_mandir}/man5/VLLog.*
1634 %{_mandir}/man5/VolserLog.*
1635 %{_mandir}/man5/bdb.DB0.*
1636 %{_mandir}/man5/fms.log.*
1637 %{_mandir}/man5/kaserver.DB0.*
1638 %{_mandir}/man5/kaserverauxdb.*
1639 %{_mandir}/man5/krb.conf.*
1640 %{_mandir}/man5/krb.excl.*
1641 %{_mandir}/man5/prdb.DB0.*
1642 %{_mandir}/man5/salvage.lock.*
1643 %{_mandir}/man5/tapeconfig.*
1644 %{_mandir}/man5/vldb.DB0.*
1645 %{_mandir}/man8/buserver.*
1646 %{_mandir}/man8/fileserver.*
1647 %{_mandir}/man8/dafileserver.*
1648 %{_mandir}/man8/dasalvager.*
1649 %{_mandir}/man8/davolserver.*
1650 %{_mandir}/man8/kadb_check.*
1651 %{_mandir}/man8/ka-forwarder.*
1652 %{_mandir}/man8/prdb_check.*
1653 %{_mandir}/man8/ptserver.*
1654 %{_mandir}/man8/pt_util.*
1655 %{_mandir}/man8/salvager.*
1656 %{_mandir}/man8/salvageserver.*
1657 %{_mandir}/man8/state_analyzer.*
1658 %{_mandir}/man8/upclient.*
1659 %{_mandir}/man8/upserver.*
1660 %{_mandir}/man8/vldb_check.*
1661 %{_mandir}/man8/vldb_convert.*
1662 %{_mandir}/man8/vlserver.*
1663 %{_mandir}/man8/voldump.*
1664 %{_mandir}/man8/volinfo.*
1665 %{_mandir}/man8/volscan.*
1666 %{_mandir}/man8/volserver.*
1667
1668 %if %{build_authlibs}
1669 %files authlibs
1670 %defattr(-,root,root)
1671 %{_libdir}/libafsauthent.so.*
1672 %{_libdir}/libafsrpc.so.*
1673 %{_libdir}/libkopenafs.so.*
1674 %endif
1675
1676 %files authlibs-devel
1677 %defattr(-,root,root)
1678 %{_includedir}/kopenafs.h
1679 %{_libdir}/libafsauthent.a
1680 %{_libdir}/libafscp.a
1681 %{_libdir}/libafsrpc.a
1682 %{_libdir}/libafsauthent_pic.a
1683 %{_libdir}/libafsrpc_pic.a
1684 %{_libdir}/libkopenafs.a
1685 %if %{build_authlibs}
1686 %{_libdir}/libafsauthent.so
1687 %{_libdir}/libafsrpc.so
1688 %{_libdir}/libkopenafs.so
1689 %endif
1690
1691 %files devel
1692 %defattr(-,root,root)
1693 %{_bindir}/afs_compile_et
1694 %{_bindir}/rxgen
1695 %{_includedir}/afs
1696 %{_includedir}/lock.h
1697 %{_includedir}/lwp.h
1698 %{_includedir}/preempt.h
1699 %{_includedir}/rx
1700 %{_includedir}/timer.h
1701 %{_includedir}/ubik.h
1702 %{_includedir}/ubik_int.h
1703 %{_libdir}/afs
1704 %{_libdir}/libafshcrypto.a
1705 %{_libdir}/libafshcrypto.so
1706 %{_libdir}/liblwp.a
1707 %{_libdir}/libopr.a
1708 %{_libdir}/librokenafs.a
1709 %{_libdir}/librokenafs.so
1710 %{_libdir}/librx.a
1711 %{_libdir}/librxkad.a
1712 %{_libdir}/librxstat.a
1713 %{_libdir}/libubik.a
1714 %{_libdir}/libubik_pthread.a
1715 %{_mandir}/man1/rxgen.*
1716 %{_mandir}/man1/afs_compile_et.*
1717
1718 %if %{build_dkmspkg}
1719 %files -n dkms-%{name}
1720 %defattr(-,root,root)
1721 %{_prefix}/src/%{name}-%{dkms_version}
1722 %endif
1723
1724 %files kernel-source
1725 %defattr(-,root,root)
1726 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1727 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1728 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1729 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1730
1731 %files compat
1732 %defattr(-,root,root)
1733 %{_prefix}/afsws
1734
1735 %files kpasswd
1736 %defattr(-,root,root)
1737 %{_bindir}/kapasswd
1738 %{_bindir}/kpwvalid
1739 %{_mandir}/man1/kapasswd.*
1740 %{_mandir}/man8/kpwvalid.*
1741
1742 %if %{krb5support}
1743 %files krb5
1744 %defattr(-,root,root)
1745 %{_bindir}/aklog
1746 %{_bindir}/klog.krb5
1747 %{_sbindir}/asetkey
1748 %{_mandir}/man1/aklog.*
1749 %{_mandir}/man8/asetkey.*
1750 %endif
1751
1752 %endif
1753
1754 %if %{build_modules}
1755
1756 %if !%{fedorakmod}
1757 %if %{up_package}
1758 %files kernel
1759 %defattr(-,root,root)
1760 %{kxmoddir}/fs/openafs/openafs.*
1761 %endif
1762
1763 %if %{smp_package}
1764 %files kernel-smp
1765 %defattr(-,root,root)
1766 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1767 %endif
1768
1769 %if %{largesmp_package}
1770 %files kernel-largesmp
1771 %defattr(-,root,root)
1772 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1773 %endif
1774  
1775 %if %{bigmem_package}
1776 %files kernel-bigmem
1777 %defattr(-,root,root)
1778 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1779 %endif
1780
1781 %if %{hugemem_package}
1782 %files kernel-hugemem
1783 %defattr(-,root,root)
1784 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1785 %endif
1786 %endif
1787
1788 %endif
1789
1790 ##############################################################################
1791 ###
1792 ### openafs.spec change log
1793 ###
1794 ##############################################################################
1795 %changelog
1796 * Wed Dec 12 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1797 - Make the RPM mockable
1798
1799 * Mon Oct 29 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1800 - Update to match the shipped 1.4.5 RPMS
1801 - Fix the kvariant stuff to only configure the 'standard' case once
1802 - Add openafs-kvers.sh back in
1803
1804 * Wed Oct 10 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1805 - Use Fedora style kmods, which allows us to install multiple kernel types
1806
1807 * Thu Jun 07 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1808 - Use distributed files, rather than those in packager's SOURCE directory
1809 - Remove SuidCells stuff, which was unused
1810
1811 * Fri Dec 01 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-2
1812 - integrate s390x changes
1813 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1814   that won't build the .so files.
1815
1816 * Wed Aug 23 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-1
1817 - update to 1.4.2
1818 - use installed aklog manpage.
1819 - moduleparam patch obsoleted.
1820
1821 * Tue Aug 22 2006  Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1822 - update to 1.4.2-rc1
1823 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1824   (but only add support for 2.6 kernels.  No need for the 2.4 kernels).
1825 - don't need the posixlock patch anymore.
1826
1827 * Wed Jul 12 2006  Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1828 - update to 1.4.2-beta2
1829 - add linux2.4 posixlock API patch
1830
1831 * Mon Jun 26 2006  Derek Atkins <warlord@MIT.EDU>
1832 - moduleparam and krb524 patches no longer required in OA-CVS
1833
1834 * Wed May 17 2006  Derek Atkins <warlord@MIT.EDU>
1835 - change non-target-cpu kernel dep to a file dep
1836 - make sure we use the proper kernel version for the dependency.
1837
1838 * Tue May 16 2006  Derek Atkins <warlord@MIT.EDU>
1839 - allow users to specify local CellServDB and SuidCells entries
1840   don't overwrite user's changes.  Provide a .dist an let users
1841   make entries in a ".local"
1842 - build the CellServDB and SuidCells at client startup and at
1843   client install-time
1844 - add provideskernelarch functionality to openafs-kvers-is.sh
1845 - use that functionality to Require kernel{,-<type>}-targetcpu
1846   to get better package safety due to RPM bugs where the kernel
1847   release isn't used so you can install the kernel module against
1848   any kernel of the same major version.
1849
1850 * Mon May 15 2006  Derek Atkins <warlord@MIT.EDU>
1851 - update the README in openafs-kernel-source
1852 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1853 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1854
1855 * Fri Apr 21 2006  Derek Atkins <warlord@MIT.EDU>
1856 - build requires autoconf and automake for krb5support
1857   and autoconf for standard package
1858 - dont setup the krb5 migration kit (or patches) if we don't care.
1859 - require ncurses-devel to build
1860
1861 * Wed Apr 19 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1862 - look for krb524 functions in libkrb524 if we can't find them
1863   in the standard locations.
1864
1865 * Tue Apr 18 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1866 - fix the module_param_array macro for Linux 2.6.9.
1867
1868 * Sat Apr 15 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1869 - update to 1.4.1 release.
1870 - distribute asetkey from openafs instead of krb5-migration kit
1871 - don't need to apply the FC5 patches because they are part of the distro.
1872 - install asetkey into the "proper" place
1873 - dont list a manpage twice.
1874 - package asetkey man page.  delete it when not needed.
1875
1876 * Thu Apr  6 2006  Derek Atkins <warlord@MIT.EDU>
1877 - turn authlibs back on, because RT #18767 was applied to CVS.
1878
1879 * Wed Mar 29 2006  Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1880 - update to 1.4.1rc10, build on FC5
1881 - fix the man pages (distribute into various packages)
1882 - include patches for FC5, RT #29112 and #29122
1883
1884 * Mon Dec 19 2005  Derek Atkins <warlord@MIT.EDU>
1885 - openafs-server shouldn't depend on the kernel module.
1886
1887 * Thu Nov 17 2005  Derek Atkins <warlord@MIT.EDU>
1888 - patch from Mike Polek <mike at pictage.com> to run depmod for
1889   the target kernel and not the running kernel.
1890
1891 * Tue Nov  8 2005  Derek Atkins <warlord@MIT.EDU>
1892 - build aklog from the openafs sources, not from the krb5 migration kit.
1893
1894 * Fri Nov  4 2005  Derek Atkins <warlord@MIT.EDU>
1895 - set openafs-kernel-source to Provide openafs-kernel
1896
1897 * Thu Oct 20 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1898 - update afs-krb5 res_search patch: look for res_search and __res_search
1899 - update to 1.4.0 final
1900
1901 * Mon Oct 10 2005  Derek Atkins <warlord@MIT.EDU>
1902 - remove all kdump builds.
1903
1904 * Thu Oct  6 2005  Derek Atkins <warlord@MIT.EDU>
1905 - fix openafs-kernel-version.sh so it will build an RPM for the
1906   currently-running kernel even if it's smp on 2.6.
1907
1908 * Tue Sep 27 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1909 - upgrade to 1.4.0rc5
1910 - turn off authlibs packages
1911
1912 * Fri Sep 23 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1913 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1914   it's called "openafs" and not "libafs".  This fixes the shutdown
1915   problem.
1916
1917 * Thu Sep 22 2005  Derek Atkins <warlord@MIT.EDU>
1918 - update kversis script, add 'kvers' operation
1919 - fix bug that 2.6 smp/hugemem kernels don't provide
1920   kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1921 - add patch to remove res_search from the afs-krb5 configure
1922
1923 * Thu Sep 15 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1924 - Update to 1.4.0rc4
1925 - Update the afs-krb5 krb524 patch so it actually works on
1926   some older systems like RHEL3 that still need -lkrb524.
1927 - Update the buildall script so choose better architecture support,
1928   e.g. don't build i586 on RHEL.
1929 - Update the rebuild information in the SPEC file.
1930 - Add support for finding .EL kernels in openafs-kvers-is.sh
1931 - Add additional error messages when kernel version/type parsing fails.
1932 - Update the buildall script to use the kernel srcdir directly.
1933
1934 * Wed Sep 14 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1935 - Add "hugemem" to 2.4 configs
1936 - Add checks to support scripts to determine whether to build
1937   the bigmem and/or hugemem kernels for 2.4.
1938
1939 * Mon Sep 12 2005  Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1940 - Added some afs-krb5 patches to get the migration kit to build
1941   on modern AFS and modern Kerberos.
1942 - Added authlibs and authlibs-devel packages as per UMich changes.
1943
1944 * Sun Sep 11 2005  Derek Atkins <warlord@MIT.EDU>
1945 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1946
1947 * Sat Sep 10 2005  Derek Atkins <warlord@MIT.EDU>
1948 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1949   from Red Hat.   Initial attempt at a release of 1.4.  Still need
1950   to work in a 2.6 build system.