Hello community,

here is the log from the commit of package linuxrc for openSUSE:Factory checked 
in at 2020-01-30 09:40:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
 and      /work/SRC/openSUSE:Factory/.linuxrc.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "linuxrc"

Thu Jan 30 09:40:45 2020 rev:279 rq:768258 version:7.0.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes  2020-01-10 
18:40:21.371490181 +0100
+++ /work/SRC/openSUSE:Factory/.linuxrc.new.26092/linuxrc.changes       
2020-01-30 09:41:32.673494720 +0100
@@ -0,0 +1,22 @@
+--------------------------------------------------------------------
+Wed Jan 29 09:47:24 UTC 2020 - [email protected]
+
+- merge gh#openSUSE/linuxrc#210
+- For bsc#1161701, Moved the logic to retrieve the platform name
+  into a subroutine, and moved the invocation of it until after the
+  call to lxrc_add_parts so that the squashfs files have been
+  loopback mounted. Move the definition for the platform variable
+  outside the ifdef. Replace a direct assignment to platform with a
+  call to str_copy.
+- Modified the startup message from "1996-2019" to "1996-2020"
+- 7.0.9
+
+--------------------------------------------------------------------
+Fri Jan 24 16:07:04 UTC 2020 - [email protected]
+
+- merge gh#openSUSE/linuxrc#209
+- rework 'extend' command to log and report an error if linuxrc
+  unexpectedly crashes (bsc#1158996)
+- Append RPM_OPT_FLAGS to CFLAGS.
+- 7.0.8
+

Old:
----
  linuxrc-7.0.7.tar.xz

New:
----
  linuxrc-7.0.9.tar.xz

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

Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.T2CYJT/_old  2020-01-30 09:41:33.353495085 +0100
+++ /var/tmp/diff_new_pack.T2CYJT/_new  2020-01-30 09:41:33.357495087 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           linuxrc
-Version:        7.0.7
+Version:        7.0.9
 Release:        0
 Summary:        SUSE Installation Program
 License:        GPL-3.0+

++++++ linuxrc-7.0.7.tar.xz -> linuxrc-7.0.9.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.7/Makefile new/linuxrc-7.0.9/Makefile
--- old/linuxrc-7.0.7/Makefile  2019-12-13 15:15:51.000000000 +0100
+++ new/linuxrc-7.0.9/Makefile  2020-01-29 10:47:24.000000000 +0100
@@ -1,5 +1,5 @@
 CC     = gcc
-CFLAGS = -c -g -O2 -Wall -Wno-pointer-sign
+CFLAGS = -c -g -O2 -Wall -Wno-pointer-sign $(RPM_OPT_FLAGS)
 LDFLAGS        = -rdynamic -lhd -lblkid -lcurl -lreadline -lmediacheck
 ARCH   = $(shell /usr/bin/uname -m)
 ifeq ($(ARCH),s390x)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.7/VERSION new/linuxrc-7.0.9/VERSION
--- old/linuxrc-7.0.7/VERSION   2019-12-13 15:15:51.000000000 +0100
+++ new/linuxrc-7.0.9/VERSION   2020-01-29 10:47:24.000000000 +0100
@@ -1 +1 @@
-7.0.7
+7.0.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.7/auto2.c new/linuxrc-7.0.9/auto2.c
--- old/linuxrc-7.0.7/auto2.c   2019-12-13 15:15:51.000000000 +0100
+++ new/linuxrc-7.0.9/auto2.c   2020-01-29 10:47:24.000000000 +0100
@@ -1123,6 +1123,11 @@
 
   log_info("instsys add extension: %s\n", extension);
 
+  if(config.test) {
+    log_info("test mode - do nothing\n");
+    return 0;
+  }
+
   str_copy(&config.mountpoint.instdata, new_mountpoint());
   str_copy(&config.mountpoint.instsys, new_mountpoint());
 
@@ -1198,6 +1203,11 @@
 
   log_info("instsys remove extension: %s\n", extension);
 
+  if(config.test) {
+    log_info("test mode - do nothing\n");
+    return 0;
+  }
+
   s = url_instsys_base(config.url.instsys->path);
   if(!s) return 3;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.7/changelog new/linuxrc-7.0.9/changelog
--- old/linuxrc-7.0.7/changelog 2019-12-13 15:15:51.000000000 +0100
+++ new/linuxrc-7.0.9/changelog 2020-01-29 10:47:24.000000000 +0100
@@ -1,3 +1,23 @@
+2020-01-29:    7.0.9
+       - merge gh#openSUSE/linuxrc#210
+       - For bsc#1161701, Moved the logic to retrieve the platform name
+         into a subroutine, and moved the invocation of it until after the
+         call to lxrc_add_parts so that the squashfs files have been
+         loopback mounted.
+       - For bsc#1161701, Moved the logic to retrieve the platform name
+         into a subroutine, and moved the invocation of it until after the
+         call to lxrc_add_parts so that the squashfs files have been
+         loopback mounted. Move the definition for the platform variable
+         outside the ifdef. Replace a direct assignment to platform with a
+         call to str_copy.
+       - Modified the startup message from "1996-2019" to "1996-2020"
+
+2020-01-24:    7.0.8
+       - merge gh#openSUSE/linuxrc#209
+       - rework 'extend' command to log and report an error if linuxrc
+         unexpectedly crashes (bsc#1158996)
+       - Append RPM_OPT_FLAGS to CFLAGS.
+
 2019-12-13:    7.0.7
        - merge gh#openSUSE/linuxrc#207
        - Revert "Append RPM_OPT_FLAGS to CFLAGS."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.7/linuxrc.c new/linuxrc-7.0.9/linuxrc.c
--- old/linuxrc-7.0.7/linuxrc.c 2019-12-13 15:15:51.000000000 +0100
+++ new/linuxrc-7.0.9/linuxrc.c 2020-01-29 10:47:24.000000000 +0100
@@ -88,6 +88,7 @@
 static void lxrc_makelinks(char *name);
 #endif
 static void select_repo_url(char *msg, char **repo);
+static char * get_platform_name();
 
 #if SWISS_ARMY_KNIFE
 int probe_main(int argc, char **argv);
@@ -721,11 +722,6 @@
   util_setup_coredumps();
 
   #if defined(__s390__) || defined(__s390x__)
-  void *qc_configuration_handle = NULL;
-  const char *qc_result_string = NULL;
-  int qc_return_code = 0;
-  int qc_get_return_code = 0;
-
   if(util_check_exist("/sys/hypervisor/s390")) {
     char *type;
 
@@ -750,22 +746,6 @@
     if(!strncmp(utsinfo.machine, "s390x", sizeof "s390x" - 1 )) 
config.hwp.hypervisor="KVM";
     else config.hwp.hypervisor="Reallyunknown";
   }
-
-  qc_configuration_handle = qc_open(&qc_return_code);
-  if (qc_return_code==0)
-    qc_get_return_code = qc_get_attribute_string(qc_configuration_handle, 
qc_type_name,
-                                                    0, &qc_result_string);
-  else log_show("The call to qc_open failed.\n");
-
-  if (qc_get_return_code<=0) {
-    log_show("Unable to retrieve machine type.\n");
-    strprintf(&config.platform_name, "%s", "on unknown machine type");
-  }
-  else strprintf(&config.platform_name, "on %s", qc_result_string);
-
-  qc_close(qc_configuration_handle);
-  #else
-  config.platform_name="";
   #endif
 
   /* add cmdline to info file */
@@ -869,6 +849,8 @@
     lxrc_add_parts();
   }
 
+  config.platform_name=get_platform_name();
+
   LXRC_WAIT
 
   if(util_check_exist("/sbin/mount.smbfs")) {
@@ -920,7 +902,7 @@
     if (config.linemode)
       putchar('\n');
     printf(
-      "\n>>> %s installation program v" LXRC_FULL_VERSION " (c) 1996-2019 SUSE 
LLC %s <<<\n",
+      "\n>>> %s installation program v" LXRC_FULL_VERSION " (c) 1996-2020 SUSE 
LLC %s <<<\n",
       config.product,
       config.platform_name
     );
@@ -1500,7 +1482,7 @@
 void lxrc_usr1(int signum)
 {
   static unsigned extend_cnt = 0;
-  int i, err = 0;
+  int err = 0;
   char *s, buf[1024];
   FILE *f;
   slist_t *sl = NULL, *sl_task = NULL;
@@ -1531,19 +1513,29 @@
       else if(task == 'r' && sl) {
         str_copy(&sl->key, NULL);
       }
-      if(!fork()) {
+
+      pid_t child_pid = fork();
+
+      if(!child_pid) {
         config.extend_running = 1;
 
         log_debug("=== extend started ===\n");
 
-        for(i = 0; i < 3; i++) close(i);
 
         // get us a copy of the logs
         unlink("/tmp/extend.log");
         str_copy(&config.log.dest[1].name, "/tmp/extend.log");
-        config.log.dest[1].f = NULL;
+        config.log.dest[1].f = fopen(config.log.dest[1].name, "a");
         config.log.dest[1].level = LOG_LEVEL_SHOW | LOG_LEVEL_INFO | 
LOG_LEVEL_DEBUG | LOG_TIMESTAMP;
 
+        // close stdin; stdout and stderr point to log file
+        close(0);
+        if(config.log.dest[1].f) {
+          int fd = fileno(config.log.dest[1].f);
+          dup2(fd, 1);
+          dup2(fd, 2);
+        }
+
         config.download.cnt = 1000 + extend_cnt;
         config.mountpoint.cnt = 1000 + extend_cnt;
         if(!config.debug) config.debug = 1;
@@ -1575,9 +1567,13 @@
         config.log.dest[1].level = 0;
         log_debug("=== extend finished ===\n");
 
-        if(extend_pid > 0) kill(extend_pid, SIGUSR1);
         exit(0);
       }
+      else {
+        // wait for child to finish, then signal extend command to go on
+        waitpid(child_pid, NULL, 0);
+        if(extend_pid > 0) kill(extend_pid, SIGUSR1);
+      }
     }
   }
 
@@ -1761,3 +1757,30 @@
   log_debug("repo: %s\n", *repo ?: "");
 }
 
+char * get_platform_name()
+{
+  char *platform = NULL;
+#if defined(__s390__) || defined(__s390x__)
+  void *qc_configuration_handle = NULL;
+  const char *qc_result_string = NULL;
+  int qc_return_code = 0;
+  int qc_get_return_code = 0;
+
+  qc_configuration_handle = qc_open(&qc_return_code);
+  if (qc_return_code==0)
+    qc_get_return_code = qc_get_attribute_string(qc_configuration_handle, 
qc_type_name,
+                                                    0, &qc_result_string);
+  else log_show("The call to qc_open failed.\n");
+
+  if (qc_get_return_code<=0) {
+    log_show("Unable to retrieve machine type.\n");
+    strprintf(&platform, "%s", "on unknown machine type");
+  }
+  else strprintf(&platform, "on %s", qc_result_string);
+
+  qc_close(qc_configuration_handle);
+#else
+  str_copy(&platform, "");
+#endif
+return platform;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.7/mkpsfu/Makefile 
new/linuxrc-7.0.9/mkpsfu/Makefile
--- old/linuxrc-7.0.7/mkpsfu/Makefile   2019-12-13 15:15:51.000000000 +0100
+++ new/linuxrc-7.0.9/mkpsfu/Makefile   2020-01-29 10:47:24.000000000 +0100
@@ -1,5 +1,5 @@
 CC      = gcc
-CFLAGS  = -Wall -O2 -fomit-frame-pointer
+CFLAGS  = -Wall -O2 -fomit-frame-pointer $(RPM_OPT_FLAGS)
 
 .PHONY: all fonts font1 font2 clean
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.7/util.c new/linuxrc-7.0.9/util.c
--- old/linuxrc-7.0.7/util.c    2019-12-13 15:15:51.000000000 +0100
+++ new/linuxrc-7.0.9/util.c    2020-01-29 10:47:24.000000000 +0100
@@ -2705,6 +2705,9 @@
         fscanf(f, "%d", &err);
         fclose(f);
       }
+      else {
+        err = 1;
+      }
     }
   }
   else {


Reply via email to