Skip to content
Snippets Groups Projects
Commit 9677873f authored by Denis Pynkin's avatar Denis Pynkin
Browse files

ospack: initial version


Based on version provided by Emanuele Aina.
Allows to create ospacks for all supported architectures and platforms.

Signed-off-by: default avatarDenis Pynkin <denis.pynkin@collabora.com>
Reviewed-by: default avatarEmanuele Aina <emanuele.aina@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D7203
parent a6997d29
No related branches found
No related tags found
No related merge requests found
{{- $architecture := or .architecture "amd64" }}
{{- $type := or .type "minimal" -}}
{{- $mirror := or .mirror "https://repositories.apertis.org/apertis/" -}}
{{- $suite := or .suite "17.12" -}}
{{- $timestamp := or .timestamp "00000000.0" -}}
{{- $ospack := or .ospack (printf "ospack_%s-%s-%s_%s.tar.gz" $suite $architecture $type $timestamp) -}}
architecture: {{ $architecture }}
actions:
- action: debootstrap
suite: {{ $suite }}
components:
- target
mirror: {{ $mirror }}
variant: minbase
keyringpackage: apertis-archive-keyring
merged-usr: false
# Extend apt sources list
- action: run
chroot: true
command: echo {{ printf "deb %s %s %s" $mirror $suite "hmi helper-libs" }} >> /etc/apt/sources.list
# Add type-based apt sources list
{{- if eq $type "development" "sdk" }}
- action: run
chroot: true
command: echo {{ printf "deb %s %s %s" $mirror $suite "development" }} >> /etc/apt/sources.list
{{- end }}
{{- if eq $type "sdk" }}
- action: run
chroot: true
command: echo {{ printf "deb %s %s %s" $mirror $suite $type }} >> /etc/apt/sources.list
{{- end }}
- action: apt
description: "Core packages"
packages:
- sudo
- apt-transport-https
- apertis-customizations
- initramfs-tools
- action: apt
description: "Base packages"
packages:
- busybox-initramfs
- dbus-user-session
- action: apt
description: "Bootflags packages"
packages:
- chaiwala-bootflags
- action: apt
description: "Networking packages"
packages:
- connman
- wpasupplicant
- action: apt
description: "AppArmor packages"
packages:
- apparmor
- chaiwala-apparmor-profiles
- action: apt
description: "Application framework packages"
packages:
- canterbury-core
- newport
- ribchester-core
{{- if eq $type "target" "development" "sdk" }}
- action: apt
description: "Target packages"
packages:
- apertis-target
- apertis-hmi
{{- end -}}
{{- if eq $type "development" "sdk" }}
- action: apt
description: "Development packages"
packages:
- apertis-development
- apertis-hmi-development
- openssh-server
{{- end }}
{{- if eq $type "sdk" }}
- action: apt
description: "SDK packages"
packages:
- apertis-sdk
{{- end }}
- action: overlay
source: overlays/arch-platform
- action: overlay
source: {{ printf "overlays/arch-%s" $type }}
- action: overlay
source: {{ printf "overlays/%s-platform" $architecture }}
- action: overlay
source: {{ printf "overlays/%s-%s" $architecture $type }}
- action: run
chroot: true
script: scripts/add-xdg-user-metadata.chroot
- action: run
chroot: true
script: scripts/create-mtab-symlink.hook.chroot
- action: run
chroot: true
script: scripts/move-root.chroot
- action: run
description: "Linking /Applications"
chroot: true
command: install -d -m 0755 /home/Applications && ln -sf home/Applications /Applications
{{- if eq $type "sdk" }}
- action: run
description: "Linking /opt/sysroot"
chroot: true
command: install -d -m 0755 /home/sysroot && ln -sf ../home/sysroot /opt/sysroot
{{- end }}
- action: run
chroot: true
script: scripts/setup_user.chroot
- action: run
chroot: true
script: scripts/add_user_to_groups.chroot
- action: run
chroot: true
script: scripts/check_sudoers_for_admin.chroot
- action: run
chroot: true
script: scripts/generate_openssh_keys.chroot
- action: run
chroot: true
script: scripts/add-initramfs-modules.chroot
- action: pack
compression: gz
file: {{ $ospack }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment