Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/urandom-scripts: move seedrng init script to S01
@ 2023-09-30 13:42 Peter Korsgaard
  2023-09-30 19:01 ` Yann E. MORIN
  2023-10-13 10:15 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-09-30 13:42 UTC (permalink / raw)
  To: buildroot

We want to initialize the kernel random number generator as soon as
possible, as early init scripts may also need random numbers (E.G.
syslog-ng in S01syslog-ng does).

Seedrng was presumably only using S20 because the previos urandom script
used S20, which (after som moves) dates all the way back to:

commit 8262508fc4456b5230216473ea14c897268ba791
Author: Eric Andersen <andersen@codepoet.org>
Date:   Fri Apr 26 22:01:43 2002 +0000

    With this update, everything now works as expected.
     -Erik

Seedrng needs persistent storage, but mount -a is run before executing the
init scripts, so S01 should be as good as S20 - Atleast with the scripts in
upstream Buildroot.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/urandom-scripts/{S20seedrng => S01seedrng} | 0
 package/urandom-scripts/urandom-scripts.mk         | 4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename package/urandom-scripts/{S20seedrng => S01seedrng} (100%)

diff --git a/package/urandom-scripts/S20seedrng b/package/urandom-scripts/S01seedrng
similarity index 100%
rename from package/urandom-scripts/S20seedrng
rename to package/urandom-scripts/S01seedrng
diff --git a/package/urandom-scripts/urandom-scripts.mk b/package/urandom-scripts/urandom-scripts.mk
index 32f3e09343..89abdfff72 100644
--- a/package/urandom-scripts/urandom-scripts.mk
+++ b/package/urandom-scripts/urandom-scripts.mk
@@ -5,8 +5,8 @@
 ################################################################################
 
 define URANDOM_SCRIPTS_INSTALL_INIT_SYSV
-	$(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S20seedrng \
-		$(TARGET_DIR)/etc/init.d/S20seedrng
+	$(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S01seedrng \
+		$(TARGET_DIR)/etc/init.d/S01seedrng
 endef
 
 $(eval $(generic-package))
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/urandom-scripts: move seedrng init script to S01
  2023-09-30 13:42 [Buildroot] [PATCH] package/urandom-scripts: move seedrng init script to S01 Peter Korsgaard
@ 2023-09-30 19:01 ` Yann E. MORIN
  2023-10-13 10:15 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2023-09-30 19:01 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: buildroot

Peter, All,

On 2023-09-30 15:42 +0200, Peter Korsgaard spake thusly:
> We want to initialize the kernel random number generator as soon as
> possible, as early init scripts may also need random numbers (E.G.
> syslog-ng in S01syslog-ng does).
> 
> Seedrng was presumably only using S20 because the previos urandom script
> used S20, which (after som moves) dates all the way back to:
> 
> commit 8262508fc4456b5230216473ea14c897268ba791
> Author: Eric Andersen <andersen@codepoet.org>
> Date:   Fri Apr 26 22:01:43 2002 +0000
> 
>     With this update, everything now works as expected.
>      -Erik
> 
> Seedrng needs persistent storage, but mount -a is run before executing the
> init scripts, so S01 should be as good as S20 - Atleast with the scripts in
> upstream Buildroot.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/urandom-scripts/{S20seedrng => S01seedrng} | 0
>  package/urandom-scripts/urandom-scripts.mk         | 4 ++--
>  2 files changed, 2 insertions(+), 2 deletions(-)
>  rename package/urandom-scripts/{S20seedrng => S01seedrng} (100%)
> 
> diff --git a/package/urandom-scripts/S20seedrng b/package/urandom-scripts/S01seedrng
> similarity index 100%
> rename from package/urandom-scripts/S20seedrng
> rename to package/urandom-scripts/S01seedrng
> diff --git a/package/urandom-scripts/urandom-scripts.mk b/package/urandom-scripts/urandom-scripts.mk
> index 32f3e09343..89abdfff72 100644
> --- a/package/urandom-scripts/urandom-scripts.mk
> +++ b/package/urandom-scripts/urandom-scripts.mk
> @@ -5,8 +5,8 @@
>  ################################################################################
>  
>  define URANDOM_SCRIPTS_INSTALL_INIT_SYSV
> -	$(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S20seedrng \
> -		$(TARGET_DIR)/etc/init.d/S20seedrng
> +	$(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S01seedrng \
> +		$(TARGET_DIR)/etc/init.d/S01seedrng
>  endef
>  
>  $(eval $(generic-package))
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/urandom-scripts: move seedrng init script to S01
  2023-09-30 13:42 [Buildroot] [PATCH] package/urandom-scripts: move seedrng init script to S01 Peter Korsgaard
  2023-09-30 19:01 ` Yann E. MORIN
@ 2023-10-13 10:15 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-10-13 10:15 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > We want to initialize the kernel random number generator as soon as
 > possible, as early init scripts may also need random numbers (E.G.
 > syslog-ng in S01syslog-ng does).

 > Seedrng was presumably only using S20 because the previos urandom script
 > used S20, which (after som moves) dates all the way back to:

 > commit 8262508fc4456b5230216473ea14c897268ba791
 > Author: Eric Andersen <andersen@codepoet.org>
 > Date:   Fri Apr 26 22:01:43 2002 +0000

 >     With this update, everything now works as expected.
 >      -Erik

 > Seedrng needs persistent storage, but mount -a is run before executing the
 > init scripts, so S01 should be as good as S20 - Atleast with the scripts in
 > upstream Buildroot.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2023.02.x and 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-13 10:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-30 13:42 [Buildroot] [PATCH] package/urandom-scripts: move seedrng init script to S01 Peter Korsgaard
2023-09-30 19:01 ` Yann E. MORIN
2023-10-13 10:15 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox