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

tests/lib/prepare: drop workarounds for rpmbuild rewriting /bin/sh #7806

Merged
merged 1 commit into from Nov 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions tests/lib/prepare.sh
Expand Up @@ -130,12 +130,6 @@ update_core_snap_for_classic_reexec() {
rm squashfs-root/usr/lib/snapd/* squashfs-root/usr/bin/snap
# and copy in the current libexec
cp -a "$LIBEXECDIR"/snapd/* squashfs-root/usr/lib/snapd/
case "$SPREAD_SYSTEM" in
fedora-*|centos-*|amazon-*)
# RPM can rewrite shebang to #!/usr/bin/sh
sed -i -e '1 s;#!/usr/bin/sh;#!/bin/sh;' squashfs-root/usr/lib/snapd/snap-device-helper
Copy link
Collaborator

Choose a reason for hiding this comment

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

For some context. The reason this was here in the first place is that we rebuild snapd on, say Fedora 31, and repackage the 16.04-based core snap with the package built on fedora. This now puts the /usr/bin/sh shebang line inside the core snap, which doesn't exist there.

We fixed this with cc4e91c so the workaround is no longer necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bboozzoo can you please include this in the commit message ^

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll update the commit message and force push

;;
esac
# also the binaries themselves
cp -a /usr/bin/snap squashfs-root/usr/bin/
# make sure bin/snapctl is a symlink to lib/
Expand Down