[gnome-build-meta/valentindavid/ostree-devel-ref] Add an OSTree ref for development
- From: Valentin David <valentindavid src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/valentindavid/ostree-devel-ref] Add an OSTree ref for development
- Date: Mon, 20 Jul 2020 10:42:12 +0000 (UTC)
commit 08af77ebe2b70ed396feed40e502c8800e1b1aba
Author: Valentin David <valentin david codethink co uk>
Date: Tue Jul 7 13:07:24 2020 +0200
Add an OSTree ref for development
.gitlab-ci.yml | 21 ++++++++++++------
elements/vm/common-deps.bst | 7 +++---
elements/vm/deps-devel.bst | 9 ++++++++
elements/vm/filesystem-devel.bst | 14 ++++++++++++
elements/vm/initial-scripts-devel.bst | 7 ++++++
elements/vm/repo-devel.bst | 41 +++++++++++++++++++++++++++++++++++
files/vm/enable-developer-repository | 2 +-
project.conf | 3 ++-
utils/update-local-repo.sh | 5 +++--
9 files changed, 95 insertions(+), 14 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a9ece8f6..1898867a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -80,12 +80,20 @@ default:
dependencies: [track]
interruptible: true
script:
- - ${BST} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build core.bst flatpak-runtimes.bst
flatpak-platform-extensions.bst platform-manifest.bst sdk-manifest.bst
+ - TARGETS=(core.bst flatpak-runtimes.bst flatpak-platform-extensions.bst platform-manifest.bst
sdk-manifest.bst)
+
- |
- # Only run this build for x86_64, instead of building it somewhere else
- if [ "${ARCH}" == "x86_64" ]; then
- ${BST} build openh264-extension.bst:flatpak-repo.bst
- fi
+ case "${ARCH}" in
+ aarch64)
+ TARGETS+=(vm/repo.bst vm/repo-devel.bst)
+ ;;
+ x86_64)
+ TARGETS+=(vm/repo.bst vm/repo-devel.bst)
+ TARGETS+=(openh264-extension.bst:flatpak-repo.bst)
+ ;;
+ esac
+
+ - ${BST} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build "${TARGETS[@]}"
# Store all the downloaded git repos and tarballs in the cache.
# This saves us fetching them on every build
@@ -200,7 +208,7 @@ track:
interruptible: true
script:
- 'sed -i "s/track-tags: False/track-tags: ${BST_TRACK_TAGS}/" project.conf'
- - ${BST} track --deps all core.bst flatpak-runtimes.bst vm/image.bst boards/pinebook-pro/image.bst
boards/rock64/image.bst boards/raspberrypi-4/image.bst
+ - ${BST} track --deps all core.bst flatpak-runtimes.bst vm/image.bst boards/pinebook-pro/image.bst
boards/rock64/image.bst boards/raspberrypi-4/image.bst vm/repo-devel.bst
retry: 2
# only run on branches targeting master
rules:
@@ -227,7 +235,6 @@ build-gnome-core-arm:
extends: .build-template
<<: *arm
-
vm-image-x86_64:
extends: .vm-image-template
# run as soon as the x86_64 build job is done, don't wait for other arches
diff --git a/elements/vm/common-deps.bst b/elements/vm/common-deps.bst
index 1c4bf407..355f1271 100644
--- a/elements/vm/common-deps.bst
+++ b/elements/vm/common-deps.bst
@@ -1,7 +1,9 @@
kind: stack
runtime-depends:
-- core.bst
+- core/meta-gnome-core-os-services.bst
+- core/meta-gnome-core-shell.bst
+- core/meta-gnome-core-utilities.bst
- core/systemd-presets.bst
- sdk-platform.bst
@@ -23,8 +25,7 @@ runtime-depends:
- freedesktop-sdk.bst:components/gnupg-systemd.bst
- freedesktop-sdk.bst:components/linux-firmware.bst
- freedesktop-sdk.bst:components/man-db.bst
-- freedesktop-sdk.bst:components/man-pages-posix.bst
-- freedesktop-sdk.bst:components/man-pages.bst
+- freedesktop-sdk.bst:components/man-db-generate.bst
- freedesktop-sdk.bst:components/open-iscsi.bst
- freedesktop-sdk.bst:components/openssh-systemd.bst
- freedesktop-sdk.bst:components/steam-devices.bst
diff --git a/elements/vm/deps-devel.bst b/elements/vm/deps-devel.bst
new file mode 100644
index 00000000..ced8165f
--- /dev/null
+++ b/elements/vm/deps-devel.bst
@@ -0,0 +1,9 @@
+kind: stack
+
+runtime-depends:
+- core/meta-gnome-core-developer-tools.bst
+- vm/common-deps.bst
+- vm/initramfs.bst
+- freedesktop-sdk.bst:components/git.bst
+- freedesktop-sdk.bst:components/man-pages-posix.bst
+- freedesktop-sdk.bst:components/man-pages.bst
diff --git a/elements/vm/filesystem-devel.bst b/elements/vm/filesystem-devel.bst
new file mode 100644
index 00000000..c9a47f47
--- /dev/null
+++ b/elements/vm/filesystem-devel.bst
@@ -0,0 +1,14 @@
+kind: compose
+
+build-depends:
+- vm/deps-devel.bst
+- vm/initramfs.bst
+
+# Currently we just take everything and remove the
+# devel stuff (headers and static libraries), and debugging
+# symbols which take a huge amount of space, we could
+# refine this and make it much more selective, though.
+config:
+ exclude:
+ - devel
+ - debug
diff --git a/elements/vm/initial-scripts-devel.bst b/elements/vm/initial-scripts-devel.bst
new file mode 100644
index 00000000..e325be2e
--- /dev/null
+++ b/elements/vm/initial-scripts-devel.bst
@@ -0,0 +1,7 @@
+kind: collect_initial_scripts
+
+build-depends:
+- vm/deps-devel.bst
+
+config:
+ path: /etc/fdsdk/initial_scripts
diff --git a/elements/vm/repo-devel.bst b/elements/vm/repo-devel.bst
new file mode 100644
index 00000000..4ce7d054
--- /dev/null
+++ b/elements/vm/repo-devel.bst
@@ -0,0 +1,41 @@
+kind: script
+
+build-depends:
+- core-deps/libostree.bst
+- vm/filesystem-devel.bst
+- vm/initial-scripts-devel.bst
+- freedesktop-sdk.bst:vm/prepare-image.bst
+
+variables:
+ uuidnamespace: aea54278-2587-4075-ae67-8688ace4ce3d
+ ostree-layer: devel
+
+environment:
+ OSTREE_REPO: "%{install-root}"
+
+config:
+ layout:
+ - element: ''
+ destination: /tmp
+ - element: core-deps/libostree.bst
+ destination: /
+ - element: vm/filesystem-devel.bst
+ destination: /sysroot
+ - element: vm/initial-scripts-devel.bst
+ destination: /
+ - element: vm/prepare-image.bst
+ destination: /
+
+ commands:
+ - |
+ prepare-image.sh \
+ --sysroot /sysroot \
+ --seed "%{uuidnamespace}" \
+ --rootsource /dev/gpt-auto-root \
+ --efisource LABEL=EFI \
+ --efipath /boot >/dev/null
+
+ - mkdir -p "${OSTREE_REPO}"
+ - ostree init --repo="${OSTREE_REPO}" --mode=archive
+ - mv /sysroot/etc /sysroot/usr/etc
+ - ostree commit --fsync=false --branch=%{ostree-branch} --timestamp="$(date --date="@${SOURCE_DATE_EPOCH}"
--rfc-3339=seconds)" /sysroot
diff --git a/files/vm/enable-developer-repository b/files/vm/enable-developer-repository
index 9bb04fe8..bf704609 100644
--- a/files/vm/enable-developer-repository
+++ b/files/vm/enable-developer-repository
@@ -2,7 +2,7 @@
set -eu
-DEFAULT_REF="gnome-os/@@ARCH@@/devel"
+DEFAULT_REF="gnome-os/devel/@@ARCH@@/git"
DEFAULT_NAME="local"
DEFAULT_URL="http://10.0.2.2:8000/"
DEFAULT_GPG="http://10.0.2.2:8000/key.gpg"
diff --git a/project.conf b/project.conf
index e0cf6ab4..cbdf905c 100644
--- a/project.conf
+++ b/project.conf
@@ -206,7 +206,8 @@ shell:
variables:
branch: master
- ostree-branch: "gnome-os/%{arch}/%{branch}"
+ ostree-layer: user
+ ostree-branch: "gnome-os/%{branch}/%{arch}-%{ostree-layer}"
ostree-remote-url: "https://nightly.gnome.org/gnomeos/repo"
gcc_arch: "%{arch}"
abi: "gnu"
diff --git a/utils/update-local-repo.sh b/utils/update-local-repo.sh
index 2f8cd591..a1d6c3b0 100755
--- a/utils/update-local-repo.sh
+++ b/utils/update-local-repo.sh
@@ -5,7 +5,8 @@ set -eu
: ${BST:=bst}
export BST
-: ${REPO_ELEMENT:=vm/repo.bst}
+: ${REPO_ELEMENT:=vm-devel/repo.bst}
+: ${OSTREE_LAYER:=git}
ref="$(${BST} show --format "%{vars}" --deps none "${REPO_ELEMENT}" | sed '/ostree-branch: /{;s///;q;};d')"
@@ -33,7 +34,7 @@ utils/update-repo.sh \
--gpg-homedir=ostree-gpg \
--gpg-sign="$(cat ostree-gpg/default-id)" \
--collection-id=org.gnome.GnomeOS \
- --target-ref="${ref%/*}/devel" \
+ --target-ref="${ref%-*}-${OSTREE_LAYER}" \
ostree-repo "${REPO_ELEMENT}" \
"${ref}"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]