]>
git.ipfire.org Git - pakfire.git/log
Michael Tremer [Fri, 27 Jun 2025 08:55:59 +0000 (08:55 +0000)]
xfer: Remove unused code
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 08:40:39 +0000 (08:40 +0000)]
xfer: Remove convenience function to run synchronous API requests
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 08:37:08 +0000 (08:37 +0000)]
client: Refactor listing repositories
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 08:33:54 +0000 (08:33 +0000)]
client: Refactor showing repositories
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 08:28:27 +0000 (08:28 +0000)]
client: Refactor deleting repositories
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 08:25:53 +0000 (08:25 +0000)]
CLI: Add a convenience function to run the client
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 08:19:00 +0000 (08:19 +0000)]
client: Refactor creating repositories
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 08:07:09 +0000 (08:07 +0000)]
client: Implement deleting uploads
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 07:59:51 +0000 (07:59 +0000)]
client: Store the access token, too
Initially I thought this would be nonsense because the tokens would be
very short-lived. However, one API request usually does not come alone
and so we would save ourselves a couple of roundtrips with storing the
access token, too.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 07:40:17 +0000 (07:40 +0000)]
tests: Add tests for JWT
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 07:39:47 +0000 (07:39 +0000)]
tests: Fix compiling the testsuite
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 07:19:48 +0000 (07:19 +0000)]
jwt: Free the decoded payload
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 07:16:50 +0000 (07:16 +0000)]
httpclient: Allow to configure the progress flags
This allows us to hide the progress bar when we are running API
requests.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 Jun 2025 07:08:45 +0000 (07:08 +0000)]
httpclient: Automatically launch when the event loop is started
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 17:55:56 +0000 (17:55 +0000)]
xfer: Remove the unused authentication function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 17:52:25 +0000 (17:52 +0000)]
xfer: Remove pakfire_xfer_add_param
We don't send any multipart-encoded form things any more.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 17:47:24 +0000 (17:47 +0000)]
builder: Cleanup the event loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 17:25:03 +0000 (17:25 +0000)]
ctx: -> self
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 17:18:33 +0000 (17:18 +0000)]
httpclient: Remove the loop running check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 17:16:14 +0000 (17:16 +0000)]
ctx: Move the loop running check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 17:02:58 +0000 (17:02 +0000)]
daemon: Don't leak the shutdown event
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 16:58:30 +0000 (16:58 +0000)]
client: Implement create builds from the CLI
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 16:00:41 +0000 (16:00 +0000)]
job: Implement some way to submit the job result
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 14:58:38 +0000 (14:58 +0000)]
job: Create a directory for the packages
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 14:50:01 +0000 (14:50 +0000)]
job: Upload the log file when a build has finished
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 14:49:06 +0000 (14:49 +0000)]
job: Make space to store all upload IDs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 14:33:31 +0000 (14:33 +0000)]
job: Don't send crash reports any more
This will be merged into the regular finished handler
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 14:30:33 +0000 (14:30 +0000)]
job: Call the finished handler in the main process
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 14:23:43 +0000 (14:23 +0000)]
job: Write the log file in the parent process
This should put some more things more where they belong which is in the
main process.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 14:02:29 +0000 (14:02 +0000)]
httpclient: Only use the context's event loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 13:58:05 +0000 (13:58 +0000)]
httpclient: Make the termination code clearer
We now simply set a flag when we launched the loop ourselves and
automatically terminate once everything is done.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 13:50:22 +0000 (13:50 +0000)]
httpclient: Automatically detect whether the event loop is running
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 13:25:46 +0000 (13:25 +0000)]
daemon: Don't leak signal events
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 13:20:19 +0000 (13:20 +0000)]
tests: Make the daemon test compile again
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 13:12:22 +0000 (13:12 +0000)]
client: Move sending a crash report here
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 13:11:47 +0000 (13:11 +0000)]
json: Add a function to add some binary as base64
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 13:11:22 +0000 (13:11 +0000)]
json: Add a function to add NULL to an object
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 10:02:44 +0000 (10:02 +0000)]
daemon: -> self
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 09:59:17 +0000 (09:59 +0000)]
daemon: Remove unused header files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 09:58:09 +0000 (09:58 +0000)]
daemon: Cleanup setting up the client
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 09:49:56 +0000 (09:49 +0000)]
daemon: Remove more unused code
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 09:48:49 +0000 (09:48 +0000)]
daemon: Remove function to fetch the client
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 09:47:38 +0000 (09:47 +0000)]
job: Give a reference to the client
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 Jun 2025 09:42:44 +0000 (09:42 +0000)]
builder: Move the job logic from the daemon
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 18:19:46 +0000 (18:19 +0000)]
client: Implement listing uploads asynchronously
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 17:34:22 +0000 (17:34 +0000)]
builder: Handle any incoming messages here
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 17:32:51 +0000 (17:32 +0000)]
builder: Reset the correct pointer
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 16:49:35 +0000 (16:49 +0000)]
builder: Move sending stats
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 16:49:04 +0000 (16:49 +0000)]
builder: Move function to send messages into the socket
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 16:47:59 +0000 (16:47 +0000)]
json: Optionally return the length of the serialized string
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 16:33:16 +0000 (16:33 +0000)]
daemon: Remove some unused code
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 16:30:31 +0000 (16:30 +0000)]
builder: Build scaffolding to submit stats regularly
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 16:13:27 +0000 (16:13 +0000)]
client: Don't let the HTTP client think it is running standalone
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 15:54:38 +0000 (15:54 +0000)]
job: Use the context's event loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 15:52:38 +0000 (15:52 +0000)]
daemon: Remove the HTTP client
This is now all fully merged into the high-level client.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 Jun 2025 15:51:29 +0000 (15:51 +0000)]
daemon: Drop all sorts of timers and what not
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>