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

Fix building static podman-remote #10679

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

cevich
Copy link
Member

@cevich cevich commented Jun 14, 2021

Fixes #10656

As near as I can tell, sometime between v1.6.4 and v1.9 the definition
of LDFLAGS_PODMAN_STATIC was both created and lost. Additionally, after
a refactoring of the Makefile it was possible to enable CGO (which
will cause a dynamic binary to be built). Fix both issues by adding the
missing definition and forcing CGO to be disabled.

As near as I can tell, sometime between `v1.6.4` and `v1.9` the definition
of `LDFLAGS_PODMAN_STATIC` was both created and lost.  Additionally, after
a refactoring of the `Makefile` it was possible to enable CGO (which
will cause a dynamic binary to be built).  Fix both issues by adding the
missing definition and forcing CGO to be disabled.

Signed-off-by: Chris Evich <[email protected]>
@cevich cevich requested review from mheon and vrothberg June 14, 2021 18:59
@cevich
Copy link
Member Author

cevich commented Jun 14, 2021

Alert/Danger/Warning/Caution: I don't know what I'm doing...just following some random blog post google dug up for me. A local test showed make podman-remote-static does now produce a static binary. But this might not be the correct way to do it.

It's also (obviously) not going to replace the v3.2.0 (and later) binaries already uploaded to the github release pages. I'm happy to fix that after this merges, but would prefer one of the official maintainers do it (mostly because I don't want to be blamed for getting it wrong) 😀

@mheon
Copy link
Member

mheon commented Jun 14, 2021

I don't think we can fix the 3.2.x already-built binaries easily. We can do subsequent releases, but backporting to existing tags seems like a bad idea.

@cevich
Copy link
Member Author

cevich commented Jun 14, 2021

backporting to existing tags seems like a bad idea.

Okay. Hmmm, we do have that nix-based alt-build. Maybe it produced a viable 3.2.0 static binary at the time...

@cevich
Copy link
Member Author

cevich commented Jun 14, 2021

...We have a winner! The static nix build for v3.2.0 was successful (Download), all it needs is sticking into a tarball 😃

@cevich
Copy link
Member Author

cevich commented Jun 14, 2021

(clicked the re-run buttons)

@cevich
Copy link
Member Author

cevich commented Jun 15, 2021

(clicked the re-run buttons again...and again)

@rhatdan
Copy link
Member

rhatdan commented Jun 15, 2021

LGTM
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 15, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cevich, rhatdan

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

The pull request process is described here

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 15, 2021
@mheon
Copy link
Member

mheon commented Jun 15, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2021
@openshift-merge-robot openshift-merge-robot merged commit 0c20408 into containers:master Jun 15, 2021
@cevich cevich deleted the fix_static_build branch June 30, 2021 17:59
@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman-remote-static in release v3.2.0 is not static
4 participants