summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2014-01-10 08:52:50 -0600
committerBenjamin Marzinski <bmarzins@redhat.com>2014-01-10 08:52:50 -0600
commit89d1eb6bd1fb4243f3872bc6d2801e0902d655d2 (patch)
tree46112bb43e69a8e102df097eddfa62ad875911a0
parentedb91e14b08cebb04a53655b54e2fbc41be4ab74 (diff)
downloaddevice-mapper-multipath-89d1eb6bd1fb4243f3872bc6d2801e0902d655d2.tar.gz
device-mapper-multipath-89d1eb6bd1fb4243f3872bc6d2801e0902d655d2.tar.xz
device-mapper-multipath-89d1eb6bd1fb4243f3872bc6d2801e0902d655d2.zip
device-mapper-multipath-0.4.9-62
Modify 0072-RHBZ-1039199-check-loop-control.patch * only call close on the /dev/loop-control fd the open succeeds Add 0073-RH-update-build-flags.patch * fix print call to work with -Werror=format-security compile flag
-rw-r--r--0072-RHBZ-1039199-check-loop-control.patch11
-rw-r--r--0073-RH-update-build-flags.patch33
-rw-r--r--device-mapper-multipath.spec10
3 files changed, 48 insertions, 6 deletions
diff --git a/0072-RHBZ-1039199-check-loop-control.patch b/0072-RHBZ-1039199-check-loop-control.patch
index 73d6f88..21bd0c3 100644
--- a/0072-RHBZ-1039199-check-loop-control.patch
+++ b/0072-RHBZ-1039199-check-loop-control.patch
@@ -1,6 +1,6 @@
---
- kpartx/lopart.c | 17 +++++++++++++++--
- 1 file changed, 15 insertions(+), 2 deletions(-)
+ kpartx/lopart.c | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
Index: multipath-tools-130222/kpartx/lopart.c
===================================================================
@@ -17,7 +17,7 @@ Index: multipath-tools-130222/kpartx/lopart.c
#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) \
&& !defined (__s390x__)
#define int2ptr(x) ((void *) ((int) x))
-@@ -140,14 +144,23 @@ find_unused_loop_device (void)
+@@ -140,14 +144,24 @@ find_unused_loop_device (void)
char dev[20];
char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" };
@@ -30,9 +30,10 @@ Index: multipath-tools-130222/kpartx/lopart.c
+ if (stat("/dev/loop-control", &statbuf) == 0 &&
+ S_ISCHR(statbuf.st_mode)) {
+ fd = open("/dev/loop-control", O_RDWR);
-+ if (fd >= 0)
++ if (fd >= 0) {
+ first = ioctl(fd, LOOP_CTL_GET_FREE);
-+ close(fd);
++ close(fd);
++ }
+ if (first < 0)
+ first = 0;
+ }
diff --git a/0073-RH-update-build-flags.patch b/0073-RH-update-build-flags.patch
new file mode 100644
index 0000000..3ab72d0
--- /dev/null
+++ b/0073-RH-update-build-flags.patch
@@ -0,0 +1,33 @@
+---
+ Makefile.inc | 2 +-
+ libmultipath/checkers/rdac.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+Index: multipath-tools-130222/Makefile.inc
+===================================================================
+--- multipath-tools-130222.orig/Makefile.inc
++++ multipath-tools-130222/Makefile.inc
+@@ -39,7 +39,7 @@ GZIP = /bin/gzip -9 -c
+ INSTALL_PROGRAM = install
+
+ ifndef RPM_OPT_FLAGS
+- RPM_OPT_FLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
++ RPM_OPT_FLAGS = -O2 -g -pipe -Wformat-security -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
+ endif
+
+ LDFLAGS += -Wl,-z,relro
+Index: multipath-tools-130222/libmultipath/checkers/rdac.c
+===================================================================
+--- multipath-tools-130222.orig/libmultipath/checkers/rdac.c
++++ multipath-tools-130222/libmultipath/checkers/rdac.c
+@@ -308,8 +308,8 @@ libcheck_check (struct checker * c)
+ done:
+ switch (ret) {
+ case PATH_DOWN:
+- MSG(c, (inqfail) ? MSG_RDAC_DOWN_TYPE("inquiry failed") :
+- checker_msg_string(&inq));
++ MSG(c, "%s", (inqfail) ? MSG_RDAC_DOWN_TYPE("inquiry failed") :
++ checker_msg_string(&inq));
+ break;
+ case PATH_UP:
+ MSG(c, MSG_RDAC_UP);
diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec
index 2625c97..340e4a2 100644
--- a/device-mapper-multipath.spec
+++ b/device-mapper-multipath.spec
@@ -1,7 +1,7 @@
Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath
Version: 0.4.9
-Release: 61%{?dist}
+Release: 62%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/
@@ -80,6 +80,7 @@ Patch0069: 0069-UPBZ-1033791-improve-rdac-checker.patch
Patch0070: 0070-RHBZ-1036503-blacklist-td-devs.patch
Patch0071: 0071-RHBZ-1031546-strip-dev.patch
Patch0072: 0072-RHBZ-1039199-check-loop-control.patch
+Patch0073: 0073-RH-update-build-flags.patch
# runtime
Requires: %{name}-libs = %{version}-%{release}
@@ -204,6 +205,7 @@ kpartx manages partition creation and removal for device-mapper devices.
%patch0070 -p1
%patch0071 -p1
%patch0072 -p1
+%patch0073 -p1
cp %{SOURCE1} .
%build
@@ -297,6 +299,12 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
%{_mandir}/man8/kpartx.8.gz
%changelog
+* Fri Jan 10 2014 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-62
+- Modify 0072-RHBZ-1039199-check-loop-control.patch
+ * only call close on the /dev/loop-control fd the open succeeds
+- Add 0073-RH-update-build-flags.patch
+ * fix print call to work with -Werror=format-security compile flag
+
* Tue Dec 10 2013 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-61
- Add 0072-RHBZ-1039199-check-loop-control.patch
* Make kpartx use LOOP_CTL_GET_FREE and loop-control to find a free