Hello community,

here is the log from the commit of package linuxrc for openSUSE:Leap:15.2 
checked in at 2020-04-08 12:48:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/linuxrc (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.linuxrc.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "linuxrc"

Wed Apr  8 12:48:16 2020 rev:106 rq:791000 version:7.0.12

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/linuxrc/linuxrc.changes        2020-03-13 
10:55:43.580364142 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.linuxrc.new.3248/linuxrc.changes      
2020-04-08 12:48:51.882357284 +0200
@@ -1,0 +2,12 @@
+Thu Apr 2 08:37:54 UTC 2020 - [email protected]
+
+- merge gh#openSUSE/linuxrc#219
+- parse 'try' keyword in ifcfg option (jsc#SLE-8965, jsc#SLE-9791)
+- move ifcfg option with 'try' to config.ifcfg.manual
+- fix iterating through device list
+- remove unused is_configured var
+- remove trailing space
+- fix travis setup
+- 7.0.12
+
+--------------------------------------------------------------------

Old:
----
  linuxrc-7.0.11.tar.xz

New:
----
  linuxrc-7.0.12.tar.xz

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

Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.AbTntB/_old  2020-04-08 12:48:52.542357628 +0200
+++ /var/tmp/diff_new_pack.AbTntB/_new  2020-04-08 12:48:52.542357628 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           linuxrc
-Version:        7.0.11
+Version:        7.0.12
 Release:        0
 Summary:        SUSE Installation Program
 License:        GPL-3.0+

++++++ linuxrc-7.0.11.tar.xz -> linuxrc-7.0.12.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.11/.travis.yml 
new/linuxrc-7.0.12/.travis.yml
--- old/linuxrc-7.0.11/.travis.yml      2020-03-06 13:13:38.000000000 +0100
+++ new/linuxrc-7.0.12/.travis.yml      2020-04-02 10:37:54.000000000 +0200
@@ -9,4 +9,4 @@
   - docker run --rm -it linuxrc-image rpm -qa | sort
 
 script:
-  - docker run --rm -it -e TRAVIS=1 linuxrc-image bash -c "make -j `nproc` && 
./smoke_test.sh"
+  - docker run --rm -it -e TRAVIS=1 --privileged linuxrc-image bash -c "make 
-j `nproc` && ./smoke_test.sh"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.11/VERSION new/linuxrc-7.0.12/VERSION
--- old/linuxrc-7.0.11/VERSION  2020-03-06 13:13:38.000000000 +0100
+++ new/linuxrc-7.0.12/VERSION  2020-04-02 10:37:54.000000000 +0200
@@ -1 +1 @@
-7.0.11
+7.0.12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.11/changelog new/linuxrc-7.0.12/changelog
--- old/linuxrc-7.0.11/changelog        2020-03-06 13:13:38.000000000 +0100
+++ new/linuxrc-7.0.12/changelog        2020-04-02 10:37:54.000000000 +0200
@@ -1,3 +1,12 @@
+2020-04-02:    7.0.12
+       - merge gh#openSUSE/linuxrc#219
+       - parse 'try' keyword in ifcfg option (jsc#SLE-8965, jsc#SLE-9791)
+       - move ifcfg option with 'try' to config.ifcfg.manual
+       - fix iterating through device list
+       - remove unused is_configured var
+       - remove trailing space
+       - fix travis setup
+
 2020-03-06:    7.0.11
        - merge gh#openSUSE/linuxrc#216
        - fix rescue system setup (bsc#1160378)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.11/file.c new/linuxrc-7.0.12/file.c
--- old/linuxrc-7.0.11/file.c   2020-03-06 13:13:38.000000000 +0100
+++ new/linuxrc-7.0.12/file.c   2020-04-02 10:37:54.000000000 +0200
@@ -1715,7 +1715,18 @@
         break;
 
       case key_ifcfg:
-        if(*f->value) ifcfg_append(&config.ifcfg.list, ifcfg_parse(f->value));
+        if(*f->value) {
+          ifcfg_t *ifcfg = ifcfg_parse(f->value);
+          if(ifcfg) {
+            // if 'try' flag is set, move to config.ifcfg.manual
+            if(ifcfg->search) {
+              ifcfg_copy(config.ifcfg.manual, ifcfg);
+            }
+            else {
+              ifcfg_append(&config.ifcfg.list, ifcfg);
+            }
+          }
+        }
         break;
 
       case key_defaultinstall:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.11/global.h new/linuxrc-7.0.12/global.h
--- old/linuxrc-7.0.11/global.h 2020-03-06 13:13:38.000000000 +0100
+++ new/linuxrc-7.0.12/global.h 2020-04-02 10:37:54.000000000 +0200
@@ -310,6 +310,7 @@
   unsigned used:1;     ///< config has been used
   unsigned pattern:1;  ///< 'device' is shell glob
   unsigned ptp:1;      ///< ptp config, gw is ptp peer
+  unsigned search:1;    ///< whether "try" feature is enabled for this ifcfg
   int netmask_prefix;  ///< prefix given via netmask option and only used if 
an ip doen't have one
   char *vlan;          ///< vlan id, if any
   char *ip;            ///< list of ip addresses, space separated
@@ -631,7 +632,6 @@
   struct {
     unsigned dhcp_active:1;    /**< dhcpd is running */
     unsigned ifconfig:1;       /**< setup network interface */
-    unsigned is_configured:1;  /**< set if network is configured */
     unsigned all_ifs:1;                /**< try all interfaces */
     unsigned now:1;            /**< configure network _now_ */
     unsigned ipv4:1;           /**< do ipv4 config */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.11/linuxrc.c new/linuxrc-7.0.12/linuxrc.c
--- old/linuxrc-7.0.11/linuxrc.c        2020-03-06 13:13:38.000000000 +0100
+++ new/linuxrc-7.0.12/linuxrc.c        2020-04-02 10:37:54.000000000 +0200
@@ -1206,7 +1206,7 @@
     util_disp_init();
 
     if(util_check_exist("/nextmedia") == 'r') {
-      config.cd1texts = file_parse_xmllike("/nextmedia", "text");  
+      config.cd1texts = file_parse_xmllike("/nextmedia", "text");
     }
 
     char *next_msg = get_translation(config.cd1texts, 
current_language()->locale);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.11/net.c new/linuxrc-7.0.12/net.c
--- old/linuxrc-7.0.11/net.c    2020-03-06 13:13:38.000000000 +0100
+++ new/linuxrc-7.0.12/net.c    2020-04-02 10:37:54.000000000 +0200
@@ -113,9 +113,6 @@
  *      0: ok
  *   != 0: error or abort
  *
- * Global vars changed:
- *  config.net.is_configured
- *
  * Does nothing if DHCP is active.
  *
  * FIXME: needs window mode or not?
@@ -199,9 +196,6 @@
 /*
  * Shut down all network interfaces.
  *
- * Global vars changed:
- *  config.net.is_configured
- *
  * config.net.device:    interface
  * /proc/net/route: configured interfaces
  */
@@ -214,12 +208,10 @@
   log_debug("%s: network down\n", device);
 
   if(config.test) {
-    config.net.is_configured = nc_none;
     return;
   }
 
   net_wicked_down(device);
-  config.net.is_configured = nc_none;
 
   // delete current config
   if(config.ifcfg.current) {
@@ -2395,6 +2387,7 @@
   slist_t *sl, *sl0, *slx;
   ifcfg_t *ifcfg;
   char *s, *t;
+  int try_shift = 0; // try keyword is optional, so position of following 
params can vary
 
   if(!str) return NULL;
 
@@ -2430,6 +2423,16 @@
   }
 
   s = slist_key(sl0, 1);
+  if(s && (strncmp(s, "try", sizeof "try" -1) == 0))
+  {
+    log_debug("Will try to detect interface with access to installation");
+
+    ifcfg->search = 1;
+    try_shift = 1;
+
+    s = slist_key(sl0, 2);
+  }
+
   if(s && !strncmp(s, "dhcp", sizeof "dhcp" - 1)) {
     str_copy(&ifcfg->type, s);
     ifcfg->dhcp = 1;
@@ -2441,13 +2444,13 @@
 
     if(s && *s && !(t = strchr(s, '='))) str_copy(&ifcfg->ip, s);
 
-    s = slist_key(sl0, 2);
+    s = slist_key(sl0, 2 + try_shift);
     if(!t && s && *s && !(t = strchr(s, '='))) str_copy(&ifcfg->gw, s);
 
-    s = slist_key(sl0, 3);
+    s = slist_key(sl0, 3 + try_shift);
     if(!t && s && *s && !(t = strchr(s, '='))) str_copy(&ifcfg->ns, s);
 
-    s = slist_key(sl0, 4);
+    s = slist_key(sl0, 4 + try_shift);
     if(!t && s && *s && !(t = strchr(s, '='))) str_copy(&ifcfg->domain, s);
   }
 
@@ -2486,11 +2489,14 @@
 
   str_copy(&dst->device, src->device);
   str_copy(&dst->type, src->type);
+
   dst->dhcp = src->dhcp;
   dst->used = src->used;
   dst->pattern = src->pattern;
   dst->ptp = src->ptp;
+  dst->search = src->search;
   dst->netmask_prefix = src->netmask_prefix;
+
   str_copy(&dst->vlan, src->vlan);
   str_copy(&dst->ip, src->ip);
   str_copy(&dst->gw, src->gw);
@@ -2520,10 +2526,10 @@
   if(ifcfg->vlan) strprintf(&buf, "%s  vlan = %s\n", buf, ifcfg->vlan);
   if(ifcfg->type) strprintf(&buf, "%s  type = %s\n", buf, ifcfg->type);
   strprintf(&buf,
-    "%s  dhcp = %u, pattern = %u, used = %u, prefix = %d, ptp = %u\n",
+    "%s  dhcp = %u, pattern = %u, used = %u, prefix = %d, ptp = %u, search = 
%u\n",
     buf,
     ifcfg->dhcp, ifcfg->pattern, ifcfg->used,
-    ifcfg->netmask_prefix, ifcfg->ptp
+    ifcfg->netmask_prefix, ifcfg->ptp, ifcfg->search
   );
   if(ifcfg->ip) strprintf(&buf, "%s  ip = %s\n", buf, ifcfg->ip);
   if(ifcfg->gw) strprintf(&buf, "%s  gw = %s\n", buf, ifcfg->gw);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-7.0.11/url.c new/linuxrc-7.0.12/url.c
--- old/linuxrc-7.0.11/url.c    2020-03-06 13:13:38.000000000 +0100
+++ new/linuxrc-7.0.12/url.c    2020-04-02 10:37:54.000000000 +0200
@@ -1776,7 +1776,7 @@
   char *hwaddr;
   hd_hw_item_t hw_items[3] = { hw_network_ctrl, hw_network, 0 };
   str_list_t *sl;
-  char *url_device;
+  char *url_device = NULL;
 
   if(!url || !url->scheme) return 1;
 
@@ -1806,8 +1806,8 @@
     hw_items[1] = 0;
   }
 
-  url_device = url->device;
-  if(!url_device) url_device = url->is.network ? config.ifcfg.manual->device : 
config.device;
+  str_copy(&url_device, url->device);
+  if(!url_device) str_copy(&url_device, url->is.network ? 
config.ifcfg.manual->device : config.device);
 
   for(found = 0, hd = sort_a_bit(fix_device_names(hd_list2(config.hd_data, 
hw_items, 0))); hd; hd = hd->next) {
     for(hwaddr = NULL, res = hd->res; res; res = res->next) {
@@ -1886,6 +1886,8 @@
     str_copy(&url->used.unique_id, NULL);
   }
 
+  str_copy(&url_device, NULL);
+
   return found ? 0 : 1;
 }
 
@@ -2413,7 +2415,7 @@
   hd_res_t *res;
   char *hwaddr;
   str_list_t *sl;
-  char *url_device;
+  char *url_device = NULL;
   hd_hw_item_t hw_items[] = { hw_network_ctrl, hw_network, 0 };
 
   if(!url || !url->is.network || config.ifcfg.if_up) return url_read_file(url, 
dir, src, dst, label, flags);
@@ -2429,7 +2431,7 @@
   LXRC_WAIT
 
   if(config.hd_data) {
-    url_device = url->device ?: config.ifcfg.manual->device;
+    str_copy(&url_device, url->device ?: config.ifcfg.manual->device);
 
     for(found = 0, hd = sort_a_bit(hd_list2(config.hd_data, hw_items, 0)); hd; 
hd = hd->next) {
       for(hwaddr = NULL, res = hd->res; res; res = res->next) {
@@ -2472,6 +2474,8 @@
       str_copy(&url->used.unique_id, NULL);
     }
 
+    str_copy(&url_device, NULL);
+
     LXRC_WAIT
 
     return found ? 0 : 1;


Reply via email to