Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package jeos-firstboot for openSUSE:Factory checked in at 2024-04-12 17:33:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jeos-firstboot (Old) and /work/SRC/openSUSE:Factory/.jeos-firstboot.new.26366 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jeos-firstboot" Fri Apr 12 17:33:57 2024 rev:56 rq:1166793 version:1.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/jeos-firstboot/jeos-firstboot.changes 2024-03-28 14:03:16.353086238 +0100 +++ /work/SRC/openSUSE:Factory/.jeos-firstboot.new.26366/jeos-firstboot.changes 2024-04-12 17:37:19.377360363 +0200 @@ -1,0 +2,8 @@ +Thu Apr 11 08:39:35 UTC 2024 - Fabian Vogt <fv...@suse.com> + +- Update to version 1.4.0: + * Use d_styled in more places + * Add support for systemd credentials + * Order modules, read from /etc + +------------------------------------------------------------------- Old: ---- jeos-firstboot-1.3.0.8.obscpio New: ---- jeos-firstboot-1.4.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jeos-firstboot.spec ++++++ --- /var/tmp/diff_new_pack.cY4Hfc/_old 2024-04-12 17:37:19.837377305 +0200 +++ /var/tmp/diff_new_pack.cY4Hfc/_new 2024-04-12 17:37:19.841377452 +0200 @@ -23,7 +23,7 @@ %endif Name: jeos-firstboot -Version: 1.3.0.8 +Version: 1.4.0 Release: 0 Summary: Simple text based JeOS first boot wizard License: MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.cY4Hfc/_old 2024-04-12 17:37:19.873378631 +0200 +++ /var/tmp/diff_new_pack.cY4Hfc/_new 2024-04-12 17:37:19.877378778 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/jeos-firstboot.git</param> - <param name="changesrevision">b726c1d087db25df6692e0314cee2c679c86aca6</param></service></servicedata> + <param name="changesrevision">a2154039c68564a90dc03515f7d350113df96092</param></service></servicedata> (No newline at EOF) ++++++ jeos-firstboot-1.3.0.8.obscpio -> jeos-firstboot-1.4.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.3.0.8/README.md new/jeos-firstboot-1.4.0/README.md --- old/jeos-firstboot-1.3.0.8/README.md 2024-03-27 09:29:39.000000000 +0100 +++ new/jeos-firstboot-1.4.0/README.md 2024-04-11 10:26:41.000000000 +0200 @@ -7,7 +7,7 @@ This is mainly developed for openSUSE and SUSE Linux Enterprise Server JeOS images. For more information visit the [JeOS wiki](https://en.opensuse.org/Portal:JeOS). ## Getting Started -jeos-firstboot can be extended using separate modules, writing a script with the appropriate format and have it installed under `/usr/lib/share/jeos-firstboot/modules` will make this module be executed. +jeos-firstboot can be extended using separate modules, writing a script with the appropriate format and have it installed under `/usr/lib/share/jeos-firstboot/modules` or `/etc/jeos-firstboot/modules` will make this module be executed. For more information on modules format please check [jeos-firstboot extensions](https://en.opensuse.org/Portal:JeOS:Documentation) ### Installation @@ -62,3 +62,15 @@ ## License Distributed under the MIT License. See [LICENSE](https://github.com/openSUSE/jeos-firstboot/blob/master/LICENSE) for more information. + +## Credentials + +jeos-firstboot supports [systemd credentials](https://systemd.io/CREDENTIALS/) +to pre-configure systems. The wizard does not prompt for settings +defined by credentials. + +* firstboot.keymap +* firstboot.license-agreed +* firstboot.locale +* firstboot.timezone +* passwd.plaintext-password.root diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.3.0.8/files/usr/lib/systemd/system/jeos-firstboot.service new/jeos-firstboot-1.4.0/files/usr/lib/systemd/system/jeos-firstboot.service --- old/jeos-firstboot-1.3.0.8/files/usr/lib/systemd/system/jeos-firstboot.service 2024-03-27 09:29:39.000000000 +0100 +++ new/jeos-firstboot-1.4.0/files/usr/lib/systemd/system/jeos-firstboot.service 2024-04-11 10:26:41.000000000 +0200 @@ -36,6 +36,8 @@ #StandardError=tty # enable accessing global keyring to get data from eg. initrd KeyringMode=shared +ImportCredential=passwd.plaintext-password.root +ImportCredential=firstboot.* [Install] WantedBy=default.target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.3.0.8/files/usr/sbin/jeos-config new/jeos-firstboot-1.4.0/files/usr/sbin/jeos-config --- old/jeos-firstboot-1.3.0.8/files/usr/sbin/jeos-config 2024-03-27 09:29:39.000000000 +0100 +++ new/jeos-firstboot-1.4.0/files/usr/sbin/jeos-config 2024-04-11 10:26:41.000000000 +0200 @@ -37,6 +37,8 @@ } trap cleanup EXIT +init_modules + # Get a list of all config modules config_modules=() for module in "${modules[@]}"; do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.3.0.8/files/usr/sbin/jeos-firstboot new/jeos-firstboot-1.4.0/files/usr/sbin/jeos-firstboot --- old/jeos-firstboot-1.3.0.8/files/usr/sbin/jeos-firstboot 2024-03-27 09:29:39.000000000 +0100 +++ new/jeos-firstboot-1.4.0/files/usr/sbin/jeos-firstboot 2024-04-11 10:26:41.000000000 +0200 @@ -74,6 +74,8 @@ sleep 1 fi +init_modules + systemd_firstboot_args=() # If the configuration is not loaded and we are in the first terminal @@ -81,7 +83,7 @@ JEOS_LOCALE=${JEOS_LOCALE-} JEOS_KEYTABLE=${JEOS_KEYTABLE-} -if [ -z "$JEOS_LOCALE" ]; then +if [ -z "$JEOS_LOCALE" ] && ! get_credential JEOS_LOCALE firstboot.locale; then welcome_screen_with_console_switch dialog_locale fi @@ -91,7 +93,7 @@ # also add to systemd-firstboot parameters systemd_firstboot_args+=("--locale=$JEOS_LOCALE") -if [ -z "$JEOS_KEYTABLE" ]; then +if [ -z "$JEOS_KEYTABLE" ] && ! get_credential JEOS_KEYTABLE firstboot.keymap; then welcome_screen_with_console_switch dialog_keytable fi @@ -145,7 +147,7 @@ fi fi -if [ -z "$JEOS_EULA_ALREADY_AGREED" ]; then +if [ -z "$JEOS_EULA_ALREADY_AGREED" ] && ! get_credential JEOS_EULA_ALREADY_AGREED firstboot.license-agreed; then welcome_screen_with_console_switch # Find the location of the EULA @@ -173,12 +175,12 @@ while true; do d --exit-label $"Continue" --textbox "$EULA_FILE" $dh_text 85 [ -e "${EULA_FILE%/*}/no-acceptance-needed" ] && break - dialog --yesno $"Do you agree with the terms of the license?" 0 0 && break - dialog --msgbox $"Can not continue without agreement" 6 40 || : + d_styled --yesno $"Do you agree with the terms of the license?" 0 0 && break + d_styled --msgbox $"Can not continue without agreement" 6 40 || : done fi -if [ -z "$JEOS_TIMEZONE" ]; then +if [ -z "$JEOS_TIMEZONE" ] && ! get_credential JEOS_TIMEZONE firstboot.timezone; then welcome_screen_with_console_switch dialog_timezone fi @@ -189,7 +191,7 @@ run rm -f /etc/localtime run systemd-firstboot "${systemd_firstboot_args[@]}" -if [ -z "$JEOS_PASSWORD_ALREADY_SET" ]; then +if [ -z "$JEOS_PASSWORD_ALREADY_SET" ] && ! get_credential password passwd.plaintext-password.root; then welcome_screen_with_console_switch dialog_password fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.3.0.8/files/usr/share/jeos-firstboot/jeos-firstboot-functions new/jeos-firstboot-1.4.0/files/usr/share/jeos-firstboot/jeos-firstboot-functions --- old/jeos-firstboot-1.3.0.8/files/usr/share/jeos-firstboot/jeos-firstboot-functions 2024-03-27 09:29:39.000000000 +0100 +++ new/jeos-firstboot-1.4.0/files/usr/share/jeos-firstboot/jeos-firstboot-functions 2024-04-11 10:26:41.000000000 +0200 @@ -27,15 +27,29 @@ password='' modules=() -if pushd "${jeos_prefix?}/share/jeos-firstboot/modules" &>/dev/null; then - for module in *; do +_find_modules() { + local d f + for d in "/etc/jeos-firstboot/modules" "${jeos_prefix?}/share/jeos-firstboot/modules"; do + for f in "$d"/*; do + if [ -L "$f" ] || [ -f "$f" ]; then + echo "${f##*/}" "$f" + fi + done + done +} + +init_modules() { + [ -z "$modules" ] || return 0 + local module f + while read -r module f; do + if [ -L "$f" ] && [ "$(readlink "$f")" = "/dev/null" ]; then + continue + fi # shellcheck source=/dev/null - if [ -f "${module}" ] && source "${module}"; then - modules+=("${module}") - fi - done - popd &>/dev/null || exit -fi + source "$f" || continue + modules+=("${module}") + done < <(_find_modules|sort -k 1,1 -u) +} module_has_hook() { local module="$1" @@ -183,4 +197,15 @@ fi } +# get systemd credential +# https://systemd.io/CREDENTIALS/ +get_credential() +{ + local var="${1:?}" + local name="${2:?}" + [ -n "$CREDENTIALS_DIRECTORY" ] || return 1 + [ -e "$CREDENTIALS_DIRECTORY/$name" ] || return 1 + read -r "$var" < "$CREDENTIALS_DIRECTORY/$name" || [ -n "${!var}" ] +} + # vim: syntax=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.3.0.8/files/usr/share/jeos-firstboot/modules/network-modules/NetworkManager new/jeos-firstboot-1.4.0/files/usr/share/jeos-firstboot/modules/network-modules/NetworkManager --- old/jeos-firstboot-1.3.0.8/files/usr/share/jeos-firstboot/modules/network-modules/NetworkManager 2024-03-27 09:29:39.000000000 +0100 +++ new/jeos-firstboot-1.4.0/files/usr/share/jeos-firstboot/modules/network-modules/NetworkManager 2024-04-11 10:26:41.000000000 +0200 @@ -14,7 +14,7 @@ # Note: Dialog also flushes the input queue here. Without that, # nmtui would react to what is typed before it shows up. - if dialog --backtitle "$PRETTY_NAME" --yesno $"No active network connection detected.\nDo you want to configure network connections?" 0 0; then + if d_styled --yesno $"No active network connection detected.\nDo you want to configure network connections?" 0 0; then # nmtui (resp. libslang used by newt) uses /dev/tty, # so setsid is required to set it to the current one. setsid -wc nmtui diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.3.0.8/files/usr/share/jeos-firstboot/modules/network-modules/wicked new/jeos-firstboot-1.4.0/files/usr/share/jeos-firstboot/modules/network-modules/wicked --- old/jeos-firstboot-1.3.0.8/files/usr/share/jeos-firstboot/modules/network-modules/wicked 2024-03-27 09:29:39.000000000 +0100 +++ new/jeos-firstboot-1.4.0/files/usr/share/jeos-firstboot/modules/network-modules/wicked 2024-04-11 10:26:41.000000000 +0200 @@ -38,7 +38,7 @@ network_jeos_config() { - if ! dialog --backtitle "$PRETTY_NAME" --yesno $"This will create a new network configuration from scratch, + if ! d_styled --yesno $"This will create a new network configuration from scratch, all connections will be lost.\nDo you want to continue?" 7 50; then return fi ++++++ jeos-firstboot.obsinfo ++++++ --- /var/tmp/diff_new_pack.cY4Hfc/_old 2024-04-12 17:37:19.965382019 +0200 +++ /var/tmp/diff_new_pack.cY4Hfc/_new 2024-04-12 17:37:19.965382019 +0200 @@ -1,5 +1,5 @@ name: jeos-firstboot -version: 1.3.0.8 -mtime: 1711528179 -commit: b726c1d087db25df6692e0314cee2c679c86aca6 +version: 1.4.0 +mtime: 1712824001 +commit: a2154039c68564a90dc03515f7d350113df96092