From 316db0e09bedc3ae8480860cc68d9d19bfd1e3ec Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Thu, 22 Aug 2024 16:37:19 +0100 Subject: [PATCH] coreos-base/flatcar-eks: EAPI 8, fix pkgcheck issues Signed-off-by: James Le Cuirot --- .../flatcar-eks/files/bootstrap.sh | 0 .../flatcar-eks/files/download-kubelet.sh | 0 .../flatcar-eks/flatcar-eks-0.0.1-r3.ebuild | 57 ------------------- .../flatcar-eks/flatcar-eks-0.0.1-r4.ebuild | 50 ++++++++++++++++ 4 files changed, 50 insertions(+), 57 deletions(-) mode change 100755 => 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/bootstrap.sh mode change 100755 => 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/download-kubelet.sh delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/flatcar-eks-0.0.1-r3.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/flatcar-eks-0.0.1-r4.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/bootstrap.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/bootstrap.sh old mode 100755 new mode 100644 diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/download-kubelet.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/download-kubelet.sh old mode 100755 new mode 100644 diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/flatcar-eks-0.0.1-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/flatcar-eks-0.0.1-r3.ebuild deleted file mode 100644 index f84b969371..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/flatcar-eks-0.0.1-r3.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2021 Kinvolk GmbH -# Distributed under the terms of the Apache License 2.0 - -# This package is heavily based on the files distributed in -# https://github.com/awslabs/amazon-eks-ami, the files have been adapted to fit -# Flatcar Container Linux instead of Amazon Linux. - -EAPI=6 - -inherit eutils - -DESCRIPTION="Configuration for EKS worker nodes" -HOMEPAGE="" -SRC_URI="" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 arm64" -IUSE="" - -# no source directory -S="${WORKDIR}" - -src_prepare() { - # The bootstrap.sh file has been downloaded from: - # https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/files/bootstrap.sh - # We keep our patches separate to facilitate sychronizing changes - cp "${FILESDIR}/bootstrap.sh" "${WORKDIR}/" - eapply -p1 "${FILESDIR}/bootstrap.patch" - eapply_user -} - -src_install() { - insinto /usr/share/amazon/eks - doins "${WORKDIR}/bootstrap.sh" - - # These files are based on the ones found on the amazon-eks-ami repository, - # but adapted to fit Flatcar needs. Since they are a lot simpler, we don't - # use the patching technique, but rather just edit them as needed. - doins "${FILESDIR}/kubelet-kubeconfig" - doins "${FILESDIR}/kubelet.service" - - # These files are taken verbatim from the amazon-eks-ami repository: - # https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/files/kubelet-config.json - # https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/files/docker-daemon.json - # https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/files/eni-max-pods.txt - doins "${FILESDIR}/kubelet-config.json" - doins "${FILESDIR}/docker-daemon.json" - doins "${FILESDIR}/eni-max-pods.txt" - - # This downloading script has been created specially for Flatcar. It gets - # the current EKS Cluster Kubernetes version and downloads all the - # necessary files to run the kubelet on the node. - doins "${FILESDIR}/download-kubelet.sh" - - chmod +x "${D}/usr/share/amazon/eks/bootstrap.sh" "${D}/usr/share/amazon/eks/download-kubelet.sh" -} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/flatcar-eks-0.0.1-r4.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/flatcar-eks-0.0.1-r4.ebuild new file mode 100644 index 0000000000..3fc7ab132e --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/flatcar-eks-0.0.1-r4.ebuild @@ -0,0 +1,50 @@ +# Copyright (c) 2021 Kinvolk GmbH +# Distributed under the terms of the Apache License 2.0 + +# This package is heavily based on the files distributed in +# https://github.com/awslabs/amazon-eks-ami, the files have been adapted to fit +# Flatcar Container Linux instead of Amazon Linux. + +EAPI=8 + +DESCRIPTION="Configuration for EKS worker nodes" +HOMEPAGE="https://www.flatcar.org" +S="${WORKDIR}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 arm64" + +src_prepare() { + # The bootstrap.sh file has been downloaded from: + # https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/files/bootstrap.sh + # We keep our patches separate to facilitate sychronizing changes + cp "${FILESDIR}/bootstrap.sh" "${WORKDIR}/" + eapply "${FILESDIR}/bootstrap.patch" + default +} + +src_install() { + exeinto /usr/share/amazon/eks + insinto /usr/share/amazon/eks + doexe "${WORKDIR}/bootstrap.sh" + + # These files are based on the ones found on the amazon-eks-ami repository, + # but adapted to fit Flatcar needs. Since they are a lot simpler, we don't + # use the patching technique, but rather just edit them as needed. + doins "${FILESDIR}/kubelet-kubeconfig" + doins "${FILESDIR}/kubelet.service" + + # These files are taken verbatim from the amazon-eks-ami repository: + # https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/files/kubelet-config.json + # https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/files/docker-daemon.json + # https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/files/eni-max-pods.txt + doins "${FILESDIR}/kubelet-config.json" + doins "${FILESDIR}/docker-daemon.json" + doins "${FILESDIR}/eni-max-pods.txt" + + # This downloading script has been created specially for Flatcar. It gets + # the current EKS Cluster Kubernetes version and downloads all the + # necessary files to run the kubelet on the node. + doexe "${FILESDIR}/download-kubelet.sh" +}