-
Notifications
You must be signed in to change notification settings - Fork 448
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
packaging: use local patchelf #2519
Merged
Merged
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5064812
packaging: use local patchelf
cmatsuoka c549fc5
internal: remove patchelf workaround
cmatsuoka d066397
internal, plugins: relink go binary if dynamic
cmatsuoka f7b7023
tests: add test for go dynamic binary relink
cmatsuoka a133e62
tests: fix patchelf location
cmatsuoka b1d55c4
Merge branch 'master' into use-local-patchelf
sergiusens 64eae61
add spread test for rpath rewrite and minor fixes
cmatsuoka e6ff8bc
Merge branch 'use-local-patchelf' of github.com:cmatsuoka/snapcraft i…
cmatsuoka 6df26ca
add missing sudo to travis script
cmatsuoka fc36d7a
set our patchelf path in spread test
cmatsuoka 6e71442
use existing infrastructure to check for dynamic elf binary
cmatsuoka 1789b46
keep black happy
cmatsuoka ed23b6e
minor refactoring to remove nested conditional
cmatsuoka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
summary: Build and run Go snaps with dynamic executables | ||
|
||
environment: | ||
SNAP_DIR: ../snaps/go-cgo | ||
|
||
prepare: | | ||
#shellcheck source=tests/spread/tools/snapcraft-yaml.sh | ||
. "$TOOLS_DIR/snapcraft-yaml.sh" | ||
set_base "$SNAP_DIR/snap/snapcraft.yaml" | ||
|
||
# Set the confinement type of this snap to classic | ||
sed -i 's/\(confinement.*\)strict/\1classic/;/^confinement:/a base: core18' "$SNAP_DIR/snap/snapcraft.yaml" | ||
|
||
restore: | | ||
#shellcheck source=tests/spread/tools/snapcraft-yaml.sh | ||
. "$TOOLS_DIR/snapcraft-yaml.sh" | ||
cd "$SNAP_DIR" | ||
snapcraft clean | ||
rm -f ./*.snap | ||
restore_yaml "snap/snapcraft.yaml" | ||
|
||
execute: | | ||
cd "$SNAP_DIR" | ||
|
||
snapcraft prime | ||
|
||
if ! snap list go; then | ||
echo "The go snap from the Snap Store should have been installed." | ||
exit 1 | ||
fi | ||
|
||
# Ensure binaries are properly patched | ||
/snap/snapcraft/current/bin/patchelf --print-rpath prime/bin/go-cgo | MATCH "/snap/core[0-9]*/current" | ||
|
||
# Run generated binary | ||
prime/bin/go-cgo | MATCH "more or less" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
just for reference, we also have https://github.com/snapcore/snapcraft/pull/2519/files#diff-f7cf307285f042f35434bbe680606c77R258 and those are all set as properties here https://github.com/snapcore/snapcraft/pull/2519/files#diff-f7cf307285f042f35434bbe680606c77R219 so it might be good to just do it on load, we can leave as is for now if we have a bug for this and a code comment TODO with the LP: # here