Repository navigation
feat(formats): Swift, CocoaPods, Pub, CRAN, Git LFS and Eclipse p2 - #533
Merged
Merged
Conversation
Add the p2 format (issue #522 item 6): a proxy-only, MountIsolated repository of an Eclipse p2 update site, as Nexus offers. - pkg/p2: key classification, streaming rewrite of artifacts/content/composite documents (xml, xz, jar) and child relocation, with fuzz targets. - internal/proxy: P2Hooks mirrors the path, pins bundles and features, rewrites repository documents (strips p2.mirrorsURL/p2.statsURI, fixes size, relocates composite children, same-host ones outside the repository under _host/). - internal/formats, repotype Spec (NoHosted, no group), clientsetup (Tycho and Eclipse IDE snippets), migration 033_p2, openapi enums and generated files.
- docs/formats/p2.md, format index and repository docs rows. - web: FORMAT_META, director install command, example upstream, tests. - scripts/smoke/p2.sh: Tycho build against the proxy.
- New hosted-only gitlfs format: POST /objects/batch, PUT/GET/HEAD
/objects/{oid}, POST /verify under /repos/gitlfs/{name}; the locks
endpoints answer 501.
- Each object is one generic package (name = oid), so quota, trash,
cleanup, quarantine and presign apply; trash kind gitlfs_object.
- RBAC reads the batch operation: only download needs read; a 401 carries
an LFS-Authenticate challenge.
- Migration 033 (chk_repo_format + validate), typed store, clientsetup,
web format meta, install command and i18n, metrics label, openapi
enums, docs and a smoke script.
…in the format docs
One migration 033_package_formats for the new formats; the format matrix page-link regex accepts digits (p2.md).
Adds the cocoapods format (proxy only, no hosted or group repositories): CocoaPods-version.yml, all_pods.txt, sharded version lists, deprecated podspecs, immutable podspecs rewritten to point at the proxy, and source archives (http and GitHub tag/commit sources) verified against the podspec checksum. Curation filters shards and refuses podspecs and archives. Includes migration 033, clientsetup builder, web format meta and install snippet, openapi enums, fuzz targets, smoke script and docs.
- New format `cran`: CRAN layout (src/contrib, Windows/macOS binary trees, Archive) with PACKAGES, .gz and .rds rendered on the fly from live rows, ETag/304, upload by PUT with DESCRIPTION validation, delete to trash (kind cran_package), license policy, quota. - Proxy of a CRAN mirror with md5 verification and pinned source files; group merging indexes with hosted-wins. - Spec (MountIsolated), migration 033_cran, store + sqlc queries, clientsetup (options(repos=...)), presign path, metrics label, OSV ecosystem CRAN. - Web: format meta, install command, trash kind label in all locales; docs/formats/cran.md and smoke script. - Tests: pkg/cran incl. DCF/DESCRIPTION fuzz targets, hosted, proxy, group, store integration test.
Spec, upload routes, metrics label, 033 migration, typed SwiftStore and queries, trash kind, RBAC login classification, and pkg/swift (names, Accept, Link, documents, archive reading, fuzz targets).
… docs and smoke script
Merge origin/main; one 033 migration; docs counts, prefixes and upgrade notes for all six; test-only shard parser moved out of production code (deadcode); REUSE annotation for the swift archive fixture.
…rity # Conflicts: # docs/getting-started/upgrading.md
…s, smoke script fixes - dup-check: base.DeleteRelease, base.CommitBlobRow, proxy resolveDocLink and spoolUpstreamBody; pub HTTPStore embeds base.HandlerStore; gitlfs lock routes in a loop - promote: bundle item path cases for cran, gitlfs, pub and swift - smoke: p2 pins Maven 3.9 (Tycho 4.0 fails on 3.10), pub finds its cache dir, cran/swift/gitlfs install curl
…rity # Conflicts: # docs/repositories/hosted-proxy-group.md # internal/api/openapi.json.gz # internal/repotype/repotype.go
…rity # Conflicts: # internal/api/openapi.json.gz
Coverage
Go by area
Web by area (lines)
|
This was referenced Nov 27, 2026
Merged
This was referenced Dec 1, 2026
M0Rf30
pushed a commit
that referenced
this pull request
Dec 1, 2026
) The nightly ClusterFuzzLite batch has failed to build since #533 (issue #514): FuzzReadDescription passes its *testing.F to tarGz and zipOf, which took a testing.TB, and the OSS-Fuzz Go build substitutes a testing.F that lacks ArtifactDir. The helpers only call Helper and Fatal, so they take the small fataler interface the terraform tests already use for the same reason. A scan of every fuzz target finds no other testing.TB helper called with f. Co-authored-by: Areef <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
M0Rf30
pushed a commit
that referenced
this pull request
Dec 1, 2026
…nd Podfile.lock (#543) The Swift, Pub, CRAN and CocoaPods formats of #533 had no lockfile oa check could read. - Package.resolved: the registry pins (scope.name, as the registry matches them); git pins are left out. No requirers, no dev dependencies. - pubspec.lock: hosted packages; SDK, path and git ones are left out. A direct dev dependency is Dev, so --no-dev works. No requirers. - renv.lock: packages installed from a repository; GitHub, GitLab, Bioconductor, URL and local ones are left out. Requirers from Requirements (renv 1.0 and later). - Podfile.lock: by pod (a subspec is its pod, which does not require itself); pods under EXTERNAL SOURCES are left out. Requirers from PODS. --fetch requests what each client does: the Swift release list, the pub package document, and for CocoaPods CocoaPods-version.yml then the shard of each pod in the repository's own sharding. A CRAN proxy has no version list (no Versions hook), so its answers stay unknown whatever is cached: --fetch refuses an renv.lock instead of warming nothing. Fixtures, parse, reject, edge and KindOf tests, one fuzz target per lockfile; the metadata path fuzz target covers the new kinds and their /repos/<format>/ prefixes. docs/integrations/ci.md and the CLI reference updated. Co-authored-by: Areef <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
M0Rf30
pushed a commit
that referenced
this pull request
Dec 3, 2026
) The nightly ClusterFuzzLite batch still failed after #542, now with "could not find the function: func FuzzPeekOperation" (#514): build.sh deletes the files of an external test package before it builds, because the OSS-Fuzz Go build compiles test files as ordinary sources, and #533 declared FuzzPeekOperation in pkg/gitlfs/gitlfs_test.go and six targets in pkg/swift/fuzz_test.go as package gitlfs_test and swift_test. Seven of the 228 targets vanished and the first missing one aborted the batch. FuzzPeekOperation moves to pkg/gitlfs/fuzz_test.go and pkg/swift/fuzz_test.go becomes package swift (swifttest imports nothing of swift, and its TB is the small interface). tests/fuzz_targets_test.go fails on a fuzz target in an external test package, so make test catches this before the nightly run does; it reports all seven on main's tree. Co-authored-by: Areef <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Six new package formats, so every repository format of Sonatype Nexus Repository has an OpenArtifact equivalent (#522).
swift/repos/swift/REPOswift package-registry, Xcodecocoapods/repos/REPOpodpub/repos/pub/REPOdart pub,flutter pubcran/repos/cran/REPOinstall.packages(),renvgitlfs/repos/gitlfs/REPOgit lfsp2/repos/p2/REPO/Every format follows
docs/development/adding-a-format.md: arepotypeSpec, the generic package tables (no new table), aplugin.Formatregistration with its storage descriptor, client setup, web format metadata, a smoke script, a docs page and fuzz targets for the new parsers (pkg/{swift,cocoapods,pub,cran,gitlfs,p2}). One migration,033_package_formats.sql(+_validate.no_tx.sql), widenschk_repo_format.Notable behaviour:
source.httpand GitHubgit+ tag/commit sources are rewritten to download through the proxy (cached, checksums kept); other git hosts and svn/hg sources are left to the client. No hosted or group repositories.artifacts.*/composite*(xml, xz, jar) are rewritten:p2.mirrorsURLandp2.statsURIare stripped, same-host composite children are relocated inside the proxy. Bundles pass through verbatim.read, an upload batchwrite. The locks API answers501, whichgit pushtolerates.PACKAGES,.gzand.rdsare rendered from live rows with an ETag; source,Archiveand binary trees.write.Upgrade note: repositories named
cran,gitlfs,p2,puborswiftare no longer reachable by the generic URL (new format prefixes);docs/getting-started/upgrading.mdsays so.Verification
Real clients in CI:
client-matrix.ymlon this branch runsscripts/smoke/{swift,cocoapods,pub,cran,gitlfs,p2}.shagainst the built image, all six pass (run 46044866697: swift, cocoapods, pub, gitlfs; run 46046250963: p2, cran after the script fixes).Real clients against a locally running server during development:
package-registry set/login/publish,swift package resolveandswift build --targetagainst hosted, and through a group with a proxy member (behind a local TLS proxy: SwiftPM sends credentials only over https).pod repo add-cdn,pod spec cat,pod search,pod installof Alamofire (http source) and SnapKit (GitHub tag source) through a proxy of the real CDN.dart pub publishto hosted,dart pub getthrough a group (hosted + pub.dev proxy).R CMD build, upload,install.packages()of the package andgluethrough a group (hosted + CRAN proxy);PACKAGES.rdsread by R.git lfs pull(up to 200 MB), read-only token refused on upload.mvn packageof an eclipse-plugin resolving through a proxy ofdownload.eclipse.org/releases/2024-12; mirrors URL absent in served metadata.Checks on the integrated branch:
scripts/dup-check.sh(0 clone groups),go build,go vet,golangci-lint run ./...(0 issues),make deadcode,make docs-check,make generate(no drift),reuse lint,go test -short ./...,go test -tags=integration ./internal/database/... ./migrations/...(local Postgres 18), webtypecheck,bun test(2529 pass),bun run build.Closes #522