]> git.ipfire.org Git - pakfire.git/log
pakfire.git
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>
4 months agodaemon: Read more system information and sent it to the build service
Michael Tremer [Sat, 25 Jan 2025 15:38:29 +0000 (15:38 +0000)] 
daemon: Read more system information and sent it to the build service

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoos: Implement some custom CPU model detection for ARM
Michael Tremer [Sat, 25 Jan 2025 15:12:06 +0000 (15:12 +0000)] 
os: Implement some custom CPU model detection for ARM

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Apply architecture to apt preferences
Michael Tremer [Fri, 24 Jan 2025 16:15:30 +0000 (16:15 +0000)] 
jenkins: Apply architecture to apt preferences

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Support reading the keytab from config
Michael Tremer [Fri, 24 Jan 2025 15:13:31 +0000 (15:13 +0000)] 
daemon: Support reading the keytab from config

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodebian: Try forcing to build against cURL 8.11
Michael Tremer [Fri, 24 Jan 2025 15:08:20 +0000 (15:08 +0000)] 
debian: Try forcing to build against cURL 8.11

Since we only use the control files to build Debian packages, we can
probably hard-code some specific versions here to make our objective
work.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Ensure we use libcurl on Debian Bookworm
Michael Tremer [Fri, 24 Jan 2025 14:46:07 +0000 (14:46 +0000)] 
jenkins: Ensure we use libcurl on Debian Bookworm

apt-get build-dep does not seem to care about our local preferences
which is why we afterwards have to force-install the correct packages.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Enable coverage tests, too
Michael Tremer [Fri, 24 Jan 2025 13:34:32 +0000 (13:34 +0000)] 
python: Enable coverage tests, too

We should also check coverage for the Python modules. We might not
want/be able to get this to 100%, but a little bit is better than
nothing and it would also be very helpful to know what we actually
cannot cover.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodebian: Automatically uninstall the former libpakfire package
Michael Tremer [Fri, 24 Jan 2025 13:18:23 +0000 (13:18 +0000)] 
debian: Automatically uninstall the former libpakfire package

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Remove the range option from lcov
Michael Tremer [Fri, 24 Jan 2025 11:14:23 +0000 (11:14 +0000)] 
jenkins: Remove the range option from lcov

This is not understood by older versions.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Run LCOV tests on Debian Bookworm
Michael Tremer [Fri, 24 Jan 2025 10:30:02 +0000 (10:30 +0000)] 
jenkins: Run LCOV tests on Debian Bookworm

Debian Trixie seems to generate some problems and I don't know how to
work around them now.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodebian: Don't pick a certain version of cURL
Michael Tremer [Thu, 23 Jan 2025 23:27:09 +0000 (23:27 +0000)] 
debian: Don't pick a certain version of cURL

Debian provides multiple versions, but we actually don't really care
which one is being used. OpenSSL is used in Pakfire itself, but hey,
what does another library do?

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Configure Kerberos authentication
Michael Tremer [Thu, 23 Jan 2025 23:05:40 +0000 (23:05 +0000)] 
daemon: Configure Kerberos authentication

This will make sure the daemon stays authenticated and it will have its
own credentials cache. We will register a timer so that we will
automatically refresh the credentials whenever it is time.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agosrc/string: implement macro for function pakfire_format_speed
Rico Hoppe [Mon, 20 Jan 2025 16:55:32 +0000 (16:55 +0000)] 
src/string: implement macro for function pakfire_format_speed

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

Signed-off-by: Rico Hoppe <rico.hoppe@ipfire.org>
4 months agobuildservice: Don't send "(null)" as repository name if none given
Michael Tremer [Wed, 22 Jan 2025 15:01:39 +0000 (15:01 +0000)] 
buildservice: Don't send "(null)" as repository name if none given

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Tolerate receiving an empty API response
Michael Tremer [Wed, 22 Jan 2025 13:08:44 +0000 (13:08 +0000)] 
xfer: Tolerate receiving an empty API response

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Rename to self
Michael Tremer [Wed, 22 Jan 2025 12:02:00 +0000 (12:02 +0000)] 
httpclient: Rename to self

No functional changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Split dequeue and removing the handle
Michael Tremer [Wed, 22 Jan 2025 11:57:20 +0000 (11:57 +0000)] 
httpclient: Split dequeue and removing the handle

This helps us to simplify the reference counting for queued xfers, but
at the same time we can hold a reference to connected websockets.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Don't terminate the loop if we don't control it
Michael Tremer [Wed, 22 Jan 2025 10:52:07 +0000 (10:52 +0000)] 
httpclient: Don't terminate the loop if we don't control it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Don't store the configuration as string, parse it straight away
Michael Tremer [Wed, 22 Jan 2025 10:32:34 +0000 (10:32 +0000)] 
job: Don't store the configuration as string, parse it straight away

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Free any held resources after connecting to a job controller
Michael Tremer [Wed, 22 Jan 2025 10:27:47 +0000 (10:27 +0000)] 
job: Free any held resources after connecting to a job controller

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Don't exit too early to remove any websocket connects
Michael Tremer [Wed, 22 Jan 2025 10:25:20 +0000 (10:25 +0000)] 
xfer: Don't exit too early to remove any websocket connects

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Don't exit too early to unref the xfer
Michael Tremer [Wed, 22 Jan 2025 10:23:46 +0000 (10:23 +0000)] 
daemon: Don't exit too early to unref the xfer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Ensure we are uploading from the beginning of the file
Michael Tremer [Tue, 21 Jan 2025 17:33:08 +0000 (17:33 +0000)] 
xfer: Ensure we are uploading from the beginning of the file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Fail if the uploaded file could not be stat'ed
Michael Tremer [Tue, 21 Jan 2025 17:32:49 +0000 (17:32 +0000)] 
xfer: Fail if the uploaded file could not be stat'ed

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

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

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

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

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

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

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

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

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

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

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

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

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