diff options
author | Andrey Fesenko <andrey@bsdnir.info> | 2021-12-15 03:42:35 +0000 |
---|---|---|
committer | Neel Chauhan <nc@FreeBSD.org> | 2021-12-15 03:42:35 +0000 |
commit | 312cdb10c938703b50c654a7f72f60f6a3f2ceb4 (patch) | |
tree | ba07998a8405cf87495b16c42658bc0df1f3bfee /net/cloud-init | |
parent | 1785f3931e22077558f3b8d2f9c8bbd03a2092c5 (diff) |
net/cloud-init: Update to 21.4
PR: 260379
Diffstat (limited to 'net/cloud-init')
-rw-r--r-- | net/cloud-init/Makefile | 8 | ||||
-rw-r--r-- | net/cloud-init/distinfo | 6 | ||||
-rw-r--r-- | net/cloud-init/files/patch-cloudinit_net_bsd.py | 60 | ||||
-rw-r--r-- | net/cloud-init/files/patch-cloudinit_net_freebsd.py | 21 | ||||
-rw-r--r-- | net/cloud-init/files/patch-config_cloud.cfg.d_99__freebsd.cfg | 5 | ||||
-rw-r--r-- | net/cloud-init/files/patch-setup.py | 2 |
6 files changed, 14 insertions, 88 deletions
diff --git a/net/cloud-init/Makefile b/net/cloud-init/Makefile index e7f68e4ffb84..eb4fd9923dc0 100644 --- a/net/cloud-init/Makefile +++ b/net/cloud-init/Makefile @@ -1,5 +1,5 @@ PORTNAME= cloud-init -DISTVERSION= 21.2 +DISTVERSION= 21.4 CATEGORIES= net python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -20,8 +20,9 @@ RUN_DEPENDS= sudo>0:security/sudo \ ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}oauthlib>0:security/py-oauthlib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jsonpatch>0:devel/py-jsonpatch@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}jsonschema>0:devel/py-jsonschema@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}jsonpointer>0:devel/py-jsonpointer@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}jsonschema3>0:devel/py-jsonschema3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}jsonpointer>0:devel/py-jsonpointer@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}netifaces>0:net/py-netifaces@${PY_FLAVOR} USES= python:3.6+ shebangfix USE_GITHUB= yes @@ -39,6 +40,7 @@ NO_ARCH= yes post-patch: ${REINPLACE_CMD} -e 's|%%PREFIX%%|${STAGEDIR}${PREFIX}|g' ${WRKSRC}/setup.py ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/cloudinit/settings.py + @cd ${WRKSRC} && ${RM} config/cloud.cfg.d/99_freebsd.cfg.orig post-build: @cd ${WRKSRC} && ${MV} config/cloud.cfg.d/05_logging.cfg config/cloud.cfg.d/05_logging.cfg.sample diff --git a/net/cloud-init/distinfo b/net/cloud-init/distinfo index 156ee69ef2c4..60e1acba3d13 100644 --- a/net/cloud-init/distinfo +++ b/net/cloud-init/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1625456512 -SHA256 (canonical-cloud-init-21.2_GH0.tar.gz) = f9ee63692a68102c396daf6e9fff5c1dfdec44cba478b4659484f68e58d1b3ca -SIZE (canonical-cloud-init-21.2_GH0.tar.gz) = 1289949 +TIMESTAMP = 1639345579 +SHA256 (canonical-cloud-init-21.4_GH0.tar.gz) = ff0794e94b5a21e2496c2d2b1e7ceffb8da443bcb2f86eeb9db06992c4c56e4b +SIZE (canonical-cloud-init-21.4_GH0.tar.gz) = 1293892 diff --git a/net/cloud-init/files/patch-cloudinit_net_bsd.py b/net/cloud-init/files/patch-cloudinit_net_bsd.py deleted file mode 100644 index 72b7f34029b7..000000000000 --- a/net/cloud-init/files/patch-cloudinit_net_bsd.py +++ /dev/null @@ -1,60 +0,0 @@ ---- cloudinit/net/bsd.py.orig 2021-07-05 03:47:58 UTC -+++ cloudinit/net/bsd.py -@@ -33,7 +33,7 @@ class BSDRenderer(renderer.Renderer): - self.interface_configurations = {} - self._postcmds = config.get('postcmds', True) - -- def _ifconfig_entries(self, settings, target=None): -+ def _ifconfig_entries(self, settings): - ifname_by_mac = net.get_interfaces_by_mac() - for interface in settings.iter_interfaces(): - device_name = interface.get("name") -@@ -76,9 +76,10 @@ class BSDRenderer(renderer.Renderer): - self.interface_configurations[device_name] = { - 'address': subnet.get('address'), - 'netmask': subnet.get('netmask'), -+ 'mtu': subnet.get('mtu') or interface.get('mtu'), - } - -- def _route_entries(self, settings, target=None): -+ def _route_entries(self, settings): - routes = list(settings.iter_routes()) - for interface in settings.iter_interfaces(): - subnets = interface.get("subnets", []) -@@ -101,7 +102,7 @@ class BSDRenderer(renderer.Renderer): - gateway = route.get('gateway') - self.set_route(network, netmask, gateway) - -- def _resolve_conf(self, settings, target=None): -+ def _resolve_conf(self, settings): - nameservers = settings.dns_nameservers - searchdomains = settings.dns_searchdomains - for interface in settings.iter_interfaces(): -@@ -114,11 +115,11 @@ class BSDRenderer(renderer.Renderer): - # fails. - try: - resolvconf = ResolvConf(util.load_file(subp.target_path( -- target, self.resolv_conf_fn))) -+ self.target, self.resolv_conf_fn))) - resolvconf.parse() - except IOError: - util.logexc(LOG, "Failed to parse %s, use new empty file", -- subp.target_path(target, self.resolv_conf_fn)) -+ subp.target_path(self.target, self.resolv_conf_fn)) - resolvconf = ResolvConf('') - resolvconf.parse() - -@@ -136,10 +137,12 @@ class BSDRenderer(renderer.Renderer): - except ValueError: - util.logexc(LOG, "Failed to add search domain %s", domain) - util.write_file( -- subp.target_path(target, self.resolv_conf_fn), -+ subp.target_path(self.target, self.resolv_conf_fn), - str(resolvconf), 0o644) - - def render_network_state(self, network_state, templates=None, target=None): -+ if target: -+ self.target = target - self._ifconfig_entries(settings=network_state) - self._route_entries(settings=network_state) - self._resolve_conf(settings=network_state) diff --git a/net/cloud-init/files/patch-cloudinit_net_freebsd.py b/net/cloud-init/files/patch-cloudinit_net_freebsd.py deleted file mode 100644 index 0e2096721b0d..000000000000 --- a/net/cloud-init/files/patch-cloudinit_net_freebsd.py +++ /dev/null @@ -1,21 +0,0 @@ ---- cloudinit/net/freebsd.py.orig 2021-07-05 03:46:41 UTC -+++ cloudinit/net/freebsd.py -@@ -19,12 +19,13 @@ class Renderer(cloudinit.net.bsd.BSDRenderer): - - def write_config(self): - for device_name, v in self.interface_configurations.items(): -+ net_config = 'DHCP' - if isinstance(v, dict): -- self.set_rc_config_value( -- 'ifconfig_' + device_name, -- v.get('address') + ' netmask ' + v.get('netmask')) -- else: -- self.set_rc_config_value('ifconfig_' + device_name, 'DHCP') -+ net_config = v.get('address') + ' netmask ' + v.get('netmask') -+ mtu = v.get('mtu') -+ if mtu: -+ net_config += (' mtu %d' % mtu) -+ self.set_rc_config_value('ifconfig_' + device_name, net_config) - - def start_services(self, run=False): - if not run: diff --git a/net/cloud-init/files/patch-config_cloud.cfg.d_99__freebsd.cfg b/net/cloud-init/files/patch-config_cloud.cfg.d_99__freebsd.cfg new file mode 100644 index 000000000000..54430cfbd422 --- /dev/null +++ b/net/cloud-init/files/patch-config_cloud.cfg.d_99__freebsd.cfg @@ -0,0 +1,5 @@ +--- config/cloud.cfg.d/99_freebsd.cfg.orig 2021-12-13 06:41:51 UTC ++++ config/cloud.cfg.d/99_freebsd.cfg +@@ -0,0 +1,2 @@ ++no_ssh_fingerprints: true ++disable_network_activation: true diff --git a/net/cloud-init/files/patch-setup.py b/net/cloud-init/files/patch-setup.py index 11704eebead5..badbe6c0ebaa 100644 --- a/net/cloud-init/files/patch-setup.py +++ b/net/cloud-init/files/patch-setup.py @@ -8,4 +8,4 @@ +ETC = "%%PREFIX%%/etc" USR_LIB_EXEC = "usr/lib" LIB = "lib" - if os.uname()[0] == 'FreeBSD': + if os.uname()[0] in ['FreeBSD', 'DragonFly']: |