Serenity Operating System

Ports: Add GNU cpio archive utility port

authored by

Liav A and committed by
Linus Groh
f8611ec7 1cd61007

+51
+1
Ports/AvailablePorts.md
··· 31 31 | [`cmatrix`](cmatrix/) | cmatrix | 3112b12 | https://github.com/abishekvashok/cmatrix | 32 32 | [`composer`](composer/) | Composer | 2.3.5 | https://getcomposer.org/ | 33 33 | [`coreutils`](coreutils/) | GNU core utilities | 9.1 | https://www.gnu.org/software/coreutils/ | 34 + | [`cpio`](cpio/) | GNU cpio archive utility | 2.13 | https://www.gnu.org/software/cpio/ | 34 35 | [`curl`](curl/) | curl | 7.83.1 | https://curl.se/ | 35 36 | [`dash`](dash/) | DASH | 0.5.10.2 | http://gondor.apana.org.au/~herbert/dash | 36 37 | [`dialog`](dialog/) | Dialog | 1.3-20220526 | https://invisible-island.net/dialog/ |
+8
Ports/cpio/package.sh
··· 1 + #!/usr/bin/env -S bash ../.port_include.sh 2 + port='cpio' 3 + version='2.13' 4 + useconfigure='true' 5 + use_fresh_config_sub='true' 6 + config_sub_paths=('build-aux/config.sub') 7 + files="https://ftp.gnu.org/gnu/cpio/cpio-${version}.tar.gz cpio-${version}.tar.gz e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88" 8 + auth_type='sha256'
+34
Ports/cpio/patches/0001-Use-global-program_name-variable-from-gnu-dir.patch
··· 1 + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 + From: Liav A <liavalb@gmail.com> 3 + Date: Sat, 25 Jun 2022 05:45:29 +0300 4 + Subject: [PATCH] Use global program_name variable from gnu dir 5 + 6 + Without this patch being applied, there would be a conflict between the 7 + variables between the 2 locations, so it will not compile otherwise. 8 + 9 + --- 10 + src/global.c | 4 +--- 11 + 1 file changed, 1 insertion(+), 3 deletions(-) 12 + 13 + diff --git a/src/global.c b/src/global.c 14 + index fb3abe9..9ea63aa 100644 15 + --- a/src/global.c 16 + +++ b/src/global.c 17 + @@ -20,6 +20,7 @@ 18 + #include <system.h> 19 + 20 + #include <sys/types.h> 21 + +#include "gnu/progname.h" 22 + #include "cpiohdr.h" 23 + #include "dstring.h" 24 + #include "extern.h" 25 + @@ -184,9 +185,6 @@ unsigned int warn_option = 0; 26 + /* Extract to standard output? */ 27 + bool to_stdout_option = false; 28 + 29 + -/* The name this program was run with. */ 30 + -char *program_name; 31 + - 32 + /* A pointer to either lstat or stat, depending on whether 33 + dereferencing of symlinks is done for input files. */ 34 + int (*xstat) ();
+8
Ports/cpio/patches/ReadMe.md
··· 1 + # Patches for cpio on SerenityOS 2 + 3 + ## `0001-Use-global-program_name-variable-from-gnu-dir.patch` 4 + 5 + Use global program_name variable from gnu dir 6 + 7 + Without this patch being applied, there would be a conflict between the 8 + variables between the 2 locations, so it will not compile otherwise.