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
snapcraft.yaml: use build-base and adopt-info, rm builddeb plugin #7904
Changes from all commits
41ffa97
a321e9a
f42b991
83879d3
5c6b927
590e92c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
name: snapd | ||
# TODO: enable this when the store is ready | ||
# type: snapd | ||
summary: Daemon and tooling that enable snap packages | ||
description: | | ||
Install, configure, refresh and remove snap packages. Snaps are | ||
'universal' packages that work across many different Linux systems, | ||
enabling secure distribution of the latest apps and utilities for | ||
cloud, servers, desktops and the internet of things. | ||
|
||
Start with 'snap list' to see installed snaps. | ||
version: set-by-version-script-thxbye | ||
version-script: | | ||
./mkversion.sh --output-only | ||
#FIXME: enable once snapcraft understands this | ||
#type: snapd | ||
grade: stable | ||
Install, configure, refresh and remove snap packages. Snaps are | ||
'universal' packages that work across many different Linux systems, | ||
enabling secure distribution of the latest apps and utilities for | ||
cloud, servers, desktops and the internet of things. | ||
|
||
passthrough: | ||
license: GPL-3.0 | ||
Start with 'snap list' to see installed snaps. | ||
adopt-info: snapd | ||
# build-base is needed here for snapcraft to build this snap as with "modern" | ||
# snapcraft | ||
build-base: core | ||
grade: stable | ||
license: GPL-3.0 | ||
|
||
# Note that this snap is unusual in that it has no "apps" section. | ||
# | ||
|
@@ -29,9 +28,36 @@ passthrough: | |
# https://forum.snapcraft.io/t/5547/10 | ||
parts: | ||
snapd: | ||
# FIXME: this should probably go upstream | ||
plugin: x-builddeb | ||
plugin: nil | ||
source: . | ||
build-snaps: [go/1.10/stable] | ||
override-pull: | | ||
snapcraftctl pull | ||
# install build dependencies | ||
export DEBIAN_FRONTEND=noninteractive | ||
export DEBCONF_NONINTERACTIVE_SEEN=true | ||
sudo apt-get build-dep -y ./ | ||
./get-deps.sh --skip-unused-check | ||
# set version after installing dependencies so we have all the tools here | ||
snapcraftctl set-version $(./mkversion.sh --output-only) | ||
override-build: | | ||
# unset the LD_FLAGS and LD_LIBRARY_PATH vars that snapcraft sets for us | ||
# as those will point to the $SNAPCRAFT_STAGE which on re-builds will | ||
# contain things like libc and friends that confuse the debian package | ||
# build system | ||
# TODO: should we unset $PATH to not include $SNAPCRAFT_STAGE too? | ||
unset LD_FLAGS | ||
unset LD_LIBRARY_PATH | ||
# if we are root, disable tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Saying why we disable tests would be more useful. I see what the code does but am not the wiser. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure I'll add this in a followup |
||
if [ "$(id -u)" = "0" ]; then | ||
DEB_BUILD_OPTIONS=nocheck | ||
export DEB_BUILD_OPTIONS | ||
fi | ||
# run the real build (but just build the binary package, and don't | ||
# bother compressing it too much) | ||
dpkg-buildpackage -b -Zgzip -zfast | ||
dpkg-deb -x $(pwd)/../snapd_*.deb $SNAPCRAFT_PART_INSTALL | ||
|
||
# xdelta is used to enable delta downloads (even if the host does not have it) | ||
xdelta3: | ||
plugin: nil | ||
|
@@ -83,20 +109,19 @@ parts: | |
fontconfig-xenial: | ||
plugin: nil | ||
source: https://github.com/snapcore/fc-cache-static-builder.git | ||
build: | | ||
override-build: | | ||
./build-from-security.py xenial | ||
mkdir -p $SNAPCRAFT_PART_INSTALL/bin | ||
cp -a fc-cache-xenial $SNAPCRAFT_PART_INSTALL/bin/fc-cache-v6 | ||
stage: | ||
prime: | ||
- bin/fc-cache-v6 | ||
# the version in Ubuntu 18.04 (cache v7) | ||
fontconfig-bionic: | ||
plugin: nil | ||
source: https://github.com/snapcore/fc-cache-static-builder.git | ||
build: | | ||
override-build: | | ||
./build-from-security.py bionic | ||
mkdir -p $SNAPCRAFT_PART_INSTALL/bin | ||
cp -a fc-cache-bionic $SNAPCRAFT_PART_INSTALL/bin/fc-cache-v7 | ||
stage: | ||
prime: | ||
- bin/fc-cache-v7 | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to see follow ups or if you are feeling lucky, commit this suggestion and wait for green.