From 57e7b5aebcc013ce030c8779c613d94571734551 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 27 Sep 2023 09:18:30 +0200 Subject: [PATCH 1/5] overlay coreos-base/oem-openstack: add oem-openstack Signed-off-by: Mathieu Tortuyaux --- build_library/vm_image_util.sh | 10 ++++++---- ...s-0-r1.ebuild => common-oem-files-0-r2.ebuild} | 1 + .../coreos-base/misc-files/files/oems/openstack | 2 ++ .../coreos-base/oem-openstack/metadata.xml | 4 ++++ .../oem-openstack/oem-openstack-0.ebuild | 15 +++++++++++++++ 5 files changed, 28 insertions(+), 4 deletions(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/{common-oem-files-0-r1.ebuild => common-oem-files-0-r2.ebuild} (99%) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/openstack create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-openstack/metadata.xml create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-openstack/oem-openstack-0.ebuild diff --git a/build_library/vm_image_util.sh b/build_library/vm_image_util.sh index 987d8b53a0f..e0adb9543f2 100644 --- a/build_library/vm_image_util.sh +++ b/build_library/vm_image_util.sh @@ -47,10 +47,10 @@ VALID_OEM_PACKAGES=( cloudsigma cloudstack digitalocean - ec2-compat exoscale gce hyperv + openstack packet qemu rackspace @@ -229,16 +229,18 @@ IMG_ami_OEM_USE=ami IMG_ami_OEM_PACKAGE=common-oem-files IMG_ami_OEM_SYSEXT=oem-ami -## openstack, supports ec2's metadata format so use oem-ec2-compat +## openstack IMG_openstack_DISK_FORMAT=qcow2 IMG_openstack_DISK_LAYOUT=vm -IMG_openstack_OEM_PACKAGE=oem-ec2-compat +IMG_openstack_OEM_PACKAGE=common-oem-files IMG_openstack_OEM_USE=openstack +IMG_openstack_OEM_SYSEXT=oem-openstack ## openstack but without a resized root partition for more flexibility IMG_openstack_mini_DISK_FORMAT=qcow2 -IMG_openstack_mini_OEM_PACKAGE=oem-ec2-compat +IMG_openstack_mini_OEM_PACKAGE=common-oem-files IMG_openstack_mini_OEM_USE=openstack +IMG_openstack_mini_OEM_SYSEXT=oem-openstack ## brightbox, supports ec2's metadata format so use oem-ec2-compat IMG_brightbox_DISK_FORMAT=qcow2 diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r2.ebuild similarity index 99% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r2.ebuild index 8442b84a3d8..124bb734715 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r2.ebuild @@ -6,6 +6,7 @@ EAPI=8 OEMIDS=( ami azure + openstack qemu vmware ) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/openstack b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/openstack new file mode 100644 index 00000000000..c5f3a2a8b7b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/openstack @@ -0,0 +1,2 @@ +/etc/systemd/system/multi-user.target.requires/coreos-metadata-sshkeys@core.service +/oem/base/ diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-openstack/metadata.xml b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-openstack/metadata.xml new file mode 100644 index 00000000000..097975e3adc --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-openstack/metadata.xml @@ -0,0 +1,4 @@ + + + + diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-openstack/oem-openstack-0.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-openstack/oem-openstack-0.ebuild new file mode 100644 index 00000000000..88e7440230c --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-openstack/oem-openstack-0.ebuild @@ -0,0 +1,15 @@ +# Copyright (c) 2020 Kinvolk GmbH. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="OpenStack suite for OpenStack" +HOMEPAGE="https://www.openstack.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm64" +IUSE="" + +OEM_NAME="Openstack" From 989d20a2f1fb46f64ed42882d65feef77a26fb4a Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 27 Sep 2023 12:53:01 +0200 Subject: [PATCH 2/5] overlay core-base/oem-digitalocean: migrate to sysext format Signed-off-by: Mathieu Tortuyaux --- build_library/vm_image_util.sh | 4 ++- ...r2.ebuild => common-oem-files-0-r3.ebuild} | 1 + .../misc-files/files/oems/digitalocean | 2 ++ .../oem-digitalocean/files/base/README | 4 --- .../oem-digitalocean/files/base/base.ign | 13 --------- .../oem-digitalocean/files/grub.cfg | 3 -- .../oem-digitalocean/files/oem-release | 5 ---- .../oem-digitalocean-0.1.1-r1.ebuild | 28 ------------------- .../oem-digitalocean-0.1.1-r2.ebuild | 15 ++++++++++ 9 files changed, 21 insertions(+), 54 deletions(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/{common-oem-files-0-r2.ebuild => common-oem-files-0-r3.ebuild} (99%) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/digitalocean delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/base/README delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/base/base.ign delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/grub.cfg delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/oem-release delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/oem-digitalocean-0.1.1-r1.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/oem-digitalocean-0.1.1-r2.ebuild diff --git a/build_library/vm_image_util.sh b/build_library/vm_image_util.sh index e0adb9543f2..947577f4e1b 100644 --- a/build_library/vm_image_util.sh +++ b/build_library/vm_image_util.sh @@ -282,7 +282,9 @@ IMG_cloudstack_vhd_DISK_FORMAT=vhd IMG_cloudstack_vhd_OEM_PACKAGE=oem-cloudstack ## digitalocean -IMG_digitalocean_OEM_PACKAGE=oem-digitalocean +IMG_digitalocean_OEM_PACKAGE=common-oem-files +IMG_digitalocean_OEM_USE=digitalocean +IMG_digitalocean_OEM_SYSEXT=oem-digitalocean ## exoscale IMG_exoscale_DISK_FORMAT=qcow2 diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r3.ebuild similarity index 99% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r2.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r3.ebuild index 124bb734715..4bac0cf1993 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r3.ebuild @@ -6,6 +6,7 @@ EAPI=8 OEMIDS=( ami azure + digitalocean openstack qemu vmware diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/digitalocean b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/digitalocean new file mode 100644 index 00000000000..c5f3a2a8b7b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/digitalocean @@ -0,0 +1,2 @@ +/etc/systemd/system/multi-user.target.requires/coreos-metadata-sshkeys@core.service +/oem/base/ diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/base/README b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/base/README deleted file mode 100644 index d128309fef3..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/base/README +++ /dev/null @@ -1,4 +0,0 @@ -These Ignition configs are part of the OEM configuration. Do not modify -them. If you want to write an Ignition config directly to disk, put it in -../config.ign and it will be applied at first boot instead of a config -in userdata. diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/base/base.ign b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/base/base.ign deleted file mode 100644 index bfcfd84e05b..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/base/base.ign +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ignition": { - "version": "2.1.0" - }, - "systemd": { - "units": [ - { - "name": "coreos-metadata-sshkeys@.service", - "enabled": true - } - ] - } -} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/grub.cfg b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/grub.cfg deleted file mode 100644 index a595676b611..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/grub.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Flatcar GRUB settings - -set oem_id="digitalocean" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/oem-release b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/oem-release deleted file mode 100644 index 3d6d2501975..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/files/oem-release +++ /dev/null @@ -1,5 +0,0 @@ -ID=digitalocean -VERSION_ID=@@OEM_VERSION_ID@@ -NAME="DigitalOcean" -HOME_URL="https://www.digitalocean.com/" -BUG_REPORT_URL="https://issues.flatcar.org" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/oem-digitalocean-0.1.1-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/oem-digitalocean-0.1.1-r1.ebuild deleted file mode 100644 index 1bd353155ff..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/oem-digitalocean-0.1.1-r1.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014 CoreOS, Inc.. All rights reserved. -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="OEM suite for DigitalOcean images" -HOMEPAGE="" -SRC_URI="" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 x86" - -# no source directory -S="${WORKDIR}" - -src_prepare() { - default - sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \ - "${FILESDIR}/oem-release" > "${T}/oem-release" || die -} - -src_install() { - insinto "/oem" - doins "${FILESDIR}/grub.cfg" - doins "${T}/oem-release" - doins -r "${FILESDIR}/base" -} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/oem-digitalocean-0.1.1-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/oem-digitalocean-0.1.1-r2.ebuild new file mode 100644 index 00000000000..6a1cbc3f37f --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-digitalocean/oem-digitalocean-0.1.1-r2.ebuild @@ -0,0 +1,15 @@ +# Copyright (c) 2020 Kinvolk GmbH. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="DigitalOcean suite for DigitalOcean" +HOMEPAGE="https://www.digitalocean.com/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm64" +IUSE="" + +OEM_NAME="DigitalOcean" From 4fdbbd9c1a7f882f840a89629fea4fecf5d2c681 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 27 Sep 2023 13:02:29 +0200 Subject: [PATCH 3/5] overlay coreos-base/coreos-init: pull packet phone home service Signed-off-by: Mathieu Tortuyaux --- ...eos-init-0.0.1-r187.ebuild => coreos-init-0.0.1-r188.ebuild} | 0 .../coreos-base/coreos-init/coreos-init-9999.ebuild | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/{coreos-init-0.0.1-r187.ebuild => coreos-init-0.0.1-r188.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r187.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r188.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r187.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r188.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild index 4a924c6c9fb..385cd711a7e 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild @@ -10,7 +10,7 @@ CROS_WORKON_REPO="https://github.com" if [[ "${PV}" == 9999 ]]; then KEYWORDS="~amd64 ~arm ~arm64 ~x86" else - CROS_WORKON_COMMIT="22c07b1270fb2f40dedef00f0d0fb1699727d995" # flatcar-master + CROS_WORKON_COMMIT="c01a33756a8fd9c672283d5a4ca56807dec4b9ff" # flatcar-master KEYWORDS="amd64 arm arm64 x86" fi From b36cb287683c681c881e3c232240b83debbd9641 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 27 Sep 2023 13:06:31 +0200 Subject: [PATCH 4/5] overlay coreos-base/oem-packet: migrate to sysext format Signed-off-by: Mathieu Tortuyaux --- build_library/vm_image_util.sh | 4 ++- ...r3.ebuild => common-oem-files-0-r4.ebuild} | 1 + .../files/packet/grub.cfg.frag} | 3 -- .../coreos-base/misc-files/files/oems/packet | 4 +++ .../coreos-base/oem-packet/files/base/README | 4 --- .../oem-packet/files/base/base.ign | 29 ------------------- .../coreos-base/oem-packet/files/oem-release | 5 ---- .../files/units/packet-phone-home.service | 14 --------- .../oem-packet/oem-packet-0.2.2-r1.ebuild | 29 ------------------- .../oem-packet/oem-packet-0.2.2-r2.ebuild | 15 ++++++++++ 10 files changed, 23 insertions(+), 85 deletions(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/{common-oem-files-0-r3.ebuild => common-oem-files-0-r4.ebuild} (99%) rename sdk_container/src/third_party/coreos-overlay/coreos-base/{oem-packet/files/grub.cfg => common-oem-files/files/packet/grub.cfg.frag} (81%) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/packet delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/base/README delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/base/base.ign delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/oem-release delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/units/packet-phone-home.service delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/oem-packet-0.2.2-r1.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/oem-packet-0.2.2-r2.ebuild diff --git a/build_library/vm_image_util.sh b/build_library/vm_image_util.sh index 947577f4e1b..76159bf0908 100644 --- a/build_library/vm_image_util.sh +++ b/build_library/vm_image_util.sh @@ -306,7 +306,9 @@ IMG_cloudsigma_DISK_FORMAT=qcow2 IMG_cloudsigma_OEM_PACKAGE=oem-cloudsigma ## packet -IMG_packet_OEM_PACKAGE=oem-packet +IMG_packet_OEM_PACKAGE=common-oem-files +IMG_packet_OEM_SYSEXT=oem-packet +IMG_packet_OEM_USE=packet ########################################################### diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r4.ebuild similarity index 99% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r3.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r4.ebuild index 4bac0cf1993..108c67b88da 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r3.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r4.ebuild @@ -8,6 +8,7 @@ OEMIDS=( azure digitalocean openstack + packet qemu vmware ) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/grub.cfg b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/files/packet/grub.cfg.frag similarity index 81% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/grub.cfg rename to sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/files/packet/grub.cfg.frag index f780fd76ec7..45ca3913a13 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/grub.cfg +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/files/packet/grub.cfg.frag @@ -1,6 +1,3 @@ -# Flatcar GRUB settings - -set oem_id="packet" set linux_append="flatcar.autologin" if [ "$grub_cpu" = i386 ] || [ "$grub_cpu" = x86_64 ]; then diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/packet b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/packet new file mode 100644 index 00000000000..36b1e0b5138 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/packet @@ -0,0 +1,4 @@ +/etc/systemd/system/multi-user.target.requires/coreos-metadata-sshkeys@core.service +/etc/systemd/system/packet-phone-home.service +/oem/base/ +/oem/units/ diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/base/README b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/base/README deleted file mode 100644 index d128309fef3..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/base/README +++ /dev/null @@ -1,4 +0,0 @@ -These Ignition configs are part of the OEM configuration. Do not modify -them. If you want to write an Ignition config directly to disk, put it in -../config.ign and it will be applied at first boot instead of a config -in userdata. diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/base/base.ign b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/base/base.ign deleted file mode 100644 index 5c530660c4a..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/base/base.ign +++ /dev/null @@ -1,29 +0,0 @@ -{ - "ignition": { - "version": "2.1.0" - }, - "storage": { - "files": [ - { - "filesystem": "root", - "path": "/etc/systemd/system/packet-phone-home.service", - "contents": { - "source": "oem:///units/packet-phone-home.service" - }, - "mode": 292 - } - ] - }, - "systemd": { - "units": [ - { - "name": "coreos-metadata-sshkeys@.service", - "enabled": true - }, - { - "name": "packet-phone-home.service", - "enabled": true - } - ] - } -} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/oem-release b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/oem-release deleted file mode 100644 index 61c35df8790..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/oem-release +++ /dev/null @@ -1,5 +0,0 @@ -ID=packet -VERSION_ID=@@OEM_VERSION_ID@@ -NAME="Packet" -HOME_URL="https://packet.net" -BUG_REPORT_URL="https://issues.flatcar.org" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/units/packet-phone-home.service b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/units/packet-phone-home.service deleted file mode 100644 index c74cf022ff2..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/files/units/packet-phone-home.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Report Success to Packet -ConditionFirstBoot=true -Requires=coreos-metadata.service -After=coreos-metadata.service - -[Service] -EnvironmentFile=/run/metadata/flatcar -ExecStart=/usr/bin/curl --header "Content-Type: application/json" --request POST "${COREOS_PACKET_PHONE_HOME_URL}" -Restart=on-failure -RestartSec=2 - -[Install] -WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/oem-packet-0.2.2-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/oem-packet-0.2.2-r1.ebuild deleted file mode 100644 index 76ab3d84af9..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/oem-packet-0.2.2-r1.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2014 CoreOS, Inc.. All rights reserved. -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="OEM suite for Packet images" -HOMEPAGE="" -SRC_URI="" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 arm64 x86" - -# no source directory -S="${WORKDIR}" - -src_prepare() { - default - sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \ - "${FILESDIR}/oem-release" > "${T}/oem-release" || die -} - -src_install() { - insinto "/oem" - doins "${FILESDIR}/grub.cfg" - doins "${T}/oem-release" - doins -r "${FILESDIR}/base" - doins -r "${FILESDIR}/units" -} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/oem-packet-0.2.2-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/oem-packet-0.2.2-r2.ebuild new file mode 100644 index 00000000000..f746b6de876 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-packet/oem-packet-0.2.2-r2.ebuild @@ -0,0 +1,15 @@ +# Copyright (c) 2020 Kinvolk GmbH. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Equinix Metal suite for Equinix Metal" +HOMEPAGE="https://www.equinix.com/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm64" +IUSE="" + +OEM_NAME="Equinix Metal" From bafe49f9973acffe5f2f9ea99d21f517755b858c Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Fri, 29 Sep 2023 09:19:01 +0200 Subject: [PATCH 5/5] coreos-base/afterburn: do not start coreos-metadata.service on qemu QEMU is not supported by Afterburn, let's add an extra-check to be sure that the service will not run on this platform. On cloud-init provisioned system, units are wrote in '/etc' after a certain moment, if a unit takes precedence on one in '/usr' the one in '/usr' would have certainly already started. That's the case for 'coreos-metadata.service' (wrote in '/etc' by cloud-init but already available in '/usr'). ``` $ journalctl -u coreos-metadata.service Sep 29 07:37:57 localhost systemd[1]: Starting coreos-metadata.service - Flatcar Metadata Agent... Sep 29 07:37:57 localhost coreos-metadata[1266]: Error: failed to run Sep 29 07:37:57 localhost coreos-metadata[1266]: Caused by: Sep 29 07:37:57 localhost coreos-metadata[1266]: 0: fetching metadata from provider Sep 29 07:37:57 localhost coreos-metadata[1266]: 1: unknown provider 'qemu' Sep 29 07:37:57 localhost systemd[1]: coreos-metadata.service: Main process exited, code=exited, status=1/FAILURE Sep 29 07:37:57 localhost systemd[1]: coreos-metadata.service: Failed with result 'exit-code'. Sep 29 07:37:57 localhost systemd[1]: Failed to start coreos-metadata.service - Flatcar Metadata Agent. Sep 29 07:37:58 core1 systemd[1]: coreos-metadata.service: Scheduled restart job, restart counter is at 1. Sep 29 07:37:58 core1 systemd[1]: Stopped coreos-metadata.service - QEMU metadata agent. Sep 29 07:37:58 core1 systemd[1]: Starting coreos-metadata.service - QEMU metadata agent... Sep 29 07:37:58 core1 systemd[1]: coreos-metadata.service: Deactivated successfully. Sep 29 07:37:58 core1 systemd[1]: Finished coreos-metadata.service - QEMU metadata agent. ``` Signed-off-by: Mathieu Tortuyaux --- ...2.0-r1.ebuild => afterburn-5.2.0-r2.ebuild} | 0 .../afterburn/files/coreos-metadata.service | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) rename sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/{afterburn-5.2.0-r1.ebuild => afterburn-5.2.0-r2.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-5.2.0-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-5.2.0-r2.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-5.2.0-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-5.2.0-r2.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service index 20098d1be3b..3f83a824b20 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service @@ -1,4 +1,22 @@ [Unit] +ConditionKernelCommandLine=|flatcar.oem.id=ec2 +ConditionKernelCommandLine=|coreos.oem.id=ec2 + +ConditionKernelCommandLine=|flatcar.oem.id=azure +ConditionKernelCommandLine=|coreos.oem.id=azure + +ConditionKernelCommandLine=|flatcar.oem.id=digitalocean +ConditionKernelCommandLine=|coreos.oem.id=digitalocean + +ConditionKernelCommandLine=|flatcar.oem.id=gce +ConditionKernelCommandLine=|coreos.oem.id=gce + +ConditionKernelCommandLine=|flatcar.oem.id=openstack +ConditionKernelCommandLine=|coreos.oem.id=openstack + +ConditionKernelCommandLine=|flatcar.oem.id=packet +ConditionKernelCommandLine=|coreos.oem.id=packet + Description=Flatcar Metadata Agent [Service]