forked from canonical/ubuntu-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
49 lines (46 loc) · 1.38 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: ubuntu-image
summary: Create Ubuntu images
description: |
Official tool for building Ubuntu images, currently supporing Ubuntu Core
snap-based images and preinstalled Ubuntu classic images.
version: 2.2+snap11
grade: stable
confinement: classic
base: core20
source-code: https://github.com/canonical/ubuntu-image
issues: https://bugs.launchpad.net/ubuntu-image/+filebug
# Force the snap to use fakeroot staged within the snap
environment:
FAKEROOT_FLAGS: "--lib $SNAP/usr/lib/lib-arch/libfakeroot/libfakeroot-tcp.so --faked $SNAP/usr/bin/faked-tcp"
PATH: $SNAP/usr/bin:$SNAP/bin:$SNAP/sbin:$PATH
GCONV_PATH: /snap/core20/current/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gconv
apps:
ubuntu-image:
command: bin/ubuntu-image
parts:
ubuntu-image:
plugin: go
source: .
source-type: git
build-packages:
- golang-go
- fdisk
- gdisk
- mtools
- python3-docutils
stage-packages:
- mtools
- fdisk
- gdisk
- e2fsprogs
- fakeroot
- dosfstools
- squashfs-tools
override-build: |
snapcraftctl build
# create a symlink /usr/bin/fakeroot -> /usr/bin/fakeroot-tcp
cd $SNAPCRAFT_PART_INSTALL/usr/bin/
ln -s fakeroot-tcp fakeroot
# Create a symbolic link to /usr/lib/<arch> where libfakeroot will live
cd $SNAPCRAFT_PART_INSTALL/usr/lib/
ln -s ${SNAPCRAFT_ARCH_TRIPLET} lib-arch