mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 18:49:10 +00:00
trivial: snap: pull from edge channel to build
Due to bug https://bugs.launchpad.net/snapcraft/+bug/1817300 snaps using classic confinement began failing to build recently when using docker. This is also discussed in https://forum.snapcraft.io/t/snap-build-started-failing-with-pip-not-working/10142/3 This commit can be reverted when snapcraft migrates to the stable channel. Fixes: #1041
This commit is contained in:
parent
b6baba5ce3
commit
6121eb26df
@ -2,7 +2,7 @@ version: 2
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: cibuilds/snapcraft:stable
|
- image: superm1/snapcraft-edge:latest
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
|
@ -1,6 +1,25 @@
|
|||||||
FROM snapcore/snapcraft
|
FROM ubuntu:xenial
|
||||||
RUN mkdir /build
|
|
||||||
WORKDIR /build
|
RUN apt-get update && \
|
||||||
COPY . .
|
apt-get dist-upgrade --yes && \
|
||||||
RUN apt update
|
apt-get install --yes \
|
||||||
CMD ["./contrib/ci/snap.sh"]
|
curl sudo jq squashfs-tools && \
|
||||||
|
curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/core' | jq '.download_url' -r) --output core.snap && \
|
||||||
|
mkdir -p /snap/core && unsquashfs -d /snap/core/current core.snap && rm core.snap && \
|
||||||
|
curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/snapcraft?channel=edge' | jq '.download_url' -r) --output snapcraft.snap && \
|
||||||
|
mkdir -p /snap/snapcraft && unsquashfs -d /snap/snapcraft/current snapcraft.snap && rm snapcraft.snap && \
|
||||||
|
apt remove --yes --purge curl jq squashfs-tools && \
|
||||||
|
apt-get autoclean --yes && \
|
||||||
|
apt-get clean --yes
|
||||||
|
|
||||||
|
COPY contrib/ci/snapcraft-wrapper /snap/bin/snapcraft
|
||||||
|
ENV PATH=/snap/bin:$PATH
|
||||||
|
|
||||||
|
LABEL maintainer="Mario Limonciello <mario.limonciello@dell.com>"
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
openssh-client \
|
||||||
|
wget
|
||||||
|
WORKDIR /root/project
|
||||||
|
12
contrib/ci/snapcraft-wrapper
Executable file
12
contrib/ci/snapcraft-wrapper
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
SNAP="/snap/snapcraft/current"
|
||||||
|
SNAP_NAME="$(awk '/^name:/{print $2}' $SNAP/meta/snap.yaml)"
|
||||||
|
SNAP_VERSION="$(awk '/^version:/{print $2}' $SNAP/meta/snap.yaml)"
|
||||||
|
SNAP_ARCH="amd64"
|
||||||
|
|
||||||
|
export SNAP
|
||||||
|
export SNAP_NAME
|
||||||
|
export SNAP_VERSION
|
||||||
|
export SNAP_ARCH
|
||||||
|
|
||||||
|
exec "$SNAP/usr/bin/python3" "$SNAP/bin/snapcraft" "$@"
|
Loading…
Reference in New Issue
Block a user