1.1.23 gained --enable-crossbuilddir, which uses the native mtp-hotplug to generate udev rules. Use it and drop the local 0001-Use-native-mtp-hotplug and 0002-util-mtp-hotplug patches.
Signed-off-by: Khem Raj <[email protected]> --- .../libmtp/0001-Use-native-mtp-hotplug.patch | 43 ------------------- ...lug.c-Enable-stack-memory-protection.patch | 33 -------------- .../{libmtp_1.1.21.bb => libmtp_1.1.23.bb} | 10 +++-- 3 files changed, 7 insertions(+), 79 deletions(-) delete mode 100644 meta-oe/recipes-connectivity/libmtp/libmtp/0001-Use-native-mtp-hotplug.patch delete mode 100644 meta-oe/recipes-connectivity/libmtp/libmtp/0002-util-mtp-hotplug.c-Enable-stack-memory-protection.patch rename meta-oe/recipes-connectivity/libmtp/{libmtp_1.1.21.bb => libmtp_1.1.23.bb} (82%) diff --git a/meta-oe/recipes-connectivity/libmtp/libmtp/0001-Use-native-mtp-hotplug.patch b/meta-oe/recipes-connectivity/libmtp/libmtp/0001-Use-native-mtp-hotplug.patch deleted file mode 100644 index 83c58061f7..0000000000 --- a/meta-oe/recipes-connectivity/libmtp/libmtp/0001-Use-native-mtp-hotplug.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 4e8eab047a43e48bd541f2887104299fcfb99b0d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]> -Date: Tue, 27 Nov 2018 12:03:20 +0100 -Subject: [PATCH] Use native mtp-hotplug -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Inappropriate [OE-specific] - -Signed-off-by: Andreas Müller <[email protected]> ---- - Makefile.am | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 7b7e06b..083e1c6 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -16,16 +16,16 @@ hwdb_DATA=69-libmtp.hwdb - noinst_DATA=libmtp.usermap libmtp.fdi - - libmtp.usermap: util/mtp-hotplug -- util/mtp-hotplug > libmtp.usermap -+ mtp-hotplug > libmtp.usermap - - @UDEV_RULES@: util/mtp-hotplug -- util/mtp-hotplug -u -p"@UDEV@" @UDEV_GROUP@ @UDEV_MODE@ > @UDEV_RULES@ -+ mtp-hotplug -u -p"@UDEV@" @UDEV_GROUP@ @UDEV_MODE@ > @UDEV_RULES@ - - libmtp.fdi: util/mtp-hotplug -- util/mtp-hotplug -H > libmtp.fdi -+ mtp-hotplug -H > libmtp.fdi - - $(hwdb_DATA): util/mtp-hotplug -- util/mtp-hotplug -w > $(hwdb_DATA) -+ mtp-hotplug -w > $(hwdb_DATA) - - CLEANFILES = libmtp.usermap @UDEV_RULES@ libmtp.fdi libmtp.hwdb - endif --- -2.14.5 - diff --git a/meta-oe/recipes-connectivity/libmtp/libmtp/0002-util-mtp-hotplug.c-Enable-stack-memory-protection.patch b/meta-oe/recipes-connectivity/libmtp/libmtp/0002-util-mtp-hotplug.c-Enable-stack-memory-protection.patch deleted file mode 100644 index 9cd4b2fbd6..0000000000 --- a/meta-oe/recipes-connectivity/libmtp/libmtp/0002-util-mtp-hotplug.c-Enable-stack-memory-protection.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0644188a537a06bc6d04483b21e23b80987eb497 Mon Sep 17 00:00:00 2001 -From: Hieu Van Nguyen <[email protected]> -Date: Fri, 11 Oct 2024 04:21:21 +0000 -Subject: [PATCH] util/mtp-hotplug.c: Enable stack memory protection - -Use "return 0" instead of "exit(0)" at the end of main() -function to enable checking for Stack Overflow at Runtime. - -Use "return 0" to let the program exit normally by returning from -the main function. This allows the compiler to perform necessary -cleanup operations, including stack canary checks. - -__stack_chk_fail function isn't being invoked when using exit(0) at -the end of the main function -$ objdump -T ./util/.libs/mtp-hotplug | grep __stack_chk_fail -This return empty. ---- -Upstream-Status: Backport [https://github.com/libmtp/libmtp/commit/e89dbb6ecf244936acc9a52aa4af9635bda5926a] - - util/mtp-hotplug.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/util/mtp-hotplug.c b/util/mtp-hotplug.c -index b5bc6da40f..db75cb38a1 100644 ---- a/util/mtp-hotplug.c -+++ b/util/mtp-hotplug.c -@@ -301,5 +301,5 @@ int main (int argc, char **argv) - printf("\n"); - } - -- exit (0); -+ return 0; - } diff --git a/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.21.bb b/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.23.bb similarity index 82% rename from meta-oe/recipes-connectivity/libmtp/libmtp_1.1.21.bb rename to meta-oe/recipes-connectivity/libmtp/libmtp_1.1.23.bb index 69dff50cd7..a991c0a670 100644 --- a/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.21.bb +++ b/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.23.bb @@ -18,9 +18,7 @@ DEPENDS = "libusb1 gettext-native" DEPENDS:append:class-target = " ${BPN}-native" SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz" -SRC_URI:append:class-target = " file://0001-Use-native-mtp-hotplug.patch \ - file://0002-util-mtp-hotplug.c-Enable-stack-memory-protection.patch" -SRC_URI[sha256sum] = "f4c1ceb3df020a6cb851110f620c14fe399518c494ed252039cbfb4e34335135" +SRC_URI[sha256sum] = "74a2b6e8cb4a0304e95b995496ea3ac644c29371649b892b856e22f12a0bdeed" UPSTREAM_CHECK_URI = "https://github.com/libmtp/libmtp/releases" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" @@ -33,6 +31,12 @@ EXTRA_OECONF += " \ --with-udev=${nonarch_base_libdir}/udev \ " +# Upstream 1.1.23 gained native crossbuild support: with this enabled the +# build uses the host (native) mtp-hotplug (HOST_MTP_HOTPLUG) instead of the +# just-built target binary to generate the udev rules/hwdb. libmtp-native +# provides mtp-hotplug on PATH. +EXTRA_OECONF:append:class-target = " --enable-crossbuilddir=${nonarch_base_libdir}/udev" + PACKAGECONFIG ?= "" PACKAGECONFIG[doxygen] = "--enable-doxygen,--disable-doxygen,doxygen-native" PACKAGECONFIG[mtpz] = "--enable-mtpz,--disable-mtpz,libgcrypt"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#127897): https://lists.openembedded.org/g/openembedded-devel/message/127897 Mute This Topic: https://lists.openembedded.org/mt/120013694/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
