%bcond_with systemd Summary: Tools to manage multipath devices using device-mapper Summary(ja): Device-mapper を使用してマルチパスデバイスを管理するためのツール集 Name: device-mapper-multipath Version: 0.9.2 Release: 1%{?_dist_release}%{?with_systemd:.systemd} Group: system Vendor: Project Vine Distribution: Vine Linux Packager: daisuke License: GPLv2+ URL: http://christophe.varoqui.free.fr/ # The source for this package was pulled from upstream's git repo. Use the # following command to generate the tarball # curl "https://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=refs/tags/0.8.2;sf=tgz" -o multipath-tools-0.8.2.tgz Source0: https://github.com/opensvc/multipath-tools/archive/refs/tags/%{version}.tar.gz#/multipath-tools-%{version}.tar.gz Source1: multipath.conf Source2: multipathd.init Patch0001: 0001-libmpathutil-move-devt2devname-to-libmultipath.patch Patch0002: 0002-libmpathutil-remove-udev-symbol.patch Patch0003: 0003-libmultipath-remove-duplicate-export-of-libmp_verbos.patch Patch0004: 0004-libmpathutil-remove-__attribute__-weak.patch Patch0005: 0005-libmultipath-libmpathutil-use-common-ABI-version-for.patch Patch0006: 0006-RH-don-t-start-without-a-config-file.patch Patch0007: 0007-RH-Fix-nvme-function-missing-argument.patch Patch0008: 0008-RH-use-rpm-optflags-if-present.patch Patch0009: 0009-RH-add-mpathconf.patch Patch0010: 0010-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch Patch0011: 0011-RH-reset-default-find_mutipaths-value-to-off.patch Patch0012: 0012-RH-attempt-to-get-ANA-info-via-sysfs-first.patch Patch0013: 0013-RH-make-parse_vpd_pg83-match-scsi_id-output.patch Patch0014: 0014-RH-add-scsi-device-handlers-to-modules-load.d.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libsysfs-devel BuildRequires: device-mapper-devel #BuildRequires: libselinux-devel, libsepol-devel BuildRequires: readline-devel, ncurses-devel BuildRequires: libaio-devel BuildRequires: userspace-rcu-devel BuildRequires: json-c-devel Requires: kpartx = %{version}-%{release} Requires: device-mapper >= 1.02.39 %if %{with systemd} BuildRequires: systemd-devel %{?systemd_requires} %else BuildRequires: libudev-devel Requires(post): chkconfig Requires(preun): chkconfig %endif %description %{name} provides tools to manage multipath devices by instructing the device-mapper multipath kernel module what to do. The tools are : * multipath : Scan the system for multipath devices and assemble them. * multipathd : Detects when paths fail and execs multipath to update things. %package libs Summary: The %{name} modules and shared library Group: system # only libmpathcmd is LGPLv2+ License: GPLv2 and LGPLv2+ %description libs The %{name}-libs provides the path checker and prioritizer modules. It also contains the libmpathpersist and libmpathcmd shared libraries, as well as multipath's internal library, libmultipath. %package devel Summary: Development libraries and headers for %{name} Group: programming Requires: %{name} = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} %description devel This package contains the files need to develop applications that use device-mapper-multipath's lbmpathpersist and libmpathcmd libraries. %package -n kpartx Summary: Partition device manager for device-mapper devices Summary(ja): Device-mapper デバイス用のパーティションデバイスマネージャー Group: system Provides: kpartx = %{version}-%{release} %description -n kpartx kpartx manages partition creation and removal for device-mapper devices. %package -n libdmmp Summary: device-mapper-multipath C API library Group: system License: GPLv3+ Requires: json-c Requires: %{name} = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} %description -n libdmmp This package contains the shared library for the device-mapper-multipath C API library. %package -n libdmmp-devel Summary: device-mapper-multipath C API library headers Group: programming Requires: pkgconfig Requires: libdmmp = %{version}-%{release} %description -n libdmmp-devel This package contains the files needed to develop applications that use device-mapper-multipath's libdmmp C API library %debug_package %prep %setup -q -n multipath-tools-%{version} %autopatch -p1 %build make %{?_smp_mflags} LIB=%{_lib} SYSTEMDPATH=/lib %install rm -rf %{buildroot} make install \ DESTDIR=%{buildroot} \ bindir=%{_syssbindir} \ syslibdir=/%{_lib} \ usrlibdir=%{_libdir} \ libdir=/%{_lib}/multipath \ rcdir=%{_initdir} \ unitdir=%{_unitdir} \ pkgconfdir=%{_libdir}/pkgconfig \ SYSTEMDPATH=/lib install -d %{buildroot}/etc/multipath install -m644 %{SOURCE1} %{buildroot}/etc/multipath.conf %if %{with systemd} mkdir -p %{buildroot}%{_tmpfilesdir} mv %{buildroot}/lib/tmpfiles.d/* %{buildroot}%{_tmpfilesdir}/ %else install -d %{buildroot}%{_initdir} install -m755 %{SOURCE2} %{buildroot}%{_initdir}/multipathd rm -rf %{buildroot}/lib/tmpfiles.d rm -rf %{buildroot}/lib/modules-load.d %endif %clean rm -rf %{buildroot} %post %if %{with systemd} %systemd_post multipathd.service %else /sbin/chkconfig --add multipathd %endif if [ "$1" -gt "1" -a ! -e /etc/multipath/bindings -a \ -f /var/lib/multipath/bindings ]; then mv /var/lib/multipath/bindings /etc/multipath/bindings ln -s /etc/multipath/bindings /var/lib/multipath/bindings fi %preun %if %{with systemd} %systemd_preun multipathd.service %else if [ "$1" = 0 -o -x /bin/systemctl ]; then /sbin/service multipathd stop /dev/null 2>&1 /sbin/chkconfig --del multipathd fi %endif %postun if [ $1 -ge 1 ] ; then /sbin/multipathd forcequeueing daemon > /dev/null 2>&1 || : fi %if %{with systemd} %systemd_postun_with_restart multipathd.service %else if [ "$1" -ge "1" ]; then /sbin/service multipathd condrestart >/dev/null 2>&1 || : fi %endif %files %defattr(-,root,root,-) %license LICENSES/GPL-2.0 LICENSES/LGPL-2.0 %doc README* %config /lib/udev/rules.d/*-multipath.rules %config /lib/udev/rules.d/*-dm-mpath.rules %{_syssbindir}/multipath %{_syssbindir}/multipathc %{_syssbindir}/multipathd %{_syssbindir}/mpathconf %{_syssbindir}/mpathpersist %{_mandir}/man5/multipath.conf.5.gz %{_mandir}/man8/multipath.8.gz %{_mandir}/man8/multipathc.8.gz %{_mandir}/man8/multipathd.8.gz %{_mandir}/man8/mpathconf.8.gz %{_mandir}/man8/mpathpersist.8.gz %config(noreplace) /etc/multipath.conf %dir /etc/multipath %if %{with systemd} %{_unitdir}/multipathd.service %{_unitdir}/multipathd.socket %{_tmpfilesdir}/* /lib/modules-load.d/* %else %config /etc/rc.d/init.d/multipathd %endif %files libs %license LICENSES/GPL-2.0 LICENSES/LGPL-2.0 %doc README /%{_lib}/libmultipath.so /%{_lib}/libmultipath.so.* /%{_lib}/libmpathpersist.so.* /%{_lib}/libmpathcmd.so.* /%{_lib}/libmpathutil.so /%{_lib}/libmpathutil.so.* /%{_lib}/libmpathvalid.so /%{_lib}/libmpathvalid.so.* %dir /%{_lib}/multipath /%{_lib}/multipath/* %files devel %doc README /%{_lib}/libmpathpersist.so /%{_lib}/libmpathcmd.so %{_includedir}/mpath_cmd.h %{_includedir}/mpath_persist.h %{_includedir}/mpath_valid.h %{_mandir}/man3/mpath_persistent_reserve_in.3.gz %{_mandir}/man3/mpath_persistent_reserve_out.3.gz %files -n kpartx %defattr(-,root,root,-) %license LICENSES/GPL-2.0 LICENSES/LGPL-2.0 %doc README %{_syssbindir}/kpartx /lib/udev/kpartx_id %config /lib/udev/rules.d/*-dm-parts.rules %config /lib/udev/rules.d/*-kpartx.rules %config /lib/udev/rules.d/*-del-part-nodes.rules %{_mandir}/man8/kpartx.8.gz %files -n libdmmp %license LICENSES/GPL-3.0 %doc README %{_libdir}/libdmmp.so.* %files -n libdmmp-devel %doc README %{_libdir}/libdmmp.so %dir %{_includedir}/libdmmp %{_includedir}/libdmmp/* %{_mandir}/man3/dmmp_* %{_mandir}/man3/libdmmp.h.3.gz %{_libdir}/pkgconfig/libdmmp.pc %changelog * Wed Oct 26 2022 Tomohiro "Tomo-p" KATO 0.9.2-1 - new upstream release. * Sat May 16 2020 Tomohiro "Tomo-p" KATO 0.8.2-2 - rebuilt with json-c-0.14. - added systemd support (disabled as default). * Sat Mar 28 2020 Tomohiro "Tomo-p" KATO 0.8.2-1 - new upstream release. - replaced all patches with rawhide's. - added sub-packages. - device-mapper-multipath-libs - device-mapper-multipath-devel - libdmmp - libdmmp-devel * Sat Mar 21 2015 Ryoichi INAGAKI 0.4.9-5 - rebuilt with readline 6.3 - changed BuildRequires: libsysfs-devel instead of sysfsutils-devel - added Japanese summary * Mon Jan 12 2015 Yoji TOYODA 0.4.9-4 - rebuild with VineSeed environment * Wed May 11 2011 Daisuke SUZUKI 0.4.9-3 - import patches from RH package * Wed Apr 20 2011 Daisuke SUZUKI 0.4.9-2 - install multipath libraries to %%{_lib}/multipath * Wed Apr 20 2011 Daisuke SUZUKI 0.4.9-1 - update to 0.4.9 - drop static version - add BR: libaio-devel * Sun Sep 07 2008 Shu KONNO 0.4.7-12vl5 - applied new versioning policy * Thu Feb 14 2008 MATSUBAYASHI Kohji - 0.4.7-11vl1 - initial build for VineSeed - add Patch100 to disable linking to libselinux and libsepol * Mon Feb 05 2007 Alasdair Kergon - 0.4.7-11.fc7 - Add build dependency on new device-mapper-devel package. - Add dependency on device-mapper. * Wed Jan 31 2007 Benjamin Marzinksi - 0.4.7-10.fc7 - Update BuildRoot and PreReq lines. * Mon Jan 15 2007 Benjamin Marzinksi - 0.4.7-9.fc7 - Fixed spec file. * Mon Jan 15 2007 Benjamin Marzinski - 0.4.7-8.fc7 - Update to latest code (t0_4_7_head2) * Wed Dec 13 2006 Benjamin Marzinski - 0.4.7-7.fc7 - Update to latest code (t0_4_7_head1) * Thu Sep 7 2006 Peter Jones - 0.4.7-5 - Fix kpartx to handle with drives >2TB correctly. * Thu Aug 31 2006 Peter Jones - 0.4.7-4.1 - Split kpartx out into its own package so dmraid can use it without installing multipathd - Fix a segfault in kpartx * Mon Jul 17 2006 Benjamin Marzinski 0.4.7-4.0 - Updated to latest source. Fixes bug in default multipath.conf * Wed Jul 12 2006 Benjamin Marzinski 0.4.7-3.1 - Added ncurses-devel to BuildRequires * Wed Jul 12 2006 Benjamin Marzinski 0.4.7-3.0 - Updated to latest source. deals with change in libsysfs API * Wed Jul 12 2006 Jesse Keating - 0.4.7-2.2.1 - rebuild * Mon Jul 10 2006 Benjamin Marzinski 0.4.7-2.2 - fix tagging issue. * Mon Jul 10 2006 Benjamin Marzinski 0.4.7-2.1 - changed BuildRequires from sysfsutils-devel to libsysfs-devel * Wed Jun 28 2006 Benjamin Marzinski 0.4.7-2.0 - Updated to latest upstream source, fixes kpartx udev rule issue * Tue Jun 06 2006 Benjamin Marzinski 0.4.7-1.0 - Updated to Christophe's latest source * Mon May 22 2006 Alasdair Kergon - 0.4.5-16.0 - Newer upstream source (t0_4_5_post59). * Mon May 22 2006 Alasdair Kergon - 0.4.5-12.3 - BuildRequires: libsepol-devel, readline-devel * Mon Feb 27 2006 Benjamin Marzinski 0.4.5-12.2 - Prereq: chkconfig * Mon Feb 20 2006 Karsten Hopp 0.4.5-12.1 - BuildRequires: libselinux-devel * Fri Feb 10 2006 Jesse Keating - 0.4.5-12.0.1 - bump again for double-long bug on ppc(64) * Tue Feb 07 2006 Benjamin Marzinski -0.4.5-12.0 - Updated to latest upstream source (t0_4_5_post56) * Tue Feb 07 2006 Jesse Keating - 0.4.5-9.1.1 - rebuilt for new gcc4.1 snapshot and glibc changes * Mon Dec 19 2005 Benjamin Marzinski - 0.4.5-9.1 - added patch for fedora changes * Fri Dec 16 2005 Benjamin Marzinski - 0.4.5-9.0 - Updated to latest upstream source (t)_4_5_post52) * Fri Dec 09 2005 Jesse Keating - rebuilt * Sun Dec 4 2005 Peter Jones - 0.4.4-2.6 - rebuild for newer libs * Tue Nov 15 2005 Peter Jones - 0.4.4-2.5 - unsplit kpartx. parted knows how to do this now, so we don't need this in a separate package. * Tue Nov 15 2005 Peter Jones - 0.4.4-2.4 - split kpartx out into its own package * Fri May 06 2005 Bill Nottingham - 0.4.4-2.3 - Fix last fix. * Thu May 05 2005 Alasdair Kergon - 0.4.4-2.2 - Fix last fix. * Wed May 04 2005 Alasdair Kergon - 0.4.4-2.1 - By default, disable the multipathd service. * Tue Apr 19 2005 Alasdair Kergon - 0.4.4-2.0 - Fix core dump from last build. * Tue Apr 19 2005 Alasdair Kergon - 0.4.4-1.0 - Move cache file into /var/cache/multipath. * Fri Apr 08 2005 Alasdair Kergon - 0.4.4-0.pre8.1 - Remove pp_balance_units. * Mon Apr 04 2005 Alasdair Kergon - 0.4.4-0.pre8.0 - Incorporate numerous upstream fixes. - Update init script to distribution standards. * Tue Mar 01 2005 Alasdair Kergon - 0.4.2-1.0 - Initial import based on Christophe Varoqui's spec file.