aboutsummaryrefslogtreecommitdiffstats
path: root/community/cloud-init/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/cloud-init/APKBUILD')
-rw-r--r--community/cloud-init/APKBUILD156
1 files changed, 97 insertions, 59 deletions
diff --git a/community/cloud-init/APKBUILD b/community/cloud-init/APKBUILD
index 2b5198df905..dc2d29ee9f2 100644
--- a/community/cloud-init/APKBUILD
+++ b/community/cloud-init/APKBUILD
@@ -1,45 +1,58 @@
# Contributor: Matt Dainty <matt+alpine@bodgit-n-scarper.com>
# Contributor: Dermot Bradley <dermot_bradley@yahoo.com>
-# Maintainer: Dermot Bradley <dermot_bradley@yahoo.com>
+# Maintainer:
pkgname=cloud-init
-pkgver=21.3
+pkgver=24.1.3
pkgrel=1
pkgdesc="Cloud instance init scripts"
url="https://cloud-init.io"
-# Dependant package "cloud-utils-growpart" is not available for mips,
-# mips64, or s390x so disable these archs for this package too.
-arch="noarch !mips !mips64 !s390x"
+# Dependant package "cloud-utils-growpart" is not available for
+# s390x so disable this arch for this package too.
+arch="noarch !s390x"
license="Apache-2.0 OR GPL-3.0-only"
depends="
blkid
cloud-utils-growpart
- eudev
- ifupdown-ng
iproute2-minimal
- logger
- lsblk
- parted
python3
py3-configobj
py3-jinja2
py3-jsonpatch
py3-jsonschema
+ py3-netifaces
py3-requests
py3-yaml
- sfdisk
- sgdisk
shadow
tzdata
"
makedepends="py3-setuptools"
-subpackages="$pkgname-doc $pkgname-bash-completion $pkgname-openrc"
-source="cloud-init-$pkgver.tar.gz::https://github.com/canonical/cloud-init/archive/$pkgver.tar.gz
+checkdepends="
+ bash
+ coreutils
+ grep
+ lsblk
+ parted
+ procps-ng
+ py3-netifaces
+ py3-passlib
+ py3-pyserial
+ py3-pytest
+ py3-pytest-mock
+ py3-responses
+ py3-tox
+ sfdisk
+ sgdisk
+ "
+subpackages="
+ $pkgname-bash-completion
+ $pkgname-doc
+ $pkgname-logrotate
+ $pkgname-pyc
+ $pkgname-openrc
+ "
+source="cloud-init-$pkgver.tar.gz::https://github.com/canonical/cloud-init/archive/refs/tags/$pkgver.tar.gz
01-oauthlib-remove.patch
- 02-hosts-template-fix.patch
- 03-disable-irrelevant-modules.patch
- 04-hook-hotplug-sh.patch
- 05-apk-upgrade.patch
- 06-add-doas.patch
+ 04-set-default-datasource-list.patch
cloud-init-hotplugd
cloud-init-hotplugd.initd
cloud-init.logrotate
@@ -50,6 +63,10 @@ source="cloud-init-$pkgver.tar.gz::https://github.com/canonical/cloud-init/archi
install="$pkgname.post-install"
# secfixes:
+# 23.1.2-r0:
+# - CVE-2023-1786
+# 22.2.2-r0:
+# - CVE-2022-2084
# 21.1-r1:
# - CVE-2021-3429
@@ -62,21 +79,21 @@ build() {
}
check() {
- python3 setup.py check
+ # https://github.com/canonical/cloud-init/issues/5158
+ local k="not test_parse_unexpected_timestamp_format_with_date_command"
+ k="$k and not test_parse_logline_returns_event_for_amazon_linux_2_line"
+
+ python3 -m pytest -k "$k"
}
package() {
python3 setup.py install \
--prefix=/usr --root="$pkgdir" --init-system=sysvinit_openrc
- # Delete __pycache__ directories containing PYC files
- find "$pkgdir" -name '__pycache__' -type d -print0 | xargs -0 rm -Rf
-
- mkdir -p \
- "$pkgdir"/etc/network
install -m644 \
+ -D \
"$srcdir"/interfaces \
- "$pkgdir"/etc/network/
+ "$pkgdir"/etc/network/interfaces
install -m755 \
-D \
@@ -106,7 +123,9 @@ package() {
# Delete non-Alpine distribution template files
for distro in \
- debian fedora freebsd opensuse photon redhat rhel sles suse ubuntu
+ arch centos cos debian fedora freebsd gentoo mariner openbsd \
+ opensuse opensuse-leap opensuse-microos opensuse-tumbleweed \
+ photon redhat rhel sle_hpc sle-micro sles suse ubuntu
do
for file in \
"$pkgdir"/etc/cloud/templates/*."$distro".tmpl
@@ -114,61 +133,80 @@ package() {
rm "$file"
done
done
+ rm "$pkgdir"/etc/cloud/templates/sources.list.*.tmpl
- # Delete systemd template files
+ # Delete non-Alpine os-specific files
+ for distro in \
+ almalinux amazon arch bsd centos cloudlinux cos debian \
+ dragonflybsd eurolinux fedora freebsd gentoo mariner \
+ miraclelinux netbsd openeuler openbsd OpenCloudOS \
+ openmandriva opensuse opensuse-leap opensuse-microos \
+ opensuse-tumbleweed photon rhel rhel_util rocky sle-micro \
+ sle_hpc sles suse TencentOS ubuntu virtuozzo
+ do
+ rm "$pkgdir"/usr/lib/python3.*/site-packages/cloudinit/distros/"$distro".py
+ rm "$pkgdir"/usr/lib/python3.*/site-packages/cloudinit/distros/__pycache__/"$distro".*.pyc
+ done
+ rm "$pkgdir"/usr/lib/python3.*/site-packages/cloudinit/distros/parsers/sys_conf.py
+ rm "$pkgdir"/usr/lib/python3.*/site-packages/cloudinit/distros/parsers/__pycache__/sys_conf.*.pyc
+
+ # Delete systemd-related files
rm \
"$pkgdir"/etc/cloud/templates/timesyncd.conf.tmpl \
"$pkgdir"/etc/cloud/templates/systemd.resolved.conf.tmpl
+ rm -Rf "$pkgdir"/etc/systemd
+
+ # Delete NetworkManager-related files
+ rm -Rf "$pkgdir"/etc/NetworkManager
# Delete cloud-init modules not relevant to Alpine
for module in \
- cc_apt_*.py \
- cc_emit_upstart.py \
- cc_fan.py \
- cc_foo.py \
- cc_grub_dpkg.py \
- cc_landscape.py \
- cc_refresh_rmc_and_interface.py \
- cc_reset_rmc.py \
- cc_rh_subscription.py \
- cc_snap.py \
- cc_ssh_import_id.py \
- cc_spacewalk.py \
- cc_ubuntu_advantage.py \
- cc_ubuntu_drivers.py \
- cc_yum_add_repo.py \
- cc_zypper_add_repo.py
+ apt_* \
+ byobu \
+ fan \
+ grub_dpkg \
+ landscape \
+ lxd \
+ reset_rmc \
+ rh_subscription \
+ snap \
+ spacewalk \
+ ubuntu_autoinstall \
+ ubuntu_drivers \
+ yum_add_repo \
+ zypper_add_repo
do
- rm "$pkgdir"/usr/lib/python3.*/site-packages/cloudinit/config/$module
+ rm "$pkgdir"/usr/lib/python3.*/site-packages/cloudinit/config/cc_$module.py
+ rm "$pkgdir"/usr/lib/python3.*/site-packages/cloudinit/config/__pycache__/cc_$module.*.pyc
done
# Delete cloud-init docs not relevant to Alpine
for doc in \
cloud-config-add-apt-repos.txt \
cloud-config-apt.txt \
- cloud-config-landscape.txt \
- cloud-config-rh_subscription.txt \
cloud-config-update-apt.txt \
- cloud-config-yum-repo.txt \
- upstart-cloud-config.txt \
- upstart-rclocal.txt
+ cloud-config-yum-repo.txt
do
rm "$pkgdir"/usr/share/doc/cloud-init/examples/$doc
done
}
+logrotate() {
+ pkgdesc="Cloud instance init scripts (logrotate configuration)"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel logrotate"
+
+ amove etc/logrotate.d/cloud-init
+}
+
sha512sums="
-875d163028e16a61fcc1cf5276c43784193f6054a4a90996e6c25d2af7fcd036ccda1d1b8e1fee51f96d953604d11aefaa9923a917b919bb9c9c149593547efd cloud-init-21.3.tar.gz
+cc2a86637926ee2201a186f4f68fd579a1a9f7b4649ab5e90fe5fcd975a45fcf893e2fbe272ae9829ce8dca4faadc82bb9fde8b957d8e1ef7769686ee0aeefe8 cloud-init-24.1.3.tar.gz
c14ce3b27c55d1c381e27b2898bb73da8a74c53480d496bdfc87318b69fb612678205ab5a686c1ce703ef5c2c7a8529f629c8f908aeff39524d36870a83c1929 01-oauthlib-remove.patch
-444b15f0d81138f7f3767bc10b0bee29ff10fa8b74dfc3542e1abe20d745f09bb2e36cb30ef8035a677ba81af80743207fbd9973d7cb4f33ca37891ae7493916 02-hosts-template-fix.patch
-0efbd2b6f0ec4087938e8574d0b78f1b33605e61294159ea74118d1a583380e38c06ee5fd5fb54e8d64259b6b799d95677ec846eff1296a0ab71d76c7ca06d77 03-disable-irrelevant-modules.patch
-3e3f3710d45e6525fd3537afef66c0006892d740bd84ce6052da298f5179170d2f35e43071499cf84fd9646ef8e7a21e2bd0829ce390691eb5db04fb32cc584d 04-hook-hotplug-sh.patch
-fd3819625f10157e6a88d3c68402864ff29a659bc63535d182086c3b36294f3362770fa8ee9deb77621f92d39b9640d14d0ce910c3bb5924c104931a2fd23540 05-apk-upgrade.patch
-faf79e9d2875b7ff7d79a1b8105d9a8fb83bfeac75b4224affc8600c7ae1d38a52c62c41d4eaf6d6146553e3389e66a8c7df4ef5fcab2b818d35c12dfb43bf3d 06-add-doas.patch
-2d41ec3c43f3a426b3c59526dbd34e4a6dd73c894dfe4b699a0f302c12cef3eab6c9300eb126010d00310a12843f56e49d0b1a088f320890d51fb905c3375bb7 cloud-init.logrotate
+8174411925f40f7e0eabb43cfdc273dfd0cf069e3713a3883ed128df7a5cc80b7d19e2643629cf17ae65c3d8e59cc8a074ca5932a6a4fe0e8299fad9ce861686 04-set-default-datasource-list.patch
2d7b80fc248ec18f20c4ed2fbe0f8d6ea85ae57a0ece8ecf8a095cf910c576807c19ab0453c00160b85253df5725cba90abec731cb54f441a509611115519b46 cloud-init-hotplugd
ab44fc51979a5da8569b08ed2f290a6610de6c36cf147af20f30e9224847623d3594c056a1f64c614598ac130e9bec92d566fb901024f806b768a89190c45f59 cloud-init-hotplugd.initd
+3c6c5189859633012fd389a8d8370cbd46ddd07f206d61bcf872f12105f340552073cbf28f28096109c158b641de1c8199afcfc7f751166a27d4089355e1dd7d cloud-init.logrotate
48b25ec4457c2b3772a7d210033551d041749a0d1869818d888030e6df7fd9bbc13a38b95cf465de3d46d96881a722f94a337584ce48f280c4a52b819586563a interfaces
-f32b90f26d1df0d88fbea7a1a9ab6704a20babdb750b933484bb7c4e91cc19a587d4bfbc95489a354003ecd00795d1592e71b4b93eccd41e392bb7170bfebb0e setup-cloud-init
-aaf419fc3b24be075f055d6560709c5f0612af79045bb4872aa7011cb26d02284ae44084ea323ee819f0910e8bf7c82ac8f907030f32219cd74a4f770a8e5ff0 README.Alpine
+9340e30b6c95f66cb2cdc68c0c5d765e4ce879d2f2bfb042c4b45996cf2b5c542b3762c6abfd213b4b9610f290d6ca734c28c7240fea76fb5cf58253570d2e8f setup-cloud-init
+748b828de1f21cc30c9c13c4ebfbec5ba542ed882ddd04906661ffd7e50ef3d575f67d5650e99aac01fb8c84a9dc84cc73d2c8f232f0d4cfe86136f3097676cf README.Alpine
"