]> git.ipfire.org Git - pakfire.git/log
pakfire.git
21 months ago_pakfire: package: Export Build IDs as string
Michael Tremer [Wed, 30 Aug 2023 18:01:46 +0000 (18:01 +0000)] 
_pakfire: package: Export Build IDs as string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agodownloader: Drop using deprecated CURLOPT_PROTOCOLS
Michael Tremer [Wed, 30 Aug 2023 17:53:39 +0000 (17:53 +0000)] 
downloader: Drop using deprecated CURLOPT_PROTOCOLS

This reverts commit bf0f7d4ad237169f0da6a02c5b19981348616d30.

It looks like we no longer need to support Buster, so this commit is now
safe to apply.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agohub: Fix typo in sleep command
Michael Tremer [Wed, 30 Aug 2023 17:48:16 +0000 (17:48 +0000)] 
hub: Fix typo in sleep command

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months ago_pakfire: Fix multiple issues in a utility function
Michael Tremer [Wed, 30 Aug 2023 17:28:32 +0000 (17:28 +0000)] 
_pakfire: Fix multiple issues in a utility function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agobuild: Check if we can build a packager on our architecture
Michael Tremer [Wed, 30 Aug 2023 17:04:41 +0000 (17:04 +0000)] 
build: Check if we can build a packager on our architecture

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agoarch: Enhance check for support by host and check for interpreter
Michael Tremer [Wed, 30 Aug 2023 17:04:18 +0000 (17:04 +0000)] 
arch: Enhance check for support by host and check for interpreter

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agostrings: Add function to free string arrays
Michael Tremer [Wed, 30 Aug 2023 16:38:38 +0000 (16:38 +0000)] 
strings: Add function to free string arrays

This should help us to keep code tidier and shorter.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agopackages: Copy strings when returning arrays
Michael Tremer [Wed, 30 Aug 2023 16:30:34 +0000 (16:30 +0000)] 
packages: Copy strings when returning arrays

This way, the return value will be owned by the caller which also has
the responsibility to clean it up.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agoarch: Teach Pakfire to run a different arch effectively
Michael Tremer [Tue, 29 Aug 2023 19:34:59 +0000 (19:34 +0000)] 
arch: Teach Pakfire to run a different arch effectively

This is useful to let Pakfire think it is running in "noarch" mode, when
we of course actually have to install some binary packages.

This might also become useful when bootstrapping the distribution for a
new architecture.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agomacros: Set arch in pakfire
Michael Tremer [Tue, 29 Aug 2023 19:34:06 +0000 (19:34 +0000)] 
macros: Set arch in pakfire

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agopakfire: Call the correct function to check if the host supports this architecture
Michael Tremer [Tue, 29 Aug 2023 18:57:25 +0000 (18:57 +0000)] 
pakfire: Call the correct function to check if the host supports this architecture

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agopackages: Export build architectures in Python
Michael Tremer [Tue, 29 Aug 2023 16:47:57 +0000 (16:47 +0000)] 
packages: Export build architectures in Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agotests: Add a simple test to read metadata from Python
Michael Tremer [Tue, 29 Aug 2023 16:43:33 +0000 (16:43 +0000)] 
tests: Add a simple test to read metadata from Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agopackages: Add support for build arches
Michael Tremer [Sat, 26 Aug 2023 18:39:41 +0000 (18:39 +0000)] 
packages: Add support for build arches

This requires that we add a new data type to packages to store a string
array.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agorepo: Fix expression to find package archives
Michael Tremer [Sat, 26 Aug 2023 09:52:58 +0000 (09:52 +0000)] 
repo: Fix expression to find package archives

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agopackager: Set the sourcepath as path if no path given
Michael Tremer [Sat, 26 Aug 2023 09:46:58 +0000 (09:46 +0000)] 
packager: Set the sourcepath as path if no path given

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agopackage: Don't crash if a package has no UUID
Michael Tremer [Sat, 26 Aug 2023 09:46:45 +0000 (09:46 +0000)] 
package: Don't crash if a package has no UUID

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agofile: Fix tests and handle invalid inputs better
Michael Tremer [Fri, 25 Aug 2023 17:45:50 +0000 (17:45 +0000)] 
file: Fix tests and handle invalid inputs better

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agofile: Use "struct archive_entry" to store lots of metadata
Michael Tremer [Fri, 25 Aug 2023 17:39:41 +0000 (17:39 +0000)] 
file: Use "struct archive_entry" to store lots of metadata

We used to copy metadata information from the entry format and back
again which does not seem to be too clever. The overhead of the entry
isn't that high that we cannot simply use them here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agocompress: Make sure that paths are relative in archives
Michael Tremer [Fri, 25 Aug 2023 17:38:36 +0000 (17:38 +0000)] 
compress: Make sure that paths are relative in archives

When we write archives, we don't want them to contain leading slashes on
the filenames. However, we want to have leading slashes on the
filelists.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agoconfigure: No longer check for FTS functions
Michael Tremer [Fri, 25 Aug 2023 13:30:26 +0000 (13:30 +0000)] 
configure: No longer check for FTS functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agopakfire: Remove using FTS when reading repository configuration
Michael Tremer [Fri, 25 Aug 2023 13:21:08 +0000 (13:21 +0000)] 
pakfire: Remove using FTS when reading repository configuration

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agoarch: Remove using FTS to search interpreter
Michael Tremer [Fri, 25 Aug 2023 13:10:47 +0000 (13:10 +0000)] 
arch: Remove using FTS to search interpreter

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agodist: Don't package directories
Michael Tremer [Fri, 25 Aug 2023 12:51:37 +0000 (12:51 +0000)] 
dist: Don't package directories

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agodist: Fix not packaging any temporary files
Michael Tremer [Fri, 25 Aug 2023 12:36:00 +0000 (12:36 +0000)] 
dist: Fix not packaging any temporary files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agofilelist: Use our own pattern matching function throughout
Michael Tremer [Fri, 25 Aug 2023 12:35:11 +0000 (12:35 +0000)] 
filelist: Use our own pattern matching function throughout

Since we (once again) have another way to match paths in packages, there
is a flag which allows to switch to a different way to match paths.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agofilelist: Use libarchive to scan for files
Michael Tremer [Fri, 25 Aug 2023 11:41:38 +0000 (11:41 +0000)] 
filelist: Use libarchive to scan for files

It seems that fts_* has threading issues which are difficult to resolve.
Since we already use libarchive to read any metadata information, it
makes sense to use libarchive to traverse the filesystem tree, too.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agoMove all static buffers into Thread-local storage
Michael Tremer [Fri, 18 Aug 2023 16:28:48 +0000 (16:28 +0000)] 
Move all static buffers into Thread-local storage

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agoarch: Fix convoluted way to find supported arches
Michael Tremer [Fri, 18 Aug 2023 16:27:09 +0000 (16:27 +0000)] 
arch: Fix convoluted way to find supported arches

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agoclient: Add repo API opertions
Michael Tremer [Fri, 18 Aug 2023 15:27:49 +0000 (15:27 +0000)] 
client: Add repo API opertions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
21 months agodaemon: Do not attempt to delete configuration
Michael Tremer [Wed, 16 Aug 2023 16:15:13 +0000 (16:15 +0000)] 
daemon: Do not attempt to delete configuration

The format has been changed and there is no longer a file that needs to
be cleaned up.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agopackages: Validate UUIDs when reading from the database
Michael Tremer [Wed, 16 Aug 2023 15:55:30 +0000 (15:55 +0000)] 
packages: Validate UUIDs when reading from the database

Since we are using the UUID in the filesystem paths, we must make sure
that no malicious content is in the field.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agocontrib: Enable the testing repository by default
Michael Tremer [Wed, 16 Aug 2023 15:47:48 +0000 (15:47 +0000)] 
contrib: Enable the testing repository by default

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agopackages: Simplify the directory structures once again
Michael Tremer [Wed, 16 Aug 2023 15:45:03 +0000 (15:45 +0000)] 
packages: Simplify the directory structures once again

I don't think that we will have lots of subdirectories here so that
filesystems won't be able to cope. However, it would be nice to use the
same structure throughout.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agopackage: Use the correct attribute for directories in the SOLV database
Michael Tremer [Wed, 16 Aug 2023 15:41:37 +0000 (15:41 +0000)] 
package: Use the correct attribute for directories in the SOLV database

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agorepo: Fix file structure
Michael Tremer [Wed, 16 Aug 2023 15:37:33 +0000 (15:37 +0000)] 
repo: Fix file structure

Because it is possible to have multiple builds with the same nevra in
the same repository, we need to store packages in a subdirectory to be
able to uniquely identify them. That is also helpful when we want to
avoid downloading a package when expecting a different UUID.

This patch changes that packages will now be put into some subdirectory
structure so multiple archives with the same name can coexist.

The downloader and caching mechanism for repositories had to be tweaked
to honour the subdirectory structure.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agopakfire: Read configuration from a file descriptor
Michael Tremer [Wed, 2 Aug 2023 15:33:14 +0000 (15:33 +0000)] 
pakfire: Read configuration from a file descriptor

This is easier to handle especially when creating temporary environments
where we just want to shoot the configuration into Pakfire().

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months ago_pakfire: util: Refactor PyObject_AsFileHandle using fmemcookie
Michael Tremer [Wed, 2 Aug 2023 15:08:15 +0000 (15:08 +0000)] 
_pakfire: util: Refactor PyObject_AsFileHandle using fmemcookie

Python is not very good at handling file objects, so we wrap them into
this little tool.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agoparser: Remove any global variables
Michael Tremer [Tue, 1 Aug 2023 18:48:40 +0000 (18:48 +0000)] 
parser: Remove any global variables

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agopakfire: Fix integer overflow in bit fields
Michael Tremer [Thu, 27 Jul 2023 13:54:48 +0000 (13:54 +0000)] 
pakfire: Fix integer overflow in bit fields

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months ago_pakfire: Consume any exceptions in log callback
Michael Tremer [Tue, 25 Jul 2023 12:57:49 +0000 (12:57 +0000)] 
_pakfire: Consume any exceptions in log callback

We cannot do anything with them here, so we need to de-fuse the
exception so that we won't run into errors when the originally called
Python function returns.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agohub: Increase robustness if the server goes away
Michael Tremer [Mon, 24 Jul 2023 17:02:46 +0000 (17:02 +0000)] 
hub: Increase robustness if the server goes away

This patch will retry a couple of requests on certain errors.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agolibpakfire: build: Use better return codes
Michael Tremer [Tue, 25 Jul 2023 12:04:33 +0000 (12:04 +0000)] 
libpakfire: build: Use better return codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agolibpakfire: digest: Use better return codes
Michael Tremer [Tue, 25 Jul 2023 12:01:33 +0000 (12:01 +0000)] 
libpakfire: digest: Use better return codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agolibpakfire: dependencies: Use better return codes
Michael Tremer [Tue, 25 Jul 2023 11:59:49 +0000 (11:59 +0000)] 
libpakfire: dependencies: Use better return codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agolibpakfire: config: Use better return codes
Michael Tremer [Tue, 25 Jul 2023 11:54:29 +0000 (11:54 +0000)] 
libpakfire: config: Use better return codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agolibpakfire: arch: Use better return codes
Michael Tremer [Tue, 25 Jul 2023 11:53:52 +0000 (11:53 +0000)] 
libpakfire: arch: Use better return codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agolibpakfire: archive: Return better return codes
Michael Tremer [Tue, 25 Jul 2023 11:48:18 +0000 (11:48 +0000)] 
libpakfire: archive: Return better return codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agolibpakfire: strings: Create better return codes for all functions
Michael Tremer [Tue, 25 Jul 2023 11:40:44 +0000 (11:40 +0000)] 
libpakfire: strings: Create better return codes for all functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agokey: Fix wrong passing of string
Michael Tremer [Tue, 25 Jul 2023 11:37:19 +0000 (11:37 +0000)] 
key: Fix wrong passing of string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agolibpakfire: pakfire_create: Return a better return code
Michael Tremer [Tue, 25 Jul 2023 11:33:49 +0000 (11:33 +0000)] 
libpakfire: pakfire_create: Return a better return code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agolibpakfire: Enhance logging to pass custom errno
Michael Tremer [Tue, 25 Jul 2023 11:33:31 +0000 (11:33 +0000)] 
libpakfire: Enhance logging to pass custom errno

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agodependencies: Create and destroy the pool for each version check
Michael Tremer [Fri, 21 Jul 2023 18:15:45 +0000 (18:15 +0000)] 
dependencies: Create and destroy the pool for each version check

The former solution obviously wasn't very thread-safe.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months ago_pakfire: Add version_compare() that does not require Pakfire
Michael Tremer [Fri, 21 Jul 2023 14:28:59 +0000 (14:28 +0000)] 
_pakfire: Add version_compare() that does not require Pakfire

This is useful if we do not have a Pakfire instance at hand and will
save us the overhead of creating one every time.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agofind-provides: Only handle shared objects
Michael Tremer [Wed, 19 Jul 2023 10:45:49 +0000 (10:45 +0000)] 
find-provides: Only handle shared objects

The previous pattern matched other files like "*.socket".

Fixes: #13027 - Pakfire thinks .socket files are .so files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agobuild: Remove BUILDROOT check
Michael Tremer [Wed, 19 Jul 2023 10:16:54 +0000 (10:16 +0000)] 
build: Remove BUILDROOT check

This searched for any references to BUILDROOT in any generated files.
However, this is hard to implement without using the nested function
which unfortunately requires an executable stack which is not permitted
in IPFire.

Since the check is usually not having a massive impact, this patch
removes it for now with the intention to bring it back at a later time.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agojail: Group prctl() calls together
Michael Tremer [Tue, 18 Jul 2023 15:50:14 +0000 (15:50 +0000)] 
jail: Group prctl() calls together

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agojail: Create a new time namespace
Michael Tremer [Tue, 18 Jul 2023 15:35:15 +0000 (15:35 +0000)] 
jail: Create a new time namespace

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agojail: Change mount propagation before switching root
Michael Tremer [Mon, 17 Jul 2023 16:45:47 +0000 (16:45 +0000)] 
jail: Change mount propagation before switching root

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agojail: Fix file descriptor check
Michael Tremer [Mon, 17 Jul 2023 16:45:20 +0000 (16:45 +0000)] 
jail: Fix file descriptor check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 months agojail: Use pivot_root() again instead of chroot()
Michael Tremer [Mon, 17 Jul 2023 16:44:50 +0000 (16:44 +0000)] 
jail: Use pivot_root() again instead of chroot()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agojail: Handle signals in epoll() loop
Michael Tremer [Fri, 30 Jun 2023 13:32:34 +0000 (13:32 +0000)] 
jail: Handle signals in epoll() loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agojail: Initialize all file descriptors with -1
Michael Tremer [Fri, 30 Jun 2023 13:30:45 +0000 (13:30 +0000)] 
jail: Initialize all file descriptors with -1

It is not a good idea to use zero as that might be a valid fd.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agocgroups: Add BPF program to filter device node access
Michael Tremer [Thu, 29 Jun 2023 08:21:11 +0000 (08:21 +0000)] 
cgroups: Add BPF program to filter device node access

This is currently permitting everything which we don't want to sustain
in the long-term.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agoconfigure: Link against libbpf
Michael Tremer [Thu, 29 Jun 2023 08:17:12 +0000 (08:17 +0000)] 
configure: Link against libbpf

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agojail: Don't drop any capabilities
Michael Tremer [Wed, 21 Jun 2023 15:25:19 +0000 (15:25 +0000)] 
jail: Don't drop any capabilities

This is not what we finally need, but we will try to give the jail as
many capabilities in its own namespace as possible.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agocgroup: Return error when the cgroup could not be created
Michael Tremer [Wed, 21 Jun 2023 13:42:09 +0000 (13:42 +0000)] 
cgroup: Return error when the cgroup could not be created

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agojail: Refactor searching for env variable function
Michael Tremer [Wed, 21 Jun 2023 13:31:27 +0000 (13:31 +0000)] 
jail: Refactor searching for env variable function

This used a variable size array on the stack before which is not needed.
This version should be slightly faster and the compiler should be able
to inline it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agojail: Allow accessing loop devices
Michael Tremer [Tue, 20 Jun 2023 14:43:10 +0000 (14:43 +0000)] 
jail: Allow accessing loop devices

This is not great, but the only way we can mount any images inside the
jail as loop devices are not namespaced (yet).

Jails of this style can access any loop devices set up by the system and
for other jails.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agobuilds: Install tools that are required to build a certain image
Michael Tremer [Mon, 19 Jun 2023 15:42:57 +0000 (15:42 +0000)] 
builds: Install tools that are required to build a certain image

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
23 months agobuild: Find all packages to be installed and create a new repository with them
Michael Tremer [Mon, 19 Jun 2023 15:27:21 +0000 (15:27 +0000)] 
build: Find all packages to be installed and create a new repository with them

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agobuild: mkimage: Take a fd for the output
Michael Tremer [Wed, 14 Jun 2023 15:52:36 +0000 (15:52 +0000)] 
build: mkimage: Take a fd for the output

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoutil: Add function to copy all data from one fd to another
Michael Tremer [Wed, 14 Jun 2023 15:51:44 +0000 (15:51 +0000)] 
util: Add function to copy all data from one fd to another

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agobuild: Add scaffolding to create images
Michael Tremer [Wed, 14 Jun 2023 15:15:50 +0000 (15:15 +0000)] 
build: Add scaffolding to create images

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotests: archive: Fix compiling
Michael Tremer [Thu, 1 Jun 2023 21:26:37 +0000 (21:26 +0000)] 
tests: archive: Fix compiling

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotests: Drop PGP test key
Michael Tremer [Thu, 1 Jun 2023 21:24:31 +0000 (21:24 +0000)] 
tests: Drop PGP test key

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agocontrib: Update keys of IPFire 3
Michael Tremer [Thu, 1 Jun 2023 21:23:38 +0000 (21:23 +0000)] 
contrib: Update keys of IPFire 3

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Carry the comment with us and require it
Michael Tremer [Thu, 1 Jun 2023 21:16:41 +0000 (21:16 +0000)] 
keys: Carry the comment with us and require it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: Import/export keys as strings
Michael Tremer [Thu, 1 Jun 2023 20:28:50 +0000 (20:28 +0000)] 
_pakfire: Import/export keys as strings

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Do not insist on reading the comment line first
Michael Tremer [Thu, 1 Jun 2023 20:28:21 +0000 (20:28 +0000)] 
keys: Do not insist on reading the comment line first

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agorepos: Write database signature to the correct place
Michael Tremer [Thu, 1 Jun 2023 20:26:38 +0000 (20:26 +0000)] 
repos: Write database signature to the correct place

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agorepos: Fix re-reading repository key
Michael Tremer [Thu, 1 Jun 2023 20:26:09 +0000 (20:26 +0000)] 
repos: Fix re-reading repository key

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Wipe memory after importing keys
Michael Tremer [Thu, 1 Jun 2023 19:15:19 +0000 (19:15 +0000)] 
keys: Wipe memory after importing keys

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Export signing/verification routines in Python
Michael Tremer [Thu, 1 Jun 2023 18:46:21 +0000 (18:46 +0000)] 
keys: Export signing/verification routines in Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Flush buffers after creating a signature
Michael Tremer [Thu, 1 Jun 2023 18:46:03 +0000 (18:46 +0000)] 
keys: Flush buffers after creating a signature

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Fix handling IDs (again)
Michael Tremer [Thu, 1 Jun 2023 18:45:43 +0000 (18:45 +0000)] 
keys: Fix handling IDs (again)

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Convert the key ID to integer in Python
Michael Tremer [Thu, 1 Jun 2023 18:11:26 +0000 (18:11 +0000)] 
keys: Convert the key ID to integer in Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: Implement loading keys
Michael Tremer [Thu, 1 Jun 2023 18:01:07 +0000 (18:01 +0000)] 
_pakfire: Implement loading keys

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Make the ID an array of bytes again
Michael Tremer [Thu, 1 Jun 2023 17:59:45 +0000 (17:59 +0000)] 
keys: Make the ID an array of bytes again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: keys: Fix error handling when returning algorithm
Michael Tremer [Thu, 1 Jun 2023 17:08:17 +0000 (17:08 +0000)] 
_pakfire: keys: Fix error handling when returning algorithm

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotests: Add some simple tests for keys in Python
Michael Tremer [Thu, 1 Jun 2023 17:08:01 +0000 (17:08 +0000)] 
tests: Add some simple tests for keys in Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agopakfire: Import everything from _pakfire
Michael Tremer [Thu, 1 Jun 2023 17:03:52 +0000 (17:03 +0000)] 
pakfire: Import everything from _pakfire

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: Export the key algorithm constants
Michael Tremer [Thu, 1 Jun 2023 17:03:32 +0000 (17:03 +0000)] 
_pakfire: Export the key algorithm constants

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: keys: Treat IDs as integers
Michael Tremer [Thu, 1 Jun 2023 17:03:10 +0000 (17:03 +0000)] 
_pakfire: keys: Treat IDs as integers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Change key id into uint64_t
Michael Tremer [Thu, 1 Jun 2023 17:01:18 +0000 (17:01 +0000)] 
keys: Change key id into uint64_t

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: Drop listing keys
Michael Tremer [Thu, 1 Jun 2023 16:41:45 +0000 (16:41 +0000)] 
_pakfire: Drop listing keys

We no longer keep keys stored.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Drop delete operation
Michael Tremer [Thu, 1 Jun 2023 16:24:56 +0000 (16:24 +0000)] 
keys: Drop delete operation

Since we don't have a keystore any more, there is no need to implement
this.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agorepos: Implement creating a detached signature for databases
Michael Tremer [Thu, 1 Jun 2023 15:53:02 +0000 (15:53 +0000)] 
repos: Implement creating a detached signature for databases

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agorepos: Drop flags argument from compose function
Michael Tremer [Thu, 1 Jun 2023 15:44:37 +0000 (15:44 +0000)] 
repos: Drop flags argument from compose function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agokeys: Implement signature verification
Michael Tremer [Thu, 1 Jun 2023 15:24:57 +0000 (15:24 +0000)] 
keys: Implement signature verification

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