1 # Openafs Spec $Revision$
3 %define afsvers @VERSION@
4 %define pkgvers @LINUX_PKGVER@
5 # for beta/rc releases make pkgrel 0.X.<tag>
6 # for real releases make pkgrel 1 (or more for extra releases)
7 #%define pkgrel 0.1.rc1
8 %define pkgrel @LINUX_PKGREL@
10 %if %{?osvers:0}%{!?osvers:1}
14 %{!?fedorakmod: %define fedorakmod 1}
15 %{!?build_dkmspkg: %define build_dkmspkg 1}
17 # Determine presence of rpmbuild command line --define arguments used for
18 # option specification
19 %define kernvers_on_cmdline %{?kernvers:1}%{!?kernvers:0}
20 %define build_userspace_on_cmdline %{?build_userspace:1}%{!?build_userspace:0}
21 %define build_modules_on_cmdline %{?build_modules:1}%{!?build_modules:0}
23 # Determine the version of the kernel to build against
24 # - automatically select running kernel if there are sources in /lib/modules
25 # - note that this can be overridden on the command line
27 %if !%{kernvers_on_cmdline}
28 %define kernvers %(%{_sourcedir}/openafs-kernel-version.sh)
32 %define kmodtool bash %{_sourcedir}/openafs-kmodtool
34 %define kmod_name openafs
35 %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
38 %{!?kvariants: %define kvariants %{?upvar}}
40 %if %{?ksrcdir:1}%{!?ksrcdir:0}
41 if ( -d %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}) ; then
42 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
44 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}}
48 %else # Legacy kernel build stuff
50 %define kversis %{_sourcedir}/openafs-kvers-is.sh
51 %define kvers %(%{kversis} parsev %{kernvers})
52 %define kvers_is_24 %(%{kversis} %{kvers} "2.4")
53 %define kvers_is_26 %(%{kversis} %{kvers} "2.6")
54 %define ktype %(%{kversis} parset %{kernvers})
55 %define kversion %(%{kversis} kvers %{kernvers})
57 # This is where to look for kernel build include files. Default
58 # is /lib/modules/<kvers>/build, but you can define kbase and
59 # kend on the commandline to change that.
61 %if %{?kbase:0}%{!?kbase:1}
62 %define kbase /lib/modules/
64 %if %{?kend:0}%{!?kend:1}
67 # Let the buildscript define the ksrcdir directly -- needed for RHEL4
68 %if %{?ksrcdir:0}%{!?ksrcdir:1}
69 %define ksrcdir %{kbase}%{kernvers}%{kend}
72 %if %{?kmoddir:0}%{!?kmoddir:1}
73 %define kmoddir /lib/modules
75 %define kxmoddir %{kmoddir}/%{kernvers}
77 # End legacy kernel build stuff
80 %define dkms_version %{osvers}.%{pkgrel}
82 # Set 'debugspec' to 1 if you want to debug the spec file. This will
83 # not remove the installed tree as part of the %clean operation
84 %if %{?debugspec:0}%{!?debugspec:1}
88 # Set 'krb5support' to 1 if you want to build the openafs-krb5 package
89 # to distribute aklog and asetkey
90 %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
93 %if %{?krb5config:0}%{!?krb5config:1}
94 %define krb5config /usr/kerberos/bin/krb5-config
98 # Set 'bootkernelsupport' to 1 if you want to build the
99 # kernel module for Red Hat BOOT Kernels on x86.
100 %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
102 # Define the location of your init.d directory
103 %define initdir /etc/init.d
105 #determine if the kernel provides an arch-specific Provides
106 %define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
108 # Define the location of the PAM security module directory
109 %define pamdir /%{_lib}/security
113 # Define the set of kernel module variations to be built:
114 # For 2.4 kernels we just build everything at once for a particular
115 # kernel. So we build up, smp, and bigmem all at once.
116 # For 2.6 kernels we have to build against the specific kernel headers
117 # for a particular kernel variation. AFS will handle the specific smp or
118 # non-smp determination. So just always build as if it's "up" -- the kernel
119 # version will have the 'variation' type already in the version #.
122 %define smp_package 0
123 %define bigmem_package 0
124 %define hugemem_package 0
125 %define largesmp_package 0
127 #######################################################################
130 %define kdepend kernel-source
132 %define smp_package 1
135 %define bigmem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} bigmem)
136 %if %{bigmem_package}
137 %define bigmem_ext bigmem
140 %define hugemem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} hugemem)
141 %if %{hugemem_package}
142 %define hugemem_ext hugemem
145 %define kvariations up smp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
147 #######################################################################
151 %define kvariations up
156 %define up_package %(%{kversis} "%{ktype}" "")
157 %define smp_package %(%{kversis} "%{ktype}" "smp")
158 %define hugemem_package %(%{kversis} "%{ktype}" "hugemem")
159 %define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
162 %if !%{up_package} && !%{smp_package} && !%{hugemem_package} && !%{largesmp_package}
163 %error "unknown kernel type: %{ktype}"
166 %if !%{kernvers_on_cmdline}
167 %define kdepend %{ksrcdir}/include/linux/version.h
170 #######################################################################
173 %error "unknown kernel version: ${kvers} (parsed from %{kernvers})"
177 # End of legacy kernel module build
180 #######################################################################
181 # You probably don't need to change anything beyond this line
182 # NOTE: If you do, please email me!!!
184 # Determine which elements of OpenAFS to build. For non-x86 arches
185 # (subject to the ExclusiveArch setting, below), we build both userspace
186 # and modules. For most x86 arches, we build just the kernel modules. For
187 # i386, we build just the userspace. If you're running an i386 kernel,
188 # you'll need to tweak that last bit.
189 %if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
191 %ifarch x86_64 ia64 s390 s390x
192 %define build_userspace 1
193 %define build_modules 1
195 %define build_authlibs 1
197 %define build_authlibs 0
202 %define build_userspace 0
203 %define build_modules 1
204 %define build_authlibs 1
208 %define build_userspace 1
209 %define build_modules 0
210 %define build_authlibs 1
215 # deal with cmdline specification
216 %if %{build_userspace_on_cmdline} || %{build_modules_on_cmdline}
217 %if !%{build_userspace_on_cmdline}
218 %define build_userspace 0
220 %if !%{build_modules_on_cmdline}
221 %define build_modules 0
225 # Make sure RPM doesn't complain about installed but non-packaged files.
226 #define __check_files %{nil}
228 Summary: OpenAFS distributed filesystem
231 Release: %{osvers}.%{pkgrel}
232 License: IBM Public License
233 URL: http://www.openafs.org
234 BuildRoot: %{_tmppath}/%{name}-%{version}-root
235 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
236 Group: Networking/Filesystems
237 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
239 BuildRequires: krb5-devel
241 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
243 # http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
244 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
245 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
246 %define srcdir openafs-%{afsvers}
248 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
249 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
251 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2008-04-23
253 Source30: openafs-kernel-version.sh
254 Source996: openafs-kvers-is.sh
255 Source997: openafs-buildfedora.pl
256 Source998: openafs-buildall.sh
257 Source999: openafs-kmodtool
259 Patch0: openafs-1.4.0-kmodule26.patch
262 The AFS distributed filesystem. AFS is a distributed filesystem
263 allowing cross-platform sharing of files among multiple computers.
264 Facilities are provided for access control, authentication, backup and
265 administrative management.
267 This package provides common files shared across all the various
268 OpenAFS packages but are not necessarily tied to a client or server.
270 The OpenAFS SRPM can be rebuilt with the following options to control
273 --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version
274 to build modules against. The default is
275 to build against the currently-running
277 --define "kbase /lib/modules/" The base location to look for kernel headers
278 --define "kend /build" The 'end' location to look for kernels
279 The build will define ksrvdir as
280 %%{kbase}<kernvers>%%{kend}
282 --without krb5 Disable krb5 support (default: with krb5)
283 --with bitmap-later Enable "bitmap later" support
284 --with bos-restricted Enable "bos restricted" mode
285 --with fast-restart Enable "fast restart" mode
286 --with largefiles Enable "largefile fileserver" mode
287 --with supergroups Enable "supergroups"
289 --target=i386 The target architecture to build for.
290 When building for a non-default target
291 the build may choose whether to build
292 userspace or kernel modules automatically.
293 The defaults are probably what you want.
295 --define "build_userspace 1" Request building of userspace tools
296 --define "build_modules 1" Request building of kernel modules
297 You probably never need to specify these.
299 --define "kmoddir /lib/modules" This is the base location where modules
300 will be installed. You probably don't
301 need to change this ever.
303 --define "fedorakmod 0" Disable the building of 'Fedora' style kernel
304 modules, and use the old format.
306 --define "kvariants <variants>" When building Fedora style kernel modules,
307 this defines the set of kernel variants
309 <variants> is a space seperated list which
310 may contain one or more of
311 '' (for the generic kernel), smp, PAE, xen
314 To a kernel module for your running kernel, just run:
315 rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{osvers}.%{pkgrel}.src.rpm
317 ##############################################################################
319 # build the userspace side of things if so requested
321 ##############################################################################
322 %if %{build_userspace}
325 Requires: binutils, openafs = %{PACKAGE_VERSION}
328 Requires: %{name}-kmod >= %{version}
329 Provides: %{name}-kmod-common = %{version}
331 Requires: openafs-kernel
334 Summary: OpenAFS Filesystem Client
335 Group: Networking/Filesystem
338 The AFS distributed filesystem. AFS is a distributed filesystem
339 allowing cross-platform sharing of files among multiple computers.
340 Facilities are provided for access control, authentication, backup and
341 administrative management.
343 This package provides basic client support to mount and manipulate
347 Requires: openafs = %{PACKAGE_VERSION}
348 Summary: OpenAFS Filesystem Server
349 Group: Networking/Filesystems
352 The AFS distributed filesystem. AFS is a distributed filesystem
353 allowing cross-platform sharing of files among multiple computers.
354 Facilities are provided for access control, authentication, backup and
355 administrative management.
357 This package provides basic server support to host files in an AFS
361 %package -n dkms-%{name}
362 Summary: DKMS-ready kernel source for AFS distributed filesystem
363 Group: Development/Kernel
364 Provides: openafs-kernel = %{PACKAGE_VERSION}
366 Provides: %{name}-kmod = %{PACKAGE_VERSION}
371 Requires: %{name}-kmod-common = %{version}
373 %description -n dkms-%{name}
374 The AFS distributed filesystem. AFS is a distributed filesystem
375 allowing cross-platform sharing of files among multiple computers.
376 Facilities are provided for access control, authentication, backup and
377 administrative management.
379 This package provides the source code to allow DKMS to build an
383 %if %{build_authlibs}
385 Summary: OpenAFS authentication shared libraries
386 Group: Networking/Filesystems
388 %description authlibs
389 The AFS distributed filesystem. AFS is a distributed filesystem
390 allowing cross-platform sharing of files among multiple computers.
391 Facilities are provided for access control, authentication, backup and
392 administrative management.
394 This package provides a shared version of libafsrpc and libafsauthent.
395 None of the programs included with OpenAFS currently use these shared
396 libraries; however, third-party software that wishes to perform AFS
397 authentication may link against them.
400 %package authlibs-devel
401 %if %{build_authlibs}
402 Requires: openafs-authlibs = %{PACKAGE_VERSION}
404 Requires: openafs-devel = %{PACKAGE_VERSION}
405 Summary: OpenAFS shared library development
406 Group: Development/Filesystems
408 %description authlibs-devel
409 The AFS distributed filesystem. AFS is a distributed filesystem
410 allowing cross-platform sharing of files among multiple computers.
411 Facilities are provided for access control, authentication, backup and
412 administrative management.
414 This package includes the static versions of libafsrpc and
415 libafsauthent, and symlinks required for building against the dynamic
419 Summary: OpenAFS Development Libraries and Headers
420 Group: Development/Filesystems
423 The AFS distributed filesystem. AFS is a distributed filesystem
424 allowing cross-platform sharing of files among multiple computers.
425 Facilities are provided for access control, authentication, backup and
426 administrative management.
428 This package provides static development libraries and headers needed
429 to compile AFS applications. Note: AFS currently does not provide
433 Summary: OpenAFS user and administrator documentation
434 Requires: openafs = %{PACKAGE_VERSION}
435 Group: Networking/Filesystems
438 The AFS distributed filesystem. AFS is a distributed filesystem
439 allowing cross-platform sharing of files among multiple computers.
440 Facilities are provided for access control, authentication, backup and
441 administrative management.
443 This package provides HTML documentation for OpenAFS users and system
446 %package kernel-source
447 Summary: OpenAFS Kernel Module source tree
448 Group: Networking/Filesystems
449 Provides: openafs-kernel = %{PACKAGE_VERSION}
451 Provides: %{name}-kmod = %{PACKAGE_VERSION}
454 %description kernel-source
455 The AFS distributed filesystem. AFS is a distributed filesystem
456 allowing cross-platform sharing of files among multiple computers.
457 Facilities are provided for access control, authentication, backup and
458 administrative management.
460 This package provides the source code to build your own AFS kernel
464 Summary: OpenAFS client compatibility symlinks
465 Requires: openafs = %{PACKAGE_VERSION}, openafs-client = %{PACKAGE_VERSION}
466 Group: Networking/Filesystems
467 Obsoletes: openafs-client-compat
470 The AFS distributed filesystem. AFS is a distributed filesystem
471 allowing cross-platform sharing of files among multiple computers.
472 Facilities are provided for access control, authentication, backup and
473 administrative management.
475 This package provides compatibility symlinks in /usr/afsws. It is
476 completely optional, and is only necessary to support legacy
477 applications and scripts that hard-code the location of AFS client
481 Summary: OpenAFS KA kpasswd support
483 Group: Networking/Filesystems
486 The AFS distributed filesystem. AFS is a distributed filesystem
487 allowing cross-platform sharing of files among multiple computers.
488 Facilities are provided for access control, authentication, backup and
489 administrative management.
491 This package provides the compatibility symlink for kpasswd, in case
492 you are using KAserver instead of Krb5.
496 Summary: OpenAFS programs to use with krb5
497 Requires: openafs = %{PACKAGE_VERSION}
498 Group: Networking/Filesystems
499 BuildRequires: krb5-devel
502 The AFS distributed filesystem. AFS is a distributed filesystem
503 allowing cross-platform sharing of files among multiple computers.
504 Facilities are provided for access control, authentication, backup and
505 administrative management.
507 This package provides compatibility programs so you can use krb5
508 to authenticate to AFS services, instead of using AFS's homegrown
509 krb4 lookalike services.
514 ##############################################################################
516 # build the kernel modules if so requested
518 ##############################################################################
522 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
526 # Legacy kernel compilation code here ...
527 %define modkversion %(echo %{kernvers} | cut -d- -f1)
528 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
529 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
533 Summary: OpenAFS Kernel Module (compiled for UP)
534 Release: %{modpkgrel}
535 Group: Networking/Filesystems
536 Provides: openafs-kernel = %{PACKAGE_VERSION}
538 Requires: kernel-%{_target_cpu} = %{kversion}
540 Requires: /boot/config-%{kernvers}
544 The AFS distributed filesystem. AFS is a distributed filesystem
545 allowing cross-platform sharing of files among multiple computers.
546 Facilities are provided for access control, authentication, backup and
547 administrative management.
549 This package provides a precompiled AFS kernel module for %{kernvers}.
554 Summary: OpenAFS Kernel Module (compiled for SMP)
555 Release: %{modpkgrel}
556 Provides: openafs-kernel = %{PACKAGE_VERSION}
558 Requires: kernel-smp-%{_target_cpu} = %{kversion}
560 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
562 Group: Networking/Filesystems
564 %description kernel-smp
565 The AFS distributed filesystem. AFS is a distributed filesystem
566 allowing cross-platform sharing of files among multiple computers.
567 Facilities are provided for access control, authentication, backup and
568 administrative management.
570 This package provides a precompiled AFS kernel module for %{kernvers}.
573 %if %{largesmp_package}
574 %package kernel-largesmp
575 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
576 Release: %{modpkgrel}
577 Provides: openafs-kernel = %{PACKAGE_VERSION}
579 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
581 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
583 Group: Networking/Filesystems
585 %description kernel-largesmp
586 The AFS distributed filesystem. AFS is a distributed filesystem
587 allowing cross-platform sharing of files among multiple computers.
588 Facilities are provided for access control, authentication, backup and
589 administrative management.
591 This package provides a precompiled AFS kernel module for %{kernvers}.
594 %if %{bigmem_package}
595 %package kernel-bigmem
596 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
597 Release: %{modpkgrel}
598 Provides: openafs-kernel = %{PACKAGE_VERSION}
600 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
602 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
604 Group: Networking/Filesystems
606 %description kernel-bigmem
607 The AFS distributed filesystem. AFS is a distributed filesystem
608 allowing cross-platform sharing of files among multiple computers.
609 Facilities are provided for access control, authentication, backup and
610 administrative management.
612 This package provides a precompiled AFS kernel module for %{kernvers}.
615 %if %{hugemem_package}
616 %package kernel-hugemem
617 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
618 Release: %{modpkgrel}
619 Provides: openafs-kernel = %{PACKAGE_VERSION}
621 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
623 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
625 Group: Networking/Filesystems
627 %description kernel-hugemem
628 The AFS distributed filesystem. AFS is a distributed filesystem
629 allowing cross-platform sharing of files among multiple computers.
630 Facilities are provided for access control, authentication, backup and
631 administrative management.
633 This package provides a precompiled AFS kernel module for %{kernvers}.
637 # End legacy kernel compilation code ...
640 ##############################################################################
644 ##############################################################################
648 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
650 : @@@ kernel version: %{kernvers}
652 : @@@ kernel variations: %{kvariants}
654 : @@@ base kernel version:%{kversion}
655 : @@@ kernel modules dir: %{kxmoddir}
656 : @@@ kernel source dir: %{ksrcdir}
658 : @@@ kernel variations: %{kvariations}
661 : @@@ kernel type: up
663 : @@@ kernel type: %{ktype}
667 : @@@ PAM modules dir: %{pamdir}
668 : @@@ build userspace: %{build_userspace}
669 : @@@ build modules: %{build_modules}
671 : @@@ target cpu: %{_target_cpu}
673 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
675 # Install OpenAFS src and doc
676 #%setup -q -n %{srcdir}
677 %setup -q -b 1 -n %{srcdir}
679 # Patch openafs to build a kernel module named "openafs" instead of "libafs"
680 %patch0 -p1 -b .kmod26
682 ##############################################################################
686 ##############################################################################
697 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
703 x86_64) sysname=amd64_linux${kv} ;;
704 alpha*) sysname=alpha_linux_${kv} ;;
705 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
706 *) sysname=%{_arch}_linux${kv} ;;
710 archlist="i386 i586 i686 athlon"
711 %if %{bootkernelsupport}
712 archlist="${archlist} BOOT"
719 # PrintDefine var value statements file
724 echo "#ifndef $1" >> $4
729 echo "#undef $1" >> $4
734 echo "#define $1 $2" >> $4
744 echo "#include $1" >> $4
754 # PrintRedhatKernelFix arch mp file
755 PrintRedhatKernelFix() {
769 largesmp) largesmp=1;;
773 echo "$2 not supported"
782 PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
784 PrintDefine __BOOT_KERNEL_ENTERPRISE $ent und,def,nl $file
785 PrintDefine __BOOT_KERNEL_BIGMEM $bigmem und,def,nl $file
786 PrintDefine __BOOT_KERNEL_HUGEMEM $hugemem und,def,nl $file
787 PrintDefine __BOOT_KERNEL_SMP $smp und,def,nl $file
788 PrintDefine __BOOT_KERNEL_LARGESMP $largesmp und,def,nl $file
789 PrintDefine __BOOT_KERNEL_UP $up und,def,nl $file
790 PrintDefine __BOOT_KERNEL_BOOT $boot und,def,nl $file
791 PrintDefine __BOOT_KERNEL_BOOTSMP $bootsmp und,def,nl $file
793 PrintDefine '"/boot/kernel.h"' "" inc,nl $file # include file
795 for ar in $archlist ; do
796 if [ "$ar" = "$arch" ]; then
797 PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
799 PrintDefine "__MODULE_KERNEL_$ar" "" und $file # undef
804 PrintDefine "" "" end $file
806 if [ %{debugspec} = 1 ] ; then
807 echo "Kernel Configuration File for Red Hat kernels:"
812 config_opts="--enable-redhat-buildsys \
813 %{?_with_bitmap_later:--enable-bitmap-later} \
814 %{?_with_bos_restricted:--enable-bos-restricted-mode} \
815 %{?_with_fast_restart:--enable-fast-restart} \
816 %{?_with_largefiles:--enable-largefile-fileserver} \
817 %{?_with_supergroups:--enable-supergroups} \
818 --enable-transarc-paths"
822 # If we're using Fedora kmods, work out which is the best kernel module to
823 # use for the userland configuration step. If no variants have been specified,
824 # then use the standard kernel. If variants are specified, use the standard kernel
825 # if it's listed, otherwise pick the first listed kernel.
828 for kvariant in %{kvariants} ; do
829 if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
830 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
831 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
833 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
838 if [ -z "$ksrc" ] ; then
842 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
844 ./configure --with-afs-sysname=${sysname} \
845 --prefix=%{_prefix} \
846 --libdir=%{_libdir} \
847 --bindir=%{_bindir} \
848 --sbindir=%{_sbindir} \
849 --disable-strip-binaries \
851 --with-linux-kernel-headers=${ksrc} \
854 --with-krb5-conf=%{krb5config} \
859 # Build the libafs tree
860 make only_libafs_tree || exit 1
862 # Configure each of our kernel modules
864 %if %{fedorakmod} && %{build_modules}
865 for kvariant in %{kvariants} ; do
866 if [ -n "${kvariant}" ] ; then
867 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
868 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
870 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
873 cp -R libafs_tree _kmod_build_${kvariant}
874 pushd _kmod_build_${kvariant}
875 ./configure --with-afs-sysname=${sysname} \
876 --prefix=%{_prefix} \
877 --libdir=%{_libdir} \
878 --bindir=%{_bindir} \
879 --sbindir=%{_sbindir} \
880 --with-linux-kernel-headers=${ksrc} \
882 --with-krb5-conf=/usr/kerberos/bin/krb5-config \
891 %if %{build_userspace}
892 # Build the user-space AFS stuff
893 make dest_nolibafs || exit 1
898 for kvariant in %{kvariants}
900 if [ -n "${kvariant}" ] ; then
901 pushd _kmod_build_$kvariant;
905 make dest_only_libafs MPS=SP
910 # Begin legacy kernel module building code
913 # Build all the kernel modules for linux 2.4.x
914 for variation in %{kvariations}
916 if [ ${variation} = up ]
918 local_smp_def=-DREDHAT_FIX
921 local_smp_def="-DAFS_SMP -DREDHAT_FIX"
925 PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
926 make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
927 LINUX_MODULE_NAME="${suffix}" MPS=SP
930 rm -f src/config/redhat-fix.h
932 %elseif %{kvers_is_26}
933 # Build the kernel module for this version of linux 2.6.x
934 # Notice how much easier this is than 2.4. On the other hand,
935 # we require much more external support to build multiple modules.
937 # the MPS=SP just means that we don't add a '.mp' to the name.
938 make dest_only_libafs MPS=SP
941 # End legacy kernel module building code
946 ##############################################################################
950 ##############################################################################
953 export DONT_GPRINTIFY=1
955 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
967 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
973 x86_64) sysname=amd64_linux${kv} ;;
974 alpha*) sysname=alpha_linux_${kv} ;;
975 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
976 *) sysname=%{_arch}_linux${kv} ;;
980 %if %{build_userspace}
981 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
982 mkdir -p $RPM_BUILD_ROOT%{_libdir}
983 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
984 mkdir -p $RPM_BUILD_ROOT%{initdir}
985 mkdir -p $RPM_BUILD_ROOT/etc/openafs
986 mkdir -p $RPM_BUILD_ROOT%{pamdir}
987 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
988 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
989 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
990 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
991 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
992 mkdir -p $RPM_BUILD_ROOT%{_mandir}
994 # Copy files from dest to the appropriate places in BuildRoot
995 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
996 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
997 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
998 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
999 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1001 # Link kpasswd to kapasswd
1002 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1004 # Copy root.client config files
1005 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1006 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1007 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1010 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1013 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1014 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1016 # Populate /usr/vice/etc
1017 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1018 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1019 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1020 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1023 # install dkms source
1025 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1026 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1028 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1030 PACKAGE_VERSION="%{dkms_version}"
1032 # Items below here should not have to change with each driver version
1033 PACKAGE_NAME="%{name}"
1034 MAKE[0]="SMP=SP; eval \\\`grep CONFIG_SMP /boot/config-\${kernelver_array[0]}\\\`; [ -n \"\\\$CONFIG_SMP\" ] && SMP=MP; ./configure --with-linux-kernel-headers=\${kernel_source_dir}; make MPS=\\\$SMP; mv src/libafs/MODLOAD-*/openafs.ko ."
1035 CLEAN="make -C src/libafs clean"
1037 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1038 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1045 # install kernel-source
1048 # Install the kernel module source tree
1049 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1050 tar cf - -C libafs_tree . | \
1051 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1053 # Next, copy the LICENSE Files, README
1054 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1055 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1056 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1059 # Install DOCUMENTATION
1062 # Build the DOC directory
1063 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1064 tar cf - -C doc LICENSE html pdf | \
1065 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1066 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1067 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1072 tar cf - -C doc/man-pages man1 man5 man8 | \
1073 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1075 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1077 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1079 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1082 # remove unused man pages
1083 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1084 dkload knfs package runntp symlink symlink_list symlink_make \
1086 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1089 # rename kpasswd to kapasswd
1090 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1093 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1095 # create list of man pages that go in the 'openafs' package
1096 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1097 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^rxdebug|scout|^sys|tokens|translate|udebug|unlog|^uss|^vos' \
1100 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1101 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1104 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1105 |egrep '^backup|^bos|^butc|^fms|^fstrace|^kas|^read_tape|^uss' \
1111 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1112 %{_bindir}/afsmonitor
1120 %{_bindir}/pagsh.krb
1125 %{_bindir}/tokens.krb
1126 %{_bindir}/translate_et
1131 %{_sbindir}/copyauth
1135 %{_sbindir}/read_tape
1136 %{_sbindir}/restorevol
1141 EOF-openafs-file-list
1143 # add man pages to the list
1144 cat openafs-man1files \
1145 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1147 cat openafs-man5files \
1148 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1150 cat openafs-man8files \
1151 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1155 # Install compatiblity links
1157 for d in bin:bin etc:sbin; do
1158 olddir=`echo $d | sed 's/:.*$//'`
1159 newdir=`echo $d | sed 's/^.*://'`
1160 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1161 for f in `cat openafs-file-list`; do
1162 if echo $f | grep -q /$newdir/; then
1164 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1170 # Remove files we're not installing
1173 # remove duplicated files from /usr/afs/bin
1174 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1175 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1178 # compile_et is duplicated in e2fsprogs
1179 # the rest are not needed.
1180 for f in compile_et dlog dpass install knfs livesys xstat_cm_test xstat_fs_test ; do
1181 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1184 # not supported on Linux or duplicated
1185 for f in kdb rmtsysd kpwvalid ; do
1186 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1188 # sometimes install sucks and puts down a directory. kill it all.
1189 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1191 # remove man pages from programs deleted above
1192 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
1193 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1196 # PAM modules are doubly-installed Remove the version we don't need
1197 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1198 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1201 %if !%{build_authlibs}
1202 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1203 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1204 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1205 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1210 %if %{build_modules}
1212 for kvariant in %{kvariants}
1214 if [ -n "$kvariant" ] ; then
1215 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1216 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1218 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1221 srcdir=${sysname}/dest/root.client%{_prefix}/vice/etc/modload
1224 if [ -f ${srcdir}/libafs-%{kverrel}${kvariant}.ko ] ; then
1225 srcmod=${srcdir}/libafs-%{kverrel}${kvariant}.ko
1226 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1228 srcmod=${srcdir}/libafs-%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}.ko
1229 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}/extra/openafs
1233 install -m 755 ${srcmod} ${dstdir}/openafs.ko
1236 # Install the kernel modules
1237 for variation in %{kvariations}
1239 if [ ${variation} = up ]
1242 modname=libafs-%{kernvers}${kmodend}
1244 kvar=%{kxmoddir}${variation}
1245 modname=libafs-%{kernvers}${variation}${kmodend}
1248 srcdir=${sysname}/dest/root.client%{_prefix}/vice/etc/modload
1249 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1253 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1258 ##############################################################################
1262 ##############################################################################
1264 rm -f openafs-file-list
1265 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1266 rm -fr $RPM_BUILD_ROOT
1269 ##############################################################################
1273 ##############################################################################
1274 %if %{build_userspace}
1277 if [ -e %{_prefix}/afsws ]; then
1278 /bin/rm -fr %{_prefix}/afsws
1282 chkconfig --add openafs-client
1283 if [ ! -d /afs ]; then
1285 chown root.root /afs
1289 # Create the CellServDB
1290 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1292 ( cd /usr/vice/etc ; \
1293 cat CellServDB.local CellServDB.dist > CellServDB ; \
1294 chmod 644 CellServDB )
1297 echo The AFS cache is configured for 100 MB. Edit the
1298 echo /usr/vice/etc/cacheinfo file to change this before
1299 echo running AFS for the first time. You should also
1300 echo set your home cell in /usr/vice/etc/ThisCell.
1302 echo Also, you may want to edit /etc/pam.d/login and
1303 echo possibly others there to get an AFS token on login.
1306 echo auth sufficient %{pamdir}/pam_afs.so try_first_pass ignore_root
1308 echo before the one for pwdb.
1312 chkconfig --add openafs-server
1313 %{initdir}/openafs-server condrestart
1315 %if %{build_authlibs}
1324 if [ $1 = 0 ] ; then
1325 [ -d /afs ] && rmdir /afs
1329 if [ $1 = 0 ] ; then
1330 %{initdir}/openafs-client stop
1331 chkconfig --del openafs-client
1335 if [ $1 = 0 ] ; then
1336 %{initdir}/openafs-server stop
1337 chkconfig --del openafs-server
1340 %if %{build_dkmspkg}
1341 %post -n dkms-%{name}
1342 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1343 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1344 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1346 %preun -n dkms-%{name}
1347 dkms remove -m %{namee} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1351 %if %{build_modules}
1355 /sbin/depmod -ae %{kernvers}
1358 /sbin/depmod -ae %{kernvers}
1364 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1367 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1370 %if %{largesmp_package}
1371 %post kernel-largesmp
1372 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1374 %postun kernel-largesmp
1375 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1378 %if %{bigmem_package}
1380 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1382 %postun kernel-bigmem
1383 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1386 %if %{hugemem_package}
1387 %post kernel-hugemem
1388 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1390 %postun kernel-hugemem
1391 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1396 ##############################################################################
1400 ##############################################################################
1401 %if %{build_userspace}
1403 %files -f openafs-file-list
1404 %defattr(-,root,root)
1405 %config /etc/sysconfig/openafs
1406 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1409 %defattr(-,root,root)
1410 %doc %{_docdir}/openafs-%{afsvers}
1413 %defattr(-,root,root)
1414 %dir %{_prefix}/vice
1415 %dir %{_prefix}/vice/cache
1416 %dir %{_prefix}/vice/etc
1417 %{_prefix}/vice/etc/CellServDB.dist
1418 %config %{_prefix}/vice/etc/ThisCell
1419 %config %{_prefix}/vice/etc/cacheinfo
1422 %{_prefix}/vice/etc/afsd
1423 %{pamdir}/pam_afs.krb.so.1
1424 %{pamdir}/pam_afs.krb.so
1425 %{pamdir}/pam_afs.so.1
1426 %{pamdir}/pam_afs.so
1427 %{initdir}/openafs-client
1428 %{_mandir}/man1/cmdebug.*
1429 %{_mandir}/man1/up.*
1430 %{_mandir}/man5/afs*
1431 %{_mandir}/man5/cacheinfo.*
1432 %{_mandir}/man8/afsd.*
1433 %{_mandir}/man5/CellAlias.*
1436 %defattr(-,root,root)
1438 %dir %{_prefix}/afs/bin
1439 %dir %{_prefix}/afs/etc
1440 %dir %{_prefix}/afs/logs
1441 %{_prefix}/afs/bin/bosserver
1442 %{_prefix}/afs/bin/bos_util
1443 %{_prefix}/afs/bin/buserver
1444 %{_prefix}/afs/bin/fileserver
1445 # Should we support KAServer?
1446 %{_prefix}/afs/bin/kaserver
1447 %{_prefix}/afs/bin/ka-forwarder
1448 %{_prefix}/afs/bin/pt_util
1449 %{_prefix}/afs/bin/ptserver
1450 %{_prefix}/afs/bin/salvager
1451 %{_prefix}/afs/bin/upclient
1452 %{_prefix}/afs/bin/upserver
1453 %{_prefix}/afs/bin/vlserver
1454 %{_prefix}/afs/bin/volinfo
1455 %{_prefix}/afs/bin/volserver
1456 %{_sbindir}/kadb_check
1457 %{_sbindir}/prdb_check
1458 %{_sbindir}/vldb_check
1459 %{_sbindir}/vldb_convert
1461 %{initdir}/openafs-server
1462 %{_mandir}/man5/AuthLog.*
1463 %{_mandir}/man5/BackupLog.*
1464 %{_mandir}/man5/BosConfig.*
1465 %{_mandir}/man5/BosLog.*
1466 %{_mandir}/man5/FORCESALVAGE.*
1467 %{_mandir}/man5/FileLog.*
1468 %{_mandir}/man5/KeyFile.*
1469 %{_mandir}/man5/NetInfo.*
1470 %{_mandir}/man5/NetRestrict.*
1471 %{_mandir}/man5/NoAuth.*
1472 %{_mandir}/man5/SALVAGE.fs.*
1473 %{_mandir}/man5/SalvageLog.*
1474 %{_mandir}/man5/sysid.*
1475 %{_mandir}/man5/UserList.*
1476 %{_mandir}/man5/VLLog.*
1477 %{_mandir}/man5/VolserLog.*
1478 %{_mandir}/man5/bdb.DB0.*
1479 %{_mandir}/man5/fms.log.*
1480 %{_mandir}/man5/kaserver.DB0.*
1481 %{_mandir}/man5/kaserverauxdb.*
1482 %{_mandir}/man5/prdb.DB0.*
1483 %{_mandir}/man5/salvage.lock.*
1484 %{_mandir}/man5/tapeconfig.*
1485 %{_mandir}/man5/vldb.DB0.*
1486 %{_mandir}/man8/buserver.*
1487 %{_mandir}/man8/fileserver.*
1488 %{_mandir}/man8/kadb_check.*
1489 %{_mandir}/man8/ka-forwarder.*
1490 %{_mandir}/man8/prdb_check.*
1491 %{_mandir}/man8/ptserver.*
1492 %{_mandir}/man8/pt_util.*
1493 %{_mandir}/man8/salvager.*
1494 %{_mandir}/man8/upclient.*
1495 %{_mandir}/man8/upserver.*
1496 %{_mandir}/man8/vldb_check.*
1497 %{_mandir}/man8/vldb_convert.*
1498 %{_mandir}/man8/vlserver.*
1499 %{_mandir}/man8/voldump.*
1500 %{_mandir}/man8/volinfo.*
1501 %{_mandir}/man8/volserver.*
1503 %if %{build_authlibs}
1505 %defattr(-,root,root)
1506 %{_libdir}/libafsauthent.so.*
1507 %{_libdir}/libafsrpc.so.*
1510 %files authlibs-devel
1511 %defattr(-,root,root)
1512 %{_libdir}/libafsauthent.a
1513 %{_libdir}/libafsrpc.a
1514 %if %{build_authlibs}
1515 %{_libdir}/libafsauthent.so
1516 %{_libdir}/libafsrpc.so
1520 %defattr(-,root,root)
1523 %{_includedir}/des.h
1524 %{_includedir}/des_conf.h
1525 %{_includedir}/des_odd.h
1526 %{_includedir}/des_prototypes.h
1527 %{_includedir}/lock.h
1528 %{_includedir}/lwp.h
1529 %{_includedir}/mit-cpyright.h
1530 %{_includedir}/potpourri.h
1531 %{_includedir}/preempt.h
1533 %{_includedir}/timer.h
1534 %{_includedir}/ubik.h
1535 %{_includedir}/ubik_int.h
1540 %{_libdir}/librxkad.a
1541 %{_libdir}/librxstat.a
1542 %{_libdir}/libubik.a
1543 %{_mandir}/man1/rxgen.*
1545 %if %{build_dkmspkg}
1546 %files -n dkms-%{name}
1547 %defattr(-,root,root)
1548 %{_prefix}/src/%{name}-%{dkms_version}
1551 %files kernel-source
1552 %defattr(-,root,root)
1553 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1554 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1555 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1556 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1559 %defattr(-,root,root)
1563 %defattr(-,root,root)
1569 %defattr(-,root,root)
1571 %{_bindir}/klog.krb5
1573 %{_mandir}/man1/aklog.*
1574 %{_mandir}/man8/asetkey.*
1579 %if %{build_modules}
1584 %defattr(-,root,root)
1585 %{kxmoddir}/fs/openafs/openafs.*
1590 %defattr(-,root,root)
1591 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1594 %if %{largesmp_package}
1595 %files kernel-largesmp
1596 %defattr(-,root,root)
1597 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1600 %if %{bigmem_package}
1601 %files kernel-bigmem
1602 %defattr(-,root,root)
1603 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1606 %if %{hugemem_package}
1607 %files kernel-hugemem
1608 %defattr(-,root,root)
1609 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1615 ##############################################################################
1617 ### openafs.spec change log
1619 ##############################################################################
1621 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1622 - Make the RPM mockable
1624 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1625 - Update to match the shipped 1.4.5 RPMS
1626 - Fix the kvariant stuff to only configure the 'standard' case once
1627 - Add openafs-kvers.sh back in
1629 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1630 - Use Fedora style kmods, which allows us to install multiple kernel types
1632 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1633 - Use distributed files, rather than those in packager's SOURCE directory
1634 - Remove SuidCells stuff, which was unused
1636 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1637 - integrate s390x changes
1638 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1639 that won't build the .so files.
1641 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1643 - use installed aklog manpage.
1644 - moduleparam patch obsoleted.
1646 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1647 - update to 1.4.2-rc1
1648 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1649 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1650 - don't need the posixlock patch anymore.
1652 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1653 - update to 1.4.2-beta2
1654 - add linux2.4 posixlock API patch
1656 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1657 - moduleparam and krb524 patches no longer required in OA-CVS
1659 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1660 - change non-target-cpu kernel dep to a file dep
1661 - make sure we use the proper kernel version for the dependency.
1663 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1664 - allow users to specify local CellServDB and SuidCells entries
1665 don't overwrite user's changes. Provide a .dist an let users
1666 make entries in a ".local"
1667 - build the CellServDB and SuidCells at client startup and at
1669 - add provideskernelarch functionality to openafs-kvers-is.sh
1670 - use that functionality to Require kernel{,-<type>}-targetcpu
1671 to get better package safety due to RPM bugs where the kernel
1672 release isn't used so you can install the kernel module against
1673 any kernel of the same major version.
1675 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1676 - update the README in openafs-kernel-source
1677 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1678 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1680 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1681 - build requires autoconf and automake for krb5support
1682 and autoconf for standard package
1683 - dont setup the krb5 migration kit (or patches) if we don't care.
1684 - require ncurses-devel to build
1686 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1687 - look for krb524 functions in libkrb524 if we can't find them
1688 in the standard locations.
1690 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1691 - fix the module_param_array macro for Linux 2.6.9.
1693 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1694 - update to 1.4.1 release.
1695 - distribute asetkey from openafs instead of krb5-migration kit
1696 - don't need to apply the FC5 patches because they are part of the distro.
1697 - install asetkey into the "proper" place
1698 - dont list a manpage twice.
1699 - package asetkey man page. delete it when not needed.
1701 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1702 - turn authlibs back on, because RT #18767 was applied to CVS.
1704 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1705 - update to 1.4.1rc10, build on FC5
1706 - fix the man pages (distribute into various packages)
1707 - include patches for FC5, RT #29112 and #29122
1709 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1710 - openafs-server shouldn't depend on the kernel module.
1712 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1713 - patch from Mike Polek <mike at pictage.com> to run depmod for
1714 the target kernel and not the running kernel.
1716 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1717 - build aklog from the openafs sources, not from the krb5 migration kit.
1719 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1720 - set openafs-kernel-source to Provide openafs-kernel
1722 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1723 - update afs-krb5 res_search patch: look for res_search and __res_search
1724 - update to 1.4.0 final
1726 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1727 - remove all kdump builds.
1729 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1730 - fix openafs-kernel-version.sh so it will build an RPM for the
1731 currently-running kernel even if it's smp on 2.6.
1733 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1734 - upgrade to 1.4.0rc5
1735 - turn off authlibs packages
1737 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1738 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1739 it's called "openafs" and not "libafs". This fixes the shutdown
1742 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1743 - update kversis script, add 'kvers' operation
1744 - fix bug that 2.6 smp/hugemem kernels don't provide
1745 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1746 - add patch to remove res_search from the afs-krb5 configure
1748 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1749 - Update to 1.4.0rc4
1750 - Update the afs-krb5 krb524 patch so it actually works on
1751 some older systems like RHEL3 that still need -lkrb524.
1752 - Update the buildall script so choose better architecture support,
1753 e.g. don't build i586 on RHEL.
1754 - Update the rebuild information in the SPEC file.
1755 - Add support for finding .EL kernels in openafs-kvers-is.sh
1756 - Add additional error messages when kernel version/type parsing fails.
1757 - Update the buildall script to use the kernel srcdir directly.
1759 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1760 - Add "hugemem" to 2.4 configs
1761 - Add checks to support scripts to determine whether to build
1762 the bigmem and/or hugemem kernels for 2.4.
1764 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1765 - Added some afs-krb5 patches to get the migration kit to build
1766 on modern AFS and modern Kerberos.
1767 - Added authlibs and authlibs-devel packages as per UMich changes.
1769 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1770 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1772 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1773 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1774 from Red Hat. Initial attempt at a release of 1.4. Still need
1775 to work in a 2.6 build system.