]>
git.ipfire.org Git - pakfire.git/log
Michael Tremer [Sat, 12 Oct 2024 13:51:42 +0000 (13:51 +0000)]
jail: Bring back sending the build output to the logger
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:40:00 +0000 (13:40 +0000)]
jail: Setup shell environment in the shell function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:38:27 +0000 (13:38 +0000)]
jail: Always set PS1
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:38:02 +0000 (13:38 +0000)]
util: Drop unused function to check if the terminal is a TTY
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:27:46 +0000 (13:27 +0000)]
jail: Drop the interactive helper function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:22:50 +0000 (13:22 +0000)]
jail: Make the entire jail private
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:19:44 +0000 (13:19 +0000)]
python: Remove Pakfire.execute()
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:16:23 +0000 (13:16 +0000)]
jail: Remove an unused buffer struct
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:10:56 +0000 (13:10 +0000)]
jail: Replace standard input/output callbacks with the PTY
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 12:34:11 +0000 (12:34 +0000)]
pty: Explicitely request to connect stdin/stdout
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 12:26:48 +0000 (12:26 +0000)]
cli: build: Send all log messages to syslog, too
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 11:44:47 +0000 (11:44 +0000)]
pty: Add callbacks to stream input and output
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 10:10:01 +0000 (10:10 +0000)]
jail: Remove functions that capture the command output
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 10:08:06 +0000 (10:08 +0000)]
configure: Don't check for epoll any more
We don't call this directly any more.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 10:03:25 +0000 (10:03 +0000)]
pty: De-register events before closing the file descriptors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 10:03:06 +0000 (10:03 +0000)]
pty: Don't terminate the event loop on error
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 09:56:16 +0000 (09:56 +0000)]
tests: Show return code on failed assertions as well as errno
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 09:51:52 +0000 (09:51 +0000)]
pty: Implement capturing the output
This should be the most efficient version, yet.
We create a memfd buffer which we write to and later copy the output to
the heap. This also reduces the amount of callbacks that we have to pass
around.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 09:47:36 +0000 (09:47 +0000)]
pty: Refactor forwarding
This should make the process slightly more efficient because we are
checking if there is anything in the buffers before entering the loop.
We also handle any return values from the read()/write() calls better so
that we won't continue to loop too often.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 17:32:59 +0000 (17:32 +0000)]
arch: Dynamically create an array with the supported arches
Clang did not like the previous solution.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 16:15:53 +0000 (16:15 +0000)]
tests: Fix string formatting in command.c
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:50:15 +0000 (15:50 +0000)]
configure: Remove option to enable the static analyzer
This is not compatible with Clang.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:34:43 +0000 (15:34 +0000)]
configure: Correctly define CURL_HAS_WEBSOCKETS
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:27:19 +0000 (15:27 +0000)]
configure: Fix cURL WebSocket check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:22:56 +0000 (15:22 +0000)]
configure: Don't insist on a specific version of JSON-C
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:22:29 +0000 (15:22 +0000)]
xfer: Fix check for cURL
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:09:16 +0000 (15:09 +0000)]
repo: Fix string formatting
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:07:21 +0000 (15:07 +0000)]
jail: Fix formatting strings
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 14:20:43 +0000 (14:20 +0000)]
python: Update function declaration for the log callback
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 14:20:16 +0000 (14:20 +0000)]
python: Update initialization of types
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 14:19:37 +0000 (14:19 +0000)]
python: Correctly initialize and cast keyword arguments
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:54:24 +0000 (13:54 +0000)]
cli: Declare command outside the switch statement
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:53:54 +0000 (13:53 +0000)]
cli: Fix broken include guard
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:41:00 +0000 (13:41 +0000)]
xfer: Compile even if cURL does not have support for WebSockets
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:38:26 +0000 (13:38 +0000)]
xfer: Support compiling with older versions of cURL
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:19:08 +0000 (13:19 +0000)]
transaction: Don't declare anything after the label
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:09:18 +0000 (13:09 +0000)]
libpakfire: Set __attribute__((format(...))) wherever needed
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:07:26 +0000 (13:07 +0000)]
build: Replace the bitfield with a state enum
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:06:56 +0000 (13:06 +0000)]
file: Don't declare hardlink in the switch statement
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:06:29 +0000 (13:06 +0000)]
log stream: Initialize r in case events was zero
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 8 Oct 2024 15:48:16 +0000 (15:48 +0000)]
os: Make more space for the distro information
ArchLinux is using a longer version_id with timestamps which is why we
need some more space here. There is no point in being too tight with
this.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 8 Oct 2024 13:41:43 +0000 (13:41 +0000)]
configure: Drop dependencies on Python modules
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 18:07:35 +0000 (18:07 +0000)]
pty: Don't fail if standard input/output are not TTYs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 18:07:08 +0000 (18:07 +0000)]
jail: Make it easier to configure the jail as interactive
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 17:48:18 +0000 (17:48 +0000)]
pty: Fallback to the original file descriptor if the clone fails
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 17:38:56 +0000 (17:38 +0000)]
cli: shell: Implement running commands via CLI
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 17:23:38 +0000 (17:23 +0000)]
libpakfire: Remove the shell convenience function
This is not very flexible.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 17:21:34 +0000 (17:21 +0000)]
cli: shell: Make sure packages is always initialized and terminated by NULL
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 17:20:30 +0000 (17:20 +0000)]
cli: Parse the correct option for packages
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 16:57:46 +0000 (16:57 +0000)]
pty: Fix setting raw mode
If the standard input & output share the same inode, we can't overwrite
the attributes and need to take care of this.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 14:58:27 +0000 (14:58 +0000)]
pty: Re-open standard input/output
This is helpful so that we don't have to worry about resetting the
original file descriptors in case we crash unintentionally.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 14:57:44 +0000 (14:57 +0000)]
pty: Reset file-descriptors into blocking mode again when done
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 14:12:13 +0000 (14:12 +0000)]
pty: Don't open standard input in read-only mode
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 14:04:14 +0000 (14:04 +0000)]
pty: Always enable forwarding
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 13:59:09 +0000 (13:59 +0000)]
pty: Terminate if we encountered an error
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 13:54:25 +0000 (13:54 +0000)]
pty: Disconnect as early as possible
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 13:46:21 +0000 (13:46 +0000)]
pty: Implement draining the buffers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 12:57:10 +0000 (12:57 +0000)]
pty: Handle resizing the terminal window
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 12:47:34 +0000 (12:47 +0000)]
pty: Store events and add a description
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 12:39:09 +0000 (12:39 +0000)]
pty: Be less smart about the forwarding and make it work again
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 6 Oct 2024 12:14:12 +0000 (12:14 +0000)]
jail: Move the PTY into an extra file
The code for this is rather large and makes jail.c almost unreadable.
This patch does not move the entire feature over just yet, but it is a
start.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 17:38:24 +0000 (17:38 +0000)]
jail: Block SIGCHLD
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 17:30:44 +0000 (17:30 +0000)]
jail: Actually call the new event loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 17:27:16 +0000 (17:27 +0000)]
jail: Move the timer into the event loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 17:15:22 +0000 (17:15 +0000)]
jail: Catch any PID events by the event loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 16:56:18 +0000 (16:56 +0000)]
jail: Use new log streamer
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 16:31:32 +0000 (16:31 +0000)]
logging: Create an abstraction to stream log lines from a child process
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 15:34:05 +0000 (15:34 +0000)]
jail: Create a new systemd event loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 15:22:01 +0000 (15:22 +0000)]
jail: Remove the legacy logger
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 15:15:45 +0000 (15:15 +0000)]
build: Remove the build and legacy logger
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 14:54:25 +0000 (14:54 +0000)]
cli: build: No longer use the build logger
We have so many loggers and we need to remove a few...
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 14:43:24 +0000 (14:43 +0000)]
ctx: Move the magic context to here
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 14:35:50 +0000 (14:35 +0000)]
python: Remove build/mkimage/shell from the Pakfire object
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 14:32:08 +0000 (14:32 +0000)]
python: Remove the build service implementation wrapper
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 14:28:57 +0000 (14:28 +0000)]
python: Remove the Python daemon implementation
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 14:28:31 +0000 (14:28 +0000)]
job: Fix typo
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 14:18:26 +0000 (14:18 +0000)]
job: Send log messages to the build service
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 14:16:48 +0000 (14:16 +0000)]
util: Implement adding strings with length to a JSON object
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 13:41:54 +0000 (13:41 +0000)]
xfer: Make the WebSocket send callback more sensible
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 13:30:34 +0000 (13:30 +0000)]
job: Buffer log lines in a ring buffer
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 13:29:42 +0000 (13:29 +0000)]
logging: Add a simple ring buffer for buffering log lines
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 12:41:37 +0000 (12:41 +0000)]
job: Pipe any log output back to the parent process
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 10:55:48 +0000 (10:55 +0000)]
job: Create an own independant context for the child process
This prevents us to inherit anything from the parent process and allows
us to run a totally different configuration in the child.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 5 Oct 2024 10:49:56 +0000 (10:49 +0000)]
job: Create scaffolding to run a build
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 18:24:11 +0000 (18:24 +0000)]
job: Fix replace error in flags
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 18:09:06 +0000 (18:09 +0000)]
job: Initialize Pakfire in the child process
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 17:50:29 +0000 (17:50 +0000)]
jobs: Have them monitor themselves and update their state
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 17:41:24 +0000 (17:41 +0000)]
jobs: Automatically launch jobs once it has connected to the build service
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 17:33:23 +0000 (17:33 +0000)]
job: Show what job we are connecting to
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 17:29:56 +0000 (17:29 +0000)]
xfer: Should more detail when a transfer fails
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 17:08:47 +0000 (17:08 +0000)]
daemon: Rename workers to jobs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 16:45:39 +0000 (16:45 +0000)]
daemon: Remove the worker's own HTTP client and event loop
It makes no sense to duplicate so much code, so the control connection
of the worker will have to run in the main process, too.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 16:01:22 +0000 (16:01 +0000)]
worker: Store a reference to the daemon's HTTP client
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 15:53:59 +0000 (15:53 +0000)]
worker: Fetch the daemon's event loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 15:40:29 +0000 (15:40 +0000)]
daemon: Terminate all workers when terminating
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 14:20:37 +0000 (14:20 +0000)]
worker: Initialize the event loop and cURL in the child process
cURL is not multi-threaded and so to avoid any problems, we will
initialize everything in the forked child process.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 13:47:40 +0000 (13:47 +0000)]
worker: Establish a control connection
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 13:32:29 +0000 (13:32 +0000)]
buildservice: Use new URL formatting feature
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 13:23:01 +0000 (13:23 +0000)]
xfer: Make it easier to format URLs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 4 Oct 2024 12:59:41 +0000 (12:59 +0000)]
worker: Create our own event loop and HTTP client
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>