Merge pull request #3647 from flatcar/chewi/ignition-live

sys-apps/ignition: Add live ebuild
This commit is contained in:
James Le Cuirot 2026-01-14 15:30:47 +00:00 committed by GitHub
commit 9d62073973
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 73 additions and 66 deletions

View File

@ -1,66 +0,0 @@
# Copyright (c) 2015 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
KEYWORDS="amd64 arm64"
DESCRIPTION="Pre-boot provisioning utility"
HOMEPAGE="https://github.com/coreos/ignition"
SRC_URI="https://github.com/coreos/ignition/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0/${PVR}"
IUSE=""
# need util-linux for libblkid at compile time
DEPEND="sys-apps/util-linux"
RDEPEND="
sys-apps/coreutils
sys-apps/gptfdisk
sys-apps/shadow
sys-apps/systemd
sys-fs/btrfs-progs
sys-fs/dosfstools
sys-fs/e2fsprogs
sys-fs/mdadm
sys-fs/xfsprogs
"
RDEPEND+="${DEPEND}"
PATCHES=(
"${FILESDIR}/0001-sed-s-coreos-flatcar.patch"
"${FILESDIR}/0002-config-add-ignition-translation.patch"
"${FILESDIR}/0003-mod-add-flatcar-ignition-0.36.2.patch"
"${FILESDIR}/0004-config-v3_6-convert-ignition-2.x-to-3.x.patch"
"${FILESDIR}/0005-vendor-go-mod-vendor.patch"
"${FILESDIR}/0006-internal-prv-cmdline-backport-flatcar-patch.patch"
"${FILESDIR}/0007-provider-qemu-apply-fw_cfg-patch.patch"
"${FILESDIR}/0008-config-3_6-test-add-ignition-2.x-test-cases.patch"
"${FILESDIR}/0009-internal-disk-fs-ignore-fs-format-mismatches-for-the.patch"
"${FILESDIR}/0010-VMware-Fix-guestinfo.-.config.data-and-.config.url-v.patch"
"${FILESDIR}/0011-config-version-handle-configuration-version-1.patch"
"${FILESDIR}/0012-config-util-add-cloud-init-detection-to-initial-pars.patch"
"${FILESDIR}/0013-Revert-drop-OEM-URI-support.patch"
"${FILESDIR}/0014-internal-resource-url-support-btrfs-as-OEM-partition.patch"
"${FILESDIR}/0015-translation-support-OEM-and-oem.patch"
"${FILESDIR}/0016-revert-internal-oem-drop-noop-OEMs.patch"
"${FILESDIR}/0017-docs-Add-re-added-platforms-to-docs-to-pass-tests.patch"
"${FILESDIR}/0018-usr-share-oem-oem.patch"
"${FILESDIR}/0019-internal-exec-stages-mount-Mount-oem.patch"
)
src_compile() {
ego build \
-ldflags "-X github.com/flatcar/ignition/v2/internal/version.Raw=${PV} -X github.com/flatcar/ignition/v2/internal/distro.selinuxRelabel=false" \
"${S}/internal/main.go"
}
src_install() {
newbin "${S}/main" "${PN}"
dosym "/usr/bin/${PN}" "/usr/libexec/${PN}-rmcfg"
}

View File

@ -0,0 +1 @@
ignition-9999.ebuild

View File

@ -0,0 +1,69 @@
# Copyright (c) 2015 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="Pre-boot provisioning utility"
HOMEPAGE="https://github.com/coreos/ignition"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/coreos/ignition.git"
inherit git-r3
else
SRC_URI="https://github.com/coreos/ignition/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 arm64"
PATCHES=(
"${FILESDIR}/0001-sed-s-coreos-flatcar.patch"
"${FILESDIR}/0002-config-add-ignition-translation.patch"
"${FILESDIR}/0003-mod-add-flatcar-ignition-0.36.2.patch"
"${FILESDIR}/0004-config-v3_6-convert-ignition-2.x-to-3.x.patch"
"${FILESDIR}/0005-vendor-go-mod-vendor.patch"
"${FILESDIR}/0006-internal-prv-cmdline-backport-flatcar-patch.patch"
"${FILESDIR}/0007-provider-qemu-apply-fw_cfg-patch.patch"
"${FILESDIR}/0008-config-3_6-test-add-ignition-2.x-test-cases.patch"
"${FILESDIR}/0009-internal-disk-fs-ignore-fs-format-mismatches-for-the.patch"
"${FILESDIR}/0010-VMware-Fix-guestinfo.-.config.data-and-.config.url-v.patch"
"${FILESDIR}/0011-config-version-handle-configuration-version-1.patch"
"${FILESDIR}/0012-config-util-add-cloud-init-detection-to-initial-pars.patch"
"${FILESDIR}/0013-Revert-drop-OEM-URI-support.patch"
"${FILESDIR}/0014-internal-resource-url-support-btrfs-as-OEM-partition.patch"
"${FILESDIR}/0015-translation-support-OEM-and-oem.patch"
"${FILESDIR}/0016-revert-internal-oem-drop-noop-OEMs.patch"
"${FILESDIR}/0017-docs-Add-re-added-platforms-to-docs-to-pass-tests.patch"
"${FILESDIR}/0018-usr-share-oem-oem.patch"
"${FILESDIR}/0019-internal-exec-stages-mount-Mount-oem.patch"
)
fi
LICENSE="Apache-2.0"
SLOT="0/${PVR}"
# need util-linux for libblkid at compile time
DEPEND="sys-apps/util-linux"
RDEPEND="
${DEPEND}
sys-apps/coreutils
sys-apps/gptfdisk
sys-apps/shadow
sys-apps/systemd
sys-fs/btrfs-progs
sys-fs/dosfstools
sys-fs/e2fsprogs
sys-fs/mdadm
sys-fs/xfsprogs
"
src_compile() {
ego build \
-ldflags "-X github.com/flatcar/ignition/v2/internal/version.Raw=${PV} -X github.com/flatcar/ignition/v2/internal/distro.selinuxRelabel=false" \
"${S}"/internal/main.go
}
src_install() {
newbin "${S}"/main ${PN}
dosym -r /usr/bin/${PN} /usr/libexec/${PN}-rmcfg
}

View File

@ -1,4 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<upstream>
<remote-id type="github">coreos/ignition</remote-id>
</upstream>
</pkgmetadata>