Merge ~sylvain-pineau/checkbox-snappy/+git/checkbox-snappy-classic:interim_release_support into ~checkbox-dev/checkbox-snappy/+git/checkbox-snappy-classic:master

Proposed by Sylvain Pineau
Status: Work in progress
Proposed branch: ~sylvain-pineau/checkbox-snappy/+git/checkbox-snappy-classic:interim_release_support
Merge into: ~checkbox-dev/checkbox-snappy/+git/checkbox-snappy-classic:master
Diff against target: 31 lines (+3/-2)
2 files modified
launchers/wrapper_local (+2/-2)
snap/hooks/install (+1/-0)
Reviewer Review Type Date Requested Status
Checkbox Developers Pending
Review via email: mp+401777@code.launchpad.net

This proposal supersedes a proposal from 2021-04-26.

Description of the change

To post a comment you must log in.

Unmerged commits

2066223... by Sylvain Pineau

wrapper_local: Move $PERL5LIB export after the $PATH adjustments

Otherwise perl is the one from the host not the snap and can't load extra
modules only available in the snap.

8c5502e... by Sylvain Pineau

hooks:install: Preserve sudoer include directive with the pound (#) character

To stay comptabible with older version of sudo that don't understand the @include.

See https://unix.stackexchange.com/questions/244064/why-are-the-include-and-includedir-directives-in-sudo-prefixed-with-the-pound

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/launchers/wrapper_local b/launchers/wrapper_local
2index 6781ba4..a0d1d0a 100755
3--- a/launchers/wrapper_local
4+++ b/launchers/wrapper_local
5@@ -28,12 +28,12 @@ if [ ! -d "$RUNTIME" ]; then
6 fi
7
8 export LC_ALL=C.UTF-8
9-PERL_VERSION=$(perl -e '$^V=~/^v(\d+\.\d+)/;print $1')
10-export PERL5LIB="$PERL5LIB:$SNAP/usr/lib/$ARCH/perl/$PERL_VERSION:$SNAP/usr/lib/$ARCH/perl5/$PERL_VERSION:$SNAP/usr/share/perl/$PERL_VERSION:$SNAP/usr/share/perl5"
11 export GI_TYPELIB_PATH=$SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$ARCH/girepository-1.0
12 export PATH="$SNAP/usr/sbin:$SNAP/sbin:$SNAP/usr/bin:$SNAP/bin:/snap/bin:$PATH"
13 export ALSA_CONFIG_PATH=$SNAP/usr/share/alsa/alsa.conf:$SNAP/usr/share/alsa/pcm/default.conf
14 export PYTHONPATH="$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH"
15+PERL_VERSION=$(perl -e '$^V=~/^v(\d+\.\d+)/;print $1')
16+export PERL5LIB="$PERL5LIB:$SNAP/usr/lib/$ARCH/perl/$PERL_VERSION:$SNAP/usr/lib/$ARCH/perl5/$PERL_VERSION:$SNAP/usr/share/perl/$PERL_VERSION:$SNAP/usr/share/perl5"
17
18 if [ -e $RUNTIME/wrapper_common_classic ]; then
19 . $RUNTIME/wrapper_common_classic
20diff --git a/snap/hooks/install b/snap/hooks/install
21index 1086fdc..fbc33e4 100755
22--- a/snap/hooks/install
23+++ b/snap/hooks/install
24@@ -4,6 +4,7 @@ set -e
25 snapctl set slave=enabled
26
27 echo "ubuntu ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/checkbox
28+sed -i 's|@includedir /etc/sudoers.d|#includedir /etc/sudoers.d|' /etc/sudoers
29
30 mkdir -p /etc/polkit-1/localauthority/50-local.d
31 cat <<EOF > /etc/polkit-1/localauthority/50-local.d/com.canonical.certification.checkbox.pkla

Subscribers

People subscribed via source and target branches