summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-05-31 17:52:30 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-04 13:27:30 +0100
commita3a6c10bd539868bf3de04f0848364e96fb5a313 (patch)
treedef5084774dd9a209cbdd06490e88497aa132913 /meta
parent36aa1ce0ca58c7ef5fec3d69ae53b4037f15f4dc (diff)
downloadpoky-a3a6c10bd539868bf3de04f0848364e96fb5a313.tar.gz
rng-tools: upgrade 6.9 -> 6.10
(From OE-Core rev: 368405e33a3db97a85cfd4cb06cb5a105b924d3e) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/a4b6d9ce64f132e463b9091d0536913ddaf11516.patch42
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch51
-rw-r--r--meta/recipes-support/rng-tools/rng-tools_6.10.bb (renamed from meta/recipes-support/rng-tools/rng-tools_6.9.bb)11
3 files changed, 100 insertions, 4 deletions
diff --git a/meta/recipes-support/rng-tools/rng-tools/a4b6d9ce64f132e463b9091d0536913ddaf11516.patch b/meta/recipes-support/rng-tools/rng-tools/a4b6d9ce64f132e463b9091d0536913ddaf11516.patch
new file mode 100644
index 0000000000..96301617b2
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/a4b6d9ce64f132e463b9091d0536913ddaf11516.patch
@@ -0,0 +1,42 @@
1From a4b6d9ce64f132e463b9091d0536913ddaf11516 Mon Sep 17 00:00:00 2001
2From: Neil Horman <nhorman@tuxdriver.com>
3Date: Thu, 30 Apr 2020 16:57:35 -0400
4Subject: [PATCH] Remove name conflict with libc encrypt
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Forgot to fixup the funciton name conflict with libcs encrypt() function
10on power systems
11
12Upstream-Status: Backport [https://github.com/nhorman/rng-tools/commit/a4b6d9ce64f132e463b9091d0536913ddaf11516]
13Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
15Reported-by: Natanael Copa <ncopa@alpinelinux.org>
16Reported-by: "Milan P. Stanić" <mps@arvanta.net>
17---
18 rngd_darn.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/rngd_darn.c b/rngd_darn.c
22index 35df7a1..9345895 100644
23--- a/rngd_darn.c
24+++ b/rngd_darn.c
25@@ -109,7 +109,7 @@ static int init_openssl(struct rng *ent_src)
26 return 0;
27 }
28
29-int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key,
30+static int osslencrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key,
31 unsigned char *iv, unsigned char *ciphertext)
32 {
33 int len;
34@@ -150,7 +150,7 @@ static inline int openssl_mangle(unsigned char *tmp, struct rng *ent_src)
35 unsigned char ciphertext[CHUNK_SIZE * RDRAND_ROUNDS];
36
37 /* Encrypt the plaintext */
38- ciphertext_len = encrypt (tmp, strlen(tmp), key, iv_buf,
39+ ciphertext_len = osslencrypt (tmp, strlen(tmp), key, iv_buf,
40 ciphertext);
41 printf("Calling mangle with len %d\n", ciphertext_len);
42 if (!ciphertext_len)
diff --git a/meta/recipes-support/rng-tools/rng-tools/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch b/meta/recipes-support/rng-tools/rng-tools/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch
new file mode 100644
index 0000000000..93103ef79f
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch
@@ -0,0 +1,51 @@
1From dab16a5fd4efde8ef569b358e19b1fcbc7d0d938 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Mon, 30 Mar 2020 00:10:46 +0200
4Subject: [PATCH] rngd_jitter: disambiguate call to encrypt
5
6Commit 0f184ea7e792427fb20afe81d471b565aee96f0b disambiguate the call to
7encrypt in rngd_rdrand.c but did not update rngd_jitter.c.
8
9This raise the following build failure:
10
11rngd_jitter.c:75:12: error: conflicting types for 'encrypt'
12 static int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key,
13 ^~~~~~~
14In file included from rngd_jitter.c:27:
15/home/dawncrow/buildroot-test/scripts/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/unistd.h:1132:13: note: previous declaration of 'encrypt' was here
16 extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1));
17 ^~~~~~~
18Makefile:770: recipe for target 'rngd-rngd_jitter.o' failed
19
20Fixes:
21 - http://autobuild.buildroot.org/results/0ca6bf16e3acbc94065b88c4442d6595424b77cb
22
23Upstream-Status: Backport [https://github.com/nhorman/rng-tools/commit/dab16a5fd4efde8ef569b358e19b1fcbc7d0d938]
24Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
25Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
26---
27 rngd_jitter.c | 4 ++--
28 1 file changed, 2 insertions(+), 2 deletions(-)
29
30diff --git a/rngd_jitter.c b/rngd_jitter.c
31index c1b1aca..49a3825 100644
32--- a/rngd_jitter.c
33+++ b/rngd_jitter.c
34@@ -72,7 +72,7 @@ unsigned char *aes_buf;
35 char key[AES_BLOCK];
36 static unsigned char iv_buf[CHUNK_SIZE] __attribute__((aligned(128)));
37
38-static int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key,
39+static int osslencrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key,
40 unsigned char *iv, unsigned char *ciphertext)
41 {
42 EVP_CIPHER_CTX *ctx;
43@@ -122,7 +122,7 @@ static inline int openssl_mangle(unsigned char *tmp, struct rng *ent_src)
44 unsigned char ciphertext[CHUNK_SIZE * RDRAND_ROUNDS];
45
46 /* Encrypt the plaintext */
47- ciphertext_len = encrypt (tmp, strlen(tmp), key, iv_buf,
48+ ciphertext_len = osslencrypt (tmp, strlen(tmp), key, iv_buf,
49 ciphertext);
50 if (!ciphertext_len)
51 return -1;
diff --git a/meta/recipes-support/rng-tools/rng-tools_6.9.bb b/meta/recipes-support/rng-tools/rng-tools_6.10.bb
index 8c98a9aa3a..3f9720e406 100644
--- a/meta/recipes-support/rng-tools/rng-tools_6.9.bb
+++ b/meta/recipes-support/rng-tools/rng-tools_6.10.bb
@@ -6,25 +6,28 @@ HOMEPAGE = "https://github.com/nhorman/rng-tools"
6BUGTRACKER = "https://github.com/nhorman/rng-tools/issues" 6BUGTRACKER = "https://github.com/nhorman/rng-tools/issues"
7LICENSE = "GPLv2" 7LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 8LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
9DEPENDS = "sysfsutils" 9DEPENDS = "sysfsutils openssl"
10 10
11SRC_URI = "\ 11SRC_URI = "\
12 git://github.com/nhorman/rng-tools.git \ 12 git://github.com/nhorman/rng-tools.git \
13 file://a4b6d9ce64f132e463b9091d0536913ddaf11516.patch \
14 file://dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch \
13 file://init \ 15 file://init \
14 file://default \ 16 file://default \
15 file://rngd.service \ 17 file://rngd.service \
16" 18"
17SRCREV = "4a865797a69dd38c64a86aa32884ecc9ba7b4d08" 19SRCREV = "0be82200a66d9321451e0a0785bfae350b9cffdc"
18 20
19S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
20 22
21inherit autotools update-rc.d systemd pkgconfig 23inherit autotools update-rc.d systemd pkgconfig
22 24
23PACKAGECONFIG ??= "libgcrypt libjitterentropy" 25EXTRA_OECONF = "--without-rtlsdr"
26
27PACKAGECONFIG ??= "libjitterentropy"
24PACKAGECONFIG_libc-musl = "libargp libjitterentropy" 28PACKAGECONFIG_libc-musl = "libargp libjitterentropy"
25 29
26PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," 30PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
27PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
28PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy" 31PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy"
29PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl" 32PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl"
30PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl" 33PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl"