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 2021-05-10 15:37:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jeos-firstboot (Old) and /work/SRC/openSUSE:Factory/.jeos-firstboot.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jeos-firstboot" Mon May 10 15:37:10 2021 rev:37 rq:891135 version:1.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/jeos-firstboot/jeos-firstboot.changes 2021-03-10 08:49:15.330393544 +0100 +++ /work/SRC/openSUSE:Factory/.jeos-firstboot.new.2988/jeos-firstboot.changes 2021-05-10 15:39:27.081546731 +0200 @@ -1,0 +2,9 @@ +Thu May 06 20:15:13 UTC 2021 - [email protected] + +- Update to version 1.0.1: + * Always show manual SSID option + * Call dialog with --backtitle everywhere + * Calculate the height of menus dynamically (bsc#1177188) + * Create README.md + +------------------------------------------------------------------- Old: ---- jeos-firstboot-1.0.0.obscpio New: ---- jeos-firstboot-1.0.1.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jeos-firstboot.spec ++++++ --- /var/tmp/diff_new_pack.XhLIRj/_old 2021-05-10 15:39:27.481545094 +0200 +++ /var/tmp/diff_new_pack.XhLIRj/_new 2021-05-10 15:39:27.481545094 +0200 @@ -17,7 +17,7 @@ Name: jeos-firstboot -Version: 1.0.0 +Version: 1.0.1 Release: 0 Summary: Simple text based JeOS first boot wizard License: MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.XhLIRj/_old 2021-05-10 15:39:27.513544964 +0200 +++ /var/tmp/diff_new_pack.XhLIRj/_new 2021-05-10 15:39:27.517544947 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/openSUSE/jeos-firstboot.git</param> - <param name="changesrevision">feb35c5550c207b5d13f37c94c0dd8bead8f3791</param></service></servicedata> + <param name="changesrevision">b0effd22d64eee3ccb1d86d7d2a942f2348a3b87</param></service></servicedata> \ No newline at end of file ++++++ jeos-firstboot-1.0.0.obscpio -> jeos-firstboot-1.0.1.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.0.0/README.md new/jeos-firstboot-1.0.1/README.md --- old/jeos-firstboot-1.0.0/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/jeos-firstboot-1.0.1/README.md 2021-05-06 21:45:46.000000000 +0200 @@ -0,0 +1,64 @@ +# jeos-firstboot +## Description +jeos-firstboot allows initial configuration and adjustments of a Linux system using text based dialogs. + +It is a lightweight and customisable firstboot wizard that allows to set basic system settings during and after the first boot of an image. Including showing the license and prompt for language, keyboard, timezone, root passsword and network configuration.. + +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. +For more information on modules format please check [jeos-firstboot extensions](https://en.opensuse.org/Portal:JeOS:Documentation) + +### Installation + +The RPM package is developed in openSUSE OBS [devel package](https://build.opensuse.org/package/show/devel:openSUSE:Factory/jeos-firstboot) + +You can also get binaries RPM for openSUSE flavours at [package download](https://software.opensuse.org/package/jeos-firstboot) +<!-- USAGE EXAMPLES --> +## Usage + +jeos-firstboot is used as two systemd services [jeos-firstboot.service](https://github.com/openSUSE/jeos-firstboot/blob/master/files/usr/lib/systemd/system/jeos-firstboot.service) and [jeos-firstboot-snapshot](https://github.com/openSUSE/jeos-firstboot/blob/master/files/usr/lib/systemd/system/jeos-firstboot-snapshot.service), for using it you need to copy the appropriate service files and enable it. + +You can check the example in the RPM package for installation. + +The service is controlled by a file, so after installing it you should be sure that your system is configured appropriately + +```sh + # Enable jeos-firstboot + mkdir -p /var/lib/YaST2 + touch /var/lib/YaST2/reconfig_system + + systemctl mask systemd-firstboot.service + systemctl enable jeos-firstboot.service +``` +Beside the service that runs on firstboot there is also a tool to change configuration in a running system, this will also be installed and available as `jeos-config` + +jeos-config usage: +``` +Usage: jeos-config [OPTION...] [CONFIG_NAME] +Configure system settings using an interactive dialog + + -h shows this usage help + locale Show configuration for locale + keytable Show configuration for keyboard + timezone Show configuration for timezone + password Show configuration for password + network Show configuration for network + raspberrywifi Show configuration for raspberrywifi +``` +Additional modules (like raspberrywifi) are shown if present. + +If no parameter is given it shows a dialog for selection. + +<!-- CONTRIBUTING --> +## Contributing + +Any contributions you make are greatly appreciated. + +Feel free to create any [Issues](https://github.com/openSUSE/jeos-firstboot/issues) and send pull requests to this repository. + +<!-- LICENSE --> +## License + +Distributed under the MIT License. See [LICENSE](https://github.com/openSUSE/jeos-firstboot/blob/master/LICENSE) for more information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.0.0/files/usr/sbin/jeos-config new/jeos-firstboot-1.0.1/files/usr/sbin/jeos-config --- old/jeos-firstboot-1.0.0/files/usr/sbin/jeos-config 2021-02-25 12:31:07.000000000 +0100 +++ new/jeos-firstboot-1.0.1/files/usr/sbin/jeos-config 2021-05-06 21:45:46.000000000 +0200 @@ -61,7 +61,7 @@ modules_order+=("${module}" '') done - d --menu $"Select configuration module" 0 0 $dh_menu "${modules_order[@]}" + d --menu $"Select configuration module" 0 0 "$(menuheight ${#modules_order[@]})" "${modules_order[@]}" } usage() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.0.0/files/usr/share/jeos-firstboot/jeos-firstboot-dialogs new/jeos-firstboot-1.0.1/files/usr/share/jeos-firstboot/jeos-firstboot-dialogs --- old/jeos-firstboot-1.0.0/files/usr/share/jeos-firstboot/jeos-firstboot-dialogs 2021-02-25 12:31:07.000000000 +0100 +++ new/jeos-firstboot-1.0.1/files/usr/share/jeos-firstboot/jeos-firstboot-dialogs 2021-05-06 21:45:46.000000000 +0200 @@ -21,7 +21,7 @@ elif [ "${#list[@]}" -eq 2 ]; then # Only a single entry newlocale="${list[0]}" else - d --default-item "$default" --menu $"Select system locale" 0 0 $dh_menu "${list[@]}" + d --default-item "$default" --menu $"Select system locale" 0 0 "$(menuheight ${#list[@]})" "${list[@]}" newlocale="${result}" fi @@ -35,7 +35,7 @@ [ -n "$vconsole_keymap" ] && default="$vconsole_keymap" if findkeymaps \ - && d --default-item "$default" --menu $"Select keyboard layout" 0 0 $dh_menu "${list[@]}"; then + && d --default-item "$default" --menu $"Select keyboard layout" 0 0 "$(menuheight ${#list[@]})" "${list[@]}"; then if [ -n "$result" ]; then JEOS_KEYTABLE="$result" fi @@ -53,7 +53,7 @@ if menulist awk \ 'BEGIN{print "UTC"; sort="sort"}/^#/{next;}{print $3|sort}END{close(sort)}' \ /usr/share/zoneinfo/zone.tab \ - && d --default-item "$default" --menu $"Select time zone" 0 0 $dh_menu "${list[@]}"; then + && d --default-item "$default" --menu $"Select time zone" 0 0 "$(menuheight ${#list[@]})" "${list[@]}"; then if [ -n "$result" ]; then JEOS_TIMEZONE="$result" fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.0.0/files/usr/share/jeos-firstboot/jeos-firstboot-functions new/jeos-firstboot-1.0.1/files/usr/share/jeos-firstboot/jeos-firstboot-functions --- old/jeos-firstboot-1.0.0/files/usr/share/jeos-firstboot/jeos-firstboot-functions 2021-02-25 12:31:07.000000000 +0100 +++ new/jeos-firstboot-1.0.1/files/usr/share/jeos-firstboot/jeos-firstboot-functions 2021-05-06 21:45:46.000000000 +0200 @@ -76,7 +76,7 @@ ;; 1) echo "$(xargs -a "$dialog_out")" >/var/log/jeos - dialog --yesno $"Do you really want to quit?" 0 0 && exit 1 + dialog --backtitle "$PRETTY_NAME" --yesno $"Do you really want to quit?" 0 0 && exit 1 continue ;; 255) @@ -84,11 +84,11 @@ echo "$(xargs -a "$dialog_out")" >/var/log/jeos result_error="$(xargs -a "$dialog_out")" if [ -z "$result_error" ]; then - dialog --yesno $"Do you really want to quit?" 0 0 && exit 1 + dialog --backtitle "$PRETTY_NAME" --yesno $"Do you really want to quit?" 0 0 && exit 1 continue fi logger -p err -t jeos-firstboot "$result_error" - dialog --msgbox $"Exiting due to error, please check the system log" 0 0 + dialog --backtitle "$PRETTY_NAME" --msgbox $"Exiting due to error, please check the system log" 0 0 exit 2 ;; esac @@ -99,6 +99,13 @@ d --title $"Warning" --msgbox "$1" 6 40 } +# Given the number of total item pairs, outputs the number of items to display at once +menuheight() { + local height=$(($1 / 2)) + [ "$height" -le "$dh_menu" ] || height="$dh_menu" + echo $height +} + # localectl --no-pager list-keymaps does not list aliases (symlinks), but those are used # by YaST/langset.sh, so we need to show them. findkeymaps() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.0.0/files/usr/share/jeos-firstboot/modules/raspberrywifi new/jeos-firstboot-1.0.1/files/usr/share/jeos-firstboot/modules/raspberrywifi --- old/jeos-firstboot-1.0.0/files/usr/share/jeos-firstboot/modules/raspberrywifi 2021-02-25 12:31:07.000000000 +0100 +++ new/jeos-firstboot-1.0.1/files/usr/share/jeos-firstboot/modules/raspberrywifi 2021-05-06 21:45:46.000000000 +0200 @@ -36,14 +36,17 @@ list=() local line while read line; do - list+=("${line}" '') - done < <(ip link set $wlan_device up && iwlist $wlan_device scan|grep ESSID|cut -d':' -f2|cut -d'"' -f2|sort -u) + if [ -n "${line}" ]; then + list+=("SSID=${line}" "${line}") + fi + done < <(ip link set $wlan_device up && iwlist $wlan_device scan|grep ESSID|cut -d':' -f2|cut -d'"' -f2) + list+=("manual" "Enter SSID manually") [ -n "${list[*]}" ] } raspberrywifi_wlan_error() { - dialog --title $"Error" --yesno $"$1\n\nDo you want to retry?" 0 0 + dialog --backtitle "$PRETTY_NAME" --title $"Error" --yesno $"$1\n\nDo you want to retry?" 0 0 } is_raspberry() @@ -68,11 +71,12 @@ if [ "${#list[@]}" -eq "2" ]; then wlan_device="${list[0]}" else - d --menu $"Select wireless card to configure" 0 0 $dh_menu "${list[@]}" + d --menu $"Select wireless card to configure" 0 0 "$(menuheight ${#list[@]})" "${list[@]}" wlan_device="${result}" fi - if raspberrywifi_get_wlan_networks && d --menu $"Select wireless network to connect" 0 0 $dh_menu "${list[@]}"; then + if raspberrywifi_get_wlan_networks; then + d --no-tags --menu $"Select wireless network to connect" 0 0 "$(menuheight ${#list[@]})" "${list[@]}" wlan_network="$result" else if raspberrywifi_wlan_error $"Error listing wireless networks"; then @@ -80,8 +84,14 @@ fi break fi - - d --menu $"Select authentication mode" 0 0 $dh_menu $"WPA-PSK" '' $"WPA-EAP" '' $"Open" '' + if [ "$wlan_network" == "manual" ]; then + d --inputbox $"SSID of hidden network" 0 0 + wlan_network="$result" + else + wlan_network="$(cut -d "=" -f2- <<< $wlan_network)" + fi + list=($"WPA-PSK" '' $"WPA-EAP" '' $"Open" '') + d --menu $"Select authentication mode" 0 0 "$(menuheight ${#list[@]})" "${list[@]}" wlan_auth_mode="$result" wlan_auth_mode_conf= @@ -112,7 +122,6 @@ WIRELESS_ESSID='$wlan_network' WIRELESS_MODE='Managed' EOF - if [ $wlan_auth_mode = "WPA-PSK" ]; then echo "WIRELESS_WPA_PSK='$wlan_password'" >> $config_file fi @@ -128,7 +137,7 @@ run ifdown $wlan_device &>/dev/null || true if ! run ifup $wlan_device &>/dev/null; then - if dialog --yesno $"Connection failed, do you wish to retry?" 0 0; then + if dialog --backtitle "$PRETTY_NAME" --yesno $"Connection failed, do you wish to retry?" 0 0; then continue fi fi @@ -141,7 +150,7 @@ raspberrywifi_systemd_firstboot() { if is_raspberry && stat -t /sys/class/net/*/wireless &> /dev/null; then - if dialog --yesno $"Configure wireless network?" 0 0; then + if dialog --backtitle "$PRETTY_NAME" --yesno $"Configure wireless network?" 0 0; then config_wireless=true fi fi @@ -149,3 +158,5 @@ raspberrywifi_jeos_config } + +# vim: syntax=sh ++++++ jeos-firstboot.obsinfo ++++++ --- /var/tmp/diff_new_pack.XhLIRj/_old 2021-05-10 15:39:27.617544537 +0200 +++ /var/tmp/diff_new_pack.XhLIRj/_new 2021-05-10 15:39:27.621544521 +0200 @@ -1,5 +1,5 @@ name: jeos-firstboot -version: 1.0.0 -mtime: 1614252667 -commit: feb35c5550c207b5d13f37c94c0dd8bead8f3791 +version: 1.0.1 +mtime: 1620330346 +commit: b0effd22d64eee3ccb1d86d7d2a942f2348a3b87
