[arch-commits] Commit in ocfs2-tools/trunk (PKGBUILD gcc45-ftbfs.patch)

Rémy Oudompheng remy at archlinux.org
Mon Sep 20 13:54:14 UTC 2010


    Date: Monday, September 20, 2010 @ 09:54:14
  Author: remy
Revision: 90997

upgpkg: ocfs2-tools 1.4.3-2
Rebuild for python2.7, fix build with gcc4.5 (Debian patch)

Added:
  ocfs2-tools/trunk/gcc45-ftbfs.patch
Modified:
  ocfs2-tools/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   21 ++++++++++++++++-----
 gcc45-ftbfs.patch |   21 +++++++++++++++++++++
 2 files changed, 37 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-09-20 13:18:15 UTC (rev 90996)
+++ PKGBUILD	2010-09-20 13:54:14 UTC (rev 90997)
@@ -2,23 +2,34 @@
 # Maintainer: Tobias Powalowski <tpowa at archlinux.org>
 pkgname=ocfs2-tools
 pkgver=1.4.3
-pkgrel=1
+pkgrel=2
 pkgdesc="Oracle Cluster File System 2 utilities"
 arch=(i686 x86_64)
 url="http://oss.oracle.com/projects/ocfs2-tools/"
 depends=('e2fsprogs' 'glib2' 'readline>=6.0.00')
 license=('GPL2')
-source=(http://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v1.4/$pkgname-$pkgver.tar.gz)
+source=(http://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v1.4/$pkgname-$pkgver.tar.gz
+gcc45-ftbfs.patch)
 options=(!makeflags)
-optdepends=('python: for using ocfs2console')
+optdepends=('python2: for using ocfs2console')
+md5sums=('7d8895ea41999ce8f468e2bc7dc55ddc'
+         '5dba18ca5596b1de0f2eeb30f5ed1656')
+
 build() {
   cd $srcdir/$pkgname-$pkgver
+  sed -i 's#/usr/bin/python#/usr/bin/python2#' ocfs2console/ocfs2console
+  # Fix build with gcc 4.5
+  # http://svn.debian.org/viewsvn/collab-maint?view=rev&revision=15814
+  patch -p1 -i ${srcdir}/gcc45-ftbfs.patch
   ./configure --prefix=/usr --mandir=/usr/share/man
-  make LDFLAGS=-L/usr/lib || return 1
+  make LDFLAGS=-L/usr/lib
+}
+
+package() {
+  cd $srcdir/$pkgname-$pkgver
   make DESTDIR=$pkgdir install
   install -m 755 -D $srcdir/$pkgname-$pkgver/vendor/common/ocfs2.init \
 	$pkgdir/etc/rc.d/ocfs2
   install -m 755 -D $srcdir/$pkgname-$pkgver/vendor/common/o2cb.init \
 	$pkgdir/etc/rc.d/o2cb
 }
-md5sums=('7d8895ea41999ce8f468e2bc7dc55ddc')

Added: gcc45-ftbfs.patch
===================================================================
--- gcc45-ftbfs.patch	                        (rev 0)
+++ gcc45-ftbfs.patch	2010-09-20 13:54:14 UTC (rev 90997)
@@ -0,0 +1,21 @@
+diff -urN ocfs2-tools-1.4.3.orig//mount.ocfs2/mount.ocfs2.c ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c
+--- ocfs2-tools-1.4.3.orig//mount.ocfs2/mount.ocfs2.c	2009-04-14 00:10:40.000000000 +0200
++++ ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c	2010-03-24 07:23:45.000000000 +0100
+@@ -261,7 +261,7 @@
+ 	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 hb_started = 0;
+ 	struct stat statbuf;
+ 
++	stackstr[0] = '\0';
++
+ 	initialize_ocfs_error_table();
+ 	initialize_o2dl_error_table();
+ 	initialize_o2cb_error_table();




More information about the arch-commits mailing list