diff --git a/bin/yupdate b/bin/yupdate index 47d35e41d..21e77280b 100755 --- a/bin/yupdate +++ b/bin/yupdate @@ -584,14 +584,20 @@ module YUpdate # the inst-sys contains the /.packages.initrd file with a list of packages return if File.exist?("/.packages.initrd") - # live medium uses overlay FS for the root - return if `mount`.match?(/^\w+ on \/ type overlay/) + mount_out = `mount` + # live medium uses overlay FS or device mapper for the root + if mount_out.match?(/^\w+ on \/ type overlay/) || + mount_out.match?(/^\/dev\/mapper\/live-rw on \/ /) + + return + end return if in_container? # exit immediately if running in an installed system warn "ERROR: This script can only work in the installation system (inst-sys), " \ "live medium or in a container!" + warn "If you are sure it is OK to use the script add the --force option." exit 1 end @@ -620,16 +626,23 @@ module YUpdate # parse the command line options class Options def self.parse(argv) + force = argv.include?("--force") + if force + argv.delete("--force") + # pass the force option to the executed scripts + ENV["YUPDATE_FORCE"] = "1" + end + command = argv.shift case command when "version" VersionCommand.new when "overlay" - System.check! + System.check! unless force OverlayCommand.new(argv) when "patch" - System.check! + System.check! unless force PatchCommand.new(argv) when "servers" ServersCommand.new(argv) @@ -704,7 +717,9 @@ module YUpdate # add the default "yast" GitHub organization if missing repo = "yast/#{repo}" unless repo.include?("/") downloader = GithubDownloader.new(repo, branch) - install_tar(downloader) + # the GitHub tarballs have all content in a "-" subdirectory + dir = repo.split("/", 2).last + "-" + branch + install_tar(downloader, dir) end def install_from_tar(url) @@ -753,12 +768,15 @@ module YUpdate raise "Script #{File.basename(script)} failed" unless system(script) end - def install_tar(downloader) + # extract the tarball into a temporary directory and install it + # @param downloader the downloader to use + # @param subdir subdirectory in the source tarball + def install_tar(downloader, subdir = "") Dir.mktmpdir do |download_dir| downloader.extract_to(download_dir) - run_pre_script(download_dir) + run_pre_script(File.join(download_dir, subdir)) install_sources(download_dir) - run_post_script(download_dir) + run_post_script(File.join(download_dir, subdir)) end end diff --git a/package/yast2-installation.changes b/package/yast2-installation.changes index bfaf12edb..22ffd1ef2 100644 --- a/package/yast2-installation.changes +++ b/package/yast2-installation.changes @@ -1,21 +1,56 @@ ------------------------------------------------------------------- -Fri Sep 01 19:57:03 UTC 2023 - Josef Reidinger +Tue Aug 15 08:42:50 UTC 2023 - Stefan Hundhammer -- Branch package for SP6 (bsc#1208913) +- Require awk for use in startup scripts (bsc#1214277) +- 4.6.7 ------------------------------------------------------------------- +Fri Aug 4 07:09:13 UTC 2023 - Michal Filka + +- bsc#1213959 + - Change status label properly when toggling status in the + "Previousy used repositories" dialog. +- 4.6.6 + +------------------------------------------------------------------- +Tue Jul 11 07:20:29 UTC 2023 - Ladislav Slezák + +- Fixed yupdate script to properly run pre/post scripts + when patching from GitHub (bsc#1213197) +- 4.6.5 + ------------------------------------------------------------------- Thu Jun 15 15:01:13 UTC 2023 - Stefan Hundhammer - Don't always enable sshd and open the ssh port (bsc#1211764) -- 4.5.17 +- 4.6.4 + +------------------------------------------------------------------- +Thu May 11 16:44:38 UTC 2023 - Stefan Hundhammer + +- Use a larger font for xterm during installation via X resources + (bsc#1211267) + Details: https://github.com/yast/yast-installation/pull/1085 + 4.6.3 + +------------------------------------------------------------------- +Mon Apr 3 12:04:23 UTC 2023 - Ladislav Slezák + +- yupdate - improved Live ISO detection, added "--force" option + (related to bsc#1206927) +- 4.6.2 ------------------------------------------------------------------- -Mon Mar 13 08:35:59 UTC 2023 - Ladislav Slezák +Mon Mar 13 08:49:20 UTC 2023 - Ladislav Slezák - Removed unnecessary executable flag from file security_proposal.rb (bsc#1209094) -- 4.5.16 +- 4.6.1 + +------------------------------------------------------------------- +Fri Mar 03 14:44:07 UTC 2023 - Ladislav Slezák + +- Bump version to 4.6.0 (bsc#1208913) ------------------------------------------------------------------- Wed Jan 25 19:56:12 UTC 2023 - Knut Anderssen diff --git a/package/yast2-installation.spec b/package/yast2-installation.spec index f33fe7a94..a5308b330 100644 --- a/package/yast2-installation.spec +++ b/package/yast2-installation.spec @@ -16,7 +16,7 @@ # Name: yast2-installation -Version: 4.6.0 +Version: 4.6.7 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only @@ -58,6 +58,8 @@ Requires: coreutils Requires: gzip # use in startup scripts Requires: initviocons +# bsc#1214277; require awk, not gawk, to allow for lighterweight alternatives like busybox +Requires: awk # Needed call /sbin/ip in vnc.sh/network.sh Requires: iproute2 # for the first/second stage of installation diff --git a/src/lib/installation/clients/inst_upgrade_urls.rb b/src/lib/installation/clients/inst_upgrade_urls.rb index 5dd2a9552..8f4e34e17 100644 --- a/src/lib/installation/clients/inst_upgrade_urls.rb +++ b/src/lib/installation/clients/inst_upgrade_urls.rb @@ -150,10 +150,10 @@ def repo_action(status) when :removed # TRANSLATORS: The action to perform with a repository _("Remove") - when :disable + when :disabled # TRANSLATORS: The action to perform with a repository _("Disable") - when :enable + when :enabled # TRANSLATORS: The action to perform with a repository _("Enable") else diff --git a/startup/YaST2.call b/startup/YaST2.call index 032a75f5f..4b55533a7 100755 --- a/startup/YaST2.call +++ b/startup/YaST2.call @@ -179,6 +179,66 @@ function set_qt_scale_factor () { } +function calculate_xterm_font_size() { +#------------------------------------------------------ +# Calculate an appropriate font size for xterm based on the DPI +# ($1) and set XTERM_FONT_SIZE accordingly. +# --- + + if [ -n "$XTERM_FONT_SIZE" ]; then + # Enable overriding the xterm font size from the command line or + # from an installation ISO boot parameter: + # + # Either boot the installation ISO with something like + # + # XTERM_FONT_SIZE=21 + # + # (which will end up in the environment) + # or start this script in DPI debugging mode with + # + # FAKE_MON_WIDTH_MM=200 XTERM_FONT_SIZE=21 ./YaST2.call + log "\tUsing XTERM_FONT_SIZE from environment: ${XTERM_FONT_SIZE}" + return + fi + + local DPI=${1:-96} + + if [ ${DPI:-0} -le 96 ]; then + XTERM_FONT_SIZE=10 + elif [ $DPI -le 192 ]; then + XTERM_FONT_SIZE=12 + else + XTERM_FONT_SIZE=14 + fi + + export XTERM_FONT_SIZE + log "\tXTERM_FONT_SIZE: $XTERM_FONT_SIZE for $DPI dpi" +} + + +function add_x11_resources() { +#------------------------------------------------------ +# Add some X resources for xterm to /root/.Xdefaults +# +# Notice that this file is only used if nothing has been +# loaded into the X server with 'xrdb' yet. +# --- + + local RESOURCE_FILE=/root/.Xdefaults + XTERM_FONT_SIZE=${XTERM_FONT_SIZE:-12} + log "\tAdding X resources for xterm to $RESOURCE_FILE" + + cat >>$RESOURCE_FILE <