1 # Openafs Spec $Revision$
3 %define afsvers @VERSION@
4 %define pkgvers @LINUX_PKGVER@
5 # for beta/rc releases make pkgrel 0.<tag>
6 # for real releases make pkgrel 1 (or more for extra releases)
7 %define pkgrel @LINUX_PKGREL@
9 %{!?fedorakmod: %define fedorakmod 1}
10 %{!?build_dkmspkg: %define build_dkmspkg 1}
12 # Determine presence of rpmbuild command line --define arguments used for
13 # option specification
14 %define kernvers_on_cmdline %{?kernvers:1}%{!?kernvers:0}
15 %define build_userspace_on_cmdline %{?build_userspace:1}%{!?build_userspace:0}
16 %define build_modules_on_cmdline %{?build_modules:1}%{!?build_modules:0}
17 %define build_authlibs_on_cmdline %{?build_authlibs:1}%{!?build_authlibs:0}
19 # Determine the version of the kernel to build against
20 # - automatically select running kernel if there are sources in /lib/modules
21 # - note that this can be overridden on the command line
23 %if !%{kernvers_on_cmdline}
24 %define kernvers %(%{_sourcedir}/openafs-kernel-version.sh)
27 # If we're building for a 2.4 series kernel, then fedora style kmods aren't
28 # appropriate - disable them.
30 %define kern24 %([ `echo "%{kernvers}" | sed -e 's/^\([0-9]*\.[0-9]*\)\..*/\1/'` = "2.4" ] && echo 1 || echo 0)
37 %define kmodtool bash %{_sourcedir}/openafs-kmodtool
39 %define kmod_name openafs
40 %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
43 %{!?kvariants: %define kvariants %{?upvar}}
45 %if %{?ksrcdir:1}%{!?ksrcdir:0}
46 if ( -d %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}) ; then
47 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
49 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}}
53 %else # Legacy kernel build stuff
55 %define kversis %{_sourcedir}/openafs-kvers-is.sh
56 %define kvers %(%{kversis} parsev %{kernvers})
57 %define kvers_is_24 %(%{kversis} %{kvers} "2.4")
58 %define kvers_is_26 %(%{kversis} %{kvers} "2.6")
59 %define ktype %(%{kversis} parset %{kernvers})
60 %define kversion %(%{kversis} kvers %{kernvers})
62 # This is where to look for kernel build include files. Default
63 # is /lib/modules/<kvers>/build, but you can define kbase and
64 # kend on the commandline to change that.
66 %if %{?kbase:0}%{!?kbase:1}
67 %define kbase /lib/modules/
69 %if %{?kend:0}%{!?kend:1}
72 # Let the buildscript define the ksrcdir directly -- needed for RHEL4
73 %if %{?ksrcdir:0}%{!?ksrcdir:1}
74 %define ksrcdir %{kbase}%{kernvers}%{kend}
77 %if %{?kmoddir:0}%{!?kmoddir:1}
78 %define kmoddir /lib/modules
80 %define kxmoddir %{kmoddir}/%{kernvers}
82 # End legacy kernel build stuff
85 %define dkms_version %{pkgvers}-%{pkgrel}%{?dist}
87 # Set 'debugspec' to 1 if you want to debug the spec file. This will
88 # not remove the installed tree as part of the %clean operation
89 %if %{?debugspec:0}%{!?debugspec:1}
93 # Set 'krb5support' to 1 if you want to build the openafs-krb5 package
94 # to distribute aklog and asetkey
95 %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
97 # Set 'bootkernelsupport' to 1 if you want to build the
98 # kernel module for Red Hat BOOT Kernels on x86.
99 %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
101 # Define the location of your init.d directory
102 %define initdir /etc/rc.d/init.d
104 #determine if the kernel provides an arch-specific Provides
105 %define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
107 # Define the location of the PAM security module directory
108 %define pamdir /%{_lib}/security
112 # Define the set of kernel module variations to be built:
113 # For 2.4 kernels we just build everything at once for a particular
114 # kernel. So we build up, smp, and bigmem all at once.
115 # For 2.6 kernels we have to build against the specific kernel headers
116 # for a particular kernel variation. AFS will handle the specific smp or
117 # non-smp determination. So just always build as if it's "up" -- the kernel
118 # version will have the 'variation' type already in the version #.
121 %define smp_package 0
122 %define bigmem_package 0
123 %define hugemem_package 0
124 %define largesmp_package 0
126 #######################################################################
129 %define kdepend kernel-source
131 %define smp_package 1
134 %define bigmem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} bigmem)
135 %if %{bigmem_package}
136 %define bigmem_ext bigmem
139 %define hugemem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} hugemem)
140 %if %{hugemem_package}
141 %define hugemem_ext hugemem
144 %define kvariations up smp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
146 #######################################################################
150 %define kvariations up
155 %define up_package %(%{kversis} "%{ktype}" "")
156 %define smp_package %(%{kversis} "%{ktype}" "smp")
157 %define hugemem_package %(%{kversis} "%{ktype}" "hugemem")
158 %define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
161 %if !%{up_package} && !%{smp_package} && !%{hugemem_package} && !%{largesmp_package}
162 %error "unknown kernel type: %{ktype}"
165 %if !%{kernvers_on_cmdline}
166 %define kdepend %{ksrcdir}/include/linux/version.h
169 #######################################################################
172 %error "unknown kernel version: ${kvers} (parsed from %{kernvers})"
176 # End of legacy kernel module build
179 #######################################################################
180 # You probably don't need to change anything beyond this line
181 # NOTE: If you do, please email me!!!
183 # Determine which elements of OpenAFS to build. For non-x86 arches
184 # (subject to the ExclusiveArch setting, below), we build both userspace
185 # and modules. For most x86 arches, we build just the kernel modules. For
186 # i386, we build just the userspace. If you're running an i386 kernel,
187 # you'll need to tweak that last bit.
188 %if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
190 %define build_userspace 1
191 %define build_modules 1
192 %ifarch %{ix86} x86_64 ia64
193 %define build_authlibs 1
195 %define build_authlibs 0
199 %if !%{build_userspace_on_cmdline}
200 %define build_userspace 0
202 %if !%{build_modules_on_cmdline}
203 %define build_modules 0
207 %if !%{build_authlibs_on_cmdline}
208 %if %{build_userspace_on_cmdline}
209 %define build_authlibs 1
211 %define build_authlibs 0
215 # Make sure RPM doesn't complain about installed but non-packaged files.
216 #define __check_files %{nil}
218 Summary: OpenAFS distributed filesystem
221 Release: %{pkgrel}%{?dist}
222 License: IBM Public License
223 URL: http://www.openafs.org
224 BuildRoot: %{_tmppath}/%{name}-%{version}-root
225 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
226 Group: Networking/Filesystems
227 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
228 %if 0%{?fedora} >= 15
229 BuildRequires: systemd-units
231 BuildRequires: perl-devel perl-ExtUtils-Embed
233 BuildRequires: krb5-devel
235 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
237 # http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
238 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
239 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
240 %define srcdir openafs-%{afsvers}
242 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
243 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
245 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2011-08-14
247 Source30: openafs-kernel-version.sh
248 Source996: openafs-kvers-is.sh
249 Source997: openafs-buildfedora.pl
250 Source998: openafs-buildall.sh
251 Source999: openafs-kmodtool
254 The AFS distributed filesystem. AFS is a distributed filesystem
255 allowing cross-platform sharing of files among multiple computers.
256 Facilities are provided for access control, authentication, backup and
257 administrative management.
259 This package provides common files shared across all the various
260 OpenAFS packages but are not necessarily tied to a client or server.
262 The OpenAFS SRPM can be rebuilt with the following options to control
265 --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version
266 to build modules against. The default is
267 to build against the currently-running
269 --define "kbase /lib/modules/" The base location to look for kernel headers
270 --define "kend /build" The 'end' location to look for kernels
271 The build will define ksrvdir as
272 %%{kbase}<kernvers>%%{kend}
274 --without krb5 Disable krb5 support (default: with krb5)
275 --with bitmap-later Enable "bitmap later" support
276 --with bos-restricted Enable "bos restricted" mode
277 --with largefiles Enable "largefile fileserver" mode
278 --with supergroups Enable "supergroups"
280 --target=i386 The target architecture to build for.
281 When building for a non-default target
282 the build may choose whether to build
283 userspace or kernel modules automatically.
284 The defaults are probably what you want.
286 --define "build_userspace 1" Request building of userspace tools
287 --define "build_modules 1" Request building of kernel modules
288 You probably never need to specify these.
290 --define "kmoddir /lib/modules" This is the base location where modules
291 will be installed. You probably don't
292 need to change this ever.
294 --define "fedorakmod 0" Disable the building of 'Fedora' style kernel
295 modules, and use the old format.
297 --define "kvariants <variants>" When building Fedora style kernel modules,
298 this defines the set of kernel variants
300 <variants> is a space seperated list which
301 may contain one or more of
302 '' (for the generic kernel), smp, PAE, xen
305 To a kernel module for your running kernel, just run:
306 rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
308 ##############################################################################
310 # build the userspace side of things if so requested
312 ##############################################################################
313 %if %{build_userspace}
316 Requires: binutils, openafs = %{version}
317 %if 0%{?fedora} >= 15
318 Requires: systemd-units
319 Requires(post): systemd-units, systemd-sysv
320 Requires(preun): systemd-units
321 Requires(postun): systemd-units
325 Requires: %{name}-kmod >= %{version}
326 Provides: %{name}-kmod-common = %{version}
328 Requires: openafs-kernel
331 Summary: OpenAFS Filesystem Client
332 Group: Networking/Filesystem
335 The AFS distributed filesystem. AFS is a distributed filesystem
336 allowing cross-platform sharing of files among multiple computers.
337 Facilities are provided for access control, authentication, backup and
338 administrative management.
340 This package provides basic client support to mount and manipulate
344 Requires: openafs = %{version}
345 Summary: OpenAFS Filesystem Server
346 Group: Networking/Filesystems
347 %if 0%{?fedora} >= 15
348 Requires: systemd-units
349 Requires(post): systemd-units, systemd-sysv
350 Requires(preun): systemd-units
351 Requires(postun): systemd-units
355 The AFS distributed filesystem. AFS is a distributed filesystem
356 allowing cross-platform sharing of files among multiple computers.
357 Facilities are provided for access control, authentication, backup and
358 administrative management.
360 This package provides basic server support to host files in an AFS
364 %package -n dkms-%{name}
365 Summary: DKMS-ready kernel source for AFS distributed filesystem
366 Group: Development/Kernel
367 Provides: openafs-kernel = %{version}
369 Provides: %{name}-kmod = %{version}
374 Requires: %{name}-kmod-common = %{version}
376 %description -n dkms-%{name}
377 The AFS distributed filesystem. AFS is a distributed filesystem
378 allowing cross-platform sharing of files among multiple computers.
379 Facilities are provided for access control, authentication, backup and
380 administrative management.
382 This package provides the source code to allow DKMS to build an
386 %if %{build_authlibs}
388 Summary: OpenAFS authentication shared libraries
389 Group: Networking/Filesystems
391 %description authlibs
392 The AFS distributed filesystem. AFS is a distributed filesystem
393 allowing cross-platform sharing of files among multiple computers.
394 Facilities are provided for access control, authentication, backup and
395 administrative management.
397 This package provides a shared version of libafsrpc and libafsauthent.
398 None of the programs included with OpenAFS currently use these shared
399 libraries; however, third-party software that wishes to perform AFS
400 authentication may link against them.
403 %package authlibs-devel
404 %if %{build_authlibs}
405 Requires: openafs-authlibs = %{version}-%{release}
407 Requires: openafs-devel = %{version}-%{release}
408 Summary: OpenAFS shared library development
409 Group: Development/Filesystems
411 %description authlibs-devel
412 The AFS distributed filesystem. AFS is a distributed filesystem
413 allowing cross-platform sharing of files among multiple computers.
414 Facilities are provided for access control, authentication, backup and
415 administrative management.
417 This package includes the static versions of libafsrpc and
418 libafsauthent, and symlinks required for building against the dynamic
422 Summary: OpenAFS Development Libraries and Headers
423 Group: Development/Filesystems
424 Requires: openafs = %{version}-%{release}
427 The AFS distributed filesystem. AFS is a distributed filesystem
428 allowing cross-platform sharing of files among multiple computers.
429 Facilities are provided for access control, authentication, backup and
430 administrative management.
432 This package provides static development libraries and headers needed
433 to compile AFS applications. Note: AFS currently does not provide
437 Summary: OpenAFS user and administrator documentation
438 Requires: openafs = %{version}-%{release}
439 Group: Networking/Filesystems
442 The AFS distributed filesystem. AFS is a distributed filesystem
443 allowing cross-platform sharing of files among multiple computers.
444 Facilities are provided for access control, authentication, backup and
445 administrative management.
447 This package provides HTML documentation for OpenAFS users and system
450 %package kernel-source
451 Summary: OpenAFS Kernel Module source tree
452 Group: Networking/Filesystems
453 Provides: openafs-kernel = %{version}
455 Provides: %{name}-kmod = %{version}
458 %description kernel-source
459 The AFS distributed filesystem. AFS is a distributed filesystem
460 allowing cross-platform sharing of files among multiple computers.
461 Facilities are provided for access control, authentication, backup and
462 administrative management.
464 This package provides the source code to build your own AFS kernel
468 Summary: OpenAFS client compatibility symlinks
469 Requires: openafs = %{version}, openafs-client = %{version}
470 Group: Networking/Filesystems
471 Obsoletes: openafs-client-compat
474 The AFS distributed filesystem. AFS is a distributed filesystem
475 allowing cross-platform sharing of files among multiple computers.
476 Facilities are provided for access control, authentication, backup and
477 administrative management.
479 This package provides compatibility symlinks in /usr/afsws. It is
480 completely optional, and is only necessary to support legacy
481 applications and scripts that hard-code the location of AFS client
485 Summary: OpenAFS KA kpasswd support
487 Group: Networking/Filesystems
490 The AFS distributed filesystem. AFS is a distributed filesystem
491 allowing cross-platform sharing of files among multiple computers.
492 Facilities are provided for access control, authentication, backup and
493 administrative management.
495 This package provides the compatibility symlink for kpasswd, in case
496 you are using KAserver instead of Krb5.
500 Summary: OpenAFS programs to use with krb5
501 Requires: openafs = %{version}
502 Group: Networking/Filesystems
503 BuildRequires: krb5-devel
506 The AFS distributed filesystem. AFS is a distributed filesystem
507 allowing cross-platform sharing of files among multiple computers.
508 Facilities are provided for access control, authentication, backup and
509 administrative management.
511 This package provides compatibility programs so you can use krb5
512 to authenticate to AFS services, instead of using AFS's homegrown
513 krb4 lookalike services.
518 ##############################################################################
520 # build the kernel modules if so requested
522 ##############################################################################
526 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
530 # Legacy kernel compilation code here ...
531 %define modkversion %(echo %{kernvers} | cut -d- -f1)
532 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
533 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
537 Summary: OpenAFS Kernel Module (compiled for UP)
538 Release: %{modpkgrel}
539 Group: Networking/Filesystems
540 Provides: openafs-kernel = %{version}
542 Requires: kernel-%{_target_cpu} = %{kversion}
544 Requires: /boot/config-%{kernvers}
548 The AFS distributed filesystem. AFS is a distributed filesystem
549 allowing cross-platform sharing of files among multiple computers.
550 Facilities are provided for access control, authentication, backup and
551 administrative management.
553 This package provides a precompiled AFS kernel module for %{kernvers}.
558 Summary: OpenAFS Kernel Module (compiled for SMP)
559 Release: %{modpkgrel}
560 Provides: openafs-kernel = %{version}
562 Requires: kernel-smp-%{_target_cpu} = %{kversion}
564 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
566 Group: Networking/Filesystems
568 %description kernel-smp
569 The AFS distributed filesystem. AFS is a distributed filesystem
570 allowing cross-platform sharing of files among multiple computers.
571 Facilities are provided for access control, authentication, backup and
572 administrative management.
574 This package provides a precompiled AFS kernel module for %{kernvers}.
577 %if %{largesmp_package}
578 %package kernel-largesmp
579 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
580 Release: %{modpkgrel}
581 Provides: openafs-kernel = %{version}
583 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
585 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
587 Group: Networking/Filesystems
589 %description kernel-largesmp
590 The AFS distributed filesystem. AFS is a distributed filesystem
591 allowing cross-platform sharing of files among multiple computers.
592 Facilities are provided for access control, authentication, backup and
593 administrative management.
595 This package provides a precompiled AFS kernel module for %{kernvers}.
598 %if %{bigmem_package}
599 %package kernel-bigmem
600 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
601 Release: %{modpkgrel}
602 Provides: openafs-kernel = %{version}
604 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
606 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
608 Group: Networking/Filesystems
610 %description kernel-bigmem
611 The AFS distributed filesystem. AFS is a distributed filesystem
612 allowing cross-platform sharing of files among multiple computers.
613 Facilities are provided for access control, authentication, backup and
614 administrative management.
616 This package provides a precompiled AFS kernel module for %{kernvers}.
619 %if %{hugemem_package}
620 %package kernel-hugemem
621 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
622 Release: %{modpkgrel}
623 Provides: openafs-kernel = %{version}
625 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
627 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
629 Group: Networking/Filesystems
631 %description kernel-hugemem
632 The AFS distributed filesystem. AFS is a distributed filesystem
633 allowing cross-platform sharing of files among multiple computers.
634 Facilities are provided for access control, authentication, backup and
635 administrative management.
637 This package provides a precompiled AFS kernel module for %{kernvers}.
641 # End legacy kernel compilation code ...
644 ##############################################################################
648 ##############################################################################
652 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
654 : @@@ kernel version: %{kernvers}
656 : @@@ kernel variations: %{kvariants}
658 : @@@ base kernel version:%{kversion}
659 : @@@ kernel modules dir: %{kxmoddir}
660 : @@@ kernel source dir: %{ksrcdir}
662 : @@@ kernel variations: %{kvariations}
665 : @@@ kernel type: up
667 : @@@ kernel type: %{ktype}
671 : @@@ PAM modules dir: %{pamdir}
672 : @@@ build userspace: %{build_userspace}
673 : @@@ build modules: %{build_modules}
675 : @@@ target cpu: %{_target_cpu}
677 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
679 # Install OpenAFS src and doc
680 #%setup -q -n %{srcdir}
681 %setup -q -b 1 -n %{srcdir}
683 ##############################################################################
687 ##############################################################################
698 echo "I don't know how to build linux-`expr %{kernvers} : '\(^[0-9]*[.][0-9]*\)'`"
704 x86_64) sysname=amd64_linux${kv} ;;
705 alpha*) sysname=alpha_linux_${kv} ;;
706 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
707 *) sysname=%{_arch}_linux${kv} ;;
711 archlist="i386 i586 i686 athlon"
712 %if %{bootkernelsupport}
713 archlist="${archlist} BOOT"
720 # PrintDefine var value statements file
725 echo "#ifndef $1" >> $4
730 echo "#undef $1" >> $4
735 echo "#define $1 $2" >> $4
745 echo "#include $1" >> $4
755 # PrintRedhatKernelFix arch mp file
756 PrintRedhatKernelFix() {
770 largesmp) largesmp=1;;
774 echo "$2 not supported"
783 PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
785 PrintDefine __BOOT_KERNEL_ENTERPRISE $ent und,def,nl $file
786 PrintDefine __BOOT_KERNEL_BIGMEM $bigmem und,def,nl $file
787 PrintDefine __BOOT_KERNEL_HUGEMEM $hugemem und,def,nl $file
788 PrintDefine __BOOT_KERNEL_SMP $smp und,def,nl $file
789 PrintDefine __BOOT_KERNEL_LARGESMP $largesmp und,def,nl $file
790 PrintDefine __BOOT_KERNEL_UP $up und,def,nl $file
791 PrintDefine __BOOT_KERNEL_BOOT $boot und,def,nl $file
792 PrintDefine __BOOT_KERNEL_BOOTSMP $bootsmp und,def,nl $file
794 PrintDefine '"/boot/kernel.h"' "" inc,nl $file # include file
796 for ar in $archlist ; do
797 if [ "$ar" = "$arch" ]; then
798 PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
800 PrintDefine "__MODULE_KERNEL_$ar" "" und $file # undef
805 PrintDefine "" "" end $file
807 if [ %{debugspec} = 1 ] ; then
808 echo "Kernel Configuration File for Red Hat kernels:"
813 config_opts="--enable-redhat-buildsys \
814 %{?_with_bitmap_later:--enable-bitmap-later} \
815 %{?_with_bos_restricted:--enable-bos-restricted-mode} \
816 %{?_with_largefiles:--enable-largefile-fileserver} \
817 %{?_with_supergroups:--enable-supergroups} \
818 --enable-transarc-paths"
822 # If we're using Fedora kmods, work out which is the best kernel module to
823 # use for the userland configuration step. If no variants have been specified,
824 # then use the standard kernel. If variants are specified, use the standard kernel
825 # if it's listed, otherwise pick the first listed kernel.
828 for kvariant in %{kvariants} ; do
829 if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
830 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
831 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
833 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
838 if [ -z "$ksrc" ] ; then
842 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
845 %if %{?krb5config:1}%{!?krb5config:0}
846 KRB5_CONFIG="%{krb5config}"
851 ./configure --with-afs-sysname=${sysname} \
852 --prefix=%{_prefix} \
853 --libdir=%{_libdir} \
854 --bindir=%{_bindir} \
855 --sbindir=%{_sbindir} \
856 --disable-strip-binaries \
858 --with-linux-kernel-packaging \
860 --with-linux-kernel-headers=${ksrc} \
868 # Build the libafs tree
869 make only_libafs_tree || exit 1
871 # Configure each of our kernel modules
873 %if %{fedorakmod} && %{build_modules}
874 for kvariant in %{kvariants} ; do
875 if [ -n "${kvariant}" ] ; then
876 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
877 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
879 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
882 cp -R libafs_tree _kmod_build_${kvariant}
883 pushd _kmod_build_${kvariant}
884 ./configure --with-afs-sysname=${sysname} \
885 --prefix=%{_prefix} \
886 --libdir=%{_libdir} \
887 --bindir=%{_bindir} \
888 --sbindir=%{_sbindir} \
889 --with-linux-kernel-packaging \
890 --with-linux-kernel-headers=${ksrc} \
891 --enable-disconnected \
893 --with-krb5-conf=/usr/kerberos/bin/krb5-config \
902 %if %{build_userspace}
903 # Build the user-space AFS stuff
904 make dest_nolibafs || exit 1
909 for kvariant in %{kvariants}
911 if [ -n "${kvariant}" ] ; then
912 pushd _kmod_build_$kvariant;
916 make dest_only_libafs
921 # Begin legacy kernel module building code
924 # Build all the kernel modules for linux 2.4.x
925 for variation in %{kvariations}
927 if [ ${variation} = up ]
929 local_smp_def=-DREDHAT_FIX
932 local_smp_def="-DAFS_SMP -DREDHAT_FIX"
936 PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
937 make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
938 LINUX_MODULE_NAME="${suffix}" MPS=SP
941 rm -f src/config/redhat-fix.h
943 %elseif %{kvers_is_26}
944 # Build the kernel module for this version of linux 2.6.x
945 # Notice how much easier this is than 2.4. On the other hand,
946 # we require much more external support to build multiple modules.
948 # the MPS=SP just means that we don't add a '.mp' to the name.
949 make dest_only_libafs MPS=SP
952 # End legacy kernel module building code
957 ##############################################################################
961 ##############################################################################
964 export DONT_GPRINTIFY=1
966 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
978 echo "I don't know how to build linux-`expr %{kernvers} : '\(^[0-9]*[.][0-9]*\)'`"
984 x86_64) sysname=amd64_linux${kv} ;;
985 alpha*) sysname=alpha_linux_${kv} ;;
986 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
987 *) sysname=%{_arch}_linux${kv} ;;
991 %if %{build_userspace}
992 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
993 mkdir -p $RPM_BUILD_ROOT%{_libdir}
994 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
996 mkdir -p $RPM_BUILD_ROOT%{initdir}
998 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
999 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
1001 mkdir -p $RPM_BUILD_ROOT/etc/openafs
1002 mkdir -p $RPM_BUILD_ROOT%{pamdir}
1003 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
1004 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
1005 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1006 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1007 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1008 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1010 # Copy files from dest to the appropriate places in BuildRoot
1011 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1012 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1013 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1014 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1015 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1017 # Set the executable bit on libraries in libdir, so rpmbuild knows to
1018 # create "Provides" entries in the package metadata for the libraries
1019 chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
1021 # Fix the location of restorevol, since it should be available for
1022 # any user in /usr/bin
1023 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1025 # Link kpasswd to kapasswd
1026 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1028 # Copy root.client config files
1029 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1030 %if 0%{?fedora} < 15
1031 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1032 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1034 install -m 755 src/packaging/RedHat/openafs-client.service $RPM_BUILD_ROOT%{_unitdir}/openafs-client.service
1035 install -m 755 src/packaging/RedHat/openafs-client.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/openafs-client.modules
1036 install -m 755 src/packaging/RedHat/openafs-server.service $RPM_BUILD_ROOT%{_unitdir}/openafs-server.service
1040 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1043 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1044 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1046 # Populate /usr/vice/etc
1047 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1048 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1049 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1050 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1053 # install dkms source
1055 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1056 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1058 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1060 PACKAGE_VERSION="%{dkms_version}"
1062 # Items below here should not have to change with each driver version
1063 PACKAGE_NAME="%{name}"
1064 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"
1065 CLEAN="make -C src/libafs clean"
1067 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1068 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1075 # install kernel-source
1078 # Install the kernel module source tree
1079 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1080 tar cf - -C libafs_tree . | \
1081 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1083 # Next, copy the LICENSE Files, README
1084 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1085 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1086 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1089 # Install DOCUMENTATION
1092 # Build the DOC directory
1093 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1094 tar cf - -C doc LICENSE html pdf | \
1095 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1096 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1097 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1102 tar cf - -C doc/man-pages man1 man5 man8 | \
1103 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1105 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1107 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1109 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1112 # remove unused man pages
1113 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1114 dkload knfs package runntp symlink symlink_list symlink_make \
1116 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1119 # rename kpasswd to kapasswd
1120 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1123 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1125 # create list of man pages that go in the 'openafs' package
1126 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1127 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|^xstat|udebug|unlog|^uss|^vos' \
1128 |egrep -v '^afs_compile_et' \
1131 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1132 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1135 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1136 |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1142 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1143 %{_bindir}/afsmonitor
1150 %{_bindir}/pagsh.krb
1152 %{_bindir}/restorevol
1156 %{_bindir}/tokens.krb
1157 %{_bindir}/translate_et
1158 %{_bindir}/xstat_cm_test
1159 %{_bindir}/xstat_fs_test
1167 %{_sbindir}/read_tape
1172 EOF-openafs-file-list
1174 # add man pages to the list
1175 cat openafs-man1files \
1176 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1178 cat openafs-man5files \
1179 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1181 cat openafs-man8files \
1182 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1186 # Install compatiblity links
1188 for d in bin:bin etc:sbin; do
1189 olddir=`echo $d | sed 's/:.*$//'`
1190 newdir=`echo $d | sed 's/^.*://'`
1191 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1192 for f in `cat openafs-file-list`; do
1193 if echo $f | grep -q /$newdir/; then
1195 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1201 # Remove files we're not installing
1204 # remove duplicated files from /usr/afs/bin
1205 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1206 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1209 # the rest are not needed.
1210 for f in dlog dpass install knfs livesys ; do
1211 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1214 # not supported on Linux or duplicated
1215 for f in kdb rmtsysd kpwvalid ; do
1216 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1218 # sometimes install sucks and puts down a directory. kill it all.
1219 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1221 # remove man pages from programs deleted above
1222 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
1223 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1226 # PAM modules are doubly-installed Remove the version we don't need
1227 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1228 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1231 %if !%{build_authlibs}
1232 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1233 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1234 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1235 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1240 %if %{build_modules}
1242 for kvariant in %{kvariants}
1244 if [ -n "$kvariant" ] ; then
1245 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1246 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1247 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1249 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1250 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1253 if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1254 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1255 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1257 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1258 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1263 install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1266 # Install the kernel modules
1267 for variation in %{kvariations}
1269 if [ ${variation} = up ]
1272 modname=openafs${kmodend}
1274 kvar=%{kxmoddir}${variation}
1275 modname=openafs${kmodend}
1278 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1279 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1283 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1288 ##############################################################################
1292 ##############################################################################
1294 rm -f openafs-file-list
1295 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1296 rm -fr $RPM_BUILD_ROOT
1299 ##############################################################################
1303 ##############################################################################
1304 %if %{build_userspace}
1307 if [ -e %{_prefix}/afsws ]; then
1308 /bin/rm -fr %{_prefix}/afsws
1312 %if 0%{?fedora} < 15
1313 chkconfig --add openafs-client
1315 if [ $1 -eq 1 ] ; then
1316 # Initial installation
1317 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1320 if [ ! -d /afs ]; then
1322 chown root.root /afs
1324 [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1327 # Create the CellServDB
1328 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1330 ( cd /usr/vice/etc ; \
1331 cat CellServDB.local CellServDB.dist > CellServDB ; \
1332 chmod 644 CellServDB )
1335 #on an upgrade, don't enable if we were disabled
1336 %if 0%{?fedora} < 15
1337 if [ $1 = 1 ] ; then
1338 chkconfig --add openafs-server
1340 %{initdir}/openafs-server condrestart
1342 if [ $1 -eq 1 ] ; then
1343 # Initial installation
1344 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1348 %if %{build_authlibs}
1357 if [ $1 = 0 ] ; then
1358 [ -d /afs ] && rmdir /afs
1362 %if 0%{?fedora} < 15
1363 if [ $1 = 0 ] ; then
1364 %{initdir}/openafs-client stop
1365 chkconfig --del openafs-client
1368 if [ $1 -eq 0 ] ; then
1369 # Package removal, not upgrade
1370 /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || :
1371 /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || :
1376 %if 0%{?fedora} < 15
1377 if [ $1 = 0 ] ; then
1378 %{initdir}/openafs-server stop
1379 chkconfig --del openafs-server
1382 if [ $1 -eq 0 ] ; then
1383 /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || :
1384 /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || :
1388 %if 0%{?fedora} >= 15
1390 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1393 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1396 %if %{build_dkmspkg}
1397 %post -n dkms-%{name}
1398 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1399 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1400 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1402 %preun -n dkms-%{name}
1403 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1407 %if %{build_modules}
1411 /sbin/depmod -ae %{kernvers}
1414 /sbin/depmod -ae %{kernvers}
1420 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1423 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1426 %if %{largesmp_package}
1427 %post kernel-largesmp
1428 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1430 %postun kernel-largesmp
1431 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1434 %if %{bigmem_package}
1436 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1438 %postun kernel-bigmem
1439 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1442 %if %{hugemem_package}
1443 %post kernel-hugemem
1444 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1446 %postun kernel-hugemem
1447 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1452 %if 0%{?fedora} >= 15
1453 %triggerun -- openafs-client < 1.6.0-1
1454 # Save the current service runlevel info
1455 # User must manually run systemd-sysv-convert --apply httpd
1456 # to migrate them to systemd targets
1457 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||:
1459 # Run this because the SysV package being removed won't do it
1460 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || :
1462 %triggerun -- openafs-server < 1.6.0-1
1463 # Save the current service runlevel info
1464 # User must manually run systemd-sysv-convert --apply httpd
1465 # to migrate them to systemd targets
1466 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||:
1468 # Run this because the SysV package being removed won't do it
1469 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || :
1472 ##############################################################################
1476 ##############################################################################
1477 %if %{build_userspace}
1479 %files -f openafs-file-list
1480 %defattr(-,root,root)
1481 %config /etc/sysconfig/openafs
1482 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1483 %{_libdir}/libafshcrypto.so.*
1484 %{_libdir}/librokenafs.so.*
1487 %defattr(-,root,root)
1488 %docdir %{_docdir}/openafs-%{afsvers}
1489 %dir %{_docdir}/openafs-%{afsvers}
1490 %{_docdir}/openafs-%{afsvers}/ChangeLog
1491 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1492 %{_docdir}/openafs-%{afsvers}/pdf
1495 %defattr(-,root,root)
1496 %dir %{_prefix}/vice
1497 %dir %{_prefix}/vice/cache
1498 %dir %{_prefix}/vice/etc
1499 %dir %{_prefix}/vice/etc/C
1500 %{_prefix}/vice/etc/CellServDB.dist
1501 %config %{_prefix}/vice/etc/ThisCell
1502 %config %{_prefix}/vice/etc/cacheinfo
1506 %{_prefix}/vice/etc/afsd
1507 %{_prefix}/vice/etc/C/afszcm.cat
1508 %{pamdir}/pam_afs.krb.so.1
1509 %{pamdir}/pam_afs.krb.so
1510 %{pamdir}/pam_afs.so.1
1511 %{pamdir}/pam_afs.so
1512 %if 0%{?fedora} < 15
1513 %{initdir}/openafs-client
1515 %{_unitdir}/openafs-client.service
1516 %{_sysconfdir}/sysconfig/modules/openafs-client.modules
1518 %{_mandir}/man1/cmdebug.*
1519 %{_mandir}/man1/copyauth.*
1520 %{_mandir}/man1/up.*
1521 %{_mandir}/man5/afs.5.gz
1522 %{_mandir}/man5/afs_cache.5.gz
1523 %{_mandir}/man5/afs_volume_header.5.gz
1524 %{_mandir}/man5/afszcm.cat.5.gz
1525 %{_mandir}/man5/cacheinfo.*
1526 %{_mandir}/man8/afsd.*
1527 %{_mandir}/man8/rmtsysd.*
1528 %{_mandir}/man8/vsys.*
1529 %{_mandir}/man5/CellAlias.*
1532 %defattr(-,root,root)
1534 %dir %{_prefix}/afs/bin
1535 %dir %{_prefix}/afs/etc
1536 %dir %{_prefix}/afs/logs
1537 %{_prefix}/afs/bin/bosserver
1538 %{_prefix}/afs/bin/bos_util
1539 %{_prefix}/afs/bin/buserver
1540 %{_prefix}/afs/bin/dafileserver
1541 %{_prefix}/afs/bin/dafssync-debug
1542 %{_prefix}/afs/bin/dasalvager
1543 %{_prefix}/afs/bin/davolserver
1544 %{_prefix}/afs/bin/fileserver
1545 %{_prefix}/afs/bin/fssync-debug
1546 # Should we support KAServer?
1547 %{_prefix}/afs/bin/kaserver
1548 %{_prefix}/afs/bin/ka-forwarder
1549 %{_prefix}/afs/bin/pt_util
1550 %{_prefix}/afs/bin/ptserver
1551 %{_prefix}/afs/bin/salvager
1552 %{_prefix}/afs/bin/salvageserver
1553 %{_prefix}/afs/bin/salvsync-debug
1554 %{_prefix}/afs/bin/state_analyzer
1555 %{_prefix}/afs/bin/upclient
1556 %{_prefix}/afs/bin/upserver
1557 %{_prefix}/afs/bin/vlserver
1558 %{_prefix}/afs/bin/volinfo
1559 %{_prefix}/afs/bin/volserver
1560 %{_sbindir}/kadb_check
1561 %{_sbindir}/prdb_check
1562 %{_sbindir}/vldb_check
1563 %{_sbindir}/vldb_convert
1565 %if 0%{?fedora} < 15
1566 %{initdir}/openafs-server
1568 %{_unitdir}/openafs-server.service
1570 %{_mandir}/man5/AuthLog.*
1571 %{_mandir}/man5/BackupLog.*
1572 %{_mandir}/man5/BosConfig.*
1573 %{_mandir}/man5/BosLog.*
1574 %{_mandir}/man5/FORCESALVAGE.*
1575 %{_mandir}/man5/FileLog.*
1576 %{_mandir}/man5/KeyFile.*
1577 %{_mandir}/man5/NetInfo.*
1578 %{_mandir}/man5/NetRestrict.*
1579 %{_mandir}/man5/NoAuth.*
1580 %{_mandir}/man5/SALVAGE.fs.*
1581 %{_mandir}/man5/SalvageLog.*
1582 %{_mandir}/man5/sysid.*
1583 %{_mandir}/man5/UserList.*
1584 %{_mandir}/man5/VLLog.*
1585 %{_mandir}/man5/VolserLog.*
1586 %{_mandir}/man5/bdb.DB0.*
1587 %{_mandir}/man5/fms.log.*
1588 %{_mandir}/man5/kaserver.DB0.*
1589 %{_mandir}/man5/kaserverauxdb.*
1590 %{_mandir}/man5/krb.conf.*
1591 %{_mandir}/man5/krb.excl.*
1592 %{_mandir}/man5/prdb.DB0.*
1593 %{_mandir}/man5/salvage.lock.*
1594 %{_mandir}/man5/tapeconfig.*
1595 %{_mandir}/man5/vldb.DB0.*
1596 %{_mandir}/man8/buserver.*
1597 %{_mandir}/man8/fileserver.*
1598 %{_mandir}/man8/dafileserver.*
1599 %{_mandir}/man8/dasalvager.*
1600 %{_mandir}/man8/davolserver.*
1601 %{_mandir}/man8/kadb_check.*
1602 %{_mandir}/man8/ka-forwarder.*
1603 %{_mandir}/man8/prdb_check.*
1604 %{_mandir}/man8/ptserver.*
1605 %{_mandir}/man8/pt_util.*
1606 %{_mandir}/man8/salvager.*
1607 %{_mandir}/man8/salvageserver.*
1608 %{_mandir}/man8/state_analyzer.*
1609 %{_mandir}/man8/upclient.*
1610 %{_mandir}/man8/upserver.*
1611 %{_mandir}/man8/vldb_check.*
1612 %{_mandir}/man8/vldb_convert.*
1613 %{_mandir}/man8/vlserver.*
1614 %{_mandir}/man8/voldump.*
1615 %{_mandir}/man8/volinfo.*
1616 %{_mandir}/man8/volserver.*
1618 %if %{build_authlibs}
1620 %defattr(-,root,root)
1621 %{_libdir}/libafsauthent.so.*
1622 %{_libdir}/libafsrpc.so.*
1623 %{_libdir}/libkopenafs.so.*
1626 %files authlibs-devel
1627 %defattr(-,root,root)
1628 %{_includedir}/kopenafs.h
1629 %{_libdir}/libafsauthent.a
1630 %{_libdir}/libafscp.a
1631 %{_libdir}/libafsrpc.a
1632 %{_libdir}/libafsauthent_pic.a
1633 %{_libdir}/libafsrpc_pic.a
1634 %{_libdir}/libkopenafs.a
1635 %if %{build_authlibs}
1636 %{_libdir}/libafsauthent.so
1637 %{_libdir}/libafsrpc.so
1638 %{_libdir}/libkopenafs.so
1642 %defattr(-,root,root)
1643 %{_bindir}/afs_compile_et
1646 %{_includedir}/lock.h
1647 %{_includedir}/lwp.h
1648 %{_includedir}/preempt.h
1650 %{_includedir}/timer.h
1651 %{_includedir}/ubik.h
1652 %{_includedir}/ubik_int.h
1654 %{_libdir}/libafshcrypto.a
1655 %{_libdir}/libafshcrypto.so
1658 %{_libdir}/librokenafs.a
1659 %{_libdir}/librokenafs.so
1661 %{_libdir}/librxkad.a
1662 %{_libdir}/librxstat.a
1663 %{_libdir}/libubik.a
1664 %{_libdir}/libubik_pthread.a
1665 %{_mandir}/man1/rxgen.*
1666 %{_mandir}/man1/afs_compile_et.*
1668 %if %{build_dkmspkg}
1669 %files -n dkms-%{name}
1670 %defattr(-,root,root)
1671 %{_prefix}/src/%{name}-%{dkms_version}
1674 %files kernel-source
1675 %defattr(-,root,root)
1676 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1677 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1678 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1679 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1682 %defattr(-,root,root)
1686 %defattr(-,root,root)
1692 %defattr(-,root,root)
1694 %{_bindir}/klog.krb5
1696 %{_mandir}/man1/aklog.*
1697 %{_mandir}/man8/asetkey.*
1702 %if %{build_modules}
1707 %defattr(-,root,root)
1708 %{kxmoddir}/fs/openafs/openafs.*
1713 %defattr(-,root,root)
1714 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1717 %if %{largesmp_package}
1718 %files kernel-largesmp
1719 %defattr(-,root,root)
1720 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1723 %if %{bigmem_package}
1724 %files kernel-bigmem
1725 %defattr(-,root,root)
1726 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1729 %if %{hugemem_package}
1730 %files kernel-hugemem
1731 %defattr(-,root,root)
1732 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1738 ##############################################################################
1740 ### openafs.spec change log
1742 ##############################################################################
1744 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1745 - Make the RPM mockable
1747 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1748 - Update to match the shipped 1.4.5 RPMS
1749 - Fix the kvariant stuff to only configure the 'standard' case once
1750 - Add openafs-kvers.sh back in
1752 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1753 - Use Fedora style kmods, which allows us to install multiple kernel types
1755 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1756 - Use distributed files, rather than those in packager's SOURCE directory
1757 - Remove SuidCells stuff, which was unused
1759 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1760 - integrate s390x changes
1761 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1762 that won't build the .so files.
1764 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1766 - use installed aklog manpage.
1767 - moduleparam patch obsoleted.
1769 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1770 - update to 1.4.2-rc1
1771 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1772 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1773 - don't need the posixlock patch anymore.
1775 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1776 - update to 1.4.2-beta2
1777 - add linux2.4 posixlock API patch
1779 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1780 - moduleparam and krb524 patches no longer required in OA-CVS
1782 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1783 - change non-target-cpu kernel dep to a file dep
1784 - make sure we use the proper kernel version for the dependency.
1786 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1787 - allow users to specify local CellServDB and SuidCells entries
1788 don't overwrite user's changes. Provide a .dist an let users
1789 make entries in a ".local"
1790 - build the CellServDB and SuidCells at client startup and at
1792 - add provideskernelarch functionality to openafs-kvers-is.sh
1793 - use that functionality to Require kernel{,-<type>}-targetcpu
1794 to get better package safety due to RPM bugs where the kernel
1795 release isn't used so you can install the kernel module against
1796 any kernel of the same major version.
1798 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1799 - update the README in openafs-kernel-source
1800 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1801 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1803 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1804 - build requires autoconf and automake for krb5support
1805 and autoconf for standard package
1806 - dont setup the krb5 migration kit (or patches) if we don't care.
1807 - require ncurses-devel to build
1809 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1810 - look for krb524 functions in libkrb524 if we can't find them
1811 in the standard locations.
1813 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1814 - fix the module_param_array macro for Linux 2.6.9.
1816 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1817 - update to 1.4.1 release.
1818 - distribute asetkey from openafs instead of krb5-migration kit
1819 - don't need to apply the FC5 patches because they are part of the distro.
1820 - install asetkey into the "proper" place
1821 - dont list a manpage twice.
1822 - package asetkey man page. delete it when not needed.
1824 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1825 - turn authlibs back on, because RT #18767 was applied to CVS.
1827 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1828 - update to 1.4.1rc10, build on FC5
1829 - fix the man pages (distribute into various packages)
1830 - include patches for FC5, RT #29112 and #29122
1832 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1833 - openafs-server shouldn't depend on the kernel module.
1835 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1836 - patch from Mike Polek <mike at pictage.com> to run depmod for
1837 the target kernel and not the running kernel.
1839 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1840 - build aklog from the openafs sources, not from the krb5 migration kit.
1842 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1843 - set openafs-kernel-source to Provide openafs-kernel
1845 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1846 - update afs-krb5 res_search patch: look for res_search and __res_search
1847 - update to 1.4.0 final
1849 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1850 - remove all kdump builds.
1852 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1853 - fix openafs-kernel-version.sh so it will build an RPM for the
1854 currently-running kernel even if it's smp on 2.6.
1856 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1857 - upgrade to 1.4.0rc5
1858 - turn off authlibs packages
1860 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1861 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1862 it's called "openafs" and not "libafs". This fixes the shutdown
1865 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1866 - update kversis script, add 'kvers' operation
1867 - fix bug that 2.6 smp/hugemem kernels don't provide
1868 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1869 - add patch to remove res_search from the afs-krb5 configure
1871 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1872 - Update to 1.4.0rc4
1873 - Update the afs-krb5 krb524 patch so it actually works on
1874 some older systems like RHEL3 that still need -lkrb524.
1875 - Update the buildall script so choose better architecture support,
1876 e.g. don't build i586 on RHEL.
1877 - Update the rebuild information in the SPEC file.
1878 - Add support for finding .EL kernels in openafs-kvers-is.sh
1879 - Add additional error messages when kernel version/type parsing fails.
1880 - Update the buildall script to use the kernel srcdir directly.
1882 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1883 - Add "hugemem" to 2.4 configs
1884 - Add checks to support scripts to determine whether to build
1885 the bigmem and/or hugemem kernels for 2.4.
1887 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1888 - Added some afs-krb5 patches to get the migration kit to build
1889 on modern AFS and modern Kerberos.
1890 - Added authlibs and authlibs-devel packages as per UMich changes.
1892 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1893 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1895 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1896 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1897 from Red Hat. Initial attempt at a release of 1.4. Still need
1898 to work in a 2.6 build system.