Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ jobs:
- name: Install LLVM
run: sudo apt-get install -y llvm

- name: Install ODBC
run: sudo apt-get install -y unixodbc-dev

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

Expand Down
23 changes: 2 additions & 21 deletions .github/workflows/release-jupyter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,10 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --auditwheel=repair
args: --release --out dist --auditwheel=skip
working-directory: ggsql-jupyter
manylinux: 2_28
docker-options: -e GGSQL_SKIP_GENERATE=1
before-script-linux: |
if command -v yum >/dev/null 2>&1; then
yum install -y unixODBC-devel
elif command -v apt-get >/dev/null 2>&1; then
apt-get update && apt-get install -y unixodbc-dev
fi

- name: Fix wheel library load paths
uses: ./.github/workflows/actions/fix-wheel-libs
with:
dist-dir: ggsql-jupyter/dist

- uses: actions/upload-artifact@v4
with:
Expand All @@ -96,21 +85,13 @@ jobs:
name: tree-sitter-generated
path: tree-sitter-ggsql/src/

- name: Install ODBC
run: brew install unixodbc

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --auditwheel=repair
args: --release --out dist --auditwheel=skip
working-directory: ggsql-jupyter

- name: Fix wheel library load paths
uses: ./.github/workflows/actions/fix-wheel-libs
with:
dist-dir: ggsql-jupyter/dist

- uses: actions/upload-artifact@v4
with:
name: jupyter-wheels-macos-${{ matrix.target }}
Expand Down
56 changes: 8 additions & 48 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ jobs:
- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli

- name: Install ODBC
run: brew install unixodbc

- name: Install dylibbundler
run: brew install dylibbundler

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -148,19 +142,10 @@ jobs:
- name: Build ggsql binary (x86_64)
run: cargo build --release --bin ggsql --bin ggsql-jupyter

- name: Bundle dynamic library dependencies
run: |
dylibbundler -cd -of -b -x target/release/ggsql -d ./libs/ -p "@executable_path/../lib/ggsql$VERSION/"
dylibbundler -cd -of -b -x target/release/ggsql-jupyter -d ./libs/ -p "@executable_path/../lib/ggsql$VERSION/"

- name: Sign binaries and dylibs (Developer ID Application)
- name: Sign binaries (Developer ID Application)
env:
SIGN_ID: "Developer ID Application: ${{ secrets.GWS_APPLE_SIGN_IDENTITY }}"
run: |
# Sign bundled dylibs first (inside-out), replacing dylibbundler's ad-hoc sigs
find ./libs -type f \( -name "*.dylib" -o -name "*.so" \) -print0 | \
xargs -0 -I{} codesign --force --options runtime --timestamp --sign "$SIGN_ID" "{}"
# Then sign the executables with hardened runtime + entitlements
codesign --force --options runtime --timestamp \
--entitlements entitlements.plist \
--sign "$SIGN_ID" target/release/ggsql
Expand All @@ -177,14 +162,13 @@ jobs:
APPLE_API_ISSUER: ${{ secrets.GWS_APPLE_API_ISSUER }}
run: |
PKG_NAME="ggsql_${VERSION}_x86_64.pkg"
mkdir -p pkg-payload/usr/local/bin "pkg-payload/usr/local/lib/ggsql$VERSION"
mkdir -p pkg-payload/usr/local/bin
cp target/release/ggsql pkg-payload/usr/local/bin/
cp target/release/ggsql-jupyter pkg-payload/usr/local/bin/
cp -R ./libs/. "pkg-payload/usr/local/lib/ggsql$VERSION/"
mkdir -p pkg-scripts
cat > pkg-scripts/postinstall <<EOF
#!/bin/sh
mkdir -p /usr/local/bin /usr/local/lib/ggsql$VERSION
mkdir -p /usr/local/bin
EOF
chmod 755 pkg-scripts/postinstall
pkgbuild \
Expand Down Expand Up @@ -225,12 +209,6 @@ jobs:
- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli

- name: Install ODBC
run: brew install unixodbc

- name: Install dylibbundler
run: brew install dylibbundler

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -271,19 +249,10 @@ jobs:
- name: Build ggsql binary (aarch64)
run: cargo build --release --bin ggsql --bin ggsql-jupyter

- name: Bundle dynamic library dependencies
run: |
dylibbundler -cd -of -b -x target/release/ggsql -d ./libs/ -p "@executable_path/../lib/ggsql$VERSION/"
dylibbundler -cd -of -b -x target/release/ggsql-jupyter -d ./libs/ -p "@executable_path/../lib/ggsql$VERSION/"

- name: Sign binaries and dylibs (Developer ID Application)
- name: Sign binaries (Developer ID Application)
env:
SIGN_ID: "Developer ID Application: ${{ secrets.GWS_APPLE_SIGN_IDENTITY }}"
run: |
# Sign bundled dylibs first (inside-out), replacing dylibbundler's ad-hoc sigs
find ./libs -type f \( -name "*.dylib" -o -name "*.so" \) -print0 | \
xargs -0 -I{} codesign --force --options runtime --timestamp --sign "$SIGN_ID" "{}"
# Then sign the executables with hardened runtime + entitlements
codesign --force --options runtime --timestamp \
--entitlements entitlements.plist \
--sign "$SIGN_ID" target/release/ggsql
Expand All @@ -300,14 +269,13 @@ jobs:
APPLE_API_ISSUER: ${{ secrets.GWS_APPLE_API_ISSUER }}
run: |
PKG_NAME="ggsql_${VERSION}_aarch64.pkg"
mkdir -p pkg-payload/usr/local/bin "pkg-payload/usr/local/lib/ggsql$VERSION"
mkdir -p pkg-payload/usr/local/bin
cp target/release/ggsql pkg-payload/usr/local/bin/
cp target/release/ggsql-jupyter pkg-payload/usr/local/bin/
cp -R ./libs/. "pkg-payload/usr/local/lib/ggsql$VERSION/"
mkdir -p pkg-scripts
cat > pkg-scripts/postinstall <<EOF
#!/bin/sh
mkdir -p /usr/local/bin /usr/local/lib/ggsql$VERSION
mkdir -p /usr/local/bin
EOF
chmod 755 pkg-scripts/postinstall
pkgbuild \
Expand Down Expand Up @@ -361,8 +329,7 @@ jobs:
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
unixodbc-dev
patchelf

- name: Install cargo-packager
run: cargo install cargo-packager --locked
Expand Down Expand Up @@ -409,18 +376,14 @@ jobs:
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
unixodbc-dev
patchelf

- name: Install cargo-packager
run: cargo install cargo-packager --locked

- name: Build ggsql binary (aarch64)
run: cargo build --release --bin ggsql --bin ggsql-jupyter

- name: Make empty libs dir for bundling
run: mkdir -p libs

- name: Build Debian package (aarch64)
run: cargo packager --release --formats deb

Expand Down Expand Up @@ -451,9 +414,6 @@ jobs:
- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli

- name: Install ODBC
run: sudo apt-get install -y unixodbc-dev

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## [Unreleased]

### Changed

- Restructured how ggsql integrates with ODBC drivers to use system ODBC,
rather than bundling unixodbc as part of binary releases. This fixes several
issues on Linux and macOS caused by using relative paths to dynamic libraries.

## 0.3.1 - 2026-04-30

### Fixed
Expand Down
37 changes: 11 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ bytes = "1"
rusqlite = { version = "0.38", features = ["bundled", "chrono"] }

# ODBC
odbc-api = { version = "13", default-features = false, features = ["odbc_version_3_80"] }
toml_edit = "0.22"
libloading = "0.8"

# Serialization
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 0 additions & 2 deletions ggsql-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,3 @@ binaries = [
{ path = "ggsql-jupyter", main = false },
]

# Resources to bundle (optional)
resources = [{ src = "../libs/", target = "libs" }]
Loading
Loading