unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#50419] [PATCH 0/2] gnu: racket: fix `raco exe` with non-minimal Racket
@ 2021-09-06  4:55 Philip McGrath
  2021-09-06  4:59 ` [bug#50419] [PATCH 1/2] " Philip McGrath
  2021-09-10 15:19 ` bug#50419: [PATCH 0/2] gnu: racket: fix `raco exe` with non-minimal Racket Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Philip McGrath @ 2021-09-06  4:55 UTC (permalink / raw)
  To: 50419; +Cc: Philip McGrath

This patch series fixes <https://issues.guix.gnu.org/50118>.
It also includes a minor fix for the build stamp configuration.

Philip McGrath (2):
  gnu: racket: fix `raco exe` with non-minimal Racket
  gnu: racket: suppress build stamp

 gnu/local.mk                                  |  1 +
 .../racket-minimal-backport-1629887.patch     | 28 +++++++++++++++++++
 gnu/packages/racket.scm                       |  5 +++-
 3 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/racket-minimal-backport-1629887.patch

-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#50419] [PATCH 1/2] gnu: racket: fix `raco exe` with non-minimal Racket
  2021-09-06  4:55 [bug#50419] [PATCH 0/2] gnu: racket: fix `raco exe` with non-minimal Racket Philip McGrath
@ 2021-09-06  4:59 ` Philip McGrath
  2021-09-06  4:59   ` [bug#50419] [PATCH 2/2] gnu: racket: suppress build stamp Philip McGrath
  2021-09-10 15:19 ` bug#50419: [PATCH 0/2] gnu: racket: fix `raco exe` with non-minimal Racket Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: Philip McGrath @ 2021-09-06  4:59 UTC (permalink / raw)
  To: 50419; +Cc: Philip McGrath

This commit backports an upstream repair for a bug exposed by Guix's
change in Racket 8.2 to make the `racket` package a layered/tethered
installation that chains to the `racket-minimal` package. When using a
layered/tethered installation, the `setup/variant` library would fail to
recognize the default Racet variant (CS, 3M, or CGC), leading to
confusing failures from `raco exe`, `create-embedding-executable`, and
other clients.

For further details, see <https://issues.guix.gnu.org/50118> and
<https://github.com/racket/racket/issues/3969>.

* gnu/packages/patches/racket-minimal-backport-1629887.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/racket.scm (racket-minimal)[source]: Use it.
---
 gnu/local.mk                                  |  1 +
 .../racket-minimal-backport-1629887.patch     | 28 +++++++++++++++++++
 gnu/packages/racket.scm                       |  4 ++-
 3 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/racket-minimal-backport-1629887.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f848a8c61f..655e55df45 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1701,6 +1701,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ripperx-missing-file.patch		\
   %D%/packages/patches/rpcbind-CVE-2017-8779.patch		\
   %D%/packages/patches/rtags-separate-rct.patch			\
+  %D%/packages/patches/racket-minimal-backport-1629887.patch    \
   %D%/packages/patches/racket-minimal-sh-via-rktio.patch	\
   %D%/packages/patches/remake-impure-dirs.patch			\
   %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch	\
diff --git a/gnu/packages/patches/racket-minimal-backport-1629887.patch b/gnu/packages/patches/racket-minimal-backport-1629887.patch
new file mode 100644
index 0000000000..aa060ef5aa
--- /dev/null
+++ b/gnu/packages/patches/racket-minimal-backport-1629887.patch
@@ -0,0 +1,28 @@
+From fb1a6ab205fd63a46669a463931af473e2ac0c87 Mon Sep 17 00:00:00 2001
+From: Matthew Flatt <mflatt@racket-lang.org>
+Date: Sat, 21 Aug 2021 15:29:59 -0600
+Subject: [PATCH] setup/variant: recognize starter executables
+
+Related to #3969
+
+(cherry picked from commit 1629887071fe3cc8fe8af0a7aa0d3912509cb058)
+---
+ racket/collects/setup/variant.rkt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/racket/collects/setup/variant.rkt b/racket/collects/setup/variant.rkt
+index 81da6f5701..b23131e481 100644
+--- a/racket/collects/setup/variant.rkt
++++ b/racket/collects/setup/variant.rkt
+@@ -25,7 +25,7 @@
+         (and (file-exists? f)
+              (with-input-from-file f
+                (lambda ()
+-                 (define m (regexp-match #rx#"bINARy tYPe:..(.)"
++                 (define m (regexp-match #rx#"bINARy tYPe:e?..(.)"
+                                          (current-input-port)))
+                  (cond
+                    [(not m) '3m]
+-- 
+2.30.2
+
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 4bc34193c6..a05d435303 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -138,7 +138,9 @@
        (sha256
         "061bhiyjlvazph0dj9i3i3x2q5z53rp8h5cjwg3frjimkr45lncn")
        (file-name (git-file-name name version))
-       (patches (search-patches "racket-minimal-sh-via-rktio.patch"))
+       (patches (search-patches "racket-minimal-sh-via-rktio.patch"
+                                ;; Remove the following in version 8.3
+                                "racket-minimal-backport-1629887.patch"))
        (snippet
         (with-imported-modules '((guix build utils))
           #~(begin
-- 
2.30.2





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#50419] [PATCH 2/2] gnu: racket: suppress build stamp
  2021-09-06  4:59 ` [bug#50419] [PATCH 1/2] " Philip McGrath
@ 2021-09-06  4:59   ` Philip McGrath
  0 siblings, 0 replies; 4+ messages in thread
From: Philip McGrath @ 2021-09-06  4:59 UTC (permalink / raw)
  To: 50419; +Cc: Philip McGrath

The `build-stamp` configuration key should generally be set to an empty
string for a release build. The automatically inferred build stamp is
especially unhelpful with Guix, since it ends up being the Unix epoch.

* gnu/packages/racket.scm (racket-minimal)[arguments]: Adjust the
'initialize-config.rktd phase to set 'build-stamp to "".
---
 gnu/packages/racket.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index a05d435303..e150f96575 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -214,6 +214,7 @@
                                                    "/lib"))
                                   '("openssl"
                                     "sqlite"))))
+                    (build-stamp . "")
                     (catalogs
                      . (,(string-append
                           "https://download.racket-lang.org/releases/"
-- 
2.30.2





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#50419: [PATCH 0/2] gnu: racket: fix `raco exe` with non-minimal Racket
  2021-09-06  4:55 [bug#50419] [PATCH 0/2] gnu: racket: fix `raco exe` with non-minimal Racket Philip McGrath
  2021-09-06  4:59 ` [bug#50419] [PATCH 1/2] " Philip McGrath
@ 2021-09-10 15:19 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2021-09-10 15:19 UTC (permalink / raw)
  To: Philip McGrath; +Cc: 50419-done

Hi,

Philip McGrath <philip@philipmcgrath.com> skribis:

> This patch series fixes <https://issues.guix.gnu.org/50118>.
> It also includes a minor fix for the build stamp configuration.
>
> Philip McGrath (2):
>   gnu: racket: fix `raco exe` with non-minimal Racket
>   gnu: racket: suppress build stamp

Cool.  Applied, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-10 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06  4:55 [bug#50419] [PATCH 0/2] gnu: racket: fix `raco exe` with non-minimal Racket Philip McGrath
2021-09-06  4:59 ` [bug#50419] [PATCH 1/2] " Philip McGrath
2021-09-06  4:59   ` [bug#50419] [PATCH 2/2] gnu: racket: suppress build stamp Philip McGrath
2021-09-10 15:19 ` bug#50419: [PATCH 0/2] gnu: racket: fix `raco exe` with non-minimal Racket Ludovic Courtès

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).