1 # Openafs Spec $Revision$
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@
9 %{!?fedorakmod: %define fedorakmod 1}
10 %{!?build_dkmspkg: %define build_dkmspkg 1}
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}
19 # Determine the version of the kernel to build against
20 # - automatically select running kernel if there are sources in /lib/modules
21 # - note that this can be overridden on the command line
23 %if !%{kernvers_on_cmdline}
24 %define kernvers %(%{_sourcedir}/openafs-kernel-version.sh)
27 # If we're building for a 2.4 series kernel, then fedora style kmods aren't
28 # appropriate - disable them.
30 %define kern24 %([ `echo "%{kernvers}" | sed -e 's/^\([0-9]*\.[0-9]*\)\..*/\1/'` = "2.4" ] && echo 1 || echo 0)
37 %define kmodtool bash %{_sourcedir}/openafs-kmodtool
39 %define kmod_name openafs
40 %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
43 %{!?kvariants: %define kvariants %{?upvar}}
45 %if %{?ksrcdir:1}%{!?ksrcdir:0}
46 if ( -d %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}) ; then
47 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
49 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}}
53 %else # Legacy kernel build stuff
55 %define kversis %{_sourcedir}/openafs-kvers-is.sh
56 %define kvers %(%{kversis} parsev %{kernvers})
57 %define kvers_is_24 %(%{kversis} %{kvers} "2.4")
58 %define kvers_is_26 %(%{kversis} %{kvers} "2.6")
59 %define ktype %(%{kversis} parset %{kernvers})
60 %define kversion %(%{kversis} kvers %{kernvers})
62 # This is where to look for kernel build include files. Default
63 # is /lib/modules/<kvers>/build, but you can define kbase and
64 # kend on the commandline to change that.
66 %if %{?kbase:0}%{!?kbase:1}
67 %define kbase /lib/modules/
69 %if %{?kend:0}%{!?kend:1}
72 # Let the buildscript define the ksrcdir directly -- needed for RHEL4
73 %if %{?ksrcdir:0}%{!?ksrcdir:1}
74 %define ksrcdir %{kbase}%{kernvers}%{kend}
77 %if %{?kmoddir:0}%{!?kmoddir:1}
78 %define kmoddir /lib/modules
80 %define kxmoddir %{kmoddir}/%{kernvers}
82 # End legacy kernel build stuff
85 %define dkms_version %{pkgrel}%{?dist}
87 # Set 'debugspec' to 1 if you want to debug the spec file. This will
88 # not remove the installed tree as part of the %clean operation
89 %if %{?debugspec:0}%{!?debugspec:1}
93 # Set 'krb5support' to 1 if you want to build the openafs-krb5 package
94 # to distribute aklog and asetkey
95 %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
97 # Set 'bootkernelsupport' to 1 if you want to build the
98 # kernel module for Red Hat BOOT Kernels on x86.
99 %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
101 # Define the location of your init.d directory
102 %define initdir /etc/rc.d/init.d
104 #determine if the kernel provides an arch-specific Provides
105 %define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
107 # Define the location of the PAM security module directory
108 %define pamdir /%{_lib}/security
112 # Define the set of kernel module variations to be built:
113 # For 2.4 kernels we just build everything at once for a particular
114 # kernel. So we build up, smp, and bigmem all at once.
115 # For 2.6 kernels we have to build against the specific kernel headers
116 # for a particular kernel variation. AFS will handle the specific smp or
117 # non-smp determination. So just always build as if it's "up" -- the kernel
118 # version will have the 'variation' type already in the version #.
121 %define smp_package 0
122 %define bigmem_package 0
123 %define hugemem_package 0
124 %define largesmp_package 0
126 #######################################################################
129 %define kdepend kernel-source
131 %define smp_package 1
134 %define bigmem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} bigmem)
135 %if %{bigmem_package}
136 %define bigmem_ext bigmem
139 %define hugemem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} hugemem)
140 %if %{hugemem_package}
141 %define hugemem_ext hugemem
144 %define kvariations up smp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
146 #######################################################################
150 %define kvariations up
155 %define up_package %(%{kversis} "%{ktype}" "")
156 %define smp_package %(%{kversis} "%{ktype}" "smp")
157 %define hugemem_package %(%{kversis} "%{ktype}" "hugemem")
158 %define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
161 %if !%{up_package} && !%{smp_package} && !%{hugemem_package} && !%{largesmp_package}
162 %error "unknown kernel type: %{ktype}"
165 %if !%{kernvers_on_cmdline}
166 %define kdepend %{ksrcdir}/include/linux/version.h
169 #######################################################################
172 %error "unknown kernel version: ${kvers} (parsed from %{kernvers})"
176 # End of legacy kernel module build
179 #######################################################################
180 # You probably don't need to change anything beyond this line
181 # NOTE: If you do, please email me!!!
183 # Determine which elements of OpenAFS to build. For non-x86 arches
184 # (subject to the ExclusiveArch setting, below), we build both userspace
185 # and modules. For most x86 arches, we build just the kernel modules. For
186 # i386, we build just the userspace. If you're running an i386 kernel,
187 # you'll need to tweak that last bit.
188 %if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
190 %ifarch x86_64 ia64 s390 s390x
191 %define build_userspace 1
192 %define build_modules 1
194 %define build_authlibs 1
196 %define build_authlibs 0
201 %define build_userspace 0
202 %define build_modules 1
203 %define build_authlibs 1
207 %define build_userspace 1
208 %define build_modules 0
209 %define build_authlibs 1
214 # deal with cmdline specification
215 %if %{build_userspace_on_cmdline} || %{build_modules_on_cmdline}
216 %if !%{build_userspace_on_cmdline}
217 %define build_userspace 0
219 %if !%{build_modules_on_cmdline}
220 %define build_modules 0
224 %if !%{build_authlibs_on_cmdline}
225 %if %{build_userspace_on_cmdline}
226 %define build_authlibs 1
228 %define build_authlibs 0
232 # Make sure RPM doesn't complain about installed but non-packaged files.
233 #define __check_files %{nil}
235 Summary: OpenAFS distributed filesystem
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
246 BuildRequires: krb5-devel
248 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
250 # http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
251 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
252 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
253 %define srcdir openafs-%{afsvers}
255 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
256 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
258 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2010-12-13
260 Source30: openafs-kernel-version.sh
261 Source996: openafs-kvers-is.sh
262 Source997: openafs-buildfedora.pl
263 Source998: openafs-buildall.sh
264 Source999: openafs-kmodtool
267 The AFS distributed filesystem. AFS is a distributed filesystem
268 allowing cross-platform sharing of files among multiple computers.
269 Facilities are provided for access control, authentication, backup and
270 administrative management.
272 This package provides common files shared across all the various
273 OpenAFS packages but are not necessarily tied to a client or server.
275 The OpenAFS SRPM can be rebuilt with the following options to control
278 --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version
279 to build modules against. The default is
280 to build against the currently-running
282 --define "kbase /lib/modules/" The base location to look for kernel headers
283 --define "kend /build" The 'end' location to look for kernels
284 The build will define ksrvdir as
285 %%{kbase}<kernvers>%%{kend}
287 --without krb5 Disable krb5 support (default: with krb5)
288 --with bitmap-later Enable "bitmap later" support
289 --with bos-restricted Enable "bos restricted" mode
290 --with largefiles Enable "largefile fileserver" mode
291 --with supergroups Enable "supergroups"
293 --target=i386 The target architecture to build for.
294 When building for a non-default target
295 the build may choose whether to build
296 userspace or kernel modules automatically.
297 The defaults are probably what you want.
299 --define "build_userspace 1" Request building of userspace tools
300 --define "build_modules 1" Request building of kernel modules
301 You probably never need to specify these.
303 --define "kmoddir /lib/modules" This is the base location where modules
304 will be installed. You probably don't
305 need to change this ever.
307 --define "fedorakmod 0" Disable the building of 'Fedora' style kernel
308 modules, and use the old format.
310 --define "kvariants <variants>" When building Fedora style kernel modules,
311 this defines the set of kernel variants
313 <variants> is a space seperated list which
314 may contain one or more of
315 '' (for the generic kernel), smp, PAE, xen
318 To a kernel module for your running kernel, just run:
319 rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
321 ##############################################################################
323 # build the userspace side of things if so requested
325 ##############################################################################
326 %if %{build_userspace}
329 Requires: binutils, openafs = %{version}
332 Requires: %{name}-kmod >= %{version}
333 Provides: %{name}-kmod-common = %{version}
335 Requires: openafs-kernel
338 Summary: OpenAFS Filesystem Client
339 Group: Networking/Filesystem
342 The AFS distributed filesystem. AFS is a distributed filesystem
343 allowing cross-platform sharing of files among multiple computers.
344 Facilities are provided for access control, authentication, backup and
345 administrative management.
347 This package provides basic client support to mount and manipulate
351 Requires: openafs = %{version}
352 Summary: OpenAFS Filesystem Server
353 Group: Networking/Filesystems
356 The AFS distributed filesystem. AFS is a distributed filesystem
357 allowing cross-platform sharing of files among multiple computers.
358 Facilities are provided for access control, authentication, backup and
359 administrative management.
361 This package provides basic server support to host files in an AFS
365 %package -n dkms-%{name}
366 Summary: DKMS-ready kernel source for AFS distributed filesystem
367 Group: Development/Kernel
368 Provides: openafs-kernel = %{version}
370 Provides: %{name}-kmod = %{version}
375 Requires: %{name}-kmod-common = %{version}
377 %description -n dkms-%{name}
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.
383 This package provides the source code to allow DKMS to build an
387 %if %{build_authlibs}
389 Summary: OpenAFS authentication shared libraries
390 Group: Networking/Filesystems
392 %description authlibs
393 The AFS distributed filesystem. AFS is a distributed filesystem
394 allowing cross-platform sharing of files among multiple computers.
395 Facilities are provided for access control, authentication, backup and
396 administrative management.
398 This package provides a shared version of libafsrpc and libafsauthent.
399 None of the programs included with OpenAFS currently use these shared
400 libraries; however, third-party software that wishes to perform AFS
401 authentication may link against them.
404 %package authlibs-devel
405 %if %{build_authlibs}
406 Requires: openafs-authlibs = %{version}-%{release}
408 Requires: openafs-devel = %{version}-%{release}
409 Summary: OpenAFS shared library development
410 Group: Development/Filesystems
412 %description authlibs-devel
413 The AFS distributed filesystem. AFS is a distributed filesystem
414 allowing cross-platform sharing of files among multiple computers.
415 Facilities are provided for access control, authentication, backup and
416 administrative management.
418 This package includes the static versions of libafsrpc and
419 libafsauthent, and symlinks required for building against the dynamic
423 Summary: OpenAFS Development Libraries and Headers
424 Group: Development/Filesystems
425 Requires: openafs = %{version}-%{release}
428 The AFS distributed filesystem. AFS is a distributed filesystem
429 allowing cross-platform sharing of files among multiple computers.
430 Facilities are provided for access control, authentication, backup and
431 administrative management.
433 This package provides static development libraries and headers needed
434 to compile AFS applications. Note: AFS currently does not provide
438 Summary: OpenAFS user and administrator documentation
439 Requires: openafs = %{version}-%{release}
440 Group: Networking/Filesystems
443 The AFS distributed filesystem. AFS is a distributed filesystem
444 allowing cross-platform sharing of files among multiple computers.
445 Facilities are provided for access control, authentication, backup and
446 administrative management.
448 This package provides HTML documentation for OpenAFS users and system
451 %package kernel-source
452 Summary: OpenAFS Kernel Module source tree
453 Group: Networking/Filesystems
454 Provides: openafs-kernel = %{version}
456 Provides: %{name}-kmod = %{version}
459 %description kernel-source
460 The AFS distributed filesystem. AFS is a distributed filesystem
461 allowing cross-platform sharing of files among multiple computers.
462 Facilities are provided for access control, authentication, backup and
463 administrative management.
465 This package provides the source code to build your own AFS kernel
469 Summary: OpenAFS client compatibility symlinks
470 Requires: openafs = %{version}, openafs-client = %{version}
471 Group: Networking/Filesystems
472 Obsoletes: openafs-client-compat
475 The AFS distributed filesystem. AFS is a distributed filesystem
476 allowing cross-platform sharing of files among multiple computers.
477 Facilities are provided for access control, authentication, backup and
478 administrative management.
480 This package provides compatibility symlinks in /usr/afsws. It is
481 completely optional, and is only necessary to support legacy
482 applications and scripts that hard-code the location of AFS client
486 Summary: OpenAFS KA kpasswd support
488 Group: Networking/Filesystems
491 The AFS distributed filesystem. AFS is a distributed filesystem
492 allowing cross-platform sharing of files among multiple computers.
493 Facilities are provided for access control, authentication, backup and
494 administrative management.
496 This package provides the compatibility symlink for kpasswd, in case
497 you are using KAserver instead of Krb5.
501 Summary: OpenAFS programs to use with krb5
502 Requires: openafs = %{version}
503 Group: Networking/Filesystems
504 BuildRequires: krb5-devel
507 The AFS distributed filesystem. AFS is a distributed filesystem
508 allowing cross-platform sharing of files among multiple computers.
509 Facilities are provided for access control, authentication, backup and
510 administrative management.
512 This package provides compatibility programs so you can use krb5
513 to authenticate to AFS services, instead of using AFS's homegrown
514 krb4 lookalike services.
519 ##############################################################################
521 # build the kernel modules if so requested
523 ##############################################################################
527 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
531 # Legacy kernel compilation code here ...
532 %define modkversion %(echo %{kernvers} | cut -d- -f1)
533 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
534 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
538 Summary: OpenAFS Kernel Module (compiled for UP)
539 Release: %{modpkgrel}
540 Group: Networking/Filesystems
541 Provides: openafs-kernel = %{version}
543 Requires: kernel-%{_target_cpu} = %{kversion}
545 Requires: /boot/config-%{kernvers}
549 The AFS distributed filesystem. AFS is a distributed filesystem
550 allowing cross-platform sharing of files among multiple computers.
551 Facilities are provided for access control, authentication, backup and
552 administrative management.
554 This package provides a precompiled AFS kernel module for %{kernvers}.
559 Summary: OpenAFS Kernel Module (compiled for SMP)
560 Release: %{modpkgrel}
561 Provides: openafs-kernel = %{version}
563 Requires: kernel-smp-%{_target_cpu} = %{kversion}
565 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
567 Group: Networking/Filesystems
569 %description kernel-smp
570 The AFS distributed filesystem. AFS is a distributed filesystem
571 allowing cross-platform sharing of files among multiple computers.
572 Facilities are provided for access control, authentication, backup and
573 administrative management.
575 This package provides a precompiled AFS kernel module for %{kernvers}.
578 %if %{largesmp_package}
579 %package kernel-largesmp
580 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
581 Release: %{modpkgrel}
582 Provides: openafs-kernel = %{version}
584 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
586 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
588 Group: Networking/Filesystems
590 %description kernel-largesmp
591 The AFS distributed filesystem. AFS is a distributed filesystem
592 allowing cross-platform sharing of files among multiple computers.
593 Facilities are provided for access control, authentication, backup and
594 administrative management.
596 This package provides a precompiled AFS kernel module for %{kernvers}.
599 %if %{bigmem_package}
600 %package kernel-bigmem
601 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
602 Release: %{modpkgrel}
603 Provides: openafs-kernel = %{version}
605 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
607 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
609 Group: Networking/Filesystems
611 %description kernel-bigmem
612 The AFS distributed filesystem. AFS is a distributed filesystem
613 allowing cross-platform sharing of files among multiple computers.
614 Facilities are provided for access control, authentication, backup and
615 administrative management.
617 This package provides a precompiled AFS kernel module for %{kernvers}.
620 %if %{hugemem_package}
621 %package kernel-hugemem
622 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
623 Release: %{modpkgrel}
624 Provides: openafs-kernel = %{version}
626 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
628 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
630 Group: Networking/Filesystems
632 %description kernel-hugemem
633 The AFS distributed filesystem. AFS is a distributed filesystem
634 allowing cross-platform sharing of files among multiple computers.
635 Facilities are provided for access control, authentication, backup and
636 administrative management.
638 This package provides a precompiled AFS kernel module for %{kernvers}.
642 # End legacy kernel compilation code ...
645 ##############################################################################
649 ##############################################################################
653 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
655 : @@@ kernel version: %{kernvers}
657 : @@@ kernel variations: %{kvariants}
659 : @@@ base kernel version:%{kversion}
660 : @@@ kernel modules dir: %{kxmoddir}
661 : @@@ kernel source dir: %{ksrcdir}
663 : @@@ kernel variations: %{kvariations}
666 : @@@ kernel type: up
668 : @@@ kernel type: %{ktype}
672 : @@@ PAM modules dir: %{pamdir}
673 : @@@ build userspace: %{build_userspace}
674 : @@@ build modules: %{build_modules}
676 : @@@ target cpu: %{_target_cpu}
678 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
680 # Install OpenAFS src and doc
681 #%setup -q -n %{srcdir}
682 %setup -q -b 1 -n %{srcdir}
684 ##############################################################################
688 ##############################################################################
699 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
705 x86_64) sysname=amd64_linux${kv} ;;
706 alpha*) sysname=alpha_linux_${kv} ;;
707 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
708 *) sysname=%{_arch}_linux${kv} ;;
712 archlist="i386 i586 i686 athlon"
713 %if %{bootkernelsupport}
714 archlist="${archlist} BOOT"
721 # PrintDefine var value statements file
726 echo "#ifndef $1" >> $4
731 echo "#undef $1" >> $4
736 echo "#define $1 $2" >> $4
746 echo "#include $1" >> $4
756 # PrintRedhatKernelFix arch mp file
757 PrintRedhatKernelFix() {
771 largesmp) largesmp=1;;
775 echo "$2 not supported"
784 PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
786 PrintDefine __BOOT_KERNEL_ENTERPRISE $ent und,def,nl $file
787 PrintDefine __BOOT_KERNEL_BIGMEM $bigmem und,def,nl $file
788 PrintDefine __BOOT_KERNEL_HUGEMEM $hugemem und,def,nl $file
789 PrintDefine __BOOT_KERNEL_SMP $smp und,def,nl $file
790 PrintDefine __BOOT_KERNEL_LARGESMP $largesmp und,def,nl $file
791 PrintDefine __BOOT_KERNEL_UP $up und,def,nl $file
792 PrintDefine __BOOT_KERNEL_BOOT $boot und,def,nl $file
793 PrintDefine __BOOT_KERNEL_BOOTSMP $bootsmp und,def,nl $file
795 PrintDefine '"/boot/kernel.h"' "" inc,nl $file # include file
797 for ar in $archlist ; do
798 if [ "$ar" = "$arch" ]; then
799 PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
801 PrintDefine "__MODULE_KERNEL_$ar" "" und $file # undef
806 PrintDefine "" "" end $file
808 if [ %{debugspec} = 1 ] ; then
809 echo "Kernel Configuration File for Red Hat kernels:"
814 config_opts="--enable-redhat-buildsys \
815 %{?_with_bitmap_later:--enable-bitmap-later} \
816 %{?_with_bos_restricted:--enable-bos-restricted-mode} \
817 %{?_with_largefiles:--enable-largefile-fileserver} \
818 %{?_with_supergroups:--enable-supergroups} \
819 --enable-transarc-paths"
823 # If we're using Fedora kmods, work out which is the best kernel module to
824 # use for the userland configuration step. If no variants have been specified,
825 # then use the standard kernel. If variants are specified, use the standard kernel
826 # if it's listed, otherwise pick the first listed kernel.
829 for kvariant in %{kvariants} ; do
830 if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
831 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
832 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
834 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
839 if [ -z "$ksrc" ] ; then
843 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
846 %if %{?krb5config:1}%{!?krb5config:0}
847 KRB5_CONFIG="%{krb5config}"
852 ./configure --with-afs-sysname=${sysname} \
853 --prefix=%{_prefix} \
854 --libdir=%{_libdir} \
855 --bindir=%{_bindir} \
856 --sbindir=%{_sbindir} \
857 --disable-strip-binaries \
858 --with-linux-kernel-packaging \
860 --with-linux-kernel-headers=${ksrc} \
868 # Build the libafs tree
869 make only_libafs_tree || exit 1
871 # Configure each of our kernel modules
873 %if %{fedorakmod} && %{build_modules}
874 for kvariant in %{kvariants} ; do
875 if [ -n "${kvariant}" ] ; then
876 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
877 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
879 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
882 cp -R libafs_tree _kmod_build_${kvariant}
883 pushd _kmod_build_${kvariant}
884 ./configure --with-afs-sysname=${sysname} \
885 --prefix=%{_prefix} \
886 --libdir=%{_libdir} \
887 --bindir=%{_bindir} \
888 --sbindir=%{_sbindir} \
889 --with-linux-kernel-packaging \
890 --with-linux-kernel-headers=${ksrc} \
891 --enable-disconnected \
893 --with-krb5-conf=/usr/kerberos/bin/krb5-config \
902 %if %{build_userspace}
903 # Build the user-space AFS stuff
904 make dest_nolibafs || exit 1
909 for kvariant in %{kvariants}
911 if [ -n "${kvariant}" ] ; then
912 pushd _kmod_build_$kvariant;
916 make dest_only_libafs
921 # Begin legacy kernel module building code
924 # Build all the kernel modules for linux 2.4.x
925 for variation in %{kvariations}
927 if [ ${variation} = up ]
929 local_smp_def=-DREDHAT_FIX
932 local_smp_def="-DAFS_SMP -DREDHAT_FIX"
936 PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
937 make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
938 LINUX_MODULE_NAME="${suffix}" MPS=SP
941 rm -f src/config/redhat-fix.h
943 %elseif %{kvers_is_26}
944 # Build the kernel module for this version of linux 2.6.x
945 # Notice how much easier this is than 2.4. On the other hand,
946 # we require much more external support to build multiple modules.
948 # the MPS=SP just means that we don't add a '.mp' to the name.
949 make dest_only_libafs MPS=SP
952 # End legacy kernel module building code
957 ##############################################################################
961 ##############################################################################
964 export DONT_GPRINTIFY=1
966 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
978 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
984 x86_64) sysname=amd64_linux${kv} ;;
985 alpha*) sysname=alpha_linux_${kv} ;;
986 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
987 *) sysname=%{_arch}_linux${kv} ;;
991 %if %{build_userspace}
992 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
993 mkdir -p $RPM_BUILD_ROOT%{_libdir}
994 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
995 mkdir -p $RPM_BUILD_ROOT%{initdir}
996 mkdir -p $RPM_BUILD_ROOT/etc/openafs
997 mkdir -p $RPM_BUILD_ROOT%{pamdir}
998 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
999 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
1000 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1001 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1002 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1003 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1005 # Copy files from dest to the appropriate places in BuildRoot
1006 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1007 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1008 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1009 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1010 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1012 # Set the executable bit on libraries in libdir, so rpmbuild knows to
1013 # create "Provides" entries in the package metadata for the libraries
1014 chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
1016 # Fix the location of restorevol, since it should be available for
1017 # any user in /usr/bin
1018 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1020 # Link kpasswd to kapasswd
1021 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1023 # Copy root.client config files
1024 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1025 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1026 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1029 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1032 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1033 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1035 # Populate /usr/vice/etc
1036 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1037 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1038 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1039 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1042 # install dkms source
1044 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1045 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1047 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1049 PACKAGE_VERSION="%{dkms_version}"
1051 # Items below here should not have to change with each driver version
1052 PACKAGE_NAME="%{name}"
1053 MAKE[0]="KMODNAME=openafs.ko; DSTKMOD=\\".\\"; [ \\"\\\`echo \\"\${kernelver_array[0]}\\" | sed -e 's/^\\([0-9]*\\.[0-9]*\\)\\..*/\\1/'\\\`\\" = \\"2.4\\" ] && KMODNAME=\\"libafs-*\\" && DSTKMOD=openafs.o; ./configure --enable-disconnected --with-linux-kernel-headers=\${kernel_source_dir} --with-linux-kernel-packaging; make; mv src/libafs/MODLOAD-*/\\\$KMODNAME \\\$DSTKMOD"
1054 CLEAN="make -C src/libafs clean"
1056 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1057 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1064 # install kernel-source
1067 # Install the kernel module source tree
1068 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1069 tar cf - -C libafs_tree . | \
1070 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1072 # Next, copy the LICENSE Files, README
1073 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1074 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1075 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1078 # Install DOCUMENTATION
1081 # Build the DOC directory
1082 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1083 tar cf - -C doc LICENSE html pdf | \
1084 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1085 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1086 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1091 tar cf - -C doc/man-pages man1 man5 man8 | \
1092 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1094 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1096 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1098 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1101 # remove unused man pages
1102 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1103 dkload knfs package runntp symlink symlink_list symlink_make \
1105 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1108 # rename kpasswd to kapasswd
1109 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1112 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1114 # create list of man pages that go in the 'openafs' package
1115 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1116 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|udebug|unlog|^uss|^vos' \
1117 |egrep -v '^afs_compile_et' \
1120 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1121 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1124 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1125 |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1131 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1132 %{_bindir}/afsmonitor
1139 %{_bindir}/pagsh.krb
1141 %{_bindir}/restorevol
1145 %{_bindir}/tokens.krb
1146 %{_bindir}/translate_et
1154 %{_sbindir}/read_tape
1159 EOF-openafs-file-list
1161 # add man pages to the list
1162 cat openafs-man1files \
1163 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1165 cat openafs-man5files \
1166 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1168 cat openafs-man8files \
1169 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1173 # Install compatiblity links
1175 for d in bin:bin etc:sbin; do
1176 olddir=`echo $d | sed 's/:.*$//'`
1177 newdir=`echo $d | sed 's/^.*://'`
1178 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1179 for f in `cat openafs-file-list`; do
1180 if echo $f | grep -q /$newdir/; then
1182 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1188 # Remove files we're not installing
1191 # remove duplicated files from /usr/afs/bin
1192 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1193 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1196 # the rest are not needed.
1197 for f in dlog dpass install knfs livesys xstat_cm_test xstat_fs_test ; do
1198 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1201 # not supported on Linux or duplicated
1202 for f in kdb rmtsysd kpwvalid ; do
1203 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1205 # sometimes install sucks and puts down a directory. kill it all.
1206 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1208 # remove man pages from programs deleted above
1209 for f in 1/dlog 1/dpass 1/livesys 1/xstat_cm_test 1/xstat_fs_test 8/kdb 8/kpwvalid 8/xfs_size_check 1/package_test 5/package 8/package ; do
1210 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1213 # PAM modules are doubly-installed Remove the version we don't need
1214 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1215 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1218 %if !%{build_authlibs}
1219 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1220 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1221 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1222 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1227 %if %{build_modules}
1229 for kvariant in %{kvariants}
1231 if [ -n "$kvariant" ] ; then
1232 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1233 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1234 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1236 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1237 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1240 if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1241 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1242 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1244 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1245 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1250 install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1253 # Install the kernel modules
1254 for variation in %{kvariations}
1256 if [ ${variation} = up ]
1259 modname=openafs${kmodend}
1261 kvar=%{kxmoddir}${variation}
1262 modname=openafs${kmodend}
1265 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1266 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1270 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1275 ##############################################################################
1279 ##############################################################################
1281 rm -f openafs-file-list
1282 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1283 rm -fr $RPM_BUILD_ROOT
1286 ##############################################################################
1290 ##############################################################################
1291 %if %{build_userspace}
1294 if [ -e %{_prefix}/afsws ]; then
1295 /bin/rm -fr %{_prefix}/afsws
1299 chkconfig --add openafs-client
1300 if [ ! -d /afs ]; then
1302 chown root.root /afs
1304 [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1307 # Create the CellServDB
1308 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1310 ( cd /usr/vice/etc ; \
1311 cat CellServDB.local CellServDB.dist > CellServDB ; \
1312 chmod 644 CellServDB )
1315 echo The AFS cache is configured for 100 MB. Edit the
1316 echo /usr/vice/etc/cacheinfo file to change this before
1317 echo running AFS for the first time. You should also
1318 echo set your home cell in /usr/vice/etc/ThisCell.
1320 echo Also, you may want to edit /etc/pam.d/login and
1321 echo possibly others there to get an AFS token on login.
1324 echo auth sufficient %{pamdir}/pam_afs.so try_first_pass ignore_root
1326 echo before the one for pwdb.
1330 #on an upgrade, don't enable if we were disabled
1331 if [ $1 = 1 ] ; then
1332 chkconfig --add openafs-server
1334 %{initdir}/openafs-server condrestart
1336 %if %{build_authlibs}
1345 if [ $1 = 0 ] ; then
1346 [ -d /afs ] && rmdir /afs
1350 if [ $1 = 0 ] ; then
1351 %{initdir}/openafs-client stop
1352 chkconfig --del openafs-client
1356 if [ $1 = 0 ] ; then
1357 %{initdir}/openafs-server stop
1358 chkconfig --del openafs-server
1361 %if %{build_dkmspkg}
1362 %post -n dkms-%{name}
1363 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1364 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1365 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1367 %preun -n dkms-%{name}
1368 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1372 %if %{build_modules}
1376 /sbin/depmod -ae %{kernvers}
1379 /sbin/depmod -ae %{kernvers}
1385 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1388 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1391 %if %{largesmp_package}
1392 %post kernel-largesmp
1393 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1395 %postun kernel-largesmp
1396 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1399 %if %{bigmem_package}
1401 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1403 %postun kernel-bigmem
1404 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1407 %if %{hugemem_package}
1408 %post kernel-hugemem
1409 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1411 %postun kernel-hugemem
1412 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1417 ##############################################################################
1421 ##############################################################################
1422 %if %{build_userspace}
1424 %files -f openafs-file-list
1425 %defattr(-,root,root)
1426 %config /etc/sysconfig/openafs
1427 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1428 %{_libdir}/libafshcrypto.so.*
1429 %{_libdir}/librokenafs.so.*
1432 %defattr(-,root,root)
1433 %docdir %{_docdir}/openafs-%{afsvers}
1434 %dir %{_docdir}/openafs-%{afsvers}
1435 %{_docdir}/openafs-%{afsvers}/ChangeLog
1436 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1437 %{_docdir}/openafs-%{afsvers}/pdf
1440 %defattr(-,root,root)
1441 %dir %{_prefix}/vice
1442 %dir %{_prefix}/vice/cache
1443 %dir %{_prefix}/vice/etc
1444 %dir %{_prefix}/vice/etc/C
1445 %{_prefix}/vice/etc/CellServDB.dist
1446 %config %{_prefix}/vice/etc/ThisCell
1447 %config %{_prefix}/vice/etc/cacheinfo
1451 %{_prefix}/vice/etc/afsd
1452 %{_prefix}/vice/etc/C/afszcm.cat
1453 %{pamdir}/pam_afs.krb.so.1
1454 %{pamdir}/pam_afs.krb.so
1455 %{pamdir}/pam_afs.so.1
1456 %{pamdir}/pam_afs.so
1457 %{initdir}/openafs-client
1458 %{_mandir}/man1/cmdebug.*
1459 %{_mandir}/man1/copyauth.*
1460 %{_mandir}/man1/up.*
1461 %{_mandir}/man5/afs.5.gz
1462 %{_mandir}/man5/afs_cache.5.gz
1463 %{_mandir}/man5/afs_volume_header.5.gz
1464 %{_mandir}/man5/afszcm.cat.5.gz
1465 %{_mandir}/man5/cacheinfo.*
1466 %{_mandir}/man8/afsd.*
1467 %{_mandir}/man8/rmtsysd.*
1468 %{_mandir}/man8/vsys.*
1469 %{_mandir}/man5/CellAlias.*
1472 %defattr(-,root,root)
1474 %dir %{_prefix}/afs/bin
1475 %dir %{_prefix}/afs/etc
1476 %dir %{_prefix}/afs/logs
1477 %{_prefix}/afs/bin/bosserver
1478 %{_prefix}/afs/bin/bos_util
1479 %{_prefix}/afs/bin/buserver
1480 %{_prefix}/afs/bin/dafileserver
1481 %{_prefix}/afs/bin/dafssync-debug
1482 %{_prefix}/afs/bin/dasalvager
1483 %{_prefix}/afs/bin/davolserver
1484 %{_prefix}/afs/bin/fileserver
1485 %{_prefix}/afs/bin/fssync-debug
1486 # Should we support KAServer?
1487 %{_prefix}/afs/bin/kaserver
1488 %{_prefix}/afs/bin/ka-forwarder
1489 %{_prefix}/afs/bin/pt_util
1490 %{_prefix}/afs/bin/ptserver
1491 %{_prefix}/afs/bin/salvager
1492 %{_prefix}/afs/bin/salvageserver
1493 %{_prefix}/afs/bin/salvsync-debug
1494 %{_prefix}/afs/bin/state_analyzer
1495 %{_prefix}/afs/bin/upclient
1496 %{_prefix}/afs/bin/upserver
1497 %{_prefix}/afs/bin/vlserver
1498 %{_prefix}/afs/bin/volinfo
1499 %{_prefix}/afs/bin/volserver
1500 %{_sbindir}/kadb_check
1501 %{_sbindir}/prdb_check
1502 %{_sbindir}/vldb_check
1503 %{_sbindir}/vldb_convert
1505 %{initdir}/openafs-server
1506 %{_mandir}/man5/AuthLog.*
1507 %{_mandir}/man5/BackupLog.*
1508 %{_mandir}/man5/BosConfig.*
1509 %{_mandir}/man5/BosLog.*
1510 %{_mandir}/man5/FORCESALVAGE.*
1511 %{_mandir}/man5/FileLog.*
1512 %{_mandir}/man5/KeyFile.*
1513 %{_mandir}/man5/NetInfo.*
1514 %{_mandir}/man5/NetRestrict.*
1515 %{_mandir}/man5/NoAuth.*
1516 %{_mandir}/man5/SALVAGE.fs.*
1517 %{_mandir}/man5/SalvageLog.*
1518 %{_mandir}/man5/sysid.*
1519 %{_mandir}/man5/UserList.*
1520 %{_mandir}/man5/VLLog.*
1521 %{_mandir}/man5/VolserLog.*
1522 %{_mandir}/man5/bdb.DB0.*
1523 %{_mandir}/man5/fms.log.*
1524 %{_mandir}/man5/kaserver.DB0.*
1525 %{_mandir}/man5/kaserverauxdb.*
1526 %{_mandir}/man5/krb.conf.*
1527 %{_mandir}/man5/krb.excl.*
1528 %{_mandir}/man5/prdb.DB0.*
1529 %{_mandir}/man5/salvage.lock.*
1530 %{_mandir}/man5/tapeconfig.*
1531 %{_mandir}/man5/vldb.DB0.*
1532 %{_mandir}/man8/buserver.*
1533 %{_mandir}/man8/fileserver.*
1534 %{_mandir}/man8/dafileserver.*
1535 %{_mandir}/man8/dasalvager.*
1536 %{_mandir}/man8/davolserver.*
1537 %{_mandir}/man8/kadb_check.*
1538 %{_mandir}/man8/ka-forwarder.*
1539 %{_mandir}/man8/prdb_check.*
1540 %{_mandir}/man8/ptserver.*
1541 %{_mandir}/man8/pt_util.*
1542 %{_mandir}/man8/salvager.*
1543 %{_mandir}/man8/salvageserver.*
1544 %{_mandir}/man8/state_analyzer.*
1545 %{_mandir}/man8/upclient.*
1546 %{_mandir}/man8/upserver.*
1547 %{_mandir}/man8/vldb_check.*
1548 %{_mandir}/man8/vldb_convert.*
1549 %{_mandir}/man8/vlserver.*
1550 %{_mandir}/man8/voldump.*
1551 %{_mandir}/man8/volinfo.*
1552 %{_mandir}/man8/volserver.*
1554 %if %{build_authlibs}
1556 %defattr(-,root,root)
1557 %{_libdir}/libafsauthent.so.*
1558 %{_libdir}/libafsrpc.so.*
1559 %{_libdir}/libkopenafs.so.*
1562 %files authlibs-devel
1563 %defattr(-,root,root)
1564 %{_includedir}/kopenafs.h
1565 %{_libdir}/libafsauthent.a
1566 %{_libdir}/libafscp.a
1567 %{_libdir}/libafsrpc.a
1568 %{_libdir}/libafsauthent_pic.a
1569 %{_libdir}/libafsrpc_pic.a
1570 %{_libdir}/libkopenafs.a
1571 %if %{build_authlibs}
1572 %{_libdir}/libafsauthent.so
1573 %{_libdir}/libafsrpc.so
1574 %{_libdir}/libkopenafs.so
1578 %defattr(-,root,root)
1579 %{_bindir}/afs_compile_et
1582 %{_includedir}/lock.h
1583 %{_includedir}/lwp.h
1584 %{_includedir}/preempt.h
1586 %{_includedir}/timer.h
1587 %{_includedir}/ubik.h
1588 %{_includedir}/ubik_int.h
1590 %{_libdir}/libafshcrypto.a
1591 %{_libdir}/libafshcrypto.so
1593 %{_libdir}/librokenafs.a
1594 %{_libdir}/librokenafs.so
1596 %{_libdir}/librxkad.a
1597 %{_libdir}/librxstat.a
1598 %{_libdir}/libubik.a
1599 %{_mandir}/man1/rxgen.*
1600 %{_mandir}/man1/afs_compile_et.*
1602 %if %{build_dkmspkg}
1603 %files -n dkms-%{name}
1604 %defattr(-,root,root)
1605 %{_prefix}/src/%{name}-%{dkms_version}
1608 %files kernel-source
1609 %defattr(-,root,root)
1610 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1611 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1612 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1613 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1616 %defattr(-,root,root)
1620 %defattr(-,root,root)
1626 %defattr(-,root,root)
1628 %{_bindir}/klog.krb5
1630 %{_mandir}/man1/aklog.*
1631 %{_mandir}/man8/asetkey.*
1636 %if %{build_modules}
1641 %defattr(-,root,root)
1642 %{kxmoddir}/fs/openafs/openafs.*
1647 %defattr(-,root,root)
1648 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1651 %if %{largesmp_package}
1652 %files kernel-largesmp
1653 %defattr(-,root,root)
1654 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1657 %if %{bigmem_package}
1658 %files kernel-bigmem
1659 %defattr(-,root,root)
1660 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1663 %if %{hugemem_package}
1664 %files kernel-hugemem
1665 %defattr(-,root,root)
1666 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1672 ##############################################################################
1674 ### openafs.spec change log
1676 ##############################################################################
1678 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1679 - Make the RPM mockable
1681 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1682 - Update to match the shipped 1.4.5 RPMS
1683 - Fix the kvariant stuff to only configure the 'standard' case once
1684 - Add openafs-kvers.sh back in
1686 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1687 - Use Fedora style kmods, which allows us to install multiple kernel types
1689 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1690 - Use distributed files, rather than those in packager's SOURCE directory
1691 - Remove SuidCells stuff, which was unused
1693 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1694 - integrate s390x changes
1695 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1696 that won't build the .so files.
1698 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1700 - use installed aklog manpage.
1701 - moduleparam patch obsoleted.
1703 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1704 - update to 1.4.2-rc1
1705 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1706 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1707 - don't need the posixlock patch anymore.
1709 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1710 - update to 1.4.2-beta2
1711 - add linux2.4 posixlock API patch
1713 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1714 - moduleparam and krb524 patches no longer required in OA-CVS
1716 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1717 - change non-target-cpu kernel dep to a file dep
1718 - make sure we use the proper kernel version for the dependency.
1720 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1721 - allow users to specify local CellServDB and SuidCells entries
1722 don't overwrite user's changes. Provide a .dist an let users
1723 make entries in a ".local"
1724 - build the CellServDB and SuidCells at client startup and at
1726 - add provideskernelarch functionality to openafs-kvers-is.sh
1727 - use that functionality to Require kernel{,-<type>}-targetcpu
1728 to get better package safety due to RPM bugs where the kernel
1729 release isn't used so you can install the kernel module against
1730 any kernel of the same major version.
1732 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1733 - update the README in openafs-kernel-source
1734 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1735 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1737 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1738 - build requires autoconf and automake for krb5support
1739 and autoconf for standard package
1740 - dont setup the krb5 migration kit (or patches) if we don't care.
1741 - require ncurses-devel to build
1743 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1744 - look for krb524 functions in libkrb524 if we can't find them
1745 in the standard locations.
1747 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1748 - fix the module_param_array macro for Linux 2.6.9.
1750 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1751 - update to 1.4.1 release.
1752 - distribute asetkey from openafs instead of krb5-migration kit
1753 - don't need to apply the FC5 patches because they are part of the distro.
1754 - install asetkey into the "proper" place
1755 - dont list a manpage twice.
1756 - package asetkey man page. delete it when not needed.
1758 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1759 - turn authlibs back on, because RT #18767 was applied to CVS.
1761 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1762 - update to 1.4.1rc10, build on FC5
1763 - fix the man pages (distribute into various packages)
1764 - include patches for FC5, RT #29112 and #29122
1766 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1767 - openafs-server shouldn't depend on the kernel module.
1769 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1770 - patch from Mike Polek <mike at pictage.com> to run depmod for
1771 the target kernel and not the running kernel.
1773 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1774 - build aklog from the openafs sources, not from the krb5 migration kit.
1776 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1777 - set openafs-kernel-source to Provide openafs-kernel
1779 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1780 - update afs-krb5 res_search patch: look for res_search and __res_search
1781 - update to 1.4.0 final
1783 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1784 - remove all kdump builds.
1786 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1787 - fix openafs-kernel-version.sh so it will build an RPM for the
1788 currently-running kernel even if it's smp on 2.6.
1790 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1791 - upgrade to 1.4.0rc5
1792 - turn off authlibs packages
1794 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1795 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1796 it's called "openafs" and not "libafs". This fixes the shutdown
1799 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1800 - update kversis script, add 'kvers' operation
1801 - fix bug that 2.6 smp/hugemem kernels don't provide
1802 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1803 - add patch to remove res_search from the afs-krb5 configure
1805 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1806 - Update to 1.4.0rc4
1807 - Update the afs-krb5 krb524 patch so it actually works on
1808 some older systems like RHEL3 that still need -lkrb524.
1809 - Update the buildall script so choose better architecture support,
1810 e.g. don't build i586 on RHEL.
1811 - Update the rebuild information in the SPEC file.
1812 - Add support for finding .EL kernels in openafs-kvers-is.sh
1813 - Add additional error messages when kernel version/type parsing fails.
1814 - Update the buildall script to use the kernel srcdir directly.
1816 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1817 - Add "hugemem" to 2.4 configs
1818 - Add checks to support scripts to determine whether to build
1819 the bigmem and/or hugemem kernels for 2.4.
1821 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1822 - Added some afs-krb5 patches to get the migration kit to build
1823 on modern AFS and modern Kerberos.
1824 - Added authlibs and authlibs-devel packages as per UMich changes.
1826 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1827 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1829 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1830 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1831 from Red Hat. Initial attempt at a release of 1.4. Still need
1832 to work in a 2.6 build system.