Hi Mina,

is there a reason why this has fallen asleep? I would like to help to
get it into the tree.

Mina, could you provid the latest tarball again?

Thanks,

Rafael

On Fri Jan 12, 2024 at 05:48:52PM GMT, Mina Galić wrote:
> 
> On Wednesday, January 10th, 2024 at 12:26, Stuart Henderson 
> <s...@spacehopper.org> wrote:
> 
> 
> > 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
> 
> Fixed.
>  
> > - 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 \
> > ...
> > 
> 
> Fixed.
> But, honestly, with the pace this is going, we'll have the
> next release out, and then all these patches will be in the
> release, and I won't need any extras.
> 
> > > 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).
> 
> The alternative doesn't work:
> 
> ```
> ===>  Building for cloud-init-23.4.1
> Traceback (most recent call last):
>   File "/usr/ports/pobj/cloud-init-23.4.1/cloud-init-23.4.1/./setup.py", line 
> 21, in <module>
>     from setuptools.command.egg_info import egg_info
> ModuleNotFoundError: No module named 'setuptools.command'
> *** Error 1 in . (/usr/ports/lang/python/python.port.mk:366 'do-build': @: ; 
> if [ -e /usr/ports/pobj/cloud-init-23.4.1/cloud-init-23.4.1/pyp...)
> *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3055 
> '/usr/ports/pobj/cloud-init-23.4.1/.build_done': @cd 
> /usr/ports/sysutils/clo...)
> *** Error 2 in /usr/ports/sysutils/cloud-init 
> (/usr/ports/infrastructure/mk/bsd.port.mk:2702 'all': 
> @lock=cloud-init-23.4.1;  export _LOCKS_...)
> `` 
> 
> > > 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.
> 
> Give that these aren't really files that users will typically modify, we 
> could really move them elsewhere, and then set the
> path appropriately:
> 
> https://github.com/canonical/cloud-init/blob/main/config/cloud.cfg.tmpl#L328
> 
> Suggestions where to move them, highly welcomed.
>  
> > 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
> 
> hopefully we won't need any such tricks then…
> 
> Mina http://www.unicode-symbol.com/u/0107.html Galić
> 

Reply via email to