From patchwork Sat May 13 08:27:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 761958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wQ0N31285z9s78 for ; Sat, 13 May 2017 18:28:03 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="El+Mb+AJ"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C6C21272B7; Sat, 13 May 2017 08:27:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cDFo6c9fzCxT; Sat, 13 May 2017 08:27:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 445D72522D; Sat, 13 May 2017 08:27:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 24A741C0100 for ; Sat, 13 May 2017 08:27:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 171208970C for ; Sat, 13 May 2017 08:27:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PiYcoZFqU83s for ; Sat, 13 May 2017 08:27:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id BEF1989700 for ; Sat, 13 May 2017 08:27:52 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id g12so9469168wrg.2 for ; Sat, 13 May 2017 01:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=AUGgC2jlMLVvCiAepkspwHZE/ohF/m/VNtBUhR18NgE=; b=El+Mb+AJHgY8u2K5I9zm8t9L+bKBq372lWUVBkgh11ZiW83kDcO4MzAvz+dmk1f1EW ODAoIx2kbnAX8A5jO4s4PkYv251bvlHS5O4IIi9nBnSI4nSJRNcLR8cxL9qgzyrCoVwI 6XPsScW14Wa7+Pgvjro5uJw0/Vv0U9zCOSuAhpcWrcHftB+WAsQBAL7/O0kafb/vkbGf cS+yX6Q2PWPo5hUxAW6D+EEQQXd4ssU3i5UYvXAM40yFAGzqApxyG0iC1XbXPBHv6dhb PN8E/A5Q7XKSMzD9fxo0XEEjnDc8H+/kH7fPgr6hFx0gjNcUEOIUyaiCEYxwgkyMi6+O rsXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=AUGgC2jlMLVvCiAepkspwHZE/ohF/m/VNtBUhR18NgE=; b=aIXSmisUp5XO3VJPx/ddDPilbvOkR4n7cXmKEfcHigrFvG2mSkChBF+n0NY7YD0K1D dnky+gdbhZU6b522CCTiuQgrZIVu05Nd2vvNVXMNWDMiiskSMqUsLmSGkOHbBl6KbHut keaZ6f8fqYJI4qoIHQSBrFXWdQpQbYFQvgJJpEt1JgKKRNtBHGT9WjqnTN3oZZOs74DM vWbnp+IEy7B8PmLMI535nxyC3mDWcbGRfyQQOihmFurnEtsZwq+mnYdrCsZCQ25kluDK v7zeI1yHa8BurAOis4fLGW2Z8icaA4xy+wGVqoELSuSVhrW96CbywLr8eBeng3qCFsYb lP/A== X-Gm-Message-State: AODbwcCJ1Kkm6HGbMYqDhbwx6rebwqkH8hLq2wTzHUTfBpacTvK70Q9H zw8jzOGdphaktg== X-Received: by 10.223.171.208 with SMTP id s74mr5603345wrc.39.1494664071163; Sat, 13 May 2017 01:27:51 -0700 (PDT) Received: from localhost.localdomain (2a01cb0886107300988db00faacf2cc1.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:988d:b00f:aacf:2cc1]) by smtp.gmail.com with ESMTPSA id 53sm7469063wrt.36.2017.05.13.01.27.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 01:27:49 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 13 May 2017 10:27:36 +0200 Message-Id: <20170513082736.22734-1-yann.morin.1998@free.fr> X-Mailer: git-send-email 2.11.0 Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH] package/gpsd: do not interact with systemd on install X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When building on a systemd-based host for a systemd-based target, gpsd's buildsystem will try to tell systemd to reload the its configuration and recreate the entire dependency tree of services. Of course, this can not work when run as a user: >>> gpsd 3.16 Installing to target ==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon === Authentication is required to reload the systemd state. Authenticating as: root Password: In fact, this does not even mean anything in cross-compilation. Fortunately, upstream has already fixed their sin, so we backport it (tweaked to apply onto 3.16). Signed-off-by: "Yann E. MORIN" Cc: Gustavo Zacarias --- Note: this was never observed in any of the autobuilders, even those running on a systemd-based distro, because in this case stdin is redirected and systemctl simply fails, but the construct is just to ignore the failure, so the build proceeds; the issue only occurs when there is an actual terminal to provide user input... :-/ --- ...eract-with-systemctl-when-cross-compiling.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 package/gpsd/0001-do-not-interact-with-systemctl-when-cross-compiling.patch diff --git a/package/gpsd/0001-do-not-interact-with-systemctl-when-cross-compiling.patch b/package/gpsd/0001-do-not-interact-with-systemctl-when-cross-compiling.patch new file mode 100644 index 0000000000..9e91a02ef3 --- /dev/null +++ b/package/gpsd/0001-do-not-interact-with-systemctl-when-cross-compiling.patch @@ -0,0 +1,41 @@ +From 777cb3737ae85b13642fff48eabb601c4d40f527 Mon Sep 17 00:00:00 2001 +From: James Knight +Date: Tue, 16 Feb 2016 23:51:08 -0500 +Subject: [PATCH] do not interact with systemctl when cross-compiling + +The installation process for GPSd on a systemd environment will attempt +to reload systemd's manager configuration (systemctl daemon-reload). +This is to allow the system to take advantage of the newly installed +GPSd services. When cross-compiling, the installation process should not +attempt to interact with the build environment's systemd instance (if +any). The following change checks if the build is not cross compiling +(via 'not env["sysroot"]') before attempting to do a systemd reload. + +Signed-off-by: James Knight +[yann.morin.1998@free.fr: tweak to apply on 3.16] +Signed-off-by: "Yann E. MORIN" +--- + SConstruct | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/SConstruct b/SConstruct +index c3bfd0d1..97c1b3a9 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1909,10 +1909,12 @@ udev_install = Utility('udev-install', 'install', [ + ] + hotplug_wrapper_install) + + if env['systemd']: ++ env.Requires(udev_install, systemd_install) ++ ++if env['systemd'] and not env["sysroot"]: + systemctl_daemon_reload = Utility('systemctl-daemon-reload', '', [ 'systemctl daemon-reload || true']) + env.AlwaysBuild(systemctl_daemon_reload) + env.Precious(systemctl_daemon_reload) +- env.Requires(udev_install, systemd_install) + env.Requires(systemctl_daemon_reload, systemd_install) + env.Requires(udev_install, systemctl_daemon_reload) + +-- +2.11.0 +