lftp: backport fix for duplicate OpenSSL symbols
PATCH 1/2 lftp: backport fix for duplicate OpenSSL symbols
From: Hemanth Kumar M D <[email protected]>
Backport an upstream gnulib fix to avoid duplicate md5_* and sha1_* symbol definitions when building with OpenSSL enabled.
Without this fix, lftp fails to link with errors such as:
multiple definition of `md5_init_ctx'
multiple definition of `sha1_init_ctx'
--- .../lftp/files/gnulib-duplicate-symbols.patch | 40 +++++++++++++++++++ .../recipes-connectivity/lftp/lftp_4.9.3.bb | 5 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-connectivity/lftp/files/gnulib-duplicate-symbols.patch
meta-networking/recipes-connectivity/lftp/files/gnulib-duplicate-symbols.patch new file +40 -0
@@ -0,0 +1,40 @@ +From: Jan Palus <[email protected]> +Date: Sun, 17 Nov 2024 06:52:48 -0800 +Subject: [PATCH] {md5,sha1}-stream: avoid duplicate symbols + +When building with OpenSSL, *_init_ctx and other inline symbols are +supposed to be provided by non *-stream compilation units. Drop the +GL_OPENSSL_INLINE _GL_EXTERN_INLINE override from *-stream.c files so +they don't re-emit those symbols as extern, causing duplicate symbol +errors at link time when --whole-archive is used (as lftp does). + +Link: https://www.mail-archive.com/[email protected]/msg48445.html +Upstream-Status: Backport [https://github.com/coreutils/gnulib/commit/353a3236d9328349c18ce2e4e984755cb4a76ea7] + +Signed-off-by: Jan Palus <[email protected]> +Signed-off-by: Hemanth Kumar M D <[email protected]> + +--- a/lib/md5-stream.c ++++ b/lib/md5-stream.c +@@ -22,9 +22,6 @@ + #include <config.h> + + /* Specification. */ +-#if HAVE_OPENSSL_MD5 +-# define GL_OPENSSL_INLINE _GL_EXTERN_INLINE +-#endif + #include "md5.h" + + #include <stdlib.h> +--- a/lib/sha1-stream.c ++++ b/lib/sha1-stream.c +@@ -24,9 +24,6 @@ + #include <config.h> + + /* Specification. */ +-#if HAVE_OPENSSL_SHA1 +-# define GL_OPENSSL_INLINE _GL_EXTERN_INLINE +-#endif + #include "sha1.h" + + #include <stdlib.h>
meta-networking/recipes-connectivity/lftp/lftp_4.9.3.bb +4 -1
@@ -6,7 +6,10 @@ SECTION = "console/network" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI = "http://lftp.yar.ru/ftp/lftp-${PV}.tar.bz2" +SRC_URI = "http://lftp.yar.ru/ftp/lftp-${PV}.tar.bz2 \ + file://gnulib-duplicate-symbols.patch \ +" + SRC_URI[md5sum] = "c32e15b96c08f7f0b2d17efbceb00db8" SRC_URI[sha256sum] = "adceaef1bd21a38d07c973233fab603813c431f0a8dcbd23239fa9a41ae17b6e"
Signature · 1 line
2.49.0
PATCH 2/2 lftp: add zsh completion subpackage
From: Hemanth Kumar M D <[email protected]>
4.9.3 installs zsh completion via 'make install'. Package it as ${PN}-zsh-completion consistent with other recipes in meta-oe.
--- meta-networking/recipes-connectivity/lftp/lftp_4.9.3.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta-networking/recipes-connectivity/lftp/lftp_4.9.3.bb +4 -0
@@ -27,5 +27,9 @@ PACKAGECONFIG[expat] = "--with-expat=${STAGING_INCDIR}/.. --with-expat-inc=${STA do_install:append() { rm -rf ${D}${libdir}/charset.alias } +PACKAGES =+ "${PN}-zsh-completion" + FILES:${PN} += "${datadir}/icons/hicolor" +FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions" + RDEPENDS:${PN} = "perl bash readline"
Signature · 1 line
2.49.0
i have sent an upgrade to 4.9.4 patch, do we still need this patch ?
Quoted 105 lines · Hemanth Kumar M D via lists.openembedded.org
From: Hemanth Kumar M D <[email protected]>
Backport an upstream gnulib fix to avoid duplicate md5_* and sha1_* symbol definitions when building with OpenSSL enabled.
Without this fix, lftp fails to link with errors such as:
multiple definition of `md5_init_ctx'
multiple definition of `sha1_init_ctx'Signed-off-by Hemanth Kumar M D <[email protected]>--- .../lftp/files/gnulib-duplicate-symbols.patch | 40 +++++++++++++++++++ .../recipes-connectivity/lftp/lftp_4.9.3.bb | 5 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644
meta-networking/recipes-connectivity/lftp/files/gnulib-duplicate-symbols.patchdiff --git
a/meta-networking/recipes-connectivity/lftp/files/gnulib-duplicate-symbols.patchb/meta-networking/recipes-connectivity/lftp/files/gnulib-duplicate-symbols.patchnew file mode 100644
index 0000000000..220a095ff8
---/dev/null
+++b/meta-networking/recipes-connectivity/lftp/files/gnulib-duplicate-symbols.patchmeta-networking/recipes-connectivity/lftp/files/gnulib-duplicate-symbols.patch new file +12
-0@@ -0,0 +1,40 @@ +From: Jan Palus <[email protected]> +Date: Sun, 17 Nov 2024 06:52:48 -0800 +Subject: [PATCH] {md5,sha1}-stream: avoid duplicate symbols + +When building with OpenSSL, *_init_ctx and other inline symbols are +supposed to be provided by non *-stream compilation units. Drop the +GL_OPENSSL_INLINE _GL_EXTERN_INLINE override from *-stream.c files so +they don't re-emit those symbols as extern, causing duplicate symbol +errors at link time when --whole-archive is used (as lftp does). + +Link: https://www.mail-archive.com/[email protected]/msg48445.html +Upstream-Status: Backport [https://github.com/coreutils/gnulib/commit/353a3236d9328349c18ce2e4e984755cb4a76ea7
]meta-networking/recipes-connectivity/lftp/files/gnulib-duplicate-symbols.patch new file +28
-0+ +Signed-off-by: Jan Palus <[email protected]> +Signed-off-by: Hemanth Kumar M D <[email protected]> + +--- a/lib/md5-stream.c ++++ b/lib/md5-stream.c +@@ -22,9 +22,6 @@ + #include <config.h> + + /* Specification. */ +-#if HAVE_OPENSSL_MD5 +-# define GL_OPENSSL_INLINE _GL_EXTERN_INLINE +-#endif + #include "md5.h" + + #include <stdlib.h> +--- a/lib/sha1-stream.c ++++ b/lib/sha1-stream.c +@@ -24,9 +24,6 @@ + #include <config.h> + + /* Specification. */ +-#if HAVE_OPENSSL_SHA1 +-# define GL_OPENSSL_INLINE _GL_EXTERN_INLINE +-#endif + #include "sha1.h" + + #include <stdlib.h>meta-networking/recipes-connectivity/lftp/lftp_4.9.3.bb +4
-1@@ -6,7 +6,10 @@ SECTION = "console/network" LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -SRC_URI = "http://lftp.yar.ru/ftp/lftp-${PV}.tar.bz2" +SRC_URI = "http://lftp.yar.ru/ftp/lftp-${PV}.tar.bz2 \ + file://gnulib-duplicate-symbols.patch \ +" + SRC_URI[md5sum] = "c32e15b96c08f7f0b2d17efbceb00db8" SRC_URI[sha256sum] ="
adceaef1bd21a38d07c973233fab603813c431f0a8dcbd23239fa9a41ae17b6e"--
2.49.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#127790):
https://lists.openembedded.org/g/openembedded-devel/message/127790
Mute This Topic: https://lists.openembedded.org/mt/119988165/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-