]> git.ipfire.org Git - people/ric9/pakfire.git/log
people/ric9/pakfire.git
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
9 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>
9 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>
9 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>
9 months agofile: Build a function to search a file for a string
Michael Tremer [Sat, 4 Jan 2025 15:27:26 +0000 (15:27 +0000)] 
file: Build a function to search a file for a string

This is done by mapping the file into memory and performing a fast
string search.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agostrings: Implement a fast search that even works over large buffers
Michael Tremer [Sat, 4 Jan 2025 15:21:03 +0000 (15:21 +0000)] 
strings: Implement a fast search that even works over large buffers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agofilelist: Implement binary search for paths
Michael Tremer [Sat, 4 Jan 2025 14:14:02 +0000 (14:14 +0000)] 
filelist: Implement binary search for paths

This is a fast path if we are looking for an exact match which will be a
lot faster than the linear pattern matching search.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Drop the old find-requires script
Michael Tremer [Sat, 4 Jan 2025 13:57:30 +0000 (13:57 +0000)] 
build: Drop the old find-requires script

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Implement symlink dependencies
Michael Tremer [Sat, 4 Jan 2025 13:56:19 +0000 (13:56 +0000)] 
build: Implement symlink dependencies

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agopackages: Automatically ignore any dependencies that are provided by the package...
Michael Tremer [Sat, 4 Jan 2025 13:41:02 +0000 (13:41 +0000)] 
packages: Automatically ignore any dependencies that are provided by the package itself

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agostripper: There should be no need to check if the destination exists now
Michael Tremer [Sat, 4 Jan 2025 13:33:23 +0000 (13:33 +0000)] 
stripper: There should be no need to check if the destination exists now

We should have performed deduplication.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agostripper: Be smarter when copying sources
Michael Tremer [Sat, 4 Jan 2025 13:29:56 +0000 (13:29 +0000)] 
stripper: Be smarter when copying sources

The naive approach was not very good when it came to copying sources.
Sometimes there are too many and we keep sitting here for a minute.

It is smarter to collect all files first and then look them up and copy
them only once in the end.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agofilelist: Increment progress after a file has been processed
Michael Tremer [Sat, 4 Jan 2025 13:29:10 +0000 (13:29 +0000)] 
filelist: Increment progress after a file has been processed

The progressbar suspiciously was "done" when there was still some work
to do and the application looked like it had stalled.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Don't log when finding a source file
Michael Tremer [Sat, 4 Jan 2025 13:28:30 +0000 (13:28 +0000)] 
ELF: Don't log when finding a source file

This is a huge amount of output for C++ projects where there are so many
of those files.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoscripts: Remove the old find-provides script
Michael Tremer [Fri, 3 Jan 2025 18:07:16 +0000 (18:07 +0000)] 
scripts: Remove the old find-provides script

All the functionality has been replaced.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Fix reading note sections
Michael Tremer [Fri, 3 Jan 2025 18:06:13 +0000 (18:06 +0000)] 
ELF: Fix reading note sections

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Fix offset for aux sections for dependencies
Michael Tremer [Fri, 3 Jan 2025 17:59:47 +0000 (17:59 +0000)] 
ELF: Fix offset for aux sections for dependencies

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Declare offsets outside of the switch block
Michael Tremer [Fri, 3 Jan 2025 17:59:27 +0000 (17:59 +0000)] 
ELF: Declare offsets outside of the switch block

This should make clang happy.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Actually return findings on the CF protection check
Michael Tremer [Fri, 3 Jan 2025 17:52:09 +0000 (17:52 +0000)] 
ELF: Actually return findings on the CF protection check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Don't return an error if there are no sections
Michael Tremer [Fri, 3 Jan 2025 17:47:40 +0000 (17:47 +0000)] 
ELF: Don't return an error if there are no sections

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Return a more detailed error message if deps search fails
Michael Tremer [Fri, 3 Jan 2025 17:47:27 +0000 (17:47 +0000)] 
build: Return a more detailed error message if deps search fails

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: ELF files must always be executable
Michael Tremer [Fri, 3 Jan 2025 17:31:02 +0000 (17:31 +0000)] 
build: ELF files must always be executable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Use convenience function to match filenames
Michael Tremer [Fri, 3 Jan 2025 17:29:33 +0000 (17:29 +0000)] 
build: Use convenience function to match filenames

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Fetch provided dependencies
Michael Tremer [Fri, 3 Jan 2025 17:27:05 +0000 (17:27 +0000)] 
ELF: Fetch provided dependencies

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Add a function to fetch the SONAME
Michael Tremer [Fri, 3 Jan 2025 12:08:34 +0000 (12:08 +0000)] 
ELF: Add a function to fetch the SONAME

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Process pkg-config provides
Michael Tremer [Fri, 3 Jan 2025 11:51:23 +0000 (11:51 +0000)] 
build: Process pkg-config provides

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Move filtering dependencies into the package object
Michael Tremer [Fri, 3 Jan 2025 11:33:17 +0000 (11:33 +0000)] 
build: Move filtering dependencies into the package object

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Fix the Python ABI and store it as a requirement
Michael Tremer [Fri, 3 Jan 2025 10:58:11 +0000 (10:58 +0000)] 
build: Fix the Python ABI and store it as a requirement

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agofind-requires: Remove more replaced code
Michael Tremer [Fri, 3 Jan 2025 10:43:52 +0000 (10:43 +0000)] 
find-requires: Remove more replaced code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Parse any runtime dependencies
Michael Tremer [Fri, 3 Jan 2025 10:17:48 +0000 (10:17 +0000)] 
ELF: Parse any runtime dependencies

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agostring: Move array functions into strings.c
Michael Tremer [Fri, 3 Jan 2025 09:50:10 +0000 (09:50 +0000)] 
string: Move array functions into strings.c

The inline option has some limitations and it makes things messy. The
compiler will hopefully inline these functions no matter what.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agostrings: Help the compiler to understand what array we mean
Michael Tremer [Fri, 3 Jan 2025 09:30:42 +0000 (09:30 +0000)] 
strings: Help the compiler to understand what array we mean

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Add a custom pointer when walking through all sections
Michael Tremer [Fri, 3 Jan 2025 09:03:05 +0000 (09:03 +0000)] 
ELF: Add a custom pointer when walking through all sections

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agofind-requires: Remove things that have been implemented elsewhere
Michael Tremer [Fri, 3 Jan 2025 08:53:26 +0000 (08:53 +0000)] 
find-requires: Remove things that have been implemented elsewhere

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Require ELF interpreters
Michael Tremer [Fri, 3 Jan 2025 08:52:39 +0000 (08:52 +0000)] 
build: Require ELF interpreters

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Add a function to fetch the interpreter
Michael Tremer [Fri, 3 Jan 2025 08:52:14 +0000 (08:52 +0000)] 
ELF: Add a function to fetch the interpreter

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Don't try to find dependencies for debug files
Michael Tremer [Fri, 3 Jan 2025 08:51:43 +0000 (08:51 +0000)] 
build: Don't try to find dependencies for debug files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Create a function to easily walk through all program headers
Michael Tremer [Fri, 3 Jan 2025 08:42:07 +0000 (08:42 +0000)] 
ELF: Create a function to easily walk through all program headers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Read the number of program headers only once
Michael Tremer [Fri, 3 Jan 2025 08:30:58 +0000 (08:30 +0000)] 
ELF: Read the number of program headers only once

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Find pkg-config requires in C
Michael Tremer [Fri, 3 Jan 2025 08:16:19 +0000 (08:16 +0000)] 
build: Find pkg-config requires in C

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoenv: Allow string formatting when setting a value
Michael Tremer [Fri, 3 Jan 2025 08:15:46 +0000 (08:15 +0000)] 
env: Allow string formatting when setting a value

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agopackages: Accept format arguments when adding a new dependency
Michael Tremer [Fri, 3 Jan 2025 07:53:53 +0000 (07:53 +0000)] 
packages: Accept format arguments when adding a new dependency

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoRemove libpakfire as a shared object
Michael Tremer [Fri, 3 Jan 2025 06:38:31 +0000 (06:38 +0000)] 
Remove libpakfire as a shared object

There seems to very little point in having a shared library with a
stable API. Most stuff is opaque anyways and there won't be any
third-party programs that can take advantage of this. Therefore we can
save ourselves the extra work that it takes to make this all exported
and stable for now.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agostrings: Include string.h
Michael Tremer [Fri, 3 Jan 2025 06:04:48 +0000 (06:04 +0000)] 
strings: Include string.h

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Move any source file handling
Michael Tremer [Fri, 3 Jan 2025 06:04:06 +0000 (06:04 +0000)] 
ELF: Move any source file handling

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agopakfire: Add openat() relative to the root
Michael Tremer [Fri, 3 Jan 2025 06:03:12 +0000 (06:03 +0000)] 
pakfire: Add openat() relative to the root

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agopakfire: Keep a fd open to the root
Michael Tremer [Fri, 3 Jan 2025 06:02:34 +0000 (06:02 +0000)] 
pakfire: Keep a fd open to the root

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agopakfire: Remove unused lock
Michael Tremer [Fri, 3 Jan 2025 06:02:12 +0000 (06:02 +0000)] 
pakfire: Remove unused lock

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agostring: Import errno.h
Michael Tremer [Thu, 2 Jan 2025 19:40:50 +0000 (19:40 +0000)] 
string: Import errno.h

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Allow uninstallation of incompatible packages
Michael Tremer [Thu, 2 Jan 2025 19:40:18 +0000 (19:40 +0000)] 
build: Allow uninstallation of incompatible packages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agobuild: Correctly handle dependency problems on the install test
Michael Tremer [Thu, 2 Jan 2025 19:06:53 +0000 (19:06 +0000)] 
build: Correctly handle dependency problems on the install test

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Improve the stripped check
Michael Tremer [Thu, 2 Jan 2025 16:42:07 +0000 (16:42 +0000)] 
ELF: Improve the stripped check

This now checks if we have relocation information and any sections
starting with .debug_* or .zdebug_*.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
9 months agoELF: Fetch the string index only once
Michael Tremer [Thu, 2 Jan 2025 16:36:11 +0000 (16:36 +0000)] 
ELF: Fetch the string index only once

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