-
Notifications
You must be signed in to change notification settings - Fork 214
Add build/pkg-install.sh. #196
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
base: master
Are you sure you want to change the base?
Conversation
|
To give it a shot execute following commands Examine /tmp/foo tree structure and cleanup as deemed appropriate. |
c298f1e to
e2356ae
Compare
e2356ae to
958b46f
Compare
|
Bumped into this when porting libblst to FreeBSD. For now I just added my own |
| git clone ${SRC:-"https://github.com/supranational/blst"} blst.$$ | ||
| ( trap '[ $? -ne 0 ] && rm "${DST}/blst.pc" 2>/dev/null' 0 | ||
| cd blst.$$ | ||
| tag=`git tag --sort=v:refname | tail -1` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git tag version is currently v0.3.16 and the leading v messes up version comparisons.
I had to modify that line to:
tag=`git tag --sort=v:refname | tail -1 | sed "s/^v//"`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the next line. I've pushed a fixup...
|
So glad to have found this. Saved me at least half an hour. |
Compile latest release tag and install it as pkg-config package.
20fd7bd to
cba6f0a
Compare
| cd ${TMPDIR:-/tmp} | ||
|
|
||
| trap 'rm -rf blst.$$' 0 | ||
| git clone ${SRC:-"https://github.com/supranational/blst"} blst.$$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please have a way to override invoking git via env vars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I genuinely don't understand. What is the goal? Why specifically via environment variables? Note that git is used to figure out version...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to package blst in a downstream project (FreeBSD). Package building infrastructure usually disable any networking access during the build, so in this case I'd need a way to prevent this script from calling git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If $SRC is assigned, it's a local directory, so that git won't use network.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is still has to be a git repository. At least RPM and FreeBSD ports do not usually use git to fetch the distribution files, so in these contexts there would be no git repo at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FreeBSD ports do not usually use git to fetch the distribution files,
But they have to use something and hence they could use git. Yes, it would be unusual, but in the essence it's just a download.
Again, the suggested script uses git for unambiguous versioning while also preserving custody. It's argued that it's reasonable trade-off for the unconventional download method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are common and established ways to build software (meson, CMake, git tags and GitHub releases, etc.), which are easily connected to downstream package building infrastructures. When a project goes its own way with custom building scripts it immediately makes it much harder to be properly packaged. But that's my problem anyways, so do whatever you want.
Compile latest release tag and install it as pkg-config package.