Commit Graph
2846 Commits
Author SHA1 Message Date
André Roth 519602b3e8 Merge pull request #1626 from barnumbirr/configurable-by-hash-algorithms
Make the set of Acquire-By-Hash algorithms configurable
2026-11-03 13:44:00 +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
Martin Simon e58bab9587 Make the set of Acquire-By-Hash algorithms configurable
Acquire-By-Hash entries are written for MD5Sum, SHA1, SHA256 and SHA512,
hardcoded in two places in deb/index_files.go. Every algorithm is a full
set of index copies on each publish, and on S3-like storage each of those
is a network round trip rather than a link.

Measured on an R2-backed archive of 25 packages across three suites, one
`aptly publish update` per suite:

  Acquire-By-Hash off   38 S3 requests
  Acquire-By-Hash on   222 S3 requests   (88 HeadObject, 83 CopyObject,
                                          35 DeleteObject, 13 PutObject)

Modern apt verifies with SHA256; MD5Sum and SHA1 are deprecated and
Debian has been phasing them out of Release files for years. Publishers
who do not need them are paying three quarters of that for nothing, with
no way to say so.

acquireByHashAlgorithms in aptly.conf now selects the set. An empty or
absent value keeps all four, so existing configurations are unaffected.
The order entries are written in comes from the code rather than the
config, so the directories created in one loop and the entries written in
another cannot disagree. An unrecognised name is an error rather than
something to skip: skipping a typo would produce "no by-hash entries for
that algorithm", which looks exactly like having configured it away.

Set per publish invocation from the config, the way SkipBz2 already is,
rather than persisted on the publish point.

Pre-existing test failures on this tree are unchanged by this commit:
deb goes 173->177 passed with the same 11 failures, utils keeps its one
(TestCompress), s3 stays green.
2026-11-03 13:13:18 +01:00
André Roth db3e062edc Merge pull request #1637 from luanmdang/api-metrics-listener
api: add metrics-only listener
2026-11-03 12:52:46 +01:00
Luan Dang 0d23d32840 test: handle HEAD metrics response cleanup 2026-11-03 11:42:38 +01:00
Luan DangandCopilot Autofix powered by AI 198c801f00 Refactor TestHeadMetrics for improved testing
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-11-03 11:42:38 +01:00
Luan Dang 328120f80a api: add metrics-only listener 2026-11-03 11:42:38 +01:00
André Roth 431f75c109 Merge pull request #1646 from twaik/fix-version-split-last-hyphen
deb: split Debian revision at the last hyphen
2026-11-03 10:38:54 +01:00
André Roth 70f423adaa Merge pull request #1603 from jmunson/jmunson/enable-pprof
Expose net/http/pprof handlers
2026-11-02 20:01:01 +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 81d119f421 deb: rebase changes 2026-11-02 14:59:52 +01:00
Twaik Yont 242a0d4010 deb: split Debian revision at the last hyphen
Per Debian Policy, the version is split at the last hyphen:
https://www.debian.org/doc/debian-policy/ch-controlfields.html#version

Add tests for the ordering of '+', which is a regular non-letter sorted by its ASCII value (see Comparing version numbers on the same page).
2026-11-02 14:48:41 +01:00
André Roth eaf9453897 Merge pull request #1601 from jaymzh/debian-version
Fix version parsing, validate debian package version
2026-11-02 10:11:20 +01:00
Phil Dibowitz 21487d4b5d Fix version parsing, validate debian package version
This patch adds validation to the version pasing logic (parseVersion) to
not allow packages to be registered which apt wouldn't accept anyway.

It then propogates validation errors through CompareVersions, the way
in which parseVersion gets called, so that appropriate decisions can be
made.

New packages with invalid versions are not accepted.

For any pre-exisiting packages with invalid versions, as much care is
taken as possible to log warnings, and not use those packages.

This PR is loosely bnased on one by by Aaron Foster
<afoster@cloudflare.com> though it has largely been written at this
point.

Signed off with internal and external emails for clarity, but commit
is under personal email where we typically do open source contributions
from.

Signed-off-by: Phil Dibowitz <pdibowitz@cloudflare.com>
Signed-off-by: Phil Dibowitz <pdibowitz@ipom.com>
2026-11-01 14:25:17 -08:00
André Roth 0b55b09eb2 Merge pull request #1659 from aptly-dev/fix/tmp-suffix
publish s3: remove tmp suffix for testing
2026-11-01 17:03:11 +01:00
André Roth 10e748a097 publish s3: remove tmp suffix for testing 2026-11-01 16:14:10 +01:00
André Roth 28609a918e Merge pull request #1629 from daniel-pinder/pgp-accept-multisigned-releases 2026-11-01 14:45:00 +01:00
André Roth 29db8333c5 recreate test keys with faketime 2026-11-01 13:26:36 +01:00
Daniel Pinder 59ff63de62 pgp: accept multi-signed releases when the keyring holds only some signers
Debian co-signs each suite's InRelease with more than one archive key, so
gpgv reports a good signature from the key you trust and NO_PUBKEY for the
others, exiting 2. Both verifiers treat that as failure, which means
mirroring Debian requires importing every key Debian happens to sign with.
apt does not require this: it is fatal only when there is no good signature
or a BADSIG.

Adopt that rule for unknown signers. When gpgv exits non-zero the status
stream is parsed per NEWSIG block and the result is a success only when the
process exited, at least one block is a good signature from a held key, at
least one block is an unknown issuer (ERRSIG reason 9 with NO_PUBKEY), and
nothing else appears. BADSIG, EXPSIG, EXPKEYSIG and REVKEYSIG from a held
key still fail, as does any unexplained failure. The exit-zero path is
unchanged.

KEYEXPIRED and KEYREVOKED are deliberately not disqualifiers: doc/DETAILS
notes KEYEXPIRED is emitted for an expired subkey even when that subkey was
not used, so treating it as a verdict rejects valid signatures.

checkDetachedSignature gets the equivalent change for the internal verifier.
2026-11-01 13:26:36 +01:00
André Roth a65c2cd850 Merge pull request #1602 from andrewshadura/deb-tmp-uniq
deb publish: Create unique temporary files each time
2026-11-01 12:45:23 +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 f668b1016f Merge pull request #1647 from aptly-dev/fix/swagger-validation
Documentation cleanup: fix validation error and config file headings
2026-11-01 10:35:50 +01:00
André Roth bddfed27e5 swagger: fix validation error 2026-11-01 02:30:33 +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 add8d82b44 Merge pull request #1658 from aptly-dev/dependabot/go_modules/github.com/klauspost/compress-1.18.7
build(deps): bump github.com/klauspost/compress from 1.18.2 to 1.18.7
2026-11-01 01:27:03 +01:00
André Roth ffe77f7b1e Merge pull request #1657 from aptly-dev/dependabot/go_modules/github.com/go-jose/go-jose/v4-4.1.6
build(deps): bump github.com/go-jose/go-jose/v4 from 4.1.4 to 4.1.6
2026-11-01 01:24:13 +01:00
André Roth 65a8237574 Merge pull request #1642 from filbranden/fix-download-url-opaque
Show the full URL in download error messages
2026-11-01 00:50:52 +01:00
dependabot[bot] fba40f12bd build(deps): bump github.com/klauspost/compress from 1.18.2 to 1.18.7
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.18.2 to 1.18.7.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](https://github.com/klauspost/compress/compare/v1.18.2...v1.18.7)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.18.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-31 23:50:33 +00:00
dependabot[bot] 9c37e279dd build(deps): bump github.com/go-jose/go-jose/v4 from 4.1.4 to 4.1.6
Bumps [github.com/go-jose/go-jose/v4](https://github.com/go-jose/go-jose) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Commits](https://github.com/go-jose/go-jose/compare/v4.1.4...v4.1.6)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v4
  dependency-version: 4.1.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-31 23:50:18 +00: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
Filipe Brandenburger 4e671cc366 Show the full URL in download error messages
Downloads set req.URL.Opaque to keep "+" percent-encoded in the path.
URL.String() prints "scheme:opaque" and drops the host, so every error
from the http client showed a URL such as "https:/repos/debian/...",
lacking a host name. The request itself was correct, but the message
sent me to look for a malformed URL.

Set req.URL.RawPath instead. The escaping still reaches the wire through
EscapedPath(), and String() keeps the scheme and the host.

The proxy special case is no longer necessary. Requests through a proxy
now get the same "+" escaping as direct requests.
2026-11-01 00:14:42 +01:00
André Roth bf06c688ed Merge pull request #1611 from tbe/api-pull-fix
api: fix snasphot-pull
2026-10-31 23:35:07 +01:00
André Roth 2f102086b7 Merge pull request #1640 from aptly-dev/dependabot/go_modules/go.opentelemetry.io/otel/sdk-1.45.0
build(deps): bump go.opentelemetry.io/otel/sdk from 1.44.0 to 1.45.0
2026-10-31 22:54:51 +01:00
dependabot[bot] 3812982982 build(deps): bump go.opentelemetry.io/otel/sdk from 1.44.0 to 1.45.0
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.44.0 to 1.45.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.44.0...v1.45.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-31 21:21:17 +00:00
André Roth 17d0899e72 Merge pull request #1628 from aptly-dev/dependabot/go_modules/google.golang.org/grpc-1.83.1
build(deps): bump google.golang.org/grpc from 1.79.3 to 1.83.2
2026-10-31 21:41:38 +01:00
André Roth 103e4c2810 Merge pull request #1621 from KereMath/fix/skel-appstream-publish
publish: fix duplicated skel/AppStream files and missing by-hash entries
2026-10-31 21:17:31 +01:00
dependabot[bot] 76bd237954 build(deps): bump google.golang.org/grpc from 1.79.3 to 1.83.2
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.3 to 1.83.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.3...v1.83.2)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.83.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-31 20:17:16 +00:00
André Roth a10f3bcc0e Merge pull request #1618 from aptly-dev/dependabot/go_modules/github.com/go-git/go-git/v5-5.19.2
build(deps): bump github.com/go-git/go-git/v5 from 5.19.1 to 5.19.2
2026-10-31 21:14:00 +01:00
André Roth c54e3f31a2 Merge pull request #1625 from barnumbirr/fix-readlink-metadata-case
s3: match the SymLink metadata key case-insensitively in ReadLink
2026-10-31 20:45:29 +01:00
dependabot[bot] 24adc1790c build(deps): bump github.com/go-git/go-git/v5 from 5.19.1 to 5.19.2
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.19.1 to 5.19.2.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Changelog](https://github.com/go-git/go-git/blob/main/HISTORY.md)
- [Commits](https://github.com/go-git/go-git/compare/v5.19.1...v5.19.2)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-version: 5.19.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-31 19:45:23 +00:00
André Roth 0eee5c02d8 Merge pull request #1605 from aptly-dev/dependabot/go_modules/golang.org/x/crypto-0.52.0
build(deps): bump golang.org/x/crypto from 0.51.0 to 0.52.0
2026-10-31 20:43:00 +01:00
dependabot[bot] 585db213ec build(deps): bump golang.org/x/crypto from 0.51.0 to 0.52.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.51.0 to 0.52.0.
- [Commits](https://github.com/golang/crypto/compare/v0.51.0...v0.52.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.52.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-31 19:09:19 +00:00
André Roth 57529f53ef Merge pull request #1600 from aptly-dev/dependabot/go_modules/golang.org/x/net-0.55.0
build(deps): bump golang.org/x/net from 0.53.0 to 0.55.0
2026-10-31 20:07:37 +01:00
André Roth bc0fe9c0b7 Merge pull request #1648 from AdamMagued/fix/issue-1619-snapshots-async-lock
fix(api): handle concurrent snapshot deletion during list endpoint
2026-10-31 20:06:28 +01:00
dependabot[bot] d6066de308 build(deps): bump golang.org/x/net from 0.53.0 to 0.55.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.53.0 to 0.55.0.
- [Commits](https://github.com/golang/net/compare/v0.53.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-31 17:02:45 +00:00
adam magued f525d653a5 test(api): add regression test for concurrent snapshot deletion 2026-10-14 15:55:55 +03:00
adam magued 74c13f73f2 fix(api): handle concurrent snapshot deletion during list endpoint 2026-10-14 15:55:53 +03:00
André Roth 516fcc6bfd Merge pull request #1636 from mmayabi/add-aptlypilot-integration
Add AptlyPilot to integrations
2026-10-12 16:12:56 +02:00