# I need to figure out how to hook this properly into buildrequires # -- not to mention runtime requires. %define kernelversions 2.6.14-1.1740_FC5 %ifarch x86_64 %define kernelarch x86_64 %define sysname amd64_linux26 %else %define kernelarch i686 %define sysname i386_linux26 %endif Name: openafs Version: 1.4.0 Release: %{dist}4.1740 Summary: OpenAFS distributed filesystem Group: System Environment/Base License: IPL URL: http://openafs.org/ Source0: http://www.openafs.org/dl/openafs/%{version}-/openafs-%{version}-src.tar.bz2 Source1: http://grand.central.org/dl/cellservdb/CellServDB Source5: openafs-init.sh Source6: openafs-config Source98: README.RPM Source99: TODO.RPM BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # what else should be here? BuildRequires: pam-devel, ncurses-devel, flex, byacc Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig # kludge -- for some reason, libafsauthent.so gets linked against this instead # of the numbered version, and that's confusing RPM's auto-provides. someone # ought to fix that. %ifarch x86_64 Provides: libafsrpc.so()(64bit) %else Provides: libafsrpc.so %endif # this is to clean up after the older AFS packages, which have a lot more # subpackages.... Obsoletes: openafs-compat < 1.3 Obsoletes: openafs-kernel-autobuild < 1.3 Obsoletes: openafs-kernel-source < 1.3 Obsoletes: openafs-kpasswd < 1.3 Obsoletes: openafs-krb5 < 1.3 Conflicts: fake-afs # this is a problem -- Fedora Core's krbafs-utils provides pagsh already. # For now, just note the conflict. Need a real fix, though. Conflicts: krbafs-utils <= 1.2.2-6 %description 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. %package client Summary: OpenAFS filesystem client Group: System Environment/Base Requires: openafs = %{version}-%{release}, kernel >= 2.6.6-1.435 Requires(post): /sbin/chkconfig, /bin/mkdir, /sbin/depmod Requires(preun): /sbin/chkconfig, /sbin/service Obsoletes: openafs-kernel Provides: openafs-kernel Provides: afsclient %description client 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, including the required kernel modules for the following kernel versions: %{kernelversions} %package server Summary: OpenAFS filesystem server Group: System Environment/Daemons Requires: openafs-client, openafs = %{version}-%{release} %description server 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. %package devel Summary: OpenAFS development libraries and headers Group: Development/Libraries Requires: openafs = %{version}-%{release} %description devel 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. %prep %setup -q %build %configure --disable-kernel-module --with-afs-sysname=%{sysname} make all_nolibafs # If we were including a kernel-source subpackage, here'd be the place # to take a snapshot of it, before we use it to build stuff. But # something is broken with it, so it's currently not used at all. #make only_libafs_tree # build kernel modules for KVER in %{kernelversions}; do [ -e config.cache ] && rm config.cache ( cd src/libafs; make clean ) %configure --with-linux-kernel-headers=/lib/modules/${KVER}/build/ make only_libafs MPS=SP cp src/libafs/MODLOAD-${KVER}-SP/libafs.ko libafs-${KVER}-%{kernelarch}.ko [ -e config.cache ] && rm config.cache ( cd src/libafs; make clean ) %configure --with-linux-kernel-headers=/lib/modules/${KVER}smp/build/ make only_libafs MPS=MP cp src/libafs/MODLOAD-${KVER}smp-MP/libafs.ko libafs-${KVER}smp-%{kernelarch}.ko %ifarch FIXME-DETECTHUGEMEM [ -e config.cache ] && rm config.cache ( cd src/libafs; make clean ) %configure --with-linux-kernel-headers=/lib/modules/${KVER}hugemem/build/ make only_libafs MPS=MP cp src/libafs/MODLOAD-${KVER}hugemem-MP/libafs.ko libafs-${KVER}hugemem-%{kernelarch}.ko %endif done %install rm -rf $RPM_BUILD_ROOT make install_nolibafs DESTDIR=$RPM_BUILD_ROOT # install kernel modules for KVER in %{kernelversions}; do install -m 755 -d ${RPM_BUILD_ROOT}/lib/modules/${KVER}/kernel/fs/afs install -m 711 libafs-${KVER}-%{kernelarch}.ko \ ${RPM_BUILD_ROOT}/lib/modules/${KVER}/kernel/fs/afs/libafs.ko install -m 755 -d ${RPM_BUILD_ROOT}/lib/modules/${KVER}smp/kernel/fs/afs install -m 711 libafs-${KVER}smp-%{kernelarch}.ko \ ${RPM_BUILD_ROOT}/lib/modules/${KVER}smp/kernel/fs/afs/libafs.ko %ifarch FIXME-DETECTHUGEMEM install -m 755 -d ${RPM_BUILD_ROOT}/lib/modules/${KVER}hugemem/kernel/fs/afs install -m 711 libafs-${KVER}hugemem-%{kernelarch}.ko \ ${RPM_BUILD_ROOT}/lib/modules/${KVER}hugemem/kernel/fs/afs/libafs.ko %endif done # make cache directory. Ideally, this is its own partition. install -m 755 -d $RPM_BUILD_ROOT/var/cache/afs # config directories install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/init.d/ install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/openafs/ # main config file, init script # I'm half-tempted to change the final names of these to "openafs" -- just # plain afs seems inconsistent install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/afs install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/afs # afs configuration install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/openafs/CellServDB echo "/afs:/var/cache/afs:262144" > $RPM_BUILD_ROOT%{_sysconfdir}/openafs/cacheinfo echo "openafs.org" > $RPM_BUILD_ROOT%{_sysconfdir}/openafs/ThisCell touch $RPM_BUILD_ROOT%{_sysconfdir}/openafs/SuidCells echo "openafs.org openafs" > $RPM_BUILD_ROOT%{_sysconfdir}/openafs/CellAlias # just to be sure chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/openafs/* # clean up stuff that we don't want to package # DCE security system stuff -- wasn't included before -- is this # of use to anyone? rm $RPM_BUILD_ROOT/%{_bindir}/dlog rm $RPM_BUILD_ROOT/%{_bindir}/dpass # this is coming out 0 bytes. And it wasn't getting packaged before. rm $RPM_BUILD_ROOT/%{_sbindir}/kdump # we don't use these.... Red Hat has its own pam_krb5afs modules. # maybe in the future, we could configure these instead.... rm -f $RPM_BUILD_ROOT%{_libdir}/pam_afs.krb.so.1 rm -f $RPM_BUILD_ROOT%{_libdir}/pam_afs.so.1 # e2fsprogs-devel has one of these. rm $RPM_BUILD_ROOT%{_bindir}/compile_et %clean rm -rf $RPM_BUILD_ROOT %post /sbin/ldconfig %postun /sbin/ldconfig %post client /sbin/chkconfig --add afs if [ ! -e /afs ]; then /bin/mkdir /afs fi for k in %{kernelversions}; do [ -e /boot/System.map-${k} ] && /sbin/depmod -a -e -F /boot/System.map-${k} ${k} > /dev/null || : [ -e /boot/System.map-${k}smp ] && /sbin/depmod -a -e -F /boot/System.map-${k}smp ${k}smp > /dev/null || : [ -e /boot/System.map-${k}hugemem ] && /sbin/depmod -a -e -F /boot/System.map-${k}hugemem ${k}hugemem > /dev/null || : done %preun client if [ "$1" = "0" ]; then /sbin/service afs stop /sbin/chkconfig --del afs fi %postun client for k in %{kernelversions}; do [ -e /boot/System.map-${k} ] && /sbin/depmod -a -F /boot/System.map-${k} ${k} > /dev/null || : [ -e /boot/System.map-${k}smp ] && /sbin/depmod -a -F /boot/System.map-${k}smp ${k}smp > /dev/null || : [ -e /boot/System.map-${k}hugemem ] && /sbin/depmod -a -F /boot/System.map-${k}hugemem ${k}hugemem > /dev/null || : done %files %defattr(-,root,root,-) %doc README NEWS src/LICENSE %{_bindir}/afsmonitor %{_bindir}/bos %{_bindir}/fs %{_bindir}/kpasswd %{_bindir}/kpwvalid %{_bindir}/klog %{_bindir}/klog.krb %{_bindir}/knfs %{_bindir}/livesys %{_bindir}/pagsh %{_bindir}/pagsh.krb %{_bindir}/pts %{_bindir}/scout %{_bindir}/sys %{_bindir}/tokens %{_bindir}/tokens.krb %{_bindir}/translate_et %{_bindir}/udebug %{_bindir}/unlog %{_sbindir}/backup %{_sbindir}/bos_util %{_sbindir}/butc %{_sbindir}/copyauth %{_sbindir}/fms %{_sbindir}/fstrace %{_sbindir}/kas %{_sbindir}/read_tape %{_sbindir}/restorevol %{_sbindir}/rxdebug %{_sbindir}/uss %{_sbindir}/vos # fix -- the unnumbered .so files should go in devel. but something is # weird with libafsrpc.so, so they all get put here for now. %{_libdir}/*.so* %files client %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/afs %{_sysconfdir}/init.d/afs %dir %{_libdir}/openafs %dir /lib/modules/* %dir /lib/modules/*/kernel %dir /lib/modules/*/kernel/fs /lib/modules/*/kernel/fs/afs/ %dir /var/cache/afs %dir %{_sysconfdir}/openafs %config %{_sysconfdir}/openafs/CellServDB %config %{_sysconfdir}/openafs/SuidCells %config %{_sysconfdir}/openafs/ThisCell %config %{_sysconfdir}/openafs/CellAlias # this one isn't tagged as a config file because it gets # overwritten all the time and we don't want rpmsave mess # all over %verify(not md5 size mtime) %{_sysconfdir}/openafs/cacheinfo %{_bindir}/cmdebug %{_bindir}/up %{_sbindir}/afsd %files server %defattr(-,root,root) %{_sbindir}/kadb_check %{_sbindir}/kdb %{_sbindir}/kseal %{_sbindir}/kpwvalid %{_sbindir}/prdb_check %{_sbindir}/pt_util %{_sbindir}/rmtsysd %{_sbindir}/vldb_check %{_sbindir}/vldb_convert %{_sbindir}/voldump %{_sbindir}/volinfo %{_sbindir}/vsys %dir %{_libexecdir}/openafs %{_libexecdir}/openafs/kaserver %{_libexecdir}/openafs/buserver %{_libexecdir}/openafs/fileserver %{_libexecdir}/openafs/ptserver %{_libexecdir}/openafs/salvager %{_libexecdir}/openafs/upclient %{_libexecdir}/openafs/upserver %{_libexecdir}/openafs/vlserver %{_libexecdir}/openafs/volserver %{_sbindir}/bosserver %files devel %defattr(-,root,root) %{_bindir}/rxgen %{_bindir}/xstat_cm_test %{_bindir}/xstat_fs_test %{_includedir}/*.h %dir %{_includedir}/afs %{_includedir}/afs/*.h %dir %{_includedir}/rx %{_includedir}/rx/*.h %{_libdir}/*.a %dir %{_libdir}/afs %{_libdir}/afs/*.a %changelog * Wed Nov 30 2005 Matthew Miller 1.4.0-1bu45.4.1 - updated rawhide kernel * Mon Nov 28 2005 Matthew Miller 1.4.0-1bu45.4 - updated rawhide kernel * Thu Nov 24 2005 Matthew Miller 1.4.0-1bu45.3 - updated rawhide kernel * Thu Nov 24 2005 Matthew Miller 1.4.0-1bu45.2 - rebuild for FC5-test, just to see. * Wed Nov 2 2005 Matthew Miller 1.4.0-1bu45s.1s - update to 1.4.0 final - fix depmod call to work right, I think - fix to build hugemem properly on i386 - todo: split kernel packages back out. need to plan carefully to make sure it upgrades cleanly, though * Mon Oct 31 2005 Matthew Miller 1.4.0-0.rc8.0.bu45s.1s - update to 1.4.0 rc8 - build against kernel 2.6.9-5.0.5.EL * Wed Oct 12 2005 Matthew Miller 1.4.0-0.rc6.0.bu45s.1s - update to 1.4.0 rc6 - make work on 64-bit, I think. - put kernel modules in sensible place; change init script to just use modprobe -- goodbye pointless contortions. * Thu Jun 9 2005 Matthew Miller 1.3.84-bu45s.3s - version number bump for QA * Thu Jun 9 2005 Matthew Miller 1.3.84-bu45s.2s - more small init script changes * Thu Jun 9 2005 Matthew Miller 1.3.84-bu45s.1s - update to 1.3.84 - drop all previous patches -- included upstream - some tweaking to default cache options; minor changes to init script * Thu Jun 2 2005 Matthew Miller 1.3.82-bu45s.5s - whoops -- rebuild with proper i686 kernel. yeesh. * Thu Jun 2 2005 Matthew Miller 1.3.82-bu45s.4s - first package for Zodiac -- bug #4400 - quickly hack to work with kernel-devel packages; need to rearrange specfile to do this more cleanly. - don't list smp kernels separately -- just *assume*. * Mon May 23 2005 Matthew Miller 1.3.82-3.FC3.bu45.3 - update to kernel 2.6.11-1.27_FC3 - leaving support for kernel 2.6.11-1.14_FC3 so as to not surprise beta testers -- this should be removed at next update - change init script to start afs much, much earlier so it's available to other services that may want afs on boot (like, say, the auto-updates) * Wed May 4 2005 Matthew Miller 1.3.82-2.FC3.bu45.2 - add patch to back out 1.3.82 dentry revalidation changes, which cause problems. Bug #4242. For more information about the problem, see: * Fri Apr 28 2005 Matthew Miller 1.3.82-1.FC3.bu45.1 - update to 1.3.82 * Fri Apr 22 2005 Matthew Miller 1.3.81-3.FC3.bu45.3 - add patch to specify that kernel module is licensed as IPL. This will still "taint" the kernel (urgh) but at least it will do so in an informative way. - remove 2.6.10-1.770_FC3 kernels * Mon Apr 11 2005 Matthew Miller 1.3.81-2.FC3.bu45.2 - update to new FC3 kernel 2.6.11-1.14_FC3 * Wed Apr 6 2005 Matthew Miller 1.3.81-1.FC3.bu45.1 - update to 1.3.81 - pam modules no longer seem to get built at all -- maybe this is a new configure option? Need to check. Anyway, just commenting out since I hadn't been including them anyway. * Fri Mar 4 2005 Matthew Miller 1.3.79-3.FC3.bu45.3 - whoops -- correct packaging error with epoch * Thu Mar 3 2005 Matthew Miller 1.3.79-2.FC3.bu45.2 - kernel 2.6.10-1.770_FC3 - add signature/checksum check to extractkernheaders.sh - remove 0 epoch -- that's the New In Thing * Mon Feb 21 2005 Matthew Miller 0:1.3.79-1.FC3.bu45.1 - update to openafs 1.3.79 * Tue Feb 15 2005 Matthew Miller 0:1.3.78-2.FC3.bu45.4 - update to 2.6.10-1.766_FC3 * Tue Feb 8 2005 Matthew Miller 0:1.3.78-2.FC3.bu45.3 - update 2.6.10-1.760_FC3 to 2.6.10-1.762_FC3 for testing * Wed Feb 2 2005 Matthew Miller 0:1.3.78-2.FC3.bu45.2 - add kernel 2.6.10-1.760_FC3; drop test 753 build * Mon Jan 31 2005 Matthew Miller 0:1.3.78-1.FC3.bu45.1 - update to 1.3.78 version and new upstream kernel - authclient patch shouldn't be needed anymore either * Mon Jan 17 2005 Matthew Miller 0:1.3.77+-bu45.9 - update to 2005-01-17 snapshot -- should fix all outstanding problems - remove all patches except the authclient one. They're all upstream. - need to find out the details of the authclient patch and what it's specifically required for and why it's not upstream. * Fri Jan 13 2005 Matthew Miller 0:1.3.77+-bu45.3 - update to Jan 14 snapshot -- this may fix more things. - pagefollowlink test is now half fixed upstream, but not all - remove Jason McCormick's patches -- now upstream - update to 2.6.10-1.741_FC3 * Wed Jan 12 2005 Matthew Miller 0:1.3.77+-bu45.2 - add a couple of patches Jason McCormick at CERT -- he's got it working with no oopsing, so we'll try to figure out what does it. - renamed my 'zombiefix' patch to the more accurate 'task-zombie-workaround' * Fri Jan 7 2005 Matthew Miller 0:1.3.77+-bu45.1 - try daily snapshot to see if that cures the 2.6.10 kernel oopses * Thu Jan 6 2005 Matthew Miller 0:1.3.77-3.FC3bu45.3 - include FC3 2.6.10 testing kernel support - update extractheaders.sh script to have a status spinner instead of verbose output - created rlimlocation patch to make this build with 2.6.10 * Tue Jan 4 2005 Matthew Miller - rebuilt with new FC3 errata kernel - add zombiefix patch to make build with recent kernels; note that this will break if you're using gcpags. - add page_follow_link config test patch * Wed Dec 29 2004 Matthew Miller - update to 1.3.77 - build with FC3 instead of FC2 (i.e. Velouria instead of Bossanova) - put FC3 in the release to make that clear - update init script with suggestions from Mike Becher (thanks!) which should make it work on SuSE as well - add authclient patch from Frank Bagehorn (from Thomas Chung's RPM) * Tue Dec 14 2004 Matthew Miller - update to 1.3.76 - add conflicts for krbafs-utils, because of pagsh -- need real solution * Thu Dec 9 2004 Matthew Miller - update to 1.3.75 * Fri Nov 19 2004 Matthew Miller - add 2.6.9-1.6_FC2 kernel support - add buildrequires flex, byacc, and ncurses-devel * Tue Nov 16 2004 Matthew Miller - add 2.6.9-1.3_FC2 kernel support - updated TODO.RPM and README.RPM files - added conflicts: fake-afs, to prevent _that_ mess * Mon Nov 9 2004 Matthew Miller - update to 1.3.74 * Mon Oct 18 2004 Matthew Miller - update to 1.3.73 * Mon Aug 30 2004 Matthew Miller - update to 1.3.71 from Matteo Corti -- maybe it works now... * Wed Jul 14 2004 Matthew Miller - added generic Provides: afsclient * Wed Jul 07 2004 Joe Szep - bumped version number for final build * Thu Jul 2 2004 Matthew Miller - another day, anoter kernel update.... * Thu Jul 1 2004 Matthew Miller - update for 2.6.6-1.435.2.1 errata kernel * Mon Jun 28 2004 Matthew Miller - update to 1.3.65 - remove all patches -- they're in the source now. - move chkconfig script to client package -- was incorrectly in base package - add GPL to license for base package, since parts of the kernel source are included directly. - add patch to undo check for 5-paramater sock_create, which exists in original Fedora Core 2 but was put back to standard in later updates. * Fri Jun 18 2004 Matthew Miller - remove compile_et -- conflicts with e2fsprogs-devel. * Wed Jun 16 2004 Matthew Miller - scrap old spec file; start entirely new for 1.3.x and the 2.6 kernel. See README.RPM for details, and TODO.RPM for things in progress.