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}
1084 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1086 PACKAGE_VERSION="%{dkms_version}"
1088 # Items below here should not have to change with each driver version
1089 PACKAGE_NAME="%{name}"
1090 MAKE[0]="KMODNAME=openafs.ko; DSTKMOD=\\".\\"; [ \\"\\\`echo \\"\${kernelver_array[0]}\${kernelver[0]}\\" | sed -e 's/^\\([0-9]*\\.[0-9]*\\)\\..*/\\1/'\\\`\\" = \\"2.4\\" ] && KMODNAME=\\"libafs-*\\" && DSTKMOD=openafs.o; ./configure --with-linux-kernel-headers=\${kernel_source_dir} --with-linux-kernel-packaging; make; mv src/libafs/MODLOAD-*/\\\\\\\$KMODNAME \\\\\\\$DSTKMOD"
1091 CLEAN="make -C src/libafs clean"
1093 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1094 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1101 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1103 PACKAGE_VERSION="%{dkms_version}"
1105 # Items below here should not have to change with each driver version
1106 PACKAGE_NAME="%{name}"
1107 MAKE[0]="KMODNAME=openafs.ko; DSTKMOD=\\".\\"; [ \\"\\\`echo \\"\${kernelver_array[0]}\${kernelver[0]}\\" | sed -e 's/^\\([0-9]*\\.[0-9]*\\)\\..*/\\1/'\\\`\\" = \\"2.4\\" ] && KMODNAME=\\"libafs-*\\" && DSTKMOD=openafs.o; ./configure --with-linux-kernel-headers=\${kernel_source_dir} --with-linux-kernel-packaging; make; mv src/libafs/MODLOAD-*/\\\$KMODNAME \\\$DSTKMOD"
1108 CLEAN="make -C src/libafs clean"
1110 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1111 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1120 # install kernel-source
1123 # Install the kernel module source tree
1124 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1125 tar cf - -C libafs_tree . | \
1126 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1128 # Next, copy the LICENSE Files, README
1129 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1130 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1131 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1134 # Install DOCUMENTATION
1137 # Build the DOC directory
1138 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1139 tar cf - -C doc LICENSE html pdf | \
1140 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1141 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1142 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1147 tar cf - -C doc/man-pages man1 man5 man8 | \
1148 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1150 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1152 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1154 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1157 # remove unused man pages
1158 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1159 dkload knfs package runntp symlink symlink_list symlink_make \
1161 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1164 # rename kpasswd to kapasswd
1165 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1168 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1170 # create list of man pages that go in the 'openafs' package
1171 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1172 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|^xstat|udebug|unlog|^uss|^vos' \
1173 |egrep -v '^afs_compile_et' \
1176 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1177 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1180 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1181 |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1187 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1188 %{_bindir}/afsmonitor
1195 %{_bindir}/pagsh.krb
1197 %{_bindir}/restorevol
1201 %{_bindir}/tokens.krb
1202 %{_bindir}/translate_et
1203 %{_bindir}/xstat_cm_test
1204 %{_bindir}/xstat_fs_test
1212 %{_sbindir}/read_tape
1217 EOF-openafs-file-list
1219 # add man pages to the list
1220 cat openafs-man1files \
1221 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1223 cat openafs-man5files \
1224 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1226 cat openafs-man8files \
1227 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1231 # Install compatiblity links
1233 for d in bin:bin etc:sbin; do
1234 olddir=`echo $d | sed 's/:.*$//'`
1235 newdir=`echo $d | sed 's/^.*://'`
1236 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1237 for f in `cat openafs-file-list`; do
1238 if echo $f | grep -q /$newdir/; then
1240 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1246 # Remove files we're not installing
1249 # remove duplicated files from /usr/afs/bin
1250 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1251 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1254 # the rest are not needed.
1255 for f in dlog dpass install knfs livesys ; do
1256 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1259 # not supported on Linux or duplicated
1260 for f in kdb rmtsysd kpwvalid ; do
1261 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1263 # sometimes install sucks and puts down a directory. kill it all.
1264 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1266 # remove man pages from programs deleted above
1267 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
1268 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1271 # PAM modules are doubly-installed Remove the version we don't need
1272 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1273 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1276 %if !%{build_authlibs}
1277 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1278 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1279 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1280 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1285 %if %{build_modules}
1287 for kvariant in %{kvariants}
1289 if [ -n "$kvariant" ] ; then
1290 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1291 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1292 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1294 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1295 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1298 if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1299 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1300 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1302 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1303 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1308 install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1311 # Install the kernel modules
1312 for variation in %{kvariations}
1314 if [ ${variation} = up ]
1317 modname=openafs${kmodend}
1319 kvar=%{kxmoddir}${variation}
1320 modname=openafs${kmodend}
1323 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1324 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1328 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1333 ##############################################################################
1337 ##############################################################################
1339 rm -f openafs-file-list
1340 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1341 rm -fr $RPM_BUILD_ROOT
1344 ##############################################################################
1348 ##############################################################################
1349 %if %{build_userspace}
1352 if [ -e %{_prefix}/afsws ]; then
1353 /bin/rm -fr %{_prefix}/afsws
1357 %if 0%{?fedora} < 15
1358 chkconfig --add openafs-client
1360 if [ $1 -eq 1 ] ; then
1361 # Initial installation
1362 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1365 if [ ! -d /afs ]; then
1367 chown root.root /afs
1369 [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1372 # Create the CellServDB
1373 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1375 ( cd /usr/vice/etc ; \
1376 cat CellServDB.local CellServDB.dist > CellServDB ; \
1377 chmod 644 CellServDB )
1380 #on an upgrade, don't enable if we were disabled
1381 %if 0%{?fedora} < 15
1382 if [ $1 = 1 ] ; then
1383 chkconfig --add openafs-server
1385 %{initdir}/openafs-server condrestart
1387 if [ $1 -eq 1 ] ; then
1388 # Initial installation
1389 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1393 %if %{build_authlibs}
1402 if [ $1 = 0 ] ; then
1403 [ -d /afs ] && rmdir /afs
1407 %if 0%{?fedora} < 15
1408 if [ $1 = 0 ] ; then
1409 %{initdir}/openafs-client stop
1410 chkconfig --del openafs-client
1413 if [ $1 -eq 0 ] ; then
1414 # Package removal, not upgrade
1415 /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || :
1416 /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || :
1421 %if 0%{?fedora} < 15
1422 if [ $1 = 0 ] ; then
1423 %{initdir}/openafs-server stop
1424 chkconfig --del openafs-server
1427 if [ $1 -eq 0 ] ; then
1428 /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || :
1429 /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || :
1433 %if 0%{?fedora} >= 15
1435 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1438 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1441 %if %{build_dkmspkg}
1442 %post -n dkms-%{name}
1443 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1444 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1445 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1447 %preun -n dkms-%{name}
1448 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1452 %if %{build_modules}
1456 /sbin/depmod -ae %{kernvers}
1459 /sbin/depmod -ae %{kernvers}
1465 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1468 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1471 %if %{largesmp_package}
1472 %post kernel-largesmp
1473 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1475 %postun kernel-largesmp
1476 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1479 %if %{bigmem_package}
1481 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1483 %postun kernel-bigmem
1484 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1487 %if %{hugemem_package}
1488 %post kernel-hugemem
1489 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1491 %postun kernel-hugemem
1492 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1497 %if 0%{?fedora} >= 15
1498 %triggerun -- openafs-client < 1.6.0-1
1499 # Save the current service runlevel info
1500 # User must manually run systemd-sysv-convert --apply httpd
1501 # to migrate them to systemd targets
1502 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||:
1504 # Run this because the SysV package being removed won't do it
1505 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || :
1507 %triggerun -- openafs-server < 1.6.0-1
1508 # Save the current service runlevel info
1509 # User must manually run systemd-sysv-convert --apply httpd
1510 # to migrate them to systemd targets
1511 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||:
1513 # Run this because the SysV package being removed won't do it
1514 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || :
1517 ##############################################################################
1521 ##############################################################################
1522 %if %{build_userspace}
1524 %files -f openafs-file-list
1525 %defattr(-,root,root)
1526 %config(noreplace) /etc/sysconfig/openafs
1527 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1528 %{_libdir}/libafshcrypto.so.*
1529 %{_libdir}/librokenafs.so.*
1532 %defattr(-,root,root)
1533 %docdir %{_docdir}/openafs-%{afsvers}
1534 %dir %{_docdir}/openafs-%{afsvers}
1535 %{_docdir}/openafs-%{afsvers}/ChangeLog
1536 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1537 %{_docdir}/openafs-%{afsvers}/pdf
1540 %defattr(-,root,root)
1541 %dir %{_prefix}/vice
1542 %dir %{_prefix}/vice/cache
1543 %dir %{_prefix}/vice/etc
1544 %dir %{_prefix}/vice/etc/C
1545 %{_prefix}/vice/etc/CellServDB.dist
1546 %config(noreplace) %{_prefix}/vice/etc/ThisCell
1547 %config(noreplace) %{_prefix}/vice/etc/cacheinfo
1551 %{_prefix}/vice/etc/afsd
1552 %{_prefix}/vice/etc/C/afszcm.cat
1553 %{pamdir}/pam_afs.krb.so.1
1554 %{pamdir}/pam_afs.krb.so
1555 %{pamdir}/pam_afs.so.1
1556 %{pamdir}/pam_afs.so
1557 %if 0%{?fedora} < 15
1558 %{initdir}/openafs-client
1560 %{_unitdir}/openafs-client.service
1561 %{_sysconfdir}/sysconfig/modules/openafs-client.modules
1563 %{_mandir}/man1/cmdebug.*
1564 %{_mandir}/man1/copyauth.*
1565 %{_mandir}/man1/up.*
1566 %{_mandir}/man5/afs.5.gz
1567 %{_mandir}/man5/afs_cache.5.gz
1568 %{_mandir}/man5/afs_volume_header.5.gz
1569 %{_mandir}/man5/afszcm.cat.5.gz
1570 %{_mandir}/man5/cacheinfo.*
1571 %{_mandir}/man8/afsd.*
1572 %{_mandir}/man8/rmtsysd.*
1573 %{_mandir}/man8/vsys.*
1574 %{_mandir}/man5/CellAlias.*
1577 %defattr(-,root,root)
1579 %dir %{_prefix}/afs/bin
1580 %dir %{_prefix}/afs/etc
1581 %dir %{_prefix}/afs/logs
1582 %{_prefix}/afs/bin/bosserver
1583 %{_prefix}/afs/bin/bos_util
1584 %{_prefix}/afs/bin/buserver
1585 %{_prefix}/afs/bin/dafileserver
1586 %{_prefix}/afs/bin/dafssync-debug
1587 %{_prefix}/afs/bin/dasalvager
1588 %{_prefix}/afs/bin/davolserver
1589 %{_prefix}/afs/bin/fileserver
1590 %{_prefix}/afs/bin/fssync-debug
1591 # Should we support KAServer?
1592 %{_prefix}/afs/bin/kaserver
1593 %{_prefix}/afs/bin/ka-forwarder
1594 %{_prefix}/afs/bin/pt_util
1595 %{_prefix}/afs/bin/ptserver
1596 %{_prefix}/afs/bin/salvager
1597 %{_prefix}/afs/bin/salvageserver
1598 %{_prefix}/afs/bin/salvsync-debug
1599 %{_prefix}/afs/bin/state_analyzer
1600 %{_prefix}/afs/bin/upclient
1601 %{_prefix}/afs/bin/upserver
1602 %{_prefix}/afs/bin/vlserver
1603 %{_prefix}/afs/bin/volinfo
1604 %{_prefix}/afs/bin/volserver
1605 %{_sbindir}/kadb_check
1606 %{_sbindir}/prdb_check
1607 %{_sbindir}/vldb_check
1608 %{_sbindir}/vldb_convert
1610 %if 0%{?fedora} < 15
1611 %{initdir}/openafs-server
1613 %{_unitdir}/openafs-server.service
1615 %{_mandir}/man5/AuthLog.*
1616 %{_mandir}/man5/BackupLog.*
1617 %{_mandir}/man5/BosConfig.*
1618 %{_mandir}/man5/BosLog.*
1619 %{_mandir}/man5/FORCESALVAGE.*
1620 %{_mandir}/man5/FileLog.*
1621 %{_mandir}/man5/KeyFile.*
1622 %{_mandir}/man5/NetInfo.*
1623 %{_mandir}/man5/NetRestrict.*
1624 %{_mandir}/man5/NoAuth.*
1625 %{_mandir}/man5/SALVAGE.fs.*
1626 %{_mandir}/man5/SalvageLog.*
1627 %{_mandir}/man5/sysid.*
1628 %{_mandir}/man5/UserList.*
1629 %{_mandir}/man5/VLLog.*
1630 %{_mandir}/man5/VolserLog.*
1631 %{_mandir}/man5/bdb.DB0.*
1632 %{_mandir}/man5/fms.log.*
1633 %{_mandir}/man5/kaserver.DB0.*
1634 %{_mandir}/man5/kaserverauxdb.*
1635 %{_mandir}/man5/krb.conf.*
1636 %{_mandir}/man5/krb.excl.*
1637 %{_mandir}/man5/prdb.DB0.*
1638 %{_mandir}/man5/salvage.lock.*
1639 %{_mandir}/man5/tapeconfig.*
1640 %{_mandir}/man5/vldb.DB0.*
1641 %{_mandir}/man8/buserver.*
1642 %{_mandir}/man8/fileserver.*
1643 %{_mandir}/man8/dafileserver.*
1644 %{_mandir}/man8/dasalvager.*
1645 %{_mandir}/man8/davolserver.*
1646 %{_mandir}/man8/kadb_check.*
1647 %{_mandir}/man8/ka-forwarder.*
1648 %{_mandir}/man8/prdb_check.*
1649 %{_mandir}/man8/ptserver.*
1650 %{_mandir}/man8/pt_util.*
1651 %{_mandir}/man8/salvager.*
1652 %{_mandir}/man8/salvageserver.*
1653 %{_mandir}/man8/state_analyzer.*
1654 %{_mandir}/man8/upclient.*
1655 %{_mandir}/man8/upserver.*
1656 %{_mandir}/man8/vldb_check.*
1657 %{_mandir}/man8/vldb_convert.*
1658 %{_mandir}/man8/vlserver.*
1659 %{_mandir}/man8/voldump.*
1660 %{_mandir}/man8/volinfo.*
1661 %{_mandir}/man8/volserver.*
1663 %if %{build_authlibs}
1665 %defattr(-,root,root)
1666 %{_libdir}/libafsauthent.so.*
1667 %{_libdir}/libafsrpc.so.*
1668 %{_libdir}/libkopenafs.so.*
1671 %files authlibs-devel
1672 %defattr(-,root,root)
1673 %{_includedir}/kopenafs.h
1674 %{_libdir}/libafsauthent.a
1675 %{_libdir}/libafscp.a
1676 %{_libdir}/libafsrpc.a
1677 %{_libdir}/libafsauthent_pic.a
1678 %{_libdir}/libafsrpc_pic.a
1679 %{_libdir}/libkopenafs.a
1680 %if %{build_authlibs}
1681 %{_libdir}/libafsauthent.so
1682 %{_libdir}/libafsrpc.so
1683 %{_libdir}/libkopenafs.so
1687 %defattr(-,root,root)
1688 %{_bindir}/afs_compile_et
1691 %{_includedir}/lock.h
1692 %{_includedir}/lwp.h
1693 %{_includedir}/preempt.h
1695 %{_includedir}/timer.h
1696 %{_includedir}/ubik.h
1697 %{_includedir}/ubik_int.h
1699 %{_libdir}/libafshcrypto.a
1700 %{_libdir}/libafshcrypto.so
1703 %{_libdir}/librokenafs.a
1704 %{_libdir}/librokenafs.so
1706 %{_libdir}/librxkad.a
1707 %{_libdir}/librxstat.a
1708 %{_libdir}/libubik.a
1709 %{_libdir}/libubik_pthread.a
1710 %{_mandir}/man1/rxgen.*
1711 %{_mandir}/man1/afs_compile_et.*
1713 %if %{build_dkmspkg}
1714 %files -n dkms-%{name}
1715 %defattr(-,root,root)
1716 %{_prefix}/src/%{name}-%{dkms_version}
1719 %files kernel-source
1720 %defattr(-,root,root)
1721 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1722 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1723 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1724 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1727 %defattr(-,root,root)
1731 %defattr(-,root,root)
1737 %defattr(-,root,root)
1739 %{_bindir}/klog.krb5
1741 %{_mandir}/man1/aklog.*
1742 %{_mandir}/man8/asetkey.*
1747 %if %{build_modules}
1752 %defattr(-,root,root)
1753 %{kxmoddir}/fs/openafs/openafs.*
1758 %defattr(-,root,root)
1759 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1762 %if %{largesmp_package}
1763 %files kernel-largesmp
1764 %defattr(-,root,root)
1765 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1768 %if %{bigmem_package}
1769 %files kernel-bigmem
1770 %defattr(-,root,root)
1771 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1774 %if %{hugemem_package}
1775 %files kernel-hugemem
1776 %defattr(-,root,root)
1777 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1783 ##############################################################################
1785 ### openafs.spec change log
1787 ##############################################################################
1789 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1790 - Make the RPM mockable
1792 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1793 - Update to match the shipped 1.4.5 RPMS
1794 - Fix the kvariant stuff to only configure the 'standard' case once
1795 - Add openafs-kvers.sh back in
1797 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1798 - Use Fedora style kmods, which allows us to install multiple kernel types
1800 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1801 - Use distributed files, rather than those in packager's SOURCE directory
1802 - Remove SuidCells stuff, which was unused
1804 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1805 - integrate s390x changes
1806 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1807 that won't build the .so files.
1809 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1811 - use installed aklog manpage.
1812 - moduleparam patch obsoleted.
1814 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1815 - update to 1.4.2-rc1
1816 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1817 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1818 - don't need the posixlock patch anymore.
1820 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1821 - update to 1.4.2-beta2
1822 - add linux2.4 posixlock API patch
1824 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1825 - moduleparam and krb524 patches no longer required in OA-CVS
1827 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1828 - change non-target-cpu kernel dep to a file dep
1829 - make sure we use the proper kernel version for the dependency.
1831 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1832 - allow users to specify local CellServDB and SuidCells entries
1833 don't overwrite user's changes. Provide a .dist an let users
1834 make entries in a ".local"
1835 - build the CellServDB and SuidCells at client startup and at
1837 - add provideskernelarch functionality to openafs-kvers-is.sh
1838 - use that functionality to Require kernel{,-<type>}-targetcpu
1839 to get better package safety due to RPM bugs where the kernel
1840 release isn't used so you can install the kernel module against
1841 any kernel of the same major version.
1843 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1844 - update the README in openafs-kernel-source
1845 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1846 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1848 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1849 - build requires autoconf and automake for krb5support
1850 and autoconf for standard package
1851 - dont setup the krb5 migration kit (or patches) if we don't care.
1852 - require ncurses-devel to build
1854 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1855 - look for krb524 functions in libkrb524 if we can't find them
1856 in the standard locations.
1858 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1859 - fix the module_param_array macro for Linux 2.6.9.
1861 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1862 - update to 1.4.1 release.
1863 - distribute asetkey from openafs instead of krb5-migration kit
1864 - don't need to apply the FC5 patches because they are part of the distro.
1865 - install asetkey into the "proper" place
1866 - dont list a manpage twice.
1867 - package asetkey man page. delete it when not needed.
1869 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1870 - turn authlibs back on, because RT #18767 was applied to CVS.
1872 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1873 - update to 1.4.1rc10, build on FC5
1874 - fix the man pages (distribute into various packages)
1875 - include patches for FC5, RT #29112 and #29122
1877 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1878 - openafs-server shouldn't depend on the kernel module.
1880 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1881 - patch from Mike Polek <mike at pictage.com> to run depmod for
1882 the target kernel and not the running kernel.
1884 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1885 - build aklog from the openafs sources, not from the krb5 migration kit.
1887 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1888 - set openafs-kernel-source to Provide openafs-kernel
1890 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1891 - update afs-krb5 res_search patch: look for res_search and __res_search
1892 - update to 1.4.0 final
1894 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1895 - remove all kdump builds.
1897 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1898 - fix openafs-kernel-version.sh so it will build an RPM for the
1899 currently-running kernel even if it's smp on 2.6.
1901 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1902 - upgrade to 1.4.0rc5
1903 - turn off authlibs packages
1905 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1906 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1907 it's called "openafs" and not "libafs". This fixes the shutdown
1910 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1911 - update kversis script, add 'kvers' operation
1912 - fix bug that 2.6 smp/hugemem kernels don't provide
1913 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1914 - add patch to remove res_search from the afs-krb5 configure
1916 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1917 - Update to 1.4.0rc4
1918 - Update the afs-krb5 krb524 patch so it actually works on
1919 some older systems like RHEL3 that still need -lkrb524.
1920 - Update the buildall script so choose better architecture support,
1921 e.g. don't build i586 on RHEL.
1922 - Update the rebuild information in the SPEC file.
1923 - Add support for finding .EL kernels in openafs-kvers-is.sh
1924 - Add additional error messages when kernel version/type parsing fails.
1925 - Update the buildall script to use the kernel srcdir directly.
1927 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1928 - Add "hugemem" to 2.4 configs
1929 - Add checks to support scripts to determine whether to build
1930 the bigmem and/or hugemem kernels for 2.4.
1932 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1933 - Added some afs-krb5 patches to get the migration kit to build
1934 on modern AFS and modern Kerberos.
1935 - Added authlibs and authlibs-devel packages as per UMich changes.
1937 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1938 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1940 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1941 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1942 from Red Hat. Initial attempt at a release of 1.4. Still need
1943 to work in a 2.6 build system.