- Spec file: remove compatibility code for SLE <= SLE15-SP2

OBS-URL: https://build.opensuse.org/package/show/Base:System/multipath-tools?expand=0&rev=259
This commit is contained in:
Martin Wilck 2021-08-13 11:06:08 +00:00 committed by Git OBS Bridge
parent 8896e977e0
commit 40ea377bf2
2 changed files with 10 additions and 24 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Aug 13 11:03:13 UTC 2021 - Martin Wilck <mwilck@suse.com>
- Spec file: remove compatibility code for SLE <= SLE15-SP2
-------------------------------------------------------------------
Thu Aug 12 20:08:23 UTC 2021 - mwilck@suse.com
@ -22,7 +27,7 @@ Thu Aug 12 20:08:23 UTC 2021 - mwilck@suse.com
-------------------------------------------------------------------
Tue Jun 8 09:34:23 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
- install to /usr (boo#1029961)
- install to /usr on Tumbleweed (boo#1029961)
-------------------------------------------------------------------
Tue May 18 17:43:13 UTC 2021 - Martin Wilck <mwilck@suse.com>

View File

@ -18,20 +18,11 @@
%global _lto_cflags %{nil}
# Whether to build libdmmp
# Default YES except for SLE12 / Leap 42
%if 0%{?suse_version} >= 1500
# Whether to build libdmmp - default YES
%bcond_without libdmmp
%else
%bcond_with libdmmp
%endif
# "make test" disabled on SLE12 (cmocka not available)
%if 0%{?suse_version} >= 1500
# Whether to run tests - default YES
%bcond_without check
%else
%bcond_with check
%endif
# This should match the version in libdmmp/Makefile
%define _libdmmp_version 0.2.0
@ -90,7 +81,6 @@ availability of the map devices.
# Currently, it makes no sense to split out libmpathpersist and libmpathcmd
# separately. libmultipath has no stable API at all, and it depends
# on libmpathcmd (to be fixed). libmpathpersist depends on libmultipath
@ -163,22 +153,17 @@ This package provides development files and documentation for libdmmp.
%prep
%setup -q -n multipath-tools-%{version}
# This must be before autopatch for code 12, otherwise build error
cp %{SOURCE4} .
cp %{SOURCE5} .
%autopatch -p1
%build
[ -n "$SOURCE_DATE_EPOCH" ] && export KBUILD_BUILD_TIMESTAMP=@$SOURCE_DATE_EPOCH
# %%make_build is not supported in SLE12
%{?make_build}%{!?make_build:make %{?_smp_mflags}} \
CC="%__cc" OPTFLAGS="%{optflags}" %{dirflags} %{makeflags}
%{make_build} OPTFLAGS="%{optflags}" %{dirflags} %{makeflags}
%if 0%{?with_check} == 1
%check
# ld fails to resolve cmocka's __wrap symbols with -flto
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88643
make OPTFLAGS="%{optflags}" %{_make_output_sync} %{?_smp_mflags} test
%{make_build} OPTFLAGS="%{optflags}" test
%endif
%install
@ -217,11 +202,7 @@ exit 0
%postun
%{?regenerate_initrd_post}
%service_del_postun multipathd.service
%if 0%{?suse_version} >= 1550
%service_del_postun_without_restart multipathd.socket
%else
%service_del_postun -n multipathd.socket
%endif
%posttrans
%{?regenerate_initrd_posttrans}