Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package linuxrc for openSUSE:Factory checked 
in at 2022-01-22 08:18:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
 and      /work/SRC/openSUSE:Factory/.linuxrc.new.1938 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "linuxrc"

Sat Jan 22 08:18:00 2022 rev:304 rq:947935 version:8.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes  2021-11-28 
21:29:57.626104690 +0100
+++ /work/SRC/openSUSE:Factory/.linuxrc.new.1938/linuxrc.changes        
2022-01-22 08:18:26.838797359 +0100
@@ -1,0 +2,19 @@
+Fri Jan 21 12:48:08 UTC 2022 - wfe...@opensuse.org
+
+- merge gh#openSUSE/linuxrc#282
+- enable display dialog for all architectures
+- switch to tty1 if framebuffer device becomes available after
+  udevd startup (bsc#1193910, jsc#SLE-18632)
+- rework display menu
+- sanitize open file descriptors when starting yast
+- avoid error messages in running system
+- 8.8
+
+--------------------------------------------------------------------
+Thu Jan 20 15:31:35 UTC 2022 - shundham...@suse.de
+
+- merge gh#openSUSE/linuxrc#283
+- Migration away from kbd-legacy (jsc#SLE-21107)
+- 8.7
+
+--------------------------------------------------------------------

Old:
----
  linuxrc-8.6.tar.xz

New:
----
  linuxrc-8.8.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.ziHd24/_old  2022-01-22 08:18:27.350793909 +0100
+++ /var/tmp/diff_new_pack.ziHd24/_new  2022-01-22 08:18:27.358793855 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           linuxrc
-Version:        8.6
+Version:        8.8
 Release:        0
 Summary:        SUSE Installation Program
 License:        GPL-3.0+

++++++ linuxrc-8.6.tar.xz -> linuxrc-8.8.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/VERSION new/linuxrc-8.8/VERSION
--- old/linuxrc-8.6/VERSION     2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/VERSION     2022-01-21 13:48:08.000000000 +0100
@@ -1 +1 @@
-8.6
+8.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/changelog new/linuxrc-8.8/changelog
--- old/linuxrc-8.6/changelog   2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/changelog   2022-01-21 13:48:08.000000000 +0100
@@ -1,3 +1,16 @@
+2022-01-21:    8.8
+       - merge gh#openSUSE/linuxrc#282
+       - enable display dialog for all architectures
+       - switch to tty1 if framebuffer device becomes available after
+         udevd startup (bsc#1193910, jsc#SLE-18632)
+       - rework display menu
+       - sanitize open file descriptors when starting yast
+       - avoid error messages in running system
+
+2022-01-20:    8.7
+       - merge gh#openSUSE/linuxrc#283
+       - Migration away from kbd-legacy (jsc#SLE-21107)
+
 2021-11-25:    8.6
        - merge gh#openSUSE/linuxrc#278
        - allow option matching based on patterns (jsc#SLE-21308)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/dialog.c new/linuxrc-8.8/dialog.c
--- old/linuxrc-8.6/dialog.c    2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/dialog.c    2022-01-21 13:48:08.000000000 +0100
@@ -97,9 +97,10 @@
   { di_extras_quit,      "Quit linuxrc"         },
   
   { di_display_vnc,             "VNC"            },
-  { di_display_x11,     "X11"            },
+  { di_display_x11,     "Remote X11"             },
   { di_display_ssh,      "SSH"           },
-  { di_display_console,  "ASCII Console"         },
+  { di_display_console,  "Text-based UI"         },
+  { di_display_qt,       "Graphical UI"          },
   
   { di_390net_osa,      "OSA-2 or OSA Express"           },
   { di_390net_ctc,      "Channel To Channel (CTC)"               },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/dialog.h new/linuxrc-8.8/dialog.h
--- old/linuxrc-8.6/dialog.h    2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/dialog.h    2022-01-21 13:48:08.000000000 +0100
@@ -80,6 +80,7 @@
   di_display_vnc,
   di_display_ssh,
   di_display_console,
+  di_display_qt,
 
   di_390net_osa,
   di_390net_ctc,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/file.c new/linuxrc-8.8/file.c
--- old/linuxrc-8.6/file.c      2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/file.c      2022-01-21 13:48:08.000000000 +0100
@@ -95,7 +95,7 @@
   { key_rebootwait,     "WaitReboot",     kf_cfg + kf_cmd                },    
/* drop it? */
   { key_sourcemounted,  "Sourcemounted",  kf_none                        },
   { key_cdrom,          "Cdrom",          kf_none                        },
-  { key_console,        "Console",        kf_none                        },
+  { key_console,        "Console",        kf_cmd0                        },
   { key_ptphost,        "Pointopoint",    kf_cfg + kf_cmd                },
   { key_domain,         "Domain",         kf_cfg + kf_cmd + kf_dhcp      },
   { key_domain,         "DNSDOMAIN",      kf_cfg + kf_cmd + kf_dhcp      },
@@ -325,6 +325,7 @@
   { key_zram_root,      "zram_root",      kf_cmd_early                   },
   { key_zram_swap,      "zram_swap",      kf_cmd_early                   },
   { key_extend,         "Extend",         kf_cfg + kf_cmd                },
+  { key_switch_to_fb,   "SwitchToFB",     kf_cfg + kf_cmd_early          },
 };
 
 static struct {
@@ -1018,6 +1019,11 @@
         if(f->is.numeric) config.noshell = f->nvalue;
         break;
 
+      case key_console:
+        // just remember that it was used
+        config.console_option = 1;
+        break;
+
       case key_consoledevice:
         if(*f->value) {
           if(!config.console || strcmp(config.console, f->value)) {
@@ -1206,9 +1212,7 @@
             else if(!strcmp(s, "hostip")) i = NS_HOSTIP;
             else if(!strcmp(s, "vlanid")) i = NS_VLANID;
             else if(!strcmp(s, "gateway")) i = NS_GATEWAY;
-#if defined(__s390__) || defined(__s390x__)
             else if(!strcmp(s, "display")) i = NS_DISPLAY;
-#endif
             else if(!strcmp(s, "now")) i = NS_NOW;
             else if(!strcmp(s, "all")) do_all = 1;
             else if(!strncmp(s, "nameserver", sizeof "nameserver" - 1)) {
@@ -1890,6 +1894,10 @@
         slist_assign_values(&config.extend_option, f->value);
         break;
 
+      case key_switch_to_fb:
+        if(f->is.numeric) config.switch_to_fb = f->nvalue;
+        break;
+
       default:
         break;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/file.h new/linuxrc-8.8/file.h
--- old/linuxrc-8.6/file.h      2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/file.h      2022-01-21 13:48:08.000000000 +0100
@@ -58,7 +58,7 @@
   key_sshkey, key_systemboot, key_sethostname, key_debugshell, key_self_update,
   key_ibft_devices, key_linuxrc_core, key_norepo, key_auto_assembly, 
key_autoyast_parse,
   key_device_auto_config, key_autoyast_passurl, key_rd_zdev, key_insmod_pre,
-  key_zram, key_zram_root, key_zram_swap, key_extend
+  key_zram, key_zram_root, key_zram_swap, key_extend, key_switch_to_fb
 } file_key_t;
 
 typedef enum {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/global.h new/linuxrc-8.8/global.h
--- old/linuxrc-8.6/global.h    2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/global.h    2022-01-21 13:48:08.000000000 +0100
@@ -461,6 +461,7 @@
   unsigned device_auto_config:2;       /**< run s390 device auto-config (cf. 
bsc#1168036) */
   unsigned device_auto_config_done:1;  /**< set after s390 device auto-config 
has been run */
   unsigned lock_device_list;   /**< prevent device list updates if != 0 */
+  unsigned switch_to_fb:2;     /**< switch to framebuffer device; 0: no, 1: 
auto, 2: always */
   struct {
     char *root_size;           /**< zram root fs size (e.g. "1G" or "512M") */
     char *swap_size;           /**< zram swap size (e.g. "1G" or "512M") */
@@ -503,6 +504,7 @@
   char **argv;                 /**< store argv here */
   uint64_t segv_addr;          /**< segfault addr if last linuxrc run */
   char *console;               /**< console device */
+  unsigned console_option:1;   /**< whether 'console' kernel boot option was 
used */
   char *serial;                        /**< serial console parameters, e.g. 
ttyS0,38400 or ttyS1,9600n8 */
   char *product;               /**< product name */
   char *product_dir;           /**< product specific dir component (e.g. 
'suse') */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/install.c new/linuxrc-8.8/install.c
--- old/linuxrc-8.6/install.c   2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/install.c   2022-01-21 13:48:08.000000000 +0100
@@ -69,10 +69,8 @@
 static int   inst_commit_install      (void);
 static int   inst_choose_netsource    (void);
 static int   inst_choose_netsource_cb (dia_item_t di);
-#if defined(__s390__) || defined(__s390x__)
 static int   inst_choose_display      (void);
 static int   inst_choose_display_cb   (dia_item_t di);
-#endif
 static int   inst_choose_source       (void);
 static int   inst_choose_source_cb    (dia_item_t di);
 static int   inst_menu_cb             (dia_item_t di);
@@ -81,9 +79,7 @@
 static dia_item_t di_inst_menu_last = di_none;
 static dia_item_t di_inst_choose_source_last = di_none;
 static dia_item_t di_inst_choose_netsource_last = di_none;
-#if defined(__s390__) || defined(__s390x__)  
 static dia_item_t di_inst_choose_display_last = di_none;
-#endif
 
 static int ask_for_swap(int64_t size, char *msg);
 
@@ -298,7 +294,14 @@
   return err ? 1 : 0;
 }
 
-#if defined(__s390__) || defined(__s390x__)  
+
+/*
+ * Menu: installer UI variant
+ *
+ * return values:
+ *   0 : ok
+ *   1 : error
+ */
 int inst_choose_display()
 {
   if(!config.manual && (config.net.displayip || config.vnc || config.usessh)) {
@@ -308,57 +311,71 @@
   else {
     dia_item_t di;
     dia_item_t items[] = {
-      di_display_x11,
+      di_display_qt,
+      di_display_console,
       di_display_vnc,
       di_display_ssh,
-      di_display_console,
+      di_display_x11,
       di_none
     };
 
     di = dia_menu2("Select the display type.", 33, inst_choose_display_cb, 
items, di_inst_choose_display_last);
 
-    return di == di_none ? -1 : 0;
+    return di == di_none ? 1 : 0;
   }
 }
 
 
 /*
  * return values:
- * -1    : abort (aka ESC)
  *  0    : ok
  *  other: stay in menu
  */
 int inst_choose_display_cb(dia_item_t di)
 {
+  int result = 0;
+
   di_inst_choose_display_last = di;
 
   switch(di) {
     case di_display_x11:
-      if(dia_input2("Enter the name of the host running the X11 server.", 
&config.net.displayip, 40, 0)) return -1;
+      dia_input2("Enter the name of the host running the X11 server.", 
&config.net.displayip, 40, 0);
+      if(!config.net.displayip) result = 1;
       break;
 
     case di_display_vnc:
-      config.vnc=1;
+      config.vnc = 1;
       net_ask_password();
+      if(!config.net.vncpassword) {
+        config.vnc = 0;
+        result = 1;
+      }
       break;
 
     case di_display_ssh:
-      config.usessh=1;
-      config.vnc=0;
+      config.usessh = 1;
+      config.vnc = 0;
       net_ask_password();
+      if(!(config.net.sshpassword || config.net.sshpassword_enc)) {
+        config.usessh = 0;
+        result = 1;
+      }
       break;
 
     case di_display_console:
-      /* nothing to do */
+      config.textmode = 1;
+      break;
+
+    case di_display_qt:
+      config.textmode = 0;
       break;
 
     default:
       break;
   }
 
-  return 0;
+  return result;
 }
-#endif
 
 
 /*
@@ -1132,12 +1149,10 @@
     return 0;
   }
 
-#if defined(__s390__) || defined(__s390x__)
   if(!err &&
-    (config.net.setup & NS_DISPLAY) &&
+    (config.manual || (config.net.setup & NS_DISPLAY)) &&
     inst_choose_display()
   ) err = 1;
-#endif
 
   if(config.debug >= 2) util_status_info(1);
   
@@ -1412,6 +1427,11 @@
       else {
         signal(SIGUSR1, SIG_IGN);
 
+        // stdout = stderr
+        dup2(1, 2);
+        // close other file descriptors
+        for(int fd = 3; fd < 10; fd++) close(fd);
+
         // log_info("%d: system()\n", getpid());
         err = system(setupcmd);
         // log_info("%d: exit(%d)\n", getpid(), err);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/keyboard.c new/linuxrc-8.8/keyboard.c
--- old/linuxrc-8.6/keyboard.c  2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/keyboard.c  2022-01-21 13:48:08.000000000 +0100
@@ -183,10 +183,10 @@
 }
 
 
-void kbd_switch_tty(int tty)
+void kbd_switch_tty(int kbd_fd, int tty)
 {
-  ioctl(config.kbd_fd, VT_ACTIVATE, tty);
-  ioctl(config.kbd_fd, VT_WAITACTIVE, tty);
+  ioctl(kbd_fd, VT_ACTIVATE, tty);
+  ioctl(kbd_fd, VT_WAITACTIVE, tty);
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/keyboard.h new/linuxrc-8.8/keyboard.h
--- old/linuxrc-8.6/keyboard.h  2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/keyboard.h  2022-01-21 13:48:08.000000000 +0100
@@ -63,7 +63,7 @@
 extern void  kbd_end          (int close_fd);
 extern int   kbd_getch        (int wait_iv);
 extern void  kbd_clear_buffer (void);
-extern void  kbd_switch_tty   (int tty_iv);
+extern void  kbd_switch_tty   (int kbd_fd, int tty_iv);
 extern void  kbd_echo_off     (void);
 extern int   kbd_getch_old    (int);
 void kbd_unimode(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/linuxrc.c new/linuxrc-8.8/linuxrc.c
--- old/linuxrc-8.6/linuxrc.c   2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/linuxrc.c   2022-01-21 13:48:08.000000000 +0100
@@ -1,3 +1,5 @@
+#define _GNU_SOURCE     /* getline, strchrnul */
+
 /*
  *
  * linuxrc.c     Load modules and rootimage to ramdisk
@@ -90,6 +92,7 @@
 #endif
 static void select_repo_url(char *msg, char **repo);
 static char * get_platform_name();
+static char *get_console_device();
 
 #if SWISS_ARMY_KNIFE
 int probe_main(int argc, char **argv);
@@ -838,6 +841,7 @@
 #if defined(__s390x__)
   config.device_auto_config = 2;       /* ask before doing s390 device auto 
config */
 #endif
+  config.switch_to_fb = 1;
 
   // defaults for self-update feature
   config.self_update_url = NULL;
@@ -990,8 +994,7 @@
   );
 
   /*
-   * Do what has to be done before udevd starts; atm this is just the
-   * insmod.pre option.
+   * Do what has to be done before udevd starts.
    */
   file_read_info_file("cmdline", kf_cmd0);
 
@@ -1459,13 +1462,54 @@
 }
 
 
-/* Check if we start linuxrc on a serial console. On Intel and
-   Alpha, we look if the "console" parameter was used on the
-   commandline. On SPARC, we use the result from hardwareprobing. */
+#define LXRC_CONSOLE_DEV "/dev/tty1"
+
+/*
+ * Set console device linuxrc is going to use.
+ *
+ * This is usually just /dev/console or something specified via the
+ * 'console' boot option.
+ *
+ * But if a framebuffer device exists (after udev loads some drivers) and
+ * the user hasn't specified any 'console' option, switch to
+ * LXRC_CONSOLE_DEV (that is, use the framebuffer).
+ *
+ * This console switching can be prevented using the 'switch_to_fb=0' boot
+ * option or enforced using 'switch_to_fb=2'. (The default setting is 1.)
+ */
 void lxrc_check_console()
 {
+  char *current_console = get_console_device();
+
   util_set_serial_console(auto2_serial_console());
 
+  /*
+   * Switch to tty1 if there is a framebuffer device and the user hasn't
+   * specified something else explicitly.
+   *
+   * The idea here is to catch cases where udev loads graphics drivers and a
+   * local graphical terminal becomes available. In this case, switch to
+   * that terminal.
+   */
+  if(
+    !config.test &&
+    (config.switch_to_fb == 2 || (config.switch_to_fb == 1 && 
!config.console_option)) &&
+    util_check_exist("/dev/fb0") == 'c' &&
+    util_check_exist(LXRC_CONSOLE_DEV) == 'c'
+  ) {
+    if(strcmp(current_console, LXRC_CONSOLE_DEV)) {
+      str_copy(&config.console, LXRC_CONSOLE_DEV);
+      log_show(
+        "\nFramebuffer device detected - continuing installation on console 
%s.\n"
+        "Use boot option 'switch_to_fb=0' to prevent this.\n\n",
+        config.console
+      );
+      kbd_switch_tty(0, 1);
+    }
+  }
+
+  log_debug("going for console device: %s\n", config.console);
+
   if(config.serial) {
     log_info(
       "Console: %s, serial line params \"%s\"\n",
@@ -1851,3 +1895,31 @@
 #endif
 return platform;
 }
+
+
+/*
+ * Get current console device name.
+ *
+ * Do not free() the returned string.
+ */
+char *get_console_device()
+{
+  FILE *f;
+  static char *buf = NULL;
+  size_t len;
+
+  str_copy(&buf, NULL);
+
+  if((f = popen("showconsole 2>/dev/null", "r"))) {
+    if(getline(&buf, &len, f) > 0) {
+      *strchrnul(buf, '\n') = 0;
+    }
+    pclose(f);
+  }
+
+  if(!buf) str_copy(&buf, "/dev/console");
+
+  log_info("get_console_device: %s\n", buf);
+
+  return buf;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/module.c new/linuxrc-8.8/module.c
--- old/linuxrc-8.6/module.c    2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/module.c    2022-01-21 13:48:08.000000000 +0100
@@ -711,7 +711,7 @@
     util_update_disk_list(NULL, 1);
     util_update_cdrom_list();
 
-    if(mod_show_kernel_messages) kbd_switch_tty(4);
+    if(mod_show_kernel_messages) kbd_switch_tty(config.kbd_fd, 4);
   }
 
   err = lxrc_run(buf);
@@ -747,7 +747,7 @@
       }
     }
 
-    if(mod_show_kernel_messages) kbd_switch_tty(1);
+    if(mod_show_kernel_messages) kbd_switch_tty(config.kbd_fd, 1);
 
     util_update_kernellog();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/settings.c new/linuxrc-8.8/settings.c
--- old/linuxrc-8.6/settings.c  2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/settings.c  2022-01-21 13:48:08.000000000 +0100
@@ -68,7 +68,7 @@
 { "Ceske",                "cz"           },
 { "Dansk",                "dk"           },
 { "Deutsch",              "de-nodeadkeys"},
-{ "English (UK)",         "uk"           },
+{ "English (UK)",         "gb"           },
 { "English (US)",         "us"           },
 { "Espa??ol",              "es"           },
 { "Fran??ais",             "fr"           },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-8.6/util.c new/linuxrc-8.8/util.c
--- old/linuxrc-8.6/util.c      2021-11-25 10:01:16.000000000 +0100
+++ new/linuxrc-8.8/util.c      2022-01-21 13:48:08.000000000 +0100
@@ -553,6 +553,7 @@
   if(S_ISREG(sbuf.st_mode)) return 'r';
   if(S_ISDIR(sbuf.st_mode)) return 'd';
   if(S_ISBLK(sbuf.st_mode)) return 'b';
+  if(S_ISCHR(sbuf.st_mode)) return 'c';
 
   return 1;
 }
@@ -1202,6 +1203,8 @@
   sprintf(buf, "flags = ");
   add_flag(&sl0, buf, config.test, "test");
   add_flag(&sl0, buf, config.tmpfs, "tmpfs");
+  add_flag(&sl0, buf, config.console_option, "console");
+  add_flag(&sl0, buf, config.switch_to_fb, "switch2fb");
   add_flag(&sl0, buf, config.manual, "manual");
   add_flag(&sl0, buf, config.utf8, "utf8");
   add_flag(&sl0, buf, config.rescue, "rescue");

Reply via email to