]> git.ipfire.org Git - pakfire.git/log
pakfire.git
4 months agopakfire: Add a simple function to install packages
Michael Tremer [Fri, 7 Feb 2025 23:05:04 +0000 (23:05 +0000)] 
pakfire: Add a simple function to install packages

This will come handy when generating images.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agofile: Don't silently fail if archives should not be hashed
Michael Tremer [Fri, 7 Feb 2025 23:04:05 +0000 (23:04 +0000)] 
file: Don't silently fail if archives should not be hashed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Add the option to make gzipped archives
Michael Tremer [Fri, 7 Feb 2025 23:03:30 +0000 (23:03 +0000)] 
compress: Add the option to make gzipped archives

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Don't rewind on just opened files
Michael Tremer [Fri, 7 Feb 2025 23:02:24 +0000 (23:02 +0000)] 
compress: Don't rewind on just opened files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Return properly on error
Michael Tremer [Fri, 7 Feb 2025 20:02:35 +0000 (20:02 +0000)] 
xfer: Return properly on error

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog buffer: Fix error code when enqueuing a line
Michael Tremer [Fri, 7 Feb 2025 19:58:47 +0000 (19:58 +0000)] 
log buffer: Fix error code when enqueuing a line

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Ensure we always send the entire buffer
Michael Tremer [Fri, 7 Feb 2025 19:58:11 +0000 (19:58 +0000)] 
xfer: Ensure we always send the entire buffer

cURL returns OK even if only parts of the buffer have been sent, so we
need to walk through the loop again to make sure all data is sent.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojobs: Go back to the event-driven model to send logs
Michael Tremer [Fri, 7 Feb 2025 17:56:43 +0000 (17:56 +0000)] 
jobs: Go back to the event-driven model to send logs

When the builder is not located in the same data center it can happen
that the send buffer fills up which results in a broken TCP connection
if we continue to send any data.

We will now first of all buffer any messages that have only been
partially sent and listen for when the socket is ready to receive the
rest. If so, we will flush our buffer.

Afterwards we will call the send callback which will go and look for any
more data to send.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Rename the receive buffer
Michael Tremer [Fri, 7 Feb 2025 17:55:01 +0000 (17:55 +0000)] 
xfer: Rename the receive buffer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Don't crash when no packages have been uploaded
Michael Tremer [Fri, 7 Feb 2025 16:04:07 +0000 (16:04 +0000)] 
job: Don't crash when no packages have been uploaded

I remove a check earlier which this code relied on.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Be less verbose when sending socket messages
Michael Tremer [Fri, 7 Feb 2025 15:56:47 +0000 (15:56 +0000)] 
xfer: Be less verbose when sending socket messages

cURL is already logging this for us.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Be patient when the websocket buffer is full
Michael Tremer [Fri, 7 Feb 2025 15:39:34 +0000 (15:39 +0000)] 
xfer: Be patient when the websocket buffer is full

When the log stream is starting a little while into the build, there
might be a big burst of data sent through the socket which might fill it
up. Then we need to be more patient and send the message again
remembering what has been sent before.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoAlways require WebSocket support in cURL
Michael Tremer [Fri, 7 Feb 2025 12:06:05 +0000 (12:06 +0000)] 
Always require WebSocket support in cURL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Drop building for Ubuntu 24.04
Michael Tremer [Fri, 7 Feb 2025 12:01:04 +0000 (12:01 +0000)] 
jenkins: Drop building for Ubuntu 24.04

This version does not have a recent enough version of cURL and
therefore, the build fails. I don't think we need to support anything
old here that does not support WebSockets.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Send timestamp when streaming the log
Michael Tremer [Fri, 7 Feb 2025 11:40:45 +0000 (11:40 +0000)] 
job: Send timestamp when streaming the log

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agolog buffer: Store a timestamp with each line
Michael Tremer [Fri, 7 Feb 2025 11:40:23 +0000 (11:40 +0000)] 
log buffer: Store a timestamp with each line

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoutil: Add function to format timeval to ISO 8601 format
Michael Tremer [Fri, 7 Feb 2025 11:39:02 +0000 (11:39 +0000)] 
util: Add function to format timeval to ISO 8601 format

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: package: Drop storing a reference to the context
Michael Tremer [Thu, 6 Feb 2025 22:30:27 +0000 (22:30 +0000)] 
python: package: Drop storing a reference to the context

This was an ugly hack to create a new package list which we don't need
any more. This caused the application to occasionally crash because ctx
wasn't set at all times.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopackage: Let reverse requires create its own package list
Michael Tremer [Thu, 6 Feb 2025 22:28:21 +0000 (22:28 +0000)] 
package: Let reverse requires create its own package list

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Fix more error codes
Michael Tremer [Thu, 6 Feb 2025 22:12:03 +0000 (22:12 +0000)] 
python: Fix more error codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Refactor creating a Python list from package list
Michael Tremer [Thu, 6 Feb 2025 22:04:14 +0000 (22:04 +0000)] 
python: Refactor creating a Python list from package list

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: Add a simple test to create a daemon
Michael Tremer [Thu, 6 Feb 2025 20:59:23 +0000 (20:59 +0000)] 
tests: Add a simple test to create a daemon

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojail: Listen to SIGTERM and terminate the jail
Michael Tremer [Thu, 6 Feb 2025 20:50:57 +0000 (20:50 +0000)] 
jail: Listen to SIGTERM and terminate the jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Add option to read prerequires from packages
Michael Tremer [Thu, 6 Feb 2025 20:34:02 +0000 (20:34 +0000)] 
python: Add option to read prerequires from packages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuild: Always turn tmpfs usage on for local builds
Michael Tremer [Thu, 6 Feb 2025 18:30:29 +0000 (18:30 +0000)] 
build: Always turn tmpfs usage on for local builds

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopakfire: Require a flag to turn on using tmpfs
Michael Tremer [Thu, 6 Feb 2025 18:30:09 +0000 (18:30 +0000)] 
pakfire: Require a flag to turn on using tmpfs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Permit to finish jobs without uploads
Michael Tremer [Thu, 6 Feb 2025 18:15:40 +0000 (18:15 +0000)] 
job: Permit to finish jobs without uploads

This is even called when the build has failed in which case we don't
have any packages that we can use here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive: Untangle reading the filelist and extraction
Michael Tremer [Thu, 6 Feb 2025 16:20:41 +0000 (16:20 +0000)] 
archive: Untangle reading the filelist and extraction

The idea here was to re-use existing code, but I am not sure this is
currently very helpful to anyone.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agofile: Re-enable parsing checksums again
Michael Tremer [Thu, 6 Feb 2025 16:19:53 +0000 (16:19 +0000)] 
file: Re-enable parsing checksums again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocompress: Remove header for dropped pakfire_extract() function
Michael Tremer [Thu, 6 Feb 2025 15:09:39 +0000 (15:09 +0000)] 
compress: Remove header for dropped pakfire_extract() function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: python: Open an archive in stub mode
Michael Tremer [Thu, 6 Feb 2025 11:39:46 +0000 (11:39 +0000)] 
tests: python: Open an archive in stub mode

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: python: Add some tests for the main Pakfire class
Michael Tremer [Thu, 6 Feb 2025 11:23:06 +0000 (11:23 +0000)] 
tests: python: Add some tests for the main Pakfire class

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Minor code cleanup
Michael Tremer [Thu, 6 Feb 2025 11:04:39 +0000 (11:04 +0000)] 
python: Minor code cleanup

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Rename File.digest() to File.checksum()
Michael Tremer [Thu, 6 Feb 2025 11:00:53 +0000 (11:00 +0000)] 
python: Rename File.digest() to File.checksum()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoarchive: Return the error code when fetching the filelist
Michael Tremer [Thu, 6 Feb 2025 10:57:31 +0000 (10:57 +0000)] 
archive: Return the error code when fetching the filelist

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopo: Update translations
Michael Tremer [Wed, 5 Feb 2025 11:11:46 +0000 (11:11 +0000)] 
po: Update translations

This is mainly to update po/POTFILES.in

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: python: Add some simple tests for pakfire.version_compare()
Michael Tremer [Wed, 5 Feb 2025 11:09:03 +0000 (11:09 +0000)] 
tests: python: Add some simple tests for pakfire.version_compare()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Remove unused Python exceptions
Michael Tremer [Wed, 5 Feb 2025 11:04:15 +0000 (11:04 +0000)] 
python: Remove unused Python exceptions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agotests: python: Test pakfire.supported_arches()
Michael Tremer [Wed, 5 Feb 2025 11:01:20 +0000 (11:01 +0000)] 
tests: python: Test pakfire.supported_arches()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Tidy up writing repository configuration
Michael Tremer [Wed, 5 Feb 2025 10:54:05 +0000 (10:54 +0000)] 
repo: Tidy up writing repository configuration

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepo: Don't return an empty mirrorlist URL, return NULL instead
Michael Tremer [Wed, 5 Feb 2025 10:53:31 +0000 (10:53 +0000)] 
repo: Don't return an empty mirrorlist URL, return NULL instead

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agorepos: Fix exporting keys
Michael Tremer [Wed, 5 Feb 2025 10:52:56 +0000 (10:52 +0000)] 
repos: Fix exporting keys

Before, the key was randomly written into the file descriptor.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agokeys: Make a simple function to export a key as a string
Michael Tremer [Wed, 5 Feb 2025 10:52:09 +0000 (10:52 +0000)] 
keys: Make a simple function to export a key as a string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agopython: Fix setting/reading the context's cache path
Michael Tremer [Wed, 5 Feb 2025 10:28:04 +0000 (10:28 +0000)] 
python: Fix setting/reading the context's cache path

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
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>