From b83fa9e55dc0deee928d3897a58414ac9674ad2e Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Sun, 6 Apr 2014 16:22:25 -0700 Subject: [PATCH 1/2] fix(app-emulation/google-startup-scripts): don't install boto skip installing the boto scripts since we don't ship python or gsutil. --- ...ipts-1.1.1.ebuild => google-startup-scripts-1.1.1-r1.ebuild} | 2 ++ 1 file changed, 2 insertions(+) rename sdk_container/src/third_party/coreos-overlay/app-emulation/google-startup-scripts/{google-startup-scripts-1.1.1.ebuild => google-startup-scripts-1.1.1-r1.ebuild} (87%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/google-startup-scripts/google-startup-scripts-1.1.1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/google-startup-scripts/google-startup-scripts-1.1.1-r1.ebuild similarity index 87% rename from sdk_container/src/third_party/coreos-overlay/app-emulation/google-startup-scripts/google-startup-scripts-1.1.1.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-emulation/google-startup-scripts/google-startup-scripts-1.1.1-r1.ebuild index 2036649778..a093a74c72 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/google-startup-scripts/google-startup-scripts-1.1.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/google-startup-scripts/google-startup-scripts-1.1.1-r1.ebuild @@ -26,4 +26,6 @@ src_prepare() { src_install() { mkdir -p ${D}/usr/share/oem/google-startup-scripts/usr/share/google/ cp -Ra ${WORKDIR}/usr/share/google/. ${D}/usr/share/oem/google-startup-scripts/ || die + # We don't install python or gsutil so skip this + rm -R ${D}/usr/share/oem/google-startup-scripts/boto || die } From 83d5effd57604e827a97cd546b973d266a3f3e86 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Sun, 6 Apr 2014 17:25:05 -0700 Subject: [PATCH 2/2] fix(coreos-base/oem-gce): call run-startup-scripts I didn't realize that google-startup-scripts has two services it needs. First it calls onboot which essentially just downloads the startup-script. Then there is a second service that actually calls the script. --- .../oem-gce/files/cloud-config.yml | 23 ++++++++++++++++++- ....0.2-r3.ebuild => oem-gce-0.0.2-r4.ebuild} | 0 2 files changed, 22 insertions(+), 1 deletion(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/{oem-gce-0.0.2-r3.ebuild => oem-gce-0.0.2-r4.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/cloud-config.yml b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/cloud-config.yml index 5ff734bf36..8134814cef 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/cloud-config.yml +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/cloud-config.yml @@ -76,14 +76,17 @@ coreos: [Install] WantedBy=multi-user.target - - name: google-startup-scripts.service + - name: google-startup-scripts-onboot.service command: start runtime: yes content: | [Unit] Description=Google Compute Engine Startup Scripts After=network.target + After=local-fs.target + Before=sshd.service Requires=network.target + Requires=local-fs.target [Service] Type=oneshot @@ -92,6 +95,24 @@ coreos: [Install] WantedBy=multi-user.target + - name: google-startup-scripts.service + command: start + runtime: yes + content: | + [Unit] + Description=Google Compute Engine user startup scripts + After=network.target + After=google-startup-scripts-onboot.service + Requires=google-startup-scripts-onboot.service + Requires=network.target + + [Service] + ExecStart=/usr/share/oem/google-startup-scripts/run-startup-scripts + Type=idle + + [Install] + WantedBy=multi-user.target + oem: id: gce name: Google Compute Engine diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-0.0.2-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-0.0.2-r4.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-0.0.2-r3.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-0.0.2-r4.ebuild