From patchwork Mon Aug 31 01:10:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 1354061 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=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=uZtPU+IL; 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=EsM+g4sq; 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 4Bfscn2H7Yz9sSJ for ; Mon, 31 Aug 2020 11:12:24 +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:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Wya3OInps4ZtVX8i2Nemo+kNUmzie5+X++sXipMvUi4=; b=uZtPU+ILhgNtavLoOmAepabe+f 50Hd7GWYGR5LFfsrLEwd2gpouzqVA5AH33ZNTmr4I9XEssSgCNNcSiSKRfeIB91L21pzH5lfZRvhk ryiBO+lUjKlxlDCQAwp/SDOV2BD8jgnFazKRc5aT0gW2mdbLeuNg2d3Daj530bxVm+D3Pvw2Jmo2i gtLaWQ3Xcl+xnQnSQi5BjK8tUl39M8rn88FKm3H4i/ypOq2DHnFefT5TY2QubXBbk0Ecd3/C2mXMf gTj/sisvI6YwYoq55Usl8G1EgoOykwWEqzXLAreDlkez0+Swy5G7LIAq7ZzhUJm3CeiTViF8e4EfB nAUnN0nQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCYKv-0000q0-E7; Mon, 31 Aug 2020 01:10:17 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCYKs-0000p5-CF for openwrt-devel@lists.openwrt.org; Mon, 31 Aug 2020 01:10:15 +0000 Received: by mail-pf1-x443.google.com with SMTP id k15so3651598pfc.12 for ; Sun, 30 Aug 2020 18:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=PVEyQtJsPNmQi7j1nXx/7JHdkrfG+XxOdZY8paUztYM=; b=EsM+g4sqFVObux2ISx3tU6k18h0ACJJIilRZuMgeUZ/NWrQm8Y1mfdjv4dJ+pkxN/j vgnLmK5INfoQha7mYXZBaxV0GCoIGS7TBAPg5M4R39MixTReYCKeYDPCjtBV0cxoCTt3 FzFHMyo2VQ1LGml30fbSiU5kit9V5l8/KG6BihNWVCDoxl76cUq7GuNgZrpqT1SBvHeV f1U2CPoXjueNlxXeeCuTPKhTuMyXwHySeZgnPlwzegxW5i3V9EDy1/GeqL1cf0dwtPUG RUrfiHuAmR1gTp3eU0T7fFQO0RHnBXbCBU2KKN1YbaJR3FYXYARxMtHUTY1CbbuV2OTF FewQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PVEyQtJsPNmQi7j1nXx/7JHdkrfG+XxOdZY8paUztYM=; b=Jr/oP7ZNy/02UULqEi+dqijqo+jICgOyNOnTKuuY11e6YrnUmevKevOaDmi1wWoO3G sZK3D1NGa1uyBpPdrOhG69ilwLmlZLyWg2g99hfTdw5a+nwrvWX5ZiBmtW6fXG7akkKO DEkRZPnBxSiI3X01c5cD/cHXLJRM0ZJT/sl9tL3IcBcR+zH/4QuHu8gtSvULsb8oDphV +opJZ4cR1RDyTLScZZW3kFyqTzHDkLHl7wgC5al722Gb3qSh/smqcJzdNQg9Ioao56bs sbXrHPR4Z4wMUZ3MUzPBVxgu4Us9QvMTku2qW59G+O549IOc96I4HYHZOQZpInlouUMT a1cg== X-Gm-Message-State: AOAM532/AaYf8EqjvlLjlSLllyGe/j0InZAqeRePOf+MFughFXd0lYkW iddqzyfMlecUjn3EpITzsH6dZx6xg9NiDg== X-Google-Smtp-Source: ABdhPJzooJch65i5DJeLzCNhsb0ff1BkncSHwYjkpKYPiLAh1hwHPB3M/Y1g0Ej4GIZT/oQxCs7AQA== X-Received: by 2002:aa7:9af1:: with SMTP id y17mr7423432pfp.178.1598836211200; Sun, 30 Aug 2020 18:10:11 -0700 (PDT) Received: from localhost.localdomain ([2001:470:1f05:79e::a89]) by smtp.gmail.com with ESMTPSA id r186sm6237052pfr.162.2020.08.30.18.10.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Aug 2020 18:10:10 -0700 (PDT) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Subject: [PATCH 2/2] base-files: use hwclock --systz Date: Sun, 30 Aug 2020 18:10:08 -0700 Message-Id: <20200831011008.795784-2-rosenp@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200831011008.795784-1-rosenp@gmail.com> References: <20200831011008.795784-1-rosenp@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200830_211014_545120_3484ED51 X-CRM114-Status: GOOD ( 15.03 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:443 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rosenp[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The date -k patch is non standard and was removed. Tested behavior to be identical with a simple C program: #define _GNU_SOURCE #include #include #include #include int main() { struct timezone tt; struct timezone tz; int a = syscall(SYS_gettimeofday, NULL, &tt); int b = gettimeofday(NULL, &tz); printf("%d - %d, %d\n", a, tt.tz_minuteswest, tt.tz_dsttime); printf("%d - %d, %d\n", b, tz.tz_minuteswest, tz.tz_dsttime); } Signed-off-by: Rosen Penev --- package/base-files/Makefile | 2 +- package/base-files/files/etc/init.d/system | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 7eb3ac1868..2419849a44 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=227 +PKG_RELEASE:=228 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system index 0e33c522b4..585eeeef7e 100755 --- a/package/base-files/files/etc/init.d/system +++ b/package/base-files/files/etc/init.d/system @@ -27,7 +27,7 @@ system_config() { ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ # apply timezone to kernel - busybox date -k + hwclock --systz } reload_service() {