subiquity/snapcraft.yaml

252 lines
6.6 KiB
YAML
Raw Normal View History

2017-03-13 18:59:50 +00:00
name: subiquity
base: core22
2017-08-22 00:19:17 +00:00
version: git
2017-03-13 18:59:50 +00:00
summary: Ubuntu installer
description: The Ubuntu server installer
confinement: classic
source-code: https://github.com/canonical/subiquity
issues: https://bugs.launchpad.net/subiquity/+filebug
2022-07-26 23:42:52 +00:00
contact: https://bugs.launchpad.net/subiquity/+filebug
2017-03-13 18:59:50 +00:00
apps:
subiquity:
2021-10-07 21:43:38 +00:00
command: usr/bin/subiquity-cmd
environment:
# Save original values of environment variables, we want to restore them
# for the debug shell (LP: #1975629) and restart (LP: #1978139)
PYTHONPATH_ORIG: $PYTHONPATH
PATH_ORIG: $PATH
PYTHONIOENCODING_ORIG: $PYTHONIOENCODING
PYTHONIOENCODING: utf-8
SUBIQUITY_ROOT_ORIG: $SUBIQUITY_ROOT
SUBIQUITY_ROOT: $SNAP
PYTHON_ORIG: $PYTHON
PYTHON: $SNAP/usr/bin/python3.10
2017-03-13 18:59:50 +00:00
probert:
command: bin/probert
2020-09-23 01:29:01 +00:00
subiquity-server:
command: usr/bin/subiquity-server
daemon: simple
restart-condition: always
environment:
PYTHONIOENCODING: utf-8
SUBIQUITY_ROOT: $SNAP
PYTHON: $SNAP/usr/bin/python3.10
PY3OR2_PYTHON: $SNAP/usr/bin/python3.10
2022-06-29 16:17:58 +00:00
PATH: $PATH:$SNAP/bin:$SNAP/sbin
subiquity-service:
command: usr/bin/subiquity-service
daemon: simple
restart-condition: always
environment:
2022-06-13 17:39:06 +00:00
# Save original values of environment variables, we want to restore them
# for the debug shell (LP: #1975629).
PYTHONPATH_ORIG: $PYTHONPATH
PATH_ORIG: $PATH
PYTHONIOENCODING_ORIG: $PYTHONIOENCODING
PYTHONIOENCODING: utf-8
2022-06-13 17:39:06 +00:00
SUBIQUITY_ROOT_ORIG: $SUBIQUITY_ROOT
SUBIQUITY_ROOT: $SNAP
2022-06-13 17:39:06 +00:00
PYTHON_ORIG: $PYTHON
PYTHON: $SNAP/usr/bin/python3.10
os-prober:
command: usr/bin/os-prober
environment:
OS_PROBER_SHARE: $SNAP/usr/share
OS_PROBER_LIB: $SNAP/usr/lib
2017-03-13 18:59:50 +00:00
parts:
2018-11-19 00:58:25 +00:00
curtin:
plugin: nil
source: https://git.launchpad.net/curtin
source-type: git
2023-06-09 02:29:54 +00:00
source-commit: 6412598919202072d0d8b57827a120c963478d35
override-pull: |
craftctl default
PACKAGED_VERSION="$(git describe --long --abbrev=9 --match=[0-9][0-9]*)"
sed -e "s,@@PACKAGED_VERSION@@,$PACKAGED_VERSION,g" -i curtin/version.py
override-build: &pyinstall |
# We install without dependencies because all dependencies come from
# archive packages.
# XXX: On core22, running `pip3 install --prefix xxx` does not do the
# right thing. The package ends up installed in xxx/local and the modules
# get installed to dist-packages instead of site-packages.
# See https://discuss.python.org/t/18240
# As a workaround, we use a fake user install to get the package
# installed in the expected place.
PYTHONUSERBASE="$CRAFT_PART_INSTALL" pip3 install --user --no-dependencies .
build-packages:
- python3-pip
2018-11-19 02:06:41 +00:00
organize:
2022-08-29 19:54:43 +00:00
lib/python*/site-packages/usr/lib/curtin: usr/lib/
ubuntu-wsl-setup:
plugin: nil
source: .
source-type: git
override-build: |
mkdir -p $CRAFT_PART_INSTALL/bin
cp system_setup/ubuntu-wsl-setup $CRAFT_PART_INSTALL/bin/ubuntu-wsl-setup
2017-03-13 18:59:50 +00:00
subiquity:
plugin: nil
source: .
source-type: git
override-build: *pyinstall
build-packages:
- gettext
- lsb-release
- python3-pip
stage-packages:
# This list includes the dependencies for curtin and probert as well,
# there doesn't seem to be any real benefit to listing them separately.
2020-03-20 01:48:16 +00:00
- cloud-init
- iso-codes
- libpython3-stdlib
- libpython3.10-minimal
- libpython3.10-stdlib
- libsystemd0
- lsb-release
2022-06-29 16:17:58 +00:00
- ntfs-3g
- python3-aiohttp
- python3-apport
- python3-attr
- python3-bson
- python3-jsonschema
- python3-minimal
- python3-oauthlib
- python3-pkg-resources
- python3-pyroute2
- python3-pyrsistent
- python3-pyudev
- python3-requests
- python3-requests-unixsocket
- python3-systemd
- python3-urwid
- python3-yaml
- python3-yarl
- python3.10-minimal
- ssh-import-id
- ubuntu-advantage-tools
2017-03-13 18:59:50 +00:00
organize:
2022-08-29 19:54:43 +00:00
bin/subiquity-tui: usr/bin/subiquity
bin/subiquity-service: usr/bin/subiquity-service
bin/subiquity-server: usr/bin/subiquity-server
bin/subiquity-cmd: usr/bin/subiquity-cmd
build-attributes:
- enable-patchelf
users-and-groups:
2020-04-09 18:47:12 +00:00
plugin: nil
build-packages:
- user-setup
override-build: |
echo "get passwd/user-default-groups" | \
2017-10-11 07:57:12 +00:00
debconf-communicate user-setup | \
cut -d ' ' -f 2- > $CRAFT_PART_INSTALL/users-and-groups
2017-11-19 22:05:05 +00:00
stage:
- users-and-groups
user-setup:
plugin: nil
source: https://git.launchpad.net/ubuntu/+source/user-setup
source-type: git
override-build: cp -a reserved-usernames $CRAFT_PART_INSTALL/
stage:
- reserved-usernames
keyboard-data:
2020-04-09 18:47:12 +00:00
plugin: nil
build-packages:
- console-setup
- locales
- python3-attr
- python3-yaml
override-build: |
PYTHONPATH=$CRAFT_PROJECT_DIR/ $CRAFT_PROJECT_DIR/scripts/make-kbd-info.py
cp $CRAFT_PROJECT_DIR/kbds/keyboard-configuration.yaml \
$CRAFT_PART_INSTALL/kbds/keyboard-configuration.yaml
stage:
- kbds/
2018-06-25 22:54:00 +00:00
font:
plugin: dump
source: .
source-type: git
2018-11-27 01:28:36 +00:00
organize:
font/subiquity.psf: subiquity.psf
2018-06-25 22:54:00 +00:00
stage:
- subiquity.psf
languagelists:
plugin: nil
build-packages:
- localechooser-data
override-build: |
grep '^path-exclude=.*LC_MESSAGES.*' /etc/dpkg/dpkg.cfg.d/excludes && {
sed -i 's/^path-exclude.*LC_MESSAGES.*/#\0/g' /etc/dpkg/dpkg.cfg.d/excludes
apt-get -y install --reinstall iso-codes
} || true
$CRAFT_PROJECT_DIR/scripts/make-language-lists $CRAFT_PROJECT_DIR/po > $CRAFT_PART_INSTALL/languagelist
stage:
2020-05-11 04:36:42 +00:00
- languagelist
2017-03-13 18:59:50 +00:00
probert:
plugin: nil
source: https://github.com/canonical/probert.git
source-type: git
source-commit: a2053080cc9aacd38e36a37784299a0eda05e9f6
override-build: *pyinstall
build-packages:
- build-essential
- libnl-3-dev
- libnl-genl-3-dev
- libnl-route-3-dev
- pkg-config
- python3-dev
- python3-pip
2021-12-08 19:22:19 +00:00
build-attributes:
- enable-patchelf
2021-12-08 19:22:19 +00:00
os-prober:
plugin: nil
source-type: git
source: https://github.com/dbungert/os-prober
source-commit: 80d6a3157a814278af4f96da91f9ab7218e20fdc
build-packages:
- build-essential
- debhelper
- fakeroot
override-build: |
./debian/rules build
fakeroot ./debian/rules install
cp -a debian/os-prober/{usr,var} $CRAFT_PART_INSTALL
build-attributes:
- enable-patchelf