X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre-dkms.spec.in;h=878b4727868ca804bed3195717a2bcedb01d445f;hb=7bb1685048bf999df03ceadab39faa09b8a5560d;hp=76ecf360f0c10ee966e38e5cba47b0c071e6dd67;hpb=d61103d329bad5b92c951c8ad06a4f1b431759aa;p=fs%2Flustre-release.git diff --git a/lustre-dkms.spec.in b/lustre-dkms.spec.in index 76ecf36..878b472 100644 --- a/lustre-dkms.spec.in +++ b/lustre-dkms.spec.in @@ -1,7 +1,21 @@ +# SPDX-License-Identifier: GPL-2.0 + +# +# This file is part of Lustre, http://www.lustre.org/ +# +# lustre-dkms.spec.in +# +# spec file template for RHEL dkms package builds +# + %bcond_without servers %bcond_without zfs %bcond_with ldiskfs +# LUTF Turn off brp-python-precompile script as we don't want the python files +# to be compiled on installation +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') + # Set the package name prefix %if %{with servers} %if %{with zfs} @@ -24,12 +38,13 @@ %define lustre_name @PACKAGE@-client %endif -%if %{_vendor}=="redhat" || %{_vendor}=="fedora" +%if "%{_vendor}" == "redhat" || "%{_vendor}" == "fedora" %global kmod_name kmod-%{lustre_name} - %define mkconf_options -%else #for Suse / Ubuntu + %define mkconf_options %{nil} +#for Suse / Ubuntu +%else %global kmod_name %{lustre_name}-kmp - %define mkconf_options "-k updates" + %define mkconf_options -k updates %endif %define buildid 1 @@ -45,8 +60,7 @@ Version: @VERSION@ Release: %{buildid}%{?dist} Summary: Kernel module(s) (dkms) -Group: System Environment/Kernel -License: GPLv2+ +License: GPL-2.0-only URL: http://lustre.opensfs.org/ Source0: @PACKAGE@-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -56,9 +70,12 @@ BuildArch: noarch # (ie, "BUILD_DEPENDS[#]="), and have latest DKMS fixes integrated # for bugs that prevented our module to build/install. Requires: dkms >= 2.2.0.3-28.git.7c3e7c5 +Requires: flex bison libmount-devel libmount # for lnetctl Requires: libyaml-devel Requires: zlib-devel +# for netlink support +Requires: libnl3-devel %if %{with servers} # If client package is installed when installing server, remove it since # the server package also includes the client. This can be removed if/when @@ -66,7 +83,6 @@ Requires: zlib-devel Obsoletes: @PACKAGE@-client < %{version} %if %{with zfs} Requires: zfs-dkms >= 0.6.5 -Requires: @PACKAGE@-osd-zfs-mount Conflicts: @PACKAGE@-ldiskfs-dkms Conflicts: @PACKAGE@-client-dkms # lustre-zfs-dkms replicates the functionality old lustre-dkms package @@ -76,7 +92,6 @@ Obsoletes: @PACKAGE@-dkms %if %{with ldiskfs} Requires: patch Requires: %{ext4_source_rpm} -Requires: @PACKAGE@-osd-ldiskfs-mount Conflicts: @PACKAGE@-zfs-dkms Conflicts: @PACKAGE@-client-dkms %if "%{module}" != "@PACKAGE@-all" @@ -87,16 +102,26 @@ Conflicts: @PACKAGE@-dkms Conflicts: @PACKAGE@-all-dkms %endif %endif -Requires: gcc, make, perl -Requires: kernel-devel +Requires: gcc, make +Requires: kernel-devel >= 3.10 +%if 0%{?rhel} > 7 || 0%{?fedora} > 33 || 0%{?rhel} < 1 +Recommends: perl +Suggests: bash-completion +%else +Requires: perl +%endif Provides: %{kmod_name} = %{version} Provides: @PACKAGE@-modules = %{version} %if %{with servers} %if %{with zfs} Provides: @PACKAGE@-osd-zfs = %{version} +Provides: kmod-@PACKAGE@-osd-zfs = %{version} +Provides: @PACKAGE@-osd-zfs-mount = %{version} %endif %if %{with ldiskfs} Provides: @PACKAGE@-osd-ldiskfs = %{version} +Provides: kmod-@PACKAGE@-osd-ldiskfs = %{version} +Provides: @PACKAGE@-osd-ldiskfs-mount = %{version} %endif Provides: @PACKAGE@-osd %else @@ -137,8 +162,8 @@ fi %post for POSTINST in /usr/lib/dkms/common.postinst; do if [ -f $POSTINST ]; then - $POSTINST %{module} %{version} - exit $? + $POSTINST %{module} %{version} + exit $? fi echo "WARNING: $POSTINST does not exist." done