[openwrt/openwrt] util-linux: Use SYS_getrandom in randutils.c

LEDE Commits lede-commits at lists.infradead.org
Fri May 19 13:44:27 PDT 2023


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3a935f7ea9214c831eccc585f0677c5132957dde

commit 3a935f7ea9214c831eccc585f0677c5132957dde
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu May 18 17:12:36 2023 +0200

    util-linux: Use SYS_getrandom in randutils.c
    
    The getrandom syscall is not hanging at bootup any more if there is
    not enough entropy. This was fixed upstream in 2018 in commit:
    https://github.com/util-linux/util-linux/commit/a9cf659e0508c1f56813a7d74c64f67bbc962538
    
    This OpenWrt patch is not needed any more.
    This reverts commit e64463ebde55 ("util-linux: avoid using the getrandom syscall")
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/utils/util-linux/Makefile                      |  2 +-
 package/utils/util-linux/patches/210-use-urandom.patch | 14 --------------
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile
index 8dab621390..704d4f11ec 100644
--- a/package/utils/util-linux/Makefile
+++ b/package/utils/util-linux/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=util-linux
 PKG_VERSION:=2.39
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.39
diff --git a/package/utils/util-linux/patches/210-use-urandom.patch b/package/utils/util-linux/patches/210-use-urandom.patch
deleted file mode 100644
index 5817209885..0000000000
--- a/package/utils/util-linux/patches/210-use-urandom.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/lib/randutils.c
-+++ b/lib/randutils.c
-@@ -26,6 +26,11 @@
- #define THREAD_LOCAL static
- #endif
- 
-+/* force /dev/urandom to avoid hanging on early boot */
-+#undef HAVE_GETRANDOM
-+#undef SYS_getrandom
-+#undef __NR_getrandom
-+
- #ifdef HAVE_GETRANDOM
- # include <sys/random.h>
- #elif defined (__linux__)




More information about the lede-commits mailing list