mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-06 20:47:00 +02:00
coreos-base/oem-gce: remove ACI built image
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
parent
5cfbf6e1eb
commit
1cb7be951d
@ -257,7 +257,6 @@ IMG_iso_MEM=2048
|
||||
IMG_gce_DISK_LAYOUT=vm
|
||||
IMG_gce_CONF_FORMAT=gce
|
||||
IMG_gce_OEM_PACKAGE=common-oem-files
|
||||
IMG_gce_OEM_ACI=gce
|
||||
IMG_gce_OEM_USE=gce
|
||||
IMG_gce_OEM_SYSEXT=oem-gce
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
coreos-oem-gce-0.0.1.ebuild
|
@ -1,20 +0,0 @@
|
||||
# Copyright (c) 2016 CoreOS, Inc.. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="CoreOS OEM suite for Google Compute Engine (meta package)"
|
||||
HOMEPAGE=""
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
app-emulation/google-compute-engine
|
||||
app-shells/bash
|
||||
sys-apps/gentoo-functions
|
||||
sys-libs/glibc
|
||||
sys-libs/nss-usrfiles
|
||||
"
|
@ -1,33 +0,0 @@
|
||||
{
|
||||
"acKind": "ImageManifest",
|
||||
"acVersion": "0.8.6",
|
||||
"name": "@ACI_NAME@",
|
||||
"labels": [
|
||||
{"name": "arch", "value": "@ACI_ARCH@"},
|
||||
{"name": "os", "value": "linux"},
|
||||
{"name": "version", "value": "@ACI_VERSION@"}
|
||||
],
|
||||
"app": {
|
||||
"exec": [ "/init.sh" ],
|
||||
"user": "0",
|
||||
"group": "0",
|
||||
|
||||
"mountPoints": [
|
||||
{
|
||||
"name": "etc",
|
||||
"path": "/etc",
|
||||
"readOnly": false
|
||||
},
|
||||
{
|
||||
"name": "home",
|
||||
"path": "/home",
|
||||
"readOnly": false
|
||||
},
|
||||
{
|
||||
"name": "runsystemd",
|
||||
"path": "/run/systemd",
|
||||
"readOnly": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
</pkgmetadata>
|
@ -1,11 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
#!/bin/bash -ex
|
||||
# GCE can work with our normal file system, but it needs an "init system".
|
||||
# Here is a better place to install this script so it doesn't get put in real
|
||||
# images built from the GCE Python package.
|
||||
cat << 'EOF' > init.sh && chmod 755 init.sh
|
||||
#!/bin/bash -ex
|
||||
|
||||
# Write a configuration template if it does not exist.
|
||||
[ -e /etc/default/instance_configs.cfg.template ] ||
|
||||
@ -38,20 +34,3 @@ test -n "$stopping" || exit 1
|
||||
|
||||
# Otherwise, run the shutdown script before quitting.
|
||||
exec /usr/bin/google_metadata_script_runner --script-type shutdown
|
||||
EOF
|
||||
|
||||
# Disable PAM checks in the container.
|
||||
rm -f usr/lib/pam.d/*
|
||||
cat << 'EOF' > usr/lib/pam.d/other
|
||||
account optional pam_permit.so
|
||||
auth optional pam_permit.so
|
||||
password optional pam_permit.so
|
||||
session optional pam_permit.so
|
||||
EOF
|
||||
|
||||
# Don't bundle these paths, since they are useless to us.
|
||||
mv usr/lib/systemd/lib*.so* usr/lib64/
|
||||
rm -fr boot etc/* usr/lib/systemd var/db/pkg
|
||||
|
||||
# Remove test stuff from python - it's quite large.
|
||||
rm -rf usr/lib/python*/test
|
@ -1,2 +1,2 @@
|
||||
[Unit]
|
||||
Upholds=oem-gce-enable-oslogin.service setup-oem.service
|
||||
Upholds=oem-gce-enable-oslogin.service setup-oem.service oem-gce.service
|
||||
|
@ -12,20 +12,7 @@ RestartSec=5
|
||||
KillMode=process
|
||||
KillSignal=SIGTERM
|
||||
|
||||
ExecStartPre=/usr/bin/rm -f /var/lib/flatcar-oem-gce.img
|
||||
ExecStartPre=/usr/bin/truncate -s 1G /var/lib/flatcar-oem-gce.img
|
||||
ExecStartPre=/usr/sbin/mkfs.ext4 /var/lib/flatcar-oem-gce.img
|
||||
ExecStartPre=/usr/bin/rm -rf /var/lib/flatcar-oem-gce
|
||||
ExecStartPre=/usr/bin/mkdir -p /var/lib/flatcar-oem-gce
|
||||
ExecStartPre=-/usr/bin/umount /var/lib/flatcar-oem-gce.img
|
||||
ExecStartPre=/usr/bin/mount /var/lib/flatcar-oem-gce.img /var/lib/flatcar-oem-gce
|
||||
ExecStartPre=/usr/bin/tar --directory=/var/lib/flatcar-oem-gce --extract --file=/oem/flatcar-oem-gce.aci --strip-components=1 rootfs
|
||||
ExecStartPre=/usr/bin/umount /var/lib/flatcar-oem-gce.img
|
||||
# the container expects to be able to optmize irq settings in /proc/irq and /sys/
|
||||
Environment=SYSTEMD_NSPAWN_API_VFS_WRITABLE=1
|
||||
ExecStart=/usr/bin/systemd-nspawn --keep-unit --register=no --link-journal=no \
|
||||
--machine=oem-gce --capability=CAP_NET_ADMIN --bind=/dev/log --bind=/run/systemd --tmpfs=/run/lock --bind=/etc --bind=/home --bind-ro=/usr/share/google-oslogin/nsswitch.conf \
|
||||
--read-only --volatile=overlay --image=/var/lib/flatcar-oem-gce.img --kill-signal=SIGTERM /init.sh
|
||||
ExecStart=/usr/bin/init.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -19,14 +19,20 @@ IUSE=""
|
||||
# no source directory
|
||||
S="${WORKDIR}"
|
||||
|
||||
RDEPEND="
|
||||
app-emulation/google-compute-engine
|
||||
"
|
||||
|
||||
OEM_NAME="Google Compute Engine"
|
||||
|
||||
src_install() {
|
||||
systemd_dounit "${FILESDIR}/units/oem-gce.service"
|
||||
systemd_dounit "${FILESDIR}/units/oem-gce-enable-oslogin.service"
|
||||
systemd_dounit "${FILESDIR}/units/setup-oem.service"
|
||||
systemd_install_dropin "multi-user.target" "${FILESDIR}/units/10-oem-gce.conf"
|
||||
|
||||
dobin "${FILESDIR}/bin/enable-oslogin"
|
||||
dobin "${FILESDIR}/bin/init.sh"
|
||||
|
||||
# These files will be symlinked to /etc via 'setup-oem.service'
|
||||
insinto /usr/share/gce/
|
||||
|
@ -20,8 +20,8 @@ IUSE=""
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
amd64? (
|
||||
app-emulation/google-compute-engine
|
||||
app-emulation/open-vm-tools
|
||||
coreos-base/coreos-oem-gce
|
||||
coreos-base/nova-agent-container
|
||||
coreos-base/nova-agent-watcher
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user