Bug 1984560 - Ensure /run/user/1000 exists and is owned for snapcraft execution r=glandium a=release DONTBUILD
This commit is contained in:
committed by
rvandermeulen@mozilla.com
parent
81fb5bda51
commit
3e6c3047fb
@@ -36,6 +36,7 @@ COPY install-snap.sh /usr/local/bin/
|
||||
|
||||
RUN install-snap.sh core
|
||||
|
||||
# 8.11.1 is https://api.snapcraft.io/api/v1/snaps/download/vMTKRaLjnOJQetI78HjntT37VuoyssFE_15600.snap
|
||||
RUN install-snap.sh snapcraft
|
||||
|
||||
RUN install-snap.sh $SNAP_BASE
|
||||
@@ -66,6 +67,14 @@ ENV SNAP_INSTANCE_KEY=
|
||||
ENV SNAP_INSTANCE_NAME=snapcraft
|
||||
ENV SNAPCRAFT_PLATFORM=
|
||||
|
||||
# Bug 1985494
|
||||
#
|
||||
# The change at https://github.com/canonical/craft-application/commit/f3436a9eab1eeed3ad6d44d9d430b5f4b008f7d8
|
||||
# moved configuration query and breaks us in docker
|
||||
# This is a temporary workaround and proper fix should be done:
|
||||
# - either there's a way to feed the configuration to avoid hitting snapctl
|
||||
# - or we need to introduce a way to bypass that properly with upstream
|
||||
RUN sed -ri 's/debug_mode = .*/debug_mode = False/g' /snap/snapcraft/current/lib/python*/site-packages/craft_application/application.py
|
||||
RUN snapcraft --version
|
||||
|
||||
# Snapcraft pull will need to sudo apt-get update ...
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
set -ex
|
||||
|
||||
SNAP_TO_INSTALL=$1
|
||||
SNAP_URL=$2
|
||||
|
||||
if [ -z "${SNAP_TO_INSTALL}" ]; then
|
||||
echo "Please give a snap name"
|
||||
@@ -13,11 +14,12 @@ fi
|
||||
# place (the 'Snap-CDN: none' header allows building in restricted network
|
||||
# environments such as Launchpad builders)
|
||||
|
||||
if [ -z "${SNAP_URL}" ]; then
|
||||
SNAP_URL=$(curl -H 'X-Ubuntu-Series: 16' "https://api.snapcraft.io/api/v1/snaps/details/${SNAP_TO_INSTALL}?channel=stable" | jq '.download_url' -r)
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
curl -L \
|
||||
-H 'Snap-CDN: none' \
|
||||
$(curl -H 'X-Ubuntu-Series: 16' "https://api.snapcraft.io/api/v1/snaps/details/${SNAP_TO_INSTALL}?channel=stable" | jq '.download_url' -r) \
|
||||
--output "${SNAP_TO_INSTALL}.snap"
|
||||
curl -L -H 'Snap-CDN: none' "$SNAP_URL" --output "${SNAP_TO_INSTALL}.snap"
|
||||
|
||||
mkdir -p "/snap/${SNAP_TO_INSTALL}"
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ MOZCONFIG=mozconfig.in
|
||||
|
||||
USE_SNAP_FROM_STORE_OR_MC=${USE_SNAP_FROM_STORE_OR_MC:-0}
|
||||
|
||||
sudo mkdir -p /run/user/1000 && sudo chown 1000:1000 /run/user/1000
|
||||
|
||||
TRY=0
|
||||
if [ "${BRANCH}" = "try" ]; then
|
||||
if [ "${SOURCE_BRANCH}" = "try" ]; then
|
||||
|
||||
Reference in New Issue
Block a user