python3-grpcio: Fix build on musl
PATCH 1/2 python3-grpcio: Fix build on musl
Use off_t instead of deprecated off64_t LFS interface makes it portable across musl and glibc
Signed-off-by Khem Raj <[email protected]>
--- .../0001-direct_mmap-Use-off_t-on-linux.patch | 42 +++++++++++++++++++ .../python/python3-grpcio_1.56.0.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch
meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 45fdade6c0415ec5af3f9312e6311a4ccc682a7b Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 28 Dec 2022 18:24:21 -0800 +Subject: [PATCH] direct_mmap: Use off_t on linux + +off64_t is not provided without defining _LARGEFILE64_SOURCE on musl +this define is not defined automatically like glibc where it gets +defined when _GNU_SOURCE is defined. Using off_t makes it portable +across musl/glibc and for using 64bit off_t on glibc 32bit systems +-D_FILE_OFFSET_BITS=64 can be defined during build via CXXFLAGS + +Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/1349] +Signed-off-by: Khem Raj <[email protected]> +--- + absl/base/internal/direct_mmap.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h +index 815b8d23..fdf88f0b 100644 +--- a/absl/base/internal/direct_mmap.h ++++ b/absl/base/internal/direct_mmap.h +@@ -72,7 +72,7 @@ namespace base_internal { + // Platform specific logic extracted from + // https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h + inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, +- off64_t offset) noexcept { ++ off_t offset) noexcept { + #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \ + defined(__m68k__) || defined(__sh__) || \ + (defined(__hppa__) && !defined(__LP64__)) || \ +@@ -102,7 +102,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, + #else + return reinterpret_cast<void*>( + syscall(SYS_mmap2, start, length, prot, flags, fd, +- static_cast<off_t>(offset / pagesize))); ++ offset / pagesize)); + #endif + #elif defined(__s390x__) + // On s390x, mmap() arguments are passed in memory. +-- +2.39.0 +
meta-python/recipes-devtools/python/python3-grpcio_1.56.0.bb +1 -0
@@ -11,6 +11,7 @@ SRC_URI:append:class-target = " file://ppc-boringssl-support.patch \ file://mips_bigendian.patch \ file://0001-Include-missing-cstdint-header.patch \ file://abseil-ppc-fixes.patch;patchdir=third_party/abseil-cpp \ + file://0001-direct_mmap-Use-off_t-on-linux.patch;patchdir=third_party/abseil-cpp \ file://0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch \ " SRC_URI[sha256sum] = "4c08ee21b3d10315b8dc26f6c13917b20ed574cdbed2d2d80c53d5508fdcc0f2"
Signature · 1 line
2.41.0
PATCH 2/2 thin-provisioning-tools: Upgrade to 1.0.4
This version is written in rust, therefore re-write the recipe
Signed-off-by Khem Raj <[email protected]>
--- ...-not-strip-pdata_tools-at-do_install.patch | 33 -- .../files/use-sh-on-path.patch | 34 -- .../thin-provisioning-tools-crates.inc | 306 ++++++++++++++++++ .../thin-provisioning-tools-git-crates.inc | 10 + .../thin-provisioning-tools_0.9.0.bb | 21 -- .../thin-provisioning-tools_1.0.4.bb | 45 +++ 6 files changed, 361 insertions(+), 88 deletions(-) delete mode 100644 meta-oe/recipes-support/thin-provisioning-tools/files/0001-do-not-strip-pdata_tools-at-do_install.patch delete mode 100644 meta-oe/recipes-support/thin-provisioning-tools/files/use-sh-on-path.patch create mode 100644 meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools-crates.inc create mode 100644 meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools-git-crates.inc delete mode 100644 meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_0.9.0.bb create mode 100644 meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.4.bb
meta-oe/recipes-support/thin-provisioning-tools/files/0001-do-not-strip-pdata_tools-at-do_install.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From de869ad2cb19d81257a159770ebe27593a71593c Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <[email protected]> -Date: Tue, 31 Jul 2018 11:29:51 +0800 -Subject: [PATCH] do not strip pdata_tools at do_install - -It caused QA Issue: --------------- -|ERROR: QA Issue: File '/usr/sbin/pdata_tools' from thin-provisioning-tools -was already stripped, this will prevent future debugging! [already-stripped] --------------- - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <[email protected]> ---- - Makefile.in | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/Makefile.in b/Makefile.in -index 02b75dd..df590b4 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -267,7 +267,6 @@ MANPAGES:=$(patsubst %,man8/%.8,$(TOOLS)) - install: bin/pdata_tools $(MANPAGES) - $(INSTALL_DIR) $(BINDIR) - $(INSTALL_PROGRAM) bin/pdata_tools $(BINDIR) -- $(STRIP) $(BINDIR)/pdata_tools - ln -s -f pdata_tools $(BINDIR)/cache_check - ln -s -f pdata_tools $(BINDIR)/cache_dump - ln -s -f pdata_tools $(BINDIR)/cache_metadata_size --- -2.7.4 -
meta-oe/recipes-support/thin-provisioning-tools/files/use-sh-on-path.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 38397b42e2c3450c2aee20e6fb92f362db4e35ef Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <[email protected]> -Date: Tue, 2 Jul 2019 13:20:39 +0800 -Subject: [PATCH] thin-provisioning-tools: use sh on path when invoking txt2man - -txt2man contains a test which might try to use ksh to run the script, so we -avoid running /bin/sh. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: joe.slater <[email protected]> - -Rebase to 0.8.5 -Signed-off-by: Hongxu Jia <[email protected]> ---- - Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.in b/Makefile.in -index 7c867b2..5303994 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -223,7 +223,7 @@ endif - %.8: %.txt bin/txt2man - @echo " [txt2man] $<" - @mkdir -p $(dir $@) -- $(V) bin/txt2man -p -t $(basename $(notdir $<)) $< > $@ -+ $(V) sh bin/txt2man -p -t $(basename $(notdir $<)) $< > $@ - - #---------------------------------------------------------------- - --- -2.7.4 -
meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools-crates.inc new file +306 -0
306 lines not on this page · raw message
meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools-git-crates.inc new file +10 -0
@@ -0,0 +1,10 @@ +SRC_URI += "\ + git://github.com/zowens/crc32c;protocol=https;nobranch=1;name=crc32c;destsuffix=crc32c;type=git-dependency \ + git://github.com/jthornber/rio;protocol=https;nobranch=1;name=rio;destsuffix=rio;type=git-dependency \ +" + +SRCREV_FORMAT .= "_crc32c" +SRCREV_crc32c = "3779fe88fea034922f808586b2564fbcab31efdc" + +SRCREV_FORMAT .= "_rio" +SRCREV_rio = "2979a720f671e836302c01546f9cc9f7988610c8"
meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_0.9.0.bb deleted +0 -21
@@ -1,21 +0,0 @@ -SUMMARY = "Tools of dm-thin device-mapper" -DESCRIPTION = "A suite of tools for manipulating the metadata of the dm-thin device-mapper target." -HOMEPAGE = "https://github.com/jthornber/thin-provisioning-tools" -LICENSE = "GPL-3.0-only" -SECTION = "devel" - -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -S = "${WORKDIR}/git" - -SRC_URI = "git://github.com/jthornber/thin-provisioning-tools;branch=main;protocol=https \ - file://0001-do-not-strip-pdata_tools-at-do_install.patch \ - file://use-sh-on-path.patch \ -" - -SRCREV = "d6d93c3157631b242a13a81d30f75453e576c55a" - -UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" - -DEPENDS += "expat libaio boost" - -inherit autotools-brokensep
meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.4.bb new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
2.41.0