From 1fe0ac8846fad33545bd18333eddba88d8530257 Mon Sep 17 00:00:00 2001 From: Fab Date: Sun, 1 Sep 2024 03:41:38 +0800 Subject: [PATCH] #274 ATTENTION: FIRST COMMIT, TRIPLE CHECK FOR MISTAKES Added parallel package to buildroot (#275) Added parallel package to buildroot to close #274 Added .DS_Store due for development on mac clients. Updated readme.md regarding sg3_utils & parallel --- .gitignore | 1 + README.md | 22 +++++++++++-------- configs/shredos_defconfig | 3 +++ package/Config.in | 1 + package/parallel/Config.in | 12 ++++++++++ package/parallel/parallel.hash | 1 + package/parallel/parallel.mk | 16 ++++++++++++++ ...ssing-nl_langinfo-on-certain-configs.patch | 1 - .../procps-ng/0003-fix-pifd_open-check.patch | 3 +-- package/procps-ng/Config.in | 2 +- package/procps-ng/S02sysctl | 2 +- package/procps-ng/procps-ng.hash | 2 +- package/procps-ng/procps-ng.mk | 2 +- 13 files changed, 52 insertions(+), 16 deletions(-) create mode 100644 package/parallel/Config.in create mode 100644 package/parallel/parallel.hash create mode 100644 package/parallel/parallel.mk diff --git a/.gitignore b/.gitignore index bb02d9f572..fd05562182 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ *.rej *~ *.pyc +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index 0c8badf39d..5751cf1d64 100644 --- a/README.md +++ b/README.md @@ -76,8 +76,10 @@ A certificate can optionally be created for each drive erased, the default is to 1. [Nwipe's font size is too small, How to double the size of the text](#nwipes-font-size-is-too-small-how-to-double-the-size-of-the-text) 1. [Shredos includes the following related programs](#shredos-includes-the-following-related-programs) 1. [smartmontools](#smartmontools) - 1. [hexedit](#hexedit) 1. [hdparm](#hdparm) + 1. [hexedit](#hexedit) + 1. [nvme-cli](#hdparm) + 1. [sg3_utils](#sg3_utils) 1. [Compiling shredos and burning to USB stick, the harder way!](#compiling-shredos-and-burning-to-usb-stick-the-harder-way-) 1. [Install the following prerequisite software first. Without this software, the make command will fail](https://github.com/PartialVolume/shredos.x86_64/blob/master/README.md#install-the-following-prerequisite-software-first-without-this-software-the-make-command-will-fail) 1. [Download the ShredOS source using the git command and build ShredOS](https://github.com/PartialVolume/shredos.x86_64/blob/master/README.md#download-the-shredos-source-using-the-git-command-and-build-shredos) @@ -106,7 +108,7 @@ ShredOS can be used as a software image and booted via the network using a clien You can also use ShredOS on headless systems or systems with faulty display hardware as it includes a user enabled telnet server. Further details can be found here. [How to wipe drives on headless systems or systems with faulty or missing display hardware or keyboards](#how-to-wipe-drives-on-headless-systems-or-systems-with-faulty-display-hardware-for-use-on-secure-lans-only) -ShredOS includes the latest Nwipe official release, but in addition includes other disk related utilities such as Smartmontools, hdparm, a hexeditor [hexedit](https://linux.die.net/man/1/hexedit), and, the program loadkeys which can be used for [setting the keyboard layout](https://github.com/PartialVolume/shredos.2020.02/blob/master/README.md#how-to-set-the-keyboard-map-using-the-loadkeys-command-see-here-for-persistent-change-between-reboots). Nwipe automatically starts it's GUI in the first virtual terminal (ALT-F1), hdparm, smartmontools and hexeditor can be run in the second virtual terminal, (ALT-F2). Nwipe will erase drives using a user selectable choice of seven methods. hdparm - amongst many of its options - can be used for wiping a drive by [issueing ATA erase commands to the drive's internal firmware](https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase). This is a planned feature addition to nwipe. +ShredOS includes the latest Nwipe official release, but in addition includes other disk related utilities such as Smartmontools, hdparm, a hexeditor [hexedit](https://linux.die.net/man/1/hexedit), and, the program loadkeys which can be used for [setting the keyboard layout](https://github.com/PartialVolume/shredos.2020.02/blob/master/README.md#how-to-set-the-keyboard-map-using-the-loadkeys-command-see-here-for-persistent-change-between-reboots). Nwipe automatically starts it's GUI in the first virtual terminal (ALT-F1), hdparm, smartmontools and hexeditor can be run in the second virtual terminal, (ALT-F2). Nwipe will erase drives using a user selectable choice of seven methods. hdparm - amongst many of its options - can be used for wiping a drive by issueing [ATA erase commands](https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase) or [SAS erase commands](https://github.com/gms-electronics/formatingguide) interface commands to the firmware of the storrage device. This is a planned feature addition to nwipe. ShredOS boots very quickly and depending upon the host system can boot in as little as 2 seconds (typically 4 to 6 seconds) on modern hardware, while on an old Pentium4 may take 40+ seconds. Nwipe automatically starts in GUI mode and will list the disks present on the host system. In fact, on version of ShredOS earlier than [v2023.08.2_25.0_x86-64_0.35](https://github.com/PartialVolume/shredos.x86_64/releases/tag/v2023.08.2_25.0_x86-64_0.35) nwipe can launch so fast that the USB devices have not yet initialised so the first time nwipe appears it may not show any USB drives, this behaviour has been fixed from version v2023.08.2_25.0_x86-64_0.35 onwards so there will usually be a delay of about 5-10 seconds while the USB devices are initialised. On older versions of ShredOS you would use Control-C to exit and restart nwipe to see any attached USB devices. You can then select the methods by which you want to securely erase the disk/s. Nwipe is able to simultanuosly wipe multiple disks using a threaded software architecture. I have simultaneously wiped 28 loop devices in tests and know of instances where it's been used to simultaneuosly wipe upwards of fifty drives on a rack server. @@ -597,27 +599,29 @@ After running the setfont command. #### smartmontools Nwipes ability to detect serial numbers on USB devices now works on USB bridges who's chipset supports that functionality. Smartmontools provides nwipe with that capability. Smartmontools can be used in the second or third virtual terminal. ALT-F2 and ALT-F3. -#### hexedit -Use hexedit to examine and modify the contents of a hard disk. Hexedit can be used in the second or third virtual terminal. ALT-F2 and ALT-F3. - #### hdparm hdparm has many uses and is a powerfull tool. Although Nwipe will be adding ATA secure erase capability, i.e using the hard disk own firmware to initiate an erase, nwipe currently wipes drives using the traditional method of writing to every block. If you want to initiate a ATA secure erase using the drives firmware then hdparm will be of use. -#### nvme -nvme can be used run a secure erase on NVMe devices. +#### hexedit +Use hexedit to examine and modify the contents of a hard disk. Hexedit can be used in the second or third virtual terminal. ALT-F2 and ALT-F3. +#### nvme +nvme can be used run a secure erase on NVMe devices. + +#### sg3_utils +Like hdparm sg3_utils has many applications such as changes to the disk's block sizes, removal of scsi integrity protection and firmware level reformating (such as sanitization or secure erase). nwipe currently wipes drives using the traditional method of writing to every block. If you want to initiate a SCSI / SAS secure erase using the drives firmware then sg3_utils will be of use, it can also be used in conjunction with gnu parallel to format multiple drives at once. ## Compiling ShredOS and burning to USB stick, the harder way ! The ShredOS system is based on the buildroot tool whos main application is to create operating systems for embedded systems. The image (.img) file is approximately 260 MiB and can be written to a USB memory stick with a tool such as dd or Etcher. -### You can build shredos using the following commands. This example build was compiled on KDE Neon (Ubuntu 20.04). +### You can build shredos using the following commands. This example build was compiled on KDE Neon (Ubuntu 24.04 LTSl). #### Install the following prerequisite software first. Without this software, the make command will fail ``` $ sudo apt install git -$ sudo apt install build-essential pkg-config automake libncurses5-dev autotools-dev libparted-dev dmidecode coreutils smartmontools +$ sudo apt install build-essential pkg-config automake libncurses5-dev autotools-dev libparted-dev dmidecode coreutils smartmontools unzip $ sudo apt-get install libssl-dev $ sudo apt-get install libelf-dev $ sudo apt-get install mtools diff --git a/configs/shredos_defconfig b/configs/shredos_defconfig index 9728db6a78..922c2572a8 100644 --- a/configs/shredos_defconfig +++ b/configs/shredos_defconfig @@ -102,6 +102,7 @@ BR2_PACKAGE_SG3_UTILS_PROGS=y BR2_PACKAGE_SMARTMONTOOLS=y BR2_PACKAGE_SYSSTAT=y BR2_PACKAGE_TRIGGERHAPPY=y +BR2_PACKAGE_PERL=y BR2_PACKAGE_PYTHON_PYASN1_MODULES=y BR2_PACKAGE_PYTHON_PYNDIFF=y BR2_PACKAGE_PYTHON_SCAPY=y @@ -141,7 +142,9 @@ BR2_PACKAGE_WIREGUARD_TOOLS=y BR2_PACKAGE_RESTORECOND=y BR2_PACKAGE_SELINUX_PYTHON=y BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW=y +BR2_PACKAGE_PARALLEL=y BR2_PACKAGE_TMUX=y +BR2_PACKAGE_PROCPS_NG=y BR2_PACKAGE_RUNC=y BR2_PACKAGE_UTIL_LINUX_BINARIES=y BR2_PACKAGE_UTIL_LINUX_AGETTY=y diff --git a/package/Config.in b/package/Config.in index 086c25663d..3291d18cb7 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2690,6 +2690,7 @@ comment "Utilities" source "package/logsurfer/Config.in" source "package/minisign/Config.in" source "package/neofetch/Config.in" + source "package/parallel/Config.in" source "package/pdmenu/Config.in" source "package/pinentry/Config.in" source "package/qprint/Config.in" diff --git a/package/parallel/Config.in b/package/parallel/Config.in new file mode 100644 index 0000000000..3cc53ee143 --- /dev/null +++ b/package/parallel/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PARALLEL + bool "parallel" + depends on BR2_PACKAGE_PERL + depends on BR2_PACKAGE_PROCPS_NG + help + A shell tool for executing jobs in parallel. + + https://www.gnu.org/software/parallel/ + +comment "parallel needs Perl and procps-ng" + depends on BR2_PACKAGE_PERL + depends on BR2_PACKAGE_PROCPS_NG diff --git a/package/parallel/parallel.hash b/package/parallel/parallel.hash new file mode 100644 index 0000000000..d0370e36f1 --- /dev/null +++ b/package/parallel/parallel.hash @@ -0,0 +1 @@ +sha256 d7bbd95b7631980b172be04cbd2138d5f7d8c063d6da5ad8f9f70dfd88c8309d parallel-20240822.tar.bz2 \ No newline at end of file diff --git a/package/parallel/parallel.mk b/package/parallel/parallel.mk new file mode 100644 index 0000000000..a3411d0ecb --- /dev/null +++ b/package/parallel/parallel.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# parallel +# +################################################################################ + +# https://ftp.gnu.org/gnu/parallel/parallel-20240822.tar.bz2.sig +# Latest version can always be sourced at https://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2 + +PARALLEL_VERSION = 20240822 +PARALLEL_SOURCE = parallel-$(PARALLEL_VERSION).tar.bz2 +PARALLEL_SITE = https://ftp.gnu.org/gnu/parallel +PARALLEL_LICENSE = GPL-3.0-only +PARALLEL_LICENSE_FILES = LICENSES/GPL-3.0-only.txt + +$(eval $(autotools-package)) \ No newline at end of file diff --git a/package/procps-ng/0002-escape-c-Fix-missing-nl_langinfo-on-certain-configs.patch b/package/procps-ng/0002-escape-c-Fix-missing-nl_langinfo-on-certain-configs.patch index f3e2b126a6..55246bfad4 100644 --- a/package/procps-ng/0002-escape-c-Fix-missing-nl_langinfo-on-certain-configs.patch +++ b/package/procps-ng/0002-escape-c-Fix-missing-nl_langinfo-on-certain-configs.patch @@ -31,4 +31,3 @@ index 2e8fb7dd..cf4a80de 100644 #define SECURE_ESCAPE_ARGS(dst, bytes, cells) do { \ -- GitLab - diff --git a/package/procps-ng/0003-fix-pifd_open-check.patch b/package/procps-ng/0003-fix-pifd_open-check.patch index 7152901e70..774287b763 100644 --- a/package/procps-ng/0003-fix-pifd_open-check.patch +++ b/package/procps-ng/0003-fix-pifd_open-check.patch @@ -55,5 +55,4 @@ index c4ad5da3..29cfedf7 100644 #include #endif -- -2.35.1 - +2.35.1 \ No newline at end of file diff --git a/package/procps-ng/Config.in b/package/procps-ng/Config.in index 6ff8983202..3087a67e5c 100644 --- a/package/procps-ng/Config.in +++ b/package/procps-ng/Config.in @@ -7,4 +7,4 @@ config BR2_PACKAGE_PROCPS_NG Standard informational utilities and process-handling tools. Provides things like kill, ps, uptime, free, top, etc... - http://sourceforge.net/projects/procps-ng/ + http://sourceforge.net/projects/procps-ng/ \ No newline at end of file diff --git a/package/procps-ng/S02sysctl b/package/procps-ng/S02sysctl index 85d9ed50d0..a049ffc28b 100644 --- a/package/procps-ng/S02sysctl +++ b/package/procps-ng/S02sysctl @@ -91,4 +91,4 @@ case "$1" in *) echo "Usage: $0 {start|stop|restart|reload}" exit 1 -esac +esac \ No newline at end of file diff --git a/package/procps-ng/procps-ng.hash b/package/procps-ng/procps-ng.hash index 09f2ebd0cb..55e6c27d5f 100644 --- a/package/procps-ng/procps-ng.hash +++ b/package/procps-ng/procps-ng.hash @@ -5,4 +5,4 @@ sha1 a52952e8bc6aaab812176c00d25adc4d4e1552e2 procps-ng-3.3.17.tar.xz # http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-3.3.17.tar.xz.asc sha256 4518b3e7aafd34ec07d0063d250fd474999b20b200218c3ae56f5d2113f141b4 procps-ng-3.3.17.tar.xz sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING -sha256 681e386e44a19d7d0674b4320272c90e66b6610b741e7e6305f8219c42e85366 COPYING.LIB +sha256 681e386e44a19d7d0674b4320272c90e66b6610b741e7e6305f8219c42e85366 COPYING.LIB \ No newline at end of file diff --git a/package/procps-ng/procps-ng.mk b/package/procps-ng/procps-ng.mk index ba8958d146..afdb815a9c 100644 --- a/package/procps-ng/procps-ng.mk +++ b/package/procps-ng/procps-ng.mk @@ -64,4 +64,4 @@ define PROCPS_NG_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S02sysctl endef -$(eval $(autotools-package)) +$(eval $(autotools-package)) \ No newline at end of file