Bump to 0.9.4 accepted/tizen_8.0_unified sandbox/backup/multipath-tools_0.9.4_20231208 sandbox/multipath-tools_0.9.4 tizen_8.0 accepted/tizen/8.0/unified/20231005.095236 accepted/tizen/unified/20230120.182026 tizen_8.0_m2_release
authorTizenOpenSource <tizenopensrc@samsung.com>
Fri, 13 Jan 2023 06:41:17 +0000 (15:41 +0900)
committerTizenOpenSource <tizenopensrc@samsung.com>
Fri, 13 Jan 2023 06:41:17 +0000 (15:41 +0900)
Signed-off-by: TizenOpenSource <tizenopensrc@samsung.com>
.gitignore [deleted file]
config.mk [new file with mode: 0644]
libmultipath/autoconfig.h [new file with mode: 0644]
packaging/fix_mandir_for_tizen.patch [new file with mode: 0644]
packaging/multipath-tools.manifest [new file with mode: 0644]
packaging/multipath-tools.spec [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index 535353e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-*.o
-.dotest
-*~
-*.so
-*.so.0
-*.abi
-*.a
-*.gz
-*.d
-\#*
-config.mk
-cscope.files
-cscope.out
-kpartx/kpartx
-multipath/multipath
-multipath/multipath.rules
-multipath/tmpfiles.conf
-multipathd/multipathd
-multipathd/multipathc
-mpathpersist/mpathpersist
-abi.tar.gz
-abi
-abi-test
-compile_commands.json
-.nfs*
-*.swp
-*.patch
-*.rej
-*.orig
-libdmmp/docs/man/*.3.gz
-libdmmp/*.so.*
-libdmmp/test/libdmmp_test
-libdmmp/test/libdmmp_speed_test
-tests/*-test
-tests/*.out
-tests/*.vgr
-libmultipath/nvme-ioctl.c
-libmultipath/nvme-ioctl.h
-libmultipath/autoconfig.h
-*/*-nv.version
-reference-abi
diff --git a/config.mk b/config.mk
new file mode 100644 (file)
index 0000000..3fb0dd5
--- /dev/null
+++ b/config.mk
@@ -0,0 +1,11 @@
+FPIN_SUPPORT := 1
+FORTIFY_OPT := -D_FORTIFY_SOURCE=2
+SYSTEMD := 245
+ANA_SUPPORT := 1
+STACKPROT := -fstack-protector-strong
+ERROR_DISCARDED_QUALIFIERS := -Werror=discarded-qualifiers
+WNOCLOBBERED := -Wno-clobbered -Wno-error=clobbered
+WFORMATOVERFLOW := -Wformat-overflow=2
+W_MISSING_INITIALIZERS := 
+W_URCU_TYPE_LIMITS := -Wno-type-limits
+ENABLE_LIBDMMP := 0
diff --git a/libmultipath/autoconfig.h b/libmultipath/autoconfig.h
new file mode 100644 (file)
index 0000000..5cfb131
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef _AUTOCONFIG_H
+#define _AUTOCONFIG_H
+#define FPIN_EVENT_HANDLER
+#endif
diff --git a/packaging/fix_mandir_for_tizen.patch b/packaging/fix_mandir_for_tizen.patch
new file mode 100644 (file)
index 0000000..67afd15
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/Makefile.inc b/Makefile.inc
+index 2e25d2e..43687a8 100644
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -47,7 +47,7 @@ modulesloaddir       := $(systemd_prefix)/lib/modules-load.d
+ libudevdir    := $(systemd_prefix)/lib/udev
+ udevrulesdir  := $(libudevdir)/rules.d
+ bindir                := $(exec_prefix)/sbin
+-mandir                := $(usr_prefix)/share/man
++mandir                := $(prefix)/usr/share/man
+ LIB           := $(if $(shell test -d /lib64 && echo 1),lib64,lib)
+ syslibdir     := $(prefix)/$(LIB)
+ usrlibdir     := $(usr_prefix)/$(LIB)
diff --git a/packaging/multipath-tools.manifest b/packaging/multipath-tools.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/multipath-tools.spec b/packaging/multipath-tools.spec
new file mode 100644 (file)
index 0000000..64169a1
--- /dev/null
@@ -0,0 +1,82 @@
+Name:           multipath-tools
+Url:            http://christophe.varoqui.free.fr/
+Version:        0.9.4
+Release:        0
+Summary:        Tools to Manage Multipathed Devices with the device-mapper
+License:        GPL-2.0+ and LGPL-2.1+
+Group:          System/Base
+Source:         multipath-tools-%{version}.tar.bz2
+Source1001:    multipath-tools.manifest
+Source1002:    fix_mandir_for_tizen.patch
+
+BuildRequires:  device-mapper-devel
+BuildRequires:  libaio-devel
+BuildRequires:  readline-devel
+
+Requires:       device-mapper
+Requires:       kpartx
+Requires(pre):  coreutils grep
+
+%description
+This package provides the tools to manage multipathed devices by
+instructing the device-mapper multipath module what to do. The tools
+are:
+
+- multipath: scans the system for multipathed devices, assembles
+   them, and updates the device-mapper's maps
+
+- multipathd: waits for maps events then execs multipath
+
+- devmap-name: provides a meaningful device name to udev for devmaps
+
+- kpartx: maps linear devmaps to device partitions, which makes
+multipath maps partionable
+
+
+
+%package -n kpartx
+Summary:        Manages partition tables on device-mapper devices
+Group:          System/Base
+Requires:       device-mapper
+
+%description -n kpartx
+The kpartx program maps linear devmaps to device partitions, which
+makes multipath maps partionable.
+
+Authors:
+--------
+    Christophe Varoqui <christophe.varoqui@free.fr>
+
+%prep
+%setup -q -n multipath-tools-%{version}
+cp %{SOURCE1001} .
+%{__patch} -p1 < %{SOURCE1002}
+
+%build
+cd kpartx
+export CFLAGS=$(echo ${CFLAGS} | sed -E "s/-Wp\,-D_FORTIFY_SOURCE=[0-9]//g")
+export CXXFLAGS=$(echo ${CXXFLAGS} | sed -E "s/-Wp\,-D_FORTIFY_SOURCE=[0-9]//g")
+export RPM_OPT_FLAGS=$(echo ${RPM_OPT_FLAGS} | sed -E "s/-Wp\,-D_FORTIFY_SOURCE=[0-9]//g")
+make CC="%__cc" OPTFLAGS="$RPM_OPT_FLAGS" LIB=%_libdir
+
+%install
+pushd kpartx
+make DESTDIR=$RPM_BUILD_ROOT LIB=%_libdir install
+popd
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT;
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root)
+
+%files -n kpartx
+%manifest %{name}.manifest
+%license COPYING
+%config /usr/lib/udev/rules.d/*.rules
+/sbin/kpartx
+%dir /usr/lib/udev
+/usr/lib/udev/kpartx_id
+%{_mandir}/man8/kpartx.8*