-
Notifications
You must be signed in to change notification settings - Fork 785
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
[nix] Add nix derivation for static builds #2380
Conversation
@saschagrunert hope to get some hints from you, now I get:
Even build pcre statically. Already google for a while but no luck... |
@hswong3i I'm not at all nix fluent, can you describe what benefit this PR brings? |
As an end user (Ansible Role developer for buildah installation, support Ubuntu 18.04+ / CentOS 7+ / openSUSE 15.1 / Debian 10 / Fedora 32, https://github.com/alvistack/ansible-role-buildah) I am looking for:
Today my answer for above is: install and compile buildah manually on all of my supported OS (https://github.com/alvistack/ansible-role-buildah/blob/619f9e5d838b6427681e333f36e148f78f1af653/tasks/main.yml#L64-L102). Yes this looks really silly and time consuming :-( What if we have a static binary? Case study from crun could be a good example:
Other else benefit with nix could be:
End user direct benefit could also be:
P.S. I am a nix newbie for only 2 weeks experience, but now I could give a hand for PR with @saschagrunert kindly help ;-) P.P.S. After we support nix derivation inside our source code, newbie could start by:
|
@hswong3i Thank you for the very thorough explanation. The gating tests are not happy with this PR. Could you first try squashing all of your commits and repushing? I'm not able to easily tell at the moment what's wrong. @saschagrunert could I prevail on you to take a peak at this PR? |
8de3829
to
4d1948c
Compare
Compile now successful: https://github.com/alvistack/buildah/releases/download/v1.14.9/buildah-v1.14.9-linux-amd64
Static binaries:
Therefore could focus on CI/CD fixes ;-) |
4d1948c
to
526322d
Compare
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.
LGTM
Add a pull request template. Modeled after CRI-O (Thanks @saschagrunert!) and Dockers. Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
526322d
to
c71852f
Compare
@saschagrunert No changes required since #2380 (review), just rebase with master and updated with
|
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.
LGTM
@saschagrunert shall we ignore those Cancelled/Failing CI? Are they related to this PR? |
91407e7
to
66e3501
Compare
Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
66e3501
to
3a122aa
Compare
bors r+ |
2380: [nix] Add nix derivation for static builds r=rhatdan a=hswong3i #### What type of PR is this? <!-- Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. Uncomment only one `/kind <>` line, hit enter to put that in a new line, and remove leading whitespace from that line: --> > /kind feature #### What this PR does / why we need it: Similar PR goes for crun/conmon/libpod/cri-o/etc, too. Also see: - ~~containers/crun#372 - ~~containers/conmon#161 - containers/skopeo#932 - #2380 - containers/podman#6402 - cri-o/cri-o#3804 Static binaries: - [crun-0.13-linux-amd64](https://github.com/alvistack/crun/releases/download/0.13/crun-0.13-linux-amd64) - [conmon-v2.0.17-linux-amd64](https://github.com/alvistack/conmon/releases/download/v2.0.17/conmon-v2.0.17-linux-amd64) - [skopeo-v1.0.0-linux-amd64](https://github.com/alvistack/skopeo/releases/download/v1.0.0/skopeo-v1.0.0-linux-amd64) - [buildah-v1.14.9-linux-amd64](https://github.com/alvistack/buildah/releases/download/v1.14.9/buildah-v1.14.9-linux-amd64) - [podman-v1.9.3-linux-amd64](https://github.com/alvistack/libpod/releases/download/v1.9.3/podman-v1.9.3-linux-amd64) - [cri-o-v1.17.4-linux-amd64.tar.gz](https://github.com/alvistack/cri-o/releases/download/v1.17.4/cri-o-v1.17.4-linux-amd64.tar.gz) - [cri-o-v1.18.1-linux-amd64.tar.gz](https://github.com/alvistack/cri-o/releases/download/v1.18.1/cri-o-v1.18.1-linux-amd64.tar.gz) Ansible Roles: - https://github.com/alvistack/ansible-role-crun - https://github.com/alvistack/ansible-role-conmon - https://github.com/alvistack/ansible-role-skopeo - https://github.com/alvistack/ansible-role-buildah - https://github.com/alvistack/ansible-role-podman - https://github.com/alvistack/ansible-role-cri_o #### How to verify it ``` nix build -f nix/ ``` #### Which issue(s) this PR fixes: <!-- Automatically closes linked issue when PR is merged. Uncomment the following comment block and include the issue number or None on one line. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`, or `None`. --> <!-- Fixes # or None --> #### Special notes for your reviewer: Here I skip the btrfs and lvm2 support for static binary, because: 1. btrfs will not support in CentOS 8 2. With skopeo experience both btrfs and lvm2 are not easy for compile as static binary Also see: - containers/podman#6402 (comment) #### Does this PR introduce a user-facing change? <!-- If no, just write `None` in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information on release notes please follow the kubernetes model: https://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note ``` Co-authored-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
Build failed:
|
@rhatdan sorry i have no way to view the log from https://app.bors.tech/repositories/22803/log#batch-73778 for debug... |
[+0025s] Trying to pull quay.io/libpod/in_podman:master... |
bors retry |
Build succeeded: |
@hswong3i and @saschagrunert TY both VERY MUCH for working your way through this and putting the functionality into Buildah! |
What type of PR is this?
What this PR does / why we need it:
Similar PR goes for crun/conmon/libpod/cri-o/etc, too.
Also see:
[nix] Cleanup nix derivation for static builds crun#372[nix] Add nix derivation for static builds conmon#161[nix] Add nix derivation for static builds skopeo#932[nix] Add nix derivation for static builds #2380Static binaries:
Ansible Roles:
How to verify it
Which issue(s) this PR fixes:
Special notes for your reviewer:
Here I skip the btrfs and lvm2 support for static binary, because:
Also see:
Does this PR introduce a user-facing change?