Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix: moving recipe back to a directory available on the host (#47)
Browse files Browse the repository at this point in the history
* 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/.
  • Loading branch information
xynydev authored Apr 26, 2023
1 parent ec91345 commit 95ff830
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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; \
Expand All @@ -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; \
Expand All @@ -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
3 changes: 3 additions & 0 deletions recipe.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 95ff830

Please sign in to comment.