]> git.ipfire.org Git - pakfire.git/log
pakfire.git
7 weeks agoclient: Move builder stuff into a separate object
Michael Tremer [Wed, 25 Jun 2025 15:48:48 +0000 (15:48 +0000)] 
client: Move builder stuff into a separate object

This is messy as hell. I moved so much stuff around and lost track of
most of it. So this is a commit to kind of have some baseline.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agocli: Fix initializing the client
Michael Tremer [Wed, 25 Jun 2025 15:48:13 +0000 (15:48 +0000)] 
cli: Fix initializing the client

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agohttpclient: Drop unused function to return the event loop
Michael Tremer [Wed, 25 Jun 2025 15:40:39 +0000 (15:40 +0000)] 
httpclient: Drop unused function to return the event loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Use the context's event loop
Michael Tremer [Wed, 25 Jun 2025 15:39:17 +0000 (15:39 +0000)] 
client: Use the context's event loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agohttpclient: Use the context's loop
Michael Tremer [Wed, 25 Jun 2025 15:36:16 +0000 (15:36 +0000)] 
httpclient: Use the context's loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoctx: Create an event loop
Michael Tremer [Wed, 25 Jun 2025 15:26:46 +0000 (15:26 +0000)] 
ctx: Create an event loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agodaemon: Create the control connection as soon as the client is ready
Michael Tremer [Wed, 25 Jun 2025 13:42:52 +0000 (13:42 +0000)] 
daemon: Create the control connection as soon as the client is ready

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Require full authentication when the refresh token has expired
Michael Tremer [Wed, 25 Jun 2025 13:18:19 +0000 (13:18 +0000)] 
client: Require full authentication when the refresh token has expired

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Don't require reauthentication when we have some tokens
Michael Tremer [Wed, 25 Jun 2025 13:17:43 +0000 (13:17 +0000)] 
client: Don't require reauthentication when we have some tokens

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojwt: Add a convenience function to check whether a token has expires
Michael Tremer [Wed, 25 Jun 2025 13:17:16 +0000 (13:17 +0000)] 
jwt: Add a convenience function to check whether a token has expires

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Refresh auth tokens when a timer fires
Michael Tremer [Wed, 25 Jun 2025 13:09:05 +0000 (13:09 +0000)] 
client: Refresh auth tokens when a timer fires

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Immediately fetch an access token when loading from store
Michael Tremer [Wed, 25 Jun 2025 13:06:20 +0000 (13:06 +0000)] 
client: Immediately fetch an access token when loading from store

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Actually set the auth refresh payload
Michael Tremer [Wed, 25 Jun 2025 13:05:59 +0000 (13:05 +0000)] 
client: Actually set the auth refresh payload

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Move authentication refresh function to the top
Michael Tremer [Wed, 25 Jun 2025 13:01:37 +0000 (13:01 +0000)] 
client: Move authentication refresh function to the top

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Break setting the tokens into helper functions
Michael Tremer [Wed, 25 Jun 2025 12:40:47 +0000 (12:40 +0000)] 
client: Break setting the tokens into helper functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Read/write credentials of the principal
Michael Tremer [Wed, 25 Jun 2025 12:22:49 +0000 (12:22 +0000)] 
client: Read/write credentials of the principal

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojson: Add helper function to write JSON data to file
Michael Tremer [Wed, 25 Jun 2025 12:22:20 +0000 (12:22 +0000)] 
json: Add helper function to write JSON data to file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoutil: Remove pakfire argument from pakfire_file_write
Michael Tremer [Wed, 25 Jun 2025 12:09:40 +0000 (12:09 +0000)] 
util: Remove pakfire argument from pakfire_file_write

This is not needed any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Use the hostname as default principal
Michael Tremer [Wed, 25 Jun 2025 12:00:31 +0000 (12:00 +0000)] 
client: Use the hostname as default principal

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Add some principal to the client
Michael Tremer [Wed, 25 Jun 2025 11:57:06 +0000 (11:57 +0000)] 
client: Add some principal to the client

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Call the upload callback when the upload has finished
Michael Tremer [Wed, 25 Jun 2025 11:18:47 +0000 (11:18 +0000)] 
client: Call the upload callback when the upload has finished

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Remove any left-over uploads when freeing the client
Michael Tremer [Wed, 25 Jun 2025 11:16:48 +0000 (11:16 +0000)] 
client: Remove any left-over uploads when freeing the client

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Automatically remove uploads from queue on free
Michael Tremer [Wed, 25 Jun 2025 11:16:21 +0000 (11:16 +0000)] 
client: Automatically remove uploads from queue on free

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Don't attempt to parse a JSON response when there is no data
Michael Tremer [Wed, 25 Jun 2025 10:58:26 +0000 (10:58 +0000)] 
xfer: Don't attempt to parse a JSON response when there is no data

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Call the API callback on uploads, too
Michael Tremer [Wed, 25 Jun 2025 10:58:01 +0000 (10:58 +0000)] 
xfer: Call the API callback on uploads, too

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agocli: Refactor storing authentication credentials
Michael Tremer [Wed, 25 Jun 2025 10:37:17 +0000 (10:37 +0000)] 
cli: Refactor storing authentication credentials

The config object will be removed once we have finished initializing the
other objects. Therefore we will have to copy the credentials somewhere
else before.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agocli: client: Always load client.conf
Michael Tremer [Wed, 25 Jun 2025 10:36:41 +0000 (10:36 +0000)] 
cli: client: Always load client.conf

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agocli: Read credentials from the configuration file (for now)
Michael Tremer [Wed, 25 Jun 2025 10:25:23 +0000 (10:25 +0000)] 
cli: Read credentials from the configuration file (for now)

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Remove unused string extraction function
Michael Tremer [Wed, 25 Jun 2025 10:14:43 +0000 (10:14 +0000)] 
client: Remove unused string extraction function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Create separate timers for access/refresh token refresh
Michael Tremer [Wed, 25 Jun 2025 10:13:07 +0000 (10:13 +0000)] 
client: Create separate timers for access/refresh token refresh

These are also now only initialized when we actually need them. That
helps us to deal with all those status changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agohttpclient: Remove launch protection without transfers
Michael Tremer [Wed, 25 Jun 2025 10:02:21 +0000 (10:02 +0000)] 
httpclient: Remove launch protection without transfers

We need this so that we can lazy-initialize the client.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Call the auth callback when we need authentication
Michael Tremer [Wed, 25 Jun 2025 10:01:44 +0000 (10:01 +0000)] 
client: Call the auth callback when we need authentication

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agocli: Create a dummy authentication function
Michael Tremer [Wed, 25 Jun 2025 10:01:20 +0000 (10:01 +0000)] 
cli: Create a dummy authentication function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Call the ready callback once we are successfully authenticated
Michael Tremer [Wed, 25 Jun 2025 10:00:42 +0000 (10:00 +0000)] 
client: Call the ready callback once we are successfully authenticated

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agocli: auth: Use the new ready callback
Michael Tremer [Wed, 25 Jun 2025 09:45:59 +0000 (09:45 +0000)] 
cli: auth: Use the new ready callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agocli: Use the new ready function to start the uploads
Michael Tremer [Wed, 25 Jun 2025 09:32:48 +0000 (09:32 +0000)] 
cli: Use the new ready function to start the uploads

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Call an init function whenever the event loop starts
Michael Tremer [Wed, 25 Jun 2025 09:32:00 +0000 (09:32 +0000)] 
client: Call an init function whenever the event loop starts

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Add a ready callback
Michael Tremer [Wed, 25 Jun 2025 09:23:24 +0000 (09:23 +0000)] 
client: Add a ready callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Implement asynchronous uploads
Michael Tremer [Wed, 25 Jun 2025 09:02:36 +0000 (09:02 +0000)] 
client: Implement asynchronous uploads

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoprogress: Allow restart by keeping the state up to date
Michael Tremer [Wed, 25 Jun 2025 08:49:33 +0000 (08:49 +0000)] 
progress: Allow restart by keeping the state up to date

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Log an error when we want to use authentication without being authenticated
Michael Tremer [Tue, 24 Jun 2025 17:01:06 +0000 (17:01 +0000)] 
client: Log an error when we want to use authentication without being authenticated

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Remove keytab
Michael Tremer [Tue, 24 Jun 2025 16:14:40 +0000 (16:14 +0000)] 
client: Remove keytab

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Move the callback into the auth struct
Michael Tremer [Tue, 24 Jun 2025 16:14:03 +0000 (16:14 +0000)] 
client: Move the callback into the auth struct

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Move the tokens into the auth struct
Michael Tremer [Tue, 24 Jun 2025 16:13:06 +0000 (16:13 +0000)] 
client: Move the tokens into the auth struct

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Fire a timer just before the access token expires
Michael Tremer [Tue, 24 Jun 2025 16:10:51 +0000 (16:10 +0000)] 
client: Fire a timer just before the access token expires

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Move the authentication timer from the daemon
Michael Tremer [Tue, 24 Jun 2025 15:56:19 +0000 (15:56 +0000)] 
client: Move the authentication timer from the daemon

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Use the event loop from the HTTP client
Michael Tremer [Tue, 24 Jun 2025 15:55:40 +0000 (15:55 +0000)] 
client: Use the event loop from the HTTP client

The HTTP client needs to have more control so that it can automatically
terminate the event loop when it is done.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agodaemon: Remove the authentication framework
Michael Tremer [Tue, 24 Jun 2025 15:46:32 +0000 (15:46 +0000)] 
daemon: Remove the authentication framework

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Hold a reference to the event loop
Michael Tremer [Tue, 24 Jun 2025 15:46:03 +0000 (15:46 +0000)] 
client: Hold a reference to the event loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agocli: Return auth result in exit code
Michael Tremer [Tue, 24 Jun 2025 15:34:04 +0000 (15:34 +0000)] 
cli: Return auth result in exit code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Actually call the authentication callback
Michael Tremer [Tue, 24 Jun 2025 15:33:44 +0000 (15:33 +0000)] 
client: Actually call the authentication callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Make user authentication asynchronous
Michael Tremer [Tue, 24 Jun 2025 15:27:53 +0000 (15:27 +0000)] 
client: Make user authentication asynchronous

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Implement an API response callback
Michael Tremer [Tue, 24 Jun 2025 15:21:13 +0000 (15:21 +0000)] 
xfer: Implement an API response callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Add a convenience function to run the standalone client
Michael Tremer [Tue, 24 Jun 2025 15:01:56 +0000 (15:01 +0000)] 
client: Add a convenience function to run the standalone client

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Add an authentication callback
Michael Tremer [Tue, 24 Jun 2025 15:01:15 +0000 (15:01 +0000)] 
client: Add an authentication callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Bring back an own HTTP client instance
Michael Tremer [Tue, 24 Jun 2025 14:49:00 +0000 (14:49 +0000)] 
client: Bring back an own HTTP client instance

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoconfigure: Drop dependency on libkrb5
Michael Tremer [Tue, 24 Jun 2025 14:33:58 +0000 (14:33 +0000)] 
configure: Drop dependency on libkrb5

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agodaemon: Remove Kerberos authentication
Michael Tremer [Tue, 24 Jun 2025 14:31:57 +0000 (14:31 +0000)] 
daemon: Remove Kerberos authentication

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojson: Actually jump to the error block if JSON could not be parsed
Michael Tremer [Sat, 21 Jun 2025 18:16:15 +0000 (18:16 +0000)] 
json: Actually jump to the error block if JSON could not be parsed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoclient: Rename the build service to client
Michael Tremer [Sat, 21 Jun 2025 18:14:13 +0000 (18:14 +0000)] 
client: Rename the build service to client

This is simply to have way shorter function names, because things have
started to become a little bit ridiculous. No functional changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Format transfer times in milliseconds
Michael Tremer [Sat, 21 Jun 2025 17:52:57 +0000 (17:52 +0000)] 
xfer: Format transfer times in milliseconds

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojenkins: Explicitely install autopoint on Debian-based distros
Michael Tremer [Sat, 21 Jun 2025 17:45:17 +0000 (17:45 +0000)] 
jenkins: Explicitely install autopoint on Debian-based distros

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojenkins: Explicitely install Gettext on all distros
Michael Tremer [Sat, 21 Jun 2025 17:38:06 +0000 (17:38 +0000)] 
jenkins: Explicitely install Gettext on all distros

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoconfigure: Explicitely configure Gettext
Michael Tremer [Sat, 21 Jun 2025 17:32:07 +0000 (17:32 +0000)] 
configure: Explicitely configure Gettext

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobuildservice: Send all other API requests with a JSON payload
Michael Tremer [Sat, 21 Jun 2025 17:29:24 +0000 (17:29 +0000)] 
buildservice: Send all other API requests with a JSON payload

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojson: Add function to add a boolean value
Michael Tremer [Sat, 21 Jun 2025 17:27:20 +0000 (17:27 +0000)] 
json: Add function to add a boolean value

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobuildservice: Remove all dependencies to Kerberos
Michael Tremer [Sat, 21 Jun 2025 17:11:58 +0000 (17:11 +0000)] 
buildservice: Remove all dependencies to Kerberos

We will no longer use this for the API authentication.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobuildservice: Automatically refresh the access token on expiry
Michael Tremer [Sat, 21 Jun 2025 17:09:24 +0000 (17:09 +0000)] 
buildservice: Automatically refresh the access token on expiry

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Accept a JSON request object to send as payload for API requests
Michael Tremer [Sat, 21 Jun 2025 17:07:14 +0000 (17:07 +0000)] 
xfer: Accept a JSON request object to send as payload for API requests

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobuildservice: Implement uploads using the new API
Michael Tremer [Sat, 21 Jun 2025 16:51:43 +0000 (16:51 +0000)] 
buildservice: Implement uploads using the new API

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Send the appropriate content type header is sending JSON
Michael Tremer [Sat, 21 Jun 2025 16:51:09 +0000 (16:51 +0000)] 
xfer: Send the appropriate content type header is sending JSON

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobuildservice: Implement authentication using the access token
Michael Tremer [Sat, 21 Jun 2025 16:49:41 +0000 (16:49 +0000)] 
buildservice: Implement authentication using the access token

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojson: Align creating new JSON objects with other interfaces
Michael Tremer [Sat, 21 Jun 2025 16:35:12 +0000 (16:35 +0000)] 
json: Align creating new JSON objects with other interfaces

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Add a function to add a JSON request body
Michael Tremer [Sat, 21 Jun 2025 16:24:06 +0000 (16:24 +0000)] 
xfer: Add a function to add a JSON request body

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoJWT: Make the functions context-free
Michael Tremer [Sat, 21 Jun 2025 16:21:51 +0000 (16:21 +0000)] 
JWT: Make the functions context-free

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojson: Cleanup the JSON parsing interfaces
Michael Tremer [Sat, 21 Jun 2025 16:16:55 +0000 (16:16 +0000)] 
json: Cleanup the JSON parsing interfaces

We should not always require the context to have some basic logging.
Instead we can return the error as a string.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojson: Use the new string serialization function everywhere
Michael Tremer [Sat, 21 Jun 2025 15:57:39 +0000 (15:57 +0000)] 
json: Use the new string serialization function everywhere

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojson: Add a function to convert JSON to string
Michael Tremer [Sat, 21 Jun 2025 15:53:16 +0000 (15:53 +0000)] 
json: Add a function to convert JSON to string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobase64: No longer require the input length
Michael Tremer [Sat, 21 Jun 2025 13:02:44 +0000 (13:02 +0000)] 
base64: No longer require the input length

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobuildservice: Decode expiry times from access/refresh tokens
Michael Tremer [Sat, 21 Jun 2025 13:00:10 +0000 (13:00 +0000)] 
buildservice: Decode expiry times from access/refresh tokens

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoJWT: Normalize base64 data before decoding
Michael Tremer [Sat, 21 Jun 2025 12:59:41 +0000 (12:59 +0000)] 
JWT: Normalize base64 data before decoding

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobase64: Add function to normalize non-standard base64
Michael Tremer [Sat, 21 Jun 2025 12:59:17 +0000 (12:59 +0000)] 
base64: Add function to normalize non-standard base64

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agojwt: Add some simple functions to parse JWTs
Michael Tremer [Sat, 21 Jun 2025 12:38:53 +0000 (12:38 +0000)] 
jwt: Add some simple functions to parse JWTs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobase64: Allow specifying the length of the input buffer
Michael Tremer [Sat, 21 Jun 2025 12:32:33 +0000 (12:32 +0000)] 
base64: Allow specifying the length of the input buffer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agocli: Add a command to test user authentication against the API
Michael Tremer [Sat, 21 Jun 2025 11:48:00 +0000 (11:48 +0000)] 
cli: Add a command to test user authentication against the API

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobuildservice: Add a function to authenticate a user against the API
Michael Tremer [Sat, 21 Jun 2025 11:47:29 +0000 (11:47 +0000)] 
buildservice: Add a function to authenticate a user against the API

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agobuildservice: Tell the API that we would like to receive JSON
Michael Tremer [Sat, 21 Jun 2025 11:46:36 +0000 (11:46 +0000)] 
buildservice: Tell the API that we would like to receive JSON

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Add a function to send a custom POST payload
Michael Tremer [Sat, 21 Jun 2025 11:46:00 +0000 (11:46 +0000)] 
xfer: Add a function to send a custom POST payload

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Add a function to set custom headers
Michael Tremer [Sat, 21 Jun 2025 11:45:35 +0000 (11:45 +0000)] 
xfer: Add a function to set custom headers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Add a function to URL escape any strings
Michael Tremer [Sat, 21 Jun 2025 11:44:58 +0000 (11:44 +0000)] 
xfer: Add a function to URL escape any strings

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoxfer: Pass any numeric values as long
Michael Tremer [Sat, 21 Jun 2025 11:43:59 +0000 (11:43 +0000)] 
xfer: Pass any numeric values as long

cURL now complains if the value is not long.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agoreadme: update bug report url
Rico Hoppe [Tue, 21 Jan 2025 12:05:32 +0000 (12:05 +0000)] 
readme: update bug report url

Signed-off-by: Rico Hoppe <rico.hoppe@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoxfer: Fix logic error in reading WebSocket messages
Michael Tremer [Sat, 3 May 2025 14:03:46 +0000 (14:03 +0000)] 
xfer: Fix logic error in reading WebSocket messages

After the message was read we never cleared the buffer which resulted
that on every message, the callback was called with the entire buffer.
Usually that meant that only the first JSON message was parsed and
handled. Again and again and again...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoxfer: Remove recursive function call
Michael Tremer [Sat, 3 May 2025 14:02:53 +0000 (14:02 +0000)] 
xfer: Remove recursive function call

I am not sure why I am suddenly scared of this, but there have been some
security-relevant issues where this could exhaust the stack.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agodaemon: Use our own string comparison macro
Michael Tremer [Sat, 3 May 2025 14:01:52 +0000 (14:01 +0000)] 
daemon: Use our own string comparison macro

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agodaemon: Send the IDs of all running jobs
Michael Tremer [Sat, 3 May 2025 12:52:13 +0000 (12:52 +0000)] 
daemon: Send the IDs of all running jobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agojobs: Stream logs as base64-encoded data
Michael Tremer [Sun, 20 Apr 2025 14:11:43 +0000 (14:11 +0000)] 
jobs: Stream logs as base64-encoded data

There should not be anything else but ASCII or Unicode characters here,
but we can never be too sure. Therefore we will encode all data as
base64 to keep the protocol somewhat extensible.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agobase64: Replace the encoder/decoder with low-level functions
Michael Tremer [Sun, 20 Apr 2025 13:56:48 +0000 (13:56 +0000)] 
base64: Replace the encoder/decoder with low-level functions

The BIO interface is large and very well suited to encode larger
messages. However, we only have very small messages to encode and
therefore will spend a long time on setting up and destroying the BIO
interface all of the time.

These low-level functions are a lot faster and easier to set up.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agobuffer: Rename fields again
Michael Tremer [Wed, 16 Apr 2025 15:58:08 +0000 (15:58 +0000)] 
buffer: Rename fields again

I even confused myself here because length is actually not the length of
the buffer that I wanted. It is what has been allocated. That is however
nothing that we need to access at any time. Therefore the fields have
been renamed to be a little bit more intuitive again.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoxfer: Replace the send buffer with our own buffer implementation
Michael Tremer [Wed, 16 Apr 2025 15:54:30 +0000 (15:54 +0000)] 
xfer: Replace the send buffer with our own buffer implementation

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