-
Notifications
You must be signed in to change notification settings - Fork 84
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
Building from the releases tab fails due to lack of repository information (vergen fails to find repository) #247
Comments
@chramb we are new to packaging up rust projects. do you have advice here or perhaps could submit a PR? |
I wouldn't say there's a single standard on this. This is a highly complex topic. In most other projects I've seen, there's a best effort made to use git checkout if available, but otherwise fall back to nothing, i.e. don't just fail the build if not from git. In practice, most systems that build from tarballs are dpkg/rpm, which today have their own concept of versions and source metadata. IOW, people creating debs/rpms and the like are highly likely to use e.g Now, I am also personally strongly of the opinion that debs/rpms using tarballs by default is just a legacy holdover, and the opinionated default should actually be to build from git checkouts. But...that's a whole other battle. I think the most robust thing is to inject a version stamp file into the source tarball, and use that. Now, when |
I think the inbuilt vendor dir in |
IMO the only thing we have to do, is to make it not fail and show an empty commit string in the version output. |
@baude unfortunatelly I don't know much more than simple Hello World in rust. I came across this issue while packaging Netavark for Gentoo. So far I solved it by disabling the I think the most correct solution would be to somehow make If not, replacing that variable by something like |
We only need the version, build time, rust target triple, and git commit for the version command. Only of these values can easly generated with little code so we do not need an extra dependency for this. The main reason for this change is that vergen will fail if no git commit is found. This is a problem because on distro build systems this is often the case. Instead of erroring we should just show an empty commit in the version output. Fixes containers#247 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
We only need the version, build time, rust target triple, and git commit for the version command. These values can easly generated with little code so we do not need an extra dependency for this. The main reason for this change is that vergen will fail if no git commit is found. On distro build systems this is often the case since they build from a source tar without the git repo. Instead of erroring we should just show an empty commit in the version output. Fixes containers#247 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
We only need the version, build time, rust target triple, and git commit for the version command. These values can easily be generated with little code so we do not need an extra dependency for this. The main reason for this change is that vergen will fail if no git commit is found. On distro build systems this is often the case since they build from a source tar without the git repo. Instead of erroring we should just show an empty commit in the version output. Fixes containers#247 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
PR #254 should fix this, I will make the same change for aardvark. |
We only need the version, build time, rust target triple, and git commit for the version command. These values can easily be generated with little code so we do not need an extra dependency for this. The main reason for this change is that vergen will fail if no git commit is found. On distro build systems this is often the case since they build from a source tar without the git repo. Instead of erroring we should just show an empty commit in the version output. Fixes containers#247 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Backport commit bdaef37. We only need the version, build time, rust target triple, and git commit for the version command. These values can easily be generated with little code so we do not need an extra dependency for this. The main reason for this change is that vergen will fail if no git commit is found. On distro build systems this is often the case since they build from a source tar without the git repo. Instead of erroring we should just show an empty commit in the version output. Fixes containers#247 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Backport commit bdaef37. We only need the version, build time, rust target triple, and git commit for the version command. These values can easily be generated with little code so we do not need an extra dependency for this. The main reason for this change is that vergen will fail if no git commit is found. On distro build systems this is often the case since they build from a source tar without the git repo. Instead of erroring we should just show an empty commit in the version output. Fixes containers#247 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Summary
Hello, I'd like to report an issue that comes up when attempting to build netavark from source shared in the releases page.
Because the source code in the archives don't contain git files, vergen fails to find the repository-related information and halts the build.
Steps to reproduce
make
orcargo build
Error message
Temporary solution
by removing "git" from list of vergen features in
Cargo.toml
and manually settingVERGEN_GIT_SHA
environment variable I was able to build it successfully.Result
The text was updated successfully, but these errors were encountered: