diff options
Diffstat (limited to 'repo/xfsprogs')
-rw-r--r-- | repo/xfsprogs/fix-mmap.patch | 32 | ||||
-rw-r--r-- | repo/xfsprogs/missing-signal.h.patch | 12 | ||||
-rw-r--r-- | repo/xfsprogs/xfsprogs.xibuild | 40 |
3 files changed, 84 insertions, 0 deletions
diff --git a/repo/xfsprogs/fix-mmap.patch b/repo/xfsprogs/fix-mmap.patch new file mode 100644 index 0000000..d0740f6 --- /dev/null +++ b/repo/xfsprogs/fix-mmap.patch @@ -0,0 +1,32 @@ +diff --git a/io/mmap.c b/io/mmap.c +index f9383e5..12f3fff 100644 +--- a/io/mmap.c ++++ b/io/mmap.c +@@ -4,10 +4,10 @@ + * All Rights Reserved. + */ + +-#include "command.h" +-#include "input.h" + #include <sys/mman.h> + #include <signal.h> ++#include "command.h" ++#include "input.h" + #include "init.h" + #include "io.h" + +@@ -20,6 +20,14 @@ static cmdinfo_t mwrite_cmd; + static cmdinfo_t mremap_cmd; + #endif /* HAVE_MREMAP */ + ++#ifndef HAVE_MAP_SYNC ++#define MAP_SYNC 0 ++#define MAP_SHARED_VALIDATE 0 ++#else ++#include <asm-generic/mman.h> ++#include <asm-generic/mman-common.h> ++#endif /* HAVE_MAP_SYNC */ ++ + mmap_region_t *maptable; + int mapcount; + mmap_region_t *mapping; diff --git a/repo/xfsprogs/missing-signal.h.patch b/repo/xfsprogs/missing-signal.h.patch new file mode 100644 index 0000000..9ce7314 --- /dev/null +++ b/repo/xfsprogs/missing-signal.h.patch @@ -0,0 +1,12 @@ +diff --git a/include/linux.h b/include/linux.h +index 7bf59e0..ee25ec9 100644 +--- a/include/linux.h ++++ b/include/linux.h +@@ -21,6 +21,7 @@ + #include <asm/types.h> + #include <mntent.h> + #include <fcntl.h> ++#include <signal.h> /* For SIGKILL */ + #if defined(HAVE_FALLOCATE) + #include <linux/falloc.h> + #endif diff --git a/repo/xfsprogs/xfsprogs.xibuild b/repo/xfsprogs/xfsprogs.xibuild new file mode 100644 index 0000000..08812da --- /dev/null +++ b/repo/xfsprogs/xfsprogs.xibuild @@ -0,0 +1,40 @@ +#!/bin/sh + +NAME="xfsprogs" +DESC="XFS filesystem utilities" + +MAKEDEPS="attr bash gzip inih linux-headers python userspace-rcu util-linux" + +PKG_VER=5.15.0 +SOURCE="https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-$PKG_VER.tar.gz" + +ADDITIONAL=" +fix-mmap.patch +missing-signal.h.patch +" + +prepare () { + apply_patches +} + +build() { + export DEBUG=-DNDEBUG + export OPTIMIZER="$CFLAGS" + ./configure \ + --prefix=/usr \ + --sbindir=/sbin \ + --libexecdir=/usr/lib \ + --enable-gettext=no + make SHELL=/bin/bash +} + +package() { + make -j1 DIST_ROOT="$PKG_DEST" install install-dev + find "$PKG_DEST" -name *.la -delete + mv "$PKG_DEST"/sbin "$PKG_DEST"/usr + mkdir -p "$PKG_DEST"/sbin + for i in mkfs.xfs fsck.xfs xfs_repair; do + mv "$PKG_DEST"/usr/sbin/$i "$PKG_DEST"/sbin/ + done + chown -R root:root "$PKG_DEST"/* +} |