diff options
author | Brad Davis <brd@FreeBSD.org> | 2021-03-18 18:00:23 +0000 |
---|---|---|
committer | Brad Davis <brd@FreeBSD.org> | 2021-03-18 18:00:23 +0000 |
commit | ce53870f0baa1d6a1ecbb51ab4edef69af6579f0 (patch) | |
tree | 44336b64247c26d267acaf5a3eb9f878ba975013 /net/cloud-init | |
parent | e8cb0e71e6c019293f0c2ecaf5bf46ad4871bf89 (diff) | |
download | ports-ce53870f0baa1d6a1ecbb51ab4edef69af6579f0.tar.gz ports-ce53870f0baa1d6a1ecbb51ab4edef69af6579f0.zip |
net/cloud-init: Clean up post-patch
PR: 254365
Approved by: Andrey Fesenko (maintainer), swills, lwhsu
Notes
Notes:
svn path=/head/; revision=568752
Diffstat (limited to 'net/cloud-init')
-rw-r--r-- | net/cloud-init/Makefile | 7 | ||||
-rw-r--r-- | net/cloud-init/files/patch-cloudinit_settings.py | 20 | ||||
-rw-r--r-- | net/cloud-init/files/patch-setup.py | 11 |
3 files changed, 34 insertions, 4 deletions
diff --git a/net/cloud-init/Makefile b/net/cloud-init/Makefile index 1f4936799c6b..60c0690bc36e 100644 --- a/net/cloud-init/Makefile +++ b/net/cloud-init/Makefile @@ -2,7 +2,7 @@ PORTNAME= cloud-init DISTVERSION= 20.4.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -40,9 +40,8 @@ PYDISTUTILS_INSTALLARGS+= "--init-system=sysvinit_freebsd" NO_ARCH= yes post-patch: - ${REINPLACE_CMD} -e 's|"etc"|"${STAGEDIR}${PREFIX}/etc"|g' ${WRKSRC}/setup.py - ${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' ${WRKSRC}/cloudinit/settings.py - @${RM} ${WRKSRC}/sysvinit/freebsd/*.orig + ${REINPLACE_CMD} -e 's|%%PREFIX%%|${STAGEDIR}${PREFIX}|g' ${WRKSRC}/setup.py + ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/cloudinit/settings.py 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/files/patch-cloudinit_settings.py b/net/cloud-init/files/patch-cloudinit_settings.py new file mode 100644 index 000000000000..45c101c4b668 --- /dev/null +++ b/net/cloud-init/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/files/patch-setup.py b/net/cloud-init/files/patch-setup.py new file mode 100644 index 000000000000..11704eebead5 --- /dev/null +++ b/net/cloud-init/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] == 'FreeBSD': |