From d93951204b2ceea48372bfc81dadb259452b28d2 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 24 Sep 2008 15:16:41 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocfs2-tools?expand=0&rev=8 --- blkid.m4.diff | 102 ------------------------- ocfs2-init.diff | 27 +++++++ ocfs2-tools-1.2.7-tunefs-path.diff | 37 --------- ocfs2-tools-o_creat-mode.diff | 11 --- ocfs2-tools-suse.diff | 118 ----------------------------- ocfs2-tools.changes | 7 ++ ocfs2-tools.spec | 31 ++++---- offsetof.diff | 10 --- 8 files changed, 49 insertions(+), 294 deletions(-) delete mode 100644 blkid.m4.diff delete mode 100644 ocfs2-tools-1.2.7-tunefs-path.diff delete mode 100644 ocfs2-tools-o_creat-mode.diff delete mode 100644 ocfs2-tools-suse.diff delete mode 100644 offsetof.diff diff --git a/blkid.m4.diff b/blkid.m4.diff deleted file mode 100644 index c465cd1..0000000 --- a/blkid.m4.diff +++ /dev/null @@ -1,102 +0,0 @@ -Added: trunk/blkid.m4 -=================================================================== ---- trunk/blkid.m4 2005-03-27 22:51:34 UTC (rev 746) -+++ trunk/blkid.m4 2005-03-27 23:17:44 UTC (rev 747) -@@ -0,0 +1,97 @@ -+dnl Support for libblkid included in our tree for ocfs2console -+ -+AC_DEFUN([OCFS2_BLKID], [ -+ HAVE_BLKID= -+ PKG_CHECK_MODULES(BLKID, blkid >= 1.36, HAVE_BLKID=yes, -+ [AC_MSG_WARN([blkid >= 1.36 not found, using internal version])]) -+ AC_SUBST(HAVE_BLKID) -+ -+ if test "x$HAVE_BLKID" != "xyes"; then -+ AC_CHECK_LIB(uuid, uuid_unparse, :, -+ [AC_MSG_ERROR([could not find uuid library])]) -+ -+ AC_CHECK_SIZEOF(short) -+ AC_CHECK_SIZEOF(int) -+ AC_CHECK_SIZEOF(long) -+ AC_CHECK_SIZEOF(long long) -+ -+ AC_CONFIG_COMMANDS([ocfs2console/blkid/blkid_types.h], [ -+ outfile=ocfs2console/blkid/blkid_types.h-tmp -+ cat > $outfile <<_______EOF -+/* -+ * If linux/types.h is already been included, assume it has defined -+ * everything we need. (cross fingers) Other header files may have -+ * also defined the types that we need. -+ */ -+#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \\ -+ !defined(_EXT2_TYPES_H)) -+#define _BLKID_TYPES_H -+ -+typedef unsigned char __u8; -+typedef signed char __s8; -+ -+#if ($ocfs2_SIZEOF_INT == 8) -+typedef int __s64; -+typedef unsigned int __u64; -+#else -+#if ($ocfs2_SIZEOF_LONG == 8) -+typedef long __s64; -+typedef unsigned long __u64; -+#else -+#if ($ocfs2_SIZEOF_LONG_LONG == 8) -+#if defined(__GNUC__) -+typedef __signed__ long long __s64; -+#else -+typedef signed long long __s64; -+#endif /* __GNUC__ */ -+typedef unsigned long long __u64; -+#endif /* SIZEOF_LONG_LONG == 8 */ -+#endif /* SIZEOF_LONG == 8 */ -+#endif /* SIZEOF_INT == 8 */ -+ -+#if ($ocfs2_SIZEOF_INT == 2) -+typedef int __s16; -+typedef unsigned int __u16; -+#else -+#if ($ocfs2_SIZEOF_SHORT == 2) -+typedef short __s16; -+typedef unsigned short __u16; -+#else -+ ?==error: undefined 16 bit type -+#endif /* SIZEOF_SHORT == 2 */ -+#endif /* SIZEOF_INT == 2 */ -+ -+#if ($ocfs2_SIZEOF_INT == 4) -+typedef int __s32; -+typedef unsigned int __u32; -+#else -+#if ($ocfs2_SIZEOF_LONG == 4) -+typedef long __s32; -+typedef unsigned long __u32; -+#else -+#if ($ocfs2_SIZEOF_SHORT == 4) -+typedef short __s32; -+typedef unsigned short __u32; -+#else -+ ?== error: undefined 32 bit type -+#endif /* SIZEOF_SHORT == 4 */ -+#endif /* SIZEOF_LONG == 4 */ -+#endif /* SIZEOF_INT == 4 */ -+ -+#endif /* _*_TYPES_H */ -+_______EOF -+ -+ if cmp -s $outfile ocfs2console/blkid/blkid_types.h; then -+ AC_MSG_NOTICE([ocfs2console/blkid/blkid_types.h is unchanged]) -+ rm -f $outfile -+ else -+ mv $outfile ocfs2console/blkid/blkid_types.h -+ fi -+ ],[ -+ ocfs2_SIZEOF_SHORT=$ac_cv_sizeof_short -+ ocfs2_SIZEOF_INT=$ac_cv_sizeof_int -+ ocfs2_SIZEOF_LONG=$ac_cv_sizeof_long -+ ocfs2_SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long -+ ]) -+ fi -+]) diff --git a/ocfs2-init.diff b/ocfs2-init.diff index 40a3b3c..52124e9 100644 --- a/ocfs2-init.diff +++ b/ocfs2-init.diff @@ -11,6 +11,33 @@ diff -r bfc9de4afd43 vendor/common/o2cb.init.sh # Default-Start: 2 3 5 # Default-Stop: # Short-Description: Load O2CB cluster services at system boot. +@@ -653,7 +654,7 @@ status_filesystem() + + status_daemon() + { +- DAEMON="/sbin/ocfs2_controld.${O2CB_STACK}" ++ DAEMON="/usr/sbin/ocfs2_controld.${O2CB_STACK}" + echo -n "Checking for control daemon: " + if [ -n "$(pidofproc "$DAEMON")" ] + then +@@ -667,7 +668,7 @@ status_daemon() + + bringup_daemon() + { +- DAEMON="/sbin/ocfs2_controld.${O2CB_STACK}" ++ DAEMON="/usr/sbin/ocfs2_controld.${O2CB_STACK}" + echo -n "Starting $(basename "$DAEMON"): " + start_daemon "$DAEMON" + [ $? != 0 ] && return 1 +@@ -689,7 +690,7 @@ kill_daemon() + kill_daemon() + { + SIGNAL="$1" +- DAEMON="/sbin/ocfs2_controld.${O2CB_STACK}" ++ DAEMON="/usr/sbin/ocfs2_controld.${O2CB_STACK}" + + status_daemon >/dev/null 2>&1 || return 2 + diff -r bfc9de4afd43 vendor/common/ocfs2.init --- a/vendor/common/ocfs2.init Mon Aug 25 09:56:08 2008 +0000 +++ b/vendor/common/ocfs2.init Tue Sep 09 17:37:18 2008 +0200 diff --git a/ocfs2-tools-1.2.7-tunefs-path.diff b/ocfs2-tools-1.2.7-tunefs-path.diff deleted file mode 100644 index 0e1849a..0000000 --- a/ocfs2-tools-1.2.7-tunefs-path.diff +++ /dev/null @@ -1,37 +0,0 @@ ---- a/configure.in 2007-09-29 02:09:07.000000000 +0200 -+++ b/configure.in 2007-12-10 21:02:04.186948000 +0100 -@@ -59,11 +59,13 @@ AC_ARG_WITH([root-prefix], [ --with-roo - - root_bindir='${root_prefix}/bin' - root_sbindir='${root_prefix}/sbin' -+root_usr_sbindir='${root_prefix}/usr/sbin' - root_sysconfdir='${root_prefix}/etc' - - AC_SUBST(root_prefix) - AC_SUBST(root_bindir) - AC_SUBST(root_sbindir) -+AC_SUBST(root_usr_sbindir) - AC_SUBST(root_sysconfdir) - - AC_MSG_CHECKING(for debugging) ---- a/tunefs.ocfs2/Makefile 2007-09-29 01:53:00.000000000 +0200 -+++ b/tunefs.ocfs2/Makefile 2007-12-10 21:03:07.820253000 +0100 -@@ -22,7 +22,7 @@ LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2 - LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb - LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a - --sbindir = $(root_sbindir) -+sbindir = $(root_usr_sbindir) - SBIN_PROGRAMS = tunefs.ocfs2 - - INCLUDES = -I$(TOPDIR)/libocfs2/include -I$(TOPDIR)/libo2dlm/include -I$(TOPDIR)/libo2cb/include -I. ---- a/Config.make.in.orig 2007-12-10 10:49:04.000000000 -0500 -+++ b/Config.make.in 2007-12-10 10:49:18.000000000 -0500 -@@ -24,6 +24,7 @@ - root_prefix = @root_prefix@ - root_bindir = @root_bindir@ - root_sbindir = @root_sbindir@ -+root_usr_sbindir = @root_usr_sbindir@ - root_sysconfdir = @root_sysconfdir@ - - pyexecdir = @pyexecdir@ diff --git a/ocfs2-tools-o_creat-mode.diff b/ocfs2-tools-o_creat-mode.diff deleted file mode 100644 index 5b62c0f..0000000 --- a/ocfs2-tools-o_creat-mode.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libocfs2/ismounted.c 2007-11-14 18:54:19.000000000 -0500 -+++ b/libocfs2/ismounted.c 2008-01-14 10:29:14.000000000 -0500 -@@ -153,7 +153,7 @@ - is_root: - #define TEST_FILE "/.ismount-test-file" - *mount_flags |= OCFS2_MF_ISROOT; -- fd = open(TEST_FILE, O_RDWR|O_CREAT); -+ fd = open(TEST_FILE, O_RDWR|O_CREAT, 0600); - if (fd < 0) { - if (errno == EROFS) - *mount_flags |= OCFS2_MF_READONLY; diff --git a/ocfs2-tools-suse.diff b/ocfs2-tools-suse.diff deleted file mode 100644 index 31b3e13..0000000 --- a/ocfs2-tools-suse.diff +++ /dev/null @@ -1,118 +0,0 @@ ---- - debugfs.ocfs2/Makefile | 5 ++-- - vendor/common/o2cb.init | 53 ++++++++++++++++++++++++++++++++++++++++++++--- - vendor/common/ocfs2.init | 4 --- - 3 files changed, 54 insertions(+), 8 deletions(-) - ---- a/debugfs.ocfs2/Makefile -+++ b/debugfs.ocfs2/Makefile -@@ -12,10 +12,11 @@ INCLUDES = -Iinclude -I$(TOPDIR)/libocfs - INCLUDES += $(GLIB_CFLAGS) - - ifdef OCFS2_DEBUG --CFLAGS = -Wall -O -ggdb -+OPTS = -O -ggdb - else --CFLAGS = -Wall -O2 -+OPTS = -O2 - endif -+CFLAGS=-Wall $(OPTS) - - CFILES = main.c commands.c dump.c utils.c journal.c find_block_inode.c find_inode_paths.c dump_fs_locks.c - ---- a/vendor/common/o2cb.init -+++ b/vendor/common/o2cb.init -@@ -6,9 +6,9 @@ - # - ### BEGIN INIT INFO - # Provides: o2cb --# Required-Start: $network --# Should-Start: --# Required-Stop: -+# Required-Start: $network $syslog $named -+# Should-Start: sshd iscsi -+# Required-Stop: $null - # Default-Start: 2 3 5 - # Default-Stop: - # Description: Load O2CB cluster services at system boot. -@@ -151,6 +151,10 @@ O2CB_KEEPALIVE_DELAY_MS=${O2CB_KEEPALIVE - # O2CB_RECONNECT_DELAY_MS: Min time in ms between connection attempts - O2CB_RECONNECT_DELAY_MS=${O2CB_RECONNECT_DELAY_MS} - -+# O2CB_HEARTBEAT_MODE: Whether to use the native "kernel" or the "user" -+# driven heartbeat (for example, for integration with heartbeat 2.0.x) -+O2CB_HEARTBEAT_MODE="${O2CB_HEARTBEAT_MODE:-kernel}" -+ - EOF - - if [ $? != 0 ] -@@ -354,6 +358,34 @@ EOF - read_timeout "network reconnect delay in ms" "$O2CB_RECONNECT_DELAY_MS" "$MIN_RECONNECT_DELAY_MS" "$DEF_RECONNECT_DELAY_MS" - O2CB_RECONNECT_DELAY_MS="$RET_VAL" - -+ while : -+ do -+ if [ "$O2CB_HEARTBEAT_MODE" = "user" ] -+ then -+ CUR=y -+ else -+ CUR=n -+ fi -+ echo -n "Use user-space driven heartbeat? (y/n) [$CUR]: " -+ read LINE -+ case "$LINE" in -+ "") -+ break -+ ;; -+ y|Y) -+ O2CB_HEARTBEAT_MODE=user -+ break -+ ;; -+ n|N) -+ O2CB_HEARTBEAT_MODE=kernel -+ break -+ ;; -+ *) -+ echo "Invalid answer: $LINE" >&2 -+ ;; -+ esac -+ done -+ - # XXX ask about mount point base - } - -@@ -707,6 +739,21 @@ load() - eval ${LOAD_ACTIONS[i]} - if_fail "$?" - done -+ -+ if [ "$O2CB_HEARTBEAT_MODE" = "user" ] ; then -+ echo -n "Switching to user mode heartbeat : " -+ if modprobe ocfs2_user_heartbeat 2>/dev/null ; then -+ if echo user > /sys/o2cb/heartbeat_mode ; then -+ echo "OK" -+ else -+ echo "FAILED" -+ fi -+ -+ else -+ echo "FAILED" -+ fi -+ fi -+ - } - - load_status() ---- a/vendor/common/ocfs2.init -+++ b/vendor/common/ocfs2.init -@@ -8,9 +8,7 @@ - ### BEGIN INIT INFO - # Provides: ocfs2 - # Required-Start: $network o2cb --# Required-Stop: --# X-UnitedLinux-Should-Start: --# X-UnitedLinux-Should-Stop: -+# Required-Stop: $null - # Default-Start: 2 3 5 - # Default-Stop: - # Description: Mount OCFS2 volumes at boot. diff --git a/ocfs2-tools.changes b/ocfs2-tools.changes index 43c23a3..8736a83 100644 --- a/ocfs2-tools.changes +++ b/ocfs2-tools.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Sep 16 22:14:09 CEST 2008 - abeekhof@suse.de + +- Update for new pacemaker dependancies +- Use correct path for ocfs2_controld.* +- Package required udev rules + ------------------------------------------------------------------- Thu Sep 11 11:04:40 CEST 2008 - abeekhof@suse.de diff --git a/ocfs2-tools.spec b/ocfs2-tools.spec index 86a5f69..273881d 100644 --- a/ocfs2-tools.spec +++ b/ocfs2-tools.spec @@ -19,23 +19,18 @@ Name: ocfs2-tools -BuildRequires: e2fsprogs-devel glib2-devel heartbeat-common-devel libdlm-devel libxml2-devel libxslt-devel openais-devel pacemaker-devel >= 0.7.1 python-devel python-gtk-devel readline-devel update-desktop-files +BuildRequires: e2fsprogs-devel glib2-devel libdlm-devel libopenais-devel libpacemaker-devel libxml2-devel libxslt-devel python-devel python-gtk-devel readline-devel update-desktop-files Summary: Oracle Cluster File System 2 Core Tools Version: 1.4.1 -Release: 1 +Release: 2 License: GPL v2 or later Group: System/Filesystems Source: ocfs2-tools.tar.bz2 -Patch0: ocfs2-tools-suse.diff -Patch1: blkid.m4.diff -Patch2: offsetof.diff -Patch3: ocfs2-tools-o_creat-mode.diff -Patch4: ocfs2-tools-1.2.7-tunefs-path.diff Patch5: ocfs2-tools-static-glib.diff Patch99: ocfs2-devel.diff Patch100: ocfs2-init.diff Url: http://oss.oracle.com/projects/ocfs2-tools/ -Requires: coreutils, net-tools, modutils, e2fsprogs, /sbin/chkconfig, glib2 >= 2.2.3 +Requires: net-tools, modutils, e2fsprogs, /sbin/chkconfig, glib2 >= 2.2.3 PreReq: %insserv_prereq %fillup_prereq AutoReqProv: on BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -60,7 +55,6 @@ Obsoletes: ocfs2-support Requires: ocfs2-tools = %{version} AutoReqProv: No Requires: e2fsprogs, glib2 >= 2.2.3, vte >= 0.11.10, python-gtk >= 1.99.16, ocfs2-tools = %{version} -%{py_requires} %description -n ocfs2console OCFS is the Oracle Cluster Filesystem. @@ -109,8 +103,10 @@ make OPTS="$RPM_OPT_FLAGS" %install mkdir -p $RPM_BUILD_ROOT/sbin mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/ cp -f vendor/common/o2cb.init $RPM_BUILD_ROOT%{_sysconfdir}/init.d/o2cb cp -f vendor/common/ocfs2.init $RPM_BUILD_ROOT%{_sysconfdir}/init.d/ocfs2 +cp -f vendor/common/51-ocfs2.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/ ln -sf ..%{_sysconfdir}/init.d/o2cb $RPM_BUILD_ROOT/sbin/rco2cb ln -sf ..%{_sysconfdir}/init.d/ocfs2 $RPM_BUILD_ROOT/sbin/rcocfs2 mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates @@ -130,28 +126,26 @@ then rm -rf $RPM_BUILD_ROOT fi -%post -%run_ldconfig -%{fillup_and_insserv -n -y -Y o2cb o2cb} -%{fillup_and_insserv -n -y -Y ocfs2 ocfs2} +%post -p /sbin/ldconfig %preun %stop_on_removal ocfs2 %stop_on_removal o2cb %postun -%run_ldconfig +/sbin/ldconfig +%{insserv_cleanup} %restart_on_update ocfs2 %restart_on_update o2cb -%{insserv_cleanup} %files %defattr(-,root,root) +%dir %{_sysconfdir}/udev +%dir %{_sysconfdir}/udev/rules.d /sbin/fsck.ocfs2 /sbin/mkfs.ocfs2 /sbin/mounted.ocfs2 /sbin/tunefs.ocfs2 -/sbin/tunefs.ocfs2 /sbin/o2cb_ctl /sbin/mount.ocfs2 /sbin/ocfs2_hb_ctl @@ -162,6 +156,7 @@ fi %{_sbindir}/ocfs2_controld.pcmk %{_sysconfdir}/init.d/o2cb %{_sysconfdir}/init.d/ocfs2 +%config %{_sysconfdir}/udev/rules.d/51-ocfs2.rules %{_mandir}/man8/debugfs.ocfs2.8* %{_mandir}/man8/fsck.ocfs2.8* %{_mandir}/man8/fsck.ocfs2.checks.8* @@ -194,6 +189,10 @@ fi %{_libdir}/pkgconfig/ocfs2.pc %changelog +* Wed Sep 17 2008 abeekhof@suse.de +- Update for new pacemaker dependancies +- Use correct path for ocfs2_controld.* +- Package required udev rules * Thu Sep 11 2008 abeekhof@suse.de - Refresh from upstream 1.4.1 (0ead2f1b45568ca441cb3ed679efbbd7eeb68d98) - Add support for OpenAIS/Pacemaker (userspace cluster stack) integration diff --git a/offsetof.diff b/offsetof.diff deleted file mode 100644 index bda04ee..0000000 --- a/offsetof.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- a/libocfs2/include/ocfs2.h -+++ b/libocfs2/include/ocfs2.h -@@ -43,6 +43,7 @@ - #include - - #include -+#include - - #include -