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 %define build_userspace 1
191 %define build_modules 1
192 %ifarch %{ix86} x86_64 ia64
193 %define build_authlibs 1
195 %define build_authlibs 0
199 %if !%{build_userspace_on_cmdline}
200 %define build_userspace 0
202 %if !%{build_modules_on_cmdline}
203 %define build_modules 0
207 %if !%{build_authlibs_on_cmdline}
208 %if %{build_userspace_on_cmdline}
209 %define build_authlibs 1
211 %define build_authlibs 0
215 # Make sure RPM doesn't complain about installed but non-packaged files.
216 #define __check_files %{nil}
218 Summary: OpenAFS distributed filesystem
221 Release: %{pkgrel}%{?dist}
222 License: IBM Public License
223 URL: http://www.openafs.org
224 BuildRoot: %{_tmppath}/%{name}-%{version}-root
225 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
226 Group: Networking/Filesystems
227 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
228 BuildRequires: perl-devel perl-ExtUtils-Embed
230 BuildRequires: krb5-devel
232 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
234 # http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
235 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
236 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
237 %define srcdir openafs-%{afsvers}
239 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
240 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
242 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2010-12-13
244 Source30: openafs-kernel-version.sh
245 Source996: openafs-kvers-is.sh
246 Source997: openafs-buildfedora.pl
247 Source998: openafs-buildall.sh
248 Source999: openafs-kmodtool
251 The AFS distributed filesystem. AFS is a distributed filesystem
252 allowing cross-platform sharing of files among multiple computers.
253 Facilities are provided for access control, authentication, backup and
254 administrative management.
256 This package provides common files shared across all the various
257 OpenAFS packages but are not necessarily tied to a client or server.
259 The OpenAFS SRPM can be rebuilt with the following options to control
262 --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version
263 to build modules against. The default is
264 to build against the currently-running
266 --define "kbase /lib/modules/" The base location to look for kernel headers
267 --define "kend /build" The 'end' location to look for kernels
268 The build will define ksrvdir as
269 %%{kbase}<kernvers>%%{kend}
271 --without krb5 Disable krb5 support (default: with krb5)
272 --with bitmap-later Enable "bitmap later" support
273 --with bos-restricted Enable "bos restricted" mode
274 --with largefiles Enable "largefile fileserver" mode
275 --with supergroups Enable "supergroups"
277 --target=i386 The target architecture to build for.
278 When building for a non-default target
279 the build may choose whether to build
280 userspace or kernel modules automatically.
281 The defaults are probably what you want.
283 --define "build_userspace 1" Request building of userspace tools
284 --define "build_modules 1" Request building of kernel modules
285 You probably never need to specify these.
287 --define "kmoddir /lib/modules" This is the base location where modules
288 will be installed. You probably don't
289 need to change this ever.
291 --define "fedorakmod 0" Disable the building of 'Fedora' style kernel
292 modules, and use the old format.
294 --define "kvariants <variants>" When building Fedora style kernel modules,
295 this defines the set of kernel variants
297 <variants> is a space seperated list which
298 may contain one or more of
299 '' (for the generic kernel), smp, PAE, xen
302 To a kernel module for your running kernel, just run:
303 rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
305 ##############################################################################
307 # build the userspace side of things if so requested
309 ##############################################################################
310 %if %{build_userspace}
313 Requires: binutils, openafs = %{version}
316 Requires: %{name}-kmod >= %{version}
317 Provides: %{name}-kmod-common = %{version}
319 Requires: openafs-kernel
322 Summary: OpenAFS Filesystem Client
323 Group: Networking/Filesystem
326 The AFS distributed filesystem. AFS is a distributed filesystem
327 allowing cross-platform sharing of files among multiple computers.
328 Facilities are provided for access control, authentication, backup and
329 administrative management.
331 This package provides basic client support to mount and manipulate
335 Requires: openafs = %{version}
336 Summary: OpenAFS Filesystem Server
337 Group: Networking/Filesystems
340 The AFS distributed filesystem. AFS is a distributed filesystem
341 allowing cross-platform sharing of files among multiple computers.
342 Facilities are provided for access control, authentication, backup and
343 administrative management.
345 This package provides basic server support to host files in an AFS
349 %package -n dkms-%{name}
350 Summary: DKMS-ready kernel source for AFS distributed filesystem
351 Group: Development/Kernel
352 Provides: openafs-kernel = %{version}
354 Provides: %{name}-kmod = %{version}
359 Requires: %{name}-kmod-common = %{version}
361 %description -n dkms-%{name}
362 The AFS distributed filesystem. AFS is a distributed filesystem
363 allowing cross-platform sharing of files among multiple computers.
364 Facilities are provided for access control, authentication, backup and
365 administrative management.
367 This package provides the source code to allow DKMS to build an
371 %if %{build_authlibs}
373 Summary: OpenAFS authentication shared libraries
374 Group: Networking/Filesystems
376 %description authlibs
377 The AFS distributed filesystem. AFS is a distributed filesystem
378 allowing cross-platform sharing of files among multiple computers.
379 Facilities are provided for access control, authentication, backup and
380 administrative management.
382 This package provides a shared version of libafsrpc and libafsauthent.
383 None of the programs included with OpenAFS currently use these shared
384 libraries; however, third-party software that wishes to perform AFS
385 authentication may link against them.
388 %package authlibs-devel
389 %if %{build_authlibs}
390 Requires: openafs-authlibs = %{version}-%{release}
392 Requires: openafs-devel = %{version}-%{release}
393 Summary: OpenAFS shared library development
394 Group: Development/Filesystems
396 %description authlibs-devel
397 The AFS distributed filesystem. AFS is a distributed filesystem
398 allowing cross-platform sharing of files among multiple computers.
399 Facilities are provided for access control, authentication, backup and
400 administrative management.
402 This package includes the static versions of libafsrpc and
403 libafsauthent, and symlinks required for building against the dynamic
407 Summary: OpenAFS Development Libraries and Headers
408 Group: Development/Filesystems
409 Requires: openafs = %{version}-%{release}
412 The AFS distributed filesystem. AFS is a distributed filesystem
413 allowing cross-platform sharing of files among multiple computers.
414 Facilities are provided for access control, authentication, backup and
415 administrative management.
417 This package provides static development libraries and headers needed
418 to compile AFS applications. Note: AFS currently does not provide
422 Summary: OpenAFS user and administrator documentation
423 Requires: openafs = %{version}-%{release}
424 Group: Networking/Filesystems
427 The AFS distributed filesystem. AFS is a distributed filesystem
428 allowing cross-platform sharing of files among multiple computers.
429 Facilities are provided for access control, authentication, backup and
430 administrative management.
432 This package provides HTML documentation for OpenAFS users and system
435 %package kernel-source
436 Summary: OpenAFS Kernel Module source tree
437 Group: Networking/Filesystems
438 Provides: openafs-kernel = %{version}
440 Provides: %{name}-kmod = %{version}
443 %description kernel-source
444 The AFS distributed filesystem. AFS is a distributed filesystem
445 allowing cross-platform sharing of files among multiple computers.
446 Facilities are provided for access control, authentication, backup and
447 administrative management.
449 This package provides the source code to build your own AFS kernel
453 Summary: OpenAFS client compatibility symlinks
454 Requires: openafs = %{version}, openafs-client = %{version}
455 Group: Networking/Filesystems
456 Obsoletes: openafs-client-compat
459 The AFS distributed filesystem. AFS is a distributed filesystem
460 allowing cross-platform sharing of files among multiple computers.
461 Facilities are provided for access control, authentication, backup and
462 administrative management.
464 This package provides compatibility symlinks in /usr/afsws. It is
465 completely optional, and is only necessary to support legacy
466 applications and scripts that hard-code the location of AFS client
470 Summary: OpenAFS KA kpasswd support
472 Group: Networking/Filesystems
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 the compatibility symlink for kpasswd, in case
481 you are using KAserver instead of Krb5.
485 Summary: OpenAFS programs to use with krb5
486 Requires: openafs = %{version}
487 Group: Networking/Filesystems
488 BuildRequires: krb5-devel
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 compatibility programs so you can use krb5
497 to authenticate to AFS services, instead of using AFS's homegrown
498 krb4 lookalike services.
503 ##############################################################################
505 # build the kernel modules if so requested
507 ##############################################################################
511 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
515 # Legacy kernel compilation code here ...
516 %define modkversion %(echo %{kernvers} | cut -d- -f1)
517 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
518 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
522 Summary: OpenAFS Kernel Module (compiled for UP)
523 Release: %{modpkgrel}
524 Group: Networking/Filesystems
525 Provides: openafs-kernel = %{version}
527 Requires: kernel-%{_target_cpu} = %{kversion}
529 Requires: /boot/config-%{kernvers}
533 The AFS distributed filesystem. AFS is a distributed filesystem
534 allowing cross-platform sharing of files among multiple computers.
535 Facilities are provided for access control, authentication, backup and
536 administrative management.
538 This package provides a precompiled AFS kernel module for %{kernvers}.
543 Summary: OpenAFS Kernel Module (compiled for SMP)
544 Release: %{modpkgrel}
545 Provides: openafs-kernel = %{version}
547 Requires: kernel-smp-%{_target_cpu} = %{kversion}
549 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
551 Group: Networking/Filesystems
553 %description kernel-smp
554 The AFS distributed filesystem. AFS is a distributed filesystem
555 allowing cross-platform sharing of files among multiple computers.
556 Facilities are provided for access control, authentication, backup and
557 administrative management.
559 This package provides a precompiled AFS kernel module for %{kernvers}.
562 %if %{largesmp_package}
563 %package kernel-largesmp
564 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
565 Release: %{modpkgrel}
566 Provides: openafs-kernel = %{version}
568 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
570 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
572 Group: Networking/Filesystems
574 %description kernel-largesmp
575 The AFS distributed filesystem. AFS is a distributed filesystem
576 allowing cross-platform sharing of files among multiple computers.
577 Facilities are provided for access control, authentication, backup and
578 administrative management.
580 This package provides a precompiled AFS kernel module for %{kernvers}.
583 %if %{bigmem_package}
584 %package kernel-bigmem
585 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
586 Release: %{modpkgrel}
587 Provides: openafs-kernel = %{version}
589 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
591 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
593 Group: Networking/Filesystems
595 %description kernel-bigmem
596 The AFS distributed filesystem. AFS is a distributed filesystem
597 allowing cross-platform sharing of files among multiple computers.
598 Facilities are provided for access control, authentication, backup and
599 administrative management.
601 This package provides a precompiled AFS kernel module for %{kernvers}.
604 %if %{hugemem_package}
605 %package kernel-hugemem
606 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
607 Release: %{modpkgrel}
608 Provides: openafs-kernel = %{version}
610 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
612 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
614 Group: Networking/Filesystems
616 %description kernel-hugemem
617 The AFS distributed filesystem. AFS is a distributed filesystem
618 allowing cross-platform sharing of files among multiple computers.
619 Facilities are provided for access control, authentication, backup and
620 administrative management.
622 This package provides a precompiled AFS kernel module for %{kernvers}.
626 # End legacy kernel compilation code ...
629 ##############################################################################
633 ##############################################################################
637 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
639 : @@@ kernel version: %{kernvers}
641 : @@@ kernel variations: %{kvariants}
643 : @@@ base kernel version:%{kversion}
644 : @@@ kernel modules dir: %{kxmoddir}
645 : @@@ kernel source dir: %{ksrcdir}
647 : @@@ kernel variations: %{kvariations}
650 : @@@ kernel type: up
652 : @@@ kernel type: %{ktype}
656 : @@@ PAM modules dir: %{pamdir}
657 : @@@ build userspace: %{build_userspace}
658 : @@@ build modules: %{build_modules}
660 : @@@ target cpu: %{_target_cpu}
662 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
664 # Install OpenAFS src and doc
665 #%setup -q -n %{srcdir}
666 %setup -q -b 1 -n %{srcdir}
668 ##############################################################################
672 ##############################################################################
683 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
689 x86_64) sysname=amd64_linux${kv} ;;
690 alpha*) sysname=alpha_linux_${kv} ;;
691 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
692 *) sysname=%{_arch}_linux${kv} ;;
696 archlist="i386 i586 i686 athlon"
697 %if %{bootkernelsupport}
698 archlist="${archlist} BOOT"
705 # PrintDefine var value statements file
710 echo "#ifndef $1" >> $4
715 echo "#undef $1" >> $4
720 echo "#define $1 $2" >> $4
730 echo "#include $1" >> $4
740 # PrintRedhatKernelFix arch mp file
741 PrintRedhatKernelFix() {
755 largesmp) largesmp=1;;
759 echo "$2 not supported"
768 PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
770 PrintDefine __BOOT_KERNEL_ENTERPRISE $ent und,def,nl $file
771 PrintDefine __BOOT_KERNEL_BIGMEM $bigmem und,def,nl $file
772 PrintDefine __BOOT_KERNEL_HUGEMEM $hugemem und,def,nl $file
773 PrintDefine __BOOT_KERNEL_SMP $smp und,def,nl $file
774 PrintDefine __BOOT_KERNEL_LARGESMP $largesmp und,def,nl $file
775 PrintDefine __BOOT_KERNEL_UP $up und,def,nl $file
776 PrintDefine __BOOT_KERNEL_BOOT $boot und,def,nl $file
777 PrintDefine __BOOT_KERNEL_BOOTSMP $bootsmp und,def,nl $file
779 PrintDefine '"/boot/kernel.h"' "" inc,nl $file # include file
781 for ar in $archlist ; do
782 if [ "$ar" = "$arch" ]; then
783 PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
785 PrintDefine "__MODULE_KERNEL_$ar" "" und $file # undef
790 PrintDefine "" "" end $file
792 if [ %{debugspec} = 1 ] ; then
793 echo "Kernel Configuration File for Red Hat kernels:"
798 config_opts="--enable-redhat-buildsys \
799 %{?_with_bitmap_later:--enable-bitmap-later} \
800 %{?_with_bos_restricted:--enable-bos-restricted-mode} \
801 %{?_with_largefiles:--enable-largefile-fileserver} \
802 %{?_with_supergroups:--enable-supergroups} \
803 --enable-transarc-paths"
807 # If we're using Fedora kmods, work out which is the best kernel module to
808 # use for the userland configuration step. If no variants have been specified,
809 # then use the standard kernel. If variants are specified, use the standard kernel
810 # if it's listed, otherwise pick the first listed kernel.
813 for kvariant in %{kvariants} ; do
814 if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
815 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
816 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
818 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
823 if [ -z "$ksrc" ] ; then
827 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
830 %if %{?krb5config:1}%{!?krb5config:0}
831 KRB5_CONFIG="%{krb5config}"
836 ./configure --with-afs-sysname=${sysname} \
837 --prefix=%{_prefix} \
838 --libdir=%{_libdir} \
839 --bindir=%{_bindir} \
840 --sbindir=%{_sbindir} \
841 --disable-strip-binaries \
842 --with-linux-kernel-packaging \
844 --with-linux-kernel-headers=${ksrc} \
852 # Build the libafs tree
853 make only_libafs_tree || exit 1
855 # Configure each of our kernel modules
857 %if %{fedorakmod} && %{build_modules}
858 for kvariant in %{kvariants} ; do
859 if [ -n "${kvariant}" ] ; then
860 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
861 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
863 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
866 cp -R libafs_tree _kmod_build_${kvariant}
867 pushd _kmod_build_${kvariant}
868 ./configure --with-afs-sysname=${sysname} \
869 --prefix=%{_prefix} \
870 --libdir=%{_libdir} \
871 --bindir=%{_bindir} \
872 --sbindir=%{_sbindir} \
873 --with-linux-kernel-packaging \
874 --with-linux-kernel-headers=${ksrc} \
875 --enable-disconnected \
877 --with-krb5-conf=/usr/kerberos/bin/krb5-config \
886 %if %{build_userspace}
887 # Build the user-space AFS stuff
888 make dest_nolibafs || exit 1
893 for kvariant in %{kvariants}
895 if [ -n "${kvariant}" ] ; then
896 pushd _kmod_build_$kvariant;
900 make dest_only_libafs
905 # Begin legacy kernel module building code
908 # Build all the kernel modules for linux 2.4.x
909 for variation in %{kvariations}
911 if [ ${variation} = up ]
913 local_smp_def=-DREDHAT_FIX
916 local_smp_def="-DAFS_SMP -DREDHAT_FIX"
920 PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
921 make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
922 LINUX_MODULE_NAME="${suffix}" MPS=SP
925 rm -f src/config/redhat-fix.h
927 %elseif %{kvers_is_26}
928 # Build the kernel module for this version of linux 2.6.x
929 # Notice how much easier this is than 2.4. On the other hand,
930 # we require much more external support to build multiple modules.
932 # the MPS=SP just means that we don't add a '.mp' to the name.
933 make dest_only_libafs MPS=SP
936 # End legacy kernel module building code
941 ##############################################################################
945 ##############################################################################
948 export DONT_GPRINTIFY=1
950 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
962 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
968 x86_64) sysname=amd64_linux${kv} ;;
969 alpha*) sysname=alpha_linux_${kv} ;;
970 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
971 *) sysname=%{_arch}_linux${kv} ;;
975 %if %{build_userspace}
976 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
977 mkdir -p $RPM_BUILD_ROOT%{_libdir}
978 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
979 mkdir -p $RPM_BUILD_ROOT%{initdir}
980 mkdir -p $RPM_BUILD_ROOT/etc/openafs
981 mkdir -p $RPM_BUILD_ROOT%{pamdir}
982 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
983 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
984 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
985 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
986 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
987 mkdir -p $RPM_BUILD_ROOT%{_mandir}
989 # Copy files from dest to the appropriate places in BuildRoot
990 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
991 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
992 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
993 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
994 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
996 # Set the executable bit on libraries in libdir, so rpmbuild knows to
997 # create "Provides" entries in the package metadata for the libraries
998 chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
1000 # Fix the location of restorevol, since it should be available for
1001 # any user in /usr/bin
1002 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1004 # Link kpasswd to kapasswd
1005 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1007 # Copy root.client config files
1008 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1009 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1010 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1013 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1016 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1017 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1019 # Populate /usr/vice/etc
1020 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1021 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1022 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1023 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1026 # install dkms source
1028 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1029 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1031 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1033 PACKAGE_VERSION="%{dkms_version}"
1035 # Items below here should not have to change with each driver version
1036 PACKAGE_NAME="%{name}"
1037 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"
1038 CLEAN="make -C src/libafs clean"
1040 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1041 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1048 # install kernel-source
1051 # Install the kernel module source tree
1052 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1053 tar cf - -C libafs_tree . | \
1054 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1056 # Next, copy the LICENSE Files, README
1057 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1058 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1059 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1062 # Install DOCUMENTATION
1065 # Build the DOC directory
1066 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1067 tar cf - -C doc LICENSE html pdf | \
1068 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1069 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1070 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1075 tar cf - -C doc/man-pages man1 man5 man8 | \
1076 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1078 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1080 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1082 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1085 # remove unused man pages
1086 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1087 dkload knfs package runntp symlink symlink_list symlink_make \
1089 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1092 # rename kpasswd to kapasswd
1093 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1096 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1098 # create list of man pages that go in the 'openafs' package
1099 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1100 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|udebug|unlog|^uss|^vos' \
1101 |egrep -v '^afs_compile_et' \
1104 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1105 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1108 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1109 |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1115 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1116 %{_bindir}/afsmonitor
1123 %{_bindir}/pagsh.krb
1125 %{_bindir}/restorevol
1129 %{_bindir}/tokens.krb
1130 %{_bindir}/translate_et
1138 %{_sbindir}/read_tape
1143 EOF-openafs-file-list
1145 # add man pages to the list
1146 cat openafs-man1files \
1147 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1149 cat openafs-man5files \
1150 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1152 cat openafs-man8files \
1153 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1157 # Install compatiblity links
1159 for d in bin:bin etc:sbin; do
1160 olddir=`echo $d | sed 's/:.*$//'`
1161 newdir=`echo $d | sed 's/^.*://'`
1162 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1163 for f in `cat openafs-file-list`; do
1164 if echo $f | grep -q /$newdir/; then
1166 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1172 # Remove files we're not installing
1175 # remove duplicated files from /usr/afs/bin
1176 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1177 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1180 # the rest are not needed.
1181 for f in dlog dpass install knfs livesys xstat_cm_test xstat_fs_test ; do
1182 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1185 # not supported on Linux or duplicated
1186 for f in kdb rmtsysd kpwvalid ; do
1187 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1189 # sometimes install sucks and puts down a directory. kill it all.
1190 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1192 # remove man pages from programs deleted above
1193 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
1194 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1197 # PAM modules are doubly-installed Remove the version we don't need
1198 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1199 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1202 %if !%{build_authlibs}
1203 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1204 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1205 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1206 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1211 %if %{build_modules}
1213 for kvariant in %{kvariants}
1215 if [ -n "$kvariant" ] ; then
1216 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1217 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1218 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1220 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1221 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1224 if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1225 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1226 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1228 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1229 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1234 install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1237 # Install the kernel modules
1238 for variation in %{kvariations}
1240 if [ ${variation} = up ]
1243 modname=openafs${kmodend}
1245 kvar=%{kxmoddir}${variation}
1246 modname=openafs${kmodend}
1249 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1250 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1254 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1259 ##############################################################################
1263 ##############################################################################
1265 rm -f openafs-file-list
1266 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1267 rm -fr $RPM_BUILD_ROOT
1270 ##############################################################################
1274 ##############################################################################
1275 %if %{build_userspace}
1278 if [ -e %{_prefix}/afsws ]; then
1279 /bin/rm -fr %{_prefix}/afsws
1283 chkconfig --add openafs-client
1284 if [ ! -d /afs ]; then
1286 chown root.root /afs
1288 [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1291 # Create the CellServDB
1292 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1294 ( cd /usr/vice/etc ; \
1295 cat CellServDB.local CellServDB.dist > CellServDB ; \
1296 chmod 644 CellServDB )
1299 echo The AFS cache is configured for 100 MB. Edit the
1300 echo /usr/vice/etc/cacheinfo file to change this before
1301 echo running AFS for the first time. You should also
1302 echo set your home cell in /usr/vice/etc/ThisCell.
1304 echo Also, you may want to edit /etc/pam.d/login and
1305 echo possibly others there to get an AFS token on login.
1308 echo auth sufficient %{pamdir}/pam_afs.so try_first_pass ignore_root
1310 echo before the one for pwdb.
1314 #on an upgrade, don't enable if we were disabled
1315 if [ $1 = 1 ] ; then
1316 chkconfig --add openafs-server
1318 %{initdir}/openafs-server condrestart
1320 %if %{build_authlibs}
1329 if [ $1 = 0 ] ; then
1330 [ -d /afs ] && rmdir /afs
1334 if [ $1 = 0 ] ; then
1335 %{initdir}/openafs-client stop
1336 chkconfig --del openafs-client
1340 if [ $1 = 0 ] ; then
1341 %{initdir}/openafs-server stop
1342 chkconfig --del openafs-server
1345 %if %{build_dkmspkg}
1346 %post -n dkms-%{name}
1347 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1348 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1349 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1351 %preun -n dkms-%{name}
1352 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1356 %if %{build_modules}
1360 /sbin/depmod -ae %{kernvers}
1363 /sbin/depmod -ae %{kernvers}
1369 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1372 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1375 %if %{largesmp_package}
1376 %post kernel-largesmp
1377 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1379 %postun kernel-largesmp
1380 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1383 %if %{bigmem_package}
1385 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1387 %postun kernel-bigmem
1388 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1391 %if %{hugemem_package}
1392 %post kernel-hugemem
1393 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1395 %postun kernel-hugemem
1396 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1401 ##############################################################################
1405 ##############################################################################
1406 %if %{build_userspace}
1408 %files -f openafs-file-list
1409 %defattr(-,root,root)
1410 %config /etc/sysconfig/openafs
1411 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1412 %{_libdir}/libafshcrypto.so.*
1413 %{_libdir}/librokenafs.so.*
1416 %defattr(-,root,root)
1417 %docdir %{_docdir}/openafs-%{afsvers}
1418 %dir %{_docdir}/openafs-%{afsvers}
1419 %{_docdir}/openafs-%{afsvers}/ChangeLog
1420 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1421 %{_docdir}/openafs-%{afsvers}/pdf
1424 %defattr(-,root,root)
1425 %dir %{_prefix}/vice
1426 %dir %{_prefix}/vice/cache
1427 %dir %{_prefix}/vice/etc
1428 %dir %{_prefix}/vice/etc/C
1429 %{_prefix}/vice/etc/CellServDB.dist
1430 %config %{_prefix}/vice/etc/ThisCell
1431 %config %{_prefix}/vice/etc/cacheinfo
1435 %{_prefix}/vice/etc/afsd
1436 %{_prefix}/vice/etc/C/afszcm.cat
1437 %{pamdir}/pam_afs.krb.so.1
1438 %{pamdir}/pam_afs.krb.so
1439 %{pamdir}/pam_afs.so.1
1440 %{pamdir}/pam_afs.so
1441 %{initdir}/openafs-client
1442 %{_mandir}/man1/cmdebug.*
1443 %{_mandir}/man1/copyauth.*
1444 %{_mandir}/man1/up.*
1445 %{_mandir}/man5/afs.5.gz
1446 %{_mandir}/man5/afs_cache.5.gz
1447 %{_mandir}/man5/afs_volume_header.5.gz
1448 %{_mandir}/man5/afszcm.cat.5.gz
1449 %{_mandir}/man5/cacheinfo.*
1450 %{_mandir}/man8/afsd.*
1451 %{_mandir}/man8/rmtsysd.*
1452 %{_mandir}/man8/vsys.*
1453 %{_mandir}/man5/CellAlias.*
1456 %defattr(-,root,root)
1458 %dir %{_prefix}/afs/bin
1459 %dir %{_prefix}/afs/etc
1460 %dir %{_prefix}/afs/logs
1461 %{_prefix}/afs/bin/bosserver
1462 %{_prefix}/afs/bin/bos_util
1463 %{_prefix}/afs/bin/buserver
1464 %{_prefix}/afs/bin/dafileserver
1465 %{_prefix}/afs/bin/dafssync-debug
1466 %{_prefix}/afs/bin/dasalvager
1467 %{_prefix}/afs/bin/davolserver
1468 %{_prefix}/afs/bin/fileserver
1469 %{_prefix}/afs/bin/fssync-debug
1470 # Should we support KAServer?
1471 %{_prefix}/afs/bin/kaserver
1472 %{_prefix}/afs/bin/ka-forwarder
1473 %{_prefix}/afs/bin/pt_util
1474 %{_prefix}/afs/bin/ptserver
1475 %{_prefix}/afs/bin/salvager
1476 %{_prefix}/afs/bin/salvageserver
1477 %{_prefix}/afs/bin/salvsync-debug
1478 %{_prefix}/afs/bin/state_analyzer
1479 %{_prefix}/afs/bin/upclient
1480 %{_prefix}/afs/bin/upserver
1481 %{_prefix}/afs/bin/vlserver
1482 %{_prefix}/afs/bin/volinfo
1483 %{_prefix}/afs/bin/volserver
1484 %{_sbindir}/kadb_check
1485 %{_sbindir}/prdb_check
1486 %{_sbindir}/vldb_check
1487 %{_sbindir}/vldb_convert
1489 %{initdir}/openafs-server
1490 %{_mandir}/man5/AuthLog.*
1491 %{_mandir}/man5/BackupLog.*
1492 %{_mandir}/man5/BosConfig.*
1493 %{_mandir}/man5/BosLog.*
1494 %{_mandir}/man5/FORCESALVAGE.*
1495 %{_mandir}/man5/FileLog.*
1496 %{_mandir}/man5/KeyFile.*
1497 %{_mandir}/man5/NetInfo.*
1498 %{_mandir}/man5/NetRestrict.*
1499 %{_mandir}/man5/NoAuth.*
1500 %{_mandir}/man5/SALVAGE.fs.*
1501 %{_mandir}/man5/SalvageLog.*
1502 %{_mandir}/man5/sysid.*
1503 %{_mandir}/man5/UserList.*
1504 %{_mandir}/man5/VLLog.*
1505 %{_mandir}/man5/VolserLog.*
1506 %{_mandir}/man5/bdb.DB0.*
1507 %{_mandir}/man5/fms.log.*
1508 %{_mandir}/man5/kaserver.DB0.*
1509 %{_mandir}/man5/kaserverauxdb.*
1510 %{_mandir}/man5/krb.conf.*
1511 %{_mandir}/man5/krb.excl.*
1512 %{_mandir}/man5/prdb.DB0.*
1513 %{_mandir}/man5/salvage.lock.*
1514 %{_mandir}/man5/tapeconfig.*
1515 %{_mandir}/man5/vldb.DB0.*
1516 %{_mandir}/man8/buserver.*
1517 %{_mandir}/man8/fileserver.*
1518 %{_mandir}/man8/dafileserver.*
1519 %{_mandir}/man8/dasalvager.*
1520 %{_mandir}/man8/davolserver.*
1521 %{_mandir}/man8/kadb_check.*
1522 %{_mandir}/man8/ka-forwarder.*
1523 %{_mandir}/man8/prdb_check.*
1524 %{_mandir}/man8/ptserver.*
1525 %{_mandir}/man8/pt_util.*
1526 %{_mandir}/man8/salvager.*
1527 %{_mandir}/man8/salvageserver.*
1528 %{_mandir}/man8/state_analyzer.*
1529 %{_mandir}/man8/upclient.*
1530 %{_mandir}/man8/upserver.*
1531 %{_mandir}/man8/vldb_check.*
1532 %{_mandir}/man8/vldb_convert.*
1533 %{_mandir}/man8/vlserver.*
1534 %{_mandir}/man8/voldump.*
1535 %{_mandir}/man8/volinfo.*
1536 %{_mandir}/man8/volserver.*
1538 %if %{build_authlibs}
1540 %defattr(-,root,root)
1541 %{_libdir}/libafsauthent.so.*
1542 %{_libdir}/libafsrpc.so.*
1543 %{_libdir}/libkopenafs.so.*
1546 %files authlibs-devel
1547 %defattr(-,root,root)
1548 %{_includedir}/kopenafs.h
1549 %{_libdir}/libafsauthent.a
1550 %{_libdir}/libafscp.a
1551 %{_libdir}/libafsrpc.a
1552 %{_libdir}/libafsauthent_pic.a
1553 %{_libdir}/libafsrpc_pic.a
1554 %{_libdir}/libkopenafs.a
1555 %if %{build_authlibs}
1556 %{_libdir}/libafsauthent.so
1557 %{_libdir}/libafsrpc.so
1558 %{_libdir}/libkopenafs.so
1562 %defattr(-,root,root)
1563 %{_bindir}/afs_compile_et
1566 %{_includedir}/lock.h
1567 %{_includedir}/lwp.h
1568 %{_includedir}/preempt.h
1570 %{_includedir}/timer.h
1571 %{_includedir}/ubik.h
1572 %{_includedir}/ubik_int.h
1574 %{_libdir}/libafshcrypto.a
1575 %{_libdir}/libafshcrypto.so
1577 %{_libdir}/librokenafs.a
1578 %{_libdir}/librokenafs.so
1580 %{_libdir}/librxkad.a
1581 %{_libdir}/librxstat.a
1582 %{_libdir}/libubik.a
1583 %{_mandir}/man1/rxgen.*
1584 %{_mandir}/man1/afs_compile_et.*
1586 %if %{build_dkmspkg}
1587 %files -n dkms-%{name}
1588 %defattr(-,root,root)
1589 %{_prefix}/src/%{name}-%{dkms_version}
1592 %files kernel-source
1593 %defattr(-,root,root)
1594 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1595 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1596 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1597 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1600 %defattr(-,root,root)
1604 %defattr(-,root,root)
1610 %defattr(-,root,root)
1612 %{_bindir}/klog.krb5
1614 %{_mandir}/man1/aklog.*
1615 %{_mandir}/man8/asetkey.*
1620 %if %{build_modules}
1625 %defattr(-,root,root)
1626 %{kxmoddir}/fs/openafs/openafs.*
1631 %defattr(-,root,root)
1632 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1635 %if %{largesmp_package}
1636 %files kernel-largesmp
1637 %defattr(-,root,root)
1638 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1641 %if %{bigmem_package}
1642 %files kernel-bigmem
1643 %defattr(-,root,root)
1644 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1647 %if %{hugemem_package}
1648 %files kernel-hugemem
1649 %defattr(-,root,root)
1650 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1656 ##############################################################################
1658 ### openafs.spec change log
1660 ##############################################################################
1662 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1663 - Make the RPM mockable
1665 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1666 - Update to match the shipped 1.4.5 RPMS
1667 - Fix the kvariant stuff to only configure the 'standard' case once
1668 - Add openafs-kvers.sh back in
1670 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1671 - Use Fedora style kmods, which allows us to install multiple kernel types
1673 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1674 - Use distributed files, rather than those in packager's SOURCE directory
1675 - Remove SuidCells stuff, which was unused
1677 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1678 - integrate s390x changes
1679 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1680 that won't build the .so files.
1682 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1684 - use installed aklog manpage.
1685 - moduleparam patch obsoleted.
1687 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1688 - update to 1.4.2-rc1
1689 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1690 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1691 - don't need the posixlock patch anymore.
1693 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1694 - update to 1.4.2-beta2
1695 - add linux2.4 posixlock API patch
1697 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1698 - moduleparam and krb524 patches no longer required in OA-CVS
1700 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1701 - change non-target-cpu kernel dep to a file dep
1702 - make sure we use the proper kernel version for the dependency.
1704 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1705 - allow users to specify local CellServDB and SuidCells entries
1706 don't overwrite user's changes. Provide a .dist an let users
1707 make entries in a ".local"
1708 - build the CellServDB and SuidCells at client startup and at
1710 - add provideskernelarch functionality to openafs-kvers-is.sh
1711 - use that functionality to Require kernel{,-<type>}-targetcpu
1712 to get better package safety due to RPM bugs where the kernel
1713 release isn't used so you can install the kernel module against
1714 any kernel of the same major version.
1716 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1717 - update the README in openafs-kernel-source
1718 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1719 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1721 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1722 - build requires autoconf and automake for krb5support
1723 and autoconf for standard package
1724 - dont setup the krb5 migration kit (or patches) if we don't care.
1725 - require ncurses-devel to build
1727 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1728 - look for krb524 functions in libkrb524 if we can't find them
1729 in the standard locations.
1731 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1732 - fix the module_param_array macro for Linux 2.6.9.
1734 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1735 - update to 1.4.1 release.
1736 - distribute asetkey from openafs instead of krb5-migration kit
1737 - don't need to apply the FC5 patches because they are part of the distro.
1738 - install asetkey into the "proper" place
1739 - dont list a manpage twice.
1740 - package asetkey man page. delete it when not needed.
1742 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1743 - turn authlibs back on, because RT #18767 was applied to CVS.
1745 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1746 - update to 1.4.1rc10, build on FC5
1747 - fix the man pages (distribute into various packages)
1748 - include patches for FC5, RT #29112 and #29122
1750 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1751 - openafs-server shouldn't depend on the kernel module.
1753 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1754 - patch from Mike Polek <mike at pictage.com> to run depmod for
1755 the target kernel and not the running kernel.
1757 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1758 - build aklog from the openafs sources, not from the krb5 migration kit.
1760 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1761 - set openafs-kernel-source to Provide openafs-kernel
1763 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1764 - update afs-krb5 res_search patch: look for res_search and __res_search
1765 - update to 1.4.0 final
1767 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1768 - remove all kdump builds.
1770 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1771 - fix openafs-kernel-version.sh so it will build an RPM for the
1772 currently-running kernel even if it's smp on 2.6.
1774 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1775 - upgrade to 1.4.0rc5
1776 - turn off authlibs packages
1778 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1779 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1780 it's called "openafs" and not "libafs". This fixes the shutdown
1783 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1784 - update kversis script, add 'kvers' operation
1785 - fix bug that 2.6 smp/hugemem kernels don't provide
1786 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1787 - add patch to remove res_search from the afs-krb5 configure
1789 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1790 - Update to 1.4.0rc4
1791 - Update the afs-krb5 krb524 patch so it actually works on
1792 some older systems like RHEL3 that still need -lkrb524.
1793 - Update the buildall script so choose better architecture support,
1794 e.g. don't build i586 on RHEL.
1795 - Update the rebuild information in the SPEC file.
1796 - Add support for finding .EL kernels in openafs-kvers-is.sh
1797 - Add additional error messages when kernel version/type parsing fails.
1798 - Update the buildall script to use the kernel srcdir directly.
1800 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1801 - Add "hugemem" to 2.4 configs
1802 - Add checks to support scripts to determine whether to build
1803 the bigmem and/or hugemem kernels for 2.4.
1805 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1806 - Added some afs-krb5 patches to get the migration kit to build
1807 on modern AFS and modern Kerberos.
1808 - Added authlibs and authlibs-devel packages as per UMich changes.
1810 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1811 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1813 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1814 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1815 from Red Hat. Initial attempt at a release of 1.4. Still need
1816 to work in a 2.6 build system.