From 4cc9c05ee5071f926b704892b9ff61ecf89175ad2eeb1c7835ad715a2ed2dcce Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Wed, 17 Apr 2019 18:57:45 +0000 Subject: [PATCH] Accepting request 694606 from home:jengelh:branches:Base:System - Trim %if..%endif guards that do not affect the build result. - Combine %service_* calls to reduce generated code. - Make use of %make_install. OBS-URL: https://build.opensuse.org/request/show/694606 OBS-URL: https://build.opensuse.org/package/show/Base:System/multipath-tools?expand=0&rev=191 --- multipath-tools.changes | 7 +++++++ multipath-tools.spec | 33 ++++++++++++++------------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/multipath-tools.changes b/multipath-tools.changes index c5d12f8..d2c38e3 100644 --- a/multipath-tools.changes +++ b/multipath-tools.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Apr 13 19:59:45 UTC 2019 - Jan Engelhardt + +- Trim %if..%endif guards that do not affect the build result. +- Combine %service_* calls to reduce generated code. +- Make use of %make_install. + ------------------------------------------------------------------- Tue Mar 19 15:58:01 UTC 2019 - Martin Wilck diff --git a/multipath-tools.spec b/multipath-tools.spec index d09e724..b9b2732 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,7 +1,7 @@ # # spec file for package multipath-tools # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -49,12 +49,12 @@ %define _sysdir usr/lib Name: multipath-tools -Url: http://christophe.varoqui.free.fr/ Version: 0.8.0+17+suse.a28893f Release: 0 Summary: Tools to Manage Multipathed Devices with the device-mapper License: GPL-2.0-only Group: System/Base +URL: http://christophe.varoqui.free.fr/ Source: multipath-tools-%{version}.tar.xz Source1: multipath.conf # SUSE policy: disable partition deletion by default @@ -76,7 +76,7 @@ BuildRequires: udev BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(systemd) # For regenerate_initrd_posttrans macro -BuildRequires: suse-module-tools +BuildRequires: suse-module-tools # For regenerate-initrd-posttrans Requires(post): suse-module-tools Requires: device-mapper >= 1.2.78 @@ -101,19 +101,19 @@ monitors path devices for failure, removal, or addition, and applies the necessary changes to the multipath maps to ensure continuous availability of the map devices. -# Currently it makes no sense to split out libmpathpersist and libmpathcmd +# 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 # and it loads prioritizers (to be fixed) and checkers. %package -n libmpath0 -Summary: Libraries for multipath-tools -License: GPL-2.0-only AND LGPL-2.1 AND LGPL-2.0-or-later -Group: System/Libraries +Summary: Libraries for multipath-tools # This is for libmpathcmd, which is useless without multipathd. # No hard dependency here - we don't want to pull in all dependencies # of multipath-tools. -Recommends: multipath-tools -Conflicts: multipath-tools < 0.8.0 +License: GPL-2.0-only AND LGPL-2.1-only AND LGPL-2.0-or-later +Group: System/Libraries +Recommends: multipath-tools +Conflicts: multipath-tools < 0.8.0 %description -n libmpath0 libmpathpersist provides a C API for handling of SCSI persistent @@ -141,7 +141,6 @@ Requires: libmpath0 = %{version} This package contains the development libraries for multipath-tools and libmpathpersist. -%if 0%{?with_libdmmp} == 1 %package -n libdmmp%{libdmmp_version} Summary: C API for multipath-tools License: GPL-3.0-or-later @@ -160,8 +159,6 @@ Requires: libdmmp%{libdmmp_version} = %{version} %description -n libdmmp-devel This package provides development files and documentation for libdmmp. -%endif - %define makeflags %{!?with_libdmmp:ENABLE_LIBDMMP=0} %define dirflags LIB=%{_lib} usr_prefix=%{_prefix} SYSTEMDPATH=%{_sysdir} @@ -174,7 +171,7 @@ cp %{SOURCE4} . make CC="%__cc" OPTFLAGS="%{optflags}" %{dirflags} %{makeflags} %install -make DESTDIR=%{buildroot} %{dirflags} %{makeflags} install +%make_install %{dirflags} %{makeflags} mkdir -p %{buildroot}%{_defaultlicensedir} mkdir -p %{buildroot}/usr/sbin mkdir -p %{buildroot}/usr/%{_lib} @@ -193,13 +190,11 @@ install -m 644 -D %{SOURCE3} %{buildroot}/usr/lib/dracut/dracut.conf.d/dm-parts. %pre [ -f /.buildenv ] && exit 0 -%service_add_pre multipathd.socket -%service_add_pre multipathd.service +%service_add_pre multipathd.socket multipathd.service %post [ -f /.buildenv ] && exit 0 -%service_add_post multipathd.socket -%service_add_post multipathd.service +%service_add_post multipathd.socket multipathd.service %{?regenerate_initrd_post} exit 0 @@ -284,11 +279,11 @@ exit 0 # The kpartx package contains udev rules that may need to be in initrd. %{?regenerate_initrd_posttrans} -%if 0%{?with_libdmmp} == 1 - %post -n libdmmp%{libdmmp_version} -p %{run_ldconfig} %postun -n libdmmp%{libdmmp_version} -p %{run_ldconfig} +%if 0%{?with_libdmmp} == 1 + %files -n libdmmp%{libdmmp_version} %defattr(-,root,root) %license LICENSES/GPL-3.0