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.2011-08-14
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 largefiles Enable "largefile fileserver" mode
296 --with supergroups Enable "supergroups"
298 --target=i386 The target architecture to build for.
299 When building for a non-default target
300 the build may choose whether to build
301 userspace or kernel modules automatically.
302 The defaults are probably what you want.
304 --define "build_userspace 1" Request building of userspace tools
305 --define "build_modules 1" Request building of kernel modules
306 You probably never need to specify these.
308 --define "kmoddir /lib/modules" This is the base location where modules
309 will be installed. You probably don't
310 need to change this ever.
312 --define "fedorakmod 0" Disable the building of 'Fedora' style kernel
313 modules, and use the old format.
315 --define "kvariants <variants>" When building Fedora style kernel modules,
316 this defines the set of kernel variants
318 <variants> is a space seperated list which
319 may contain one or more of
320 '' (for the generic kernel), smp, PAE, xen
323 To a kernel module for your running kernel, just run:
324 rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
326 ##############################################################################
328 # build the userspace side of things if so requested
330 ##############################################################################
331 %if %{build_userspace}
334 Requires: binutils, openafs = %{version}
335 %if 0%{?fedora} >= 15
336 Requires: systemd-units
337 Requires(post): systemd-units, systemd-sysv
338 Requires(preun): systemd-units
339 Requires(postun): systemd-units
343 Requires: %{name}-kmod >= %{version}
344 Provides: %{name}-kmod-common = %{version}
346 Requires: openafs-kernel
349 Summary: OpenAFS Filesystem Client
350 Group: Networking/Filesystem
353 The AFS distributed filesystem. AFS is a distributed filesystem
354 allowing cross-platform sharing of files among multiple computers.
355 Facilities are provided for access control, authentication, backup and
356 administrative management.
358 This package provides basic client support to mount and manipulate
362 Requires: openafs = %{version}
363 Summary: OpenAFS Filesystem Server
364 Group: Networking/Filesystems
365 %if 0%{?fedora} >= 15
366 Requires: systemd-units
367 Requires(post): systemd-units, systemd-sysv
368 Requires(preun): systemd-units
369 Requires(postun): systemd-units
373 The AFS distributed filesystem. AFS is a distributed filesystem
374 allowing cross-platform sharing of files among multiple computers.
375 Facilities are provided for access control, authentication, backup and
376 administrative management.
378 This package provides basic server support to host files in an AFS
382 %package -n dkms-%{name}
383 Summary: DKMS-ready kernel source for AFS distributed filesystem
384 Group: Development/Kernel
385 Provides: openafs-kernel = %{version}
387 Provides: %{name}-kmod = %{version}
392 Requires: %{name}-kmod-common = %{version}
394 %description -n dkms-%{name}
395 The AFS distributed filesystem. AFS is a distributed filesystem
396 allowing cross-platform sharing of files among multiple computers.
397 Facilities are provided for access control, authentication, backup and
398 administrative management.
400 This package provides the source code to allow DKMS to build an
404 %if %{build_authlibs}
406 Summary: OpenAFS authentication shared libraries
407 Group: Networking/Filesystems
409 %description authlibs
410 The AFS distributed filesystem. AFS is a distributed filesystem
411 allowing cross-platform sharing of files among multiple computers.
412 Facilities are provided for access control, authentication, backup and
413 administrative management.
415 This package provides a shared version of libafsrpc and libafsauthent.
416 None of the programs included with OpenAFS currently use these shared
417 libraries; however, third-party software that wishes to perform AFS
418 authentication may link against them.
421 %package authlibs-devel
422 %if %{build_authlibs}
423 Requires: openafs-authlibs = %{version}-%{release}
425 Requires: openafs-devel = %{version}-%{release}
426 Summary: OpenAFS shared library development
427 Group: Development/Filesystems
429 %description authlibs-devel
430 The AFS distributed filesystem. AFS is a distributed filesystem
431 allowing cross-platform sharing of files among multiple computers.
432 Facilities are provided for access control, authentication, backup and
433 administrative management.
435 This package includes the static versions of libafsrpc and
436 libafsauthent, and symlinks required for building against the dynamic
440 Summary: OpenAFS Development Libraries and Headers
441 Group: Development/Filesystems
442 Requires: openafs = %{version}-%{release}
445 The AFS distributed filesystem. AFS is a distributed filesystem
446 allowing cross-platform sharing of files among multiple computers.
447 Facilities are provided for access control, authentication, backup and
448 administrative management.
450 This package provides static development libraries and headers needed
451 to compile AFS applications. Note: AFS currently does not provide
455 Summary: OpenAFS user and administrator documentation
456 Requires: openafs = %{version}-%{release}
457 Group: Networking/Filesystems
460 The AFS distributed filesystem. AFS is a distributed filesystem
461 allowing cross-platform sharing of files among multiple computers.
462 Facilities are provided for access control, authentication, backup and
463 administrative management.
465 This package provides HTML documentation for OpenAFS users and system
468 %package kernel-source
469 Summary: OpenAFS Kernel Module source tree
470 Group: Networking/Filesystems
471 Provides: openafs-kernel = %{version}
473 Provides: %{name}-kmod = %{version}
476 %description kernel-source
477 The AFS distributed filesystem. AFS is a distributed filesystem
478 allowing cross-platform sharing of files among multiple computers.
479 Facilities are provided for access control, authentication, backup and
480 administrative management.
482 This package provides the source code to build your own AFS kernel
486 Summary: OpenAFS client compatibility symlinks
487 Requires: openafs = %{version}, openafs-client = %{version}
488 Group: Networking/Filesystems
489 Obsoletes: openafs-client-compat
492 The AFS distributed filesystem. AFS is a distributed filesystem
493 allowing cross-platform sharing of files among multiple computers.
494 Facilities are provided for access control, authentication, backup and
495 administrative management.
497 This package provides compatibility symlinks in /usr/afsws. It is
498 completely optional, and is only necessary to support legacy
499 applications and scripts that hard-code the location of AFS client
503 Summary: OpenAFS KA kpasswd support
505 Group: Networking/Filesystems
508 The AFS distributed filesystem. AFS is a distributed filesystem
509 allowing cross-platform sharing of files among multiple computers.
510 Facilities are provided for access control, authentication, backup and
511 administrative management.
513 This package provides the compatibility symlink for kpasswd, in case
514 you are using KAserver instead of Krb5.
518 Summary: OpenAFS programs to use with krb5
519 Requires: openafs = %{version}
520 Group: Networking/Filesystems
521 BuildRequires: krb5-devel
524 The AFS distributed filesystem. AFS is a distributed filesystem
525 allowing cross-platform sharing of files among multiple computers.
526 Facilities are provided for access control, authentication, backup and
527 administrative management.
529 This package provides compatibility programs so you can use krb5
530 to authenticate to AFS services, instead of using AFS's homegrown
531 krb4 lookalike services.
536 ##############################################################################
538 # build the kernel modules if so requested
540 ##############################################################################
544 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
548 # Legacy kernel compilation code here ...
549 %define modkversion %(echo %{kernvers} | cut -d- -f1)
550 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
551 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
555 Summary: OpenAFS Kernel Module (compiled for UP)
556 Release: %{modpkgrel}
557 Group: Networking/Filesystems
558 Provides: openafs-kernel = %{version}
560 Requires: kernel-%{_target_cpu} = %{kversion}
562 Requires: /boot/config-%{kernvers}
566 The AFS distributed filesystem. AFS is a distributed filesystem
567 allowing cross-platform sharing of files among multiple computers.
568 Facilities are provided for access control, authentication, backup and
569 administrative management.
571 This package provides a precompiled AFS kernel module for %{kernvers}.
576 Summary: OpenAFS Kernel Module (compiled for SMP)
577 Release: %{modpkgrel}
578 Provides: openafs-kernel = %{version}
580 Requires: kernel-smp-%{_target_cpu} = %{kversion}
582 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
584 Group: Networking/Filesystems
586 %description kernel-smp
587 The AFS distributed filesystem. AFS is a distributed filesystem
588 allowing cross-platform sharing of files among multiple computers.
589 Facilities are provided for access control, authentication, backup and
590 administrative management.
592 This package provides a precompiled AFS kernel module for %{kernvers}.
595 %if %{largesmp_package}
596 %package kernel-largesmp
597 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
598 Release: %{modpkgrel}
599 Provides: openafs-kernel = %{version}
601 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
603 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
605 Group: Networking/Filesystems
607 %description kernel-largesmp
608 The AFS distributed filesystem. AFS is a distributed filesystem
609 allowing cross-platform sharing of files among multiple computers.
610 Facilities are provided for access control, authentication, backup and
611 administrative management.
613 This package provides a precompiled AFS kernel module for %{kernvers}.
616 %if %{bigmem_package}
617 %package kernel-bigmem
618 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
619 Release: %{modpkgrel}
620 Provides: openafs-kernel = %{version}
622 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
624 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
626 Group: Networking/Filesystems
628 %description kernel-bigmem
629 The AFS distributed filesystem. AFS is a distributed filesystem
630 allowing cross-platform sharing of files among multiple computers.
631 Facilities are provided for access control, authentication, backup and
632 administrative management.
634 This package provides a precompiled AFS kernel module for %{kernvers}.
637 %if %{hugemem_package}
638 %package kernel-hugemem
639 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
640 Release: %{modpkgrel}
641 Provides: openafs-kernel = %{version}
643 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
645 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
647 Group: Networking/Filesystems
649 %description kernel-hugemem
650 The AFS distributed filesystem. AFS is a distributed filesystem
651 allowing cross-platform sharing of files among multiple computers.
652 Facilities are provided for access control, authentication, backup and
653 administrative management.
655 This package provides a precompiled AFS kernel module for %{kernvers}.
659 # End legacy kernel compilation code ...
662 ##############################################################################
666 ##############################################################################
670 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
672 : @@@ kernel version: %{kernvers}
674 : @@@ kernel variations: %{kvariants}
676 : @@@ base kernel version:%{kversion}
677 : @@@ kernel modules dir: %{kxmoddir}
678 : @@@ kernel source dir: %{ksrcdir}
680 : @@@ kernel variations: %{kvariations}
683 : @@@ kernel type: up
685 : @@@ kernel type: %{ktype}
689 : @@@ PAM modules dir: %{pamdir}
690 : @@@ build userspace: %{build_userspace}
691 : @@@ build modules: %{build_modules}
693 : @@@ target cpu: %{_target_cpu}
695 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
697 # Install OpenAFS src and doc
698 #%setup -q -n %{srcdir}
699 %setup -q -b 1 -n %{srcdir}
701 ##############################################################################
705 ##############################################################################
716 echo "I don't know how to build linux-`expr %{kernvers} : '\(^[0-9]*[.][0-9]*\)'`"
725 x86_64) sysname=amd64_linux${kv} ;;
726 alpha*) sysname=alpha_linux_${kv} ;;
727 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
728 *) sysname=%{_arch}_linux${kv} ;;
732 archlist="i386 i586 i686 athlon"
733 %if %{bootkernelsupport}
734 archlist="${archlist} BOOT"
741 # PrintDefine var value statements file
746 echo "#ifndef $1" >> $4
751 echo "#undef $1" >> $4
756 echo "#define $1 $2" >> $4
766 echo "#include $1" >> $4
776 # PrintRedhatKernelFix arch mp file
777 PrintRedhatKernelFix() {
791 largesmp) largesmp=1;;
795 echo "$2 not supported"
804 PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
806 PrintDefine __BOOT_KERNEL_ENTERPRISE $ent und,def,nl $file
807 PrintDefine __BOOT_KERNEL_BIGMEM $bigmem und,def,nl $file
808 PrintDefine __BOOT_KERNEL_HUGEMEM $hugemem und,def,nl $file
809 PrintDefine __BOOT_KERNEL_SMP $smp und,def,nl $file
810 PrintDefine __BOOT_KERNEL_LARGESMP $largesmp und,def,nl $file
811 PrintDefine __BOOT_KERNEL_UP $up und,def,nl $file
812 PrintDefine __BOOT_KERNEL_BOOT $boot und,def,nl $file
813 PrintDefine __BOOT_KERNEL_BOOTSMP $bootsmp und,def,nl $file
815 PrintDefine '"/boot/kernel.h"' "" inc,nl $file # include file
817 for ar in $archlist ; do
818 if [ "$ar" = "$arch" ]; then
819 PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
821 PrintDefine "__MODULE_KERNEL_$ar" "" und $file # undef
826 PrintDefine "" "" end $file
828 if [ %{debugspec} = 1 ] ; then
829 echo "Kernel Configuration File for Red Hat kernels:"
834 config_opts="--enable-redhat-buildsys \
835 %{?_with_bitmap_later:--enable-bitmap-later} \
836 %{?_with_bos_restricted:--enable-bos-restricted-mode} \
837 %{?_with_largefiles:--enable-largefile-fileserver} \
838 %{?_with_supergroups:--enable-supergroups} \
839 --enable-transarc-paths"
843 # If we're using Fedora kmods, work out which is the best kernel module to
844 # use for the userland configuration step. If no variants have been specified,
845 # then use the standard kernel. If variants are specified, use the standard kernel
846 # if it's listed, otherwise pick the first listed kernel.
849 for kvariant in %{kvariants} ; do
850 if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
851 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
852 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
854 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
859 if [ -z "$ksrc" ] ; then
863 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
866 %if %{?krb5config:1}%{!?krb5config:0}
867 KRB5_CONFIG="%{krb5config}"
872 ./configure --with-afs-sysname=${sysname} \
873 --prefix=%{_prefix} \
874 --libdir=%{_libdir} \
875 --bindir=%{_bindir} \
876 --sbindir=%{_sbindir} \
877 --disable-strip-binaries \
879 --with-linux-kernel-packaging \
881 --with-linux-kernel-headers=${ksrc} \
889 # Build the libafs tree
890 make only_libafs_tree || exit 1
892 # Configure each of our kernel modules
894 %if %{fedorakmod} && %{build_modules}
895 for kvariant in %{kvariants} ; do
896 if [ -n "${kvariant}" ] ; then
897 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
898 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
900 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
903 cp -R libafs_tree _kmod_build_${kvariant}
904 pushd _kmod_build_${kvariant}
905 ./configure --with-afs-sysname=${sysname} \
906 --prefix=%{_prefix} \
907 --libdir=%{_libdir} \
908 --bindir=%{_bindir} \
909 --sbindir=%{_sbindir} \
910 --with-linux-kernel-packaging \
911 --with-linux-kernel-headers=${ksrc} \
912 --enable-disconnected \
914 --with-krb5-conf=/usr/kerberos/bin/krb5-config \
923 %if %{build_userspace}
924 # Build the user-space AFS stuff
925 make dest_nolibafs || exit 1
930 for kvariant in %{kvariants}
932 if [ -n "${kvariant}" ] ; then
933 pushd _kmod_build_$kvariant;
937 make dest_only_libafs
942 # Begin legacy kernel module building code
945 # Build all the kernel modules for linux 2.4.x
946 for variation in %{kvariations}
948 if [ ${variation} = up ]
950 local_smp_def=-DREDHAT_FIX
953 local_smp_def="-DAFS_SMP -DREDHAT_FIX"
957 PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
958 make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
959 LINUX_MODULE_NAME="${suffix}" MPS=SP
962 rm -f src/config/redhat-fix.h
964 %elseif %{kvers_is_26}
965 # Build the kernel module for this version of linux 2.6.x
966 # Notice how much easier this is than 2.4. On the other hand,
967 # we require much more external support to build multiple modules.
969 # the MPS=SP just means that we don't add a '.mp' to the name.
970 make dest_only_libafs MPS=SP
973 # End legacy kernel module building code
978 ##############################################################################
982 ##############################################################################
985 export DONT_GPRINTIFY=1
987 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
999 echo "I don't know how to build linux-`expr %{kernvers} : '\(^[0-9]*[.][0-9]*\)'`"
1008 x86_64) sysname=amd64_linux${kv} ;;
1009 alpha*) sysname=alpha_linux_${kv} ;;
1010 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
1011 *) sysname=%{_arch}_linux${kv} ;;
1014 # Build install tree
1015 %if %{build_userspace}
1016 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
1017 mkdir -p $RPM_BUILD_ROOT%{_libdir}
1018 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
1019 %if 0%{?fedora} < 15
1020 mkdir -p $RPM_BUILD_ROOT%{initdir}
1022 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
1023 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
1025 mkdir -p $RPM_BUILD_ROOT/etc/openafs
1026 mkdir -p $RPM_BUILD_ROOT%{pamdir}
1027 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
1028 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
1029 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1030 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1031 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1032 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1034 # Copy files from dest to the appropriate places in BuildRoot
1035 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1036 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1037 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1038 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1039 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1041 # Set the executable bit on libraries in libdir, so rpmbuild knows to
1042 # create "Provides" entries in the package metadata for the libraries
1043 chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
1045 # Fix the location of restorevol, since it should be available for
1046 # any user in /usr/bin
1047 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1049 # Link kpasswd to kapasswd
1050 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1052 # Copy root.client config files
1053 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1054 %if 0%{?fedora} < 15
1055 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1056 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1058 install -m 755 src/packaging/RedHat/openafs-client.service $RPM_BUILD_ROOT%{_unitdir}/openafs-client.service
1059 install -m 755 src/packaging/RedHat/openafs-client.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/openafs-client.modules
1060 install -m 755 src/packaging/RedHat/openafs-server.service $RPM_BUILD_ROOT%{_unitdir}/openafs-server.service
1064 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1067 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1068 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1070 # Populate /usr/vice/etc
1071 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1072 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1073 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1074 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1077 # install dkms source
1079 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1080 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1082 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<"EOF"
1084 PACKAGE_VERSION="%{dkms_version}"
1086 # Items below here should not have to change with each driver version
1087 PACKAGE_NAME="%{name}"
1088 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'
1089 CLEAN="make -C src/libafs clean"
1091 BUILT_MODULE_NAME[0]="$PACKAGE_NAME"
1092 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/$PACKAGE_NAME/"
1099 # install kernel-source
1102 # Install the kernel module source tree
1103 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1104 tar cf - -C libafs_tree . | \
1105 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1107 # Next, copy the LICENSE Files, README
1108 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1109 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1110 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1113 # Install DOCUMENTATION
1116 # Build the DOC directory
1117 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1118 tar cf - -C doc LICENSE html pdf | \
1119 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1120 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1121 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1126 tar cf - -C doc/man-pages man1 man5 man8 | \
1127 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1129 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1131 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1133 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1136 # remove unused man pages
1137 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1138 dkload knfs package runntp symlink symlink_list symlink_make \
1140 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1143 # rename kpasswd to kapasswd
1144 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1147 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1149 # create list of man pages that go in the 'openafs' package
1150 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1151 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|^xstat|udebug|unlog|^uss|^vos' \
1152 |egrep -v '^afs_compile_et' \
1155 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1156 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1159 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1160 |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1166 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1167 %{_bindir}/afsmonitor
1174 %{_bindir}/pagsh.krb
1176 %{_bindir}/restorevol
1180 %{_bindir}/tokens.krb
1181 %{_bindir}/translate_et
1182 %{_bindir}/xstat_cm_test
1183 %{_bindir}/xstat_fs_test
1191 %{_sbindir}/read_tape
1196 EOF-openafs-file-list
1198 # add man pages to the list
1199 cat openafs-man1files \
1200 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1202 cat openafs-man5files \
1203 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1205 cat openafs-man8files \
1206 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1210 # Install compatiblity links
1212 for d in bin:bin etc:sbin; do
1213 olddir=`echo $d | sed 's/:.*$//'`
1214 newdir=`echo $d | sed 's/^.*://'`
1215 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1216 for f in `cat openafs-file-list`; do
1217 if echo $f | grep -q /$newdir/; then
1219 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1225 # Remove files we're not installing
1228 # remove duplicated files from /usr/afs/bin
1229 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1230 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1233 # the rest are not needed.
1234 for f in dlog dpass install knfs livesys ; do
1235 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1238 # not supported on Linux or duplicated
1239 for f in kdb rmtsysd kpwvalid ; do
1240 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1242 # sometimes install sucks and puts down a directory. kill it all.
1243 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1245 # remove man pages from programs deleted above
1246 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
1247 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1250 # PAM modules are doubly-installed Remove the version we don't need
1251 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1252 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1255 %if !%{build_authlibs}
1256 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1257 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1258 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1259 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1264 %if %{build_modules}
1266 for kvariant in %{kvariants}
1268 if [ -n "$kvariant" ] ; then
1269 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1270 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1271 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1273 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1274 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1277 if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1278 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1279 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1281 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1282 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1287 install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1290 # Install the kernel modules
1291 for variation in %{kvariations}
1293 if [ ${variation} = up ]
1296 modname=openafs${kmodend}
1298 kvar=%{kxmoddir}${variation}
1299 modname=openafs${kmodend}
1302 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1303 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1307 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1312 ##############################################################################
1316 ##############################################################################
1318 rm -f openafs-file-list
1319 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1320 rm -fr $RPM_BUILD_ROOT
1323 ##############################################################################
1327 ##############################################################################
1328 %if %{build_userspace}
1331 if [ -e %{_prefix}/afsws ]; then
1332 /bin/rm -fr %{_prefix}/afsws
1336 %if 0%{?fedora} < 15
1337 chkconfig --add openafs-client
1339 if [ $1 -eq 1 ] ; then
1340 # Initial installation
1341 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1344 if [ ! -d /afs ]; then
1346 chown root.root /afs
1348 [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1351 # Create the CellServDB
1352 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1354 ( cd /usr/vice/etc ; \
1355 cat CellServDB.local CellServDB.dist > CellServDB ; \
1356 chmod 644 CellServDB )
1359 #on an upgrade, don't enable if we were disabled
1360 %if 0%{?fedora} < 15
1361 if [ $1 = 1 ] ; then
1362 chkconfig --add openafs-server
1364 %{initdir}/openafs-server condrestart
1366 if [ $1 -eq 1 ] ; then
1367 # Initial installation
1368 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1372 %if %{build_authlibs}
1381 if [ $1 = 0 ] ; then
1382 [ -d /afs ] && rmdir /afs
1386 %if 0%{?fedora} < 15
1387 if [ $1 = 0 ] ; then
1388 %{initdir}/openafs-client stop
1389 chkconfig --del openafs-client
1392 if [ $1 -eq 0 ] ; then
1393 # Package removal, not upgrade
1394 /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || :
1395 /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || :
1400 %if 0%{?fedora} < 15
1401 if [ $1 = 0 ] ; then
1402 %{initdir}/openafs-server stop
1403 chkconfig --del openafs-server
1406 if [ $1 -eq 0 ] ; then
1407 /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || :
1408 /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || :
1412 %if 0%{?fedora} >= 15
1414 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1417 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1420 %if %{build_dkmspkg}
1421 %post -n dkms-%{name}
1422 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1423 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1424 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1426 %preun -n dkms-%{name}
1427 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1431 %if %{build_modules}
1435 /sbin/depmod -ae %{kernvers}
1438 /sbin/depmod -ae %{kernvers}
1444 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1447 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1450 %if %{largesmp_package}
1451 %post kernel-largesmp
1452 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1454 %postun kernel-largesmp
1455 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1458 %if %{bigmem_package}
1460 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1462 %postun kernel-bigmem
1463 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1466 %if %{hugemem_package}
1467 %post kernel-hugemem
1468 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1470 %postun kernel-hugemem
1471 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1476 %if 0%{?fedora} >= 15
1477 %triggerun -- openafs-client < 1.6.0-1
1478 # Save the current service runlevel info
1479 # User must manually run systemd-sysv-convert --apply httpd
1480 # to migrate them to systemd targets
1481 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||:
1483 # Run this because the SysV package being removed won't do it
1484 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || :
1486 %triggerun -- openafs-server < 1.6.0-1
1487 # Save the current service runlevel info
1488 # User must manually run systemd-sysv-convert --apply httpd
1489 # to migrate them to systemd targets
1490 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||:
1492 # Run this because the SysV package being removed won't do it
1493 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || :
1496 ##############################################################################
1500 ##############################################################################
1501 %if %{build_userspace}
1503 %files -f openafs-file-list
1504 %defattr(-,root,root)
1505 %config(noreplace) /etc/sysconfig/openafs
1506 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1507 %{_libdir}/libafshcrypto.so.*
1508 %{_libdir}/librokenafs.so.*
1511 %defattr(-,root,root)
1512 %docdir %{_docdir}/openafs-%{afsvers}
1513 %dir %{_docdir}/openafs-%{afsvers}
1514 %{_docdir}/openafs-%{afsvers}/ChangeLog
1515 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1516 %{_docdir}/openafs-%{afsvers}/pdf
1519 %defattr(-,root,root)
1520 %dir %{_prefix}/vice
1521 %dir %{_prefix}/vice/cache
1522 %dir %{_prefix}/vice/etc
1523 %dir %{_prefix}/vice/etc/C
1524 %{_prefix}/vice/etc/CellServDB.dist
1525 %config(noreplace) %{_prefix}/vice/etc/ThisCell
1526 %config(noreplace) %{_prefix}/vice/etc/cacheinfo
1530 %{_prefix}/vice/etc/afsd
1531 %{_prefix}/vice/etc/C/afszcm.cat
1532 %{pamdir}/pam_afs.krb.so.1
1533 %{pamdir}/pam_afs.krb.so
1534 %{pamdir}/pam_afs.so.1
1535 %{pamdir}/pam_afs.so
1536 %if 0%{?fedora} < 15
1537 %{initdir}/openafs-client
1539 %{_unitdir}/openafs-client.service
1540 %{_sysconfdir}/sysconfig/modules/openafs-client.modules
1542 %{_mandir}/man1/cmdebug.*
1543 %{_mandir}/man1/copyauth.*
1544 %{_mandir}/man1/up.*
1545 %{_mandir}/man5/afs.5.gz
1546 %{_mandir}/man5/afs_cache.5.gz
1547 %{_mandir}/man5/afs_volume_header.5.gz
1548 %{_mandir}/man5/afszcm.cat.5.gz
1549 %{_mandir}/man5/cacheinfo.*
1550 %{_mandir}/man8/afsd.*
1551 %{_mandir}/man8/rmtsysd.*
1552 %{_mandir}/man8/vsys.*
1553 %{_mandir}/man5/CellAlias.*
1556 %defattr(-,root,root)
1558 %dir %{_prefix}/afs/bin
1559 %dir %{_prefix}/afs/etc
1560 %dir %{_prefix}/afs/logs
1561 %{_prefix}/afs/bin/bosserver
1562 %{_prefix}/afs/bin/bos_util
1563 %{_prefix}/afs/bin/buserver
1564 %{_prefix}/afs/bin/dafileserver
1565 %{_prefix}/afs/bin/dafssync-debug
1566 %{_prefix}/afs/bin/dasalvager
1567 %{_prefix}/afs/bin/davolserver
1568 %{_prefix}/afs/bin/fileserver
1569 %{_prefix}/afs/bin/fssync-debug
1570 # Should we support KAServer?
1571 %{_prefix}/afs/bin/kaserver
1572 %{_prefix}/afs/bin/ka-forwarder
1573 %{_prefix}/afs/bin/pt_util
1574 %{_prefix}/afs/bin/ptserver
1575 %{_prefix}/afs/bin/salvager
1576 %{_prefix}/afs/bin/salvageserver
1577 %{_prefix}/afs/bin/salvsync-debug
1578 %{_prefix}/afs/bin/state_analyzer
1579 %{_prefix}/afs/bin/upclient
1580 %{_prefix}/afs/bin/upserver
1581 %{_prefix}/afs/bin/vlserver
1582 %{_prefix}/afs/bin/volinfo
1583 %{_prefix}/afs/bin/volserver
1584 %{_sbindir}/kadb_check
1585 %{_sbindir}/prdb_check
1586 %{_sbindir}/vldb_check
1587 %{_sbindir}/vldb_convert
1589 %if 0%{?fedora} < 15
1590 %{initdir}/openafs-server
1592 %{_unitdir}/openafs-server.service
1594 %{_mandir}/man5/AuthLog.*
1595 %{_mandir}/man5/BackupLog.*
1596 %{_mandir}/man5/BosConfig.*
1597 %{_mandir}/man5/BosLog.*
1598 %{_mandir}/man5/FORCESALVAGE.*
1599 %{_mandir}/man5/FileLog.*
1600 %{_mandir}/man5/KeyFile.*
1601 %{_mandir}/man5/NetInfo.*
1602 %{_mandir}/man5/NetRestrict.*
1603 %{_mandir}/man5/NoAuth.*
1604 %{_mandir}/man5/SALVAGE.fs.*
1605 %{_mandir}/man5/SalvageLog.*
1606 %{_mandir}/man5/sysid.*
1607 %{_mandir}/man5/UserList.*
1608 %{_mandir}/man5/VLLog.*
1609 %{_mandir}/man5/VolserLog.*
1610 %{_mandir}/man5/bdb.DB0.*
1611 %{_mandir}/man5/fms.log.*
1612 %{_mandir}/man5/kaserver.DB0.*
1613 %{_mandir}/man5/kaserverauxdb.*
1614 %{_mandir}/man5/krb.conf.*
1615 %{_mandir}/man5/krb.excl.*
1616 %{_mandir}/man5/prdb.DB0.*
1617 %{_mandir}/man5/salvage.lock.*
1618 %{_mandir}/man5/tapeconfig.*
1619 %{_mandir}/man5/vldb.DB0.*
1620 %{_mandir}/man8/buserver.*
1621 %{_mandir}/man8/fileserver.*
1622 %{_mandir}/man8/dafileserver.*
1623 %{_mandir}/man8/dasalvager.*
1624 %{_mandir}/man8/davolserver.*
1625 %{_mandir}/man8/kadb_check.*
1626 %{_mandir}/man8/ka-forwarder.*
1627 %{_mandir}/man8/prdb_check.*
1628 %{_mandir}/man8/ptserver.*
1629 %{_mandir}/man8/pt_util.*
1630 %{_mandir}/man8/salvager.*
1631 %{_mandir}/man8/salvageserver.*
1632 %{_mandir}/man8/state_analyzer.*
1633 %{_mandir}/man8/upclient.*
1634 %{_mandir}/man8/upserver.*
1635 %{_mandir}/man8/vldb_check.*
1636 %{_mandir}/man8/vldb_convert.*
1637 %{_mandir}/man8/vlserver.*
1638 %{_mandir}/man8/voldump.*
1639 %{_mandir}/man8/volinfo.*
1640 %{_mandir}/man8/volserver.*
1642 %if %{build_authlibs}
1644 %defattr(-,root,root)
1645 %{_libdir}/libafsauthent.so.*
1646 %{_libdir}/libafsrpc.so.*
1647 %{_libdir}/libkopenafs.so.*
1650 %files authlibs-devel
1651 %defattr(-,root,root)
1652 %{_includedir}/kopenafs.h
1653 %{_libdir}/libafsauthent.a
1654 %{_libdir}/libafscp.a
1655 %{_libdir}/libafsrpc.a
1656 %{_libdir}/libafsauthent_pic.a
1657 %{_libdir}/libafsrpc_pic.a
1658 %{_libdir}/libkopenafs.a
1659 %if %{build_authlibs}
1660 %{_libdir}/libafsauthent.so
1661 %{_libdir}/libafsrpc.so
1662 %{_libdir}/libkopenafs.so
1666 %defattr(-,root,root)
1667 %{_bindir}/afs_compile_et
1670 %{_includedir}/lock.h
1671 %{_includedir}/lwp.h
1672 %{_includedir}/preempt.h
1674 %{_includedir}/timer.h
1675 %{_includedir}/ubik.h
1676 %{_includedir}/ubik_int.h
1678 %{_libdir}/libafshcrypto.a
1679 %{_libdir}/libafshcrypto.so
1682 %{_libdir}/librokenafs.a
1683 %{_libdir}/librokenafs.so
1685 %{_libdir}/librxkad.a
1686 %{_libdir}/librxstat.a
1687 %{_libdir}/libubik.a
1688 %{_libdir}/libubik_pthread.a
1689 %{_mandir}/man1/rxgen.*
1690 %{_mandir}/man1/afs_compile_et.*
1692 %if %{build_dkmspkg}
1693 %files -n dkms-%{name}
1694 %defattr(-,root,root)
1695 %{_prefix}/src/%{name}-%{dkms_version}
1698 %files kernel-source
1699 %defattr(-,root,root)
1700 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1701 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1702 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1703 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1706 %defattr(-,root,root)
1710 %defattr(-,root,root)
1716 %defattr(-,root,root)
1718 %{_bindir}/klog.krb5
1720 %{_mandir}/man1/aklog.*
1721 %{_mandir}/man8/asetkey.*
1726 %if %{build_modules}
1731 %defattr(-,root,root)
1732 %{kxmoddir}/fs/openafs/openafs.*
1737 %defattr(-,root,root)
1738 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1741 %if %{largesmp_package}
1742 %files kernel-largesmp
1743 %defattr(-,root,root)
1744 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1747 %if %{bigmem_package}
1748 %files kernel-bigmem
1749 %defattr(-,root,root)
1750 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1753 %if %{hugemem_package}
1754 %files kernel-hugemem
1755 %defattr(-,root,root)
1756 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1762 ##############################################################################
1764 ### openafs.spec change log
1766 ##############################################################################
1768 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1769 - Make the RPM mockable
1771 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1772 - Update to match the shipped 1.4.5 RPMS
1773 - Fix the kvariant stuff to only configure the 'standard' case once
1774 - Add openafs-kvers.sh back in
1776 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1777 - Use Fedora style kmods, which allows us to install multiple kernel types
1779 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1780 - Use distributed files, rather than those in packager's SOURCE directory
1781 - Remove SuidCells stuff, which was unused
1783 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1784 - integrate s390x changes
1785 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1786 that won't build the .so files.
1788 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1790 - use installed aklog manpage.
1791 - moduleparam patch obsoleted.
1793 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1794 - update to 1.4.2-rc1
1795 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1796 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1797 - don't need the posixlock patch anymore.
1799 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1800 - update to 1.4.2-beta2
1801 - add linux2.4 posixlock API patch
1803 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1804 - moduleparam and krb524 patches no longer required in OA-CVS
1806 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1807 - change non-target-cpu kernel dep to a file dep
1808 - make sure we use the proper kernel version for the dependency.
1810 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1811 - allow users to specify local CellServDB and SuidCells entries
1812 don't overwrite user's changes. Provide a .dist an let users
1813 make entries in a ".local"
1814 - build the CellServDB and SuidCells at client startup and at
1816 - add provideskernelarch functionality to openafs-kvers-is.sh
1817 - use that functionality to Require kernel{,-<type>}-targetcpu
1818 to get better package safety due to RPM bugs where the kernel
1819 release isn't used so you can install the kernel module against
1820 any kernel of the same major version.
1822 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1823 - update the README in openafs-kernel-source
1824 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1825 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1827 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1828 - build requires autoconf and automake for krb5support
1829 and autoconf for standard package
1830 - dont setup the krb5 migration kit (or patches) if we don't care.
1831 - require ncurses-devel to build
1833 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1834 - look for krb524 functions in libkrb524 if we can't find them
1835 in the standard locations.
1837 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1838 - fix the module_param_array macro for Linux 2.6.9.
1840 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1841 - update to 1.4.1 release.
1842 - distribute asetkey from openafs instead of krb5-migration kit
1843 - don't need to apply the FC5 patches because they are part of the distro.
1844 - install asetkey into the "proper" place
1845 - dont list a manpage twice.
1846 - package asetkey man page. delete it when not needed.
1848 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1849 - turn authlibs back on, because RT #18767 was applied to CVS.
1851 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1852 - update to 1.4.1rc10, build on FC5
1853 - fix the man pages (distribute into various packages)
1854 - include patches for FC5, RT #29112 and #29122
1856 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1857 - openafs-server shouldn't depend on the kernel module.
1859 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1860 - patch from Mike Polek <mike at pictage.com> to run depmod for
1861 the target kernel and not the running kernel.
1863 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1864 - build aklog from the openafs sources, not from the krb5 migration kit.
1866 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1867 - set openafs-kernel-source to Provide openafs-kernel
1869 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1870 - update afs-krb5 res_search patch: look for res_search and __res_search
1871 - update to 1.4.0 final
1873 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1874 - remove all kdump builds.
1876 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1877 - fix openafs-kernel-version.sh so it will build an RPM for the
1878 currently-running kernel even if it's smp on 2.6.
1880 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1881 - upgrade to 1.4.0rc5
1882 - turn off authlibs packages
1884 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1885 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1886 it's called "openafs" and not "libafs". This fixes the shutdown
1889 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1890 - update kversis script, add 'kvers' operation
1891 - fix bug that 2.6 smp/hugemem kernels don't provide
1892 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1893 - add patch to remove res_search from the afs-krb5 configure
1895 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1896 - Update to 1.4.0rc4
1897 - Update the afs-krb5 krb524 patch so it actually works on
1898 some older systems like RHEL3 that still need -lkrb524.
1899 - Update the buildall script so choose better architecture support,
1900 e.g. don't build i586 on RHEL.
1901 - Update the rebuild information in the SPEC file.
1902 - Add support for finding .EL kernels in openafs-kvers-is.sh
1903 - Add additional error messages when kernel version/type parsing fails.
1904 - Update the buildall script to use the kernel srcdir directly.
1906 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1907 - Add "hugemem" to 2.4 configs
1908 - Add checks to support scripts to determine whether to build
1909 the bigmem and/or hugemem kernels for 2.4.
1911 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1912 - Added some afs-krb5 patches to get the migration kit to build
1913 on modern AFS and modern Kerberos.
1914 - Added authlibs and authlibs-devel packages as per UMich changes.
1916 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1917 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1919 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1920 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1921 from Red Hat. Initial attempt at a release of 1.4. Still need
1922 to work in a 2.6 build system.