From 276e520380816da1e03ad5eb38aa0aeec8c6431c Mon Sep 17 00:00:00 2001 From: Liam Hopkins Date: Tue, 21 Jan 2020 10:29:57 -0800 Subject: Configs for new guest agent (#858) * Remove relevant files and configs for legacy python daemons * Add dependency on guest-agent package --- .../packaging/debian/changelog | 7 + .../google-compute-engine/packaging/debian/control | 8 +- .../google-compute-engine/packaging/debian/install | 2 - .../packaging/debian/postinst | 33 --- .../google-compute-engine/packaging/debian/preinst | 28 +-- .../google-compute-engine/packaging/debian/prerm | 28 --- .../google-compute-engine/packaging/debian/rules | 6 +- .../packaging/google-compute-engine-el6.spec | 88 ------- .../packaging/google-compute-engine.el6.spec | 70 ++++++ .../packaging/google-compute-engine.spec | 69 ++--- .../google-compute-engine/packaging/setup_deb.sh | 2 +- .../google-compute-engine/packaging/setup_rpm.sh | 2 +- .../src/etc/init/google-accounts-daemon.conf | 6 - .../src/etc/init/google-clock-skew-daemon.conf | 5 - .../src/etc/init/google-instance-setup.conf | 6 - .../src/etc/init/google-network-daemon.conf | 5 - .../src/etc/init/google-shutdown-scripts.conf | 5 - .../src/etc/init/google-startup-scripts.conf | 4 - .../system-preset/90-google-compute-engine.preset | 6 - .../systemd/system/google-accounts-daemon.service | 13 - .../system/google-clock-skew-daemon.service | 11 - .../systemd/system/google-instance-setup.service | 13 - .../systemd/system/google-network-daemon.service | 13 - .../systemd/system/google-shutdown-scripts.service | 15 -- .../systemd/system/google-startup-scripts.service | 14 -- .../packaging/debian/changelog | 278 --------------------- .../packaging/debian/compat | 1 - .../packaging/debian/control | 38 --- .../packaging/debian/copyright | 27 -- .../packaging/debian/rules | 18 -- .../packaging/python-google-compute-engine.spec | 55 ---- .../packaging/python3-google-compute-engine.spec | 48 ---- .../packaging/setup_deb.sh | 44 ---- .../packaging/setup_rpm.sh | 46 ---- packages/python-google-compute-engine/setup.py | 17 +- 35 files changed, 116 insertions(+), 915 deletions(-) delete mode 100644 packages/google-compute-engine/packaging/debian/postinst mode change 100644 => 100755 packages/google-compute-engine/packaging/debian/preinst delete mode 100644 packages/google-compute-engine/packaging/debian/prerm delete mode 100644 packages/google-compute-engine/packaging/google-compute-engine-el6.spec create mode 100644 packages/google-compute-engine/packaging/google-compute-engine.el6.spec delete mode 100644 packages/google-compute-engine/src/etc/init/google-accounts-daemon.conf delete mode 100644 packages/google-compute-engine/src/etc/init/google-clock-skew-daemon.conf delete mode 100644 packages/google-compute-engine/src/etc/init/google-instance-setup.conf delete mode 100644 packages/google-compute-engine/src/etc/init/google-network-daemon.conf delete mode 100644 packages/google-compute-engine/src/etc/init/google-shutdown-scripts.conf delete mode 100644 packages/google-compute-engine/src/etc/init/google-startup-scripts.conf delete mode 100644 packages/google-compute-engine/src/lib/systemd/system-preset/90-google-compute-engine.preset delete mode 100644 packages/google-compute-engine/src/lib/systemd/system/google-accounts-daemon.service delete mode 100644 packages/google-compute-engine/src/lib/systemd/system/google-clock-skew-daemon.service delete mode 100644 packages/google-compute-engine/src/lib/systemd/system/google-instance-setup.service delete mode 100644 packages/google-compute-engine/src/lib/systemd/system/google-network-daemon.service delete mode 100644 packages/google-compute-engine/src/lib/systemd/system/google-shutdown-scripts.service delete mode 100644 packages/google-compute-engine/src/lib/systemd/system/google-startup-scripts.service delete mode 100644 packages/python-google-compute-engine/packaging/debian/changelog delete mode 100644 packages/python-google-compute-engine/packaging/debian/compat delete mode 100644 packages/python-google-compute-engine/packaging/debian/control delete mode 100644 packages/python-google-compute-engine/packaging/debian/copyright delete mode 100755 packages/python-google-compute-engine/packaging/debian/rules delete mode 100644 packages/python-google-compute-engine/packaging/python-google-compute-engine.spec delete mode 100644 packages/python-google-compute-engine/packaging/python3-google-compute-engine.spec delete mode 100755 packages/python-google-compute-engine/packaging/setup_deb.sh delete mode 100755 packages/python-google-compute-engine/packaging/setup_rpm.sh diff --git a/packages/google-compute-engine/packaging/debian/changelog b/packages/google-compute-engine/packaging/debian/changelog index 59b0c07..5e31890 100644 --- a/packages/google-compute-engine/packaging/debian/changelog +++ b/packages/google-compute-engine/packaging/debian/changelog @@ -1,3 +1,10 @@ +google-compute-engine (1:20200113.00-g1) stable; urgency=medium + + * Remove python daemon configs. + * Add dependency on guest-agent package. + + -- Google Cloud Team Mon, 13 Jan 2020 13:27:55 -0700 + google-compute-engine (1:20190916.00-g2) stable; urgency=medium * Update dependencies. diff --git a/packages/google-compute-engine/packaging/debian/control b/packages/google-compute-engine/packaging/debian/control index 4b670f0..350c63d 100644 --- a/packages/google-compute-engine/packaging/debian/control +++ b/packages/google-compute-engine/packaging/debian/control @@ -9,10 +9,8 @@ Homepage: https://github.com/GoogleCloudPlatform/compute-image-packages Package: google-compute-engine Architecture: all Depends: google-compute-engine-oslogin, - python-google-compute-engine, - python3-google-compute-engine, - ${misc:Depends}, - systemd + google-guest-agent, + ${misc:Depends} Recommends: rsyslog | system-log-daemon Provides: irqbalance Conflicts: google-compute-engine-jessie, @@ -33,5 +31,5 @@ Replaces: google-compute-engine-jessie, google-compute-daemon, google-startup-scripts Description: Google Compute Engine guest environment. - This package contains scripts, configuration, and systemd init files for + This package contains scripts and configuration files for features specific to the Google Compute Engine cloud environment. diff --git a/packages/google-compute-engine/packaging/debian/install b/packages/google-compute-engine/packaging/debian/install index b436f83..22d4b3d 100644 --- a/packages/google-compute-engine/packaging/debian/install +++ b/packages/google-compute-engine/packaging/debian/install @@ -2,7 +2,5 @@ etc/apt/apt.conf.d/* etc/modprobe.d/* etc/rsyslog.d/* etc/sysctl.d/* -lib/systemd/system/* -lib/systemd/system-preset/* lib/udev/rules.d/* usr/bin/* diff --git a/packages/google-compute-engine/packaging/debian/postinst b/packages/google-compute-engine/packaging/debian/postinst deleted file mode 100644 index c00b76e..0000000 --- a/packages/google-compute-engine/packaging/debian/postinst +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# Copyright 2017 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#DEBHELPER# - -# Service reload or restart. We do not start or restart -# google-shutdown-scripts.service google-startup-scripts.service. -set -e -if [ -d /run/systemd/system ]; then - systemctl --system daemon-reload >/dev/null || true - if [ -n "$2" ]; then - _dh_action=reload-or-restart - else - _dh_action=start - fi - deb-systemd-invoke $_dh_action \ - google-instance-setup.service \ - google-accounts-daemon.service \ - google-clock-skew-daemon.service \ - google-network-daemon.service >/dev/null || true -fi diff --git a/packages/google-compute-engine/packaging/debian/preinst b/packages/google-compute-engine/packaging/debian/preinst old mode 100644 new mode 100755 index 2f04366..f3ce046 --- a/packages/google-compute-engine/packaging/debian/preinst +++ b/packages/google-compute-engine/packaging/debian/preinst @@ -13,20 +13,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -#DEBHELPER# - set -e -if [ -d /run/systemd/system ] ; then - if [ "$1" = upgrade ]; then - # Remove old services if they exist on upgrade. - if [ -f /lib/systemd/system/google-ip-forwarding-daemon.service ]; then - systemctl stop google-ip-forwarding-daemon.service - systemctl disable google-ip-forwarding-daemon.service - fi - - if [ -f /lib/systemd/system/google-network-setup.service ]; then - systemctl stop google-network-setup.service - systemctl disable google-network-setup.service - fi - fi +if [ "$1" = upgrade ]; then + # Remove old services if they exist on upgrade. + for svc in google-ip-forwarding-daemon google-network-setup \ + google-network-daemon google-accounts-daemon google-clock-skew-daemon \ + google-instance-setup; do + if systemctl is-enabled ${svc}.service >/dev/null 2>&1; then + systemctl --no-reload disable ${svc}.service >/dev/null 2>&1 || : + if [ -d /run/systemd/system ]; then + systemctl stop ${svc}.service >/dev/null 2>&1 || : + fi + fi + done + systemdctl daemon-reload >/dev/null 2>&1 || : fi diff --git a/packages/google-compute-engine/packaging/debian/prerm b/packages/google-compute-engine/packaging/debian/prerm deleted file mode 100644 index e8ac50d..0000000 --- a/packages/google-compute-engine/packaging/debian/prerm +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# Copyright 2017 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#DEBHELPER# - -# Stop all services on remove. -set -e -if [ -d /run/systemd/system ] && [ "$1" = remove ]; then - deb-systemd-invoke stop \ - google-instance-setup.service \ - google-accounts-daemon.service \ - google-clock-skew-daemon.service \ - google-network-daemon.service \ - google-shutdown-scripts.service \ - google-startup-scripts.service >/dev/null -fi diff --git a/packages/google-compute-engine/packaging/debian/rules b/packages/google-compute-engine/packaging/debian/rules index d82bff9..2dd01ce 100755 --- a/packages/google-compute-engine/packaging/debian/rules +++ b/packages/google-compute-engine/packaging/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f %: - dh $@ --with systemd + dh $@ -override_dh_systemd_start: - # Configured in postinst. +override_dh_install: + dh_install --sourcedir=src diff --git a/packages/google-compute-engine/packaging/google-compute-engine-el6.spec b/packages/google-compute-engine/packaging/google-compute-engine-el6.spec deleted file mode 100644 index 0e8afb1..0000000 --- a/packages/google-compute-engine/packaging/google-compute-engine-el6.spec +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2017 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -Name: google-compute-engine -Epoch: 1 -Version: %{_version} -Release: g2.el6 -Summary: Google Compute Engine guest environment. -License: ASL 2.0 -Url: https://github.com/GoogleCloudPlatform/compute-image-packages -Source0: %{name}_%{version}.orig.tar.gz -Requires: curl -Requires: google-compute-engine-oslogin -Requires: python-google-compute-engine >= 1:20190916.00 -Requires: rsyslog -# Old packages. -Obsoletes: google-compute-engine-init -Obsoletes: google-config -Obsoletes: google-startup-scripts - -BuildArch: noarch - -# Allow other files in the source that don't end up in the package. -%define _unpackaged_files_terminate_build 0 - -%description -This package contains scripts, configuration, and init files for features -specific to the Google Compute Engine cloud environment. - -%prep -%autosetup - -%install -cp -a src/{etc,usr} %{buildroot} -install -d %{buildroot}/lib/ -cp -a src/lib/udev %{buildroot}/lib -mkdir -p %{buildroot}/etc/dhcp -ln -sf /usr/bin/google_set_hostname %{buildroot}/etc/dhcp/dhclient-exit-hooks - -%files -%defattr(0644,root,root,0755) -%attr(0755,-,-) %{_bindir}/* -%attr(0755,-,-) %{_sbindir}/* -/lib/udev/rules.d/* -/etc/init/*.conf -/etc/dhcp/dhclient-exit-hooks -%config /etc/modprobe.d/* -%config /etc/rsyslog.d/* -%config /etc/sysctl.d/* - -%post -# On upgrade run instance setup again to handle any new configs and restart -# daemons. -if [ $1 -eq 2 ]; then - stop -q -n google-accounts-daemon - stop -q -n google-clock-skew-daemon - stop -q -n google-network-daemon - /usr/bin/google_instance_setup - start -q -n google-accounts-daemon - start -q -n google-clock-skew-daemon - start -q -n google-network-daemon -fi - -if initctl status google-ip-forwarding-daemon | grep -q 'running'; then - stop -q -n google-ip-forwarding-daemon -fi - -%preun -# On uninstall only. -if [ $1 -eq 0 ]; then - stop -q -n google-accounts-daemon - stop -q -n google-clock-skew-daemon - stop -q -n google-network-daemon - if initctl status google-ip-forwarding-daemon | grep -q 'running'; then - stop -q -n google-ip-forwarding-daemon - fi -fi diff --git a/packages/google-compute-engine/packaging/google-compute-engine.el6.spec b/packages/google-compute-engine/packaging/google-compute-engine.el6.spec new file mode 100644 index 0000000..aeb29be --- /dev/null +++ b/packages/google-compute-engine/packaging/google-compute-engine.el6.spec @@ -0,0 +1,70 @@ +# Copyright 2017 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Name: google-compute-engine +Epoch: 1 +Version: %{_version} +Release: g2.el6 +Summary: Google Compute Engine guest environment. +License: ASL 2.0 +Url: https://github.com/GoogleCloudPlatform/compute-image-packages +Source0: %{name}_%{version}.orig.tar.gz +Requires: curl +Requires: google-compute-engine-oslogin +Requires: google-guest-agent +Requires: rsyslog +# Old packages. +Obsoletes: google-compute-engine-init +Obsoletes: google-config +Obsoletes: google-startup-scripts + +BuildArch: noarch + +# Allow other files in the source that don't end up in the package. +%define _unpackaged_files_terminate_build 0 + +%description +This package contains scripts, configuration, and init files for features +specific to the Google Compute Engine cloud environment. + +%prep +%autosetup + +%install +cp -a src/{etc,usr} %{buildroot} +install -d %{buildroot}/lib/ +cp -a src/lib/udev %{buildroot}/lib +mkdir -p %{buildroot}/etc/dhcp +ln -sf /usr/bin/google_set_hostname %{buildroot}/etc/dhcp/dhclient-exit-hooks + +%files +%defattr(0644,root,root,0755) +%attr(0755,-,-) %{_bindir}/* +%attr(0755,-,-) %{_sbindir}/* +/lib/udev/rules.d/* +/etc/dhcp/dhclient-exit-hooks +%config /etc/modprobe.d/* +%config /etc/rsyslog.d/* +%config /etc/sysctl.d/* + +%pre +if [ $1 -gt 1 ] ; then + # This is an upgrade. Stop services previously owned by this package, if any. + for svc in google-ip-forwarding-daemon google-network-setup \ + google-network-daemon google-accounts-daemon google-clock-skew-daemon; do + if initctl status $svc >/dev/null 2>&1; then + initctl stop ${svc} || : + fi + done +fi diff --git a/packages/google-compute-engine/packaging/google-compute-engine.spec b/packages/google-compute-engine/packaging/google-compute-engine.spec index 3f5fcb1..c0833f3 100644 --- a/packages/google-compute-engine/packaging/google-compute-engine.spec +++ b/packages/google-compute-engine/packaging/google-compute-engine.spec @@ -27,15 +27,10 @@ Url: https://github.com/GoogleCloudPlatform/compute-image-packages Source0: %{name}_%{version}.orig.tar.gz Requires: curl Requires: google-compute-engine-oslogin -%if 0%{?rhel} == 8 -Requires: python3-google-compute-engine >= 1:20190916.00 -%else -Requires: python-google-compute-engine >= 1:20190916.00 -%endif +Requires: google-guest-agent Requires: rsyslog BuildArch: noarch -BuildRequires: systemd # Allow other files in the source that don't end up in the package. %define _unpackaged_files_terminate_build 0 @@ -49,9 +44,7 @@ specific to the Google Compute Engine cloud environment. %install cp -a src/{etc,usr} %{buildroot} -install -d %{buildroot}/{%{_unitdir},%{_presetdir},%{_udevrulesdir}} -cp -a src/lib/systemd/system/* %{buildroot}/%{_unitdir} -cp -a src/lib/systemd/system-preset/* %{buildroot}/%{_presetdir} +install -d %{buildroot}/%{_udevrulesdir} cp -a src/lib/udev/rules.d/* %{buildroot}/%{_udevrulesdir} %files @@ -59,52 +52,24 @@ cp -a src/lib/udev/rules.d/* %{buildroot}/%{_udevrulesdir} %attr(0755,-,-) %{_bindir}/* %attr(0755,-,-) /etc/dhcp/dhclient.d/google_hostname.sh %{_udevrulesdir}/* -%{_unitdir}/* -%{_presetdir}/* %config /etc/modprobe.d/* %config /etc/rsyslog.d/* %config /etc/sysctl.d/* -%post -if [ $1 -eq 2 ]; then - # New service might not be enabled during upgrade. - systemctl enable google-network-daemon.service -fi - -# On upgrade run instance setup again to handle any new configs and restart -# daemons. -if [ $1 -eq 2 ]; then - /usr/bin/google_instance_setup - systemctl reload-or-restart google-accounts-daemon.service - systemctl reload-or-restart google-clock-skew-daemon.service - systemctl reload-or-restart google-network-daemon.service +%pre +if [ $1 -gt 1 ] ; then + # This is an upgrade. Stop and disable services previously owned by this + # package, if any. + for svc in google-ip-forwarding-daemon google-network-setup \ + google-network-daemon google-accounts-daemon google-clock-skew-daemon \ + google-instance-setup; do + if systemctl is-enabled ${svc}.service >/dev/null 2>&1; then + systemctl --no-reload disable ${svc}.service >/dev/null 2>&1 || : + if [ -d /run/systemd/system ]; then + systemctl stop ${svc}.service >/dev/null 2>&1 || : + fi + fi + done + systemctl daemon-reload >/dev/null 2>&1 || : fi -%systemd_post google-accounts-daemon.service -%systemd_post google-clock-skew-daemon.service -%systemd_post google-instance-setup.service -%systemd_post google-network-daemon.service -%systemd_post google-shutdown-scripts.service -%systemd_post google-startup-scripts.service - -# Remove old services. -if [ -f /lib/systemd/system/google-ip-forwarding-daemon.service ]; then - systemctl stop --no-block google-ip-forwarding-daemon - systemctl disable google-ip-forwarding-daemon.service -fi - -if [ -f /lib/systemd/system/google-network-setup.service ]; then - systemctl stop --no-block google-network-setup - systemctl disable google-network-setup.service -fi - -%preun -# On uninstall only. -if [ $1 -eq 0 ]; then - %systemd_preun google-accounts-daemon.service - %systemd_preun google-clock-skew-daemon.service - %systemd_preun google-instance-setup.service - %systemd_preun google-network-daemon.service - %systemd_preun google-shutdown-scripts.service - %systemd_preun google-startup-scripts.service -fi diff --git a/packages/google-compute-engine/packaging/setup_deb.sh b/packages/google-compute-engine/packaging/setup_deb.sh index 66c2f30..19b4521 100755 --- a/packages/google-compute-engine/packaging/setup_deb.sh +++ b/packages/google-compute-engine/packaging/setup_deb.sh @@ -14,7 +14,7 @@ # limitations under the License. NAME="google-compute-engine" -VERSION="20190916.00" +VERSION="20200113.00" working_dir=${PWD} if [[ $(basename "$working_dir") != $NAME ]]; then diff --git a/packages/google-compute-engine/packaging/setup_rpm.sh b/packages/google-compute-engine/packaging/setup_rpm.sh index b0590e2..801c9aa 100755 --- a/packages/google-compute-engine/packaging/setup_rpm.sh +++ b/packages/google-compute-engine/packaging/setup_rpm.sh @@ -14,7 +14,7 @@ # limitations under the License. NAME="google-compute-engine" -VERSION="20190916.00" +VERSION="20200113.00" rpm_working_dir=/tmp/rpmpackage/${NAME}-${VERSION} working_dir=${PWD} diff --git a/packages/google-compute-engine/src/etc/init/google-accounts-daemon.conf b/packages/google-compute-engine/src/etc/init/google-accounts-daemon.conf deleted file mode 100644 index 02a7d65..0000000 --- a/packages/google-compute-engine/src/etc/init/google-accounts-daemon.conf +++ /dev/null @@ -1,6 +0,0 @@ -# Manages accounts from metadata SSH keys. -start on started google-network-daemon -oom -16 - -respawn -exec /usr/bin/google_accounts_daemon diff --git a/packages/google-compute-engine/src/etc/init/google-clock-skew-daemon.conf b/packages/google-compute-engine/src/etc/init/google-clock-skew-daemon.conf deleted file mode 100644 index 05c73ce..0000000 --- a/packages/google-compute-engine/src/etc/init/google-clock-skew-daemon.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Sync the system clock on migration. -start on started google-network-daemon - -respawn -exec /usr/bin/google_clock_skew_daemon diff --git a/packages/google-compute-engine/src/etc/init/google-instance-setup.conf b/packages/google-compute-engine/src/etc/init/google-instance-setup.conf deleted file mode 100644 index 2c7d596..0000000 --- a/packages/google-compute-engine/src/etc/init/google-instance-setup.conf +++ /dev/null @@ -1,6 +0,0 @@ -# Runs instance setup on boot. -start on started rsyslog - -task - -exec /usr/bin/google_instance_setup diff --git a/packages/google-compute-engine/src/etc/init/google-network-daemon.conf b/packages/google-compute-engine/src/etc/init/google-network-daemon.conf deleted file mode 100644 index d2e985a..0000000 --- a/packages/google-compute-engine/src/etc/init/google-network-daemon.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Manages network interfaces. -start on stopped google-instance-setup - -respawn -exec /usr/bin/google_network_daemon diff --git a/packages/google-compute-engine/src/etc/init/google-shutdown-scripts.conf b/packages/google-compute-engine/src/etc/init/google-shutdown-scripts.conf deleted file mode 100644 index b9323a5..0000000 --- a/packages/google-compute-engine/src/etc/init/google-shutdown-scripts.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Runs a shutdown script from metadata. -start on starting rc RUNLEVEL=[06] -task - -exec /usr/bin/google_metadata_script_runner --script-type shutdown diff --git a/packages/google-compute-engine/src/etc/init/google-startup-scripts.conf b/packages/google-compute-engine/src/etc/init/google-startup-scripts.conf deleted file mode 100644 index 664297c..0000000 --- a/packages/google-compute-engine/src/etc/init/google-startup-scripts.conf +++ /dev/null @@ -1,4 +0,0 @@ -# Runs a startup script from metadata. -start on started google-network-daemon and startup - -exec /usr/bin/google_metadata_script_runner --script-type startup diff --git a/packages/google-compute-engine/src/lib/systemd/system-preset/90-google-compute-engine.preset b/packages/google-compute-engine/src/lib/systemd/system-preset/90-google-compute-engine.preset deleted file mode 100644 index b903cb7..0000000 --- a/packages/google-compute-engine/src/lib/systemd/system-preset/90-google-compute-engine.preset +++ /dev/null @@ -1,6 +0,0 @@ -enable google-accounts-daemon.service -enable google-clock-skew-daemon.service -enable google-instance-setup.service -enable google-network-daemon.service -enable google-shutdown-scripts.service -enable google-startup-scripts.service diff --git a/packages/google-compute-engine/src/lib/systemd/system/google-accounts-daemon.service b/packages/google-compute-engine/src/lib/systemd/system/google-accounts-daemon.service deleted file mode 100644 index db627aa..0000000 --- a/packages/google-compute-engine/src/lib/systemd/system/google-accounts-daemon.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Google Compute Engine Accounts Daemon -After=network.target google-instance-setup.service google-network-daemon.service - -[Service] -Type=simple -ExecStart=/usr/bin/google_accounts_daemon -OOMScoreAdjust=-999 -Restart=always -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/packages/google-compute-engine/src/lib/systemd/system/google-clock-skew-daemon.service b/packages/google-compute-engine/src/lib/systemd/system/google-clock-skew-daemon.service deleted file mode 100644 index 9339116..0000000 --- a/packages/google-compute-engine/src/lib/systemd/system/google-clock-skew-daemon.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Google Compute Engine Clock Skew Daemon -After=network.target google-instance-setup.service google-network-daemon.service - -[Service] -Type=simple -ExecStart=/usr/bin/google_clock_skew_daemon -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/packages/google-compute-engine/src/lib/systemd/system/google-instance-setup.service b/packages/google-compute-engine/src/lib/systemd/system/google-instance-setup.service deleted file mode 100644 index ee987b2..0000000 --- a/packages/google-compute-engine/src/lib/systemd/system/google-instance-setup.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Google Compute Engine Instance Setup -After=network-online.target network.target rsyslog.service -Before=sshd.service - -[Service] -Type=oneshot -ExecStart=/usr/bin/google_instance_setup -StandardOutput=journal+console - -[Install] -WantedBy=sshd.service -WantedBy=multi-user.target diff --git a/packages/google-compute-engine/src/lib/systemd/system/google-network-daemon.service b/packages/google-compute-engine/src/lib/systemd/system/google-network-daemon.service deleted file mode 100644 index 71745d4..0000000 --- a/packages/google-compute-engine/src/lib/systemd/system/google-network-daemon.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Google Compute Engine Network Daemon -After=network-online.target network.target -After=google-instance-setup.service -PartOf=network.service - -[Service] -Type=simple -ExecStart=/usr/bin/google_network_daemon -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/packages/google-compute-engine/src/lib/systemd/system/google-shutdown-scripts.service b/packages/google-compute-engine/src/lib/systemd/system/google-shutdown-scripts.service deleted file mode 100644 index ae23d76..0000000 --- a/packages/google-compute-engine/src/lib/systemd/system/google-shutdown-scripts.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Google Compute Engine Shutdown Scripts -After=network-online.target network.target rsyslog.service -After=google-instance-setup.service google-network-daemon.service - -[Service] -ExecStart=/bin/true -ExecStop=/usr/bin/google_metadata_script_runner --script-type shutdown -Type=oneshot -RemainAfterExit=true -TimeoutStopSec=0 -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/packages/google-compute-engine/src/lib/systemd/system/google-startup-scripts.service b/packages/google-compute-engine/src/lib/systemd/system/google-startup-scripts.service deleted file mode 100644 index c150693..0000000 --- a/packages/google-compute-engine/src/lib/systemd/system/google-startup-scripts.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Google Compute Engine Startup Scripts -After=network-online.target network.target rsyslog.service -After=google-instance-setup.service google-network-daemon.service -Before=apt-daily.service - -[Service] -ExecStart=/usr/bin/google_metadata_script_runner --script-type startup -KillMode=process -Type=oneshot -StandardOutput=journal+console - -[Install] -WantedBy=multi-user.target diff --git a/packages/python-google-compute-engine/packaging/debian/changelog b/packages/python-google-compute-engine/packaging/debian/changelog deleted file mode 100644 index b4261c2..0000000 --- a/packages/python-google-compute-engine/packaging/debian/changelog +++ /dev/null @@ -1,278 +0,0 @@ -python-google-compute-engine (1:20191210.00-g1) stable; urgency=medium - - * Enable sysctl change for E2 platform. - * Support retry limits in metadata retrieval. - - -- Google Cloud Team Tue, 10 Dec 2019 15:02:59 -0800 - -python-google-compute-engine (1:20191120.00-g1) stable; urgency=medium - - * REVERT: Retry metadata lookups in agent. - - -- Google Cloud Team Wed, 20 Sep 2019 15:28:54 -0700 - -python-google-compute-engine (1:20191115.00-g1) stable; urgency=medium - - * REVERT: Enable sysctl change for E2 platform. - - -- Google Cloud Team Fri, 15 Sep 2019 10:08:24 -0700 - -python-google-compute-engine (1:20191112.00-g1) stable; urgency=medium - - * Enable sysctl change for E2 platform. - * Retry metadata lookups in agent. - * Wait for link-local IPv6 addresses to resolve. - - -- Google Cloud Team Mon, 11 Nov 2019 15:52:24 -0700 - -python-google-compute-engine (1:20190916.00-g1) stable; urgency=medium - - * Revert VM rename feature. - - -- Google Cloud Team Mon, 16 Sep 2019 15:52:24 -0700 - -python-google-compute-engine (1:20190905.00-g1) stable; urgency=medium - - * Fix setup.py version to be compliant with legacy builds. - * Detect hostname changes. - * Use non-numeric project ID in generated boto.cfg for GSUtil. - - -- Google Cloud Team Thu, 05 Sep 2019 11:08:18 -0700 - -python-google-compute-engine (1:20190801.00-g1) stable; urgency=medium - - * Re-enable boto config and drop writing plugin directory. - * Fix metadata script retrieval. - - -- Google Cloud Team Thu, 01 Aug 2019 13:55:46 -0700 - -python-google-compute-engine (1:20190729.00-g1) stable; urgency=medium - - * Support for Google Private Access over IPv6. - - -- Google Cloud Team Mon, 29 Jul 2019 10:09:24 -0700 - -python-google-compute-engine (1:20190708.00-g1) stable; urgency=medium - - * Move Debian entry point scripts to python3. - * Update Debian build dependencies. - * Drop unnecessary build and package dependencies. - - -- Google Cloud Team Mon, 08 Jul 2019 10:20:44 -0700 - -python-google-compute-engine (2.8.16-1) stable; urgency=low - - * Fix guest attributes flow in Python 3. - - -- Google Cloud Team Wed, 22 May 2019 12:00:00 -0700 - -python-google-compute-engine (2.8.15-1) stable; urgency=low - - * Retry download for metadata scripts. - * Fix script retrieval in python3. - * Disable boto config in python3. - * Update SSH host keys in guest attributes. - - -- Google Cloud Team Tue, 21 May 2019 12:00:00 -0700 - -python-google-compute-engine (2.8.14-1) stable; urgency=low - - * FreeBSD fixes: syslog socket location and OS detection. - - -- Google Cloud Team Tue, 16 Apr 2019 12:00:00 -0700 - -python-google-compute-engine (2.8.13-1) stable; urgency=low - - * Fix metadata script retrieval to support Python 3. - - -- Google Cloud Team Thu, 24 Jan 2019 12:00:00 -0700 - -python-google-compute-engine (2.8.12-1) stable; urgency=low - - * Fix two factor enablement on change. - - -- Google Cloud Team Wed, 05 Dec 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.11-1) stable; urgency=low - - * Split up the gpasswd command into two commands. - * Update two factor enablement on change. - - -- Google Cloud Team Tue, 04 Dec 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.10-1) stable; urgency=low - - * Fix the gpasswd command default. - - -- Google Cloud Team Fri, 30 Nov 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.9-1) stable; urgency=low - - * Support enabling OS Login two factor authentication. - * Improve accounts support for FreeBSD. - * Improve SELinux support. - - -- Google Cloud Team Wed, 28 Nov 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.8-1) stable; urgency=low - - * Update sudoer group membership without overriding local groups. - - -- Google Cloud Team Tue, 23 Oct 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.7-1) stable; urgency=low - - * Remove users from sudoers group on removal (fixed). - - -- Google Cloud Team Thu, 18 Oct 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.6-1) stable; urgency=low - - * Revert PR: Remove users from sudoers group on removal. - - -- Google Cloud Team Thu, 11 Oct 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.5-1) stable; urgency=low - - * Remove users from sudoers group on removal. - * Remove gsutil dependency for metadata scripts. - - -- Google Cloud Team Thu, 05 Oct 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.4-1) stable; urgency=low - - * Remove ntp dependency. - * Support Debian 10 Buster. - * Restart the network daemon if networking is restarted. - * Prevent setup of the default ethernet interface. - * Accounts daemon can now verify username is 32 characters or less. - - -- Google Cloud Team Wed, 05 Sep 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.3-1) stable; urgency=low - - * Prevent IP forwarding daemon log spam. - * Make default shell configurable when executing metadata scripts. - * Rename distro directory to distro_lib. - - -- Google Cloud Team Mon, 11 June 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.2-1) stable; urgency=low - - * Prevent delay in configuring IP forwarding routes. - * Improve instance setup support for FreeBSD. - - -- Google Cloud Team Thu, 10 May 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.1-1) stable; urgency=low - - * Improve OS Login disablement. - - -- Google Cloud Team Fri, 04 May 2018 12:00:00 -0700 - -google-compute-image-packages (2.8.0-1) stable; urgency=low - - * Create a new network daemon. - * Refactor the IP forwarding daemon and network setup. - * Improvements for using NSS cache in the accounts daemon. - - -- Google Cloud Team Tue, 01 May 2018 12:00:00 -0700 - -google-compute-image-packages (2.7.7-1) stable; urgency=low - - * Add support for NSS cache in OS Login. - - -- Google Cloud Team Thu, 08 Mar 2018 12:00:00 -0700 - -google-compute-image-packages (2.7.6-1) stable; urgency=low - - * Add distro specific logic. - - -- Google Cloud Team Wed, 21 Feb 2018 12:00:00 -0700 - -google-compute-image-packages (2.7.5-2) stable; urgency=low - - * Fix dependencies for syslog. - - -- Google Cloud Team Tue, 06 Feb 2018 12:00:00 -0700 - -google-compute-image-packages (2.7.5-1) stable; urgency=low - - * Revert hostname setting change in Debian. - - -- Google Cloud Team Mon, 29 Jan 2018 12:00:00 -0700 - -google-compute-image-packages (2.7.4-1) stable; urgency=low - - * Fix hostname setting in Debian. - - -- Google Cloud Team Mon, 29 Jan 2018 12:00:00 -0700 - -google-compute-image-packages (2.7.3-1) stable; urgency=low - - * Improve hostname setting and correctly restart rsyslog. - - -- Google Cloud Team Thu, 25 Jan 2018 12:00:00 -0700 - -google-compute-image-packages (2.7.2-2) stable; urgency=low - - * Force IPv4 for apt. - - -- Google Cloud Team Wed, 13 Dec 2017 12:00:00 -0700 - -google-compute-image-packages (2.7.2-1) stable; urgency=low - - * Generate SSH host keys when none are present. - * Improve logging when activating OS Login. - - -- Google Cloud Team Wed, 29 Nov 2017 12:00:00 -0700 - -google-compute-image-packages (2.7.1-1) stable; urgency=low - - * Update set_hostname file name to prevent conflict. - * Add apt config to prevent auto-removal of google-compute-engine. - - -- Google Cloud Team Wed, 25 Oct 2017 12:00:00 -0700 - -google-compute-image-packages (2.7.0-6) stable; urgency=low - - * Linux guest environment support for OS Login. - - -- Google Cloud Team Tue, 17 Oct 2017 12:00:00 -0700 - -google-compute-image-packages (2.6.2-1) stable; urgency=low - - * Fix system hang during VM shutdown. - - -- Google Cloud Team Fri, 06 Oct 2017 12:00:00 -0700 - -google-compute-image-packages (2.6.1-1) stable; urgency=low - - * Use curl to download metadata script files for SSL certificate validation. - * Use netifaces for retrieving MAC address names if the import exists. - - -- Google Cloud Team Thurs, 14 Sep 2017 12:00:00 -0700 - -google-compute-image-packages (2.6.0-4) stable; urgency=low - - * Fix DHCP exit hook install. - - -- Google Cloud Team Mon, 28 Aug 2017 12:00:00 -0700 - -google-compute-image-packages (2.6.0-3) stable; urgency=low - - * Add systemd preset. - - -- Google Cloud Team Fri, 25 Aug 2017 14:00:00 -0700 - -google-compute-image-packages (2.6.0-2) stable; urgency=low - - * Add DHCP exit hook script back into package. - - -- Google Cloud Team Fri, 25 Aug 2017 12:00:00 -0700 - -google-compute-image-packages (2.6.0-1) stable; urgency=low - - * New packaging. - - -- Google Cloud Team Mon, 27 Jun 2017 12:00:00 -0700 diff --git a/packages/python-google-compute-engine/packaging/debian/compat b/packages/python-google-compute-engine/packaging/debian/compat deleted file mode 100644 index f599e28..0000000 --- a/packages/python-google-compute-engine/packaging/debian/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/packages/python-google-compute-engine/packaging/debian/control b/packages/python-google-compute-engine/packaging/debian/control deleted file mode 100644 index d6491d0..0000000 --- a/packages/python-google-compute-engine/packaging/debian/control +++ /dev/null @@ -1,38 +0,0 @@ -Source: python-google-compute-engine -Section: admin -Priority: optional -Maintainer: Google Cloud Team -Build-Depends: debhelper (>= 10), - dh-python, - python-all, - python-boto, - python-mock, - python-pytest, - python-setuptools, - python3-all, - python3-distro, - python3-pytest, - python3-setuptools -Standards-Version: 3.9.8 -Homepage: https://github.com/GoogleCloudPlatform/compute-image-packages - -Package: python-google-compute-engine -Section: python -Architecture: all -Depends: ${python:Depends}, ${misc:Depends} -Conflicts: google-compute-engine-jessie, - google-compute-engine-stretch, - google-compute-daemon, - google-startup-scripts -Description: Google Compute Engine python library for Python 2.x. - Python libraries used for interacting with Google Compute Engine instance - metadata to provide platform integration. - -Package: python3-google-compute-engine -Section: python -Architecture: all -Depends: ${python3:Depends}, ${misc:Depends}, - python3-distro, python3-pkg-resources, python3:any -Description: Google Compute Engine python library for Python 3.x. - Python libraries used for interacting with Google Compute Engine instance - metadata to provide platform integration. diff --git a/packages/python-google-compute-engine/packaging/debian/copyright b/packages/python-google-compute-engine/packaging/debian/copyright deleted file mode 100644 index 034c729..0000000 --- a/packages/python-google-compute-engine/packaging/debian/copyright +++ /dev/null @@ -1,27 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: python-google-compute-engine -Upstream-Contact: gc-team@google.com - -Files: * -Copyright: Copyright 2017 Google Inc. -License: Apache-2.0 - -Files: debian/* -Copyright: Copyright 2017 Google Inc. -License: Apache-2.0 - -License: Apache-2.0 - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - . - http://www.apache.org/licenses/LICENSE-2.0 - . - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - . - On Debian systems, the complete text of the Apache version 2.0 license - can be found in "/usr/share/common-licenses/Apache-2.0". diff --git a/packages/python-google-compute-engine/packaging/debian/rules b/packages/python-google-compute-engine/packaging/debian/rules deleted file mode 100755 index b7999dd..0000000 --- a/packages/python-google-compute-engine/packaging/debian/rules +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/make -f - -export PYBUILD_NAME=google-compute-engine -export PYBUILD_TEST_PYTEST=1 -export PYBUILD_TEST_ARGS={dir}/google_compute_engine/ -export PYBUILD_SYSTEM=distutils - -%: - dh $@ --with python2,python3 --buildsystem=pybuild - -override_dh_clean: - rm -rf google_compute_engine.egg-info - dh_clean - -override_dh_auto_install: - dh_auto_install - # Remove python2.7 entry points. - rm -Rf debian/python-google-compute-engine/usr/bin diff --git a/packages/python-google-compute-engine/packaging/python-google-compute-engine.spec b/packages/python-google-compute-engine/packaging/python-google-compute-engine.spec deleted file mode 100644 index 1984cec..0000000 --- a/packages/python-google-compute-engine/packaging/python-google-compute-engine.spec +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2017 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Force the dist to be el7 to avoid el7.centos. -%if 0%{?rhel} == 7 - %define dist .el7 -%endif - -Name: python-google-compute-engine -Epoch: 1 -Version: %{_version} -Release: g1%{?dist} -Summary: Google Compute Engine python library -License: ASL 2.0 -Url: https://github.com/GoogleCloudPlatform/compute-image-packages -Source0: %{name}_%{version}.orig.tar.gz - -BuildArch: noarch -BuildRequires: python2-devel python-setuptools python-boto - -Requires: python-boto python-setuptools - -Provides: python2-google-compute-engine - -Obsoletes: google-compute-daemon -Obsoletes: google-startup-scripts -Conflicts: google-compute-daemon -Conflicts: google-startup-scripts - -%description -Google Compute Engine python library for Python 2.x. - -%prep -%autosetup - -%build -python setup.py build - -%install -python setup.py install --prefix=%{_prefix} --root %{buildroot} - -%files -%{python_sitelib}/* -%attr(0755,-,-) %{_bindir}/* diff --git a/packages/python-google-compute-engine/packaging/python3-google-compute-engine.spec b/packages/python-google-compute-engine/packaging/python3-google-compute-engine.spec deleted file mode 100644 index 69257d9..0000000 --- a/packages/python-google-compute-engine/packaging/python3-google-compute-engine.spec +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2019 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -Name: python3-google-compute-engine -Epoch: 1 -Version: %{_version} -Release: g1%{?dist} -Summary: Google Compute Engine python3 library -License: ASL 2.0 -Url: https://github.com/GoogleCloudPlatform/compute-image-packages -Source0: %{name}_%{version}.orig.tar.gz - -BuildArch: noarch -BuildRequires: python36-devel python3-setuptools - -Requires: python3-setuptools - -%description -Google Compute Engine python library for Python 3.x. - -%prep -%autosetup - -%build -%py3_build - -%install -%py3_install - -%files -%{python3_sitelib}/google_compute_engine/ -%{python3_sitelib}/google_compute_engine*.egg-info/ -%{_bindir}/google_accounts_daemon -%{_bindir}/google_clock_skew_daemon -%{_bindir}/google_instance_setup -%{_bindir}/google_metadata_script_runner -%{_bindir}/google_network_daemon diff --git a/packages/python-google-compute-engine/packaging/setup_deb.sh b/packages/python-google-compute-engine/packaging/setup_deb.sh deleted file mode 100755 index 764017e..0000000 --- a/packages/python-google-compute-engine/packaging/setup_deb.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -NAME="python-google-compute-engine" -VERSION="20191210.00" - -working_dir=${PWD} -if [[ $(basename "$working_dir") != $NAME ]]; then - echo "Packaging scripts must be run from top of package dir." - exit 1 -fi - -# Build dependencies. -sudo apt-get -y install python-all python-setuptools python3-all \ - python3-setuptools python-pytest python3-pytest python-mock python-boto - -# DEB creation tools. -sudo apt-get -y install debhelper devscripts build-essential - -rm -rf /tmp/debpackage -mkdir /tmp/debpackage -tar czvf /tmp/debpackage/${NAME}_${VERSION}.orig.tar.gz --exclude .git \ - --exclude packaging --transform "s/^\./${NAME}-${VERSION}/" . - -pushd /tmp/debpackage -tar xzvf ${NAME}_${VERSION}.orig.tar.gz - -cd ${NAME}-${VERSION} - -cp -r ${working_dir}/packaging/debian ./ - -debuild -us -uc diff --git a/packages/python-google-compute-engine/packaging/setup_rpm.sh b/packages/python-google-compute-engine/packaging/setup_rpm.sh deleted file mode 100755 index 7c97455..0000000 --- a/packages/python-google-compute-engine/packaging/setup_rpm.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -NAME="python-google-compute-engine" -VERSION="20191210.00" - -rpm_working_dir=/tmp/rpmpackage/${NAME}-${VERSION} -working_dir=${PWD} -if [[ $(basename "$working_dir") != $NAME ]]; then - echo "Packaging scripts must be run from top of package dir." - exit 1 -fi - -sudo yum -y install rpmdevtools - -# RHEL/CentOS 8 uses python3. -if grep -q '^\(CentOS\|Red Hat\)[^0-9]*8\..' /etc/redhat-release; then - NAME="python3-google-compute-engine" - rpm_working_dir=/tmp/rpmpackage/${NAME}-${VERSION} - sudo yum -y install python36-devel python3-setuptools python36-rpm-macros -else - sudo yum -y install python2-devel python-setuptools python-boto -fi - -rm -rf /tmp/rpmpackage -mkdir -p ${rpm_working_dir}/{SOURCES,SPECS} - -cp packaging/${NAME}.spec ${rpm_working_dir}/SPECS/ - -tar czvf ${rpm_working_dir}/SOURCES/${NAME}_${VERSION}.orig.tar.gz \ - --exclude .git --exclude packaging --transform "s/^\./${NAME}-${VERSION}/" . - -rpmbuild --define "_topdir ${rpm_working_dir}/" --define "_version ${VERSION}" \ - -ba ${rpm_working_dir}/SPECS/${NAME}.spec diff --git a/packages/python-google-compute-engine/setup.py b/packages/python-google-compute-engine/setup.py index de05b12..c30febd 100755 --- a/packages/python-google-compute-engine/setup.py +++ b/packages/python-google-compute-engine/setup.py @@ -15,7 +15,6 @@ """Create a Python package of the Linux guest environment.""" -import glob import sys import setuptools @@ -37,22 +36,10 @@ setuptools.setup( name='google-compute-engine', packages=setuptools.find_packages(), url='https://github.com/GoogleCloudPlatform/compute-image-packages', - version='20191210.0', - # Entry points create scripts in /usr/bin that call a function. - entry_points={ - 'console_scripts': [ - 'google_accounts_daemon=google_compute_engine.accounts.accounts_daemon:main', - 'google_clock_skew_daemon=google_compute_engine.clock_skew.clock_skew_daemon:main', - 'google_instance_setup=google_compute_engine.instance_setup.instance_setup:main', - 'google_network_daemon=google_compute_engine.networking.network_daemon:main', - 'google_metadata_script_runner=google_compute_engine.metadata_scripts.script_manager:main', - ], - }, + version='20200113.0', classifiers=[ 'Development Status :: 5 - Production/Stable', - 'Environment :: No Input/Output (Daemon)', 'Intended Audience :: Developers', - 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', @@ -68,7 +55,5 @@ setuptools.setup( 'Programming Language :: Python :: 3.7', 'Topic :: Internet', 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: System :: Installation/Setup', - 'Topic :: System :: Systems Administration', ], ) -- cgit v1.2.1