feat: add extra repos field to recipe (#52)

* feat: add extra repos field to recipe

* fix: semicolon before "done" keyword in shell

* fix: don't put repos in /usr/etc/
This commit is contained in:
Eino Rauhala
2023-04-28 16:55:37 +03:00
committed by GitHub
parent 5f4ac049a7
commit c537104ba2
2 changed files with 15 additions and 0 deletions

View File

@@ -11,6 +11,15 @@ echo "---"
# remove the default firefox (from fedora) in favor of the flatpak # remove the default firefox (from fedora) in favor of the flatpak
rpm-ostree override remove firefox firefox-langpacks rpm-ostree override remove firefox firefox-langpacks
repos=$(yq '.extrarepos[]' < /usr/etc/ublue-recipe.yml)
if [[ -n "$repos" ]]; then
echo "-- Adding repos defined in recipe.yml --"
for repo in $(echo -e "$repos"); do \
wget $repo -P /etc/yum.repos.d/; \
done
echo "---"
fi
echo "-- Installing RPMs defined in recipe.yml --" echo "-- Installing RPMs defined in recipe.yml --"
rpm_packages=$(yq '.rpms[]' < /usr/etc/ublue-recipe.yml) rpm_packages=$(yq '.rpms[]' < /usr/etc/ublue-recipe.yml)
for pkg in $(echo -e "$rpm_packages"); do \ for pkg in $(echo -e "$rpm_packages"); do \

View File

@@ -22,6 +22,12 @@ description: A starting point for further customization of uBlue images. Make yo
scripts: scripts:
# - example.sh # - example.sh
# a list of urls of .repo files that should be added to your system
# this is the proper way to add copr repos to your image
extrarepos:
# example:
# - https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-37/atim-starship-fedora-37.repo
# These rpms will be installed from the fedora repository # These rpms will be installed from the fedora repository
# using rpm-ostree and will be preinstalled in the final image # using rpm-ostree and will be preinstalled in the final image
rpms: rpms: