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, systemd-units
228 BuildRequires: perl-devel perl-ExtUtils-Embed
230 BuildRequires: krb5-devel
232 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
234 # http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
235 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
236 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
237 %define srcdir openafs-%{afsvers}
239 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
240 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
242 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2011-08-14
244 Source30: openafs-kernel-version.sh
245 Source996: openafs-kvers-is.sh
246 Source997: openafs-buildfedora.pl
247 Source998: openafs-buildall.sh
248 Source999: openafs-kmodtool
251 The AFS distributed filesystem. AFS is a distributed filesystem
252 allowing cross-platform sharing of files among multiple computers.
253 Facilities are provided for access control, authentication, backup and
254 administrative management.
256 This package provides common files shared across all the various
257 OpenAFS packages but are not necessarily tied to a client or server.
259 The OpenAFS SRPM can be rebuilt with the following options to control
262 --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version
263 to build modules against. The default is
264 to build against the currently-running
266 --define "kbase /lib/modules/" The base location to look for kernel headers
267 --define "kend /build" The 'end' location to look for kernels
268 The build will define ksrvdir as
269 %%{kbase}<kernvers>%%{kend}
271 --without krb5 Disable krb5 support (default: with krb5)
272 --with bitmap-later Enable "bitmap later" support
273 --with bos-restricted Enable "bos restricted" mode
274 --with largefiles Enable "largefile fileserver" mode
275 --with supergroups Enable "supergroups"
277 --target=i386 The target architecture to build for.
278 When building for a non-default target
279 the build may choose whether to build
280 userspace or kernel modules automatically.
281 The defaults are probably what you want.
283 --define "build_userspace 1" Request building of userspace tools
284 --define "build_modules 1" Request building of kernel modules
285 You probably never need to specify these.
287 --define "kmoddir /lib/modules" This is the base location where modules
288 will be installed. You probably don't
289 need to change this ever.
291 --define "fedorakmod 0" Disable the building of 'Fedora' style kernel
292 modules, and use the old format.
294 --define "kvariants <variants>" When building Fedora style kernel modules,
295 this defines the set of kernel variants
297 <variants> is a space seperated list which
298 may contain one or more of
299 '' (for the generic kernel), smp, PAE, xen
302 To a kernel module for your running kernel, just run:
303 rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
305 ##############################################################################
307 # build the userspace side of things if so requested
309 ##############################################################################
310 %if %{build_userspace}
313 Requires: binutils, openafs = %{version}
314 %if 0%{?fedora} >= 15
315 Requires: systemd-units
316 BuildRequires: systemd-units
317 Requires(post): systemd-units, systemd-sysv
318 Requires(preun): systemd-units
319 Requires(postun): systemd-units
323 Requires: %{name}-kmod >= %{version}
324 Provides: %{name}-kmod-common = %{version}
326 Requires: openafs-kernel
329 Summary: OpenAFS Filesystem Client
330 Group: Networking/Filesystem
333 The AFS distributed filesystem. AFS is a distributed filesystem
334 allowing cross-platform sharing of files among multiple computers.
335 Facilities are provided for access control, authentication, backup and
336 administrative management.
338 This package provides basic client support to mount and manipulate
342 Requires: openafs = %{version}
343 Summary: OpenAFS Filesystem Server
344 Group: Networking/Filesystems
345 %if 0%{?fedora} >= 15
346 Requires: systemd-units
347 BuildRequires: systemd-units
348 Requires(post): systemd-units, systemd-sysv
349 Requires(preun): systemd-units
350 Requires(postun): systemd-units
354 The AFS distributed filesystem. AFS is a distributed filesystem
355 allowing cross-platform sharing of files among multiple computers.
356 Facilities are provided for access control, authentication, backup and
357 administrative management.
359 This package provides basic server support to host files in an AFS
363 %package -n dkms-%{name}
364 Summary: DKMS-ready kernel source for AFS distributed filesystem
365 Group: Development/Kernel
366 Provides: openafs-kernel = %{version}
368 Provides: %{name}-kmod = %{version}
373 Requires: %{name}-kmod-common = %{version}
375 %description -n dkms-%{name}
376 The AFS distributed filesystem. AFS is a distributed filesystem
377 allowing cross-platform sharing of files among multiple computers.
378 Facilities are provided for access control, authentication, backup and
379 administrative management.
381 This package provides the source code to allow DKMS to build an
385 %if %{build_authlibs}
387 Summary: OpenAFS authentication shared libraries
388 Group: Networking/Filesystems
390 %description authlibs
391 The AFS distributed filesystem. AFS is a distributed filesystem
392 allowing cross-platform sharing of files among multiple computers.
393 Facilities are provided for access control, authentication, backup and
394 administrative management.
396 This package provides a shared version of libafsrpc and libafsauthent.
397 None of the programs included with OpenAFS currently use these shared
398 libraries; however, third-party software that wishes to perform AFS
399 authentication may link against them.
402 %package authlibs-devel
403 %if %{build_authlibs}
404 Requires: openafs-authlibs = %{version}-%{release}
406 Requires: openafs-devel = %{version}-%{release}
407 Summary: OpenAFS shared library development
408 Group: Development/Filesystems
410 %description authlibs-devel
411 The AFS distributed filesystem. AFS is a distributed filesystem
412 allowing cross-platform sharing of files among multiple computers.
413 Facilities are provided for access control, authentication, backup and
414 administrative management.
416 This package includes the static versions of libafsrpc and
417 libafsauthent, and symlinks required for building against the dynamic
421 Summary: OpenAFS Development Libraries and Headers
422 Group: Development/Filesystems
423 Requires: openafs = %{version}-%{release}
426 The AFS distributed filesystem. AFS is a distributed filesystem
427 allowing cross-platform sharing of files among multiple computers.
428 Facilities are provided for access control, authentication, backup and
429 administrative management.
431 This package provides static development libraries and headers needed
432 to compile AFS applications. Note: AFS currently does not provide
436 Summary: OpenAFS user and administrator documentation
437 Requires: openafs = %{version}-%{release}
438 Group: Networking/Filesystems
441 The AFS distributed filesystem. AFS is a distributed filesystem
442 allowing cross-platform sharing of files among multiple computers.
443 Facilities are provided for access control, authentication, backup and
444 administrative management.
446 This package provides HTML documentation for OpenAFS users and system
449 %package kernel-source
450 Summary: OpenAFS Kernel Module source tree
451 Group: Networking/Filesystems
452 Provides: openafs-kernel = %{version}
454 Provides: %{name}-kmod = %{version}
457 %description kernel-source
458 The AFS distributed filesystem. AFS is a distributed filesystem
459 allowing cross-platform sharing of files among multiple computers.
460 Facilities are provided for access control, authentication, backup and
461 administrative management.
463 This package provides the source code to build your own AFS kernel
467 Summary: OpenAFS client compatibility symlinks
468 Requires: openafs = %{version}, openafs-client = %{version}
469 Group: Networking/Filesystems
470 Obsoletes: openafs-client-compat
473 The AFS distributed filesystem. AFS is a distributed filesystem
474 allowing cross-platform sharing of files among multiple computers.
475 Facilities are provided for access control, authentication, backup and
476 administrative management.
478 This package provides compatibility symlinks in /usr/afsws. It is
479 completely optional, and is only necessary to support legacy
480 applications and scripts that hard-code the location of AFS client
484 Summary: OpenAFS KA kpasswd support
486 Group: Networking/Filesystems
489 The AFS distributed filesystem. AFS is a distributed filesystem
490 allowing cross-platform sharing of files among multiple computers.
491 Facilities are provided for access control, authentication, backup and
492 administrative management.
494 This package provides the compatibility symlink for kpasswd, in case
495 you are using KAserver instead of Krb5.
499 Summary: OpenAFS programs to use with krb5
500 Requires: openafs = %{version}
501 Group: Networking/Filesystems
502 BuildRequires: krb5-devel
505 The AFS distributed filesystem. AFS is a distributed filesystem
506 allowing cross-platform sharing of files among multiple computers.
507 Facilities are provided for access control, authentication, backup and
508 administrative management.
510 This package provides compatibility programs so you can use krb5
511 to authenticate to AFS services, instead of using AFS's homegrown
512 krb4 lookalike services.
517 ##############################################################################
519 # build the kernel modules if so requested
521 ##############################################################################
525 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
529 # Legacy kernel compilation code here ...
530 %define modkversion %(echo %{kernvers} | cut -d- -f1)
531 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
532 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
536 Summary: OpenAFS Kernel Module (compiled for UP)
537 Release: %{modpkgrel}
538 Group: Networking/Filesystems
539 Provides: openafs-kernel = %{version}
541 Requires: kernel-%{_target_cpu} = %{kversion}
543 Requires: /boot/config-%{kernvers}
547 The AFS distributed filesystem. AFS is a distributed filesystem
548 allowing cross-platform sharing of files among multiple computers.
549 Facilities are provided for access control, authentication, backup and
550 administrative management.
552 This package provides a precompiled AFS kernel module for %{kernvers}.
557 Summary: OpenAFS Kernel Module (compiled for SMP)
558 Release: %{modpkgrel}
559 Provides: openafs-kernel = %{version}
561 Requires: kernel-smp-%{_target_cpu} = %{kversion}
563 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
565 Group: Networking/Filesystems
567 %description kernel-smp
568 The AFS distributed filesystem. AFS is a distributed filesystem
569 allowing cross-platform sharing of files among multiple computers.
570 Facilities are provided for access control, authentication, backup and
571 administrative management.
573 This package provides a precompiled AFS kernel module for %{kernvers}.
576 %if %{largesmp_package}
577 %package kernel-largesmp
578 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
579 Release: %{modpkgrel}
580 Provides: openafs-kernel = %{version}
582 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
584 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
586 Group: Networking/Filesystems
588 %description kernel-largesmp
589 The AFS distributed filesystem. AFS is a distributed filesystem
590 allowing cross-platform sharing of files among multiple computers.
591 Facilities are provided for access control, authentication, backup and
592 administrative management.
594 This package provides a precompiled AFS kernel module for %{kernvers}.
597 %if %{bigmem_package}
598 %package kernel-bigmem
599 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
600 Release: %{modpkgrel}
601 Provides: openafs-kernel = %{version}
603 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
605 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
607 Group: Networking/Filesystems
609 %description kernel-bigmem
610 The AFS distributed filesystem. AFS is a distributed filesystem
611 allowing cross-platform sharing of files among multiple computers.
612 Facilities are provided for access control, authentication, backup and
613 administrative management.
615 This package provides a precompiled AFS kernel module for %{kernvers}.
618 %if %{hugemem_package}
619 %package kernel-hugemem
620 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
621 Release: %{modpkgrel}
622 Provides: openafs-kernel = %{version}
624 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
626 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
628 Group: Networking/Filesystems
630 %description kernel-hugemem
631 The AFS distributed filesystem. AFS is a distributed filesystem
632 allowing cross-platform sharing of files among multiple computers.
633 Facilities are provided for access control, authentication, backup and
634 administrative management.
636 This package provides a precompiled AFS kernel module for %{kernvers}.
640 # End legacy kernel compilation code ...
643 ##############################################################################
647 ##############################################################################
651 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
653 : @@@ kernel version: %{kernvers}
655 : @@@ kernel variations: %{kvariants}
657 : @@@ base kernel version:%{kversion}
658 : @@@ kernel modules dir: %{kxmoddir}
659 : @@@ kernel source dir: %{ksrcdir}
661 : @@@ kernel variations: %{kvariations}
664 : @@@ kernel type: up
666 : @@@ kernel type: %{ktype}
670 : @@@ PAM modules dir: %{pamdir}
671 : @@@ build userspace: %{build_userspace}
672 : @@@ build modules: %{build_modules}
674 : @@@ target cpu: %{_target_cpu}
676 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
678 # Install OpenAFS src and doc
679 #%setup -q -n %{srcdir}
680 %setup -q -b 1 -n %{srcdir}
682 ##############################################################################
686 ##############################################################################
697 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
703 x86_64) sysname=amd64_linux${kv} ;;
704 alpha*) sysname=alpha_linux_${kv} ;;
705 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
706 *) sysname=%{_arch}_linux${kv} ;;
710 archlist="i386 i586 i686 athlon"
711 %if %{bootkernelsupport}
712 archlist="${archlist} BOOT"
719 # PrintDefine var value statements file
724 echo "#ifndef $1" >> $4
729 echo "#undef $1" >> $4
734 echo "#define $1 $2" >> $4
744 echo "#include $1" >> $4
754 # PrintRedhatKernelFix arch mp file
755 PrintRedhatKernelFix() {
769 largesmp) largesmp=1;;
773 echo "$2 not supported"
782 PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
784 PrintDefine __BOOT_KERNEL_ENTERPRISE $ent und,def,nl $file
785 PrintDefine __BOOT_KERNEL_BIGMEM $bigmem und,def,nl $file
786 PrintDefine __BOOT_KERNEL_HUGEMEM $hugemem und,def,nl $file
787 PrintDefine __BOOT_KERNEL_SMP $smp und,def,nl $file
788 PrintDefine __BOOT_KERNEL_LARGESMP $largesmp und,def,nl $file
789 PrintDefine __BOOT_KERNEL_UP $up und,def,nl $file
790 PrintDefine __BOOT_KERNEL_BOOT $boot und,def,nl $file
791 PrintDefine __BOOT_KERNEL_BOOTSMP $bootsmp und,def,nl $file
793 PrintDefine '"/boot/kernel.h"' "" inc,nl $file # include file
795 for ar in $archlist ; do
796 if [ "$ar" = "$arch" ]; then
797 PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
799 PrintDefine "__MODULE_KERNEL_$ar" "" und $file # undef
804 PrintDefine "" "" end $file
806 if [ %{debugspec} = 1 ] ; then
807 echo "Kernel Configuration File for Red Hat kernels:"
812 config_opts="--enable-redhat-buildsys \
813 %{?_with_bitmap_later:--enable-bitmap-later} \
814 %{?_with_bos_restricted:--enable-bos-restricted-mode} \
815 %{?_with_largefiles:--enable-largefile-fileserver} \
816 %{?_with_supergroups:--enable-supergroups} \
817 --enable-transarc-paths"
821 # If we're using Fedora kmods, work out which is the best kernel module to
822 # use for the userland configuration step. If no variants have been specified,
823 # then use the standard kernel. If variants are specified, use the standard kernel
824 # if it's listed, otherwise pick the first listed kernel.
827 for kvariant in %{kvariants} ; do
828 if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
829 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
830 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
832 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
837 if [ -z "$ksrc" ] ; then
841 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
844 %if %{?krb5config:1}%{!?krb5config:0}
845 KRB5_CONFIG="%{krb5config}"
850 ./configure --with-afs-sysname=${sysname} \
851 --prefix=%{_prefix} \
852 --libdir=%{_libdir} \
853 --bindir=%{_bindir} \
854 --sbindir=%{_sbindir} \
855 --disable-strip-binaries \
857 --with-linux-kernel-packaging \
859 --with-linux-kernel-headers=${ksrc} \
867 # Build the libafs tree
868 make only_libafs_tree || exit 1
870 # Configure each of our kernel modules
872 %if %{fedorakmod} && %{build_modules}
873 for kvariant in %{kvariants} ; do
874 if [ -n "${kvariant}" ] ; then
875 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
876 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
878 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
881 cp -R libafs_tree _kmod_build_${kvariant}
882 pushd _kmod_build_${kvariant}
883 ./configure --with-afs-sysname=${sysname} \
884 --prefix=%{_prefix} \
885 --libdir=%{_libdir} \
886 --bindir=%{_bindir} \
887 --sbindir=%{_sbindir} \
888 --with-linux-kernel-packaging \
889 --with-linux-kernel-headers=${ksrc} \
890 --enable-disconnected \
892 --with-krb5-conf=/usr/kerberos/bin/krb5-config \
901 %if %{build_userspace}
902 # Build the user-space AFS stuff
903 make dest_nolibafs || exit 1
908 for kvariant in %{kvariants}
910 if [ -n "${kvariant}" ] ; then
911 pushd _kmod_build_$kvariant;
915 make dest_only_libafs
920 # Begin legacy kernel module building code
923 # Build all the kernel modules for linux 2.4.x
924 for variation in %{kvariations}
926 if [ ${variation} = up ]
928 local_smp_def=-DREDHAT_FIX
931 local_smp_def="-DAFS_SMP -DREDHAT_FIX"
935 PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
936 make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
937 LINUX_MODULE_NAME="${suffix}" MPS=SP
940 rm -f src/config/redhat-fix.h
942 %elseif %{kvers_is_26}
943 # Build the kernel module for this version of linux 2.6.x
944 # Notice how much easier this is than 2.4. On the other hand,
945 # we require much more external support to build multiple modules.
947 # the MPS=SP just means that we don't add a '.mp' to the name.
948 make dest_only_libafs MPS=SP
951 # End legacy kernel module building code
956 ##############################################################################
960 ##############################################################################
963 export DONT_GPRINTIFY=1
965 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
977 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
983 x86_64) sysname=amd64_linux${kv} ;;
984 alpha*) sysname=alpha_linux_${kv} ;;
985 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
986 *) sysname=%{_arch}_linux${kv} ;;
990 %if %{build_userspace}
991 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
992 mkdir -p $RPM_BUILD_ROOT%{_libdir}
993 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
995 mkdir -p $RPM_BUILD_ROOT%{initdir}
997 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
998 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
1000 mkdir -p $RPM_BUILD_ROOT/etc/openafs
1001 mkdir -p $RPM_BUILD_ROOT%{pamdir}
1002 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
1003 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
1004 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1005 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1006 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1007 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1009 # Copy files from dest to the appropriate places in BuildRoot
1010 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1011 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1012 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1013 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1014 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1016 # Set the executable bit on libraries in libdir, so rpmbuild knows to
1017 # create "Provides" entries in the package metadata for the libraries
1018 chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
1020 # Fix the location of restorevol, since it should be available for
1021 # any user in /usr/bin
1022 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
1024 # Link kpasswd to kapasswd
1025 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1027 # Copy root.client config files
1028 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1029 %if 0%{?fedora} < 15
1030 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1031 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1033 install -m 755 src/packaging/RedHat/openafs-client.service $RPM_BUILD_ROOT%{_unitdir}/openafs-client.service
1034 install -m 755 src/packaging/RedHat/openafs-client.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules/openafs-client.modules
1035 install -m 755 src/packaging/RedHat/openafs-server.service $RPM_BUILD_ROOT%{_unitdir}/openafs-server.service
1039 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1042 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1043 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1045 # Populate /usr/vice/etc
1046 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1047 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1048 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1049 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1052 # install dkms source
1054 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1055 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1057 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1059 PACKAGE_VERSION="%{dkms_version}"
1061 # Items below here should not have to change with each driver version
1062 PACKAGE_NAME="%{name}"
1063 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"
1064 CLEAN="make -C src/libafs clean"
1066 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1067 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1074 # install kernel-source
1077 # Install the kernel module source tree
1078 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1079 tar cf - -C libafs_tree . | \
1080 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1082 # Next, copy the LICENSE Files, README
1083 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1084 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1085 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1088 # Install DOCUMENTATION
1091 # Build the DOC directory
1092 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1093 tar cf - -C doc LICENSE html pdf | \
1094 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1095 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1096 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1101 tar cf - -C doc/man-pages man1 man5 man8 | \
1102 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1104 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1106 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1108 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1111 # remove unused man pages
1112 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1113 dkload knfs package runntp symlink symlink_list symlink_make \
1115 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1118 # rename kpasswd to kapasswd
1119 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1122 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1124 # create list of man pages that go in the 'openafs' package
1125 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1126 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|^xstat|udebug|unlog|^uss|^vos' \
1127 |egrep -v '^afs_compile_et' \
1130 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1131 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1134 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1135 |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
1141 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1142 %{_bindir}/afsmonitor
1149 %{_bindir}/pagsh.krb
1151 %{_bindir}/restorevol
1155 %{_bindir}/tokens.krb
1156 %{_bindir}/translate_et
1157 %{_bindir}/xstat_cm_test
1158 %{_bindir}/xstat_fs_test
1166 %{_sbindir}/read_tape
1171 EOF-openafs-file-list
1173 # add man pages to the list
1174 cat openafs-man1files \
1175 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1177 cat openafs-man5files \
1178 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1180 cat openafs-man8files \
1181 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1185 # Install compatiblity links
1187 for d in bin:bin etc:sbin; do
1188 olddir=`echo $d | sed 's/:.*$//'`
1189 newdir=`echo $d | sed 's/^.*://'`
1190 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1191 for f in `cat openafs-file-list`; do
1192 if echo $f | grep -q /$newdir/; then
1194 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1200 # Remove files we're not installing
1203 # remove duplicated files from /usr/afs/bin
1204 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1205 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1208 # the rest are not needed.
1209 for f in dlog dpass install knfs livesys ; do
1210 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1213 # not supported on Linux or duplicated
1214 for f in kdb rmtsysd kpwvalid ; do
1215 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1217 # sometimes install sucks and puts down a directory. kill it all.
1218 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1220 # remove man pages from programs deleted above
1221 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
1222 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1225 # PAM modules are doubly-installed Remove the version we don't need
1226 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1227 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1230 %if !%{build_authlibs}
1231 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1232 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1233 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1234 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1239 %if %{build_modules}
1241 for kvariant in %{kvariants}
1243 if [ -n "$kvariant" ] ; then
1244 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1245 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1246 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1248 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1249 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1252 if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1253 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1254 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1256 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1257 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1262 install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1265 # Install the kernel modules
1266 for variation in %{kvariations}
1268 if [ ${variation} = up ]
1271 modname=openafs${kmodend}
1273 kvar=%{kxmoddir}${variation}
1274 modname=openafs${kmodend}
1277 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1278 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1282 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1287 ##############################################################################
1291 ##############################################################################
1293 rm -f openafs-file-list
1294 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1295 rm -fr $RPM_BUILD_ROOT
1298 ##############################################################################
1302 ##############################################################################
1303 %if %{build_userspace}
1306 if [ -e %{_prefix}/afsws ]; then
1307 /bin/rm -fr %{_prefix}/afsws
1311 %if 0%{?fedora} < 15
1312 chkconfig --add openafs-client
1314 if [ $1 -eq 1 ] ; then
1315 # Initial installation
1316 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1319 if [ ! -d /afs ]; then
1321 chown root.root /afs
1323 [ -x /sbin/restorecon ] && /sbin/restorecon /afs
1326 # Create the CellServDB
1327 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1329 ( cd /usr/vice/etc ; \
1330 cat CellServDB.local CellServDB.dist > CellServDB ; \
1331 chmod 644 CellServDB )
1334 #on an upgrade, don't enable if we were disabled
1335 %if 0%{?fedora} < 15
1336 if [ $1 = 1 ] ; then
1337 chkconfig --add openafs-server
1339 %{initdir}/openafs-server condrestart
1341 if [ $1 -eq 1 ] ; then
1342 # Initial installation
1343 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1347 %if %{build_authlibs}
1356 if [ $1 = 0 ] ; then
1357 [ -d /afs ] && rmdir /afs
1361 %if 0%{?fedora} < 15
1362 if [ $1 = 0 ] ; then
1363 %{initdir}/openafs-client stop
1364 chkconfig --del openafs-client
1367 if [ $1 -eq 0 ] ; then
1368 # Package removal, not upgrade
1369 /bin/systemctl --no-reload disable openafs-client.service > /dev/null 2>&1 || :
1370 /bin/systemctl stop openafs-client.service > /dev/null 2>&1 || :
1375 %if 0%{?fedora} < 15
1376 if [ $1 = 0 ] ; then
1377 %{initdir}/openafs-server stop
1378 chkconfig --del openafs-server
1381 if [ $1 -eq 0 ] ; then
1382 /bin/systemctl --no-reload disable openafs-server.service > /dev/null 2>&1 || :
1383 /bin/systemctl stop openafs-server.service > /dev/null 2>&1 || :
1388 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1389 if [ $1 -ge 1 ] ; then
1390 # Package upgrade, not uninstall
1391 /bin/systemctl try-restart openafs-client.service >/dev/null 2>&1 || :
1395 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1396 if [ $1 -ge 1 ] ; then
1397 # Package upgrade, not uninstall
1398 /bin/systemctl try-restart openafs-server.service >/dev/null 2>&1 || :
1401 %if %{build_dkmspkg}
1402 %post -n dkms-%{name}
1403 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1404 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1405 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1407 %preun -n dkms-%{name}
1408 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1412 %if %{build_modules}
1416 /sbin/depmod -ae %{kernvers}
1419 /sbin/depmod -ae %{kernvers}
1425 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1428 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1431 %if %{largesmp_package}
1432 %post kernel-largesmp
1433 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1435 %postun kernel-largesmp
1436 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1439 %if %{bigmem_package}
1441 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1443 %postun kernel-bigmem
1444 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1447 %if %{hugemem_package}
1448 %post kernel-hugemem
1449 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1451 %postun kernel-hugemem
1452 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1457 %triggerun -- openafs-client < 1.6.0-1
1458 # Save the current service runlevel info
1459 # User must manually run systemd-sysv-convert --apply httpd
1460 # to migrate them to systemd targets
1461 /usr/bin/systemd-sysv-convert --save openafs-client >/dev/null 2>&1 ||:
1463 # If the package is allowed to autostart:
1464 /bin/systemctl --no-reload enable openafs-client.service >/dev/null 2>&1 ||:
1466 # Run these because the SysV package being removed won't do them
1467 /sbin/chkconfig --del openafs-client >/dev/null 2>&1 || :
1468 /bin/systemctl try-restart openafs-client.service >/dev/null 2>&1 || :
1470 %triggerun -- openafs-server < 1.6.0-1
1471 # Save the current service runlevel info
1472 # User must manually run systemd-sysv-convert --apply httpd
1473 # to migrate them to systemd targets
1474 /usr/bin/systemd-sysv-convert --save openafs-server >/dev/null 2>&1 ||:
1476 # If the package is allowed to autostart:
1477 /bin/systemctl --no-reload enable openafs-server.service >/dev/null 2>&1 ||:
1479 # Run these because the SysV package being removed won't do them
1480 /sbin/chkconfig --del openafs-server >/dev/null 2>&1 || :
1481 /bin/systemctl try-restart openafs-server.service >/dev/null 2>&1 || :
1483 ##############################################################################
1487 ##############################################################################
1488 %if %{build_userspace}
1490 %files -f openafs-file-list
1491 %defattr(-,root,root)
1492 %config /etc/sysconfig/openafs
1493 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1494 %{_libdir}/libafshcrypto.so.*
1495 %{_libdir}/librokenafs.so.*
1498 %defattr(-,root,root)
1499 %docdir %{_docdir}/openafs-%{afsvers}
1500 %dir %{_docdir}/openafs-%{afsvers}
1501 %{_docdir}/openafs-%{afsvers}/ChangeLog
1502 %{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
1503 %{_docdir}/openafs-%{afsvers}/pdf
1506 %defattr(-,root,root)
1507 %dir %{_prefix}/vice
1508 %dir %{_prefix}/vice/cache
1509 %dir %{_prefix}/vice/etc
1510 %dir %{_prefix}/vice/etc/C
1511 %{_prefix}/vice/etc/CellServDB.dist
1512 %config %{_prefix}/vice/etc/ThisCell
1513 %config %{_prefix}/vice/etc/cacheinfo
1517 %{_prefix}/vice/etc/afsd
1518 %{_prefix}/vice/etc/C/afszcm.cat
1519 %{pamdir}/pam_afs.krb.so.1
1520 %{pamdir}/pam_afs.krb.so
1521 %{pamdir}/pam_afs.so.1
1522 %{pamdir}/pam_afs.so
1523 %if 0%{?fedora} < 15
1524 %{initdir}/openafs-client
1526 %{_unitdir}/openafs-client.service
1527 %{_sysconfdir}/sysconfig/modules/openafs-client.modules
1529 %{_mandir}/man1/cmdebug.*
1530 %{_mandir}/man1/copyauth.*
1531 %{_mandir}/man1/up.*
1532 %{_mandir}/man5/afs.5.gz
1533 %{_mandir}/man5/afs_cache.5.gz
1534 %{_mandir}/man5/afs_volume_header.5.gz
1535 %{_mandir}/man5/afszcm.cat.5.gz
1536 %{_mandir}/man5/cacheinfo.*
1537 %{_mandir}/man8/afsd.*
1538 %{_mandir}/man8/rmtsysd.*
1539 %{_mandir}/man8/vsys.*
1540 %{_mandir}/man5/CellAlias.*
1543 %defattr(-,root,root)
1545 %dir %{_prefix}/afs/bin
1546 %dir %{_prefix}/afs/etc
1547 %dir %{_prefix}/afs/logs
1548 %{_prefix}/afs/bin/bosserver
1549 %{_prefix}/afs/bin/bos_util
1550 %{_prefix}/afs/bin/buserver
1551 %{_prefix}/afs/bin/dafileserver
1552 %{_prefix}/afs/bin/dafssync-debug
1553 %{_prefix}/afs/bin/dasalvager
1554 %{_prefix}/afs/bin/davolserver
1555 %{_prefix}/afs/bin/fileserver
1556 %{_prefix}/afs/bin/fssync-debug
1557 # Should we support KAServer?
1558 %{_prefix}/afs/bin/kaserver
1559 %{_prefix}/afs/bin/ka-forwarder
1560 %{_prefix}/afs/bin/pt_util
1561 %{_prefix}/afs/bin/ptserver
1562 %{_prefix}/afs/bin/salvager
1563 %{_prefix}/afs/bin/salvageserver
1564 %{_prefix}/afs/bin/salvsync-debug
1565 %{_prefix}/afs/bin/state_analyzer
1566 %{_prefix}/afs/bin/upclient
1567 %{_prefix}/afs/bin/upserver
1568 %{_prefix}/afs/bin/vlserver
1569 %{_prefix}/afs/bin/volinfo
1570 %{_prefix}/afs/bin/volserver
1571 %{_sbindir}/kadb_check
1572 %{_sbindir}/prdb_check
1573 %{_sbindir}/vldb_check
1574 %{_sbindir}/vldb_convert
1576 %if 0%{?fedora} < 15
1577 %{initdir}/openafs-server
1579 %{_unitdir}/openafs-server.service
1581 %{_mandir}/man5/AuthLog.*
1582 %{_mandir}/man5/BackupLog.*
1583 %{_mandir}/man5/BosConfig.*
1584 %{_mandir}/man5/BosLog.*
1585 %{_mandir}/man5/FORCESALVAGE.*
1586 %{_mandir}/man5/FileLog.*
1587 %{_mandir}/man5/KeyFile.*
1588 %{_mandir}/man5/NetInfo.*
1589 %{_mandir}/man5/NetRestrict.*
1590 %{_mandir}/man5/NoAuth.*
1591 %{_mandir}/man5/SALVAGE.fs.*
1592 %{_mandir}/man5/SalvageLog.*
1593 %{_mandir}/man5/sysid.*
1594 %{_mandir}/man5/UserList.*
1595 %{_mandir}/man5/VLLog.*
1596 %{_mandir}/man5/VolserLog.*
1597 %{_mandir}/man5/bdb.DB0.*
1598 %{_mandir}/man5/fms.log.*
1599 %{_mandir}/man5/kaserver.DB0.*
1600 %{_mandir}/man5/kaserverauxdb.*
1601 %{_mandir}/man5/krb.conf.*
1602 %{_mandir}/man5/krb.excl.*
1603 %{_mandir}/man5/prdb.DB0.*
1604 %{_mandir}/man5/salvage.lock.*
1605 %{_mandir}/man5/tapeconfig.*
1606 %{_mandir}/man5/vldb.DB0.*
1607 %{_mandir}/man8/buserver.*
1608 %{_mandir}/man8/fileserver.*
1609 %{_mandir}/man8/dafileserver.*
1610 %{_mandir}/man8/dasalvager.*
1611 %{_mandir}/man8/davolserver.*
1612 %{_mandir}/man8/kadb_check.*
1613 %{_mandir}/man8/ka-forwarder.*
1614 %{_mandir}/man8/prdb_check.*
1615 %{_mandir}/man8/ptserver.*
1616 %{_mandir}/man8/pt_util.*
1617 %{_mandir}/man8/salvager.*
1618 %{_mandir}/man8/salvageserver.*
1619 %{_mandir}/man8/state_analyzer.*
1620 %{_mandir}/man8/upclient.*
1621 %{_mandir}/man8/upserver.*
1622 %{_mandir}/man8/vldb_check.*
1623 %{_mandir}/man8/vldb_convert.*
1624 %{_mandir}/man8/vlserver.*
1625 %{_mandir}/man8/voldump.*
1626 %{_mandir}/man8/volinfo.*
1627 %{_mandir}/man8/volserver.*
1629 %if %{build_authlibs}
1631 %defattr(-,root,root)
1632 %{_libdir}/libafsauthent.so.*
1633 %{_libdir}/libafsrpc.so.*
1634 %{_libdir}/libkopenafs.so.*
1637 %files authlibs-devel
1638 %defattr(-,root,root)
1639 %{_includedir}/kopenafs.h
1640 %{_libdir}/libafsauthent.a
1641 %{_libdir}/libafscp.a
1642 %{_libdir}/libafsrpc.a
1643 %{_libdir}/libafsauthent_pic.a
1644 %{_libdir}/libafsrpc_pic.a
1645 %{_libdir}/libkopenafs.a
1646 %if %{build_authlibs}
1647 %{_libdir}/libafsauthent.so
1648 %{_libdir}/libafsrpc.so
1649 %{_libdir}/libkopenafs.so
1653 %defattr(-,root,root)
1654 %{_bindir}/afs_compile_et
1657 %{_includedir}/lock.h
1658 %{_includedir}/lwp.h
1659 %{_includedir}/preempt.h
1661 %{_includedir}/timer.h
1662 %{_includedir}/ubik.h
1663 %{_includedir}/ubik_int.h
1665 %{_libdir}/libafshcrypto.a
1666 %{_libdir}/libafshcrypto.so
1669 %{_libdir}/librokenafs.a
1670 %{_libdir}/librokenafs.so
1672 %{_libdir}/librxkad.a
1673 %{_libdir}/librxstat.a
1674 %{_libdir}/libubik.a
1675 %{_libdir}/libubik_pthread.a
1676 %{_mandir}/man1/rxgen.*
1677 %{_mandir}/man1/afs_compile_et.*
1679 %if %{build_dkmspkg}
1680 %files -n dkms-%{name}
1681 %defattr(-,root,root)
1682 %{_prefix}/src/%{name}-%{dkms_version}
1685 %files kernel-source
1686 %defattr(-,root,root)
1687 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1688 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1689 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1690 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1693 %defattr(-,root,root)
1697 %defattr(-,root,root)
1703 %defattr(-,root,root)
1705 %{_bindir}/klog.krb5
1707 %{_mandir}/man1/aklog.*
1708 %{_mandir}/man8/asetkey.*
1713 %if %{build_modules}
1718 %defattr(-,root,root)
1719 %{kxmoddir}/fs/openafs/openafs.*
1724 %defattr(-,root,root)
1725 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1728 %if %{largesmp_package}
1729 %files kernel-largesmp
1730 %defattr(-,root,root)
1731 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1734 %if %{bigmem_package}
1735 %files kernel-bigmem
1736 %defattr(-,root,root)
1737 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1740 %if %{hugemem_package}
1741 %files kernel-hugemem
1742 %defattr(-,root,root)
1743 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1749 ##############################################################################
1751 ### openafs.spec change log
1753 ##############################################################################
1755 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1756 - Make the RPM mockable
1758 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1759 - Update to match the shipped 1.4.5 RPMS
1760 - Fix the kvariant stuff to only configure the 'standard' case once
1761 - Add openafs-kvers.sh back in
1763 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1764 - Use Fedora style kmods, which allows us to install multiple kernel types
1766 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1767 - Use distributed files, rather than those in packager's SOURCE directory
1768 - Remove SuidCells stuff, which was unused
1770 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1771 - integrate s390x changes
1772 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1773 that won't build the .so files.
1775 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1777 - use installed aklog manpage.
1778 - moduleparam patch obsoleted.
1780 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1781 - update to 1.4.2-rc1
1782 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1783 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1784 - don't need the posixlock patch anymore.
1786 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1787 - update to 1.4.2-beta2
1788 - add linux2.4 posixlock API patch
1790 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1791 - moduleparam and krb524 patches no longer required in OA-CVS
1793 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1794 - change non-target-cpu kernel dep to a file dep
1795 - make sure we use the proper kernel version for the dependency.
1797 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1798 - allow users to specify local CellServDB and SuidCells entries
1799 don't overwrite user's changes. Provide a .dist an let users
1800 make entries in a ".local"
1801 - build the CellServDB and SuidCells at client startup and at
1803 - add provideskernelarch functionality to openafs-kvers-is.sh
1804 - use that functionality to Require kernel{,-<type>}-targetcpu
1805 to get better package safety due to RPM bugs where the kernel
1806 release isn't used so you can install the kernel module against
1807 any kernel of the same major version.
1809 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1810 - update the README in openafs-kernel-source
1811 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1812 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1814 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1815 - build requires autoconf and automake for krb5support
1816 and autoconf for standard package
1817 - dont setup the krb5 migration kit (or patches) if we don't care.
1818 - require ncurses-devel to build
1820 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1821 - look for krb524 functions in libkrb524 if we can't find them
1822 in the standard locations.
1824 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1825 - fix the module_param_array macro for Linux 2.6.9.
1827 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1828 - update to 1.4.1 release.
1829 - distribute asetkey from openafs instead of krb5-migration kit
1830 - don't need to apply the FC5 patches because they are part of the distro.
1831 - install asetkey into the "proper" place
1832 - dont list a manpage twice.
1833 - package asetkey man page. delete it when not needed.
1835 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1836 - turn authlibs back on, because RT #18767 was applied to CVS.
1838 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1839 - update to 1.4.1rc10, build on FC5
1840 - fix the man pages (distribute into various packages)
1841 - include patches for FC5, RT #29112 and #29122
1843 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1844 - openafs-server shouldn't depend on the kernel module.
1846 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1847 - patch from Mike Polek <mike at pictage.com> to run depmod for
1848 the target kernel and not the running kernel.
1850 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1851 - build aklog from the openafs sources, not from the krb5 migration kit.
1853 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1854 - set openafs-kernel-source to Provide openafs-kernel
1856 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1857 - update afs-krb5 res_search patch: look for res_search and __res_search
1858 - update to 1.4.0 final
1860 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1861 - remove all kdump builds.
1863 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1864 - fix openafs-kernel-version.sh so it will build an RPM for the
1865 currently-running kernel even if it's smp on 2.6.
1867 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1868 - upgrade to 1.4.0rc5
1869 - turn off authlibs packages
1871 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1872 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1873 it's called "openafs" and not "libafs". This fixes the shutdown
1876 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1877 - update kversis script, add 'kvers' operation
1878 - fix bug that 2.6 smp/hugemem kernels don't provide
1879 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1880 - add patch to remove res_search from the afs-krb5 configure
1882 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1883 - Update to 1.4.0rc4
1884 - Update the afs-krb5 krb524 patch so it actually works on
1885 some older systems like RHEL3 that still need -lkrb524.
1886 - Update the buildall script so choose better architecture support,
1887 e.g. don't build i586 on RHEL.
1888 - Update the rebuild information in the SPEC file.
1889 - Add support for finding .EL kernels in openafs-kvers-is.sh
1890 - Add additional error messages when kernel version/type parsing fails.
1891 - Update the buildall script to use the kernel srcdir directly.
1893 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1894 - Add "hugemem" to 2.4 configs
1895 - Add checks to support scripts to determine whether to build
1896 the bigmem and/or hugemem kernels for 2.4.
1898 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1899 - Added some afs-krb5 patches to get the migration kit to build
1900 on modern AFS and modern Kerberos.
1901 - Added authlibs and authlibs-devel packages as per UMich changes.
1903 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1904 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1906 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1907 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1908 from Red Hat. Initial attempt at a release of 1.4. Still need
1909 to work in a 2.6 build system.