Skip to content

Commit

Permalink
feat: add extra repos field to recipe (#52)
Browse files Browse the repository at this point in the history
* feat: add extra repos field to recipe

* fix: semicolon before "done" keyword in shell

* fix: don't put repos in /usr/etc/
  • Loading branch information
xynydev authored Apr 28, 2023
1 parent 5f4ac04 commit c537104
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ echo "---"
# remove the default firefox (from fedora) in favor of the flatpak
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 --"
rpm_packages=$(yq '.rpms[]' < /usr/etc/ublue-recipe.yml)
for pkg in $(echo -e "$rpm_packages"); do \
Expand Down
6 changes: 6 additions & 0 deletions recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ description: A starting point for further customization of uBlue images. Make yo
scripts:
# - 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
# using rpm-ostree and will be preinstalled in the final image
rpms:
Expand Down

0 comments on commit c537104

Please sign in to comment.