summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch60
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/0001-configure.ac-fix-typo.patch27
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch95
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch25
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/rng-tools-5-fix-textrels-on-PIC-x86.patch114
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/underquote.patch46
-rw-r--r--meta/recipes-support/rng-tools/rng-tools_6.7.bb (renamed from meta/recipes-support/rng-tools/rng-tools_6.6.bb)9
7 files changed, 28 insertions, 348 deletions
diff --git a/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch b/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch
deleted file mode 100644
index 06d1d94369..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1From 06ba71887f667d45dd231a782a2751f36e8fe025 Mon Sep 17 00:00:00 2001
2From: Christopher Larson <chris_larson@mentor.com>
3Date: Mon, 15 Feb 2016 15:59:58 -0700
4Subject: [PATCH 1/4] If the libc is lacking argp, use libargp
5
6Patch pulled from Gentoo:
7
8 On glibc systems, argp is provided by libc. However, on
9 uclibc and other systems which lack argp in their C library,
10 argp might be provided by a stand alone library, libargp.
11 This patch adds tests to the build system to find who provides
12 argp.
13
14 X-Gentoo-Bug: 292191
15 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=292191
16 Reported-by: Ed Wildgoose <gentoo@wildgooses.com>
17 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
18
19Upstream-Status: Pending
20Signed-off-by: Christopher Larson <chris_larson@mentor.com>
21---
22 configure.ac | 22 ++++++++++++++++++++++
23 1 file changed, 22 insertions(+)
24
25diff --git a/configure.ac b/configure.ac
26index 4e799dc..c4a5dd8 100644
27--- a/configure.ac
28+++ b/configure.ac
29@@ -135,6 +135,28 @@ AS_IF(
30 ]
31 )
32
33+dnl First check if we have argp available from libc
34+AC_LINK_IFELSE(
35+ [AC_LANG_PROGRAM(
36+ [#include <argp.h>],
37+ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
38+ )],
39+ [libc_has_argp="true"],
40+ [libc_has_argp="false"]
41+)
42+
43+dnl If libc doesn't provide argp, then test for libargp
44+if test "$libc_has_argp" = "false" ; then
45+ AC_MSG_WARN("libc does not have argp")
46+ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
47+
48+ if test "$have_argp" = "false"; then
49+ AC_MSG_ERROR("no libargp found")
50+ else
51+ LIBS+=" -largp"
52+ fi
53+fi
54+
55 dnl -----------------
56 dnl Configure options
57 dnl -----------------
58--
592.7.4
60
diff --git a/meta/recipes-support/rng-tools/rng-tools/0001-configure.ac-fix-typo.patch b/meta/recipes-support/rng-tools/rng-tools/0001-configure.ac-fix-typo.patch
deleted file mode 100644
index d4d28a01c4..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/0001-configure.ac-fix-typo.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 99b0efebd765803203686d89bc4f995bcb103e78 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Sat, 10 Nov 2018 09:53:19 +0800
4Subject: [PATCH] configure.ac: fix typo
5
6Upstream-Status: Submitted [https://github.com/nhorman/rng-tools.git]
7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
8---
9 configure.ac | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/configure.ac b/configure.ac
13index 4e799dc..0251928 100644
14--- a/configure.ac
15+++ b/configure.ac
16@@ -62,7 +62,7 @@ AS_IF([test $target_cpu = powerpc64le], [AC_DEFINE([HAVE_DARN],1,[Enable DARN])]
17 AM_CONDITIONAL([JITTER], [false])
18
19 AC_ARG_ENABLE(jitterentropy,
20- AS_HELP_STRING([--disable-jitterntropy | --enable-jitterentropy=<path>],
21+ AS_HELP_STRING([--disable-jitterentropy | --enable-jitterentropy=<path>],
22 [Disable jitterentropy source, or specify its location]),
23 [if [ test -d $enable_jitterentropy ]; then
24 export LDFLAGS+=-L$enable_jitterentropy;
25--
262.7.4
27
diff --git a/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch b/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch
deleted file mode 100644
index be60fe97f6..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch
+++ /dev/null
@@ -1,95 +0,0 @@
1From 711e2f76890e3c5b08f64859d9fd913ddbec7d50 Mon Sep 17 00:00:00 2001
2From: Christopher Larson <chris_larson@mentor.com>
3Date: Mon, 22 Oct 2018 15:26:47 +0800
4Subject: [PATCH 2/4] Add argument to control the libargp dependency
5
6This ensures that the builds are always deterministic. If the argument isn't
7passed, the default behavior is to use libargp if the libc doesn't have argp.
8
9Upstream-Status: Pending
10Signed-off-by: Christopher Larson <chris_larson@mentor.com>
11
12Rebase to 6.6
13Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14---
15 configure.ac | 55 ++++++++++++++++++++++++++++++++++++-------------------
16 1 file changed, 36 insertions(+), 19 deletions(-)
17
18diff --git a/configure.ac b/configure.ac
19index c4a5dd8..dd1c30f 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -40,6 +40,13 @@ AC_ARG_WITH([nistbeacon],
23 [with_nistbeacon=check]
24 )
25
26+AC_ARG_WITH([libargp],
27+ AS_HELP_STRING([--without-libargp],
28+ [Disable libargp support. Systems whose libc lacks argp can use libargp instead. (Default: check if libc lacks argp)]),
29+ [with_libargp=$withval],
30+ [with_libargp=check]
31+)
32+
33 dnl Make sure anyone changing configure.ac/Makefile.am has a clue
34 AM_MAINTAINER_MODE
35 AM_PROG_AS
36@@ -135,27 +142,37 @@ AS_IF(
37 ]
38 )
39
40-dnl First check if we have argp available from libc
41-AC_LINK_IFELSE(
42- [AC_LANG_PROGRAM(
43- [#include <argp.h>],
44- [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
45- )],
46- [libc_has_argp="true"],
47- [libc_has_argp="false"]
48+dnl Determine if we need libargp: either user requested, or libc has no argp
49+AS_IF(
50+ [test "x$with_libargp" != "xyes"],
51+ [
52+ AC_LINK_IFELSE(
53+ [AC_LANG_PROGRAM(
54+ [#include <argp.h>],
55+ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
56+ )],
57+ [need_libargp=no],
58+ [need_libargp=yes
59+ if test "x$with_libargp" = "xno"; then
60+ AC_MSG_FAILURE([libargp disabled and libc does not have argp])
61+ fi]
62+ )
63+ ],
64+ [need_libargp=yes],
65 )
66
67-dnl If libc doesn't provide argp, then test for libargp
68-if test "$libc_has_argp" = "false" ; then
69- AC_MSG_WARN("libc does not have argp")
70- AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
71-
72- if test "$have_argp" = "false"; then
73- AC_MSG_ERROR("no libargp found")
74- else
75- LIBS+=" -largp"
76- fi
77-fi
78+dnl Check for libargp
79+AS_IF(
80+ [test "x$need_libargp" = "xyes"],
81+ [
82+ AC_CHECK_LIB(
83+ [argp],
84+ [argp_parse],
85+ [LIBS="$LIBS -largp"],
86+ [AC_MSG_FAILURE([libargp not found])]
87+ )
88+ ]
89+)
90
91 dnl -----------------
92 dnl Configure options
93--
942.7.4
95
diff --git a/meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch b/meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch
new file mode 100644
index 0000000000..58cf3f9d59
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch
@@ -0,0 +1,25 @@
1It fails to stop rngd. It just shows warnings when stop rngd such as by:
2
3$ systemctl stop rngd.service
4
5but stalls shutdown untill daemon rngd is killed.
6
7Backport patch to fix the issue.
8
9Upstream-Status: Backport [https://bugzilla.redhat.com/show_bug.cgi?id=1690364#c8]
10
11Signed-off-by: Kai Kang <kai.kang@windriver.com>
12---
13diff --git a/rngd_jitter.c b/rngd_jitter.c
14index 54070ae..7a69bf9 100644
15--- a/rngd_jitter.c
16+++ b/rngd_jitter.c
17@@ -280,7 +280,7 @@ static void *thread_entropy_task(void *data)
18
19 /* Write to pipe */
20 written = 0;
21- while(written != me->buf_sz) {
22+ while(me->active && written != me->buf_sz) {
23 message(LOG_DAEMON|LOG_DEBUG, "Writing to pipe\n");
24 ret = write(me->pipe_fd, &tmpbuf[written], me->buf_sz - written);
25 message(LOG_DAEMON|LOG_DEBUG, "DONE Writing to pipe with return %ld\n", ret);
diff --git a/meta/recipes-support/rng-tools/rng-tools/rng-tools-5-fix-textrels-on-PIC-x86.patch b/meta/recipes-support/rng-tools/rng-tools/rng-tools-5-fix-textrels-on-PIC-x86.patch
deleted file mode 100644
index 614adab27f..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/rng-tools-5-fix-textrels-on-PIC-x86.patch
+++ /dev/null
@@ -1,114 +0,0 @@
1From d8b1bb8edd99b2898720b4f10d292a67d532db48 Mon Sep 17 00:00:00 2001
2From: "Francisco Blas Izquierdo Riera (klondike)" <klondike@gentoo.org>
3Date: Mon, 22 Oct 2018 15:29:36 +0800
4Subject: [PATCH 4/4] Fix assemby textrels on rdrand_asm.S on PIC x86
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9This patch updates the fixes in the assembly in rdrand_asm.S in
10sys-apps/rng-tools-5 so it won't generate textrels on PIC systems.
11The main fixes are in the use of leal in SETPTR for such systems, the rest is
12the usual PIC support stuff.
13
14This should fix Gentoo bug #469962 and help fix #518210
15
16This patch is released under the GPLv2 or a higher version license as is the
17original file as long as the author and the tester are credited.
18
19Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=469962
20Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=518210
21Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
22Reported-by: cilly <cilly@cilly.mine.nu>
23Reported-by: Manuel RĂ¼ger <mrueg@gentoo.org>
24Tested-by: Anthony Basile <blueness@gentoo.org>
25
26Upstream-Status: Pending
27---
28 rdrand_asm.S | 27 +++++++++++++++++++++++++++
29 1 file changed, 27 insertions(+)
30
31diff --git a/rdrand_asm.S b/rdrand_asm.S
32index b5d260a..7811cf2 100644
33--- a/rdrand_asm.S
34+++ b/rdrand_asm.S
35@@ -2,6 +2,7 @@
36 * Copyright (c) 2011-2014, Intel Corporation
37 * Authors: Fenghua Yu <fenghua.yu@intel.com>,
38 * H. Peter Anvin <hpa@linux.intel.com>
39+ * PIC code by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
40 *
41 * This program is free software; you can redistribute it and/or modify it
42 * under the terms and conditions of the GNU General Public License,
43@@ -172,7 +173,19 @@ ENTRY(x86_rdseed_or_rdrand_bytes)
44 jmp 4b
45 ENDPROC(x86_rdseed_or_rdrand_bytes)
46
47+#if defined(__PIC__)
48+#define INIT_PIC() \
49+ pushl %ebx ; \
50+ call __x86.get_pc_thunk.bx ; \
51+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
52+#define END_PIC() \
53+ popl %ebx
54+#define SETPTR(var,ptr) leal (var)@GOTOFF(%ebx),ptr
55+#else
56+#define INIT_PIC()
57+#define END_PIC()
58 #define SETPTR(var,ptr) movl $(var),ptr
59+#endif
60 #define PTR0 %eax
61 #define PTR1 %edx
62 #define PTR2 %ecx
63@@ -188,6 +201,7 @@ ENTRY(x86_aes_mangle)
64 movl 8(%ebp), %eax
65 movl 12(%ebp), %edx
66 push %esi
67+ INIT_PIC()
68 #endif
69 movl $512, CTR3 /* Number of rounds */
70
71@@ -278,6 +292,7 @@ offset = offset + 16
72 movdqa %xmm7, (7*16)(PTR1)
73
74 #ifdef __i386__
75+ END_PIC()
76 pop %esi
77 pop %ebp
78 #endif
79@@ -292,6 +307,7 @@ ENTRY(x86_aes_expand_key)
80 push %ebp
81 mov %esp, %ebp
82 movl 8(%ebp), %eax
83+ INIT_PIC()
84 #endif
85
86 SETPTR(aes_round_keys, PTR1)
87@@ -321,6 +337,7 @@ ENTRY(x86_aes_expand_key)
88 call 1f
89
90 #ifdef __i386__
91+ END_PIC()
92 pop %ebp
93 #endif
94 ret
95@@ -341,6 +358,16 @@ ENTRY(x86_aes_expand_key)
96
97 ENDPROC(x86_aes_expand_key)
98
99+#if defined(__i386__) && defined(__PIC__)
100+ .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
101+ .globl __x86.get_pc_thunk.bx
102+ .hidden __x86.get_pc_thunk.bx
103+ .type __x86.get_pc_thunk.bx, @function
104+__x86.get_pc_thunk.bx:
105+ movl (%esp), %ebx
106+ ret
107+#endif
108+
109 .bss
110 .balign 64
111 aes_round_keys:
112--
1132.7.4
114
diff --git a/meta/recipes-support/rng-tools/rng-tools/underquote.patch b/meta/recipes-support/rng-tools/rng-tools/underquote.patch
deleted file mode 100644
index aa4bbcb346..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/underquote.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 03fe7efa1bc04a83fb9b6787998e7baa7ee90646 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Mon, 22 Oct 2018 15:27:41 +0800
4Subject: [PATCH 3/4] Fix underquoted m4 entry. This causes a failure if gcrypt
5 isn't present:
6
7| configure: libgcrypt support disabled
8| ../rng-tools-5/configure: line 4345: ac_fn_c_try_link: command not found
9| configure: error: in `/media/build1/poky/build/tmp/work/i586-poky-linux/rng-tools/5-r0/build':
10
11RP
122016/2/16
13
14Upstream-Status: Pending
15
16Rebase to 6.6
17Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
18---
19 configure.ac | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/configure.ac b/configure.ac
23index dd1c30f..88d2be3 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -124,7 +124,7 @@ AS_IF(
27 [test "x$with_libgcrypt" != "xno"],
28 [
29 AC_CHECK_HEADER([gcrypt.h],
30- AC_CHECK_LIB(
31+ [AC_CHECK_LIB(
32 [gcrypt],
33 [gcry_check_version], ,
34 [
35@@ -133,7 +133,7 @@ AS_IF(
36 AC_MSG_NOTICE([libgcrypt support disabled])
37 fi
38 ]
39- ),
40+ )],
41 [if test "x$with_libgcrypt" != "xcheck"; then
42 AC_MSG_FAILURE([libgcrypt headers not found]); else
43 AC_MSG_NOTICE([libgcrypt support disabled])
44--
452.7.4
46
diff --git a/meta/recipes-support/rng-tools/rng-tools_6.6.bb b/meta/recipes-support/rng-tools/rng-tools_6.7.bb
index b0afa4b0eb..aeb558b2b7 100644
--- a/meta/recipes-support/rng-tools/rng-tools_6.6.bb
+++ b/meta/recipes-support/rng-tools/rng-tools_6.7.bb
@@ -10,16 +10,12 @@ DEPENDS = "sysfsutils"
10 10
11SRC_URI = "\ 11SRC_URI = "\
12 git://github.com/nhorman/rng-tools.git \ 12 git://github.com/nhorman/rng-tools.git \
13 file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \ 13 file://fix-rngd-fail-to-stop.patch \
14 file://0002-Add-argument-to-control-the-libargp-dependency.patch \
15 file://underquote.patch \
16 file://rng-tools-5-fix-textrels-on-PIC-x86.patch \
17 file://0001-configure.ac-fix-typo.patch \
18 file://init \ 14 file://init \
19 file://default \ 15 file://default \
20 file://rngd.service \ 16 file://rngd.service \
21" 17"
22SRCREV = "4ebc21d6f387bb7b4b3f6badc429e27b21c0a6ee" 18SRCREV = "9fc873c5af0e392632e6b736938b811f7ca97251"
23 19
24S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
25 21
@@ -31,6 +27,7 @@ PACKAGECONFIG_libc-musl = "libargp libjitterentropy"
31PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," 27PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
32PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," 28PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
33PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy" 29PACKAGECONFIG[libjitterentropy] = "--enable-jitterentropy,--disable-jitterentropy,libjitterentropy"
30PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl"
34PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl" 31PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 openssl"
35 32
36INITSCRIPT_NAME = "rng-tools" 33INITSCRIPT_NAME = "rng-tools"