From e03cb81023c93697fa249dbfe079fb40e9bf20b7 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Tue, 4 Jul 2017 08:52:12 +0200 Subject: xfsprogs: 4.11.0 with build time fix Pull later xfsprogs 4.11.0 from meta-filesystems required by snapd from meta-snappy: http://cgit.openembedded.org/meta-openembedded/commit/meta-filesystems/recipes-utils/xfsprogs?id=d53546b7cb38e0dfea6f458859f7f477065daa43 This already incorporates the following fix as reported by our customer: https://patchwork.openembedded.org/patch/141247/ Reported-by: Carlos Silvestre Herrera Trujillo Signed-off-by: Marcel Ziswiler --- ...fine-__-prefixed-version-of-intXY_t-types.patch | 58 +++++++++++++++ .../xfsprogs/files/link_needed_libs.patch | 82 ++++++++++++++++++++++ recipes-utils/xfsprogs/xfsprogs_4.11.0.bb | 61 ++++++++++++++++ 3 files changed, 201 insertions(+) create mode 100644 recipes-utils/xfsprogs/files/0001-define-__-prefixed-version-of-intXY_t-types.patch create mode 100644 recipes-utils/xfsprogs/files/link_needed_libs.patch create mode 100644 recipes-utils/xfsprogs/xfsprogs_4.11.0.bb diff --git a/recipes-utils/xfsprogs/files/0001-define-__-prefixed-version-of-intXY_t-types.patch b/recipes-utils/xfsprogs/files/0001-define-__-prefixed-version-of-intXY_t-types.patch new file mode 100644 index 0000000..951a144 --- /dev/null +++ b/recipes-utils/xfsprogs/files/0001-define-__-prefixed-version-of-intXY_t-types.patch @@ -0,0 +1,58 @@ +From 2b4714123cdecb558babb76074d0ab945bf5b177 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 16 Jun 2017 18:59:10 -0700 +Subject: [PATCH] define __ prefixed version of intXY_t types + +This is required since musl does not define them +unlike glibc + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + include/linux.h | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/include/linux.h b/include/linux.h +index 6a676ca..6976d83 100644 +--- a/include/linux.h ++++ b/include/linux.h +@@ -40,6 +40,35 @@ + # undef fsxattr + #endif + ++#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 __inline__ int xfsctl(const char *path, int fd, int cmd, void *p) + { + return ioctl(fd, cmd, p); +-- +2.13.1 + diff --git a/recipes-utils/xfsprogs/files/link_needed_libs.patch b/recipes-utils/xfsprogs/files/link_needed_libs.patch new file mode 100644 index 0000000..1de634e --- /dev/null +++ b/recipes-utils/xfsprogs/files/link_needed_libs.patch @@ -0,0 +1,82 @@ +Index: xfsprogs-4.10.0/libxcmd/Makefile +=================================================================== +--- xfsprogs-4.10.0.orig/libxcmd/Makefile ++++ xfsprogs-4.10.0/libxcmd/Makefile +@@ -30,10 +30,21 @@ LCFLAGS += -DENABLE_EDITLINE + LTLIBS += $(LIBEDITLINE) $(LIBTERMCAP) + endif + ++ifeq ($(ENABLE_BLKID),yes) ++LCFLAGS += -DENABLE_BLKID ++LTLIBS += $(LIBBLKID) ++endif ++ ++LTLIBS += $(LIBXFS) ++ + default: ltdepend $(LTLIBRARY) + + include $(BUILDRULES) + +-install install-dev: default ++install: default ++ $(INSTALL_LTLIB) ++ ++install-dev: default ++ $(INSTALL_LTLIB_DEV) + + -include .ltdep +Index: xfsprogs-4.10.0/libxfs/Makefile +=================================================================== +--- xfsprogs-4.10.0.orig/libxfs/Makefile ++++ xfsprogs-4.10.0/libxfs/Makefile +@@ -137,6 +137,7 @@ include $(BUILDRULES) + + install: default + $(INSTALL) -m 755 -d $(PKG_INC_DIR) ++ $(INSTALL_LTLIB) + + install-headers: $(addsuffix -hdrs, $(PKGHFILES)) + +Index: xfsprogs-4.10.0/libxlog/Makefile +=================================================================== +--- xfsprogs-4.10.0.orig/libxlog/Makefile ++++ xfsprogs-4.10.0/libxlog/Makefile +@@ -19,6 +19,10 @@ default: ltdepend $(LTLIBRARY) + + include $(BUILDRULES) + +-install install-dev: default ++install: default ++ $(INSTALL_LTLIB) ++ ++install-dev: default ++ $(INSTALL_LTLIB_DEV) + + -include .ltdep +Index: xfsprogs-4.10.0/io/Makefile +=================================================================== +--- xfsprogs-4.10.0.orig/io/Makefile ++++ xfsprogs-4.10.0/io/Makefile +@@ -13,7 +13,7 @@ + getrusage.c imap.c link.c mmap.c open.c parent.c pread.c prealloc.c \ + pwrite.c reflink.c seek.c shutdown.c sync.c truncate.c utimes.c + +-LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBPTHREAD) ++LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBUUID) $(LIBPTHREAD) + LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE) + LLDFLAGS = -static-libtool-libs + +Index: xfsprogs-4.10.0/quota/Makefile +=================================================================== +--- xfsprogs-4.10.0.orig/quota/Makefile ++++ xfsprogs-4.10.0/quotq/Makefile +@@ -14,7 +14,7 @@ + PCFILES = darwin.c freebsd.c irix.c linux.c + LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g") + +-LLDLIBS = $(LIBXCMD) ++LLDLIBS = $(LIBXCMD) $(LIBUUID) + LTDEPENDENCIES = $(LIBXCMD) + LLDFLAGS = -static + + diff --git a/recipes-utils/xfsprogs/xfsprogs_4.11.0.bb b/recipes-utils/xfsprogs/xfsprogs_4.11.0.bb new file mode 100644 index 0000000..046dea4 --- /dev/null +++ b/recipes-utils/xfsprogs/xfsprogs_4.11.0.bb @@ -0,0 +1,61 @@ +SUMMARY = "XFS Filesystem Utilities" +HOMEPAGE = "http://oss.sgi.com/projects/xfs" +SECTION = "base" +LICENSE = "GPLv2 & LGPLv2.1" +LICENSE_libhandle = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=102f7fec3d53c7c8f0b7baf9bf9d76a8" +DEPENDS = "util-linux util-linux-native" +SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/${BP}.tar.xz \ + file://link_needed_libs.patch \ + file://0001-define-__-prefixed-version-of-intXY_t-types.patch \ + " +SRC_URI[md5sum] = "f1f9b8c752347eefdb56483dafa0cefb" +SRC_URI[sha256sum] = "c3a6d87b564d7738243c507df82276bed982265e345363a95f2c764e8a5f5bb2" + +inherit autotools-brokensep + +PACKAGES =+ "${PN}-fsck ${PN}-mkfs ${PN}-repair libhandle" + +DEPENDS += "util-linux" + +RDEPENDS_${PN} = "${PN}-fsck ${PN}-mkfs ${PN}-repair" + +FILES_${PN}-fsck = "${base_sbindir}/fsck.xfs" +FILES_${PN}-mkfs = "${base_sbindir}/mkfs.xfs" +FILES_${PN}-repair = "${base_sbindir}/xfs_repair" + +FILES_libhandle = "${base_libdir}/libhandle${SOLIBS}" + +EXTRA_OECONF = "--enable-gettext=no \ + INSTALL_USER=root \ + INSTALL_GROUP=root \ + ac_cv_header_aio_h=yes \ + ac_cv_lib_rt_lio_listio=yes \ +" + +EXTRA_AUTORECONF += "-I ${S}/m4 --exclude=autoheader" + +PACKAGECONFIG ??= "readline blkid" + +PACKAGECONFIG[readline] = "--enable-readline=yes,--enable-readline=no,readline" +PACKAGECONFIG[blkid] = "--enable-blkid=yes,--enable-blkid=no,util-linux" + +export DEBUG="-DNDEBUG" +export BUILD_VERBOSE="1" + +EXTRA_OEMAKE = "DIST_ROOT='${D}'" + +do_configure_prepend () { + export BUILD_CC="${BUILD_CC} ${BUILD_CFLAGS}" + # Prevent Makefile from calling configure without arguments, + # when do_configure gets called for a second time. + rm -f ${B}/include/builddefs ${B}/include/platform_defs.h ${B}/configure + # Recreate configure script. + oe_runmake configure +} + +do_install_append() { + oe_runmake 'DESTDIR=${D}' install-dev + rm ${D}${libdir}/*.la + rmdir --ignore-fail-on-non-empty ${D}${libdir} +} -- cgit v1.2.3