Commit Graph

2689 Commits

Author SHA1 Message Date
Oliver Sauder 25d7d7c037 Solving progress not safe issue for api
Progress is not safe so for api its always nil and
code needs to take care of this
2022-01-27 09:30:14 +01:00
Oliver Sauder 1c7c07ace7 db batch may not be a global resource
This way db usage is safe.
2022-01-27 09:30:14 +01:00
Oliver Sauder f7f42a9cd8 Database changes of resources need to be atomic 2022-01-27 09:30:14 +01:00
Oliver Sauder 1e7731c317 Removed obsolete RWMutexes 2022-01-27 09:30:14 +01:00
Oliver Sauder 208a2151c1 every go routine needs to have its own collection factory
this is needed so concurrent reads and writes are possible.
2022-01-27 09:30:14 +01:00
Andrej Shadura 4a6d53e16d Include AzurePublishEndpoints in the manpage template
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
2022-01-21 11:46:36 +01:00
Chuan Liu a778ff8903 Fix the storage string format.
Co-authored-by: Andrej Shadura <andrew@shadura.me>
2022-01-21 11:46:36 +01:00
chuan bb42a2158d Add support for Azure storage as a publishing backend
This adds a new configuration setting: AzurePublishEndpoints, similar
to the existing S3PublishEndpoints and SwiftPublishEndpoints.

For each endpoint, the following has to be defined:
 - accountName
 - accountKey
 - container
 - prefix

Azure tests require the following environment variables to be set:
 - AZURE_STORAGE_ACCOUNT
 - AZURE_STORAGE_ACCESS_KEY

With either of these not set, Azure-specific tests are skipped.
2022-01-21 11:46:36 +01:00
Sylvain Baubeau ab2f5420c6 Export RemoteRepo package list 2021-11-02 15:08:19 +01:00
Vítězslav Dvořák 174943cd0f Proposed keyserver changed to functional one #990 2021-11-02 15:01:17 +01:00
Joshua Colson 0bc66032d2 Resolve PR #976 review comments
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson 899ed92ebc Add -json flag to publish list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson 129eb8644d Add -json flag to mirror list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson d582f9bab2 Add Debian 11 keys to test fixture keyring
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson 0f1575d5af Add -json flag to snapshot show|list
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson f9c0d99790 Refactor repo list into json and txt output
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Joshua Colson 1f56fb86e3 Add -json output flag to repo list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
2021-09-24 10:29:33 +02:00
Ratchanan Srirattanamet f9d08e1377 .goxc.json: list os/arch explicitly to avoid darwin/386
Go 1.15 drops support for darwin/386 GOOS/GOARCH pair [1]. So, we have
to skip this pair, and thus cannot use simple os multiply arch anymore.
Switch to goxc's BuildConstraints config, which uses the same syntax as
Go's build constraint header [2].

[1] https://github.com/golang/go/issues/37610
[2] https://golang.org/cmd/go/#hdr-Build_constraints
2021-04-29 14:41:24 +02:00
Max Bruckner cbf0416d7e Filter command: Fix typo Priorioty -> Priority 2021-03-21 09:59:39 +01:00
Andrej Shadura 2422d3ab40 When ETag doesn’t look like MD5, use the value from metadata instead
The S3 backend relies on ETag S3 returns being equal to the MD5 of the
object, but it’s not necessarily true. When the value returned clearly
doesn’t look like a valid MD5 hash (length isn’t exactly 32 characters),
attempt to retrieve the MD5 hash possibly stored in the metadata.

We cannot always do this since user-defined metadata isn’t returned by
the ListObjects call, so verifying it for each object is expensive as it
requires one HEAD request per each object.

This commit fixes #923.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
2021-03-02 13:37:17 +00:00
Andrej Shadura 960cf76c42 Store MD5 in a separate metadata field as well
The S3 backend relies on ETag S3 returns being equal to the MD5 of the
object, but it’s not necessarily true. For that purpose we store the MD5
object in a separate metadata field as well to make sure it isn’t lost.

From https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html:

> The entity tag is a hash of the object. The ETag reflects changes only
> to the contents of an object, not its metadata. The ETag may or may not
> be an MD5 digest of the object data. Whether or not it depends on how
> the object was created and how it is encrypted as described below:
>
> Objects created by the PUT Object, POST Object, or Copy operation,
> or through the AWS Management Console, and are encrypted by SSE-S3 or
> plaintext, have ETags that are an MD5 digest of their object data.
>
> Objects created by the PUT Object, POST Object, or Copy operation,
> or through the AWS Management Console, and are encrypted by SSE-C or
> SSE-KMS, have ETags that are not an MD5 digest of their object data.
>
> If an object is created by either the Multipart Upload or Part Copy
> operation, the ETag is not an MD5 digest, regardless of the method
> of encryption.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
2021-03-02 13:37:17 +00:00
Lorenzo Bolla af2564c580 Use newer Go for mod file 2021-02-12 09:23:24 +01:00
Lorenzo Bolla b385b1e975 Fix test breaking on newer versions of Go
Apparently, Go error message slightly changed in newer versions.
2021-02-12 09:23:24 +01:00
Lorenzo Bolla ce1d4b852a Test against more recent versions of Go
Run basic tests for all minor versions since 1.11 and full tests for the last
two most recent versions.

Fix #939
2021-02-12 09:23:24 +01:00
Lorenzo Bolla c43d31f693 Don't fail hard if we can't clean Swift up 2021-02-08 10:52:27 +01:00
Lorenzo Bolla e4259c5045 Always try to get a version
Even if a simple git hash.
2021-02-08 10:52:27 +01:00
Lorenzo Bolla 993dd2ad1c Print test exception right away, in case the full test run crashes 2021-02-08 10:52:27 +01:00
Lorenzo Bolla 3201244d9b Fix tests and fixtures relying on expired pgp keys
PGP tests relied on expired gpg keys: upgrade with newer Debian keys from
https://ftp-master.debian.org/keys.html.
Download new fixtures files from http://ftp.debian.org/debian/dists/buster/
2021-02-08 10:52:27 +01:00
Lorenzo Bolla f4dc87fa44 Use a hostname more likely to be non-existent than localhost
Otherwise, it's possible that certain network configuration defining
*.localhost cause the tests to fail.
2021-02-08 10:52:27 +01:00
Don Kuntz 24a027194e Remove unused variable 2019-10-18 18:29:38 +03:00
Don Kuntz 62c4dc1472 Update authors 2019-10-18 18:29:38 +03:00
Don Kuntz b7f74b4e55 Allow GPGFinder to work with nonstandard GPG version strings
Specifically, I have MacGPG installed instead of upstream GPG, which
results in the version string reading
  gpg (GnuPG/MacGPG2) 2.2.17

instead of the expected
  gpg (GnuPG) 2.2.17
2019-10-18 18:29:38 +03:00
Andrey Smirnov 2da853dcbe Bump golangci-lint to 19.1 2019-09-27 15:44:33 +03:00
Andrey Smirnov 0438a7c76b Upgrade AWS SDK to the latest version 2019-09-27 15:39:48 +03:00
Andrey Smirnov c86c3a803f Really upgrade goleveldb to the latest master version
PR #876 actually upgraded goleveldb to 1.0.0, not to the latest master.

Recent changes to goleveldb should improve performance
https://github.com/syndtr/goleveldb/issues/226#issuecomment-477568827
2019-09-27 14:19:39 +03:00
Andrey Smirnov 19db62d74f Add new Go modules stuff 2019-09-27 13:59:19 +03:00
Andrey Smirnov 0146411483 Remove vendor/ tree, and dep files 2019-09-27 13:59:19 +03:00
Andrey Smirnov b731e17850 Update nvidia repo key 2019-09-27 13:01:03 +03:00
Andrey Smirnov bb66b2296d Vendor update goleveldb
There are number of changes which went in recently which should improve
performance: https://github.com/syndtr/goleveldb/issues/226#issuecomment-477568827
2019-09-18 16:49:50 +04:00
Andrey Smirnov c75ef8546e Fix system tests for Debian Stretch 9.11 2019-09-18 01:23:58 +03:00
Andrey Smirnov d80c2b6104 Fix system tests 2019-09-06 23:42:56 +03:00
Andrey Smirnov ec4bf35647 Regen aptly.1 2019-09-06 23:42:56 +03:00
Raúl Benencia 669d99bebc Update documentation 2019-09-06 23:42:56 +03:00
Raúl Benencia 715af5950f Add suite completion 2019-09-06 23:42:56 +03:00
Raúl Benencia 7a5ac3dbc2 Tests for custom and default suite 2019-09-06 23:42:56 +03:00
Raúl Benencia ae61cbb4c0 Allow definition of custom Suite 2019-09-06 23:42:56 +03:00
Raphael Medaer bde6e6bda4 Test dependency architecture without version.
As asked by Andrey in #868.
2019-09-06 15:41:59 +03:00
Raphael Medaer a656241d5e Parse dependency architecture even without version
This commit closes: #145

The dependency format "pkg:arch" (e.g. "python3:any") was not well
parsed if not any version is given. This commit splits the dependency
name and architecture in all cases.
2019-09-06 15:41:59 +03:00
Andrey Smirnov 7ae5a12f4a Bump Go supported version to 1.11-1.13
This might allow to switch to Go modules as the next step.
2019-09-05 16:41:50 +03:00
Andrey Smirnov 769e984ef4 Fix issues with progress == nil causing panics
Part of PR #459

This prepares for more methods to be exposed via the API.
2019-09-03 20:28:28 +04:00