Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate scripts assuming they can use host tools/files #277

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/scripts/GRMLBASE/01-packages
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ set -e
# FAI sets $target, but shellcheck does not know that.
target=${target:?}

# OUTSIDE: This fragment assumes it runs outside the chroot.
echo -n > "${LOGDIR}"/package_errors.log # ensure we start with an empty file

PACKAGE_LIST=/grml-live/log/install_packages.list
1 change: 1 addition & 0 deletions config/scripts/GRMLBASE/47-update-wallpaper
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@ if [ ! -f "$FONTFILE" ]; then
exit 0
fi

# OUTSIDE: This fragment assumes it runs outside the chroot.
convert "$GRML_BG" -gravity center \
-fill white -font "$FONTFILE" \
-pointsize "$TITLE_FONTSIZE" \
4 changes: 4 additions & 0 deletions config/scripts/GRMLBASE/95-package-information
Original file line number Diff line number Diff line change
@@ -16,17 +16,20 @@ if ! [ -w "${LOGDIR}" ] ; then
exit 1
fi

# OUTSIDE: This fragment assumes it runs outside the chroot.
# store package list:
COLUMNS=200 $ROOTCMD dpkg --list > "${LOGDIR}"/dpkg.list
COLUMNS=200 $ROOTCMD dpkg --get-selections > "${LOGDIR}"/dpkg.selections

# OUTSIDE: This fragment assumes it runs outside the chroot.
# store list of packages sorted by size:
if [ -x "$target"/usr/bin/dpkg-query ] ; then
# shellcheck disable=SC2016 # Embedded $ is correct.
$ROOTCMD dpkg-query -W --showformat='${Package}\t${Installed-Size}\n' > \
"${LOGDIR}"/packages.size
fi

# OUTSIDE: This fragment assumes it runs outside the chroot.
# store a list of non-free packages and their licenses
echo "The following packages from the Debian non-free section are included in this release" \
> "${LOGDIR}"/nonfree-licenses.txt
@@ -35,6 +38,7 @@ echo >> "${LOGDIR}"/nonfree-licenses.txt
# copyright information for non-free packages
non_free_pkgs=$($ROOTCMD apt-cache show '~i' | awk '/^Package: / {pkg=$2} /^Section: non-free/ {print pkg}')

# OUTSIDE: This fragment assumes it runs outside the chroot.
for pkg in ${non_free_pkgs:-} ; do
echo "Package: ${pkg}" >> "${LOGDIR}"/nonfree-licenses.txt
echo "========================================================================" \
1 change: 1 addition & 0 deletions config/scripts/RELEASE/99-update-wallpaper
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ if [ ! -f "$FONTFILE" ]; then
exit 0
fi

# OUTSIDE: This fragment assumes it runs outside the chroot.
convert "$GRML_BG" -gravity center \
-fill white -font "$FONTFILE" \
-pointsize "$TITLE_FONTSIZE" \