Skip to content

[v1.9] Backport nix derivation for static builds#6408

Closed
hswong3i wants to merge 1 commit intocontainers:v1.9from
alvistack:v1.9-linux-amd64
Closed

[v1.9] Backport nix derivation for static builds#6408
hswong3i wants to merge 1 commit intocontainers:v1.9from
alvistack:v1.9-linux-amd64

Conversation

@hswong3i
Copy link
Copy Markdown
Collaborator

@hswong3i hswong3i commented May 27, 2020

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 27, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

Hi @hswong3i. Thanks for your PR.

I'm waiting for a containers member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@hswong3i hswong3i changed the title Backport nix derivation for static builds [v1.9] Backport nix derivation for static builds May 27, 2020
@mheon
Copy link
Copy Markdown
Member

mheon commented May 27, 2020

You need to add a Signed-off-by line to your commit - git commit --amend -s --no-edit should work

@hswong3i hswong3i force-pushed the v1.9-linux-amd64 branch from 0fff877 to 0058968 Compare May 27, 2020 16:04
@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented May 27, 2020

LGTM

@hswong3i hswong3i force-pushed the v1.9-linux-amd64 branch 2 times, most recently from bb8b533 to 3960d97 Compare May 28, 2020 09:15
@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented May 29, 2020

@vrothberg
Copy link
Copy Markdown
Member

I have no expertise in Nix and cannot review.

@hswong3i
Copy link
Copy Markdown
Collaborator Author

I have no expertise in Nix and cannot review.

Could simply try with this:

curl -L https://nixos.org/nix/install | sh
git clone https://github.com/alvistack/libpod.git
cd libpod
git checkout v1.9-linux-amd64
nix build -f nix/
./result-bin/bin/podman --version
ls -lah ./result-bin/bin/podman
ldd ./result-bin/bin/podman
file ./result-bin/bin/podman

Example result:

$ ./result-bin/bin/podman --version
podman version 1.9.4-dev

$ ls -lah ./result-bin/bin/podman
-r-xr-xr-x 1 hswong3i hswong3i 50M Jan  1  1970 ./result-bin/bin/podman

$ ldd ./result-bin/bin/podman
    not a dynamic executable

$ file ./result-bin/bin/podman
./result-bin/bin/podman: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, Go BuildID=pVTlxXbP3zJwnIv270_g/n4422kj1lRjvCMVkckKC/h9rdwRGSToOL2cYUz5T-/hJIP5OfmT5Or4zlx42Y6, not stripped

@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented May 29, 2020

@saschagrunert PTAL

@hswong3i hswong3i force-pushed the v1.9-linux-amd64 branch from 3960d97 to cf53d3d Compare May 29, 2020 14:14
Copy link
Copy Markdown
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hswong3i, saschagrunert
To complete the pull request process, please assign mrunalp
You can assign the PR to them by writing /assign @mrunalp in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hswong3i hswong3i force-pushed the v1.9-linux-amd64 branch 5 times, most recently from 867ad11 to cee93bc Compare May 31, 2020 03:40
Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
@hswong3i hswong3i force-pushed the v1.9-linux-amd64 branch from cee93bc to 6953dbc Compare May 31, 2020 03:54
@hswong3i
Copy link
Copy Markdown
Collaborator Author

hswong3i commented May 31, 2020

Compile now successful: https://github.com/alvistack/libpod/releases/download/v1.9.3/podman-v1.9.3-linux-amd64

$ ls -lah ./podman-v1.9.3-linux-amd64
-r-xr-xr-x 1 hswong3i hswong3i 44M May 31 11:38 ./podman-v1.9.3-linux-amd64
    
$ ldd ./podman-v1.9.3-linux-amd64
    not a dynamic executable 
 
$ file ./podman-v1.9.3-linux-amd64
./podman-v1.9.3-linux-amd64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, Go BuildID=8aoQlir-hnIlUFgPjNpP/HSxtS1j80TAJXsk5b3Ly/BQf_LNRIsfb5jKfcQMNO/YygPNHhAHpdqlPmgvpOs, stripped

$ sudo ./podman-v1.9.3-linux-amd64 --version
podman-v1.9.3-linux-amd64 version 1.9.3

Static binaries:

Therefore could focus on CI/CD fixes ;-)

@vrothberg
Copy link
Copy Markdown
Member

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 4, 2020
@vrothberg
Copy link
Copy Markdown
Member

Can you rebase the commits?

@hswong3i
Copy link
Copy Markdown
Collaborator Author

hswong3i commented Jun 4, 2020

Can you rebase the commits?

Checked and already rebased and updated with v1.9

@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented Jun 10, 2020

Tests are still failing.

@hswong3i
Copy link
Copy Markdown
Collaborator Author

hswong3i commented Jul 9, 2020

Let's focus on master ;-)

@hswong3i hswong3i closed this Jul 9, 2020
@hswong3i hswong3i deleted the v1.9-linux-amd64 branch July 9, 2020 02:41
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. ok-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants