From patchwork Sat Oct 26 16:17:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1184750 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="j67YwDPz"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 470mN4178zz9sCJ for ; Sun, 27 Oct 2019 03:17:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 84F26862D2; Sat, 26 Oct 2019 16:17:16 +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 ukV0cb-mRm0H; Sat, 26 Oct 2019 16:17:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 54A5986256; Sat, 26 Oct 2019 16:17:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id E247C1BF3C6 for ; Sat, 26 Oct 2019 16:17:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D590B854E0 for ; Sat, 26 Oct 2019 16:17:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PuhsZZtu4Zzz for ; Sat, 26 Oct 2019 16:17:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) by fraxinus.osuosl.org (Postfix) with ESMTPS id BAB1D84812 for ; Sat, 26 Oct 2019 16:17:10 +0000 (UTC) Received: by mail-qt1-f171.google.com with SMTP id d17so8148153qto.3 for ; Sat, 26 Oct 2019 09:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=9/L9RiH5+9/F8rNsMeO+CbArec6CIzcqSN9EvQpp30U=; b=j67YwDPzg7FLzTkKxomMABatVg9n6VYZaDwd3eTn4zL3NW5i9CGtGbfhlg9yPQ4diP W1xCJJnOGKaEA8gf+sUyI1Y2hBsHjB1EPGt/bPXYXlngtLFv4roSdQu6z7hLGdA5Gz0r ArEwKTF9VAtEs32/6FkqfdYTqfLj5T9ouKxbdurci1hocnvVlOIq03+w9pGIuwBzzv6h 7SeH6qVNgStYhdYEyFZb76NFXueGmBumgqlDlNPYvorrI2IC0nSvY2ar+17mgee85/Iq fsmc+JpqAp964+EMF6WtuVmbd5hfJCDzL/6I85BAP4rkMjK71asF/54giIftnQnTWysV /qmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9/L9RiH5+9/F8rNsMeO+CbArec6CIzcqSN9EvQpp30U=; b=uhArk5y85TO5CuSfr/HPUhyu7avt5torLBZSKSqmG58BEEFZwKdSOHWx1U524o+wNC e+QbTL4RctKJsjcTbiogtrO9nB8pTtZquVHo/QeCX+wJiwvOv9hRnwSyfNH8W62Tn7B7 datJvU1DotKfDtvHljR2s7FelKInF8CLb0+zx2oy4XXwU4gI78dBvVmHaPcbNYlL6N9M /wYpgwlRxbDs0Y00Qz4VcPffxu7Xiaan9Ei/AhhqtcSsHgZ7OV2g3aIxVtwDwDCYXIDL kBuuUQiqrJ5KWWhrRNWS2e5E6OkArXnubPzmdnIFyC3KvkNst78joR5af53Rm6nu1i25 GIXg== X-Gm-Message-State: APjAAAV+LjmjXn8iqh4z4stecy0FEuyR+IH/s78SOV+W6x9v1zCa7zps h7MPN+W0FsAuCkhjwJkh1rWURtthWP0= X-Google-Smtp-Source: APXvYqxGGxMOQFH+N7Nq4GOTV4wEHqGcr03h/BIiw0iK9HOmGsBTVrFbrMcDpJAgOqZn3WNYpR9YiA== X-Received: by 2002:a0c:efc2:: with SMTP id a2mr6910837qvt.44.1572106629308; Sat, 26 Oct 2019 09:17:09 -0700 (PDT) Received: from casantos.casantos.org ([177.134.42.67]) by smtp.gmail.com with ESMTPSA id r2sm3770248qtc.28.2019.10.26.09.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Oct 2019 09:17:08 -0700 (PDT) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sat, 26 Oct 2019 13:17:02 -0300 Message-Id: <20191026161702.8159-1-unixmania@gmail.com> X-Mailer: git-send-email 2.18.1 Subject: [Buildroot] [PATCH v2] package/systemd: create /etc/resolv.conf only if resolvd is selected X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , Michael Nosthoff , "Yann E . MORIN" , Adam Duskett , Maxime Hadjinlian MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos Or else it becomes a dangling link to /run/systemd/resolve/resolv.conf, which is never created. Even worst, it also prevents NewtorkManager from updating resolv.conf. Fixes: https://bugs.busybox.net/show_bug.cgi?id=9881 Signed-off-by: Carlos Santos Reviewed-by: Yann E. MORIN --- CC: Michael Nosthoff --- Changes v1->v2: - Rebase after bump to version 243 --- package/systemd/systemd.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index 5961d98b22..df40961fee 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -354,10 +354,6 @@ define SYSTEMD_INSTALL_SERVICE_NETWORKD ln -sf ../../../../lib/systemd/system/systemd-network-generator.service \ $(TARGET_DIR)/etc/systemd/system/network-pre.target.wants/systemd-network-generator.service endef -define SYSTEMD_INSTALL_RESOLVCONF_HOOK - ln -sf ../run/systemd/resolve/resolv.conf \ - $(TARGET_DIR)/etc/resolv.conf -endef SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP)) ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),) define SYSTEMD_INSTALL_NETWORK_CONFS @@ -371,6 +367,10 @@ SYSTEMD_CONF_OPTS += -Dnetworkd=false endif ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y) +define SYSTEMD_INSTALL_RESOLVCONF_HOOK + ln -sf ../run/systemd/resolve/resolv.conf \ + $(TARGET_DIR)/etc/resolv.conf +endef SYSTEMD_CONF_OPTS += -Dresolve=true SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager define SYSTEMD_INSTALL_SERVICE_RESOLVED