# Determine presence of rpmbuild command line --define arguments and set
# defaults if not present.
#
-%define kernvers_on_cmdline %{?kernvers:1}%{!?kernvers:0}
%define build_userspace_on_cmdline %{?build_userspace:1}%{!?build_userspace:0}
%define build_modules_on_cmdline %{?build_modules:1}%{!?build_modules:0}
%define debugspec_on_cmdline %{?debugspec:1}%{!?debugspec:0}
-%if !%{kernvers_on_cmdline}
-%define kernvers %(uname -r)
-%endif
%if !%{build_userspace_on_cmdline}
%define build_userspace 1
%endif
BuildRequires: systemd-units
%endif
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 6
-BuildRequires: perl-devel
+BuildRequires: perl-devel, swig
%endif
BuildRequires: perl(ExtUtils::Embed)
%if %{krb5support}
BuildRequires: kernel-devel
%endif
-ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
+ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64 aarch64
# http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
-Source20: https://www.central.org/dl/cellservdb/CellServDB.2016-01-01
+Source20: https://www.central.org/dl/cellservdb/CellServDB.2018-05-14
-Source30: openafs-kernel-version.sh
Source996: openafs-kvers-is.sh
Source997: openafs-buildfedora.pl
Source998: openafs-buildall.sh
##############################################################################
%if %{build_modules}
-# Make debuginfo for the kernel components into their own package
-# so we can upgrade kernel and userspace seperately and still debug each
-%package -n %{name}-kernel-debuginfo
-Summary: Debug information for %{name} kernel modules
-Group: Development/Debug
-AutoReqProv: no
-%description -n %{name}-kernel-debuginfo
-This package provides debug information for %{name} kernel modules.
-
-%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*openafs.ko(\.debug)?' -o kmod-debuginfo.list}
-
%{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{depmod} %{kvariants} 2>/dev/null)}
%endif
: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
: @@@
-: @@@ kernel version: %{kernvers}
+: @@@ kernel version: %{kverrel}
: @@@ kernel variations: %{kvariants}
: @@@ PAM modules dir: %{pamdir}
: @@@ build userspace: %{build_userspace}
x86_64) sysname=amd64_linux26 ;;
alpha*) sysname=alpha_linux_26 ;;
i386|i486|i586|i686|athlon) sysname=i386_linux26 ;;
+ aarch64) sysname=arm64_linux26 ;;
*) sysname=%{_arch}_linux26 ;;
esac
--with-linux-kernel-packaging \
%if %{build_modules}
--with-linux-kernel-headers=${ksrc} \
+%else
+ --disable-kernel-module \
%endif
%if %{krb5support}
--with-krb5 \
%endif
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 6
+ --with-swig \
+%else
+ --without-swig \
+%endif
$config_opts \
|| exit 1
# Build the libafs tree
-make only_libafs_tree || exit 1
+make %{_smp_mflags} only_libafs_tree || exit 1
%if %{krb5support}
%if %{?krb5config:1}%{!?krb5config:0}
%if %{build_userspace}
# Build the user-space AFS stuff
-make all_nolibafs
+make %{_smp_mflags} all_nolibafs
%endif
%if %{build_modules}
do
if [ -n "${kvariant}" ] ; then
pushd _kmod_build_$kvariant;
- make all
+ make %{_smp_mflags} all
popd
else
- make libafs
+ make %{_smp_mflags} libafs
fi
done
%endif
#-----------------------------------------------------------------------------
# Install userspace files
#-----------------------------------------------------------------------------
-make install_nolibafs DESTDIR="$RPM_BUILD_ROOT"
+make %{_smp_mflags} install_nolibafs DESTDIR="$RPM_BUILD_ROOT"
# Set the executable bit on libraries in libdir, so rpmbuild knows to
# create "Provides" entries in the package metadata for the libraries
rm -f $RPM_BUILD_ROOT%{_mandir}/man5/AuthLog.5
rm -f $RPM_BUILD_ROOT%{_mandir}/man5/AuthLog.dir.5
%endif
+%if !(0%{?fedora} >= 15 || 0%{?rhel} >= 6)
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/AFS::ukernel.3
+%endif
#-----------------------------------------------------------------------------
# Install client and server initscripts/systemd files
%endif
%{_mandir}/man1/cmdebug.1.gz
%{_mandir}/man1/up.1.gz
-%{_mandir}/man3/AFS::ukernel.3.gz
%{_mandir}/man5/afs.5.gz
%{_mandir}/man5/afs_cache.5.gz
%{_mandir}/man5/afs_volume_header.5.gz
%{_includedir}/timer.h
%{_includedir}/ubik.h
%{_includedir}/ubik_int.h
+%{_includedir}/opr/lock.h
%{_includedir}/opr/queue.h
%{_libdir}/afs
%{_libdir}/libafshcrypto.a
%{_libdir}/libubik.a
%{_mandir}/man1/rxgen.1.gz
%{_mandir}/man1/afs_compile_et.1.gz
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 6
+%{_libdir}/perl/AFS/ukernel.pm
+%{_libdir}/perl/ukernel.so
+%{_mandir}/man3/AFS::ukernel.3.gz
+%endif
%if %{build_dkmspkg}
%files -n dkms-%{name}
%{_mandir}/man8/akeyconvert.8.gz
%{_mandir}/man8/asetkey.8.gz
%endif
+%endif # build_userspace
-%if %{build_modules}
-%files -f kmod-debuginfo.list -n %{name}-kernel-debuginfo
-%defattr(-,root,root)
-%endif
-
-%endif
##############################################################################
###
### openafs.spec change log