mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2024-09-20 11:23:16 +00:00
main/rng-tools: upgrade to 6.17
This commit is contained in:
parent
0b00bd7827
commit
0324d8c7e0
4 changed files with 3 additions and 114 deletions
|
@ -1,27 +0,0 @@
|
|||
From: Dermot Bradley <dermot_bradley@yahoo.com>
|
||||
Date: Mon, 10 Apr 2023 14:25 +0100
|
||||
|
||||
When -i used, the fips_run_rng_test() should not be called in
|
||||
update_kernel_random().
|
||||
|
||||
Upstream PR #189, already merged in master.
|
||||
|
||||
---
|
||||
|
||||
diff -aur a/rngd.c b/rngd.c
|
||||
--- a/rngd.c
|
||||
+++ b/rngd.c
|
||||
@@ -728,10 +728,11 @@
|
||||
unsigned char *buf, fips_ctx_t *fipsctx_in)
|
||||
{
|
||||
unsigned char *p;
|
||||
- int fips;
|
||||
+ int fips = 0;
|
||||
int rc;
|
||||
|
||||
- fips = fips_run_rng_test(fipsctx_in, buf);
|
||||
+ if (!arguments->ignorefail)
|
||||
+ fips = fips_run_rng_test(fipsctx_in, buf);
|
||||
if (fips && !arguments->ignorefail)
|
||||
return 1;
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
From: Dermot Bradley <dermot_bradley@yahoo.com>
|
||||
Date: Mon, 10 Apr 2023 14:25 +0100
|
||||
|
||||
As buffer size in do_loop() is FIPS_RNG_BUFFER_SIZE, so the random_step
|
||||
should not bigger. If random_step > FIPS_RNG_BUFFER_SIZE,
|
||||
update_kernel_random() will not write any date.
|
||||
|
||||
Upstream PR #190, already merged in master.
|
||||
|
||||
---
|
||||
|
||||
diff -aur a/rngd.c b/rngd.c
|
||||
--- a/rngd.c
|
||||
+++ b/rngd.c
|
||||
@@ -623,6 +623,8 @@
|
||||
case 's':
|
||||
if (sscanf(arg, "%i", &arguments->random_step) == 0)
|
||||
argp_usage(state);
|
||||
+ if (arguments->random_step > FIPS_RNG_BUFFER_SIZE || arguments->random_step < 0)
|
||||
+ arguments->random_step = FIPS_RNG_BUFFER_SIZE;
|
||||
break;
|
||||
case 'W': {
|
||||
int n;
|
|
@ -1,55 +0,0 @@
|
|||
From: Dermot Bradley <dermot_bradley@yahoo.com>
|
||||
Date: Mon, 24 Apr 2023 15:37 +0100
|
||||
|
||||
Change the size of the Linux poolsize from 4096 to 256 to reflect
|
||||
that of modern/recent Linux kernels.
|
||||
|
||||
Upstream PR #196 submitted.
|
||||
|
||||
---
|
||||
|
||||
diff -aur a/rngd.8.in b/rngd.8.in
|
||||
--- a/rngd.8.in
|
||||
+++ b/rngd.8.in
|
||||
@@ -108,7 +108,7 @@
|
||||
Setting this too high will cause \fIrngd\fR to dominate the contents of the
|
||||
entropy pool. Low values will hurt system performance during entropy
|
||||
starves. Do not set \fIfill-watermark\fR above the size of the
|
||||
-entropy pool (usually 4096 bits). A value of 0 to this option will cause no
|
||||
+entropy pool (usually 256 bits). A value of 0 to this option will cause no
|
||||
watermark to be set.
|
||||
.TP
|
||||
\fB\-R\fI n\fR, \fB\-\-force-reseed=\fInnn\fR
|
||||
diff -aur a/rngd.c b/rngd.c
|
||||
--- a/rngd.c
|
||||
+++ b/rngd.c
|
||||
@@ -120,7 +120,7 @@
|
||||
"Number of bytes written to random-device at a time (default: 64)" },
|
||||
|
||||
{ "fill-watermark", 'W', "n", 0,
|
||||
- "Do not stop feeding entropy to random-device until at least n bits of entropy are available in the pool (default: 3/4 of poolsize), 0 <= n <= 4096" },
|
||||
+ "Do not stop feeding entropy to random-device until at least n bits of entropy are available in the pool (default: 3/4 of poolsize), 0 <= n <= 256" },
|
||||
|
||||
{ "quiet", 'q', 0, 0, "Suppress all messages" },
|
||||
|
||||
@@ -628,7 +628,7 @@
|
||||
break;
|
||||
case 'W': {
|
||||
int n;
|
||||
- if ((sscanf(arg, "%i", &n) == 0) || (n < 0) || (n > 4096))
|
||||
+ if ((sscanf(arg, "%i", &n) == 0) || (n < 0) || (n > 256))
|
||||
argp_usage(state);
|
||||
else
|
||||
arguments->fill_watermark = n;
|
||||
diff -aur a/rngd_linux.c b/rngd_linux.c
|
||||
--- a/rngd_linux.c
|
||||
+++ b/rngd_linux.c
|
||||
@@ -60,7 +60,7 @@
|
||||
* randomdev is the path to the random device
|
||||
*/
|
||||
|
||||
-#define DEFAULT_WATERMARK_GUESS 4096
|
||||
+#define DEFAULT_WATERMARK_GUESS 256
|
||||
|
||||
void init_kernel_rng(const char* randomdev)
|
||||
{
|
|
@ -9,8 +9,8 @@ pkgname=rng-tools
|
|||
# *both* packages may not be released at the same time and potentially
|
||||
# upgrading rng-tools alone could break the rngd jitter functionality).
|
||||
#
|
||||
pkgver=6.16
|
||||
pkgrel=5
|
||||
pkgver=6.17
|
||||
pkgrel=0
|
||||
pkgdesc="Random number generator daemon"
|
||||
url="https://github.com/nhorman/rng-tools"
|
||||
arch="all"
|
||||
|
@ -37,9 +37,6 @@ subpackages="
|
|||
rng-tools-extra-openrc:extra_openrc
|
||||
"
|
||||
source="rng-tools-$pkgver.tar.gz::https://github.com/nhorman/rng-tools/archive/v$pkgver.tar.gz
|
||||
01-fix-ignorefail.patch
|
||||
02-fix-random_step-boundary.patch
|
||||
03-correct-linux-poolsize.patch
|
||||
README.Alpine
|
||||
rngd.confd
|
||||
rngd.confd-arm
|
||||
|
@ -143,10 +140,7 @@ extra_openrc() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
f4155dca8a54f47227f49ccf5f8453ddd50bd91a37b3b1659b5ad02278ed119028cee42918dd48552c79e19f2e2477277a41afa8e422395b2778b17fab09484d rng-tools-6.16.tar.gz
|
||||
6cef58eb21f814d2f74484114f1c8d5a57fcdf2eb1c0c34377716df5ff3b15a37f582099b67f9b75be1dd56a34c8c85573b1057a002efdd585af68d41f1e403d 01-fix-ignorefail.patch
|
||||
5999206a5d35e58973c5a5d3d4f73e1060b9d02b4653fd6bd3d140fa127a7bbdb2fe1108fc556ee6cf9628d6699a561e414a56e14fff125f0fb401c236ef5fd3 02-fix-random_step-boundary.patch
|
||||
11941117d3125529464b277b7d0e719a783c49ebb80d7132a89f134fe2b4e7c7c5f36f101ef2eca1d4ad65affcb889bc9542de0a98613bf8214e322af0aa8367 03-correct-linux-poolsize.patch
|
||||
fe874e578c0d5916c271ed5a96b87ed8bb5ce4238cc158471d390ca32864959206b0657dd5910ebb0730a3987f3bf9656690759f5a910d1c4a5891a27678e60d rng-tools-6.17.tar.gz
|
||||
ed483460a47f92d3debf8ba4cc14781b87b8b5dc0fc98f6ac84a3f5996355a69f4d077226e7aa5a0b07e8e1cbcabef86bc626ec5635f5e0c121cdf9f1728d72e README.Alpine
|
||||
489b9ea52b31c7e3aef495a76184df23becea679422a3e2232c8f2217f3d6b9bddd3fdd8d17e04cd9ab4a014e234daddd98078938a6afb0197cae71c5969baf1 rngd.confd
|
||||
c315e6306bb93233bcd75d216b778eea3487a75244335e13b9586c267dd4423c2a5f93119f3dd2da6aed847b8a0fe97d2cc62fc6a40141c1ea1cd9caf0f3ff8f rngd.confd-arm
|
||||
|
|
Loading…
Reference in a new issue