Hello community,

here is the log from the commit of package linuxrc for openSUSE:Factory checked 
in at 2014-02-04 21:49:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
 and      /work/SRC/openSUSE:Factory/.linuxrc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "linuxrc"

Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes  2013-12-22 
19:36:19.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes     2014-02-04 
22:42:52.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Feb  3 14:46:01 CET 2014 - [email protected]
+
+- reduce dependency on arch-specific defines
+- add basic wicked support (dhcpv4)
+- don't run scripts in test mode
+
+-------------------------------------------------------------------

Old:
----
  linuxrc-4.2.4.tar.bz2

New:
----
  linuxrc-4.2.5.tar.bz2

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

Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.Dor1NG/_old  2014-02-04 22:42:52.000000000 +0100
+++ /var/tmp/diff_new_pack.Dor1NG/_new  2014-02-04 22:42:52.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package linuxrc
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,9 +25,9 @@
 Summary:        SUSE Installation Program
 License:        GPL-3.0+
 Group:          System/Boot
-Version:        4.2.4
+Version:        4.2.5
 Release:        0
-Source:         linuxrc-4.2.4.tar.bz2
+Source:         linuxrc-4.2.5.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description

++++++ linuxrc-4.2.4.tar.bz2 -> linuxrc-4.2.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.4/VERSION new/linuxrc-4.2.5/VERSION
--- old/linuxrc-4.2.4/VERSION   2013-12-20 13:09:34.000000000 +0100
+++ new/linuxrc-4.2.5/VERSION   2014-02-03 14:45:56.000000000 +0100
@@ -1 +1 @@
-4.2.4
+4.2.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.4/changelog new/linuxrc-4.2.5/changelog
--- old/linuxrc-4.2.4/changelog 2013-12-20 13:09:35.000000000 +0100
+++ new/linuxrc-4.2.5/changelog 2014-02-03 14:45:57.000000000 +0100
@@ -1,4 +1,9 @@
-2013-12-20:    HEAD
+2014-02-03:    HEAD
+       - reduce dependency on arch-specific defines
+       - add basic wicked support (dhcpv4)
+       - don't run scripts in test mode
+
+2013-12-20:    4.2.4
        - make linemode default on s390, swap linemode 1 & 2
 
 2013-12-19:    4.2.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.4/file.c new/linuxrc-4.2.5/file.c
--- old/linuxrc-4.2.4/file.c    2013-12-19 10:04:05.000000000 +0100
+++ new/linuxrc-4.2.5/file.c    2014-01-31 13:17:17.000000000 +0100
@@ -305,6 +305,7 @@
   { key_plymouth,       "Plymouth",       kf_cfg + kf_cmd_early          },
   { key_restart,        "Restart",        kf_cfg                         },
   { key_restarted,      "Restarted",      kf_cfg                         },
+  { key_wicked,         "Wicked",         kf_cfg + kf_cmd + kf_cmd_early },
 };
 
 static struct {
@@ -1628,6 +1629,10 @@
         if(f->is.numeric) config.restarted = f->nvalue;
         break;
 
+      case key_wicked:
+        if(f->is.numeric) config.wicked = f->nvalue;
+        break;
+
       default:
         break;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.4/file.h new/linuxrc-4.2.5/file.h
--- old/linuxrc-4.2.4/file.h    2013-12-19 10:11:06.000000000 +0100
+++ new/linuxrc-4.2.5/file.h    2014-01-31 13:17:44.000000000 +0100
@@ -52,7 +52,7 @@
   key_ipv6, key_ipv6only, key_usesax2, key_efi, key_supporturl, key_portno,
   key_osahwaddr, key_zen, key_zenconfig, key_udevrule, key_dhcpfail,
   key_namescheme, key_ptoptions, key_is_ptoption, key_withfcoe, key_digests,
-  key_plymouth, key_sslcerts, key_restart, key_restarted
+  key_plymouth, key_sslcerts, key_restart, key_restarted, key_wicked
 } file_key_t;
 
 typedef enum {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.4/global.h new/linuxrc-4.2.5/global.h
--- old/linuxrc-4.2.4/global.h  2013-12-19 09:42:35.000000000 +0100
+++ new/linuxrc-4.2.5/global.h  2014-02-03 14:07:35.000000000 +0100
@@ -57,12 +57,6 @@
 
 #include "version.h"
 
-#if defined(__sparc__) || defined(__PPC__) || defined(__s390__) || 
defined(__s390x__) || defined(__MIPSEB__)
-#define WITH_PCMCIA    0
-#else
-#define WITH_PCMCIA    1
-#endif
-
 // linuxrc includes a lot of other
 // functionality like 'mount/umount', 'loadkeys', ...
 
@@ -390,6 +384,7 @@
   unsigned plymouth:1;         /* start plymouth */
   unsigned restarting:1;       /* we are preparing for restart */
   unsigned restarted:1;                /* we have been restarted */
+  unsigned wicked:1;           /* use wicked for network setup */
   struct {
     unsigned check:1;          /* check for braille displays and start brld if 
found */
     char *dev;                 /* braille device */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.4/linuxrc.c new/linuxrc-4.2.5/linuxrc.c
--- old/linuxrc-4.2.4/linuxrc.c 2013-12-20 13:05:59.000000000 +0100
+++ new/linuxrc-4.2.5/linuxrc.c 2014-02-03 14:44:50.000000000 +0100
@@ -46,7 +46,7 @@
 
 #if defined(__alpha__) || defined(__ia64__)
 #define SIGNAL_ARGS    int signum, int x, struct sigcontext *scp
-#else  // __i386__ __x86_64__ __PPC__ __sparc__ __s390__ __s390x__ __MIPSEB__
+#else  // all others
 #define SIGNAL_ARGS    int signum, struct sigcontext scp
 #endif
 
@@ -737,6 +737,7 @@
   config.efi = -1;
   config.udev_mods = 1;
   config.devtmpfs = 1;
+  config.wicked = 0;
 
   config.scsi_rename = 0;
   config.scsi_before_usb = 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.4/net.c new/linuxrc-4.2.5/net.c
--- old/linuxrc-4.2.4/net.c     2013-12-19 15:44:13.000000000 +0100
+++ new/linuxrc-4.2.5/net.c     2014-01-31 11:52:28.000000000 +0100
@@ -85,6 +85,7 @@
 static int wlan_auth_cb(dia_item_t di);
 
 static dia_item_t di_wlan_auth_last = di_none;
+static int net_wicked(void);
 static int net_dhcp4(void);
 static int net_dhcp6(void);
 
@@ -1774,13 +1775,18 @@
 {
   unsigned active4, active = config.net.dhcp_active;
 
-  if(config.net.ipv4) net_dhcp4();
+  if(config.wicked) {
+    net_wicked();
+  }
+  else {
+    if(config.net.ipv4) net_dhcp4();
 
-  active4 = config.net.dhcp_active;
-  config.net.dhcp_active = active;
+    active4 = config.net.dhcp_active;
+    config.net.dhcp_active = active;
 
-  if(config.net.ipv6) net_dhcp6();
-  config.net.dhcp_active |= active4;
+    if(config.net.ipv6) net_dhcp6();
+    config.net.dhcp_active |= active4;
+  }
 
   return config.net.dhcp_active ? 0 : 1;
 }
@@ -1800,6 +1806,153 @@
  *  config.net.nisdomain
  *  config.net.nameserver
  */
+int net_wicked()
+{
+  char cmd[256], file[256], *s;
+  file_t *f0, *f;
+  window_t win;
+  int got_ip = 0, i, rc;
+  slist_t *sl0, *sl;
+  FILE *fp;
+
+  if(config.net.dhcp_active || config.net.keep) return 0;
+
+  if(config.test) {
+    config.net.dhcp_active = 1;
+
+    return 0;
+  }
+
+  if(config.win) {
+    sprintf(cmd, "Sending %s request...", "DHCP");
+    dia_info(&win, cmd, MSGTYPE_INFO);
+  }
+
+  sprintf(file, "/etc/sysconfig/network/ifcfg-%s", config.net.device);
+
+  fp = fopen(file, "w");
+  fprintf(fp, "BOOTPROTO='dhcp'\n");
+  fprintf(fp, "STARTMODE='auto'\n");
+  fclose(fp);
+
+  net_apply_ethtool(config.net.device, config.net.hwaddr);
+
+  // FIXME: config.net.dhcp_timeout
+
+  sprintf(cmd, "wicked ifup %s", config.net.device);
+
+  sprintf(file, "/var/run/wicked/leaseinfo.%s.dhcp.ipv4", config.net.device);
+
+  unlink(file);
+
+  system(cmd);
+
+  f0 = file_read_file(file, kf_dhcp);
+
+  for(f = f0; f; f = f->next) {
+    switch(f->key) {
+      case key_ipaddr:
+        got_ip = 1;
+        name2inet(&config.net.hostname, f->value);
+        net_check_address(&config.net.hostname, 0);
+        break;
+
+      case key_hostname:
+        str_copy(&config.net.realhostname, f->value);
+        break;
+
+      case key_netmask:
+        name2inet(&config.net.netmask, f->value);
+        net_check_address(&config.net.netmask, 0);
+        break;
+
+      case key_network:
+        name2inet(&config.net.network, f->value);
+        net_check_address(&config.net.network, 0);
+        break;
+
+      case key_broadcast:
+        name2inet(&config.net.broadcast, f->value);
+        net_check_address(&config.net.broadcast, 0);
+        break;
+
+      case key_gateway:
+        if((s = strchr(f->value, ' '))) *s = 0;
+        name2inet(&config.net.gateway, f->value);
+        net_check_address(&config.net.gateway, 0);
+        break;
+
+      case key_domain:
+        if(*f->value) str_copy(&config.net.domain, f->value);
+        break;
+
+      case key_dns:
+        for(config.net.nameservers = 0, sl = sl0 = slist_split(' ', f->value); 
sl; sl = sl->next) {
+          name2inet(&config.net.nameserver[config.net.nameservers], sl->key);
+          net_check_address(&config.net.nameserver[config.net.nameservers], 0);
+          if(++config.net.nameservers >= sizeof config.net.nameserver / sizeof 
*config.net.nameserver) break;
+        }
+        slist_free(sl0);
+        break;
+
+      case key_nisdomain:
+        if(*f->value) str_copy(&config.net.nisdomain, f->value);
+        break;
+
+      default:
+        break;
+    }
+  }
+
+  if(config.win) win_close(&win);
+
+  if(got_ip) {
+    config.net.dhcp_active = 1;
+    if(config.net.ifup_wait) sleep(config.net.ifup_wait);
+  }
+  else {
+    if(config.win) {
+      if(config.net.dhcpfail && strcmp(config.net.dhcpfail, "ignore")) {
+        if(!strcmp(config.net.dhcpfail, "show")) {
+          sprintf(cmd, "%s configuration failed.", "DHCP");
+          dia_info(&win, cmd, MSGTYPE_ERROR);
+          sleep(4);
+          win_close(&win);
+        }
+        else if(!strcmp(config.net.dhcpfail, "manual")) {
+          sprintf(cmd, "%s configuration failed.", "DHCP");
+          i = dia_yesno(cmd, NO);
+          if(i == YES) {
+            // is_static = 1;
+            // ?????
+          }
+        }
+      }
+    }
+  }
+
+  file_free_file(f0);
+
+  rc = config.net.dhcp_active ? 0 : 1;
+
+  return rc;
+}
+
+
+/*
+ * Start dhcp client and read dhcp info.
+ *
+ * Global vars changed:
+ *  config.net.dhcp_active
+ *  config.net.hostname
+ *  config.net.netmask
+ *  config.net.network
+ *  config.net.broadcast
+ *  config.net.gateway
+ *  config.net.domain
+ *  config.net.nisdomain
+ *  config.net.nameserver
+ */
 int net_dhcp4()
 {
   char cmd[256], file[256], *s;
@@ -2045,9 +2198,14 @@
 {
   if(!config.net.dhcp_active) return;
 
+  if(config.wicked) {
+    system("wicked ifdown all");
+  }
+
   /* kill them all */
   util_killall("dhcpcd", SIGHUP);
   util_killall("dhcp6c", SIGTERM);
+
   /* give them some time */
   sleep(2);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.4/settings.c new/linuxrc-4.2.5/settings.c
--- old/linuxrc-4.2.4/settings.c        2013-12-04 12:00:57.000000000 +0100
+++ new/linuxrc-4.2.5/settings.c        2014-02-03 14:05:52.000000000 +0100
@@ -94,8 +94,9 @@
   { lang_dummy, "", "us", SMALL_FONT, UNI_FONT, 0, 0, "en_US", "en_US", 0 },
 };
 
-#if defined(__i386__) || defined(__arm__) || defined(__x86_64__) || 
defined(__alpha__) || defined(__PPC__) || defined(__ia64__) || 
defined(__s390__) || defined(__s390x__) || defined(__MIPSEB__)
 #define KEYMAP_DEFAULT "us"
+
+#if !defined(__sparc__)
 static keymap_t set_keymaps_arm [] =
 {
 { "Belgian",              "be-latin1"    },
@@ -121,10 +122,7 @@
 { "Suomi",                "fi-latin1"    },
 { "Svensk",               "sv-latin1"    }
 };
-#endif
-
-#if defined(__sparc__)
-#define KEYMAP_DEFAULT "us"
+#else          /* defined(__sparc__) */
 static keymap_t set_keymaps_arm [] =
 {
 { "Ceske (PS/2)",                "cz-us-qwertz"    },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.4/util.c new/linuxrc-4.2.5/util.c
--- old/linuxrc-4.2.4/util.c    2013-12-19 10:52:48.000000000 +0100
+++ new/linuxrc-4.2.5/util.c    2014-01-16 11:11:06.000000000 +0100
@@ -4201,6 +4201,8 @@
 {
   char *buf = NULL;
 
+  if(config.test) return;
+
   if(util_check_exist2("/scripts", name) != 'r') return;
 
   file_write_install_inf("");

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to