1 # Openafs Spec $Revision$
3 %define afsvers @VERSION@
4 %define pkgvers @LINUX_PKGVER@
5 # for beta/rc releases make pkgrel 0.<tag>
6 # for real releases make pkgrel 1 (or more for extra releases)
7 %define pkgrel @LINUX_PKGREL@
9 %{!?fedorakmod: %define fedorakmod 1}
10 %{!?build_dkmspkg: %define build_dkmspkg 1}
12 # Determine presence of rpmbuild command line --define arguments used for
13 # option specification
14 %define kernvers_on_cmdline %{?kernvers:1}%{!?kernvers:0}
15 %define build_userspace_on_cmdline %{?build_userspace:1}%{!?build_userspace:0}
16 %define build_modules_on_cmdline %{?build_modules:1}%{!?build_modules:0}
17 %define build_authlibs_on_cmdline %{?build_authlibs:1}%{!?build_authlibs:0}
19 # Determine the version of the kernel to build against
20 # - automatically select running kernel if there are sources in /lib/modules
21 # - note that this can be overridden on the command line
23 %if !%{kernvers_on_cmdline}
24 %define kernvers %(%{_sourcedir}/openafs-kernel-version.sh)
27 # If we're building for a 2.4 series kernel, then fedora style kmods aren't
28 # appropriate - disable them.
30 %define kern24 %([ `echo "%{kernvers}" | sed -e 's/^\([0-9]*\.[0-9]*\)\..*/\1/'` = "2.4" ] && echo 1 || echo 0)
37 %define kmodtool bash %{_sourcedir}/openafs-kmodtool
39 %define kmod_name openafs
40 %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
43 %{!?kvariants: %define kvariants %{?upvar}}
45 %if %{?ksrcdir:1}%{!?ksrcdir:0}
46 if ( -d %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}) ; then
47 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
49 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}}
53 %else # Legacy kernel build stuff
55 %define kversis %{_sourcedir}/openafs-kvers-is.sh
56 %define kvers %(%{kversis} parsev %{kernvers})
57 %define kvers_is_24 %(%{kversis} %{kvers} "2.4")
58 %define kvers_is_26 %(%{kversis} %{kvers} "2.6")
59 %define ktype %(%{kversis} parset %{kernvers})
60 %define kversion %(%{kversis} kvers %{kernvers})
62 # This is where to look for kernel build include files. Default
63 # is /lib/modules/<kvers>/build, but you can define kbase and
64 # kend on the commandline to change that.
66 %if %{?kbase:0}%{!?kbase:1}
67 %define kbase /lib/modules/
69 %if %{?kend:0}%{!?kend:1}
72 # Let the buildscript define the ksrcdir directly -- needed for RHEL4
73 %if %{?ksrcdir:0}%{!?ksrcdir:1}
74 %define ksrcdir %{kbase}%{kernvers}%{kend}
77 %if %{?kmoddir:0}%{!?kmoddir:1}
78 %define kmoddir /lib/modules
80 %define kxmoddir %{kmoddir}/%{kernvers}
82 # End legacy kernel build stuff
85 %define dkms_version %{pkgrel}%{?dist}
87 # Set 'debugspec' to 1 if you want to debug the spec file. This will
88 # not remove the installed tree as part of the %clean operation
89 %if %{?debugspec:0}%{!?debugspec:1}
93 # Set 'krb5support' to 1 if you want to build the openafs-krb5 package
94 # to distribute aklog and asetkey
95 %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
97 # Set 'bootkernelsupport' to 1 if you want to build the
98 # kernel module for Red Hat BOOT Kernels on x86.
99 %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
101 # Define the location of your init.d directory
102 %define initdir /etc/rc.d/init.d
104 #determine if the kernel provides an arch-specific Provides
105 %define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
107 # Define the location of the PAM security module directory
108 %define pamdir /%{_lib}/security
112 # Define the set of kernel module variations to be built:
113 # For 2.4 kernels we just build everything at once for a particular
114 # kernel. So we build up, smp, and bigmem all at once.
115 # For 2.6 kernels we have to build against the specific kernel headers
116 # for a particular kernel variation. AFS will handle the specific smp or
117 # non-smp determination. So just always build as if it's "up" -- the kernel
118 # version will have the 'variation' type already in the version #.
121 %define smp_package 0
122 %define bigmem_package 0
123 %define hugemem_package 0
124 %define largesmp_package 0
126 #######################################################################
129 %define kdepend kernel-source
131 %define smp_package 1
134 %define bigmem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} bigmem)
135 %if %{bigmem_package}
136 %define bigmem_ext bigmem
139 %define hugemem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} hugemem)
140 %if %{hugemem_package}
141 %define hugemem_ext hugemem
144 %define kvariations up smp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
146 #######################################################################
150 %define kvariations up
155 %define up_package %(%{kversis} "%{ktype}" "")
156 %define smp_package %(%{kversis} "%{ktype}" "smp")
157 %define hugemem_package %(%{kversis} "%{ktype}" "hugemem")
158 %define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
161 %if !%{up_package} && !%{smp_package} && !%{hugemem_package} && !%{largesmp_package}
162 %error "unknown kernel type: %{ktype}"
165 %if !%{kernvers_on_cmdline}
166 %define kdepend %{ksrcdir}/include/linux/version.h
169 #######################################################################
172 %error "unknown kernel version: ${kvers} (parsed from %{kernvers})"
176 # End of legacy kernel module build
179 #######################################################################
180 # You probably don't need to change anything beyond this line
181 # NOTE: If you do, please email me!!!
183 # Determine which elements of OpenAFS to build. For non-x86 arches
184 # (subject to the ExclusiveArch setting, below), we build both userspace
185 # and modules. For most x86 arches, we build just the kernel modules. For
186 # i386, we build just the userspace. If you're running an i386 kernel,
187 # you'll need to tweak that last bit.
188 %if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
190 %ifarch x86_64 ia64 s390 s390x
191 %define build_userspace 1
192 %define build_modules 1
194 %define build_authlibs 1
196 %define build_authlibs 0
201 %define build_userspace 0
202 %define build_modules 1
203 %define build_authlibs 1
207 %define build_userspace 1
208 %define build_modules 0
209 %define build_authlibs 1
214 # deal with cmdline specification
215 %if %{build_userspace_on_cmdline} || %{build_modules_on_cmdline}
216 %if !%{build_userspace_on_cmdline}
217 %define build_userspace 0
219 %if !%{build_modules_on_cmdline}
220 %define build_modules 0
224 %if !%{build_authlibs_on_cmdline}
225 %if %{build_userspace_on_cmdline}
226 %define build_authlibs 1
228 %define build_authlibs 0
232 # Make sure RPM doesn't complain about installed but non-packaged files.
233 #define __check_files %{nil}
235 Summary: OpenAFS distributed filesystem
238 Release: %{pkgrel}%{?dist}
239 License: IBM Public License
240 URL: http://www.openafs.org
241 BuildRoot: %{_tmppath}/%{name}-%{version}-root
242 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
243 Group: Networking/Filesystems
244 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
246 BuildRequires: krb5-devel
248 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
250 # http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
251 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
252 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
253 %define srcdir openafs-%{afsvers}
255 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
256 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
258 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2010-12-13
260 Source30: openafs-kernel-version.sh
261 Source996: openafs-kvers-is.sh
262 Source997: openafs-buildfedora.pl
263 Source998: openafs-buildall.sh
264 Source999: openafs-kmodtool
267 The AFS distributed filesystem. AFS is a distributed filesystem
268 allowing cross-platform sharing of files among multiple computers.
269 Facilities are provided for access control, authentication, backup and
270 administrative management.
272 This package provides common files shared across all the various
273 OpenAFS packages but are not necessarily tied to a client or server.
275 The OpenAFS SRPM can be rebuilt with the following options to control
278 --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version
279 to build modules against. The default is
280 to build against the currently-running
282 --define "kbase /lib/modules/" The base location to look for kernel headers
283 --define "kend /build" The 'end' location to look for kernels
284 The build will define ksrvdir as
285 %%{kbase}<kernvers>%%{kend}
287 --without krb5 Disable krb5 support (default: with krb5)
288 --with bitmap-later Enable "bitmap later" support
289 --with bos-restricted Enable "bos restricted" mode
290 --with largefiles Enable "largefile fileserver" mode
291 --with supergroups Enable "supergroups"
293 --target=i386 The target architecture to build for.
294 When building for a non-default target
295 the build may choose whether to build
296 userspace or kernel modules automatically.
297 The defaults are probably what you want.
299 --define "build_userspace 1" Request building of userspace tools
300 --define "build_modules 1" Request building of kernel modules
301 You probably never need to specify these.
303 --define "kmoddir /lib/modules" This is the base location where modules
304 will be installed. You probably don't
305 need to change this ever.
307 --define "fedorakmod 0" Disable the building of 'Fedora' style kernel
308 modules, and use the old format.
310 --define "kvariants <variants>" When building Fedora style kernel modules,
311 this defines the set of kernel variants
313 <variants> is a space seperated list which
314 may contain one or more of
315 '' (for the generic kernel), smp, PAE, xen
318 To a kernel module for your running kernel, just run:
319 rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
321 ##############################################################################
323 # build the userspace side of things if so requested
325 ##############################################################################
326 %if %{build_userspace}
329 Requires: binutils, openafs = %{version}
332 Requires: %{name}-kmod >= %{version}
333 Provides: %{name}-kmod-common = %{version}
335 Requires: openafs-kernel
338 Summary: OpenAFS Filesystem Client
339 Group: Networking/Filesystem
342 The AFS distributed filesystem. AFS is a distributed filesystem
343 allowing cross-platform sharing of files among multiple computers.
344 Facilities are provided for access control, authentication, backup and
345 administrative management.
347 This package provides basic client support to mount and manipulate
351 Requires: openafs = %{version}
352 Summary: OpenAFS Filesystem Server
353 Group: Networking/Filesystems
356 The AFS distributed filesystem. AFS is a distributed filesystem
357 allowing cross-platform sharing of files among multiple computers.
358 Facilities are provided for access control, authentication, backup and
359 administrative management.
361 This package provides basic server support to host files in an AFS
365 %package -n dkms-%{name}
366 Summary: DKMS-ready kernel source for AFS distributed filesystem
367 Group: Development/Kernel
368 Provides: openafs-kernel = %{version}
370 Provides: %{name}-kmod = %{version}
375 Requires: %{name}-kmod-common = %{version}
377 %description -n dkms-%{name}
378 The AFS distributed filesystem. AFS is a distributed filesystem
379 allowing cross-platform sharing of files among multiple computers.
380 Facilities are provided for access control, authentication, backup and
381 administrative management.
383 This package provides the source code to allow DKMS to build an
387 %if %{build_authlibs}
389 Summary: OpenAFS authentication shared libraries
390 Group: Networking/Filesystems
392 %description authlibs
393 The AFS distributed filesystem. AFS is a distributed filesystem
394 allowing cross-platform sharing of files among multiple computers.
395 Facilities are provided for access control, authentication, backup and
396 administrative management.
398 This package provides a shared version of libafsrpc and libafsauthent.
399 None of the programs included with OpenAFS currently use these shared
400 libraries; however, third-party software that wishes to perform AFS
401 authentication may link against them.
404 %package authlibs-devel
405 %if %{build_authlibs}
406 Requires: openafs-authlibs = %{version}
408 Requires: openafs-devel = %{version}
409 Summary: OpenAFS shared library development
410 Group: Development/Filesystems
412 %description authlibs-devel
413 The AFS distributed filesystem. AFS is a distributed filesystem
414 allowing cross-platform sharing of files among multiple computers.
415 Facilities are provided for access control, authentication, backup and
416 administrative management.
418 This package includes the static versions of libafsrpc and
419 libafsauthent, and symlinks required for building against the dynamic
423 Summary: OpenAFS Development Libraries and Headers
424 Group: Development/Filesystems
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 static development libraries and headers needed
433 to compile AFS applications. Note: AFS currently does not provide
437 Summary: OpenAFS user and administrator documentation
438 Requires: openafs = %{version}
439 Group: Networking/Filesystems
442 The AFS distributed filesystem. AFS is a distributed filesystem
443 allowing cross-platform sharing of files among multiple computers.
444 Facilities are provided for access control, authentication, backup and
445 administrative management.
447 This package provides HTML documentation for OpenAFS users and system
450 %package kernel-source
451 Summary: OpenAFS Kernel Module source tree
452 Group: Networking/Filesystems
453 Provides: openafs-kernel = %{version}
455 Provides: %{name}-kmod = %{version}
458 %description kernel-source
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 the source code to build your own AFS kernel
468 Summary: OpenAFS client compatibility symlinks
469 Requires: openafs = %{version}, openafs-client = %{version}
470 Group: Networking/Filesystems
471 Obsoletes: openafs-client-compat
474 The AFS distributed filesystem. AFS is a distributed filesystem
475 allowing cross-platform sharing of files among multiple computers.
476 Facilities are provided for access control, authentication, backup and
477 administrative management.
479 This package provides compatibility symlinks in /usr/afsws. It is
480 completely optional, and is only necessary to support legacy
481 applications and scripts that hard-code the location of AFS client
485 Summary: OpenAFS KA kpasswd support
487 Group: Networking/Filesystems
490 The AFS distributed filesystem. AFS is a distributed filesystem
491 allowing cross-platform sharing of files among multiple computers.
492 Facilities are provided for access control, authentication, backup and
493 administrative management.
495 This package provides the compatibility symlink for kpasswd, in case
496 you are using KAserver instead of Krb5.
500 Summary: OpenAFS programs to use with krb5
501 Requires: openafs = %{version}
502 Group: Networking/Filesystems
503 BuildRequires: krb5-devel
506 The AFS distributed filesystem. AFS is a distributed filesystem
507 allowing cross-platform sharing of files among multiple computers.
508 Facilities are provided for access control, authentication, backup and
509 administrative management.
511 This package provides compatibility programs so you can use krb5
512 to authenticate to AFS services, instead of using AFS's homegrown
513 krb4 lookalike services.
518 ##############################################################################
520 # build the kernel modules if so requested
522 ##############################################################################
526 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
530 # Legacy kernel compilation code here ...
531 %define modkversion %(echo %{kernvers} | cut -d- -f1)
532 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
533 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
537 Summary: OpenAFS Kernel Module (compiled for UP)
538 Release: %{modpkgrel}
539 Group: Networking/Filesystems
540 Provides: openafs-kernel = %{version}
542 Requires: kernel-%{_target_cpu} = %{kversion}
544 Requires: /boot/config-%{kernvers}
548 The AFS distributed filesystem. AFS is a distributed filesystem
549 allowing cross-platform sharing of files among multiple computers.
550 Facilities are provided for access control, authentication, backup and
551 administrative management.
553 This package provides a precompiled AFS kernel module for %{kernvers}.
558 Summary: OpenAFS Kernel Module (compiled for SMP)
559 Release: %{modpkgrel}
560 Provides: openafs-kernel = %{version}
562 Requires: kernel-smp-%{_target_cpu} = %{kversion}
564 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
566 Group: Networking/Filesystems
568 %description kernel-smp
569 The AFS distributed filesystem. AFS is a distributed filesystem
570 allowing cross-platform sharing of files among multiple computers.
571 Facilities are provided for access control, authentication, backup and
572 administrative management.
574 This package provides a precompiled AFS kernel module for %{kernvers}.
577 %if %{largesmp_package}
578 %package kernel-largesmp
579 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
580 Release: %{modpkgrel}
581 Provides: openafs-kernel = %{version}
583 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
585 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
587 Group: Networking/Filesystems
589 %description kernel-largesmp
590 The AFS distributed filesystem. AFS is a distributed filesystem
591 allowing cross-platform sharing of files among multiple computers.
592 Facilities are provided for access control, authentication, backup and
593 administrative management.
595 This package provides a precompiled AFS kernel module for %{kernvers}.
598 %if %{bigmem_package}
599 %package kernel-bigmem
600 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
601 Release: %{modpkgrel}
602 Provides: openafs-kernel = %{version}
604 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
606 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
608 Group: Networking/Filesystems
610 %description kernel-bigmem
611 The AFS distributed filesystem. AFS is a distributed filesystem
612 allowing cross-platform sharing of files among multiple computers.
613 Facilities are provided for access control, authentication, backup and
614 administrative management.
616 This package provides a precompiled AFS kernel module for %{kernvers}.
619 %if %{hugemem_package}
620 %package kernel-hugemem
621 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
622 Release: %{modpkgrel}
623 Provides: openafs-kernel = %{version}
625 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
627 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
629 Group: Networking/Filesystems
631 %description kernel-hugemem
632 The AFS distributed filesystem. AFS is a distributed filesystem
633 allowing cross-platform sharing of files among multiple computers.
634 Facilities are provided for access control, authentication, backup and
635 administrative management.
637 This package provides a precompiled AFS kernel module for %{kernvers}.
641 # End legacy kernel compilation code ...
644 ##############################################################################
648 ##############################################################################
652 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
654 : @@@ kernel version: %{kernvers}
656 : @@@ kernel variations: %{kvariants}
658 : @@@ base kernel version:%{kversion}
659 : @@@ kernel modules dir: %{kxmoddir}
660 : @@@ kernel source dir: %{ksrcdir}
662 : @@@ kernel variations: %{kvariations}
665 : @@@ kernel type: up
667 : @@@ kernel type: %{ktype}
671 : @@@ PAM modules dir: %{pamdir}
672 : @@@ build userspace: %{build_userspace}
673 : @@@ build modules: %{build_modules}
675 : @@@ target cpu: %{_target_cpu}
677 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
679 # Install OpenAFS src and doc
680 #%setup -q -n %{srcdir}
681 %setup -q -b 1 -n %{srcdir}
683 ##############################################################################
687 ##############################################################################
698 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
704 x86_64) sysname=amd64_linux${kv} ;;
705 alpha*) sysname=alpha_linux_${kv} ;;
706 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
707 *) sysname=%{_arch}_linux${kv} ;;
711 archlist="i386 i586 i686 athlon"
712 %if %{bootkernelsupport}
713 archlist="${archlist} BOOT"
720 # PrintDefine var value statements file
725 echo "#ifndef $1" >> $4
730 echo "#undef $1" >> $4
735 echo "#define $1 $2" >> $4
745 echo "#include $1" >> $4
755 # PrintRedhatKernelFix arch mp file
756 PrintRedhatKernelFix() {
770 largesmp) largesmp=1;;
774 echo "$2 not supported"
783 PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
785 PrintDefine __BOOT_KERNEL_ENTERPRISE $ent und,def,nl $file
786 PrintDefine __BOOT_KERNEL_BIGMEM $bigmem und,def,nl $file
787 PrintDefine __BOOT_KERNEL_HUGEMEM $hugemem und,def,nl $file
788 PrintDefine __BOOT_KERNEL_SMP $smp und,def,nl $file
789 PrintDefine __BOOT_KERNEL_LARGESMP $largesmp und,def,nl $file
790 PrintDefine __BOOT_KERNEL_UP $up und,def,nl $file
791 PrintDefine __BOOT_KERNEL_BOOT $boot und,def,nl $file
792 PrintDefine __BOOT_KERNEL_BOOTSMP $bootsmp und,def,nl $file
794 PrintDefine '"/boot/kernel.h"' "" inc,nl $file # include file
796 for ar in $archlist ; do
797 if [ "$ar" = "$arch" ]; then
798 PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
800 PrintDefine "__MODULE_KERNEL_$ar" "" und $file # undef
805 PrintDefine "" "" end $file
807 if [ %{debugspec} = 1 ] ; then
808 echo "Kernel Configuration File for Red Hat kernels:"
813 config_opts="--enable-redhat-buildsys \
814 %{?_with_bitmap_later:--enable-bitmap-later} \
815 %{?_with_bos_restricted:--enable-bos-restricted-mode} \
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
845 %if %{?krb5config:1}%{!?krb5config:0}
846 KRB5_CONFIG="%{krb5config}"
851 ./configure --with-afs-sysname=${sysname} \
852 --prefix=%{_prefix} \
853 --libdir=%{_libdir} \
854 --bindir=%{_bindir} \
855 --sbindir=%{_sbindir} \
856 --disable-strip-binaries \
857 --with-linux-kernel-packaging \
859 --with-linux-kernel-headers=${ksrc} \
867 # Build the libafs tree
868 make only_libafs_tree || exit 1
870 # Configure each of our kernel modules
872 %if %{fedorakmod} && %{build_modules}
873 for kvariant in %{kvariants} ; do
874 if [ -n "${kvariant}" ] ; then
875 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
876 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
878 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
881 cp -R libafs_tree _kmod_build_${kvariant}
882 pushd _kmod_build_${kvariant}
883 ./configure --with-afs-sysname=${sysname} \
884 --prefix=%{_prefix} \
885 --libdir=%{_libdir} \
886 --bindir=%{_bindir} \
887 --sbindir=%{_sbindir} \
888 --with-linux-kernel-packaging \
889 --with-linux-kernel-headers=${ksrc} \
890 --enable-disconnected \
892 --with-krb5-conf=/usr/kerberos/bin/krb5-config \
901 %if %{build_userspace}
902 # Build the user-space AFS stuff
903 make dest_nolibafs || exit 1
908 for kvariant in %{kvariants}
910 if [ -n "${kvariant}" ] ; then
911 pushd _kmod_build_$kvariant;
915 make dest_only_libafs
920 # Begin legacy kernel module building code
923 # Build all the kernel modules for linux 2.4.x
924 for variation in %{kvariations}
926 if [ ${variation} = up ]
928 local_smp_def=-DREDHAT_FIX
931 local_smp_def="-DAFS_SMP -DREDHAT_FIX"
935 PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
936 make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
937 LINUX_MODULE_NAME="${suffix}" MPS=SP
940 rm -f src/config/redhat-fix.h
942 %elseif %{kvers_is_26}
943 # Build the kernel module for this version of linux 2.6.x
944 # Notice how much easier this is than 2.4. On the other hand,
945 # we require much more external support to build multiple modules.
947 # the MPS=SP just means that we don't add a '.mp' to the name.
948 make dest_only_libafs MPS=SP
951 # End legacy kernel module building code
956 ##############################################################################
960 ##############################################################################
963 export DONT_GPRINTIFY=1
965 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
977 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
983 x86_64) sysname=amd64_linux${kv} ;;
984 alpha*) sysname=alpha_linux_${kv} ;;
985 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
986 *) sysname=%{_arch}_linux${kv} ;;
990 %if %{build_userspace}
991 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
992 mkdir -p $RPM_BUILD_ROOT%{_libdir}
993 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
994 mkdir -p $RPM_BUILD_ROOT%{initdir}
995 mkdir -p $RPM_BUILD_ROOT/etc/openafs
996 mkdir -p $RPM_BUILD_ROOT%{pamdir}
997 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
998 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
999 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1000 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1001 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1002 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1004 # Copy files from dest to the appropriate places in BuildRoot
1005 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1006 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1007 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1008 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1009 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1011 # Fix the location of restorevol, since it should be available for
1012 # any user in /usr/bin
1013 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1015 # Link kpasswd to kapasswd
1016 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1018 # Copy root.client config files
1019 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1020 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1021 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1024 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1027 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1028 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1030 # Populate /usr/vice/etc
1031 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1032 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1033 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1034 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1037 # install dkms source
1039 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1040 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1042 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1044 PACKAGE_VERSION="%{dkms_version}"
1046 # Items below here should not have to change with each driver version
1047 PACKAGE_NAME="%{name}"
1048 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"
1049 CLEAN="make -C src/libafs clean"
1051 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1052 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1059 # install kernel-source
1062 # Install the kernel module source tree
1063 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1064 tar cf - -C libafs_tree . | \
1065 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1067 # Next, copy the LICENSE Files, README
1068 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1069 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1070 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1073 # Install DOCUMENTATION
1076 # Build the DOC directory
1077 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1078 tar cf - -C doc LICENSE html pdf | \
1079 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1080 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1081 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1086 tar cf - -C doc/man-pages man1 man5 man8 | \
1087 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1089 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1091 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1093 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1096 # remove unused man pages
1097 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1098 dkload knfs package runntp symlink symlink_list symlink_make \
1100 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1103 # rename kpasswd to kapasswd
1104 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1107 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1109 # create list of man pages that go in the 'openafs' package
1110 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1111 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|udebug|unlog|^uss|^vos' \
1112 |egrep -v '^afs_compile_et' \
1115 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1116 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1119 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1120 |egrep '^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1126 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1127 %{_bindir}/afsmonitor
1134 %{_bindir}/pagsh.krb
1136 %{_bindir}/restorevol
1140 %{_bindir}/tokens.krb
1141 %{_bindir}/translate_et
1149 %{_sbindir}/read_tape
1154 EOF-openafs-file-list
1156 # add man pages to the list
1157 cat openafs-man1files \
1158 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1160 cat openafs-man5files \
1161 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1163 cat openafs-man8files \
1164 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1168 # Install compatiblity links
1170 for d in bin:bin etc:sbin; do
1171 olddir=`echo $d | sed 's/:.*$//'`
1172 newdir=`echo $d | sed 's/^.*://'`
1173 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1174 for f in `cat openafs-file-list`; do
1175 if echo $f | grep -q /$newdir/; then
1177 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1183 # Remove files we're not installing
1186 # remove duplicated files from /usr/afs/bin
1187 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1188 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1191 # the rest are not needed.
1192 for f in dlog dpass install knfs livesys xstat_cm_test xstat_fs_test ; do
1193 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1196 # not supported on Linux or duplicated
1197 for f in kdb rmtsysd kpwvalid ; do
1198 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1200 # sometimes install sucks and puts down a directory. kill it all.
1201 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1203 # remove man pages from programs deleted above
1204 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
1205 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1208 # PAM modules are doubly-installed Remove the version we don't need
1209 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1210 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1213 %if !%{build_authlibs}
1214 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1215 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1216 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1217 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1222 %if %{build_modules}
1224 for kvariant in %{kvariants}
1226 if [ -n "$kvariant" ] ; then
1227 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1228 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1229 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1231 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1232 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1235 if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1236 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1237 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1239 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1240 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1245 install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1248 # Install the kernel modules
1249 for variation in %{kvariations}
1251 if [ ${variation} = up ]
1254 modname=openafs${kmodend}
1256 kvar=%{kxmoddir}${variation}
1257 modname=openafs${kmodend}
1260 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1261 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1265 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1270 ##############################################################################
1274 ##############################################################################
1276 rm -f openafs-file-list
1277 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1278 rm -fr $RPM_BUILD_ROOT
1281 ##############################################################################
1285 ##############################################################################
1286 %if %{build_userspace}
1289 if [ -e %{_prefix}/afsws ]; then
1290 /bin/rm -fr %{_prefix}/afsws
1294 chkconfig --add openafs-client
1295 if [ ! -d /afs ]; then
1297 chown root.root /afs
1299 [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1302 # Create the CellServDB
1303 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1305 ( cd /usr/vice/etc ; \
1306 cat CellServDB.local CellServDB.dist > CellServDB ; \
1307 chmod 644 CellServDB )
1310 echo The AFS cache is configured for 100 MB. Edit the
1311 echo /usr/vice/etc/cacheinfo file to change this before
1312 echo running AFS for the first time. You should also
1313 echo set your home cell in /usr/vice/etc/ThisCell.
1315 echo Also, you may want to edit /etc/pam.d/login and
1316 echo possibly others there to get an AFS token on login.
1319 echo auth sufficient %{pamdir}/pam_afs.so try_first_pass ignore_root
1321 echo before the one for pwdb.
1325 #on an upgrade, don't enable if we were disabled
1326 if [ $1 = 1 ] ; then
1327 chkconfig --add openafs-server
1329 %{initdir}/openafs-server condrestart
1331 %if %{build_authlibs}
1340 if [ $1 = 0 ] ; then
1341 [ -d /afs ] && rmdir /afs
1345 if [ $1 = 0 ] ; then
1346 %{initdir}/openafs-client stop
1347 chkconfig --del openafs-client
1351 if [ $1 = 0 ] ; then
1352 %{initdir}/openafs-server stop
1353 chkconfig --del openafs-server
1356 %if %{build_dkmspkg}
1357 %post -n dkms-%{name}
1358 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1359 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1360 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1362 %preun -n dkms-%{name}
1363 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1367 %if %{build_modules}
1371 /sbin/depmod -ae %{kernvers}
1374 /sbin/depmod -ae %{kernvers}
1380 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1383 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1386 %if %{largesmp_package}
1387 %post kernel-largesmp
1388 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1390 %postun kernel-largesmp
1391 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1394 %if %{bigmem_package}
1396 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1398 %postun kernel-bigmem
1399 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1402 %if %{hugemem_package}
1403 %post kernel-hugemem
1404 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1406 %postun kernel-hugemem
1407 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1412 ##############################################################################
1416 ##############################################################################
1417 %if %{build_userspace}
1419 %files -f openafs-file-list
1420 %defattr(-,root,root)
1421 %config /etc/sysconfig/openafs
1422 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1425 %defattr(-,root,root)
1426 %docdir %{_docdir}/openafs-%{afsvers}
1427 %dir %{_docdir}/openafs-%{afsvers}
1428 %{_docdir}/openafs-%{afsvers}/ChangeLog
1429 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1430 %{_docdir}/openafs-%{afsvers}/pdf
1433 %defattr(-,root,root)
1434 %dir %{_prefix}/vice
1435 %dir %{_prefix}/vice/cache
1436 %dir %{_prefix}/vice/etc
1437 %dir %{_prefix}/vice/etc/C
1438 %{_prefix}/vice/etc/CellServDB.dist
1439 %config %{_prefix}/vice/etc/ThisCell
1440 %config %{_prefix}/vice/etc/cacheinfo
1443 %{_prefix}/vice/etc/afsd
1444 %{_prefix}/vice/etc/C/afszcm.cat
1445 %{pamdir}/pam_afs.krb.so.1
1446 %{pamdir}/pam_afs.krb.so
1447 %{pamdir}/pam_afs.so.1
1448 %{pamdir}/pam_afs.so
1449 %{initdir}/openafs-client
1450 %{_mandir}/man1/cmdebug.*
1451 %{_mandir}/man1/copyauth.*
1452 %{_mandir}/man1/up.*
1453 %{_mandir}/man5/afs.5.gz
1454 %{_mandir}/man5/afs_cache.5.gz
1455 %{_mandir}/man5/afs_volume_header.5.gz
1456 %{_mandir}/man5/afszcm.cat.5.gz
1457 %{_mandir}/man5/cacheinfo.*
1458 %{_mandir}/man8/afsd.*
1459 %{_mandir}/man8/rmtsysd.*
1460 %{_mandir}/man8/vsys.*
1461 %{_mandir}/man5/CellAlias.*
1464 %defattr(-,root,root)
1466 %dir %{_prefix}/afs/bin
1467 %dir %{_prefix}/afs/etc
1468 %dir %{_prefix}/afs/logs
1469 %{_prefix}/afs/bin/bosserver
1470 %{_prefix}/afs/bin/bos_util
1471 %{_prefix}/afs/bin/buserver
1472 %{_prefix}/afs/bin/dafileserver
1473 %{_prefix}/afs/bin/dafssync-debug
1474 %{_prefix}/afs/bin/dasalvager
1475 %{_prefix}/afs/bin/davolserver
1476 %{_prefix}/afs/bin/fileserver
1477 %{_prefix}/afs/bin/fssync-debug
1478 # Should we support KAServer?
1479 %{_prefix}/afs/bin/kaserver
1480 %{_prefix}/afs/bin/ka-forwarder
1481 %{_prefix}/afs/bin/pt_util
1482 %{_prefix}/afs/bin/ptserver
1483 %{_prefix}/afs/bin/salvager
1484 %{_prefix}/afs/bin/salvageserver
1485 %{_prefix}/afs/bin/salvsync-debug
1486 %{_prefix}/afs/bin/state_analyzer
1487 %{_prefix}/afs/bin/upclient
1488 %{_prefix}/afs/bin/upserver
1489 %{_prefix}/afs/bin/vlserver
1490 %{_prefix}/afs/bin/volinfo
1491 %{_prefix}/afs/bin/volserver
1492 %{_sbindir}/kadb_check
1493 %{_sbindir}/prdb_check
1494 %{_sbindir}/vldb_check
1495 %{_sbindir}/vldb_convert
1497 %{initdir}/openafs-server
1498 %{_mandir}/man5/AuthLog.*
1499 %{_mandir}/man5/BackupLog.*
1500 %{_mandir}/man5/BosConfig.*
1501 %{_mandir}/man5/BosLog.*
1502 %{_mandir}/man5/FORCESALVAGE.*
1503 %{_mandir}/man5/FileLog.*
1504 %{_mandir}/man5/KeyFile.*
1505 %{_mandir}/man5/NetInfo.*
1506 %{_mandir}/man5/NetRestrict.*
1507 %{_mandir}/man5/NoAuth.*
1508 %{_mandir}/man5/SALVAGE.fs.*
1509 %{_mandir}/man5/SalvageLog.*
1510 %{_mandir}/man5/sysid.*
1511 %{_mandir}/man5/UserList.*
1512 %{_mandir}/man5/VLLog.*
1513 %{_mandir}/man5/VolserLog.*
1514 %{_mandir}/man5/bdb.DB0.*
1515 %{_mandir}/man5/fms.log.*
1516 %{_mandir}/man5/kaserver.DB0.*
1517 %{_mandir}/man5/kaserverauxdb.*
1518 %{_mandir}/man5/krb.conf.*
1519 %{_mandir}/man5/krb.excl.*
1520 %{_mandir}/man5/prdb.DB0.*
1521 %{_mandir}/man5/salvage.lock.*
1522 %{_mandir}/man5/tapeconfig.*
1523 %{_mandir}/man5/vldb.DB0.*
1524 %{_mandir}/man8/buserver.*
1525 %{_mandir}/man8/fileserver.*
1526 %{_mandir}/man8/dafileserver.*
1527 %{_mandir}/man8/dasalvager.*
1528 %{_mandir}/man8/davolserver.*
1529 %{_mandir}/man8/kadb_check.*
1530 %{_mandir}/man8/ka-forwarder.*
1531 %{_mandir}/man8/prdb_check.*
1532 %{_mandir}/man8/ptserver.*
1533 %{_mandir}/man8/pt_util.*
1534 %{_mandir}/man8/salvager.*
1535 %{_mandir}/man8/salvageserver.*
1536 %{_mandir}/man8/state_analyzer.*
1537 %{_mandir}/man8/upclient.*
1538 %{_mandir}/man8/upserver.*
1539 %{_mandir}/man8/vldb_check.*
1540 %{_mandir}/man8/vldb_convert.*
1541 %{_mandir}/man8/vlserver.*
1542 %{_mandir}/man8/voldump.*
1543 %{_mandir}/man8/volinfo.*
1544 %{_mandir}/man8/volserver.*
1546 %if %{build_authlibs}
1548 %defattr(-,root,root)
1549 %{_libdir}/libafsauthent.so.*
1550 %{_libdir}/libafsrpc.so.*
1551 %{_libdir}/libkopenafs.so.*
1552 %{_libdir}/libafshcrypto.so.*
1555 %files authlibs-devel
1556 %defattr(-,root,root)
1557 %{_includedir}/kopenafs.h
1558 %{_libdir}/libafsauthent.a
1559 %{_libdir}/libafsrpc.a
1560 %{_libdir}/libafsauthent_pic.a
1561 %{_libdir}/libafsrpc_pic.a
1562 %{_libdir}/libkopenafs.a
1563 %{_libdir}/libafshcrypto.a
1564 %if %{build_authlibs}
1565 %{_libdir}/libafsauthent.so
1566 %{_libdir}/libafsrpc.so
1567 %{_libdir}/libkopenafs.so
1568 %{_libdir}/libafshcrypto.so
1572 %defattr(-,root,root)
1573 %{_bindir}/afs_compile_et
1576 %{_includedir}/des.h
1577 %{_includedir}/des_conf.h
1578 %{_includedir}/des_odd.h
1579 %{_includedir}/des_prototypes.h
1580 %{_includedir}/lock.h
1581 %{_includedir}/lwp.h
1582 %{_includedir}/mit-cpyright.h
1583 %{_includedir}/preempt.h
1585 %{_includedir}/timer.h
1586 %{_includedir}/ubik.h
1587 %{_includedir}/ubik_int.h
1591 %{_libdir}/librxkad.a
1592 %{_libdir}/librxstat.a
1593 %{_libdir}/libubik.a
1594 %{_mandir}/man1/rxgen.*
1595 %{_mandir}/man1/afs_compile_et.*
1597 %if %{build_dkmspkg}
1598 %files -n dkms-%{name}
1599 %defattr(-,root,root)
1600 %{_prefix}/src/%{name}-%{dkms_version}
1603 %files kernel-source
1604 %defattr(-,root,root)
1605 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1606 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1607 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1608 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1611 %defattr(-,root,root)
1615 %defattr(-,root,root)
1621 %defattr(-,root,root)
1623 %{_bindir}/klog.krb5
1625 %{_mandir}/man1/aklog.*
1626 %{_mandir}/man8/asetkey.*
1631 %if %{build_modules}
1636 %defattr(-,root,root)
1637 %{kxmoddir}/fs/openafs/openafs.*
1642 %defattr(-,root,root)
1643 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1646 %if %{largesmp_package}
1647 %files kernel-largesmp
1648 %defattr(-,root,root)
1649 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1652 %if %{bigmem_package}
1653 %files kernel-bigmem
1654 %defattr(-,root,root)
1655 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1658 %if %{hugemem_package}
1659 %files kernel-hugemem
1660 %defattr(-,root,root)
1661 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1667 ##############################################################################
1669 ### openafs.spec change log
1671 ##############################################################################
1673 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1674 - Make the RPM mockable
1676 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1677 - Update to match the shipped 1.4.5 RPMS
1678 - Fix the kvariant stuff to only configure the 'standard' case once
1679 - Add openafs-kvers.sh back in
1681 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1682 - Use Fedora style kmods, which allows us to install multiple kernel types
1684 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1685 - Use distributed files, rather than those in packager's SOURCE directory
1686 - Remove SuidCells stuff, which was unused
1688 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1689 - integrate s390x changes
1690 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1691 that won't build the .so files.
1693 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1695 - use installed aklog manpage.
1696 - moduleparam patch obsoleted.
1698 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1699 - update to 1.4.2-rc1
1700 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1701 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1702 - don't need the posixlock patch anymore.
1704 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1705 - update to 1.4.2-beta2
1706 - add linux2.4 posixlock API patch
1708 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1709 - moduleparam and krb524 patches no longer required in OA-CVS
1711 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1712 - change non-target-cpu kernel dep to a file dep
1713 - make sure we use the proper kernel version for the dependency.
1715 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1716 - allow users to specify local CellServDB and SuidCells entries
1717 don't overwrite user's changes. Provide a .dist an let users
1718 make entries in a ".local"
1719 - build the CellServDB and SuidCells at client startup and at
1721 - add provideskernelarch functionality to openafs-kvers-is.sh
1722 - use that functionality to Require kernel{,-<type>}-targetcpu
1723 to get better package safety due to RPM bugs where the kernel
1724 release isn't used so you can install the kernel module against
1725 any kernel of the same major version.
1727 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1728 - update the README in openafs-kernel-source
1729 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1730 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1732 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1733 - build requires autoconf and automake for krb5support
1734 and autoconf for standard package
1735 - dont setup the krb5 migration kit (or patches) if we don't care.
1736 - require ncurses-devel to build
1738 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1739 - look for krb524 functions in libkrb524 if we can't find them
1740 in the standard locations.
1742 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1743 - fix the module_param_array macro for Linux 2.6.9.
1745 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1746 - update to 1.4.1 release.
1747 - distribute asetkey from openafs instead of krb5-migration kit
1748 - don't need to apply the FC5 patches because they are part of the distro.
1749 - install asetkey into the "proper" place
1750 - dont list a manpage twice.
1751 - package asetkey man page. delete it when not needed.
1753 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1754 - turn authlibs back on, because RT #18767 was applied to CVS.
1756 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1757 - update to 1.4.1rc10, build on FC5
1758 - fix the man pages (distribute into various packages)
1759 - include patches for FC5, RT #29112 and #29122
1761 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1762 - openafs-server shouldn't depend on the kernel module.
1764 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1765 - patch from Mike Polek <mike at pictage.com> to run depmod for
1766 the target kernel and not the running kernel.
1768 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1769 - build aklog from the openafs sources, not from the krb5 migration kit.
1771 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1772 - set openafs-kernel-source to Provide openafs-kernel
1774 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1775 - update afs-krb5 res_search patch: look for res_search and __res_search
1776 - update to 1.4.0 final
1778 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1779 - remove all kdump builds.
1781 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1782 - fix openafs-kernel-version.sh so it will build an RPM for the
1783 currently-running kernel even if it's smp on 2.6.
1785 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1786 - upgrade to 1.4.0rc5
1787 - turn off authlibs packages
1789 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1790 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1791 it's called "openafs" and not "libafs". This fixes the shutdown
1794 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1795 - update kversis script, add 'kvers' operation
1796 - fix bug that 2.6 smp/hugemem kernels don't provide
1797 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1798 - add patch to remove res_search from the afs-krb5 configure
1800 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1801 - Update to 1.4.0rc4
1802 - Update the afs-krb5 krb524 patch so it actually works on
1803 some older systems like RHEL3 that still need -lkrb524.
1804 - Update the buildall script so choose better architecture support,
1805 e.g. don't build i586 on RHEL.
1806 - Update the rebuild information in the SPEC file.
1807 - Add support for finding .EL kernels in openafs-kvers-is.sh
1808 - Add additional error messages when kernel version/type parsing fails.
1809 - Update the buildall script to use the kernel srcdir directly.
1811 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1812 - Add "hugemem" to 2.4 configs
1813 - Add checks to support scripts to determine whether to build
1814 the bigmem and/or hugemem kernels for 2.4.
1816 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1817 - Added some afs-krb5 patches to get the migration kit to build
1818 on modern AFS and modern Kerberos.
1819 - Added authlibs and authlibs-devel packages as per UMich changes.
1821 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1822 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1824 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1825 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1826 from Red Hat. Initial attempt at a release of 1.4. Still need
1827 to work in a 2.6 build system.