Skip to content

Commit

Permalink
Rework wallpaper handling
Browse files Browse the repository at this point in the history
Previously we used fai to copy the base image for the desktop
wallpaper, but used the font directly from the host. Unify this
situation by using both from the host. To find the font and the
wallpaper, put them both into TEMPLATE_DIRECTORY, and include
this variable in CONFIGDUMP.
  • Loading branch information
zeha committed Dec 18, 2024
1 parent 94e6140 commit 5cb44a7
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion debian/grml-live.install
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ docs/grml-live-remaster.8 usr/share/man/man8/
docs/grml-live.8 usr/share/man/man8/
etc/grml etc
examples usr/share/doc/grml-live/
fonts usr/share/grml-live/
grml-live usr/sbin/
remaster/grml-live-remaster usr/sbin/
scripts usr/share/grml-live/
Expand All @@ -11,4 +10,5 @@ templates/GRML usr/share/grml-live/templates/
templates/boot/grub usr/share/grml-live/templates/boot/
templates/boot/isolinux usr/share/grml-live/templates/boot/
templates/secureboot usr/share/grml-live/templates/
templates/wallpaper usr/share/grml-live/templates/
templates/windows usr/share/grml-live/templates/
1 change: 1 addition & 0 deletions debian/grml-live.maintscript
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ rm_conffile /etc/grml/fai/config/files/etc/inittab/GRML_SMALL 0.43.0~
rm_conffile /etc/grml/fai/config/files/etc/locale.gen/GRML_FULL 0.49.3~
rm_conffile /etc/grml/fai/config/files/etc/lsb-base-logging.sh/GRMLBASE 0.42.3~
rm_conffile /etc/grml/fai/config/files/etc/systemd/system/[email protected]/override.conf/GRMLBASE 0.33.2~
rm_conffile /etc/grml/fai/config/files/usr/share/grml/desktop-bg.png/GRMLBASE 0.49.4~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/36-cpufrequtils 0.33.0~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/37-portmap 0.49.2~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/40-deborphan 0.35.0~
Expand Down
1 change: 0 additions & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/42-branding
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ set -u
set -e

fcopy -v /usr/share/initramfs-tools/scripts/init-top/grml
fcopy -v /usr/share/grml/desktop-bg.png
fcopy -v /usr/share/doc/grml-docs/startpage.html

## END OF FILE #################################################################
Expand Down
10 changes: 5 additions & 5 deletions etc/grml/fai/config/scripts/GRMLBASE/47-update-wallpaper
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@ target=${target:?}
# shellcheck source=/dev/null
. "$GRML_LIVE_CONFIG"

FONTFILE=${FONTFILE:-/usr/share/grml-live/fonts/graphicoreBitmapFont0-Light.otf}
FONTFILE=${FONTFILE:-"$TEMPLATE_DIRECTORY"/wallpaper/graphicoreBitmapFont0-Light.otf}
TITLE_FONTSIZE=${TITLE_FONTSIZE:-200}
VERSION_FONTSIZE=${VERSION_FONTSIZE:-100}
GRML_BG=${GRML_BG:-"$target"/usr/share/grml/desktop-bg.png}
GRML_BG=${GRML_BG:-"$TEMPLATE_DIRECTORY"/wallpaper/desktop-bg.png}
GRML_WALLPAPER=${GRML_WALLPAPER:-"$target"/usr/share/grml/desktop.jpg}

echo "Creating GRMLBASE wallpaper"

if [ ! -x "$(which convert)" ]; then
echo "convert not installed, skipping wallpaper."
exit 0
fi

if [ ! -f "$GRML_BG" ]; then
echo "Could not find Grml background image, skipping wallpaper"
echo "Could not find background image $GRML_BG, skipping wallpaper"
exit 0
fi

Expand All @@ -33,8 +35,6 @@ if [ ! -f "$FONTFILE" ]; then
exit 0
fi

echo "Creating standard wallpaper"

convert "$GRML_BG" -gravity center \
-fill white -font "$FONTFILE" \
-pointsize "$TITLE_FONTSIZE" \
Expand Down
9 changes: 4 additions & 5 deletions etc/grml/fai/config/scripts/RELEASE/99-update-wallpaper
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ target=${target:?}
# shellcheck source=/dev/null
. "$GRML_LIVE_CONFIG"

FONTFILE=${FONTFILE:-/usr/share/grml-live/fonts/graphicoreBitmapFont0-Light.otf}
FONTFILE=${FONTFILE:-"$TEMPLATE_DIRECTORY"/wallpaper/graphicoreBitmapFont0-Light.otf}
TITLE_FONTSIZE=${TITLE_FONTSIZE:-200}
GRML_BG=${GRML_BG:-$target/usr/share/grml/desktop-bg.png}
GRML_BG=${GRML_BG:-"$TEMPLATE_DIRECTORY"/wallpaper/desktop-bg.png}
GRML_WALLPAPER=${GRML_WALLPAPER:-$target/usr/share/grml/desktop.jpg}

echo "Creating release wallpaper"
echo "Creating RELEASE wallpaper"

if [ ! -x "$(which convert)" ]; then
echo "convert not installed, skipping release wallpaper."
exit 0
fi

if [ ! -f "$GRML_BG" ]; then
echo "Could not find Grml background image, skipping release wallpaper"
echo "Could not find background image $GRML_BG, skipping wallpaper"
exit 0
fi

Expand All @@ -34,7 +34,6 @@ if [ ! -f "$FONTFILE" ]; then
exit 0
fi


convert "$GRML_BG" -gravity center \
-fill white -font "$FONTFILE" \
-pointsize "$TITLE_FONTSIZE" \
Expand Down
2 changes: 1 addition & 1 deletion grml-live
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ einfo "Logging actions to logfile $LOGFILE"
# dump config variables into file, for script access {{{
CONFIGDUMP=$(mktemp)
set | grep -E \
'^(GRML_NAME|RELEASENAME|DATE|VERSION|SUITE|ARCH|DISTRI_NAME|USERNAME|HOSTNAME|APT_PROXY)=' \
'^(GRML_NAME|RELEASENAME|DATE|VERSION|SUITE|ARCH|DISTRI_NAME|TEMPLATE_DIRECTORY|USERNAME|HOSTNAME|APT_PROXY)=' \
> "${CONFIGDUMP}"
# }}}

Expand Down
File renamed without changes
File renamed without changes.

0 comments on commit 5cb44a7

Please sign in to comment.