libtorrent: Upgrade to 0.16.1

Fix a m4 script bug
Drop CVE_STATUS since this is only needed for < 0.14 release
Enable using posix_fallocate when creating a new file to avoid fragmentation

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2025-10-24 08:59:40 -07:00
parent cf99ab2d8c
commit 86b56782fe
2 changed files with 50 additions and 7 deletions

View File

@ -0,0 +1,45 @@
From 9df2559d55c454c7128b65103456c2f88b3bf2f5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 24 Oct 2025 08:45:02 -0700
Subject: [PATCH] scripts/common.m4: Insert spaces in shell lists
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
$1=$(echo "$result" | tr -d '\n')
removes all newlines without inserting spaces
That usually isnt what we want for shell lists.
It should typically be space-separated output.
Fixes a bug seen with yocto where compiler is not a single word
but a string e.g.
ccache aarch64-yoe-linux-musl-clang++ -mcpu=cortex-a72+crc+nocrypto --dyld-prefix=/usr -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/libtorrent/0.16.1/recipe-sysroot
It changes it to
ccacheaarch64-yoe-linux-musl-clang++-mcpu=cortex-a72+crc+nocrypto--dyld-prefix=/usr-fstack-protector-strong-O2-D_FORTIFY_SOURCE=2-Wformat-Wformat-security-Werror=format-security--sysroot=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/libtorrent/0.16.1/recipe-sysroot
When doing c++17 checks on compiler, resulting in failure
Upstream-Status: Submitted [https://github.com/rakshasa/libtorrent/pull/583]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
scripts/common.m4 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/common.m4 b/scripts/common.m4
index 74b99e6a..44a5fe65 100644
--- a/scripts/common.m4
+++ b/scripts/common.m4
@@ -30,7 +30,8 @@ AC_DEFUN([TORRENT_REMOVE_UNWANTED],
$1="$2"
else
result=`echo "${values_to_check}" | $GREP -Fvx -- "${unwanted_values}" | $GREP -v '^$'`
- $1=$(echo "$result" | tr -d '\n')
+ # join with spaces, squeeze repeats, and trim trailing space
+ $1=$(printf '%s\n' "$result" | tr '\n' ' ' | sed 's/ */ /g; s/ *$//')
fi
])

View File

@ -4,16 +4,14 @@ HOMEPAGE = "http://libtorrent.rakshasa.no/"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
DEPENDS = "zlib libsigc++-2.0 openssl cppunit"
DEPENDS = "zlib curl libsigc++-2.0 openssl cppunit"
SRC_URI = "git://github.com/rakshasa/libtorrent;branch=master;protocol=https"
SRCREV = "08fb6635ba249665cb08a4de1b955288d25c21e1"
SRC_URI = "git://github.com/rakshasa/libtorrent;branch=master;protocol=https;tag=v${PV} \
file://0001-scripts-common.m4-Insert-spaces-in-shell-lists.patch"
SRCREV = "919d23923ad0a483fa24441093eda1c12cea4c0b"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
CVE_STATUS[CVE-2009-1760] = "backported-patch: patched in our product"
CVE_PRODUCT = ""
PACKAGECONFIG ??= "instrumentation aligned"
@ -27,4 +25,4 @@ PACKAGECONFIG[aligned] = "--enable-aligned,--disable-aligned,"
inherit autotools pkgconfig
EXTRA_OECONF = "--with-zlib=${STAGING_EXECPREFIXDIR}"
EXTRA_OECONF = "--with-posix-fallocate"