diff options
author | наб <[email protected]> | 2022-05-10 22:10:57 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-05-18 12:10:35 -0700 |
commit | 7062a956f79b264084d71e542ce74bc5144f504d (patch) | |
tree | efafed2d107472476a83807b9223145d615788f2 /scripts | |
parent | 7506f5af922895afe52377e2ea1e9813e3be8111 (diff) |
rpm: don't spec obsolete_name/version anymore
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #13447
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kmodtool | 61 |
1 files changed, 7 insertions, 54 deletions
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 |