1 # Openafs Spec $Revision$
3 %define afsvers @VERSION@
4 %define pkgvers @LINUX_PKGVER@
5 # for beta/rc releases make pkgrel 0.X.<tag>
6 # for real releases make pkgrel 1 (or more for extra releases)
7 #%define pkgrel 0.1.rc1
8 %define pkgrel @LINUX_PKGREL@
10 %if %{?osvers:0}%{!?osvers:1}
14 %{!?fedorakmod: %define fedorakmod 1}
15 %{!?build_dkmspkg: %define build_dkmspkg 1}
17 # Determine presence of rpmbuild command line --define arguments used for
18 # option specification
19 %define kernvers_on_cmdline %{?kernvers:1}%{!?kernvers:0}
20 %define build_userspace_on_cmdline %{?build_userspace:1}%{!?build_userspace:0}
21 %define build_modules_on_cmdline %{?build_modules:1}%{!?build_modules:0}
22 %define build_authlibs_on_cmdline %{?build_authlibs:1}%{!?build_authlibs:0}
24 # Determine the version of the kernel to build against
25 # - automatically select running kernel if there are sources in /lib/modules
26 # - note that this can be overridden on the command line
28 %if !%{kernvers_on_cmdline}
29 %define kernvers %(%{_sourcedir}/openafs-kernel-version.sh)
32 # If we're building for a 2.4 series kernel, then fedora style kmods aren't
33 # appropriate - disable them.
35 %define kern24 %([ "`echo "%{kernvers}" | sed -e 's/^\([0-9]*\.[0-9]*\)\..*/\1/'`" = "2.4" ] && echo 1 || echo 0)
42 %define kmodtool bash %{_sourcedir}/openafs-kmodtool
44 %define kmod_name openafs
45 %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
48 %{!?kvariants: %define kvariants %{?upvar}}
50 %if %{?ksrcdir:1}%{!?ksrcdir:0}
51 if ( -d %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}) ; then
52 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
54 %define ksrcdir %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}}
58 %else # Legacy kernel build stuff
60 %define kversis %{_sourcedir}/openafs-kvers-is.sh
61 %define kvers %(%{kversis} parsev %{kernvers})
62 %define kvers_is_24 %(%{kversis} %{kvers} "2.4")
63 %define kvers_is_26 %(%{kversis} %{kvers} "2.6")
64 %define ktype %(%{kversis} parset %{kernvers})
65 %define kversion %(%{kversis} kvers %{kernvers})
67 # This is where to look for kernel build include files. Default
68 # is /lib/modules/<kvers>/build, but you can define kbase and
69 # kend on the commandline to change that.
71 %if %{?kbase:0}%{!?kbase:1}
72 %define kbase /lib/modules/
74 %if %{?kend:0}%{!?kend:1}
77 # Let the buildscript define the ksrcdir directly -- needed for RHEL4
78 %if %{?ksrcdir:0}%{!?ksrcdir:1}
79 %define ksrcdir %{kbase}%{kernvers}%{kend}
82 %if %{?kmoddir:0}%{!?kmoddir:1}
83 %define kmoddir /lib/modules
85 %define kxmoddir %{kmoddir}/%{kernvers}
87 # End legacy kernel build stuff
90 %define dkms_version %{osvers}.%{pkgrel}
92 # Set 'debugspec' to 1 if you want to debug the spec file. This will
93 # not remove the installed tree as part of the %clean operation
94 %if %{?debugspec:0}%{!?debugspec:1}
98 # Set 'krb5support' to 1 if you want to build the openafs-krb5 package
99 # to distribute aklog and asetkey
100 %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
103 %if %{?krb5config:0}%{!?krb5config:1}
104 %define krb5config /usr/kerberos/bin/krb5-config
108 # Set 'bootkernelsupport' to 1 if you want to build the
109 # kernel module for Red Hat BOOT Kernels on x86.
110 %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
112 # Define the location of your init.d directory
113 %define initdir /etc/init.d
115 #determine if the kernel provides an arch-specific Provides
116 %define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
118 # Define the location of the PAM security module directory
119 %define pamdir /%{_lib}/security
123 # Define the set of kernel module variations to be built:
124 # For 2.4 kernels we just build everything at once for a particular
125 # kernel. So we build up, smp, and bigmem all at once.
126 # For 2.6 kernels we have to build against the specific kernel headers
127 # for a particular kernel variation. AFS will handle the specific smp or
128 # non-smp determination. So just always build as if it's "up" -- the kernel
129 # version will have the 'variation' type already in the version #.
132 %define smp_package 0
133 %define bigmem_package 0
134 %define hugemem_package 0
135 %define largesmp_package 0
137 #######################################################################
140 %define kdepend kernel-source
142 %define smp_package 1
145 %define bigmem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} bigmem)
146 %if %{bigmem_package}
147 %define bigmem_ext bigmem
150 %define hugemem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} hugemem)
151 %if %{hugemem_package}
152 %define hugemem_ext hugemem
155 %define kvariations up smp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
157 #######################################################################
161 %define kvariations up
166 %define up_package %(%{kversis} "%{ktype}" "")
167 %define smp_package %(%{kversis} "%{ktype}" "smp")
168 %define hugemem_package %(%{kversis} "%{ktype}" "hugemem")
169 %define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
172 %if !%{up_package} && !%{smp_package} && !%{hugemem_package} && !%{largesmp_package}
173 %error "unknown kernel type: %{ktype}"
176 %if !%{kernvers_on_cmdline}
177 %define kdepend %{ksrcdir}/include/linux/version.h
180 #######################################################################
183 %error "unknown kernel version: ${kvers} (parsed from %{kernvers})"
187 # End of legacy kernel module build
190 #######################################################################
191 # You probably don't need to change anything beyond this line
192 # NOTE: If you do, please email me!!!
194 # Determine which elements of OpenAFS to build. For non-x86 arches
195 # (subject to the ExclusiveArch setting, below), we build both userspace
196 # and modules. For most x86 arches, we build just the kernel modules. For
197 # i386, we build just the userspace. If you're running an i386 kernel,
198 # you'll need to tweak that last bit.
199 %if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
201 %ifarch x86_64 ia64 s390 s390x
202 %define build_userspace 1
203 %define build_modules 1
205 %define build_authlibs 1
207 %define build_authlibs 0
212 %define build_userspace 0
213 %define build_modules 1
214 %define build_authlibs 1
218 %define build_userspace 1
219 %define build_modules 0
220 %define build_authlibs 1
225 # deal with cmdline specification
226 %if %{build_userspace_on_cmdline} || %{build_modules_on_cmdline}
227 %if !%{build_userspace_on_cmdline}
228 %define build_userspace 0
230 %if !%{build_modules_on_cmdline}
231 %define build_modules 0
235 %if !%{build_authlibs_on_cmdline}
236 %if %{build_userspace_on_cmdline}
237 %define build_authlibs 1
239 %define build_authlibs 0
243 # Make sure RPM doesn't complain about installed but non-packaged files.
244 #define __check_files %{nil}
246 Summary: OpenAFS distributed filesystem
249 Release: %{osvers}.%{pkgrel}
250 License: IBM Public License
251 URL: http://www.openafs.org
252 BuildRoot: %{_tmppath}/%{name}-%{version}-root
253 Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
254 Group: Networking/Filesystems
255 BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
257 BuildRequires: krb5-devel
259 ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
261 # http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
262 Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
263 Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
264 %define srcdir openafs-%{afsvers}
266 Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
267 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
269 Source20: http://dl.central.org/dl/cellservdb/CellServDB.2008-11-07
271 Source30: openafs-kernel-version.sh
272 Source996: openafs-kvers-is.sh
273 Source997: openafs-buildfedora.pl
274 Source998: openafs-buildall.sh
275 Source999: openafs-kmodtool
278 The AFS distributed filesystem. AFS is a distributed filesystem
279 allowing cross-platform sharing of files among multiple computers.
280 Facilities are provided for access control, authentication, backup and
281 administrative management.
283 This package provides common files shared across all the various
284 OpenAFS packages but are not necessarily tied to a client or server.
286 The OpenAFS SRPM can be rebuilt with the following options to control
289 --define "kernvers 2.4.20-1.1376_FC3" Specify the specific kernel version
290 to build modules against. The default is
291 to build against the currently-running
293 --define "kbase /lib/modules/" The base location to look for kernel headers
294 --define "kend /build" The 'end' location to look for kernels
295 The build will define ksrvdir as
296 %%{kbase}<kernvers>%%{kend}
298 --without krb5 Disable krb5 support (default: with krb5)
299 --with bitmap-later Enable "bitmap later" support
300 --with bos-restricted Enable "bos restricted" mode
301 --with fast-restart Enable "fast restart" mode
302 --with largefiles Enable "largefile fileserver" mode
303 --with supergroups Enable "supergroups"
305 --target=i386 The target architecture to build for.
306 When building for a non-default target
307 the build may choose whether to build
308 userspace or kernel modules automatically.
309 The defaults are probably what you want.
311 --define "build_userspace 1" Request building of userspace tools
312 --define "build_modules 1" Request building of kernel modules
313 You probably never need to specify these.
315 --define "kmoddir /lib/modules" This is the base location where modules
316 will be installed. You probably don't
317 need to change this ever.
319 --define "fedorakmod 0" Disable the building of 'Fedora' style kernel
320 modules, and use the old format.
322 --define "kvariants <variants>" When building Fedora style kernel modules,
323 this defines the set of kernel variants
325 <variants> is a space seperated list which
326 may contain one or more of
327 '' (for the generic kernel), smp, PAE, xen
330 To a kernel module for your running kernel, just run:
331 rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{osvers}.%{pkgrel}.src.rpm
333 ##############################################################################
335 # build the userspace side of things if so requested
337 ##############################################################################
338 %if %{build_userspace}
341 Requires: binutils, openafs = %{PACKAGE_VERSION}
344 Requires: %{name}-kmod >= %{version}
345 Provides: %{name}-kmod-common = %{version}
347 Requires: openafs-kernel
350 Summary: OpenAFS Filesystem Client
351 Group: Networking/Filesystem
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 client support to mount and manipulate
363 Requires: openafs = %{PACKAGE_VERSION}
364 Summary: OpenAFS Filesystem Server
365 Group: Networking/Filesystems
368 The AFS distributed filesystem. AFS is a distributed filesystem
369 allowing cross-platform sharing of files among multiple computers.
370 Facilities are provided for access control, authentication, backup and
371 administrative management.
373 This package provides basic server support to host files in an AFS
377 %package -n dkms-%{name}
378 Summary: DKMS-ready kernel source for AFS distributed filesystem
379 Group: Development/Kernel
380 Provides: openafs-kernel = %{PACKAGE_VERSION}
382 Provides: %{name}-kmod = %{PACKAGE_VERSION}
387 Requires: %{name}-kmod-common = %{version}
389 %description -n dkms-%{name}
390 The AFS distributed filesystem. AFS is a distributed filesystem
391 allowing cross-platform sharing of files among multiple computers.
392 Facilities are provided for access control, authentication, backup and
393 administrative management.
395 This package provides the source code to allow DKMS to build an
399 %if %{build_authlibs}
401 Summary: OpenAFS authentication shared libraries
402 Group: Networking/Filesystems
404 %description authlibs
405 The AFS distributed filesystem. AFS is a distributed filesystem
406 allowing cross-platform sharing of files among multiple computers.
407 Facilities are provided for access control, authentication, backup and
408 administrative management.
410 This package provides a shared version of libafsrpc and libafsauthent.
411 None of the programs included with OpenAFS currently use these shared
412 libraries; however, third-party software that wishes to perform AFS
413 authentication may link against them.
416 %package authlibs-devel
417 %if %{build_authlibs}
418 Requires: openafs-authlibs = %{PACKAGE_VERSION}
420 Requires: openafs-devel = %{PACKAGE_VERSION}
421 Summary: OpenAFS shared library development
422 Group: Development/Filesystems
424 %description authlibs-devel
425 The AFS distributed filesystem. AFS is a distributed filesystem
426 allowing cross-platform sharing of files among multiple computers.
427 Facilities are provided for access control, authentication, backup and
428 administrative management.
430 This package includes the static versions of libafsrpc and
431 libafsauthent, and symlinks required for building against the dynamic
435 Summary: OpenAFS Development Libraries and Headers
436 Group: Development/Filesystems
439 The AFS distributed filesystem. AFS is a distributed filesystem
440 allowing cross-platform sharing of files among multiple computers.
441 Facilities are provided for access control, authentication, backup and
442 administrative management.
444 This package provides static development libraries and headers needed
445 to compile AFS applications. Note: AFS currently does not provide
449 Summary: OpenAFS user and administrator documentation
450 Requires: openafs = %{PACKAGE_VERSION}
451 Group: Networking/Filesystems
454 The AFS distributed filesystem. AFS is a distributed filesystem
455 allowing cross-platform sharing of files among multiple computers.
456 Facilities are provided for access control, authentication, backup and
457 administrative management.
459 This package provides HTML documentation for OpenAFS users and system
462 %package kernel-source
463 Summary: OpenAFS Kernel Module source tree
464 Group: Networking/Filesystems
465 Provides: openafs-kernel = %{PACKAGE_VERSION}
467 Provides: %{name}-kmod = %{PACKAGE_VERSION}
470 %description kernel-source
471 The AFS distributed filesystem. AFS is a distributed filesystem
472 allowing cross-platform sharing of files among multiple computers.
473 Facilities are provided for access control, authentication, backup and
474 administrative management.
476 This package provides the source code to build your own AFS kernel
480 Summary: OpenAFS client compatibility symlinks
481 Requires: openafs = %{PACKAGE_VERSION}, openafs-client = %{PACKAGE_VERSION}
482 Group: Networking/Filesystems
483 Obsoletes: openafs-client-compat
486 The AFS distributed filesystem. AFS is a distributed filesystem
487 allowing cross-platform sharing of files among multiple computers.
488 Facilities are provided for access control, authentication, backup and
489 administrative management.
491 This package provides compatibility symlinks in /usr/afsws. It is
492 completely optional, and is only necessary to support legacy
493 applications and scripts that hard-code the location of AFS client
497 Summary: OpenAFS KA kpasswd support
499 Group: Networking/Filesystems
502 The AFS distributed filesystem. AFS is a distributed filesystem
503 allowing cross-platform sharing of files among multiple computers.
504 Facilities are provided for access control, authentication, backup and
505 administrative management.
507 This package provides the compatibility symlink for kpasswd, in case
508 you are using KAserver instead of Krb5.
512 Summary: OpenAFS programs to use with krb5
513 Requires: openafs = %{PACKAGE_VERSION}
514 Group: Networking/Filesystems
515 BuildRequires: krb5-devel
518 The AFS distributed filesystem. AFS is a distributed filesystem
519 allowing cross-platform sharing of files among multiple computers.
520 Facilities are provided for access control, authentication, backup and
521 administrative management.
523 This package provides compatibility programs so you can use krb5
524 to authenticate to AFS services, instead of using AFS's homegrown
525 krb4 lookalike services.
530 ##############################################################################
532 # build the kernel modules if so requested
534 ##############################################################################
538 %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
542 # Legacy kernel compilation code here ...
543 %define modkversion %(echo %{kernvers} | cut -d- -f1)
544 %define modkrelease %(echo %{kernvers} | cut -d- -f2)
545 %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
549 Summary: OpenAFS Kernel Module (compiled for UP)
550 Release: %{modpkgrel}
551 Group: Networking/Filesystems
552 Provides: openafs-kernel = %{PACKAGE_VERSION}
554 Requires: kernel-%{_target_cpu} = %{kversion}
556 Requires: /boot/config-%{kernvers}
560 The AFS distributed filesystem. AFS is a distributed filesystem
561 allowing cross-platform sharing of files among multiple computers.
562 Facilities are provided for access control, authentication, backup and
563 administrative management.
565 This package provides a precompiled AFS kernel module for %{kernvers}.
570 Summary: OpenAFS Kernel Module (compiled for SMP)
571 Release: %{modpkgrel}
572 Provides: openafs-kernel = %{PACKAGE_VERSION}
574 Requires: kernel-smp-%{_target_cpu} = %{kversion}
576 Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
578 Group: Networking/Filesystems
580 %description kernel-smp
581 The AFS distributed filesystem. AFS is a distributed filesystem
582 allowing cross-platform sharing of files among multiple computers.
583 Facilities are provided for access control, authentication, backup and
584 administrative management.
586 This package provides a precompiled AFS kernel module for %{kernvers}.
589 %if %{largesmp_package}
590 %package kernel-largesmp
591 Summary: OpenAFS Kernel Module (compiled for LARGESMP)
592 Release: %{modpkgrel}
593 Provides: openafs-kernel = %{PACKAGE_VERSION}
595 Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
597 Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
599 Group: Networking/Filesystems
601 %description kernel-largesmp
602 The AFS distributed filesystem. AFS is a distributed filesystem
603 allowing cross-platform sharing of files among multiple computers.
604 Facilities are provided for access control, authentication, backup and
605 administrative management.
607 This package provides a precompiled AFS kernel module for %{kernvers}.
610 %if %{bigmem_package}
611 %package kernel-bigmem
612 Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
613 Release: %{modpkgrel}
614 Provides: openafs-kernel = %{PACKAGE_VERSION}
616 Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
618 Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
620 Group: Networking/Filesystems
622 %description kernel-bigmem
623 The AFS distributed filesystem. AFS is a distributed filesystem
624 allowing cross-platform sharing of files among multiple computers.
625 Facilities are provided for access control, authentication, backup and
626 administrative management.
628 This package provides a precompiled AFS kernel module for %{kernvers}.
631 %if %{hugemem_package}
632 %package kernel-hugemem
633 Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
634 Release: %{modpkgrel}
635 Provides: openafs-kernel = %{PACKAGE_VERSION}
637 Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
639 Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
641 Group: Networking/Filesystems
643 %description kernel-hugemem
644 The AFS distributed filesystem. AFS is a distributed filesystem
645 allowing cross-platform sharing of files among multiple computers.
646 Facilities are provided for access control, authentication, backup and
647 administrative management.
649 This package provides a precompiled AFS kernel module for %{kernvers}.
653 # End legacy kernel compilation code ...
656 ##############################################################################
660 ##############################################################################
664 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
666 : @@@ kernel version: %{kernvers}
668 : @@@ kernel variations: %{kvariants}
670 : @@@ base kernel version:%{kversion}
671 : @@@ kernel modules dir: %{kxmoddir}
672 : @@@ kernel source dir: %{ksrcdir}
674 : @@@ kernel variations: %{kvariations}
677 : @@@ kernel type: up
679 : @@@ kernel type: %{ktype}
683 : @@@ PAM modules dir: %{pamdir}
684 : @@@ build userspace: %{build_userspace}
685 : @@@ build modules: %{build_modules}
687 : @@@ target cpu: %{_target_cpu}
689 : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
691 # Install OpenAFS src and doc
692 #%setup -q -n %{srcdir}
693 %setup -q -b 1 -n %{srcdir}
695 ##############################################################################
699 ##############################################################################
710 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
716 x86_64) sysname=amd64_linux${kv} ;;
717 alpha*) sysname=alpha_linux_${kv} ;;
718 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
719 *) sysname=%{_arch}_linux${kv} ;;
723 archlist="i386 i586 i686 athlon"
724 %if %{bootkernelsupport}
725 archlist="${archlist} BOOT"
732 # PrintDefine var value statements file
737 echo "#ifndef $1" >> $4
742 echo "#undef $1" >> $4
747 echo "#define $1 $2" >> $4
757 echo "#include $1" >> $4
767 # PrintRedhatKernelFix arch mp file
768 PrintRedhatKernelFix() {
782 largesmp) largesmp=1;;
786 echo "$2 not supported"
795 PrintDefine "REDHAT_FIX_H" "" ifn,def,nl $file
797 PrintDefine __BOOT_KERNEL_ENTERPRISE $ent und,def,nl $file
798 PrintDefine __BOOT_KERNEL_BIGMEM $bigmem und,def,nl $file
799 PrintDefine __BOOT_KERNEL_HUGEMEM $hugemem und,def,nl $file
800 PrintDefine __BOOT_KERNEL_SMP $smp und,def,nl $file
801 PrintDefine __BOOT_KERNEL_LARGESMP $largesmp und,def,nl $file
802 PrintDefine __BOOT_KERNEL_UP $up und,def,nl $file
803 PrintDefine __BOOT_KERNEL_BOOT $boot und,def,nl $file
804 PrintDefine __BOOT_KERNEL_BOOTSMP $bootsmp und,def,nl $file
806 PrintDefine '"/boot/kernel.h"' "" inc,nl $file # include file
808 for ar in $archlist ; do
809 if [ "$ar" = "$arch" ]; then
810 PrintDefine "__MODULE_KERNEL_$ar" "1" ifn,def,end $file
812 PrintDefine "__MODULE_KERNEL_$ar" "" und $file # undef
817 PrintDefine "" "" end $file
819 if [ %{debugspec} = 1 ] ; then
820 echo "Kernel Configuration File for Red Hat kernels:"
825 config_opts="--enable-redhat-buildsys \
826 %{?_with_bitmap_later:--enable-bitmap-later} \
827 %{?_with_bos_restricted:--enable-bos-restricted-mode} \
828 %{?_with_fast_restart:--enable-fast-restart} \
829 %{?_with_largefiles:--enable-largefile-fileserver} \
830 %{?_with_supergroups:--enable-supergroups} \
831 --enable-transarc-paths"
835 # If we're using Fedora kmods, work out which is the best kernel module to
836 # use for the userland configuration step. If no variants have been specified,
837 # then use the standard kernel. If variants are specified, use the standard kernel
838 # if it's listed, otherwise pick the first listed kernel.
841 for kvariant in %{kvariants} ; do
842 if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
843 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
844 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
846 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
851 if [ -z "$ksrc" ] ; then
855 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
857 ./configure --with-afs-sysname=${sysname} \
858 --prefix=%{_prefix} \
859 --libdir=%{_libdir} \
860 --bindir=%{_bindir} \
861 --sbindir=%{_sbindir} \
862 --disable-strip-binaries \
863 --with-linux-kernel-packaging \
864 --enable-disconnected \
866 --with-linux-kernel-headers=${ksrc} \
869 --with-krb5-conf=%{krb5config} \
874 # Build the libafs tree
875 make only_libafs_tree || exit 1
877 # Configure each of our kernel modules
879 %if %{fedorakmod} && %{build_modules}
880 for kvariant in %{kvariants} ; do
881 if [ -n "${kvariant}" ] ; then
882 if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
883 ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
885 ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
888 cp -R libafs_tree _kmod_build_${kvariant}
889 pushd _kmod_build_${kvariant}
890 ./configure --with-afs-sysname=${sysname} \
891 --prefix=%{_prefix} \
892 --libdir=%{_libdir} \
893 --bindir=%{_bindir} \
894 --sbindir=%{_sbindir} \
895 --with-linux-kernel-packaging \
896 --with-linux-kernel-headers=${ksrc} \
897 --enable-disconnected \
899 --with-krb5-conf=/usr/kerberos/bin/krb5-config \
908 %if %{build_userspace}
909 # Build the user-space AFS stuff
910 make dest_nolibafs || exit 1
915 for kvariant in %{kvariants}
917 if [ -n "${kvariant}" ] ; then
918 pushd _kmod_build_$kvariant;
922 make dest_only_libafs
927 # Begin legacy kernel module building code
930 # Build all the kernel modules for linux 2.4.x
931 for variation in %{kvariations}
933 if [ ${variation} = up ]
935 local_smp_def=-DREDHAT_FIX
938 local_smp_def="-DAFS_SMP -DREDHAT_FIX"
942 PrintRedhatKernelFix %{_target_cpu} $variation src/config/redhat-fix.h
943 make dest_only_libafs LOCAL_SMP_DEF="${local_smp_def}" \
944 LINUX_MODULE_NAME="${suffix}" MPS=SP
947 rm -f src/config/redhat-fix.h
949 %elseif %{kvers_is_26}
950 # Build the kernel module for this version of linux 2.6.x
951 # Notice how much easier this is than 2.4. On the other hand,
952 # we require much more external support to build multiple modules.
954 # the MPS=SP just means that we don't add a '.mp' to the name.
955 make dest_only_libafs MPS=SP
958 # End legacy kernel module building code
963 ##############################################################################
967 ##############################################################################
970 export DONT_GPRINTIFY=1
972 [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
984 echo "I don't know how to build linux-`expr ${kernvers} : \(^[0-9]*[.][0-9]*\)`"
990 x86_64) sysname=amd64_linux${kv} ;;
991 alpha*) sysname=alpha_linux_${kv} ;;
992 i386|i486|i586|i686|athlon) sysname=i386_linux${kv} ;;
993 *) sysname=%{_arch}_linux${kv} ;;
997 %if %{build_userspace}
998 mkdir -p $RPM_BUILD_ROOT%{_sbindir}
999 mkdir -p $RPM_BUILD_ROOT%{_libdir}
1000 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
1001 mkdir -p $RPM_BUILD_ROOT%{initdir}
1002 mkdir -p $RPM_BUILD_ROOT/etc/openafs
1003 mkdir -p $RPM_BUILD_ROOT%{pamdir}
1004 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/etc
1005 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/logs
1006 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/etc
1007 mkdir -p $RPM_BUILD_ROOT%{_prefix}/vice/cache
1008 chmod 700 $RPM_BUILD_ROOT%{_prefix}/vice/cache
1009 mkdir -p $RPM_BUILD_ROOT%{_mandir}
1011 # Copy files from dest to the appropriate places in BuildRoot
1012 tar cf - -C ${sysname}/dest bin include | tar xf - -C $RPM_BUILD_ROOT%{_prefix}
1013 tar cf - -C ${sysname}/dest/lib . | tar xf - -C $RPM_BUILD_ROOT%{_libdir}
1014 tar cf - -C ${sysname}/dest/etc . | tar xf - -C $RPM_BUILD_ROOT%{_sbindir}
1015 tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
1016 tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
1018 # Link kpasswd to kapasswd
1019 ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
1021 # Copy root.client config files
1022 install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
1023 install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
1024 install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
1027 install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
1030 ln -sf pam_afs.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.so
1031 ln -sf pam_afs.krb.so.1 $RPM_BUILD_ROOT%{pamdir}/pam_afs.krb.so
1033 # Populate /usr/vice/etc
1034 uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
1035 install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
1036 install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
1037 install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
1040 # install dkms source
1042 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
1043 cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
1045 cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
1047 PACKAGE_VERSION="%{dkms_version}"
1049 # Items below here should not have to change with each driver version
1050 PACKAGE_NAME="%{name}"
1051 MAKE[0]="SMP=SP; eval \\\`grep CONFIG_SMP /boot/config-\${kernelver_array[0]}\\\`; [ -n \"\\\$CONFIG_SMP\" ] && SMP=MP; KMODNAME=openafs.ko; DSTKMOD=\\".\\"; [ \\"\\\`echo \\"\${kernelver_array[0]}\\" | sed -e 's/^\\([0-9]*\\.[0-9]*\\)\\..*/\\1/'\\\`\\" = \\"2.4\\" ] && KMODNAME=\\"libafs-*\\" && DSTKMOD=openafs.o; ./configure --enable-disconnected --with-linux-kernel-headers=\${kernel_source_dir}; make MPS=\\\$SMP; mv src/libafs/MODLOAD-*/\\\$KMODNAME \\\$DSTKMOD"
1052 CLEAN="make -C src/libafs clean"
1054 BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
1055 DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
1062 # install kernel-source
1065 # Install the kernel module source tree
1066 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1067 tar cf - -C libafs_tree . | \
1068 tar xf - -C $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/src
1070 # Next, copy the LICENSE Files, README
1071 install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1072 install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1073 install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
1076 # Install DOCUMENTATION
1079 # Build the DOC directory
1080 mkdir -p $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1081 tar cf - -C doc LICENSE html pdf | \
1082 tar xf - -C $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1083 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1084 install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/$RPM_DOC_DIR/openafs-%{afsvers}
1089 tar cf - -C doc/man-pages man1 man5 man8 | \
1090 tar xf - -C $RPM_BUILD_ROOT%{_mandir}
1092 # Copy the uninstalled krb5 files (or delete the unused krb5 files)
1094 mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/asetkey $RPM_BUILD_ROOT%{_sbindir}/asetkey
1096 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/asetkey.*
1099 # remove unused man pages
1100 for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
1101 dkload knfs package runntp symlink symlink_list symlink_make \
1103 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
1106 # rename kpasswd to kapasswd
1107 mv $RPM_BUILD_ROOT%{_mandir}/man1/kpasswd.1 $RPM_BUILD_ROOT%{_mandir}/man1/kapasswd.1
1110 gzip -9 $RPM_BUILD_ROOT%{_mandir}/man*/*
1112 # create list of man pages that go in the 'openafs' package
1113 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
1114 |egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^rxdebug|scout|^sys|tokens|translate|udebug|unlog|^uss|^vos' \
1117 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
1118 |egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
1121 /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
1122 |egrep '^backup|^bos|^butc|^fms|^fstrace|^kas|^read_tape|^uss' \
1128 grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
1129 %{_bindir}/afsmonitor
1137 %{_bindir}/pagsh.krb
1142 %{_bindir}/tokens.krb
1143 %{_bindir}/translate_et
1148 %{_sbindir}/copyauth
1152 %{_sbindir}/read_tape
1153 %{_sbindir}/restorevol
1158 EOF-openafs-file-list
1160 # add man pages to the list
1161 cat openafs-man1files \
1162 | ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
1164 cat openafs-man5files \
1165 | ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
1167 cat openafs-man8files \
1168 | ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
1172 # Install compatiblity links
1174 for d in bin:bin etc:sbin; do
1175 olddir=`echo $d | sed 's/:.*$//'`
1176 newdir=`echo $d | sed 's/^.*://'`
1177 mkdir -p $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir
1178 for f in `cat openafs-file-list`; do
1179 if echo $f | grep -q /$newdir/; then
1181 ln -sf %{_prefix}/$newdir/$fb $RPM_BUILD_ROOT%{_prefix}/afsws/$olddir/$fb
1187 # Remove files we're not installing
1190 # remove duplicated files from /usr/afs/bin
1191 for f in bos fs kas klog klog.krb kpwvalid pts tokens tokens.krb udebug vos ; do
1192 rm -f $RPM_BUILD_ROOT%{_prefix}/afs/bin/$f
1195 # compile_et is duplicated in e2fsprogs
1196 # the rest are not needed.
1197 for f in compile_et dlog dpass install knfs livesys xstat_cm_test xstat_fs_test ; do
1198 rm -f $RPM_BUILD_ROOT%{_bindir}/$f
1201 # not supported on Linux or duplicated
1202 for f in kdb rmtsysd kpwvalid ; do
1203 rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
1205 # sometimes install sucks and puts down a directory. kill it all.
1206 rm -rf $RPM_BUILD_ROOT%{_sbindir}/kdump*
1208 # remove man pages from programs deleted above
1209 for f in 1/dlog 1/dpass 1/livesys 1/xstat_cm_test 1/xstat_fs_test 8/kdb 8/kpwvalid 8/xfs_size_check 1/package_test 5/package 8/package ; do
1210 rm -f $RPM_BUILD_ROOT%{_mandir}/man$f.*
1213 # PAM modules are doubly-installed Remove the version we don't need
1214 for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
1215 rm -f $RPM_BUILD_ROOT%{_libdir}/$f
1218 %if !%{build_authlibs}
1219 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
1220 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
1221 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
1222 rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
1227 %if %{build_modules}
1229 for kvariant in %{kvariants}
1231 if [ -n "$kvariant" ] ; then
1232 if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
1233 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
1234 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
1236 srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
1237 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
1240 if [ -d ${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs ] ; then
1241 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}/extra/openafs
1242 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}/extra/openafs
1244 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1245 dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}/extra/openafs
1250 install -m 755 ${srcdir}/openafs.ko ${dstdir}/openafs.ko
1253 # Install the kernel modules
1254 for variation in %{kvariations}
1256 if [ ${variation} = up ]
1259 modname=openafs${kmodend}
1261 kvar=%{kxmoddir}${variation}
1262 modname=openafs${kmodend}
1265 srcdir=${sysname}/dest/root.client/lib/modules/%{kverrel}${kvariant}/extra/openafs
1266 dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
1270 install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
1275 ##############################################################################
1279 ##############################################################################
1281 rm -f openafs-file-list
1282 [ "$RPM_BUILD_ROOT" != "/" -a "x%{debugspec}" != "x1" ] && \
1283 rm -fr $RPM_BUILD_ROOT
1286 ##############################################################################
1290 ##############################################################################
1291 %if %{build_userspace}
1294 if [ -e %{_prefix}/afsws ]; then
1295 /bin/rm -fr %{_prefix}/afsws
1299 chkconfig --add openafs-client
1300 if [ ! -d /afs ]; then
1302 chown root.root /afs
1306 # Create the CellServDB
1307 [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
1309 ( cd /usr/vice/etc ; \
1310 cat CellServDB.local CellServDB.dist > CellServDB ; \
1311 chmod 644 CellServDB )
1314 echo The AFS cache is configured for 100 MB. Edit the
1315 echo /usr/vice/etc/cacheinfo file to change this before
1316 echo running AFS for the first time. You should also
1317 echo set your home cell in /usr/vice/etc/ThisCell.
1319 echo Also, you may want to edit /etc/pam.d/login and
1320 echo possibly others there to get an AFS token on login.
1323 echo auth sufficient %{pamdir}/pam_afs.so try_first_pass ignore_root
1325 echo before the one for pwdb.
1329 chkconfig --add openafs-server
1330 %{initdir}/openafs-server condrestart
1332 %if %{build_authlibs}
1341 if [ $1 = 0 ] ; then
1342 [ -d /afs ] && rmdir /afs
1346 if [ $1 = 0 ] ; then
1347 %{initdir}/openafs-client stop
1348 chkconfig --del openafs-client
1352 if [ $1 = 0 ] ; then
1353 %{initdir}/openafs-server stop
1354 chkconfig --del openafs-server
1357 %if %{build_dkmspkg}
1358 %post -n dkms-%{name}
1359 dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1360 dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1361 dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
1363 %preun -n dkms-%{name}
1364 dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
1368 %if %{build_modules}
1372 /sbin/depmod -ae %{kernvers}
1375 /sbin/depmod -ae %{kernvers}
1381 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1384 /sbin/depmod -ae %{kernvers}%{?smp_ext:%{smp_ext}}
1387 %if %{largesmp_package}
1388 %post kernel-largesmp
1389 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1391 %postun kernel-largesmp
1392 /sbin/depmod -ae %{kernvers}%{?largesmp_ext:%{largesmp_ext}}
1395 %if %{bigmem_package}
1397 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1399 %postun kernel-bigmem
1400 /sbin/depmod -ae %{kernvers}%{?bigmem_ext:%{bigmem_ext}}
1403 %if %{hugemem_package}
1404 %post kernel-hugemem
1405 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1407 %postun kernel-hugemem
1408 /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
1413 ##############################################################################
1417 ##############################################################################
1418 %if %{build_userspace}
1420 %files -f openafs-file-list
1421 %defattr(-,root,root)
1422 %config /etc/sysconfig/openafs
1423 %doc %{_docdir}/openafs-%{afsvers}/LICENSE
1426 %defattr(-,root,root)
1427 %doc %{_docdir}/openafs-%{afsvers}
1430 %defattr(-,root,root)
1431 %dir %{_prefix}/vice
1432 %dir %{_prefix}/vice/cache
1433 %dir %{_prefix}/vice/etc
1434 %{_prefix}/vice/etc/CellServDB.dist
1435 %config %{_prefix}/vice/etc/ThisCell
1436 %config %{_prefix}/vice/etc/cacheinfo
1439 %{_prefix}/vice/etc/afsd
1440 %{pamdir}/pam_afs.krb.so.1
1441 %{pamdir}/pam_afs.krb.so
1442 %{pamdir}/pam_afs.so.1
1443 %{pamdir}/pam_afs.so
1444 %{initdir}/openafs-client
1445 %{_mandir}/man1/cmdebug.*
1446 %{_mandir}/man1/up.*
1447 %{_mandir}/man5/afs*
1448 %{_mandir}/man5/cacheinfo.*
1449 %{_mandir}/man8/afsd.*
1450 %{_mandir}/man5/CellAlias.*
1453 %defattr(-,root,root)
1455 %dir %{_prefix}/afs/bin
1456 %dir %{_prefix}/afs/etc
1457 %dir %{_prefix}/afs/logs
1458 %{_prefix}/afs/bin/bosserver
1459 %{_prefix}/afs/bin/bos_util
1460 %{_prefix}/afs/bin/buserver
1461 %{_prefix}/afs/bin/fileserver
1462 %{_prefix}/afs/bin/fssync-debug
1463 # Should we support KAServer?
1464 %{_prefix}/afs/bin/kaserver
1465 %{_prefix}/afs/bin/ka-forwarder
1466 %{_prefix}/afs/bin/pt_util
1467 %{_prefix}/afs/bin/ptserver
1468 %{_prefix}/afs/bin/salvager
1469 %{_prefix}/afs/bin/state_analyzer
1470 %{_prefix}/afs/bin/upclient
1471 %{_prefix}/afs/bin/upserver
1472 %{_prefix}/afs/bin/vlserver
1473 %{_prefix}/afs/bin/volinfo
1474 %{_prefix}/afs/bin/volserver
1475 %{_sbindir}/kadb_check
1476 %{_sbindir}/prdb_check
1477 %{_sbindir}/vldb_check
1478 %{_sbindir}/vldb_convert
1480 %{initdir}/openafs-server
1481 %{_mandir}/man5/AuthLog.*
1482 %{_mandir}/man5/BackupLog.*
1483 %{_mandir}/man5/BosConfig.*
1484 %{_mandir}/man5/BosLog.*
1485 %{_mandir}/man5/FORCESALVAGE.*
1486 %{_mandir}/man5/FileLog.*
1487 %{_mandir}/man5/KeyFile.*
1488 %{_mandir}/man5/NetInfo.*
1489 %{_mandir}/man5/NetRestrict.*
1490 %{_mandir}/man5/NoAuth.*
1491 %{_mandir}/man5/SALVAGE.fs.*
1492 %{_mandir}/man5/SalvageLog.*
1493 %{_mandir}/man5/sysid.*
1494 %{_mandir}/man5/UserList.*
1495 %{_mandir}/man5/VLLog.*
1496 %{_mandir}/man5/VolserLog.*
1497 %{_mandir}/man5/bdb.DB0.*
1498 %{_mandir}/man5/fms.log.*
1499 %{_mandir}/man5/kaserver.DB0.*
1500 %{_mandir}/man5/kaserverauxdb.*
1501 %{_mandir}/man5/krb.conf.*
1502 %{_mandir}/man5/prdb.DB0.*
1503 %{_mandir}/man5/salvage.lock.*
1504 %{_mandir}/man5/tapeconfig.*
1505 %{_mandir}/man5/vldb.DB0.*
1506 %{_mandir}/man8/buserver.*
1507 %{_mandir}/man8/fileserver.*
1508 %{_mandir}/man8/kadb_check.*
1509 %{_mandir}/man8/ka-forwarder.*
1510 %{_mandir}/man8/prdb_check.*
1511 %{_mandir}/man8/ptserver.*
1512 %{_mandir}/man8/pt_util.*
1513 %{_mandir}/man8/salvager.*
1514 %{_mandir}/man8/salvageserver.*
1515 %{_mandir}/man8/upclient.*
1516 %{_mandir}/man8/upserver.*
1517 %{_mandir}/man8/vldb_check.*
1518 %{_mandir}/man8/vldb_convert.*
1519 %{_mandir}/man8/vlserver.*
1520 %{_mandir}/man8/voldump.*
1521 %{_mandir}/man8/volinfo.*
1522 %{_mandir}/man8/volserver.*
1524 %if %{build_authlibs}
1526 %defattr(-,root,root)
1527 %{_libdir}/libafsauthent.so.*
1528 %{_libdir}/libafsrpc.so.*
1531 %files authlibs-devel
1532 %defattr(-,root,root)
1533 %{_libdir}/libafsauthent.a
1534 %{_libdir}/libafsrpc.a
1535 %if %{build_authlibs}
1536 %{_libdir}/libafsauthent.so
1537 %{_libdir}/libafsrpc.so
1541 %defattr(-,root,root)
1544 %{_includedir}/des.h
1545 %{_includedir}/des_conf.h
1546 %{_includedir}/des_odd.h
1547 %{_includedir}/des_prototypes.h
1548 %{_includedir}/lock.h
1549 %{_includedir}/lwp.h
1550 %{_includedir}/mit-cpyright.h
1551 %{_includedir}/potpourri.h
1552 %{_includedir}/preempt.h
1554 %{_includedir}/timer.h
1555 %{_includedir}/ubik.h
1556 %{_includedir}/ubik_int.h
1561 %{_libdir}/librxkad.a
1562 %{_libdir}/librxstat.a
1563 %{_libdir}/libubik.a
1564 %{_mandir}/man1/rxgen.*
1566 %if %{build_dkmspkg}
1567 %files -n dkms-%{name}
1568 %defattr(-,root,root)
1569 %{_prefix}/src/%{name}-%{dkms_version}
1572 %files kernel-source
1573 %defattr(-,root,root)
1574 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
1575 %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
1576 %{_prefix}/src/openafs-kernel-%{afsvers}/README
1577 %{_prefix}/src/openafs-kernel-%{afsvers}/src
1580 %defattr(-,root,root)
1584 %defattr(-,root,root)
1590 %defattr(-,root,root)
1592 %{_bindir}/klog.krb5
1594 %{_mandir}/man1/aklog.*
1595 %{_mandir}/man8/asetkey.*
1600 %if %{build_modules}
1605 %defattr(-,root,root)
1606 %{kxmoddir}/fs/openafs/openafs.*
1611 %defattr(-,root,root)
1612 %{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
1615 %if %{largesmp_package}
1616 %files kernel-largesmp
1617 %defattr(-,root,root)
1618 %{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
1621 %if %{bigmem_package}
1622 %files kernel-bigmem
1623 %defattr(-,root,root)
1624 %{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
1627 %if %{hugemem_package}
1628 %files kernel-hugemem
1629 %defattr(-,root,root)
1630 %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
1636 ##############################################################################
1638 ### openafs.spec change log
1640 ##############################################################################
1642 * Wed Dec 12 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1643 - Make the RPM mockable
1645 * Tue Oct 29 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5
1646 - Update to match the shipped 1.4.5 RPMS
1647 - Fix the kvariant stuff to only configure the 'standard' case once
1648 - Add openafs-kvers.sh back in
1650 * Wed Oct 10 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
1651 - Use Fedora style kmods, which allows us to install multiple kernel types
1653 * Thu Jun 07 2007 Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
1654 - Use distributed files, rather than those in packager's SOURCE directory
1655 - Remove SuidCells stuff, which was unused
1657 * Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
1658 - integrate s390x changes
1659 - allow for building libafs*.a and not libafs*.so into packages, for platforms
1660 that won't build the .so files.
1662 * Wed Aug 23 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
1664 - use installed aklog manpage.
1665 - moduleparam patch obsoleted.
1667 * Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
1668 - update to 1.4.2-rc1
1669 - hand-apply lee damon's changes to support largesmp kernels from RHEL4
1670 (but only add support for 2.6 kernels. No need for the 2.4 kernels).
1671 - don't need the posixlock patch anymore.
1673 * Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
1674 - update to 1.4.2-beta2
1675 - add linux2.4 posixlock API patch
1677 * Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
1678 - moduleparam and krb524 patches no longer required in OA-CVS
1680 * Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
1681 - change non-target-cpu kernel dep to a file dep
1682 - make sure we use the proper kernel version for the dependency.
1684 * Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
1685 - allow users to specify local CellServDB and SuidCells entries
1686 don't overwrite user's changes. Provide a .dist an let users
1687 make entries in a ".local"
1688 - build the CellServDB and SuidCells at client startup and at
1690 - add provideskernelarch functionality to openafs-kvers-is.sh
1691 - use that functionality to Require kernel{,-<type>}-targetcpu
1692 to get better package safety due to RPM bugs where the kernel
1693 release isn't used so you can install the kernel module against
1694 any kernel of the same major version.
1696 * Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
1697 - update the README in openafs-kernel-source
1698 - fix openafs-kvers-is.sh from Alexander Bergolth's patch.
1699 - move kernel module from .../kernel/fs/openafs to .../fs/openafs/
1701 * Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
1702 - build requires autoconf and automake for krb5support
1703 and autoconf for standard package
1704 - dont setup the krb5 migration kit (or patches) if we don't care.
1705 - require ncurses-devel to build
1707 * Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
1708 - look for krb524 functions in libkrb524 if we can't find them
1709 in the standard locations.
1711 * Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
1712 - fix the module_param_array macro for Linux 2.6.9.
1714 * Sat Apr 15 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-1
1715 - update to 1.4.1 release.
1716 - distribute asetkey from openafs instead of krb5-migration kit
1717 - don't need to apply the FC5 patches because they are part of the distro.
1718 - install asetkey into the "proper" place
1719 - dont list a manpage twice.
1720 - package asetkey man page. delete it when not needed.
1722 * Thu Apr 6 2006 Derek Atkins <warlord@MIT.EDU>
1723 - turn authlibs back on, because RT #18767 was applied to CVS.
1725 * Wed Mar 29 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1rc10-1
1726 - update to 1.4.1rc10, build on FC5
1727 - fix the man pages (distribute into various packages)
1728 - include patches for FC5, RT #29112 and #29122
1730 * Mon Dec 19 2005 Derek Atkins <warlord@MIT.EDU>
1731 - openafs-server shouldn't depend on the kernel module.
1733 * Thu Nov 17 2005 Derek Atkins <warlord@MIT.EDU>
1734 - patch from Mike Polek <mike at pictage.com> to run depmod for
1735 the target kernel and not the running kernel.
1737 * Tue Nov 8 2005 Derek Atkins <warlord@MIT.EDU>
1738 - build aklog from the openafs sources, not from the krb5 migration kit.
1740 * Fri Nov 4 2005 Derek Atkins <warlord@MIT.EDU>
1741 - set openafs-kernel-source to Provide openafs-kernel
1743 * Thu Oct 20 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0-1
1744 - update afs-krb5 res_search patch: look for res_search and __res_search
1745 - update to 1.4.0 final
1747 * Mon Oct 10 2005 Derek Atkins <warlord@MIT.EDU>
1748 - remove all kdump builds.
1750 * Thu Oct 6 2005 Derek Atkins <warlord@MIT.EDU>
1751 - fix openafs-kernel-version.sh so it will build an RPM for the
1752 currently-running kernel even if it's smp on 2.6.
1754 * Tue Sep 27 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc5-1
1755 - upgrade to 1.4.0rc5
1756 - turn off authlibs packages
1758 * Fri Sep 23 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-2
1759 - add kmodule26 patch: fix the kernel module name on 2.6 kernels so
1760 it's called "openafs" and not "libafs". This fixes the shutdown
1763 * Thu Sep 22 2005 Derek Atkins <warlord@MIT.EDU>
1764 - update kversis script, add 'kvers' operation
1765 - fix bug that 2.6 smp/hugemem kernels don't provide
1766 kernel-foo = %{kernvers} with 'smp', 'hugemem', etc.
1767 - add patch to remove res_search from the afs-krb5 configure
1769 * Thu Sep 15 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc4-1
1770 - Update to 1.4.0rc4
1771 - Update the afs-krb5 krb524 patch so it actually works on
1772 some older systems like RHEL3 that still need -lkrb524.
1773 - Update the buildall script so choose better architecture support,
1774 e.g. don't build i586 on RHEL.
1775 - Update the rebuild information in the SPEC file.
1776 - Add support for finding .EL kernels in openafs-kvers-is.sh
1777 - Add additional error messages when kernel version/type parsing fails.
1778 - Update the buildall script to use the kernel srcdir directly.
1780 * Wed Sep 14 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-2
1781 - Add "hugemem" to 2.4 configs
1782 - Add checks to support scripts to determine whether to build
1783 the bigmem and/or hugemem kernels for 2.4.
1785 * Mon Sep 12 2005 Derek Atkins <warlord@MIT.EDU> 1.4.0rc3-1
1786 - Added some afs-krb5 patches to get the migration kit to build
1787 on modern AFS and modern Kerberos.
1788 - Added authlibs and authlibs-devel packages as per UMich changes.
1790 * Sun Sep 11 2005 Derek Atkins <warlord@MIT.EDU>
1791 - Merged in some of the 2.6 changes from wingc@engin.umich.edu
1793 * Sat Sep 10 2005 Derek Atkins <warlord@MIT.EDU>
1794 - Merged in lots of changes from David Howells and Nalin Dahyabhai
1795 from Red Hat. Initial attempt at a release of 1.4. Still need
1796 to work in a 2.6 build system.