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

Commit

Permalink
feat: install rpms from recipe.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xynydev committed Feb 26, 2023
1 parent ae2e25b commit f799d3f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,26 @@ COPY usr /usr

COPY ublue-firstboot /usr/bin

COPY recipe.yml /etc/ublue-recipe.yml

# https://github.com/TomWright/dasel is a single-binary program used for reading the recipe.yml.
# It is not available as an rpm.
RUN curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o /usr/bin/dasel && \
chmod +x /usr/bin/dasel

RUN rpm-ostree override remove firefox firefox-langpacks && \
rpm-ostree install distrobox gnome-tweaks just vte291-gtk4-devel vanilla-first-setup && \
rpm-ostree install vte291-gtk4-devel vanilla-first-setup && \

echo "-- Installing RPMs defined in recipe.yml --" && \
rpm_packages=$(dasel -f /etc/ublue-recipe.yml -r yaml -w json -s 'rpm_packages') && \
rpm_packages_count=$(echo $rpm_packages | dasel -r json -s 'len()') && \
for i in $( seq 0 $(($rpm_packages_count-1)) ); do \
pkg=$(echo $rpm_packages | dasel -r json "[${i}]" | tr -d '"') && \
echo "Installing: ${pkg}" && \
rpm-ostree install $pkg; \
done && \
echo "---" && \

sed -i 's/#AutomaticUpdatePolicy.*/AutomaticUpdatePolicy=stage/' /etc/rpm-ostreed.conf && \
systemctl enable rpm-ostreed-automatic.timer && \
systemctl enable flatpak-system-update.timer && \
Expand Down
4 changes: 4 additions & 0 deletions recipe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rpm_packages:
- distrobox
- gnome-tweaks
- just

0 comments on commit f799d3f

Please sign in to comment.