aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpm/generic/zfs-kmod.spec.in4
-rw-r--r--rpm/redhat/zfs-kmod.spec.in5
-rwxr-xr-xscripts/kmodtool61
3 files changed, 10 insertions, 60 deletions
diff --git a/rpm/generic/zfs-kmod.spec.in b/rpm/generic/zfs-kmod.spec.in
index 4ed719b8f..79fe2753c 100644
--- a/rpm/generic/zfs-kmod.spec.in
+++ b/rpm/generic/zfs-kmod.spec.in
@@ -98,7 +98,7 @@ BuildRequires: %{_bindir}/kmodtool
# Kmodtool does its magic here. A patched version of kmodtool is shipped
# with the source rpm until kmod development packages are supported upstream.
# https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714
-%{expand:%(bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} --obsolete-name spl --obsolete-version 0.8 2>/dev/null) }
+%{expand:%(bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null) }
%description
@@ -109,7 +109,7 @@ This package contains the ZFS kernel modules.
%{?kmodtool_check}
# Print kmodtool output for debugging purposes:
-bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} --obsolete-name spl --obsolete-version 0.8 2>/dev/null
+bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null
%if %{with debug}
%define debug --enable-debug
diff --git a/rpm/redhat/zfs-kmod.spec.in b/rpm/redhat/zfs-kmod.spec.in
index 7ee04e234..f59551c0b 100644
--- a/rpm/redhat/zfs-kmod.spec.in
+++ b/rpm/redhat/zfs-kmod.spec.in
@@ -17,9 +17,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# by generating a preamble text file which kmodtool can append to the spec file.
%(/bin/echo -e "\
Requires: @PACKAGE@ = %{version}\n\
-Conflicts: @PACKAGE@-dkms\n\
-Obsoletes: kmod-spl\n\
-Obsoletes: spl-kmod\n\n" > %{_sourcedir}/kmod-preamble)
+Conflicts: @PACKAGE@-dkms)
# LDFLAGS are not sanitized by arch/*/Makefile for these architectures.
%ifarch ppc ppc64 ppc64le aarch64
@@ -39,7 +37,6 @@ This package contains the ZFS kernel modules.
%package -n kmod-%{kmod_name}-devel
Summary: ZFS kernel module(s) devel common
Group: System Environment/Kernel
-Provides: kmod-spl-devel = %{version}
%description -n kmod-%{kmod_name}-devel
This package provides the header files and objects to build kernel modules.
diff --git a/scripts/kmodtool b/scripts/kmodtool
index f66341196..bda5c41ee 100755
--- a/scripts/kmodtool
+++ b/scripts/kmodtool
@@ -72,7 +72,7 @@ LANG=C rpmbuild --define "_sourcedir %{_sourcedir}" \\\
ln -s \$(ls \$RPM_BUILD_ROOT/%{_usrsrc}/akmods/) \$RPM_BUILD_ROOT/%{_usrsrc}/akmods/${kmodname}-kmod.latest
%package -n akmod-${kmodname}
-Summary: Akmod package for ${kmodname} kernel module(s)
+Summary: Akmod package for ${kmodname} kernel module(s)
Group: System Environment/Kernel
Requires: kmodtool
Requires: akmods
@@ -82,11 +82,6 @@ Requires: ${kmodname}-kmod-common >= %{?epoch:%{epoch}:}%{version}
Provides: ${kmodname}-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
EOF
- if [ -n "${obsolete_name}" ]; then
- echo "Provides: akmod-${obsolete_name} = ${obsolete_version}"
- echo "Obsoletes: akmod-${obsolete_name} < ${obsolete_version}"
- fi
-
cat <<EOF
%description -n akmod-${kmodname}
@@ -116,10 +111,6 @@ Provides: kmod-${kmodname}-PAE = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: akmod-${kmodname} = %{?epoch:%{epoch}:}%{version}-%{release}
EOF
- if [ -n "${obsolete_name}" ]; then
- echo "Provides: kmod-${obsolete_name} = ${obsolete_version}"
- echo "Obsoletes: kmod-${obsolete_name} < ${obsolete_version}"
- fi
cat <<EOF
%description -n kmod-${kmodname}${dashvariant}
@@ -171,11 +162,6 @@ Requires(postun): kmod
%endif
EOF
- if [ -n "${obsolete_name}" ]; then
- echo "Provides: kmod-${obsolete_name}-${kernel_uname_r} = ${obsolete_version}"
- echo "Obsoletes: kmod-${obsolete_name}-${kernel_uname_r} < ${obsolete_version}"
- fi
-
# second part
if [ -z "${customkernel}" ]; then
cat <<EOF
@@ -248,11 +234,6 @@ EOF
echo "Requires: kmod-${kmodname}-devel-${kernel_uname_r} >= %{?epoch:%{epoch}:}%{version}-%{release}"
fi
- if [ -n "${obsolete_name}" ]; then
- echo "Provides: kmod-${obsolete_name}-devel = ${obsolete_version}"
- echo "Obsoletes: kmod-${obsolete_name}-devel < ${obsolete_version}"
- fi
-
cat <<EOF
%description -n kmod-${kmodname}-devel
This package provides the common header files to build kernel modules
@@ -297,11 +278,6 @@ Provides: ${kmodname}-devel-kmod = %{?epoch:%{epoch}:}%{version}-%{relea
Provides: kmod-${kmodname}-devel-uname-r = ${kernel_uname_r}
EOF
- if [ -n "${obsolete_name}" ]; then
- echo "Provides: kmod-${obsolete_name}-devel-${kernel_uname_r} = ${obsolete_version}"
- echo "Obsoletes: kmod-${obsolete_name}-devel-${kernel_uname_r} < ${obsolete_version}"
- fi
-
# second part
if [ -z "${customkernel}" ]; then
cat <<EOF
@@ -339,11 +315,6 @@ Requires: kmod-${kmodname}-${kernel_uname_r} >= %{?epoch:%{epoch}:}%{vers
%{?KmodsMetaRequires:Requires: %{?KmodsMetaRequires}}
EOF
- if [ -n "${obsolete_name}" ]; then
- echo "Provides: kmod-${obsolete_name}${kernel_variant} = ${obsolete_version}"
- echo "Obsoletes: kmod-${obsolete_name}${kernel_variant} < ${obsolete_version}"
- fi
-
cat <<EOF
%description -n kmod-${kmodname}${kernel_variant}
@@ -378,7 +349,7 @@ print_customrpmtemplate ()
# create devel package
print_rpmtemplate_per_kmoddevelpkg --redhat ${kernel} ${kernel##${kernel_verrelarch}}
fi
- elif [ -e "${prefix}/lib/modules/${kernel}/build/Makefile" ]; then
+ elif [ -e "${prefix}/lib/modules/${kernel}/build/Makefile" ]; then
# likely a user-build-kernel with available buildfiles
# fixme: we should check if uname from Makefile is the same as ${kernel}
@@ -419,7 +390,7 @@ print_rpmtemplate ()
local kernel_verrelarch=${kernel%%${kernels_known_variants}}
- # create metapackage
+ # create metapackage
print_rpmtemplate_kmodmetapkg "${kernel}" "${kernel##${kernel_verrelarch}}"
# create package
@@ -458,7 +429,7 @@ while [ -n "${1}" ] ; do
shift
if [ -z "${1}" ] ; then
error_out 2 "Please provide path to a filter-file together with --filterfile" >&2
- elif [ ! -e "${1}" ]; then
+ elif [ ! -e "${1}" ]; then
error_out 2 "Filterfile ${1} not found" >&2
fi
filterfile="${1}"
@@ -505,22 +476,6 @@ while [ -n "${1}" ] ; do
shift
noakmod="true"
;;
- --obsolete-name)
- shift
- if [ -z "${1}" ] ; then
- error_out 2 "Please provide the name of the kmod to obsolete together with --obsolete-name" >&2
- fi
- obsolete_name="${1}"
- shift
- ;;
- --obsolete-version)
- shift
- if [ -z "${1}" ] ; then
- error_out 2 "Please provide the version of the kmod to obsolete together with --obsolete-version" >&2
- fi
- obsolete_version="${1}"
- shift
- ;;
--target)
shift
target="${1}"
@@ -574,8 +529,6 @@ elif [ -z "${kmodname}" ]; then
error_out 2 "please pass kmodname with --kmodname"
elif [ -z "${kernels_known_variants}" ] ; then
error_out 2 "could not determine known variants"
-elif { [ -n "${obsolete_name}" ] && [ -z "${obsolete_version}" ]; } || { [ -z "${obsolete_name}" ] && [ -n "${obsolete_version}" ]; } ; then
- error_out 2 "you need to provide both --obsolete-name and --obsolete-version"
fi
# go
@@ -599,7 +552,7 @@ else
# call buildsys-build-${repo}-kerneldevpkgs to get the list of kernels
cmdoptions="--target ${target}"
- # filterfile to filter list of kernels?
+ # filterfile to filter list of kernels?
if [ -n "${filterfile}" ] ; then
cmdoptions="${cmdoptions} --filterfile ${filterfile}"
fi
@@ -607,7 +560,7 @@ else
kernel_versions_to_build_for=$(buildsys-build-${repo}-kerneldevpkgs "--${build_kernels}" ${cmdoptions})
returncode=$?
if [ "$returncode" -ne 0 ]; then
-
+
error_out 2 "buildsys-build-${repo}-kerneldevpkgs failed: ${kernel_versions_to_build_for}"
fi
@@ -615,5 +568,5 @@ else
print_akmodtemplate
fi
- print_rpmtemplate
+ print_rpmtemplate
fi