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}
27 # Determine the version of the kernel to build against
28 # - automatically select running kernel if there are sources in /lib/modules
29 # - note that this can be overridden on the command line
31 %if !%{kernvers_on_cmdline}
32 %define kernvers %(%{_sourcedir}/openafs-kernel-version.sh)
35 # If we're building for a 2.4 series kernel, then fedora style kmods aren't
36 # appropriate - disable them.
38 %define kern24 %([ `echo "%{kernvers}" | sed -e 's/^\([0-9]*\.[0-9]*\)\..*/\1/'` = "2.4" ] && echo 1 || echo 0)
46 %define kmodtool bash %{_sourcedir}/openafs-kmodtool
48 %define kmod_name openafs
49 %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
52 %{!?kvariants: %define kvariants %{?upvar}}
54 %if %{?ksrcdir:1}%{!?ksrcdir:0}
55 if ( -d %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}) ; then
56 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
58 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}}
62 %else # Legacy kernel build stuff
64 %define kversis %{_sourcedir}/openafs-kvers-is.sh
65 %define kvers %(%{kversis} parsev %{kernvers})
66 %define kvers_is_24 %(%{kversis} %{kvers} "2.4")
67 %define kvers_is_26 %(%{kversis} %{kvers} "2.6")
68 %define ktype %(%{kversis} parset %{kernvers})
69 %define kversion %(%{kversis} kvers %{kernvers})
71 # This is where to look for kernel build include files. Default
72 # is /lib/modules/<kvers>/build, but you can define kbase and
73 # kend on the commandline to change that.
75 %if %{?kbase:0}%{!?kbase:1}
76 %define kbase /lib/modules/
78 %if %{?kend:0}%{!?kend:1}
81 # Let the buildscript define the ksrcdir directly -- needed for RHEL4
82 %if %{?ksrcdir:0}%{!?ksrcdir:1}
83 %define ksrcdir %{kbase}%{kernvers}%{kend}
86 %if %{?kmoddir:0}%{!?kmoddir:1}
87 %define kmoddir /lib/modules
89 %define kxmoddir %{kmoddir}/%{kernvers}
91 # End legacy kernel build stuff
94 %define dkms_version %{pkgvers}-%{pkgrel}%{?dist}
96 # Set 'debugspec' to 1 if you want to debug the spec file. This will
97 # not remove the installed tree as part of the %clean operation
98 %if %{?debugspec:0}%{!?debugspec:1}
102 # Set 'krb5support' to 1 if you want to build the openafs-krb5 package
103 # to distribute aklog and asetkey
104 %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
106 # Set 'bootkernelsupport' to 1 if you want to build the
107 # kernel module for Red Hat BOOT Kernels on x86.
108 %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
110 # Define the location of your init.d directory
111 %define initdir /etc/rc.d/init.d
113 #determine if the kernel provides an arch-specific Provides
114 %define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
116 # Define the location of the PAM security module directory
117 %define pamdir /%{_lib}/security
119 #######################################################################
120 # You probably don't need to change anything beyond this line
121 # NOTE: If you do, please email me!!!
123 # Determine which elements of OpenAFS to build. For non-x86 arches
124 # (subject to the ExclusiveArch setting, below), we build both userspace
125 # and modules. For most x86 arches, we build just the kernel modules. For
126 # i386, we build just the userspace. If you're running an i386 kernel,
127 # you'll need to tweak that last bit.
128 %if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
130 %define build_userspace 1
131 %define build_modules 1
132 %ifarch %{ix86} x86_64 ia64
133 %define build_authlibs 1
135 %define build_authlibs 0
139 %if !%{build_userspace_on_cmdline}
140 %define build_userspace 0
142 %if !%{build_modules_on_cmdline}
143 %define build_modules 0
147 %if !%{build_authlibs_on_cmdline}
148 %if %{build_userspace_on_cmdline}
149 %define build_authlibs 1
151 %define build_authlibs 0
158 # Define the set of kernel module variations to be built:
159 # For 2.4 kernels we just build everything at once for a particular
160 # kernel. So we build up, smp, and bigmem all at once.
161 # For 2.6 kernels we have to build against the specific kernel headers
162 # for a particular kernel variation. AFS will handle the specific smp or
163 # non-smp determination. So just always build as if it's "up" -- the kernel
164 # version will have the 'variation' type already in the version #.
167 %define smp_package 0
168 %define bigmem_package 0
169 %define hugemem_package 0
170 %define largesmp_package 0
172 #######################################################################
175 %define kdepend kernel-source
177 %define smp_package 1
180 %define bigmem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} bigmem)
181 %if %{bigmem_package}
182 %define bigmem_ext bigmem
185 %define hugemem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} hugemem)
186 %if %{hugemem_package}
187 %define hugemem_ext hugemem
190 %define kvariations up smp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
192 #######################################################################
196 %define kvariations up
201 %define up_package %(%{kversis} "%{ktype}" "")
202 %define smp_package %(%{kversis} "%{ktype}" "smp")
203 %define hugemem_package %(%{kversis} "%{ktype}" "hugemem")
204 %define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
207 %if !%{up_package} && !%{smp_package} && !%{hugemem_package} && !%{largesmp_package}
208 %error "unknown kernel type: %{ktype}"
211 %if !%{kernvers_on_cmdline}
212 %define kdepend %{ksrcdir}/include/linux/version.h
215 #######################################################################
218 %error "unknown kernel version: ${kvers} (parsed from %{kernvers})"
222 # End of legacy kernel module build
226 # Make sure RPM doesn't complain about installed but non-packaged files.
227 #define __check_files %{nil}
229 Summary: OpenAFS distributed filesystem
232 Release: %{pkgrel}%{?dist}
233 License: IBM Public License
234 URL: http://www.openafs.org
235 BuildRoot: %{_tmppath}/%{name}-%{version}-root
236 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
237 Group: Networking/Filesystems
238 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
239 %if 0%{?fedora} >= 15
240 BuildRequires: systemd-units perl-devel
243 BuildRequires: perl-devel
245 BuildRequires: perl(ExtUtils::Embed)
247 BuildRequires: krb5-devel
250 BuildRequires: kernel-devel
253 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
255 # http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
256 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
257 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
258 %define srcdir openafs-%{afsvers}
260 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
261 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
263 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2013-01-28
265 Source30: openafs-kernel-version.sh
266 Source996: openafs-kvers-is.sh
267 Source997: openafs-buildfedora.pl
268 Source998: openafs-buildall.sh
269 Source999: openafs-kmodtool
272 The AFS distributed filesystem. AFS is a distributed filesystem
273 allowing cross-platform sharing of files among multiple computers.
274 Facilities are provided for access control, authentication, backup and
275 administrative management.
277 This package provides common files shared across all the various
278 OpenAFS packages but are not necessarily tied to a client or server.
280 The OpenAFS SRPM can be rebuilt with the following options to control
283 --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version
284 to build modules against. The default is
285 to build against the currently-running
287 --define "kbase /lib/modules/" The base location to look for kernel headers
288 --define "kend /build" The 'end' location to look for kernels
289 The build will define ksrvdir as
290 %%{kbase}<kernvers>%%{kend}
292 --without krb5 Disable krb5 support (default: with krb5)
293 --with bitmap-later Enable "bitmap later" support
294 --with bos-restricted Enable "bos restricted" mode
295 --with supergroups Enable "supergroups"
297 --target=i386 The target architecture to build for.
298 When building for a non-default target
299 the build may choose whether to build
300 userspace or kernel modules automatically.
301 The defaults are probably what you want.
303 --define "build_userspace 1" Request building of userspace tools
304 --define "build_modules 1" Request building of kernel modules
305 You probably never need to specify these.
307 --define "kmoddir /lib/modules" This is the base location where modules
308 will be installed. You probably don't
309 need to change this ever.
311 --define "fedorakmod 0" Disable the building of 'Fedora' style kernel
312 modules, and use the old format.
314 --define "kvariants <variants>" When building Fedora style kernel modules,
315 this defines the set of kernel variants
317 <variants> is a space seperated list which
318 may contain one or more of
319 '' (for the generic kernel), smp, PAE, xen
322 To a kernel module for your running kernel, just run:
323 rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
325 ##############################################################################
327 # build the userspace side of things if so requested
329 ##############################################################################
330 %if %{build_userspace}
333 Requires: binutils, openafs = %{version}
334 %if 0%{?fedora} >= 15
335 Requires: systemd-units
336 Requires(post): systemd-units, systemd-sysv
337 Requires(preun): systemd-units
338 Requires(postun): systemd-units
342 Requires: %{name}-kmod >= %{version}
343 Provides: %{name}-kmod-common = %{version}
345 Requires: openafs-kernel
348 Summary: OpenAFS Filesystem Client
349 Group: Networking/Filesystem
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 client support to mount and manipulate
361 Requires: openafs = %{version}
362 Summary: OpenAFS Filesystem Server
363 Group: Networking/Filesystems
364 %if 0%{?fedora} >= 15
365 Requires: systemd-units
366 Requires(post): systemd-units, systemd-sysv
367 Requires(preun): systemd-units
368 Requires(postun): systemd-units
372 The AFS distributed filesystem. AFS is a distributed filesystem
373 allowing cross-platform sharing of files among multiple computers.
374 Facilities are provided for access control, authentication, backup and
375 administrative management.
377 This package provides basic server support to host files in an AFS
381 %package -n dkms-%{name}
382 Summary: DKMS-ready kernel source for AFS distributed filesystem
383 Group: Development/Kernel
384 Provides: openafs-kernel = %{version}
386 Provides: %{name}-kmod = %{version}
391 Requires: %{name}-kmod-common = %{version}
393 %description -n dkms-%{name}
394 The AFS distributed filesystem. AFS is a distributed filesystem
395 allowing cross-platform sharing of files among multiple computers.
396 Facilities are provided for access control, authentication, backup and
397 administrative management.
399 This package provides the source code to allow DKMS to build an
403 %if %{build_authlibs}
405 Summary: OpenAFS authentication shared libraries
406 Group: Networking/Filesystems
408 %description authlibs
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 provides a shared version of libafsrpc and libafsauthent.
415 None of the programs included with OpenAFS currently use these shared
416 libraries; however, third-party software that wishes to perform AFS
417 authentication may link against them.
420 %package authlibs-devel
421 %if %{build_authlibs}
422 Requires: openafs-authlibs = %{version}-%{release}
424 Requires: openafs-devel = %{version}-%{release}
425 Summary: OpenAFS shared library development
426 Group: Development/Filesystems
428 %description authlibs-devel
429 The AFS distributed filesystem. AFS is a distributed filesystem
430 allowing cross-platform sharing of files among multiple computers.
431 Facilities are provided for access control, authentication, backup and
432 administrative management.
434 This package includes the static versions of libafsrpc and
435 libafsauthent, and symlinks required for building against the dynamic
439 Summary: OpenAFS Development Libraries and Headers
440 Group: Development/Filesystems
441 Requires: openafs = %{version}-%{release}
444 The AFS distributed filesystem. AFS is a distributed filesystem
445 allowing cross-platform sharing of files among multiple computers.
446 Facilities are provided for access control, authentication, backup and
447 administrative management.
449 This package provides static development libraries and headers needed
450 to compile AFS applications. Note: AFS currently does not provide
454 Summary: OpenAFS user and administrator documentation
455 Requires: openafs = %{version}-%{release}
456 Group: Networking/Filesystems
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 HTML documentation for OpenAFS users and system
467 %package kernel-source
468 Summary: OpenAFS Kernel Module source tree
469 Group: Networking/Filesystems
470 Provides: openafs-kernel = %{version}
472 Provides: %{name}-kmod = %{version}
475 %description kernel-source
476 The AFS distributed filesystem. AFS is a distributed filesystem
477 allowing cross-platform sharing of files among multiple computers.
478 Facilities are provided for access control, authentication, backup and
479 administrative management.
481 This package provides the source code to build your own AFS kernel
485 Summary: OpenAFS client compatibility symlinks
486 Requires: openafs = %{version}, openafs-client = %{version}
487 Group: Networking/Filesystems
488 Obsoletes: openafs-client-compat
491 The AFS distributed filesystem. AFS is a distributed filesystem
492 allowing cross-platform sharing of files among multiple computers.
493 Facilities are provided for access control, authentication, backup and
494 administrative management.
496 This package provides compatibility symlinks in /usr/afsws. It is
497 completely optional, and is only necessary to support legacy
498 applications and scripts that hard-code the location of AFS client
502 Summary: OpenAFS KA kpasswd support
504 Group: Networking/Filesystems
507 The AFS distributed filesystem. AFS is a distributed filesystem
508 allowing cross-platform sharing of files among multiple computers.
509 Facilities are provided for access control, authentication, backup and
510 administrative management.
512 This package provides the compatibility symlink for kpasswd, in case
513 you are using KAserver instead of Krb5.
517 Summary: OpenAFS programs to use with krb5
518 Requires: openafs = %{version}
519 Group: Networking/Filesystems
520 BuildRequires: krb5-devel
523 The AFS distributed filesystem. AFS is a distributed filesystem
524 allowing cross-platform sharing of files among multiple computers.
525 Facilities are provided for access control, authentication, backup and
526 administrative management.
528 This package provides compatibility programs so you can use krb5
529 to authenticate to AFS services, instead of using AFS's homegrown
530 krb4 lookalike services.
535 ##############################################################################
537 # build the kernel modules if so requested
539 ##############################################################################
543 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
547 # Legacy kernel compilation code here ...
548 %define modkversion %(echo %{kernvers} | cut -d- -f1)
549 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
550 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
554 Summary: OpenAFS Kernel Module (compiled for UP)
555 Release: %{modpkgrel}
556 Group: Networking/Filesystems
557 Provides: openafs-kernel = %{version}
559 Requires: kernel-%{_target_cpu} = %{kversion}
561 Requires: /boot/config-%{kernvers}
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}.
575 Summary: OpenAFS Kernel Module (compiled for SMP)
576 Release: %{modpkgrel}
577 Provides: openafs-kernel = %{version}
579 Requires: kernel-smp-%{_target_cpu} = %{kversion}
581 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
583 Group: Networking/Filesystems
585 %description kernel-smp
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 %{largesmp_package}
595 %package kernel-largesmp
596 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
597 Release: %{modpkgrel}
598 Provides: openafs-kernel = %{version}
600 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
602 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
604 Group: Networking/Filesystems
606 %description kernel-largesmp
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 %{bigmem_package}
616 %package kernel-bigmem
617 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
618 Release: %{modpkgrel}
619 Provides: openafs-kernel = %{version}
621 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
623 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
625 Group: Networking/Filesystems
627 %description kernel-bigmem
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}.
636 %if %{hugemem_package}
637 %package kernel-hugemem
638 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
639 Release: %{modpkgrel}
640 Provides: openafs-kernel = %{version}
642 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
644 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
646 Group: Networking/Filesystems
648 %description kernel-hugemem
649 The AFS distributed filesystem. AFS is a distributed filesystem
650 allowing cross-platform sharing of files among multiple computers.
651 Facilities are provided for access control, authentication, backup and
652 administrative management.
654 This package provides a precompiled AFS kernel module for %{kernvers}.
658 # End legacy kernel compilation code ...
661 ##############################################################################
665 ##############################################################################
669 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
671 : @@@ kernel version: %{kernvers}
673 : @@@ kernel variations: %{kvariants}
675 : @@@ base kernel version:%{kversion}
676 : @@@ kernel modules dir: %{kxmoddir}
677 : @@@ kernel source dir: %{ksrcdir}
679 : @@@ kernel variations: %{kvariations}
682 : @@@ kernel type: up
684 : @@@ kernel type: %{ktype}
688 : @@@ PAM modules dir: %{pamdir}
689 : @@@ build userspace: %{build_userspace}
690 : @@@ build modules: %{build_modules}
692 : @@@ target cpu: %{_target_cpu}
694 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
696 # Install OpenAFS src and doc
697 #%setup -q -n %{srcdir}
698 %setup -q -b 1 -n %{srcdir}
700 ##############################################################################
704 ##############################################################################
715 echo "I don't know how to build linux-`expr %{kernvers} : '\(^[0-9]*[.][0-9]*\)'`"
724 x86_64) sysname=amd64_linux${kv} ;;
725 alpha*) sysname=alpha_linux_${kv} ;;
726 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
727 *) sysname=%{_arch}_linux${kv} ;;
731 archlist="i386 i586 i686 athlon"
732 %if %{bootkernelsupport}
733 archlist="${archlist} BOOT"
740 # PrintDefine var value statements file
745 echo "#ifndef $1" >> $4
750 echo "#undef $1" >> $4
755 echo "#define $1 $2" >> $4
765 echo "#include $1" >> $4
775 # PrintRedhatKernelFix arch mp file
776 PrintRedhatKernelFix() {
790 largesmp) largesmp=1;;
794 echo "$2 not supported"
803 PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
805 PrintDefine __BOOT_KERNEL_ENTERPRISE $ent und,def,nl $file
806 PrintDefine __BOOT_KERNEL_BIGMEM $bigmem und,def,nl $file
807 PrintDefine __BOOT_KERNEL_HUGEMEM $hugemem und,def,nl $file
808 PrintDefine __BOOT_KERNEL_SMP $smp und,def,nl $file
809 PrintDefine __BOOT_KERNEL_LARGESMP $largesmp und,def,nl $file
810 PrintDefine __BOOT_KERNEL_UP $up und,def,nl $file
811 PrintDefine __BOOT_KERNEL_BOOT $boot und,def,nl $file
812 PrintDefine __BOOT_KERNEL_BOOTSMP $bootsmp und,def,nl $file
814 PrintDefine '"/boot/kernel.h"' "" inc,nl $file # include file
816 for ar in $archlist ; do
817 if [ "$ar" = "$arch" ]; then
818 PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
820 PrintDefine "__MODULE_KERNEL_$ar" "" und $file # undef
825 PrintDefine "" "" end $file
827 if [ %{debugspec} = 1 ] ; then
828 echo "Kernel Configuration File for Red Hat kernels:"
833 config_opts="--enable-redhat-buildsys \
834 %{?_with_bitmap_later:--enable-bitmap-later} \
835 %{?_with_bos_restricted:--enable-bos-restricted-mode} \
836 %{?_with_supergroups:--enable-supergroups} \
837 --enable-transarc-paths"
841 # If we're using Fedora kmods, work out which is the best kernel module to
842 # use for the userland configuration step. If no variants have been specified,
843 # then use the standard kernel. If variants are specified, use the standard kernel
844 # if it's listed, otherwise pick the first listed kernel.
847 for kvariant in %{kvariants} ; do
848 if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
849 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
850 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
852 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
857 if [ -z "$ksrc" ] ; then
861 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
864 %if %{?krb5config:1}%{!?krb5config:0}
865 KRB5_CONFIG="%{krb5config}"
870 ./configure --with-afs-sysname=${sysname} \
871 --prefix=%{_prefix} \
872 --libdir=%{_libdir} \
873 --bindir=%{_bindir} \
874 --sbindir=%{_sbindir} \
875 --disable-strip-binaries \
877 --with-linux-kernel-packaging \
879 --with-linux-kernel-headers=${ksrc} \
887 # Build the libafs tree
888 make only_libafs_tree || exit 1
890 # Configure each of our kernel modules
892 %if %{fedorakmod} && %{build_modules}
893 for kvariant in %{kvariants} ; do
894 if [ -n "${kvariant}" ] ; then
895 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
896 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
898 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
901 cp -R libafs_tree _kmod_build_${kvariant}
902 pushd _kmod_build_${kvariant}
903 ./configure --with-afs-sysname=${sysname} \
904 --prefix=%{_prefix} \
905 --libdir=%{_libdir} \
906 --bindir=%{_bindir} \
907 --sbindir=%{_sbindir} \
908 --with-linux-kernel-packaging \
909 --with-linux-kernel-headers=${ksrc} \
910 --enable-disconnected \
912 --with-krb5-conf=/usr/kerberos/bin/krb5-config \
921 %if %{build_userspace}
922 # Build the user-space AFS stuff
923 make dest_nolibafs || exit 1
928 for kvariant in %{kvariants}
930 if [ -n "${kvariant}" ] ; then
931 pushd _kmod_build_$kvariant;
935 make dest_only_libafs
940 # Begin legacy kernel module building code
943 # Build all the kernel modules for linux 2.4.x
944 for variation in %{kvariations}
946 if [ ${variation} = up ]
948 local_smp_def=-DREDHAT_FIX
951 local_smp_def="-DAFS_SMP -DREDHAT_FIX"
955 PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
956 make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
957 LINUX_MODULE_NAME="${suffix}" MPS=SP
960 rm -f src/config/redhat-fix.h
962 %elseif %{kvers_is_26}
963 # Build the kernel module for this version of linux 2.6.x
964 # Notice how much easier this is than 2.4. On the other hand,
965 # we require much more external support to build multiple modules.
967 # the MPS=SP just means that we don't add a '.mp' to the name.
968 make dest_only_libafs MPS=SP
971 # End legacy kernel module building code
976 ##############################################################################
980 ##############################################################################
983 export DONT_GPRINTIFY=1
985 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
997 echo "I don't know how to build linux-`expr %{kernvers} : '\(^[0-9]*[.][0-9]*\)'`"
1006 x86_64) sysname=amd64_linux${kv} ;;
1007 alpha*) sysname=alpha_linux_${kv} ;;
1008 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
1009 *) sysname=%{_arch}_linux${kv} ;;
1012 # Build install tree
1013 %if %{build_userspace}
1014 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
1015 mkdir -p $RPM_BUILD_ROOT%{_libdir}
1016 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
1017 %if 0%{?fedora} < 15
1018 mkdir -p $RPM_BUILD_ROOT%{initdir}
1020 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
1021 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
1023 mkdir -p $RPM_BUILD_ROOT/etc/openafs
1024 mkdir -p $RPM_BUILD_ROOT%{pamdir}
1025 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
1026 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
1027 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1028 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1029 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1030 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1032 # Copy files from dest to the appropriate places in BuildRoot
1033 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1034 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1035 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1036 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1037 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1039 # Set the executable bit on libraries in libdir, so rpmbuild knows to
1040 # create "Provides" entries in the package metadata for the libraries
1041 chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
1043 # Fix the location of restorevol, since it should be available for
1044 # any user in /usr/bin
1045 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1047 # Link kpasswd to kapasswd
1048 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1050 # Copy root.client config files
1051 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1052 %if 0%{?fedora} < 15
1053 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1054 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1056 install -m 755 src/packaging/RedHat/openafs-client.service $RPM_BUILD_ROOT%{_unitdir}/openafs-client.service
1057 install -m 755 src/packaging/RedHat/openafs-client.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/openafs-client.modules
1058 install -m 755 src/packaging/RedHat/openafs-server.service $RPM_BUILD_ROOT%{_unitdir}/openafs-server.service
1062 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1065 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1066 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1068 # Populate /usr/vice/etc
1069 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1070 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1071 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1072 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1075 # install dkms source
1077 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1078 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1080 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<"EOF"
1082 PACKAGE_VERSION="%{dkms_version}"
1084 # Items below here should not have to change with each driver version
1085 PACKAGE_NAME="%{name}"
1086 MAKE[0]='./configure --with-linux-kernel-headers=${kernel_source_dir} --with-linux-kernel-packaging && make && case "${kernelver_array[0]}${kernelver[0]}" in 2.4.*) mv src/libafs/MODLOAD-*/libafs-* openafs.o ;; *) mv src/libafs/MODLOAD-*/openafs.ko . ;; esac'
1087 CLEAN="make -C src/libafs clean"
1089 BUILT_MODULE_NAME[0]="$PACKAGE_NAME"
1090 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/$PACKAGE_NAME/"
1097 # install kernel-source
1100 # Install the kernel module source tree
1101 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1102 tar cf - -C libafs_tree . | \
1103 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1105 # Next, copy the LICENSE Files, README
1106 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1107 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1108 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1111 # Install DOCUMENTATION
1114 # Build the DOC directory
1115 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1116 tar cf - -C doc LICENSE html pdf | \
1117 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1118 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1119 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1124 tar cf - -C doc/man-pages man1 man5 man8 | \
1125 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1127 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1129 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1131 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1134 # remove unused man pages
1135 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1136 dkload knfs package runntp symlink symlink_list symlink_make \
1138 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1141 # rename kpasswd to kapasswd
1142 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1145 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1147 # create list of man pages that go in the 'openafs' package
1148 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1149 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|^xstat|udebug|unlog|^uss|^vos' \
1150 |egrep -v '^afs_compile_et' \
1153 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1154 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1157 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1158 |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1164 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1165 %{_bindir}/afsmonitor
1172 %{_bindir}/pagsh.krb
1174 %{_bindir}/restorevol
1178 %{_bindir}/tokens.krb
1179 %{_bindir}/translate_et
1180 %{_bindir}/xstat_cm_test
1181 %{_bindir}/xstat_fs_test
1189 %{_sbindir}/read_tape
1194 EOF-openafs-file-list
1196 # add man pages to the list
1197 cat openafs-man1files \
1198 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1200 cat openafs-man5files \
1201 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1203 cat openafs-man8files \
1204 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1208 # Install compatiblity links
1210 for d in bin:bin etc:sbin; do
1211 olddir=`echo $d | sed 's/:.*$//'`
1212 newdir=`echo $d | sed 's/^.*://'`
1213 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1214 for f in `cat openafs-file-list`; do
1215 if echo $f | grep -q /$newdir/; then
1217 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1223 # Remove files we're not installing
1226 # remove duplicated files from /usr/afs/bin
1227 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1228 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1231 # the rest are not needed.
1232 for f in dlog dpass install knfs livesys ; do
1233 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1236 # not supported on Linux or duplicated
1237 for f in kdb rmtsysd kpwvalid ; do
1238 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1240 # sometimes install sucks and puts down a directory. kill it all.
1241 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1243 # remove man pages from programs deleted above
1244 for f in 1/dlog 1/dpass 1/livesys 8/kdb 8/kpwvalid 8/xfs_size_check 1/package_test 5/package 8/package ; do
1245 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1248 # PAM modules are doubly-installed Remove the version we don't need
1249 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1250 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1253 %if !%{build_authlibs}
1254 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1255 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1256 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1257 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1262 %if %{build_modules}
1264 for kvariant in %{kvariants}
1266 if [ -n "$kvariant" ] ; then
1267 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1268 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1269 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1271 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1272 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1275 if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1276 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1277 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1279 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1280 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1285 install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1288 # Install the kernel modules
1289 for variation in %{kvariations}
1291 if [ ${variation} = up ]
1294 modname=openafs${kmodend}
1296 kvar=%{kxmoddir}${variation}
1297 modname=openafs${kmodend}
1300 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1301 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1305 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1310 ##############################################################################
1314 ##############################################################################
1316 rm -f openafs-file-list
1317 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1318 rm -fr $RPM_BUILD_ROOT
1321 ##############################################################################
1325 ##############################################################################
1326 %if %{build_userspace}
1329 if [ -e %{_prefix}/afsws ]; then
1330 /bin/rm -fr %{_prefix}/afsws
1334 %if 0%{?fedora} < 15
1335 chkconfig --add openafs-client
1337 if [ $1 -eq 1 ] ; then
1338 # Initial installation
1339 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1342 if [ ! -d /afs ]; then
1344 chown root.root /afs
1346 [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1349 # Create the CellServDB
1350 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1352 ( cd /usr/vice/etc ; \
1353 cat CellServDB.local CellServDB.dist > CellServDB ; \
1354 chmod 644 CellServDB )
1357 #on an upgrade, don't enable if we were disabled
1358 %if 0%{?fedora} < 15
1359 if [ $1 = 1 ] ; then
1360 chkconfig --add openafs-server
1362 %{initdir}/openafs-server condrestart
1364 if [ $1 -eq 1 ] ; then
1365 # Initial installation
1366 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1370 %if %{build_authlibs}
1379 if [ $1 = 0 ] ; then
1380 [ -d /afs ] && rmdir /afs
1385 %if 0%{?fedora} < 15
1386 if [ $1 = 0 ] ; then
1387 %{initdir}/openafs-client stop
1388 chkconfig --del openafs-client
1391 if [ $1 -eq 0 ] ; then
1392 # Package removal, not upgrade
1393 /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || :
1394 /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || :
1399 %if 0%{?fedora} < 15
1400 if [ $1 = 0 ] ; then
1401 %{initdir}/openafs-server stop
1402 chkconfig --del openafs-server
1405 if [ $1 -eq 0 ] ; then
1406 /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || :
1407 /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || :
1411 %if 0%{?fedora} >= 15
1413 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1416 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1419 %if %{build_dkmspkg}
1420 %post -n dkms-%{name}
1421 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1422 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1423 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1425 %preun -n dkms-%{name}
1426 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1430 %if %{build_modules}
1434 /sbin/depmod -ae %{kernvers}
1437 /sbin/depmod -ae %{kernvers}
1443 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1446 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1449 %if %{largesmp_package}
1450 %post kernel-largesmp
1451 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1453 %postun kernel-largesmp
1454 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1457 %if %{bigmem_package}
1459 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1461 %postun kernel-bigmem
1462 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1465 %if %{hugemem_package}
1466 %post kernel-hugemem
1467 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1469 %postun kernel-hugemem
1470 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1475 %if 0%{?fedora} >= 15
1476 %triggerun -- openafs-client < 1.6.0-1
1477 # Save the current service runlevel info
1478 # User must manually run systemd-sysv-convert --apply httpd
1479 # to migrate them to systemd targets
1480 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||:
1482 # Run this because the SysV package being removed won't do it
1483 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || :
1485 %triggerun -- openafs-server < 1.6.0-1
1486 # Save the current service runlevel info
1487 # User must manually run systemd-sysv-convert --apply httpd
1488 # to migrate them to systemd targets
1489 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||:
1491 # Run this because the SysV package being removed won't do it
1492 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || :
1495 ##############################################################################
1499 ##############################################################################
1500 %if %{build_userspace}
1502 %files -f openafs-file-list
1503 %defattr(-,root,root)
1504 %config(noreplace) /etc/sysconfig/openafs
1505 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1506 %{_libdir}/libafshcrypto.so.*
1507 %{_libdir}/librokenafs.so.*
1510 %defattr(-,root,root)
1511 %docdir %{_docdir}/openafs-%{afsvers}
1512 %dir %{_docdir}/openafs-%{afsvers}
1513 %{_docdir}/openafs-%{afsvers}/ChangeLog
1514 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1515 %{_docdir}/openafs-%{afsvers}/pdf
1518 %defattr(-,root,root)
1519 %dir %{_prefix}/vice
1520 %dir %{_prefix}/vice/cache
1521 %dir %{_prefix}/vice/etc
1522 %dir %{_prefix}/vice/etc/C
1523 %{_prefix}/vice/etc/CellServDB.dist
1524 %config(noreplace) %{_prefix}/vice/etc/ThisCell
1525 %config(noreplace) %{_prefix}/vice/etc/cacheinfo
1529 %{_prefix}/vice/etc/afsd
1530 %{_prefix}/vice/etc/C/afszcm.cat
1531 %{pamdir}/pam_afs.krb.so.1
1532 %{pamdir}/pam_afs.krb.so
1533 %{pamdir}/pam_afs.so.1
1534 %{pamdir}/pam_afs.so
1535 %if 0%{?fedora} < 15
1536 %{initdir}/openafs-client
1538 %{_unitdir}/openafs-client.service
1539 %{_sysconfdir}/sysconfig/modules/openafs-client.modules
1541 %{_mandir}/man1/cmdebug.*
1542 %{_mandir}/man1/copyauth.*
1543 %{_mandir}/man1/up.*
1544 %{_mandir}/man5/afs.5.gz
1545 %{_mandir}/man5/afs_cache.5.gz
1546 %{_mandir}/man5/afs_volume_header.5.gz
1547 %{_mandir}/man5/afszcm.cat.5.gz
1548 %{_mandir}/man5/cacheinfo.*
1549 %{_mandir}/man8/afsd.*
1550 %{_mandir}/man8/rmtsysd.*
1551 %{_mandir}/man8/vsys.*
1552 %{_mandir}/man5/CellAlias.*
1555 %defattr(-,root,root)
1557 %dir %{_prefix}/afs/bin
1558 %dir %{_prefix}/afs/etc
1559 %dir %{_prefix}/afs/logs
1560 %{_prefix}/afs/bin/bosserver
1561 %{_prefix}/afs/bin/bos_util
1562 %{_prefix}/afs/bin/buserver
1563 %{_prefix}/afs/bin/dafileserver
1564 %{_prefix}/afs/bin/dafssync-debug
1565 %{_prefix}/afs/bin/dasalvager
1566 %{_prefix}/afs/bin/davolserver
1567 %{_prefix}/afs/bin/fileserver
1568 %{_prefix}/afs/bin/fssync-debug
1569 # Should we support KAServer?
1570 %{_prefix}/afs/bin/kaserver
1571 %{_prefix}/afs/bin/ka-forwarder
1572 %{_prefix}/afs/bin/pt_util
1573 %{_prefix}/afs/bin/ptserver
1574 %{_prefix}/afs/bin/salvager
1575 %{_prefix}/afs/bin/salvageserver
1576 %{_prefix}/afs/bin/salvsync-debug
1577 %{_prefix}/afs/bin/state_analyzer
1578 %{_prefix}/afs/bin/upclient
1579 %{_prefix}/afs/bin/upserver
1580 %{_prefix}/afs/bin/vlserver
1581 %{_prefix}/afs/bin/volinfo
1582 %{_prefix}/afs/bin/volserver
1583 %{_sbindir}/kadb_check
1584 %{_sbindir}/prdb_check
1585 %{_sbindir}/vldb_check
1586 %{_sbindir}/vldb_convert
1588 %if 0%{?fedora} < 15
1589 %{initdir}/openafs-server
1591 %{_unitdir}/openafs-server.service
1593 %{_mandir}/man5/AuthLog.*
1594 %{_mandir}/man5/BackupLog.*
1595 %{_mandir}/man5/BosConfig.*
1596 %{_mandir}/man5/BosLog.*
1597 %{_mandir}/man5/FORCESALVAGE.*
1598 %{_mandir}/man5/FileLog.*
1599 %{_mandir}/man5/KeyFile.*
1600 %{_mandir}/man5/NetInfo.*
1601 %{_mandir}/man5/NetRestrict.*
1602 %{_mandir}/man5/NoAuth.*
1603 %{_mandir}/man5/SALVAGE.fs.*
1604 %{_mandir}/man5/SalvageLog.*
1605 %{_mandir}/man5/sysid.*
1606 %{_mandir}/man5/UserList.*
1607 %{_mandir}/man5/VLLog.*
1608 %{_mandir}/man5/VolserLog.*
1609 %{_mandir}/man5/bdb.DB0.*
1610 %{_mandir}/man5/fms.log.*
1611 %{_mandir}/man5/kaserver.DB0.*
1612 %{_mandir}/man5/kaserverauxdb.*
1613 %{_mandir}/man5/krb.conf.*
1614 %{_mandir}/man5/krb.excl.*
1615 %{_mandir}/man5/prdb.DB0.*
1616 %{_mandir}/man5/salvage.lock.*
1617 %{_mandir}/man5/tapeconfig.*
1618 %{_mandir}/man5/vldb.DB0.*
1619 %{_mandir}/man8/buserver.*
1620 %{_mandir}/man8/fileserver.*
1621 %{_mandir}/man8/dafileserver.*
1622 %{_mandir}/man8/dasalvager.*
1623 %{_mandir}/man8/davolserver.*
1624 %{_mandir}/man8/kadb_check.*
1625 %{_mandir}/man8/ka-forwarder.*
1626 %{_mandir}/man8/prdb_check.*
1627 %{_mandir}/man8/ptserver.*
1628 %{_mandir}/man8/pt_util.*
1629 %{_mandir}/man8/salvager.*
1630 %{_mandir}/man8/salvageserver.*
1631 %{_mandir}/man8/state_analyzer.*
1632 %{_mandir}/man8/upclient.*
1633 %{_mandir}/man8/upserver.*
1634 %{_mandir}/man8/vldb_check.*
1635 %{_mandir}/man8/vldb_convert.*
1636 %{_mandir}/man8/vlserver.*
1637 %{_mandir}/man8/voldump.*
1638 %{_mandir}/man8/volinfo.*
1639 %{_mandir}/man8/volserver.*
1641 %if %{build_authlibs}
1643 %defattr(-,root,root)
1644 %{_libdir}/libafsauthent.so.*
1645 %{_libdir}/libafsrpc.so.*
1646 %{_libdir}/libkopenafs.so.*
1649 %files authlibs-devel
1650 %defattr(-,root,root)
1651 %{_includedir}/kopenafs.h
1652 %{_libdir}/libafsauthent.a
1653 %{_libdir}/libafscp.a
1654 %{_libdir}/libafsrpc.a
1655 %{_libdir}/libafsauthent_pic.a
1656 %{_libdir}/libafsrpc_pic.a
1657 %{_libdir}/libkopenafs.a
1658 %if %{build_authlibs}
1659 %{_libdir}/libafsauthent.so
1660 %{_libdir}/libafsrpc.so
1661 %{_libdir}/libkopenafs.so
1665 %defattr(-,root,root)
1666 %{_bindir}/afs_compile_et
1669 %{_includedir}/lock.h
1670 %{_includedir}/lwp.h
1671 %{_includedir}/preempt.h
1673 %{_includedir}/timer.h
1674 %{_includedir}/ubik.h
1675 %{_includedir}/ubik_int.h
1677 %{_libdir}/libafshcrypto.a
1678 %{_libdir}/libafshcrypto.so
1681 %{_libdir}/librokenafs.a
1682 %{_libdir}/librokenafs.so
1684 %{_libdir}/librxkad.a
1685 %{_libdir}/librxstat.a
1686 %{_libdir}/libubik.a
1687 %{_libdir}/libubik_pthread.a
1688 %{_mandir}/man1/rxgen.*
1689 %{_mandir}/man1/afs_compile_et.*
1691 %if %{build_dkmspkg}
1692 %files -n dkms-%{name}
1693 %defattr(-,root,root)
1694 %{_prefix}/src/%{name}-%{dkms_version}
1697 %files kernel-source
1698 %defattr(-,root,root)
1699 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1700 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1701 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1702 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1705 %defattr(-,root,root)
1709 %defattr(-,root,root)
1715 %defattr(-,root,root)
1717 %{_bindir}/klog.krb5
1719 %{_mandir}/man1/aklog.*
1720 %{_mandir}/man8/asetkey.*
1725 %if %{build_modules}
1730 %defattr(-,root,root)
1731 %{kxmoddir}/fs/openafs/openafs.*
1736 %defattr(-,root,root)
1737 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1740 %if %{largesmp_package}
1741 %files kernel-largesmp
1742 %defattr(-,root,root)
1743 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1746 %if %{bigmem_package}
1747 %files kernel-bigmem
1748 %defattr(-,root,root)
1749 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1752 %if %{hugemem_package}
1753 %files kernel-hugemem
1754 %defattr(-,root,root)
1755 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1761 ##############################################################################
1763 ### openafs.spec change log
1765 ##############################################################################
1767 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1768 - Make the RPM mockable
1770 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1771 - Update to match the shipped 1.4.5 RPMS
1772 - Fix the kvariant stuff to only configure the 'standard' case once
1773 - Add openafs-kvers.sh back in
1775 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1776 - Use Fedora style kmods, which allows us to install multiple kernel types
1778 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1779 - Use distributed files, rather than those in packager's SOURCE directory
1780 - Remove SuidCells stuff, which was unused
1782 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1783 - integrate s390x changes
1784 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1785 that won't build the .so files.
1787 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1789 - use installed aklog manpage.
1790 - moduleparam patch obsoleted.
1792 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1793 - update to 1.4.2-rc1
1794 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1795 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1796 - don't need the posixlock patch anymore.
1798 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1799 - update to 1.4.2-beta2
1800 - add linux2.4 posixlock API patch
1802 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1803 - moduleparam and krb524 patches no longer required in OA-CVS
1805 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1806 - change non-target-cpu kernel dep to a file dep
1807 - make sure we use the proper kernel version for the dependency.
1809 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1810 - allow users to specify local CellServDB and SuidCells entries
1811 don't overwrite user's changes. Provide a .dist an let users
1812 make entries in a ".local"
1813 - build the CellServDB and SuidCells at client startup and at
1815 - add provideskernelarch functionality to openafs-kvers-is.sh
1816 - use that functionality to Require kernel{,-<type>}-targetcpu
1817 to get better package safety due to RPM bugs where the kernel
1818 release isn't used so you can install the kernel module against
1819 any kernel of the same major version.
1821 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1822 - update the README in openafs-kernel-source
1823 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1824 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1826 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1827 - build requires autoconf and automake for krb5support
1828 and autoconf for standard package
1829 - dont setup the krb5 migration kit (or patches) if we don't care.
1830 - require ncurses-devel to build
1832 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1833 - look for krb524 functions in libkrb524 if we can't find them
1834 in the standard locations.
1836 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1837 - fix the module_param_array macro for Linux 2.6.9.
1839 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1840 - update to 1.4.1 release.
1841 - distribute asetkey from openafs instead of krb5-migration kit
1842 - don't need to apply the FC5 patches because they are part of the distro.
1843 - install asetkey into the "proper" place
1844 - dont list a manpage twice.
1845 - package asetkey man page. delete it when not needed.
1847 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1848 - turn authlibs back on, because RT #18767 was applied to CVS.
1850 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1851 - update to 1.4.1rc10, build on FC5
1852 - fix the man pages (distribute into various packages)
1853 - include patches for FC5, RT #29112 and #29122
1855 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1856 - openafs-server shouldn't depend on the kernel module.
1858 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1859 - patch from Mike Polek <mike at pictage.com> to run depmod for
1860 the target kernel and not the running kernel.
1862 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1863 - build aklog from the openafs sources, not from the krb5 migration kit.
1865 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1866 - set openafs-kernel-source to Provide openafs-kernel
1868 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1869 - update afs-krb5 res_search patch: look for res_search and __res_search
1870 - update to 1.4.0 final
1872 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1873 - remove all kdump builds.
1875 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1876 - fix openafs-kernel-version.sh so it will build an RPM for the
1877 currently-running kernel even if it's smp on 2.6.
1879 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1880 - upgrade to 1.4.0rc5
1881 - turn off authlibs packages
1883 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1884 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1885 it's called "openafs" and not "libafs". This fixes the shutdown
1888 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1889 - update kversis script, add 'kvers' operation
1890 - fix bug that 2.6 smp/hugemem kernels don't provide
1891 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1892 - add patch to remove res_search from the afs-krb5 configure
1894 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1895 - Update to 1.4.0rc4
1896 - Update the afs-krb5 krb524 patch so it actually works on
1897 some older systems like RHEL3 that still need -lkrb524.
1898 - Update the buildall script so choose better architecture support,
1899 e.g. don't build i586 on RHEL.
1900 - Update the rebuild information in the SPEC file.
1901 - Add support for finding .EL kernels in openafs-kvers-is.sh
1902 - Add additional error messages when kernel version/type parsing fails.
1903 - Update the buildall script to use the kernel srcdir directly.
1905 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1906 - Add "hugemem" to 2.4 configs
1907 - Add checks to support scripts to determine whether to build
1908 the bigmem and/or hugemem kernels for 2.4.
1910 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1911 - Added some afs-krb5 patches to get the migration kit to build
1912 on modern AFS and modern Kerberos.
1913 - Added authlibs and authlibs-devel packages as per UMich changes.
1915 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1916 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1918 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1919 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1920 from Red Hat. Initial attempt at a release of 1.4. Still need
1921 to work in a 2.6 build system.