diff --git a/cloud-init-proper-ipv6-varname.patch b/cloud-init-proper-ipv6-varname.patch new file mode 100644 index 0000000..03744c3 --- /dev/null +++ b/cloud-init-proper-ipv6-varname.patch @@ -0,0 +1,112 @@ +--- cloudinit/net/sysconfig.py.orig ++++ cloudinit/net/sysconfig.py +@@ -369,10 +369,13 @@ class Renderer(renderer.Renderer): + ipv6_cidr = "%s/%s" % (subnet['address'], subnet['prefix']) + if ipv6_index == 0: + iface_cfg['IPV6ADDR'] = ipv6_cidr ++ iface_cfg['IPADDR6'] = ipv6_cidr + elif ipv6_index == 1: + iface_cfg['IPV6ADDR_SECONDARIES'] = ipv6_cidr ++ iface_cfg['IPADDR6_0'] = ipv6_cidr + else: + iface_cfg['IPV6ADDR_SECONDARIES'] += " " + ipv6_cidr ++ iface_cfg['IPADDR6_%d' % ipv6_index] = ipv6_cidr + else: + ipv4_index = ipv4_index + 1 + suff = "" if ipv4_index == 0 else str(ipv4_index) +--- tests/unittests/test_distros/test_netconfig.py.orig ++++ tests/unittests/test_distros/test_netconfig.py +@@ -496,6 +496,7 @@ class TestNetCfgDistroRedhat(TestNetCfgD + BOOTPROTO=none + DEFROUTE=yes + DEVICE=eth0 ++ IPADDR6=2607:f0d0:1002:0011::2/64 + IPV6ADDR=2607:f0d0:1002:0011::2/64 + IPV6INIT=yes + IPV6_DEFAULTGW=2607:f0d0:1002:0011::1 +@@ -588,6 +589,7 @@ class TestNetCfgDistroOpensuse(TestNetCf + BOOTPROTO=none + DEFROUTE=yes + DEVICE=eth0 ++ IPADDR6=2607:f0d0:1002:0011::2/64 + IPV6ADDR=2607:f0d0:1002:0011::2/64 + IPV6INIT=yes + IPV6_DEFAULTGW=2607:f0d0:1002:0011::1 +--- tests/unittests/test_net.py.orig ++++ tests/unittests/test_net.py +@@ -369,6 +369,9 @@ DEVICE=eth0 + GATEWAY=172.19.3.254 + HWADDR=fa:16:3e:ed:9a:59 + IPADDR=172.19.1.34 ++IPADDR6=2001:DB8::10/64 ++IPADDR6_0=2001:DB9::10/64 ++IPADDR6_2=2001:DB10::10/64 + IPV6ADDR=2001:DB8::10/64 + IPV6ADDR_SECONDARIES="2001:DB9::10/64 2001:DB10::10/64" + IPV6INIT=yes +@@ -407,6 +410,9 @@ DEVICE=eth0 + GATEWAY=172.19.3.254 + HWADDR=fa:16:3e:ed:9a:59 + IPADDR=172.19.1.34 ++IPADDR6=2001:DB8::10/64 ++IPADDR6_0=2001:DB9::10/64 ++IPADDR6_2=2001:DB10::10/64 + IPV6ADDR=2001:DB8::10/64 + IPV6ADDR_SECONDARIES="2001:DB9::10/64 2001:DB10::10/64" + IPV6INIT=yes +@@ -658,6 +664,7 @@ NETWORK_CONFIGS = { + BOOTPROTO=none + DEVICE=iface0 + IPADDR=192.168.14.2 ++ IPADDR6=2001:1::1/64 + IPV6ADDR=2001:1::1/64 + IPV6INIT=yes + NETMASK=255.255.255.0 +@@ -927,6 +934,7 @@ pre-down route del -net 10.0.0.0 netmask + DEFROUTE=yes + DEVICE=br0 + IPADDR=192.168.14.2 ++ IPADDR6=2001:1::1/64 + IPV6ADDR=2001:1::1/64 + IPV6INIT=yes + IPV6_DEFAULTGW=2001:4800:78ff:1b::1 +@@ -1322,6 +1330,7 @@ pre-down route del -net 10.0.0.0 netmask + MACADDR=aa:bb:cc:dd:e8:ff + IPADDR=192.168.0.2 + IPADDR1=192.168.1.2 ++ IPADDR6=2001:1::1/92 + IPV6ADDR=2001:1::1/92 + IPV6INIT=yes + MTU=9000 +@@ -1377,6 +1386,7 @@ pre-down route del -net 10.0.0.0 netmask + MACADDR=aa:bb:cc:dd:e8:ff + IPADDR=192.168.0.2 + IPADDR1=192.168.1.2 ++ IPADDR6=2001:1::1/92 + IPV6ADDR=2001:1::1/92 + IPV6INIT=yes + MTU=9000 +@@ -1467,6 +1477,7 @@ pre-down route del -net 10.0.0.0 netmask + GATEWAY=192.168.1.1 + IPADDR=192.168.2.2 + IPADDR1=192.168.1.2 ++ IPADDR6=2001:1::100/96 + IPV6ADDR=2001:1::bbbb/96 + IPV6INIT=yes + IPV6_DEFAULTGW=2001:1::1 +@@ -1528,6 +1539,7 @@ pre-down route del -net 10.0.0.0 netmask + BRIDGE=br0 + DEVICE=eth0 + HWADDR=52:54:00:12:34:00 ++ IPADDR6=2001:1::100/96 + IPV6ADDR=2001:1::100/96 + IPV6INIT=yes + NM_CONTROLLED=no +@@ -1541,6 +1553,7 @@ pre-down route del -net 10.0.0.0 netmask + BRIDGE=br0 + DEVICE=eth1 + HWADDR=52:54:00:12:34:01 ++ IPADDR6=2001:1::101/96 + IPV6ADDR=2001:1::101/96 + IPV6INIT=yes + NM_CONTROLLED=no diff --git a/cloud-init.changes b/cloud-init.changes index e08462f..9e8cd68 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 22 00:42:14 UTC 2019 - Robert Schweikert + +- Add cloud-init-proper-ipv6-varname.patch (bsc#1126101) + + Use the proper name to designate IPv6 addresses in ifcfg-* files + ------------------------------------------------------------------- Thu Jan 31 17:13:21 UTC 2019 - Robert Schweikert diff --git a/cloud-init.spec b/cloud-init.spec index d7244fb..dfaf036 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -53,6 +53,8 @@ Patch44: cloud-init-handle-def-route-set.patch # End lp#1812117 # FIXME (lp#1812853) Patch45: cloud-init-no-empty-resolv.patch +# FIXME (lp#1817230) +Patch46: cloud-init-proper-ipv6-varname.patch BuildRequires: fdupes BuildRequires: filesystem @@ -200,6 +202,7 @@ Documentation and examples for cloud-init tools %patch43 %patch44 %patch45 +%patch46 %build %if 0%{?suse_version} && 0%{?suse_version} <= 1315