diff options
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | google_set_hostname.patch | 12 |
3 files changed, 29 insertions, 9 deletions
@@ -1,6 +1,6 @@ pkgbase = google-compute-engine pkgdesc = Linux Guest Environment for Google Compute Engine - pkgver = 20210113.00 + pkgver = 20220211.00 pkgrel = 1 url = https://github.com/GoogleCloudPlatform/guest-configs install = google-compute-engine.install @@ -8,10 +8,11 @@ pkgbase = google-compute-engine license = Apache depends = google-compute-engine-oslogin depends = google-guest-agent - source = google-compute-engine-20210113.00.tar.gz::https://github.com/GoogleCloudPlatform/guest-configs/archive/20210113.00.tar.gz + source = google-compute-engine-20220211.00.tar.gz::https://github.com/GoogleCloudPlatform/guest-configs/archive/20220211.00.tar.gz source = google-compute-engine.install - sha256sums = 4d30fcfa368507f219ecf7e884442e5b556fbaec3f3367dc5c8b116f63be2977 + source = google_set_hostname.patch + sha256sums = eeb95c321a6e73a48e4cb988270b5ce210fb0654951deb153a48ad04dbc74947 sha256sums = 9b31cc5146d83374cc8f8da9f0ce924bbafeb932d0cf0ce60e4aec71d1f981b7 + sha256sums = f54b3bb58e1c4eb0b9d0c7d8f38244dbd1f6b9b9db8fe9880d4562c35eced704 pkgname = google-compute-engine - @@ -16,7 +16,7 @@ # Maintainer: Samuel Littley <samuellittley@google.com> pkgname='google-compute-engine' -pkgver=20210113.00 +pkgver=20220211.00 pkgrel=1 pkgdesc='Linux Guest Environment for Google Compute Engine' arch=('any') @@ -24,13 +24,20 @@ url='https://github.com/GoogleCloudPlatform/guest-configs' license=('Apache') depends=('google-compute-engine-oslogin' 'google-guest-agent') source=("$pkgname-$pkgver.tar.gz::https://github.com/GoogleCloudPlatform/guest-configs/archive/$pkgver.tar.gz" - 'google-compute-engine.install') -sha256sums=('4d30fcfa368507f219ecf7e884442e5b556fbaec3f3367dc5c8b116f63be2977' - '9b31cc5146d83374cc8f8da9f0ce924bbafeb932d0cf0ce60e4aec71d1f981b7') + 'google-compute-engine.install' + 'google_set_hostname.patch') +sha256sums=('eeb95c321a6e73a48e4cb988270b5ce210fb0654951deb153a48ad04dbc74947' + '9b31cc5146d83374cc8f8da9f0ce924bbafeb932d0cf0ce60e4aec71d1f981b7' + 'f54b3bb58e1c4eb0b9d0c7d8f38244dbd1f6b9b9db8fe9880d4562c35eced704') install='google-compute-engine.install' +prepare() { + cd "$srcdir/guest-configs-$pkgver" + patch --strip=1 --input="$srcdir/google_set_hostname.patch" +} + package() { - cd "guest-configs-$pkgver" + cd "$srcdir/guest-configs-$pkgver" install -m644 -Dt "$pkgdir/etc/modprobe.d" src/etc/modprobe.d/* install -m644 -Dt "$pkgdir/etc/sysctl.d" src/etc/sysctl.d/* install -m644 -Dt "$pkgdir/usr/lib/udev/rules.d" src/lib/udev/rules.d/* diff --git a/google_set_hostname.patch b/google_set_hostname.patch new file mode 100644 index 00000000000..a3200e53e22 --- /dev/null +++ b/google_set_hostname.patch @@ -0,0 +1,12 @@ +diff --unified --recursive --text guest-configs-20220211.00.orig/src/usr/bin/google_set_hostname guest-configs-20220211.00/src/usr/bin/google_set_hostname +--- guest-configs-20220211.00.orig/src/usr/bin/google_set_hostname 2021-01-24 16:23:33.145413281 +0000 ++++ guest-configs-20220211.00/src/usr/bin/google_set_hostname 2021-01-24 16:20:26.670408935 +0000 +@@ -43,7 +43,7 @@ + # unqualified domain name. + + if [ -n "$new_host_name" ] && ! echo "$new_host_name" | grep -iq "metadata.google.internal"; then +- hostname "${new_host_name%%.*}" ++ hostnamectl set-hostname "${new_host_name%%.*}" + + # If NetworkManager is installed set the hostname with nmcli. + # to resolve issues with NetworkManager resetting the hostname |