Accepting request 681251 from network:ha-clustering:Factory

OBS-URL: https://build.opensuse.org/request/show/681251
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocfs2-tools?expand=0&rev=73
This commit is contained in:
Dominique Leuenberger 2019-03-05 11:21:38 +00:00 committed by Git OBS Bridge
commit 24a6bdccc3
4 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,36 @@
From e6e049ca6a371528ebf39b106209c2df586500bc Mon Sep 17 00:00:00 2001
From: Gang He <ghe@suse.com>
Date: Mon, 4 Mar 2019 15:20:34 +0800
Subject: [PATCH] Fix build failure with glibc 2.28
Since glibc git 663e7d78 (to be 2.28), type loff_t will be only defined
when _DEFAULT_SOURCE defined. And with _XOPEN_SOURCE defined,
_DEFAULT_SOURCE will not be defined by default.
Build failed with the error messages like,
Make[1]: Entering directory '/builddir/build/BUILD/ocfs2-tools-ocfs2-tools-1.8.5/libo2cb'
gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -pipe -fPIC -I../include -I. -DHAVE_CMAP -DHAVE_FSDLM -MD -MP -MF ./.o2cb_abi.d -o o2cb_abi.o -c o2cb_abi.c
In file included from o2cb_abi.c:52:
../include/ocfs2/ocfs2.h:222:2: error: unknown type name 'loff_t'
loff_t d_off; /* Offset of structure in the file */
^~~~~~
---
Preamble.make | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Preamble.make b/Preamble.make
index b9b4af03..10adc031 100644
--- a/Preamble.make
+++ b/Preamble.make
@@ -28,7 +28,7 @@ DIST_RULES =
INCLUDES =
DEFINES =
-CFLAGS += -pipe
+CFLAGS += -pipe -D_DEFAULT_SOURCE=1
# protect with configure?
CDEPFLAGS = -MD -MP -MF $(@D)/.$(basename $(@F)).d
--
2.19.2

View File

@ -0,0 +1,37 @@
From 03be837c7d0b9be393ffb555879c49e6212fbd0f Mon Sep 17 00:00:00 2001
From: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Date: Thu, 25 Jan 2018 13:05:27 +0100
Subject: [PATCH] mounted.ocfs2: use <sys/sysmacros.h> include for makedev
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
mounted.c: In function build_partition_list:
mounted.c:354:13: warning: In the GNU C Library, "makedev" is defined
by <sys/sysmacros.h>. For historical compatibility, it is
currently defined by <sys/types.h> as well, but we plan to
remove this soon. To use "makedev", include <sys/sysmacros.h>
directly. If you did not intend to use a system-defined macro
"makedev", you should undefine it after including <sys/types.h>.
makedev(major, minor), &devname);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
---
mounted.ocfs2/mounted.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mounted.ocfs2/mounted.c b/mounted.ocfs2/mounted.c
index 1576f902..090ab4ed 100644
--- a/mounted.ocfs2/mounted.c
+++ b/mounted.ocfs2/mounted.c
@@ -25,7 +25,7 @@
#define _LARGEFILE64_SOURCE
#define _GNU_SOURCE /* Because libc really doesn't want us using O_DIRECT? */
-#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
--
2.19.2

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Mar 4 10:00:30 UTC 2019 - ghe@suse.com
- Fix build failure with glibc-2.28 (bsc#1126968)
+ mounted.ocfs2-use-sys-sysmacros.h-include-for-makede.patch
+ fix-build-failure-with-glibc-2.28.patch
-------------------------------------------------------------------
Thu Jan 10 10:25:30 UTC 2019 - ghe@suse.com

View File

@ -58,6 +58,8 @@ Patch405: 0007-vendor-Add-vendor-files-for-sles12.patch
Patch406: 0008-ocfs2-tools-add-systemd-support-fix.patch
Patch501: bnc#96864-ocfs2console-fix-starting-failure.patch
Patch502: fsck.ocfs2-fix-compile-error-when-glibc-upgrade.patch
Patch503: mounted.ocfs2-use-sys-sysmacros.h-include-for-makede.patch
Patch504: fix-build-failure-with-glibc-2.28.patch
BuildRequires: autoconf
BuildRequires: e2fsprogs-devel
@ -169,6 +171,8 @@ OCFS2 filesystem.
%patch406 -p1
%patch501 -p1
%patch502 -p1
%patch503 -p1
%patch504 -p1
%build
export PROJECT="ocfs2-tools"