From nobody Fri Oct 14 19:29:05 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MpxJy1Mcwz4f7PC; Fri, 14 Oct 2022 19:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MpxJy0dWtz3VkC; Fri, 14 Oct 2022 19:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665775746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eem2SqoAEPWRiLFJbqg2n2MHcAAVlPUCwUZmA8HOk6E=; b=QKIlk5mTh2UIFYvsGaCuQZfqkp3yrnnnYmtjF3z6fH4h/YaK0YJZke5IO04fXMZuJUOJ+Q dyZGD/kEgUlrydPEsl0LU6Wc+vaJ+/OdaUq9uo8p976GE9Z5sUfJCMtpwt0RkOSC7hlWXv lPvZ4vrEit4p5T+psVDsvVUB0EZFV4K33AIVoZJFmBEMO/mPDkA+vFYBxsNcNRcAlWaN7T amo/Ae41PWvZvkg836e8rCBvV9Annij4Q+DP9OIIvbeodDWJOo8wwddo2v2RNGwONOe2A1 kGDul9Sc964NXKtaqDKSKVabCd6rVmWX8G3Cu71qb9ybKh8NQqTCij+elNAvnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MpxJx6XJ4zsrP; Fri, 14 Oct 2022 19:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29EJT5PH089459; Fri, 14 Oct 2022 19:29:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29EJT5US089458; Fri, 14 Oct 2022 19:29:05 GMT (envelope-from git) Date: Fri, 14 Oct 2022 19:29:05 GMT Message-Id: <202210141929.29EJT5US089458@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Joseph Mingrone Subject: git: a46960b13509 - main - net/cloud-init-devel: [New port] Customize cloud instances List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a46960b1350961e89ff03494d21f6616b7803e4f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665775746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eem2SqoAEPWRiLFJbqg2n2MHcAAVlPUCwUZmA8HOk6E=; b=WNU3m1QLaK9cRLxEyjWdX0MkQvcg6EkMBtr5c6Kl5IDUtjG7dwYBtkTt2rde0cAwcHfatg cmFySxDQX34vv/tElMVkx2+r8+SxN+C6kRMBhEVnd2Lui9qu8NZElSB4tc7h4qFCkeAOF9 jRkzpTZPqOTz2rGDTK9jBSUO7BUfSXKDce0K0xxkV0ThsfCsCCIVUgAEBE/wHL6s+se97w EWx0oGt7R/AETWvDYZspZiY/MrGyX4t4Ixo0BC5uj7m2V0P1gJZ/2NHpcL9nI0VOVGXdnN 8UTsWC5/3LPcB4NoVm/CmAcWL4T1dl0csxJ1hTiRb+8iwu0O6LC8gNJUEuJf1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665775746; a=rsa-sha256; cv=none; b=PB8wHtwt7A3fC6L9KYS+HPyCf47mSitusfSY6sfC4FWuEQe/rvCUtlwrQ9Gpuo9TnvTVyD gZ/oSa4b9AFGW6nsO4RwJ+rn6EBGFVTSkbMVyX3OCemIP8uigEFj+S+PbaYLBdvbOEedLZ 1J2SkZ9NVPzSbYtnm6geYl5kfEUuhoGA4KEVop0ZrtKsMgGHV4vLy26u8RNTKrfu+uXFWY xDDkWFcLT8zdrC0qe/hjDXligGfNN7KFFAPvmI4uJWRBsltZ3MbXwthHze++c3TYuLCR/C TSBXwRwDcb8DZTOAKRYSYo4gS/Spi3S6b8ZOpQcNabxy1OnNgQQEAQL24L+Nvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/ports/commit/?id=a46960b1350961e89ff03494d21f6616b7803e4f commit a46960b1350961e89ff03494d21f6616b7803e4f Author: Mina Galić AuthorDate: 2022-09-14 21:16:04 +0000 Commit: Joseph Mingrone CommitDate: 2022-10-14 19:28:46 +0000 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 --- net/Makefile | 1 + net/cloud-init-devel/Makefile | 63 ++++++++++++++++++++++ net/cloud-init-devel/distinfo | 3 ++ .../files/patch-cloudinit_settings.py | 20 +++++++ .../files/patch-config_cloud.cfg.d_99__freebsd.cfg | 5 ++ net/cloud-init-devel/files/patch-setup.py | 11 ++++ net/cloud-init-devel/pkg-descr | 4 ++ net/cloud-init-devel/pkg-message | 11 ++++ 8 files changed, 118 insertions(+) diff --git a/net/Makefile b/net/Makefile index 1c0081d9180f..44a1130e2c68 100644 --- a/net/Makefile +++ b/net/Makefile @@ -80,6 +80,7 @@ SUBDIR += cjdns SUBDIR += clash SUBDIR += cloud-init + SUBDIR += cloud-init-devel SUBDIR += cloudflared SUBDIR += cloudquery SUBDIR += clusterit diff --git a/net/cloud-init-devel/Makefile b/net/cloud-init-devel/Makefile new file mode 100644 index 000000000000..856dce2b734d --- /dev/null +++ b/net/cloud-init-devel/Makefile @@ -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 diff --git a/net/cloud-init-devel/distinfo b/net/cloud-init-devel/distinfo new file mode 100644 index 000000000000..eb1a0ad0c524 --- /dev/null +++ b/net/cloud-init-devel/distinfo @@ -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 diff --git a/net/cloud-init-devel/files/patch-cloudinit_settings.py b/net/cloud-init-devel/files/patch-cloudinit_settings.py new file mode 100644 index 000000000000..d7ca2bd87f2c --- /dev/null +++ b/net/cloud-init-devel/files/patch-cloudinit_settings.py @@ -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}, diff --git a/net/cloud-init-devel/files/patch-config_cloud.cfg.d_99__freebsd.cfg b/net/cloud-init-devel/files/patch-config_cloud.cfg.d_99__freebsd.cfg new file mode 100644 index 000000000000..54430cfbd422 --- /dev/null +++ b/net/cloud-init-devel/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-devel/files/patch-setup.py b/net/cloud-init-devel/files/patch-setup.py new file mode 100644 index 000000000000..c94715dc97c6 --- /dev/null +++ b/net/cloud-init-devel/files/patch-setup.py @@ -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"]: diff --git a/net/cloud-init-devel/pkg-descr b/net/cloud-init-devel/pkg-descr new file mode 100644 index 000000000000..6eacee0a5861 --- /dev/null +++ b/net/cloud-init-devel/pkg-descr @@ -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. diff --git a/net/cloud-init-devel/pkg-message b/net/cloud-init-devel/pkg-message new file mode 100644 index 000000000000..f82dd34c3c06 --- /dev/null +++ b/net/cloud-init-devel/pkg-message @@ -0,0 +1,11 @@ +[ +{ type: install + message: <