summaryrefslogtreecommitdiff
path: root/packages
Commit message (Collapse)AuthorAgeFilesLines
* bddeb: for dev package, derive debhelper-compat from host systemChad Smith2023-03-203-110/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running `make deb` or `packages/bddeb` our script uses the host's debuild tooling instead of sbuild. Since we move CI runners to a jammy environment, the host's debhelper-compat levels become incompatible with building a local bionic deb with debuild. Fix package-build .github/workflow/integration.yaml to install all package build dependenies from both requirements.txt an test-requirements.txt using read-depenedencies. Fix bddeb to determine the hosts debhelper-compat level support when generating local deb packages without using sbuild. To migrate to host-based debhelper-compat support the following changes were made: - drop packages/debian/compat file and prefer debian/control debhelper-compat (= ##) definitions - dpkg-query debhelper to check applicable debhelper versions in Provides on the host - Hardcode any `bddeb -d bionic` to a maximum of debhelper-compat( = 11) - Update package/debian/rules with latest published rules file from ubuntu/devel branch Use the latest debhelper-compat level provided by the host's debhelper package by using dpkg-query. Fixes CI on downstream ubuntu/* branches which invoke bddeb directly.
* dhclient_hook: remove vestigal dhclient_hook command (#2015)Brett Holman2023-02-282-5/+0
| | | | | | | | | At inception[1], dhclient hooks were used to filter environment variables into /run/cloud-init/dhclient.hooks/<interface>.json which was consumed by WALinuxAgentShim. The fallback method was to parse the dhcp client lease file. Today the Azure datasource directly uses the parsed lease file[2], and loading /run/cloud-init/dhclient.hook/<interface>.json file was removed in 22.2[3]. With no other consumers, we can remove this. [1] https://github.com/canonical/cloud-init/commit/648dbbf6b090c81e989f1ab70bf99f4de16a6a70 [2] https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/DataSourceAzure.py#L447 [3] https://github.com/canonical/cloud-init/commit/5ad0768a796bc07232476d0d29b5225f1e6e131c
* Recognize opensuse-microos, dev tooling fixesRobert Schweikert2023-02-161-2/+4
| | | | | | | | | | | | Update the distro selection code to recognize opensuse-microos as a SUSE based distribution. Also in this commit: * unittest mock OpenNebula of pwd.getpwnam to avoid test leaks on SuSE * tooling fixes to build and test opensuse - read-dependencies fix jinja2 and PyYAML pkg aliases for opensuse - Consolidate package operations based on OS family instead of distro flavor to cut down on duplication of command definitions. - format read-dependencies and run-container with black
* readme: add reference to packages dir (#2001)Alberto Contreras2023-02-081-1/+12
|
* docs: update downstream package list (#2002)Brett Holman2023-02-081-0/+4
|
* bddeb: drop dh-systemd dependency on newer deb-based releasesd1r3ct0r2023-01-162-3/+4
| | | | | | Fix `make deb` and `make ubuntu-ci-deps` targets on Jammy and newer. Update packages/bddeb to only append dh-systemd as a dependency on older Debian and Ubuntu stable series.
* docs: use opensuse for distro name in package doc (#1771)Brett Holman2022-10-041-1/+1
|
* doc: clarify packages as dev only (#1769)Alberto Contreras2022-10-041-0/+10
| | | Add pointers to downstream packaging resources.
* rpm/copr: ensure RPM represents new clean.d dir artifacts (#1680)Chad Smith2022-08-222-0/+4
| | | | | RPM build errors: Installed (but unpackaged) file(s) found: /etc/cloud/clean.d/README
* ssh_util: Handle sshd_config.d folderAlberto Contreras2022-08-051-0/+11
| | | | | | Write sshd config to /etc/ssh/sshd_config.d/50-cloud-init.conf if the sshd_config sources sshd_config.d LP: #1968873
* Add python3-debconf to pkg-deps.json Build-Depends (#1535)Alberto Contreras2022-06-221-1/+2
|
* redhat spec: udev/rules.d lives under /usr/lib on rhel-based systems (#1536)Chad Smith2022-06-211-1/+1
| | | | | | | | | | Cloud-init now delivers udev rules to /usr/lib/udv/rules.d on rhel-based systems as of commit 7071512. Update spec template to unblock COPR builds of CentOS/8-Stream which fail on RPM build errors like: File not found: /build.../lib/udev/rules.d/66-azure-ephemeral.rules Use spec macro %{_udevrulesdir} instead of hard-coding rules dir.
* Add python3-deconf dependency (#1506)Alberto Contreras2022-06-161-1/+2
| | | For support of cc_ubuntu_advantage config module
* Remove xenial references (#1472)Alberto Contreras2022-06-082-10/+7
| | | | | | - Remove references and dead code to Xenial, Eoan, Python < 3.7 - cc_ubuntu_drivers: Use python3-debconf instead of shell script - add integration test for ubuntu_drivers - bump pycloudlib for OCI subnet/jammy fixes
* Handle error if SSH service no present. (#1422)Alberto Contreras2022-05-101-1/+1
| | | | | | | | | | | | Add pre-fight check to verify if SSH is installed and enabled. - When not installed, perform an early return with a warning and no modifications - When not enabled, update ssh config, but do not restart ssh. - Handle an exception when user-data provides 'ssh_pwauth: True' and the open-ssh service is not available - Add openssh-server as suggested package for debian-based distros LP: #1969526
* declare dependency on ssh-import-id (#1334)Brett Holman2022-04-201-0/+1
| | | Add ssh-import-id as a suggested package dependency for debs
* redhat: Depend on "hostname" package (#1288)Lubomir Rintel2022-02-251-1/+2
| | | | | | The hostname command, that cloud-init uses to apply a hostname change, is in a package that is typically around, but not guarranteed to be. Include it in package dependencies.
* Add dependency workaround for impish in bddeb (#1148)Brett Holman2021-12-131-0/+2
| | | | dh_systemd is now included in the default helper, no need to specify it anymore for impish
* Allow libexec for hotplug (#1088)James Falcon2021-10-291-7/+0
| | | | | When we added the install hotplug module, we forgot to update the redhet/cloud-init.spec.in file and allow for execution on /usr/libexec. This PR adds that functionality.
* Inhibit sshd-keygen@.service if cloud-init is active (#1028)Ryan Harper2021-10-122-0/+2
| | | | | | | In some cloud-init enabled images the sshd-keygen@.service may race with cloud-init and prevent ssh host keys from being generated or generating host keys twice slowing boot and consuming additional entropy during boot. This drop-in unit adds a condition to the sshd-keygen@.service which prevents running if cloud-init is active.
* Add support for EuroLinux 7 && EuroLinux 8 (#957)Aleksander Baranowski2021-08-051-0/+14
|
* Initial hotplug support (#936)James Falcon2021-07-191-0/+7
| | | | | | | | | | | | | | | | | | Adds a udev script which will invoke a hotplug hook script on all net add events. The script will write some udev arguments to a systemd FIFO socket (to ensure we have only instance of cloud-init running at a time), which is then read by a new service that calls a new 'cloud-init devel hotplug-hook' command to handle the new event. This hotplug-hook command will: - Fetch the pickled datsource - Verify that the hotplug event is supported/enabled - Update the metadata for the datasource - Ensure the hotplugged device exists within the datasource - Apply the config change on the datasource metadata - Bring up the new interface (or apply global network configuration) - Save the updated metadata back to the pickle cache Also scattered in some unrelated typing where helpful
* bddeb: new --packaging-branch argument to pull packaging from branch (#576)Paride Legovini2020-10-191-1/+79
| | | | | | | | | bddeb builds a .deb package using the template packaging files in packages/debian/. The new --packaging-branch flag allows to specify a git branch where to pull the packaging (i.e. the debian/ directory) from. This is useful to build a .deb package from master with the very same packaging which is used for the uploads.
* redhat spec: add missing BuildRequires (#552)Paride Legovini2020-08-271-5/+4
| | | | | | | | | | | | | | | | | 456fb55744a1acc6bd2f464b7656a9c33d0b7ac5 made tools/read-dependencies and package/brpm distinguish between build dependencies and runtime dependencies, however packages/redhat/cloud-init.spec.in expects all the dependencies to be in the 'requires' list, thus missing some build dependencies. This change makes cloud-init.spec use 'buildrequires' too. The build happens to succeed without python3-devel on the epel-8 copr chroot as it pulls in the epel-rpm-macros package, which in turn depends on python3-devel. In other words the dependency is satisfied by chance. Packages building for Python 3 need to explicitly specify BuildRequires: python3-devel, see: [1]. [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
* fix brpm buildingRyan Harper2020-07-241-7/+11
| | | | | | | | | | tools/read-dependencies: - Add parameters --build-requires, --runtime-requires - Sort dependency output before printing package/brpm - use --build-requires, --runtime-requires to separate build/vs runtime package reqs. LP: #1886107
* Enable use of the caplog fixture in pytest tests, and add a cc_final_message ↵Daniel Watkins2020-06-301-0/+2
| | | | | test using it (#461) caplog is only available in pytest itself from 3.0 onwards. In xenial, we only have pytest 2.8.7. However, in xenial we do have pytest-catchlog available (as python3-pytest-catchlog), so we use that where appropriate.
* Move subp into its own module. (#416)Scott Moser2020-06-082-6/+8
| | | | | | | | | | | | | | | | | This was painful, but it finishes a TODO from cloudinit/subp.py. It moves the following from util to subp: ProcessExecutionError subp which target_path I moved subp_blob_in_tempfile into cc_chef, which is its only caller. That saved us from having to deal with it using write_file and temp_utils from subp (which does not import any cloudinit things now). It is arguable that 'target_path' could be moved to a 'path_utils' or something, but in order to use it from subp and also from utils, we had to get it out of utils.
* Adapt the package building scripts to use Python 3 (#231)Paride Legovini2020-05-016-71/+31
| | | | | | | | | | | | | | | | | | Since upstream cloud-init has dropped python2 support, adapt remaining package build scripts and tools to python3 only Changes: * Do not template debian/rules as python3 is the only supported version * Drop six from requirements.txt * Makefile: drop everything related to Python 2 * run-container: install the CI deps only on ubuntu|debian * read-version: update the shebang to use Python 3 * brpm: read_dependencies(): drop unused argument * read-dependencies: switch to Py3 and drop the --python-version option * pkg-deps.json: drop the Python version field and update the redhat deps * pkg-deps.json: drop the unittest2 and contextlib2 renames * Update RPM the spec file to use Python 3 when building the RPM * bddeb: drop support for Python 2
* cloudinit: drop dependencies on unittest2 and contextlib2 (#322)Daniel Watkins2020-04-241-3/+0
| | | | | | | | | | | These libraries provide backports of Python 3's stdlib components to Python 2. As we only support Python 3, we can simply use the stdlib now. This pull request does the following: * removes some unneeded compatibility code for the old spelling of `assertRaisesRegex` * replaces invocations of the Python 2-only `assertItemsEqual` with its new name, `assertCountEqual` * replaces all usage of `unittest2` with `unittest` * replaces all usage of `contextlib2` with `contextlib` * drops `unittest2` and `contextlib2` from requirements files and tox.ini It also rewrites some `test_azure` helpers to use bare asserts. We were seeing a strange error in xenial builds of this branch which appear to be stemming from the AssertionError that pytest produces being _different_ from the standard AssertionError. This means that the modified helpers weren't behaving correctly, because they weren't catching AssertionErrors as one would expect. (I believe this is related, in some way, to https://github.com/pytest-dev/pytest/issues/645, but the only version of pytest where we're affected is so far in the past that it's not worth pursuing it any further as we have a workaround.)
* cloudinit: remove six from packaging/tooling (#253)Daniel Watkins2020-03-171-3/+0
|
* cloudinit: move to pytest for running tests (#211)Daniel Watkins2020-03-101-0/+3
| | | | | | | | As the nose docs[0] themselves note, it has been in maintenance mode for the past several years. pytest is an actively developed, featureful and popular alternative that the nose docs themselves recommend. See [1] for more details about the thinking here. (This PR also removes stale tox definitions, instead of modifying them.) [0] https://nose.readthedocs.io/en/latest/ [1] https://lists.launchpad.net/cloud-init/msg00245.html
* Update tooling for GitHub-based new releases (#223)Daniel Watkins2020-02-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tools/read-version: don't enforce version parity in release branch CI We have a bootstrapping problem with new releases, currently. To take the example of 20.1: the branch that bumps the version fails CI because there is no 20.1 tag for it to use in read-version. Previously, this was solved by creating a tag and pushing it to the cloud-init repo before the commit landed. However, we have GitHub branch protection enabled, so the commit that needs to be tagged is not created until the pull request lands in master. This works around this problem by introducing a very specific check: if we are performing CI for an upstream release branch, we skip the read-version checking that we know will fail. * tools/make-tarball: add --version parameter When using make-tarball as part of a CI build of a new upstream release, the version it determines is inconsistent with the version that other tools determine. Instead of encoding the logic here (as well as in Python elsewhere), we add a parameter to allow us to set it from outside the script. * packages/bddeb: handle missing version_long in new version CI If we're running in CI for a new upstream release, we have to use `version` instead of `version_long` (because we don't yet have the tag required to generate `version_long`).
* Make the RPM build use Python 3 (#190)Paride Legovini2020-01-242-7/+7
| | | | | | | | | | | * packages/brpm: switch to python3 No changes needed other than changing the shebang interpreter. * pkg-deps.json: bump the redhat build dependencies to python36 CentOS 7 (our standard target for the COPR test builds) uses python3.6 as its default python3 interpreter, so let's bump the build dependencies accordingly.
* debian: add reference to the manpagesJoshua Powers2019-12-121-0/+3
|
* packages: update rpm specs for new bash completion pathDaniel Watkins2019-04-192-2/+6
| | | | LP: #1825444
* Add cloud-id binary to packages for SUSEJason Zions2018-10-252-0/+2
|
* - Do not use the systemd_prefix macro, not available in this environmentRobert Schweikert2018-05-291-42/+21
|
* packages/brpm: Get proper dependencies for cmdline distro.Scott Moser2018-05-231-3/+3
| | | | | | When invoked with '--distro=suse', the packages that would be attempted for installation would be from redhat. We just were not pasing the args.distro through. That is fixed here.
* packages: Make rpm spec files patch in package version like in debs.Scott Moser2018-05-232-0/+14
| | | | | This makes the necessary changes to patch the full packaged version into the trunk maintained redhat and suse spec files.
* Update version.version_string to contain packaged version.Scott Moser2018-05-221-0/+2
| | | | | | | | | | | | | | This modifies version.version_string to support having the package build write the *packaged* version in with a easy replace. Then, when cloud-init reports its version it will include the full packaged version. Also modified here are upstream package build files to get that done. Note part of the trickery in packages/debian/rules.in was to avoid the 'basic' templater consuming the '$variable' variable names. LP: #1770712
* tools: Support adding a release suffix through packages/bddeb.Scott Moser2018-05-022-3/+27
| | | | | | | | | | | | | | bddeb already supported passing in a '--release' and that would get into the changelog line. If you used bddeb to build packages for a PPA, and built multiple releases, then you would get the same version for each release, and launchpad would reject your upload. The change here means we get a ~16.04.1 (for xenial) suffix on the dpkg version. If the distro-info-data package is not installed, or the release is not known (such as the default "UNRELEASED"), then you get no suffix.
* tools: Re-use the orig tarball in packages/bddeb if it is around.Scott Moser2018-05-011-2/+10
| | | | | | | | | | If you built packages with 'bddeb', each time it would create a new tarball with make-tarball. If you then tried to upload two different tarballs to launchpad (to a PPA), it would reject the second as the orig tarball already existed. This just supports looking in some places for a orig tarball and re-using if it is found.
* packages/debian/control.in: add missing dependency on iproute2.Scott Moser2018-04-241-0/+1
| | | | | | | Ubuntu minimal images do not have iproute2, so correctly identify our dependency on it. LP: #1766711
* Implement bash completion script for cloud-init command lineRyan Harper2018-04-172-0/+2
| | | | | In bash shells with bash_completion enabled, now the cloud-init sub commands and parameters/flags will be shown.
* Add missing dependency on isc-dhcp-client to trunk ubuntu packaging.Scott Moser2018-03-271-1/+2
| | | | | | | This just correctly adds the missing dependency on isc-dhcp-client. That package is used via 'dhclient' from cloudinit/net/dhcp.py. LP: #1759307
* packages/debian/copyright: remove mention of boto and MIT licenseScott Moser2017-10-021-24/+0
| | | | | | | | | boto_utils.py had been removed some time ago, and the current cloudinit/ec2_utils.py is not based on what was in boto_utils. We just failed to remove the mention of it from the upstream debian/copyright. And then put it back in everywhere in recent changes to get upstream and ubuntu in sync.
* Remove prettytable dependency, introduce simpletableAndrew Jorgensen2017-10-021-3/+0
| | | | | | | The first revision of this rendered tables with less decoration but there was a desire upstream to avoid possibly breaking some parsing someone might be doing, so it has been revised to render the same as prettytable for the cases cloud-init actually uses.
* debian/copyright: dep5 updates, reorganize, add Apache 2.0 license.Joshua Powers2017-09-291-14/+33
| | | | | | | | | The copyright was updated to be lintian clean and reorganized to list the licenses at the bottom after declaring the metadata and file information. Add the MIT license to the file. LP: #1718681
* cmdline: add collect-logs subcommand.Chad Smith2017-09-151-0/+1
| | | | | | | | | | | | | | | | Add a new collect-logs sub command to the cloud-init CLI. This script will collect all logs pertinent to a cloud-init run and store them in a compressed tar-gzipped file. This tarfile can be attached to any cloud-init bug filed in order to aid in bug triage and resolution. A cloudinit.apport module is also added that allows apport interaction. Here is an example bug filed via ubuntu-bug cloud-init: LP: #1716975. Once the apport launcher is packaged in cloud-init, bugs can be filed against cloud-init with the following command: ubuntu-bug cloud-init LP: #1607345
* Do not provide systemd-fsck drop-in which could cause ordering cycles.Balint Reczey2017-09-151-6/+0
| | | | | | | | | | | | | | | Revert "centos: do not package systemd-fsck drop-in." Revert "systemd: make systemd-fsck run after cloud-init.service" The systemd-fsck drop-in caused regressions by introducing ordering The change reverts the original commit that added systemd-fsck drop-in and another commit that had removed that from the centos packaging: 1f5489c258a26f4e26261c40786537951d67df1e 8a5296c41db45be3a172862f324ad44e732a2250 The result is to no longer provide the systemd-fsck drop-in. LP: #1717477