mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
net/cloud-init-devel: [New port] Customize cloud instances
Cloud-init is the industry standard multi-distribution method for cross-platform cloud instance initialization. It is supported across all major public cloud providers, provisioning systems for private cloud infrastructure, and bare-metal installations. This is the development version, it follows the git HEAD. WWW: https://cloud-init.io/ PR: 266847 Sponsored by: The FreeBSD Foundation Co-authored-by: Joseph Mingrone <jrm@FreeBSD.org>
This commit is contained in:
parent
fbd88ffe52
commit
a46960b135
8 changed files with 118 additions and 0 deletions
|
@ -80,6 +80,7 @@
|
||||||
SUBDIR += cjdns
|
SUBDIR += cjdns
|
||||||
SUBDIR += clash
|
SUBDIR += clash
|
||||||
SUBDIR += cloud-init
|
SUBDIR += cloud-init
|
||||||
|
SUBDIR += cloud-init-devel
|
||||||
SUBDIR += cloudflared
|
SUBDIR += cloudflared
|
||||||
SUBDIR += cloudquery
|
SUBDIR += cloudquery
|
||||||
SUBDIR += clusterit
|
SUBDIR += clusterit
|
||||||
|
|
63
net/cloud-init-devel/Makefile
Normal file
63
net/cloud-init-devel/Makefile
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
PORTNAME= cloud-init
|
||||||
|
DISTVERSION= 22.3-73
|
||||||
|
DISTVERSIONSUFFIX= -gee8fa37a
|
||||||
|
CATEGORIES= net python
|
||||||
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||||
|
PKGNAMESUFFIX= -devel
|
||||||
|
|
||||||
|
MAINTAINER= me+FreeBSD@igalic.co
|
||||||
|
COMMENT= Init scripts for use on cloud images, development version
|
||||||
|
WWW= https://cloud-init.io/
|
||||||
|
|
||||||
|
LICENSE= APACHE20 GPLv3
|
||||||
|
LICENSE_COMB= dual
|
||||||
|
LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-Apache2.0
|
||||||
|
LICENSE_FILE_GPLv3= ${WRKSRC}/LICENSE-GPLv3
|
||||||
|
|
||||||
|
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}boto>0:devel/py-boto@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}configobj>0:devel/py-configobj@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}jsonpatch>0:devel/py-jsonpatch@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}jsonpointer>0:devel/py-jsonpointer@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}jsonschema>0:devel/py-jsonschema@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}netifaces>0:net/py-netifaces@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}oauthlib>0:security/py-oauthlib@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}pyserial>0:comms/py-pyserial@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \
|
||||||
|
sudo>0:security/sudo
|
||||||
|
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}pytest-mock>=0:devel/py-pytest-mock@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}responses>=0:devel/py-responses@${PY_FLAVOR} \
|
||||||
|
bash:shells/bash
|
||||||
|
|
||||||
|
USES= python:3.6+ 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
|
||||||
|
|
||||||
|
TEST_ENV= ${MAKE_ENV} \
|
||||||
|
PYTHON=${PYTHON_VERSION}
|
||||||
|
TEST_TARGET= check
|
||||||
|
|
||||||
|
# Conflicts
|
||||||
|
CONFLICTS_INSTALL= cloud-init
|
||||||
|
|
||||||
|
# Standard bsd.port.mk variables
|
||||||
|
ETCDIR= ${PREFIX}/etc/cloud
|
||||||
|
|
||||||
|
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
|
||||||
|
${RM} ${WRKSRC}/config/cloud.cfg.d/99_freebsd.cfg.orig
|
||||||
|
|
||||||
|
post-build:
|
||||||
|
${MV} ${WRKSRC}/config/cloud.cfg.d/05_logging.cfg ${WRKSRC}/config/cloud.cfg.d/05_logging.cfg.sample
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
3
net/cloud-init-devel/distinfo
Normal file
3
net/cloud-init-devel/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
TIMESTAMP = 1665773854
|
||||||
|
SHA256 (canonical-cloud-init-22.3-73-gee8fa37a_GH0.tar.gz) = 9b6906753e2ef80e24d38c844da4ee7ec479578267f5efa42a1fe159cc8249dd
|
||||||
|
SIZE (canonical-cloud-init-22.3-73-gee8fa37a_GH0.tar.gz) = 1450143
|
20
net/cloud-init-devel/files/patch-cloudinit_settings.py
Normal file
20
net/cloud-init-devel/files/patch-cloudinit_settings.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- cloudinit/settings.py.orig 2021-03-17 15:43:42 UTC
|
||||||
|
+++ cloudinit/settings.py
|
||||||
|
@@ -12,7 +12,7 @@
|
||||||
|
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"
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ CFG_BUILTIN = {
|
||||||
|
"system_info": {
|
||||||
|
"paths": {
|
||||||
|
"cloud_dir": "/var/lib/cloud",
|
||||||
|
- "templates_dir": "/etc/cloud/templates/",
|
||||||
|
+ "templates_dir": "%%PREFIX%%/etc/cloud/templates/",
|
||||||
|
},
|
||||||
|
"distro": "ubuntu",
|
||||||
|
"network": {"renderers": None},
|
|
@ -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
|
11
net/cloud-init-devel/files/patch-setup.py
Normal file
11
net/cloud-init-devel/files/patch-setup.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- setup.py.orig 2021-03-17 15:40:30 UTC
|
||||||
|
+++ setup.py
|
||||||
|
@@ -153,7 +153,7 @@ INITSYS_TYPES = sorted([f.partition(".")[0] for f in I
|
||||||
|
# Install everything in the right location and take care of Linux (default) and
|
||||||
|
# FreeBSD systems.
|
||||||
|
USR = "usr"
|
||||||
|
-ETC = "etc"
|
||||||
|
+ETC = "%%PREFIX%%/etc"
|
||||||
|
USR_LIB_EXEC = "usr/lib"
|
||||||
|
LIB = "lib"
|
||||||
|
if os.uname()[0] in ["FreeBSD", "DragonFly"]:
|
4
net/cloud-init-devel/pkg-descr
Normal file
4
net/cloud-init-devel/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Cloud-init is the industry standard multi-distribution method for cross-platform
|
||||||
|
cloud instance initialization. It is supported across all major public cloud
|
||||||
|
providers, provisioning systems for private cloud infrastructure, and bare-metal
|
||||||
|
installations. This is the development version, it follows the git HEAD.
|
11
net/cloud-init-devel/pkg-message
Normal file
11
net/cloud-init-devel/pkg-message
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[
|
||||||
|
{ type: install
|
||||||
|
message: <<EOM
|
||||||
|
To enable cloud-init, add the following line to rc.conf:
|
||||||
|
|
||||||
|
cloudinit_enable="YES"
|
||||||
|
|
||||||
|
This will make sure cloud-init is started at boot.
|
||||||
|
EOM
|
||||||
|
}
|
||||||
|
]
|
Loading…
Add table
Reference in a new issue