unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 26238@debbugs.gnu.org
Subject: bug#26238: core-updates: Fix time zone bug in `date` 8.26
Date: Tue, 18 Apr 2017 20:37:04 +0200	[thread overview]
Message-ID: <87r30pv9yn.fsf@fastmail.com> (raw)
In-Reply-To: <87a87eup5p.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 1802 bytes --]

Ludovic Courtès <ludo@gnu.org> writes:

> Morning!
>
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Hi Leo!
>>>
>>> ludo@gnu.org (Ludovic Courtès) skribis:
>>>
>>>> Leo Famulari <leo@famulari.name> skribis:
>>>>
>>>>> From 466a0ebad18ee5e38f280acf19ab19aadffa2206 Mon Sep 17 00:00:00 2001
>>>>> From: Leo Famulari <leo@famulari.name>
>>>>> Date: Fri, 24 Mar 2017 12:18:21 -0400
>>>>> Subject: [PATCH] gnu: coreutils: Fix a time-zone bug in date 8.26.
>>>>>
>>>>> * gnu/packages/base.scm (coreutils)[replacement]: New field.
>>>>> (coreutils/fixed): New variable.
>>>>> (coreutils-minimal)[source]: Use the source of coreutils/fixed.
>>>>> * gnu/packages/commencement.scm (coreutils-final)[replacement]: New field.
>>>>> * gnu/packages/patches/coreutils-fix-time-zone-conversion.patch: New file.
>>>>> * gnu/local.mk (dist_patch_DATA): Add it.
>>>>
>>>> LGTM, thanks!
>>>
>>> Was there anything wrong with this patch?  Otherwise I still think it’s
>>> worth applying to ‘master’.
>>
>> It depends on this gnulib patch, which does not apply cleanly and needs
>> a rather difficult backport:
>>
>> https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4e6e16b3f43ce96302b1e52e48730c1f15e18c14
>
> Oh right, sorry for being sloppy.
>
> A while back you suggested using directly 8.27 as the replacement:
>
>   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26238#32
>
> I think it would be a good idea.
>
> Thoughts?

Here is a WIP patch that adds a graft for coreutils 8.27. I stole Leos
code for the (gnu packages commencement) part. It builds with
`./pre-inst-env guix build coreutils`, but my after reconfiguring my
system on it, `date --version` still shows 8.26.

Any idea what's wrong?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-coreutils-Replace-with-8.27.patch --]
[-- Type: text/x-patch, Size: 3768 bytes --]

From 2636e565fa4847dc0d1c786345e98053cf783cc1 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Tue, 18 Apr 2017 20:13:45 +0200
Subject: [PATCH] gnu: coreutils: Replace with 8.27.

* gnu/packages/base.scm (coreutils-8.27): New variable.
(coreutils)[replacement]: New field.
(coreutils-minimal)[source]: Inherit from COREUTILS-8.27.
[replacement]: New field.
* gnu/packages/commencement.scm (coreutils-final): Set replacement #f on
coreutils derivation.

Co-authored-by: Leo Famulari <leo@famulari.name>
---
 gnu/packages/base.scm         | 15 +++++++++++++++
 gnu/packages/commencement.scm | 20 ++++++++++++--------
 2 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 5c36b612f..36eaabb36 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -285,6 +285,7 @@ used to apply commands with arbitrarily long arguments.")
   (package
    (name "coreutils")
    (version "8.26")
+   (replacement coreutils-8.27)
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/coreutils/coreutils-"
@@ -361,11 +362,25 @@ functionality beyond that which is outlined in the POSIX standard.")
    (license gpl3+)
    (home-page "https://www.gnu.org/software/coreutils/")))
 
+(define coreutils-8.27
+  (package
+    (inherit coreutils)
+    (version "8.27")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/coreutils/coreutils-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "0sv547572iq8ayy8klir4hnngnx92a9nsazmf1wgzfc7xr4x74c8"))))))
+
 (define-public coreutils-minimal
   ;; Coreutils without its optional dependencies.
   (package
     (inherit coreutils)
     (name "coreutils-minimal")
+    (replacement #f)
+    (source (package-source coreutils-8.27))
     (outputs '("out"))
     (inputs '())))
 
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 92f6e6c2e..c9d851c4d 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -868,15 +868,19 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
   ;; The final Coreutils.  Treat them specially because some packages, such as
   ;; Findutils, keep a reference to the Coreutils they were built with.
   (package-with-bootstrap-guile
-   (package-with-explicit-inputs coreutils
-                                 %boot5-inputs
-                                 (current-source-location)
 
-                                 ;; Use the final Guile, linked against the
-                                 ;; final libc with working iconv, so that
-                                 ;; 'substitute*' works well when touching
-                                 ;; test files in Gettext.
-                                 #:guile guile-final)))
+
+   (let ((p (package-with-explicit-inputs coreutils
+                                          %boot5-inputs
+                                          (current-source-location)
+
+                                          ;; Use the final Guile, linked against the
+                                          ;; final libc with working iconv, so that
+                                          ;; 'substitute*' works well when touching
+                                          ;; test files in Gettext.
+                                          #:guile guile-final)))
+           (package (inherit p)
+                    (replacement #f)))))
 
 (define grep-final
   ;; The final grep.  Gzip holds a reference to it (via zgrep), so it must be
-- 
2.12.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2017-04-18 18:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170324162234.GA32596@jasmine>
     [not found] ` <87d1d4p1nr.fsf@gnu.org>
     [not found]   ` <20170326200114.GA9140@jasmine>
2017-03-27  8:27     ` bug#26238: core-updates: Fix time zone bug in `date` 8.26 Ludovic Courtès
2017-04-17 21:30       ` Ludovic Courtès
2017-04-17 21:37         ` Marius Bakke
2017-04-18  7:54           ` Ludovic Courtès
2017-04-18 18:37             ` Marius Bakke [this message]
2017-04-18 21:34               ` Ludovic Courtès
2017-04-19 16:49                 ` Marius Bakke
2017-04-19 20:00                   ` Ludovic Courtès
2017-04-19 20:12                     ` Marius Bakke
     [not found] ` <87r31kwn7e.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me>
     [not found]   ` <20170326201300.GA9812@jasmine>
     [not found]     ` <87k27bwzm5.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me>
     [not found]       ` <20170326205552.GA3104@jasmine>
     [not found]         ` <87h92fwwza.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me>
2017-03-27 11:36           ` Ludovic Courtès
2017-03-27 15:35             ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r30pv9yn.fsf@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=26238@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).