Release builds for Linux, macOS and Windows 25c6adfaa559
scripts/dist.sh cross-compiles oxy from Linux: with zig for Linux x86_64 and arm64 against glibc 2.28 (Debian 10, Ubuntu 20.04 and later) and for macOS x86_64 and arm64 without Apple's SDK, and with MinGW-w64 for Windows x86_64. It makes stripped .tar.gz archives (.zip for Windows) with the README and LICENSE, .deb packages for amd64 and arm64, and SHA256SUMS. The README says how to install each. The licence (MIT or Apache-2.0) is now in LICENSE. closes #45
- Author
- Andy McCall @andymccall <[email protected]>
- When
- · 2026-09-30 18:52 UTC
- Signature
- ✔ signed by Andy McCall
- Hash
25c6adfaa5593fb99e55ae22f5a69f93b7f092ec04953d4cff85175009d46177- Depends on
- 648724d8e0de d02e545dc265
- Depended on by
- e980087ed0b1 045340293dc7 7f617ee9b3ad e4595038502a 8177f8177a07 99cdbaeea274 b66a5c47cc61 1931724b1d6b 0a45ba84393a
- In bookmarks
- agents-in-readme bare-hashes carried-not-removed carry-identical doctor-trust identical-sides keyless-tags main merge-remote-bookmark only-help-103 paths-for-resolutions-and-amend push-notes show-stat subrepo-pin-state switch-says
- In tags
- v0.1.0 v0.10.0 v0.11.0 v0.2.0 v0.3.0 v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.4.3 v0.4.4 v0.4.5 v0.4.6 v0.5.0 v0.5.1 v0.6.0 v0.7.0 v0.8.0 v0.9.0
- Edits
- 5 atoms, 3 tree operations, 3 files
Browse the tree at this change
added LICENSE +30 −0
| 1 | + | Oxygen (oxy, oxy-core and oxy-server) is licensed under either of |
|
| 2 | + | ||
| 3 | + | * the MIT License (below), or |
|
| 4 | + | * the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0) |
|
| 5 | + | ||
| 6 | + | at your option. |
|
| 7 | + | ||
| 8 | + | --- |
|
| 9 | + | ||
| 10 | + | MIT License |
|
| 11 | + | ||
| 12 | + | Copyright (c) 2026 Andy McCall |
|
| 13 | + | ||
| 14 | + | Permission is hereby granted, free of charge, to any person obtaining a copy |
|
| 15 | + | of this software and associated documentation files (the "Software"), to deal |
|
| 16 | + | in the Software without restriction, including without limitation the rights |
|
| 17 | + | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
| 18 | + | copies of the Software, and to permit persons to whom the Software is |
|
| 19 | + | furnished to do so, subject to the following conditions: |
|
| 20 | + | ||
| 21 | + | The above copyright notice and this permission notice shall be included in all |
|
| 22 | + | copies or substantial portions of the Software. |
|
| 23 | + | ||
| 24 | + | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 25 | + | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 26 | + | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
| 27 | + | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 28 | + | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
| 29 | + | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
| 30 | + | SOFTWARE. |
added scripts/dist.sh +96 −0
| 1 | + | #!/usr/bin/env bash |
|
| 2 | + | # Build release archives of one binary for every platform from Linux: |
|
| 3 | + | # Linux x86_64 and arm64 (glibc 2.28 and later): .tar.gz and .deb |
|
| 4 | + | # macOS x86_64 and arm64: .tar.gz |
|
| 5 | + | # Windows x86_64: .zip |
|
| 6 | + | # plus SHA256SUMS, in target/dist/VERSION. |
|
| 7 | + | # |
|
| 8 | + | # scripts/dist.sh [VERSION] (default: the package version) |
|
| 9 | + | # |
|
| 10 | + | # Needs: rustup targets x86_64-pc-windows-gnu, aarch64-unknown-linux-gnu, |
|
| 11 | + | # x86_64-apple-darwin and aarch64-apple-darwin; cargo-zigbuild and zig on |
|
| 12 | + | # PATH (Linux with an old glibc, and macOS without Apple's SDK); the |
|
| 13 | + | # MinGW-w64 gcc (Windows); dpkg-deb and zip. |
|
| 14 | + | set -euo pipefail |
|
| 15 | + | ||
| 16 | + | PKG=oxy # the cargo package |
|
| 17 | + | BIN=oxy # the binary it builds |
|
| 18 | + | DEB_NAME=oxy # the Debian package |
|
| 19 | + | SUMMARY="Oxygen version control: a distributed, commutative VCS" |
|
| 20 | + | DESCRIPTION="Oxygen is a version control system in which changes commute: a |
|
| 21 | + | state is a set of changes, merges need no merge commits, conflicts are |
|
| 22 | + | recorded and resolved like any other change, and every change is signed |
|
| 23 | + | by its author." |
|
| 24 | + | HOMEPAGE="https://oxygenhub.io/andymccall/oxygen" |
|
| 25 | + | MAINTAINER="Andy McCall <[email protected]>" |
|
| 26 | + | DOCS=(README.md LICENSE) |
|
| 27 | + | ||
| 28 | + | cd "$(dirname "$0")/.." |
|
| 29 | + | VERSION="${1:-$(cargo metadata --no-deps --format-version 1 | python3 -c "import json,sys; print(next(p['version'] for p in json.load(sys.stdin)['packages'] if p['name']=='$PKG'))")}" |
|
| 30 | + | VERSION="${VERSION#v}" |
|
| 31 | + | OUT="target/dist/$VERSION" |
|
| 32 | + | rm -rf "$OUT" && mkdir -p "$OUT" |
|
| 33 | + | export PATH="$HOME/.local/opt/zig:$PATH" |
|
| 34 | + | # Stripped, with no debug info: these are for people, not for debugging. |
|
| 35 | + | export CARGO_PROFILE_RELEASE_DEBUG=0 CARGO_PROFILE_RELEASE_STRIP=true CARGO_INCREMENTAL=0 |
|
| 36 | + | # The version the binary reports. |
|
| 37 | + | export OXY_BUILD="v$VERSION" |
|
| 38 | + | ||
| 39 | + | # target triple | platform name | build tool | Debian architecture |
|
| 40 | + | PLATFORMS=( |
|
| 41 | + | "x86_64-unknown-linux-gnu.2.28|linux-x86_64|zig|amd64" |
|
| 42 | + | "aarch64-unknown-linux-gnu.2.28|linux-arm64|zig|arm64" |
|
| 43 | + | "x86_64-apple-darwin|macos-x86_64|zig|" |
|
| 44 | + | "aarch64-apple-darwin|macos-arm64|zig|" |
|
| 45 | + | "x86_64-pc-windows-gnu|windows-x86_64|cargo|" |
|
| 46 | + | ) |
|
| 47 | + | ||
| 48 | + | for p in "${PLATFORMS[@]}"; do |
|
| 49 | + | IFS='|' read -r target platform tool deb <<<"$p" |
|
| 50 | + | triple="${target%%.2.*}" |
|
| 51 | + | echo "== $platform ($target)" |
|
| 52 | + | if [ "$tool" = zig ]; then |
|
| 53 | + | cargo zigbuild -q --release --locked --target "$target" -p "$PKG" |
|
| 54 | + | else |
|
| 55 | + | cargo build -q --release --locked --target "$target" -p "$PKG" |
|
| 56 | + | fi |
|
| 57 | + | exe="$BIN" |
|
| 58 | + | [[ "$triple" == *windows* ]] && exe="$BIN.exe" |
|
| 59 | + | built="target/$triple/release/$exe" |
|
| 60 | + | name="$BIN-$VERSION-$platform" |
|
| 61 | + | stage="$OUT/stage/$name" |
|
| 62 | + | mkdir -p "$stage" |
|
| 63 | + | cp "$built" "$stage/" |
|
| 64 | + | cp "${DOCS[@]}" "$stage/" |
|
| 65 | + | if [[ "$triple" == *windows* ]]; then |
|
| 66 | + | (cd "$OUT/stage" && zip -qr "../$name.zip" "$name") |
|
| 67 | + | else |
|
| 68 | + | tar -C "$OUT/stage" -czf "$OUT/$name.tar.gz" "$name" |
|
| 69 | + | fi |
|
| 70 | + | if [ -n "$deb" ]; then |
|
| 71 | + | root="$OUT/stage/deb-$deb" |
|
| 72 | + | mkdir -p "$root/DEBIAN" "$root/usr/bin" "$root/usr/share/doc/$DEB_NAME" |
|
| 73 | + | install -m 0755 "$built" "$root/usr/bin/$BIN" |
|
| 74 | + | cp README.md "$root/usr/share/doc/$DEB_NAME/" |
|
| 75 | + | cp LICENSE "$root/usr/share/doc/$DEB_NAME/copyright" |
|
| 76 | + | cat >"$root/DEBIAN/control" <<EOF |
|
| 77 | + | Package: $DEB_NAME |
|
| 78 | + | Version: $VERSION |
|
| 79 | + | Architecture: $deb |
|
| 80 | + | Maintainer: $MAINTAINER |
|
| 81 | + | Depends: libc6 (>= 2.28) |
|
| 82 | + | Section: vcs |
|
| 83 | + | Priority: optional |
|
| 84 | + | Homepage: $HOMEPAGE |
|
| 85 | + | Installed-Size: $(du -sk "$root/usr" | cut -f1) |
|
| 86 | + | Description: $SUMMARY |
|
| 87 | + | $DESCRIPTION |
|
| 88 | + | EOF |
|
| 89 | + | dpkg-deb --build --root-owner-group -Zxz "$root" "$OUT/${DEB_NAME}_${VERSION}_$deb.deb" >/dev/null |
|
| 90 | + | fi |
|
| 91 | + | done |
|
| 92 | + | ||
| 93 | + | rm -rf "$OUT/stage" |
|
| 94 | + | (cd "$OUT" && sha256sum -- *.tar.gz *.zip *.deb >SHA256SUMS) |
|
| 95 | + | echo "== $OUT" |
|
| 96 | + | ls -l "$OUT" |
modified README.md +14 −1
| … | 18 unchanged lines |
||
| 19 | 19 | ||
| 20 | 20 | Not yet: checkpoints for very long histories, history editing (`rebase`, `split`, `edit`), multiple workspaces, garbage collection with retention, and the Thin client profile for constrained machines. |
|
| 21 | 21 | ||
| 22 | + | ## Install |
|
| 23 | + | ||
| 24 | + | Builds for Linux, macOS and Windows are on the [releases page](https://oxygenhub.io/andymccall/oxygen/releases). These are early releases: the macOS and Windows builds are not signed and have had little testing. |
|
| 25 | + | ||
| 26 | + | - **Debian, Ubuntu and other Linux with apt** (x86_64 or arm64): download `oxy_VERSION_amd64.deb` (or `_arm64.deb`) and run `sudo apt install ./oxy_VERSION_amd64.deb`. It needs glibc 2.28 or later (Debian 10, Ubuntu 20.04 and newer). |
|
| 27 | + | - **Other Linux:** unpack `oxy-VERSION-linux-x86_64.tar.gz` (or `-linux-arm64`) and put `oxy` on your `PATH`. |
|
| 28 | + | - **macOS** (Apple Silicon or Intel): unpack `oxy-VERSION-macos-arm64.tar.gz` (or `-macos-x86_64`), then `xattr -d com.apple.quarantine oxy`, since the build is not notarised, and put it on your `PATH`. |
|
| 29 | + | - **Windows:** unzip `oxy-VERSION-windows-x86_64.zip` and put the folder on your `PATH`. SmartScreen may warn on first run, since the build is not signed. |
|
| 30 | + | ||
| 31 | + | `oh`, the OxygenHub command line, is released the same way from [OxygenHub's releases](https://oxygenhub.io/andymccall/oxygenhub/releases). |
|
| 32 | + | ||
| 33 | + | Check a download against the release's `SHA256SUMS` with `sha256sum -c SHA256SUMS --ignore-missing`. |
|
| 34 | + | ||
| 22 | 35 | ## Building |
|
| 23 | 36 | ||
| 24 | 37 | ``` |
|
| … | 44 unchanged lines |
||
| 69 | 82 | ||
| 70 | 83 | ## Licence |
|
| 71 | 84 | ||
| 72 | - | MIT or Apache-2.0, at your option. |
|
| 85 | + | MIT or Apache-2.0, at your option (see `LICENSE`). |