Hello community,

here is the log from the commit of package linuxrc for openSUSE:Factory checked 
in at 2019-12-07 15:20:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
 and      /work/SRC/openSUSE:Factory/.linuxrc.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "linuxrc"

Sat Dec  7 15:20:05 2019 rev:276 rq:754323 version:7.0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes  2019-11-24 
23:44:13.440033762 +0100
+++ /work/SRC/openSUSE:Factory/.linuxrc.new.4691/linuxrc.changes        
2019-12-07 15:23:10.959730519 +0100
@@ -1,0 +2,30 @@
+Thu Dec 5 10:19:42 UTC 2019 - [email protected]
+
+- merge gh#openSUSE/linuxrc#204
+- Append RPM_OPT_FLAGS to CFLAGS.
+- Append EXTRA_CFLAGS to CFLAGS.
+- 7.0.5
+
+--------------------------------------------------------------------
+Thu Dec 5 10:05:01 UTC 2019 - [email protected]
+
+- merge gh#openSUSE/linuxrc#205
+- Fix building with -fno-common.
+- 7.0.4
+
+--------------------------------------------------------------------
+Thu Nov 28 15:33:47 UTC 2019 - [email protected]
+
+- merge gh#openSUSE/linuxrc#200
+- fix 'label' URL scheme parsing
+- 7.0.3
+
+--------------------------------------------------------------------
+Thu Nov 28 14:15:05 UTC 2019 - [email protected]
+
+- merge gh#openSUSE/linuxrc#199
+- fix URL parsing (bsc#1156967)
+- re-parse URLs after udevd has been started (bsc#1156967)
+- 7.0.2
+
+--------------------------------------------------------------------

Old:
----
  linuxrc-7.0.1.tar.xz

New:
----
  linuxrc-7.0.5.tar.xz

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

Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.3P6AxP/_old  2019-12-07 15:23:11.363730463 +0100
+++ /var/tmp/diff_new_pack.3P6AxP/_new  2019-12-07 15:23:11.367730463 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           linuxrc
-Version:        7.0.1
+Version:        7.0.5
 Release:        0
 Summary:        SUSE Installation Program
 License:        GPL-3.0+

++++++ linuxrc-7.0.1.tar.xz -> linuxrc-7.0.5.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/Makefile new/linuxrc-7.0.5/Makefile
--- old/linuxrc-7.0.1/Makefile  2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/Makefile  2019-12-05 11:19:42.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
 
 GIT2LOG := $(shell if [ -x ./git2log ] ; then echo ./git2log --update ; else 
echo true ; fi)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/VERSION new/linuxrc-7.0.5/VERSION
--- old/linuxrc-7.0.1/VERSION   2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/VERSION   2019-12-05 11:19:42.000000000 +0100
@@ -1 +1 @@
-7.0.1
+7.0.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/auto2.c new/linuxrc-7.0.5/auto2.c
--- old/linuxrc-7.0.1/auto2.c   2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/auto2.c   2019-12-05 11:19:42.000000000 +0100
@@ -1253,7 +1253,7 @@
   if(url->scheme == inst_rel) return;
 
   /*
-   * If the AutoYaST url is a directory we have to very its existence
+   * If the AutoYaST url is a directory we have to verify its existence
    * somehow.
    *
    * That works for mountable url schemes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/changelog new/linuxrc-7.0.5/changelog
--- old/linuxrc-7.0.1/changelog 2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/changelog 2019-12-05 11:19:42.000000000 +0100
@@ -1,3 +1,20 @@
+2019-12-05:    7.0.5
+       - merge gh#openSUSE/linuxrc#204
+       - Append RPM_OPT_FLAGS to CFLAGS.
+
+2019-12-05:    7.0.4
+       - merge gh#openSUSE/linuxrc#205
+       - Fix building with -fno-common.
+
+2019-11-28:    7.0.3
+       - merge gh#openSUSE/linuxrc#200
+       - fix 'label' URL scheme parsing
+
+2019-11-28:    7.0.2
+       - merge gh#openSUSE/linuxrc#199
+       - fix URL parsing (bsc#1156967)
+       - re-parse URLs after udevd has been started (bsc#1156967)
+
 2019-11-19:    7.0.1
        - merge gh#openSUSE/linuxrc#198
        - ensure autoyast url is passed to yast when autoyast2 option is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/file.c new/linuxrc-7.0.5/file.c
--- old/linuxrc-7.0.1/file.c    2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/file.c    2019-12-05 11:19:42.000000000 +0100
@@ -335,34 +335,7 @@
   { "Reboot",    1                  },
   { "Halt",      2                  },
   { "kexec",     3                  },
-  { "no scheme", inst_none          },
-  { "file",      inst_file          },
-  { "nfs",       inst_nfs           },
-  { "ftp",       inst_ftp           },
-  { "smb",       inst_smb           },
-  { "http",      inst_http          },
-  { "https",     inst_https         },
-  { "tftp",      inst_tftp          },
-  { "cd",        inst_cdrom         },
-  { "floppy",    inst_floppy        },
-  { "hd",        inst_hd            },
-  { "dvd",       inst_dvd           },
-  { "cdwithnet", inst_cdwithnet     },
-  { "net",       inst_net           },
-  { "slp",       inst_slp           },
-  { "exec",      inst_exec          },
-  { "rel",       inst_rel           },
-  { "disk",      inst_disk          },
-  { "usb",       inst_usb           },
-  { "label",     inst_label         },
-  /* add new inst modes _here_! */
-  { "extern",    inst_extern        },
-  /* the following are just aliases */
-  { "harddisk",  inst_hd            },
-  { "cdrom",     inst_cdrom         },
-  { "cifs",      inst_smb           },
-  { "device",    inst_disk          },
-  { "relurl",    inst_rel           },
+  // URL schemes moved to url.c
 #if defined(__s390__) || defined(__s390x__)
   { "osa",      di_390net_osa      },
   { "ctc",      di_390net_ctc      },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/global.h new/linuxrc-7.0.5/global.h
--- old/linuxrc-7.0.1/global.h  2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/global.h  2019-12-05 11:19:42.000000000 +0100
@@ -736,7 +736,7 @@
 
 } config_t;
 
-config_t config;
+extern config_t config;
 
 extern int             max_x_ig;
 extern int             max_y_ig;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/linuxrc.c new/linuxrc-7.0.5/linuxrc.c
--- old/linuxrc-7.0.1/linuxrc.c 2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/linuxrc.c 2019-12-05 11:19:42.000000000 +0100
@@ -982,6 +982,9 @@
     slist_append_str(&config.ifcfg.initial, sl->key);
   }
 
+  // now that udev is up and running, some URLs might be parsed differently
+  util_reparse_blockdev_urls();
+
   if(config.plymouth) util_run_script("plymouth_setup");
 
   util_free_mem();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/mkpsfu/Makefile 
new/linuxrc-7.0.5/mkpsfu/Makefile
--- old/linuxrc-7.0.1/mkpsfu/Makefile   2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/mkpsfu/Makefile   2019-12-05 11:19:42.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.1/scsi_rename.h 
new/linuxrc-7.0.5/scsi_rename.h
--- old/linuxrc-7.0.1/scsi_rename.h     2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/scsi_rename.h     2019-12-05 11:19:42.000000000 +0100
@@ -8,12 +8,12 @@
   unsigned removed:1;
 } scsi_dev_t;
 
-scsi_dev_t **scsi_list;
-scsi_dev_t **cdrom_list;
-scsi_dev_t **disk_list;
-unsigned scsi_list_len;
-unsigned cdrom_list_len;
-unsigned disk_list_len;
+extern scsi_dev_t **scsi_list;
+extern scsi_dev_t **cdrom_list;
+extern scsi_dev_t **disk_list;
+extern unsigned scsi_list_len;
+extern unsigned cdrom_list_len;
+extern unsigned disk_list_len;
 
 void get_scsi_list(void);
 void free_scsi_list(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/url.c new/linuxrc-7.0.5/url.c
--- old/linuxrc-7.0.1/url.c     2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/url.c     2019-12-05 11:19:42.000000000 +0100
@@ -62,6 +62,7 @@
 static int url_setup_slp(url_t *url);
 static void fixup_url_rel(url_t *url);
 static void fixup_url_usb(url_t *url);
+static void fixup_url_disk(url_t *url);
 static void fixup_url_label(url_t *url);
 static void skip_slashes(char **str);
 static void skip_not_slashes(char **str);
@@ -91,6 +92,42 @@
 static int is_signed(char *file, int check);
 static unsigned url_scheme_attr(instmode_t scheme, char *attr_name);
 
+// mapping of URL schemes to internal constants
+static struct {
+  char *name;
+  instmode_t value;
+} url_schemes[] = {
+  { "no scheme", inst_none          },
+  { "file",      inst_file          },
+  { "nfs",       inst_nfs           },
+  { "ftp",       inst_ftp           },
+  { "smb",       inst_smb           },
+  { "http",      inst_http          },
+  { "https",     inst_https         },
+  { "tftp",      inst_tftp          },
+  { "cd",        inst_cdrom         },
+  { "floppy",    inst_floppy        },
+  { "hd",        inst_hd            },
+  { "dvd",       inst_dvd           },
+  { "cdwithnet", inst_cdwithnet     },
+  { "net",       inst_net           },
+  { "slp",       inst_slp           },
+  { "exec",      inst_exec          },
+  { "rel",       inst_rel           },
+  { "disk",      inst_disk          },
+  { "usb",       inst_usb           },
+  { "label",     inst_label         },
+  /* add new inst modes _here_! (before "extern") */
+  { "extern",    inst_extern        },
+  /* the following are just aliases */
+  { "harddisk",  inst_hd            },
+  { "cdrom",     inst_cdrom         },
+  { "cifs",      inst_smb           },
+  { "device",    inst_disk          },
+  { "relurl",    inst_rel           },
+};
+
+
 void url_read(url_data_t *url_data)
 {
   CURL *c_handle;
@@ -517,6 +554,7 @@
   url->orig_scheme = url->scheme;
 
   /* adjust some url schemes to support autoyast syntax */
+  fixup_url_disk(url);
   fixup_url_rel(url);
   fixup_url_usb(url);
   fixup_url_label(url);
@@ -711,6 +749,23 @@
   url->scheme = inst_disk;
   slist_setentry(&url->query, "device", "disk/*usb*", 1);
 
+  fixup_url_disk(url);
+}
+
+
+/*
+ * Fix up autoyast usage of 'device'/'disk' url scheme.
+ *
+ *   - disk://some_dev/foo/bar
+ *
+ * Note the '//'.
+ *
+ * The server part of the url is prepended to path.
+ */
+void fixup_url_disk(url_t *url)
+{
+  if(url->scheme != inst_disk) return;
+
   if(url->server && url->path) {
     if(!*url->path) {
       free(url->path);
@@ -743,6 +798,7 @@
     slist_t *sl = slist_setentry(&url->query, "device", NULL, 1);
     strprintf(&sl->value, "disk/by-label/%s", url->server);
     slist_setentry(&url->query, "label", url->server, 1);
+    str_copy(&url->server, NULL);
   }
   else if(url->path) {
     char *s = url->path;
@@ -3690,21 +3746,17 @@
  * Convert URL scheme to internal number.
  *
  * Note: if the URL scheme is an externally supported one (via "/scripts/url")
- * it is regsitered and gets assigned an id.
+ * it is registered and gets assigned an id.
  */
 instmode_t url_scheme2id(char *scheme)
 {
-  int i;
   slist_t *sl;
+  instmode_t i;
 
   if(!scheme || !*scheme) return inst_none;
 
-  i = file_sym2num(scheme);
-
-  if(i >= 0) {
-    char *str = url_scheme2name(i);
-    // ensure it really matches the expected scheme
-    if(str && !strcmp(str, scheme)) return i;
+  for(unsigned u = 0; u < sizeof url_schemes / sizeof *url_schemes; u++) {
+    if(!strcasecmp(url_schemes[u].name, scheme)) return url_schemes[u].value;
   }
 
   if(util_check_exist2("/scripts/url", scheme) == 'd') {
@@ -3715,7 +3767,7 @@
     if(!slist_getentry(config.extern_scheme, scheme)) {
       log_info("registering url scheme: %s: %s\n", scheme, attr_val);
     }
-    sl = slist_setentry(&config.extern_scheme, scheme, *attr_val ? attr_val : 
NULL, 1);
+    slist_setentry(&config.extern_scheme, scheme, *attr_val ? attr_val : NULL, 
1);
   }
 
   for(sl = config.extern_scheme, i = inst_extern; sl; sl = sl->next, i++) {
@@ -3738,7 +3790,12 @@
   instmode_t i;
 
   if(scheme_id < inst_extern) {
-    s = file_num2sym("no scheme", scheme_id);
+    for(unsigned u = 0; u < sizeof url_schemes / sizeof *url_schemes; u++) {
+      if(url_schemes[u].value == scheme_id) {
+        s = url_schemes[u].name;
+        break;
+      }
+    }
   }
   else {
     for(sl = config.extern_scheme, i = inst_extern; sl; sl = sl->next, i++) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/util.c new/linuxrc-7.0.5/util.c
--- old/linuxrc-7.0.1/util.c    2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/util.c    2019-12-05 11:19:42.000000000 +0100
@@ -1253,12 +1253,24 @@
     slist_append_str(&sl0, buf);
   }
 
+  if((s = url_print(config.url.autoyast, 5))) {
+    slist_append_str(&sl0, "autoyast url (ay fmt):");
+    sprintf(buf, "  %s", s);
+    slist_append_str(&sl0, buf);
+  }
+
   if((s = url_print(config.url.autoyast2, 0))) {
     slist_append_str(&sl0, "autoyast2 url:");
     sprintf(buf, "  %s", s);
     slist_append_str(&sl0, buf);
   }
 
+  if((s = url_print(config.url.autoyast2, 5))) {
+    slist_append_str(&sl0, "autoyast2 url (ay fmt):");
+    sprintf(buf, "  %s", s);
+    slist_append_str(&sl0, buf);
+  }
+
   strcpy(buf, "net devices = (");
   for(i = 0, sl = config.net.devices; sl; sl = sl->next) {
     if(!sl->key) continue;
@@ -5611,3 +5623,46 @@
     log_info("failed to open %s\n", file_name);
   }
 }
+
+
+/*
+ * Re-parse URL that might be interpreted differently after udevd has been
+ * started.
+ *
+ * This concerns URLs that might optionally start the path with a block
+ * device name.
+ *
+ * As it is unknown which part of the path covers a block device until the
+ * block device really exists, this works properly only after udevd has been
+ * started.
+ *
+ * This does not affect URLs that use an explicit 'device' query parameter.
+ */
+void util_reparse_blockdev_url(url_t **url_ptr)
+{
+  url_t *url = *url_ptr;
+
+  // not needed here
+  if(!url || !url->is.blockdev || !url->str) return;
+
+  log_info("re-parsing url: %s\n", url->str);
+  url = url_set(url->str);
+
+  if(url) {
+    url_free(*url_ptr);
+    *url_ptr = url;
+  }
+}
+
+
+/*
+ * Re-parse some URLs that might be interpreted differently after udevd has
+ * been started.
+ */
+void util_reparse_blockdev_urls()
+{
+  util_reparse_blockdev_url(&config.url.autoyast);
+  util_reparse_blockdev_url(&config.url.autoyast2);
+  util_reparse_blockdev_url(&config.url.install);
+  util_reparse_blockdev_url(&config.url.instsys);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.1/util.h new/linuxrc-7.0.5/util.h
--- old/linuxrc-7.0.1/util.h    2019-11-19 16:15:43.000000000 +0100
+++ new/linuxrc-7.0.5/util.h    2019-12-05 11:19:42.000000000 +0100
@@ -160,3 +160,6 @@
 void util_setup_coredumps(void);
 
 void util_write_active_devices(char *format, ...)  __attribute__ ((format 
(printf, 1, 2)));
+
+void util_reparse_blockdev_url(url_t **url_ptr);
+void util_reparse_blockdev_urls(void);


Reply via email to