Skip to content

feat(nix): Default to release build #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2025
Merged

Conversation

NickLarsenNZ
Copy link
Member

@NickLarsenNZ NickLarsenNZ commented Jun 13, 2025

This doesn't necessarily fix #385, but it does stop the crash (as tested).

Default nix builds to the release profile.

It can be disabled like so:

stackablectl = (import
    (pkgs.fetchFromGitHub {
      owner = "stackabletech";
      repo = "stackable-cockpit";
      rev = "stackablectl-1.0.x";
      hash = "...";
    })
    # 👇 see here
    { release = true; }).cargo.workspaceMembers.stackablectl.build.override;

@NickLarsenNZ NickLarsenNZ requested review from Techassi and nightkr June 13, 2025 09:38
@NickLarsenNZ
Copy link
Member Author

NickLarsenNZ commented Jun 13, 2025

Release build

nix-build . -A cargo.workspaceMembers.stackablectl.build
❯ file /nix/store/qmsggw88mf11pbj7z8pj1fcim0al9z5p-rust_stackablectl-1.0.0/bin/stackablectl
/nix/store/qmsggw88mf11pbj7z8pj1fcim0al9z5p-rust_stackablectl-1.0.0/bin/stackablectl: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/cg9s562sa33k78m63njfn1rw47dp9z0i-glibc-2.40-66/lib/ld-linux-x86-64.so.2, for GNU/Linux 3.10.0, Go BuildID=OCaTAlpqK7a_3HhNc-U8/wCsI3slHqcMnUoozAgdy/BY6Klr1a4UGYV30c6DI4/pYC8ZwbRwmaQVzu8ujZE, not stripped
nix-build . -A cargo.workspaceMembers.stackablectl.build --arg release true
❯ file /nix/store/qmsggw88mf11pbj7z8pj1fcim0al9z5p-rust_stackablectl-1.0.0/bin/stackablectl
/nix/store/qmsggw88mf11pbj7z8pj1fcim0al9z5p-rust_stackablectl-1.0.0/bin/stackablectl: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/cg9s562sa33k78m63njfn1rw47dp9z0i-glibc-2.40-66/lib/ld-linux-x86-64.so.2, for GNU/Linux 3.10.0, Go BuildID=OCaTAlpqK7a_3HhNc-U8/wCsI3slHqcMnUoozAgdy/BY6Klr1a4UGYV30c6DI4/pYC8ZwbRwmaQVzu8ujZE, not stripped

Debug build

nix-build . -A cargo.workspaceMembers.stackablectl.build --arg release false
❯ file /nix/store/fl4xk2bczg8znbjlpvdpp9501krbql33-rust_stackablectl-1.0.0/bin/stackablectl
/nix/store/fl4xk2bczg8znbjlpvdpp9501krbql33-rust_stackablectl-1.0.0/bin/stackablectl: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/cg9s562sa33k78m63njfn1rw47dp9z0i-glibc-2.40-66/lib/ld-linux-x86-64.so.2, for GNU/Linux 3.10.0, Go BuildID=OCaTAlpqK7a_3HhNc-U8/wCsI3slHqcMnUoozAgdy/BY6Klr1a4UGYV30c6DI4/pYC8ZwbRwmaQVzu8ujZE, with debug_info, not stripped

@NickLarsenNZ NickLarsenNZ moved this to Development: Waiting for Review in Stackable Engineering Jun 13, 2025
Techassi
Techassi previously approved these changes Jun 13, 2025
@Techassi Techassi moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Jun 13, 2025
@NickLarsenNZ NickLarsenNZ added this pull request to the merge queue Jun 13, 2025
@NickLarsenNZ NickLarsenNZ moved this from Development: In Review to Development: Done in Stackable Engineering Jun 13, 2025
Merged via the queue into main with commit e645c5c Jun 13, 2025
12 checks passed
@NickLarsenNZ NickLarsenNZ deleted the feat/default-to-release-build branch June 13, 2025 10:08
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Jun 13, 2025
@nightkr
Copy link
Member

nightkr commented Jun 13, 2025

Not really a fix to the issue at hand, but LGTM besides that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

stackablectl release install panics
3 participants