Skip to content

Commit 1cb7be9

Browse files
committed
coreos-base/oem-gce: remove ACI built image
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
1 parent 5cfbf6e commit 1cb7be9

File tree

10 files changed

+10
-97
lines changed

10 files changed

+10
-97
lines changed

build_library/vm_image_util.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ IMG_iso_MEM=2048
257257
IMG_gce_DISK_LAYOUT=vm
258258
IMG_gce_CONF_FORMAT=gce
259259
IMG_gce_OEM_PACKAGE=common-oem-files
260-
IMG_gce_OEM_ACI=gce
261260
IMG_gce_OEM_USE=gce
262261
IMG_gce_OEM_SYSEXT=oem-gce
263262

sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/coreos-oem-gce-0.0.1-r6.ebuild

Lines changed: 0 additions & 1 deletion
This file was deleted.

sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/coreos-oem-gce-0.0.1.ebuild

Lines changed: 0 additions & 20 deletions
This file was deleted.

sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/files/manifest.in

Lines changed: 0 additions & 33 deletions
This file was deleted.

sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/metadata.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/files/manglefs.sh renamed to sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/bin/init.sh

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
#!/bin/sh
2-
set -e
3-
1+
#!/bin/bash -ex
42
# GCE can work with our normal file system, but it needs an "init system".
53
# Here is a better place to install this script so it doesn't get put in real
64
# images built from the GCE Python package.
7-
cat << 'EOF' > init.sh && chmod 755 init.sh
8-
#!/bin/bash -ex
95

106
# Write a configuration template if it does not exist.
117
[ -e /etc/default/instance_configs.cfg.template ] ||
@@ -38,20 +34,3 @@ test -n "$stopping" || exit 1
3834

3935
# Otherwise, run the shutdown script before quitting.
4036
exec /usr/bin/google_metadata_script_runner --script-type shutdown
41-
EOF
42-
43-
# Disable PAM checks in the container.
44-
rm -f usr/lib/pam.d/*
45-
cat << 'EOF' > usr/lib/pam.d/other
46-
account optional pam_permit.so
47-
auth optional pam_permit.so
48-
password optional pam_permit.so
49-
session optional pam_permit.so
50-
EOF
51-
52-
# Don't bundle these paths, since they are useless to us.
53-
mv usr/lib/systemd/lib*.so* usr/lib64/
54-
rm -fr boot etc/* usr/lib/systemd var/db/pkg
55-
56-
# Remove test stuff from python - it's quite large.
57-
rm -rf usr/lib/python*/test
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[Unit]
2-
Upholds=oem-gce-enable-oslogin.service setup-oem.service
2+
Upholds=oem-gce-enable-oslogin.service setup-oem.service oem-gce.service

sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/oem-gce.service

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,7 @@ RestartSec=5
1212
KillMode=process
1313
KillSignal=SIGTERM
1414

15-
ExecStartPre=/usr/bin/rm -f /var/lib/flatcar-oem-gce.img
16-
ExecStartPre=/usr/bin/truncate -s 1G /var/lib/flatcar-oem-gce.img
17-
ExecStartPre=/usr/sbin/mkfs.ext4 /var/lib/flatcar-oem-gce.img
18-
ExecStartPre=/usr/bin/rm -rf /var/lib/flatcar-oem-gce
19-
ExecStartPre=/usr/bin/mkdir -p /var/lib/flatcar-oem-gce
20-
ExecStartPre=-/usr/bin/umount /var/lib/flatcar-oem-gce.img
21-
ExecStartPre=/usr/bin/mount /var/lib/flatcar-oem-gce.img /var/lib/flatcar-oem-gce
22-
ExecStartPre=/usr/bin/tar --directory=/var/lib/flatcar-oem-gce --extract --file=/oem/flatcar-oem-gce.aci --strip-components=1 rootfs
23-
ExecStartPre=/usr/bin/umount /var/lib/flatcar-oem-gce.img
24-
# the container expects to be able to optmize irq settings in /proc/irq and /sys/
25-
Environment=SYSTEMD_NSPAWN_API_VFS_WRITABLE=1
26-
ExecStart=/usr/bin/systemd-nspawn --keep-unit --register=no --link-journal=no \
27-
--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 \
28-
--read-only --volatile=overlay --image=/var/lib/flatcar-oem-gce.img --kill-signal=SIGTERM /init.sh
15+
ExecStart=/usr/bin/init.sh
2916

3017
[Install]
3118
WantedBy=multi-user.target

sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-20180823-r6.ebuild

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,20 @@ IUSE=""
1919
# no source directory
2020
S="${WORKDIR}"
2121

22+
RDEPEND="
23+
app-emulation/google-compute-engine
24+
"
25+
2226
OEM_NAME="Google Compute Engine"
2327

2428
src_install() {
29+
systemd_dounit "${FILESDIR}/units/oem-gce.service"
2530
systemd_dounit "${FILESDIR}/units/oem-gce-enable-oslogin.service"
2631
systemd_dounit "${FILESDIR}/units/setup-oem.service"
2732
systemd_install_dropin "multi-user.target" "${FILESDIR}/units/10-oem-gce.conf"
2833

2934
dobin "${FILESDIR}/bin/enable-oslogin"
35+
dobin "${FILESDIR}/bin/init.sh"
3036

3137
# These files will be symlinked to /etc via 'setup-oem.service'
3238
insinto /usr/share/gce/

sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ IUSE=""
2020
DEPEND=""
2121
RDEPEND="
2222
amd64? (
23+
app-emulation/google-compute-engine
2324
app-emulation/open-vm-tools
24-
coreos-base/coreos-oem-gce
2525
coreos-base/nova-agent-container
2626
coreos-base/nova-agent-watcher
2727
)

0 commit comments

Comments
 (0)