Repository navigation
build: release the C API and columnar-dbc crates with GoReleaser - #549
Conversation
7781288 to
80ee534
Compare
80ee534 to
60e48e1
Compare
60e48e1 to
324ef29
Compare
324ef29 to
646d26d
Compare
646d26d to
992be1e
Compare
992be1e to
8d24200
Compare
98244ec to
a317e41
Compare
|
@felipecrv it's not built on a manylinux container, but the shared libs do pin the lower glibc versions (2.3.2 on x86_64 and 2.17 on aarch64) which are well under 2.28 and thus would pass any manylinux check. When we add python bindings to this, we'd use manylinux for the wheel builds. We're targeting gnu.2.28 which is the same glibc 2.28 floor that manylinux_2_28 sets without needing to actually build it on the container. and yes, both claude AND codex have reviewed the scripts 😄 |
I'm always afraid of forgetting a pin somewhere and producing a binary that depends on late glibc. |
|
It's easy enough to add a check in the workflow to validate the glibc symbols, i'll do that 😄 |
…sitories Moved out of #549 for separate review: adds a Linux Package Repositories (deb/rpm) section and libdbc development library instructions to installation.md, linked from the README, and restores the columnar-dbc / columnar-dbc-sys links to that section.
…bc.pc Build Linux shared libraries with an unversioned libdbc.so SONAME alongside the existing C archives. Stage format-specific pkg-config metadata and package Debian multiarch and RPM lib64 development layouts without duplicate generated headers. Exercise installed Debian libraries from Rust in static, dynamic, and custom-directory modes, and test Fedora RPMs with static and dynamic C consumers. Publish the development packages with the existing release and blob artifacts.
Move the Rust devel-package test loop into scripts/test_devel_rust.sh and run it in the Fedora container after installing the snapshot's libdbc-devel, alongside the existing libdbc-dev run on Ubuntu.
…-dev Add installation docs for adding the columnar/dbc Cloudsmith repository (setup script or manual config) and link them from the README. The Rust crate docs and README now explain installing libdbc-dev/libdbc-devel from the repository or from GitHub Releases.
Package the capi static library for macOS (tar.gz) and Windows (zip) with libdbc.h, LICENSE, and a relocatable dbc.pc. Publish a libdbc Homebrew formula to columnar-tech/homebrew-tap with GoReleaser's brews publisher, and upload the Windows zip to Cloudsmith as a raw package through a custom publisher. DBC_SYS_LIB_DIR now accepts the zip's libdbc.lib on Windows. Restrict winget to the CLI archives. CI installs the snapshot formula from a local tap and runs the default pkg-config Rust build on macOS, and runs the Rust suite against the unpacked zip on Windows MSVC and GNU.
GoReleaser 2.19 (used by CI via "~> v2") archives the c-archive's cgo header itself, so the explicit files entry collided with it.
Go builds the macOS c-archives on Linux with GNU ar, whose members are not 8-byte aligned; Apple's arm64 linker rejects them when linking libdbc.a directly (the Homebrew formula's brew test). Rewrite them with zig ar --format=darwin in the capi post hook.
- Explain why setup-zig caching stays off (zizmor cache-poisoning, #366) and why rust_test has a 30-minute timeout. - macOS devel archive job: brew tap-new --no-git, no auto-update/cleanup. - libdbc-dev/libdbc-devel: lint-clean under lintian and rpmlint --strict. Section libdevel, copyright/LICENSE, synopsis + extended description, libc dependency, ldconfig trigger, a changelog, stripped libdbc.so (--strip-all), pkgconfig(dbc) provides, 0755 .so on rpm. Intentional findings (unversioned SONAME, GoReleaser's fixed 0755 artifact mode) are overridden in the package / rpmlintrc. - New scripts/lint_devel_packages.sh, run by the devel packages job.
Per review: the installation.md section and README link are reviewed separately, in the docs PR stacked on this one.
The Zig targets set the glibc floor, but nothing checked the result: a cgo or Zig change pulling in a newer symbol would have shipped. A post hook on the capi and capi-shared builds runs scripts/check_glibc_floor.py on each Linux library before anything is packaged or published. A shared library's required versions are read with readelf; a static archive, which records none, is linked whole against Zig's glibc 2.28 stubs, then checked the same way.
…sitories Moved out of #549 for separate review: adds a Linux Package Repositories (deb/rpm) section and libdbc development library instructions to installation.md, linked from the README, and restores the columnar-dbc / columnar-dbc-sys links to that section.
611c20d to
5c6d5d0
Compare
…sitories Moved out of #549 for separate review: adds a Linux Package Repositories (deb/rpm) section and libdbc development library instructions to installation.md, linked from the README, and restores the columnar-dbc / columnar-dbc-sys links to that section.
… support (#551) Stacked on #549. Brings the language bindings up to the CLI's registry and auth handling. Goes through `internal/api` → C ABI → Rust → npm-wasm. ### Registries - Explicit registry list: `registries: [{url, name}]` (C: `registry.<n>.url` / `registry.<n>.name`) → `dbc.WithRegistries`. It is used as given, with no merging. - **Behaviour change:** bindings now honor the user's global `config.toml` by default, like the CLI. `registryConfig: "none"` (C: `registry_config=none`) opts out. In the browser it is always `none`. - Project registries: `projectFile` (C: `project_file`) → the `registries` / `replace_defaults` keys from a `dbc.toml`. - `baseURL` or an explicit list overrides all configuration files, as `DBC_BASE_URL` does for the CLI. ### Credentials - `login(credential)` / `logout(registryURL)` (C: `dbc_login`, `dbc_logout`) store or remove token credentials in dbc's credential store. - An injected `credential` now applies only to its own host; other hosts fall back to stored credentials, matching what the header already documented. `credentialStore: "none"` (C: `credential_store=none`) disables stored-credential lookup. - `auth.AddCredential`/`RemoveCredential` re-read the credentials file before writing. Without this, a stale snapshot held by another worker or process dropped other entries on write. Test included. ### License - `licensePath()` / `installLicense(path, {force})` (C: `dbc_license_path`, `dbc_install_license` + `DBC_LICENSE_FORCE`). The C ABI goes from 13 to 17 exports; Rust bindings are regenerated. Node/Rust docs note that credential lookups in an already-running runtime don't see changes another runtime makes. ### Testing Go (including `-race ./auth`), npm-wasm smoke and worker tests, Rust tests and clippy, bindgen drift check, and a throwaway C ABI smoke run against a local registry with an isolated credential store. --------- Co-authored-by: Bryce Mecum <[email protected]>
.goreleaser.yamlgains acapic-archive build that cross-compiles all 5 targets with Zig 0.17.0 (glibc 2.28 / macOS 12 floors).scripts/stage_capi.pychecks size and stages each archive;scripts/publish_crates.pyrunscargo package(snapshot) orcargo publish(onv*tag pushes, from theproduction_deployGoReleaser run). Publishing skips crate versions already on crates.io, so re-running a partially published release finishes the rest.ids: [dbc]filters keep the archives out of the CLI packaging.rust_testjob runs on the snapshot's archives on six native runners (Linux x64/arm64, macOS arm64/x64, Windows MSVC and GNU), with a 30-minute timeout.CARGO_REGISTRY_TOKENsecret in theproductionenvironment (see RELEASE.md).Stacked on #548. Supersedes #543.
libdbc-dev / libdbc-devel
capi-sharedbuild (linux amd64/arm64, SONAMElibdbc.so).libdbc-dev(/usr/lib/<triplet>) and rpmlibdbc-devel(/usr/lib64). Each shipslibdbc.a,libdbc.so,/usr/include/libdbc.handpkgconfig/dbc.pc.scripts/stage_devel.pystages the.soand.pcfiles.libdbc.hand GoReleaser doesn't deduplicate.release,blobs, and Cloudsmith (columnar/dbc, alongside the CLI packages; stable releases only).New CI job
devel packages(amd64 + arm64):.deb;ldd), withDBC_DYNAMIC, and withDBC_SYS_LIB_DIR(scripts/test_devel_rust.sh);.rpmin a Fedora container, runs the same Rust tests against it, and compiles and runs a C smoke program, statically and dynamically.Docs
docs/getting_started/installation.mdgains a "Linux Package Repositories (deb/rpm)" section: adding the Cloudsmithcolumnar/dbcapt/dnf repo (setup script or manual config), installingdbc/libdbc-dev/libdbc-devel, or installing a file from GitHub Releases. Linked from the README.columnar-dbc/columnar-dbc-sysrustdoc and crate README explain installing the dev package from the repo or from GitHub Releases, with links to the repo, releases, and install docs.macOS / Windows static libdbc-dev
libdbc-devarchive from thecapibuild:libdbc-dev_<v>_darwin_{amd64,arm64}.tar.gzandlibdbc-dev_<v>_windows_amd64.zipwithlibdbc.a(libdbc.libon Windows),libdbc.h,LICENSE, and a relocatabledbc.pc(prefix=${pcfiledir}). Attached to the release and the bucket.libdbcHomebrew formula via GoReleaserbrews→columnar-tech/homebrew-tap(brew install columnar-tech/tap/libdbc).brewsis deprecated in favor of casks, but casks can't install intolib//include/, so a formula is the only option for a library.libdbc-dev-windows-x64via acloudsmith-rawcustom publisher (scripts/publish_cloudsmith_raw.py); thecloudsmithspipe only handles deb/rpm/apk. Stable releases only.DBC_SYS_LIB_DIRacceptslibdbc.libon Windows. winget is now restricted to the CLI archives (it otherwise skips with "multiple archives for the same platform").devel archive: on macOS arm64/x64 installs the snapshot formula from a local tap, runsbrew test, and runs the Rust suite with the default pkg-config build; on Windows MSVC/GNU runs the Rust suite against the unpacked zip withDBC_SYS_LIB_DIR.