]> git.ipfire.org Git - pakfire.git/log
pakfire.git
4 months agotests: python: Update renamed checksum field
Michael Tremer [Wed, 5 Feb 2025 10:21:48 +0000 (10:21 +0000)] 
tests: python: Update renamed checksum field

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Initialize the directory file descriptor
Michael Tremer [Wed, 5 Feb 2025 10:18:11 +0000 (10:18 +0000)] 
pakfire: Initialize the directory file descriptor

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog buffer: Implemnent ring buffer behaviour
Michael Tremer [Wed, 5 Feb 2025 10:07:52 +0000 (10:07 +0000)] 
log buffer: Implemnent ring buffer behaviour

I don't know why I didn't implement this straight away as this was
always intended to be a ring buffer.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Correctly set pidfd on initialization
Michael Tremer [Wed, 5 Feb 2025 10:04:21 +0000 (10:04 +0000)] 
job: Correctly set pidfd on initialization

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojobs: Allow turning on/off log streaming by the job
Michael Tremer [Wed, 5 Feb 2025 09:39:53 +0000 (09:39 +0000)] 
jobs: Allow turning on/off log streaming by the job

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Handle message to abort a build job
Michael Tremer [Wed, 5 Feb 2025 09:34:41 +0000 (09:34 +0000)] 
job: Handle message to abort a build job

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Handle messages sent to a specific job
Michael Tremer [Wed, 5 Feb 2025 09:24:57 +0000 (09:24 +0000)] 
daemon: Handle messages sent to a specific job

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Improve readability of the code
Michael Tremer [Tue, 4 Feb 2025 18:13:22 +0000 (18:13 +0000)] 
python: Improve readability of the code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Add switch to turn on stub mode
Michael Tremer [Tue, 4 Feb 2025 18:09:20 +0000 (18:09 +0000)] 
python: Add switch to turn on stub mode

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Add stub mode
Michael Tremer [Tue, 4 Feb 2025 18:06:20 +0000 (18:06 +0000)] 
pakfire: Add stub mode

This should be used in the build service or other situations where we
only need dependency solving.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Move path setup
Michael Tremer [Tue, 4 Feb 2025 18:06:05 +0000 (18:06 +0000)] 
pakfire: Move path setup

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Split initialization into smaller functions
Michael Tremer [Tue, 4 Feb 2025 17:53:56 +0000 (17:53 +0000)] 
pakfire: Split initialization into smaller functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Change process title to show status
Michael Tremer [Tue, 4 Feb 2025 17:33:06 +0000 (17:33 +0000)] 
daemon: Change process title to show status

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agostrings: Add function to truncate strings
Michael Tremer [Tue, 4 Feb 2025 17:13:15 +0000 (17:13 +0000)] 
strings: Add function to truncate strings

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Ignore any unsupported metadata
Michael Tremer [Tue, 4 Feb 2025 15:51:20 +0000 (15:51 +0000)] 
repo: Ignore any unsupported metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Remove support for repository metadata version zero
Michael Tremer [Tue, 4 Feb 2025 15:48:45 +0000 (15:48 +0000)] 
repo: Remove support for repository metadata version zero

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Ignore any malformed repository metadata from disk
Michael Tremer [Tue, 4 Feb 2025 15:46:03 +0000 (15:46 +0000)] 
repo: Ignore any malformed repository metadata from disk

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Remove resetting a pointer
Michael Tremer [Tue, 4 Feb 2025 15:45:29 +0000 (15:45 +0000)] 
httpclient: Remove resetting a pointer

I don't think we need to do this here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Remove the control connection from the HTTP client
Michael Tremer [Tue, 4 Feb 2025 15:44:41 +0000 (15:44 +0000)] 
daemon: Remove the control connection from the HTTP client

This is necessary after the connection was unexpectedly closed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Reset metadata if parsing failed
Michael Tremer [Tue, 4 Feb 2025 15:23:28 +0000 (15:23 +0000)] 
repo: Reset metadata if parsing failed

This is needed in case there were some required fields missing. We then
consider the metadata invalid and won't use it any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Store/search for repomd.json in the repository's root
Michael Tremer [Tue, 4 Feb 2025 15:06:11 +0000 (15:06 +0000)] 
repo: Store/search for repomd.json in the repository's root

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Force refresh if we have no metadata
Michael Tremer [Tue, 4 Feb 2025 14:56:51 +0000 (14:56 +0000)] 
repo: Force refresh if we have no metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Mark repository metadata as version 1
Michael Tremer [Tue, 4 Feb 2025 14:56:10 +0000 (14:56 +0000)] 
repo: Mark repository metadata as version 1

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: Send more stuff to the console instead of syslog
Michael Tremer [Tue, 4 Feb 2025 14:37:31 +0000 (14:37 +0000)] 
cli: Send more stuff to the console instead of syslog

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohasher: Make the static analyzer happy
Michael Tremer [Tue, 4 Feb 2025 14:24:27 +0000 (14:24 +0000)] 
hasher: Make the static analyzer happy

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohasher: Actually return any errors
Michael Tremer [Tue, 4 Feb 2025 14:22:27 +0000 (14:22 +0000)] 
hasher: Actually return any errors

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopackager: Use Zstandard level 20 for compression
Michael Tremer [Tue, 4 Feb 2025 14:20:40 +0000 (14:20 +0000)] 
packager: Use Zstandard level 20 for compression

This is the maximum that seems to make sense. There is pretty much no
gain from any higher levels, but time will increase by about 3x.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Move log streaming into the main process
Michael Tremer [Tue, 4 Feb 2025 11:43:54 +0000 (11:43 +0000)] 
daemon: Move log streaming into the main process

Now, we can get entirely rid of individual control connections for jobs.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Add a common function to send messages into the control socket
Michael Tremer [Tue, 4 Feb 2025 11:31:49 +0000 (11:31 +0000)] 
daemon: Add a common function to send messages into the control socket

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojobs: Drop the control connect and explicitely launch them
Michael Tremer [Tue, 4 Feb 2025 11:20:33 +0000 (11:20 +0000)] 
jobs: Drop the control connect and explicitely launch them

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Enable long mode (if available)
Michael Tremer [Tue, 4 Feb 2025 10:57:10 +0000 (10:57 +0000)] 
compress: Enable long mode (if available)

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohashes: Replace the old digest mechanism
Michael Tremer [Tue, 4 Feb 2025 10:37:50 +0000 (10:37 +0000)] 
hashes: Replace the old digest mechanism

This is splitting the hasher into a separate object so that we have more
flexibility here. It also renames the digests struct into "hashes" which
is a little bit shorter and I thought that it makes more sense.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodigests: Constify source when importing digests
Michael Tremer [Mon, 3 Feb 2025 15:06:55 +0000 (15:06 +0000)] 
digests: Constify source when importing digests

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Remove debugging line
Michael Tremer [Mon, 3 Feb 2025 14:58:33 +0000 (14:58 +0000)] 
repo: Remove debugging line

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Fix composing import paths
Michael Tremer [Mon, 3 Feb 2025 14:53:44 +0000 (14:53 +0000)] 
repo: Fix composing import paths

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Move sync decision
Michael Tremer [Mon, 3 Feb 2025 14:28:16 +0000 (14:28 +0000)] 
repo: Move sync decision

There are actually not a lot of changes, I just needed to move a lot of
static functions.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Refactor code to retry
Michael Tremer [Mon, 3 Feb 2025 14:21:36 +0000 (14:21 +0000)] 
xfer: Refactor code to retry

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Perform a full scan for local repositories without metadata
Michael Tremer [Mon, 3 Feb 2025 14:19:05 +0000 (14:19 +0000)] 
repo: Perform a full scan for local repositories without metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Download the package database
Michael Tremer [Mon, 3 Feb 2025 14:16:53 +0000 (14:16 +0000)] 
repo: Download the package database

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Store the downloaded metadata if it is more recent
Michael Tremer [Mon, 3 Feb 2025 14:00:59 +0000 (14:00 +0000)] 
repo: Store the downloaded metadata if it is more recent

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Parse the entire repository metadata
Michael Tremer [Mon, 3 Feb 2025 11:35:14 +0000 (11:35 +0000)] 
repo: Parse the entire repository metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Add more helper functions to read JSON objects
Michael Tremer [Mon, 3 Feb 2025 11:34:38 +0000 (11:34 +0000)] 
json: Add more helper functions to read JSON objects

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Read any existing repository metadata before download
Michael Tremer [Mon, 3 Feb 2025 10:39:28 +0000 (10:39 +0000)] 
repo: Read any existing repository metadata before download

This way we can verify that the downloaded version is more recent.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepos: Add a new object to parse the metadata into
Michael Tremer [Mon, 3 Feb 2025 10:28:32 +0000 (10:28 +0000)] 
repos: Add a new object to parse the metadata into

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Add helper function to read integers
Michael Tremer [Mon, 3 Feb 2025 10:26:00 +0000 (10:26 +0000)] 
json: Add helper function to read integers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Load metadata into memory and verify it
Michael Tremer [Sun, 2 Feb 2025 16:36:50 +0000 (16:36 +0000)] 
repo: Load metadata into memory and verify it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agokey: Parse signatures that don't have a comment
Michael Tremer [Sun, 2 Feb 2025 16:32:02 +0000 (16:32 +0000)] 
key: Parse signatures that don't have a comment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoutil: Add a simple buffer structure
Michael Tremer [Sun, 2 Feb 2025 16:24:47 +0000 (16:24 +0000)] 
util: Add a simple buffer structure

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agokey: Print correct error code when verification fails
Michael Tremer [Sun, 2 Feb 2025 16:24:21 +0000 (16:24 +0000)] 
key: Print correct error code when verification fails

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Oops, forgot to add the files
Michael Tremer [Sun, 2 Feb 2025 15:39:20 +0000 (15:39 +0000)] 
json: Oops, forgot to add the files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Move repomd.json into the root
Michael Tremer [Sun, 2 Feb 2025 15:17:28 +0000 (15:17 +0000)] 
repo: Move repomd.json into the root

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Don't make the JSON pretty
Michael Tremer [Sun, 2 Feb 2025 15:09:48 +0000 (15:09 +0000)] 
repo: Don't make the JSON pretty

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Cleanup old metadata before writing new stuff
Michael Tremer [Sun, 2 Feb 2025 15:06:56 +0000 (15:06 +0000)] 
repo: Cleanup old metadata before writing new stuff

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepos: Add file type to metadata
Michael Tremer [Sun, 2 Feb 2025 15:01:41 +0000 (15:01 +0000)] 
repos: Add file type to metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepos: Add filesize to metadata
Michael Tremer [Sun, 2 Feb 2025 15:00:12 +0000 (15:00 +0000)] 
repos: Add filesize to metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepos: Some minor code cleanup when writing metadata
Michael Tremer [Sun, 2 Feb 2025 14:57:00 +0000 (14:57 +0000)] 
repos: Some minor code cleanup when writing metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Only use a few stronger digests for metadata
Michael Tremer [Sun, 2 Feb 2025 14:53:47 +0000 (14:53 +0000)] 
repo: Only use a few stronger digests for metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Add checksums for files
Michael Tremer [Sun, 2 Feb 2025 14:46:52 +0000 (14:46 +0000)] 
repo: Add checksums for files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Add an array for files
Michael Tremer [Sun, 2 Feb 2025 14:10:30 +0000 (14:10 +0000)] 
repo: Add an array for files

This should allow us to add more items whenever we would need to.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Add the database path to the repository metadata
Michael Tremer [Sun, 2 Feb 2025 13:48:58 +0000 (13:48 +0000)] 
repo: Add the database path to the repository metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Move functions into a separate file
Michael Tremer [Sun, 2 Feb 2025 13:42:15 +0000 (13:42 +0000)] 
json: Move functions into a separate file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Use our own JSON functions to build repository metadata
Michael Tremer [Sun, 2 Feb 2025 13:29:54 +0000 (13:29 +0000)] 
repo: Use our own JSON functions to build repository metadata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Sign the repository metadata instead of the database
Michael Tremer [Sat, 1 Feb 2025 16:18:24 +0000 (16:18 +0000)] 
repo: Sign the repository metadata instead of the database

I don't think that there is any chance that we will be able to get rid
of the JSON object.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agokeys: Give signing functions better names
Michael Tremer [Sat, 1 Feb 2025 15:53:56 +0000 (15:53 +0000)] 
keys: Give signing functions better names

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: key: Remove unused variables
Michael Tremer [Sat, 1 Feb 2025 15:53:39 +0000 (15:53 +0000)] 
tests: key: Remove unused variables

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Refactor importing repositories
Michael Tremer [Sat, 1 Feb 2025 14:50:18 +0000 (14:50 +0000)] 
repo: Refactor importing repositories

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Make the static analyzer happy when importing repositories
Michael Tremer [Sat, 1 Feb 2025 14:43:02 +0000 (14:43 +0000)] 
repo: Make the static analyzer happy when importing repositories

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agomirrors: Import the correct headers
Michael Tremer [Sat, 1 Feb 2025 14:36:30 +0000 (14:36 +0000)] 
mirrors: Import the correct headers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfers: Use correct error code when a transfer fails
Michael Tremer [Sat, 1 Feb 2025 14:36:16 +0000 (14:36 +0000)] 
xfers: Use correct error code when a transfer fails

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Return positive error codes on verify
Michael Tremer [Sat, 1 Feb 2025 14:35:52 +0000 (14:35 +0000)] 
xfer: Return positive error codes on verify

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Prevent that the event loop terminates too early
Michael Tremer [Sat, 1 Feb 2025 14:25:43 +0000 (14:25 +0000)] 
httpclient: Prevent that the event loop terminates too early

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Keep WebSocket connections open
Michael Tremer [Sat, 1 Feb 2025 14:12:35 +0000 (14:12 +0000)] 
httpclient: Keep WebSocket connections open

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Implicitly handle relaunch
Michael Tremer [Sat, 1 Feb 2025 14:10:03 +0000 (14:10 +0000)] 
httpclient: Implicitly handle relaunch

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Launch transfers as soon as they are enqueued when not in standalone...
Michael Tremer [Sat, 1 Feb 2025 14:00:54 +0000 (14:00 +0000)] 
httpclient: Launch transfers as soon as they are enqueued when not in standalone mode

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Shorten some function names
Michael Tremer [Sat, 1 Feb 2025 13:56:07 +0000 (13:56 +0000)] 
httpclient: Shorten some function names

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Remove circular dependency to HTTP client
Michael Tremer [Sat, 1 Feb 2025 13:49:10 +0000 (13:49 +0000)] 
xfer: Remove circular dependency to HTTP client

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Refactor the queue management
Michael Tremer [Sat, 1 Feb 2025 13:40:03 +0000 (13:40 +0000)] 
httpclient: Refactor the queue management

It does not seem like a very good idea to give cURL all the handles at
the same time and let it sort it all out. Therefore, this is yet another
attempt to implement some half-decent queueing to implement parallel
downloads.

Fixes: #13812 - httpclient: Bring back a queue for transfers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Don't verify digest when we did not get a positive response
Michael Tremer [Fri, 31 Jan 2025 16:20:03 +0000 (16:20 +0000)] 
xfer: Don't verify digest when we did not get a positive response

When servers were sending a 404 error page, the transfer failed because
of a digest mismatch which is not what we want.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Ensure we always cleanup on failure
Michael Tremer [Fri, 31 Jan 2025 14:41:46 +0000 (14:41 +0000)] 
xfer: Ensure we always cleanup on failure

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Remove unused clone function
Michael Tremer [Fri, 31 Jan 2025 14:41:18 +0000 (14:41 +0000)] 
pakfire: Remove unused clone function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agosnapshot: Clone pakfire with custom flags
Michael Tremer [Fri, 31 Jan 2025 14:40:18 +0000 (14:40 +0000)] 
snapshot: Clone pakfire with custom flags

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agosnapshot: Create a new snapshot if the cache dir does not exist
Michael Tremer [Fri, 31 Jan 2025 14:39:43 +0000 (14:39 +0000)] 
snapshot: Create a new snapshot if the cache dir does not exist

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Configure some more sensible defaults
Michael Tremer [Fri, 31 Jan 2025 14:38:24 +0000 (14:38 +0000)] 
httpclient: Configure some more sensible defaults

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Anchor the key to the appdata
Michael Tremer [Fri, 31 Jan 2025 13:05:47 +0000 (13:05 +0000)] 
repo: Anchor the key to the appdata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Tidy up mirror handling
Michael Tremer [Fri, 31 Jan 2025 12:46:42 +0000 (12:46 +0000)] 
xfer: Tidy up mirror handling

No functional changes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: For queued xfers, make sure we don't use an older mirror
Michael Tremer [Fri, 31 Jan 2025 12:34:49 +0000 (12:34 +0000)] 
xfer: For queued xfers, make sure we don't use an older mirror

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agomirrorlist: Don't free the JSON object when checking it's type
Michael Tremer [Fri, 31 Jan 2025 12:32:30 +0000 (12:32 +0000)] 
mirrorlist: Don't free the JSON object when checking it's type

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agomirrors: Disable instead of "broken"
Michael Tremer [Fri, 31 Jan 2025 12:19:08 +0000 (12:19 +0000)] 
mirrors: Disable instead of "broken"

This patch also implements this all with flags.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agomirrors: Evaluate the status code
Michael Tremer [Fri, 31 Jan 2025 12:12:24 +0000 (12:12 +0000)] 
mirrors: Evaluate the status code

With some errors, there is no point at all to keep trying.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agomirrors: Refactor mirror handling
Michael Tremer [Fri, 31 Jan 2025 12:00:34 +0000 (12:00 +0000)] 
mirrors: Refactor mirror handling

xfers will now immediately get a mirror assigned when they have a
mirrorlist set so that we don't have to play any games later.

When an xfer has failed, we will ask for another mirror and run again.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agomirror: Ensure paths always have a trailing slash
Michael Tremer [Fri, 31 Jan 2025 11:57:12 +0000 (11:57 +0000)] 
mirror: Ensure paths always have a trailing slash

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocontrib: Enable mirror list for stable
Michael Tremer [Fri, 31 Jan 2025 10:46:17 +0000 (10:46 +0000)] 
contrib: Enable mirror list for stable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Achor the mirrorlist to the appdata
Michael Tremer [Fri, 31 Jan 2025 10:45:45 +0000 (10:45 +0000)] 
repo: Achor the mirrorlist to the appdata

This is now possible because we won't circle-reference Pakfire any more
since we have the ctx object.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Instead of passing around flags, automatically free the repo
Michael Tremer [Fri, 31 Jan 2025 10:09:52 +0000 (10:09 +0000)] 
repo: Instead of passing around flags, automatically free the repo

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Add reference counting to appdata
Michael Tremer [Fri, 31 Jan 2025 10:03:34 +0000 (10:03 +0000)] 
repo: Add reference counting to appdata

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Include flags when cloning an instance
Michael Tremer [Fri, 31 Jan 2025 09:56:58 +0000 (09:56 +0000)] 
pakfire: Include flags when cloning an instance

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Clean up after failing to create a temporary directory
Michael Tremer [Fri, 31 Jan 2025 09:50:52 +0000 (09:50 +0000)] 
pakfire: Clean up after failing to create a temporary directory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Free the cookie if level parsing fails
Michael Tremer [Fri, 31 Jan 2025 09:44:15 +0000 (09:44 +0000)] 
compress: Free the cookie if level parsing fails

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Include local repo name in path
Michael Tremer [Thu, 30 Jan 2025 22:54:47 +0000 (22:54 +0000)] 
pakfire: Include local repo name in path

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Use function to check repo name
Michael Tremer [Thu, 30 Jan 2025 22:53:49 +0000 (22:53 +0000)] 
repo: Use function to check repo name

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