]> git.ipfire.org Git - pakfire.git/log
pakfire.git
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
2 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>
2 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>
2 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>
2 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>
3 months agoxfer: Use our own buffer implementation for the receive buffer
Michael Tremer [Wed, 16 Apr 2025 15:45:29 +0000 (15:45 +0000)] 
xfer: Use our own buffer implementation for the receive buffer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopackager: Fix return codes
Michael Tremer [Tue, 15 Apr 2025 17:09:14 +0000 (17:09 +0000)] 
packager: Fix return codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agobuild: Log a better message when a build has been interrupted
Michael Tremer [Tue, 15 Apr 2025 17:05:32 +0000 (17:05 +0000)] 
build: Log a better message when a build has been interrupted

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoxfer: Clear the overflow buffer after the segment could be sent
Michael Tremer [Wed, 16 Apr 2025 15:37:07 +0000 (15:37 +0000)] 
xfer: Clear the overflow buffer after the segment could be sent

This is a stub and I will replace the send and receive buffers with our
own buffer implementation.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agodaemon: Store Kerberos credentials in memory
Michael Tremer [Tue, 15 Apr 2025 17:00:28 +0000 (17:00 +0000)] 
daemon: Store Kerberos credentials in memory

I think I am starting to become confused. At least in trixie and
bookworm-backports, we seem to be linking against MIT. This seems to
work now on my machine. Let's hope this is a general thing.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agodaemon: Completely destroy the Kerberos credentials cache on update
Michael Tremer [Tue, 15 Apr 2025 16:53:11 +0000 (16:53 +0000)] 
daemon: Completely destroy the Kerberos credentials cache on update

This is required because on Debian, cURL is linked against Heimdal which
does not seem to be able to skip any deleted tickets in the file.
Instead it always uses the first ticket which would eventually have
expired. Therefore we destroy the entire cache and write it again so
Heimdal cannot get confused.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agojenkins: Ensure we have gawk available on Fedora
Michael Tremer [Wed, 2 Apr 2025 10:32:04 +0000 (10:32 +0000)] 
jenkins: Ensure we have gawk available on Fedora

Fedora 42 does not seem to install this by default any more, but our
configure script wants to use it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Always install all updates before trying to install any packages
Michael Tremer [Sun, 30 Mar 2025 17:33:42 +0000 (17:33 +0000)] 
jenkins: Always install all updates before trying to install any packages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Ensure the keyring is up to date on Archlinux
Michael Tremer [Sun, 30 Mar 2025 17:15:17 +0000 (17:15 +0000)] 
jenkins: Ensure the keyring is up to date on Archlinux

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodist: Remove the old solution to pass the filename
Michael Tremer [Sun, 30 Mar 2025 16:32:18 +0000 (16:32 +0000)] 
dist: Remove the old solution to pass the filename

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive: Add function to fetch the desired filename
Michael Tremer [Sun, 30 Mar 2025 16:28:07 +0000 (16:28 +0000)] 
archive: Add function to fetch the desired filename

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: Add tests for dist()
Michael Tremer [Sun, 30 Mar 2025 16:11:07 +0000 (16:11 +0000)] 
tests: Add tests for dist()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Make dist() work again
Michael Tremer [Sun, 30 Mar 2025 16:10:43 +0000 (16:10 +0000)] 
python: Make dist() work again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agofile: Don't try to resolve paths relative to Pakfire in stub mode
Michael Tremer [Thu, 27 Mar 2025 18:07:57 +0000 (18:07 +0000)] 
file: Don't try to resolve paths relative to Pakfire in stub mode

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopwd: Don't permit any UID/GID lookups in stub mode
Michael Tremer [Thu, 27 Mar 2025 18:07:27 +0000 (18:07 +0000)] 
pwd: Don't permit any UID/GID lookups in stub mode

This is simply not supported because we don't have a file system.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopackager: Don't use an invalid pointer to a freed JSON object
Michael Tremer [Thu, 27 Mar 2025 11:15:53 +0000 (11:15 +0000)] 
packager: Don't use an invalid pointer to a freed JSON object

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive write: Fetch length of serialized JSON string from libjson-c
Michael Tremer [Thu, 27 Mar 2025 11:15:31 +0000 (11:15 +0000)] 
archive write: Fetch length of serialized JSON string from libjson-c

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Always stream logs
Michael Tremer [Thu, 27 Mar 2025 10:33:04 +0000 (10:33 +0000)] 
job: Always stream logs

This was too fragile before and I think we should be able to afford the
stupid traffic...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojobs: Use function to check if a flag is set
Michael Tremer [Thu, 27 Mar 2025 10:32:56 +0000 (10:32 +0000)] 
jobs: Use function to check if a flag is set

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Retry authentication if we could not reach the KDC
Michael Tremer [Wed, 26 Mar 2025 17:03:07 +0000 (17:03 +0000)] 
daemon: Retry authentication if we could not reach the KDC

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Remove any previous credentials
Michael Tremer [Wed, 26 Mar 2025 16:49:01 +0000 (16:49 +0000)] 
daemon: Remove any previous credentials

Otherwise krb5 will append all credentials, but Heimdal only seems to
read the first (eventually) expired ticket.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Make Kerberos refresh time easier to understand
Michael Tremer [Wed, 26 Mar 2025 16:48:40 +0000 (16:48 +0000)] 
daemon: Make Kerberos refresh time easier to understand

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoutil: Return converted timestamps as long
Michael Tremer [Wed, 26 Mar 2025 16:48:17 +0000 (16:48 +0000)] 
util: Return converted timestamps as long

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Move the main callback
Michael Tremer [Wed, 26 Mar 2025 15:53:41 +0000 (15:53 +0000)] 
jail: Move the main callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Use our own string comparison function
Michael Tremer [Wed, 26 Mar 2025 15:46:12 +0000 (15:46 +0000)] 
repo: Use our own string comparison function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Fix return codes of bind function
Michael Tremer [Wed, 26 Mar 2025 15:38:55 +0000 (15:38 +0000)] 
jail: Fix return codes of bind function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: execute: Implement bind-mounting mountpoints
Michael Tremer [Wed, 26 Mar 2025 14:43:13 +0000 (14:43 +0000)] 
python: execute: Implement bind-mounting mountpoints

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: execute: Capture stdout/stderr separately
Michael Tremer [Wed, 26 Mar 2025 10:30:14 +0000 (10:30 +0000)] 
python: execute: Capture stdout/stderr separately

That way, we can raise the error output and return the rest

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: execute: Actually verify the set nice level
Michael Tremer [Tue, 25 Mar 2025 11:38:45 +0000 (11:38 +0000)] 
tests: execute: Actually verify the set nice level

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: execute: Bring back the open file descriptor test
Michael Tremer [Tue, 25 Mar 2025 11:36:41 +0000 (11:36 +0000)] 
tests: execute: Bring back the open file descriptor test

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: execute: Actually check the output
Michael Tremer [Tue, 25 Mar 2025 11:36:12 +0000 (11:36 +0000)] 
tests: execute: Actually check the output

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: Add some simple tests for the buffer
Michael Tremer [Tue, 25 Mar 2025 11:33:37 +0000 (11:33 +0000)] 
tests: Add some simple tests for the buffer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: Only negative return values are considered unsuccessful
Michael Tremer [Tue, 25 Mar 2025 11:26:15 +0000 (11:26 +0000)] 
tests: Only negative return values are considered unsuccessful

Sometimes we want to return the length of consumed input, so this should
all be considered successful.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopo: Update translations
Michael Tremer [Tue, 25 Mar 2025 11:10:57 +0000 (11:10 +0000)] 
po: Update translations

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog stream: Don't fail if no callback has been registered
Michael Tremer [Tue, 25 Mar 2025 11:09:35 +0000 (11:09 +0000)] 
log stream: Don't fail if no callback has been registered

This should usually never happen.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuild: Don't drop into a shell when build has been interrupted
Michael Tremer [Tue, 25 Mar 2025 11:08:51 +0000 (11:08 +0000)] 
build: Don't drop into a shell when build has been interrupted

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Cleanly terminate on SIGINT
Michael Tremer [Tue, 25 Mar 2025 11:06:46 +0000 (11:06 +0000)] 
jail: Cleanly terminate on SIGINT

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Move syscall wrapper to where it should be
Michael Tremer [Tue, 25 Mar 2025 10:44:50 +0000 (10:44 +0000)] 
jail: Move syscall wrapper to where it should be

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: execute: Check that we are not running for forever
Michael Tremer [Tue, 25 Mar 2025 10:42:39 +0000 (10:42 +0000)] 
tests: execute: Check that we are not running for forever

There was a bug once where the loop never terminated if the process
actually could never be executed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Drain the pipes after the process has terminated
Michael Tremer [Tue, 25 Mar 2025 10:42:19 +0000 (10:42 +0000)] 
jail: Drain the pipes after the process has terminated

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Free the input buffer after we are done
Michael Tremer [Tue, 25 Mar 2025 10:32:37 +0000 (10:32 +0000)] 
jail: Free the input buffer after we are done

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: Free string array after use
Michael Tremer [Tue, 25 Mar 2025 09:34:14 +0000 (09:34 +0000)] 
tests: Free string array after use

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Move the filelist streaming helper from PTY
Michael Tremer [Mon, 24 Mar 2025 19:38:31 +0000 (19:38 +0000)] 
jail: Move the filelist streaming helper from PTY

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Move the send buffer function from the PTY
Michael Tremer [Mon, 24 Mar 2025 19:34:46 +0000 (19:34 +0000)] 
jail: Move the send buffer function from the PTY

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Refactor the output callback
Michael Tremer [Mon, 24 Mar 2025 19:27:24 +0000 (19:27 +0000)] 
jail: Refactor the output callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuild: Remove any traces of the deprecated PTY stdin callback
Michael Tremer [Mon, 24 Mar 2025 18:58:33 +0000 (18:58 +0000)] 
build: Remove any traces of the deprecated PTY stdin callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Refactor streaming data into the jail
Michael Tremer [Mon, 24 Mar 2025 18:46:34 +0000 (18:46 +0000)] 
jail: Refactor streaming data into the jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: jail: Consume any output of the pipe
Michael Tremer [Mon, 24 Mar 2025 18:44:50 +0000 (18:44 +0000)] 
tests: jail: Consume any output of the pipe

This is just because of the log streamer complaining

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuffer: Add a helper function that fills a buffer with a callback
Michael Tremer [Mon, 24 Mar 2025 18:39:36 +0000 (18:39 +0000)] 
buffer: Add a helper function that fills a buffer with a callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog stream: Return the number of bytes written
Michael Tremer [Mon, 24 Mar 2025 18:39:07 +0000 (18:39 +0000)] 
log stream: Return the number of bytes written

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Only make the parent ends of the pipes non-blocking
Michael Tremer [Mon, 24 Mar 2025 18:13:39 +0000 (18:13 +0000)] 
jail: Only make the parent ends of the pipes non-blocking

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuffer: Don't allow to resize the buffer smaller than what it holds
Michael Tremer [Mon, 24 Mar 2025 18:11:36 +0000 (18:11 +0000)] 
buffer: Don't allow to resize the buffer smaller than what it holds

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuffer: Don't allow the buffer to grow larger than its defined length
Michael Tremer [Mon, 24 Mar 2025 18:10:49 +0000 (18:10 +0000)] 
buffer: Don't allow the buffer to grow larger than its defined length

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