Merge pull request #1248 from crawford/ignition

sys-app/ignition: add initial ebuild and service
This commit is contained in:
Alex Crawford 2015-05-11 16:27:38 -07:00
commit c5f121c99d
4 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,2 @@
[Unit]
Description=Runtime Metadata

View File

@ -0,0 +1,3 @@
[Unit]
Requires=ignition@prepivot.service
After=ignition@prepivot.service

View File

@ -0,0 +1,16 @@
[Unit]
Description=Ignition
Requires=initrd-fs.target
After=initrd-fs.target
ConditionPathExists=/etc/initrd-release
ConditionPathExists=!/sysroot/etc/machine-id
[Service]
Type=oneshot
RemainAfterExit=yes
Environment=OEM_NAME=pxe
EnvironmentFile=-/usr/share/oem/environment
ExecStart=/usr/bin/ignition --root=/sysroot --oem=${OEM_NAME} --stage=%i
[Install]
WantedBy=initrd.target

View File

@ -0,0 +1,40 @@
# Copyright (c) 2015 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=5
CROS_WORKON_PROJECT="coreos/ignition"
CROS_WORKON_LOCALNAME="ignition"
CROS_WORKON_REPO="git://github.com"
COREOS_GO_PACKAGE="github.com/coreos/ignition"
KEYWORDS="~amd64"
inherit coreos-doc coreos-go cros-workon systemd
DESCRIPTION="Pre-boot provisioning utility"
HOMEPAGE="https://github.com/coreos/ignition"
SRC_URI=""
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
DEPEND=">=dev-lang/go-1.2"
RDEPEND=""
src_compile() {
go_build "${COREOS_GO_PACKAGE}"
}
src_install() {
dobin "${S}/bin/${PN}"
systemd_dounit "${FILESDIR}"/coreos-metadata.target
systemd_dounit "${FILESDIR}"/ignition@.service
systemd_dounit "${FILESDIR}"/ignition-prepivot.target
systemd_enable_service initrd.target ignition-prepivot.target
coreos-dodoc -r doc/*
}