From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 01/20] rpm: switch to openssl from nss
Date: Tue, 14 Jan 2020 14:59:48 +0100 [thread overview]
Message-ID: <20200114140007.36622-1-alex.kanavin@gmail.com> (raw)
nss is a problematic library in many ways, but openssl
seems to work just fine.
rpm was the only user of nss in oe-core, which opens
the possibility of moving it out.
Add a backported patch to enable builds with latest openssl.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
...support-for-unused-MD2-and-RIPEMD160.patch | 81 +++++++++++++++++++
meta/recipes-devtools/rpm/rpm_4.14.2.1.bb | 5 +-
2 files changed, 84 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch
diff --git a/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch b/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch
new file mode 100644
index 00000000000..734e38bb391
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch
@@ -0,0 +1,81 @@
+From 2d53d1e308a5bd15a16cc289fa7e1f264ea706be Mon Sep 17 00:00:00 2001
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Tue, 26 Jun 2018 10:46:14 +0300
+Subject: [PATCH] Rip out partial support for unused MD2 and RIPEMD160 digests
+
+Inspired by #453, adding configure-checks for unused digests algorithms
+seems nonsensical, at no point in rpm history have these algorithms been
+used for anything in rpm so there's not even backward compatibility to
+care about. So the question becomes why do we appear to have (some)
+support for those unused algorithms? So lets don't, problem solved...
+
+Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/ff4b9111aeba01dd025dd133ce617fb80f7398a0]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ rpmio/digest_beecrypt.c | 7 -------
+ rpmio/digest_nss.c | 2 --
+ rpmio/digest_openssl.c | 6 ------
+ 3 files changed, 15 deletions(-)
+
+diff --git a/rpmio/digest_beecrypt.c b/rpmio/digest_beecrypt.c
+index 597027e25..653a39491 100644
+--- a/rpmio/digest_beecrypt.c
++++ b/rpmio/digest_beecrypt.c
+@@ -132,10 +132,6 @@ DIGEST_CTX rpmDigestInit(int hashalgo, rpmDigestFlags flags)
+ ctx->Digest = (void *) sha512Digest;
+ break;
+ #endif
+- case PGPHASHALGO_RIPEMD160:
+- case PGPHASHALGO_MD2:
+- case PGPHASHALGO_TIGER192:
+- case PGPHASHALGO_HAVAL_5_160:
+ default:
+ free(ctx);
+ return NULL;
+@@ -292,9 +288,6 @@ static int pgpVerifySigRSA(pgpDigAlg pgpkey, pgpDigAlg pgpsig, uint8_t *hash, si
+ case PGPHASHALGO_SHA1:
+ prefix = "3021300906052b0e03021a05000414";
+ break;
+- case PGPHASHALGO_MD2:
+- prefix = "3020300c06082a864886f70d020205000410";
+- break;
+ case PGPHASHALGO_SHA256:
+ prefix = "3031300d060960864801650304020105000420";
+ break;
+diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
+index e11920e3e..b3d2b5595 100644
+--- a/rpmio/digest_nss.c
++++ b/rpmio/digest_nss.c
+@@ -117,7 +117,6 @@ static HASH_HashType getHashType(int hashalgo)
+ {
+ switch (hashalgo) {
+ case PGPHASHALGO_MD5: return HASH_AlgMD5;
+- case PGPHASHALGO_MD2: return HASH_AlgMD2;
+ case PGPHASHALGO_SHA1: return HASH_AlgSHA1;
+ #ifdef SHA224_LENGTH
+ case PGPHASHALGO_SHA224: return HASH_AlgSHA224;
+@@ -217,7 +216,6 @@ static SECOidTag getHashAlg(unsigned int hashalgo)
+ {
+ switch (hashalgo) {
+ case PGPHASHALGO_MD5: return SEC_OID_MD5;
+- case PGPHASHALGO_MD2: return SEC_OID_MD2;
+ case PGPHASHALGO_SHA1: return SEC_OID_SHA1;
+ #ifdef SHA224_LENGTH
+ case PGPHASHALGO_SHA224: return SEC_OID_SHA224;
+diff --git a/rpmio/digest_openssl.c b/rpmio/digest_openssl.c
+index 18e52a724..0ae48dd1d 100644
+--- a/rpmio/digest_openssl.c
++++ b/rpmio/digest_openssl.c
+@@ -172,12 +172,6 @@ static const EVP_MD *getEVPMD(int hashalgo)
+ case PGPHASHALGO_SHA1:
+ return EVP_sha1();
+
+- case PGPHASHALGO_RIPEMD160:
+- return EVP_ripemd160();
+-
+- case PGPHASHALGO_MD2:
+- return EVP_md2();
+-
+ case PGPHASHALGO_SHA256:
+ return EVP_sha256();
+
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
index c37330eb4c6..339bd7b8343 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
@@ -42,6 +42,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
+ file://0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch \
"
PE = "1"
@@ -49,7 +50,7 @@ SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa"
S = "${WORKDIR}/git"
-DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python3"
+DEPENDS = "openssl libarchive db file popt xz bzip2 dbus elfutils python3"
DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
inherit autotools gettext pkgconfig python3native
@@ -58,7 +59,7 @@ export PYTHON_ABI
# OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
-EXTRA_OECONF_append = " --without-lua --enable-python"
+EXTRA_OECONF_append = " --without-lua --enable-python --with-crypto=openssl"
EXTRA_OECONF_append_libc-musl = " --disable-nls"
# --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
--
2.17.1
next reply other threads:[~2020-01-14 14:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 13:59 Alexander Kanavin [this message]
2020-01-14 13:59 ` [PATCH 02/20] rpm: fix with musl and latest elfutils Alexander Kanavin
2020-01-14 13:59 ` [PATCH 03/20] nss: update to 3.49.1 Alexander Kanavin
2020-01-14 21:22 ` Richard Purdie
2020-01-14 13:59 ` [PATCH 04/20] python3: update to 3.8.1 Alexander Kanavin
2020-01-15 13:39 ` Richard Purdie
2020-01-14 13:59 ` [PATCH 05/20] gstreamer1.0-python: add a patch to fix python 3.8 builds Alexander Kanavin
2020-01-14 13:59 ` [PATCH 06/20] acl/attr: update to latest upstream releases Alexander Kanavin
2020-01-14 13:59 ` [PATCH 07/20] pseudo: adjust for attr 2.4.48 Alexander Kanavin
2020-01-14 13:59 ` [PATCH 08/20] ltp: update to 20190930 Alexander Kanavin
2020-01-14 13:59 ` [PATCH 09/20] ifupdown: update 0.8.22 -> 0.8.35 Alexander Kanavin
2020-01-14 13:59 ` [PATCH 10/20] elfutils: upgrade 0.177 -> 0.178 Alexander Kanavin
2020-01-14 13:59 ` [PATCH 11/20] libcap: update to 2.31 Alexander Kanavin
2020-01-14 21:23 ` Richard Purdie
2020-01-14 13:59 ` [PATCH 12/20] busybox: fix failing ptests Alexander Kanavin
2020-01-14 14:00 ` [PATCH 13/20] dbus: fix failing ptest (by disabling as it needs X) Alexander Kanavin
2020-01-14 14:00 ` [PATCH 14/20] glib: disable a failing ptest Alexander Kanavin
2020-01-14 14:00 ` [PATCH 15/20] libevent: disable ptests that require a DNS and an intenet connection Alexander Kanavin
2020-01-14 14:00 ` [PATCH 16/20] iputils: resolve a name clash with latest libcap Alexander Kanavin
2020-01-14 14:00 ` [PATCH 17/20] perl: fix failing ptests Alexander Kanavin
2020-01-14 14:00 ` [PATCH 18/20] bash: exclude from ptests Alexander Kanavin
2020-01-14 14:00 ` [PATCH 19/20] strace: fix failing ptests Alexander Kanavin
2020-01-14 14:00 ` [PATCH 20/20] valgrind: partially fix ptests Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200114140007.36622-1-alex.kanavin@gmail.com \
--to=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.