and the SUN ONC RPC license, with are included in the files
LICENSE.IBM and LICENSE.Sun in the same directory as this README.
+There are two ways to build the AFS kernel module on the local system:
+Building an RPM and Building Manually
+
+
+ REBUILDING FROM SOURCE RPM
+ --------------------------
+
+The first (and preferred) way to build a kernel module is to build an
+openafs-kernel RPM from the OpenAFS Source RPM. To do this you can
+just use "rpm --rebuild" from the Source RPM (SRPM) and specify that
+you want to build a module and the target CPU. For example:
+
+ rpmbuild --rebuild --define "build_modules 1" --target=i686
+
+You MUST specify the target CPU or it will not build the correct
+module for your system.
+
+For more information on all the various options for rebuilding your
+kernel module via RPM, run:
+
+ rpm -qi openafs
+
+This will explain all your options for controlling your build.
+
+
+ REBUILDING MANUALLY
+ -------------------
+
+The second method to build a kernel module is to build it manually
+from source. You really should just build the RPM, but if you really
+don't want to you can do it this way instead.
+
To build the AFS kernel module on a local system, run:
./configure
make
When it's done, the binary module will be src/MODLOAD-XXX/libafs-XXX.o
-and must be manually installed for your kernel. To do this you
-generally copy the file to /usr/vice/etc/modload:
-
- cp src/MODLOAD-XXX/libafs-XXX.o /usr/vice/etc/modload/
+(or .ko), where "XXX" is your linux kernel version. Note that it may
+also compile as src/MODLOAD-XXX/openafs.ko.
-Then you need to add this module to your SymTable by using "afsmodname"
-to generate a new SymTable:
+You must manually install this module on your system. To do this you
+generally copy the file to /lib/modules/XXX/openafs.o:
- cd /usr/vice/etc/modload
- ../afsmodname -f SymTable.local -g libafs-XXX.o
+ cp src/MODLOAD-XXX/libafs-XXX.o /lib/modules/XXX/openafs.o
-NOTE: This only works if you have your kernel compiled with symbol
-version support. Without symbol version support you will not be able
-to choose kernel modules. If you compile without kernel module
-support then you need to remove the SymTable file from
-/usr/vice/etc/modload to allow the init scripts to choose a module
-based on 'uname -r' instead of /proc/ksyms. Keep in mind that using
-/proc/ksyms is MUCH better, so it is NOT recommended to use this
-method!
+Then you need to tell your system about the new kernel module by
+running "depmod -ae XXX" to run the module dependencies for kernel
+version "XXX".
%define afsvers 1.4.2
%define pkgvers 1.4.2
+# for beta/rc releases make pkgrel 0.X.<tag>
+# for real releases make pkgrel 1 (or more for extra releases)
+#%define pkgrel 0.1.rc1
%define pkgrel 1
%if %{?osvers:0}%{!?osvers:1}
# Define the location of your init.d directory
%define initdir /etc/init.d
+#determine if the kernel provides an arch-specific Provides
+%define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
+
# Define the location of the PAM security module directory
%define pamdir /%{_lib}/security
%define kdepend kernel-source
%define up_package 1
%define smp_package 1
-%define largesmp_package 1
%define smp_ext smp
-%define largesmp_ext largesmp
%define bigmem_package %(%{kversis} find %{ksrcdir} %{_target_cpu} bigmem)
%if %{bigmem_package}
%define hugemem_ext hugemem
%endif
-%define kvariations up smp largesmp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
+%define kvariations up smp %{?bigmem_ext:%{bigmem_ext}} %{?hugemem_ext:%{hugemem_ext}}
#######################################################################
# 2.6
%else
%if %{kvers_is_26}
%define kvariations up
+%ifarch s390x
+%define ktype "smp"
+%define up_package 1
+%else
%define up_package %(%{kversis} "%{ktype}" "")
%define smp_package %(%{kversis} "%{ktype}" "smp")
-%define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
%define hugemem_package %(%{kversis} "%{ktype}" "hugemem")
+%define largesmp_package %(%{kversis} "%{ktype}" "largesmp")
+%endif
%if !%{up_package} && !%{smp_package} && !%{hugemem_package} && !%{largesmp_package}
%error "unknown kernel type: %{ktype}"
# you'll need to tweak that last bit.
%if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
-%ifarch x86_64 ia64
+%ifarch x86_64 ia64 s390 s390x
%define build_userspace 1
%define build_modules 1
+%ifarch x86_64 ia64
+%define build_authlibs 1
+%else
+%define build_authlibs 0
+%endif
%endif
%ifarch %{ix86}
%define build_userspace 0
%define build_modules 1
+%define build_authlibs 1
%endif
%ifarch i386
%define build_userspace 1
%define build_modules 0
+%define build_authlibs 1
%endif
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Packager: Derek Atkins <warlord@MIT.EDU>
Group: Networking/Filesystems
-BuildRequires: %{?kdepend:%{kdepend}, } pam-devel
+BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel
+%if %{build_userspace}
+BuildRequires: autoconf
+%endif
ExclusiveArch: %{ix86} x86_64 ia64
# http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
This package provides basic server support to host files in an AFS
Cell.
+%if %{build_authlibs}
%package authlibs
Summary: OpenAFS authentication shared libraries
Group: Networking/Filesystems
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.
+%endif
%package authlibs-devel
+%if %{build_authlibs}
Requires: openafs-authlibs = %{PACKAGE_VERSION}
+%endif
Requires: openafs-devel = %{PACKAGE_VERSION}
Summary: OpenAFS shared library development
Group: Development/Filesystems
Summary: OpenAFS programs to use with krb5
Requires: openafs = %{PACKAGE_VERSION}
Group: Networking/Filesystems
-BuildRequires: krb5-devel
+BuildRequires: krb5-devel, autoconf, automake
%description krb5
The AFS distributed filesystem. AFS is a distributed filesystem
%package kernel
Summary: OpenAFS Kernel Module (compiled for UP)
Release: %{modpkgrel}
-Provides: openafs-kernel = %{PACKAGE_VERSION}
-Requires: kernel = %{kversion}
Group: Networking/Filesystems
+Provides: openafs-kernel = %{PACKAGE_VERSION}
+%if %{kprovidesarch}
+Requires: kernel-%{_target_cpu} = %{kversion}
+%else
+Requires: /boot/config-%{kernvers}
+%endif
%description kernel
The AFS distributed filesystem. AFS is a distributed filesystem
Summary: OpenAFS Kernel Module (compiled for SMP)
Release: %{modpkgrel}
Provides: openafs-kernel = %{PACKAGE_VERSION}
-Requires: kernel-smp = %{kversion}
+%if %{kprovidesarch}
+Requires: kernel-smp-%{_target_cpu} = %{kversion}
+%else
+Requires: /boot/config-%{kernvers}%{?smp_ext:%{smp_ext}}
+%endif
Group: Networking/Filesystems
%description kernel-smp
Summary: OpenAFS Kernel Module (compiled for LARGESMP)
Release: %{modpkgrel}
Provides: openafs-kernel = %{PACKAGE_VERSION}
-Requires: kernel-largesmp = %{kversion}
+%if %{kprovidesarch}
+Requires: kernel-largesmp-%{_target_cpu} = %{kversion}
+%else
+Requires: /boot/config-%{kernvers}%{?largesmp_ext:%{largesmp_ext}}
+%endif
Group: Networking/Filesystems
%description kernel-largesmp
Summary: OpenAFS Kernel Module (compiled for SMP & big memory support)
Release: %{modpkgrel}
Provides: openafs-kernel = %{PACKAGE_VERSION}
-Requires: kernel-bigmem = %{kversion}
+%if %{kprovidesarch}
+Requires: kernel-bigmem-%{_target_cpu} = %{kversion}
+%else
+Requires: /boot/config-%{kernvers}%{?bigmem_ext:%{bigmem_ext}}
+%endif
Group: Networking/Filesystems
%description kernel-bigmem
Summary: OpenAFS Kernel Module (compiled for SMP & huge memory support)
Release: %{modpkgrel}
Provides: openafs-kernel = %{PACKAGE_VERSION}
-Requires: kernel-hugemem = %{kversion}
+%if %{kprovidesarch}
+Requires: kernel-hugemem-%{_target_cpu} = %{kversion}
+%else
+Requires: /boot/config-%{kernvers}%{?hugemem_ext:%{hugemem_ext}}
+%endif
Group: Networking/Filesystems
%description kernel-hugemem
# Populate /usr/vice/etc
uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
install -p -m 644 %{SOURCE2} $uve/ThisCell
-install -p -m 644 %{SOURCE3} $uve/CellServDB
-install -p -m 644 %{SOURCE4} $uve/SuidCells
+install -p -m 644 %{SOURCE3} $uve/CellServDB.dist
+install -p -m 644 %{SOURCE4} $uve/SuidCells.dist
install -p -m 644 %{SOURCE5} $uve/cacheinfo
#
rm -f $RPM_BUILD_ROOT%{_sbindir}/$f
done
+%if !%{build_authlibs}
+rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
+rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
+%endif
+
%endif
%if %{build_modules}
fi
srcdir=${sysname}/dest/root.client%{_prefix}/vice/etc/modload
- dstdir=$RPM_BUILD_ROOT${kvar}/kernel/fs/openafs
+ dstdir=$RPM_BUILD_ROOT${kvar}/fs/openafs
mkdir -p ${dstdir}
chmod 0755 /afs
fi
+# Create the CellServDB and SuidCells
+[ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
+[ -f /usr/vice/etc/SuidCells.local ] || touch /usr/vice/etc/SuidCells.local
+
+( cd /usr/vice/etc ; \
+ cat CellServDB.local CellServDB.dist > CellServDB ; \
+ chmod 644 CellServDB ; \
+ cat SuidCells.local SuidCells.dist > SuidCells ; \
+ chmod 644 SuidCells )
+
echo
echo The AFS cache is configured for 100 MB. Edit the
echo /usr/vice/etc/cacheinfo file to change this before
chkconfig --add openafs-server
%{initdir}/openafs-server condrestart
+%if %{build_authlibs}
%post authlibs
/sbin/ldconfig
%postun authlibs
/sbin/ldconfig
+%endif
%preun
if [ $1 = 0 ] ; then
if [ $1 = 0 ] ; then
%{initdir}/openafs-client stop
chkconfig --del openafs-client
+
+ rm -f /usr/vice/etc/CellServDB /usr/vice/etc/SuidCells
+ rm -f /usr/vice/etc/CellServDB.local /usr/vice/etc/SuidCells.local
fi
%preun server
%dir %{_prefix}/vice
%dir %{_prefix}/vice/cache
%dir %{_prefix}/vice/etc
-%config %{_prefix}/vice/etc/CellServDB
-%config %{_prefix}/vice/etc/SuidCells
+%{_prefix}/vice/etc/CellServDB.dist
+%{_prefix}/vice/etc/SuidCells.dist
%config %{_prefix}/vice/etc/ThisCell
%config %{_prefix}/vice/etc/cacheinfo
%{_bindir}/cmdebug
%{_mandir}/man8/volserver.*
#%{_mandir}/man8/vldb_convert.*
+%if %{build_authlibs}
%files authlibs
%defattr(-,root,root)
%{_libdir}/libafsauthent.so.*
%{_libdir}/libafsrpc.so.*
+%endif
%files authlibs-devel
%defattr(-,root,root)
%{_libdir}/libafsauthent.a
-%{_libdir}/libafsauthent.so
%{_libdir}/libafsrpc.a
+%if %{build_authlibs}
+%{_libdir}/libafsauthent.so
%{_libdir}/libafsrpc.so
+%endif
%files devel
%defattr(-,root,root)
%if %{up_package}
%files kernel
%defattr(-,root,root)
-%{kxmoddir}/kernel/fs/openafs/openafs.*
+%{kxmoddir}/fs/openafs/openafs.*
%endif
%if %{smp_package}
%files kernel-smp
%defattr(-,root,root)
-%{kxmoddir}%{?smp_ext:%{smp_ext}}/kernel/fs/openafs/openafs.*
+%{kxmoddir}%{?smp_ext:%{smp_ext}}/fs/openafs/openafs.*
%endif
%if %{largesmp_package}
%files kernel-largesmp
%defattr(-,root,root)
-%{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/kernel/fs/openafs/openafs.*
+%{kxmoddir}%{?largesmp_ext:%{largesmp_ext}}/fs/openafs/openafs.*
%endif
%if %{bigmem_package}
%files kernel-bigmem
%defattr(-,root,root)
-%{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/kernel/fs/openafs/openafs.*
+%{kxmoddir}%{?bigmem_ext:%{bigmem_ext}}/fs/openafs/openafs.*
%endif
%if %{hugemem_package}
###
##############################################################################
%changelog
+* Fri Dec 01 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-2
+- integrate s390x changes
+- allow for building libafs*.a and not libafs*.so into packages, for platforms
+ that won't build the .so files.
+
* Sun Aug 20 2006 Derrick Brashear <shadow@dementia.org> 1.4.2-1
- update to 1.4.2
- use installed aklog manpage.
- moduleparam patch obsoleted.
+* Tue Aug 22 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.1.rc1
+- update to 1.4.2-rc1
+- hand-apply lee damon's changes to support largesmp kernels from RHEL4
+ (but only add support for 2.6 kernels. No need for the 2.4 kernels).
+- don't need the posixlock patch anymore.
+
+* Wed Jul 12 2006 Derek Atkins <warlord@MIT.EDU> 1.4.2-0.beta2
+- update to 1.4.2-beta2
+- add linux2.4 posixlock API patch
+
+* Mon Jun 26 2006 Derek Atkins <warlord@MIT.EDU>
+- moduleparam and krb524 patches no longer required in OA-CVS
+
+* Wed May 17 2006 Derek Atkins <warlord@MIT.EDU>
+- change non-target-cpu kernel dep to a file dep
+- make sure we use the proper kernel version for the dependency.
+
+* Tue May 16 2006 Derek Atkins <warlord@MIT.EDU>
+- allow users to specify local CellServDB and SuidCells entries
+ don't overwrite user's changes. Provide a .dist an let users
+ make entries in a ".local"
+- build the CellServDB and SuidCells at client startup and at
+ client install-time
+- add provideskernelarch functionality to openafs-kvers-is.sh
+- use that functionality to Require kernel{,-<type>}-targetcpu
+ to get better package safety due to RPM bugs where the kernel
+ release isn't used so you can install the kernel module against
+ any kernel of the same major version.
+
+* Mon May 15 2006 Derek Atkins <warlord@MIT.EDU>
+- update the README in openafs-kernel-source
+- fix openafs-kvers-is.sh from Alexander Bergolth's patch.
+- move kernel module from .../kernel/fs/openafs to .../fs/openafs/
+
+* Fri Apr 21 2006 Derek Atkins <warlord@MIT.EDU>
+- build requires autoconf and automake for krb5support
+ and autoconf for standard package
+- dont setup the krb5 migration kit (or patches) if we don't care.
+- require ncurses-devel to build
+
+* Wed Apr 19 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-3
+- look for krb524 functions in libkrb524 if we can't find them
+ in the standard locations.
+
* Tue Apr 18 2006 Derek Atkins <warlord@MIT.EDU> 1.4.1-2
- fix the module_param_array macro for Linux 2.6.9.