Subject: [alpine-aports] [PATCH] main/xfsprogs: upgrade to 4.3.0. libraries moved to -libs subpackage

From: Valery Kartel <[email-masked]>
Date: Thu, 10 Dec 2015 22:43:31 +0200

---
 main/xfsprogs/APKBUILD                |  34 ++++-----
 main/xfsprogs/musl-fixes.patch        | 130 +++++++++++++---------------------
 main/xfsprogs/musl-linux-limits.patch |  10 ---
 3 files changed, 66 insertions(+), 108 deletions(-)
 delete mode 100644 main/xfsprogs/musl-linux-limits.patch

diff --git a/main/xfsprogs/APKBUILD b/main/xfsprogs/APKBUILD
index c018100..5aea23a 100644
--- a/main/xfsprogs/APKBUILD
+++ b/main/xfsprogs/APKBUILD
@@ -1,17 +1,17 @@
+# Contributor: Valery Kartel <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=xfsprogs
-pkgver=3.2.4
+pkgver=4.3.0
 pkgrel=0
 pkgdesc="XFS filesystem utilities"
 url="http://oss.sgi.com/projects/xfs/"
 arch="all"
 license="LGPL"
-depends="e2fsprogs"
-makedepends="linux-headers e2fsprogs-dev bash"
-subpackages="$pkgname-dev $pkgname-doc"
-source="ftp://oss.sgi.com/projects/xfs/cmd_tars/${pkgname}-$pkgver.tar.gz
+depends=""
+makedepends="linux-headers e2fsprogs-dev bash gzip"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+source="ftp://oss.sgi.com/projects/xfs/cmd_tars/$pkgname-$pkgver.tar.gz
 	musl-fixes.patch
-	musl-linux-limits.patch
 	"
 
 _builddir="$srcdir"/$pkgname-$pkgver
@@ -23,7 +23,6 @@ prepare() {
 		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
 		esac
 	done
-	sed -i -e 's/--best//' Makefile doc/Makefile
 }
 
 build() {
@@ -32,8 +31,6 @@ build() {
 	export OPTIMIZER="$CFLAGS"
 	export INSTALL_USER=root
 	export INSTALL_GROUP=root
-
-	ac_cv_header_aio_h=yes ac_cv_lib_rt_lio_listio=yes \
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
@@ -49,14 +46,13 @@ build() {
 
 package() {
 	cd "$_builddir"
-	make -j1 DIST_ROOT="$pkgdir" install install-dev install-qa || return 1
+	make -j1 DIST_ROOT="$pkgdir" install install-dev || return 1
+	find "$pkgdir" -name *.la -delete
 }
-md5sums="c28db88f058ada506fe0ac6a897a1c42  xfsprogs-3.2.4.tar.gz
-fa81f3dcfb5d14bc7109ea3ca4f66b03  musl-fixes.patch
-a7a1f812836cb49af45b6de74fa07837  musl-linux-limits.patch"
-sha256sums="dde65ead82d3cbfa9b4ded9796b6d22095d7d759a22d41ae6f1a4ec458bb0465  xfsprogs-3.2.4.tar.gz
-b62b258a56ba5ffbead385a390541fa34b8b545322ad6984bc5c1bb01d2e0c58  musl-fixes.patch
-6d8e49de188fc9932ea488a8945601bf2035b03dfa4c3667bd55689445582696  musl-linux-limits.patch"
-sha512sums="fb1ea5beb933b86970cac198fa4e296457f0f5b30bd72fda54452644730277929dee28f11f35a154910e4a19857455ecffdd21b3df456023e0da95e2fd0aa0eb  xfsprogs-3.2.4.tar.gz
-1c6936fdee3cebf81a1ef9828cbf28175533dab46b47aead3f4165f725b7a66d1ac214314818f639313ebfef8e0fe245d21bb7f804423f934c2505c493dbce97  musl-fixes.patch
-62125c90ff22e52142927d3e1ca8411a757679a304fcf1acf780c692fee1ef8c8d1d4bdbd97dce3e9f6d6678f9640f189fd96400e91c974978f0455966b80c6c  musl-linux-limits.patch"
+
+md5sums="ade22791338fa3d2cf442d6bb84f1748  xfsprogs-4.3.0.tar.gz
+10fe8108861988ec1a1026521c21ec75  musl-fixes.patch"
+sha256sums="3e570ad51153e4be3792f42b2c805ddbd46b55d166eba3102ec87d5006d4cb5c  xfsprogs-4.3.0.tar.gz
+2d5846e695f9c14bf886e45637985155b580e261fb992f209012f6cbaaf6415a  musl-fixes.patch"
+sha512sums="c19c07497eb78dd2beb6dc35b8c21abf5fa3ac164eed32f7b95b71d460c8f08bba5550ecc156fafe412bf1b5452e40180e6fcd439d289a660afd594477f209d2  xfsprogs-4.3.0.tar.gz
+52d7ff52e19a5f351f3a97bb20c9f5a063b344ca2e18250a5ee3e15a1693461f95825aa8b7c3c9149d2ce3696c64772d092f679810eccf996321ea93b0770596  musl-fixes.patch"
diff --git a/main/xfsprogs/musl-fixes.patch b/main/xfsprogs/musl-fixes.patch
index bffa6fb..6fe69a1 100644
--- a/main/xfsprogs/musl-fixes.patch
+++ b/main/xfsprogs/musl-fixes.patch
@@ -13,81 +13,15 @@ index 6f00b41..5b4af53 100644
  
  char *progname;
  
-diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
-index ac260bc..0e7fccf 100644
---- a/include/platform_defs.h.in
-+++ b/include/platform_defs.h.in
-@@ -68,6 +68,32 @@ typedef __u64	__bitwise	__be64;
- 
- typedef struct filldir		filldir_t;
- 
-+#ifndef __uint8_t
-+#define __uint8_t uint8_t
-+#endif
-+#ifndef __uint16_t
-+#define __uint16_t uint16_t
-+#endif
-+#ifndef __uint32_t
-+#define __uint32_t uint32_t
-+#endif
-+#ifndef __uint64_t
-+#define __uint64_t uint64_t
-+#endif
-+
-+#ifndef __int8_t
-+#define __int8_t int8_t
-+#endif
-+#ifndef __int16_t
-+#define __int16_t int16_t
-+#endif
-+#ifndef __int32_t
-+#define __int32_t int32_t
-+#endif
-+#ifndef __int64_t
-+#define __int64_t int64_t
-+#endif
-+
- #if defined(__linux__)
- #include <xfs/linux.h>
- #elif defined(__FreeBSD__)
-diff --git a/libhandle/handle.c b/libhandle/handle.c
-index 9a232fa..1db7772 100644
---- a/libhandle/handle.c
-+++ b/libhandle/handle.c
-@@ -20,6 +20,9 @@
- #include <xfs/xfs.h>
- #include <xfs/handle.h>
- #include <xfs/parent.h>
-+#if defined(__linux__)
-+#include <linux/limits.h>
-+#endif
- 
- /* just pick a value we know is more than big enough */
- #define	MAXHANSIZ	64
-diff --git a/libhandle/jdm.c b/libhandle/jdm.c
-index 070407b..8dd6322 100644
---- a/libhandle/jdm.c
-+++ b/libhandle/jdm.c
-@@ -20,6 +20,9 @@
- #include <xfs/handle.h>
- #include <xfs/jdm.h>
- #include <xfs/parent.h>
-+#if defined(__linux__)
-+#include <linux/limits.h>
-+#endif
- 
- /* internal fshandle - typecast to a void for external use */
- #define FSHANDLE_SZ		8
 diff --git a/libxfs/linux.c b/libxfs/linux.c
 index 2e07d54..4075786 100644
 --- a/libxfs/linux.c
 +++ b/libxfs/linux.c
-@@ -16,12 +16,9 @@
+@@ -16,11 +16,8 @@
   * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   */
  
 -#define ustat __kernel_ustat
- #include <xfs/libxfs.h>
  #include <mntent.h>
  #include <sys/stat.h>
 -#undef ustat
@@ -95,7 +29,7 @@ index 2e07d54..4075786 100644
  #include <sys/mount.h>
  #include <sys/ioctl.h>
  #include <sys/sysinfo.h>
-@@ -49,9 +46,12 @@ static int max_block_alignment;
+@@ -51,9 +48,12 @@
  int
  platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
  {
@@ -110,7 +44,7 @@ index 2e07d54..4075786 100644
  
  	if (!s) {
  		if (stat64(block, &st) < 0)
-@@ -61,14 +61,25 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
+@@ -63,14 +63,25 @@
  		s = &st;
  	}
  
@@ -139,16 +73,54 @@ index 2e07d54..4075786 100644
  }
  
  int
---- ./repair/attr_repair.c.orig
-+++ ./repair/attr_repair.c
-@@ -24,6 +24,10 @@
- #include "bmap.h"
- #include "protos.h"
- #include "dir2.h"
-+#if defined(__linux__)
-+#include <linux/limits.h>
+--- old/io/readdir.c
++++ new/io/readdir.c
+@@ -23,6 +23,9 @@
+ 
+ #include <sys/types.h>
+ #include <dirent.h>
++#define _DIRENT_HAVE_D_OFF
++#define _DIRENT_HAVE_D_RECLEN
++#define _DIRENT_HAVE_D_TYPE
+ 
+ static struct cmdinfo readdir_cmd;
+ 
+--- old/include/linux.h
++++ new/include/linux.h
+@@ -31,6 +31,36 @@
+ #include <stdbool.h>
+ #include <asm/types.h>
+ #include <mntent.h>
++#include <stdio.h>
++
++#ifndef loff_t
++#define loff_t off_t
++#endif
++#ifndef __uint8_t
++#define __uint8_t uint8_t
++#endif
++#ifndef __uint16_t
++#define __uint16_t uint16_t
++#endif
++#ifndef __uint32_t
++#define __uint32_t uint32_t
++#endif
++#ifndef __uint64_t
++#define __uint64_t uint64_t
 +#endif
 +
++#ifndef __int8_t
++#define __int8_t int8_t
++#endif
++#ifndef __int16_t
++#define __int16_t int16_t
++#endif
++#ifndef __int32_t
++#define __int32_t int32_t
++#endif
++#ifndef __int64_t
++#define __int64_t int64_t
++#endif
  
- static int xfs_acl_valid(struct xfs_mount *mp, struct xfs_acl *daclp);
- static int xfs_mac_valid(xfs_mac_label_t *lp);
+ static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
+ {
diff --git a/main/xfsprogs/musl-linux-limits.patch b/main/xfsprogs/musl-linux-limits.patch
deleted file mode 100644
index 813119f..0000000
--- a/main/xfsprogs/musl-linux-limits.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./libxfs/xfs_attr_remote.c.orig
-+++ ./libxfs/xfs_attr_remote.c
-@@ -17,6 +17,7 @@
-  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-  */
- #include <xfs.h>
-+#include <linux/limits.h>
- 
- #define ATTR_RMTVALUE_MAPSIZE	1	/* # of map entries at once */
- 
-- 
2.6.3

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---