Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-installation for openSUSE:Factory checked in at 2022-09-16 13:31:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old) and /work/SRC/openSUSE:Factory/.yast2-installation.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation" Fri Sep 16 13:31:56 2022 rev:509 rq:1003881 version:4.5.7 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes 2022-08-23 14:26:22.535190317 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-installation.new.2083/yast2-installation.changes 2022-09-16 13:32:11.433239585 +0200 @@ -1,0 +2,19 @@ +Thu Sep 15 14:04:42 UTC 2022 - Stefan Hundhammer <shundham...@suse.com> + +- Don't set QT_SCALE_FACTOR unless > 1 (bsc#1199020) + to avoid forcing QA to recreate all needles for all standard cases +- 4.5.7 + +------------------------------------------------------------------- +Tue Sep 13 12:13:19 UTC 2022 - Stefan Hundhammer <shundham...@suse.com> + +- Directly calculate the Qt scale factor, no longer rely on the + Xft.dpi X resource (bsc#1199020) +- Support YAST_MON_WIDTH_MM=xx at installation boot prompt +- Support YaST2.call script debugging with FAKE_MON_WIDTH_MM=xx +- Support up to 392 dpi (up to scale factor 4.0) + More details: https://github.com/yast/yast-installation/pull/1057 +- No more console warnings if no EDID (bsc#1203161) +- 4.5.6 + +------------------------------------------------------------------- Old: ---- yast2-installation-4.5.5.tar.bz2 New: ---- yast2-installation-4.5.7.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-installation.spec ++++++ --- /var/tmp/diff_new_pack.dbXQcX/_old 2022-09-16 13:32:12.605243371 +0200 +++ /var/tmp/diff_new_pack.dbXQcX/_new 2022-09-16 13:32:12.609243384 +0200 @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 4.5.5 +Version: 4.5.7 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only ++++++ yast2-installation-4.5.5.tar.bz2 -> yast2-installation-4.5.7.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.5.5/package/yast2-installation.changes new/yast2-installation-4.5.7/package/yast2-installation.changes --- old/yast2-installation-4.5.5/package/yast2-installation.changes 2022-07-27 15:38:42.000000000 +0200 +++ new/yast2-installation-4.5.7/package/yast2-installation.changes 2022-09-15 16:22:48.000000000 +0200 @@ -1,4 +1,23 @@ ------------------------------------------------------------------- +Thu Sep 15 14:04:42 UTC 2022 - Stefan Hundhammer <shundham...@suse.com> + +- Don't set QT_SCALE_FACTOR unless > 1 (bsc#1199020) + to avoid forcing QA to recreate all needles for all standard cases +- 4.5.7 + +------------------------------------------------------------------- +Tue Sep 13 12:13:19 UTC 2022 - Stefan Hundhammer <shundham...@suse.com> + +- Directly calculate the Qt scale factor, no longer rely on the + Xft.dpi X resource (bsc#1199020) +- Support YAST_MON_WIDTH_MM=xx at installation boot prompt +- Support YaST2.call script debugging with FAKE_MON_WIDTH_MM=xx +- Support up to 392 dpi (up to scale factor 4.0) + More details: https://github.com/yast/yast-installation/pull/1057 +- No more console warnings if no EDID (bsc#1203161) +- 4.5.6 + +------------------------------------------------------------------- Fri Jul 22 11:35:42 UTC 2022 - Knut Anderssen <kanders...@suse.com> - AutoYaST SecondStage: Revert changes introduced in 4.3.46 running diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.5.5/package/yast2-installation.spec new/yast2-installation-4.5.7/package/yast2-installation.spec --- old/yast2-installation-4.5.5/package/yast2-installation.spec 2022-07-27 15:38:42.000000000 +0200 +++ new/yast2-installation-4.5.7/package/yast2-installation.spec 2022-09-15 16:22:48.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-installation -Version: 4.5.5 +Version: 4.5.7 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.5.5/startup/YaST2.call new/yast2-installation-4.5.7/startup/YaST2.call --- old/yast2-installation-4.5.5/startup/YaST2.call 2022-07-27 15:38:42.000000000 +0200 +++ new/yast2-installation-4.5.7/startup/YaST2.call 2022-09-15 16:22:48.000000000 +0200 @@ -21,16 +21,15 @@ # : - Via serial line ttyS0/115200 baud, 8N1, RTS/CTS # : which is the same as the NCURSES mode # : - VNC Installation via browser -# : -# STATUS : $Id$ #---------------- # #set -x #============================================= -# Functions... -#--------------------------------------------- -#----[ wait_for_x11 ]----# +# Functions +#============================================= + + function wait_for_x11() { #------------------------------------------------------ # after a X-Server has been started you can wait until @@ -71,31 +70,115 @@ done } -#----[ calculate_x11_dpi ]----# + function calculate_x11_dpi () { #------------------------------------------------------ # Calculate the monitor's dpi from xrandr's output # --- - local MON_SIZE=`xrandr |grep mm |head -n 1` - local MON_WIDTH_MM=`echo $MON_SIZE | sed -e "s/.* \([0-9]\+\)mm x \([0-9]\+\)mm.*/\1/"` + local MON_SIZE=`xrandr | grep mm | head -n 1` local MON_WIDTH_PX=`echo $MON_SIZE | sed -e "s/.* \([0-9]\+\)x[0-9]\++.*/\1/"` - local DPI=`ruby -e "puts (($MON_WIDTH_PX/($MON_WIDTH_MM*0.0393701)/48).round)*48"` - log "Monitor size: $MON_SIZE" - log "Monitor width mm: $MON_WIDTH_MM" - log "Monitor width px: $MON_WIDTH_PX" - log "Monitor dpi: $DPI" + local MON_WIDTH_MM=`echo $MON_SIZE | sed -e "s/.* \([0-9]\+\)mm x \([0-9]\+\)mm.*/\1/"` + + log "HiDPI Check..." + log "==============" + log "\tMonitor size: $MON_SIZE" + log "\tMonitor width px: $MON_WIDTH_PX" + log "\tMonitor width mm: $MON_WIDTH_MM" + + if [ -n "$YAST_MON_WIDTH_MM" ]; then + # Enable overriding the monitor width from the command line or + # from an installation ISO boot parameter: + # + # Either boot the installation ISO with something like + # + # YAST_MON_WIDTH_MM=200 + # + # (which will end up in the environment) + # or start this script in DPI debugging mode with + # + # FAKE_MON_WIDTH_MM=200 ./YaST2.call + + log "\tOVERRIDING the monitor width in mm with ${YAST_MON_WIDTH_MM}" + MON_WIDTH_MM="$YAST_MON_WIDTH_MM" + fi + + if [ ${MON_WIDTH_MM:-0} -le 0 ]; then + log "\tMonitor width in mm is unknown, using 96 dpi as default" + log "\t(Use YAST_MON_WIDTH_MM=xx at the boot prompt to set manually)" + local DPI=96 + else + # Convert the monitor width in mm to inches (25.4 mm per inch) + # and calculate the DPI (dots per inch), but round to multiples + # of 24 to avoid drawing artifacts due to weird scale factors. + # We want scale factors to be multiple of 0.25, i.e. 1, 1.25, + # 1.5 etc., not a weird fraction like 1.2734 or similar. + # + # All this assumes the YaST Qt UI to be designed for about 96 dpi. + + local DPI=`ruby -e "puts (($MON_WIDTH_PX/($MON_WIDTH_MM/25.4)/24).round)*24"` + fi + + if [ ${DPI:-0} -lt 96 ]; then + log "\tMonitor DPI is too low (${DPI}), using 96 dpi" + DPI=96 + elif [ ${DPI:-96} -gt 384 ]; then + # Set an upper limit to protect against monitors reporting bogus EDID values + log "\tMonitor DPI is suspiciously high (${DPI}), using 384 dpi" + DPI=384 + fi + + log "\tMonitor DPI: $DPI" echo "$DPI" } -#----[ set_xft_dpi ]----# + function set_xft_dpi () { #------------------------------------------------------ # Set Xft.dpi resource using a helper tool # --- /usr/lib/YaST2/bin/xftdpi "$1" && log "Xft.dpi set to: $1" + # If the Xft.dpi X resource is set, it overrides the value + # that Qt otherwise calculates. +} + + +function set_qt_scale_factor () { +#------------------------------------------------------ +# Set Qt environment variables for the scale factor, i.e. the factor by which +# to increase the size of the UI in HiDPI cases. +# +# We assume the UI is designed for at most 144 dpi and calculate the scale +# factor based on that. We use multiples of 0.25 here (1.0, 1.25, 1.5, , 1.75, +# 2.0, ...). +# --- + local DPI=${1:-96} + # Reference DPI as a base for scaling + local REF_DPI=144 + log "\tReference DPI: $REF_DPI" + + if [ $DPI -le 96 ]; then + # Don't set QT_SCALE_FACTOR unless really needed, + # otherwise all openQA needles need to be changed. + + log "\tNo Qt scaling needed." + else + # Calculate a scale factor based on the reference DPI, but no + # smaller than 1.0; and round to multiples of 0.25 (1.25, 1.5, + # 1.75, ...) to avoid drawing artifacts due to very odd + # fractions. + + export QT_SCALE_FACTOR=`ruby -e "puts [(($DPI/(1.0*$REF_DPI)/0.25).round * 0.25), 1.0].max"` + + # Override the Qt default of rounding to the next integer. + # https://doc-snapshots.qt.io/qt5-5.15/highdpi.html + export QT_SCALE_FACTOR_ROUNDING_POLICY="PassThrough" + + log "\tQT_SCALE_FACTOR: $QT_SCALE_FACTOR" + log "\tQT_SCALE_FACTOR_ROUNDING_POLICY: $QT_SCALE_FACTOR_ROUNDING_POLICY" + fi } -#----[ prepare_for_x11 ]----# + function prepare_for_x11 () { #------------------------------------------------------ # prepare X11 installation @@ -116,17 +199,8 @@ log "\tX-Server is ready: $xserver_pid" local DPI=`calculate_x11_dpi` - if [ "$DPI" -ge 144 -a "$DPI" -le 288 ]; then - set_xft_dpi $DPI - elif [ "$DPI" -gt 288 ]; then - # This is a workaround against monitors - # that provide bad edid values - log "WARNING: Detected monitor DPI is too high ($DPI), using value 288" - set_xft_dpi 288 - else - log "WARNING: Detected monitor DPI is too low ($DPI), using value 96" - set_xft_dpi 96 - fi + # set_xft_dpi $DPI + set_qt_scale_factor $DPI fi fi @@ -139,14 +213,13 @@ } -#----[ prepare_for_qt ]----# + function prepare_for_qt () { set_inst_qt_env prepare_for_x11 } -#----[ prepare_for_ncurses ]----# function prepare_for_ncurses () { #------------------------------------------------------ # prepare NCURSES installation @@ -184,7 +257,7 @@ fi } -#----[ prepare_for_ssh ]----# + function prepare_for_ssh () { #------------------------------------------------------ # prepare SSH installation @@ -193,7 +266,7 @@ set_inst_qt_env } -#----[ prepare_for_vnc ]----# + function prepare_for_vnc () { #------------------------------------------------------ # prepare VNC installation @@ -230,7 +303,7 @@ set_inst_qt_env } -#----[ kill_xserver ]----# + function kill_xserver () { if [ -n "$xserver_pid" ];then sleep 1 && kill $xserver_pid @@ -241,7 +314,7 @@ fi } -#----[ check_x11 ]----# + function check_x11 () { #------------------------------------------------------ # check if the prepared medium X11 (Qt) is valid @@ -269,7 +342,7 @@ fi } -#----[ check_network ]----# + function check_network () { #------------------------------------------------------ # check if the prepared medium SSH is valid. It is valid @@ -294,7 +367,7 @@ fi } -#----[ check_vnc ]----# + function check_vnc () { #------------------------------------------------------ # check if the prepared medium VNC is valid @@ -334,7 +407,7 @@ fi } -#---[ validate_backup ]---# + function validate_backup () { # Check that the ID and VERSION_ID in the backup os-release file # matches with the values in the /etc/os-release to considered it @@ -359,7 +432,7 @@ fi } -#----[ restore_backup ]----# + function restore_backup () { # restores backup if it is available if [ -d /mnt/var/adm/backup/system-upgrade ]; then @@ -377,7 +450,7 @@ fi } -#----[ start_yast ]----# + function start_yast () { #------------------------------------------------------ # Start YaST2 refering to the contents of the Y2_* @@ -385,8 +458,13 @@ # --- local overcommit read overcommit < /proc/sys/vm/overcommit_memory - echo "*** Starting YaST2 ***" + + echo "*** Starting YaST ***" + log "================" + log "Starting YaST..." + log "================" log "\tAllow big memory allocation: overcommit_memory=1" + echo 1 > /proc/sys/vm/overcommit_memory if [ "$SPLASH" = yes -a -x /sbin/splash -a -n "$SPLASHCFG" ];then /sbin/splash -t "YaST running" @@ -399,7 +477,6 @@ OPT_FBITERM= fi - log "\tStarting YaST2:" log "\tMODULE_NAME: $Y2_MODULE_NAME" log "\tMODE_FLAGS: $Y2_MODE_FLAGS" log "\tMODULE_ARGS: $Y2_MODULE_ARGS" @@ -445,6 +522,9 @@ tee /var/log/YaST2/gdb-log Y2_EXIT_CODE=$? fi + log "===============" + log "YaST terminated" + log "===============" log "\tY2_EXIT_CODE: $Y2_EXIT_CODE" Y2_ABORT_MESSAGE="YaST seems to be aborted abnormally !" @@ -477,7 +557,7 @@ fi } -#----[ start_yast_and_reboot ]----# + function start_yast_and_reboot () { #------------------------------------------------------ # This function will reboot the system and start yast @@ -495,7 +575,7 @@ fi } -#----[ start_yast_again ]----# + function start_yast_again () { #------------------------------------------------------ # This function will restart yast again with the same @@ -508,6 +588,13 @@ fi } + + +#---------------------------------------------------------------------- +# MAIN +#---------------------------------------------------------------------- + + #============================================= # Start the Magic :-) #============================================= @@ -517,6 +604,26 @@ . /usr/lib/YaST2/startup/common/network.sh . /usr/lib/YaST2/startup/requires + +# Debugging helper: Only calculate and show the DPI, then exit. +# Start with +# +# FAKE_MON_WIDTH_MM=200 ./YaST2.call +# +# and watch stdout and /var/log/YaST2/y2start.log + +if [ -n "$FAKE_MON_WIDTH_MM" ]; then + echo "*** DPI Debug mode ***" + YAST_MON_WIDTH_MM="$FAKE_MON_WIDTH_MM" + DPI=`calculate_x11_dpi` + echo "DPI: $DPI" + set_qt_scale_factor $DPI + env | grep "^QT_SCALE" + echo "Done." + exit 1 +fi + + #============================================= # 1.1) set splash progress bar to 90% #---------------------------------------------