forked from pool/multipath-tools
Accepting request 695322 from 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. (forwarded request 694606 from jengelh) OBS-URL: https://build.opensuse.org/request/show/695322 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/multipath-tools?expand=0&rev=112
This commit is contained in:
commit
9f8c41b976
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Apr 13 19:59:45 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- 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 <mwilck@suse.com>
|
Tue Mar 19 15:58:01 UTC 2019 - Martin Wilck <mwilck@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package multipath-tools
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -49,12 +49,12 @@
|
|||||||
%define _sysdir usr/lib
|
%define _sysdir usr/lib
|
||||||
|
|
||||||
Name: multipath-tools
|
Name: multipath-tools
|
||||||
Url: http://christophe.varoqui.free.fr/
|
|
||||||
Version: 0.8.0+17+suse.a28893f
|
Version: 0.8.0+17+suse.a28893f
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Tools to Manage Multipathed Devices with the device-mapper
|
Summary: Tools to Manage Multipathed Devices with the device-mapper
|
||||||
License: GPL-2.0-only
|
License: GPL-2.0-only
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
|
URL: http://christophe.varoqui.free.fr/
|
||||||
Source: multipath-tools-%{version}.tar.xz
|
Source: multipath-tools-%{version}.tar.xz
|
||||||
Source1: multipath.conf
|
Source1: multipath.conf
|
||||||
# SUSE policy: disable partition deletion by default
|
# SUSE policy: disable partition deletion by default
|
||||||
@ -76,7 +76,7 @@ BuildRequires: udev
|
|||||||
BuildRequires: pkgconfig(libsystemd)
|
BuildRequires: pkgconfig(libsystemd)
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
# For regenerate_initrd_posttrans macro
|
# For regenerate_initrd_posttrans macro
|
||||||
BuildRequires: suse-module-tools
|
BuildRequires: suse-module-tools
|
||||||
# For regenerate-initrd-posttrans
|
# For regenerate-initrd-posttrans
|
||||||
Requires(post): suse-module-tools
|
Requires(post): suse-module-tools
|
||||||
Requires: device-mapper >= 1.2.78
|
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
|
the necessary changes to the multipath maps to ensure continuous
|
||||||
availability of the map devices.
|
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
|
# separately. libmultipath has no stable API at all, and it depends
|
||||||
# on libmpathcmd (to be fixed). libmpathpersist depends on libmultipath
|
# on libmpathcmd (to be fixed). libmpathpersist depends on libmultipath
|
||||||
# and it loads prioritizers (to be fixed) and checkers.
|
# and it loads prioritizers (to be fixed) and checkers.
|
||||||
%package -n libmpath0
|
%package -n libmpath0
|
||||||
Summary: Libraries for multipath-tools
|
Summary: Libraries for multipath-tools
|
||||||
License: GPL-2.0-only AND LGPL-2.1 AND LGPL-2.0-or-later
|
|
||||||
Group: System/Libraries
|
|
||||||
# This is for libmpathcmd, which is useless without multipathd.
|
# This is for libmpathcmd, which is useless without multipathd.
|
||||||
# No hard dependency here - we don't want to pull in all dependencies
|
# No hard dependency here - we don't want to pull in all dependencies
|
||||||
# of multipath-tools.
|
# of multipath-tools.
|
||||||
Recommends: multipath-tools
|
License: GPL-2.0-only AND LGPL-2.1-only AND LGPL-2.0-or-later
|
||||||
Conflicts: multipath-tools < 0.8.0
|
Group: System/Libraries
|
||||||
|
Recommends: multipath-tools
|
||||||
|
Conflicts: multipath-tools < 0.8.0
|
||||||
|
|
||||||
%description -n libmpath0
|
%description -n libmpath0
|
||||||
libmpathpersist provides a C API for handling of SCSI persistent
|
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
|
This package contains the development libraries for multipath-tools
|
||||||
and libmpathpersist.
|
and libmpathpersist.
|
||||||
|
|
||||||
%if 0%{?with_libdmmp} == 1
|
|
||||||
%package -n libdmmp%{libdmmp_version}
|
%package -n libdmmp%{libdmmp_version}
|
||||||
Summary: C API for multipath-tools
|
Summary: C API for multipath-tools
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@ -160,8 +159,6 @@ Requires: libdmmp%{libdmmp_version} = %{version}
|
|||||||
%description -n libdmmp-devel
|
%description -n libdmmp-devel
|
||||||
This package provides development files and documentation for libdmmp.
|
This package provides development files and documentation for libdmmp.
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%define makeflags %{!?with_libdmmp:ENABLE_LIBDMMP=0}
|
%define makeflags %{!?with_libdmmp:ENABLE_LIBDMMP=0}
|
||||||
%define dirflags LIB=%{_lib} usr_prefix=%{_prefix} SYSTEMDPATH=%{_sysdir}
|
%define dirflags LIB=%{_lib} usr_prefix=%{_prefix} SYSTEMDPATH=%{_sysdir}
|
||||||
|
|
||||||
@ -174,7 +171,7 @@ cp %{SOURCE4} .
|
|||||||
make CC="%__cc" OPTFLAGS="%{optflags}" %{dirflags} %{makeflags}
|
make CC="%__cc" OPTFLAGS="%{optflags}" %{dirflags} %{makeflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR=%{buildroot} %{dirflags} %{makeflags} install
|
%make_install %{dirflags} %{makeflags}
|
||||||
mkdir -p %{buildroot}%{_defaultlicensedir}
|
mkdir -p %{buildroot}%{_defaultlicensedir}
|
||||||
mkdir -p %{buildroot}/usr/sbin
|
mkdir -p %{buildroot}/usr/sbin
|
||||||
mkdir -p %{buildroot}/usr/%{_lib}
|
mkdir -p %{buildroot}/usr/%{_lib}
|
||||||
@ -193,13 +190,11 @@ install -m 644 -D %{SOURCE3} %{buildroot}/usr/lib/dracut/dracut.conf.d/dm-parts.
|
|||||||
|
|
||||||
%pre
|
%pre
|
||||||
[ -f /.buildenv ] && exit 0
|
[ -f /.buildenv ] && exit 0
|
||||||
%service_add_pre multipathd.socket
|
%service_add_pre multipathd.socket multipathd.service
|
||||||
%service_add_pre multipathd.service
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
[ -f /.buildenv ] && exit 0
|
[ -f /.buildenv ] && exit 0
|
||||||
%service_add_post multipathd.socket
|
%service_add_post multipathd.socket multipathd.service
|
||||||
%service_add_post multipathd.service
|
|
||||||
%{?regenerate_initrd_post}
|
%{?regenerate_initrd_post}
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
@ -284,11 +279,11 @@ exit 0
|
|||||||
# The kpartx package contains udev rules that may need to be in initrd.
|
# The kpartx package contains udev rules that may need to be in initrd.
|
||||||
%{?regenerate_initrd_posttrans}
|
%{?regenerate_initrd_posttrans}
|
||||||
|
|
||||||
%if 0%{?with_libdmmp} == 1
|
|
||||||
|
|
||||||
%post -n libdmmp%{libdmmp_version} -p %{run_ldconfig}
|
%post -n libdmmp%{libdmmp_version} -p %{run_ldconfig}
|
||||||
%postun -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}
|
%files -n libdmmp%{libdmmp_version}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%license LICENSES/GPL-3.0
|
%license LICENSES/GPL-3.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user