mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
From ff4b9111aeba01dd025dd133ce617fb80f7398a0 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...
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved from:
|
||||
https://github.com/rpm-software-management/rpm/commit/ff4b9111aeba01dd025dd133ce617fb80f7398a0]
|
||||
---
|
||||
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 992d9acf6..50f8c8e90 100644
|
||||
--- a/rpmio/digest_nss.c
|
||||
+++ b/rpmio/digest_nss.c
|
||||
@@ -116,7 +116,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;
|
||||
@@ -216,7 +215,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();
|
||||
|
||||
32
package/rpm/0002-rpmio-digest_nss.c-fix-build-on-musl.patch
Normal file
32
package/rpm/0002-rpmio-digest_nss.c-fix-build-on-musl.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 817dbe77e3e5a6d89540000a48584358efb4b03a Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Mon, 1 Apr 2019 07:33:19 +0200
|
||||
Subject: [PATCH] rpmio/digest_nss.c: fix build on musl
|
||||
|
||||
signal.h must be included to be able to use sigaction
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/395fd44a930dfc2ad380bc735c26d9ce62344295
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status:
|
||||
https://github.com/rpm-software-management/rpm/pull/650]
|
||||
---
|
||||
rpmio/digest_nss.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
|
||||
index 50f8c8e90..1692a9221 100644
|
||||
--- a/rpmio/digest_nss.c
|
||||
+++ b/rpmio/digest_nss.c
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <pthread.h>
|
||||
#include <nss.h>
|
||||
#include <sechash.h>
|
||||
+#include <signal.h>
|
||||
#include <keyhi.h>
|
||||
#include <cryptohi.h>
|
||||
#include <blapit.h>
|
||||
--
|
||||
2.14.1
|
||||
|
||||
20
package/rpm/Config.in
Normal file
20
package/rpm/Config.in
Normal file
@@ -0,0 +1,20 @@
|
||||
comment "rpm needs a toolchain w/ dynamic library and threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
config BR2_PACKAGE_RPM
|
||||
bool "rpm"
|
||||
depends on !BR2_STATIC_LIBS # dlfcn.h
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
select BR2_PACKAGE_BEECRYPT if !BR2_PACKAGE_LIBNSS && !BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_BERKELEYDB
|
||||
select BR2_PACKAGE_FILE
|
||||
select BR2_PACKAGE_POPT
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
The RPM Package Manager (RPM).
|
||||
|
||||
http://www.rpm.org/
|
||||
5
package/rpm/rpm.hash
Normal file
5
package/rpm/rpm.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# From https://rpm.org/wiki/Releases/4.14.2.1.html
|
||||
sha256 1139c24b7372f89c0a697096bf9809be70ba55e006c23ff47305c1849d98acda rpm-4.14.2.1.tar.bz2
|
||||
|
||||
# Hash for license file
|
||||
sha256 d56f4f1f290f6920cb053aef0dbcd0b853cda289e2568b364ddbfce220a6f3e0 COPYING
|
||||
99
package/rpm/rpm.mk
Normal file
99
package/rpm/rpm.mk
Normal file
@@ -0,0 +1,99 @@
|
||||
################################################################################
|
||||
#
|
||||
# rpm
|
||||
#
|
||||
################################################################################
|
||||
|
||||
RPM_VERSION_MAJOR = 4.14
|
||||
RPM_VERSION = $(RPM_VERSION_MAJOR).2.1
|
||||
RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2
|
||||
RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x
|
||||
RPM_DEPENDENCIES = \
|
||||
host-pkgconf \
|
||||
berkeleydb \
|
||||
$(if $(BR2_PACKAGE_BZIP2),bzip2) \
|
||||
$(if $(BR2_PACKAGE_ELFUTILS),elfutils) \
|
||||
file \
|
||||
popt \
|
||||
$(if $(BR2_PACKAGE_XZ),xz) \
|
||||
zlib \
|
||||
$(TARGET_NLS_DEPENDENCIES)
|
||||
RPM_LICENSE = GPL-2.0 or LGPL-2.0 (library only)
|
||||
RPM_LICENSE_FILES = COPYING
|
||||
|
||||
RPM_CONF_OPTS = \
|
||||
--disable-python \
|
||||
--disable-rpath \
|
||||
--with-external-db \
|
||||
--with-gnu-ld \
|
||||
--without-hackingdocs \
|
||||
--without-lua
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ACL),y)
|
||||
RPM_DEPENDENCIES += acl
|
||||
RPM_CONF_OPTS += --with-acl
|
||||
else
|
||||
RPM_CONF_OPTS += --without-acl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DBUS),y)
|
||||
RPM_DEPENDENCIES += dbus
|
||||
RPM_CONF_OPTS += --enable-plugins
|
||||
else
|
||||
RPM_CONF_OPTS += --disable-plugins
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
||||
RPM_DEPENDENCIES += libcap
|
||||
RPM_CONF_OPTS += --with-cap
|
||||
else
|
||||
RPM_CONF_OPTS += --without-cap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBNSS),y)
|
||||
RPM_DEPENDENCIES += libnss
|
||||
RPM_CONF_OPTS += --with-crypto=nss
|
||||
RPM_CFLAGS += -I$(STAGING_DIR)/usr/include/nss -I$(STAGING_DIR)/usr/include/nspr
|
||||
else ifeq ($(BR2_PACKAGE_BEECRYPT),y)
|
||||
RPM_DEPENDENCIES += beecrypt
|
||||
RPM_CONF_OPTS += --with-crypto=beecrypt
|
||||
RPM_CFLAGS += -I$(STAGING_DIR)/usr/include/beecrypt
|
||||
else
|
||||
RPM_DEPENDENCIES += openssl
|
||||
RPM_CONF_OPTS += --with-crypto=openssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
|
||||
RPM_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
|
||||
else
|
||||
RPM_CONF_OPTS += --without-libintl-prefix
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBARCHIVE),y)
|
||||
RPM_DEPENDENCIES += libarchive
|
||||
RPM_CONF_OPTS += --with-archive
|
||||
else
|
||||
RPM_CONF_OPTS += --without-archive
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
||||
RPM_DEPENDENCIES += libselinux
|
||||
RPM_CONF_OPTS += --with-selinux
|
||||
else
|
||||
RPM_CONF_OPTS += --without-selinux
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZSTD),y)
|
||||
RPM_DEPENDENCIES += zstd
|
||||
RPM_CONF_OPTS += --enable-zstd
|
||||
else
|
||||
RPM_CONF_OPTS += --disable-zstd
|
||||
endif
|
||||
|
||||
# ac_cv_prog_cc_c99: RPM uses non-standard GCC extensions (ex. `asm`).
|
||||
RPM_CONF_ENV = \
|
||||
ac_cv_prog_cc_c99='-std=gnu99' \
|
||||
CFLAGS="$(TARGET_CFLAGS) $(RPM_CFLAGS)" \
|
||||
LIBS=$(TARGET_NLS_LIBS)
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user