Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
fix: prevent /etc/ merge issues (blue-build#43)
Browse files Browse the repository at this point in the history
* fix: prevent /etc/ merge issues
discussed at length in #28
also including tons of comments about the issue

* fix: change references of /etc/ to /usr/etc
  • Loading branch information
xynydev authored Apr 26, 2023
1 parent 37143b0 commit 085d26a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ FROM ${BASE_CONTAINER_URL}:${FEDORA_MAJOR_VERSION}
ARG RECIPE

# copy over configuration files
COPY etc /etc
# etc is copied to /usr/etc/ to prevent "merge conflicts"
# as it is the proper directory for "system" configuration files
# and /etc/ is for editing by the local admin
# see issue #28 (https://github.com/ublue-os/startingpoint/issues/28)
COPY etc /usr/etc
# uncomment below line if you need to put config files in /usr/
# COPY usr /usr

# copy scripts
Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ echo "---"
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"' /etc/yafti.yml
yq -i '.screens.applications.values.groups.Custom.default = true' /etc/yafti.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)
for pkg in $(echo -e "$flatpaks"); do \
yq -i ".screens.applications.values.groups.Custom.packages += [{\"$pkg\": \"$pkg\"}]" /etc/yafti.yml
yq -i ".screens.applications.values.groups.Custom.packages += [{\"$pkg\": \"$pkg\"}]" /usr/etc/yafti.yml
done
2 changes: 1 addition & 1 deletion etc/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ distrobox-ubuntu:
setup-flatpaks:
#!/bin/bash
echo 'Installing flatpaks from the ublue recipe ...'
flatpaks=$(yq '.flatpaks[]' < /etc/ublue-recipe.yml)
flatpaks=$(yq '.flatpaks[]' < /usr/etc/ublue-recipe.yml)
for pkg in $flatpaks; do \
echo "Installing: ${pkg}" && \
flatpak install --user --noninteractive flathub $pkg; \
Expand Down
2 changes: 1 addition & 1 deletion etc/profile.d/ublue-firstboot.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if test "$(id -u)" -gt "0" && test -d "$HOME"; then
if test ! -e "$HOME"/.config/autostart/ublue-firstboot.desktop; then
mkdir -p "$HOME"/.config/autostart
cp -f /etc/skel.d/.config/autostart/ublue-firstboot.desktop "$HOME"/.config/autostart
cp -f /usr/etc/skel.d/.config/autostart/ublue-firstboot.desktop "$HOME"/.config/autostart
fi
fi
2 changes: 1 addition & 1 deletion etc/skel.d/.config/autostart/ublue-firstboot.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=uBlue First Boot Setup
Comment=Sets up uBlue Desktop Correctly On FirstBoot
Exec=/usr/bin/yafti /etc/yafti.yml
Exec=/usr/bin/yafti /usr/etc/yafti.yml
Icon=org.gnome.Terminal
Type=Application
Categories=Utility;System;
Expand Down

0 comments on commit 085d26a

Please sign in to comment.