Commit Graph
807 Commits
Author SHA1 Message Date
Hansjoerg Maurer b6cb4de05d Add system test for architecture variant mirrors 2026-11-05 23:10:30 +01:00
Hansjoerg Maurer 673b4f02d8 Use neutral fixtures in architecture variant tests 2026-11-05 21:16:51 +01:00
Hansjoerg Maurer b5096eaea9 Display architecture variants in package output 2026-11-05 21:00:37 +01:00
Rascalov 300837fe06 tests: cover mirror update -max-versions in system and unit tests 2026-11-05 11:22:28 +01:00
Martin Simon b80f151b6d deb: make the index rename concurrency configurable
publishRenameConcurrency (publish_rename_concurrency in YAML) sets how
many index files RenameFiles renames at once. It defaults to 4, the
value that was hard-coded, and 1 renames them one at a time. Values
below 1 are treated as 1, since a semaphore with no capacity would
never admit a rename.

The setting is global rather than per publishing endpoint because the
renames run against every storage backend, not only S3.
2026-11-04 12:24:18 +01:00
André Roth 6f95fdca32 Merge pull request #1660 from barnumbirr/complete-default-config
conf: document the config keys missing from aptly.conf and the man page
2026-11-04 12:12:19 +01:00
Martin Simon 5b9a1a73fa conf: document gpg_keys, and the three keys the man page lacks
gpg_keys was missing from debian/aptly.conf, and the man page had no
entry for ppaBaseURL, enablePprofEndpoint or gpgKeys. The wording
follows the existing template comments where there is one.
2026-11-03 14:01:36 +01:00
Martin Simon 8c655504d2 conf: fix two misspelled keys in the default aptly.conf
debian/aptly.conf spelled dep_follow_all_variants as
dep_follow_allvariants and dep_verboseresolve as dep_verbose_resolve.
The YAML loader ignores unknown keys, so setting either to true in a
config written from this template had no effect.
2026-11-03 13:57:08 +01:00
Martin Simon 925996b8da conf: document acquire_by_hash_algorithms in the default aptly.conf
The key added in #1626 was missing from debian/aptly.conf, which aptly
writes out as ~/.aptly.conf on first run, so new installs never saw it.
2026-11-03 13:53:52 +01:00
Martin Simon 0fcc80db7d Add the new config key to the YAML config-show gold file
Same reason as the JSON one: ConfigShowYAMLTest snapshots `aptly config
show` in YAML form. Checked all three gold files under t02_config this
time rather than the one CI named. CreateConfigTest_gold is a commented
template rather than struct output, so it is unaffected, and it passes.
2026-11-03 13:13:18 +01:00
Martin Simon 74ff0194db Add the new config key to the config-show gold file
ConfigShowTest snapshots the output of `aptly config show`, which now
carries acquireByHashAlgorithms with its default. The other three system
files mentioning "architectures" are inputs rather than expected output,
which is why only this one test failed.
2026-11-03 13:13:18 +01:00
Luan Dang 328120f80a api: add metrics-only listener 2026-11-03 11:42:38 +01:00
James Munson 2d72d1f0d5 Expose net/http/pprof handlers under /api/debug/pprof/* when the new
enablePprofEndpoint (JSON) / enable_pprof_endpoint (YAML) config option
is true. The endpoint is disabled by default.
2026-11-02 15:14:35 +01:00
André Roth 10e748a097 publish s3: remove tmp suffix for testing 2026-11-01 16:14:10 +01:00
André Roth 5775d2e31c Merge pull request #1656 from aptly-dev/fix/mirror-rename
mirror: fix rename
2026-11-01 10:36:13 +01:00
André Roth cd22f09fc1 doc: fix comment order in aptly.conf 2026-11-01 02:30:33 +01:00
André Roth cd365b2899 mirror: fix rename 2026-11-01 02:30:11 +01:00
André Roth 3c46f7976b Merge pull request #1624 from chipflake/api-codename
api/publish: allow setting custom Codename on the Release file
2026-11-01 00:36:28 +01:00
Eleni Michalaki 3d7f17e849 api/publish: allow setting custom Codename on the Release file 2026-08-26 11:35:43 +02:00
KereMath bef02fe62b tests: cover skel files with multiple components
Publishing two components appended each skeleton payload twice; the
existing skel test only publishes a single component so it did not
catch it.
2026-08-20 03:26:30 +03:00
André Roth f59b0d2b06 go: 1.26 2026-07-01 10:40:38 +02:00
André Roth 1b177bbf68 tests: remove temporary folders 2026-06-19 11:47:07 +02:00
André Roth a743f03242 go: use version 1.25.0 2026-06-19 01:23:28 +02:00
Pierig Le Saux fbad25e2b5 fix: add jfrog parameters to default config generation test 2026-06-18 18:18:31 +02:00
Pierig Le Saux 041eeff67d test: update ConfigShowTest_gold with JFrogPublishEndpoints 2026-06-18 18:18:31 +02:00
Pierig Le Saux 6244747912 chore: fix flake8 linting errors in jfrog test wrappers 2026-06-18 18:18:31 +02:00
André Roth b28daa8417 initial commit for JFrog support
# Conflicts:
#	api/api_test.go
#	api/router.go
#	go.mod
#	go.sum
#	utils/config_test.go
2026-06-18 18:18:31 +02:00
Pierig Le Saux 4b8f0c42ac initial commit for JFrog support 2026-06-18 13:38:03 +02:00
Pierig Le Saux 46e9ac65fa missed some files for tests 2026-06-17 23:39:27 +02:00
Pierig Le Saux e04df59065 Sync GCS config goldens with publish endpoint changes 2026-06-17 23:39:27 +02:00
Pierig Le Saux c02c469fa6 feat(gcs): implement GCS publish endpoint support and update config/show/system tests 2026-06-17 23:39:27 +02:00
Pierig Le Saux d5fbf0f795 feat: add GCS publish backend with config, API, docs, and tests 2026-06-17 23:39:27 +02:00
Pierig Le Saux ed4af9a0f6 add support for gcs 2026-06-17 23:39:26 +02:00
André Roth 00e75ebf3c test(dput): add system test for PUT /api/files/:dir/:file via dput 2026-06-17 21:29:06 +02:00
André Roth caed9c234d publish: support MultiDist toggle 2026-06-13 14:48:01 +02:00
André Roth 9771f228bc repos: fix race conditions
* load data inside background tasks
  Perform collection.LoadComplete inside maybeRunTaskInBackground
  Have tasks use a fresh copy of taskCollectionFactory, taskCollection
* use uuids, since names can be renamed
2026-06-13 14:47:58 +02:00
André Roth 6ee51b6454 publish: fix race conditions
* remove useless resource lock
  Resource locks need to be before the background task. creating same publish endpoint at the same time is unlikely...
* load data inside background tasks
  This fixes a flaw in async apis, which loaded the published repo from the DB and mutated it outside the task closure, before the task lock was acquired.
  Perform collection.LoadComplete inside maybeRunTaskInBackground and have tasks use a fresh copy of taskCollectionFactory, taskCollection
* lock source repos/snapshots for publish operations
  Concurrent tasks were not properly locking their resources, leading to inconsistent published indexes:
  SourceLocalRepo: iterate published.Sources (component -> source UUID), look up each local repo via localRepoCollection.ByUUID and append string(repo.Key()) to resources
  SourceSnapshot: iterate b.Snapshots,look up each snapshot via snapshotCollection.ByName and append string(snapshot.ResourceKey()) to resources.
* lock pool on non MultiDist publish
* revert mutex on LinkFromPool
* use uuids, since names can be renamed
* add test for MultiDist change
2026-06-13 14:47:40 +02:00
André Roth bba6bd7db5 system tests: do not depend on launchpad.net 2026-05-04 11:05:04 +02:00
André Roth faeaad0378 config: allow setting PPA Base URL 2026-05-04 11:05:04 +02:00
André Roth a20eb6866a document prometheus API
* enable in dev and test env
* fix api/repos doc
2026-04-26 23:56:05 +02:00
André Roth f8d2d3cb8d fix lint errors 2026-04-26 17:41:12 +02:00
Philip Cramer 02423af931 fix: prevent db cleanup from deleting AppStream pool files 2026-04-26 15:04:17 +02:00
Philip Cramer 2a228625e2 test: add system test for AppStream publish pass-through 2026-04-26 15:04:17 +02:00
Philip Cramer 16e0302f30 test: update snapshot golden files for AppStream field 2026-04-26 15:04:17 +02:00
Philip Cramer 6ecbc9ba90 test: add system tests for AppStream mirror create, edit, and update 2026-04-26 15:04:17 +02:00
Tim Foerster d616977904 Add SOURCE_DATE_EPOCH support for GPG signers
Both the external GPG signer (--faked-system-time) and internal Go
OpenPGP signer (signerConfig.Time) now honor SOURCE_DATE_EPOCH,
producing reproducible signatures alongside the plain Release file dates.

Adds system tests for both signer backends verifying byte-identical
Release, Release.gpg and InRelease across repeated publishes.

The signer tests (PublishRepo3[78]Test) are using an ed25519 key because
ed25519 signatures are deterministic by design. The Go openpgp library
uses a random nonce for DSA/ECDSA (see signature.go Sign calls using
config.Random() link below) so those signatures vary across runs
even with a fixed timestamp, making byte-identical verification impossible.

In addition to 49f342878a
Ref: https://github.com/aptly-dev/aptly/pull/1537
Ref: https://github.com/ProtonMail/go-crypto/blob/v1.4.0/openpgp/packet/signature.go#L945-L979
2026-04-26 14:32:23 +02:00
tom b3f5d96490 Add edit mirror API endpoint 2026-04-12 22:26:58 +02:00
André Roth 144265122a Merge pull request #1533 from xzhang1/add-version
`Release` file: support `Version` field
2026-04-12 20:09:39 +02:00
dependabot[bot] 8db1d2e7f1 build(deps): bump requests from 2.32.4 to 2.33.0 in /system
Bumps [requests](https://github.com/psf/requests) from 2.32.4 to 2.33.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.4...v2.33.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.33.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-12 17:26:36 +00:00
Zhang Xiao e2ebcbb02a Release file: support Version field
https://wiki.debian.org/DebianRepository/Format#Version

The Version field, if specified, shall be the version of the release.
On the other hand, if not set or set to an empty value, the Version
field will not be included in the Release file.

Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
2026-03-03 07:38:44 +00:00