mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
redhat-support-dkms-20080124
LICENSE IPL10 attempt to provide dkms support. this does work on my fc8 test host. it may not work in all cases.
This commit is contained in:
parent
80f7294490
commit
7dc71d1154
@ -35,7 +35,7 @@ elif [ `echo $rhrel | grep -c 'CentOS'` = 1 ] ; then
|
|||||||
elif [ `echo $rhrel | grep -c 'Red Hat Linux'` = 1 ] ; then
|
elif [ `echo $rhrel | grep -c 'Red Hat Linux'` = 1 ] ; then
|
||||||
ostype='rh'
|
ostype='rh'
|
||||||
osrel=`echo $rhrel | sed -e 's/^.*release \([^ ]*\).*$/\1/' -e 's/\.//g'`
|
osrel=`echo $rhrel | sed -e 's/^.*release \([^ ]*\).*$/\1/' -e 's/\.//g'`
|
||||||
elif [ `echo $rhrel | grep -c 'SUSE LINUX'` = 1 ] ; then
|
elif [ `echo $rhrel | grep -c 'SUSE'` = 1 ] ; then
|
||||||
ostype='suse'
|
ostype='suse'
|
||||||
specdir=/usr/src/packages/SPECS
|
specdir=/usr/src/packages/SPECS
|
||||||
osrel=`grep VERSION /etc/SuSE-release|awk '{print $3}'`
|
osrel=`grep VERSION /etc/SuSE-release|awk '{print $3}'`
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#
|
#
|
||||||
# chkconfig: 2345 50 50
|
# chkconfig: 2345 50 50
|
||||||
# description: OpenAFS is a distributed filesystem.
|
# description: OpenAFS is a distributed filesystem.
|
||||||
|
# Should-Start: dkms
|
||||||
#
|
#
|
||||||
# $Revision$
|
# $Revision$
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{!?fedorakmod: %define fedorakmod 1}
|
%{!?fedorakmod: %define fedorakmod 1}
|
||||||
|
%{!?build_dkmspkg: %define build_dkmspkg 1}
|
||||||
|
|
||||||
# Determine presence of rpmbuild command line --define arguments used for
|
# Determine presence of rpmbuild command line --define arguments used for
|
||||||
# option specification
|
# option specification
|
||||||
@ -70,6 +71,8 @@
|
|||||||
# End legacy kernel build stuff
|
# End legacy kernel build stuff
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define dkms_version %{osvers}.%{pkgrel}
|
||||||
|
|
||||||
# Set 'debugspec' to 1 if you want to debug the spec file. This will
|
# 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
|
# not remove the installed tree as part of the %clean operation
|
||||||
%if %{?debugspec:0}%{!?debugspec:1}
|
%if %{?debugspec:0}%{!?debugspec:1}
|
||||||
@ -80,6 +83,12 @@
|
|||||||
# to distribute aklog and asetkey
|
# to distribute aklog and asetkey
|
||||||
%define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
|
%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
|
# Set 'bootkernelsupport' to 1 if you want to build the
|
||||||
# kernel module for Red Hat BOOT Kernels on x86.
|
# kernel module for Red Hat BOOT Kernels on x86.
|
||||||
%define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
|
%define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
|
||||||
@ -217,7 +226,7 @@ Release: %{osvers}.%{pkgrel}
|
|||||||
License: IBM Public License
|
License: IBM Public License
|
||||||
URL: http://www.openafs.org
|
URL: http://www.openafs.org
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
Packager: Derek Atkins <warlord@MIT.EDU>
|
Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
|
||||||
Group: Networking/Filesystems
|
Group: Networking/Filesystems
|
||||||
BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
|
BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
|
||||||
%if %{krb5support}
|
%if %{krb5support}
|
||||||
@ -342,6 +351,29 @@ administrative management.
|
|||||||
This package provides basic server support to host files in an AFS
|
This package provides basic server support to host files in an AFS
|
||||||
Cell.
|
Cell.
|
||||||
|
|
||||||
|
%if %{build_dkmspkg}
|
||||||
|
%package -n dkms-%{name}
|
||||||
|
Summary: DKMS-ready kernel source for AFS distributed filesystem
|
||||||
|
Group: Development/Kernel
|
||||||
|
Provides: openafs-kernel = %{PACKAGE_VERSION}
|
||||||
|
%if %{fedorakmod}
|
||||||
|
Provides: %{name}-kmod = %{PACKAGE_VERSION}
|
||||||
|
%endif
|
||||||
|
Requires(pre): dkms
|
||||||
|
Requires(pre): flex
|
||||||
|
Requires(post): dkms
|
||||||
|
Requires: %{name}-kmod-common = %{version}
|
||||||
|
|
||||||
|
%description -n dkms-%{name}
|
||||||
|
The AFS distributed filesystem. 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 the source code to allow DKMS to build an
|
||||||
|
AFS kernel module.
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{build_authlibs}
|
%if %{build_authlibs}
|
||||||
%package authlibs
|
%package authlibs
|
||||||
Summary: OpenAFS authentication shared libraries
|
Summary: OpenAFS authentication shared libraries
|
||||||
@ -809,7 +841,7 @@ CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
|
|||||||
--with-linux-kernel-headers=${ksrc} \
|
--with-linux-kernel-headers=${ksrc} \
|
||||||
%endif
|
%endif
|
||||||
%if %{krb5support}
|
%if %{krb5support}
|
||||||
--with-krb5-conf=/usr/kerberos/bin/krb5-config \
|
--with-krb5-conf=%{krb5config} \
|
||||||
%endif
|
%endif
|
||||||
$config_opts \
|
$config_opts \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
@ -971,6 +1003,28 @@ install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
|
|||||||
install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
|
install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
|
||||||
install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
|
install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
|
||||||
|
|
||||||
|
#
|
||||||
|
# install dkms source
|
||||||
|
#
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
|
||||||
|
cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
|
||||||
|
|
||||||
|
cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
|
||||||
|
|
||||||
|
PACKAGE_VERSION="%{dkms_version}"
|
||||||
|
|
||||||
|
# Items below here should not have to change with each driver version
|
||||||
|
PACKAGE_NAME="%{name}"
|
||||||
|
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-*/openafs.ko ."
|
||||||
|
CLEAN="make -C src/libafs clean"
|
||||||
|
|
||||||
|
BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
|
||||||
|
DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
|
||||||
|
|
||||||
|
AUTOINSTALL=yes
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
#
|
#
|
||||||
# install kernel-source
|
# install kernel-source
|
||||||
#
|
#
|
||||||
@ -1256,6 +1310,15 @@ if [ $1 = 0 ] ; then
|
|||||||
chkconfig --del openafs-server
|
chkconfig --del openafs-server
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%if %{build_dkmspkg}
|
||||||
|
%post -n dkms-%{name}
|
||||||
|
dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
|
||||||
|
dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
|
||||||
|
dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
|
||||||
|
|
||||||
|
%preun -n dkms-%{name}
|
||||||
|
dkms remove -m %{namee} -v %{dkms_version} --rpm_safe_upgrade --all ||:
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{build_modules}
|
%if %{build_modules}
|
||||||
@ -1303,7 +1366,6 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
###
|
###
|
||||||
### file lists
|
### file lists
|
||||||
@ -1453,6 +1515,12 @@ fi
|
|||||||
%{_libdir}/libubik.a
|
%{_libdir}/libubik.a
|
||||||
%{_mandir}/man1/rxgen.*
|
%{_mandir}/man1/rxgen.*
|
||||||
|
|
||||||
|
%if %{build_dkmspkg}
|
||||||
|
%files -n dkms-%{name}
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_prefix}/src/%{name}-%{dkms_version}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files kernel-source
|
%files kernel-source
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
|
%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user