Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > e13bdbccf28aef9f5083a287bdaf7b69 > files > 41

openafs.SLx-1.4.3-0.rc2.36.src.rpm

%define afsvers 1.4.3
%define pkgrel 0.rc2.36

# For betas, release candidates:
%define srcvers 1.4.3rc2
#define srcvers %{afsvers}

# Which SL version is this?
# this defines SL3/4/5, SLrelease:
%{expand:%(%{_sourcedir}/openafs-sl-release-helper.sh)}

# The actual release tag for all binary packages:
%define pkgrelx %{pkgrel}.SL%{SLrelease}

# Which kernel are we building for? Default is the running one, but
# this can be overridden from the command line: --define 'kernel 2.4.21-47.EL'
# kvers is the version without variant: 2.4.21-47.ELsmp -> 2.4.21-47.EL
# variant: 2.4.21-47.ELsmp -> smp, 2.4.21-47.ELhugemem -> hugemem, ...
# dashvariant: -variant if there is one, otherwise ""

%{!?kernel: %define kernel %(uname -r)}
%define kvers %(echo %{kernel} | sed 's/\\(EL\\|el5\\).*/\\1/')
%define variant %(echo %{kernel} | sed 's/.*\\(EL\\|el5\\)//')
%define dashvariant %([ -n "%{variant}" ] && echo '-%{variant}')

# We still have to determine whether this is an SMP kernel. This is generally
# true on SL5, and for ia64 and ia32e on all SL versions. We could assume
# that any named variant is smp, but besides BOOT that would break on
# custom builds.
%{!?is_smp: %define is_smp 0}
%if %SL5
  %define is_smp 1
%endif
%ifarch ia64 ia32e
  %define is_smp 1
%endif
%if %(echo %{variant} | grep -q 'smp\|hugemem' && echo 1 || echo 0)
  %define is_smp 1
%endif

# The module suffix depends on the kernel version. In addition, the 1.2.
# packages on SL3 renamed the module to openafs, so for compatibility we
# do it in 1.4 as well. With the 2.6 kernel, changing the name makes it
# harder to unload the module (openafs.ko would still register as "libafs").
%if %SL3
  %define modsuffix o
  %define modname openafs
%else
  %define modsuffix ko
  %define modname libafs
%endif

# Determine whether the command specified what to build:
%define build_userspace_on_cmdline %{?build_userspace:1}%{!?build_userspace:0}
%define build_modules_on_cmdline %{?build_modules:1}%{!?build_modules:0}

# Set 'debugspec' to 1 if you want to debug the spec file.  This will
# not remove the installed tree as part of the %clean operation
%define debugspec 1

# Build with '--without krb5' if you don't want to build the openafs-krb5
# package to distribute aklog and asetkey
%define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}

# Shared authentication libraries aren't built on 64bit SL3:
%define authlibs_package 1
%if %SL3
  %ifarch x86_64
    %define authlibs_package 0
  %endif
%endif

# Separate init script for client/server?
%if %SL3 || %SL4
  %define split_init 0
%else
  %define split_init 1
%endif

# OpenAFS configuration options. E.g., build '--without fast_restart' .
%define enable_bitmap_later %{?_without_bitmap_later:0}%{!?_without_bitmap_later:1}
%define enable_bos_restricted_mode %{?_without_bos_restricted_mode:0}%{!?_without_bos_restricted_mode:1}
%define enable_bos_new_config %{?_without_bos_new_config:0}%{!?_without_bos_new_config:1}
%define enable_fast_restart %{?_without_fast_restart:0}%{!?_without_fast_restart:1}
%define enable_supergroups %{?_without_supergroups:0}%{!?_without_supergroups:1}
%define enable_largefile_fileserver %{?_without_largefile_fileserver:0}%{!?_without_largefile_fileserver:1}

# Define the location of your init.d directory
%define initdir /etc/init.d

# Define the location of the PAM security module directory
%define pamdir /%{_lib}/security

# Define the default size (in KB) and the location of the client cache
%define defcachesize 100000
%if %SL3
  %define defcachedir %{_prefix}/vice/cache
%else
  %define defcachedir /var/cache/openafs
%endif

# Determine which elements of OpenAFS to build.  Since we now hopefully
# build usable debuginfo packages, building the module and userspace in
# one go is no longer possible:

%if %{build_userspace_on_cmdline} || %{build_modules_on_cmdline}
  %if !%{build_userspace_on_cmdline}
    %define build_userspace 0
  %endif
  %if !%{build_modules_on_cmdline}
    %define build_modules 0
  %endif
%else
  %ifarch i486 i586 i686 ia32e athlon
    %define build_userspace 0
    %define build_modules 1
  %else
    %define build_userspace 1
    %define build_modules 0
  %endif
%endif

%if %build_modules
  %define build_userspace 0
  %define debugpkgname kernel-module-openafs-%{kernel}-debuginfo
%else
  %define build_userspace 1
  %define debugpkgname openafs-debuginfo
%endif

# Override the debuginfo package name. On SL5, this could be done inline,
# but older RPM versions require the external script:
%{expand:%(%{_sourcedir}/openafs-debugpackage.sh)}


#######################################################################
# You probably don't need to change anything beyond this line

Summary: OpenAFS Distributed Filesystem
Name: openafs.SLx
Version: %{afsvers}
Release: %{pkgrel}
Epoch: 0
License: IBM Public License
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Vendor: Scientific Linux
Group: Networking/Filesystems
ExclusiveArch: %{ix86} x86_64 ia64 ia32e

BuildRequires: pam-devel
BuildRequires: gcc
BuildRequires: flex
BuildRequires: bison
BuildRequires: ncurses-devel
BuildRequires: perl
BuildRequires: redhat-rpm-config

%if %SL3
BuildRequires: kernel-source = %{kvers}
%else
%if %build_modules
BuildRequires: kernel%{dashvariant}-devel-%{_target_cpu} = %{kvers}
%else
BuildRequires: kernel%{dashvariant}-devel = %{kvers}
%endif
%endif

# if we need to run regen.sh:
BuildRequires: autoconf
BuildRequires: automake

Source0: http://www.openafs.org/dl/openafs/${afsvers}/openafs-%{srcvers}-src.tar.bz2
Source1: http://www.openafs.org/dl/openafs/${afsvers}/openafs-%{srcvers}-doc.tar.bz2
Source2: openafs-SL-ThisCell
Source3: openafs-SL-CellServDB
Source4: openafs-SL-SuidCells
Source5: openafs-SL-CellServDB-hepix.org

Source7: openafs-LICENSE.Sun
Source8: openafs-README
Source12: openafs-CellAlias

Source20: openafs-krb5-2.0.tar.gz

Source30: http://www.tu-chemnitz.de/urz/afs/openafs/download/suse-7.2/SOURCES/openafs-killafs

Source40: openafs-rc
Source41: openafs-rc.old
Source42: openafs-rc.client
Source43: openafs-rc.server
Source44: openafs-sysconfig

Source50: man-pages.tar.gz

Source998: openafs-debugpackage.sh
Source999: openafs-sl-release-helper.sh

# next two shall be OK for all 1.3 series 
Patch100: openafs-1.3-afs.rc.linux.patch
Patch101: openafs-1.3-afs.rc.linux-df-Pk.patch
#
# 64 bit bug of aklog & Co. Thanks to Chris Wing <wingc@engin.umich.edu>
Patch103: openafs-krb5-64bit.patch

Patch104: openafs-krb5-SL4.patch

Patch204: openafs-SL-krb5-configure-amd64.patch

# for the debug package
Patch301: openafs-1.2.10-twiddle.patch
Patch302: openafs-1.3.78-afsdumpscan-acls.patch

# not needed in releases after 1.4.1
Patch1003: openafs-1.4.1-moduleparam.patch
Patch1004: openafs-1.4.1-rxkad-ticketsize.patch

# not needed after 1.4.2rc1
Patch1005: openafs-1.4.2rc1-osi_vfsop_c.patch
Patch1006: openafs-1.4.2rc1-rxubikdeclare.patch

# not needed after 1.4.2fc3
Patch1007: openafs-1.4.2fc3-x64-32bitsyscalls.patch

# needed on RHEL5beta1 x86_64
Patch1008: openafs-1.4.2fc4-rcu_read_lock.patch

# hopefully not needed after 1.4.2
Patch1009: amd64-better-range-checking-20061108.patch
Patch1010: openafs-1.4.2-SL5-dont-use-tasklist_lock.patch

Patch1011: openafs-1.4.2-linux-osi-cred-pool-byebye-20061218.patch
Patch1012: openafs-1.4.2-linux26-disable-backing-readahead-20061109.patch
Patch1013: openafs-1.4.2-linux-statfs-dentry-20061109.patch

# hopefully not needed after 1.4.3rc2
Patch1014: openafs-1.4.3rc2-fix-tasklist_lock-test.patch
Patch1015: openafs-1.4.3rc2-missing-tasklist_lock-defines.patch

Patch1016: openafs-1.4.3rc2-avoid-leaks.patch

%description
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This is the source package common to all builds on Scientific Linux 3, 4, 5.
The is no corresponding binary package. Instead, all binary packages have
their conventional names, and a suffix .SL3 (4, 5) added t the package
release.

Rebuilding this SRPM will yield all the userspace packages, or a kernel module
package for one particular kernel, or both - depending on circumstances:

o Without extra switches, the userland packages are built.

o For those kernel archs that are not identical to the base arch (i686, ia32e),
  using "--target" to build for this arch will result in building only the
  kernel module package.

o One can force what to build using "--define 'build_userspace 1'" or
  "--define 'build_modules 1'". If either of those is defined on the
  command line, the other defaults to 0.

o By default, the kernel module is built for the running kernel. To change
  this, use "--define 'kernel <Version-ReleaseVariant>'". The right value
  is the output "uname -r" would yield under the desired kernel. An SMP
  kernel should usually be detected correctly. If this fails, use 
  "--define 'is_smp 1'".

On SL3, the matching kernel-source package must be installed. If the
user running rpmbuild is not allowed to write in the kernel source tree,
a temporary copy will be created, configured correctly, and fed to the openafs
build. On SL4 and later, just the matching kernel-devel package is required.

The following server features are by default turned on but can be disabled
from the build command line:

   To disable            build with
   ===================   ==============================
   bitmap-later          --without bitmap_later          
   bos-restricted-mode   --without bos_restricted_mode 
   bos-new_config        --without bos_new_config
   fast-restart          --without fast_restart
   supergroups           --without supergroups
   largefile-fileserver  --without largefile_fileserver

%package -n openafs
Release: %{pkgrelx}
Summary: OpenAFS Distributed Filesystem
Group: Networking/Filesystem

%description -n openafs
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides common files shared across all the various
OpenAFS packages but are not necessarily tied to a client or server.

###############################################################################
#
# build the userspace side of things if so requested
#
###############################################################################
%if %{build_userspace}

%package -n openafs-client
Release: %{pkgrelx}
Requires: binutils, openafs-kernel, openafs = %{PACKAGE_VERSION}
Summary: OpenAFS Filesystem Client
Group: Networking/Filesystem

%description -n openafs-client
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides basic client support to mount and manipulate
AFS.

%package -n openafs-server
Release: %{pkgrelx}
Requires: openafs-kernel, openafs = %{PACKAGE_VERSION}
Summary: OpenAFS Filesystem Server
Group: Networking/Filesystems

%description -n openafs-server
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides basic server support to host files in an AFS
Cell.

Configure options enabled for this build:

  bitmap-later:         %enable_bitmap_later
  bos-restricted-mode:  %enable_bos_restricted_mode
  bos-new-config:       %enable_bos_new_config
  fast-restart:         %enable_fast_restart
  supergroups:          %enable_supergroups
  largefile-fileserver: %enable_largefile_fileserver

%package -n openafs-authlibs
Release: %{pkgrelx}
Summary: OpenAFS Authentication Shared Libraries
Group: Networking/Filesystems

%description -n openafs-authlibs
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides a shared version of libafsrpc and libafsauthent. 
None of the programs included with OpenAFS currently use these shared 
libraries; however, third-party software that wishes to perform AFS 
authentication may link against them.

%package -n openafs-authlibs-devel
Release: %{pkgrelx}
Requires: openafs-authlibs = %{PACKAGE_VERSION}
Requires: openafs-devel = %{PACKAGE_VERSION}
Summary: OpenAFS Shared Library Development
Group: Development/Filesystems

%description -n openafs-authlibs-devel
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package includes symlinks required for building against the dynamic 
version of libafsrpc and libafsauthent.

%package -n openafs-devel
Release: %{pkgrelx}
Summary: OpenAFS Development Libraries and Headers
Group: Development/Filesystems

%description -n openafs-devel
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides static development libraries and headers needed
to compile AFS applications.  Note: AFS currently does not provide
shared libraries.

%package -n openafs-debug
Release: %{pkgrelx}
Summary: OpenAFS Additional Debugging Utilities
Group: Networking/Filesystems

%description -n openafs-debug
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides additional tools useful for understanding and
debugging the client and server. It is completely optional.

%endif
#build_userspace
###############################################################################
#
# build the kernel modules if so requested
#
###############################################################################
%if %{build_modules}

%define kreqs %{?_with_kreqs:1}%{!?_with_kreqs:0}

%package -n kernel-module-openafs-%{kernel}
Release: %{pkgrelx}
Summary: OpenAFS Kernel Module for Kernel %kernel
Requires: openafs >= %{PACKAGE_VERSION}
%if %kreqs
%if %SL3
Requires: kernel%{dashvariant} = %{kvers}
%endif
%if %SL4
Requires: kernel%{dashvariant}-%{_target_cpu} = %{kvers}
%endif
%if %SL5
Requires: kernel-%{_target_cpu} = %{kernel}
%endif
%endif
Requires(post): modutils
Provides: openafs-kernel
#Provides: kernel-module-openafs = %{epoch}:%{version}-%{release}
Group: Networking/Filesystems

%description -n kernel-module-openafs-%{kernel}
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides an openafs kernel module for
kernel %{kernel} and architecture %{_target_cpu}.

%endif
#build modules

%package -n openafs-kernel-source
Release: %{pkgrelx}
Summary: OpenAFS Kernel Module Source Tree
Group: Networking/Filesystems

%description -n openafs-kernel-source
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides the source code to build your own AFS kernel
module.

%package -n openafs-compat
Release: %{pkgrelx}
Summary: OpenAFS Client Compatibility Symlinks
Requires: openafs = %{PACKAGE_VERSION}, openafs-client = %{PACKAGE_VERSION}
Group: Networking/Filesystems
Obsoletes: openafs-client-compat

%description -n openafs-compat
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides compatibility symlinks in /usr/afsws.  It is
completely optional, and is only necessary to support legacy
applications and scripts that hard-code the location of AFS client
programs.

%package -n openafs-kpasswd
Release: %{pkgrelx}
Summary: OpenAFS KA kpasswd Support
Requires: openafs
Group: Networking/Filesystems

%description -n openafs-kpasswd
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides the compatibility symlink for kpasswd, in case
you are using KAserver instead of Krb5.

%if %{krb5support}
%package -n openafs-krb5
Release: %{pkgrelx}
Summary: OpenAFS Programs to use with krb5
Requires: openafs = %{PACKAGE_VERSION}
Group: Networking/Filesystems
BuildRequires: krb5-devel

%description -n openafs-krb5
The AFS distributed filesystem.  AFS is a distributed filesystem
allowing cross-platform sharing of files among multiple computers.
Facilities are provided for access control, authentication, backup and
administrative management.

This package provides compatibility programs so you can use krb5
to authenticate to AFS services, instead of using AFS's homegrown
krb4 lookalike services.
%endif

###############################################################################
#
# preparation
#
###############################################################################

%prep

: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
: @@@
: @@@ kernel version:     %{kernel}
: @@@ kernel modules dir: /lib/modules/%{kernel}
: @@@ kernel RPM version: kernel-module-openafs-%{kernel}
: @@@ PAM modules dir:    %{pamdir}
: @@@ build userspace:    %{build_userspace}
: @@@ build modules:      %{build_modules}
: @@@ arch:               %{_arch}
: @@@ target cpu:         %{_target_cpu}
: @@@ is_smp:             %{is_smp}
: @@@ SL3: %SL3
: @@@ SL4: %SL4
: @@@ SL5: %SL5
: @@@ SLrelease: %SLrelease
: @@@
: @@@ bitmap-later:         %enable_bitmap_later
: @@@ bos-restricted-mode:  %enable_bos_restricted_mode
: @@@ bos-new-config:       %enable_bos_new_config
: @@@ fast-restart:         %enable_fast_restart
: @@@ supergroups:          %enable_supergroups
: @@@ largefile-fileserver: %enable_largefile_fileserver
: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

%setup -q -b 1 -n openafs-%{srcvers}
%setup -q -T -D -a 20 -n openafs-%{srcvers}
# man-pages
%setup -q -T -D -a 50 -n openafs-%{srcvers}

#%patch100 -p1
#%patch101 -p1

%ifarch x86_64 ia32e
 %if %{krb5support}
%patch103 -p0
%patch204 -p1
 %endif
%endif

%if %{krb5support}
%patch104 -p0
%endif

%patch301 -p0
%patch302 -p1

# 1.4.1:
#patch1003 -p0
#cd src/rxkad
#patch1004 -p0

# 1.4.2rc1:
#patch1005 -p1 -b .get_sb_nodev_takes_struct_vfsmount
#patch1006 -p1 -b .rxubikdeclare

# 1.4.2fc3 RHEL5beta1 x86_64:
#ifarch x86_64
#patch1007 -p1 -b .32bit-syscalls
#endif

# 1.4.2fc4 RHEL5beta1 x86_64:
#ifarch x86_64
#patch1008 -p1 -b .no-tasklist_lock
#endif

# 1.4.2 x86_64:
#if %SL3
#ifarch x86_64
#patch1009 -p1 -b .amd64-syscallhooks
#endif
#endif

# 1.4.2 SL5 2.6.18-1.2747.el5:
#if %SL5
#patch1010 -p1 -b .no-tasklist-lock
#endif

# should all be in 1.4.3:
#patch1011 -p1 -b .osi-cred-pool-byebye
#patch1012 -p1 -b .disable-backing-readahead
#patch1013 -p1 -b .statfs-dentry

%patch1014 -p1 -b .fix-tasklist-lock-test
%patch1015 -p1 -b .missing-tasklist-lock-defines

%patch1016 -p1 -b .avoid-leaks

###############################################################################
#
# building
#
###############################################################################

%build

kv=`echo %{kernel} | cut -d. --output-delimiter= -f1,2`

case %{_arch} in
        x86_64|ia32e)                   sysname=amd64_linux${kv}        ;;
        i386|i486|i586|i686|athlon)     sysname=i386_linux${kv}         ;;
        *)                              sysname=%{_arch}_linux${kv}     ;;
esac

# This is where to look for kernel build include files.
#
ktarget=`echo %{_target_cpu} | sed 's/i386/i686/'`
ksrcdir=/usr/src/kernels/%{kvers}%{dashvariant}-${ktarget}

# SL3 is a bit more difficult:
%if %SL3
ksrcdir=/usr/src/linux-%{kvers}
rm -f tksrcdir
%if %build_modules
[ -w $ksrcdir ] || {
    tksrcdir=`mktemp -d -t afs.ksrc.XXXXXX`
    cp -a $ksrcdir/* $tksrcdir
    ksrcdir=$tksrcdir
    echo $ksrcdir > tksrcdir
}
cd $ksrcdir
make mrproper
rm -f .config
extrav=`echo %{kernel} | cut -d- -f2`
sed -i 's/EXTRAVERSION = .*/EXTRAVERSION = '-"$extrav"'/' Makefile
cp configs/kernel-2.4.21-%{_target_cpu}%{dashvariant}.config .config
make oldconfig dep clean
cd -
%endif
# build_modules
%endif
# SL3

config_opts=" \
%if %{enable_bitmap_later}
	--enable-bitmap-later \
%endif
%if %{enable_bos_restricted_mode}
	--enable-bos-restricted-mode \
%endif
%if %{enable_fast_restart}
	--enable-fast-restart \
%endif
%if %{enable_bos_new_config}
	--enable-bos-new-config \
%endif
%if %{enable_supergroups}
	--enable-supergroups \
%endif
%if %{enable_largefile_fileserver}
	--enable-largefile-fileserver \
%endif
	--enable-transarc-paths"

# Configure AFS

CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS

# On some platforms, static libraries must be built with -fPIC before we can
# link them into shared objects.  Because the PAM module uses the libraries,
# we need to build them with -fPIC.  This is one way to do it.
%ifarch x86_64
CFLAGS="$CFLAGS -fPIC"; export CFLAGS
%endif


%if %{krb5support}
PATH=/usr/kerberos/bin:$PATH \
%endif
./configure --with-afs-sysname=${sysname} \
	--prefix=%{_prefix} \
	--libdir=%{_libdir} \
	--bindir=%{_bindir} \
	--sbindir=%{_sbindir} \
	--with-linux-kernel-headers=${ksrcdir} \
%if %{krb5support}
        --with-krb5-conf \
%endif
	$config_opts


%if %{build_userspace}
# Build the user-space AFS stuff
make %{_smp_mflags} dest_nolibafs || {
    : :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    : :: Repeating make dest_nolibafs, maybe we just failed once ::
    : :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    sleep 5
    make %{_smp_mflags} dest_nolibafs
}

# Build the libafs tree
make %{_smp_mflags} only_libafs_tree || {
    : ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    : :: Repeating make only_libafs_tree, maybe we just failed once ::
    : ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    sleep 5
    make %{_smp_mflags} only_libafs_tree
}

%if %{krb5support}
# Now build ka-forwarder

(cd afs-krb5/src &&
	PATH=/usr/kerberos/bin:$PATH \
        ./configure --prefix=/usr --with-krb5=/usr/kerberos \
            --with-afs=`pwd`/../../${sysname}/dest/ && \
        make all PROGS="ka-forwarder" && \
        install ka-forwarder `pwd`/../../${sysname}/dest/etc
)
%endif

# additional debugging tools

make -C src/venus twiddle
make -C src/venus whatfid
make -C src/tests dumptool
make -C src/tests afsdump_scan
make -C src/tests afsdump_extract
make -C src/vol   vol-bless

%endif
#build_userspace

%if %{build_modules}
  %if %SL3
    %if %is_smp
      make %{_smp_mflags} dest_only_libafs \
	LOCAL_SMP_DEF=-DAFS_SMP \
	MPS=MP
    %else
      make %{_smp_mflags} dest_only_libafs \
	LOCAL_SMP_DEF= \
	MPS=SP
    %endif
  %else
    make %{_smp_mflags} dest_only_libafs
  %endif
%endif

###############################################################################
#
# installation
#
###############################################################################

%install
[ %{buildroot} != / ] && rm -rf %{buildroot}

kv=`echo %{kernel} | cut -d. --output-delimiter= -f1,2`

case %{_arch} in
        x86_64|ia32e)                   sysname=amd64_linux${kv}        ;;
        i386|i486|i586|i686|athlon)     sysname=i386_linux${kv}         ;;
        *)                              sysname=%{_arch}_linux${kv}     ;;
esac
 
# Build install tree
%if %{build_userspace}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}/etc/sysconfig
mkdir -p %{buildroot}%{initdir}
mkdir -p %{buildroot}/etc/openafs
mkdir -p %{buildroot}%{pamdir}
mkdir -p %{buildroot}%{_prefix}/afs/logs
mkdir -p %{buildroot}%{_prefix}/afs/debug
mkdir -p %{buildroot}%{_prefix}/vice/etc
mkdir -p %{buildroot}%{defcachedir}
chmod 700 %{buildroot}%{defcachedir}
mkdir -p %{buildroot}%{_mandir}/man1

# Copy files from dest to the appropriate places in BuildRoot
tar cf - -C ${sysname}/dest bin include | tar xf - -C %{buildroot}%{_prefix}
tar cf - -C ${sysname}/dest/lib . | tar xf - -C %{buildroot}%{_libdir}
tar cf - -C ${sysname}/dest/etc . | tar xf - -C %{buildroot}%{_sbindir}
tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C %{buildroot}%{_prefix}/afs
tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C %{buildroot}%{_prefix}/vice/etc

# Link kpasswd to kapasswd
mv -f %{buildroot}%{_bindir}/kpasswd %{buildroot}%{_bindir}/kpasswd.openafs
ln -f %{buildroot}%{_bindir}/kpasswd.openafs %{buildroot}%{_bindir}/kapasswd
mv -f %{buildroot}%{_bindir}/pagsh %{buildroot}%{_bindir}/pagsh.openafs


# Copy root.client config files
%if %split_init
  install -m 755 %{SOURCE44} %{buildroot}/etc/sysconfig/afs
%else
  install -m 755 ${sysname}/dest/root.client%{_prefix}/vice/etc/afs.conf \
	%{buildroot}/etc/sysconfig/afs
%endif

# change default configuration
sed -i 's/^CACHESIZE=.*/CACHESIZE=%{defcachesize}/' \
	%{buildroot}/etc/sysconfig/afs
sed -i 's@^CACHEDIR=.*@CACHEDIR=%{defcachedir}@' \
	%{buildroot}/etc/sysconfig/afs

# Copy PAM modules
install -m 755 ${sysname}/dest/lib/pam* %{buildroot}%{pamdir}

# PAM symlinks
ln -sf pam_afs.so.1 %{buildroot}%{pamdir}/pam_afs.so
ln -sf pam_afs.krb.so.1 %{buildroot}%{pamdir}/pam_afs.krb.so


uve=%{buildroot}%{_prefix}/vice/etc
install -p -m 644 %{SOURCE2} $uve/ThisCell
install -p -m 644 %{SOURCE12} $uve/CellAlias
install -p -m 644 %{SOURCE3} $uve/CellServDB
install -p -m 644 %{SOURCE4} $uve/SuidCells
echo "afs:%{defcachedir}:%{defcachesize}" > $uve/cacheinfo
chmod 644 $uve/cacheinfo
#
install -p -m 755 %{SOURCE30} $uve/killafs

# add hepix.org
grep -q '>hepix.org' $uve/CellServDB || cat %{SOURCE5} >> $uve/CellServDB

# extra debugging tools
mkdir -p %{buildroot}%{_prefix}/afs/debug
for i in \
    src/viced/cbd \
    src/viced/fsprobe \
    src/viced/check_sysid \
    src/auth/setkey \
    src/fsprobe/fsprobe_test \
    src/rxdebug/rxdumptrace \
    src/venus/twiddle \
    src/venus/whatfid \
    src/venus/test/getinitparams \
    src/tests/dumptool \
    src/tests/afsdump_scan \
    src/tests/afsdump_extract \
    src/ubik/utst_client \
    src/ubik/utst_server \
    src/vlserver/cnvldb \
    src/vlserver/vlclient \
    src/vol/vol-bless \
    src/ptserver/readgroup \
    src/ptserver/readpwd \
    src/ptserver/testpt \
    src/ptserver/db_verify \
    src/kauth/rebuild \
    ;do
  strip $i || true
  install -p -m 755 $i %{buildroot}%{_prefix}/afs/debug
done

#
# LWP versions of servers (default is the pthread version)
#

install -p -m 755 src/viced/fileserver %{buildroot}%{_prefix}/afs/bin/fileserver.lwp
install -p -m 755 src/volser/volserver %{buildroot}%{_prefix}/afs/bin/volserver.lwp

#
# LWP version of butc (pthread is now the default but may still cause trouble)
#

install -p -m 755 src/butc/butc %{buildroot}%{_prefix}/sbin/butc.lwp

#
# install kernel-source
#

# Install the kernel module source tree
mkdir -p %{buildroot}%{_prefix}/src/openafs-kernel-%{afsvers}/src
tar cf - -C libafs_tree . | \
        tar xf - -C %{buildroot}%{_prefix}/src/openafs-kernel-%{afsvers}/src

# Next, copy the LICENSE Files, README
install -m 644 src/LICENSE %{buildroot}%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
install -m 644 %{SOURCE7} %{buildroot}%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
install -m 644 %{SOURCE8} %{buildroot}%{_prefix}/src/openafs-kernel-%{afsvers}/README

%if %split_init
  install -m 755 %{SOURCE42} %{buildroot}%{initdir}/afs
  install -m 755 %{SOURCE43} %{buildroot}%{initdir}/afs-server
%else
  install -m 755 %{SOURCE40} %{buildroot}%{initdir}/afs
  if [ %{modname} != libafs ]; then
    sed -i 's/libafs/%{modname}/' %{buildroot}%{initdir}/afs 
  fi
%endif

#
# Install DOCUMENTATION
#

# Build the DOC directory
mkdir -p %{buildroot}/$RPM_DOC_DIR/openafs-%{afsvers}
tar cf - -C doc LICENSE html pdf | \
    tar xf - -C %{buildroot}/$RPM_DOC_DIR/openafs-%{afsvers}

#
# man pages
#
tar cf - -C doc/man-pages man1 man5 man8 | \
    tar xf - -C %{buildroot}%{_mandir}

%if %{krb5support}
  # 
  mv %{buildroot}/usr/afs/bin/asetkey %{buildroot}%{_sbindir}
  #not in 1.4.2b3:
  #install -p -m 644 src/aklog/aklog.1 %{buildroot}%{_mandir}/man1/aklog.1  
%endif

# overwrite with improved man pages where available:
for i in man-pages/pod/*.pod; do
    n=1
    [ -e %{buildroot}%{_mandir}/man5/`basename $i .pod`.5 ] && n=5
    [ -e %{buildroot}%{_mandir}/man8/`basename $i .pod`.8 ] && n=8
    pod2man -c 'OpenAFS Documentation' $i > %{buildroot}%{_mandir}/man$n/`basename $i .pod`.$n
done

# remove unused man pages
for f in 1/dlog 1/dpass 8/kdb 1/knfs 1/package_test 5/package 8/package; do
        rm -f %{buildroot}%{_mandir}/man$f.*
done

# gzip man pages
gzip -9 %{buildroot}%{_mandir}/man*/*

# rename kpasswd to kapasswd
mv %{buildroot}%{_mandir}/man1/kpasswd.1.gz %{buildroot}%{_mandir}/man1/kapasswd.1.gz
ln -f %{buildroot}%{_mandir}/man1/kapasswd.1.gz %{buildroot}%{_mandir}/man1/kpasswd.openafs.1.gz
mv %{buildroot}%{_mandir}/man1/pagsh.1.gz %{buildroot}%{_mandir}/man1/pagsh.openafs.1.gz

# create list of man pages that go in the 'openafs' package
/bin/ls %{buildroot}%{_mandir}/man1 \
	|egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^rxdebug|scout|^sys|tokens|translate|udebug|unlog|^uss|^vos' \
	>openafs-man1files

/bin/ls %{buildroot}%{_mandir}/man5 \
	|egrep 'CellServDB|ThisCell|afsmonitor|^butc|^uss' \
	>openafs-man5files

/bin/ls %{buildroot}%{_mandir}/man8 \
	|egrep '^backup|^bos|^butc|^fms|^fstrace|^kas|^uss' \
	>openafs-man8files


#
# create filelist
#
grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
%{_bindir}/afsmonitor
%{_bindir}/bos
%{_bindir}/fs
# in openafs-kpasswd
#%{_bindir}/kapasswd
#
#%{_bindir}/kpasswd
%{_bindir}/klog
%{_bindir}/klog.krb
%{_bindir}/pagsh.openafs
%{_bindir}/pagsh.krb
%{_bindir}/pts
%{_bindir}/scout
%{_bindir}/sys
%{_bindir}/livesys
%{_bindir}/tokens
%{_bindir}/tokens.krb
%{_bindir}/translate_et
%{_bindir}/udebug
%{_bindir}/unlog
%{_sbindir}/backup
%{_sbindir}/butc
%{_sbindir}/butc.lwp
%{_sbindir}/copyauth
%{_sbindir}/fms
%{_sbindir}/fstrace
%{_sbindir}/kas
%{_sbindir}/kdump
%{_sbindir}/kseal
%{_sbindir}/read_tape
%{_sbindir}/restorevol
%{_sbindir}/rxdebug
%{_sbindir}/uss
%{_sbindir}/vos
%{_sbindir}/vsys
EOF-openafs-file-list

# add man pages to the list
cat openafs-man1files \
	| ( while read x; do echo "%{_mandir}/man1/$x"; done ) \
	>>openafs-file-list
cat openafs-man5files \
	| ( while read x; do echo "%{_mandir}/man5/$x"; done ) \
	>>openafs-file-list
cat openafs-man8files \
	| ( while read x; do echo "%{_mandir}/man8/$x"; done ) \
	>>openafs-file-list

#
# Install compatibility links
#
for d in bin:bin etc:sbin; do
  olddir=`echo $d | sed 's/:.*$//'`
  newdir=`echo $d | sed 's/^.*://'`
  mkdir -p %{buildroot}%{_prefix}/afsws/$olddir
  for f in `cat openafs-file-list`; do
    if echo $f | grep -q /$newdir/; then
      fb=`basename $f`
      ln -sf %{_prefix}/$newdir/$fb %{buildroot}%{_prefix}/afsws/$olddir/$fb
    fi
  done
done

#
# Remove files we're not installing
#

# remove duplicated files from /usr/afs/bin
for f in bos fs kas klog klog.krb pts tokens tokens.krb udebug vos; do
  rm -f %{buildroot}%{_prefix}/afs/bin/$f
done

# compile_et is duplicated in e2fsprogs
# the rest are not needed.
for f in compile_et dlog dpass install knfs; do
  rm -f %{buildroot}%{_bindir}/$f
done

# put these into the debug package instead
for f in %{buildroot}%{_bindir}/xstat_*_test; do
    mv $f %{buildroot}%{_prefix}/afs/debug
done

# Remove empty files from the krb5 migration
for f in afs2k5db fakeka kpwvalid; do
  rm -f %{buildroot}%{_sbindir}/$f
done

# not supported on Linux or duplicated
for f in kdb rmtsysd ; do
  rm -f %{buildroot}%{_sbindir}/$f
done

rm -f %{buildroot}%{_sbindir}/kdump-*

# PAM modules are doubly-installed  Remove the version we don't need
for f in pam_afs.krb.so.1 pam_afs.so.1 ; do
  rm -f %{buildroot}%{_libdir}/$f
done

#??????? /usr/include/des_prototypes.h

%endif
#build_userspace

%if %{build_modules}

srcdir=${sysname}/dest/root.client/usr/vice/etc/modload
module=${srcdir}/libafs-%{kernel}
%if %is_smp
  module=${module}.mp
%endif
module=${module}.%{modsuffix}


dstdir=%{buildroot}/lib/modules/%{kernel}/kernel/fs/openafs
mkdir -p ${dstdir}
# Mark kernel modules as executable; otherwise they won't get stripped 
# by /usr/lib/rpm/brp-strip

install -m 744 ${module} ${dstdir}/%{modname}.%{modsuffix}

%endif
#build_modules

%clean
rm -f openafs-file-list openafs-man*files
[ "%{buildroot}" != "/" -a "x%{debugspec}" != "x1" ] && \
    rm -fr %{buildroot}
[ -f tksrcdir ] && \
    tksrcdir=`cat tksrcdir` && \
    [ "$tksrcdir" != "/" -a -d "$tksrcdir" ] && \
    rm -fr $tksrcdir

###############################################################################
###
### scripts
###
###############################################################################
%if %{build_userspace}

%if ! %split_init
%post -n openafs
# If afs was configured already: don't touch
# if not add to config but disable
/sbin/chkconfig --list afs > /dev/null 2>&1
if [ $? -ne 0 ]; then
   /sbin/chkconfig --add afs
   # Add afs but put it off.
   /sbin/chkconfig --level 345 afs off
fi

%preun -n openafs
if [ $1 = 0 ] ; then
        %{initdir}/afs stop
        chkconfig --del afs
        [ -d /afs ] && rmdir /afs
fi
:
%endif

%post -n openafs-client
%if %split_init
chkconfig --list afs > /dev/null 2>&1 || {
    /sbin/chkconfig --add afs
    /sbin/chkconfig --level 345 afs off
}
%endif
[ -d /afs ] || {
    mkdir /afs
    chown root.root /afs
    chmod 0755 /afs
}
:

%preun -n openafs-client
[ $1 -eq 0 ] || exit 0
%if %split_init
/sbin/service afs stop
/sbin/chkconfig --del afs
%else
/sbin/service afs stop
%endif
[ -d /afs ] && rmdir /afs
:


%if %split_init
%post -n openafs-server
chkconfig --list afs-server > /dev/null 2>&1 || {
    /sbin/chkconfig --add afs-server
    /sbin/chkconfig --level 345 afs-server off
}
:

%preun -n openafs-server
[ $1 -eq 0 ] || exit 0
/sbin/service afs-server stop
/sbin/chkconfig --del afs-server
:
%endif

%post -n openafs-authlibs
[ $1 = 1 ] || exit 0
/sbin/ldconfig >/dev/null 2>&1 || :

%postun -n openafs-authlibs
/sbin/ldconfig >/dev/null 2>&1 || :

%endif
#build_userspace

%if %{build_modules}

%post -n kernel-module-openafs-%{kernel}
depmod -ae %{kernel} >/dev/null 2>&1 || :

%endif
#build_modules

###############################################################################
###
### file lists
###
###############################################################################
%if %{build_userspace}
%files -n openafs -f openafs-file-list
%defattr(-,root,root,-)
%config(noreplace) /etc/sysconfig/afs
%doc %{_docdir}/openafs-%{afsvers}
%if ! %split_init
%{initdir}/afs
%endif
%{_mandir}/man1/livesys.1.gz
%{_mandir}/man5/afs.5.gz

%files -n openafs-client
%defattr(-,root,root,-)
%dir %{_prefix}/vice
%dir %{_prefix}/vice/etc
%config %{_prefix}/vice/etc/CellServDB
%config(noreplace) %{_prefix}/vice/etc/CellAlias
%config(noreplace) %{_prefix}/vice/etc/SuidCells
%config(noreplace) %{_prefix}/vice/etc/ThisCell
%config(noreplace) %{_prefix}/vice/etc/cacheinfo
%{_bindir}/cmdebug
%{_bindir}/up
%{_prefix}/vice/etc/afsd
%{_prefix}/vice/etc/killafs
%{pamdir}/pam_afs.krb.so.1
%{pamdir}/pam_afs.krb.so
%{pamdir}/pam_afs.so.1
%{pamdir}/pam_afs.so
%dir %{defcachedir}
%{_mandir}/man1/cmdebug.1.gz
%{_mandir}/man1/up.1.gz
%{_mandir}/man5/afs_cache.5.gz
%{_mandir}/man5/cacheinfo.5.gz
%{_mandir}/man8/afsd.8.gz
%if %split_init
%{initdir}/afs
%endif

%files -n openafs-server
%defattr(-,root,root,-)
%dir %{_prefix}/afs
%dir %{_prefix}/afs/bin
%dir %{_prefix}/afs/logs
%{_prefix}/afs/bin/bosserver
%{_prefix}/afs/bin/bos_util
%{_prefix}/afs/bin/buserver
%{_prefix}/afs/bin/fileserver
%{_prefix}/afs/bin/fileserver.lwp
# Should we support KAServer?
%{_prefix}/afs/bin/kaserver
%{_prefix}/afs/bin/kpwvalid
%{_prefix}/afs/bin/pt_util
%{_prefix}/afs/bin/ptserver
%{_prefix}/afs/bin/salvager
%{_prefix}/afs/bin/upclient
%{_prefix}/afs/bin/upserver
%{_prefix}/afs/bin/vlserver
%{_prefix}/afs/bin/volinfo
%{_prefix}/afs/bin/volserver
%{_prefix}/afs/bin/volserver.lwp
%{_sbindir}/kadb_check
%{_sbindir}/prdb_check
%{_sbindir}/vldb_check
%{_sbindir}/vldb_convert
%{_sbindir}/voldump
%{_mandir}/man5/AuthLog.5.gz
%{_mandir}/man5/AuthLog.dir.5.gz
%{_mandir}/man5/BackupLog.5.gz
%{_mandir}/man5/BosConfig.5.gz
%{_mandir}/man5/BosLog.5.gz
%{_mandir}/man5/FORCESALVAGE.5.gz
%{_mandir}/man5/FileLog.5.gz
%{_mandir}/man5/KeyFile.5.gz
%{_mandir}/man5/NetInfo.5.gz
%{_mandir}/man5/NetRestrict.5.gz
%{_mandir}/man5/NoAuth.5.gz
%{_mandir}/man5/SALVAGE.fs.5.gz
%{_mandir}/man5/SalvageLog.5.gz
%{_mandir}/man5/UserList.5.gz
%{_mandir}/man5/VLLog.5.gz
%{_mandir}/man5/VolserLog.5.gz
%{_mandir}/man5/afs_volume_header.5.gz
%{_mandir}/man5/bdb.DB0.5.gz
%{_mandir}/man5/fms.log.5.gz
%{_mandir}/man5/kaserver.DB0.5.gz
%{_mandir}/man5/kaserverauxdb.5.gz
%{_mandir}/man5/prdb.DB0.5.gz
%{_mandir}/man5/salvage.lock.5.gz
%{_mandir}/man5/sysid.5.gz
%{_mandir}/man5/tapeconfig.5.gz
%{_mandir}/man5/vldb.DB0.5.gz
%{_mandir}/man8/backup*.8.gz
%{_mandir}/man8/bosserver.8.gz
%{_mandir}/man8/buserver.8.gz
%{_mandir}/man8/butc.8.gz
%{_mandir}/man8/kadb_check.8.gz
%{_mandir}/man8/fileserver.8.gz
%{_mandir}/man8/fms.8.gz
%{_mandir}/man8/prdb_check.8.gz
%{_mandir}/man8/ptserver.8.gz
%{_mandir}/man8/vldb_check.8.gz
%{_mandir}/man8/vlserver.8.gz
%{_mandir}/man8/voldump.8.gz
%{_mandir}/man8/volinfo.8.gz
%{_mandir}/man8/volserver.8.gz
%{_mandir}/man8/xfs_size_check.8.gz
%{_mandir}/man8/salvager.8.gz
%{_mandir}/man8/upclient.8.gz
%{_mandir}/man8/upserver.8.gz
%if %split_init
%{initdir}/afs-server
%endif

%if %authlibs_package
%files -n openafs-authlibs
%defattr(-,root,root,-)
%{_libdir}/libafsauthent.so.*
%{_libdir}/libafsrpc.so.*

%files -n openafs-authlibs-devel
%defattr(-,root,root,-)
%{_libdir}/libafsauthent.so
%{_libdir}/libafsrpc.so
%endif

%files -n openafs-devel
%defattr(-,root,root,-)
%{_bindir}/rxgen
%{_includedir}/afs
%{_includedir}/des.h
%{_includedir}/des_conf.h
%{_includedir}/des_odd.h
%{_includedir}/des_prototypes.h
%{_includedir}/lock.h
%{_includedir}/lwp.h
%{_includedir}/mit-cpyright.h
%{_includedir}/potpourri.h
%{_includedir}/preempt.h
%{_includedir}/rx
%{_includedir}/timer.h
%{_includedir}/ubik.h
%{_includedir}/ubik_int.h
%{_libdir}/afs
%{_libdir}/libafsauthent.a
%{_libdir}/libafsrpc.a
%{_libdir}/libdes.a
%{_libdir}/liblwp.a
%{_libdir}/librx.a
%{_libdir}/librxkad.a
%{_libdir}/librxstat.a
%{_libdir}/libubik.a
%{_mandir}/man1/rxgen.1.gz

%files -n openafs-kernel-source
%defattr(-,root,root,-)
%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
%{_prefix}/src/openafs-kernel-%{afsvers}/README
%{_prefix}/src/openafs-kernel-%{afsvers}/src

%files -n openafs-compat
%defattr(-,root,root,-)
%{_prefix}/afsws

%files -n openafs-kpasswd
%defattr(-,root,root,-)
%{_bindir}/kapasswd
%{_bindir}/kpasswd.openafs
%{_bindir}/kpwvalid
%{_mandir}/man1/kapasswd.1.gz
%{_mandir}/man1/kpasswd.openafs.*
%{_mandir}/man8/kpwvalid.8.gz

%if %{krb5support}
%files -n openafs-krb5
%defattr(-,root,root,-)
%{_bindir}/aklog
%{_sbindir}/asetkey
%{_sbindir}/ka-forwarder
%{_mandir}/man1/aklog.1.gz
%{_mandir}/man8/asetkey.8.gz
%endif

%files -n openafs-debug
%defattr(-,root,root,-)
%{_prefix}/afs/debug
%{_prefix}/vice/etc/C
%{_mandir}/man1/xstat_cm_test.1.gz
%{_mandir}/man1/xstat_fs_test.1.gz
%{_mandir}/man5/afszcm.cat.5.gz
%endif
#build_userspace

%if %{build_modules}
%files -n kernel-module-openafs-%{kernel}
%attr(644,root,root) /lib/modules/%{kernel}/kernel/fs/openafs/%{modname}.%{modsuffix}
%endif

###############################################################################
###
### openafs.spec change log
###
###############################################################################

%changelog
* Sun Feb 25 2007 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.3-0.rc2.36.SLx
- release candidate 2 of next upstream version
- still needs patches for the tasklist_lock issue
- added patch against leaks in the kernel module (from CVS)
- fixed retry of parallel build of only_libafs_tree 

* Sat Feb 24 2007 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-35.SLx
- put SLx macros into a helper script, recognize 4.9x as SL5
- put debuginfo override into a helper script, required by RPM on SL3/4
- fix debuginfo release
- omit kernel dependency from kernel-module unless built --with kreqs
  (work around yum limitation to help the kernel module plugin)

* Sat Dec 30 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-33.SLx
- override debuginfo package name for kernel module package
- to make this work, never build the module and userland in same run

* Wed Dec 20 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-32.SLx
- added three patches from CVS:
  Patch1011: openafs-1.4.2-linux-osi-cred-pool-byebye-20061218.patch
    will hopefully rid us of the panics due to "cannot malloc 4xxx bytes"
    observed on SL3 systems (2.4.21-47.0.1.ELsmp), even if unloaded
  Patch1012: openafs-1.4.2-linux26-disable-backing-readahead-20061109.patch
    is just there to make the noext one succeed, and should not do any harm
  Patch1013: openafs-1.4.2-linux-statfs-dentry-20061109.patch
    should provide a reasonable df output (not 0kB or 166YB) on recent
    2.6 kernels (SL5)

* Sat Nov 18 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-31.SLx
- el5 beta2: tasklist_lock is back but now GPL-only... do not use...

* Wed Nov 15 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-30.SLx
- add patch on SL3/amd64 to get the syscall hooks (should be in 1.4.3)

* Sun Nov 12 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-29.SLx
- should build on {SL3 SL4 SL5} x {i686 ia64 x86_64} x {any variant}
- renamed base package to openafs.SLx to get a common src.rpm; binary packages
  retain their usual names, with SL3 etc. appended to release; added build
  instructions to base package description
- krb5: build aklog and asetkey from source coming with the openafs tarball
  now; only ka-forwarder is still built from krb5-afs
- run parallel makes (and try again if the first attempt fails)
- make use of new (build) requirements on kernel[-devel] on SL4/5
- updated CellServDB to latest from grand.central.org (w/o openafs.org entry!)
- allow changing configure options from the command line
- record configure option in description of server package
- init script: check more thoroughly for a defined cell; try to guess it if not
- init script: subtract 32MB from cache partition size if it is ext3 when
  calculating the usable cache size, then use 70% (not 80)
- init script: use 100MB (not just 8) if cache is not on dedicated filesystem
- on SL5: separate init scripts for client and server
  - client: /etc/init.d/afs (as before), owned by openafs-client
  - server: /etc/init.d/afs-server (new), owned by openafs-server

* Thu Sep 21 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-0.fc4.18.SL5
- replace last patch by openafs-1.4.2fc4-rcu_read_lock.patch
- 32bit syscalls are in upstream now

* Mon Sep 18 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-0.fc3.17.SL5
- add openafs-1.4.2fc3-no-tasklist_lock.patch for build on RHEL5beta1 x86_64

* Sun Sep 17 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-0.fc3.16.SL5
- add openafs-1.4.2fc3-x64-32bitsyscalls.patch for build on RHEL5beta1 x86_64

* Sat Sep 09 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-0.fc3.15.SL5
- upstream final candidate 3
- besides a real fix for amd64, some quite substantial changes in salvager
  and volserver

* Sat Sep 02 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-0.fc2.15.SL5
- drop the remaining two patches that were not in 1.4.1

* Sat Aug 26 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-0.rc1.14.SL5
- find kernel headers in /usr/src/kernels
- add rxubikdeclare patch (not sure it is important)
- find kernel headers on FC6

* Thu Aug 24 2006 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-0.rc1.12.SL5
- drop patches no longer needed
- add patch 1005 for last tiny configure problem, run regen, add buildreq
  on autoconf, automake

* Sat Aug 12 2006  Stephan Wiesand <stephan.wiesand@desy.de> 1.4.2-0.beta3.11.SL5
- build on FC6T2 (ugly, ugly hacks)
- update CellServDB
- the last patch is now in upstream sources
- tag "copyright" changed to "license"
- aklog.1 is no longer in src/aklog

* Fri May 19 2006  Stephan Wiesand <stephan.wiesand@desy.de> 1.4.0-11.SL
- added openafs-1.4.1-rxkad-ticketsize.patch, see mail to openafs-info
  by H. Reuter 2006-05-17 (and the reply by R. Toebbicke)

* Mon Apr 24 2006  Stephan Wiesand <stephan.wiesand@desy.de> 1.4.0-10.SL
- new upstream release with critical bugs fixed in the fileserver
- removed patch 1002 (rra-soname-bug18767.patch), it's in upstream now
- new patch 1003 openafs-1.4.1-moduleparam.patch to get modules built on 2.6.9
  (shamelessly stolen from Derek Atkins' "official" SRPM)  
- pthreaded butc is now the default; package butc.lwp in addition, instead of
  a second butc.pthread
- adapted to upstream changes w.r.t. man pages (there are quite a few more
  now), again borrowing from Derek Atkins' spec, but still preferring the
  enhanced ones from #19268, and packaging many more of them
- spec changes to allow module build for hugemem kernels (Fabien Wernli)
- the same for the new largesmp variant
- added build requirements on gcc, flex, bison, ncurses-devel (Chris Huebsch)
- make sure /usr/kerberos/bin is leading in PATH when configuring krb5 stuff

* Thu Nov 03 2005 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.0-8.SL
- final release of 1.4.0

* Tue Oct 04 2005 Stephan Wiesand <stephan.wiesand@desy.de> 1.4.0-0rc6.8.SL
- latest release candidate, possibly the last one before 1.4.0
- added man pages (like "official" spec, but add those from RT #19268 
  and prefer them over the default ones where duplicate)
- added openafs-LICENSE.Sun (from "official" package)
- removed unused source6 openafs-modname helper
- add x-bit to kernel module to get it stripped
- really do not turn off __check_files
- remove all unpackaged files
- added xstat_*_test to debug package
- added -authlibs and -authlibs-devel packages (like "official" package,
  but keep static libs in -devel to make updates painless)
- added patch for those to correct sonames (RT #18767)
- added copyauth, kseal, vsys to main package
- added ka-forwarder to -krb5 package
- added bos_util, voldump to -server package
- added des_prototypes.h to -devel package
- updated CellServDB to latest version from grand.central.org (June 1)
  and added hepix.org cell

* Thu Aug 11 2005 Stephan Wiesand <stephan.wiesand@desy.de> 1.3.82-5.SL
- removed LSB init info from start script (breaks recent chkconfig)

* Tue May 03 2005 Stephan Wiesand <stephan.wiesand@desy.de> 1.3.82-3.SL
- added a patch (1001) from Jason McCormick <jasonmc@cert.org> to fix
  cache coherence issues with this release

* Mon May 02 2005 Stephan Wiesand <stephan.wiesand@desy.de> 1.3.82-2.SL
- added missing ia64 changes by Jarek from 1.3.80-2.SL (kernel requirement,
  module built is .mp.ko, not .ko)
- turned off leftover debugspec

* Sat Apr 30 2005 Stephan Wiesand <stephan.wiesand@desy.de> 1.3.82-1.SL
- new upstream release fixing linux 2.6 issues including the first write
  access hanging on x86/UP
- hopefully guessed right about the fix for ia64 module build (by Jarek
  for 1.3.80-2.SL, but could not find the srpm)
- made the init script a separate source file
- in init script, do not run the on_network check if ENABLE_DYNROOT=1
- package the LWP builds of fileserver & volserver (which are built but
  not installed by default) in addition to the default pthreaded ones,
  with suffix ".lwp"
- package the pthread build of butc in addition to the default LWP one,
  with suffix ".pthread"
- disable patch101 (obsoleted by upstream hack)
- removed the build hack from 1.3.80-1.SL, fixed upstream

* Tue Mar 22 2005 Stephan Wiesand <stephan.wiesand@desy.de> 1.3.80-1.SL
- new upstream version supposed to fix many problems on linux 2.6
- notice the default afsd behaviour finally has changed to -nosettime;
  add -settime to your afsd options to get back the old behaviour
- added an ugly hack to get the kernel modules built
- updated CellServDB to version from grand.central.org as of today

* Tue Mar 01 2005 Stephan Wiesand <stephan.wiesand@desy.de> 1.3.79-4.SL
- made default cache location and size macros, removed cacheinfo source5,
  generate cacheinfo in install instead
- fixed default cache size to 100MB again, resurrected the message
  in -client's post, changed default location to /var/cache/openafs
- removed unused source21 (kernel-version.sh)
- changed last afs-krb5 build patch (patch configure, not configure.in,
  and do not wipe out 64bit patch to configure by rerunning autoconf)

* Sun Feb 27 2005 Stephan Wiesand <stephan.wiesand@desy.de> 1.3.79-3.SL
- this version is SL4/1.3 only
- get afs-krb5 going
- removed tons of old cruft & patches no longer used
- adapt module build to kernel[-smp]-devel: we now require this to be
  installed, and will only build the module package for a single kernel
  defined on the command line, or the running one in none is defined
  (this gets rid of all that redhat-buildsys voodoo which seems broken
   on SL4 anyway)
- added livesys & kdump executables to main package
- added optional openafs-debug package with additional tools
- made module name in package & init script libafs instead of openafs,
  since that's what the module registers as anyway (modprobe -r openafs
  would fail)
- added a patch (101) to fix the CACHESIZE=AUTOMATIC behaviour when the cache
  is mounted on some device with a long name

* Sat Feb 26 2005  Jaroslaw Polok <jaroslaw.polok@cern.ch>
- initial attempt at build for SL 4. (2.6 kernel)

* Fri Feb 18 2005  Jaroslaw Polok <jaroslaw.polok@cern.ch>
- added build of ia32e kernel module

* Mon Jan 31 2005  Troy Dawson <dawson@fnal.gov> 15.12.SL
- All changes came from Stephan Wiesand.  Many thanks for his pointers
- afsd options chaned in spec file
- /etc/sysconfig/afs set to be %config(noreplace)
- requires wget
- removed openafs-compat %pre scripts
- Added CellAlias file, with commented out example

* Wed Jan 19 2005  Troy Dawson <dawson@fnal.gov> 15.11.SL
- Put LC_ALL=C into the startup server test. This helps with 
  internationalization. Submitted by Jaroslaw Polok

* Mon Jan 17 2005 Enrico M.V. Fasanelli <enrico@le.infn.it> 15.10.SL
- applied patch from Chris Wing for 64bit aklog & Co.

* Thu Aug 12 2004  Troy Dawson <dawson@fnal.gov> 15.7.SL
- Put -fakestat in as a default option

* Tue Aug 10 2004  Troy Dawson <dawson@fnal.gov> 15.6.SL
- Updated CellServDB
- Put -dynroot in as a default option

* Sat Jun 19 2004  Troy Dawson <dawson@fnal.gov> 15.4.SL
- Made more changes to startup script. Does sanity checks of ThisCell

* Fri Jun 18 2004  Troy Dawson <dawson@fnal.gov> 15.3.SL
- Made change to /etc/init.d/afs startup script

* Sun May 30 2004 Jaroslaw.Polok@cern.ch
- rebuilt for Scientific Linux without site-specific setup
- kerberos 5 enabled in build
* Fri Apr 16 2004  Jaroslaw.Polok@cern.ch
- changed packaging of modules again: to followup Fedora Core
  (draft) rules and allow yum/apt/up2date to handle these

* Tue Apr 06 2004  Jaroslaw.Polok@cern.ch
- changed packaging of modules

* Sun Feb 22 2004  Jaroslaw.Polok@cern.ch
- Rebuilt for CERN E. Linux (ix86/ia64/x86_64)

* Thu Sep  4 2003  David Howells <dhowells@redhat.com>> 1.2.10-4
- don't use rpm from within spec file as this can cause problems

* Wed Sep  3 2003  David Howells <dhowells@redhat.com> 1.2.10-4
- added ia64 to the ExclusiveArch list

* Fri Aug 29 2003  <David Howells <dhowells@redhat.com>> 1.2.10-3
- get rid of a %%else that causes problems with rpm-4.0.4

* Fri Aug 22 2003  David Howells <dhowells@redhat.com> 1.2.10-3
- added rpmbuild cmdline defines to control which bits to build

* Wed Aug 20 2003  Nalin Dahyabhai <nalin@redhat.com>
- obey CFLAGS set at configure-time on i386/x86_64 linux
- openafs-krb5: look in $krb5_prefix/lib64 for Kerberos libraries if they are
  not found in $krb5_prefix/lib
- build the modules for PAM on x86_64
- when checking for res_search, try to link with it instead of checking for it
  in libraries, in case it's a macro or redefined by a macro
- use %%{ix86} instead of %%{all_x86} where appropriate
- install AFS libraries into %%{_libdir} instead of %%{_prefix}/lib

* Fri Aug 15 2003  <David Howells <dhowells@redhat.com>> 1.2.10-3
- permit the kernel-to-build-against to be selected by cmdline argument to
  rpmbuild if preferred

* Thu Aug 14 2003  Nalin Dahyabhai <nalin@redhat.com>
- fix compilation of openafs-krb5 bits against krb5 1.3

* Mon Aug 11 2003  <David Howells <dhowells@redhat.com>> 1.2.10-2
- got rid of all rpmlint errors
- delete certain tags (Packager/Vendor/Distribution)

* Fri Aug  8 2003  <David Howells <dhowells@redhat.com>> 1.2.10-1
- Adapted OpenAFS version 1.2.10 to compile in beehive