]> git.ipfire.org Git - pakfire.git/log
pakfire.git
7 months agolinter: Remove the unused ELF stuff
Michael Tremer [Thu, 2 Jan 2025 15:45:20 +0000 (15:45 +0000)] 
linter: Remove the unused ELF stuff

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Move RUNPATH check
Michael Tremer [Thu, 2 Jan 2025 15:43:01 +0000 (15:43 +0000)] 
ELF: Move RUNPATH check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Move the CF Protection check
Michael Tremer [Thu, 2 Jan 2025 14:52:28 +0000 (14:52 +0000)] 
ELF: Move the CF Protection check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Move RELRO check
Michael Tremer [Wed, 1 Jan 2025 17:56:45 +0000 (17:56 +0000)] 
ELF: Move RELRO check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Move execstack check
Michael Tremer [Wed, 1 Jan 2025 17:42:44 +0000 (17:42 +0000)] 
ELF: Move execstack check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Move SSP check
Michael Tremer [Wed, 1 Jan 2025 17:39:04 +0000 (17:39 +0000)] 
ELF: Move SSP check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Don't strip unneeded stuff
Michael Tremer [Wed, 1 Jan 2025 17:37:52 +0000 (17:37 +0000)] 
stripper: Don't strip unneeded stuff

We will otherwise loose the symtab and then we cannot perform the SSP
check any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Move the PIE check
Michael Tremer [Wed, 1 Jan 2025 17:28:59 +0000 (17:28 +0000)] 
ELF: Move the PIE check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Use the new strip check for debug information
Michael Tremer [Wed, 1 Jan 2025 17:25:35 +0000 (17:25 +0000)] 
linter: Use the new strip check for debug information

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Use new functions to check the Build ID
Michael Tremer [Wed, 1 Jan 2025 17:23:58 +0000 (17:23 +0000)] 
linter: Use new functions to check the Build ID

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Implement reading the Debuglink
Michael Tremer [Wed, 1 Jan 2025 17:22:36 +0000 (17:22 +0000)] 
ELF: Implement reading the Debuglink

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Use the ELF strip check
Michael Tremer [Wed, 1 Jan 2025 17:19:00 +0000 (17:19 +0000)] 
linter: Use the ELF strip check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Replace the ELF check
Michael Tremer [Wed, 1 Jan 2025 17:17:00 +0000 (17:17 +0000)] 
linter: Replace the ELF check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Use the new ELF object
Michael Tremer [Wed, 1 Jan 2025 17:14:54 +0000 (17:14 +0000)] 
linter: Use the new ELF object

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Only strip files that are not stripped, yet
Michael Tremer [Wed, 1 Jan 2025 17:08:30 +0000 (17:08 +0000)] 
stripper: Only strip files that are not stripped, yet

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Add function to check if a file is stripped
Michael Tremer [Wed, 1 Jan 2025 17:08:11 +0000 (17:08 +0000)] 
ELF: Add function to check if a file is stripped

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofile: Actually only replace /usr/bin/env as interpreter
Michael Tremer [Wed, 1 Jan 2025 17:00:22 +0000 (17:00 +0000)] 
file: Actually only replace /usr/bin/env as interpreter

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Use the new ELF abstraction to read the Build ID
Michael Tremer [Wed, 1 Jan 2025 16:55:22 +0000 (16:55 +0000)] 
stripper: Use the new ELF abstraction to read the Build ID

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Add function to read the Build ID
Michael Tremer [Wed, 1 Jan 2025 16:54:22 +0000 (16:54 +0000)] 
ELF: Add function to read the Build ID

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Add a convenience function to open from a file object
Michael Tremer [Wed, 1 Jan 2025 16:46:10 +0000 (16:46 +0000)] 
ELF: Add a convenience function to open from a file object

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Keep a simple reference to the ELF header at all times
Michael Tremer [Wed, 1 Jan 2025 16:37:10 +0000 (16:37 +0000)] 
ELF: Keep a simple reference to the ELF header at all times

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Store the path
Michael Tremer [Wed, 1 Jan 2025 16:25:20 +0000 (16:25 +0000)] 
ELF: Store the path

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoelf: Begin scaffolding for an object that handles ELF files
Michael Tremer [Wed, 1 Jan 2025 16:22:53 +0000 (16:22 +0000)] 
elf: Begin scaffolding for an object that handles ELF files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agodigests: Don't rewind file after processing to keep r set
Michael Tremer [Wed, 1 Jan 2025 15:55:32 +0000 (15:55 +0000)] 
digests: Don't rewind file after processing to keep r set

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Fix ELF check
Michael Tremer [Tue, 31 Dec 2024 18:26:38 +0000 (18:26 +0000)] 
build: Fix ELF check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofile: Fix script interpreters again
Michael Tremer [Tue, 31 Dec 2024 18:22:52 +0000 (18:22 +0000)] 
file: Fix script interpreters again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofile: Allow passing the mode on fopen()
Michael Tremer [Tue, 31 Dec 2024 18:21:06 +0000 (18:21 +0000)] 
file: Allow passing the mode on fopen()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoutil: Terminate pakfire_copy() even if feof() does not work
Michael Tremer [Tue, 31 Dec 2024 18:19:21 +0000 (18:19 +0000)] 
util: Terminate pakfire_copy() even if feof() does not work

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Silence the RUNPATH check
Michael Tremer [Tue, 31 Dec 2024 14:55:36 +0000 (14:55 +0000)] 
linter: Silence the RUNPATH check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Remove any previously existing debuglinks
Michael Tremer [Tue, 31 Dec 2024 14:54:29 +0000 (14:54 +0000)] 
stripper: Remove any previously existing debuglinks

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Ignore if source files don't exist
Michael Tremer [Tue, 31 Dec 2024 14:54:10 +0000 (14:54 +0000)] 
stripper: Ignore if source files don't exist

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoFHS: Permit sub-directories in /usr/src/debug
Michael Tremer [Tue, 31 Dec 2024 14:53:36 +0000 (14:53 +0000)] 
FHS: Permit sub-directories in /usr/src/debug

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoJenkins: Disable the broken branch check
Michael Tremer [Tue, 31 Dec 2024 14:52:57 +0000 (14:52 +0000)] 
Jenkins: Disable the broken branch check

For some reason this is (yet again) not working.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackages: Ignore dependencies starting with "#"
Michael Tremer [Tue, 31 Dec 2024 14:37:53 +0000 (14:37 +0000)] 
packages: Ignore dependencies starting with "#"

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopath: Convince the static analyzer that path is set
Michael Tremer [Tue, 31 Dec 2024 14:05:45 +0000 (14:05 +0000)] 
path: Convince the static analyzer that path is set

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoxfer: Only call linkat() with a valid file descriptor
Michael Tremer [Tue, 31 Dec 2024 14:03:56 +0000 (14:03 +0000)] 
xfer: Only call linkat() with a valid file descriptor

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Initialize tmppath in case there is an error
Michael Tremer [Tue, 31 Dec 2024 13:58:29 +0000 (13:58 +0000)] 
stripper: Initialize tmppath in case there is an error

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoutil: Implement rewind() that returns any errors
Michael Tremer [Tue, 31 Dec 2024 13:56:54 +0000 (13:56 +0000)] 
util: Implement rewind() that returns any errors

The Clang Static Analyzer complains that we don't check errno after
using rewind(). This patch adds a new version of this function which
returns an error.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Fix RELRO check
Michael Tremer [Tue, 31 Dec 2024 13:37:42 +0000 (13:37 +0000)] 
linter: Fix RELRO check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackagelist: Fix keep going logic
Michael Tremer [Tue, 31 Dec 2024 13:37:17 +0000 (13:37 +0000)] 
packagelist: Fix keep going logic

This is supposed to store the last error code and return it when the
flag is set.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Fix check if we have an ELF file
Michael Tremer [Tue, 31 Dec 2024 13:23:52 +0000 (13:23 +0000)] 
linter: Fix check if we have an ELF file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoRevert "tests: Don't collect coverage information about tests"
Michael Tremer [Tue, 31 Dec 2024 13:03:34 +0000 (13:03 +0000)] 
Revert "tests: Don't collect coverage information about tests"

This reverts commit bcb8a8de463b9a29969ef7acd78a58021f0bda55.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: (Re-)compress all debug information using Zstandard
Michael Tremer [Tue, 31 Dec 2024 12:22:44 +0000 (12:22 +0000)] 
stripper: (Re-)compress all debug information using Zstandard

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoCFLAGS: Deduplicate debugging information
Michael Tremer [Tue, 31 Dec 2024 12:19:24 +0000 (12:19 +0000)] 
CFLAGS: Deduplicate debugging information

  https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-fdebug-types-section

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoMakefile: Link tests with -lgcov again
Michael Tremer [Tue, 31 Dec 2024 12:14:31 +0000 (12:14 +0000)] 
Makefile: Link tests with -lgcov again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoscripts: Remove the old strip script
Michael Tremer [Tue, 31 Dec 2024 12:12:43 +0000 (12:12 +0000)] 
scripts: Remove the old strip script

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Actually strip binaries
Michael Tremer [Tue, 31 Dec 2024 12:11:53 +0000 (12:11 +0000)] 
stripper: Actually strip binaries

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Don't complain if there is no symbol table
Michael Tremer [Tue, 31 Dec 2024 12:11:00 +0000 (12:11 +0000)] 
linter: Don't complain if there is no symbol table

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofile: Add function to replace file content from another fd
Michael Tremer [Tue, 31 Dec 2024 12:10:38 +0000 (12:10 +0000)] 
file: Add function to replace file content from another fd

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Check that files in /usr/lib/debug are ELF and not stripped
Michael Tremer [Tue, 31 Dec 2024 12:03:55 +0000 (12:03 +0000)] 
linter: Check that files in /usr/lib/debug are ELF and not stripped

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofilelist: Fix removing items
Michael Tremer [Tue, 31 Dec 2024 11:52:35 +0000 (11:52 +0000)] 
filelist: Fix removing items

This also now shrinks the array whenever possible so that we won't waste
any memory if the filelist shrinks by a large amount.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofilelist: Clear number of entries after the filelist has been cleared
Michael Tremer [Tue, 31 Dec 2024 11:49:48 +0000 (11:49 +0000)] 
filelist: Clear number of entries after the filelist has been cleared

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Write the debug information directory the Build ID file
Michael Tremer [Mon, 30 Dec 2024 15:33:34 +0000 (15:33 +0000)] 
stripper: Write the debug information directory the Build ID file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofile: Add option to pass flags to open()
Michael Tremer [Mon, 30 Dec 2024 15:16:13 +0000 (15:16 +0000)] 
file: Add option to pass flags to open()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Extract debug information into a separate file
Michael Tremer [Mon, 30 Dec 2024 14:39:48 +0000 (14:39 +0000)] 
stripper: Extract debug information into a separate file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Extract sources in the main process again
Michael Tremer [Mon, 30 Dec 2024 14:39:03 +0000 (14:39 +0000)] 
stripper: Extract sources in the main process again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoRevert "configure: Link against libbfd"
Michael Tremer [Mon, 30 Dec 2024 13:29:49 +0000 (13:29 +0000)] 
Revert "configure: Link against libbfd"

This reverts commit 2a6657e51c66a5dc5cf1f5a059197d0be15a8ba1.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoRevert "stripper: Use libbfd to extract the Build ID"
Michael Tremer [Mon, 30 Dec 2024 13:29:37 +0000 (13:29 +0000)] 
Revert "stripper: Use libbfd to extract the Build ID"

This reverts commit 44ffbd6f1f47115072e8c8d4ea751f6eacb05dba.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Use libbfd to extract the Build ID
Michael Tremer [Mon, 30 Dec 2024 12:46:02 +0000 (12:46 +0000)] 
stripper: Use libbfd to extract the Build ID

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoconfigure: Link against libbfd
Michael Tremer [Mon, 30 Dec 2024 11:44:37 +0000 (11:44 +0000)] 
configure: Link against libbfd

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Extract the GNU Build ID
Michael Tremer [Sun, 29 Dec 2024 20:03:58 +0000 (20:03 +0000)] 
stripper: Extract the GNU Build ID

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofile: Check if we actually returned a file handle
Michael Tremer [Sun, 29 Dec 2024 19:59:25 +0000 (19:59 +0000)] 
file: Check if we actually returned a file handle

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackager: Improve passing on error codes
Michael Tremer [Sun, 29 Dec 2024 19:58:48 +0000 (19:58 +0000)] 
packager: Improve passing on error codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Open the file only once
Michael Tremer [Sun, 29 Dec 2024 19:27:14 +0000 (19:27 +0000)] 
stripper: Open the file only once

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Refactor unquoting strings
Michael Tremer [Sun, 29 Dec 2024 19:09:59 +0000 (19:09 +0000)] 
parser: Refactor unquoting strings

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: Don't collect coverage information about tests
Michael Tremer [Sun, 29 Dec 2024 19:03:17 +0000 (19:03 +0000)] 
tests: Don't collect coverage information about tests

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Create a unified stripping function
Michael Tremer [Sun, 29 Dec 2024 18:58:19 +0000 (18:58 +0000)] 
stripper: Create a unified stripping function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoscripts: Don't extract sources in the strip script any more
Michael Tremer [Sun, 29 Dec 2024 18:43:57 +0000 (18:43 +0000)] 
scripts: Don't extract sources in the strip script any more

This has been moved to the stripper.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Show progress bar when stripping files
Michael Tremer [Sun, 29 Dec 2024 18:42:16 +0000 (18:42 +0000)] 
stripper: Show progress bar when stripping files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Implement copying sources
Michael Tremer [Sun, 29 Dec 2024 18:29:34 +0000 (18:29 +0000)] 
stripper: Implement copying sources

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoFHS: Permit debug sources
Michael Tremer [Sun, 29 Dec 2024 18:27:31 +0000 (18:27 +0000)] 
FHS: Permit debug sources

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofilelist: Actually sort when adding files
Michael Tremer [Sun, 29 Dec 2024 17:42:30 +0000 (17:42 +0000)] 
filelist: Actually sort when adding files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofilelist: Drop the sort function again
Michael Tremer [Sun, 29 Dec 2024 17:42:02 +0000 (17:42 +0000)] 
filelist: Drop the sort function again

The filelist was intended to be sorted all the time.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofilelist: Fix return code when we run out of buffer space
Michael Tremer [Sun, 29 Dec 2024 17:09:38 +0000 (17:09 +0000)] 
filelist: Fix return code when we run out of buffer space

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofilelist: Don't overwrite r when using a progress bar
Michael Tremer [Sun, 29 Dec 2024 17:02:47 +0000 (17:02 +0000)] 
filelist: Don't overwrite r when using a progress bar

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Run the stripping inside the jail
Michael Tremer [Sun, 29 Dec 2024 16:41:18 +0000 (16:41 +0000)] 
stripper: Run the stripping inside the jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Keep a reference to the jail
Michael Tremer [Sun, 29 Dec 2024 16:40:54 +0000 (16:40 +0000)] 
stripper: Keep a reference to the jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agofile: Fix path when opening a file inside the jail
Michael Tremer [Sun, 29 Dec 2024 16:39:07 +0000 (16:39 +0000)] 
file: Fix path when opening a file inside the jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoctx: Set a flag when we are running inside the jail
Michael Tremer [Sun, 29 Dec 2024 16:38:18 +0000 (16:38 +0000)] 
ctx: Set a flag when we are running inside the jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Change callback signature to include the context instead the inaccessible jail
Michael Tremer [Sun, 29 Dec 2024 16:20:11 +0000 (16:20 +0000)] 
jail: Change callback signature to include the context instead the inaccessible jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Add a function to call a custom callback inside the jail
Michael Tremer [Sun, 29 Dec 2024 16:15:03 +0000 (16:15 +0000)] 
jail: Add a function to call a custom callback inside the jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Pass the environment to the interactive shell
Michael Tremer [Sun, 29 Dec 2024 15:49:21 +0000 (15:49 +0000)] 
build: Pass the environment to the interactive shell

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Rename pakfire_jail_exec to pakfire_jail_exec_command
Michael Tremer [Sun, 29 Dec 2024 15:45:31 +0000 (15:45 +0000)] 
jail: Rename pakfire_jail_exec to pakfire_jail_exec_command

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoenv: Declare the struct before importing anything
Michael Tremer [Sun, 29 Dec 2024 15:42:20 +0000 (15:42 +0000)] 
env: Declare the struct before importing anything

This silences a compiler warning.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: Add tests for env
Michael Tremer [Sun, 29 Dec 2024 15:42:11 +0000 (15:42 +0000)] 
tests: Add tests for env

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Merge the basic environment with the custom environment
Michael Tremer [Sun, 29 Dec 2024 15:15:37 +0000 (15:15 +0000)] 
jail: Merge the basic environment with the custom environment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Simplify reading the parser environment
Michael Tremer [Sun, 29 Dec 2024 15:10:07 +0000 (15:10 +0000)] 
build: Simplify reading the parser environment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Move the environment into an extra object
Michael Tremer [Sun, 29 Dec 2024 14:59:17 +0000 (14:59 +0000)] 
jail: Move the environment into an extra object

This allows us to pass a custom environment to each command that we are
running. This helps us to keep the environment a lot cleaner.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Add struct to pass more stuff to commands
Michael Tremer [Sun, 29 Dec 2024 13:02:27 +0000 (13:02 +0000)] 
jail: Add struct to pass more stuff to commands

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Create a callback function that is called in the child process
Michael Tremer [Sun, 29 Dec 2024 12:52:10 +0000 (12:52 +0000)] 
jail: Create a callback function that is called in the child process

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoRevert "file: Remove ELF detection with libelf"
Michael Tremer [Wed, 25 Dec 2024 13:18:14 +0000 (13:18 +0000)] 
Revert "file: Remove ELF detection with libelf"

This reverts commit 65fcf2eb3c4fceb81887bd969e68ceae8613e26e.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoRevert "stripper: Throw this away"
Michael Tremer [Wed, 25 Dec 2024 13:02:58 +0000 (13:02 +0000)] 
Revert "stripper: Throw this away"

This reverts commit 76774bf62a622da82ca589519331371c71b87bf1.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: Add a test to check if the log buffer limit works
Michael Tremer [Wed, 25 Dec 2024 12:55:58 +0000 (12:55 +0000)] 
tests: Add a test to check if the log buffer limit works

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Check for matching files in a loop
Michael Tremer [Tue, 24 Dec 2024 15:18:09 +0000 (15:18 +0000)] 
build: Check for matching files in a loop

When sending the filelist to scripts, we require the event loop to call
us again and again. This seems to cause a deadlock situation and we now
rather search for matching files in a loop until we have found a result
(or not).

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackager: Sort files before writing the archive
Michael Tremer [Tue, 24 Dec 2024 14:40:52 +0000 (14:40 +0000)] 
packager: Sort files before writing the archive

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: log buffer: Test invalid function calls
Michael Tremer [Tue, 24 Dec 2024 13:44:15 +0000 (13:44 +0000)] 
tests: log buffer: Test invalid function calls

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolog buffer: Check inputs on dequeue
Michael Tremer [Tue, 24 Dec 2024 13:43:58 +0000 (13:43 +0000)] 
log buffer: Check inputs on dequeue

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolog buffer: Since length is signed, we cannot assign -1
Michael Tremer [Tue, 24 Dec 2024 13:39:59 +0000 (13:39 +0000)] 
log buffer: Since length is signed, we cannot assign -1

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: Add simple tests for the log buffer
Michael Tremer [Tue, 24 Dec 2024 13:25:41 +0000 (13:25 +0000)] 
tests: Add simple tests for the log buffer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolog buffer: Reset pointers when there is no more data
Michael Tremer [Tue, 24 Dec 2024 13:24:38 +0000 (13:24 +0000)] 
log buffer: Reset pointers when there is no more data

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>