summaryrefslogtreecommitdiffstats
path: root/sys-fs/xfsprogs/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/xfsprogs/files')
-rw-r--r--sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch10
-rw-r--r--sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch154
-rw-r--r--sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch108
3 files changed, 272 insertions, 0 deletions
diff --git a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch
new file mode 100644
index 0000000..813119f
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-add-limits-h.patch
@@ -0,0 +1,10 @@
+--- ./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 */
+
diff --git a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch
new file mode 100644
index 0000000..bffa6fb
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-musl-compat.patch
@@ -0,0 +1,154 @@
+diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
+index 6f00b41..5b4af53 100644
+--- a/fsr/xfs_fsr.c
++++ b/fsr/xfs_fsr.c
+@@ -44,6 +44,10 @@
+ #define _PATH_FSRLAST "/var/tmp/.fsrlast_xfs"
+ #define _PATH_PROC_MOUNTS "/proc/mounts"
+
++#ifndef _PATH_MOUNTED
++#define _PATH_MOUNTED MOUNTED
++#endif
++
+
+ 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 @@
+ * 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
+-#include <sys/ustat.h>
+ #include <sys/mount.h>
+ #include <sys/ioctl.h>
+ #include <sys/sysinfo.h>
+@@ -49,9 +46,12 @@ static int max_block_alignment;
+ int
+ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
+ {
+- /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
+- struct ustat ust[2];
+ struct stat64 st;
++ FILE *f;
++ struct stat64 mst;
++ struct mntent *mnt;
++ char mounts[MAXPATHLEN];
++ int ismounted = 0;
+
+ if (!s) {
+ if (stat64(block, &st) < 0)
+@@ -61,14 +61,25 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
+ s = &st;
+ }
+
+- if (ustat(s->st_rdev, ust) >= 0) {
++ strcpy(mounts, (!access(PROC_MOUNTED, R_OK)) ? PROC_MOUNTED : MOUNTED);
++ if ((f = setmntent(mounts, "r")) == NULL)
++ return 0;
++
++ while ((mnt = getmntent(f)) != NULL) {
++ if (stat64(mnt->mnt_dir, &mst) < 0)
++ continue;
++ if (mst.st_dev != s->st_rdev)
++ continue;
++
+ if (verbose)
+ fprintf(stderr,
+ _("%s: %s contains a mounted filesystem\n"),
+ progname, name);
+- return 1;
++ ismounted = 1;
++ break;
+ }
+- return 0;
++ endmntent(f);
++ return ismounted;
+ }
+
+ 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>
++#endif
++
+
+ static int xfs_acl_valid(struct xfs_mount *mp, struct xfs_acl *daclp);
+ static int xfs_mac_valid(xfs_mac_label_t *lp);
diff --git a/sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch
new file mode 100644
index 0000000..118874a
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch
@@ -0,0 +1,108 @@
+use libtool to do all installing. do not use the manual file install as
+that'll copy files directly from the .libs/ subdir which might have rpaths
+that we do not want.
+
+--- xfsprogs-3.2.2/include/buildmacros
++++ xfsprogs-3.2.2/include/buildmacros
+@@ -70,18 +70,9 @@
+ # /usr/lib.
+ ifeq ($(ENABLE_SHARED),yes)
+ INSTALL_LTLIB_DEV = \
+- cd $(TOPDIR)/$(LIBNAME)/.libs; \
+- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
+- ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR); \
+- ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \
+- ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
+- ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
+- if [ "x$(shell readlink -f $(PKG_LIB_DIR))" != \
+- "x$(shell readlink -f $(PKG_ROOT_LIB_DIR))"; ]; then \
+- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \
+- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \
+- ../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \
+- fi
++ set -e; cd $(TOPDIR)/$(LIBNAME); \
++ $(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
++ env -uDIST_ROOT $(LTINSTALL) $(TOPDIR)/$(LIBNAME)/$(LIBNAME).la $(DIST_ROOT)$(PKG_LIB_DIR)/$(LIBNAME).la
+ else
+ INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
+ endif
+--- xfsprogs-3.2.2/libdisk/Makefile
++++ xfsprogs-3.2.2/libdisk/Makefile
+@@ -31,6 +31,7 @@
+ install: default
+
+ install-dev: default
++ $(INSTALL_LTLIB_DEV)
+
+ install-qa: install-dev
+
+--- xfsprogs-3.2.2/libhandle/Makefile
++++ xfsprogs-3.2.2/libhandle/Makefile
+@@ -20,7 +20,6 @@
+ include $(BUILDRULES)
+
+ install: default
+- $(INSTALL_LTLIB)
+
+ install-dev: default
+ $(INSTALL_LTLIB_DEV)
+--- xfsprogs-3.2.2/libxcmd/Makefile
++++ xfsprogs-3.2.2/libxcmd/Makefile
+@@ -34,6 +34,11 @@
+
+ include $(BUILDRULES)
+
+-install install-dev install-qa: default
++install: default
++
++ install-dev: default
++ $(INSTALL_LTLIB_DEV)
++
++install-qa: default
+
+ -include .ltdep
+--- xfsprogs-3.2.2/libxfs/Makefile
++++ xfsprogs-3.2.2/libxfs/Makefile
+@@ -86,6 +86,7 @@
+ install: default
+
+ install-dev: default
++ $(INSTALL_LTLIB_DEV)
+
+ install-qa: default
+
+--- xfsprogs-3.2.2/libxlog/Makefile
++++ xfsprogs-3.2.2/libxlog/Makefile
+@@ -12,6 +12,8 @@
+
+ CFILES = xfs_log_recover.c util.c
+
++LTLIBS = $(LIBUUID) $(LIBXFS)
++
+ # don't want to link xfs_repair with a debug libxlog.
+ DEBUG = -DNDEBUG
+
+@@ -19,6 +21,11 @@
+
+ include $(BUILDRULES)
+
+-install install-dev install-qa: default
++install: default
++
++install-dev: default
++ $(INSTALL_LTLIB_DEV)
++
++install-qa: default
+
+ -include .ltdep
+--- xfsprogs-3.2.2/Makefile
++++ xfsprogs-3.2.2/Makefile
+@@ -63,6 +63,8 @@
+ mkfs: libxfs
+ quota: libxcmd
+ repair: libxfs libxlog
++libxlog: libxfs
++libxlog-install-dev: libxfs-install-dev
+
+ ifneq ($(ENABLE_BLKID), yes)
+ mkfs: libdisk