Compare commits
No commits in common. "master" and "f14" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1 @@
|
||||
ocfs2-tools-1.4.3.tar.gz
|
||||
/ocfs2-tools-1.6.3.tar.gz
|
||||
/ocfs2-tools-1.8.5.tar.gz
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 5ad9fc097fd96c4872b08cf343f7c42f4ea18334 Mon Sep 17 00:00:00 2001
|
||||
From: Robin Lee <cheeselee@fedoraproject.org>
|
||||
Date: Sat, 22 Sep 2018 23:03:59 +0800
|
||||
Subject: [PATCH] Explicit call Python 2 command
|
||||
|
||||
---
|
||||
ocfs2console/ocfs2console | 2 +-
|
||||
ocfs2console/ocfs2interface/Makefile | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/ocfs2console/ocfs2console b/ocfs2console/ocfs2console
|
||||
index 5130d52f..6c713780 100755
|
||||
--- a/ocfs2console/ocfs2console
|
||||
+++ b/ocfs2console/ocfs2console
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python -W ignore::DeprecationWarning
|
||||
+#!/usr/bin/python2 -W ignore::DeprecationWarning
|
||||
|
||||
from ocfs2interface.about import process_args
|
||||
nodeconf = process_args()
|
||||
diff --git a/ocfs2console/ocfs2interface/Makefile b/ocfs2console/ocfs2interface/Makefile
|
||||
index 7c7c9b1c..4964bce2 100644
|
||||
--- a/ocfs2console/ocfs2interface/Makefile
|
||||
+++ b/ocfs2console/ocfs2interface/Makefile
|
||||
@@ -97,16 +97,16 @@ INSTALL_RULES = install-pylib
|
||||
DIST_FILES = $(PLIST_CFILES) $(PLIST_HFILES) $(GIDLE_CFILES) $(OCFS2_CFILES) $(O2CB_CFILES) $(PYSRC) $(addsuffix .in,$(BUILT_PYSRC))
|
||||
|
||||
plistmodule.so: $(PLIST_OBJS) $(LIBOCFS2_DEPS) $(LIBO2DLM_DEPS) $(LIBO2CB_DEPS) $(BLKID_DEPS)
|
||||
- $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(BLKID_LIBS) $(COM_ERR_LIBS) $(GLIB_LIBS) $(shell python-config --libs)
|
||||
+ $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(BLKID_LIBS) $(COM_ERR_LIBS) $(GLIB_LIBS) $(shell python2-config --libs)
|
||||
|
||||
gidlemodule.so: $(GIDLE_OBJS)
|
||||
- $(LINK) -shared $(GLIB_LIBS) $(shell python-config --libs)
|
||||
+ $(LINK) -shared $(GLIB_LIBS) $(shell python2-config --libs)
|
||||
|
||||
ocfs2module.so: $(OCFS2_OBJS) $(LIBOCFS2_DEPS) $(LIBO2DLM_DEPS) $(LIBO2CB_DEPS)
|
||||
- $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(UUID_LIBS) $(shell python-config --libs)
|
||||
+ $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(UUID_LIBS) $(shell python2-config --libs)
|
||||
|
||||
o2cbmodule.so: $(O2CB_OBJS) $(LIBO2CB_DEPS)
|
||||
- $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(shell python-config --libs)
|
||||
+ $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(shell python2-config --libs)
|
||||
|
||||
install-pylib:
|
||||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(pyexecdir)/ocfs2interface
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,573 +0,0 @@
|
||||
From fa150e35931123fc630125ebef1901ffb30d421f Mon Sep 17 00:00:00 2001
|
||||
From: Robin Lee <cheeselee@fedoraproject.org>
|
||||
Date: Tue, 13 Mar 2018 16:39:43 +0800
|
||||
Subject: [PATCH] Fix build 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.
|
||||
|
||||
Without this fix, build failed with
|
||||
|
||||
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 */
|
||||
^~~~~~
|
||||
|
||||
Signed-off-by: Robin Lee <cheeselee@fedoraproject.org>
|
||||
---
|
||||
debugfs.ocfs2/dump_fs_locks.c | 1 +
|
||||
extras/check_metaecc.c | 1 +
|
||||
extras/find_allocation_fragments.c | 1 +
|
||||
extras/find_dup_extents.c | 1 +
|
||||
extras/find_hardlinks.c | 1 +
|
||||
extras/find_inode_paths.c | 1 +
|
||||
extras/mark_journal_dirty.c | 1 +
|
||||
extras/resize_slotmap.c | 1 +
|
||||
extras/set_random_bits.c | 1 +
|
||||
fsck.ocfs2/dirblocks.c | 1 +
|
||||
include/ocfs2/ocfs2.h | 3 +++
|
||||
libo2cb/o2cb_abi.c | 1 +
|
||||
libocfs2/alloc.c | 1 +
|
||||
libocfs2/bitmap.c | 1 +
|
||||
libocfs2/blockcheck.c | 1 +
|
||||
libocfs2/blocktype.c | 1 +
|
||||
libocfs2/cached_inode.c | 1 +
|
||||
libocfs2/chain.c | 1 +
|
||||
libocfs2/chainalloc.c | 1 +
|
||||
libocfs2/dir_iterate.c | 1 +
|
||||
libocfs2/dirblock.c | 1 +
|
||||
libocfs2/expanddir.c | 1 +
|
||||
libocfs2/extend_file.c | 1 +
|
||||
libocfs2/extent_map.c | 1 +
|
||||
libocfs2/extents.c | 1 +
|
||||
libocfs2/fileio.c | 1 +
|
||||
libocfs2/freefs.c | 1 +
|
||||
libocfs2/image.c | 1 +
|
||||
libocfs2/inode.c | 1 +
|
||||
libocfs2/inode_scan.c | 1 +
|
||||
libocfs2/link.c | 1 +
|
||||
libocfs2/lookup.c | 1 +
|
||||
libocfs2/memory.c | 1 +
|
||||
libocfs2/mkjournal.c | 1 +
|
||||
libocfs2/namei.c | 1 +
|
||||
libocfs2/openfs.c | 1 +
|
||||
libocfs2/refcount.c | 1 +
|
||||
libocfs2/slot_map.c | 1 +
|
||||
libocfs2/sysfile.c | 1 +
|
||||
libocfs2/truncate.c | 1 +
|
||||
libocfs2/unlink.c | 1 +
|
||||
o2image/o2image.c | 1 +
|
||||
42 files changed, 44 insertions(+)
|
||||
|
||||
diff --git a/debugfs.ocfs2/dump_fs_locks.c b/debugfs.ocfs2/dump_fs_locks.c
|
||||
index 05f52274..1c673e74 100644
|
||||
--- a/debugfs.ocfs2/dump_fs_locks.c
|
||||
+++ b/debugfs.ocfs2/dump_fs_locks.c
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <sys/types.h>
|
||||
diff --git a/extras/check_metaecc.c b/extras/check_metaecc.c
|
||||
index 0bf2f3df..bf44c3fe 100644
|
||||
--- a/extras/check_metaecc.c
|
||||
+++ b/extras/check_metaecc.c
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/extras/find_allocation_fragments.c b/extras/find_allocation_fragments.c
|
||||
index 990c0906..d767b2a8 100644
|
||||
--- a/extras/find_allocation_fragments.c
|
||||
+++ b/extras/find_allocation_fragments.c
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <unistd.h>
|
||||
diff --git a/extras/find_dup_extents.c b/extras/find_dup_extents.c
|
||||
index e8961a9c..f811eafc 100644
|
||||
--- a/extras/find_dup_extents.c
|
||||
+++ b/extras/find_dup_extents.c
|
||||
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/extras/find_hardlinks.c b/extras/find_hardlinks.c
|
||||
index 9c9cbeb8..9c7a820e 100644
|
||||
--- a/extras/find_hardlinks.c
|
||||
+++ b/extras/find_hardlinks.c
|
||||
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/extras/find_inode_paths.c b/extras/find_inode_paths.c
|
||||
index f6bb4b94..09dc3240 100644
|
||||
--- a/extras/find_inode_paths.c
|
||||
+++ b/extras/find_inode_paths.c
|
||||
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/extras/mark_journal_dirty.c b/extras/mark_journal_dirty.c
|
||||
index aa36a70e..fccc5a5b 100644
|
||||
--- a/extras/mark_journal_dirty.c
|
||||
+++ b/extras/mark_journal_dirty.c
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/extras/resize_slotmap.c b/extras/resize_slotmap.c
|
||||
index 082f544c..485bf282 100644
|
||||
--- a/extras/resize_slotmap.c
|
||||
+++ b/extras/resize_slotmap.c
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/extras/set_random_bits.c b/extras/set_random_bits.c
|
||||
index 6bbc7e93..0d627eca 100644
|
||||
--- a/extras/set_random_bits.c
|
||||
+++ b/extras/set_random_bits.c
|
||||
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/fsck.ocfs2/dirblocks.c b/fsck.ocfs2/dirblocks.c
|
||||
index b4b5c059..ba91c013 100644
|
||||
--- a/fsck.ocfs2/dirblocks.c
|
||||
+++ b/fsck.ocfs2/dirblocks.c
|
||||
@@ -22,6 +22,7 @@
|
||||
* Just a simple rbtree wrapper to record directory blocks and the inodes
|
||||
* that own them.
|
||||
*/
|
||||
+#define _DEFAULT_SOURCE
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
diff --git a/include/ocfs2/ocfs2.h b/include/ocfs2/ocfs2.h
|
||||
index b937ca31..4cbc8ad6 100644
|
||||
--- a/include/ocfs2/ocfs2.h
|
||||
+++ b/include/ocfs2/ocfs2.h
|
||||
@@ -30,6 +30,9 @@
|
||||
#ifndef _XOPEN_SOURCE
|
||||
# define _XOPEN_SOURCE 600
|
||||
#endif
|
||||
+#ifndef _DEFAULT_SOURCE
|
||||
+# define _DEFAULT_SOURCE // for loff_t, needed for glibc >= 2.28
|
||||
+#endif
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
# define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
|
||||
index 65ca7934..5c6f4b4b 100644
|
||||
--- a/libo2cb/o2cb_abi.c
|
||||
+++ b/libo2cb/o2cb_abi.c
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <inttypes.h>
|
||||
diff --git a/libocfs2/alloc.c b/libocfs2/alloc.c
|
||||
index df228532..989901fc 100644
|
||||
--- a/libocfs2/alloc.c
|
||||
+++ b/libocfs2/alloc.c
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/bitmap.c b/libocfs2/bitmap.c
|
||||
index 72c77e39..3583d9c0 100644
|
||||
--- a/libocfs2/bitmap.c
|
||||
+++ b/libocfs2/bitmap.c
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/blockcheck.c b/libocfs2/blockcheck.c
|
||||
index 716253a6..9adec584 100644
|
||||
--- a/libocfs2/blockcheck.c
|
||||
+++ b/libocfs2/blockcheck.c
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#ifdef DEBUG_EXE
|
||||
diff --git a/libocfs2/blocktype.c b/libocfs2/blocktype.c
|
||||
index 76484f07..82132ba0 100644
|
||||
--- a/libocfs2/blocktype.c
|
||||
+++ b/libocfs2/blocktype.c
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/cached_inode.c b/libocfs2/cached_inode.c
|
||||
index 47788b25..4d6efff5 100644
|
||||
--- a/libocfs2/cached_inode.c
|
||||
+++ b/libocfs2/cached_inode.c
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/chain.c b/libocfs2/chain.c
|
||||
index cd48845d..2bbc001f 100644
|
||||
--- a/libocfs2/chain.c
|
||||
+++ b/libocfs2/chain.c
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/chainalloc.c b/libocfs2/chainalloc.c
|
||||
index 5c603015..cdf629c8 100644
|
||||
--- a/libocfs2/chainalloc.c
|
||||
+++ b/libocfs2/chainalloc.c
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/dir_iterate.c b/libocfs2/dir_iterate.c
|
||||
index 9dc1c4b6..bac18ab8 100644
|
||||
--- a/libocfs2/dir_iterate.c
|
||||
+++ b/libocfs2/dir_iterate.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <inttypes.h>
|
||||
diff --git a/libocfs2/dirblock.c b/libocfs2/dirblock.c
|
||||
index dc9418fc..a90081f7 100644
|
||||
--- a/libocfs2/dirblock.c
|
||||
+++ b/libocfs2/dirblock.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/expanddir.c b/libocfs2/expanddir.c
|
||||
index 11775b57..20d7ef9f 100644
|
||||
--- a/libocfs2/expanddir.c
|
||||
+++ b/libocfs2/expanddir.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
diff --git a/libocfs2/extend_file.c b/libocfs2/extend_file.c
|
||||
index 3c8f41b7..7619cb0a 100644
|
||||
--- a/libocfs2/extend_file.c
|
||||
+++ b/libocfs2/extend_file.c
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/extent_map.c b/libocfs2/extent_map.c
|
||||
index ce84d7ec..06bde172 100644
|
||||
--- a/libocfs2/extent_map.c
|
||||
+++ b/libocfs2/extent_map.c
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/extents.c b/libocfs2/extents.c
|
||||
index bf49e690..ac377021 100644
|
||||
--- a/libocfs2/extents.c
|
||||
+++ b/libocfs2/extents.c
|
||||
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/fileio.c b/libocfs2/fileio.c
|
||||
index a14a3edb..61673102 100644
|
||||
--- a/libocfs2/fileio.c
|
||||
+++ b/libocfs2/fileio.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/freefs.c b/libocfs2/freefs.c
|
||||
index e36d8b3d..4213ef8a 100644
|
||||
--- a/libocfs2/freefs.c
|
||||
+++ b/libocfs2/freefs.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdlib.h>
|
||||
diff --git a/libocfs2/image.c b/libocfs2/image.c
|
||||
index 4ceab676..24939d10 100644
|
||||
--- a/libocfs2/image.c
|
||||
+++ b/libocfs2/image.c
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
diff --git a/libocfs2/inode.c b/libocfs2/inode.c
|
||||
index 2f7d570b..c514e6ab 100644
|
||||
--- a/libocfs2/inode.c
|
||||
+++ b/libocfs2/inode.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/inode_scan.c b/libocfs2/inode_scan.c
|
||||
index 317fc644..b7020d59 100644
|
||||
--- a/libocfs2/inode_scan.c
|
||||
+++ b/libocfs2/inode_scan.c
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/link.c b/libocfs2/link.c
|
||||
index 8f389b53..08a5bb21 100644
|
||||
--- a/libocfs2/link.c
|
||||
+++ b/libocfs2/link.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/lookup.c b/libocfs2/lookup.c
|
||||
index a8d0f3c7..44ac392f 100644
|
||||
--- a/libocfs2/lookup.c
|
||||
+++ b/libocfs2/lookup.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/memory.c b/libocfs2/memory.c
|
||||
index ecdccc5c..40dc5ae4 100644
|
||||
--- a/libocfs2/memory.c
|
||||
+++ b/libocfs2/memory.c
|
||||
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/mkjournal.c b/libocfs2/mkjournal.c
|
||||
index 6c425626..22b76a14 100644
|
||||
--- a/libocfs2/mkjournal.c
|
||||
+++ b/libocfs2/mkjournal.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/namei.c b/libocfs2/namei.c
|
||||
index 20c70f02..7159101a 100644
|
||||
--- a/libocfs2/namei.c
|
||||
+++ b/libocfs2/namei.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
diff --git a/libocfs2/openfs.c b/libocfs2/openfs.c
|
||||
index 21a78c1d..2a758bb1 100644
|
||||
--- a/libocfs2/openfs.c
|
||||
+++ b/libocfs2/openfs.c
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/refcount.c b/libocfs2/refcount.c
|
||||
index 5756844a..bcf2cdfb 100644
|
||||
--- a/libocfs2/refcount.c
|
||||
+++ b/libocfs2/refcount.c
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/slot_map.c b/libocfs2/slot_map.c
|
||||
index 66f35418..923468ce 100644
|
||||
--- a/libocfs2/slot_map.c
|
||||
+++ b/libocfs2/slot_map.c
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include "ocfs2/byteorder.h"
|
||||
diff --git a/libocfs2/sysfile.c b/libocfs2/sysfile.c
|
||||
index b574dcd0..35c620ad 100644
|
||||
--- a/libocfs2/sysfile.c
|
||||
+++ b/libocfs2/sysfile.c
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers XOPEN2K in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/truncate.c b/libocfs2/truncate.c
|
||||
index fcfd9521..6cdc5646 100644
|
||||
--- a/libocfs2/truncate.c
|
||||
+++ b/libocfs2/truncate.c
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/libocfs2/unlink.c b/libocfs2/unlink.c
|
||||
index 1f45f540..425788ad 100644
|
||||
--- a/libocfs2/unlink.c
|
||||
+++ b/libocfs2/unlink.c
|
||||
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <string.h>
|
||||
diff --git a/o2image/o2image.c b/o2image/o2image.c
|
||||
index 1dd16ed5..1a1b4970 100644
|
||||
--- a/o2image/o2image.c
|
||||
+++ b/o2image/o2image.c
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600 /* Triggers magic in features.h */
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
--
|
||||
2.17.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@
|
||||
From 460afefe7c91b90d88e4dc0ed03f894134b9fb6a Mon Sep 17 00:00:00 2001
|
||||
From: Robin Lee <cheeselee@fedoraproject.org>
|
||||
Date: Tue, 6 Feb 2018 16:26:34 +0800
|
||||
Subject: [PATCH] Update FSF address in ipwidget.py
|
||||
|
||||
---
|
||||
ocfs2console/ocfs2interface/ipwidget.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ocfs2console/ocfs2interface/ipwidget.py b/ocfs2console/ocfs2interface/ipwidget.py
|
||||
index c4f18212..410345df 100644
|
||||
--- a/ocfs2console/ocfs2interface/ipwidget.py
|
||||
+++ b/ocfs2console/ocfs2interface/ipwidget.py
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Library Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Modified by Manish Singh <manish.singh@oracle.com>
|
||||
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,86 +0,0 @@
|
||||
From 0ffd58b223e24779420130522ea8ee359505f493 Mon Sep 17 00:00:00 2001
|
||||
From: Gang He <ghe@suse.com>
|
||||
Date: Mon, 4 Sep 2017 14:08:59 +0800
|
||||
Subject: [PATCH] fsck.ocfs2: fix compile error when glibc upgrade
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When glibc upgrade to glibc-2.26.90-14, there was a compile error in fsck.ocfs2,
|
||||
the compile error messages like,
|
||||
|
||||
In file included from /usr/include/string.h:431:0,
|
||||
from ../include/ocfs2/ocfs2.h:41,
|
||||
from pass4.c:32:
|
||||
include/strings.h:37:1: error: unknown type name ‘errcode_t’; did you mean ‘mode_t’?
|
||||
errcode_t o2fsck_strings_insert(o2fsck_strings *strings, char *string,
|
||||
^~~~~~~~~
|
||||
mode_t
|
||||
---
|
||||
fsck.ocfs2/Makefile | 2 +-
|
||||
fsck.ocfs2/include/{strings.h => o2fsck_strings.h} | 0
|
||||
fsck.ocfs2/pass2.c | 2 +-
|
||||
fsck.ocfs2/pass5.c | 2 +-
|
||||
fsck.ocfs2/strings.c | 2 +-
|
||||
5 files changed, 4 insertions(+), 4 deletions(-)
|
||||
rename fsck.ocfs2/include/{strings.h => o2fsck_strings.h} (100%)
|
||||
|
||||
diff --git a/fsck.ocfs2/Makefile b/fsck.ocfs2/Makefile
|
||||
index 051ed742..baf1994d 100644
|
||||
--- a/fsck.ocfs2/Makefile
|
||||
+++ b/fsck.ocfs2/Makefile
|
||||
@@ -64,7 +64,7 @@ HFILES = include/fsck.h \
|
||||
include/problem.h \
|
||||
include/refcount.h \
|
||||
include/slot_recovery.h \
|
||||
- include/strings.h \
|
||||
+ include/o2fsck_strings.h \
|
||||
include/util.h
|
||||
|
||||
|
||||
diff --git a/fsck.ocfs2/include/strings.h b/fsck.ocfs2/include/o2fsck_strings.h
|
||||
similarity index 100%
|
||||
rename from fsck.ocfs2/include/strings.h
|
||||
rename to fsck.ocfs2/include/o2fsck_strings.h
|
||||
diff --git a/fsck.ocfs2/pass2.c b/fsck.ocfs2/pass2.c
|
||||
index 181febb9..a48a50b5 100644
|
||||
--- a/fsck.ocfs2/pass2.c
|
||||
+++ b/fsck.ocfs2/pass2.c
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "fsck.h"
|
||||
#include "pass2.h"
|
||||
#include "problem.h"
|
||||
-#include "strings.h"
|
||||
+#include "o2fsck_strings.h"
|
||||
#include "util.h"
|
||||
|
||||
static const char *whoami = "pass2";
|
||||
diff --git a/fsck.ocfs2/pass5.c b/fsck.ocfs2/pass5.c
|
||||
index 5c2d899f..bfad1b72 100644
|
||||
--- a/fsck.ocfs2/pass5.c
|
||||
+++ b/fsck.ocfs2/pass5.c
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "fsck.h"
|
||||
#include "pass5.h"
|
||||
#include "problem.h"
|
||||
-#include "strings.h"
|
||||
+#include "o2fsck_strings.h"
|
||||
#include "util.h"
|
||||
|
||||
static const char *whoami = "pass5";
|
||||
diff --git a/fsck.ocfs2/strings.c b/fsck.ocfs2/strings.c
|
||||
index 4ad37822..8a7a8d9d 100644
|
||||
--- a/fsck.ocfs2/strings.c
|
||||
+++ b/fsck.ocfs2/strings.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "ocfs2/ocfs2.h"
|
||||
|
||||
#include "fsck.h"
|
||||
-#include "strings.h"
|
||||
+#include "o2fsck_strings.h"
|
||||
#include "util.h"
|
||||
|
||||
struct string_entry {
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 4ff2ee858381ec4da59bdfdf0e6d33a62a83293c Mon Sep 17 00:00:00 2001
|
||||
From: Valentin Vidic <Valentin.Vidic@CARNet.hr>
|
||||
Date: Thu, 25 Jan 2018 13:50:51 +0100
|
||||
Subject: [PATCH] libo2dlm: dlopen libdlm_lt.so.3 instead of libdlm_lt.so
|
||||
|
||||
Because libdlm_lt.so is only shipped in the libdlm-dev package.
|
||||
---
|
||||
libo2dlm/o2dlm.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libo2dlm/o2dlm.c b/libo2dlm/o2dlm.c
|
||||
index 0a2f6627..ad590a66 100644
|
||||
--- a/libo2dlm/o2dlm.c
|
||||
+++ b/libo2dlm/o2dlm.c
|
||||
@@ -803,7 +803,7 @@ static errcode_t load_fsdlm(struct o2dlm_ctxt *ctxt)
|
||||
goto out;
|
||||
}
|
||||
|
||||
- ctxt->ct_lib_handle = dlopen("libdlm_lt.so",
|
||||
+ ctxt->ct_lib_handle = dlopen("libdlm_lt.so.3",
|
||||
RTLD_NOW | RTLD_LOCAL);
|
||||
if (!ctxt->ct_lib_handle)
|
||||
goto out;
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,37 +0,0 @@
|
||||
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.17.0
|
||||
|
@ -1,48 +0,0 @@
|
||||
From e686b8013a14b9b28e77bf08457d426f45689e9d Mon Sep 17 00:00:00 2001
|
||||
From: Robin Lee <cheeselee@fedoraproject.org>
|
||||
Date: Mon, 29 Jan 2018 15:01:32 +0800
|
||||
Subject: [PATCH] ocfs2console: explicitly specified link libraries
|
||||
|
||||
Signed-off-by: Robin Lee <cheeselee@fedoraproject.org>
|
||||
---
|
||||
ocfs2console/ocfs2interface/Makefile | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/ocfs2console/ocfs2interface/Makefile b/ocfs2console/ocfs2interface/Makefile
|
||||
index 54094559..7c7c9b1c 100644
|
||||
--- a/ocfs2console/ocfs2interface/Makefile
|
||||
+++ b/ocfs2console/ocfs2interface/Makefile
|
||||
@@ -19,6 +19,9 @@ LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm_lt
|
||||
else
|
||||
LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
|
||||
endif
|
||||
+ifneq ($(BUILD_CMAP_SUPPORT),)
|
||||
+LIBO2CB_LIBS += -lcmap
|
||||
+endif
|
||||
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
|
||||
|
||||
ifdef HAVE_BLKID
|
||||
@@ -94,16 +97,16 @@ INSTALL_RULES = install-pylib
|
||||
DIST_FILES = $(PLIST_CFILES) $(PLIST_HFILES) $(GIDLE_CFILES) $(OCFS2_CFILES) $(O2CB_CFILES) $(PYSRC) $(addsuffix .in,$(BUILT_PYSRC))
|
||||
|
||||
plistmodule.so: $(PLIST_OBJS) $(LIBOCFS2_DEPS) $(LIBO2DLM_DEPS) $(LIBO2CB_DEPS) $(BLKID_DEPS)
|
||||
- $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(BLKID_LIBS) $(COM_ERR_LIBS) $(GLIB_LIBS)
|
||||
+ $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(BLKID_LIBS) $(COM_ERR_LIBS) $(GLIB_LIBS) $(shell python-config --libs)
|
||||
|
||||
gidlemodule.so: $(GIDLE_OBJS)
|
||||
- $(LINK) -shared $(GLIB_LIBS)
|
||||
+ $(LINK) -shared $(GLIB_LIBS) $(shell python-config --libs)
|
||||
|
||||
ocfs2module.so: $(OCFS2_OBJS) $(LIBOCFS2_DEPS) $(LIBO2DLM_DEPS) $(LIBO2CB_DEPS)
|
||||
- $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(UUID_LIBS)
|
||||
+ $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(UUID_LIBS) $(shell python-config --libs)
|
||||
|
||||
o2cbmodule.so: $(O2CB_OBJS) $(LIBO2CB_DEPS)
|
||||
- $(LINK) -shared $(LIBO2CB_LIBS) $(COM_ERR_LIBS)
|
||||
+ $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(shell python-config --libs)
|
||||
|
||||
install-pylib:
|
||||
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(pyexecdir)/ocfs2interface
|
||||
--
|
||||
2.13.6
|
||||
|
32
minor_build_fixes.diff
Normal file
32
minor_build_fixes.diff
Normal file
@ -0,0 +1,32 @@
|
||||
diff -Nuard ocfs2-tools-1.4.3.orig/ocfs2_controld/Makefile ocfs2-tools-1.4.3/ocfs2_controld/Makefile
|
||||
--- ocfs2-tools-1.4.3.orig/ocfs2_controld/Makefile 2009-04-14 00:10:40.000000000 +0200
|
||||
+++ ocfs2-tools-1.4.3/ocfs2_controld/Makefile 2009-09-30 08:22:04.000000000 +0200
|
||||
@@ -17,7 +17,7 @@
|
||||
PCMK_INCLUDES = -I/usr/include/pacemaker -I/usr/include/heartbeat/ $(GLIB_CFLAGS)
|
||||
endif
|
||||
|
||||
-INCLUDES = -I$(TOPDIR)/include -I. $(PCMK_INCLUDES)
|
||||
+INCLUDES = -I/usr/include/libxml2 -I$(TOPDIR)/include -I. $(PCMK_INCLUDES)
|
||||
LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
|
||||
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a
|
||||
LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
|
||||
diff -Nuard ocfs2-tools-1.4.3.orig/ocfs2_controld/pacemaker.c ocfs2-tools-1.4.3/ocfs2_controld/pacemaker.c
|
||||
--- ocfs2-tools-1.4.3.orig/ocfs2_controld/pacemaker.c 2009-05-06 03:36:57.000000000 +0200
|
||||
+++ ocfs2-tools-1.4.3/ocfs2_controld/pacemaker.c 2009-09-30 08:22:22.000000000 +0200
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <bzlib.h>
|
||||
|
||||
+#include <corosync/corodefs.h>
|
||||
#include <pacemaker/crm_config.h>
|
||||
/* heartbeat support is irrelevant here */
|
||||
#undef SUPPORT_HEARTBEAT
|
||||
@@ -155,7 +156,7 @@
|
||||
crm_log_init("ocfs2_controld", LOG_INFO, FALSE, TRUE, 0, NULL);
|
||||
|
||||
if(init_ais_connection(NULL, NULL, NULL, &local_node_uname, &our_nodeid) == FALSE) {
|
||||
- log_error("Connection to our AIS plugin (%d) failed", CRM_SERVICE);
|
||||
+ log_error("Connection to our AIS plugin (%d) failed", PCMK_SERVICE);
|
||||
return -1;
|
||||
}
|
||||
|
12
no_stonithd.diff
Normal file
12
no_stonithd.diff
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ru ocfs2-tools-1.4.3.orig/ocfs2_controld/Makefile ocfs2-tools-1.4.3/ocfs2_controld/Makefile
|
||||
--- ocfs2-tools-1.4.3.orig/ocfs2_controld/Makefile 2010-02-14 15:03:18.000000000 +0000
|
||||
+++ ocfs2-tools-1.4.3/ocfs2_controld/Makefile 2010-02-14 15:03:49.000000000 +0000
|
||||
@@ -67,7 +67,7 @@
|
||||
ocfs2_controld.pcmk: $(PCMK_DAEMON_OBJS) $(LIBO2CB_DEPS)
|
||||
$(LINK) $(GLIB_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) \
|
||||
$(OPENAIS_LIBS) $(COROSYNC_LIBS) \
|
||||
- $(DLMCONTROL_LIBS) -lcrmcluster -lstonithd
|
||||
+ $(DLMCONTROL_LIBS) -lcrmcluster -lcrmcommon
|
||||
|
||||
ocfs2_controld.cman: $(CMAN_DAEMON_OBJS) $(LIBO2CB_DEPS)
|
||||
$(LINK) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(OPENAIS_LIBS) \
|
460
o2cb_pcmk.diff
Normal file
460
o2cb_pcmk.diff
Normal file
@ -0,0 +1,460 @@
|
||||
diff -Nuard ocfs2-tools-1.4.2.orig/vendor/common/o2cb.ocf ocfs2-tools-1.4.2/vendor/common/o2cb.ocf
|
||||
--- ocfs2-tools-1.4.2.orig/vendor/common/o2cb.ocf 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ ocfs2-tools-1.4.2/vendor/common/o2cb.ocf 2009-09-15 06:30:58.000000000 +0200
|
||||
@@ -0,0 +1,456 @@
|
||||
+#!/bin/bash
|
||||
+# Copyright (c) 2008 Andrew Beekhof
|
||||
+# All Rights Reserved.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of version 2 of the GNU General Public License as
|
||||
+# published by the Free Software Foundation.
|
||||
+#
|
||||
+# This program is distributed in the hope that it would be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
+#
|
||||
+# Further, this software is distributed without any warranty that it is
|
||||
+# free of the rightful claim of any third person regarding infringement
|
||||
+# or the like. Any license provided herein, whether implied or
|
||||
+# otherwise, applies only to this software file. Patent licenses, if
|
||||
+# any, provided herein do not apply to combinations of this program with
|
||||
+# other software, or any other product whatsoever.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write the Free Software Foundation,
|
||||
+# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||
+#
|
||||
+#######################################################################
|
||||
+
|
||||
+# OCF initialization
|
||||
+. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
|
||||
+
|
||||
+# Parameter defaults
|
||||
+: ${OCF_RESKEY_stack:="pcmk"}
|
||||
+: ${OCF_RESKEY_sysfs:="/sys/fs"}
|
||||
+: ${OCF_RESKEY_daemon_timeout:="10"}
|
||||
+: ${OCF_RESKEY_configfs:="/sys/kernel/config"}
|
||||
+: ${OCF_RESKEY_CRM_meta_gloablly_unique:="false"}
|
||||
+
|
||||
+# Common variables
|
||||
+DAEMON="/sbin/ocfs2_controld.${OCF_RESKEY_stack}"
|
||||
+CLUSTER_STACK_FILE="${OCF_RESKEY_sysfs}/ocfs2/cluster_stack"
|
||||
+LOADED_PLUGINS_FILE="${OCF_RESKEY_sysfs}/ocfs2/loaded_cluster_plugins"
|
||||
+
|
||||
+#
|
||||
+# Check to see if a filesystem driver is loaded.
|
||||
+# 0 is loaded, 1 is not.
|
||||
+#
|
||||
+driver_filesystem() {
|
||||
+ if [ -z "$1" ]
|
||||
+ then
|
||||
+ ocf_log err "driver_filesystem(): Missing an argument"
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ FSNAME="$1"
|
||||
+
|
||||
+ FSOUT="$(awk '(NF == 1 && $1 ~ /^'$FSNAME'$/) || $2 ~ /^'$FSNAME'$/{
|
||||
+ print $1;exit
|
||||
+ }' /proc/filesystems 2>/dev/null)"
|
||||
+
|
||||
+ test -n "$FSOUT"
|
||||
+ return $?
|
||||
+}
|
||||
+
|
||||
+#
|
||||
+# Check to see if a filesystem of type $1 is mounted at $2.
|
||||
+#
|
||||
+# 0 is mounted, 1 is not.
|
||||
+#
|
||||
+check_filesystem()
|
||||
+{
|
||||
+ if [ "$#" != "2" -o -z "$1" -o -z "$2" ]
|
||||
+ then
|
||||
+ ocf_log err "check_filesystem(): Missing arguments"
|
||||
+ exit 4
|
||||
+ fi
|
||||
+ FSNAME="$1"
|
||||
+ MOUNTPOINT="$2"
|
||||
+
|
||||
+ FULL_MOUNTSEARCH="`echo "$MOUNTPOINT" | sed -e 's/\//\\\\\//g'`"
|
||||
+ MOUNTOUT="`awk '$2 ~ /^'$FULL_MOUNTSEARCH'$/ && $3 ~ /^'$FSNAME'$/{print $2; exit}' < /proc/mounts 2>/dev/null`"
|
||||
+ test -n "$MOUNTOUT"
|
||||
+ return $?
|
||||
+}
|
||||
+
|
||||
+#
|
||||
+# Unload a filesystem driver.
|
||||
+# Be careful to notice if the driver is built-in and do nothing.
|
||||
+#
|
||||
+# 0 is success, 1 is error, 2 is already unloaded.
|
||||
+#
|
||||
+unload_filesystem()
|
||||
+{
|
||||
+ if [ "$#" != "1" -o -z "$1" ]
|
||||
+ then
|
||||
+ ocf_log err "unload_filesystem(): Missing an argument"
|
||||
+ return 1
|
||||
+ fi
|
||||
+ FSNAME="$1"
|
||||
+
|
||||
+ driver_filesystem "$FSNAME" || return 2
|
||||
+
|
||||
+ MODOUT="`awk '$1 ~ /^'$FSNAME'$/{print $1,$3;exit}' < /proc/modules 2>/dev/null`"
|
||||
+ if [ -z "$MODOUT" ]; then
|
||||
+ # The driver is built in, we can't unload it.
|
||||
+ return 0
|
||||
+ fi
|
||||
+
|
||||
+ case "$MODOUT" in
|
||||
+ $FSNAME\ 0)
|
||||
+ ;;
|
||||
+ $FSNAME\ *)
|
||||
+ # The driver is busy, leave it alone
|
||||
+ ocf_log err "Module $FSNAME is still in use"
|
||||
+ return 1
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ocf_log err "Invalid module parsing! "
|
||||
+ return 1
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
+ modprobe -rs "$FSNAME"
|
||||
+ if [ "$?" != 0 ]; then
|
||||
+ ocf_log err "Unable to unload module: $FSNAME"
|
||||
+ return 1
|
||||
+ fi
|
||||
+
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+status_daemon()
|
||||
+{
|
||||
+ PID=`pidof "$DAEMON"`
|
||||
+ if [ -n "$PID" ]; then
|
||||
+ return $OCF_SUCCESS
|
||||
+ fi
|
||||
+ return $OCF_NOT_RUNNING
|
||||
+}
|
||||
+
|
||||
+bringup_daemon()
|
||||
+{
|
||||
+ if [ ! -e "$DAEMON" ]; then
|
||||
+ ocf_log err "Required binary not found: $DAEMON"
|
||||
+ return $OCF_ERR_INSTALLED
|
||||
+ fi
|
||||
+
|
||||
+ "$DAEMON"; rc=$?
|
||||
+ if [ $rc != 0 ]; then
|
||||
+ ocf_log err "Could not start $DAEMON"
|
||||
+ return $OCF_ERR_GENERIC
|
||||
+ fi
|
||||
+
|
||||
+ sleep 1
|
||||
+ COUNT=0
|
||||
+ rc=$OCF_NOT_RUNNING
|
||||
+
|
||||
+ while [ $rc = $OCF_NOT_RUNNING ]; do
|
||||
+ COUNT=`expr $COUNT + 1`
|
||||
+ if [ $COUNT -gt $OCF_RESKEY_daemon_timeout ]; then
|
||||
+ ocf_log err "`basename $DAEMON` did not come up"
|
||||
+ ps axf | grep -C 3 $$
|
||||
+ return $OCF_ERR_GENERIC
|
||||
+ fi
|
||||
+ status_daemon; rc=$?
|
||||
+ sleep 1
|
||||
+ done
|
||||
+
|
||||
+ return $rc
|
||||
+}
|
||||
+
|
||||
+kill_daemon()
|
||||
+{
|
||||
+ status_daemon; rc=$?
|
||||
+ if [ $rc != $OCF_SUCCESS ]; then
|
||||
+ return $rc
|
||||
+ fi
|
||||
+
|
||||
+ ocf_log info "Stopping `basename "$DAEMON"`"
|
||||
+ killproc "$DAEMON"
|
||||
+
|
||||
+ while [ $rc = $OCF_NOT_RUNNING ]; do
|
||||
+ sleep 1
|
||||
+ status_daemon; rc=$?
|
||||
+ done
|
||||
+
|
||||
+ return $OCF_SUCCESS
|
||||
+}
|
||||
+
|
||||
+#
|
||||
+# Unload a module
|
||||
+# 0 is success, 1 is error, 2 is not loaded
|
||||
+#
|
||||
+unload_module()
|
||||
+{
|
||||
+ if [ "$#" -lt "1" -o -z "$1" ]
|
||||
+ then
|
||||
+ ocf_log err "unload_module(): Requires an argument"
|
||||
+ return 1
|
||||
+ fi
|
||||
+ MODNAME="$1"
|
||||
+
|
||||
+ MODOUT="`awk '$1 ~ /^'$MODNAME'$/{print $1,$3;exit}' < /proc/modules 2>/dev/null`"
|
||||
+ if [ -z "$MODOUT" ]
|
||||
+ then
|
||||
+ return 2
|
||||
+ fi
|
||||
+
|
||||
+ case "$MODOUT" in
|
||||
+ $MODNAME\ 0)
|
||||
+ ;;
|
||||
+ $MODNAME\ *)
|
||||
+ return 2
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ocf_log err "Invalid module parsing!"
|
||||
+ return 1
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
+ modprobe -rs "$MODNAME"
|
||||
+ if [ "$?" != 0 ]; then
|
||||
+ ocf_log err "Unable to unload module \"$MODNAME\""
|
||||
+ return 1
|
||||
+ fi
|
||||
+
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+o2cb_start() {
|
||||
+
|
||||
+ o2cb_monitor; rc=$?
|
||||
+ if [ $rc != $OCF_NOT_RUNNING ]; then
|
||||
+ return $rc
|
||||
+ fi
|
||||
+
|
||||
+ ocf_log info "Starting $OCF_RESOURCE_INSTANCE"
|
||||
+
|
||||
+ if [ ! -e "$CLUSTER_STACK_FILE" ]; then
|
||||
+ modprobe -s ocfs2_stackglue
|
||||
+ if [ $? != 0 ]; then
|
||||
+ ocf_log err "Could not load ocfs2_stackglue"
|
||||
+ return $OCF_ERR_INSTALLED
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ SP_OUT="$(awk '/^'user'$/{print; exit}' "$LOADED_PLUGINS_FILE" 2>/dev/null)"
|
||||
+ if [ -z "$SP_OUT" ]
|
||||
+ then
|
||||
+ modprobe -s ocfs2_stack_user
|
||||
+ if [ $? != 0 ]; then
|
||||
+ ocf_log err "Could not load ocfs2_stack_user"
|
||||
+ return $OCF_ERR_INSTALLED
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ SP_OUT="$(awk '/^'user'$/{print; exit}' "$LOADED_PLUGINS_FILE" 2>/dev/null)"
|
||||
+ if [ -z "$SP_OUT" ]; then
|
||||
+ ocf_log err "Switch to userspace stack unsuccessful"
|
||||
+ return $OCF_ERR_INSTALLED
|
||||
+ fi
|
||||
+
|
||||
+ if [ -f "$CLUSTER_STACK_FILE" ]; then
|
||||
+ echo "$OCF_RESKEY_stack" >"$CLUSTER_STACK_FILE"
|
||||
+ if [ $? != 0 ]; then
|
||||
+ ocf_log err "Userspace stack '$OCF_RESKEY_stack' not supported"
|
||||
+ return $OCF_ERR_INSTALLED
|
||||
+ fi
|
||||
+ else
|
||||
+ ocf_log err "Switch to userspace stack not supported"
|
||||
+ return $OCF_ERR_INSTALLED
|
||||
+ fi
|
||||
+
|
||||
+ driver_filesystem ocfs2; rc=$?
|
||||
+ if [ $rc != 0 ]; then
|
||||
+ modprobe -s ocfs2
|
||||
+ if [ "$?" != 0 ]; then
|
||||
+ ocf_log err "Unable to load ocfs2 module"
|
||||
+ return $OCF_ERR_INSTALLED
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ bringup_daemon
|
||||
+ return $?
|
||||
+}
|
||||
+
|
||||
+o2cb_stop() {
|
||||
+ o2cb_monitor; rc=$?
|
||||
+ case $rc in
|
||||
+ $OCF_NOT_RUNNING) return $OCF_SUCCESS;;
|
||||
+ esac
|
||||
+
|
||||
+ ocf_log info "Stopping $OCF_RESOURCE_INSTANCE"
|
||||
+
|
||||
+ kill_daemon
|
||||
+ if [ $? != 0 ]; then
|
||||
+ ocf_log err "Unable to unload modules: the cluster is still online"
|
||||
+ return $OCF_ERR_GENERIC
|
||||
+ fi
|
||||
+
|
||||
+ unload_filesystem ocfs2
|
||||
+ if [ $? = 1 ]; then
|
||||
+ ocf_log err "Unable to unload ocfs2 module"
|
||||
+ return $OCF_ERR_GENERIC
|
||||
+ fi
|
||||
+
|
||||
+ # If we can't find the stack glue, we have nothing to do.
|
||||
+ [ ! -e "$LOADED_PLUGINS_FILE" ] && return $OCF_SUCCESS
|
||||
+
|
||||
+ while read plugin
|
||||
+ do
|
||||
+ unload_module "ocfs2_stack_${plugin}"
|
||||
+ if [ $? = 1 ]; then
|
||||
+ ocf_log err "Unable to unload ocfs2_stack_${plugin}"
|
||||
+ return $OCF_ERR_GENERIC
|
||||
+ fi
|
||||
+ done <"$LOADED_PLUGINS_FILE"
|
||||
+
|
||||
+ unload_module "ocfs2_stackglue"
|
||||
+ if [ $? = 1 ]; then
|
||||
+ ocf_log err "Unable to unload ocfs2_stackglue"
|
||||
+ return $OCF_ERR_GENERIC
|
||||
+ fi
|
||||
+
|
||||
+ # Dont unmount configfs - its always in use by libdlm
|
||||
+}
|
||||
+
|
||||
+o2cb_monitor() {
|
||||
+ o2cb_validate
|
||||
+
|
||||
+ # Assume that ocfs2_controld will terminate if any of the conditions below are met
|
||||
+
|
||||
+ driver_filesystem configfs; rc=$?
|
||||
+ if [ $rc != 0 ]; then
|
||||
+ ocf_log info "configfs not laoded"
|
||||
+ return $OCF_NOT_RUNNING
|
||||
+ fi
|
||||
+
|
||||
+ check_filesystem configfs "${OCF_RESKEY_configfs}"; rc=$?
|
||||
+ if [ $rc != 0 ]; then
|
||||
+ ocf_log info "configfs not mounted"
|
||||
+ return $OCF_NOT_RUNNING
|
||||
+ fi
|
||||
+
|
||||
+ if [ ! -e "$LOADED_PLUGINS_FILE" ]; then
|
||||
+ ocf_log info "Stack glue driver not loaded"
|
||||
+ return $OCF_NOT_RUNNING
|
||||
+ fi
|
||||
+
|
||||
+ grep user "$LOADED_PLUGINS_FILE" >/dev/null 2>&1; rc=$?
|
||||
+ if [ $rc != 0 ]; then
|
||||
+ ocf_log err "Wrong stack `cat $LOADED_PLUGINS_FILE`"
|
||||
+ return $OCF_ERR_INSTALLED
|
||||
+ fi
|
||||
+
|
||||
+ driver_filesystem ocfs2; rc=$?
|
||||
+ if [ $rc != 0 ]; then
|
||||
+ ocf_log info "ocfs2 not loaded"
|
||||
+ return $OCF_NOT_RUNNING
|
||||
+ fi
|
||||
+
|
||||
+ status_daemon
|
||||
+ return $?
|
||||
+}
|
||||
+
|
||||
+o2cb_usage() {
|
||||
+ echo "usage: $0 {start|stop|monitor|validate-all|meta-data}"
|
||||
+ echo " Expects to have a fully populated OCF RA-compliant environment set."
|
||||
+ echo " In particualr, a value for OCF_ROOT"
|
||||
+}
|
||||
+
|
||||
+o2cb_validate() {
|
||||
+ : TODO: check for gloablly_unique=true and return OCF_ERR_CONFIGURED
|
||||
+ case ${OCF_RESKEY_CRM_meta_gloablly_unique} in
|
||||
+ yes|Yes|true|True|1)
|
||||
+ ocf_log err "$OCF_RESOURCE_INSTANCE must be configured with the gloablly_unique=false meta attribute"
|
||||
+ exit $OCF_ERR_CONFIGURED
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
+ return $OCF_SUCCESS
|
||||
+}
|
||||
+
|
||||
+meta_data() {
|
||||
+ cat <<END
|
||||
+<?xml version="1.0"?>
|
||||
+<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
|
||||
+<resource-agent name="o2cb">
|
||||
+ <version>1.0</version>
|
||||
+ <shortdesc lang="en">o2cb resource agent</shortdesc>
|
||||
+ <longdesc lang="en">
|
||||
+This is a o2cb Resource Agent. It runs o2cb daemon as a instance of anonymous clone.
|
||||
+ </longdesc>
|
||||
+ <parameters>
|
||||
+
|
||||
+ <parameter name="sysfs" unique="0">
|
||||
+ <longdesc lang="en">
|
||||
+Location where sysfs is mounted
|
||||
+ </longdesc>
|
||||
+ <shortdesc lang="en">Sysfs location</shortdesc>
|
||||
+ <content type="string" default="/sys/fs"/>
|
||||
+ </parameter>
|
||||
+
|
||||
+ <parameter name="configfs" unique="0">
|
||||
+ <longdesc lang="en">
|
||||
+Location where configfs is mounted
|
||||
+ </longdesc>
|
||||
+ <shortdesc lang="en">Configfs location</shortdesc>
|
||||
+ <content type="string" default="/sys/kernel/config"/>
|
||||
+ </parameter>
|
||||
+
|
||||
+ <parameter name="stack" unique="0">
|
||||
+ <longdesc lang="en">
|
||||
+Which userspace stack to use. Known values: pcmk, cman
|
||||
+ </longdesc>
|
||||
+ <shortdesc lang="en">Userspace stack</shortdesc>
|
||||
+ <content type="string" default="pcmk"/>
|
||||
+ </parameter>
|
||||
+
|
||||
+ <parameter name="daemon_timeout" unique="0">
|
||||
+ <longdesc lang="en">
|
||||
+Number of seconds to allow the control daemon to come up
|
||||
+ </longdesc>
|
||||
+ <shortdesc lang="en">Daemon Timeout</shortdesc>
|
||||
+ <content type="string" default="10"/>
|
||||
+ </parameter>
|
||||
+
|
||||
+ </parameters>
|
||||
+ <actions>
|
||||
+ <action name="start" timeout="90" />
|
||||
+ <action name="stop" timeout="100" />
|
||||
+ <action name="monitor" timeout="20" depth="0"/>
|
||||
+ <action name="meta-data" timeout="5" />
|
||||
+ <action name="validate-all" timeout="30" />
|
||||
+ </actions>
|
||||
+</resource-agent>
|
||||
+END
|
||||
+}
|
||||
+
|
||||
+case $__OCF_ACTION in
|
||||
+meta-data) meta_data
|
||||
+ exit $OCF_SUCCESS
|
||||
+ ;;
|
||||
+start) o2cb_start
|
||||
+ ;;
|
||||
+stop) o2cb_stop
|
||||
+ ;;
|
||||
+monitor) o2cb_monitor
|
||||
+ ;;
|
||||
+validate-all) o2cb_validate
|
||||
+ ;;
|
||||
+usage|help) o2cb_usage
|
||||
+ exit $OCF_SUCCESS
|
||||
+ ;;
|
||||
+*) o2cb_usage
|
||||
+ exit $OCF_ERR_UNIMPLEMENTED
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
+exit $?
|
@ -1,13 +0,0 @@
|
||||
diff --git a/tunefs.ocfs2/op_query.c b/tunefs.ocfs2/op_query.c
|
||||
index 295c185b..40394d15 100644
|
||||
--- a/tunefs.ocfs2/op_query.c
|
||||
+++ b/tunefs.ocfs2/op_query.c
|
||||
@@ -339,7 +339,7 @@ static int query_run(struct tunefs_operation *op, ocfs2_filesys *fs,
|
||||
register_printf_function('O', handle_ro_compat, handle_arginfo);
|
||||
|
||||
query_fs = fs;
|
||||
- fprintf(stdout, fmt);
|
||||
+ fprintf(stdout, fmt, "dummy");
|
||||
query_fs = NULL;
|
||||
|
||||
ocfs2_free(&fmt);
|
21
ocfs2-tools-gcc45.patch
Normal file
21
ocfs2-tools-gcc45.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -up ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c.bak ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c
|
||||
--- ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c.bak 2010-08-02 20:11:37.428252707 -0400
|
||||
+++ ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c 2010-08-02 20:11:57.114252733 -0400
|
||||
@@ -261,7 +261,7 @@ int main(int argc, char **argv)
|
||||
char *extra = NULL;
|
||||
int dev_ro = 0;
|
||||
char *hbstr = NULL;
|
||||
- char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN + 1] = "";
|
||||
+ char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN + 1];
|
||||
ocfs2_filesys *fs = NULL;
|
||||
struct o2cb_cluster_desc cluster;
|
||||
struct o2cb_region_desc desc;
|
||||
@@ -269,6 +269,8 @@ int main(int argc, char **argv)
|
||||
int hb_started = 0;
|
||||
struct stat statbuf;
|
||||
|
||||
+ stackstr[0] = '\0';
|
||||
+
|
||||
initialize_ocfs_error_table();
|
||||
initialize_o2dl_error_table();
|
||||
initialize_o2cb_error_table();
|
312
ocfs2-tools.spec
312
ocfs2-tools.spec
@ -1,167 +1,164 @@
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
|
||||
%global with_console %{?_without_console: 0} %{?!_without_console: 1}
|
||||
## define alphatag 20080221git
|
||||
|
||||
Summary: Tools for managing the Oracle Cluster Filesystem 2
|
||||
Summary: Tools for managing the Ocfs2 cluster file system
|
||||
Name: ocfs2-tools
|
||||
Version: 1.8.5
|
||||
Release: 11%{?dist}
|
||||
Version: 1.4.3
|
||||
Release: 8%{?alphatag:.%{alphatag}}%{?dist}
|
||||
License: GPLv2
|
||||
Source0: https://github.com/markfasheh/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||
# applied in upstream git 0ffd58b2
|
||||
Patch0: 0001-fsck.ocfs2-fix-compile-error-when-glibc-upgrade.patch
|
||||
# https://github.com/markfasheh/ocfs2-tools/issues/18#issuecomment-360449375
|
||||
Patch1: ocfs2-tools-1.8.5-format-fortify.patch
|
||||
# applied in upstream git e686b801
|
||||
Patch2: 0001-ocfs2console-explicitly-specified-link-libraries.patch
|
||||
# applied in upstream git 70aec706
|
||||
Patch3: 0001-Update-FSF-address-in-GPL2-license.patch
|
||||
# patch3 missed a single file ipwidget.py
|
||||
# applied in upstream git 460afefe
|
||||
Patch4: 0001-Update-FSF-address-in-ipwidget.py.patch
|
||||
# applied in upstream git 03be837c
|
||||
Patch5: 0001-mounted.ocfs2-use-sys-sysmacros.h-include-for-makede.patch
|
||||
# https://github.com/markfasheh/ocfs2-tools/pull/33
|
||||
Patch6: 0001-Fix-build-with-glibc-2.28.patch
|
||||
# For Fedora python2 deprecation
|
||||
Patch7: 0001-Explicit-call-Python-2-command.patch
|
||||
# https://github.com/markfasheh/ocfs2-tools/pull/27
|
||||
Patch8: 0001-libo2dlm-dlopen-libdlm_lt.so.3-instead-of-libdlm_lt..patch
|
||||
URL: https://github.com/markfasheh/ocfs2-tools
|
||||
Requires: bash
|
||||
Requires: coreutils
|
||||
Requires: net-tools
|
||||
Requires: util-linux
|
||||
Requires: e2fsprogs
|
||||
Requires: glib2 >= 2.2.3
|
||||
Provides: ocfs2-tools-pcmk = %{version}
|
||||
Obsoletes: ocfs2-tools-pcmk < 1.6.3-1
|
||||
Group: System Environment/Base
|
||||
# The source for this package was pulled from upstream's git repo and manually
|
||||
# turned into a release tarball. Use the following commands to generate the
|
||||
# tarball:
|
||||
# git clone git://oss.oracle.com/git/ocfs2-tools.git ocfs2-tools-1.3.9
|
||||
# cd ocfs2-tools-1.3.9
|
||||
# git checkout -b 20080221git 22fb58d0318a2946479833bb5e2fd58864499c78
|
||||
# ./autogen.sh
|
||||
# cd ..
|
||||
# tar -czvf ocfs2-tools-1.3.9.tar.gz ocfs2-tools-1.3.9
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch0: minor_build_fixes.diff
|
||||
Patch1: o2cb_pcmk.diff
|
||||
Patch2: no_stonithd.diff
|
||||
Patch3: ocfs2-tools-gcc45.patch
|
||||
URL: http://oss.oracle.com/projects/ocfs2-tools/
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
Requires(preun): initscripts
|
||||
Requires: bash, coreutils, net-tools, modutils
|
||||
Requires: e2fsprogs, chkconfig, glib2 >= 2.2.3
|
||||
Requires: redhat-lsb
|
||||
BuildRequires: e2fsprogs-devel, glib2-devel >= 2.2.3
|
||||
BuildRequires: libblkid-devel, bzip2-devel
|
||||
BuildRequires: pygtk2 >= 1.99.16, python-devel >= 2.5
|
||||
BuildRequires: ncurses-devel, readline-devel
|
||||
BuildRequires: corosynclib-devel, openaislib-devel, clusterlib-devel
|
||||
BuildRequires: cluster-glue-libs-devel, pacemaker-libs-devel
|
||||
BuildRequires: libxml2-devel
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: autoconf, automake
|
||||
%{?systemd_requires}
|
||||
BuildRequires: systemd
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: libcom_err-devel
|
||||
BuildRequires: libblkid-devel
|
||||
BuildRequires: glib2-devel >= 2.2.3
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: pacemaker-libs-devel
|
||||
BuildRequires: dlm-devel
|
||||
BuildRequires: libaio-devel
|
||||
BuildRequires: pygtk2 >= 1.99.16
|
||||
BuildRequires: python2-devel >= 2.5
|
||||
BuildRequires: corosynclib-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
%description
|
||||
Programs to manage the OCFS2 cluster file system, including mkfs.ocfs2,
|
||||
Programs to manage the Ocfs2 cluster file system, including mkfs.ocfs2,
|
||||
tunefs.ocfs2 and fsck.ocfs2.
|
||||
|
||||
OCFS2 is a general purpose extent based shared disk cluster file
|
||||
Ocfs2 is a general purpose extent based shared disk cluster file
|
||||
system. It supports 64 bit inode numbers, and has automatically
|
||||
extending metadata groups which may also make it attractive for
|
||||
non-clustered use. OCFS2 leverages some well tested kernel
|
||||
non-clustered use. Ocfs2 leverages some well tested kernel
|
||||
technologies, such as JBD - the same journaling subsystem in use by
|
||||
ext3.
|
||||
|
||||
%if %{with_console}
|
||||
%package -n ocfs2console
|
||||
Summary: GUI frontend for OCFS2 management
|
||||
Requires: e2fsprogs
|
||||
Requires: glib2 >= 2.2.3
|
||||
Requires: vte >= 0.11.10
|
||||
Requires: pygtk2 >= 1.99.16
|
||||
Requires: python2 >= 2.5
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Summary: GUI frontend for Ocfs2 management
|
||||
Group: System Environment/Kernel
|
||||
Requires: e2fsprogs, glib2 >= 2.2.3, vte >= 0.11.10, pygtk2 >= 1.99.16
|
||||
Requires: python >= 2.5, %{name} = %{version}-%{release}
|
||||
|
||||
%description -n ocfs2console
|
||||
ocfs2console can make it easier to manage an OCFS2 cluster by
|
||||
Ocfs2console can make it easier to manage an Ocfs2 cluster by
|
||||
providing a gui front-end to common tasks, including initial cluster
|
||||
setup. In addition to cluster setup, ocfs2console can format and
|
||||
mount OCFS2 volumes.
|
||||
setup. In addition to cluster setup, Ocfs2console can format and
|
||||
mount Ocfs2 volumes.
|
||||
%endif
|
||||
|
||||
%package devel
|
||||
Summary: Headers and static archives for ocfs2-tools
|
||||
Requires: e2fsprogs-devel
|
||||
Requires: glib2-devel >= 2.2.3
|
||||
Requires: pkgconfig
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Provides: %{name}-static%{?_isa} = %{version}-%{release}
|
||||
Group: Development/Libraries
|
||||
Requires: e2fsprogs-devel, glib2-devel >= 2.2.3, pkgconfig
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Provides: %{name}-static = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
ocfs2-tools-devel contains the libraries and header files needed to
|
||||
develop OCFS2 filesystem-specific programs.
|
||||
develop Ocfs2 filesystem-specific programs.
|
||||
|
||||
%package cman
|
||||
Summary: Tools for managing the Ocfs2 cluster file system (cman component)
|
||||
Group: System Environment/Base
|
||||
Requires: cman >= 3.0.0-1
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description cman
|
||||
ocfs2-tools-cman contains the daemon required to use Ocfs2 with
|
||||
cman cluster manager
|
||||
|
||||
%package pcmk
|
||||
Summary: Tools for managing the Ocfs2 cluster file system (pacemaker component)
|
||||
Group: System Environment/Base
|
||||
Requires: pacemaker >= 1.0.5-1
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: dlm-pcmk
|
||||
|
||||
%description pcmk
|
||||
ocfs2-tools-pcmk contains the daemon required to use Ocfs2 with
|
||||
pacemaker cluster manager
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{name}-%{version}
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
# remove -Wno-format to prevent conflict with rpm optflags
|
||||
sed -i -e 's/-Wno-format//g' {o2info,o2image,o2monitor}/Makefile
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
# update config.guess config.sub to support aarch64 and ppc64le
|
||||
cp -fv /usr/lib/rpm/redhat/config.guess ./config.guess
|
||||
cp -fv /usr/lib/rpm/redhat/config.sub ./config.sub
|
||||
./autogen.sh
|
||||
%{configure} \
|
||||
%if %{with_console}
|
||||
--enable-ocfs2console=yes \
|
||||
%if ! %{with_console}
|
||||
--enable-ocfs2console=no \
|
||||
%endif
|
||||
--enable-dynamic-fsck=yes
|
||||
|
||||
# parallel build currently fails, so no %%{_smp_mflags}
|
||||
# parallel build currently fails, so no %{_smp_mflags}
|
||||
CFLAGS="$(echo '%{optflags}')" make
|
||||
|
||||
%install
|
||||
%make_install
|
||||
rm -rf "$RPM_BUILD_ROOT"
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/ocfs2
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||
cp -p vendor/common/o2cb.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/o2cb
|
||||
mkdir -p %{buildroot}%{_udevrulesdir}
|
||||
cp -p vendor/common/51-ocfs2.rules \
|
||||
%{buildroot}%{_udevrulesdir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
|
||||
cp -f vendor/common/o2cb.init $RPM_BUILD_ROOT/%{_initrddir}/o2cb
|
||||
cp -f vendor/common/ocfs2.init $RPM_BUILD_ROOT/%{_initrddir}/ocfs2
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
||||
cp -f vendor/common/o2cb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/o2cb
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
|
||||
cp -f vendor/common/51-ocfs2.rules \
|
||||
$RPM_BUILD_ROOT/etc/udev/rules.d/51-ocfs2.rules
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/ocfs2
|
||||
cp -f vendor/common/o2cb.ocf \
|
||||
$RPM_BUILD_ROOT/usr/lib/ocf/resource.d/ocfs2/o2cb
|
||||
chmod 0755 $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/ocfs2/o2cb
|
||||
|
||||
# for systemd
|
||||
mkdir -p %{buildroot}/sbin
|
||||
cp -p vendor/common/{o2cb,ocfs2}.init %{buildroot}/sbin
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
cp -p vendor/common/{o2cb,ocfs2}.service %{buildroot}%{_unitdir}
|
||||
sed -i -e 's/network\.service/network-online.target/' %{buildroot}%{_unitdir}/o2cb.service
|
||||
make DESTDIR="$RPM_BUILD_ROOT" install
|
||||
|
||||
chmod 644 %{buildroot}/%{_libdir}/*.a
|
||||
chmod 644 $RPM_BUILD_ROOT/%{_libdir}/*.a
|
||||
|
||||
%if %{with_console}
|
||||
%{__python} -c "import compileall; compileall.compile_dir('$RPM_BUILD_ROOT/%{python_sitearch}/ocfs2interface', ddir='%{python_sitearch}/ocfs2interface')"
|
||||
# rpm autostripper needs to see these as executable
|
||||
chmod 755 %{buildroot}/%{python2_sitearch}/ocfs2interface/*.so
|
||||
chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/ocfs2interface/*.so
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf "$RPM_BUILD_ROOT"
|
||||
|
||||
%post
|
||||
%systemd_post {o2cb,ocfs2}.service
|
||||
/sbin/chkconfig --add o2cb
|
||||
/sbin/chkconfig --add ocfs2
|
||||
|
||||
%preun
|
||||
%systemd_preun {o2cb,ocfs2}.service
|
||||
|
||||
%postun
|
||||
%systemd_postun {o2cb,ocfs2}.service
|
||||
|
||||
if [ $1 = 0 ]; then # execute this only if we are NOT doing an upgrade
|
||||
/sbin/service ocfs2 stop >/dev/null 2>&1 || :
|
||||
/sbin/service o2cb stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del ocfs2
|
||||
/sbin/chkconfig --del o2cb
|
||||
fi
|
||||
|
||||
%files
|
||||
%doc README.O2CB CREDITS MAINTAINERS
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.O2CB COPYING CREDITS MAINTAINERS
|
||||
%doc documentation/users_guide.txt
|
||||
%license COPYING
|
||||
/sbin/o2cb
|
||||
/sbin/o2cluster
|
||||
%{_sbindir}/o2hbmonitor
|
||||
%{_bindir}/o2info
|
||||
/sbin/fsck.ocfs2
|
||||
/sbin/mkfs.ocfs2
|
||||
/sbin/mounted.ocfs2
|
||||
@ -171,24 +168,33 @@ chmod 755 %{buildroot}/%{python2_sitearch}/ocfs2interface/*.so
|
||||
/sbin/mount.ocfs2
|
||||
/sbin/ocfs2_hb_ctl
|
||||
/sbin/o2image
|
||||
/sbin/o2cb.init
|
||||
/sbin/ocfs2.init
|
||||
%{_unitdir}/o2cb.service
|
||||
%{_unitdir}/ocfs2.service
|
||||
%{_sysconfdir}/ocfs2
|
||||
%{_udevrulesdir}/51-ocfs2.rules
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/o2cb
|
||||
%{_mandir}/man*/*
|
||||
%{_initrddir}/o2cb
|
||||
%{_initrddir}/ocfs2
|
||||
%config(noreplace) /etc/udev/rules.d/51-ocfs2.rules
|
||||
%config(noreplace) /etc/sysconfig/o2cb
|
||||
%{_mandir}/man7/o2cb.7.gz
|
||||
%{_mandir}/man8/debugfs.ocfs2.8.gz
|
||||
%{_mandir}/man8/fsck.ocfs2.8.gz
|
||||
%{_mandir}/man8/fsck.ocfs2.checks.8.gz
|
||||
%{_mandir}/man8/mkfs.ocfs2.8.gz
|
||||
%{_mandir}/man8/tunefs.ocfs2.8.gz
|
||||
%{_mandir}/man8/mount.ocfs2.8.gz
|
||||
%{_mandir}/man8/mounted.ocfs2.8.gz
|
||||
%{_mandir}/man8/o2cb_ctl.8.gz
|
||||
%{_mandir}/man8/ocfs2_hb_ctl.8.gz
|
||||
%{_mandir}/man8/o2image.8.gz
|
||||
|
||||
%if %{with_console}
|
||||
%files -n ocfs2console
|
||||
%dir %{python2_sitearch}/ocfs2interface
|
||||
%{python2_sitearch}/ocfs2interface/*
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{python_sitearch}/ocfs2interface
|
||||
%{python_sitearch}/ocfs2interface/*
|
||||
%{_sbindir}/ocfs2console
|
||||
%{_mandir}/man8/ocfs2console.8.gz
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/*.a
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%dir %{_includedir}/ocfs2-kernel
|
||||
@ -200,65 +206,17 @@ chmod 755 %{buildroot}/%{python2_sitearch}/ocfs2interface/*.so
|
||||
%{_includedir}/o2dlm/*
|
||||
%{_includedir}/ocfs2/*
|
||||
|
||||
%files cman
|
||||
%defattr(-,root,root,-)
|
||||
/sbin/ocfs2_controld.cman
|
||||
|
||||
%files pcmk
|
||||
%defattr(-,root,root,-)
|
||||
/sbin/ocfs2_controld.pcmk
|
||||
%dir %{_prefix}/lib/ocf/resource.d/ocfs2
|
||||
%{_prefix}/lib/ocf/resource.d/ocfs2
|
||||
|
||||
%changelog
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.5-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.5-10
|
||||
- Rebuild for readline 8.0
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.5-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sun Sep 23 2018 Robin Lee <cheeselee@fedoraproject.org> - 1.8.5-8
|
||||
- Apply patch to change python-config to python2-config
|
||||
- Apply patch to load dlm_lt by soname
|
||||
|
||||
* Sun Jul 15 2018 Robin Lee <cheeselee@fedoraproject.org> - 1.8.5-7
|
||||
- Fix python2_sitearch macro
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.5-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Sun May 27 2018 Robin Lee <cheeselee@fedoraproject.org> - 1.8.5-6
|
||||
- Fix build with glibc 2.28
|
||||
|
||||
* Sat Mar 10 2018 Robin Lee <cheeselee@fedoraproject.org> - 1.8.5-5
|
||||
- BR gcc for http://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
|
||||
|
||||
* Thu Mar 01 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.8.5-4
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Tue Feb 6 2018 Robin Lee <cheeselee@fedoraproject.org> - 1.8.5-3
|
||||
- Remove Group tags
|
||||
- Fix FSF address in files
|
||||
- Move udev rule to %%{_udevrulesdir}
|
||||
- Add needed %%{?_isa}
|
||||
- BR python2-devel
|
||||
|
||||
* Mon Jan 29 2018 Robin Lee <cheeselee@fedoraproject.org> - 1.8.5-2
|
||||
- Fix build for f28
|
||||
- Move COPYING to %%license
|
||||
- Use %%make_install
|
||||
- one BR or R per line
|
||||
|
||||
* Tue Mar 28 2017 Robin Lee <cheeselee@fedoraproject.org> - 1.8.5-1
|
||||
- Update to 1.8.5
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Fri Dec 3 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.6.3-1
|
||||
- new upstream release
|
||||
- drop ocfs2-tools-gcc45.patch (now upstream)
|
||||
- clean up comment sections in spec file
|
||||
- drop ocfs2-tools-pcmk package/build. -pcmk variants of other packages are gone
|
||||
- ship o2cb pcmk ras from main package
|
||||
- clear BuildRequires
|
||||
- fix linking with readline5 (rhbz: #511308)
|
||||
- update BuildRoot and usage of RPM_BUILD_ROOT
|
||||
|
||||
* Mon Aug 2 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4.3-8
|
||||
- make the patch use a character string instead of a sequence of characters
|
||||
string. gcc didn't complain but it seems like a better idea.
|
||||
|
Loading…
Reference in New Issue
Block a user