From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 21 16:59:48 2023 Received: (at submit) by debbugs.gnu.org; 21 Apr 2023 20:59:48 +0000 Received: from localhost ([127.0.0.1]:41282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppxr9-000571-MN for submit@debbugs.gnu.org; Fri, 21 Apr 2023 16:59:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:50638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppxr7-00056t-Tq for submit@debbugs.gnu.org; Fri, 21 Apr 2023 16:59:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppxr7-0003hw-Hy for guix-patches@gnu.org; Fri, 21 Apr 2023 16:59:45 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppxr5-00060b-T7 for guix-patches@gnu.org; Fri, 21 Apr 2023 16:59:45 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 53BA65C00C6; Fri, 21 Apr 2023 16:59:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 21 Apr 2023 16:59:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=mesmtp; t=1682110783; x=1682197183; bh=CYy8EzPi2j0ltGAsNRgjMI CpB//+mOSEl8Q56WDgCVI=; b=Myq9jQYyD57DY5+1/pSsHZF1BeXfbGgF3WyNEG 2olCF/RNPiRDY9KnBbFFB9gASMYNDNKK5xs65VwV1PIP/S6Ny5zVhZ2kNn2e/WsG XEEDeGv6QtY0b0JrDidepq2UAWDIq523G1FD21W5/JXzWrPmfYyN3EpPBdQC1Wep on95I= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1682110783; x=1682197183; bh=CYy8EzPi2j0ltGAsNRgjMICpB//+mOSEl8Q 56WDgCVI=; b=VAhi2UuA1ycUD7s9uAIbDatUCM2XdBlC6z37fsCMe5Knkrapmrj qiMZ1fL5EXTdEcj5Nu0CGfoJSz+pDENUiU+Sgjl9WM33+OeMSDLR4uZPaVBze834 /nBc5Ou/Xgw12GeYtzWNe9q7lXyPyP9tAgT7H3b9Zxhg+skU2YBlHWEJJ6qiYiae R/tWgjG3mOMROkGbGNPSvjyswau65k3BO0exkfEMuwnUTkAZXu9D7x3K2IooI1gg IZX7LpMl5n5+ofcj7xkeCkPfV7lv37v2/hsPyL4K7wgr+29/5mSlolx2gcn6JoLL z+ZhfY6pthxhKTQ+9zk6sw7AxZNfawwOs1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtgedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggusehttdertd dttddvnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr ihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeejudeggedufeeltefhtdejjeevtdffhf etueeftdffvdehhffgudfgieeikedvfeenucffohhmrghinhepghhithhhuhgsrdgtohhm pdhfvgguohhrrghprhhojhgvtghtrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Feedback-ID: i819c4023:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 21 Apr 2023 16:59:43 -0400 (EDT) Date: Fri, 21 Apr 2023 16:59:41 -0400 From: Leo Famulari To: guix-patches@gnu.org Subject: Time zone database improvements Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=66.111.4.29; envelope-from=leo@famulari.name; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Currently, almost the entire distro is rebuilt when we need to update the time zone database, tzdata. We need to do this a few times a year, and it doesn't make any sense for packages to keep a static reference to this database which will be out of date in a few months. Instead, they should look up the time zones at run-time, which most programs that actually use time zones do. These patches start improving the situation. Libical has committed a fix for this almost 5 years ago, but still hasn't released it, so we cherry-pick Nix's patch: https://github.com/libical/libical/issues/350 Go wants to embed a copy of the database in case one cannot be found. I don't see why having an incorrect time zone is better than no time zones, so here's a patch to remove the embedded copy. And after those two changes, we are able to update tzdata to the current version. We have more work to do to remove or replace python-pytz, which unfortunately contains its own embedded copy of the database and a few thousand dependents. Luckily, it seems that Python 3.9 has made pytz obsolete: https://fedoraproject.org/wiki/Changes/DeprecatePytz#Deprecate_pytz And there are still some small reverse dependency graphs of packages that mistakenly depend on tzdata. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 21 17:01:14 2023 Received: (at 63006) by debbugs.gnu.org; 21 Apr 2023 21:01:14 +0000 Received: from localhost ([127.0.0.1]:41293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppxsY-0005C0-7d for submit@debbugs.gnu.org; Fri, 21 Apr 2023 17:01:14 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:52935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppxsW-0005Ba-26 for 63006@debbugs.gnu.org; Fri, 21 Apr 2023 17:01:12 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 06F675C0164; Fri, 21 Apr 2023 17:01:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 21 Apr 2023 17:01:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=mesmtp; t=1682110867; x=1682197267; bh=Xm4/29E ovpBlk8ZWeei1ZGyLkj+qW9UPQzS8TMlies0=; b=SMyz9QmGSIOT3277NP5WqbP wjo7SrtVzMJXhJYPz1/JeWLAeOqiBlUiz4enMygxXwR0gyNomzwlB5T8MGVqLGke WUI2RsMvYoV2GphafmPZNgHClgIJ3jcuveupRbj4bDgeM9mb+lFSrLNe9fXbOL3B wngrCzFIY+SCLthTuWGg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1682110867; x=1682197267; bh=Xm4/29EovpBlk8ZWeei1ZGyLkj+q W9UPQzS8TMlies0=; b=MuFhiJ6/9wWhlFKLX60AG1MHNAKzHoTxvL6p9K/VxAfT 0t1CCKQjvVQN/1mJNIb3CdxU4zY75D51S+wKwCMeIZQZ7iw+Pa6wBZPB3X0TWlXg aN6hC0zYol76+HHmoxemhDvltPEdacsPSc0uOOCyfslQQCU6ZVnDE5Cf+mpQwagz HR6YhCKPo2au43iXT9UKl7Y+ayBFRVObTgMPcnX7CR299yfuXmsnRWrLVJytN5jl SOmPgAq+MK2eoH0UsLeH7d32MPJM28DmVEQJ9jrZ+f7wmxDr/lN6iDm3LZqrkZ/k rhpH+dfJNTkNE/IEd8q9YqQLkH/3hXoK8/T7G3Jk+w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtgedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr ihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeegveeftdeggfevgefghfefudelgfduie dtkefhgeegveehfeejheeuffefheevieenucffohhmrghinhepghhithhhuhgsrdgtohhm necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgvoh esfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Feedback-ID: i819c4023:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <63006@debbugs.gnu.org>; Fri, 21 Apr 2023 17:01:06 -0400 (EDT) From: Leo Famulari To: 63006@debbugs.gnu.org Subject: [PATCH 1/3] gnu: libical: Find the time zone database in the environment. Date: Fri, 21 Apr 2023 17:01:00 -0400 Message-Id: <724078bec9b692f2d0e3fae4a03a23ef96d94ee5.1682110862.git.leo@famulari.name> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 63006 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/patches/libical-respect-tzdir.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/calendar.scm (libical)[source]: Use it. [inputs]: Remove tzdata. --- gnu/local.mk | 1 + gnu/packages/calendar.scm | 3 +- .../patches/libical-respect-tzdir.patch | 38 +++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libical-respect-tzdir.patch diff --git a/gnu/local.mk b/gnu/local.mk index b631fa6d5a..f301c33cfa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1393,6 +1393,7 @@ dist_patch_DATA = \ %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ %D%/packages/patches/libffi-float128-powerpc64le.patch \ %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch \ + %D%/packages/patches/libical-respect-tzdir.patch \ %D%/packages/patches/libobjc2-unbundle-robin-map.patch \ %D%/packages/patches/librime-fix-build-with-gcc10.patch \ %D%/packages/patches/libvirt-add-install-prefix.patch \ diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm index cf4286100d..030f9c52e7 100644 --- a/gnu/packages/calendar.scm +++ b/gnu/packages/calendar.scm @@ -127,6 +127,7 @@ (define-public libical (uri (string-append "https://github.com/libical/libical/releases/download/v" version "/libical-" version ".tar.gz")) + (patches (search-patches "libical-respect-tzdir.patch")) (sha256 (base32 "0cqc1wpalxmxjx8dmcaga9w8kd5l7944hqmidz43hifaf7fhaixl")))) @@ -166,7 +167,7 @@ (define-public libical pkg-config vala)) (inputs - (list glib libxml2 tzdata)) + (list glib libxml2)) (propagated-inputs ;; In Requires.private of libical.pc. (list icu4c)) diff --git a/gnu/packages/patches/libical-respect-tzdir.patch b/gnu/packages/patches/libical-respect-tzdir.patch new file mode 100644 index 0000000000..f749addf44 --- /dev/null +++ b/gnu/packages/patches/libical-respect-tzdir.patch @@ -0,0 +1,38 @@ +Copied from Nix: + +https://github.com/NixOS/nixpkgs/blob/0336bd874374a9e33947ace8a289e5c785e44a19/pkgs/development/libraries/libical/respect-env-tzdir.patch + +This functionality will be available in libical 3.1.0, whenever that is +released: + +https://github.com/libical/libical/issues/350 + +--- a/src/libical/icaltz-util.c ++++ b/src/libical/icaltz-util.c +@@ -94,9 +94,9 @@ + static const char *zdir = NULL; + + static const char *search_paths[] = { ++ "/etc/zoneinfo", + "/usr/share/zoneinfo", + "/usr/lib/zoneinfo", +- "/etc/zoneinfo", + "/usr/share/lib/zoneinfo" + }; + +@@ -178,6 +178,15 @@ + const char *fname = ZONES_TAB_SYSTEM_FILENAME; + size_t i, num_search_paths; + ++ const char *env_tzdir = getenv ("TZDIR"); ++ if (env_tzdir) { ++ sprintf (file_path, "%s/%s", env_tzdir, fname); ++ if (!access (file_path, F_OK|R_OK)) { ++ zdir = env_tzdir; ++ return; ++ } ++ } ++ + num_search_paths = sizeof(search_paths) / sizeof(search_paths[0]); + for (i = 0; i < num_search_paths; i++) { + snprintf(file_path, MAXPATHLEN, "%s/%s", search_paths[i], fname); -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 21 17:01:15 2023 Received: (at 63006) by debbugs.gnu.org; 21 Apr 2023 21:01:15 +0000 Received: from localhost ([127.0.0.1]:41295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppxsY-0005C6-M4 for submit@debbugs.gnu.org; Fri, 21 Apr 2023 17:01:15 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:48529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppxsW-0005Bc-FP for 63006@debbugs.gnu.org; Fri, 21 Apr 2023 17:01:12 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 60ECA5C00B0; Fri, 21 Apr 2023 17:01:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 21 Apr 2023 17:01:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=mesmtp; t=1682110867; x=1682197267; bh=X+mBpuOF+VaMrwcoNGrbb/gdUnjhEAAa+8SEEXqYn0I=; b= W+EJK+wJad3+rDKaTnCHvqEqXmbTcRJA23ql+TiTHfUd6peej4s1QQbzHXjFNVH1 0HgTHPlL5Gp6x/Pei6OI9oekT4EYFtqnKPG92YsVzaEbEcKsaZoBy1oKTHJNeQhB 3D+shpfmQ679f3Aao/7iReVhAsVBhrq2n3af1Oaurws= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1682110867; x=1682197267; bh=X +mBpuOF+VaMrwcoNGrbb/gdUnjhEAAa+8SEEXqYn0I=; b=Girfu+5QY2FZ8MTzQ 9eC4xGh959K2Avh7uH1EwONTIM7PpnRTOxWtEpqEhuvOYEkKuY5tsO1sZ7i/UFSe CejqG/wJ1giQZXHbxYHh6oh830tpfaaihL3n8iupOPx71HT/+3ge4suctsljxeb1 kROYfP5faA5/z+dUDVbPUzTsLqOMitYsYkbzE1bZxFJf6uk570C0ljs9Q/KMXFxx neV6Udg8ZweOb9eyC3aFchMMdcOQp2PI3oyJ64XVuBXOP2Y1aU68wcB7/7yaK9Xs yuByjp1nOLPpx/nn7ZWN4aH/Go3ZQ9eg0FGmyjKZgts1ZIIz2uZtbL4QaVy2xtgN OoGew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtgedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhl rghrihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeekjeejheekgfetieevuedtuedtvd efieduveettdeiteehgefffeeufedtfeeiveenucffohhmrghinheplhguqdhlihhnuhig rdhnvghtpdhsohdrnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Feedback-ID: i819c4023:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <63006@debbugs.gnu.org>; Fri, 21 Apr 2023 17:01:07 -0400 (EDT) From: Leo Famulari To: 63006@debbugs.gnu.org Subject: [PATCH 2/3] gnu: Go: Do not depend on tzdata. Date: Fri, 21 Apr 2023 17:01:01 -0400 Message-Id: <4e15e1076c425b3e8e924edfc8adf61cba0df036.1682110862.git.leo@famulari.name> X-Mailer: git-send-email 2.39.2 In-Reply-To: <724078bec9b692f2d0e3fae4a03a23ef96d94ee5.1682110862.git.leo@famulari.name> References: <724078bec9b692f2d0e3fae4a03a23ef96d94ee5.1682110862.git.leo@famulari.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 63006 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/golang.scm (go-1.4)[inputs]: Remove tzdata. [arguments]: Adjust accordingly. (go-1.14, go-1.16, go-1.17)[arguments]: Adjust accordingly. --- gnu/packages/golang.scm | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 24dae34e20..73c70f55fb 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -139,8 +139,6 @@ (define-public go-1.4 (ld (string-append (assoc-ref inputs "libc") "/lib")) (loader (car (find-files ld "^ld-linux.+"))) (net-base (assoc-ref inputs "net-base")) - (tzdata-path - (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")) (output (assoc-ref outputs "out"))) ;; Removing net/ tests, which fail when attempting to access @@ -195,8 +193,6 @@ (define-public go-1.4 (substitute* "net/lookup_unix.go" (("/etc/protocols") (string-append net-base "/etc/protocols"))) - (substitute* "time/zoneinfo_unix.go" - (("/usr/share/zoneinfo/") tzdata-path)) (substitute* (find-files "cmd" "asm.c") (("/lib/ld-linux.*\\.so\\.[0-9]") loader)) #t))) @@ -238,8 +234,7 @@ (define-public go-1.4 (copy-recursively "../" output) #t)))))) (inputs - `(("tzdata" ,tzdata) - ("pcre" ,pcre) + `(("pcre" ,pcre) ("gcc:lib" ,(canonical-package gcc) "lib"))) (native-inputs (list pkg-config which net-base perl)) @@ -285,8 +280,6 @@ (define-public go-1.14 (loader (car (append (find-files ld "^ld-linux.+") (find-files ld "^ld(64)?\\.so.+")))) (net-base (assoc-ref inputs "net-base")) - (tzdata-path - (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")) (output (assoc-ref outputs "out"))) ;; Having the patch in the 'patches' field of breaks @@ -400,8 +393,6 @@ (define-public go-1.14 (("/etc/protocols") (string-append net-base "/etc/protocols"))) (substitute* "net/port_unix.go" (("/etc/services") (string-append net-base "/etc/services"))) - (substitute* "time/zoneinfo_unix.go" - (("/usr/share/zoneinfo/") tzdata-path)) (substitute* (find-files "cmd" "\\.go") (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader)) #t))) @@ -497,9 +488,7 @@ (define-public go-1.16 (replace 'prebuild (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")) - (net-base (assoc-ref inputs "net-base")) - (tzdata-path - (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))) + (net-base (assoc-ref inputs "net-base"))) ;; Having the patch in the 'patches' field of breaks ;; the 'TestServeContent' test due to the fact that @@ -591,9 +580,7 @@ (define-public go-1.16 (substitute* "net/lookup_unix.go" (("/etc/protocols") (string-append net-base "/etc/protocols"))) (substitute* "net/port_unix.go" - (("/etc/services") (string-append net-base "/etc/services"))) - (substitute* "time/zoneinfo_unix.go" - (("/usr/share/zoneinfo/") tzdata-path))))) + (("/etc/services") (string-append net-base "/etc/services")))))) (replace 'build (lambda* (#:key inputs outputs (parallel-build? #t) #:allow-other-keys) @@ -665,9 +652,7 @@ (define-public go-1.17 (setenv "GOCACHE" "/tmp/go-cache")))) (add-after 'unpack 'patch-source (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((net-base (assoc-ref inputs "net-base")) - (tzdata-path (string-append (assoc-ref inputs "tzdata") - "/share/zoneinfo"))) + (let* ((net-base (assoc-ref inputs "net-base"))) ;; XXX: Remove when #49729 is merged? (for-each make-file-writable (find-files "src")) @@ -696,9 +681,7 @@ (define-public go-1.17 (string-append net-base "/etc/protocols"))) (substitute* "src/net/port_unix.go" (("/etc/services") - (string-append net-base "/etc/services"))) - (substitute* "src/time/zoneinfo_unix.go" - (("/usr/share/zoneinfo/") tzdata-path))))) + (string-append net-base "/etc/services")))))) ;; Keep this synchronized with the package inputs. ;; Also keep syncthonized with later versions of go. ,@(if (or (target-arm?) (target-ppc64le?)) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 21 17:01:19 2023 Received: (at 63006) by debbugs.gnu.org; 21 Apr 2023 21:01:19 +0000 Received: from localhost ([127.0.0.1]:41297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppxsd-0005CK-5O for submit@debbugs.gnu.org; Fri, 21 Apr 2023 17:01:19 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:60963) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppxsW-0005Bd-Sy for 63006@debbugs.gnu.org; Fri, 21 Apr 2023 17:01:13 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D1FC05C00C6; Fri, 21 Apr 2023 17:01:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 21 Apr 2023 17:01:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=mesmtp; t=1682110867; x=1682197267; bh=EOITUZmCni8HSoAobcO6VpSiRxYi/Vw0HMUO9nva/+c=; b= Any/mSjMtFov5R3UBcuboaUuqlZPpgF6F3W0EQE8LVoomMO+JPQw9n0301RXbH+Z ja7VoRejFGwWrl0KRjxesMZUwr9YsSk8gaIUX6phQNboY8Lfwc4tblFyBRWVKsh7 +807g2SSV3/atDA65LcpbpzDvXzlVN1aIp0i5DDKaTY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1682110867; x=1682197267; bh=E OITUZmCni8HSoAobcO6VpSiRxYi/Vw0HMUO9nva/+c=; b=LHFy7ogJQyHh5Q329 cGxvyQ/080HmTIBtSkH0BjjPk9JKALzUD/uGuCkGy+ATewSZqCgFmKhl9RNCNjb+ wX0Ew4XOhWMyM58RldpBOlvJhR6Aclzbv2JZfl5Ll3rNFDPsk+ZO+qI6OMqA60LA YnAfwTvAzxBj5CV0N+xbkyZLLSc90R+yCe7YA9lnlXhRsTTo4o1sP77YybyktUCE e+rvdeYuuC7L2UFSTZss8Ft2TtkynVq+BH+dRV+Had9pw3lt7Fiqi3Ca/Ea8R07z anbyh1p26OsDqi7KiUHfF5vqO7D6auXjNTPBmTO6iNKtrqBlvKylMx6ZZwp7SXi3 K63Wg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtgedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhl rghrihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeeljefgtedtkeetveeifefhfffhtd evvdevtdektdfgueduveeuueehfeehudegleenucffohhmrghinhepihgrnhgrrdhorhhg pdhphihthhhonhhhohhsthgvugdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Feedback-ID: i819c4023:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <63006@debbugs.gnu.org>; Fri, 21 Apr 2023 17:01:07 -0400 (EDT) From: Leo Famulari To: 63006@debbugs.gnu.org Subject: [PATCH 3/3] gnu: tzdata: Update to 2023c. Date: Fri, 21 Apr 2023 17:01:02 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: <724078bec9b692f2d0e3fae4a03a23ef96d94ee5.1682110862.git.leo@famulari.name> References: <724078bec9b692f2d0e3fae4a03a23ef96d94ee5.1682110862.git.leo@famulari.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 63006 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/base.scm (tzdata): Update to 2023c. (tzdata-for-tests): Pin at version 2022a and hide. * gnu/packages/time.scm (python-pytz): Update to 2023.3. --- gnu/packages/base.scm | 19 +++++++++++++++---- gnu/packages/time.scm | 4 ++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index fa5f1ef32b..2aef52ddfe 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1358,7 +1358,7 @@ (define-public tzdata (name "tzdata") ;; This package should be kept in sync with python-pytz in (gnu packages ;; time). - (version "2022a") + (version "2023c") (source (origin (method url-fetch) (uri (string-append @@ -1366,7 +1366,7 @@ (define-public tzdata version ".tar.gz")) (sha256 (base32 - "0r0nhwpk9nyxj5kkvjy58nr5d85568m04dcb69c4y3zmykczyzzg")))) + "0p4nvp5bdxxdqh269nvvcfrpycbbfwm31al5whwbpsaa3dfhnl9z")))) (build-system gnu-build-system) (arguments (list #:tests? #f @@ -1434,7 +1434,7 @@ (define-public tzdata version ".tar.gz")) (sha256 (base32 - "1iysv8fdkm79k8wh8jizmjmq075q4qjhk090vxjy57my6dz5wmzq"))))) + "1rqln88ki0jagi372nqyn7bs03rf2l33081sy2835mwsn4mpzla6"))))) (home-page "https://www.iana.org/time-zones") (synopsis "Database of current and historical time zones") (description "The Time Zone Database (often called tz or zoneinfo) @@ -1452,7 +1452,18 @@ (define-public tzdata ;;; ;;; Please make this a hidden-package if it is different from the primary tzdata ;;; package. -(define-public tzdata-for-tests tzdata) +(define-public tzdata-for-tests ; TODO rename to tzdata/pinned + (hidden-package + (package (inherit tzdata) + (version "2022a") + (source (origin + (method url-fetch) + (uri (string-append + "https://data.iana.org/time-zones/releases/tzdata" + version ".tar.gz")) + (sha256 + (base32 + "0r0nhwpk9nyxj5kkvjy58nr5d85568m04dcb69c4y3zmykczyzzg"))))))) (define-public libiconv (package diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm index c0bcb848b3..9416199015 100644 --- a/gnu/packages/time.scm +++ b/gnu/packages/time.scm @@ -124,14 +124,14 @@ (define-public python-pytz (package (name "python-pytz") ;; This package should be kept in sync with tzdata in (gnu packages base). - (version "2022.1") + (version "2023.3") (source (origin (method url-fetch) (uri (pypi-uri "pytz" version)) (sha256 (base32 - "19ya5sh7if819flgmszz585glailhi7rr8frng03n5m8wqphwxhy")))) + "1265s3my0r1d841w3sh07ngvaanqhw1nvviqafsiy6c9n6fy530x")))) (build-system python-build-system) (home-page "http://pythonhosted.org/pytz") (synopsis "Python timezone library") -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 30 17:01:16 2023 Received: (at 63006) by debbugs.gnu.org; 30 Apr 2023 21:01:16 +0000 Received: from localhost ([127.0.0.1]:38441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptEAW-0006Z7-1y for submit@debbugs.gnu.org; Sun, 30 Apr 2023 17:01:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptEAO-0006Yj-Qm for 63006@debbugs.gnu.org; Sun, 30 Apr 2023 17:01:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptEAF-0006uP-9u; Sun, 30 Apr 2023 17:01:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=FdxCIN1DgKRI+X9I6Wn/MyOwgGlKaewi7vD3MLXR71U=; b=qjWibtx0WBVPtwd55wKt RWB36Oa5ucQody5ipDw7lMPXGAEAOz/k1gHCwC+04r/BPuX7Jlo/5DWGjg+aiQMOwSJ8tVMQnqaOI ORNuZ0Pw8FX4KZ2TJc+bhXMtj9gopg7Ky7J8fj4pc4BxVcYjUQmDh3Ki1Rqz0/oanaqXZjzPy+wZ/ zJWgM1FFbOkXqjupqKMR8pHJGLZOCsFd3a69d2ohedRH+giEQ0Bhe03TIIXWTNe9oYwrhxC97Xbqk nWxwDXj0NAGHAw1Tv8ExJ+VGuj127b9mISI5cVPFHXY19DqhxHDhfh5XMX3NUrTETpiK37V+N/kHm yudB9pW/xL4M2Q==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptEAE-00084U-4l; Sun, 30 Apr 2023 17:00:59 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Leo Famulari Subject: Re: bug#63006: Time zone database improvements References: Date: Sun, 30 Apr 2023 23:00:55 +0200 In-Reply-To: (Leo Famulari's message of "Fri, 21 Apr 2023 16:59:41 -0400") Message-ID: <87ttwxozjs.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63006 Cc: 63006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Leo Famulari skribis: > Currently, almost the entire distro is rebuilt when we need to update > the time zone database, tzdata. > > We need to do this a few times a year, and it doesn't make any sense for > packages to keep a static reference to this database which will be out > of date in a few months. > > Instead, they should look up the time zones at run-time, which most > programs that actually use time zones do. Most programs behave fine though, right? In particular, glibc honors $TZDIR and we set TZDIR to the latest tzdata in (gnu system). > These patches start improving the situation. > > Libical has committed a fix for this almost 5 years ago, but still > hasn't released it, so we cherry-pick Nix's patch: > > https://github.com/libical/libical/issues/350 LGTM! > Go wants to embed a copy of the database in case one cannot be found. I > don't see why having an incorrect time zone is better than no time > zones, so here's a patch to remove the embedded copy. Sounds good, but do we need to build it in a branch first? > We have more work to do to remove or replace python-pytz, which > unfortunately contains its own embedded copy of the database and a few > thousand dependents. Luckily, it seems that Python 3.9 has made pytz > obsolete: > > https://fedoraproject.org/wiki/Changes/DeprecatePytz#Deprecate_pytz OK. Thanks! Ludo=E2=80=99.