github.com/kubiko/snapd@v0.0.0-20201013125620-d4f3094d9ddf/build-aux/snap/snapcraft.yaml (about) 1 name: snapd 2 type: snapd 3 summary: Daemon and tooling that enable snap packages 4 description: | 5 Install, configure, refresh and remove snap packages. Snaps are 6 'universal' packages that work across many different Linux systems, 7 enabling secure distribution of the latest apps and utilities for 8 cloud, servers, desktops and the internet of things. 9 10 Start with 'snap list' to see installed snaps. 11 adopt-info: snapd-deb 12 # build-base is needed here for snapcraft to build this snap as with "modern" 13 # snapcraft 14 build-base: core 15 grade: stable 16 license: GPL-3.0 17 18 # Note that this snap is unusual in that it has no "apps" section. 19 # 20 # It is started via re-exec on classic systems and via special 21 # handling in the core18 snap on Ubuntu Core Systems. 22 # 23 # Because snapd itself manages snaps it must currently run totally 24 # unconfined (even devmode is not enough). 25 # 26 # See the comments from jdstrand in 27 # https://forum.snapcraft.io/t/5547/10 28 parts: 29 snapd-deb: 30 plugin: nil 31 source: . 32 build-snaps: [go/1.10/stable] 33 override-pull: | 34 snapcraftctl pull 35 # install build dependencies 36 export DEBIAN_FRONTEND=noninteractive 37 export DEBCONF_NONINTERACTIVE_SEEN=true 38 sudo -E apt-get build-dep -y ./ 39 ./get-deps.sh --skip-unused-check 40 # set version after installing dependencies so we have all the tools here 41 snapcraftctl set-version "$(./mkversion.sh --output-only)" 42 override-build: | 43 # unset the LD_FLAGS and LD_LIBRARY_PATH vars that snapcraft sets for us 44 # as those will point to the $SNAPCRAFT_STAGE which on re-builds will 45 # contain things like libc and friends that confuse the debian package 46 # build system 47 # TODO: should we unset $PATH to not include $SNAPCRAFT_STAGE too? 48 unset LD_FLAGS 49 unset LD_LIBRARY_PATH 50 # if we are root, disable tests because a number of them fail when run as 51 # root 52 if [ "$(id -u)" = "0" ]; then 53 DEB_BUILD_OPTIONS=nocheck 54 export DEB_BUILD_OPTIONS 55 fi 56 # run the real build (but just build the binary package, and don't 57 # bother compressing it too much) 58 dpkg-buildpackage -b -Zgzip -zfast 59 dpkg-deb -x $(pwd)/../snapd_*.deb $SNAPCRAFT_PART_INSTALL 60 61 # xdelta is used to enable delta downloads (even if the host does not have it) 62 xdelta3: 63 plugin: nil 64 stage-packages: 65 - xdelta3 66 stage: 67 - usr/bin/* 68 - usr/lib/* 69 - lib/* 70 # squashfs-tools are used by `snap pack` 71 squashfs-tools: 72 plugin: nil 73 stage-packages: 74 - squashfs-tools 75 stage: 76 - usr/bin/* 77 - usr/lib/* 78 - lib/* 79 # liblzma5 is part of core but the snapd snap needs to run even without core 80 liblzma5: 81 plugin: nil 82 stage-packages: 83 - liblzma5 84 stage: 85 - lib/* 86 # libc6 is part of core but we need it in the snapd snap for 87 # CommandFromSystemSnap 88 libc6: 89 plugin: nil 90 stage-packages: 91 - libc6 92 - libc-bin 93 stage: 94 - lib/* 95 - usr/lib/* 96 - lib64/* 97 - etc/ld.so.conf 98 - etc/ld.so.conf.d/* 99 override-stage: | 100 snapcraftctl stage 101 # fix symlinks of ld.so to be relative 102 if [ "$(readlink -f lib64/ld-linux-x86-64.so.2)" = "/lib/x86_64-linux-gnu/ld-2.23.so" ]; then 103 ln -f -s ../lib/x86_64-linux-gnu/ld-2.23.so lib64/ld-linux-x86-64.so.2 104 fi 105 if [ "$(readlink -f lib64/ld64.so.2)" = "/lib/powerpc64le-linux-gnu/ld-2.23.so" ]; then 106 ln -f -s ../lib/powerpc64le-linux-gnu/ld-2.23.so lib64/ld64.so.2 107 fi 108 # the version in Ubuntu 16.04 (cache v6) 109 fontconfig-xenial: 110 plugin: nil 111 build-packages: [python3-apt] 112 source: https://github.com/snapcore/fc-cache-static-builder.git 113 override-build: | 114 ./build-from-security.py xenial 115 mkdir -p $SNAPCRAFT_PART_INSTALL/bin 116 cp -a fc-cache-xenial $SNAPCRAFT_PART_INSTALL/bin/fc-cache-v6 117 prime: 118 - bin/fc-cache-v6 119 # the version in Ubuntu 18.04 (cache v7) 120 fontconfig-bionic: 121 plugin: nil 122 build-packages: [python3-apt] 123 source: https://github.com/snapcore/fc-cache-static-builder.git 124 override-build: | 125 ./build-from-security.py bionic 126 mkdir -p $SNAPCRAFT_PART_INSTALL/bin 127 cp -a fc-cache-bionic $SNAPCRAFT_PART_INSTALL/bin/fc-cache-v7 128 prime: 129 - bin/fc-cache-v7