mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
rng-tools: Move from core package to addon - fixes bug 12900
- This patch is to move the rng-tools package from a core package to an addon. With the kernel changes from 5.6 rngd is no longer needed to create the required kernel entropy. - The results from HRNG's via rngd are used with an XOR after the entropy is collected by the kernel. So the HWRNG output is used to dilute the kernel random number data, which is already merged from several sources. - Based on the above and @Paul's request in the bug report to have rng-tools kept as an addon this patch set is submitted for consideration to keep rng-tools but as an addon. - move rng-tools rootfile from common to packages - Modify rng-tools lfs from core package to addon package - Create rng-tools pak to install and uninstall - creating rc.d links for start & stop. - Move rngd initscript from system to packages directory. - Installed into my vm testbed and confirmed that it works. No rngd daemon installed from iso install. After addon install rngd is present and running. Added various files to be able to test the services wui page. rngd shows up and can be turned off and on Fixes: Bug#12900 Tested-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
This commit is contained in:
committed by
Peter Müller
parent
4b8fef1371
commit
f4b849cb3f
@@ -1,4 +1,6 @@
|
||||
usr/bin/randstat
|
||||
usr/bin/rngtest
|
||||
usr/sbin/rngd
|
||||
#usr/share/man/man1/rngtest.1
|
||||
#usr/share/man/man8/rngd.8
|
||||
etc/rc.d/init.d/rngd
|
||||
@@ -1,7 +1,7 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
|
||||
# Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
@@ -25,12 +25,19 @@
|
||||
include Config
|
||||
|
||||
VER = 6.14
|
||||
SUMMARY = This is a random number generator daemon
|
||||
|
||||
THISAPP = rng-tools-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = rng-tools
|
||||
PAK_VER = 1
|
||||
|
||||
DEPS =
|
||||
|
||||
SERVICES = rngd
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
@@ -50,6 +57,9 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
b2 : $(subst %,%_BLAKE2,$(objects))
|
||||
|
||||
dist:
|
||||
@$(PAK)
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, b2sum
|
||||
###############################################################################
|
||||
@@ -77,5 +87,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
--without-rtlsdr
|
||||
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
|
||||
cd $(DIR_APP) && make $(EXTRA_INSTALL) install
|
||||
#install initscript
|
||||
$(call INSTALL_INITSCRIPTS,$(SERVICES))
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
|
||||
30
src/paks/rng-tools/install.sh
Normal file
30
src/paks/rng-tools/install.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007-2023 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
extract_files
|
||||
# create startlinks
|
||||
ln -sf ../init.d/rngd /etc/rc.d/rc0.d/K35rngd
|
||||
ln -sf ../init.d/rngd /etc/rc.d/rc3.d/S65rngd
|
||||
ln -sf ../init.d/rngd /etc/rc.d/rc6.d/K35rngd
|
||||
start_service --background rngd
|
||||
28
src/paks/rng-tools/uninstall.sh
Normal file
28
src/paks/rng-tools/uninstall.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007-2023 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
stop_service rngd
|
||||
remove_files
|
||||
# Remove all start links.
|
||||
rm -rf /etc/rc.d/rc*.d/*rngd
|
||||
26
src/paks/rng-tools/update.sh
Normal file
26
src/paks/rng-tools/update.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007-2023 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
./uninstall.sh
|
||||
./install.sh
|
||||
Reference in New Issue
Block a user