[ocfs2-tools] Patch for building with gcc45.
Toshio くらとみ
toshio at fedoraproject.org
Tue Aug 3 01:24:28 UTC 2010
commit 4fa3b4da2c014c3fb36576fdc473541317c727d1
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Mon Aug 2 21:23:51 2010 -0400
Patch for building with gcc45.
ocfs2-tools-gcc45.patch | 21 +++++++++++++++++++++
ocfs2-tools.spec | 15 ++++++++++-----
2 files changed, 31 insertions(+), 5 deletions(-)
---
diff --git a/ocfs2-tools-gcc45.patch b/ocfs2-tools-gcc45.patch
new file mode 100644
index 0000000..a875d78
--- /dev/null
+++ b/ocfs2-tools-gcc45.patch
@@ -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();
diff --git a/ocfs2-tools.spec b/ocfs2-tools.spec
index 5c7d6f8..c54281e 100644
--- a/ocfs2-tools.spec
+++ b/ocfs2-tools.spec
@@ -1,12 +1,12 @@
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-%define with_console %{?_without_console: 0} %{?!_without_console: 1}
+%global with_console %{?_without_console: 0} %{?!_without_console: 1}
## define alphatag 20080221git
Summary: Tools for managing the Ocfs2 cluster file system
Name: ocfs2-tools
Version: 1.4.3
-Release: 6%{?alphatag:.%{alphatag}}%{?dist}
+Release: 7%{?alphatag:.%{alphatag}}%{?dist}
License: GPLv2
Group: System Environment/Base
# The source for this package was pulled from upstream's git repo and manually
@@ -22,6 +22,7 @@ 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
@@ -101,6 +102,7 @@ pacemaker cluster manager
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%{configure} \
@@ -211,10 +213,13 @@ fi
%files pcmk
%defattr(-,root,root,-)
/sbin/ocfs2_controld.pcmk
-%dir /usr/lib/ocf/resource.d/ocfs2
-/usr/lib/ocf/resource.d/ocfs2
+%dir %{_prefix}/lib/ocf/resource.d/ocfs2
+%{_prefix}/lib/ocf/resource.d/ocfs2
%changelog
+* Mon Aug 2 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 1.4.3-7
+- Patch for gcc45 compilation failures
+
* Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 1.4.3-6
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
More information about the scm-commits
mailing list