aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/xfsprogs
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2017-05-13 03:08:17 +0800
committerdanfe <danfe@FreeBSD.org>2017-05-13 03:08:17 +0800
commit80c4e5cc1c9d828e8f7b3121b5337dc8cef680b6 (patch)
treee180a2f2f390b3b30812af5270fa9582ac5bf0e5 /sysutils/xfsprogs
parent2cc4ef6e881c13c88af2c356d8c39ad689b39836 (diff)
downloadfreebsd-ports-gnome-80c4e5cc1c9d828e8f7b3121b5337dc8cef680b6.tar.gz
freebsd-ports-gnome-80c4e5cc1c9d828e8f7b3121b5337dc8cef680b6.tar.zst
freebsd-ports-gnome-80c4e5cc1c9d828e8f7b3121b5337dc8cef680b6.zip
- Update to version 3.2.4, the latest in 3.x branch. Versions 4.x are
available, but they do not configure (this might be a red herring, pending further investigation): ... checking for blkid_probe_get_topology... no FATAL ERROR: could not find a valid BLKID header. Install the Block device ID development package. - Because DISTNAME is sane now, setting of EXTRACT_SUFX and WRKSRC are no longer needed and were dropped - DESTDIR is now respected by `install-sh' script, which allows to drop patching of individual makefiles and `include/buildmacros' file - All programs are installed under ${LOCALBASE}/sbin now - This version requires a number of patches to build on FreeBSD, most importantly: * Use getmntinfo() and extattr_set_fd() APIs instead of Linuxish getmntent() and fsetxattr() * Rename LIST_HEAD -> XFS_LIST_HEAD macro to avoid clash with our own one provided by queue(3) * Disable missing mremap(2) system call support in `io/mmap.c' * Replace `dirent->d_off' with more portable call to telldir() * Add missing `#include <inttypes.h>' in several files, etc. TIMESTAMP (xfsprogs-3.2.4.tar.gz) = 1438219249
Diffstat (limited to 'sysutils/xfsprogs')
-rw-r--r--sysutils/xfsprogs/Makefile26
-rw-r--r--sysutils/xfsprogs/distinfo5
-rw-r--r--sysutils/xfsprogs/files/patch-Makefile11
-rw-r--r--sysutils/xfsprogs/files/patch-fsr_xfs__fsr.c266
-rw-r--r--sysutils/xfsprogs/files/patch-include_freebsd.h17
-rw-r--r--sysutils/xfsprogs/files/patch-include_libxfs.h10
-rw-r--r--sysutils/xfsprogs/files/patch-include_list.h11
-rw-r--r--sysutils/xfsprogs/files/patch-include_xfs__bit.h11
-rw-r--r--sysutils/xfsprogs/files/patch-io_fadvise.c11
-rw-r--r--sysutils/xfsprogs/files/patch-io_mmap.c41
-rw-r--r--sysutils/xfsprogs/files/patch-io_readdir.c20
-rw-r--r--sysutils/xfsprogs/files/patch-libhandle_handle.c10
-rw-r--r--sysutils/xfsprogs/files/patch-libhandle_jdm.c11
-rw-r--r--sysutils/xfsprogs/files/patch-libxcmd_paths.c11
-rw-r--r--sysutils/xfsprogs/files/patch-libxfs_crc32.c10
-rw-r--r--sysutils/xfsprogs/files/patch-libxfs_rdwr.c19
-rw-r--r--sysutils/xfsprogs/files/patch-libxfs_util.c10
-rw-r--r--sysutils/xfsprogs/files/patch-libxfs_xfs__attr__remote.c10
-rw-r--r--sysutils/xfsprogs/files/patch-libxlog_util.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_agheader.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_attr__repair.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_attr__repair.h10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_bmap.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_dino__chunks.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_dinode.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_dir2.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_incore.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_phase2.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_phase3.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_phase4.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_phase6.c19
-rw-r--r--sysutils/xfsprogs/files/patch-repair_phase7.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_progress.c8
-rw-r--r--sysutils/xfsprogs/files/patch-repair_sb.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_scan.c10
-rw-r--r--sysutils/xfsprogs/files/patch-repair_xfs__repair.c10
-rw-r--r--sysutils/xfsprogs/pkg-plist39
37 files changed, 674 insertions, 62 deletions
diff --git a/sysutils/xfsprogs/Makefile b/sysutils/xfsprogs/Makefile
index a599a6625ed0..a803d8a391b7 100644
--- a/sysutils/xfsprogs/Makefile
+++ b/sysutils/xfsprogs/Makefile
@@ -2,13 +2,10 @@
# $FreeBSD$
PORTNAME= xfsprogs
-PORTVERSION= 2.9.8
-PORTREVISION= 3
+PORTVERSION= 3.2.4
CATEGORIES= sysutils
MASTER_SITES= ftp://oss.sgi.com/projects/xfs/cmd_tars/ \
ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/
-DISTNAME= ${PORTNAME}_${PORTVERSION}
-EXTRACT_SUFX= -1.tar.gz
MAINTAINER= ports@FreeBSD.org
COMMENT= Utilities for managing XFS filesystems
@@ -25,8 +22,6 @@ CONFIGURE_ENV= OPTIMIZER=" "
CONFIGURE_ARGS= --disable-shared --enable-readline
ALL_TARGET= # empty
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-
OPTIONS_DEFINE= DOCS
post-patch:
@@ -36,23 +31,12 @@ post-patch:
-e 's|/usr/local|${LOCALBASE}|g' \
-e 's/lio_listio/timer_create/' \
${WRKSRC}/configure
- @${REINPLACE_CMD} 's|$$(PKG_DOC_DIR)|$$(DESTDIR)&|g' ${WRKSRC}/Makefile
-.for dir in db doc fsck growfs io logprint mdrestore mkfs quota repair rtcp
- @${REINPLACE_CMD} -E 's,PKG_(BIN|DOC|INC|SBIN)_DIR,DESTDIR)$$(&,g' \
- ${WRKSRC}/${dir}/Makefile
-.endfor
-.for i in 3 5 8
- @${REINPLACE_CMD} 's|$$(PKG_MAN_DIR)|$$(DESTDIR)&|g' \
- ${WRKSRC}/man/man${i}/Makefile
-.endfor
- @${REINPLACE_CMD} 's|$$(PKG_LOCALE_DIR)|$$(DESTDIR)&|' \
- ${WRKSRC}/include/buildmacros
+ @${REINPLACE_CMD} -e '/#!/s|bash|sh|' \
+ ${WRKSRC}/include/install-sh ${WRKSRC}/install-sh
post-install:
-.for f in xfs_db xfs_growfs xfs_io xfs_logprint xfs_mdrestore xfs_quota xfs_rtcp
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f}
-.endfor
-.for f in xfs_repair mkfs.xfs
+.for f in mkfs.xfs xfs_copy xfs_db xfs_estimate xfs_fsr xfs_growfs xfs_io \
+ xfs_logprint xfs_mdrestore xfs_quota xfs_repair xfs_rtcp
${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/${f}
.endfor
diff --git a/sysutils/xfsprogs/distinfo b/sysutils/xfsprogs/distinfo
index 9f3d60f5a2d8..cbbd873ecf05 100644
--- a/sysutils/xfsprogs/distinfo
+++ b/sysutils/xfsprogs/distinfo
@@ -1,2 +1,3 @@
-SHA256 (xfsprogs_2.9.8-1.tar.gz) = 84e8e32c9b2ead2ce6b97cc11da23f90a825c0593263508e14e0ef3ea4f61dff
-SIZE (xfsprogs_2.9.8-1.tar.gz) = 1003288
+TIMESTAMP = 1438219249
+SHA256 (xfsprogs-3.2.4.tar.gz) = dde65ead82d3cbfa9b4ded9796b6d22095d7d759a22d41ae6f1a4ec458bb0465
+SIZE (xfsprogs-3.2.4.tar.gz) = 1482424
diff --git a/sysutils/xfsprogs/files/patch-Makefile b/sysutils/xfsprogs/files/patch-Makefile
deleted file mode 100644
index fc903794c2b8..000000000000
--- a/sysutils/xfsprogs/files/patch-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.orig 2007-09-10 22:01:13.000000000 -0400
-+++ Makefile 2007-10-18 22:03:47.000000000 -0400
-@@ -16,7 +16,7 @@
- Logs/* built .census install.* install-dev.* *.gz
-
- SUBDIRS = include libxfs libxlog libxcmd libhandle libdisk \
-- copy db fsck growfs io logprint mkfs quota mdrestore repair rtcp \
-+ db fsck growfs io logprint mkfs quota mdrestore repair rtcp \
- m4 man doc po debian build
-
- default: $(CONFIGURE)
diff --git a/sysutils/xfsprogs/files/patch-fsr_xfs__fsr.c b/sysutils/xfsprogs/files/patch-fsr_xfs__fsr.c
new file mode 100644
index 000000000000..2ded0bf3606c
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-fsr_xfs__fsr.c
@@ -0,0 +1,266 @@
+--- fsr/xfs_fsr.c.orig 2015-07-24 04:28:04 UTC
++++ fsr/xfs_fsr.c
+@@ -26,15 +26,13 @@
+
+ #include <fcntl.h>
+ #include <errno.h>
+-#include <malloc.h>
+-#include <mntent.h>
++#include <sys/mount.h>
+ #include <syslog.h>
+ #include <signal.h>
+ #include <sys/ioctl.h>
+ #include <sys/wait.h>
+-#include <sys/vfs.h>
+ #include <sys/statvfs.h>
+-#include <sys/xattr.h>
++#include <sys/extattr.h>
+
+
+ #ifndef XFS_XFLAG_NODEFRAG
+@@ -184,10 +182,13 @@ aborter(int unused)
+ static char *
+ find_mountpoint(char *mtab, char *argname, struct stat64 *sb)
+ {
+- struct mntent *t;
++ struct statfs *t;
+ struct stat64 ms;
+- FILE *mtabp;
+ char *mntp = NULL;
++ int nt;
++
++#ifdef __linux__
++ FILE *mtabp;
+
+ mtabp = setmntent(mtab, "r");
+ if (!mtabp) {
+@@ -195,40 +196,43 @@ find_mountpoint(char *mtab, char *argnam
+ progname, mtab);
+ exit(1);
+ }
++#endif
+
+- while ((t = getmntent(mtabp))) {
++ for (nt = getmntinfo(&t, MNT_NOWAIT); nt--; t++) {
+ if (S_ISDIR(sb->st_mode)) { /* mount point */
+- if (stat64(t->mnt_dir, &ms) < 0)
++ if (stat64(t->f_mntonname, &ms) < 0)
+ continue;
+ if (sb->st_ino != ms.st_ino)
+ continue;
+ if (sb->st_dev != ms.st_dev)
+ continue;
+- if (strcmp(t->mnt_type, MNTTYPE_XFS) != 0)
++ if (strcmp(t->f_fstypename, MNTTYPE_XFS) != 0)
+ continue;
+ } else { /* device */
+ struct stat64 sb2;
+
+- if (stat64(t->mnt_fsname, &ms) < 0)
++ if (stat64(t->f_mntfromname, &ms) < 0)
+ continue;
+ if (sb->st_rdev != ms.st_rdev)
+ continue;
+- if (strcmp(t->mnt_type, MNTTYPE_XFS) != 0)
++ if (strcmp(t->f_fstypename, MNTTYPE_XFS) != 0)
+ continue;
+
+ /*
+ * Make sure the mountpoint given by mtab is accessible
+ * before using it.
+ */
+- if (stat64(t->mnt_dir, &sb2) < 0)
++ if (stat64(t->f_mntonname, &sb2) < 0)
+ continue;
+ }
+
+- mntp = t->mnt_dir;
++ mntp = t->f_mntonname;
+ break;
+ }
+
++#ifdef __linux__
+ endmntent(mtabp);
++#endif
+ return mntp;
+ }
+
+@@ -304,6 +308,7 @@ main(int argc, char **argv)
+ }
+ }
+
++#ifdef __linux__
+ /*
+ * If the user did not specify an explicit mount table, try to use
+ * /proc/mounts if it is available, else /etc/mtab. We prefer
+@@ -317,6 +322,7 @@ main(int argc, char **argv)
+ else
+ mtab = _PATH_MOUNTED;
+ }
++#endif
+
+ if (vflag)
+ setbuf(stdout, NULL);
+@@ -392,7 +398,7 @@ usage(int ret)
+ " -t time How long to run in seconds.\n"
+ " -p passes Number of passes before terminating global re-org.\n"
+ " -f leftoff Use this instead of %s.\n"
+-" -m mtab Use something other than /etc/mtab.\n"
++" -m mtab Use this instead of /etc/mtab (ignored on FreeBSD).\n"
+ " -d Debug, print even more.\n"
+ " -v Verbose, more -v's more verbose.\n"
+ " -V Print version number and exit.\n"
+@@ -406,17 +412,20 @@ usage(int ret)
+ static void
+ initallfs(char *mtab)
+ {
+- FILE *fp;
+- struct mntent *mp;
+- int mi;
++ struct statfs *mp;
++ int mi, nmp;
+ char *cp;
+ struct stat64 sb;
+
++#ifdef __linux__
++ FILE *fp;
++
+ fp = setmntent(mtab, "r");
+ if (fp == NULL) {
+ fsrprintf(_("could not open mtab file: %s\n"), mtab);
+ exit(1);
+ }
++#endif
+
+ /* malloc a number of descriptors, increased later if needed */
+ if (!(fsbase = (fsdesc_t *)malloc(fsbufsize * sizeof(fsdesc_t)))) {
+@@ -428,23 +437,19 @@ initallfs(char *mtab)
+ /* find all rw xfs file systems */
+ mi = 0;
+ fs = fsbase;
+- while ((mp = getmntent(fp))) {
++ for (nmp = getmntinfo(&mp, MNT_NOWAIT); nmp--; mp++) {
+ int rw = 0;
+
+- if (strcmp(mp->mnt_type, MNTTYPE_XFS ) != 0 ||
+- stat64(mp->mnt_fsname, &sb) == -1 ||
++ if (strcmp(mp->f_fstypename, MNTTYPE_XFS ) != 0 ||
++ stat64(mp->f_mntfromname, &sb) == -1 ||
+ !S_ISBLK(sb.st_mode))
+ continue;
+
+- cp = strtok(mp->mnt_opts,",");
+- do {
+- if (strcmp("rw", cp) == 0)
+- rw++;
+- } while ((cp = strtok(NULL, ",")) != NULL);
++ rw = !(mp->f_flags & MNT_RDONLY);
+ if (rw == 0) {
+ if (dflag)
+ fsrprintf(_("Skipping %s: not mounted rw\n"),
+- mp->mnt_fsname);
++ mp->f_mntfromname);
+ continue;
+ }
+
+@@ -464,15 +469,15 @@ initallfs(char *mtab)
+ fs = (fsbase + mi); /* Needed ? */
+ }
+
+- fs->dev = strdup(mp->mnt_fsname);
+- fs->mnt = strdup(mp->mnt_dir);
++ fs->dev = strdup(mp->f_mntfromname);
++ fs->mnt = strdup(mp->f_mntonname);
+
+ if (fs->dev == NULL) {
+- fsrprintf(_("strdup(%s) failed\n"), mp->mnt_fsname);
++ fsrprintf(_("strdup(%s) failed\n"), mp->f_mntfromname);
+ exit(1);
+ }
+ if (fs->mnt == NULL) {
+- fsrprintf(_("strdup(%s) failed\n"), mp->mnt_dir);
++ fsrprintf(_("strdup(%s) failed\n"), mp->f_mntonname);
+ exit(1);
+ }
+ mi++;
+@@ -480,7 +485,9 @@ initallfs(char *mtab)
+ }
+ numfs = mi;
+ fsend = (fsbase + numfs);
++#ifdef __linux__
+ endmntent(fp);
++#endif
+ if (numfs == 0) {
+ fsrprintf(_("no rw xfs file systems in mtab: %s\n"), mtab);
+ exit(0);
+@@ -1027,7 +1034,7 @@ fsr_setup_attr_fork(
+ xfs_bstat_t *bstatp)
+ {
+ struct stat64 tstatbuf;
+- int i;
++ int i, ns;
+ int diff = 0;
+ int last_forkoff = 0;
+ int no_change_cnt = 0;
+@@ -1036,6 +1043,9 @@ fsr_setup_attr_fork(
+ if (!(bstatp->bs_xflags & XFS_XFLAG_HASATTR))
+ return 0;
+
++ if (extattr_string_to_namespace("user", &ns) == -1)
++ return -1;
++
+ /*
+ * use the old method if we have attr1 or the kernel does not yet
+ * support passing the fork offset in the bulkstat data.
+@@ -1043,8 +1053,8 @@ fsr_setup_attr_fork(
+ if (!(fsgeom.flags & XFS_FSOP_GEOM_FLAGS_ATTR2) ||
+ bstatp->bs_forkoff == 0) {
+ /* attr1 */
+- ret = fsetxattr(tfd, "user.X", "X", 1, XATTR_CREATE);
+- if (ret) {
++ ret = extattr_set_fd(tfd, ns, "X", "X", 1);
++ if (ret == -1) {
+ fsrprintf(_("could not set ATTR\n"));
+ return -1;
+ }
+@@ -1085,7 +1095,7 @@ fsr_setup_attr_fork(
+ if (!diff)
+ goto out;
+
+- snprintf(name, sizeof(name), "user.%d", i);
++ snprintf(name, sizeof(name), "%d", i);
+
+ /*
+ * If there is no attribute, then we need to create one to get
+@@ -1093,8 +1103,8 @@ fsr_setup_attr_fork(
+ */
+ if (!tbstat.bs_forkoff) {
+ ASSERT(i == 0);
+- ret = fsetxattr(tfd, name, "XX", 2, XATTR_CREATE);
+- if (ret) {
++ ret = extattr_set_fd(tfd, ns, name, "XX", 2);
++ if (ret == -1) {
+ fsrprintf(_("could not set ATTR\n"));
+ return -1;
+ }
+@@ -1141,7 +1151,8 @@ fsr_setup_attr_fork(
+ if (diff < 0 && fsx.fsx_nextents > 0) {
+ char val[2048];
+ memset(val, 'X', 2048);
+- if (fsetxattr(tfd, name, val, 2048, 0)) {
++ if (extattr_set_fd(tfd, ns, name, val, 2048)
++ == -1) {
+ fsrprintf(_("big ATTR set failed\n"));
+ return -1;
+ }
+@@ -1185,8 +1196,8 @@ fsr_setup_attr_fork(
+ }
+
+ /* we need to grow the attr fork, so create another attr */
+- ret = fsetxattr(tfd, name, "XX", 2, XATTR_CREATE);
+- if (ret) {
++ ret = extattr_set_fd(tfd, ns, name, "XX", 2);
++ if (ret == -1) {
+ fsrprintf(_("could not set ATTR\n"));
+ return -1;
+ }
diff --git a/sysutils/xfsprogs/files/patch-include_freebsd.h b/sysutils/xfsprogs/files/patch-include_freebsd.h
new file mode 100644
index 000000000000..ad56f0bb0f85
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-include_freebsd.h
@@ -0,0 +1,17 @@
+--- include/freebsd.h.orig 2015-07-24 04:28:04 UTC
++++ include/freebsd.h
+@@ -37,10 +37,14 @@
+ #define ftruncate64 ftruncate
+ #define lseek64 lseek
+ #define stat64 stat
++#define lstat64 lstat
+ #define pwrite64 pwrite
+ #define pread64 pread
+ #define fdatasync fsync
+ #define memalign(a,sz) valloc(sz)
++#define nftw64 nftw
++#define statvfs64 statvfs
++#define posix_fadvise64 posix_fadvise
+
+ #define constpp char * const *
+
diff --git a/sysutils/xfsprogs/files/patch-include_libxfs.h b/sysutils/xfsprogs/files/patch-include_libxfs.h
new file mode 100644
index 000000000000..dcdba4925b9a
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-include_libxfs.h
@@ -0,0 +1,10 @@
+--- include/libxfs.h.orig 2015-07-24 04:28:04 UTC
++++ include/libxfs.h
+@@ -27,7 +27,6 @@
+ #include <xfs/list.h>
+ #include <xfs/hlist.h>
+ #include <xfs/cache.h>
+-#include <xfs/bitops.h>
+ #include <xfs/kmem.h>
+ #include <xfs/radix-tree.h>
+ #include <xfs/swab.h>
diff --git a/sysutils/xfsprogs/files/patch-include_list.h b/sysutils/xfsprogs/files/patch-include_list.h
new file mode 100644
index 000000000000..ec1874b585ca
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-include_list.h
@@ -0,0 +1,11 @@
+--- include/list.h.orig 2014-01-20 22:47:46 UTC
++++ include/list.h
+@@ -29,7 +29,7 @@ struct list_head {
+
+ #define LIST_HEAD_INIT(name) { &(name), &(name) }
+
+-#define LIST_HEAD(name) \
++#define XFS_LIST_HEAD(name) \
+ struct list_head name = LIST_HEAD_INIT(name)
+
+ #define INIT_LIST_HEAD(list) list_head_init(list)
diff --git a/sysutils/xfsprogs/files/patch-include_xfs__bit.h b/sysutils/xfsprogs/files/patch-include_xfs__bit.h
new file mode 100644
index 000000000000..768cb386f418
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-include_xfs__bit.h
@@ -0,0 +1,11 @@
+--- include/xfs_bit.h.orig 2015-07-24 04:28:04 UTC
++++ include/xfs_bit.h
+@@ -47,7 +47,7 @@ static inline int xfs_highbit32(__uint32
+ /* Get high bit set out of 64-bit argument, -1 if none set */
+ static inline int xfs_highbit64(__uint64_t v)
+ {
+- return fls64(v) - 1;
++ return flsll(v) - 1;
+ }
+
+ /* Get low bit set out of 32-bit argument, -1 if none set */
diff --git a/sysutils/xfsprogs/files/patch-io_fadvise.c b/sysutils/xfsprogs/files/patch-io_fadvise.c
deleted file mode 100644
index 5413e7c81fee..000000000000
--- a/sysutils/xfsprogs/files/patch-io_fadvise.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- io/fadvise.c.orig 2013-02-18 10:17:09.000000000 +0100
-+++ io/fadvise.c 2013-02-18 10:17:20.000000000 +0100
-@@ -105,7 +105,7 @@
- return command_usage(&fadvise_cmd);
- }
-
-- if (posix_fadvise64(file->fd, offset, length, advise) < 0) {
-+ if (posix_fadvise(file->fd, offset, length, advise) < 0) {
- perror("fadvise");
- return 0;
- }
diff --git a/sysutils/xfsprogs/files/patch-io_mmap.c b/sysutils/xfsprogs/files/patch-io_mmap.c
new file mode 100644
index 000000000000..89fdc3d72548
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-io_mmap.c
@@ -0,0 +1,41 @@
+--- io/mmap.c.orig 2015-07-24 04:28:04 UTC
++++ io/mmap.c
+@@ -575,6 +575,7 @@ mwrite_f(
+ return 0;
+ }
+
++#ifdef __linux__
+ static void
+ mremap_help(void)
+ {
+@@ -634,6 +635,7 @@ mremap_f(
+
+ return 0;
+ }
++#endif
+
+ void
+ mmap_init(void)
+@@ -689,6 +691,7 @@ mmap_init(void)
+ _("writes data into a region in the current memory mapping");
+ mwrite_cmd.help = mwrite_help;
+
++#ifdef __linux__
+ mremap_cmd.name = "mremap";
+ mremap_cmd.altname = "mrm";
+ mremap_cmd.cfunc = mremap_f;
+@@ -699,11 +702,14 @@ mmap_init(void)
+ mremap_cmd.oneline =
+ _("alters the size of the current memory mapping");
+ mremap_cmd.help = mremap_help;
++#endif
+
+ add_command(&mmap_cmd);
+ add_command(&mread_cmd);
+ add_command(&msync_cmd);
+ add_command(&munmap_cmd);
+ add_command(&mwrite_cmd);
++#ifdef __linux__
+ add_command(&mremap_cmd);
++#endif
+ }
diff --git a/sysutils/xfsprogs/files/patch-io_readdir.c b/sysutils/xfsprogs/files/patch-io_readdir.c
new file mode 100644
index 000000000000..b3c1d2968f4f
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-io_readdir.c
@@ -0,0 +1,20 @@
+--- io/readdir.c.orig 2015-07-24 04:28:04 UTC
++++ io/readdir.c
+@@ -72,7 +72,7 @@ dump_dirent(
+ long long offset,
+ struct dirent *dirent)
+ {
+- printf("%08llx: d_ino: 0x%08lx", offset, dirent->d_ino);
++ printf("%08llx: d_ino: 0x%08x", offset, dirent->d_ino);
+ #ifdef _DIRENT_HAVE_D_OFF
+ printf(" d_off: 0x%08lx", dirent->d_off);
+ #endif
+@@ -109,7 +109,7 @@ read_directory(
+
+ if (dump) {
+ dump_dirent(offset, dirent);
+- offset = dirent->d_off;
++ offset = telldir(dir);
+ }
+ }
+
diff --git a/sysutils/xfsprogs/files/patch-libhandle_handle.c b/sysutils/xfsprogs/files/patch-libhandle_handle.c
new file mode 100644
index 000000000000..0ecca06fd629
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-libhandle_handle.c
@@ -0,0 +1,10 @@
+--- libhandle/handle.c.orig 2015-07-24 04:28:04 UTC
++++ libhandle/handle.c
+@@ -23,6 +23,7 @@
+
+ /* just pick a value we know is more than big enough */
+ #define MAXHANSIZ 64
++#define XATTR_LIST_MAX 65536
+
+ /*
+ * The actual content of a handle is supposed to be opaque here.
diff --git a/sysutils/xfsprogs/files/patch-libhandle_jdm.c b/sysutils/xfsprogs/files/patch-libhandle_jdm.c
new file mode 100644
index 000000000000..ef504248d1cb
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-libhandle_jdm.c
@@ -0,0 +1,11 @@
+--- libhandle/jdm.c.orig 2015-07-24 04:28:04 UTC
++++ libhandle/jdm.c
+@@ -21,6 +21,8 @@
+ #include <xfs/jdm.h>
+ #include <xfs/parent.h>
+
++#define XATTR_LIST_MAX 65536
++
+ /* internal fshandle - typecast to a void for external use */
+ #define FSHANDLE_SZ 8
+ typedef struct fshandle {
diff --git a/sysutils/xfsprogs/files/patch-libxcmd_paths.c b/sysutils/xfsprogs/files/patch-libxcmd_paths.c
new file mode 100644
index 000000000000..59037da27541
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-libxcmd_paths.c
@@ -0,0 +1,11 @@
+--- libxcmd/paths.c.orig 2015-07-24 04:28:04 UTC
++++ libxcmd/paths.c
+@@ -364,7 +364,7 @@ fs_table_initialise_mounts(
+ continue;
+ if (!realpath(stats[i].f_mntfromname, rmntfromname))
+ continue;
+- if (!realpath(stats[i].f_mntonname, rmnttomname)))
++ if (!realpath(stats[i].f_mntonname, rmntonname))
+ continue;
+
+ if (path &&
diff --git a/sysutils/xfsprogs/files/patch-libxfs_crc32.c b/sysutils/xfsprogs/files/patch-libxfs_crc32.c
new file mode 100644
index 000000000000..32f53647b5d6
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-libxfs_crc32.c
@@ -0,0 +1,10 @@
+--- libxfs/crc32.c.orig 2015-07-24 04:28:04 UTC
++++ libxfs/crc32.c
+@@ -33,6 +33,7 @@
+ * match the hardware acceleration available on Intel CPUs.
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "crc32defs.h"
+
diff --git a/sysutils/xfsprogs/files/patch-libxfs_rdwr.c b/sysutils/xfsprogs/files/patch-libxfs_rdwr.c
new file mode 100644
index 000000000000..d89bf99c7ee7
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-libxfs_rdwr.c
@@ -0,0 +1,19 @@
+--- libxfs/rdwr.c.orig 2015-07-24 04:28:04 UTC
++++ libxfs/rdwr.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <xfs/libxfs.h>
+ #include "init.h"
+
+@@ -371,7 +372,7 @@ libxfs_bcompare(struct cache_node *node,
+ #ifdef IO_BCOMPARE_CHECK
+ if (!(libxfs_bcache->c_flags & CACHE_MISCOMPARE_PURGE)) {
+ fprintf(stderr,
+- "%lx: Badness in key lookup (length)\n"
++ "%p: Badness in key lookup (length)\n"
+ "bp=(bno 0x%llx, len %u bytes) key=(bno 0x%llx, len %u bytes)\n",
+ pthread_self(),
+ (unsigned long long)bp->b_bn, (int)bp->b_bcount,
diff --git a/sysutils/xfsprogs/files/patch-libxfs_util.c b/sysutils/xfsprogs/files/patch-libxfs_util.c
new file mode 100644
index 000000000000..cb15c74f5518
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-libxfs_util.c
@@ -0,0 +1,10 @@
+--- libxfs/util.c.orig 2015-07-24 04:28:04 UTC
++++ libxfs/util.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <xfs.h>
+ #include <time.h>
+ #include <stdio.h>
diff --git a/sysutils/xfsprogs/files/patch-libxfs_xfs__attr__remote.c b/sysutils/xfsprogs/files/patch-libxfs_xfs__attr__remote.c
new file mode 100644
index 000000000000..969d1bdf444a
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-libxfs_xfs__attr__remote.c
@@ -0,0 +1,10 @@
+--- libxfs/xfs_attr_remote.c.orig 2015-07-24 04:28:04 UTC
++++ libxfs/xfs_attr_remote.c
+@@ -19,6 +19,7 @@
+ #include <xfs.h>
+
+ #define ATTR_RMTVALUE_MAPSIZE 1 /* # of map entries at once */
++#define XATTR_SIZE_MAX 65536
+
+ /*
+ * Each contiguous block has a header, so it is not just a simple attribute
diff --git a/sysutils/xfsprogs/files/patch-libxlog_util.c b/sysutils/xfsprogs/files/patch-libxlog_util.c
new file mode 100644
index 000000000000..b937946d7f44
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-libxlog_util.c
@@ -0,0 +1,10 @@
+--- libxlog/util.c.orig 2015-07-28 23:02:16 UTC
++++ libxlog/util.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <xfs/libxlog.h>
+
+ int print_exit;
diff --git a/sysutils/xfsprogs/files/patch-repair_agheader.c b/sysutils/xfsprogs/files/patch-repair_agheader.c
new file mode 100644
index 000000000000..d0d0f14ea0a6
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_agheader.c
@@ -0,0 +1,10 @@
+--- repair/agheader.c.orig 2015-07-24 04:28:04 UTC
++++ repair/agheader.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "globals.h"
+ #include "agheader.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_attr__repair.c b/sysutils/xfsprogs/files/patch-repair_attr__repair.c
new file mode 100644
index 000000000000..6ea276ef3e88
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_attr__repair.c
@@ -0,0 +1,10 @@
+--- repair/attr_repair.c.orig 2015-07-24 04:28:04 UTC
++++ repair/attr_repair.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "globals.h"
+ #include "err_protos.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_attr__repair.h b/sysutils/xfsprogs/files/patch-repair_attr__repair.h
new file mode 100644
index 000000000000..a707272c7413
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_attr__repair.h
@@ -0,0 +1,10 @@
+--- repair/attr_repair.h.orig 2015-07-24 04:28:04 UTC
++++ repair/attr_repair.h
+@@ -71,6 +71,7 @@ struct xfs_acl {
+ * For v4 superblocks, that is limited to 25 entries. For v5 superblocks, it is
+ * limited only by the maximum size of the xattr that stores the information.
+ */
++#define XATTR_SIZE_MAX 65536
+ #define XFS_ACL_MAX_ENTRIES(mp) \
+ (xfs_sb_version_hascrc(&mp->m_sb) \
+ ? (XATTR_SIZE_MAX - sizeof(struct xfs_acl)) / \
diff --git a/sysutils/xfsprogs/files/patch-repair_bmap.c b/sysutils/xfsprogs/files/patch-repair_bmap.c
new file mode 100644
index 000000000000..754e1d435384
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_bmap.c
@@ -0,0 +1,10 @@
+--- repair/bmap.c.orig 2015-07-24 04:28:04 UTC
++++ repair/bmap.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "err_protos.h"
+ #include "bmap.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_dino__chunks.c b/sysutils/xfsprogs/files/patch-repair_dino__chunks.c
new file mode 100644
index 000000000000..e99a31e860bc
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_dino__chunks.c
@@ -0,0 +1,10 @@
+--- repair/dino_chunks.c.orig 2015-07-24 04:28:04 UTC
++++ repair/dino_chunks.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "avl.h"
+ #include "globals.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_dinode.c b/sysutils/xfsprogs/files/patch-repair_dinode.c
new file mode 100644
index 000000000000..681657d22168
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_dinode.c
@@ -0,0 +1,10 @@
+--- repair/dinode.c.orig 2015-07-24 04:28:04 UTC
++++ repair/dinode.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "avl.h"
+ #include "globals.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_dir2.c b/sysutils/xfsprogs/files/patch-repair_dir2.c
new file mode 100644
index 000000000000..9056ade2151f
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_dir2.c
@@ -0,0 +1,10 @@
+--- repair/dir2.c.orig 2015-07-24 04:28:04 UTC
++++ repair/dir2.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "avl.h"
+ #include "globals.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_incore.c b/sysutils/xfsprogs/files/patch-repair_incore.c
new file mode 100644
index 000000000000..97637a572c82
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_incore.c
@@ -0,0 +1,10 @@
+--- repair/incore.c.orig 2015-07-24 04:28:04 UTC
++++ repair/incore.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "avl.h"
+ #include "btree.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_phase2.c b/sysutils/xfsprogs/files/patch-repair_phase2.c
new file mode 100644
index 000000000000..6a3b7ecda94b
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_phase2.c
@@ -0,0 +1,10 @@
+--- repair/phase2.c.orig 2015-07-28 23:02:16 UTC
++++ repair/phase2.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <xfs/libxlog.h>
+ #include "avl.h"
+ #include "globals.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_phase3.c b/sysutils/xfsprogs/files/patch-repair_phase3.c
new file mode 100644
index 000000000000..3d5de760b8b7
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_phase3.c
@@ -0,0 +1,10 @@
+--- repair/phase3.c.orig 2015-07-24 04:28:04 UTC
++++ repair/phase3.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "threads.h"
+ #include "prefetch.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_phase4.c b/sysutils/xfsprogs/files/patch-repair_phase4.c
new file mode 100644
index 000000000000..6e8aa7c5ebac
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_phase4.c
@@ -0,0 +1,10 @@
+--- repair/phase4.c.orig 2015-07-24 04:28:04 UTC
++++ repair/phase4.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "threads.h"
+ #include "prefetch.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_phase6.c b/sysutils/xfsprogs/files/patch-repair_phase6.c
new file mode 100644
index 000000000000..6285609ca09b
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_phase6.c
@@ -0,0 +1,19 @@
+--- repair/phase6.c.orig 2015-07-24 04:28:04 UTC
++++ repair/phase6.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "threads.h"
+ #include "prefetch.h"
+@@ -49,7 +50,7 @@ typedef struct dotdot_update {
+ int ino_offset;
+ } dotdot_update_t;
+
+-static LIST_HEAD(dotdot_update_list);
++static XFS_LIST_HEAD(dotdot_update_list);
+ static int dotdot_update;
+
+ static void
diff --git a/sysutils/xfsprogs/files/patch-repair_phase7.c b/sysutils/xfsprogs/files/patch-repair_phase7.c
new file mode 100644
index 000000000000..a89d928ac70e
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_phase7.c
@@ -0,0 +1,10 @@
+--- repair/phase7.c.orig 2015-07-24 04:28:04 UTC
++++ repair/phase7.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "avl.h"
+ #include "globals.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_progress.c b/sysutils/xfsprogs/files/patch-repair_progress.c
new file mode 100644
index 000000000000..eb0d4c92c28c
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_progress.c
@@ -0,0 +1,8 @@
+--- repair/progress.c.orig 2015-07-24 04:28:04 UTC
++++ repair/progress.c
+@@ -1,4 +1,5 @@
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "globals.h"
+ #include "progress.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_sb.c b/sysutils/xfsprogs/files/patch-repair_sb.c
new file mode 100644
index 000000000000..c2a88d67f7c6
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_sb.c
@@ -0,0 +1,10 @@
+--- repair/sb.c.orig 2015-07-24 04:28:04 UTC
++++ repair/sb.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include <libxlog.h>
+ #include "agheader.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_scan.c b/sysutils/xfsprogs/files/patch-repair_scan.c
new file mode 100644
index 000000000000..0c439a6808db
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_scan.c
@@ -0,0 +1,10 @@
+--- repair/scan.c.orig 2015-07-24 04:28:04 UTC
++++ repair/scan.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <libxfs.h>
+ #include "avl.h"
+ #include "globals.h"
diff --git a/sysutils/xfsprogs/files/patch-repair_xfs__repair.c b/sysutils/xfsprogs/files/patch-repair_xfs__repair.c
new file mode 100644
index 000000000000..5a3524a572c2
--- /dev/null
+++ b/sysutils/xfsprogs/files/patch-repair_xfs__repair.c
@@ -0,0 +1,10 @@
+--- repair/xfs_repair.c.orig 2015-07-24 04:28:04 UTC
++++ repair/xfs_repair.c
+@@ -16,6 +16,7 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <inttypes.h>
+ #include <xfs/libxlog.h>
+ #include <sys/resource.h>
+ #include "avl.h"
diff --git a/sysutils/xfsprogs/pkg-plist b/sysutils/xfsprogs/pkg-plist
index eac8dd2adcfa..7472a3a1b702 100644
--- a/sysutils/xfsprogs/pkg-plist
+++ b/sysutils/xfsprogs/pkg-plist
@@ -1,27 +1,15 @@
-bin/xfs_admin
-bin/xfs_db
-bin/xfs_check
-bin/xfs_ncheck
-bin/xfs_freeze
-bin/xfs_growfs
-bin/xfs_info
-bin/xfs_io
-bin/xfs_bmap
-bin/xfs_logprint
-bin/xfs_mdrestore
-bin/xfs_mkfile
-bin/xfs_metadump
-bin/xfs_quota
-bin/xfs_rtcp
+man/man5/projects.5.gz
+man/man5/projid.5.gz
man/man5/xfs.5.gz
man/man8/fsck.xfs.8.gz
man/man8/mkfs.xfs.8.gz
man/man8/xfs_admin.8.gz
man/man8/xfs_bmap.8.gz
-man/man8/xfs_check.8.gz
man/man8/xfs_copy.8.gz
man/man8/xfs_db.8.gz
+man/man8/xfs_estimate.8.gz
man/man8/xfs_freeze.8.gz
+man/man8/xfs_fsr.8.gz
man/man8/xfs_growfs.8.gz
man/man8/xfs_info.8.gz
man/man8/xfs_io.8.gz
@@ -35,9 +23,26 @@ man/man8/xfs_repair.8.gz
man/man8/xfs_rtcp.8.gz
sbin/fsck.xfs
sbin/mkfs.xfs
+sbin/xfs_admin
+sbin/xfs_bmap
+sbin/xfs_copy
+sbin/xfs_db
+sbin/xfs_estimate
+sbin/xfs_freeze
+sbin/xfs_fsr
+sbin/xfs_growfs
+sbin/xfs_info
+sbin/xfs_io
+sbin/xfs_logprint
+sbin/xfs_mdrestore
+sbin/xfs_metadump
+sbin/xfs_mkfile
+sbin/xfs_ncheck
+sbin/xfs_quota
sbin/xfs_repair
+sbin/xfs_rtcp
+share/locale/de/LC_MESSAGES/xfsprogs.mo
share/locale/pl/LC_MESSAGES/xfsprogs.mo
-%%PORTDOCS%%%%DOCSDIR%%/PORTING
%%PORTDOCS%%%%DOCSDIR%%/CHANGES.gz
%%PORTDOCS%%%%DOCSDIR%%/CREDITS
%%PORTDOCS%%%%DOCSDIR%%/COPYING