]> git.ipfire.org Git - pakfire.git/log
pakfire.git
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>
7 months agotests: cgroups: Fix return code checks
Michael Tremer [Mon, 16 Dec 2024 18:30:37 +0000 (18:30 +0000)] 
tests: cgroups: Fix return code checks

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: Add check for expected return codes
Michael Tremer [Mon, 16 Dec 2024 18:30:05 +0000 (18:30 +0000)] 
tests: Add check for expected return codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Cleanup if we cannot create an eventfd
Michael Tremer [Mon, 16 Dec 2024 18:24:08 +0000 (18:24 +0000)] 
jail: Cleanup if we cannot create an eventfd

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Report correct error if clone3() failed
Michael Tremer [Mon, 16 Dec 2024 18:11:37 +0000 (18:11 +0000)] 
jail: Report correct error if clone3() failed

We should also clean up.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroups: Recursively delete cgroups
Michael Tremer [Sat, 14 Dec 2024 17:07:54 +0000 (17:07 +0000)] 
cgroups: Recursively delete cgroups

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: string: Check if strings contain whitespace
Michael Tremer [Sat, 14 Dec 2024 16:27:47 +0000 (16:27 +0000)] 
tests: string: Check if strings contain whitespace

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Return the correct exit code when a process has dumped
Michael Tremer [Sat, 14 Dec 2024 16:22:37 +0000 (16:22 +0000)] 
jail: Return the correct exit code when a process has dumped

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Ignore if cgroup limits could not be applied
Michael Tremer [Sat, 14 Dec 2024 16:18:38 +0000 (16:18 +0000)] 
build: Ignore if cgroup limits could not be applied

This should ideally not happen in a real environment, but sadly is a
restriction we have in Jenkins when we are running the tests.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Move cgroup accounting here
Michael Tremer [Sat, 14 Dec 2024 16:13:57 +0000 (16:13 +0000)] 
build: Move cgroup accounting here

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Log the status code when a process exits abnormally
Michael Tremer [Sat, 14 Dec 2024 16:07:20 +0000 (16:07 +0000)] 
jail: Log the status code when a process exits abnormally

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroups: The static analyzer does not seem to understand how return things
Michael Tremer [Sat, 14 Dec 2024 15:55:47 +0000 (15:55 +0000)] 
cgroups: The static analyzer does not seem to understand how return things

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopath: Make the static analyzer happy again
Michael Tremer [Sat, 14 Dec 2024 15:44:45 +0000 (15:44 +0000)] 
path: Make the static analyzer happy again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoxfer: Don't call fileno() with NULL
Michael Tremer [Sat, 14 Dec 2024 15:39:23 +0000 (15:39 +0000)] 
xfer: Don't call fileno() with NULL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoarchive: Don't leak fd if archive could not be opened
Michael Tremer [Sat, 14 Dec 2024 15:36:12 +0000 (15:36 +0000)] 
archive: Don't leak fd if archive could not be opened

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Enable accouting in the parent group
Michael Tremer [Sat, 14 Dec 2024 15:22:24 +0000 (15:22 +0000)] 
jail: Enable accouting in the parent group

We cannot enable any of this in the child group because then we cannot
fork anything into it any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroup: Remove unused function to open root
Michael Tremer [Sat, 14 Dec 2024 15:06:57 +0000 (15:06 +0000)] 
cgroup: Remove unused function to open root

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Fail properly when we could not open a cgroup
Michael Tremer [Sat, 14 Dec 2024 15:06:19 +0000 (15:06 +0000)] 
build: Fail properly when we could not open a cgroup

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroups: Implement recursion again
Michael Tremer [Sat, 14 Dec 2024 15:06:09 +0000 (15:06 +0000)] 
cgroups: Implement recursion again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Check if we received a valid file descriptor for the cgroup
Michael Tremer [Sat, 14 Dec 2024 14:39:19 +0000 (14:39 +0000)] 
jail: Check if we received a valid file descriptor for the cgroup

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroups: Don't automatically kill when destroying a cgroup
Michael Tremer [Sat, 14 Dec 2024 14:37:06 +0000 (14:37 +0000)] 
cgroups: Don't automatically kill when destroying a cgroup

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroups: Always log the entire path
Michael Tremer [Sat, 14 Dec 2024 14:32:01 +0000 (14:32 +0000)] 
cgroups: Always log the entire path

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroups: Use the correct function to retrieve the path
Michael Tremer [Sat, 14 Dec 2024 14:30:18 +0000 (14:30 +0000)] 
cgroups: Use the correct function to retrieve the path

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojenkins: Enable coverage tests again
Michael Tremer [Sat, 14 Dec 2024 14:27:35 +0000 (14:27 +0000)] 
jenkins: Enable coverage tests again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroups: Log the entire path if we encountered a writing error
Michael Tremer [Sat, 14 Dec 2024 14:25:58 +0000 (14:25 +0000)] 
cgroups: Log the entire path if we encountered a writing error

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Don't fail if we cannot enable accounting
Michael Tremer [Sat, 14 Dec 2024 14:25:44 +0000 (14:25 +0000)] 
jail: Don't fail if we cannot enable accounting

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroups: Don't try reading memory stats when the memory controller is not enabled
Michael Tremer [Sat, 14 Dec 2024 14:20:08 +0000 (14:20 +0000)] 
cgroups: Don't try reading memory stats when the memory controller is not enabled

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocgroups: Fix error codes
Michael Tremer [Sat, 14 Dec 2024 14:11:58 +0000 (14:11 +0000)] 
cgroups: Fix error codes

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