Skip to content
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

rqlite: full version is missing #203123

Closed
4 tasks done
condemil opened this issue Jan 3, 2025 · 2 comments · Fixed by #203135
Closed
4 tasks done

rqlite: full version is missing #203123

condemil opened this issue Jan 3, 2025 · 2 comments · Fixed by #203135
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@condemil
Copy link
Contributor

condemil commented Jan 3, 2025

brew gist-logs <formula> link OR brew config AND brew doctor output

HOMEBREW_VERSION: 4.4.14-10-geac5720
ORIGIN: https://github.com/Homebrew/brew
HEAD: eac5720d44457fcfcb24b325bde3a70fce41ac15
Last commit: 4 days ago
Branch: master
Core tap JSON: 03 Jan 16:09 UTC
Core cask tap JSON: 03 Jan 16:09 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_AUTO_UPDATE_SECS: 604800
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: nvim
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_NO_ENV_HINTS: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.6 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby
CPU: octa-core 64-bit arm_ibiza
Clang: 16.0.0 build 1600
Git: 2.39.5 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.1.1-arm64
CLT: 16.1.0.0.1.1729049160
Xcode: 16.2
Rosetta 2: false

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

For now rqlited -version and rqlite -v gives version 8.
Platform: macOS arm64, installed via homebrew

What happened (include all command output)?

Current output:

$ rqlite -v
Version 8, commit unknown, branch unknown, built on unknown

$ rqlited -version
rqlited 8 darwin arm64 go1.23.4 sqlite3.46.1 (commit unknown, branch unknown, compiler gc)

$ rqlited /tmp/rqlite
...
[rqlited] 2025/01/03 19:09:34 rqlited starting, version 8, SQLite 3.46.1, commit unknown, branch unknown, compiler (toolchain) gc, compiler (command) unknown
...

What did you expect to happen?

Output a full version, like 8.36.3

Step-by-step reproduction instructions (by running brew commands)

brew install rqlite

rqlite -v

rqlited -version

rqlited /tmp/rqlite
@condemil condemil added the bug Reproducible Homebrew/homebrew-core bug label Jan 3, 2025
@otoolep
Copy link
Contributor

otoolep commented Jan 3, 2025

This should be easy to fix (I guess). It would require a change to https://github.com/Homebrew/homebrew-core/blob/master/Formula/r/rqlite.rb such that the commit, branch, and version were passed to the build command.

You need to add:

-X github.com/rqlite/rqlite/v8/cmd.CompilerCommand=gcc -X github.com/rqlite/rqlite/v8/cmd.Version=$VERSION -X github.com/rqlite/rqlite/v8/cmd.Branch=master -X github.com/rqlite/rqlite/v8/cmd.Commit=$commit -X github.com/rqlite/rqlite/v8/cmd.Buildtime=$buildtime

to the existing ldflags. $commit should be the git commit has, and $VERSION should be the version e.g. v8.36.0. $buildtime would be current timestamp.

@otoolep
Copy link
Contributor

otoolep commented Jan 3, 2025

For reference you can see how rqlite does it official builds, and set those linker flags, here: https://github.com/rqlite/rqlite/blob/master/.github/workflows/build.sh#L61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants