From 5e2e9a159ad6ad208d4a75f6ca0060704382c2c3 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Thu, 30 Jan 2025 22:42:38 +0100 Subject: [PATCH] Adopt new layout for files/, class/, hooks/ files// becomes files//. class/.var becomes env/. hooks/. becomes hooks//. --- config/{class/GRMLBASE.var => env/GRMLBASE} | 0 .../etc/apt/sources.list.d/debian.sources} | 0 .../etc/apt/sources.list.d/debian.sources} | 0 .../etc/apt/sources.list.d/debian.sources} | 0 .../etc/apt/sources.list.d/debian.sources} | 0 .../etc/apt/sources.list.d/debian.sources} | 0 .../etc/apt/sources.list.d/debian.sources} | 0 .../etc/apt/apt.conf.d/15grml-live} | 2 +- .../etc/apt/apt.conf.d/20pdiffs} | 0 .../etc/apt/preferences.d/15grml.pref} | 0 .../etc/apt/sources.list} | 2 +- .../etc/apt/sources.list.d/grml.sources} | 0 .../etc/cloud/cloud.cfg.d/42_grml.cfg} | 2 +- .../etc/default/console-setup} | 2 +- .../fstab/GRMLBASE => GRMLBASE/etc/fstab} | 2 +- .../hosts/GRMLBASE => GRMLBASE/etc/hosts} | 2 +- .../etc/initramfs-tools/conf.d/xz-compress} | 0 .../GRMLBASE => GRMLBASE/etc/locale.conf} | 2 +- .../GRMLBASE => GRMLBASE/etc/locale.gen} | 2 +- .../etc/modprobe.d/loop-part.conf} | 2 +- .../etc/modules-load.d/grml.conf} | 2 +- .../{etc/motd/GRMLBASE => GRMLBASE/etc/motd} | 0 .../etc/network/interfaces} | 2 +- .../etc/sudoers.d/user-nopasswd} | 2 +- .../etc/systemd/logind.conf.d/grml.conf} | 0 .../etc/systemd/system-preset/10-grml.preset} | 0 .../getty@tty1.service.d/override.conf} | 0 .../getty@tty10.service.d/override.conf} | 0 .../getty@tty11.service.d/override.conf} | 0 .../getty@tty12.service.d/override.conf} | 0 .../getty@tty2.service.d/override.conf} | 0 .../getty@tty3.service.d/override.conf} | 0 .../getty@tty4.service.d/override.conf} | 0 .../getty@tty5.service.d/override.conf} | 0 .../getty@tty6.service.d/override.conf} | 0 .../getty@tty7.service.d/override.conf} | 0 .../etc/systemd/system/grml-boot.target} | 0 .../serial-getty@.service.d/override.conf} | 0 .../systemd/system/ssh.service.d/keygen.conf} | 0 .../etc/tmpfiles.d/man-db.conf} | 2 +- .../usr/share/doc/grml-docs/startpage.html} | 0 .../initramfs-tools/scripts/init-top/grml} | 2 +- .../share/keyrings/grml-archive-keyring.gpg} | Bin .../etc/firefox-esr/firefox-esr.js} | 0 .../LOCALES => LOCALES/etc/locale.gen} | 2 +- .../{instsoft.GRMLBASE => GRMLBASE/instsoft} | 0 .../updatebase} | 0 config/hooks/{instsoft.ZFS => ZFS/instsoft} | 0 docs/grml-live.txt | 6 +- etc/grml/grml-live.conf | 4 +- usr/lib/grml-live/minifai | 81 +++++++++++------- 51 files changed, 72 insertions(+), 49 deletions(-) rename config/{class/GRMLBASE.var => env/GRMLBASE} (100%) rename config/files/{etc/apt/sources.list.d/debian.sources/DEBIAN_BOOKWORM => DEBIAN_BOOKWORM/etc/apt/sources.list.d/debian.sources} (100%) rename config/files/{etc/apt/sources.list.d/debian.sources/DEBIAN_BULLSEYE => DEBIAN_BULLSEYE/etc/apt/sources.list.d/debian.sources} (100%) rename config/files/{etc/apt/sources.list.d/debian.sources/DEBIAN_STABLE => DEBIAN_STABLE/etc/apt/sources.list.d/debian.sources} (100%) rename config/files/{etc/apt/sources.list.d/debian.sources/DEBIAN_TESTING => DEBIAN_TESTING/etc/apt/sources.list.d/debian.sources} (100%) rename config/files/{etc/apt/sources.list.d/debian.sources/DEBIAN_TRIXIE => DEBIAN_TRIXIE/etc/apt/sources.list.d/debian.sources} (100%) rename config/files/{etc/apt/sources.list.d/debian.sources/DEBIAN_UNSTABLE => DEBIAN_UNSTABLE/etc/apt/sources.list.d/debian.sources} (100%) rename config/files/{etc/apt/apt.conf.d/15grml-live/GRMLBASE => GRMLBASE/etc/apt/apt.conf.d/15grml-live} (74%) rename config/files/{etc/apt/apt.conf.d/20pdiffs/GRMLBASE => GRMLBASE/etc/apt/apt.conf.d/20pdiffs} (100%) rename config/files/{etc/apt/preferences.d/15grml.pref/GRMLBASE => GRMLBASE/etc/apt/preferences.d/15grml.pref} (100%) rename config/files/{etc/apt/sources.list/GRMLBASE => GRMLBASE/etc/apt/sources.list} (88%) rename config/files/{etc/apt/sources.list.d/grml.sources/GRMLBASE => GRMLBASE/etc/apt/sources.list.d/grml.sources} (100%) rename config/files/{etc/cloud/cloud.cfg.d/42_grml.cfg/GRMLBASE => GRMLBASE/etc/cloud/cloud.cfg.d/42_grml.cfg} (92%) rename config/files/{etc/default/console-setup/GRMLBASE => GRMLBASE/etc/default/console-setup} (86%) rename config/files/{etc/fstab/GRMLBASE => GRMLBASE/etc/fstab} (96%) rename config/files/{etc/hosts/GRMLBASE => GRMLBASE/etc/hosts} (86%) rename config/files/{etc/initramfs-tools/conf.d/xz-compress/GRMLBASE => GRMLBASE/etc/initramfs-tools/conf.d/xz-compress} (100%) rename config/files/{etc/locale.conf/GRMLBASE => GRMLBASE/etc/locale.conf} (84%) rename config/files/{etc/locale.gen/GRMLBASE => GRMLBASE/etc/locale.gen} (93%) rename config/files/{etc/modprobe.d/loop-part.conf/GRMLBASE => GRMLBASE/etc/modprobe.d/loop-part.conf} (89%) rename config/files/{etc/modules-load.d/grml.conf/GRMLBASE => GRMLBASE/etc/modules-load.d/grml.conf} (85%) rename config/files/{etc/motd/GRMLBASE => GRMLBASE/etc/motd} (100%) rename config/files/{etc/network/interfaces/GRMLBASE => GRMLBASE/etc/network/interfaces} (83%) rename config/files/{etc/sudoers.d/user-nopasswd/GRMLBASE => GRMLBASE/etc/sudoers.d/user-nopasswd} (92%) rename config/files/{etc/systemd/logind.conf.d/grml.conf/GRMLBASE => GRMLBASE/etc/systemd/logind.conf.d/grml.conf} (100%) rename config/files/{etc/systemd/system-preset/10-grml.preset/GRMLBASE => GRMLBASE/etc/systemd/system-preset/10-grml.preset} (100%) rename config/files/{etc/systemd/system/getty@tty1.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty1.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/getty@tty10.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty10.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/getty@tty11.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty11.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/getty@tty12.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty12.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/getty@tty2.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty2.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/getty@tty3.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty3.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/getty@tty4.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty4.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/getty@tty5.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty5.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/getty@tty6.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty6.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/getty@tty7.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/getty@tty7.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/grml-boot.target/GRMLBASE => GRMLBASE/etc/systemd/system/grml-boot.target} (100%) rename config/files/{etc/systemd/system/serial-getty@.service.d/override.conf/GRMLBASE => GRMLBASE/etc/systemd/system/serial-getty@.service.d/override.conf} (100%) rename config/files/{etc/systemd/system/ssh.service.d/keygen.conf/GRMLBASE => GRMLBASE/etc/systemd/system/ssh.service.d/keygen.conf} (100%) rename config/files/{etc/tmpfiles.d/man-db.conf/GRMLBASE => GRMLBASE/etc/tmpfiles.d/man-db.conf} (76%) rename config/files/{usr/share/doc/grml-docs/startpage.html/GRMLBASE => GRMLBASE/usr/share/doc/grml-docs/startpage.html} (100%) rename config/files/{usr/share/initramfs-tools/scripts/init-top/grml/GRMLBASE => GRMLBASE/usr/share/initramfs-tools/scripts/init-top/grml} (98%) rename config/files/{usr/share/keyrings/grml-archive-keyring.gpg/GRMLBASE => GRMLBASE/usr/share/keyrings/grml-archive-keyring.gpg} (100%) rename config/files/{etc/firefox-esr/firefox-esr.js/GRML_FULL => GRML_FULL/etc/firefox-esr/firefox-esr.js} (100%) rename config/files/{etc/locale.gen/LOCALES => LOCALES/etc/locale.gen} (97%) rename config/hooks/{instsoft.GRMLBASE => GRMLBASE/instsoft} (100%) rename config/hooks/{updatebase.GRMLBASE => GRMLBASE/updatebase} (100%) rename config/hooks/{instsoft.ZFS => ZFS/instsoft} (100%) diff --git a/config/class/GRMLBASE.var b/config/env/GRMLBASE similarity index 100% rename from config/class/GRMLBASE.var rename to config/env/GRMLBASE diff --git a/config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_BOOKWORM b/config/files/DEBIAN_BOOKWORM/etc/apt/sources.list.d/debian.sources similarity index 100% rename from config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_BOOKWORM rename to config/files/DEBIAN_BOOKWORM/etc/apt/sources.list.d/debian.sources diff --git a/config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_BULLSEYE b/config/files/DEBIAN_BULLSEYE/etc/apt/sources.list.d/debian.sources similarity index 100% rename from config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_BULLSEYE rename to config/files/DEBIAN_BULLSEYE/etc/apt/sources.list.d/debian.sources diff --git a/config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_STABLE b/config/files/DEBIAN_STABLE/etc/apt/sources.list.d/debian.sources similarity index 100% rename from config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_STABLE rename to config/files/DEBIAN_STABLE/etc/apt/sources.list.d/debian.sources diff --git a/config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_TESTING b/config/files/DEBIAN_TESTING/etc/apt/sources.list.d/debian.sources similarity index 100% rename from config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_TESTING rename to config/files/DEBIAN_TESTING/etc/apt/sources.list.d/debian.sources diff --git a/config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_TRIXIE b/config/files/DEBIAN_TRIXIE/etc/apt/sources.list.d/debian.sources similarity index 100% rename from config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_TRIXIE rename to config/files/DEBIAN_TRIXIE/etc/apt/sources.list.d/debian.sources diff --git a/config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_UNSTABLE b/config/files/DEBIAN_UNSTABLE/etc/apt/sources.list.d/debian.sources similarity index 100% rename from config/files/etc/apt/sources.list.d/debian.sources/DEBIAN_UNSTABLE rename to config/files/DEBIAN_UNSTABLE/etc/apt/sources.list.d/debian.sources diff --git a/config/files/etc/apt/apt.conf.d/15grml-live/GRMLBASE b/config/files/GRMLBASE/etc/apt/apt.conf.d/15grml-live similarity index 74% rename from config/files/etc/apt/apt.conf.d/15grml-live/GRMLBASE rename to config/files/GRMLBASE/etc/apt/apt.conf.d/15grml-live index 393b7df72..7f0fe0d95 100644 --- a/config/files/etc/apt/apt.conf.d/15grml-live/GRMLBASE +++ b/config/files/GRMLBASE/etc/apt/apt.conf.d/15grml-live @@ -1,4 +1,4 @@ -// Installed via ${GRML_FAI_CONFIG}/files/etc/apt/apt.conf.d/15grml-live/GRMLBASE +// Installed via ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/apt/apt.conf.d/15grml-live // Recommends just pull in way tooooo much packages, so disable it: APT::Install-Recommends false; // added by grml-live diff --git a/config/files/etc/apt/apt.conf.d/20pdiffs/GRMLBASE b/config/files/GRMLBASE/etc/apt/apt.conf.d/20pdiffs similarity index 100% rename from config/files/etc/apt/apt.conf.d/20pdiffs/GRMLBASE rename to config/files/GRMLBASE/etc/apt/apt.conf.d/20pdiffs diff --git a/config/files/etc/apt/preferences.d/15grml.pref/GRMLBASE b/config/files/GRMLBASE/etc/apt/preferences.d/15grml.pref similarity index 100% rename from config/files/etc/apt/preferences.d/15grml.pref/GRMLBASE rename to config/files/GRMLBASE/etc/apt/preferences.d/15grml.pref diff --git a/config/files/etc/apt/sources.list/GRMLBASE b/config/files/GRMLBASE/etc/apt/sources.list similarity index 88% rename from config/files/etc/apt/sources.list/GRMLBASE rename to config/files/GRMLBASE/etc/apt/sources.list index ec65bc2c0..7e9691a27 100644 --- a/config/files/etc/apt/sources.list/GRMLBASE +++ b/config/files/GRMLBASE/etc/apt/sources.list @@ -1,6 +1,6 @@ ################################################################### # Installed via grml-live's -# ${GRML_FAI_CONFIG}/files/etc/apt/sources.list/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/apt/sources.list ################################################################### ##### IMPORTANT NOTE ############################################## diff --git a/config/files/etc/apt/sources.list.d/grml.sources/GRMLBASE b/config/files/GRMLBASE/etc/apt/sources.list.d/grml.sources similarity index 100% rename from config/files/etc/apt/sources.list.d/grml.sources/GRMLBASE rename to config/files/GRMLBASE/etc/apt/sources.list.d/grml.sources diff --git a/config/files/etc/cloud/cloud.cfg.d/42_grml.cfg/GRMLBASE b/config/files/GRMLBASE/etc/cloud/cloud.cfg.d/42_grml.cfg similarity index 92% rename from config/files/etc/cloud/cloud.cfg.d/42_grml.cfg/GRMLBASE rename to config/files/GRMLBASE/etc/cloud/cloud.cfg.d/42_grml.cfg index 5e014f4b3..9d90e51fe 100644 --- a/config/files/etc/cloud/cloud.cfg.d/42_grml.cfg/GRMLBASE +++ b/config/files/GRMLBASE/etc/cloud/cloud.cfg.d/42_grml.cfg @@ -2,7 +2,7 @@ # # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/51-cloud-init script, using -# ${GRML_FAI_CONFIG}/files/etc/cloud/cloud.cfg.d/42_grml.cfg/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/cloud/cloud.cfg.d/42_grml.cfg system_info: # This will affect which distro class gets used diff --git a/config/files/etc/default/console-setup/GRMLBASE b/config/files/GRMLBASE/etc/default/console-setup similarity index 86% rename from config/files/etc/default/console-setup/GRMLBASE rename to config/files/GRMLBASE/etc/default/console-setup index 4ee35227b..2342f2064 100644 --- a/config/files/etc/default/console-setup/GRMLBASE +++ b/config/files/GRMLBASE/etc/default/console-setup @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/26-console-setup script, using -# ${GRML_FAI_CONFIG}/files/etc/default/console-setup/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/default/console-setup # CONFIGURATION FILE FOR SETUPCON # Consult the console-setup(5) manual page. diff --git a/config/files/etc/fstab/GRMLBASE b/config/files/GRMLBASE/etc/fstab similarity index 96% rename from config/files/etc/fstab/GRMLBASE rename to config/files/GRMLBASE/etc/fstab index 90d253604..3d6c611a3 100644 --- a/config/files/etc/fstab/GRMLBASE +++ b/config/files/GRMLBASE/etc/fstab @@ -2,7 +2,7 @@ # # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/30-fstab script, using -# ${GRML_FAI_CONFIG}/files/etc/fstab/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/fstab # # /dev/fd0 /media/floppy auto user,noauto,exec 0 0 diff --git a/config/files/etc/hosts/GRMLBASE b/config/files/GRMLBASE/etc/hosts similarity index 86% rename from config/files/etc/hosts/GRMLBASE rename to config/files/GRMLBASE/etc/hosts index 4d7d1c8cf..b109e0c67 100644 --- a/config/files/etc/hosts/GRMLBASE +++ b/config/files/GRMLBASE/etc/hosts @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/34-hosts script, using -# ${GRML_FAI_CONFIG}/files/etc/hosts/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/hosts 127.0.0.1 $HOSTNAME localhost diff --git a/config/files/etc/initramfs-tools/conf.d/xz-compress/GRMLBASE b/config/files/GRMLBASE/etc/initramfs-tools/conf.d/xz-compress similarity index 100% rename from config/files/etc/initramfs-tools/conf.d/xz-compress/GRMLBASE rename to config/files/GRMLBASE/etc/initramfs-tools/conf.d/xz-compress diff --git a/config/files/etc/locale.conf/GRMLBASE b/config/files/GRMLBASE/etc/locale.conf similarity index 84% rename from config/files/etc/locale.conf/GRMLBASE rename to config/files/GRMLBASE/etc/locale.conf index 5fc3be75b..0cbc2370b 100644 --- a/config/files/etc/locale.conf/GRMLBASE +++ b/config/files/GRMLBASE/etc/locale.conf @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/25-locales script, using -# ${GRML_FAI_CONFIG}/files/etc/locale.conf/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/locale.conf ################################################################################ # This file lists the locales configuration as used by e.g. systemd-firstboot LANG=C.UTF-8 diff --git a/config/files/etc/locale.gen/GRMLBASE b/config/files/GRMLBASE/etc/locale.gen similarity index 93% rename from config/files/etc/locale.gen/GRMLBASE rename to config/files/GRMLBASE/etc/locale.gen index e0ca7bb2c..17f3a3494 100644 --- a/config/files/etc/locale.gen/GRMLBASE +++ b/config/files/GRMLBASE/etc/locale.gen @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/25-locales script, using -# ${GRML_FAI_CONFIG}/files/etc/locale.gen/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/locale.gen ################################################################################ # This file lists locales that you wish to have built. You can find a list # of valid supported locales at /usr/share/i18n/SUPPORTED. Other diff --git a/config/files/etc/modprobe.d/loop-part.conf/GRMLBASE b/config/files/GRMLBASE/etc/modprobe.d/loop-part.conf similarity index 89% rename from config/files/etc/modprobe.d/loop-part.conf/GRMLBASE rename to config/files/GRMLBASE/etc/modprobe.d/loop-part.conf index bb39ab551..bfa569eb3 100644 --- a/config/files/etc/modprobe.d/loop-part.conf/GRMLBASE +++ b/config/files/GRMLBASE/etc/modprobe.d/loop-part.conf @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/39-modprobe script, using -# ${GRML_FAI_CONFIG}/files/etc/modprobe.d/loop-part.conf/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/modprobe.d/loop-part.conf # # Filename: /etc/modprobe.d/loop-part.conf # Purpose: Enable partitions for loop devices per default in Grml diff --git a/config/files/etc/modules-load.d/grml.conf/GRMLBASE b/config/files/GRMLBASE/etc/modules-load.d/grml.conf similarity index 85% rename from config/files/etc/modules-load.d/grml.conf/GRMLBASE rename to config/files/GRMLBASE/etc/modules-load.d/grml.conf index ef9ee41e9..711b1c39b 100644 --- a/config/files/etc/modules-load.d/grml.conf/GRMLBASE +++ b/config/files/GRMLBASE/etc/modules-load.d/grml.conf @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/41-modules script, using -# ${GRML_FAI_CONFIG}/files/etc/modules-load.d/grml.conf/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/modules-load.d/grml.conf ################################################################################ # This file should contain the names of kernel modules that are # to be loaded at boot time, one per line. Comments begin with diff --git a/config/files/etc/motd/GRMLBASE b/config/files/GRMLBASE/etc/motd similarity index 100% rename from config/files/etc/motd/GRMLBASE rename to config/files/GRMLBASE/etc/motd diff --git a/config/files/etc/network/interfaces/GRMLBASE b/config/files/GRMLBASE/etc/network/interfaces similarity index 83% rename from config/files/etc/network/interfaces/GRMLBASE rename to config/files/GRMLBASE/etc/network/interfaces index de5b967c0..c40109433 100644 --- a/config/files/etc/network/interfaces/GRMLBASE +++ b/config/files/GRMLBASE/etc/network/interfaces @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/35-network script, using -# ${GRML_FAI_CONFIG}/files/etc/network/interfaces/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) diff --git a/config/files/etc/sudoers.d/user-nopasswd/GRMLBASE b/config/files/GRMLBASE/etc/sudoers.d/user-nopasswd similarity index 92% rename from config/files/etc/sudoers.d/user-nopasswd/GRMLBASE rename to config/files/GRMLBASE/etc/sudoers.d/user-nopasswd index b2418abf1..b10bb9544 100644 --- a/config/files/etc/sudoers.d/user-nopasswd/GRMLBASE +++ b/config/files/GRMLBASE/etc/sudoers.d/user-nopasswd @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/20-sudo script, using -# ${GRML_FAI_CONFIG}/files/etc/sudoers.d/user-nopasswd/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/sudoers.d/user-nopasswd # WARNING: This allows the unprivileged $USERNAME user to start commands as root # WARNING: This is totally insecure and (almost) makes $USERNAME a second root account. diff --git a/config/files/etc/systemd/logind.conf.d/grml.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/logind.conf.d/grml.conf similarity index 100% rename from config/files/etc/systemd/logind.conf.d/grml.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/logind.conf.d/grml.conf diff --git a/config/files/etc/systemd/system-preset/10-grml.preset/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system-preset/10-grml.preset similarity index 100% rename from config/files/etc/systemd/system-preset/10-grml.preset/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system-preset/10-grml.preset diff --git a/config/files/etc/systemd/system/getty@tty1.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty1.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty1.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty1.service.d/override.conf diff --git a/config/files/etc/systemd/system/getty@tty10.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty10.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty10.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty10.service.d/override.conf diff --git a/config/files/etc/systemd/system/getty@tty11.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty11.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty11.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty11.service.d/override.conf diff --git a/config/files/etc/systemd/system/getty@tty12.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty12.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty12.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty12.service.d/override.conf diff --git a/config/files/etc/systemd/system/getty@tty2.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty2.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty2.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty2.service.d/override.conf diff --git a/config/files/etc/systemd/system/getty@tty3.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty3.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty3.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty3.service.d/override.conf diff --git a/config/files/etc/systemd/system/getty@tty4.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty4.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty4.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty4.service.d/override.conf diff --git a/config/files/etc/systemd/system/getty@tty5.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty5.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty5.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty5.service.d/override.conf diff --git a/config/files/etc/systemd/system/getty@tty6.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty6.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty6.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty6.service.d/override.conf diff --git a/config/files/etc/systemd/system/getty@tty7.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/getty@tty7.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/getty@tty7.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/getty@tty7.service.d/override.conf diff --git a/config/files/etc/systemd/system/grml-boot.target/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/grml-boot.target similarity index 100% rename from config/files/etc/systemd/system/grml-boot.target/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/grml-boot.target diff --git a/config/files/etc/systemd/system/serial-getty@.service.d/override.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/serial-getty@.service.d/override.conf similarity index 100% rename from config/files/etc/systemd/system/serial-getty@.service.d/override.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/serial-getty@.service.d/override.conf diff --git a/config/files/etc/systemd/system/ssh.service.d/keygen.conf/GRMLBASE b/config/files/GRMLBASE/etc/systemd/system/ssh.service.d/keygen.conf similarity index 100% rename from config/files/etc/systemd/system/ssh.service.d/keygen.conf/GRMLBASE rename to config/files/GRMLBASE/etc/systemd/system/ssh.service.d/keygen.conf diff --git a/config/files/etc/tmpfiles.d/man-db.conf/GRMLBASE b/config/files/GRMLBASE/etc/tmpfiles.d/man-db.conf similarity index 76% rename from config/files/etc/tmpfiles.d/man-db.conf/GRMLBASE rename to config/files/GRMLBASE/etc/tmpfiles.d/man-db.conf index 415c8b90f..592aca342 100644 --- a/config/files/etc/tmpfiles.d/man-db.conf/GRMLBASE +++ b/config/files/GRMLBASE/etc/tmpfiles.d/man-db.conf @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/85-systemd script, using -# ${GRML_FAI_CONFIG}/files/etc/tmpfiles.d/man-db.conf/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/tmpfiles.d/man-db.conf # Override default (age set to 1w) to avoid disappearing mandb caches d /var/cache/man 0755 man man - diff --git a/config/files/usr/share/doc/grml-docs/startpage.html/GRMLBASE b/config/files/GRMLBASE/usr/share/doc/grml-docs/startpage.html similarity index 100% rename from config/files/usr/share/doc/grml-docs/startpage.html/GRMLBASE rename to config/files/GRMLBASE/usr/share/doc/grml-docs/startpage.html diff --git a/config/files/usr/share/initramfs-tools/scripts/init-top/grml/GRMLBASE b/config/files/GRMLBASE/usr/share/initramfs-tools/scripts/init-top/grml similarity index 98% rename from config/files/usr/share/initramfs-tools/scripts/init-top/grml/GRMLBASE rename to config/files/GRMLBASE/usr/share/initramfs-tools/scripts/init-top/grml index aa8b9e281..2083d74ec 100755 --- a/config/files/usr/share/initramfs-tools/scripts/init-top/grml/GRMLBASE +++ b/config/files/GRMLBASE/usr/share/initramfs-tools/scripts/init-top/grml @@ -2,7 +2,7 @@ # # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/42-branding script, using -# ${GRML_FAI_CONFIG}/files/usr/share/initramfs-tools/scripts/init-top/grml/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/usr/share/initramfs-tools/scripts/init-top/grml # # Filename: /usr/share/initramfs-tools/scripts/init-top/grml # Purpose: Early boot progress handler diff --git a/config/files/usr/share/keyrings/grml-archive-keyring.gpg/GRMLBASE b/config/files/GRMLBASE/usr/share/keyrings/grml-archive-keyring.gpg similarity index 100% rename from config/files/usr/share/keyrings/grml-archive-keyring.gpg/GRMLBASE rename to config/files/GRMLBASE/usr/share/keyrings/grml-archive-keyring.gpg diff --git a/config/files/etc/firefox-esr/firefox-esr.js/GRML_FULL b/config/files/GRML_FULL/etc/firefox-esr/firefox-esr.js similarity index 100% rename from config/files/etc/firefox-esr/firefox-esr.js/GRML_FULL rename to config/files/GRML_FULL/etc/firefox-esr/firefox-esr.js diff --git a/config/files/etc/locale.gen/LOCALES b/config/files/LOCALES/etc/locale.gen similarity index 97% rename from config/files/etc/locale.gen/LOCALES rename to config/files/LOCALES/etc/locale.gen index 5e88a050f..f7e14a1ad 100644 --- a/config/files/etc/locale.gen/LOCALES +++ b/config/files/LOCALES/etc/locale.gen @@ -1,6 +1,6 @@ # This file was deployed via grml-live's # ${GRML_FAI_CONFIG}/scripts/GRMLBASE/25-locales script, using -# ${GRML_FAI_CONFIG}/files/etc/locale.gen/GRMLBASE +# ${GRML_FAI_CONFIG}/files/GRMLBASE/etc/locale.gen ################################################################################ # This file lists locales that you wish to have built. You can find a list # of valid supported locales at /usr/share/i18n/SUPPORTED. Other diff --git a/config/hooks/instsoft.GRMLBASE b/config/hooks/GRMLBASE/instsoft similarity index 100% rename from config/hooks/instsoft.GRMLBASE rename to config/hooks/GRMLBASE/instsoft diff --git a/config/hooks/updatebase.GRMLBASE b/config/hooks/GRMLBASE/updatebase similarity index 100% rename from config/hooks/updatebase.GRMLBASE rename to config/hooks/GRMLBASE/updatebase diff --git a/config/hooks/instsoft.ZFS b/config/hooks/ZFS/instsoft similarity index 100% rename from config/hooks/instsoft.ZFS rename to config/hooks/ZFS/instsoft diff --git a/docs/grml-live.txt b/docs/grml-live.txt index 2dc15a38c..8f6b7c922 100644 --- a/docs/grml-live.txt +++ b/docs/grml-live.txt @@ -616,7 +616,7 @@ Can I use my own (local) Debian mirror? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Yes. Set up an according sources.list configuration as class file in -${GRML_FAI_CONFIG}/files/etc/apt/sources.list.d/ and adjust the variable +${GRML_FAI_CONFIG}/files/${CLASS}/etc/apt/sources.list.d/ and adjust the variable FAI_DEBOOTSTRAP in /etc/grml/grml-live.conf[.local]. If you're setting up your own class file make sure to include the class name in the class list (grml-live -c ...). @@ -700,7 +700,7 @@ Serving via bind mount / MIRROR_DIRECTORY Make sure to create an according sources.list configuration file, e.g. using your own class name `CUSTOM`: - # cat > $GRML_FAI_CONFIG/files/etc/apt/sources.list.d/local-packages.list/CUSTOM << EOF + # cat > $GRML_FAI_CONFIG/files/CUSTOM/etc/apt/sources.list.d/local-packages.list << EOF deb file:///home/foobar/local-packages ./ EOF @@ -722,7 +722,7 @@ Serving a repository via HTTP Make sure to create an according sources.list configuration file, e.g. using your own class name `CUSTOM`: - # cat > $GRML_FAI_CONFIG/files/etc/apt/sources.list.d/local-packages.list/CUSTOM << EOF + # cat > $GRML_FAI_CONFIG/files/CUSTOM/etc/apt/sources.list.d/local-packages.list << EOF deb http://127.0.0.1:8000/ ./ EOF diff --git a/etc/grml/grml-live.conf b/etc/grml/grml-live.conf index 5369b848b..6bfc8945b 100644 --- a/etc/grml/grml-live.conf +++ b/etc/grml/grml-live.conf @@ -54,8 +54,8 @@ # Do you want to use a local mirror (like NFS)? # If so specify the directory where debian/ is available: # MIRROR_DIRECTORY="/media/mirror" -# ... and then set up an according class file in -# ${GRML_FAI_CONFIG}/files/etc/apt/sources.list.d/ +# ... and then set up an according file in +# ${GRML_FAI_CONFIG}/files/${CLASS}/etc/apt/sources.list.d/custom.list # containing something like: # deb file:///media/mirror/debian sid main contrib non-free-firmware non-free diff --git a/usr/lib/grml-live/minifai b/usr/lib/grml-live/minifai index 3f02c2066..e65e56e60 100755 --- a/usr/lib/grml-live/minifai +++ b/usr/lib/grml-live/minifai @@ -220,7 +220,7 @@ def install_packages_for_classes( for class_name in classes: chrooted_debconf_set_selections(chroot_dir, conf_dir / "debconf" / class_name) - run_script(chroot_dir, conf_dir / "hooks" / f"instsoft.{class_name}", helper_tools_path, hook_env) + run_script(chroot_dir, conf_dir / "hooks" / class_name / "instsoft", helper_tools_path, hook_env) package_list = parse_class_packages(conf_dir, class_name) full_package_list.merge(package_list) @@ -246,26 +246,56 @@ def show_env(log_text: str, env): print() -def do_fcopy_path(source_dir: Path, dest_path: Path, classes: list[str], mode) -> bool: +def do_fcopy_file(to_copy: Path, chroot_dir: Path, path: str, mode): + dest_path = chroot_dir / path + + print(f"I: fcopy: Installing {to_copy} as {dest_path}.") + if dest_path.exists(): + print(f"W: fcopy: Destination {dest_path} already exists.") + + # this is probably fine, as we expect to run as root and do not support + # different file/directory ownership. + dest_path.parent.mkdir(exist_ok=True, parents=True) + + shutil.copyfile(to_copy, dest_path, follow_symlinks=False) + dest_path.chmod(mode) + os.chown(dest_path, 0, 0, follow_symlinks=False) + + return True + + +def do_fcopy_path(files_dir: Path, chroot_dir: Path, classes: list[str], path: str, mode: int) -> bool: to_copy = None for class_name in classes: - if (source_dir / class_name).exists(): - to_copy = source_dir / class_name + class_path = files_dir / class_name / path + if class_path.exists(): + to_copy = class_path + + if to_copy: + do_fcopy_file(to_copy, chroot_dir, path, mode) + return True + else: + return False + + +def do_fcopy_recursive(files_dir: Path, chroot_dir: Path, classes: list[str], path_root: str, mode: int): + tree = {} - if to_copy is not None: - print(f"I: fcopy: Installing {to_copy} as {dest_path}.") - if dest_path.exists(): - print(f"W: fcopy: Destination {dest_path} already exists.") + for class_name in classes: + class_files_dir = files_dir / class_name + if not class_files_dir.exists(): + continue - # this is probably fine, as we expect to run as root and do not support - # different file/directory ownership. - dest_path.parent.mkdir(exist_ok=True, parents=True) + class_path_root = class_files_dir / path_root + if not class_path_root.exists(): + continue - shutil.copyfile(to_copy, dest_path, follow_symlinks=False) - dest_path.chmod(mode) - os.chown(dest_path, 0, 0, follow_symlinks=False) + files = [p.relative_to(class_files_dir) for p in class_path_root.glob("**/*") if not p.is_dir()] + for file in files: + tree[file] = class_name - return True + for path, class_name in tree.items(): + do_fcopy_file(files_dir / class_name/ path, chroot_dir, path, mode) def parse_fcopy_args(fcopy_args: list[str]) -> tuple[str, str, int, bool, bool, list[str]]: @@ -334,18 +364,11 @@ def do_fcopy(conf_dir: Path, chroot_dir: Path, classes: list[str], fcopy_args: l if recursive: for path in paths: - path_dir = files_dir / path - dirs = [p for p in path_dir.glob("**/*") if p.is_dir()] - for dir in dirs: - dir = dir.relative_to(files_dir) - do_fcopy_path(files_dir / dir, chroot_dir / dir, classes, mode) + do_fcopy_recursive(files_dir, chroot_dir, classes, path, mode) else: for path in paths: - path_dir = files_dir / path - found = False - if path_dir.exists(): - found = do_fcopy_path(path_dir, chroot_dir / path, classes, mode) + found = do_fcopy_path(files_dir, chroot_dir, classes, path, mode) if not found and not ignore_missing: print(f"E: Source {path=} is missing for fcopy") rc = 1 @@ -550,12 +573,12 @@ def parse_varfile(varfile: Path) -> dict: return env -def read_vars_for_classes(conf_dir: Path, classes: list[str]) -> dict: - """Parse FAI .var files""" +def read_envvars_for_classes(conf_dir: Path, classes: list[str]) -> dict: + """Read environment variable files""" env = {} for class_name in classes: - varfile = conf_dir / "class" / f"{class_name}.var" + varfile = conf_dir / "env" / class_name if varfile.exists(): env.update(parse_varfile(varfile)) @@ -617,13 +640,13 @@ def _run_tasks(conf_dir: Path, chroot_dir: Path, classes: list[str], grml_live_c env = { "GRML_LIVE_CONFIG": str(grml_live_config), "LOGDIR": str(logdir), - } | read_vars_for_classes(conf_dir, classes) + } | read_envvars_for_classes(conf_dir, classes) show_env("Merged class variables", env) with helper_tools(conf_dir, chroot_dir, classes, dynamic_state) as helper_tools_path: hook_env = env | {"FAI_ACTION": fai_action} for class_name in classes: - run_script(chroot_dir, conf_dir / "hooks" / f"updatebase.{class_name}", helper_tools_path, hook_env) + run_script(chroot_dir, conf_dir / "hooks" / class_name / "updatebase", helper_tools_path, hook_env) with policy_rcd(chroot_dir): task_updatebase(chroot_dir, dynamic_state)