[new] sysutils/cloud-init (again)
Hi folks, I'm writing to the list to add a new port. This is the second attempt (I'm aware of) to add this port. My work is based on the first attempt. See https://marc.info/?l=openbsd-ports&m=165239608209610 and https://marc.info/?l=openbsd-ports&m=165364771409636 I am one of the main contributors of BSD (mostly FreeBSD) patches to cloud-init, and I spent the last couple of weeks fixing OpenBSD issues. You can find the current state of my port here: https://codeberg.org/meena/openbsd-ports/src/branch/add/cloud-init/sysutils/cloud-init This is a snapshot of what the final thing will look like. Most importantly, you'll notice that it's using GH_ACCOUNT =igalic instead of GH_ACCOUNT =canonical because two of my Pull requests haven't been merged yet. After the holidays (next year), but especially with the next cloud-init release (in about 3 months), I expect to not need any extra patches. This is a bit ambitious, because currently there are 19 failing tests. (On FreeBSD we're down to 0) I've gotten already plenty of feedback on this port on mastodon, so I hope it's ready for a proper review now. Kind regards, Mina Galić
Re: [new] sysutils/cloud-init (again)
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 > 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 > 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.
Re: [new] sysutils/cloud-init (again)
On 12/20/23 07:22, Mina Galić wrote: > Hi folks, > > I'm writing to the list to add a new port. > This is the second attempt (I'm aware of) to add this > port. My work is based on the first attempt. > See https://marc.info/?l=openbsd-ports&m=165239608209610 > and https://marc.info/?l=openbsd-ports&m=165364771409636 > > I am one of the main contributors of BSD (mostly FreeBSD) > patches to cloud-init, and I spent the last couple of weeks > fixing OpenBSD issues. > > You can find the current state of my port here: > https://codeberg.org/meena/openbsd-ports/src/branch/add/cloud-init/sysutils/cloud-init > > This is a snapshot of what the final thing will look like. > Most importantly, you'll notice that it's using > > GH_ACCOUNT = igalic > > instead of > > GH_ACCOUNT = canonical > > because two of my Pull requests haven't been merged yet. > After the holidays (next year), but especially with the > next cloud-init release (in about 3 months), I expect to > not need any extra patches. Please use the default GH_ACCOUNT and add your changes as patches, this make it easier to keep track of what has changed. Will test out tonight and let you know more. Thanks, Aisha > This is a bit ambitious, because currently there are 19 > failing tests. (On FreeBSD we're down to 0) > > I've gotten already plenty of feedback on this port on > mastodon, so I hope it's ready for a proper review now. > > Kind regards, > > Mina Galić >
Re: [new] sysutils/cloud-init (again)
> > Hi folks, > > > > I'm writing to the list to add a new port. > > This is the second attempt (I'm aware of) to add this > > port. My work is based on the first attempt. > > See https://marc.info/?l=openbsd-ports&m=165239608209610 > > and https://marc.info/?l=openbsd-ports&m=165364771409636 > > > > I am one of the main contributors of BSD (mostly FreeBSD) > > patches to cloud-init, and I spent the last couple of weeks > > fixing OpenBSD issues. > > > > You can find the current state of my port here: > > https://codeberg.org/meena/openbsd-ports/src/branch/add/cloud-init/sysutils/cloud-init > > > > This is a snapshot of what the final thing will look like. > > Most importantly, you'll notice that it's using > > > > GH_ACCOUNT = igalic > > > > instead of > > > > GH_ACCOUNT = canonical > > > > because two of my Pull requests haven't been merged yet. > > After the holidays (next year), but especially with the > > next cloud-init release (in about 3 months), I expect to > > not need any extra patches. > > > > Please use the default GH_ACCOUNT and add your changes as patches, this > make it easier to keep track of what has changed. > > Will test out tonight and let you know more. > Now that the holidays are over, and cloud-init developers are back to merging my very good patches, I have switched this port back to canonical's GH_ACCOUNT and declare it finished. Browse, https://codeberg.org/meena/openbsd-ports/src/branch/add/cloud-init/sysutils/cloud-init see patch: https://codeberg.org/meena/openbsd-ports/commit/b671f56ebadb601b13385750b84018603e96bfe3 download and apply patch: https://codeberg.org/meena/openbsd-ports/commit/b671f56ebadb601b13385750b84018603e96bfe3.patch > Thanks, > Aisha > > > This is a bit ambitious, because currently there are 19 > > failing tests. (On FreeBSD we're down to 0) (I have not gotten around to this yet) Thank you all in advance, Kind regards, Mina http://www.unicode-symbol.com/u/0107.html Galić
Re: [new] sysutils/cloud-init (again)
On Fri Jan 05, 2024 at 01:05:38AM +, Mina Galić wrote: > > > Hi folks, > > > > > > I'm writing to the list to add a new port. > > > This is the second attempt (I'm aware of) to add this > > > port. My work is based on the first attempt. > > > See https://marc.info/?l=openbsd-ports&m=165239608209610 > > > and https://marc.info/?l=openbsd-ports&m=165364771409636 > > > > > > I am one of the main contributors of BSD (mostly FreeBSD) > > > patches to cloud-init, and I spent the last couple of weeks > > > fixing OpenBSD issues. > > > > > > You can find the current state of my port here: > > > https://codeberg.org/meena/openbsd-ports/src/branch/add/cloud-init/sysutils/cloud-init > > > > > > This is a snapshot of what the final thing will look like. > > > Most importantly, you'll notice that it's using > > > > > > GH_ACCOUNT = igalic > > > > > > instead of > > > > > > GH_ACCOUNT = canonical > > > > > > because two of my Pull requests haven't been merged yet. > > > After the holidays (next year), but especially with the > > > next cloud-init release (in about 3 months), I expect to > > > not need any extra patches. > > > > > > > > Please use the default GH_ACCOUNT and add your changes as patches, this > > make it easier to keep track of what has changed. > > > > Will test out tonight and let you know more. > > > > Now that the holidays are over, and cloud-init developers are back > to merging my very good patches, I have switched this port back to > canonical's GH_ACCOUNT and declare it finished. > > Browse, > https://codeberg.org/meena/openbsd-ports/src/branch/add/cloud-init/sysutils/cloud-init > see patch: > https://codeberg.org/meena/openbsd-ports/commit/b671f56ebadb601b13385750b84018603e96bfe3 > download and apply patch: > https://codeberg.org/meena/openbsd-ports/commit/b671f56ebadb601b13385750b84018603e96bfe3.patch > > > Thanks, > > Aisha > > > > > This is a bit ambitious, because currently there are 19 > > > failing tests. (On FreeBSD we're down to 0) > > (I have not gotten around to this yet) > > Thank you all in advance, > > Kind regards, > > Mina http://www.unicode-symbol.com/u/0107.html Galić Could you provide a tarball with the new port?
Re: [new] sysutils/cloud-init (again)
> 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, Mina http://www.unicode-symbol.com/u/0107.html Galić cloud-init.tar.gz Description: application/gzip
Re: [new] sysutils/cloud-init (again)
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. At least TEST_DEPS need security/py-passlib and devel/py-serial pkg/README can has hardcoded paths, which can be changed to SYSCONFDIR and LOCALSTATEDIR. The build system for python can probably be set to use MODPY_BUILD=setuptools instead of MODPY_SETUPTOOLS=Yes Am getting the following test failures on my machine: === short test summary info FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_config_drive_interacts_with_ibmcloud_config_disk FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_configured_list_with_none FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_nocloud_seed_in_cfg FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_single_entry_defines_datasource FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_vmware_on_vmware_open_vm_tools_64 FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_vmware_on_vmware_open_vm_tools_aarch64_linux_gnu FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_vmware_on_vmware_open_vm_tools_i386_linux_gnu FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_vmware_on_vmware_open_vm_tools_x86_64_linux_gnu FAILED tests/unittests/test_ds_identify.py::TestDsIdentify::test_vmware_on_vmware_when_vmware_customization_is_enabled FAILED tests/unittests/cmd/devel/test_logs.py::TestCollectLogs::test_write_command_output_to_file[cmd1-Unexpected error while running command.\nCommand: ['ls', '/nonexistent-directory']\nExit code: 2\nReason: -\nStdout: \nStderr: ls: cannot access '/nonexistent-directory': No such file or directory-None] FAILED tests/unittests/cmd/devel/test_logs.py::TestCollectLogs::test_stream_command_output_to_file[cmd1-ls: cannot access '/nonexistent-directory': No such file or directory\n] FAILED tests/unittests/sources/test_azure.py::TestAzureDataSource::test_crawl_metadata_call_imds_twice_with_reprovision FAILED tests/unittests/sources/test_azure.py::TestAzureDataSource::test_password_given FAILED tests/unittests/sources/test_azure.py::TestAzureDataSource::test_password_redacted_in_ovf FAILED tests/unittests/sources/test_azure.py::TestAzureDataSource::test_password_with_disable_ssh_pw_auth_false FAILED tests/unittests/sources/test_azure.py::TestAzureDataSource::test_password_with_disable_ssh_pw_auth_true FAILED tests/unittests/sources/test_azure.py::TestAzureDataSource::test_password_with_disable_ssh_pw_auth_unspecified FAILED tests/unittests/sources/test_azure.py::TestPreprovisioningHotAttachNics::test_detect_nic_attach_reports_ready_and_waits_for_detach FAILED tests/unittests/sources/test_azure.py::TestPreprovisioningHotAttachNics::test_wait_for_nic_attach_multinic_attach FAILED tests/unittests/sources/test_azure.py::TestDependencyFallback::test_dependency_fallback FAILED tests/unittests/sources/helpers/test_netlink.py::TestCreateBoundNetlinkSocket::test_socket_error_on_create = 21 failed, 5010 passed, 11 skipped, 1 xfailed, 2225 warnings in 194.61s (0:03:14) = Some errors are def create_bound_netlink_socket(): """Creates netlink socket and bind on netlink group to catch interface down/up events. The socket will bound only on RTMGRP_LINK (which only includes RTM_NEWLINK/RTM_DELLINK/RTM_GETLINK events). The socket is set to non-blocking mode since we're only receiving messages. :returns: netlink socket in non-blocking mode :raises: NetlinkCreateSocketError """ try: netlink_socket = socket.socket( > socket.AF_NETLINK, socket.SOCK_RAW, socket.NETLINK_ROUTE ) E AttributeError: module 'socket' has no attribute 'AF_NETLINK' TestAzureDataSource.test_password_with_disable_ssh_pw_auth_unspecified self = def test_password_with_disable_ssh_pw_auth_unspecified(self): data = { "ovfcontent": construct_ovf_env( username="myuser", password="mypass", disable_ssh_password_auth=None, ) } dsrc = self._get_ds(data) dsrc.get_data() > assert dsrc.cfg["ssh_pwauth"] is True E KeyError: 'ssh_pwauth' They seem to be related to hot-attaching a NIC and some Azure related errors. Both of which don't seem super relevant to openbsd. I also see that a lot example template files are not making it into the package PLIST. Can't put into any plist (no applica
Re: [new] sysutils/cloud-init (again)
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/example
Re: [new] sysutils/cloud-init (again)
On Wednesday, January 10th, 2024 at 03: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. > > At least TEST_DEPS need security/py-passlib and devel/py-serial done. > pkg/README can has hardcoded paths, which can be changed to SYSCONFDIR > and LOCALSTATEDIR. that's an optimistic assessment cloud-init's build system. our setup.py is a pile of hacks, organically grown into the mess that it is today. > The build system for python can probably be set to use > MODPY_BUILD=setuptools instead of MODPY_SETUPTOOLS=Yes tried it, it doesn't work. > Am getting the following test failures on my machine: SNIP > = 21 failed, 5010 passed, 11 skipped, 1 xfailed, 2225 warnings in And that's just 21! When I started my work, we had about 200 test failures on FreeBSD. I've managed to cut those down to zero. Well, once my python patches get merged to our port. I'll try to get this down further for OpenBSD. > They seem to be related to hot-attaching a NIC and some Azure related > errors. Both of which don't seem super relevant to openbsd. Yeah, the easiest way to fix these tests will be to skip them on platforms that don't support netlink. > I also see that a lot example template files are not making it into the > package PLIST. SNIP > 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. This is a misconception of what the templates are: The user doesn't choose to use them. The user doesn't modify them. The software needs them. But, yeah, /usr/local/share/ might make more sense. We could also do what Alpine does, and remove the ones irrelevant to the platform: https://git.alpinelinux.org/aports/tree/community/cloud-init/APKBUILD#n133 > Cheers, > Aisha Thanks for the feedback, Mina http://www.unicode-symbol.com/u/0107.html Galić
Re: [new] sysutils/cloud-init (again)
On Wednesday, January 10th, 2024 at 12:26, Stuart Henderson 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 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/temp