From patchwork Sat Jun 27 11:18:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: adron@yapic.net X-Patchwork-Id: 1318301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=yapic.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=3lTuQZHM; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=TX+mP6he; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=yapic.net header.i=@yapic.net header.a=rsa-sha256 header.s=mailserv header.b=GmPIaG4c; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49vBBx5TXdz9sQt for ; Sat, 27 Jun 2020 21:20:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=brBF0qZ4p/tmLF2b9IPBzLa0y3pXlhh6tf4vlXlXezo=; b=3lTuQZHMiWPpeTvAVhVG0lw/f1 FAyqW6CKfDGYtRTn6s9376OH7rv2aaOHHwJUzDGe2k5LWRDIDuCd8P+dzJJWUOjnZl+IKk4QZ37Xp FMYV8hwtrr+nFfIIs3/d+TfWL59EcFEuZv0NThqAau3kOzytlimp5aFcKAZQ+iqYUlYFGYZBdcH/2 LXBT64trRrxI9pXy2An/Xb17v4ANe4qGUngxuoBjk4eRchnPfRRsyn7jytPzaNP4AR0l/ESSRPcV8 9PP5K/gCRQsqNja0BrAoMTlDxzaKUidhtIRg5lu9nuZu+OSLUcUuo+0GGij2DkKUCwfYKMf6iilOu ugJkgU1w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jp8r7-0006TM-EM; Sat, 27 Jun 2020 11:18:45 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jp8r4-0006TD-TS for openwrt-devel@merlin.infradead.org; Sat, 27 Jun 2020 11:18:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=p/WPkL/d+orauZGv66X3/zg6HJcwcEaniz6T61c4c5g=; b=TX+mP6heKLvbyrL/uLeh72Tqr2 kDJJJdK/3VBOKP7m1C1Is6cjOnsRjl8ZArI6NJscn0QGinXSfNwCFJaWbxrVo29QgD///hn99Yqjw qpCRNQY9duAvIRxags87HsUPa1eN3w3MhZ7nHJv6lwLNdvXQraFJts3NaRap8aTE05yBulLQ1AH9X ulnU9OI8vd3gkk9uFbJ8Z7y7c0IyZlhHBi1+/7wXxvP+aThCDED5jSOHiWi6XjncEVr1ZtqMjY22Z mqpuwFWEr5Xln8oWSZjkvhClkS+oTAXGX+gM0aAideXrmm6PzEKn+ASUQjAKD3HDj/9OSRhl7O9uh B0jDUEtA==; Received: from mailserv.mstnt.com ([45.76.93.112]) by casper.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jp8qx-0005wO-Nw for openwrt-devel@lists.openwrt.org; Sat, 27 Jun 2020 11:18:38 +0000 Received: from adron-nout.yapic.net (78-56-202-215.static.zebra.lt [78.56.202.215]) by mailserv.mstnt.com (Postfix) with ESMTPSA id 5ECDC3F068; Sat, 27 Jun 2020 14:18:26 +0300 (EEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailserv.mstnt.com 5ECDC3F068 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yapic.net; s=mailserv; t=1593256706; bh=p/WPkL/d+orauZGv66X3/zg6HJcwcEaniz6T61c4c5g=; h=From:To:Cc:Subject:Date:From; b=GmPIaG4c/OmQ0NoLrMFZWsyfe4RM8oe4UBkJfDrjvQxmrEphXbUdlC0lcpzS3+txu 11rr2gcnmuPoEg9iLkQfq4pXMQRDp43zP27skDq3+60+r+7Eaxf6zJUVYprsLpvyhU /cw3i8EoZqBvuSNQrKqO3g0XgOC+LmyA5owV/DYwWnchgxNpPblIcWwqNIZduUBEoI d/IZg1tiWKStJznoP7sx4KDCRkrYFd1W8tkytxrSexzaR1sQn7dHz/SUW/e8HTCBit Pn5PgtnUMwJiHOiKj8Nsj/sASHw90lm9aEnF4kh7iklsfsnOUzlSpAkQw0cmLav8/M zNPdpfErtreyQ== Received: from root by adron-nout.yapic.net with local (Exim 4.86_2) (envelope-from ) id 1jp8qn-0004xG-V0; Sat, 27 Jun 2020 14:18:25 +0300 From: adron@yapic.net To: openwrt-devel@lists.openwrt.org Subject: package: procd: Bug fix for case when kernel cmdline="console=null". In this case, the message is displayed in procd log: failed to set stdio: No such device and the working directory for the procd remains /dev ! chdir("/dev") is done in set_stdio(). And this, in turn, is already breaking the sysupgrade mechanism. chroot(".") is already performed not in the "/" but in the "/dev" and the sysupgrade process fails. Date: Sat, 27 Jun 2020 14:18:25 +0300 Message-Id: <1593256705-19008-1-git-send-email-adron@yapic.net> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200627_121836_138701_70885148 X-CRM114-Status: GOOD ( 11.50 ) X-Spam-Score: -2.1 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sergey Sergeev MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Sergey Sergeev Signed-off-by: Sergey Sergeev --- package/system/procd/patches/001-fix_null_console_bug.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 package/system/procd/patches/001-fix_null_console_bug.patch diff --git a/package/system/procd/patches/001-fix_null_console_bug.patch b/package/system/procd/patches/001-fix_null_console_bug.patch new file mode 100644 index 0000000..d1e53b7 --- /dev/null +++ b/package/system/procd/patches/001-fix_null_console_bug.patch @@ -0,0 +1,12 @@ +diff -rNu a/state.c b/state.c +--- a/state.c 2018-03-28 12:29:49.000000000 +0300 ++++ b/state.c 2020-06-26 18:52:27.098719261 +0300 +@@ -108,7 +108,7 @@ + case STATE_UBUS: + // try to reopen incase the wdt was not available before coldplug + watchdog_init(0); +- set_stdio("console"); ++ set_console(); + LOG("- ubus -\n"); + procd_connect_ubus(); + service_start_early("ubus", ubus_cmd);