]> git.ipfire.org Git - people/ric9/pakfire.git/log
people/ric9/pakfire.git
6 months agotests/string.c: add test function for time formatting test-format_time
Rico Hoppe [Fri, 7 Feb 2025 16:11:58 +0000 (16:11 +0000)] 
tests/string.c: add test function for time formatting

Signed-off-by: Rico Hoppe <rico.hoppe@ipfire.org>
6 months agosrc/string: implement macro for function pakfire_format_speed test-format_speed
Rico Hoppe [Mon, 20 Jan 2025 16:55:32 +0000 (16:55 +0000)] 
src/string: implement macro for function pakfire_format_speed

Signed-off-by: Rico Hoppe <rico.hoppe@ipfire.org>
6 months agotests/string.c: implemented a test for the pakfire_format_speed function
Rico Hoppe [Mon, 20 Jan 2025 16:46:56 +0000 (16:46 +0000)] 
tests/string.c: implemented a test for the pakfire_format_speed function

Signed-off-by: Rico Hoppe <rico.hoppe@ipfire.org>
7 months agoarchive: Increase the block size
Michael Tremer [Sun, 12 Jan 2025 11:27:23 +0000 (11:27 +0000)] 
archive: Increase the block size

This will use a little bit more memory per opened archive, but will make
extraction somewhat faster. Extracting the snapshot shrinks from about
25 to 23 seconds on my system.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoarchive: Don't try to set fadvise() on an invalid fd
Michael Tremer [Sun, 12 Jan 2025 11:27:07 +0000 (11:27 +0000)] 
archive: Don't try to set fadvise() on an invalid fd

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoarchive: Ensure r is always set correctly
Michael Tremer [Sun, 12 Jan 2025 11:26:41 +0000 (11:26 +0000)] 
archive: Ensure r is always set correctly

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoarchive: Fix setting the error message
Michael Tremer [Sun, 12 Jan 2025 11:23:33 +0000 (11:23 +0000)] 
archive: Fix setting the error message

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoarchive: Ensure we are only opening regular files
Michael Tremer [Sun, 12 Jan 2025 11:22:58 +0000 (11:22 +0000)] 
archive: Ensure we are only opening regular files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agokey: Make dumping a key less braindead
Michael Tremer [Sat, 11 Jan 2025 19:11:48 +0000 (19:11 +0000)] 
key: Make dumping a key less braindead

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoutil: Remove function to read file contents into a buffer
Michael Tremer [Sat, 11 Jan 2025 19:04:04 +0000 (19:04 +0000)] 
util: Remove function to read file contents into a buffer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoutil: Map JSON strings into memory
Michael Tremer [Sat, 11 Jan 2025 19:02:28 +0000 (19:02 +0000)] 
util: Map JSON strings into memory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agokeys: Map them into memory
Michael Tremer [Sat, 11 Jan 2025 18:59:59 +0000 (18:59 +0000)] 
keys: Map them into memory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Map scripts instead of reading them
Michael Tremer [Sat, 11 Jan 2025 18:57:15 +0000 (18:57 +0000)] 
build: Map scripts instead of reading them

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoPTY: Check if we have a file descriptor before reading from it
Michael Tremer [Sat, 11 Jan 2025 18:52:28 +0000 (18:52 +0000)] 
PTY: Check if we have a file descriptor before reading from it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agosnapshots: Don't try to sync installed packages
Michael Tremer [Sat, 11 Jan 2025 18:51:09 +0000 (18:51 +0000)] 
snapshots: Don't try to sync installed packages

There should never be any installed packages here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agosnapshots: Rename to self
Michael Tremer [Sat, 11 Jan 2025 18:49:04 +0000 (18:49 +0000)] 
snapshots: Rename to self

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agosnapshots: Return pointer without touching the reference counter
Michael Tremer [Sat, 11 Jan 2025 18:44:38 +0000 (18:44 +0000)] 
snapshots: Return pointer without touching the reference counter

Hopefully this will make the static analyzer happier.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agosnapshots: Ignore locked snapshots and keep cleaning
Michael Tremer [Sat, 11 Jan 2025 18:42:21 +0000 (18:42 +0000)] 
snapshots: Ignore locked snapshots and keep cleaning

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agosnapshots: Fix logic error and process directories
Michael Tremer [Sat, 11 Jan 2025 18:42:03 +0000 (18:42 +0000)] 
snapshots: Fix logic error and process directories

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agosnapshots: Always try to clean up after we created a new snapshot
Michael Tremer [Sat, 11 Jan 2025 18:41:43 +0000 (18:41 +0000)] 
snapshots: Always try to clean up after we created a new snapshot

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agosnapshots: Only consider directories or symlinks
Michael Tremer [Sat, 11 Jan 2025 18:27:46 +0000 (18:27 +0000)] 
snapshots: Only consider directories or symlinks

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agosnapshots: Only use snapshots when they are not older than 24 hrs
Michael Tremer [Sat, 11 Jan 2025 18:26:17 +0000 (18:26 +0000)] 
snapshots: Only use snapshots when they are not older than 24 hrs

The chosen age might be a little bit short, but we can try...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopakfire: Clang does not seem to like if we are checking for NULL
Michael Tremer [Sat, 11 Jan 2025 17:56:20 +0000 (17:56 +0000)] 
pakfire: Clang does not seem to like if we are checking for NULL

The function is delcared with nonnull(), and therefore Clang complains
that we are actually checking this again. Probably fair.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopath: Sanitize format strings for the format function
Michael Tremer [Sat, 11 Jan 2025 17:55:25 +0000 (17:55 +0000)] 
path: Sanitize format strings for the format function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopakfire: Always require a configuration
Michael Tremer [Sat, 11 Jan 2025 17:50:32 +0000 (17:50 +0000)] 
pakfire: Always require a configuration

It is pretty pointless to run Pakfire without configuration and so we
can keep the code a bit more tidy.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Reset umask to 022
Michael Tremer [Sat, 11 Jan 2025 17:44:44 +0000 (17:44 +0000)] 
jail: Reset umask to 022

Fixes: #13806
Reported-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Don't overwrite package
Michael Tremer [Sat, 11 Jan 2025 17:37:39 +0000 (17:37 +0000)] 
build: Don't overwrite package

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoarchive: Allow creating a package without returning it
Michael Tremer [Sat, 11 Jan 2025 17:37:01 +0000 (17:37 +0000)] 
archive: Allow creating a package without returning it

This is useful when we simply want to add the package to a repository.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackagelist: Rename push to add
Michael Tremer [Sat, 11 Jan 2025 17:31:47 +0000 (17:31 +0000)] 
packagelist: Rename push to add

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackagelist: Refactor using binary search
Michael Tremer [Sat, 11 Jan 2025 17:28:30 +0000 (17:28 +0000)] 
packagelist: Refactor using binary search

This will keep the list sorted at all times and inserts will be a lot
faster than using the iteration over the linked lists.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agorepo: Make conversion to package list static
Michael Tremer [Sat, 11 Jan 2025 17:12:32 +0000 (17:12 +0000)] 
repo: Make conversion to package list static

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackage: Simplify adding all build packages
Michael Tremer [Sat, 11 Jan 2025 17:10:45 +0000 (17:10 +0000)] 
package: Simplify adding all build packages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Refactor copying packages after the build
Michael Tremer [Sat, 11 Jan 2025 17:02:29 +0000 (17:02 +0000)] 
build: Refactor copying packages after the build

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Drop the package list and iterate over the repo instead
Michael Tremer [Sat, 11 Jan 2025 16:55:54 +0000 (16:55 +0000)] 
build: Drop the package list and iterate over the repo instead

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agorepo: Add convenience function to iterate over all packages in a repo
Michael Tremer [Sat, 11 Jan 2025 16:55:35 +0000 (16:55 +0000)] 
repo: Add convenience function to iterate over all packages in a repo

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Free namespaces
Michael Tremer [Sat, 11 Jan 2025 16:36:05 +0000 (16:36 +0000)] 
build: Free namespaces

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackager: Return an archive
Michael Tremer [Sat, 11 Jan 2025 16:32:39 +0000 (16:32 +0000)] 
packager: Return an archive

This is an attempt to have the packager return an object instead of a
loose path so that we can do more things with the result.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoarchive: Fail if we were not given a package pointer
Michael Tremer [Sat, 11 Jan 2025 16:27:22 +0000 (16:27 +0000)] 
archive: Fail if we were not given a package pointer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoarchive: Add function to unlink an archive
Michael Tremer [Sat, 11 Jan 2025 15:26:15 +0000 (15:26 +0000)] 
archive: Add function to unlink an archive

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopath: Add function to format a path and normalize it straight away
Michael Tremer [Sat, 11 Jan 2025 15:25:42 +0000 (15:25 +0000)] 
path: Add function to format a path and normalize it straight away

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackager: Refactor composing the filename
Michael Tremer [Sat, 11 Jan 2025 14:41:19 +0000 (14:41 +0000)] 
packager: Refactor composing the filename

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Stop expanding variables if the string becomes empty
Michael Tremer [Sat, 11 Jan 2025 14:35:14 +0000 (14:35 +0000)] 
parser: Stop expanding variables if the string becomes empty

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Always copy the namespace to the stack
Michael Tremer [Sat, 11 Jan 2025 14:32:06 +0000 (14:32 +0000)] 
parser: Always copy the namespace to the stack

This avoids using strdupa() which will result in those functions not
being possible to be inlined.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Simplify declaration matching
Michael Tremer [Sat, 11 Jan 2025 14:26:36 +0000 (14:26 +0000)] 
parser: Simplify declaration matching

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparsers: Statically allocate the namespace
Michael Tremer [Sat, 11 Jan 2025 14:24:42 +0000 (14:24 +0000)] 
parsers: Statically allocate the namespace

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Slightly improve expanding variables
Michael Tremer [Sat, 11 Jan 2025 14:21:37 +0000 (14:21 +0000)] 
parser: Slightly improve expanding variables

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Refactor stripping namespaces
Michael Tremer [Sat, 11 Jan 2025 14:19:56 +0000 (14:19 +0000)] 
parser: Refactor stripping namespaces

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Don't try to expand empty strings
Michael Tremer [Sat, 11 Jan 2025 14:10:45 +0000 (14:10 +0000)] 
parser: Don't try to expand empty strings

This is just a fast path to avoid doing unnecessary work.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Cleanup expanding variables
Michael Tremer [Sat, 11 Jan 2025 14:08:43 +0000 (14:08 +0000)] 
parser: Cleanup expanding variables

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Compile regular expressions only once
Michael Tremer [Sat, 11 Jan 2025 14:05:56 +0000 (14:05 +0000)] 
parser: Compile regular expressions only once

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Remove a dead assignment
Michael Tremer [Sat, 11 Jan 2025 13:54:38 +0000 (13:54 +0000)] 
parser: Remove a dead assignment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Write a better implementation to replace newlines
Michael Tremer [Sat, 11 Jan 2025 13:52:23 +0000 (13:52 +0000)] 
parser: Write a better implementation to replace newlines

This performs the operating on the existing buffer and should be more
straight forward than the previous one.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Use existing string functions for copying strings
Michael Tremer [Sat, 11 Jan 2025 13:40:55 +0000 (13:40 +0000)] 
parser: Use existing string functions for copying strings

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Avoid a potential double-free on early exits
Michael Tremer [Sat, 11 Jan 2025 13:31:16 +0000 (13:31 +0000)] 
parser: Avoid a potential double-free on early exits

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Fix return code handling when merging parsers
Michael Tremer [Sat, 11 Jan 2025 13:31:04 +0000 (13:31 +0000)] 
parser: Fix return code handling when merging parsers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Refactor reading from file
Michael Tremer [Sat, 11 Jan 2025 13:23:04 +0000 (13:23 +0000)] 
parser: Refactor reading from file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Map the data into buffer to read it faster
Michael Tremer [Sat, 11 Jan 2025 13:21:40 +0000 (13:21 +0000)] 
parser: Map the data into buffer to read it faster

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoutil: Create a convenience function to map files into memory
Michael Tremer [Sat, 11 Jan 2025 13:20:22 +0000 (13:20 +0000)] 
util: Create a convenience function to map files into memory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Refactor listing namespaces
Michael Tremer [Sat, 11 Jan 2025 12:50:41 +0000 (12:50 +0000)] 
parser: Refactor listing namespaces

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostrings: Add a function to search for a match in string array
Michael Tremer [Sat, 11 Jan 2025 12:50:07 +0000 (12:50 +0000)] 
strings: Add a function to search for a match in string array

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Use string functions to manage filelists
Michael Tremer [Sat, 11 Jan 2025 12:43:00 +0000 (12:43 +0000)] 
parser: Use string functions to manage filelists

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Minor cleanup when searching for a template
Michael Tremer [Sat, 11 Jan 2025 12:39:56 +0000 (12:39 +0000)] 
parser: Minor cleanup when searching for a template

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Refactor creating declarations
Michael Tremer [Sat, 11 Jan 2025 12:37:21 +0000 (12:37 +0000)] 
parser: Refactor creating declarations

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Tidy up for finding declarations
Michael Tremer [Sat, 11 Jan 2025 12:30:01 +0000 (12:30 +0000)] 
parser: Tidy up for finding declarations

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Refactor joining strings
Michael Tremer [Sat, 11 Jan 2025 12:27:49 +0000 (12:27 +0000)] 
parser: Refactor joining strings

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoparser: Refactor creating a new parser
Michael Tremer [Sat, 11 Jan 2025 12:21:41 +0000 (12:21 +0000)] 
parser: Refactor creating a new parser

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agodist: Free the context after reading the makefile
Michael Tremer [Sat, 11 Jan 2025 11:56:37 +0000 (11:56 +0000)] 
dist: Free the context after reading the makefile

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: Fix the parser tester
Michael Tremer [Sat, 11 Jan 2025 11:47:39 +0000 (11:47 +0000)] 
tests: Fix the parser tester

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Free transaction after performing the install check
Michael Tremer [Sat, 11 Jan 2025 11:12:30 +0000 (11:12 +0000)] 
build: Free transaction after performing the install check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agodist: Release the context after we are done
Michael Tremer [Fri, 10 Jan 2025 18:48:52 +0000 (18:48 +0000)] 
dist: Release the context after we are done

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocli: Fail if the context wasn't freed in the end
Michael Tremer [Fri, 10 Jan 2025 18:01:44 +0000 (18:01 +0000)] 
cli: Fail if the context wasn't freed in the end

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopty: Make the buffers significantly smaller
Michael Tremer [Fri, 10 Jan 2025 17:58:18 +0000 (17:58 +0000)] 
pty: Make the buffers significantly smaller

We don't really need that much buffer space here and it probably allows
for better CPU caching if the entire struct is smaller.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Refactor processing Perl dependencies
Michael Tremer [Fri, 10 Jan 2025 17:52:49 +0000 (17:52 +0000)] 
build: Refactor processing Perl dependencies

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopty: Implement to stream a filelist into stdin
Michael Tremer [Fri, 10 Jan 2025 17:51:56 +0000 (17:51 +0000)] 
pty: Implement to stream a filelist into stdin

This is an improved implementation that even supports writing some data
if there is not enough buffer space to write the full filename at once.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Simplify mounting the ccache
Michael Tremer [Fri, 10 Jan 2025 16:44:40 +0000 (16:44 +0000)] 
build: Simplify mounting the ccache

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Only copy regular source files
Michael Tremer [Fri, 10 Jan 2025 16:31:29 +0000 (16:31 +0000)] 
stripper: Only copy regular source files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotransaction: In build mode, always install the best set of packages
Michael Tremer [Fri, 10 Jan 2025 16:31:02 +0000 (16:31 +0000)] 
transaction: In build mode, always install the best set of packages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Allow uninstalling and downgrading packages
Michael Tremer [Fri, 10 Jan 2025 16:30:29 +0000 (16:30 +0000)] 
build: Allow uninstalling and downgrading packages

This is required if we want to be able to obsolete things here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Don't try to perform ELF checks on start files
Michael Tremer [Fri, 10 Jan 2025 16:30:05 +0000 (16:30 +0000)] 
linter: Don't try to perform ELF checks on start files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agomacros: Package /usr/lib*/cmake in development packages
Michael Tremer [Fri, 10 Jan 2025 16:29:36 +0000 (16:29 +0000)] 
macros: Package /usr/lib*/cmake in development packages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Support stripping binaries without a Build ID
Michael Tremer [Fri, 10 Jan 2025 15:22:51 +0000 (15:22 +0000)] 
stripper: Support stripping binaries without a Build ID

We should not have these in practise, but there might be cases where we
cannot extract the ID correctly.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Simplify error message when build dependencies cannot be installed
Michael Tremer [Fri, 10 Jan 2025 15:15:15 +0000 (15:15 +0000)] 
build: Simplify error message when build dependencies cannot be installed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostrings: Add a function to dump a string array
Michael Tremer [Fri, 10 Jan 2025 15:12:23 +0000 (15:12 +0000)] 
strings: Add a function to dump a string array

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopakfire: Don't uninstall source packages by accident
Michael Tremer [Fri, 10 Jan 2025 15:11:57 +0000 (15:11 +0000)] 
pakfire: Don't uninstall source packages by accident

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopakfire: Call pool_setarchpolicy() directly
Michael Tremer [Fri, 10 Jan 2025 15:00:21 +0000 (15:00 +0000)] 
pakfire: Call pool_setarchpolicy() directly

This will avoid any builtin logic from libsolv which considers ix86
alternatives which we don't support here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Skip any invalid DWARF sections
Michael Tremer [Thu, 9 Jan 2025 17:20:46 +0000 (17:20 +0000)] 
ELF: Skip any invalid DWARF sections

On some start files in glibc, this error is thrown and I think it is
safe to just ignore it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoELF: Actually return NULL if there is no Build ID
Michael Tremer [Thu, 9 Jan 2025 16:33:31 +0000 (16:33 +0000)] 
ELF: Actually return NULL if there is no Build ID

Before, we allocated an empty string which is unnecessary and confused
me further down the line.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopty: Ensure to register SIGWINCH in the parent process
Michael Tremer [Thu, 9 Jan 2025 16:32:57 +0000 (16:32 +0000)] 
pty: Ensure to register SIGWINCH in the parent process

This makes the entire terminal resizing work again...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocli: progressbar: Fix integer underflow
Michael Tremer [Wed, 8 Jan 2025 16:16:42 +0000 (16:16 +0000)] 
cli: progressbar: Fix integer underflow

It could happen that we required more space than had and then the
expandable part of the progressbar became negative.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Add the debuglink only when we have extracted the debuginfo
Michael Tremer [Wed, 8 Jan 2025 15:23:35 +0000 (15:23 +0000)] 
stripper: Add the debuglink only when we have extracted the debuginfo

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostrings: Add function to merge multiple strings into an array
Michael Tremer [Wed, 8 Jan 2025 15:23:05 +0000 (15:23 +0000)] 
strings: Add function to merge multiple strings into an array

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Create directories where we are creating the files
Michael Tremer [Wed, 8 Jan 2025 15:08:00 +0000 (15:08 +0000)] 
stripper: Create directories where we are creating the files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Rename functions
Michael Tremer [Wed, 8 Jan 2025 15:04:40 +0000 (15:04 +0000)] 
stripper: Rename functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Don't try to extract debuginfo from *.o files
Michael Tremer [Wed, 8 Jan 2025 15:02:28 +0000 (15:02 +0000)] 
stripper: Don't try to extract debuginfo from *.o files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Strip any LTO information
Michael Tremer [Wed, 8 Jan 2025 13:13:14 +0000 (13:13 +0000)] 
stripper: Strip any LTO information

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Rename to self
Michael Tremer [Wed, 8 Jan 2025 11:45:25 +0000 (11:45 +0000)] 
stripper: Rename to self

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Skip script interpreter check for ELF files
Michael Tremer [Wed, 8 Jan 2025 11:41:19 +0000 (11:41 +0000)] 
linter: Skip script interpreter check for ELF files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Skip linting kernel modules
Michael Tremer [Wed, 8 Jan 2025 11:39:47 +0000 (11:39 +0000)] 
linter: Skip linting kernel modules

There is pretty much nothing we can do with them.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Move skipping files we never want to lint
Michael Tremer [Wed, 8 Jan 2025 11:36:25 +0000 (11:36 +0000)] 
linter: Move skipping files we never want to lint

This saves us from initializing the linter and reading the entire
payload.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Remove extra step when installing any custom packages
Michael Tremer [Wed, 8 Jan 2025 11:31:32 +0000 (11:31 +0000)] 
build: Remove extra step when installing any custom packages

Since there is only one place where this happens, we can also add this
all to the existing large transaction.

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