]> git.ipfire.org Git - pakfire.git/log
pakfire.git
3 months agobuild: Permit to uninstall or downgrade packages in installcheck
Michael Tremer [Sun, 16 Feb 2025 16:03:05 +0000 (16:03 +0000)] 
build: Permit to uninstall or downgrade packages in installcheck

Whenever we have a snapshot loaded, the solver might want to have a
little bit more liberty to find a solution. As we give it that liberty
later, we should not let the install check become a barrier.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agocli: Fix path of default configuration file
Michael Tremer [Sun, 16 Feb 2025 15:58:19 +0000 (15:58 +0000)] 
cli: Fix path of default configuration file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoconfigure: Compile everything with -std=gnu17
Michael Tremer [Sun, 16 Feb 2025 15:54:11 +0000 (15:54 +0000)] 
configure: Compile everything with -std=gnu17

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agocli: pakfire: Log everything to the console by default
Michael Tremer [Sun, 16 Feb 2025 15:53:49 +0000 (15:53 +0000)] 
cli: pakfire: Log everything to the console by default

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoMakefile: Ship i18n.h
Michael Tremer [Sun, 16 Feb 2025 15:34:14 +0000 (15:34 +0000)] 
Makefile: Ship i18n.h

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agobuild: Fix check for BUILDROOT
Michael Tremer [Sun, 16 Feb 2025 15:15:01 +0000 (15:15 +0000)] 
build: Fix check for BUILDROOT

The actual variable was not reachable which is changed in this patch.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoPTY: Automatically connect stdout/stderr in some cases
Michael Tremer [Sun, 16 Feb 2025 14:54:02 +0000 (14:54 +0000)] 
PTY: Automatically connect stdout/stderr in some cases

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoPTY: Connect stdout/stderr to /dev/null unless something else was requested
Michael Tremer [Sun, 16 Feb 2025 14:20:09 +0000 (14:20 +0000)] 
PTY: Connect stdout/stderr to /dev/null unless something else was requested

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoarchive: Reformat arguments for systemd-sysusers
Michael Tremer [Sun, 16 Feb 2025 14:19:36 +0000 (14:19 +0000)] 
archive: Reformat arguments for systemd-sysusers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoarchive: Make the systemd sysusers filter logic slightly more obvious
Michael Tremer [Sun, 16 Feb 2025 14:19:10 +0000 (14:19 +0000)] 
archive: Make the systemd sysusers filter logic slightly more obvious

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopackages: Always check if the file size matches
Michael Tremer [Sun, 16 Feb 2025 13:40:55 +0000 (13:40 +0000)] 
packages: Always check if the file size matches

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoOCI: Initialize size
Michael Tremer [Sun, 16 Feb 2025 13:36:03 +0000 (13:36 +0000)] 
OCI: Initialize size

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoELF: Don't fail if we could not parse some DWARF information
Michael Tremer [Sun, 16 Feb 2025 13:30:15 +0000 (13:30 +0000)] 
ELF: Don't fail if we could not parse some DWARF information

This is in line with what has been recommended from upstream.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoPTY: Increase maximum line length to 16k
Michael Tremer [Sun, 16 Feb 2025 13:28:18 +0000 (13:28 +0000)] 
PTY: Increase maximum line length to 16k

Some compiler command lines massively exceed the 4k, so let's try with
something much larger.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoarchive writer: Don't use --long for Zstandard
Michael Tremer [Sun, 16 Feb 2025 13:26:59 +0000 (13:26 +0000)] 
archive writer: Don't use --long for Zstandard

This seems to be too complicated and there is too little value in it.
Packages cannot be uncompressed using the zstd command without enabling
long mode, too. libarchive requires the same which is also not
implemented.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoUse assert() to make the static analyzer happy
Michael Tremer [Sat, 15 Feb 2025 14:47:05 +0000 (14:47 +0000)] 
Use assert() to make the static analyzer happy

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agolinter: Skip all ELF checks for relocatable objects
Michael Tremer [Sat, 15 Feb 2025 14:42:35 +0000 (14:42 +0000)] 
linter: Skip all ELF checks for relocatable objects

This is a little bit more accurate than checking for the file extension.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoconfig: Drop unused function
Michael Tremer [Sat, 15 Feb 2025 14:10:42 +0000 (14:10 +0000)] 
config: Drop unused function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agomacros: Add a GitHub URL macro for tags (instead of releases)
Michael Tremer [Sat, 15 Feb 2025 13:43:53 +0000 (13:43 +0000)] 
macros: Add a GitHub URL macro for tags (instead of releases)

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agomacros: Add helpers to make GitHub URLs
Michael Tremer [Sat, 15 Feb 2025 13:28:09 +0000 (13:28 +0000)] 
macros: Add helpers to make GitHub URLs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agobuild: Dump all information about the source package
Michael Tremer [Sat, 15 Feb 2025 13:18:58 +0000 (13:18 +0000)] 
build: Dump all information about the source package

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopackages: Return the actual error when we fail to open an archive
Michael Tremer [Sat, 15 Feb 2025 13:11:28 +0000 (13:11 +0000)] 
packages: Return the actual error when we fail to open an archive

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agobuild: Print debug messages as well
Michael Tremer [Sat, 15 Feb 2025 13:07:17 +0000 (13:07 +0000)] 
build: Print debug messages as well

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopackages: Use the new path function to find the package
Michael Tremer [Sat, 15 Feb 2025 13:06:57 +0000 (13:06 +0000)] 
packages: Use the new path function to find the package

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoxfer: Improve error message if the URL could not be put together
Michael Tremer [Sat, 15 Feb 2025 13:06:36 +0000 (13:06 +0000)] 
xfer: Improve error message if the URL could not be put together

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoxfer: Improve our user agent
Michael Tremer [Sat, 15 Feb 2025 13:06:16 +0000 (13:06 +0000)] 
xfer: Improve our user agent

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoxfer: Show a message if we are running out of mirrors
Michael Tremer [Sat, 15 Feb 2025 13:05:53 +0000 (13:05 +0000)] 
xfer: Show a message if we are running out of mirrors

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agolinter: Skip linting any object files
Michael Tremer [Sat, 15 Feb 2025 12:05:21 +0000 (12:05 +0000)] 
linter: Skip linting any object files

We seem to only have very few of these, but this might be easier than
keeping any kind of whitelist.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoarchive writer: Don't compress in parallel
Michael Tremer [Sat, 15 Feb 2025 12:04:21 +0000 (12:04 +0000)] 
archive writer: Don't compress in parallel

There is almost no speed benefit here because most packages are rather
small so that Zstandard does not fan out. The result will however be a
couple of percent larger which is something we don't want.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopackager: Compress source archives less
Michael Tremer [Sat, 15 Feb 2025 12:03:47 +0000 (12:03 +0000)] 
packager: Compress source archives less

There is no reason to try to compress the compressed tarballs again.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopty: Connect stdin to /dev/null when not connected
Michael Tremer [Sat, 15 Feb 2025 11:40:53 +0000 (11:40 +0000)] 
pty: Connect stdin to /dev/null when not connected

We don't want to run an interactive console and nothing should think
that we are.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopty: Close the file descriptor of the console
Michael Tremer [Sat, 15 Feb 2025 11:39:27 +0000 (11:39 +0000)] 
pty: Close the file descriptor of the console

This file descriptor was otherwise just leaked.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agodaemon: Use macros to make time deltas easier to understand
Michael Tremer [Fri, 14 Feb 2025 17:49:46 +0000 (17:49 +0000)] 
daemon: Use macros to make time deltas easier to understand

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agolog file: Never write any debug stuff to the file
Michael Tremer [Fri, 14 Feb 2025 17:47:05 +0000 (17:47 +0000)] 
log file: Never write any debug stuff to the file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agodaemon: Don't remove the stats timer
Michael Tremer [Fri, 14 Feb 2025 17:41:27 +0000 (17:41 +0000)] 
daemon: Don't remove the stats timer

We used to free the stats timer whenever the daemon lost the connection
to the build service. Although that should be supported, it could make
the event loop abort because of some unexpected conditions.

This patch simply allocates the timer once and we just arm and disarm it
as needed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agobuild: Fix adding Python ABI dependencies
Michael Tremer [Fri, 14 Feb 2025 17:40:50 +0000 (17:40 +0000)] 
build: Fix adding Python ABI dependencies

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agocli: Remove unused variable
Michael Tremer [Fri, 14 Feb 2025 17:07:48 +0000 (17:07 +0000)] 
cli: Remove unused variable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopty: Move filtering escape characters to the PTY
Michael Tremer [Fri, 14 Feb 2025 17:04:32 +0000 (17:04 +0000)] 
pty: Move filtering escape characters to the PTY

This is probably the place where this should live. We are now processing
cursor positioning events inside the same line and we are filtering out
any escape sequences that we don't know.

It is a bit sad to lose the colors, but I don't have to have two places
where we process this. At least this is going to be more robust and we
can be sure to not forward anything malicious to the controlling
terminal.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agolog file: Try to process any ANSI escape sequences
Michael Tremer [Fri, 14 Feb 2025 15:55:27 +0000 (15:55 +0000)] 
log file: Try to process any ANSI escape sequences

This is a rather basic implementation and it has the problem that it
erases the entire timestamp on carriage return, too.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agobuild: Add CLI switch to write the build log to file
Michael Tremer [Fri, 14 Feb 2025 15:12:16 +0000 (15:12 +0000)] 
build: Add CLI switch to write the build log to file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoxfopen: Don't set errno when we don't fail
Michael Tremer [Mon, 10 Feb 2025 17:58:03 +0000 (17:58 +0000)] 
xfopen: Don't set errno when we don't fail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Ensure that we will always send the entire message before starting the next one
Michael Tremer [Thu, 13 Feb 2025 16:59:02 +0000 (16:59 +0000)] 
xfer: Ensure that we will always send the entire message before starting the next one

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfopen: Add more tests for invalid inputs
Michael Tremer [Mon, 10 Feb 2025 17:51:42 +0000 (17:51 +0000)] 
xfopen: Add more tests for invalid inputs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agostring: Fix error handling for strftime functions
Michael Tremer [Mon, 10 Feb 2025 17:38:48 +0000 (17:38 +0000)] 
string: Fix error handling for strftime functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agostrings: Remove an unused variable
Michael Tremer [Mon, 10 Feb 2025 17:38:08 +0000 (17:38 +0000)] 
strings: Remove an unused variable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Remove superfluous semicolon
Michael Tremer [Mon, 10 Feb 2025 17:31:22 +0000 (17:31 +0000)] 
json: Remove superfluous semicolon

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agostrings: Refactor formatting time
Michael Tremer [Mon, 10 Feb 2025 17:30:42 +0000 (17:30 +0000)] 
strings: Refactor formatting time

The previous function was generating wrong outputs, and strtime() should
be used for timestamps instead of deltas.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: Don't warn if an address always evaluates
Michael Tremer [Mon, 10 Feb 2025 17:15:28 +0000 (17:15 +0000)] 
tests: Don't warn if an address always evaluates

We have a couple of statically allocate strings that will trigger some
checks in the macros which is annoying.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: string: Fail with a clear error code on invalid input
Michael Tremer [Mon, 10 Feb 2025 17:10:54 +0000 (17:10 +0000)] 
tests: string: Fail with a clear error code on invalid input

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests/string.c: add test function for time formatting
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>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Add string formatting attribute
Michael Tremer [Mon, 10 Feb 2025 15:09:07 +0000 (15:09 +0000)] 
json: Add string formatting attribute

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agooci: Add some missing metadata
Michael Tremer [Mon, 10 Feb 2025 14:59:41 +0000 (14:59 +0000)] 
oci: Add some missing metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Add function to add formatted strings to an array
Michael Tremer [Mon, 10 Feb 2025 14:59:13 +0000 (14:59 +0000)] 
json: Add function to add formatted strings to an array

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoOCI: Add an entrypoint to the image
Michael Tremer [Sat, 8 Feb 2025 18:01:58 +0000 (18:01 +0000)] 
OCI: Add an entrypoint to the image

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Add a convenience function to append strings to arrays
Michael Tremer [Sat, 8 Feb 2025 18:01:28 +0000 (18:01 +0000)] 
json: Add a convenience function to append strings to arrays

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agooci: Add basic OCI metadata
Michael Tremer [Sat, 8 Feb 2025 17:50:17 +0000 (17:50 +0000)] 
oci: Add basic OCI metadata

This patch also revers back to SHA-2 256 since the tools that I have
been using to test this image with usually don't support SHA-2 512.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Add string formatting attribute
Michael Tremer [Sat, 8 Feb 2025 17:49:42 +0000 (17:49 +0000)] 
archive writer: Add string formatting attribute

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Add a convenience function to format strings
Michael Tremer [Sat, 8 Feb 2025 17:46:38 +0000 (17:46 +0000)] 
json: Add a convenience function to format strings

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohasher: Add a convenience function to has some data in memory
Michael Tremer [Sat, 8 Feb 2025 17:46:13 +0000 (17:46 +0000)] 
hasher: Add a convenience function to has some data in memory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Never ever pad the last block
Michael Tremer [Sat, 8 Feb 2025 17:45:36 +0000 (17:45 +0000)] 
archive writer: Never ever pad the last block

Even for gzip, this seems to confuse some implementations.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Make sure we flush all buffers
Michael Tremer [Sat, 8 Feb 2025 17:43:41 +0000 (17:43 +0000)] 
archive writer: Make sure we flush all buffers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Use gzip compression for OCI images
Michael Tremer [Sat, 8 Feb 2025 15:54:52 +0000 (15:54 +0000)] 
archive writer: Use gzip compression for OCI images

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agooci: Update the filename for the blob
Michael Tremer [Sat, 8 Feb 2025 15:07:53 +0000 (15:07 +0000)] 
oci: Update the filename for the blob

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agooci: Remove creating Docker metadata
Michael Tremer [Sat, 8 Feb 2025 15:02:15 +0000 (15:02 +0000)] 
oci: Remove creating Docker metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agooci: Write the OCI layout file
Michael Tremer [Sat, 8 Feb 2025 14:59:59 +0000 (14:59 +0000)] 
oci: Write the OCI layout file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agooci: Add some JSON data for the layer
Michael Tremer [Sat, 8 Feb 2025 14:45:19 +0000 (14:45 +0000)] 
oci: Add some JSON data for the layer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Add convenience function to write JSON files
Michael Tremer [Sat, 8 Feb 2025 14:17:06 +0000 (14:17 +0000)] 
archive writer: Add convenience function to write JSON files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agooci: Move the layer inside an uncompressed outer tarball
Michael Tremer [Sat, 8 Feb 2025 14:11:18 +0000 (14:11 +0000)] 
oci: Move the layer inside an uncompressed outer tarball

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Add function to add a larger file from disk
Michael Tremer [Sat, 8 Feb 2025 14:06:44 +0000 (14:06 +0000)] 
archive writer: Add function to add a larger file from disk

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Split off creating a new file entry
Michael Tremer [Sat, 8 Feb 2025 14:06:21 +0000 (14:06 +0000)] 
archive writer: Split off creating a new file entry

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Split off copying payload
Michael Tremer [Sat, 8 Feb 2025 14:05:18 +0000 (14:05 +0000)] 
archive writer: Split off copying payload

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Drop old compression code
Michael Tremer [Sat, 8 Feb 2025 13:01:07 +0000 (13:01 +0000)] 
compress: Drop old compression code

This became a little bit messy with so many options and therefore I
replaced this with the new archive writer.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agooci: Use the archive writer to create the layer
Michael Tremer [Sat, 8 Feb 2025 12:58:04 +0000 (12:58 +0000)] 
oci: Use the archive writer to create the layer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopackager: Rebase based on the new archive writer
Michael Tremer [Sat, 8 Feb 2025 12:36:36 +0000 (12:36 +0000)] 
packager: Rebase based on the new archive writer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Add function to add a file from memory
Michael Tremer [Sat, 8 Feb 2025 12:34:26 +0000 (12:34 +0000)] 
archive writer: Add function to add a file from memory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Store the timestamp when we wrote the archive
Michael Tremer [Sat, 8 Feb 2025 12:33:39 +0000 (12:33 +0000)] 
archive writer: Store the timestamp when we wrote the archive

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Implement writing files
Michael Tremer [Sat, 8 Feb 2025 11:36:26 +0000 (11:36 +0000)] 
archive writer: Implement writing files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Implement setting progress title
Michael Tremer [Sat, 8 Feb 2025 11:08:50 +0000 (11:08 +0000)] 
archive writer: Implement setting progress title

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Add a progress indicator
Michael Tremer [Sat, 8 Feb 2025 11:05:46 +0000 (11:05 +0000)] 
archive writer: Add a progress indicator

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Setup the link resolver
Michael Tremer [Sat, 8 Feb 2025 10:59:31 +0000 (10:59 +0000)] 
archive writer: Setup the link resolver

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Configure libarchive depending on the format
Michael Tremer [Sat, 8 Feb 2025 10:55:57 +0000 (10:55 +0000)] 
archive writer: Configure libarchive depending on the format

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive writer: Add scaffolding
Michael Tremer [Sat, 8 Feb 2025 10:29:41 +0000 (10:29 +0000)] 
archive writer: Add scaffolding

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfopen: Move transparent compression/decompression functions into a separate file
Michael Tremer [Sat, 8 Feb 2025 10:15:03 +0000 (10:15 +0000)] 
xfopen: Move transparent compression/decompression functions into a separate file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agooci: Add a simple way how to create an OCI image
Michael Tremer [Fri, 7 Feb 2025 23:06:53 +0000 (23:06 +0000)] 
oci: Add a simple way how to create an OCI image

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Add a simple function to install packages
Michael Tremer [Fri, 7 Feb 2025 23:05:04 +0000 (23:05 +0000)] 
pakfire: Add a simple function to install packages

This will come handy when generating images.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agofile: Don't silently fail if archives should not be hashed
Michael Tremer [Fri, 7 Feb 2025 23:04:05 +0000 (23:04 +0000)] 
file: Don't silently fail if archives should not be hashed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Add the option to make gzipped archives
Michael Tremer [Fri, 7 Feb 2025 23:03:30 +0000 (23:03 +0000)] 
compress: Add the option to make gzipped archives

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Don't rewind on just opened files
Michael Tremer [Fri, 7 Feb 2025 23:02:24 +0000 (23:02 +0000)] 
compress: Don't rewind on just opened files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Return properly on error
Michael Tremer [Fri, 7 Feb 2025 20:02:35 +0000 (20:02 +0000)] 
xfer: Return properly on error

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog buffer: Fix error code when enqueuing a line
Michael Tremer [Fri, 7 Feb 2025 19:58:47 +0000 (19:58 +0000)] 
log buffer: Fix error code when enqueuing a line

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Ensure we always send the entire buffer
Michael Tremer [Fri, 7 Feb 2025 19:58:11 +0000 (19:58 +0000)] 
xfer: Ensure we always send the entire buffer

cURL returns OK even if only parts of the buffer have been sent, so we
need to walk through the loop again to make sure all data is sent.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojobs: Go back to the event-driven model to send logs
Michael Tremer [Fri, 7 Feb 2025 17:56:43 +0000 (17:56 +0000)] 
jobs: Go back to the event-driven model to send logs

When the builder is not located in the same data center it can happen
that the send buffer fills up which results in a broken TCP connection
if we continue to send any data.

We will now first of all buffer any messages that have only been
partially sent and listen for when the socket is ready to receive the
rest. If so, we will flush our buffer.

Afterwards we will call the send callback which will go and look for any
more data to send.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Rename the receive buffer
Michael Tremer [Fri, 7 Feb 2025 17:55:01 +0000 (17:55 +0000)] 
xfer: Rename the receive buffer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Don't crash when no packages have been uploaded
Michael Tremer [Fri, 7 Feb 2025 16:04:07 +0000 (16:04 +0000)] 
job: Don't crash when no packages have been uploaded

I remove a check earlier which this code relied on.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Be less verbose when sending socket messages
Michael Tremer [Fri, 7 Feb 2025 15:56:47 +0000 (15:56 +0000)] 
xfer: Be less verbose when sending socket messages

cURL is already logging this for us.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Be patient when the websocket buffer is full
Michael Tremer [Fri, 7 Feb 2025 15:39:34 +0000 (15:39 +0000)] 
xfer: Be patient when the websocket buffer is full

When the log stream is starting a little while into the build, there
might be a big burst of data sent through the socket which might fill it
up. Then we need to be more patient and send the message again
remembering what has been sent before.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoAlways require WebSocket support in cURL
Michael Tremer [Fri, 7 Feb 2025 12:06:05 +0000 (12:06 +0000)] 
Always require WebSocket support in cURL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Drop building for Ubuntu 24.04
Michael Tremer [Fri, 7 Feb 2025 12:01:04 +0000 (12:01 +0000)] 
jenkins: Drop building for Ubuntu 24.04

This version does not have a recent enough version of cURL and
therefore, the build fails. I don't think we need to support anything
old here that does not support WebSockets.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Send timestamp when streaming the log
Michael Tremer [Fri, 7 Feb 2025 11:40:45 +0000 (11:40 +0000)] 
job: Send timestamp when streaming the log

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog buffer: Store a timestamp with each line
Michael Tremer [Fri, 7 Feb 2025 11:40:23 +0000 (11:40 +0000)] 
log buffer: Store a timestamp with each line

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