Hello community,

here is the log from the commit of package cloud-netconfig for 
openSUSE:Leap:15.2 checked in at 2020-03-15 07:11:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/cloud-netconfig (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.cloud-netconfig.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cloud-netconfig"

Sun Mar 15 07:11:52 2020 rev:22 rq:784801 version:1.4

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/cloud-netconfig/cloud-netconfig.changes        
2020-01-15 14:50:28.457417278 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.cloud-netconfig.new.3160/cloud-netconfig.changes  
    2020-03-15 07:11:55.784983770 +0100
@@ -1,0 +2,13 @@
+Tue Feb  4 17:31:29 UTC 2020 - Joachim Gleissner <[email protected]>
+
+- Update to version 1.4:
+  + copy routes from default routing table (bsc#1162705, bsc#1162707)
+  + make CLOUD_NETCONFIG_MANAGE default configurable
+
+-------------------------------------------------------------------
+Mon Feb  3 12:10:34 UTC 2020 - Dominique Leuenberger <[email protected]>
+
+- BuildRequire pkgconfig(udev) instead of udev: allow OBS to
+  shortcut through the -mini flavors.
+
+-------------------------------------------------------------------

Old:
----
  cloud-netconfig-1.3.tar.bz2

New:
----
  cloud-netconfig-1.4.tar.bz2

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

Other differences:
------------------
++++++ cloud-netconfig.spec ++++++
--- /var/tmp/diff_new_pack.wN1Hhe/_old  2020-03-15 07:11:56.100983959 +0100
+++ /var/tmp/diff_new_pack.wN1Hhe/_new  2020-03-15 07:11:56.100983959 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package cloud-netconfig
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -33,10 +33,11 @@
 %endif
 
 Name:           %{base_name}%{flavor_suffix}
-Version:        1.3
+Version:        1.4
 Release:        0
 Summary:        Network configuration scripts for %{csp_string}
 License:        GPL-3.0-or-later
+Group:          System/Management
 URL:            https://github.com/SUSE-Enceladus/cloud-netconfig
 Source0:        %{base_name}-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -49,7 +50,7 @@
 BuildRequires:  sysconfig-netconfig
 Requires:       sysconfig-netconfig
 %endif
-BuildRequires:  udev
+BuildRequires:  pkgconfig(udev)
 Requires:       curl
 Requires:       udev
 %if 0%{?sles_version} == 11
@@ -89,6 +90,7 @@
 
 %files -n %{base_name}%{flavor_suffix}
 %defattr(-,root,root)
+%config(noreplace) %{_sysconfdir}/default/cloud-netconfig
 %{_sysconfdir}/netconfig.d/cloud-netconfig
 %{_sysconfdir}/sysconfig/network/scripts/*
 %if 0%{?suse_version} >= 1315

++++++ cloud-netconfig-1.3.tar.bz2 -> cloud-netconfig-1.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cloud-netconfig-1.3/Makefile 
new/cloud-netconfig-1.4/Makefile
--- old/cloud-netconfig-1.3/Makefile    2019-11-26 17:29:23.506433126 +0100
+++ new/cloud-netconfig-1.4/Makefile    2020-02-04 18:31:10.628357312 +0100
@@ -5,11 +5,13 @@
 NETCONFDIR?=$(SYSCONFDIR)/netconfig.d
 SCRIPTDIR?=$(SYSCONFDIR)/sysconfig/network/scripts
 UNITDIR?=$(PREFIX)/lib/systemd/system
+DEFAULTDIR?=$(SYSCONFDIR)/default
 DESTDIR?=
 DEST_NETCONFDIR=$(DESTDIR)$(NETCONFDIR)
 DEST_UDEVRULESDIR=$(DESTDIR)$(UDEVRULESDIR)
 DEST_SCRIPTDIR=$(DESTDIR)$(SCRIPTDIR)
 DEST_UNITDIR=$(DESTDIR)$(UNITDIR)
+DEST_DEFAULTDIR=$(DESTDIR)$(DEFAULTDIR)
 
 
 verSrc = $(shell cat VERSION)
@@ -33,8 +35,10 @@
        mkdir -p $(DEST_UDEVRULESDIR)
        mkdir -p $(DEST_SCRIPTDIR)
        mkdir -p $(DEST_UNITDIR)
+       mkdir -p $(DEST_DEFAULTDIR)
        install -m 755 common/cloud-netconfig $(DEST_NETCONFDIR)
        install -m 755 common/cloud-netconfig-cleanup $(DEST_SCRIPTDIR)
+       install -m 644 common/cloud-netconfig-default 
$(DEST_DEFAULTDIR)/cloud-netconfig
        install -m 755 common/cloud-netconfig-hotplug $(DEST_SCRIPTDIR)
        install -m 644 systemd/cloud-netconfig.service $(DEST_UNITDIR)
        install -m 644 systemd/cloud-netconfig.timer $(DEST_UNITDIR)
@@ -56,7 +60,7 @@
                --warning=no-file-changed \
                --exclude cloud-netconfig-$(verSrc)/cloud-netconfig-$(verSrc) \
                --exclude 
cloud-netconfig-$(verSrc)/cloud-netconfig-$(verSrc).tar.bz2 \
-    --exclude .git \
+               --exclude .git \
                cloud-netconfig-$(verSrc)
        @rm -f cloud-netconfig-$(verSrc)
        @ls -l cloud-netconfig-$(verSrc).tar.bz2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cloud-netconfig-1.3/VERSION 
new/cloud-netconfig-1.4/VERSION
--- old/cloud-netconfig-1.3/VERSION     2019-11-26 17:28:15.794079567 +0100
+++ new/cloud-netconfig-1.4/VERSION     2020-02-03 15:32:36.238953166 +0100
@@ -1 +1 @@
-1.3
+1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cloud-netconfig-1.3/cloud-netconfig-azure.spec 
new/cloud-netconfig-1.4/cloud-netconfig-azure.spec
--- old/cloud-netconfig-1.3/cloud-netconfig-azure.spec  2019-11-26 
17:28:15.794079567 +0100
+++ new/cloud-netconfig-1.4/cloud-netconfig-azure.spec  2020-02-04 
18:31:10.628357312 +0100
@@ -18,9 +18,9 @@
 %define base_name cloud-netconfig
 
 Name:           %{base_name}-azure
-Version:        1.3
+Version:        1.4
 Release:        0
-License:        GPL-3.0+
+License:        GPL-3.0-or-later
 Summary:        Network configuration scripts for Microsoft Azure
 Url:            https://github.com/SUSE/Enceladus
 Group:          System/Management
@@ -35,7 +35,7 @@
 BuildRequires:  sysconfig-netconfig
 Requires:       sysconfig-netconfig
 %endif
-BuildRequires:  udev
+BuildRequires:  pkgconfig(udev)
 Requires:       udev
 Requires:       curl
 Provides:       cloud-netconfig
@@ -68,6 +68,7 @@
 
 %files
 %defattr(-,root,root)
+%config(noreplace) %{_sysconfdir}/default/cloud-netconfig
 %{_sysconfdir}/netconfig.d/cloud-netconfig
 %{_sysconfdir}/sysconfig/network/scripts/*
 %if 0%{?suse_version} >= 1315
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cloud-netconfig-1.3/cloud-netconfig-ec2.spec 
new/cloud-netconfig-1.4/cloud-netconfig-ec2.spec
--- old/cloud-netconfig-1.3/cloud-netconfig-ec2.spec    2019-11-26 
17:28:15.794079567 +0100
+++ new/cloud-netconfig-1.4/cloud-netconfig-ec2.spec    2020-02-04 
18:31:10.628357312 +0100
@@ -18,9 +18,9 @@
 %define base_name cloud-netconfig
 
 Name:           %{base_name}-ec2
-Version:        1.3
+Version:        1.4
 Release:        0
-License:        GPL-3.0+
+License:        GPL-3.0-or-later
 Summary:        Network configuration scripts for Amazon EC2
 Url:            https://github.com/SUSE/Enceladus
 Group:          System/Management
@@ -35,7 +35,7 @@
 BuildRequires:  sysconfig-netconfig
 Requires:       sysconfig-netconfig
 %endif
-BuildRequires:  udev
+BuildRequires:  pkgconfig(udev)
 Requires:       udev
 Requires:       curl
 Provides:       cloud-netconfig
@@ -68,6 +68,7 @@
 
 %files
 %defattr(-,root,root)
+%config(noreplace) %{_sysconfdir}/default/cloud-netconfig
 %{_sysconfdir}/netconfig.d/cloud-netconfig
 %{_sysconfdir}/sysconfig/network/scripts/*
 %if 0%{?suse_version} >= 1315
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cloud-netconfig-1.3/cloud-netconfig.spec 
new/cloud-netconfig-1.4/cloud-netconfig.spec
--- old/cloud-netconfig-1.3/cloud-netconfig.spec        2019-11-26 
17:28:15.794079567 +0100
+++ new/cloud-netconfig-1.4/cloud-netconfig.spec        2020-02-04 
18:31:10.628357312 +0100
@@ -32,9 +32,9 @@
 %endif
 
 Name:           %{base_name}%{flavor_suffix}
-Version:        1.3
+Version:        1.4
 Release:        0
-License:        GPL-3.0+
+License:        GPL-3.0-or-later
 Summary:        Network configuration scripts for %{csp_string}
 Url:            https://github.com/SUSE-Enceladus/cloud-netconfig
 Group:          System/Management
@@ -49,7 +49,7 @@
 BuildRequires:  sysconfig-netconfig
 Requires:       sysconfig-netconfig
 %endif
-BuildRequires:  udev
+BuildRequires:  pkgconfig(udev)
 Requires:       udev
 Requires:       curl
 %if 0%{?sles_version} == 11
@@ -89,6 +89,7 @@
 
 %files -n %{base_name}%{flavor_suffix}
 %defattr(-,root,root)
+%config(noreplace) %{_sysconfdir}/default/cloud-netconfig
 %{_sysconfdir}/netconfig.d/cloud-netconfig
 %{_sysconfdir}/sysconfig/network/scripts/*
 %if 0%{?suse_version} >= 1315
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cloud-netconfig-1.3/common/cloud-netconfig 
new/cloud-netconfig-1.4/common/cloud-netconfig
--- old/cloud-netconfig-1.3/common/cloud-netconfig      2019-11-21 
14:12:18.156387464 +0100
+++ new/cloud-netconfig-1.4/common/cloud-netconfig      2020-02-04 
13:23:23.838237799 +0100
@@ -176,6 +176,40 @@
 }
 
 # -------------------------------------------------------------------
+# copy routes from default table to given table and remove routes
+# that do not exist in default table (if any)
+#
+update_routing_table()
+{
+    local rtable="$1"
+    local iface="$2"
+
+    test -z "$rtable" && return 1
+
+    # copy routes from default table
+    for ipv in "-4" "-6" ; do
+        ip $ipv route show | grep -v "^default" | while read route ; do
+            ip $ipv route replace $route table $rtable
+        done
+
+        # Do a second run with routes specific to the interface being 
configured.
+        # This makes sure that in case there are competing routes (same 
destination
+        # but different device), the one matching the right interface is 
selected.
+        # This situation can happen in case there are multiple interfaces that 
are
+        # connected to the same subnet.
+        ip $ipv route show dev "$iface" | grep -v "^default" | while read 
route ; do
+            ip $ipv route replace $route dev "$iface" table $rtable
+        done
+
+        # check if there are any leftover routes and delete them
+        ip $ipv route show all table $rtable | grep -v "^default" | while read 
route ; do
+            ip_out="$(ip $ipv route show $route)"
+            test -z "$ip_out" && ip $ipv route del $route table $rtable
+        done
+    done
+}
+
+# -------------------------------------------------------------------
 # configure interface with secondary IPv4 addresses configured in the
 # cloud framework and set up routing policies
 # 
@@ -263,6 +297,9 @@
         ip -4 route add default via $GW dev "$INTERFACE" table "$RTABLE"
     fi
 
+    # copy specific routes from the default routing table
+    update_routing_table $RTABLE $INTERFACE
+
     # update routing policies so connections from addresses on
     # secondary interfaces are routed via those
     local found prio from ip rest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cloud-netconfig-1.3/common/cloud-netconfig-default 
new/cloud-netconfig-1.4/common/cloud-netconfig-default
--- old/cloud-netconfig-1.3/common/cloud-netconfig-default      1970-01-01 
01:00:00.000000000 +0100
+++ new/cloud-netconfig-1.4/common/cloud-netconfig-default      2020-02-04 
18:31:10.628357312 +0100
@@ -0,0 +1,2 @@
+# Default value cloud-netconfig should use when creating new ifcfg files
+CLOUD_NETCONFIG_MANAGE="yes"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cloud-netconfig-1.3/common/cloud-netconfig-hotplug 
new/cloud-netconfig-1.4/common/cloud-netconfig-hotplug
--- old/cloud-netconfig-1.3/common/cloud-netconfig-hotplug      2018-07-10 
18:22:11.177301751 +0200
+++ new/cloud-netconfig-1.4/common/cloud-netconfig-hotplug      2020-02-04 
18:31:10.628357312 +0100
@@ -21,6 +21,9 @@
 test -z "$INTERFACE" && exit 1
 test "$INTERFACE" == "eth0" && exit 0
 
+test -f /etc/default/cloud-netconfig && . /etc/default/cloud-netconfig
+test -z "$CLOUD_NETCONFIG_MANAGE" && CLOUD_NETCONFIG_MANAGE=yes
+
 get_network_service()
 {
     if type -p systemctl >/dev/null ; then
@@ -53,7 +56,7 @@
 BOOTPROTO="dhcp"
 DHCLIENT_SET_DEFAULT_ROUTE="yes"
 DHCLIENT_ROUTE_PRIORITY="10${INTERFACE#eth}00"
-CLOUD_NETCONFIG_MANAGE="yes"
+CLOUD_NETCONFIG_MANAGE="$CLOUD_NETCONFIG_MANAGE"
 POST_DOWN_SCRIPT="${SCRIPT_PREFIX}cloud-netconfig-cleanup"
 EOF
 }


Reply via email to