[arch-commits] Commit in rkt/trunk (2 files)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Sat Sep 24 18:45:21 UTC 2016


    Date: Saturday, September 24, 2016 @ 18:45:21
  Author: bpiotrowski
Revision: 190451

upgpkg: rkt 1.15.0-2

backport patch that fixes stage1-host with systemd v231

Added:
  rkt/trunk/rkt-1.15.0-stage1-host-reorder-systemd-nspawn-args.patch
Modified:
  rkt/trunk/PKGBUILD

----------------------------------------------------------+
 PKGBUILD                                                 |   13 +++-
 rkt-1.15.0-stage1-host-reorder-systemd-nspawn-args.patch |   35 +++++++++++++
 2 files changed, 45 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-09-24 16:52:21 UTC (rev 190450)
+++ PKGBUILD	2016-09-24 18:45:21 UTC (rev 190451)
@@ -8,7 +8,7 @@
 
 pkgname=rkt
 pkgver=1.15.0
-pkgrel=1
+pkgrel=2
 pkgdesc="App container runtime"
 arch=('x86_64')
 url="https://github.com/coreos/rkt"
@@ -28,7 +28,8 @@
         coreos_production_pxe_image-$CCN_IMG_RELEASE.cpio.gz::http://alpha.release.core-os.net/amd64-usr/$CCN_IMG_RELEASE/coreos_production_pxe_image.cpio.gz
         coreos_production_pxe_image-$CCN_IMG_RELEASE.cpio.gz.sig::http://alpha.release.core-os.net/amd64-usr/$CCN_IMG_RELEASE/coreos_production_pxe_image.cpio.gz.sig
         https://www.kernel.org/pub/linux/kernel/v4.x/linux-$KERNEL_VERSION.tar.xz
-        rkt.sysusers)
+        rkt.sysusers
+        rkt-1.15.0-stage1-host-reorder-systemd-nspawn-args.patch)
 noextract=(coreos_production_pxe_image.cpio.gz
            linux-$KERNEL_VERSION.tar.xz)
 validpgpkeys=('04127D0BFABEC8871FFB2CCE50E0885593D2DCB4' '48F9B96A2E16137F')
@@ -36,7 +37,8 @@
             '6f08697bea372af916a150f9846110e8855305653e5582b2c2ea04f14253e5c8'
             'SKIP'
             '11faaff6e7546038b868f524cdf42a5a1b67be9fdfd37d931723a8deb1811b72'
-            '2aee4e8547843f4e6c032761b97cb723c1ecd384d508b86f44d16826bc34d6d6')
+            '2aee4e8547843f4e6c032761b97cb723c1ecd384d508b86f44d16826bc34d6d6'
+            '1dc68b38d58858840e99537c9c17f9a9ac087a6b2eb393aa48c79f98d7dcc2ee')
 install="rkt.install"
 
 prepare() {
@@ -44,6 +46,11 @@
   mkdir -p build-rkt-$pkgver/tmp/usr_from_kvm/kernel/
   cd build-rkt-$pkgver/tmp/usr_from_kvm/kernel/
   ln -s "$srcdir"/linux-$KERNEL_VERSION.tar.xz
+
+  # stage1-host fails to start container on systemd 231
+  # https://github.com/coreos/rkt/issues/3215
+  cd "$srcdir/$pkgname-$pkgver"
+  patch -p1 -i "$srcdir"/rkt-1.15.0-stage1-host-reorder-systemd-nspawn-args.patch
 }
 
 build() {

Added: rkt-1.15.0-stage1-host-reorder-systemd-nspawn-args.patch
===================================================================
--- rkt-1.15.0-stage1-host-reorder-systemd-nspawn-args.patch	                        (rev 0)
+++ rkt-1.15.0-stage1-host-reorder-systemd-nspawn-args.patch	2016-09-24 18:45:21 UTC (rev 190451)
@@ -0,0 +1,35 @@
+From 01e2e37dcb9d4c000991fa8be5708e6dab877e0e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lukas=20F=C3=BCrmetz?= <fuermetz at mailbox.org>
+Date: Sat, 17 Sep 2016 11:38:35 +0200
+Subject: [PATCH] stage1/host: reorder systemd-nspawn args
+
+This fixes #3215.
+---
+ stage1/init/init.go | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/stage1/init/init.go b/stage1/init/init.go
+index 62b6103..56255fc 100644
+--- a/stage1/init/init.go
++++ b/stage1/init/init.go
+@@ -392,9 +392,6 @@ func getArgsEnv(p *stage1commontypes.Pod, flavor string, canMachinedRegister boo
+ 		if n != 1 || version < 220 {
+ 			return nil, nil, fmt.Errorf("rkt needs systemd-nspawn >= 220. %s version not supported: %v", hostNspawnBin, versionStr)
+ 		}
+-		if version >= 231 {
+-			args = append(args, "--notify-ready=yes") // From systemd v231
+-		}
+ 
+ 		// Copy systemd, bash, etc. in stage1 at run-time
+ 		if err := installAssets(); err != nil {
+@@ -405,6 +402,10 @@ func getArgsEnv(p *stage1commontypes.Pod, flavor string, canMachinedRegister boo
+ 		args = append(args, "--boot") // Launch systemd in the pod
+ 		args = append(args, fmt.Sprintf("--register=true"))
+ 
++		if version >= 231 {
++			args = append(args, "--notify-ready=yes") // From systemd v231
++		}
++
+ 		if context := os.Getenv(common.EnvSELinuxContext); context != "" {
+ 			args = append(args, fmt.Sprintf("-Z%s", context))
+ 		}



More information about the arch-commits mailing list