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

Reproducible Builds: trim embedded cgo paths #11160

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

kpcyrd
Copy link
Contributor

@kpcyrd kpcyrd commented Aug 8, 2021

The Arch Linux reproducible builds setup currently fails to reproduce podman (diff). The relevant part in the diff is:

│ │ ├── strings --all --bytes=8 {}
│ │ │ @@ -1,9 +1,9 @@
│ │ │  /lib64/ld-linux-x86-64.so.2
│ │ │ -fDMoJcLZqojBJnlXadN9/no_IKXu28dGv-5kgjWUm/HSPy4nrzjaE7jAmxaDUT/06FhXFIFJ4FwF81sy8x_
│ │ │ +CIrZsC53vVGulPBnzvSY/P_VErASmHt8np5NCPDQ8/LcpPc2AxUJaJ-MAKOAvh/xHYbWCnqxFpRwLK2eL7s
│ │ │  -*m4ibT|
│ │ │  _ITM_deregisterTMCloneTable
│ │ │  _ITM_registerTMCloneTable
│ │ │  pthread_mutexattr_setrobust
│ │ │  pthread_mutex_consistent
│ │ │  pthread_mutex_init
│ │ │  pthread_cond_wait
│ │ │ @@ -78810,15 +78810,15 @@
│ │ │  go/src/net/sockopt_posix.go
│ │ │  go/src/net/splice_linux.go
│ │ │  go/src/net/tcpsock_posix.go
│ │ │  go/src/net/tcpsockopt_posix.go
│ │ │  go/src/net/tcpsockopt_unix.go
│ │ │  go/src/net/udpsock_posix.go
│ │ │  go/src/net/unixsock_posix.go
│ │ │ -/tmp/go-build3474806368/b051/_cgo_gotypes.go
│ │ │ +/tmp/go-build3959924547/b051/_cgo_gotypes.go
│ │ │  go/src/net/cgo_resnew.go
│ │ │  go/src/net/cgo_unix.go
│ │ │  go/src/net/cgo_socknew.go
│ │ │  go/src/net/hook.go
│ │ │  go/src/net/hook_unix.go
│ │ │  go/src/net/url/url.go
│ │ │  go/src/crypto/dsa/dsa.go
│ │ │ @@ -78961,15 +78961,15 @@
│ │ │  go/src/strconv/atob.go
│ │ │  vendor/github.com/BurntSushi/toml/parse.go
│ │ │  vendor/github.com/BurntSushi/toml/type_check.go
│ │ │  vendor/github.com/BurntSushi/toml/type_fields.go
│ │ │  vendor/github.com/containers/image/v5/internal/rootless/rootless.go
│ │ │  go/src/os/user/lookup.go
│ │ │  go/src/os/user/user.go
│ │ │ -/tmp/go-build3474806368/b159/_cgo_gotypes.go
│ │ │ +/tmp/go-build3959924547/b159/_cgo_gotypes.go
│ │ │  go/src/os/user/cgo_lookup_unix.go
│ │ │  vendor/github.com/syndtr/gocapability/capability/capability.go
│ │ │  vendor/github.com/syndtr/gocapability/capability/capability_linux.go
│ │ │  vendor/github.com/syndtr/gocapability/capability/enum.go
│ │ │  vendor/github.com/syndtr/gocapability/capability/enum_gen.go
│ │ │  vendor/github.com/syndtr/gocapability/capability/syscall_linux.go
│ │ │  vendor/github.com/docker/go-units/duration.go
[...]

To fix the cgo paths, -trimpath needs to be passed in $GOFLAGS instead of -gcflags and -asmflags. This automatically resolves the other issues shown in the diff too. For more info on -trimpath with cgo see golang/go#47256.

Thanks!

cc: @Foxboron

[NO TESTS NEEDED]

@rhatdan
Copy link
Member

rhatdan commented Aug 8, 2021

You need to sign your commits.

git commit -a --amend -s
git push --force

You should also add [NO TESTS NEEDED] to your PR to avoid the next check.

@kpcyrd
Copy link
Contributor Author

kpcyrd commented Aug 8, 2021

Done. I'm not sure why the tests are failing but I've added [NO TESTS NEEDED].

Thanks!

@rhatdan
Copy link
Member

rhatdan commented Aug 8, 2021

Your PR is still not signed.

@kpcyrd
Copy link
Contributor Author

kpcyrd commented Aug 8, 2021

The commit was signed but I never added my pgp key to my github account.

I've added the key, can you check again?

@rhatdan
Copy link
Member

rhatdan commented Aug 9, 2021

The problem is the commit message needs to have a line like

Signed-off-by: Daniel J Walsh [email protected]

@kpcyrd
Copy link
Contributor Author

kpcyrd commented Aug 9, 2021

Done!

@rhatdan
Copy link
Member

rhatdan commented Aug 9, 2021

LGTM
@containers/podman-maintainers PTAL
@mheon PTAL

@mheon
Copy link
Member

mheon commented Aug 9, 2021

I'd like a review from @lsm5 before merge, but LGTM

Copy link
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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 10, 2021
Copy link
Member

@lsm5 lsm5 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
Copy link
Contributor

openshift-ci bot commented Aug 10, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kpcyrd, lsm5, saschagrunert

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

@lsm5
Copy link
Member

lsm5 commented Aug 10, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 10, 2021
@rhatdan rhatdan merged commit 8b14cd8 into containers:main Aug 10, 2021
@kpcyrd kpcyrd deleted the repro-builds branch August 10, 2021 19:41
@kpcyrd
Copy link
Contributor Author

kpcyrd commented Aug 10, 2021

Thanks!

@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 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.

5 participants