summaryrefslogtreecommitdiff
path: root/net/cloud-init
diff options
context:
space:
mode:
Diffstat (limited to 'net/cloud-init')
-rw-r--r--net/cloud-init/Makefile26
-rw-r--r--net/cloud-init/distinfo8
-rw-r--r--net/cloud-init/files/extra-cloudinit_distros_freebsd.py2
-rw-r--r--net/cloud-init/files/extra-cloudinit_netinfo.py11
-rw-r--r--net/cloud-init/files/patch-cloudinit_settings.py16
-rw-r--r--net/cloud-init/files/patch-setup.py6
6 files changed, 50 insertions, 19 deletions
diff --git a/net/cloud-init/Makefile b/net/cloud-init/Makefile
index 88b9035b7e48..f12651575c18 100644
--- a/net/cloud-init/Makefile
+++ b/net/cloud-init/Makefile
@@ -1,6 +1,5 @@
PORTNAME= cloud-init
-DISTVERSION= 24.1.4
-PORTREVISION= 4
+DISTVERSION= 25.2
CATEGORIES= net python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -29,24 +28,35 @@ USES= python shebangfix
USE_GITHUB= yes
GH_ACCOUNT= canonical
USE_PYTHON= autoplist distutils
-PYDISTUTILS_INSTALLARGS+= "--init-system=sysvinit_freebsd"
SHEBANG_FILES= tools/hook-hotplug tools/read-dependencies tools/read-version \
tools/validate-yaml.py
+NO_ARCH= yes
+
# Conflicts
CONFLICTS_INSTALL= cloud-init-devel
# Standard bsd.port.mk variables
ETCDIR= ${PREFIX}/etc/cloud
+MAN1FILES= cloud-id.1 cloud-init-per.1 cloud-init.1
+
+PLIST_FILES+= ${MAN1FILES:S|^|share/man/man1/|:S|.1$|.1.gz|}
+
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400000
-EXTRA_PATCHES= ${PATCHDIR}/extra-cloudinit_distros_freebsd.py
+EXTRA_PATCHES+= ${PATCHDIR}/extra-cloudinit_distros_freebsd.py
.endif
-NO_ARCH= yes
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1500000
+EXTRA_PATCHES+= ${PATCHDIR}/extra-cloudinit_netinfo.py
+.endif
+
+.include <bsd.port.pre.mk>
+
+PYDISTUTILS_INSTALLARGS+= "--init-system=sysvinit_freebsd"
post-patch:
${REINPLACE_CMD} -e 's|%%PREFIX%%|${STAGEDIR}${PREFIX}|g' ${WRKSRC}/setup.py
@@ -60,6 +70,10 @@ post-install:
${MV} ${STAGEDIR}${ETCDIR}/cloud.cfg.d/99_freebsd.cfg ${STAGEDIR}${ETCDIR}/cloud.cfg.d/99_freebsd.cfg.sample
${REINPLACE_CMD} -e 's|^.*\.cfg$$|@sample &.sample|' \
-e 's|${ETCDIR}/clean.d|@dir ${ETCDIR}/clean.d|' \
+ -e 's|${DOCSDIR}/module-docs|@dir ${DOCSDIR}/module-docs|' \
${_PYTHONPKGLIST}
+.for man in ${MAN1FILES}
+ ${INSTALL_MAN} ${WRKSRC}/doc/man/${man} ${STAGEDIR}${PREFIX}/share/man/man1
+.endfor
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net/cloud-init/distinfo b/net/cloud-init/distinfo
index c7e39f0502b2..811d0ccf97c8 100644
--- a/net/cloud-init/distinfo
+++ b/net/cloud-init/distinfo
@@ -1,5 +1,3 @@
-TIMESTAMP = 1712351569
-SHA256 (canonical-cloud-init-24.1.4_GH0.tar.gz) = 3c70effcea02be47b6cd751a1d164583df674ff8d6e4eaa6599eb1499e3b3f28
-SIZE (canonical-cloud-init-24.1.4_GH0.tar.gz) = 1734414
-SHA256 (a6e09d9bfd3ef0770bc4d9452d978ba93dbe1245.patch) = e90e4df05691b64abf2f3a0fc02ff7c450260e53ca236583f7fc3fd315a2b114
-SIZE (a6e09d9bfd3ef0770bc4d9452d978ba93dbe1245.patch) = 18418
+TIMESTAMP = 1756667041
+SHA256 (canonical-cloud-init-25.2_GH0.tar.gz) = a5f4752ac86efa395c99151f787072159b86277201d8386d90019db01cdd9779
+SIZE (canonical-cloud-init-25.2_GH0.tar.gz) = 1954136
diff --git a/net/cloud-init/files/extra-cloudinit_distros_freebsd.py b/net/cloud-init/files/extra-cloudinit_distros_freebsd.py
index eb4d375a49fd..c14b672d5cc6 100644
--- a/net/cloud-init/files/extra-cloudinit_distros_freebsd.py
+++ b/net/cloud-init/files/extra-cloudinit_distros_freebsd.py
@@ -1,4 +1,4 @@
---- cloudinit/distros/freebsd.py.orig 2024-10-25 15:58:28 UTC
+--- cloudinit/distros/freebsd.py.orig 2025-08-12 19:00:58 UTC
+++ cloudinit/distros/freebsd.py
@@ -35,7 +35,7 @@ class Distro(cloudinit.distros.bsd.BSD):
pkg_cmd_update_prefix = ["pkg", "update"]
diff --git a/net/cloud-init/files/extra-cloudinit_netinfo.py b/net/cloud-init/files/extra-cloudinit_netinfo.py
new file mode 100644
index 000000000000..d756dda563f0
--- /dev/null
+++ b/net/cloud-init/files/extra-cloudinit_netinfo.py
@@ -0,0 +1,11 @@
+--- cloudinit/netinfo.py.orig 2025-09-01 15:44:21 UTC
++++ cloudinit/netinfo.py
+@@ -558,7 +558,7 @@ def route_info():
+ elif subp.which("netstat"):
+ # Fall back to net-tools if iproute2 is not present
+ (route_out, _err) = subp.subp(
+- ["netstat", "--route", "--numeric", "--extend"], rcs=[0, 1]
++ ["netstat", "--route", "--numeric", "--extend"], rcs=[0, 1, 64]
+ )
+ routes = _netdev_route_info_netstat(route_out)
+ else:
diff --git a/net/cloud-init/files/patch-cloudinit_settings.py b/net/cloud-init/files/patch-cloudinit_settings.py
index d7ca2bd87f2c..a2aded75780a 100644
--- a/net/cloud-init/files/patch-cloudinit_settings.py
+++ b/net/cloud-init/files/patch-cloudinit_settings.py
@@ -1,19 +1,27 @@
---- cloudinit/settings.py.orig 2021-03-17 15:43:42 UTC
+--- cloudinit/settings.py.orig 2025-08-12 19:00:58 UTC
+++ cloudinit/settings.py
-@@ -12,7 +12,7 @@
+@@ -12,11 +12,11 @@ CFG_ENV_NAME = "CLOUD_CFG"
CFG_ENV_NAME = "CLOUD_CFG"
# This is expected to be a yaml formatted file
-CLOUD_CONFIG = "/etc/cloud/cloud.cfg"
+CLOUD_CONFIG = "%%PREFIX%%/etc/cloud/cloud.cfg"
- RUN_CLOUD_CONFIG = "/run/cloud-init/cloud.cfg"
+-CLEAN_RUNPARTS_DIR = "/etc/cloud/clean.d"
++CLEAN_RUNPARTS_DIR = "%%PREFIX%%/etc/cloud/clean.d"
-@@ -50,7 +50,7 @@ CFG_BUILTIN = {
+-DEFAULT_RUN_DIR = "/run/cloud-init"
++DEFAULT_RUN_DIR = "/var/run/cloud-init"
+
+ # What u get if no config is provided
+ CFG_BUILTIN = {
+@@ -60,8 +60,8 @@ CFG_BUILTIN = {
"system_info": {
"paths": {
"cloud_dir": "/var/lib/cloud",
+- "docs_dir": "/usr/share/doc/cloud-init/",
- "templates_dir": "/etc/cloud/templates/",
++ "docs_dir": "%%PREFIX%%/share/doc/cloud-init/",
+ "templates_dir": "%%PREFIX%%/etc/cloud/templates/",
},
"distro": "ubuntu",
diff --git a/net/cloud-init/files/patch-setup.py b/net/cloud-init/files/patch-setup.py
index c94715dc97c6..403683645cf7 100644
--- a/net/cloud-init/files/patch-setup.py
+++ b/net/cloud-init/files/patch-setup.py
@@ -1,6 +1,6 @@
---- setup.py.orig 2021-03-17 15:40:30 UTC
+--- setup.py.orig 2025-08-12 19:00:58 UTC
+++ setup.py
-@@ -153,7 +153,7 @@ INITSYS_TYPES = sorted([f.partition(".")[0] for f in I
+@@ -176,7 +176,7 @@ USR = "usr"
# Install everything in the right location and take care of Linux (default) and
# FreeBSD systems.
USR = "usr"
@@ -8,4 +8,4 @@
+ETC = "%%PREFIX%%/etc"
USR_LIB_EXEC = "usr/lib"
LIB = "lib"
- if os.uname()[0] in ["FreeBSD", "DragonFly"]:
+ if os.uname()[0] in ["FreeBSD", "DragonFly", "OpenBSD"]: