%define name openafs %define version 1.6.15 %define release %mkrel 1 %define dkms_version %{version}-%{release} %define module libafs %define major 1 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d %define stdevelname %mklibname %{name} -d -s %global __requires_exclude libafsrpc.so Name: %{name} Version: %{version} Release: %{release} Summary: OpenAFS distributed filesystem Group: Networking/Other License: IBM URL: http://openafs.org/ Source0: http://www.openafs.org/dl/openafs/%{version}/openafs-%{version}-src.tar.gz Source1: http://www.openafs.org/dl/openafs/%{version}/openafs-%{version}-doc.tar.gz Source2: http://grand.central.org/dl/cellservdb/CellServDB.2014-11-17 Source3: openafs-client.service ### This source isn't used, so let's comment it out for now. ## Source4: openafs.config Source5: openafs-server.service Source6: openafs.sysconfig Source7: openafs-cacheinfo BuildRequires: pam-devel BuildRequires: ncurses-devel BuildRequires: flex BuildRequires: pkgconfig(fuse) BuildRequires: bison BuildRequires: krb5-devel Requires: kmod(libafs) Conflicts: krbafs-utils Conflicts: coda-debug-backup %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: Networking/Other Requires: %{name} = %{version} Requires(post,preun): rpm-helper %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. %package server Summary: OpenAFS filesystem server Group: Networking/Other Requires: %{name}-client = %{version} Requires(post,preun): rpm-helper %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 -n %{libname} Summary: Libraries for %{name} Group: System/Libraries %description -n %{libname} This package contains the libraries needed to run programs dynamically linked with %{name}. %package -n %{develname} Summary: Libraries and header files for %{name} Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %mklibname -d %name 1 Conflicts: %mklibname -d lwp 2 Conflicts: %mklibname -d rplay %description -n %{develname} This package contains the static development libraries and headers needed to compile applications linked with OpenAFS libraries. %package -n %{stdevelname} Summary: Static libraries and header files for %{name} Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel-static = %{version}-%{release} %description -n %{stdevelname} This package contains the static development libraries and headers needed to compile applications linked with OpenAFS libraries. %package -n dkms-%{module} Summary: DKMS-ready kernel source for AFS distributed filesystem Group: Development/Kernel BuildArch: noarch Obsoletes: openafs-kernel-source Provides: openafs-kernel-source Requires(pre): dkms Requires(pre): flex Requires(post): dkms Provides: kmod(libafs) %description -n dkms-%{module} This package provides the AFS kernel module. %package doc Summary: OpenAFS doc Group: Networking/Other BuildArch: noarch %description doc This packages provides the documentation for OpenAFS. %prep %setup -q -T -b 0 %setup -q -T -D -b 1 %build ./regen.sh %serverbuild %ifarch x86_64 %define sysname amd64_linux26 %else %define sysname %{_arch}_linux26 %endif %configure2_5x \ --disable-kernel-module \ --with-afs-sysname=%{sysname} make all_nolibafs make libafs_tree %install make install_nolibafs DESTDIR=%{buildroot} # cache install -m 755 -d %{buildroot}/var/cache/%{name} # configuration install -m 755 -d %{buildroot}%{_sysconfdir}/%{name} install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/CellServDB.dist install -m 644 src/packaging/RedHat/openafs-ThisCell %{buildroot}%{_sysconfdir}/%{name}/ThisCell install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/%{name}/cacheinfo # Systemd install -m 755 -d %{buildroot}%{_unitdir} install -m 755 -d %{buildroot}%{_sysconfdir}/sysconfig install -m 755 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}-client.service install -m 755 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}-server.service install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/%{name} # kernel module install -d -m 755 %{buildroot}%{_prefix}/src cp -a libafs_tree %{buildroot}%{_prefix}/src/%{module}-%{dkms_version} cat > %{buildroot}%{_prefix}/src/%{module}-%{dkms_version}/dkms.conf <<EOF PACKAGE_VERSION="%{dkms_version}" # Items below here should not have to change with each driver version PACKAGE_NAME="%{module}" MAKE[0]="SMP=SP; eval \\\`grep CONFIG_SMP /boot/config-\${kernelver_array[0]}\\\`; [ -n \"\\\$CONFIG_SMP\" ] && SMP=MP; ./configure --with-linux-kernel-headers=\${kernel_source_dir}; make MPS=\\\$SMP; mv src/libafs/MODLOAD-*/libafs.ko ." CLEAN="make -C src/libafs clean" BUILT_MODULE_NAME[0]="\$PACKAGE_NAME" DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/" AUTOINSTALL=yes EOF # 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 %{buildroot}%{_bindir}/dpass # this is coming out 0 bytes. And it wasn't getting packaged before. # rm %{buildroot}%{_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 %{buildroot}%{_libdir}/pam_afs.krb.so.1 #rm %{buildroot}%{_libdir}/pam_afs.so.1 %multiarch_binaries %{buildroot}%{_bindir}/rxgen %multiarch_binaries %{buildroot}%{_bindir}/xstat_cm_test %multiarch_binaries %{buildroot}%{_bindir}/xstat_fs_test %multiarch_includes %{buildroot}%{_includedir}/afs/dirpath.h %multiarch_includes %{buildroot}%{_includedir}/afs/param.h # rename binaries and man page to avoid some conflicts mv %{buildroot}%{_bindir}/kpasswd{,.afs} mv %{buildroot}%{_bindir}/pagsh{,.afs} mv %{buildroot}%{_bindir}/up{,.afs} mv %{buildroot}%{_mandir}/man1/kpasswd.1 \ %{buildroot}%{_mandir}/man1/kpasswd.afs.1 mv %{buildroot}%{_mandir}/man1/pagsh.1 \ %{buildroot}%{_mandir}/man1/pagsh.afs.1 mv %{buildroot}%{_mandir}/man1/up.1 \ %{buildroot}%{_mandir}/man1/up.afs.1 mv %{buildroot}%{_mandir}/man8/upclient.8 \ %{buildroot}%{_mandir}/man8/upclient.afs.8 # fix generated files perl -pi -e 's|%{_builddir}/%{name}-%{version}/src|../..|' \ %{buildroot}%{_prefix}/src/libafs-%{version}-%{release}/src/config/Makefile.version touch %{buildroot}%{_sysconfdir}/openafs/ThisCell chmod 644 %{buildroot}%{_sysconfdir}/openafs/ThisCell %post client # Create the CellServDB # We need to do this before starting the service [ -f /etc/openafs/CellServDB.local ] || touch /etc/openafs/CellServDB.local ( cd /etc/openafs ; \ cat CellServDB.local CellServDB.dist > CellServDB ; \ chmod 644 CellServDB ) %_post_service %{name}-client if [ ! -e /afs ]; then mkdir /afs fi %preun client %_preun_service %{name}-client %post server %_post_service %{name}-server %preun server %_preun_service %{name}-server %post -n dkms-%{module} dkms add -m %{module} -v %{dkms_version} --rpm_safe_upgrade dkms build -m %{module} -v %{dkms_version} --rpm_safe_upgrade dkms install -m %{module} -v %{dkms_version} --rpm_safe_upgrade %preun -n dkms-%{module} dkms remove -m %{module} -v %{dkms_version} --rpm_safe_upgrade --all ||: %files %doc README NEWS src/LICENSE %{_bindir}/afs_compile_et %{_bindir}/afsmonitor %{_bindir}/aklog %{_bindir}/asetkey %{_bindir}/bos %{_bindir}/fs %{_bindir}/klog %{_bindir}/klog.krb %{_bindir}/klog.krb5 %{_bindir}/knfs %{_bindir}/afsio %{_bindir}/kpasswd.afs %{_bindir}/kpwvalid %{_bindir}/livesys %{_bindir}/pagsh.afs %{_bindir}/pagsh.krb %{_bindir}/pts %{_bindir}/scout %{_bindir}/sys %{_bindir}/tokens %{_bindir}/tokens.krb %{_bindir}/translate_et %{_bindir}/udebug %{_bindir}/unlog %{_bindir}/restorevol %{_sbindir}/backup %{_sbindir}/dafssync-debug %{_sbindir}/fssync-debug %{_sbindir}/salvsync-debug %{_sbindir}/state_analyzer %{_sbindir}/afsd.fuse %{_sbindir}/bos_util %{_sbindir}/butc %{_sbindir}/fms %{_sbindir}/fstrace %{_sbindir}/kas %{_sbindir}/read_tape %{_sbindir}/rxdebug %{_sbindir}/uss %{_sbindir}/vos %{_datadir}/%{name}/ %{_mandir}/man1/afsmonitor.1* %{_mandir}/man1/fs.1* %{_mandir}/man1/klog.1* %{_mandir}/man1/knfs.1* %{_mandir}/man1/livesys.1* %{_mandir}/man1/pagsh.afs.1* %{_mandir}/man1/pts.1* %{_mandir}/man1/scout.1* %{_mandir}/man1/sys.1* %{_mandir}/man1/tokens.1* %{_mandir}/man1/translate_et.1* %{_mandir}/man1/udebug.1* %{_mandir}/man1/unlog.1* %{_mandir}/man1/rxdebug.1* %{_mandir}/man1/vos.1* %{_mandir}/man1/kpasswd.afs.1* %files client %config(noreplace) %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/ThisCell %config(noreplace) %{_sysconfdir}/%{name}/cacheinfo %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_unitdir}/%{name}-client.service %{_bindir}/cmdebug %{_bindir}/up.afs %{_sbindir}/afsd %{_mandir}/man1/up.afs.1* /var/cache/%{name} %files server %{_unitdir}/%{name}-server.service %{_sbindir}/bosserver %{_sbindir}/ka-forwarder %{_sbindir}/kadb_check %{_sbindir}/kdb %{_sbindir}/kpwvalid %{_sbindir}/prdb_check %{_sbindir}/pt_util %{_sbindir}/rmtsysd %{_sbindir}/vldb_check %{_sbindir}/vldb_convert %{_sbindir}/voldump %{_sbindir}/volinfo %{_sbindir}/volscan %{_sbindir}/vsys %{_libdir}/openafs %{_libexecdir}/openafs %{_mandir}/man8/bosserver.8* %{_mandir}/man8/kadb_check.8* %{_mandir}/man8/kdb.8* %{_mandir}/man8/kpwvalid.8* %{_mandir}/man8/prdb_check.8* %{_mandir}/man8/vldb_check.8* %{_mandir}/man8/voldump.8* %{_mandir}/man8/volinfo.8* %files -n %{libname} %{_libdir}/*.so.* %files -n %{stdevelname} %{_libdir}/*.a %files -n %{develname} %multiarch %{multiarch_bindir}/rxgen %multiarch %{multiarch_bindir}/xstat_cm_test %multiarch %{multiarch_bindir}/xstat_fs_test %{_bindir}/rxgen %{_bindir}/xstat_cm_test %{_bindir}/xstat_fs_test %{_includedir}/*.h %{_includedir}/afs %{_includedir}/rx %multiarch %{multiarch_includedir}/afs %{_libdir}/*.so %{_libdir}/afs %files -n dkms-%{module} %{_prefix}/src/%{module}-%{dkms_version} %files doc %doc doc/LICENSE doc/pdf doc/txt doc/examples %{_mandir}/man?/* %exclude %{_mandir}/man1/afsmonitor.1* %exclude %{_mandir}/man1/fs.1* %exclude %{_mandir}/man1/klog.1* %exclude %{_mandir}/man1/knfs.1* %exclude %{_mandir}/man1/livesys.1* %exclude %{_mandir}/man1/pagsh.afs.1* %exclude %{_mandir}/man1/pts.1* %exclude %{_mandir}/man1/scout.1* %exclude %{_mandir}/man1/sys.1* %exclude %{_mandir}/man1/tokens.1* %exclude %{_mandir}/man1/translate_et.1* %exclude %{_mandir}/man1/udebug.1* %exclude %{_mandir}/man1/unlog.1* %exclude %{_mandir}/man1/rxdebug.1* %exclude %{_mandir}/man1/vos.1* %exclude %{_mandir}/man1/up.afs.1* %exclude %{_mandir}/man1/kpasswd.afs.1* %exclude %{_mandir}/man8/bosserver.8* %exclude %{_mandir}/man8/kadb_check.8* %exclude %{_mandir}/man8/kdb.8* %exclude %{_mandir}/man8/kpwvalid.8* %exclude %{_mandir}/man8/prdb_check.8* %exclude %{_mandir}/man8/vldb_check.8* %exclude %{_mandir}/man8/voldump.8* %exclude %{_mandir}/man8/volinfo.8* %changelog * Fri Oct 30 2015 luigiwalser <luigiwalser> 1.6.15-1.mga5 + Revision: 896721 - 1.6.15 (fixes CVE-2015-7762 and CVE-2015-7763) - 1.6.13 (fixes CVE-2015-328[2-7]) * Fri Mar 06 2015 luigiwalser <luigiwalser> 1.6.11-1.mga5 + Revision: 817955 - 1.6.11 * Tue Dec 09 2014 luigiwalser <luigiwalser> 1.6.10-2.mga5 + Revision: 802454 - 1.6.10 - sync changes from Mageia 4 update by Thomas Spuhler: - removed in the service files "After=syslog.target" * we do not require syslog and it prevents the service from starting - removed "Source4: openafs.config as it's not being used" - removed "Patch0: openafs-1.6.1-afsd-sys-resource-h.patch" * it's not clear why we have it. There is no such patch upstream - replaced file name CellServDB with a dated name to be more clear which file we use - removed wrong afs.conf and replaced it with openafs.sysconfig from src package (Redhat) - replaced .service files with those from upstream src/packaging/Redhat * changed paths to comply with Mageia - added openafs-cacheinfo file and adapted paths - added the script # Create the CellServDB because we need those files - added some files to section # configuration of spec - restore openafs from obsolete + sander85 <sander85> - Unmaintained + security issues * Wed Oct 15 2014 umeabot <umeabot> 1.6.9-5.mga5 + Revision: 747281 - Second Mageia 5 Mass Rebuild * Thu Oct 02 2014 tv <tv> 1.6.9-4.mga5 + Revision: 734783 - adapt to new kmod() deps * Wed Sep 24 2014 tmb <tmb> 1.6.9-3.mga5 + Revision: 724102 - adapt to new kmod provides * Tue Sep 16 2014 umeabot <umeabot> 1.6.9-2.mga5 + Revision: 683182 - Mageia 5 Mass Rebuild + tv <tv> - use %%global for req/prov exclude - autoconvert to new prov/req excludes * Sun Aug 31 2014 luigiwalser <luigiwalser> 1.6.9-1.mga5 + Revision: 670143 - 1.6.9 (fixes CVE-2014-4044) * Thu Apr 10 2014 luigiwalser <luigiwalser> 1.6.7-1.mga5 + Revision: 613300 - 1.6.7 (fixes CVE-2014-0159) * Tue Oct 22 2013 umeabot <umeabot> 1.6.5.1-2.mga4 + Revision: 544820 - Mageia 4 Mass Rebuild * Tue Oct 15 2013 luigiwalser <luigiwalser> 1.6.5.1-1.mga4 + Revision: 500309 - 1.6.5.1 * Thu Jul 25 2013 luigiwalser <luigiwalser> 1.6.5-1.mga4 + Revision: 458054 - 1.6.5 (fixes CVE-2013-4134 and CVE-2013-4135) * Tue Jul 23 2013 luigiwalser <luigiwalser> 1.6.4-1.mga4 + Revision: 457513 - 1.6.4 - call service scriplets for openafs-server service * Thu May 02 2013 luigiwalser <luigiwalser> 1.6.2.1-1.mga3 + Revision: 411888 - 1.6.2.1 - remove patches 1, 2, 3, and 4 (upstreamed) - do not remove pam_afs (broken in r288605) * Tue Mar 05 2013 luigiwalser <luigiwalser> 1.6.1-6.mga3 + Revision: 401500 - add patches from debian to fix CVE-2013-179[45] * Sun Jan 13 2013 umeabot <umeabot> 1.6.1-5.mga3 + Revision: 361883 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Jan 02 2013 pterjan <pterjan> 1.6.1-4.mga3 + Revision: 337514 - Fix for _libdir != _libexecdir * Fri Nov 16 2012 fwang <fwang> 1.6.1-3.mga3 + Revision: 318557 - set dkms as noarch - doc is a noarch package * Mon Oct 22 2012 gw666 <gw666> 1.6.1-2.mga3 + Revision: 309191 - fix service scripts, see bug #7085 * Wed Sep 05 2012 fedya <fedya> 1.6.1-1.mga3 + Revision: 288605 - version update 1.6.1 + systemd.services + fix of #6008 * Tue May 08 2012 pterjan <pterjan> 1.4.14-2.mga2 + Revision: 234945 - Fix initscripts' LSB headers * Tue Feb 01 2011 dmorgan <dmorgan> 1.4.14-1.mga1 + Revision: 46006 - Remove mdv macros - imported package openafs