From 95ff830b49649fd3d76f54e7cce1727ace6ac6c6 Mon Sep 17 00:00:00 2001 From: Eino Rauhala <60004820+EinoHR@users.noreply.github.com> Date: Wed, 26 Apr 2023 19:19:31 +0300 Subject: [PATCH] fix: moving recipe back to a directory available on the host (#47) * fix: mv recipe to a dir available on the host * docs: add notice for recipe editing on host * fix: replace /tmp/ublue-recipe.yml with /usr/etc/. --- Containerfile | 2 +- build.sh | 6 +++--- recipe.yml | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Containerfile b/Containerfile index 56ded2b..6ee9b8e 100644 --- a/Containerfile +++ b/Containerfile @@ -18,7 +18,7 @@ RUN mkdir /tmp/scripts COPY scripts /tmp/scripts RUN find /tmp/scripts -type f -exec chmod +x {} \; -COPY ${RECIPE} /tmp/ublue-recipe.yml +COPY ${RECIPE} /usr/etc/ublue-recipe.yml # yq used in build.sh and the setup-flatpaks recipe to read the recipe.yml # copied from the official container image as it's not avaible as an rpm diff --git a/build.sh b/build.sh index d1354f3..b7ef05c 100644 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash # run scripts echo "-- Running scripts defined in recipe.yml --" -buildscripts=$(yq '.scripts[]' < /tmp/ublue-recipe.yml) +buildscripts=$(yq '.scripts[]' < /usr/etc/ublue-recipe.yml) for script in $(echo -e "$buildscripts"); do \ echo "Running: ${script}" && \ /tmp/scripts/$script; \ @@ -12,7 +12,7 @@ echo "---" rpm-ostree override remove firefox firefox-langpacks echo "-- Installing RPMs defined in recipe.yml --" -rpm_packages=$(yq '.rpms[]' < /tmp/ublue-recipe.yml) +rpm_packages=$(yq '.rpms[]' < /usr/etc/ublue-recipe.yml) for pkg in $(echo -e "$rpm_packages"); do \ echo "Installing: ${pkg}" && \ rpm-ostree install $pkg; \ @@ -25,7 +25,7 @@ pip install --prefix=/usr yafti # add a package group for yafti using the packages defined in recipe.yml yq -i '.screens.applications.values.groups.Custom.description = "Flatpaks defined by the image maintainer"' /usr/etc/yafti.yml yq -i '.screens.applications.values.groups.Custom.default = true' /usr/etc/yafti.yml -flatpaks=$(yq '.flatpaks[]' < /tmp/ublue-recipe.yml) +flatpaks=$(yq '.flatpaks[]' < /usr/etc/ublue-recipe.yml) for pkg in $(echo -e "$flatpaks"); do \ yq -i ".screens.applications.values.groups.Custom.packages += [{\"$pkg\": \"$pkg\"}]" /usr/etc/yafti.yml done diff --git a/recipe.yml b/recipe.yml index 21f29c7..28f084e 100644 --- a/recipe.yml +++ b/recipe.yml @@ -1,3 +1,6 @@ +# Warning: only edit this file inside the images git repository. +# If you are looking at this file in your root directory on your computer, editing it does nothing. + # The image will be at ghcr.io/yourusername/name name: startingpoint