From patchwork Mon Nov 9 23:07:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1397172 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.136; helo=silver.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.a=rsa-sha256 header.s=20161025 header.b=V2uW4vH9; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CVRVP6zV7z9sPB for ; Tue, 10 Nov 2020 10:07:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C9AC3220C1; Mon, 9 Nov 2020 23:07:53 +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 Bt9det0aJYkA; Mon, 9 Nov 2020 23:07:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id EA17C20457; Mon, 9 Nov 2020 23:07:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B6E951BF3CC for ; Mon, 9 Nov 2020 23:07:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8441120457 for ; Mon, 9 Nov 2020 23:07:51 +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 m32nIkXCL68C for ; Mon, 9 Nov 2020 23:07:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by silver.osuosl.org (Postfix) with ESMTPS id 6FB7120453 for ; Mon, 9 Nov 2020 23:07:50 +0000 (UTC) Received: by mail-wr1-f49.google.com with SMTP id w1so10647238wrm.4 for ; Mon, 09 Nov 2020 15:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hnPEwU7T8/VDVSTrJygJKWDJLqsKDSAkv6mgz3kRXfo=; b=V2uW4vH9tHd/tBAAD0DRMHs46cQAvqg3as3qUNkRSJDQMxg+z5ev6qAAh43dOmxbXu 0GRMkz9mt4CW5y4xME4c31WuZHIudgL50lmEi2BU8XgYWBufuyqhFtVrOSTB/+S+1Qkf 20byFoL8R27KZdG9q2OAwBju3zT/Lcd75Swe4QXza3jVomNqY95CAWhvGFa+gqvmUSnR r+oR4Q25heE9XSkCfFfj3PckejleBQM4FMD5eYAca6sVz9vGce4yYsmAuf8tfzFrSsFc YxXPo1t5Ya4uGhR25NkXfUsMxybbQShhKlCmFG1kiAEDNjk12gwieG5CC4JbLg+XuYJP 5FsQ== 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:mime-version :content-transfer-encoding; bh=hnPEwU7T8/VDVSTrJygJKWDJLqsKDSAkv6mgz3kRXfo=; b=MXGMptTBp94F4QqbiRLCuJyeOJylVN92RNqH43qVcXxa/0HGN8ce0ORE0/PECupN63 3MxPKESb6EqxxUrmTB/zHNsApjvXiDwP0qHJf4h2k2Eaz9kAZktAN5k10hZk3g0IERUB N49oriPUkIeqsiKUkf02xyW4lX6EVbl+yFSNEPRGfm2VQckxu7DNn3BUjnWP/0eDXc6i 7ra4P3r6REviGub0NkosW6t3rLwCvjAkcrsJecHoaY+mHxZnHgCW7pptX+qvqZwMh6eb Fydi/pscCMu22LwAF9jB2/pvnyPd2DHAA6jN0J3YoITWs69yuwQQvJQvjfhq4VvquRr5 JKTA== X-Gm-Message-State: AOAM5315yaUla4s6iNVBIX/YJ6t1G3q4cp72Cl/MP07IseeRyxZUyTms MVs9r4+hT/oapG1XvH64wfwxrtkbAkM= X-Google-Smtp-Source: ABdhPJzUtt8+6l5/3951zEfbzYIgpMccM/j/i3I+sPc95YcA2RExvY3q1AB0ztpJUOeRhFzYthxAeA== X-Received: by 2002:adf:e3c9:: with SMTP id k9mr20572688wrm.275.1604963268653; Mon, 09 Nov 2020 15:07:48 -0800 (PST) Received: from localhost.localdomain (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id r18sm16174690wrj.50.2020.11.09.15.07.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 15:07:48 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Tue, 10 Nov 2020 00:07:44 +0100 Message-Id: <20201109230744.1034392-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/systemd: fix update-done service for read-only filesystem 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: Romain Naour Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Backport an upstream patch to fix a regresion introduced in 246.5 by [1]. [1] https://github.com/systemd/systemd-stable/commit/8019995e9af9c6d7b5985198cedccd24eda3e26e Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/830981805 Signed-off-by: Romain Naour --- ...o-not-fail-with-read-only-etc-or-var.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/systemd/0001-update-done-Do-not-fail-with-read-only-etc-or-var.patch diff --git a/package/systemd/0001-update-done-Do-not-fail-with-read-only-etc-or-var.patch b/package/systemd/0001-update-done-Do-not-fail-with-read-only-etc-or-var.patch new file mode 100644 index 0000000000..01e7f1e906 --- /dev/null +++ b/package/systemd/0001-update-done-Do-not-fail-with-read-only-etc-or-var.patch @@ -0,0 +1,34 @@ +From e2a23672a1bbf4d3411dce0289051b5a72bd4a67 Mon Sep 17 00:00:00 2001 +From: Felix Riemann +Date: Mon, 19 Oct 2020 18:54:53 +0200 +Subject: [PATCH] update-done: Do not fail with read-only /etc or /var + +With the switch from log_debug() to log_debug_errno() in commit c413bb28df +systemd-update-done would fail without any error message if /etc +or /var were read-only. This restores the previous behaviour to +silently ignore these directories again. + +[Romain: backport from 1eee15c3885fcc9f6a40df7e42347cb8fca71280] +Signed-off-by: Romain Naour +--- + src/update-done/update-done.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/update-done/update-done.c b/src/update-done/update-done.c +index e9d589e0e5..92c348d83b 100644 +--- a/src/update-done/update-done.c ++++ b/src/update-done/update-done.c +@@ -31,8 +31,8 @@ static int apply_timestamp(const char *path, struct timespec *ts) { + + r = write_string_file_atomic_label_ts(path, message, ts); + if (r == -EROFS) +- return log_debug_errno(r, "Cannot create \"%s\", file system is read-only.", path); +- if (r < 0) ++ log_debug_errno(r, "Cannot create \"%s\", file system is read-only.", path); ++ else if (r < 0) + return log_error_errno(r, "Failed to write \"%s\": %m", path); + return 0; + } +-- +2.25.4 +