[arch-commits] Commit in evms/trunk (PKGBUILD evms-2.5.5-pagesize.patch)

Allan McRae allan at archlinux.org
Tue Aug 26 07:32:42 UTC 2008


    Date: Tuesday, August 26, 2008 @ 03:32:41
  Author: allan
Revision: 10321

Add patch to fix build failure

Added:
  evms/trunk/evms-2.5.5-pagesize.patch
Modified:
  evms/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |   32 +++++++++++++++---------
 evms-2.5.5-pagesize.patch |   58 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-08-26 04:37:16 UTC (rev 10320)
+++ PKGBUILD	2008-08-26 07:32:41 UTC (rev 10321)
@@ -2,12 +2,12 @@
 # Maintainer: Judd Vinet <jvinet at zeroflux.org>
 pkgname=evms
 pkgver=2.5.5
-pkgrel=5
+pkgrel=6
 pkgdesc="Enterprise Volume Management System"
 arch=('i686' 'x86_64')
 license=('GPL')
 url="http://evms.sourceforge.net/"
-depends=('device-mapper>=1.02.19' 'e2fsprogs' 'perl')
+depends=('device-mapper>=1.02.19' 'e2fsprogs' 'perl' 'ncurses')
 optdepends=('gtk' 'glib')
 makedepends=('gtk')
 backup=('etc/evms.conf')
@@ -24,6 +24,9 @@
 	http://evms.sourceforge.net/patches/2.5.5/engine/get_geometry.patch
 	http://evms.sourceforge.net/patches/2.5.5/engine/s390_ioctl_fix.patch
 	http://evms.sourceforge.net/patches/2.5.5/engine/disk_cache.patch
+	http://evms.sourceforge.net/patches/2.5.5/engine/fix-strings.patch
+	http://evms.sourceforge.net/patches/2.5.5/engine/ocfs2_version_check.patch
+	evms-2.5.5-pagesize.patch  #from gentoo bug tracker 169623
 	evms_hook evms_install)
 install=evms.install
 md5sums=('45b463f0cbade194dc0a08be432b572e'
@@ -38,20 +41,27 @@
          '2122d3cb2374153f2569f05d14fdee13'
          'eb9d484e71ada2bbf9a94fa764c670cf'
          'a5e00a9f6f7ea6ec8a776d1cc7cb76bf'
+         'f65874b07c94b5ee54d3269ed40af451'
+         '1edcbf74a9b4d4a01bc9beea2e0c41fb'
+         '43b7b8e3a11ada886a92f0c8f9d18ce4'
          'c97b7918f589ecfe244ed86de5513f0a'
          '4ce62767cc2dc4fbe9f428c36e08cb79')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
+  cd $srcdir/$pkgname-$pkgver
   # adding patches from http://evms.sourceforge.net/patches/2.5.5/engine/
-  PATCHES="md_super_fix.patch raid5_degrade_fix.patch raid5_remove_spare_fix_2.patch raid5_algorithm.patch cli_reload_options.patch cli_query_segfault.patch BaseName.patch get_geometry.patch s390_ioctl_fix.patch disk_cache.patch"
-   for i in $PATCHES; do
-   	patch -Np1 -i $startdir/src/$i || return 1
-   done
-  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+  PATCHES="md_super_fix.patch raid5_degrade_fix.patch raid5_remove_spare_fix_2.patch \
+           raid5_algorithm.patch cli_reload_options.patch cli_query_segfault.patch \
+           BaseName.patch get_geometry.patch s390_ioctl_fix.patch disk_cache.patch \
+           fix-strings.patch ocfs2_version_check.patch"
+  for i in $PATCHES; do
+    patch -Np1 -i $srcdir/$i || return 1
+  done
+  patch -Np1 -i $srcdir/evms-2.5.5-pagesize.patch || return 1
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man
   make || return 1
-  make DESTDIR=$startdir/pkg install
+  make DESTDIR=$pkgdir install
   # add evms hook and install file for initcpio
-  install -D -m 644 $startdir/src/evms_install $startdir/pkg/lib/initcpio/install/evms
-  install -D -m 644 $startdir/src/evms_hook $startdir/pkg/lib/initcpio/hooks/evms
+  install -D -m 644 $srcdir/evms_install $pkgdir/lib/initcpio/install/evms
+  install -D -m 644 $srcdir/evms_hook $pkgdir/lib/initcpio/hooks/evms
 }

Added: evms-2.5.5-pagesize.patch
===================================================================
--- evms-2.5.5-pagesize.patch	                        (rev 0)
+++ evms-2.5.5-pagesize.patch	2008-08-26 07:32:41 UTC (rev 10321)
@@ -0,0 +1,58 @@
+Index: evms-2.5.5/plugins/swap/swapfs.c
+===================================================================
+--- evms-2.5.5.orig/plugins/swap/swapfs.c
++++ evms-2.5.5/plugins/swap/swapfs.c
+@@ -27,7 +27,6 @@
+ #include <plugin.h>
+ #include <fcntl.h>
+ #include <sys/wait.h>
+-#include <asm/page.h> /* to get PAGE_SIZE */
+ #include <sys/swap.h>
+ 
+ #include "swapfs.h"
+@@ -341,7 +340,7 @@ static int swap_get_fs_limits(logical_vo
+ 
+ 	*max_volume_size = (sector_count_t)-1;	/* No limit. */
+ 	*max_object_size = (sector_count_t)-1;	/* No limit. */
+-	*min_size = (sector_count_t)(PAGE_SIZE * 10);	/* 10 page minimum. */
++	*min_size = (sector_count_t)(sysconf(_SC_PAGESIZE) * 10);	/* 10 page minimum. */
+ 
+ 	LOG_EXTRA("Volume: %s, min: %"PRIu64", max: %"PRIu64"\n",
+ 		  volume->name, *min_size, *max_volume_size);
+Index: evms-2.5.5/plugins/swap/swapfs.h
+===================================================================
+--- evms-2.5.5.orig/plugins/swap/swapfs.h
++++ evms-2.5.5/plugins/swap/swapfs.h
+@@ -47,8 +47,8 @@ extern engine_functions_t *EngFncs;
+ #define PUT 1
+ #define SWAPFS_MAGIC_STRING	"SWAP_SPACE"
+ #define SWAPFS_MAGIC_STRING2	"SWAPSPACE2"
+-#define SWAPFS_MIN_SIZE		(PAGE_SIZE / EVMS_VSECTOR_SIZE * 10)
+-#define SWAP_MAGIC_OFFSET_IN_BYTES	(PAGE_SIZE - 10) /* last 10 bytes of first page */
++#define SWAPFS_MIN_SIZE		(sysconf(_SC_PAGESIZE) / EVMS_VSECTOR_SIZE * 10)
++#define SWAP_MAGIC_OFFSET_IN_BYTES	(sysconf(_SC_PAGESIZE) - 10) /* last 10 bytes of first page */
+ 
+ #define EVMS_Task_swapon	EVMS_Task_Plugin_Function + 1
+ #define EVMS_Task_swapoff	EVMS_Task_Plugin_Function + 2
+Index: evms-2.5.5/plugins/xfs/fsimxfs.h
+===================================================================
+--- evms-2.5.5.orig/plugins/xfs/fsimxfs.h
++++ evms-2.5.5/plugins/xfs/fsimxfs.h
+@@ -19,7 +19,7 @@
+  */
+ 
+ #include <uuid/uuid.h>
+-#include <asm/page.h>
++#include <unistd.h>
+ 
+ extern plugin_record_t xfs_plugin_record;
+ extern plugin_record_t * my_plugin_record;
+@@ -165,7 +165,7 @@ typedef struct xfs_volume {
+  * superblock.  This is not the same as the superblock structure, since all of
+  * this space is not currently being used.
+  */
+-#define SIZE_OF_SUPER		PAGE_SIZE
++#define SIZE_OF_SUPER		sysconf(_SC_PAGESIZE)
+ 
+ /* Fixed byte offset of primary superblock */
+ #define XFS_SUPER1_OFF		0x00




More information about the arch-commits mailing list