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
This commit is contained in:
parent
edb91e14b0
commit
89d1eb6bd1
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
kpartx/lopart.c | 17 +++++++++++++++--
|
kpartx/lopart.c | 18 ++++++++++++++++--
|
||||||
1 file changed, 15 insertions(+), 2 deletions(-)
|
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
Index: multipath-tools-130222/kpartx/lopart.c
|
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__) \
|
#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) \
|
||||||
&& !defined (__s390x__)
|
&& !defined (__s390x__)
|
||||||
#define int2ptr(x) ((void *) ((int) x))
|
#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 dev[20];
|
||||||
char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" };
|
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 &&
|
+ if (stat("/dev/loop-control", &statbuf) == 0 &&
|
||||||
+ S_ISCHR(statbuf.st_mode)) {
|
+ S_ISCHR(statbuf.st_mode)) {
|
||||||
+ fd = open("/dev/loop-control", O_RDWR);
|
+ fd = open("/dev/loop-control", O_RDWR);
|
||||||
+ if (fd >= 0)
|
+ if (fd >= 0) {
|
||||||
+ first = ioctl(fd, LOOP_CTL_GET_FREE);
|
+ first = ioctl(fd, LOOP_CTL_GET_FREE);
|
||||||
+ close(fd);
|
+ close(fd);
|
||||||
|
+ }
|
||||||
+ if (first < 0)
|
+ if (first < 0)
|
||||||
+ first = 0;
|
+ first = 0;
|
||||||
+ }
|
+ }
|
||||||
|
33
0073-RH-update-build-flags.patch
Normal file
33
0073-RH-update-build-flags.patch
Normal file
@ -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);
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Tools to manage multipath devices using device-mapper
|
Summary: Tools to manage multipath devices using device-mapper
|
||||||
Name: device-mapper-multipath
|
Name: device-mapper-multipath
|
||||||
Version: 0.4.9
|
Version: 0.4.9
|
||||||
Release: 61%{?dist}
|
Release: 62%{?dist}
|
||||||
License: GPL+
|
License: GPL+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://christophe.varoqui.free.fr/
|
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
|
Patch0070: 0070-RHBZ-1036503-blacklist-td-devs.patch
|
||||||
Patch0071: 0071-RHBZ-1031546-strip-dev.patch
|
Patch0071: 0071-RHBZ-1031546-strip-dev.patch
|
||||||
Patch0072: 0072-RHBZ-1039199-check-loop-control.patch
|
Patch0072: 0072-RHBZ-1039199-check-loop-control.patch
|
||||||
|
Patch0073: 0073-RH-update-build-flags.patch
|
||||||
|
|
||||||
# runtime
|
# runtime
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
@ -204,6 +205,7 @@ kpartx manages partition creation and removal for device-mapper devices.
|
|||||||
%patch0070 -p1
|
%patch0070 -p1
|
||||||
%patch0071 -p1
|
%patch0071 -p1
|
||||||
%patch0072 -p1
|
%patch0072 -p1
|
||||||
|
%patch0073 -p1
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -297,6 +299,12 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
|
|||||||
%{_mandir}/man8/kpartx.8.gz
|
%{_mandir}/man8/kpartx.8.gz
|
||||||
|
|
||||||
%changelog
|
%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
|
* Tue Dec 10 2013 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-61
|
||||||
- Add 0072-RHBZ-1039199-check-loop-control.patch
|
- Add 0072-RHBZ-1039199-check-loop-control.patch
|
||||||
* Make kpartx use LOOP_CTL_GET_FREE and loop-control to find a free
|
* Make kpartx use LOOP_CTL_GET_FREE and loop-control to find a free
|
||||||
|
Loading…
Reference in New Issue
Block a user