You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The top level environment with LD_LIBRARY_PATH and PATH is being set for snaps set to classicconfinement when using core22 as a base.
This can cause application crashes. In previous bases we made use of the command-chain and did not export these environment variables when going classic
To Reproduce
Create a core22 base snap
Set confinement: classic
Run snapcraft prime --shell-after
Run grep -A3 '^environment:' ../prime/meta/snap.yaml to verify that the wrong keywords are there
Environment
N/A
snapcraft.yaml
name: snapcraftbase: core22summary: easily create snapsdescription: | Snapcraft aims to make upstream developers' lives easier and as such is not a single toolset, but instead is a collection of tools that enable the natural workflow of an upstream to be extended with a simple release step into Snappy.adopt-info: snapcraftconfinement: classiclicense: GPL-3.0assumes:
- snapd2.43apps:
snapcraft:
environment:
PATH: "$SNAP/libexec/snapcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"# https://github.com/lxc/pylxd/pull/361PYLXD_WARNINGS: "none"command: bin/python $SNAP/bin/snapcraftcompleter: snapcraft-completion
....
Relevant log output
$ cat /snap/snapcraft/current/meta/snap.yaml
name: snapcraft
version: 7.4.0.post7+gitd67a3d5b
summary: easily create snaps
description: |
Snapcraft aims to make upstream developers' lives easier and as such is not a single toolset, but instead is a collection of tools that enable the natural workflow of an upstream to be extended with a simple release step into Snappy.license: GPL-3.0architectures:- amd64base: core22assumes:- snapd2.43apps: snapcraft: command: bin/python $SNAP/bin/snapcraft completer: snapcraft-completion environment: PATH: $SNAP/libexec/snapcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PYLXD_WARNINGS: noneconfinement: classicgrade: develenvironment: LD_LIBRARY_PATH: ${SNAP_LIBRARY_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}:$SNAP/lib:$SNAP/usr/lib:$SNAP/usr/lib/x86_64-linux-gnu PATH: $SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATHhooks: configure: environment: PATH: $SNAP/bin
Additional context
No response
The text was updated successfully, but these errors were encountered:
sergiusens
added
the
bug
Actual bad behavior that don't fall into maintenance or documentation
label
Jun 1, 2023
Bug Description
The top level environment with
LD_LIBRARY_PATH
andPATH
is being set for snaps set toclassic
confinement when usingcore22
as a base.This can cause application crashes. In previous bases we made use of the
command-chain
and did not export these environment variables when goingclassic
To Reproduce
core22
base snapconfinement: classic
snapcraft prime --shell-after
grep -A3 '^environment:' ../prime/meta/snap.yaml
to verify that the wrong keywords are thereEnvironment
N/A
snapcraft.yaml
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: