Hello community, here is the log from the commit of package installation-images for openSUSE:Factory checked in at 2020-07-15 11:18:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/installation-images (Old) and /work/SRC/openSUSE:Factory/.installation-images.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "installation-images" Wed Jul 15 11:18:23 2020 rev:106 rq:820853 version:15.13 Changes: -------- --- /work/SRC/openSUSE:Factory/installation-images/installation-images.changes 2020-07-14 07:43:52.238798007 +0200 +++ /work/SRC/openSUSE:Factory/.installation-images.new.3060/installation-images.changes 2020-07-15 11:19:39.953278607 +0200 @@ -1,0 +2,11 @@ +Tue Jul 14 09:21:27 UTC 2020 - mvid...@suse.cz + +- merge gh#openSUSE/installation-images#388 +- Adjust style to fix shellcheck warnings; admit this needs bash +- Remove bashisms, explicitly use /bin/dash as interpreter + (bsc#1172139) +- 'make check' will run shellcheck on the scripts needing dash +- Save 1.5 MiB RAM by switching inst_setup to dash +- 15.13 + +-------------------------------------------------------------------- Old: ---- installation-images-15.12.tar.xz New: ---- installation-images-15.13.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ installation-images.spec ++++++ --- /var/tmp/diff_new_pack.DPG5kU/_old 2020-07-15 11:19:47.625286201 +0200 +++ /var/tmp/diff_new_pack.DPG5kU/_new 2020-07-15 11:19:47.629286205 +0200 @@ -639,7 +639,7 @@ Summary: Installation Image Files for %theme License: GPL-2.0+ Group: Metapackages -Version: 15.12 +Version: 15.13 Release: 0 Provides: installation-images = %version-%release Conflicts: otherproviders(installation-images) ++++++ installation-images-15.12.tar.xz -> installation-images-15.13.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/installation-images-15.12/Makefile new/installation-images-15.13/Makefile --- old/installation-images-15.12/Makefile 2020-07-10 15:29:07.000000000 +0200 +++ new/installation-images-15.13/Makefile 2020-07-14 11:21:27.000000000 +0200 @@ -57,7 +57,7 @@ export ARCH THEMES DESTDIR INSTSYS_PARTS BOOT_PARTS WITH_FLOPPY BUILD_ID -.PHONY: all dirs base fbase biostest initrd \ +.PHONY: all check dirs base fbase biostest initrd \ boot boot-efi root rescue root+rescue gdb libyui-rest-api bind libstoragemgmt clean \ boot-themes initrd-themes zenroot tftp install \ install-initrd mini-iso-rmlist debuginfo cd1 iso @@ -172,7 +172,7 @@ theme=$(THEMES) image=rescue-server src=rescue filelist=rescue-server fs=squashfs bin/mk_image root+rescue: base - # the next two lines just clean up old files + # the next two 'mk_image' runs just clean up old files image=root+rescue fs=none bin/mk_image image=root+initrd src=root+rescue fs=none filelist=root+rescue bin/mk_image bin/common_tree --dst tmp/root+initrd tmp/initrd tmp/root @@ -277,3 +277,11 @@ cp -a images/$$theme/install-initrd $(DESTDIR)/$$theme ; \ done +# Catch bugs early +# - make sure that the scripts run via dash don't end up with a bashism +# +# NOTE: as the current checks do not need the 'all' target, +# RPM spec calls this in %prep, before %build, to catch bugs early. +# Change .spec if 'check' needs 'all' +check: + shellcheck data/root/etc/inst_setup data/root/etc/inst_setup_ssh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/installation-images-15.12/VERSION new/installation-images-15.13/VERSION --- old/installation-images-15.12/VERSION 2020-07-10 15:29:07.000000000 +0200 +++ new/installation-images-15.13/VERSION 2020-07-14 11:21:27.000000000 +0200 @@ -1 +1 @@ -15.12 +15.13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/installation-images-15.12/changelog new/installation-images-15.13/changelog --- old/installation-images-15.12/changelog 2020-07-10 15:29:07.000000000 +0200 +++ new/installation-images-15.13/changelog 2020-07-14 11:21:27.000000000 +0200 @@ -1,3 +1,11 @@ +2020-07-14: 15.13 + - merge gh#openSUSE/installation-images#388 + - Adjust style to fix shellcheck warnings; admit this needs bash + - Remove bashisms, explicitly use /bin/dash as interpreter + (bsc#1172139) + - 'make check' will run shellcheck on the scripts needing dash + - Save 1.5 MiB RAM by switching inst_setup to dash + 2020-07-10: 15.12 - merge gh#openSUSE/installation-images#395 - kmod-compat will be dropped diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/installation-images-15.12/data/root/etc/inst_setup new/installation-images-15.13/data/root/etc/inst_setup --- old/installation-images-15.12/data/root/etc/inst_setup 2020-07-10 15:29:07.000000000 +0200 +++ new/installation-images-15.13/data/root/etc/inst_setup 2020-07-14 11:21:27.000000000 +0200 @@ -1,5 +1,4 @@ -#! /bin/sh -# +#!/bin/dash # # Note: linuxrc-based tools are in /lbin. @@ -22,14 +21,14 @@ [ -e /proc/sys/vm/local-oom-kill ] && echo 1 > /proc/sys/vm/local-oom-kill if [ -f /.timestamp ] ; then - read build_time < /.timestamp - now_time=`TZ= LANG= LC_ALL= date +%Y%m%d` + read -r build_time < /.timestamp + now_time=$(TZ='' LANG='' LC_ALL='' date +%Y%m%d) if [ "$now_time" -lt "$build_time" ] ; then echo echo "your system time is not correct:" - TZ= date + TZ='' date echo "setting system time to:" - TZ= LANG= LC_ALL= date ${build_time#????*}1234${build_time%*????}.56 + TZ='' LANG='' LC_ALL='' date "${build_time#????*}1234${build_time%*????}.56" echo /sbin/hwclock --systohc -u & sleep 3 @@ -49,14 +48,14 @@ yast="$1" shift -echo $yast > /tmp/linuxrc_installer_name +echo "$yast" > /tmp/linuxrc_installer_name export YAST2_SSH=false unset SSH_FAILED stty sane 2>/dev/null # get hostname & hostips hostip_from_wicked /tmp/host_ips /tmp/host_name -host_name=`[ -f /tmp/host_name ] && cat /tmp/host_name` +host_name=$([ -f /tmp/host_name ] && cat /tmp/host_name) # # a few files should be restored when installation has completed if we @@ -145,6 +144,7 @@ # boot with usessh=1 or use linuxrc to enable ssh # vnc=1 will override the install mode if grep -q "^SSHD:.*1" /etc/install.inf ; then + # shellcheck source=data/root/etc/inst_setup_ssh test -x /sbin/inst_setup_ssh && . /sbin/inst_setup_ssh fi @@ -160,15 +160,16 @@ grep -qwi start_shell /proc/cmdline && START_SHELL=1 grep -qi "^StartShell:.*1" /etc/install.inf && START_SHELL=1 # leave a core file if yast crashes +# shellcheck disable=SC2169 # "ulimit in dash may behave differently"; fine here ulimit -c unlimited # turn off plymouth splash screen -function plymouth_off { +plymouth_off() { [ -x /usr/bin/plymouth ] && plymouth quit } # start shell, useful on iSeries or via serial console -function start_shell() { +start_shell() { plymouth_off echo echo "ATTENTION: Starting shell... (use 'exit' to proceed with installation)" @@ -187,7 +188,7 @@ ( sleep 3 /usr/bin/slptool register "service:YaST.installation.suse:vnc://${host_name}:5901" - ) &> /tmp/slptool_register.txt & + ) >/tmp/slptool_register.txt 2>&1 & else echo "slpd returned with exit code $ec, VNC will not be announced" fi @@ -206,12 +207,13 @@ EOF cp /etc/issue /etc/motd - echo -e "Run yast.ssh to start the installation.\n" >>/etc/motd + { echo "Run yast.ssh to start the installation."; echo; } >>/etc/motd # print more detailed list of ifaces using a function from yast2-installation if [ -e /usr/lib/YaST2/startup/common/network.sh ] ; then echo "Active interfaces:" + # shellcheck disable=SC1091 # file in a different repo . /usr/lib/YaST2/startup/common/network.sh list_ifaces | head -n 20 fi @@ -259,6 +261,7 @@ rm -f /etc/modules.conf # clean up after yast +# shellcheck disable=SC2016 # the ${} is for sed, not a shell expansion mistake sed -n '1{h;n};x;H;${x;p}' /proc/mounts | awk '{ if($2 ~ /^\/var/) system("umount " $2) }' exit $ec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/installation-images-15.12/data/root/etc/inst_setup_ssh new/installation-images-15.13/data/root/etc/inst_setup_ssh --- old/installation-images-15.12/data/root/etc/inst_setup_ssh 2020-07-10 15:29:07.000000000 +0200 +++ new/installation-images-15.13/data/root/etc/inst_setup_ssh 2020-07-14 11:21:27.000000000 +0200 @@ -1,9 +1,10 @@ +#!/bin/dash # will be sourced by /sbin/inst_setup # but can also be called manually: $0 [-n] rootpassword # vim: syntax=sh -if [ "$1" = "-h" -o "$1" = "--help" ] ; then +if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then echo "Usage: setup_ssh [OPTIONS] [PASSWORD]" echo "Setup and run sshd." echo @@ -16,7 +17,7 @@ fi nosshkey=false -if [ "$1" = "-n" -o "$1" = "--no-sshkey" ] ; then +if [ "$1" = "-n" ] || [ "$1" = "--no-sshkey" ] ; then nosshkey=true shift fi @@ -25,7 +26,7 @@ nosshkey=true fi -if ! test -z "$1" ; then +if test -n "$1" ; then sshpassword=$1 fi @@ -37,7 +38,7 @@ chmod 600 /etc/ssh/*key fi -if [ ! -z "$sshpassword" ] ; then +if [ -n "$sshpassword" ] ; then echo "setting temporary root password to '$sshpassword'" echo "root:$sshpassword" | chpasswd fi