]> git.ipfire.org Git - pakfire.git/log
pakfire.git
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 months agopakfire: Don't leak our locking fd into the jail
Michael Tremer [Mon, 24 Mar 2025 18:10:15 +0000 (18:10 +0000)] 
pakfire: Don't leak our locking fd into the jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agojail: Flush any output after we have updated the buffers
Michael Tremer [Mon, 24 Mar 2025 16:53:42 +0000 (16:53 +0000)] 
jail: Flush any output after we have updated the buffers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Use our own buffer implementation
Michael Tremer [Mon, 24 Mar 2025 16:49:40 +0000 (16:49 +0000)] 
pty: Use our own buffer implementation

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agotests: log stream: Replace PTY test with file handle test
Michael Tremer [Mon, 24 Mar 2025 16:47:31 +0000 (16:47 +0000)] 
tests: log stream: Replace PTY test with file handle test

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Remove code that maps CRNL to NL
Michael Tremer [Mon, 24 Mar 2025 16:12:11 +0000 (16:12 +0000)] 
pty: Remove code that maps CRNL to NL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Remove all sorts of code that is not needed any more
Michael Tremer [Mon, 24 Mar 2025 16:10:01 +0000 (16:10 +0000)] 
pty: Remove all sorts of code that is not needed any more

This is all of the non-interactive code.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agojail: Bring back pipes for non-interactive sessions
Michael Tremer [Mon, 24 Mar 2025 15:58:33 +0000 (15:58 +0000)] 
jail: Bring back pipes for non-interactive sessions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agojail: Use the PTY only for interactive sessions
Michael Tremer [Sun, 23 Mar 2025 13:53:48 +0000 (13:53 +0000)] 
jail: Use the PTY only for interactive sessions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agobuffer: Always allocate at least one chunk
Michael Tremer [Sat, 22 Mar 2025 18:21:23 +0000 (18:21 +0000)] 
buffer: Always allocate at least one chunk

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agobuffer: Automatically shrink the buffer
Michael Tremer [Sat, 22 Mar 2025 18:21:02 +0000 (18:21 +0000)] 
buffer: Automatically shrink the buffer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agobuffer: Correctly compute the new desired length when growing
Michael Tremer [Sat, 22 Mar 2025 18:20:17 +0000 (18:20 +0000)] 
buffer: Correctly compute the new desired length when growing

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agobuffer: Add function to configure the maximum length
Michael Tremer [Sat, 22 Mar 2025 18:10:14 +0000 (18:10 +0000)] 
buffer: Add function to configure the maximum length

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agobuffer: Give the functions slightly better names
Michael Tremer [Sat, 22 Mar 2025 18:07:09 +0000 (18:07 +0000)] 
buffer: Give the functions slightly better names

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agolog stream: Use the new buffer implementation
Michael Tremer [Sat, 22 Mar 2025 18:04:22 +0000 (18:04 +0000)] 
log stream: Use the new buffer implementation

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agobuffer: Create a new generic buffer implementation
Michael Tremer [Sat, 22 Mar 2025 18:03:31 +0000 (18:03 +0000)] 
buffer: Create a new generic buffer implementation

This is used to hold a dynamically growing buffer.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agolog stream: Expect the callback to consume the entire line
Michael Tremer [Sat, 22 Mar 2025 16:57:36 +0000 (16:57 +0000)] 
log stream: Expect the callback to consume the entire line

This is otherwise getting out of hand and we should not have a place
where this would become an issue.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agojail: Use log stream to perform line-buffered output
Michael Tremer [Sat, 22 Mar 2025 16:56:59 +0000 (16:56 +0000)] 
jail: Use log stream to perform line-buffered output

This helps us to split the complexity between the PTY and some extra
buffering code.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agotests: log stream: Stream another line
Michael Tremer [Sat, 22 Mar 2025 16:39:24 +0000 (16:39 +0000)] 
tests: log stream: Stream another line

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: execute: Use the send buffer callback we already have
Michael Tremer [Sat, 22 Mar 2025 16:35:57 +0000 (16:35 +0000)] 
python: execute: Use the send buffer callback we already have

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agolog stream: Move data as second argument of the callback
Michael Tremer [Sat, 22 Mar 2025 16:29:34 +0000 (16:29 +0000)] 
log stream: Move data as second argument of the callback

That way, we are compatible with the PTY stdout callback.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agolog stream: Change first argument of the callback to ctx
Michael Tremer [Sat, 22 Mar 2025 16:16:58 +0000 (16:16 +0000)] 
log stream: Change first argument of the callback to ctx

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agoPTY: Remove the rest of the line buffering code
Michael Tremer [Sat, 22 Mar 2025 16:11:44 +0000 (16:11 +0000)] 
PTY: Remove the rest of the line buffering code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agolog stream: Add an experimental implementation to stream from PTY
Michael Tremer [Sat, 22 Mar 2025 15:51:37 +0000 (15:51 +0000)] 
log stream: Add an experimental implementation to stream from PTY

This is the first step to split all the complicated line buffering from
the PTY code.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agolog streamer: Move line sanitization from PTY
Michael Tremer [Sat, 22 Mar 2025 15:50:53 +0000 (15:50 +0000)] 
log streamer: Move line sanitization from PTY

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Major refactor
Michael Tremer [Sat, 22 Mar 2025 15:02:12 +0000 (15:02 +0000)] 
pty: Major refactor

This adds loads of comments to hopefully make this thing more robust. So
far we don't really seem to be able to implement all the features we
need without destroying others.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agojail: Pass the program exit code as return code of the loop
Michael Tremer [Sat, 22 Mar 2025 14:20:23 +0000 (14:20 +0000)] 
jail: Pass the program exit code as return code of the loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agotests: command: Always return zero after the pipe is finished
Michael Tremer [Sat, 22 Mar 2025 14:19:46 +0000 (14:19 +0000)] 
tests: command: Always return zero after the pipe is finished

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Always disable character echoing
Michael Tremer [Thu, 20 Mar 2025 16:47:16 +0000 (16:47 +0000)] 
pty: Always disable character echoing

This usually happens later in case of the interactive version, but since
we don't need to configure much in the pipe case, we can just set this
as default.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Add a function to set up interactive mode
Michael Tremer [Thu, 20 Mar 2025 11:30:38 +0000 (11:30 +0000)] 
pty: Add a function to set up interactive mode

This way we can split off the initialization code a little bit better
from the main initialization of the PTY object.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Refactor how we capture output
Michael Tremer [Tue, 18 Mar 2025 18:02:26 +0000 (18:02 +0000)] 
pty: Refactor how we capture output

This will now avoid copying all the data around between the kernel and
userland and will also simply use our own callbacks which helps us to
keep the code a little bit less of an if/else hell.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agojail: Remove use of removed PTY flags
Michael Tremer [Tue, 18 Mar 2025 17:20:01 +0000 (17:20 +0000)] 
jail: Remove use of removed PTY flags

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Re-organise flags
Michael Tremer [Tue, 18 Mar 2025 17:19:07 +0000 (17:19 +0000)] 
pty: Re-organise flags

The CONNECT* flags have been used for two purposes which got mixed up on
the way which is why the standard input was not connected for callbacks.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Add more logging when reading/writing
Michael Tremer [Tue, 18 Mar 2025 17:08:04 +0000 (17:08 +0000)] 
pty: Add more logging when reading/writing

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopty: Automatically drain when the event loop finishes
Michael Tremer [Tue, 18 Mar 2025 17:05:55 +0000 (17:05 +0000)] 
pty: Automatically drain when the event loop finishes

There was the problem that some content could have remained stuck in the
buffers on occasion.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agotests: Fail with error code if fgetc() returns an error
Michael Tremer [Tue, 18 Mar 2025 16:59:40 +0000 (16:59 +0000)] 
tests: Fail with error code if fgetc() returns an error

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agotransaction: Tidy up cleanup code
Michael Tremer [Tue, 18 Mar 2025 16:37:17 +0000 (16:37 +0000)] 
transaction: Tidy up cleanup code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agojail: Tidy up creating a new jail
Michael Tremer [Tue, 18 Mar 2025 10:48:20 +0000 (10:48 +0000)] 
jail: Tidy up creating a new jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: pakfire: Keep a reference to the Python context
Michael Tremer [Tue, 18 Mar 2025 10:41:30 +0000 (10:41 +0000)] 
python: pakfire: Keep a reference to the Python context

Since we are registering all sorts of callbacks to here, we cannot
deallocate the Ctx object, or we won't be able to use them any more.

This is being fixed by holding a reference to the Python object instead
of the context itself. That will at least help us with lots of these
problems.

There is still, however, the problem that both the Python Ctx and
Pakfire object can be dereferenced when the backend objects will remain
existing.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: Pakfire: Remove old callbacks from headers
Michael Tremer [Tue, 18 Mar 2025 10:40:44 +0000 (10:40 +0000)] 
python: Pakfire: Remove old callbacks from headers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agotests: python: Don't call depreated unit test function
Michael Tremer [Tue, 18 Mar 2025 10:39:44 +0000 (10:39 +0000)] 
tests: python: Don't call depreated unit test function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: ctx: Always forward all messages to the logger
Michael Tremer [Tue, 18 Mar 2025 10:38:40 +0000 (10:38 +0000)] 
python: ctx: Always forward all messages to the logger

We will let the Python logger filter out what we don't need.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: execute: Implement passing data into stdin
Michael Tremer [Tue, 18 Mar 2025 09:31:13 +0000 (09:31 +0000)] 
python: execute: Implement passing data into stdin

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: execute: Raise any output
Michael Tremer [Tue, 18 Mar 2025 09:11:35 +0000 (09:11 +0000)] 
python: execute: Raise any output

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: execute: Allow returning the output of the command
Michael Tremer [Mon, 17 Mar 2025 11:46:29 +0000 (11:46 +0000)] 
python: execute: Allow returning the output of the command

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agojail: Remove unused function declaration
Michael Tremer [Mon, 17 Mar 2025 11:31:42 +0000 (11:31 +0000)] 
jail: Remove unused function declaration

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: execute: Implement setting the nice value
Michael Tremer [Mon, 17 Mar 2025 11:22:58 +0000 (11:22 +0000)] 
python: execute: Implement setting the nice value

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agojail: Fix return code of nice function
Michael Tremer [Mon, 17 Mar 2025 11:22:16 +0000 (11:22 +0000)] 
jail: Fix return code of nice function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: Bring back a basic version of Pakfire.execute()
Michael Tremer [Mon, 17 Mar 2025 11:17:20 +0000 (11:17 +0000)] 
python: Bring back a basic version of Pakfire.execute()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agopython: Re-add CommandExecutionError
Michael Tremer [Mon, 17 Mar 2025 11:15:53 +0000 (11:15 +0000)] 
python: Re-add CommandExecutionError

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopython: Send the progress title in the start callback
Michael Tremer [Sat, 15 Mar 2025 12:01:25 +0000 (12:01 +0000)] 
python: Send the progress title in the start callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoprogress: Add a status callback
Michael Tremer [Sat, 15 Mar 2025 11:53:25 +0000 (11:53 +0000)] 
progress: Add a status callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoprogress: Allow to push/pop the status
Michael Tremer [Sat, 15 Mar 2025 11:37:25 +0000 (11:37 +0000)] 
progress: Allow to push/pop the status

That way, we can return to something more useful.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agostrings: Add a function to pop the last element of an array
Michael Tremer [Sat, 15 Mar 2025 11:26:59 +0000 (11:26 +0000)] 
strings: Add a function to pop the last element of an array

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agotests: Fix compilation of the archive test
Michael Tremer [Sat, 15 Mar 2025 11:15:23 +0000 (11:15 +0000)] 
tests: Fix compilation of the archive test

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agotransaction: Drop old status callback
Michael Tremer [Sat, 15 Mar 2025 11:13:57 +0000 (11:13 +0000)] 
transaction: Drop old status callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agotransaction: Add a unified progress meter
Michael Tremer [Sat, 15 Mar 2025 11:09:08 +0000 (11:09 +0000)] 
transaction: Add a unified progress meter

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoprogress: Never show any status for child-progress meters
Michael Tremer [Sat, 15 Mar 2025 11:08:30 +0000 (11:08 +0000)] 
progress: Never show any status for child-progress meters

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoprogress: Add support for a status message
Michael Tremer [Sat, 15 Mar 2025 10:53:49 +0000 (10:53 +0000)] 
progress: Add support for a status message

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoarchive: Add support for a parent progress indicator for extraction
Michael Tremer [Sat, 15 Mar 2025 10:53:16 +0000 (10:53 +0000)] 
archive: Add support for a parent progress indicator for extraction

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoprogress: Rename status to state
Michael Tremer [Sat, 15 Mar 2025 10:44:45 +0000 (10:44 +0000)] 
progress: Rename status to state

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopython: transaction: Add function to run the transaction
Michael Tremer [Fri, 14 Mar 2025 17:59:02 +0000 (17:59 +0000)] 
python: transaction: Add function to run the transaction

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopython: ctx: Initialize the callbacks
Michael Tremer [Fri, 14 Mar 2025 17:58:40 +0000 (17:58 +0000)] 
python: ctx: Initialize the callbacks

Just to be safe...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopython: ctx: Ensure we are holding the GIL
Michael Tremer [Fri, 14 Mar 2025 17:57:39 +0000 (17:57 +0000)] 
python: ctx: Ensure we are holding the GIL

This is required because we usally return the GIL when we are jumping
into Pakfire functions as these tend to take some time when running.

When we are jumping back into the Python code, we need to acquire the
GIL again.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopython: Add functions to register a progress callback
Michael Tremer [Fri, 14 Mar 2025 16:04:19 +0000 (16:04 +0000)] 
python: Add functions to register a progress callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopython: Allow passing a confirm callback from Python
Michael Tremer [Fri, 14 Mar 2025 15:20:47 +0000 (15:20 +0000)] 
python: Allow passing a confirm callback from Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopython: Add a basic Transaction class
Michael Tremer [Fri, 14 Mar 2025 11:04:48 +0000 (11:04 +0000)] 
python: Add a basic Transaction class

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agotransaction: Remove unused flags
Michael Tremer [Fri, 14 Mar 2025 11:00:54 +0000 (11:00 +0000)] 
transaction: Remove unused flags

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agodb: Fail graciously when we could not open the database
Michael Tremer [Fri, 14 Mar 2025 10:56:31 +0000 (10:56 +0000)] 
db: Fail graciously when we could not open the database

This mainly changes the return code and does some minor code cleanups

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agopo: Update translations
Michael Tremer [Fri, 14 Mar 2025 10:40:06 +0000 (10:40 +0000)] 
po: Update translations

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agomacros: Add yet another kind of GitHub URL
Michael Tremer [Fri, 14 Mar 2025 10:39:12 +0000 (10:39 +0000)] 
macros: Add yet another kind of GitHub URL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agoarch: Don't use TLS to store the utsname struct
Michael Tremer [Sat, 22 Feb 2025 20:57:54 +0000 (20:57 +0000)] 
arch: Don't use TLS to store the utsname struct

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 months agobuild: Ignore cgroups if they are not fully functional
Michael Tremer [Sat, 22 Feb 2025 20:28:16 +0000 (20:28 +0000)] 
build: Ignore cgroups if they are not fully functional

This is an experimental change to see how this will all turn out on
Jenkins.

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