]> git.ipfire.org Git - pakfire.git/log
pakfire.git
4 months agorepo: Refactor finding the installed repository
Michael Tremer [Thu, 30 Jan 2025 09:12:16 +0000 (09:12 +0000)] 
repo: Refactor finding the installed repository

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Refactor identity function
Michael Tremer [Thu, 30 Jan 2025 09:07:33 +0000 (09:07 +0000)] 
repo: Refactor identity function

We could in theory have two repositories with the same name.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Drop an unused function
Michael Tremer [Thu, 30 Jan 2025 09:06:04 +0000 (09:06 +0000)] 
repo: Drop an unused function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Refactor opening existing repositories
Michael Tremer [Thu, 30 Jan 2025 09:04:30 +0000 (09:04 +0000)] 
repo: Refactor opening existing repositories

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Refactor creating a new repo
Michael Tremer [Thu, 30 Jan 2025 08:55:27 +0000 (08:55 +0000)] 
repo: Refactor creating a new repo

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Fix weird argument handling
Michael Tremer [Thu, 30 Jan 2025 08:39:48 +0000 (08:39 +0000)] 
repo: Fix weird argument handling

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Remove the braindead UUID parsing/unparsing
Michael Tremer [Thu, 30 Jan 2025 08:36:00 +0000 (08:36 +0000)] 
job: Remove the braindead UUID parsing/unparsing

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojobs: Pass all log messages on to the upstream logger
Michael Tremer [Thu, 30 Jan 2025 08:28:47 +0000 (08:28 +0000)] 
jobs: Pass all log messages on to the upstream logger

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog file: Change compression to gzip
Michael Tremer [Thu, 30 Jan 2025 08:21:25 +0000 (08:21 +0000)] 
log file: Change compression to gzip

Although it would be nice to only use one compression algorithm, the
challenges to use Zstandard are a little bit too large. The compression
is actually not better (if even) and takes up a lot more resources. At
the same time, there is very little support for Zstandard in browsers
and Python itself, which results us writing a lot of extra code to
ensure that the files are often decoded again to be delivered in
plaintext and being DEFLATEd again by the reverse proxies.

So it all makes a lot more sense to use gzip from the start and just be
done with it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Add transparent gzip compression
Michael Tremer [Thu, 30 Jan 2025 08:17:22 +0000 (08:17 +0000)] 
compress: Add transparent gzip compression

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoconfigure: Depend on zlib
Michael Tremer [Thu, 30 Jan 2025 08:16:45 +0000 (08:16 +0000)] 
configure: Depend on zlib

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Don't use chunked encoding for uploads
Michael Tremer [Wed, 29 Jan 2025 18:36:29 +0000 (18:36 +0000)] 
xfer: Don't use chunked encoding for uploads

This is deprecated in HTTP/2 and on the server side we now live without
it. cURL even sends a Content-Length header which is quite helpful.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agostring: Don't return the number of elements in an array after append
Michael Tremer [Wed, 29 Jan 2025 17:11:08 +0000 (17:11 +0000)] 
string: Don't return the number of elements in an array after append

We don't use this anywhere and it requires to reset r whenever we store
the value in it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Drastically increase the Zstandard compression level
Michael Tremer [Wed, 29 Jan 2025 17:10:21 +0000 (17:10 +0000)] 
compress: Drastically increase the Zstandard compression level

All files that we generate are being transferred or stored for a long
time. So it should be wise to always spend the extra CPU cycles.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog file: Add a human readable filename argument
Michael Tremer [Wed, 29 Jan 2025 17:10:02 +0000 (17:10 +0000)] 
log file: Add a human readable filename argument

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Create a log file and write the entire job output to it
Michael Tremer [Wed, 29 Jan 2025 16:49:03 +0000 (16:49 +0000)] 
job: Create a log file and write the entire job output to it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog file: Reset the file handle immediately
Michael Tremer [Wed, 29 Jan 2025 16:47:46 +0000 (16:47 +0000)] 
log file: Reset the file handle immediately

Since we are calling some logging functions from here we might want to
write to the closed file handle.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Always set title on upload
Michael Tremer [Wed, 29 Jan 2025 16:46:47 +0000 (16:46 +0000)] 
buildservice: Always set title on upload

This will always be set, so there is no point in adding this check.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Send digest without choosing some algorithm
Michael Tremer [Wed, 29 Jan 2025 16:46:23 +0000 (16:46 +0000)] 
buildservice: Send digest without choosing some algorithm

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Reformat how to play with arguments
Michael Tremer [Wed, 29 Jan 2025 16:45:52 +0000 (16:45 +0000)] 
buildservice: Reformat how to play with arguments

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog stream: Make this more versatile
Michael Tremer [Wed, 29 Jan 2025 15:06:15 +0000 (15:06 +0000)] 
log stream: Make this more versatile

This is needed because we have differnt types of input and therefore
need to be able to handle them all.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuild: Log something when the result callback returned non-zero
Michael Tremer [Wed, 29 Jan 2025 15:03:52 +0000 (15:03 +0000)] 
build: Log something when the result callback returned non-zero

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Properly implement the log stream now
Michael Tremer [Wed, 29 Jan 2025 15:02:14 +0000 (15:02 +0000)] 
job: Properly implement the log stream now

This is now a post event which will always be called when there have
been any other events processed. We will therefore try to send as many
log lines as possible before we terminate.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: compress: Tidy up the code to get better assertion messages
Michael Tremer [Wed, 29 Jan 2025 14:00:59 +0000 (14:00 +0000)] 
tests: compress: Tidy up the code to get better assertion messages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Make setting the upload filename optional
Michael Tremer [Wed, 29 Jan 2025 14:00:35 +0000 (14:00 +0000)] 
buildservice: Make setting the upload filename optional

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Correctly terminate on EOF
Michael Tremer [Wed, 29 Jan 2025 14:00:12 +0000 (14:00 +0000)] 
compress: Correctly terminate on EOF

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Refactor transparent Zstandard compression
Michael Tremer [Wed, 29 Jan 2025 11:46:39 +0000 (11:46 +0000)] 
compress: Refactor transparent Zstandard compression

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog file: Add new object to write a (compressed) log file
Michael Tremer [Wed, 29 Jan 2025 11:09:44 +0000 (11:09 +0000)] 
log file: Add new object to write a (compressed) log file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Use the URL to upload the payload
Michael Tremer [Wed, 29 Jan 2025 10:40:57 +0000 (10:40 +0000)] 
buildservice: Use the URL to upload the payload

This is just a change in the protocol which hopefully will give us some
more flexibility in the future.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuilds: Remove old target implementation
Michael Tremer [Tue, 28 Jan 2025 17:53:18 +0000 (17:53 +0000)] 
builds: Remove old target implementation

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: Add some basic tests for the log stream
Michael Tremer [Tue, 28 Jan 2025 17:50:14 +0000 (17:50 +0000)] 
tests: Add some basic tests for the log stream

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog stream: Add a function to print custom content into the stream
Michael Tremer [Tue, 28 Jan 2025 17:49:35 +0000 (17:49 +0000)] 
log stream: Add a function to print custom content into the stream

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog stream: Don't loop forever if we did not find a line break
Michael Tremer [Tue, 28 Jan 2025 17:47:55 +0000 (17:47 +0000)] 
log stream: Don't loop forever if we did not find a line break

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog stream: Only call the read function when there is new data to read
Michael Tremer [Tue, 28 Jan 2025 17:47:13 +0000 (17:47 +0000)] 
log stream: Only call the read function when there is new data to read

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog stream: Add function to close the stream
Michael Tremer [Tue, 28 Jan 2025 17:43:21 +0000 (17:43 +0000)] 
log stream: Add function to close the stream

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Send an API call once the job has finished
Michael Tremer [Tue, 28 Jan 2025 16:29:05 +0000 (16:29 +0000)] 
job: Send an API call once the job has finished

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojobs: Upload packages after the build is done
Michael Tremer [Tue, 28 Jan 2025 15:49:26 +0000 (15:49 +0000)] 
jobs: Upload packages after the build is done

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Simplify how it is being initialized
Michael Tremer [Tue, 28 Jan 2025 15:23:44 +0000 (15:23 +0000)] 
buildservice: Simplify how it is being initialized

This make this all more re-usable in other places.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuild: Add a result callback and use it in the CLI builder
Michael Tremer [Tue, 28 Jan 2025 15:07:40 +0000 (15:07 +0000)] 
build: Add a result callback and use it in the CLI builder

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Add a function that imports an archive
Michael Tremer [Tue, 28 Jan 2025 15:05:08 +0000 (15:05 +0000)] 
repo: Add a function that imports an archive

I know that we have been doing this in so many places, but hopefully
this is now the new (soon to be unified) way to do this.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuild: Drop old code that copies the packages after build
Michael Tremer [Tue, 28 Jan 2025 15:04:11 +0000 (15:04 +0000)] 
build: Drop old code that copies the packages after build

This is broken and needs to be replaced by something more custom.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopackage: Make a function available to all that generates the filename
Michael Tremer [Tue, 28 Jan 2025 15:03:10 +0000 (15:03 +0000)] 
package: Make a function available to all that generates the filename

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Pass the package as well as the archive
Michael Tremer [Tue, 28 Jan 2025 14:00:35 +0000 (14:00 +0000)] 
repo: Pass the package as well as the archive

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepos: Add a convenient way to iterate over all local archives
Michael Tremer [Tue, 28 Jan 2025 11:40:27 +0000 (11:40 +0000)] 
repos: Add a convenient way to iterate over all local archives

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuild: Remove remains of some logging callback
Michael Tremer [Tue, 28 Jan 2025 11:23:08 +0000 (11:23 +0000)] 
build: Remove remains of some logging callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopackages: Fix group parsing for legacy package formats
Michael Tremer [Tue, 28 Jan 2025 11:16:51 +0000 (11:16 +0000)] 
packages: Fix group parsing for legacy package formats

In older package formats, we stored the groups as a string. The current
test package is in this format and the added code ensures that we can
parse the group.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: Fix running Python tests
Michael Tremer [Tue, 28 Jan 2025 11:05:07 +0000 (11:05 +0000)] 
tests: Fix running Python tests

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive: Use the branch prediction macros in potentially hot code
Michael Tremer [Tue, 28 Jan 2025 11:02:09 +0000 (11:02 +0000)] 
archive: Use the branch prediction macros in potentially hot code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agostrings: Use the branch prediction macros in potentially hot code
Michael Tremer [Tue, 28 Jan 2025 11:01:50 +0000 (11:01 +0000)] 
strings: Use the branch prediction macros in potentially hot code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoutil: Introduce macros to tell the compiler how likely branches are
Michael Tremer [Tue, 28 Jan 2025 11:01:25 +0000 (11:01 +0000)] 
util: Introduce macros to tell the compiler how likely branches are

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarch: Use our own string comparison function
Michael Tremer [Tue, 28 Jan 2025 10:47:37 +0000 (10:47 +0000)] 
arch: Use our own string comparison function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agostring: Make setting a string faster
Michael Tremer [Mon, 27 Jan 2025 17:51:52 +0000 (17:51 +0000)] 
string: Make setting a string faster

This avoids calling a lot of libc functions that we actually don't need.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuild: Ensure the ccache directory exists or create it
Michael Tremer [Mon, 27 Jan 2025 17:40:47 +0000 (17:40 +0000)] 
build: Ensure the ccache directory exists or create it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Always append a / to the base URL
Michael Tremer [Mon, 27 Jan 2025 17:36:13 +0000 (17:36 +0000)] 
xfer: Always append a / to the base URL

When cURL merges URLs it will cut off the last part if the URL is not
terminated with /.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agostring: Add a function to append something to a string
Michael Tremer [Mon, 27 Jan 2025 17:35:45 +0000 (17:35 +0000)] 
string: Add a function to append something to a string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Don't crash if xfer finishes too early
Michael Tremer [Mon, 27 Jan 2025 17:29:27 +0000 (17:29 +0000)] 
xfer: Don't crash if xfer finishes too early

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodeps: Remove unused variable
Michael Tremer [Mon, 27 Jan 2025 17:26:24 +0000 (17:26 +0000)] 
deps: Remove unused variable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Return an error if we could not subscribe to signals
Michael Tremer [Mon, 27 Jan 2025 16:55:10 +0000 (16:55 +0000)] 
daemon: Return an error if we could not subscribe to signals

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocgroup: Initialize return value in case there are no children
Michael Tremer [Mon, 27 Jan 2025 16:53:18 +0000 (16:53 +0000)] 
cgroup: Initialize return value in case there are no children

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoELF: Initilize r just in case the binary has no program headers
Michael Tremer [Mon, 27 Jan 2025 16:52:36 +0000 (16:52 +0000)] 
ELF: Initilize r just in case the binary has no program headers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Initialize return value on scan just in case we find no files
Michael Tremer [Mon, 27 Jan 2025 16:50:52 +0000 (16:50 +0000)] 
repo: Initialize return value on scan just in case we find no files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Refactor fetching dependencies and re-use existing code
Michael Tremer [Mon, 27 Jan 2025 16:45:42 +0000 (16:45 +0000)] 
python: Refactor fetching dependencies and re-use existing code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Minor code cleanups in Solution class
Michael Tremer [Mon, 27 Jan 2025 16:40:23 +0000 (16:40 +0000)] 
python: Minor code cleanups in Solution class

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Identify as "pakfire" and not "_pakfire"
Michael Tremer [Mon, 27 Jan 2025 16:38:26 +0000 (16:38 +0000)] 
python: Identify as "pakfire" and not "_pakfire"

The module was renamed some time ago.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Use the string array function for arches
Michael Tremer [Mon, 27 Jan 2025 16:34:26 +0000 (16:34 +0000)] 
python: Use the string array function for arches

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Drop file handle wrapper
Michael Tremer [Mon, 27 Jan 2025 16:30:08 +0000 (16:30 +0000)] 
python: Drop file handle wrapper

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Use strings functions to free strings in Package
Michael Tremer [Mon, 27 Jan 2025 16:28:08 +0000 (16:28 +0000)] 
python: Use strings functions to free strings in Package

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Minor code cleanups in the Package class
Michael Tremer [Mon, 27 Jan 2025 16:24:44 +0000 (16:24 +0000)] 
python: Minor code cleanups in the Package class

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoconfigure: Fix config.h
Michael Tremer [Mon, 27 Jan 2025 16:22:57 +0000 (16:22 +0000)] 
configure: Fix config.h

PACKAGE_VERSION was accidentially redefined which rendered all compiler
checks broken which then wiped out all custom CFLAGS that we have been
using.

This patch adds a new variable with the full version which fixes the
problem.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Remove setters from Package
Michael Tremer [Mon, 27 Jan 2025 16:02:37 +0000 (16:02 +0000)] 
python: Remove setters from Package

We don't need to modify anything, we just want to read this all.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Don't mess with rlimit
Michael Tremer [Mon, 27 Jan 2025 15:55:35 +0000 (15:55 +0000)] 
pakfire: Don't mess with rlimit

This should not be here, because we will run this in the Python module
which is loaded by some other process. If anything we should only set
this on processes that we control, but currently I have never run into
this becoming a problem.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Drop the distro check
Michael Tremer [Mon, 27 Jan 2025 15:48:44 +0000 (15:48 +0000)] 
pakfire: Drop the distro check

I don't remember why I added this, but it is an obstruction when we
launch Pakfire in the build service without any configuration just to
open an archive or something like that.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Fail with a more simple return value
Michael Tremer [Mon, 27 Jan 2025 15:43:17 +0000 (15:43 +0000)] 
python: Fail with a more simple return value

There is no way to extrapolate why the function call has failed but
reading the log.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Take configuration as string and fix return values
Michael Tremer [Mon, 27 Jan 2025 15:41:20 +0000 (15:41 +0000)] 
python: Take configuration as string and fix return values

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoconfig: Don't try to parse an empty input
Michael Tremer [Mon, 27 Jan 2025 15:40:59 +0000 (15:40 +0000)] 
config: Don't try to parse an empty input

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodeps: Remove debug line
Michael Tremer [Mon, 27 Jan 2025 14:12:00 +0000 (14:12 +0000)] 
deps: Remove debug line

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Install the Python module to the right location
Michael Tremer [Mon, 27 Jan 2025 14:11:04 +0000 (14:11 +0000)] 
python: Install the Python module to the right location

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Let systemd tell us when it is shutting down
Michael Tremer [Mon, 27 Jan 2025 13:54:14 +0000 (13:54 +0000)] 
daemon: Let systemd tell us when it is shutting down

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Prevent the system from shutting down when jobs are running
Michael Tremer [Mon, 27 Jan 2025 11:29:28 +0000 (11:29 +0000)] 
daemon: Prevent the system from shutting down when jobs are running

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Decrement the running job counter when a job has finished
Michael Tremer [Mon, 27 Jan 2025 10:38:53 +0000 (10:38 +0000)] 
daemon: Decrement the running job counter when a job has finished

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Connect to the system dbus
Michael Tremer [Mon, 27 Jan 2025 10:37:23 +0000 (10:37 +0000)] 
daemon: Connect to the system dbus

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Submit stats a little bit less often
Michael Tremer [Mon, 27 Jan 2025 10:28:05 +0000 (10:28 +0000)] 
daemon: Submit stats a little bit less often

I don't think we need stats that often when the host is idle, and even
when it is busy, once every 15 seconds sounds fine to me.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Once the job has exited, we need to remove it from the daemon
Michael Tremer [Sun, 26 Jan 2025 17:06:47 +0000 (17:06 +0000)] 
job: Once the job has exited, we need to remove it from the daemon

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojobs: Make pakfire_job_exited static
Michael Tremer [Sun, 26 Jan 2025 17:06:29 +0000 (17:06 +0000)] 
jobs: Make pakfire_job_exited static

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Build some experimental function to stream the log to the build service
Michael Tremer [Sun, 26 Jan 2025 16:58:03 +0000 (16:58 +0000)] 
job: Build some experimental function to stream the log to the build service

This does not seem to be called often enough. If, however, we don't send
-EAGAIN we will be called as fast as possible starving the loop.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Write all received logs into the buffer only
Michael Tremer [Sun, 26 Jan 2025 16:53:20 +0000 (16:53 +0000)] 
job: Write all received logs into the buffer only

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Send a crash report in case the job crashes
Michael Tremer [Sun, 26 Jan 2025 16:51:38 +0000 (16:51 +0000)] 
job: Send a crash report in case the job crashes

This currently does not seem to be able to send the log because it never
ends up in our buffer.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog buffer: Add a function to dump everything
Michael Tremer [Sun, 26 Jan 2025 16:51:03 +0000 (16:51 +0000)] 
log buffer: Add a function to dump everything

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Log to the console when in debug mode
Michael Tremer [Sun, 26 Jan 2025 16:26:31 +0000 (16:26 +0000)] 
daemon: Log to the console when in debug mode

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog buffer: Make the dequeue operation zero-copy
Michael Tremer [Sun, 26 Jan 2025 15:46:49 +0000 (15:46 +0000)] 
log buffer: Make the dequeue operation zero-copy

Since we already have a copy of the data which will no longer need, we
can keep our internal pointer and just skip freeing it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog buffer: Keep count of the current number of lines
Michael Tremer [Sun, 26 Jan 2025 15:43:30 +0000 (15:43 +0000)] 
log buffer: Keep count of the current number of lines

This avoids the rather expensive counting operation.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Avoid double-free when downloading files
Michael Tremer [Sun, 26 Jan 2025 15:22:02 +0000 (15:22 +0000)] 
repo: Avoid double-free when downloading files

We pass control over f to xfer which will close it, so we cannot call
fclose() ourselves any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Rename the configuration attribute in message
Michael Tremer [Sun, 26 Jan 2025 15:04:49 +0000 (15:04 +0000)] 
job: Rename the configuration attribute in message

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodeps: Make the pool for version comparisons persistent
Michael Tremer [Sun, 26 Jan 2025 12:28:48 +0000 (12:28 +0000)] 
deps: Make the pool for version comparisons persistent

This should perform better on the build service when we are sorting
packages, etc. since we can re-use the pool/string pool and
serialization.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Try to include the build ID in Pakfire's version
Michael Tremer [Sat, 25 Jan 2025 18:22:32 +0000 (18:22 +0000)] 
jenkins: Try to include the build ID in Pakfire's version

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoos: Actually read some stuff from DMI
Michael Tremer [Sat, 25 Jan 2025 18:00:31 +0000 (18:00 +0000)] 
os: Actually read some stuff from DMI

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Reset the reconnection timer on connect
Michael Tremer [Sat, 25 Jan 2025 17:54:12 +0000 (17:54 +0000)] 
daemon: Reset the reconnection timer on connect

This used to be reset in the wrong place; when a build job was received.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Send information that does not change only once
Michael Tremer [Sat, 25 Jan 2025 17:53:23 +0000 (17:53 +0000)] 
daemon: Send information that does not change only once

We used to send a lot of unnecessary stuff when we submitted stats. The
CPU model usually does not change, and so we will only send it once when
we connect.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Add function to append query arguments
Michael Tremer [Sat, 25 Jan 2025 17:02:18 +0000 (17:02 +0000)] 
xfer: Add function to append query arguments

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Free and re-allocate the full URL
Michael Tremer [Sat, 25 Jan 2025 16:02:58 +0000 (16:02 +0000)] 
xfer: Free and re-allocate the full URL

This is necessary so that we won't carry over anything from the first
run in case we have to update the URL later.

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