%define afsvers @VERSION@
%define pkgvers @LINUX_PKGVER@
-# for beta/rc releases make pkgrel 0.X.<tag>
+# for beta/rc releases make pkgrel 0.<tag>
# for real releases make pkgrel 1 (or more for extra releases)
-#%define pkgrel 0.1.rc1
%define pkgrel @LINUX_PKGREL@
-%if %{?osvers:0}%{!?osvers:1}
-%define osvers 1
-%endif
-
%{!?fedorakmod: %define fedorakmod 1}
%{!?build_dkmspkg: %define build_dkmspkg 1}
# End legacy kernel build stuff
%endif
-%define dkms_version %{osvers}.%{pkgrel}
+%define dkms_version %{pkgrel}%{?dist}
# 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
# to distribute aklog and asetkey
%define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
-%if %{krb5support}
-%if %{?krb5config:0}%{!?krb5config:1}
-%define krb5config /usr/kerberos/bin/krb5-config
-%endif
-%endif
-
# Set 'bootkernelsupport' to 1 if you want to build the
# kernel module for Red Hat BOOT Kernels on x86.
%define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
# Define the location of your init.d directory
-%define initdir /etc/init.d
+%define initdir /etc/rc.d/init.d
#determine if the kernel provides an arch-specific Provides
%define kprovidesarch %(%{kversis} provideskernelarch %{ksrcdir} %{_target_cpu})
# you'll need to tweak that last bit.
%if !%{build_userspace_on_cmdline} && !%{build_modules_on_cmdline}
-%ifarch x86_64 ia64 s390 s390x
%define build_userspace 1
%define build_modules 1
-%ifarch x86_64 ia64
+%ifarch %{ix86} 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
-
-# deal with cmdline specification
-%if %{build_userspace_on_cmdline} || %{build_modules_on_cmdline}
+%else
%if !%{build_userspace_on_cmdline}
%define build_userspace 0
%endif
Summary: OpenAFS distributed filesystem
Name: openafs
Version: %{pkgvers}
-Release: %{osvers}.%{pkgrel}
+Release: %{pkgrel}%{?dist}
License: IBM Public License
URL: http://www.openafs.org
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
Group: Networking/Filesystems
BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
+BuildRequires: perl-devel perl-ExtUtils-Embed
%if %{krb5support}
BuildRequires: krb5-devel
%endif
Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
-Source20: http://dl.central.org/dl/cellservdb/CellServDB.2010-02-28
+Source20: http://dl.central.org/dl/cellservdb/CellServDB.2010-12-13
Source30: openafs-kernel-version.sh
Source996: openafs-kvers-is.sh
or kdump
To a kernel module for your running kernel, just run:
- rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{osvers}.%{pkgrel}.src.rpm
+ rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{pkgrel}%{?dist}.src.rpm
##############################################################################
#
%package authlibs-devel
%if %{build_authlibs}
-Requires: openafs-authlibs = %{version}
+Requires: openafs-authlibs = %{version}-%{release}
%endif
-Requires: openafs-devel = %{version}
+Requires: openafs-devel = %{version}-%{release}
Summary: OpenAFS shared library development
Group: Development/Filesystems
%package devel
Summary: OpenAFS Development Libraries and Headers
Group: Development/Filesystems
+Requires: openafs = %{version}-%{release}
%description devel
The AFS distributed filesystem. AFS is a distributed filesystem
%package docs
Summary: OpenAFS user and administrator documentation
-Requires: openafs = %{version}
+Requires: openafs = %{version}-%{release}
Group: Networking/Filesystems
%description docs
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
%if %{krb5support}
+%if %{?krb5config:1}%{!?krb5config:0}
KRB5_CONFIG="%{krb5config}"
export KRB5_CONFIG
%endif
+%endif
./configure --with-afs-sysname=${sysname} \
--prefix=%{_prefix} \
tar cf - -C ${sysname}/dest/root.server%{_prefix}/afs bin | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/afs
tar cf - -C ${sysname}/dest/root.client%{_prefix}/vice/etc afsd C | tar xf - -C $RPM_BUILD_ROOT%{_prefix}/vice/etc
+# Set the executable bit on libraries in libdir, so rpmbuild knows to
+# create "Provides" entries in the package metadata for the libraries
+chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so*
+
# Fix the location of restorevol, since it should be available for
# any user in /usr/bin
mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/restorevol $RPM_BUILD_ROOT%{_bindir}/restorevol
# create list of man pages that go in the 'openafs' package
/bin/ls $RPM_BUILD_ROOT%{_mandir}/man1 \
|egrep '^afs|^fs|^kas|^klog|kapasswd|pagsh|^pts|^restorevol|^rxdebug|scout|^sys|tokens|translate|udebug|unlog|^uss|^vos' \
+ |egrep -v '^afs_compile_et' \
>openafs-man1files
/bin/ls $RPM_BUILD_ROOT%{_mandir}/man5 \
>openafs-man5files
/bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
- |egrep '^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
+ |egrep '^aklog_dynamic_auth|^backup|^bos|^butc|^fms|^fssync-debug|^fstrace|^kas|^read_tape|^uss' \
>openafs-man8files
#
mkdir /afs
chown root.root /afs
chmod 0755 /afs
+ [ -x /sbin/restorecon ] && /sbin/restorecon /afs
fi
# Create the CellServDB
cat CellServDB.local CellServDB.dist > CellServDB ; \
chmod 644 CellServDB )
-echo
-echo The AFS cache is configured for 100 MB. Edit the
-echo /usr/vice/etc/cacheinfo file to change this before
-echo running AFS for the first time. You should also
-echo set your home cell in /usr/vice/etc/ThisCell.
-echo
-echo Also, you may want to edit /etc/pam.d/login and
-echo possibly others there to get an AFS token on login.
-echo Put the line:
-echo
-echo auth sufficient %{pamdir}/pam_afs.so try_first_pass ignore_root
-echo
-echo before the one for pwdb.
-echo
-
%post server
-chkconfig --add openafs-server
+#on an upgrade, don't enable if we were disabled
+if [ $1 = 1 ] ; then
+ chkconfig --add openafs-server
+fi
%{initdir}/openafs-server condrestart
%if %{build_authlibs}
%defattr(-,root,root)
%config /etc/sysconfig/openafs
%doc %{_docdir}/openafs-%{afsvers}/LICENSE
+%{_libdir}/libafshcrypto.so.*
+%{_libdir}/librokenafs.so.*
%files docs
%defattr(-,root,root)
-%doc %{_docdir}/openafs-%{afsvers}
+%docdir %{_docdir}/openafs-%{afsvers}
+%dir %{_docdir}/openafs-%{afsvers}
+%{_docdir}/openafs-%{afsvers}/ChangeLog
+%{_docdir}/openafs-%{afsvers}/RELNOTES-%{afsvers}
+%{_docdir}/openafs-%{afsvers}/pdf
%files client
%defattr(-,root,root)
%{_prefix}/vice/etc/CellServDB.dist
%config %{_prefix}/vice/etc/ThisCell
%config %{_prefix}/vice/etc/cacheinfo
+%{_bindir}/afsio
%{_bindir}/cmdebug
%{_bindir}/up
%{_prefix}/vice/etc/afsd
%{_mandir}/man1/cmdebug.*
%{_mandir}/man1/copyauth.*
%{_mandir}/man1/up.*
-%{_mandir}/man5/afs*
+%{_mandir}/man5/afs.5.gz
+%{_mandir}/man5/afs_cache.5.gz
+%{_mandir}/man5/afs_volume_header.5.gz
+%{_mandir}/man5/afszcm.cat.5.gz
%{_mandir}/man5/cacheinfo.*
%{_mandir}/man8/afsd.*
%{_mandir}/man8/rmtsysd.*
%defattr(-,root,root)
%{_includedir}/kopenafs.h
%{_libdir}/libafsauthent.a
+%{_libdir}/libafscp.a
%{_libdir}/libafsrpc.a
%{_libdir}/libafsauthent_pic.a
%{_libdir}/libafsrpc_pic.a
%{_bindir}/afs_compile_et
%{_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}/libdes.a
+%{_libdir}/libafshcrypto.a
+%{_libdir}/libafshcrypto.so
%{_libdir}/liblwp.a
+%{_libdir}/librokenafs.a
+%{_libdir}/librokenafs.so
%{_libdir}/librx.a
%{_libdir}/librxkad.a
%{_libdir}/librxstat.a