Build issues for NetBSD/amd64 10.0_BETA

Bug #2006065 reported by Håvard Eidnes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Invalid
Undecided
Unassigned

Bug Description

Hi, I'm trying to package cloud-init for pkgsrc on NetBSD.
I've, perhaps unsurprisingly, met a couple of obstacles.

First off, "where are the build instructions"? My naive expectation
is that they should be bundled with the source code, but they are at
least not prominently visible. Being a relative python newbie, I find
of course both setup.py and Makefile. The latter appears to have a few
settings, where the "supported values" are apparently undocumented. I'm
thinking of VARIANT and distro which default to ubuntu and redhat (at the
same time?!?). A few notes about the expected steps to follow to build,
test and install would have been nice. I'm not talking about a "whole saga".

Secondly, there's the issue of the self-tests, and it's evident that
these are not continually run on/for NetBSD. I've found the following
issues (which appears to affect 17 tests altogether, but quite a few are
"repeat offenders"):

 - The TestGetLinuxDistro tests, perhaps unsurprisingly, all fail, and should
   probably be skipped on non-Linux
 - TestParseTimestamp relies on GNU date capabilities, and the "parse a date string"
   functionality is not available on NetBSD. Skip on non-Linux?
 - TestClean appears to rely on /bin/bash existing. Is there a good reason
   /bin/sh could not be used instead?
 - Various tests related to networking, e.g. TestPreprovisioningHotAttachNics
   appears to rely on Linux (at least non-NetBSD) functionality in the
   'socket' module, as AF_NETLINK is not defined there on NetBSD. Altogether
   10 tests fail with this error. This may also be an issue in the code itself
   (I have not checked).
 - TestDataSourceVMware fails if you run as a non-privileged user, because
   even though I have dmidecode installed, it relies on reading /dev/kmem
   which is forbidden for unprivileged users.

My attempt has been with cloud-init version 22.4.2, and I think I managed to
sort out all the dependencies.

Revision history for this message
Alberto Contreras (aciba) wrote :

Hello Håvard.

One can find reference build/packaging implementations under https://github.com/canonical/cloud-init/tree/main/packages. Those are mainly for testing.

The official Ubuntu package definitions are in the `ubuntu/<release>` branches under the debian directory. For example: https://github.com/canonical/cloud-init/tree/ubuntu/jammy/debian

One can find how to test cloud-init in https://cloudinit.readthedocs.io/en/latest/development/index.html.

The integration tests do target Ubuntu-only distros. There are plans to extend pycloudlib, a utility library that cloud-init uses to provision instances for testing, to support other distros than Ubuntu. This could ease the task to extend the integration test coverage to other distros.

About unit tests, they should be distro-independent. It is likely that some mocks are not correctly defined and coupled to Ubuntu or Linus distros. Please feel free to submit any PR fixing them.

If you have more questions, please refer to the #cloud-init IRC channel on Libera.

Revision history for this message
Alberto Contreras (aciba) wrote :

I have added a PR to improve the README.md to point to the packages' folder: https://github.com/canonical/cloud-init/pull/2001

Marking this bug as invalid, as I believe there are no more actionable things to fix.

Changed in cloud-init:
status: New → Invalid
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.