]> git.ipfire.org Git - pakfire.git/log
pakfire.git
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>
7 months agobuild: Install source package/update in one step
Michael Tremer [Wed, 8 Jan 2025 11:22:08 +0000 (11:22 +0000)] 
build: Install source package/update in one step

This patch makes launching a new environment even faster. Everything
will always be resolved in one go and installed in one huge transaction.
Any dependency errors will be caught really early on and we will have
less noise in the console/log.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Find pre-requirements without a shell script
Michael Tremer [Wed, 8 Jan 2025 11:11:58 +0000 (11:11 +0000)] 
build: Find pre-requirements without a shell script

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopty: Add helper function to stream a buffer into stdin
Michael Tremer [Wed, 8 Jan 2025 11:11:39 +0000 (11:11 +0000)] 
pty: Add helper function to stream a buffer into stdin

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoutil: which: Fix return code on invalid input
Michael Tremer [Wed, 8 Jan 2025 11:11:15 +0000 (11:11 +0000)] 
util: which: Fix return code on invalid input

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopackage: Allow building noarch on any host architecture
Michael Tremer [Mon, 6 Jan 2025 23:03:04 +0000 (23:03 +0000)] 
package: Allow building noarch on any host architecture

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Skip valgrind for the SSP check
Michael Tremer [Mon, 6 Jan 2025 23:02:38 +0000 (23:02 +0000)] 
linter: Skip valgrind for the SSP check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agolinter: Whitelist the runtime linker for the SSP check
Michael Tremer [Mon, 6 Jan 2025 23:02:11 +0000 (23:02 +0000)] 
linter: Whitelist the runtime linker for the SSP check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostripper: Never try to strip any firmware
Michael Tremer [Mon, 6 Jan 2025 23:01:31 +0000 (23:01 +0000)] 
stripper: Never try to strip any firmware

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Fix order of arguments to set the arch
Michael Tremer [Mon, 6 Jan 2025 21:40:26 +0000 (21:40 +0000)] 
build: Fix order of arguments to set the arch

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostrings: Don't clear the entire buffer when resetting a string
Michael Tremer [Mon, 6 Jan 2025 21:35:03 +0000 (21:35 +0000)] 
strings: Don't clear the entire buffer when resetting a string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostrings: setn: Don't copy anything if length is zero
Michael Tremer [Mon, 6 Jan 2025 21:34:44 +0000 (21:34 +0000)] 
strings: setn: Don't copy anything if length is zero

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostrings: Create a function to copy a fixed-length string
Michael Tremer [Mon, 6 Jan 2025 21:30:07 +0000 (21:30 +0000)] 
strings: Create a function to copy a fixed-length string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostring: Choose a more sensible error code when we run out of space
Michael Tremer [Mon, 6 Jan 2025 21:18:51 +0000 (21:18 +0000)] 
string: Choose a more sensible error code when we run out of space

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agojail: Remove headers for removed functions
Michael Tremer [Sun, 5 Jan 2025 17:36:06 +0000 (17:36 +0000)] 
jail: Remove headers for removed functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Exclude *.py[co] and *.packlist from BUILDROOT check
Michael Tremer [Sun, 5 Jan 2025 17:24:18 +0000 (17:24 +0000)] 
build: Exclude *.py[co] and *.packlist from BUILDROOT check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Set PKG_CONFIG_PATH a little bit elegantly
Michael Tremer [Sun, 5 Jan 2025 17:14:34 +0000 (17:14 +0000)] 
build: Set PKG_CONFIG_PATH a little bit elegantly

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoenv: Add a function to append values
Michael Tremer [Sun, 5 Jan 2025 17:14:25 +0000 (17:14 +0000)] 
env: Add a function to append values

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Create buildroot outside the build environment
Michael Tremer [Sun, 5 Jan 2025 17:06:08 +0000 (17:06 +0000)] 
build: Create buildroot outside the build environment

This will help us to avoid all the path maths and we will simply
bind-mount the temporary directory into the build environment instead.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoCLI: Remove option to pass the build ID
Michael Tremer [Sun, 5 Jan 2025 16:34:40 +0000 (16:34 +0000)] 
CLI: Remove option to pass the build ID

I don't think we need this and currently it is a no-op.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: build: Use the correct macros to check for errors
Michael Tremer [Sun, 5 Jan 2025 16:33:32 +0000 (16:33 +0000)] 
tests: build: Use the correct macros to check for errors

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: build: Pass the configuration
Michael Tremer [Sun, 5 Jan 2025 16:31:35 +0000 (16:31 +0000)] 
tests: build: Pass the configuration

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: Always globally load the test configuration file
Michael Tremer [Sun, 5 Jan 2025 16:31:21 +0000 (16:31 +0000)] 
tests: Always globally load the test configuration file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoDrop PAKFIRE_PRIVATE
Michael Tremer [Sun, 5 Jan 2025 16:19:18 +0000 (16:19 +0000)] 
Drop PAKFIRE_PRIVATE

Everything is now private so we won't need this guard any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoCLI: Create a convenience function to set up a build environment
Michael Tremer [Sun, 5 Jan 2025 15:48:34 +0000 (15:48 +0000)] 
CLI: Create a convenience function to set up a build environment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Fix conflicting flag name
Michael Tremer [Sun, 5 Jan 2025 15:44:19 +0000 (15:44 +0000)] 
build: Fix conflicting flag name

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoCLI: Only pass distro globally for all build commands
Michael Tremer [Sun, 5 Jan 2025 15:38:12 +0000 (15:38 +0000)] 
CLI: Only pass distro globally for all build commands

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agoCLI: Rename config to args
Michael Tremer [Sun, 5 Jan 2025 15:25:34 +0000 (15:25 +0000)] 
CLI: Rename config to args

We use the name config for too many things it was not very clear where
things were coming from. Hence this change.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agocli: Remove legacy distro configuration loading code
Michael Tremer [Sun, 5 Jan 2025 14:43:36 +0000 (14:43 +0000)] 
cli: Remove legacy distro configuration loading code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Pass the configuration to Pakfire
Michael Tremer [Sun, 5 Jan 2025 14:38:47 +0000 (14:38 +0000)] 
build: Pass the configuration to Pakfire

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agotests: Fix them after the recent changes
Michael Tremer [Sun, 5 Jan 2025 14:00:17 +0000 (14:00 +0000)] 
tests: Fix them after the recent changes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopakfire: Pass the configuration as a config object
Michael Tremer [Sun, 5 Jan 2025 13:48:19 +0000 (13:48 +0000)] 
pakfire: Pass the configuration as a config object

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Create and manage the Pakfire instance ourselves
Michael Tremer [Sun, 5 Jan 2025 13:30:03 +0000 (13:30 +0000)] 
build: Create and manage the Pakfire instance ourselves

This allows us to pass arguments around easier and keep the
configuration closer together.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agodebian: Install all files in the main package
Michael Tremer [Sun, 5 Jan 2025 13:04:38 +0000 (13:04 +0000)] 
debian: Install all files in the main package

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agopakfire: Tell the compiler that we always expect a path for openat()
Michael Tremer [Sat, 4 Jan 2025 15:52:41 +0000 (15:52 +0000)] 
pakfire: Tell the compiler that we always expect a path for openat()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agostrings: Copy strings a lot when appending to an array
Michael Tremer [Sat, 4 Jan 2025 15:48:32 +0000 (15:48 +0000)] 
strings: Copy strings a lot when appending to an array

The static analyzer thinks we are leaking memory, and so we have to make
things a little bit easier for it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 months agobuild: Implement buildroot check
Michael Tremer [Sat, 4 Jan 2025 15:28:15 +0000 (15:28 +0000)] 
build: Implement buildroot check

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