summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Marano <zmarano@google.com>2018-01-25 15:06:06 -0800
committerZach Marano <zmarano@google.com>2018-01-25 15:06:06 -0800
commit3cef8c3ddc355b047c417e2381b2a38ad144b470 (patch)
tree5135f8b6b88233bb921134b62094e8672912d5e7
parent78754ac5ee8c6d68331478bd7e9d9eac539cef92 (diff)
parentd52f1838118239a667e8994249d39ecf4f46e852 (diff)
downloadgoogle-compute-image-packages-3cef8c3ddc355b047c417e2381b2a38ad144b470.tar.gz
Merge branch 'development'20180125
-rw-r--r--debian/changelog6
-rw-r--r--debian/control1
-rw-r--r--google_compute_engine_oslogin/Makefile2
-rw-r--r--google_compute_engine_oslogin/packaging/debian8/changelog6
-rw-r--r--google_compute_engine_oslogin/packaging/debian8/google-compute-engine-oslogin.links2
-rw-r--r--google_compute_engine_oslogin/packaging/debian9/changelog6
-rw-r--r--google_compute_engine_oslogin/packaging/debian9/google-compute-engine-oslogin.links2
-rw-r--r--google_compute_engine_oslogin/packaging/rpmbuild/SPECS/google-compute-engine-oslogin.spec2
-rwxr-xr-xgoogle_compute_engine_oslogin/packaging/setup_deb.sh2
-rwxr-xr-xgoogle_compute_engine_oslogin/packaging/setup_rpm.sh2
-rw-r--r--google_compute_engine_oslogin/utils/oslogin_utils.cc4
-rwxr-xr-xgoogle_config/bin/google_set_hostname25
-rwxr-xr-xsetup.py2
-rw-r--r--specs/google-compute-engine.spec2
-rw-r--r--specs/python-google-compute-engine.spec2
15 files changed, 48 insertions, 18 deletions
diff --git a/debian/changelog b/debian/changelog
index 0a20f07..40dc97b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+google-compute-image-packages (2.7.3-1) stable; urgency=low
+
+ * Improve hostname setting and correctly restart rsyslog.
+
+ -- Google Cloud Team <gc-team@google.com> Thu, 25 Jan 2018 12:00:00 -0700
+
google-compute-image-packages (2.7.2-2) stable; urgency=low
* Force IPv4 for apt.
diff --git a/debian/control b/debian/control
index 75754cf..eb1cf49 100644
--- a/debian/control
+++ b/debian/control
@@ -28,6 +28,7 @@ Depends: google-compute-engine-oslogin,
python-google-compute-engine (= ${source:Version}),
python3-google-compute-engine (= ${source:Version}),
chrony | ntp | time-daemon | systemd,
+ rsyslog,
systemd
Recommends: google-cloud-sdk
Conflicts: google-compute-engine-jessie,
diff --git a/google_compute_engine_oslogin/Makefile b/google_compute_engine_oslogin/Makefile
index f3c14e5..d1313db 100644
--- a/google_compute_engine_oslogin/Makefile
+++ b/google_compute_engine_oslogin/Makefile
@@ -4,7 +4,7 @@ BASENAME = oslogin
NAME = google-compute-engine-$(BASENAME)
MAJOR = 1
MINOR = 1
-REVISION = 2
+REVISION = 3
NSS_LIBRARY_NAME = libnss_$(NAME)-$(MAJOR).$(MINOR).$(REVISION).so
NSS_LIBRARY_SONAME = libnss_$(BASENAME).so.2
diff --git a/google_compute_engine_oslogin/packaging/debian8/changelog b/google_compute_engine_oslogin/packaging/debian8/changelog
index 8532d9b..1d2f06f 100644
--- a/google_compute_engine_oslogin/packaging/debian8/changelog
+++ b/google_compute_engine_oslogin/packaging/debian8/changelog
@@ -1,3 +1,9 @@
+google-compute-engine-oslogin (1.1.3-1+deb8) unstable; urgency=low
+
+ * Change the OS Login uid restriction to allow uid 1000.
+
+ -- Google Cloud Team <gc-team@google.com> Thu, 25 Jan 2018 12:00:00 -0700
+
google-compute-engine-oslogin (1.1.2-1+deb8) unstable; urgency=low
* Fix parsing logic for expiration time on SSH public keys.
diff --git a/google_compute_engine_oslogin/packaging/debian8/google-compute-engine-oslogin.links b/google_compute_engine_oslogin/packaging/debian8/google-compute-engine-oslogin.links
index 8f983d5..aa88a24 100644
--- a/google_compute_engine_oslogin/packaging/debian8/google-compute-engine-oslogin.links
+++ b/google_compute_engine_oslogin/packaging/debian8/google-compute-engine-oslogin.links
@@ -1 +1 @@
-/lib/libnss_google-compute-engine-oslogin-1.1.2.so /lib/libnss_oslogin.so.2
+/lib/libnss_google-compute-engine-oslogin-1.1.3.so /lib/libnss_oslogin.so.2
diff --git a/google_compute_engine_oslogin/packaging/debian9/changelog b/google_compute_engine_oslogin/packaging/debian9/changelog
index de471e8..6a9faa4 100644
--- a/google_compute_engine_oslogin/packaging/debian9/changelog
+++ b/google_compute_engine_oslogin/packaging/debian9/changelog
@@ -1,3 +1,9 @@
+google-compute-engine-oslogin (1.1.3-1+deb9) unstable; urgency=low
+
+ * Change the OS Login uid restriction to allow uid 1000.
+
+ -- Google Cloud Team <gc-team@google.com> Thu, 25 Jan 2018 12:00:00 -0700
+
google-compute-engine-oslogin (1.1.2-1+deb9) unstable; urgency=low
* Fix parsing logic for expiration time on SSH public keys.
diff --git a/google_compute_engine_oslogin/packaging/debian9/google-compute-engine-oslogin.links b/google_compute_engine_oslogin/packaging/debian9/google-compute-engine-oslogin.links
index 8f983d5..aa88a24 100644
--- a/google_compute_engine_oslogin/packaging/debian9/google-compute-engine-oslogin.links
+++ b/google_compute_engine_oslogin/packaging/debian9/google-compute-engine-oslogin.links
@@ -1 +1 @@
-/lib/libnss_google-compute-engine-oslogin-1.1.2.so /lib/libnss_oslogin.so.2
+/lib/libnss_google-compute-engine-oslogin-1.1.3.so /lib/libnss_oslogin.so.2
diff --git a/google_compute_engine_oslogin/packaging/rpmbuild/SPECS/google-compute-engine-oslogin.spec b/google_compute_engine_oslogin/packaging/rpmbuild/SPECS/google-compute-engine-oslogin.spec
index a29b728..0bc9466 100644
--- a/google_compute_engine_oslogin/packaging/rpmbuild/SPECS/google-compute-engine-oslogin.spec
+++ b/google_compute_engine_oslogin/packaging/rpmbuild/SPECS/google-compute-engine-oslogin.spec
@@ -13,7 +13,7 @@
# limitations under the License.
Name: google-compute-engine-oslogin
-Version: 1.1.2
+Version: 1.1.3
Release: 1%{?dist}
Summary: OS Login Functionality for Google Compute Engine
diff --git a/google_compute_engine_oslogin/packaging/setup_deb.sh b/google_compute_engine_oslogin/packaging/setup_deb.sh
index a79d850..771c506 100755
--- a/google_compute_engine_oslogin/packaging/setup_deb.sh
+++ b/google_compute_engine_oslogin/packaging/setup_deb.sh
@@ -20,7 +20,7 @@
# Run from the top of the source directory.
NAME="google-compute-engine-oslogin"
-VERSION="1.1.2"
+VERSION="1.1.3"
working_dir=${PWD}
diff --git a/google_compute_engine_oslogin/packaging/setup_rpm.sh b/google_compute_engine_oslogin/packaging/setup_rpm.sh
index d26427e..94041d2 100755
--- a/google_compute_engine_oslogin/packaging/setup_rpm.sh
+++ b/google_compute_engine_oslogin/packaging/setup_rpm.sh
@@ -20,7 +20,7 @@
# Run from the top of the source directory.
NAME="google-compute-engine-oslogin"
-VERSION="1.1.2"
+VERSION="1.1.3"
working_dir=${PWD}
rpm_working_dir=/tmp/rpmpackage/${NAME}-${VERSION}
diff --git a/google_compute_engine_oslogin/utils/oslogin_utils.cc b/google_compute_engine_oslogin/utils/oslogin_utils.cc
index 8269883..48494d2 100644
--- a/google_compute_engine_oslogin/utils/oslogin_utils.cc
+++ b/google_compute_engine_oslogin/utils/oslogin_utils.cc
@@ -197,8 +197,8 @@ string UrlEncode(const string& param) {
bool ValidatePasswd(struct passwd* result, BufferManager* buf,
int* errnop) {
- // OS Login disallows uids less than or equal to 1000
- if (result->pw_uid <= 1000) {
+ // OS Login disallows uids less than 1000.
+ if (result->pw_uid < 1000) {
*errnop = EINVAL;
return false;
}
diff --git a/google_config/bin/google_set_hostname b/google_config/bin/google_set_hostname
index 64aa091..8cf8fbb 100755
--- a/google_config/bin/google_set_hostname
+++ b/google_config/bin/google_set_hostname
@@ -37,19 +37,30 @@ fi
# unqualified domain name.
if [ -n "$new_host_name" ]; then
- hostname "${new_host_name%%.*}"
+ hostnamectl=$( which hostnamectl 2> /dev/null )
+ if [ -x "$hostnamectl" ]; then
+ $hostnamectl set-hostname "$new_host_name"
+ else
+ # Assume hostname command exists.
+ hostname "${new_host_name%%.*}"
+ fi
# If NetworkManager is installed set the hostname with nmcli.
# to resolve issues with NetworkManager resetting the hostname
# to the FQDN on DHCP renew.
- if [ -x /bin/nmcli ]; then
+ nmcli=$( which nmcli 2> /dev/null )
+ if [ -x "$nmcli" ]; then
nmcli general hostname "${new_host_name%%.*}"
fi
- # Restart syslog to update the hostname if we're not using systemd.
- # systemd rsyslog jobs wait for networking to finish starting and consequently
- # syslog or rsyslog is running with the correct hostname.
- if [ ! -f /bin/systemctl ]; then
- pkill -HUP syslogd
+ # Restart rsyslog to update the hostname.
+ systemctl=$( which systemctl 2> /dev/null )
+ if [ -f /etc/init.d/rsyslog ]; then
+ /etc/init.d/rsyslog restart
+ elif [ -x "$systemctl" ]; then
+ hasrsyslog=$( $systemctl | grep rsyslog | cut -f1 -d' ' )
+ if [ ! -z "$hasrsyslog" ]; then
+ $systemctl -q --no-block restart "$hasrsyslog"
+ fi
fi
fi
diff --git a/setup.py b/setup.py
index 91d7a9d..e347252 100755
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ setuptools.setup(
packages=setuptools.find_packages(),
scripts=glob.glob('scripts/*'),
url='https://github.com/GoogleCloudPlatform/compute-image-packages',
- version='2.7.2',
+ version='2.7.3',
# Entry points create scripts in /usr/bin that call a function.
entry_points={
'console_scripts': [
diff --git a/specs/google-compute-engine.spec b/specs/google-compute-engine.spec
index 5ba516c..bc49915 100644
--- a/specs/google-compute-engine.spec
+++ b/specs/google-compute-engine.spec
@@ -18,7 +18,7 @@
%endif
Name: google-compute-engine
-Version: 2.7.2
+Version: 2.7.3
Release: 1%{?dist}
Summary: Google Compute Engine guest environment.
License: ASL 2.0
diff --git a/specs/python-google-compute-engine.spec b/specs/python-google-compute-engine.spec
index 6d72fbf..145d1c9 100644
--- a/specs/python-google-compute-engine.spec
+++ b/specs/python-google-compute-engine.spec
@@ -18,7 +18,7 @@
%endif
Name: python-google-compute-engine
-Version: 2.7.2
+Version: 2.7.3
Release: 1%{?dist}
Summary: Google Compute Engine python library
License: ASL 2.0