On 2024/01/09 22:12, A Tammy wrote: > > On 1/9/24 09:32, Mina Galić wrote: > >> Could you provide a tarball with the new port? > > Tarball is attached. > > > > I've also updated my Git repo: > > > > browse: > > https://codeberg.org/meena/openbsd-ports/src/branch/add/cloud-init/sysutils/cloud-init > > > > browse patch: > > https://codeberg.org/meena/openbsd-ports/commit/df1e11cdb40ca0120c1d291f5e4f0058729fa8c6 > > > > Apply patch: > > https://codeberg.org/meena/openbsd-ports/commit/df1e11cdb40ca0120c1d291f5e4f0058729fa8c6.patch > > > > Kind regards, > > > Some initial comments.
- don't use FLAVOR/FLAVORS=python3 for a port like this, that's for python libraries - SITES.github is already used by infrastructure. while it seems to work here I don't think it should be overridden. I really don't like fetching github on-the-fly-generated patches - the files can change if github adjust their toolchain - and it confuses things if we need to patch the same files using the normal ports mechanism, so I'd generally prefer to move these to normal patches in the port, especially if they're not likely to be merged upstream anytime soon. But, if keeping them this way, please use e.g. SITES.ghpatch or something, and prefix the patch filenames to make them more identifiable, e.g. SITES.ghpatch= https://github.com/igalic/cloud-init/commit/ PATCHFILES.ghpatch= cloudinit-boottime{cfb1bef67c0a24b1377c113ecab20cc89d1f1055}.patch \ ... > At least TEST_DEPS need security/py-passlib and devel/py-serial (with ${MODPY_FLAVOR}) > pkg/README can has hardcoded paths, which can be changed to SYSCONFDIR > and LOCALSTATEDIR. and should use the standard format from ports/infrastructure/templates/README.template used by all ports > The build system for python can probably be set to use > MODPY_BUILD=setuptools instead of MODPY_SETUPTOOLS=Yes Don't use MODPY_SETUPTOOLS=Yes for new ports. (and with MODPY_PYBUILD, MODPY_PYTEST=Yes is set by default). > I also see that a lot example template files are not making it into the > package PLIST. > > Can't put into any plist (no applicable prefix): > /etc/cloud/clean.d/README > /etc/cloud/cloud.cfg > /etc/cloud/cloud.cfg.d/05_logging.cfg > /etc/cloud/cloud.cfg.d/README > /etc/cloud/templates/chef_client.rb.tmpl > /etc/cloud/templates/chrony.conf.alpine.tmpl > /etc/cloud/templates/chrony.conf.centos.tmpl > /etc/cloud/templates/chrony.conf.cos.tmpl > /etc/cloud/templates/chrony.conf.debian.tmpl > /etc/cloud/templates/chrony.conf.fedora.tmpl > /etc/cloud/templates/chrony.conf.freebsd.tmpl > /etc/cloud/templates/chrony.conf.opensuse-leap.tmpl > /etc/cloud/templates/chrony.conf.opensuse-microos.tmpl > /etc/cloud/templates/chrony.conf.opensuse-tumbleweed.tmpl > /etc/cloud/templates/chrony.conf.opensuse.tmpl > /etc/cloud/templates/chrony.conf.photon.tmpl > /etc/cloud/templates/chrony.conf.rhel.tmpl > /etc/cloud/templates/chrony.conf.sle-micro.tmpl > /etc/cloud/templates/chrony.conf.sle_hpc.tmpl > /etc/cloud/templates/chrony.conf.sles.tmpl > /etc/cloud/templates/chrony.conf.ubuntu.tmpl > /etc/cloud/templates/hosts.alpine.tmpl > /etc/cloud/templates/hosts.arch.tmpl > /etc/cloud/templates/hosts.debian.tmpl > /etc/cloud/templates/hosts.freebsd.tmpl > /etc/cloud/templates/hosts.gentoo.tmpl > /etc/cloud/templates/hosts.mariner.tmpl > /etc/cloud/templates/hosts.photon.tmpl > /etc/cloud/templates/hosts.redhat.tmpl > /etc/cloud/templates/hosts.suse.tmpl > /etc/cloud/templates/ntp.conf.alpine.tmpl > /etc/cloud/templates/ntp.conf.debian.tmpl > /etc/cloud/templates/ntp.conf.fedora.tmpl > /etc/cloud/templates/ntp.conf.freebsd.tmpl > /etc/cloud/templates/ntp.conf.opensuse.tmpl > /etc/cloud/templates/ntp.conf.photon.tmpl > /etc/cloud/templates/ntp.conf.rhel.tmpl > /etc/cloud/templates/ntp.conf.sles.tmpl > /etc/cloud/templates/ntp.conf.ubuntu.tmpl > /etc/cloud/templates/ntpd.conf.openbsd.tmpl > /etc/cloud/templates/resolv.conf.tmpl > /etc/cloud/templates/sources.list.debian.deb822.tmpl > /etc/cloud/templates/sources.list.debian.tmpl > /etc/cloud/templates/sources.list.ubuntu.deb822.tmpl > /etc/cloud/templates/sources.list.ubuntu.tmpl > /etc/cloud/templates/systemd.resolved.conf.tmpl > /etc/cloud/templates/timesyncd.conf.tmpl > > > You could potentially move them to > /usr/local/share/doc/cloud-init/templates in a post-install step, that > way the user gets the templates somewhere in the system and they can > choose when to use them. Install to ${PREFIX}/share/examples/cloud-init/templates, and @sample the files into place under /etc. A little trick, I suggest using another variable than SYSCONFDIR here so that the lines line up in PLIST, it makes it easier to eyeball. e.g. do this in the port Makefile SYSCONF_CLOUDI= ${SYSCONFDIR}/cloud SUBST_VARS+= SYSCONF_CLOUDI and lines like this in PLIST share/examples/cloud-init/ @sample ${SYSCONF_CLOUDI}/ share/examples/cloud-init/templates/ @sample ${SYSCONF_CLOUDI}/templates/ share/examples/cloud-init/templates/foo.tmpl @sample ${SYSCONF_CLOUDI}/templates/foo.tmpl