[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
76/217: gnu: glibc: Look for the current timezone in /etc/localtime.
From: |
guix-commits |
Subject: |
76/217: gnu: glibc: Look for the current timezone in /etc/localtime. |
Date: |
Sun, 14 Nov 2021 19:20:45 -0500 (EST) |
vagrantc pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit c3c49d0df0272e3de69adad2eafd1783657580d6
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Oct 12 14:01:56 2021 -0400
gnu: glibc: Look for the current timezone in /etc/localtime.
Fixes <https://issues.guix.gnu.org/50830>.
Reported by podiki on #guix.
Previously, glibc 2.33 would look for
/gnu/store/...-glibc-2.33/etc/localtime instead of /etc/localtime.
* gnu/packages/base.scm (glibc)[arguments]: Remove #:make-flags.
[phases]: In 'pre-configure', modify 'inet/Makefile' instead of
'sunrpc/Makefile' since this is where these bits are in 2.33.
(glibc-2.31)[arguments]: Add 'set-etc-rpc-installation-directory'
phase.
(glibc-2.30): Inherit from GLIBC-2.31.
* gnu/tests/base.scm (run-basic-test)["libc honors /etc/localtime"]: New
test.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
gnu/packages/base.scm | 25 ++++++++++++++++---------
gnu/tests/base.scm | 11 +++++++++++
2 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 9c45f52..68f238a 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -775,11 +775,6 @@ the store.")
'("--disable-werror")
'()))
- ;; Arrange so that /etc/rpc & co. go to $out/etc.
- #:make-flags (list (string-append "sysconfdir="
- (assoc-ref %outputs "out")
- "/etc"))
-
#:tests? #f ; XXX
#:phases (modify-phases %standard-phases
(add-before
@@ -793,8 +788,7 @@ the store.")
(bash (or (assoc-ref inputs "static-bash")
(assoc-ref native-inputs "static-bash"))))
;; Install the rpc data base file under `$out/etc/rpc'.
- ;; FIXME: Use installFlags = [ "sysconfdir=$(out)/etc" ];
- (substitute* "sunrpc/Makefile"
+ (substitute* "inet/Makefile"
(("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
(string-append out "/etc/rpc" suffix "\n"))
(("^install-others =.*$")
@@ -950,11 +944,24 @@ with the Linux kernel.")
"glibc-2.31-hurd-clock_gettime_monotonic.patch"
"glibc-hurd-signal-sa-siginfo.patch"
"glibc-hurd-mach-print.patch"
- "glibc-hurd-gettyent.patch"))))))
+ "glibc-hurd-gettyent.patch"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments glibc)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'set-etc-rpc-installation-directory
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Install the rpc data base file under `$out/etc/rpc'.
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "sunrpc/Makefile"
+ (("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
+ (string-append out "/etc/rpc" suffix "\n"))
+ (("^install-others =.*$")
+ (string-append "install-others = " out
"/etc/rpc\n"))))))))))))
(define-public glibc-2.30
(package
- (inherit glibc)
+ (inherit glibc-2.31)
(version "2.30")
(native-inputs
;; This fails with a build error in libc-tls.c when using GCC 10. Use an
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 9198a3e..38d4317 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -87,6 +87,7 @@ Otherwise assume that there is no password for root."
(use-modules (gnu build marionette)
(guix build syscalls)
(srfi srfi-1)
+ (srfi srfi-19)
(srfi srfi-26)
(srfi srfi-64)
(ice-9 match))
@@ -196,6 +197,16 @@ info --version")
(pk 'services services)
'(root #$@(operating-system-shepherd-service-names os)))))
+ (test-equal "libc honors /etc/localtime"
+ -7200 ;CEST = GMT+2
+ ;; Assume OS is configured to have a CEST timezone.
+ (let* ((sept-2021 (time-second
+ (date->time-utc
+ (make-date 0 0 00 12 01 09 2021 7200)))))
+ (marionette-eval
+ `(tm:gmtoff (localtime ,sept-2021))
+ marionette)))
+
(test-equal "/var/log/messages is not world-readable"
#o640 ;<https://bugs.gnu.org/40405>
(begin
- 60/217: gnu: gstreamer: Update to 1.18.5., (continued)
- 60/217: gnu: gstreamer: Update to 1.18.5., guix-commits, 2021/11/14
- 48/217: gnu: python-gst: Update to 1.19.2., guix-commits, 2021/11/14
- 55/217: gnu: abseil-cpp: Update to 20210324.2., guix-commits, 2021/11/14
- 65/217: gnu: gst-libav: Update to 1.18.5., guix-commits, 2021/11/14
- 64/217: gnu: gst-plugins-ugly: Update to 1.18.5., guix-commits, 2021/11/14
- 57/217: gnu: Add a missing copyright., guix-commits, 2021/11/14
- 53/217: gnu: googletest: Update to 1.11.0., guix-commits, 2021/11/14
- 66/217: gnu: gst-editing-services: Update to 1.18.5., guix-commits, 2021/11/14
- 74/217: gnu: python-keras: Skip a flaky test., guix-commits, 2021/11/14
- 83/217: gnu: gcc-5: Fix powerpc64le-linux build, guix-commits, 2021/11/14
- 76/217: gnu: glibc: Look for the current timezone in /etc/localtime.,
guix-commits <=
- 75/217: gnu: glibc: Remove unneeded nscd patching., guix-commits, 2021/11/14
- 97/217: gnu: Add python-flit-core., guix-commits, 2021/11/14
- 84/217: gnu: make-ld-wrapper: Add a LINKER argument., guix-commits, 2021/11/14
- 91/217: gnu: rust: Bootstrap rust from 1.39.0 and optimize build time., guix-commits, 2021/11/14
- 37/217: gnu: python-sphinxcontrib-serializinghtml: Update to 1.1.5., guix-commits, 2021/11/14
- 49/217: gnu: e2fsprogs: Update to 1.46.4., guix-commits, 2021/11/14
- 59/217: Revert gstreamer update to 1.19.2., guix-commits, 2021/11/14
- 78/217: gnu: gtk+-2: Fix ‘builder’ test., guix-commits, 2021/11/14
- 92/217: gnu: rust: Add rust 1.54 and move all non-bootstrapping logic to it., guix-commits, 2021/11/14
- 95/217: gnu: Move a few Python packages to (gnu packages python-build)., guix-commits, 2021/11/14