]> git.ipfire.org Git - pakfire.git/log
pakfire.git
3 years agotests: execute: Add test to catch exceptions in logger
Michael Tremer [Thu, 21 Jul 2022 10:40:38 +0000 (10:40 +0000)] 
tests: execute: Add test to catch exceptions in logger

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: command: Print PID
Michael Tremer [Thu, 21 Jul 2022 10:36:23 +0000 (10:36 +0000)] 
tests: command: Print PID

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: command: Build a fork bomb
Michael Tremer [Thu, 21 Jul 2022 10:34:20 +0000 (10:34 +0000)] 
tests: command: Build a fork bomb

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: execute: Check if logger returned the correct output
Michael Tremer [Thu, 21 Jul 2022 10:23:15 +0000 (10:23 +0000)] 
tests: execute: Check if logger returned the correct output

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: command: All option to exhaust all memory
Michael Tremer [Thu, 21 Jul 2022 10:12:59 +0000 (10:12 +0000)] 
tests: command: All option to exhaust all memory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: execute: Generate some random output for tests
Michael Tremer [Thu, 21 Jul 2022 09:57:42 +0000 (09:57 +0000)] 
tests: execute: Generate some random output for tests

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: execute: Replace former dummy commands
Michael Tremer [Thu, 21 Jul 2022 08:32:02 +0000 (08:32 +0000)] 
tests: execute: Replace former dummy commands

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: execute: Add test to return environment variables
Michael Tremer [Thu, 21 Jul 2022 08:30:47 +0000 (08:30 +0000)] 
tests: execute: Add test to return environment variables

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: execute: Add a simple echo command that prints lines
Michael Tremer [Thu, 21 Jul 2022 08:25:53 +0000 (08:25 +0000)] 
tests: execute: Add a simple echo command that prints lines

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: execute: Replace exit code tests with the stub command
Michael Tremer [Thu, 21 Jul 2022 08:18:48 +0000 (08:18 +0000)] 
tests: execute: Replace exit code tests with the stub command

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: Run execute tests in the stub environment
Michael Tremer [Thu, 21 Jul 2022 08:18:21 +0000 (08:18 +0000)] 
tests: Run execute tests in the stub environment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: Build scaffolding for a simple statically linked command
Michael Tremer [Tue, 19 Jul 2022 16:39:56 +0000 (16:39 +0000)] 
tests: Build scaffolding for a simple statically linked command

This can then be used to test the execution container.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agosnapshot: Show throughput and ETA in progress bar
Michael Tremer [Tue, 19 Jul 2022 16:27:59 +0000 (16:27 +0000)] 
snapshot: Show throughput and ETA in progress bar

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoutil: Drop any custom timespec functions
Michael Tremer [Tue, 19 Jul 2022 16:23:13 +0000 (16:23 +0000)] 
util: Drop any custom timespec functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoprogressbar: Make this a lot smoother
Michael Tremer [Tue, 19 Jul 2022 16:20:38 +0000 (16:20 +0000)] 
progressbar: Make this a lot smoother

Previously, the progress bar was redrawn very often which did not look
great on the terminal. We are now redrawing the bar about 20 times a
second which gives us a smooth experience.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years ago_pakfire: Adjust flag to enable/disable ccache
Michael Tremer [Tue, 19 Jul 2022 14:40:33 +0000 (14:40 +0000)] 
_pakfire: Adjust flag to enable/disable ccache

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years ago_pakfire: Adjust flag to enable/disable snapshot
Michael Tremer [Tue, 19 Jul 2022 14:39:23 +0000 (14:39 +0000)] 
_pakfire: Adjust flag to enable/disable snapshot

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: Remove unneeded stuff from snapshot.c
Michael Tremer [Tue, 19 Jul 2022 14:34:02 +0000 (14:34 +0000)] 
tests: Remove unneeded stuff from snapshot.c

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agosnapshot: Include pakfire.h
Michael Tremer [Tue, 19 Jul 2022 14:33:46 +0000 (14:33 +0000)] 
snapshot: Include pakfire.h

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: Check if snapshot has something in it
Michael Tremer [Tue, 19 Jul 2022 14:31:57 +0000 (14:31 +0000)] 
tests: Check if snapshot has something in it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agomount: Don't return error in foreach when there are no mountpoints
Michael Tremer [Tue, 19 Jul 2022 14:29:32 +0000 (14:29 +0000)] 
mount: Don't return error in foreach when there are no mountpoints

The loop returned 1 by default when there were no mountpoints to process
which is not what we need here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agosnapshots: Protect against invalid inputs
Michael Tremer [Tue, 19 Jul 2022 14:21:28 +0000 (14:21 +0000)] 
snapshots: Protect against invalid inputs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotests: Add a test that creates and restores a snapshot
Michael Tremer [Tue, 19 Jul 2022 14:11:53 +0000 (14:11 +0000)] 
tests: Add a test that creates and restores a snapshot

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoRevert "mount: Adjust mount flags for unprivileged users"
Michael Tremer [Tue, 19 Jul 2022 11:55:22 +0000 (11:55 +0000)] 
Revert "mount: Adjust mount flags for unprivileged users"

This reverts commit c92f710524a370d8e910b74d7ba062373d02d7a6.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agomount: Adjust mount flags for unprivileged users
Michael Tremer [Tue, 19 Jul 2022 09:38:40 +0000 (09:38 +0000)] 
mount: Adjust mount flags for unprivileged users

Bind-mounts require us to set MS_REC and remounting any mountpoint
requires us to now downgrade on noexec/nodev/nosuid.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agomount: Use mount(2) to perform any mount operations
Michael Tremer [Tue, 19 Jul 2022 09:37:30 +0000 (09:37 +0000)] 
mount: Use mount(2) to perform any mount operations

libmount did too much voodoo here which prevented us from running
smoothly for unprivileged users.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoarchive: Don't use path in error message
Michael Tremer [Mon, 18 Jul 2022 18:28:55 +0000 (18:28 +0000)] 
archive: Don't use path in error message

path seems to have been freed after the extraction has been started and
therefore we cannot use it any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agomount: Don't mount /tmp in container
Michael Tremer [Mon, 18 Jul 2022 17:31:16 +0000 (17:31 +0000)] 
mount: Don't mount /tmp in container

If /tmp is a ramdisk, any temporary files written during the build
process will be lost between stages. That is rather unintuitive and we
might use excess memory.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoexecute: Copy scripts into /
Michael Tremer [Mon, 18 Jul 2022 17:30:16 +0000 (17:30 +0000)] 
execute: Copy scripts into /

Formerly they were created in /tmp which could be overlayed by a tmpfs.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agofile: Make the static analyzer happy
Michael Tremer [Mon, 18 Jul 2022 09:40:03 +0000 (09:40 +0000)] 
file: Make the static analyzer happy

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopakfire: Move cache directory into user's home
Michael Tremer [Mon, 18 Jul 2022 09:24:54 +0000 (09:24 +0000)] 
pakfire: Move cache directory into user's home

This is only happening when running as an unprivileged user.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoutil: Fix permissions of temporary directories
Michael Tremer [Mon, 18 Jul 2022 09:24:24 +0000 (09:24 +0000)] 
util: Fix permissions of temporary directories

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoMove all temporary files directly into /var/tmp
Michael Tremer [Mon, 18 Jul 2022 08:52:12 +0000 (08:52 +0000)] 
Move all temporary files directly into /var/tmp

When running Pakfire as an unprivileged user, we cannot create temporary
files in a subdirectory which has been created earlier by a different
user.

Hence we now put everything directly into /var/tmp where everyone should
have write permissions all of the time.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoutil: Store errno when running pakfire_rmtree()
Michael Tremer [Mon, 18 Jul 2022 08:24:32 +0000 (08:24 +0000)] 
util: Store errno when running pakfire_rmtree()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopakfire: Store UID of running user
Michael Tremer [Mon, 18 Jul 2022 08:16:31 +0000 (08:16 +0000)] 
pakfire: Store UID of running user

This patch also moves the root permission check into the safety check
function.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoUse sane directory/file permissions throughout
Michael Tremer [Sun, 17 Jul 2022 18:56:46 +0000 (18:56 +0000)] 
Use sane directory/file permissions throughout

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoexecute: Only try umounting after we actually mounted something
Michael Tremer [Sun, 17 Jul 2022 18:39:40 +0000 (18:39 +0000)] 
execute: Only try umounting after we actually mounted something

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoexecute: Use existing function to check if we are running in /
Michael Tremer [Sun, 17 Jul 2022 18:38:35 +0000 (18:38 +0000)] 
execute: Use existing function to check if we are running in /

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agomount: Remove unused variable
Michael Tremer [Sun, 17 Jul 2022 18:38:17 +0000 (18:38 +0000)] 
mount: Remove unused variable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agomount: Move pakfire_bind() into mount.c
Michael Tremer [Sun, 17 Jul 2022 18:34:09 +0000 (18:34 +0000)] 
mount: Move pakfire_bind() into mount.c

There are no functional changes, but this function rather belongs here,
and as a bonus, we get to make pakfire_mount() static and declutter
pakfire.c slightly.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agomount: Mount the interpreter every time
Michael Tremer [Sun, 17 Jul 2022 18:25:48 +0000 (18:25 +0000)] 
mount: Mount the interpreter every time

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoexecute: Mount all file systems only in namespace
Michael Tremer [Sun, 17 Jul 2022 18:16:04 +0000 (18:16 +0000)] 
execute: Mount all file systems only in namespace

If Pakfire is running as an unprivileged user, we cannot call mount() in
the original namespace. However, it is difficult to spawn a new process
in a new namespace first and then perform loads of actions in there.
Embedded Pakfire would become more difficult.

At the cost of losing the option to create an environment in a
dynamically created ramdisk, we can only mount everything when we enter
the container.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoexecute: Switch back to chroot()
Michael Tremer [Sun, 17 Jul 2022 18:09:29 +0000 (18:09 +0000)] 
execute: Switch back to chroot()

pivot_root() seems to be very complicated to use and will require us to
have the container run on a different file system. That is however not
possible when Pakfire is running as an un-privileged user.

Since pivot_root() does not seem to offer any advantages over chroot(),
we switch back to chroot() which is easier to use.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopakfire: Remove mount_tmpfs flag
Michael Tremer [Sun, 17 Jul 2022 17:33:15 +0000 (17:33 +0000)] 
pakfire: Remove mount_tmpfs flag

This is no longer in use

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopakfire: Pass loglevel on creation
Michael Tremer [Sun, 17 Jul 2022 17:26:43 +0000 (17:26 +0000)] 
pakfire: Pass loglevel on creation

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopakfire: Correctly set return code on initialization errors
Michael Tremer [Sun, 17 Jul 2022 17:05:37 +0000 (17:05 +0000)] 
pakfire: Correctly set return code on initialization errors

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodigests: Renumber them
Michael Tremer [Sun, 17 Jul 2022 12:35:29 +0000 (12:35 +0000)] 
digests: Renumber them

There is no need to use them as bitfields.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodb: Use correct value for digest types
Michael Tremer [Sun, 17 Jul 2022 12:35:05 +0000 (12:35 +0000)] 
db: Use correct value for digest types

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoexecute: Disable mount propagation before calling pivot_root()
Michael Tremer [Sun, 17 Jul 2022 12:13:54 +0000 (12:13 +0000)] 
execute: Disable mount propagation before calling pivot_root()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopakfire: Allow passing None as empty list
Michael Tremer [Sun, 17 Jul 2022 11:52:00 +0000 (11:52 +0000)] 
pakfire: Allow passing None as empty list

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopackager: Copy file payload into mtree for hashing
Michael Tremer [Sun, 17 Jul 2022 10:00:05 +0000 (10:00 +0000)] 
packager: Copy file payload into mtree for hashing

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agofile: Drop unused function to copy archive entry
Michael Tremer [Sun, 17 Jul 2022 09:47:17 +0000 (09:47 +0000)] 
file: Drop unused function to copy archive entry

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agofiles: Strip leading "./" from filenames
Michael Tremer [Sun, 17 Jul 2022 09:44:50 +0000 (09:44 +0000)] 
files: Strip leading "./" from filenames

mtree adds ./ to every file that is being written to the archive, but
that is not very useful for us.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopackager: Add SHA256 checksums to filelists
Michael Tremer [Sun, 17 Jul 2022 09:29:08 +0000 (09:29 +0000)] 
packager: Add SHA256 checksums to filelists

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoconstants: Export PAKFIRE_DIGEST_* to Python
Michael Tremer [Fri, 15 Jul 2022 15:51:21 +0000 (15:51 +0000)] 
constants: Export PAKFIRE_DIGEST_* to Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agofiles: Add Python functions to access digest/hexdigest
Michael Tremer [Fri, 15 Jul 2022 15:45:58 +0000 (15:45 +0000)] 
files: Add Python functions to access digest/hexdigest

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodb: Store file digests in a separate table
Michael Tremer [Fri, 15 Jul 2022 15:36:36 +0000 (15:36 +0000)] 
db: Store file digests in a separate table

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agofile: Refactor digests
Michael Tremer [Fri, 15 Jul 2022 15:35:50 +0000 (15:35 +0000)] 
file: Refactor digests

Files can now hold more than one digest type and the interfaces have
been slightly improved.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoarchive: Return filelist as list of File objects
Michael Tremer [Fri, 15 Jul 2022 14:12:02 +0000 (14:12 +0000)] 
archive: Return filelist as list of File objects

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agofile: Create Python wrapper for file objects
Michael Tremer [Fri, 15 Jul 2022 14:11:41 +0000 (14:11 +0000)] 
file: Create Python wrapper for file objects

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agofile: Export various functions
Michael Tremer [Fri, 15 Jul 2022 14:10:51 +0000 (14:10 +0000)] 
file: Export various functions

These seem to have never been used outside of the library

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoarchive: Expose filelist as property
Michael Tremer [Fri, 15 Jul 2022 12:33:25 +0000 (12:33 +0000)] 
archive: Expose filelist as property

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoarchive: Export path as Python property
Michael Tremer [Mon, 27 Jun 2022 15:59:51 +0000 (15:59 +0000)] 
archive: Export path as Python property

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agotransactions: Add dry-run mode
Michael Tremer [Fri, 15 Jul 2022 11:45:06 +0000 (11:45 +0000)] 
transactions: Add dry-run mode

This is useful when we want to check whether a package can be
installed/erased/etc.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agohub: Update downloads URL
Michael Tremer [Fri, 15 Jul 2022 11:44:05 +0000 (11:44 +0000)] 
hub: Update downloads URL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoclient: Implement creating builds
Michael Tremer [Thu, 14 Jul 2022 15:22:07 +0000 (15:22 +0000)] 
client: Implement creating builds

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Add logging during the build job
Michael Tremer [Sun, 29 May 2022 12:09:36 +0000 (12:09 +0000)] 
daemon: Add logging during the build job

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agohub: Add a new class for jobs
Michael Tremer [Sun, 29 May 2022 12:08:41 +0000 (12:08 +0000)] 
hub: Add a new class for jobs

This is a proxy which is being used during the build to communicate with
the hub.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Add some basic steps to build a package
Michael Tremer [Fri, 27 May 2022 13:41:00 +0000 (13:41 +0000)] 
daemon: Add some basic steps to build a package

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoconstants: Drop some old stuff
Michael Tremer [Fri, 27 May 2022 10:24:34 +0000 (10:24 +0000)] 
constants: Drop some old stuff

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoutil: Drop rm function
Michael Tremer [Fri, 27 May 2022 10:22:58 +0000 (10:22 +0000)] 
util: Drop rm function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Drop old build function
Michael Tremer [Fri, 27 May 2022 10:22:04 +0000 (10:22 +0000)] 
daemon: Drop old build function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Drop old worker shutdown handler
Michael Tremer [Fri, 27 May 2022 10:19:38 +0000 (10:19 +0000)] 
daemon: Drop old worker shutdown handler

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Make workers async
Michael Tremer [Fri, 27 May 2022 10:17:19 +0000 (10:17 +0000)] 
daemon: Make workers async

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Drop unused function
Michael Tremer [Fri, 27 May 2022 10:11:04 +0000 (10:11 +0000)] 
daemon: Drop unused function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Set job ID in process title
Michael Tremer [Fri, 27 May 2022 10:09:58 +0000 (10:09 +0000)] 
daemon: Set job ID in process title

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Block main loop more intelligently
Michael Tremer [Fri, 27 May 2022 10:04:40 +0000 (10:04 +0000)] 
daemon: Block main loop more intelligently

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Fork new worker process when we receive a build job
Michael Tremer [Fri, 27 May 2022 09:44:02 +0000 (09:44 +0000)] 
daemon: Fork new worker process when we receive a build job

The previous system was that the worker processes would have been
pre-forked and waiting for a job which was randomly allocated.

This model is now changing since we no longer poll, but push build jobs
from the hub to the builders.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Store configuration parameters
Michael Tremer [Fri, 27 May 2022 09:42:38 +0000 (09:42 +0000)] 
daemon: Store configuration parameters

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agohub: Avoid any crashes when we received no message
Michael Tremer [Fri, 27 May 2022 09:41:39 +0000 (09:41 +0000)] 
hub: Avoid any crashes when we received no message

The on_message callback can be called when the connection is closed
which made the JSON decoder crash.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoconfigure: Depend on "cpuinfo" Python module
Michael Tremer [Fri, 27 May 2022 09:41:17 +0000 (09:41 +0000)] 
configure: Depend on "cpuinfo" Python module

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agologger: Add newline to the end if none already
Michael Tremer [Fri, 27 May 2022 09:40:57 +0000 (09:40 +0000)] 
logger: Add newline to the end if none already

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agologger: Clear any previously configured handlers
Michael Tremer [Fri, 27 May 2022 09:40:36 +0000 (09:40 +0000)] 
logger: Clear any previously configured handlers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Close queue connection immediately when shutting down
Michael Tremer [Fri, 27 May 2022 08:57:45 +0000 (08:57 +0000)] 
daemon: Close queue connection immediately when shutting down

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Add flags to be more verbose
Michael Tremer [Fri, 27 May 2022 08:51:26 +0000 (08:51 +0000)] 
daemon: Add flags to be more verbose

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agologger: Use new logger setup in builder, too
Michael Tremer [Fri, 27 May 2022 08:37:44 +0000 (08:37 +0000)] 
logger: Use new logger setup in builder, too

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agologger: Create a simple logger and use it in daemon
Michael Tremer [Fri, 27 May 2022 08:35:29 +0000 (08:35 +0000)] 
logger: Create a simple logger and use it in daemon

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Join the job queue and call a function when a job is assigned
Michael Tremer [Thu, 26 May 2022 15:14:45 +0000 (15:14 +0000)] 
daemon: Join the job queue and call a function when a job is assigned

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agohub: Add websocket capability
Michael Tremer [Thu, 26 May 2022 15:14:03 +0000 (15:14 +0000)] 
hub: Add websocket capability

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoDrop distro.py
Michael Tremer [Thu, 26 May 2022 12:15:27 +0000 (12:15 +0000)] 
Drop distro.py

This has been replaced with a much simpler implemenation.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoutil: Add a simple function to read the distro name
Michael Tremer [Thu, 26 May 2022 12:14:53 +0000 (12:14 +0000)] 
util: Add a simple function to read the distro name

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoDrop system.py
Michael Tremer [Thu, 26 May 2022 12:06:16 +0000 (12:06 +0000)] 
Drop system.py

This has been replaced by cpuinfo and psutil.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Remove max_running/max_waiting configuration parameters
Michael Tremer [Thu, 26 May 2022 12:04:44 +0000 (12:04 +0000)] 
daemon: Remove max_running/max_waiting configuration parameters

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Use Python socket module to get hostname
Michael Tremer [Thu, 26 May 2022 12:03:49 +0000 (12:03 +0000)] 
daemon: Use Python socket module to get hostname

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Drop keepalive process
Michael Tremer [Thu, 26 May 2022 11:58:23 +0000 (11:58 +0000)] 
daemon: Drop keepalive process

The old companion process which sent keepalive messages to the hub has
been dropped and the main daemon process is now conducting this task.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agohub: Add support for POST requests
Michael Tremer [Thu, 26 May 2022 11:57:15 +0000 (11:57 +0000)] 
hub: Add support for POST requests

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Make it async
Michael Tremer [Thu, 26 May 2022 11:56:47 +0000 (11:56 +0000)] 
daemon: Make it async

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoMakefile: Install distro.py
Michael Tremer [Thu, 26 May 2022 11:56:10 +0000 (11:56 +0000)] 
Makefile: Install distro.py

This module has been around all the time but was somehow not installed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agodaemon: Cosmetic changes when connecting to the hub
Michael Tremer [Thu, 26 May 2022 10:10:55 +0000 (10:10 +0000)] 
daemon: Cosmetic changes when connecting to the hub

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agohub: Show progress bar on file uploads
Michael Tremer [Thu, 26 May 2022 09:57:02 +0000 (09:57 +0000)] 
hub: Show progress bar on file uploads

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