unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31123] [PATCH 0/2] texlive-bin bug fixes
@ 2018-04-11  5:59 Arun Isaac
  2018-04-11  6:03 ` [bug#31123] [PATCH 1/2] gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps Arun Isaac
  0 siblings, 1 reply; 9+ messages in thread
From: Arun Isaac @ 2018-04-11  5:59 UTC (permalink / raw)
  To: 31123

Following are two bug fixes to the texlive-bin package.

Arun Isaac (2):
  gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps.
  gnu: texlive-bin: Patch texlua shebangs.

 gnu/packages/tex.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

-- 
2.15.1

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

* [bug#31123] [PATCH 1/2] gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps.
  2018-04-11  5:59 [bug#31123] [PATCH 0/2] texlive-bin bug fixes Arun Isaac
@ 2018-04-11  6:03 ` Arun Isaac
  2018-04-11  6:03   ` [bug#31123] [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs Arun Isaac
  2018-04-16 22:05   ` [bug#31123] [PATCH 1/2] gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps Marius Bakke
  0 siblings, 2 replies; 9+ messages in thread
From: Arun Isaac @ 2018-04-11  6:03 UTC (permalink / raw)
  To: 31123

* gnu/packages/tex.scm (texlive-bin)[arguments]: Add fix-unix-detection phase.
Replace system* with invoke in postint phase.
---
 gnu/packages/tex.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index db1f120ce..2b35250dd 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
+;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -175,6 +176,15 @@
                            (string-prefix? "mips64" s))))
       #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-unix-detection
+           ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows,
+           ;; and the "gs" ghostscript executable on Unix. It detects Unix by
+           ;; checking for the existence of the /usr/bin directory. Since
+           ;; GuixSD does not have /usr/bin, it is also detected as Windows.
+           (lambda _
+             (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
+               (("gswin32c") "gs"))
+             #t))
          (add-after 'install 'postint
            (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
              (let* ((out (assoc-ref outputs "out"))
@@ -196,7 +206,7 @@
                (with-directory-excursion "texlive-extra"
                  (apply unpack (list #:source texlive-extra))
                  (apply patch-source-shebangs (list #:source texlive-extra))
-                 (system* "mv" "tlpkg" share))))))))
+                 (invoke "mv" "tlpkg" share))))))))
    (synopsis "TeX Live, a package of the TeX typesetting system")
    (description
     "TeX Live provides a comprehensive TeX document production system.
-- 
2.15.1

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

* [bug#31123] [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs.
  2018-04-11  6:03 ` [bug#31123] [PATCH 1/2] gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps Arun Isaac
@ 2018-04-11  6:03   ` Arun Isaac
  2018-04-16 22:08     ` Marius Bakke
  2018-04-16 22:05   ` [bug#31123] [PATCH 1/2] gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps Marius Bakke
  1 sibling, 1 reply; 9+ messages in thread
From: Arun Isaac @ 2018-04-11  6:03 UTC (permalink / raw)
  To: 31123

* gnu/packages/tex.scm (texlive-bin)[arguments]: Patch texlua shebangs in
postint phase.
---
 gnu/packages/tex.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2b35250dd..35b6b3f8d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -206,7 +206,13 @@
                (with-directory-excursion "texlive-extra"
                  (apply unpack (list #:source texlive-extra))
                  (apply patch-source-shebangs (list #:source texlive-extra))
-                 (invoke "mv" "tlpkg" share))))))))
+                 (invoke "mv" "tlpkg" share))
+               ;; texlua shebangs are not patched by the patch-source-shebangs
+               ;; phase because the texlua executable does not exist at that
+               ;; time.
+               (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
+               (with-directory-excursion out
+                 (patch-source-shebangs))))))))
    (synopsis "TeX Live, a package of the TeX typesetting system")
    (description
     "TeX Live provides a comprehensive TeX document production system.
-- 
2.15.1

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

* [bug#31123] [PATCH 1/2] gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps.
  2018-04-11  6:03 ` [bug#31123] [PATCH 1/2] gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps Arun Isaac
  2018-04-11  6:03   ` [bug#31123] [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs Arun Isaac
@ 2018-04-16 22:05   ` Marius Bakke
  1 sibling, 0 replies; 9+ messages in thread
From: Marius Bakke @ 2018-04-16 22:05 UTC (permalink / raw)
  To: Arun Isaac, 31123

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

Arun Isaac <arunisaac@systemreboot.net> writes:

> * gnu/packages/tex.scm (texlive-bin)[arguments]: Add fix-unix-detection phase.
> Replace system* with invoke in postint phase.

LGTM!

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

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

* [bug#31123] [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs.
  2018-04-11  6:03   ` [bug#31123] [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs Arun Isaac
@ 2018-04-16 22:08     ` Marius Bakke
  2018-04-19 17:33       ` Arun Isaac
  2018-04-20 18:45       ` [bug#31123] " Arun Isaac
  0 siblings, 2 replies; 9+ messages in thread
From: Marius Bakke @ 2018-04-16 22:08 UTC (permalink / raw)
  To: Arun Isaac, 31123

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

Arun Isaac <arunisaac@systemreboot.net> writes:

> * gnu/packages/tex.scm (texlive-bin)[arguments]: Patch texlua shebangs in
> postint phase.

[...]

>                 (with-directory-excursion "texlive-extra"
>                   (apply unpack (list #:source texlive-extra))
>                   (apply patch-source-shebangs (list #:source texlive-extra))
> -                 (invoke "mv" "tlpkg" share))))))))
> +                 (invoke "mv" "tlpkg" share))
> +               ;; texlua shebangs are not patched by the patch-source-shebangs
> +               ;; phase because the texlua executable does not exist at that
> +               ;; time.
> +               (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
> +               (with-directory-excursion out
> +                 (patch-source-shebangs))))))))

Would it suffice to only patch "out/bin" here?

Also, what is the return value of (patch-source-shebangs)?  If it's
anything other than #t, you know what to do.  Apart from that LGTM.

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

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

* [bug#31123] [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs.
  2018-04-16 22:08     ` Marius Bakke
@ 2018-04-19 17:33       ` Arun Isaac
  2018-04-19 17:42         ` Marius Bakke
  2018-04-20 18:45       ` [bug#31123] " Arun Isaac
  1 sibling, 1 reply; 9+ messages in thread
From: Arun Isaac @ 2018-04-19 17:33 UTC (permalink / raw)
  To: Marius Bakke, 31123


> Would it suffice to only patch "out/bin" here?
>
> Also, what is the return value of (patch-source-shebangs)?  If it's
> anything other than #t, you know what to do.  Apart from that LGTM.

Thank you for the review! I'll check and address both the above before I
push. But, considering the huge size (~ 2.2 GB) of the texlive-texmf
source tarball, and how hard it is to build from source, should I push
these patches to core-updates?

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

* [bug#31123] [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs.
  2018-04-19 17:33       ` Arun Isaac
@ 2018-04-19 17:42         ` Marius Bakke
  2018-04-20 19:13           ` bug#31123: " Arun Isaac
  0 siblings, 1 reply; 9+ messages in thread
From: Marius Bakke @ 2018-04-19 17:42 UTC (permalink / raw)
  To: Arun Isaac, 31123

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

Arun Isaac <arunisaac@systemreboot.net> writes:

>> Would it suffice to only patch "out/bin" here?
>>
>> Also, what is the return value of (patch-source-shebangs)?  If it's
>> anything other than #t, you know what to do.  Apart from that LGTM.
>
> Thank you for the review! I'll check and address both the above before I
> push. But, considering the huge size (~ 2.2 GB) of the texlive-texmf
> source tarball, and how hard it is to build from source, should I push
> these patches to core-updates?

Good point.  You can push it to 'staging' which will require at least
one more evaluation before it can be merged.  That way we'll have
substitutes ready when it lands in 'master', yet have the fix within a
couple of weeks.

Thank you!

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

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

* [bug#31123] [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs.
  2018-04-16 22:08     ` Marius Bakke
  2018-04-19 17:33       ` Arun Isaac
@ 2018-04-20 18:45       ` Arun Isaac
  1 sibling, 0 replies; 9+ messages in thread
From: Arun Isaac @ 2018-04-20 18:45 UTC (permalink / raw)
  To: Marius Bakke, 31123


>>                 (with-directory-excursion "texlive-extra"
>>                   (apply unpack (list #:source texlive-extra))
>>                   (apply patch-source-shebangs (list #:source texlive-extra))
>> -                 (invoke "mv" "tlpkg" share))))))))
>> +                 (invoke "mv" "tlpkg" share))
>> +               ;; texlua shebangs are not patched by the patch-source-shebangs
>> +               ;; phase because the texlua executable does not exist at that
>> +               ;; time.
>> +               (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
>> +               (with-directory-excursion out
>> +                 (patch-source-shebangs))))))))
>
> Would it suffice to only patch "out/bin" here?

No, it wouldn't suffice to patch only out/bin. There are files in
share/texmf-dist/scripts/texlive that have texlua shebangs.

> Also, what is the return value of (patch-source-shebangs)?  If it's
> anything other than #t, you know what to do.  Apart from that LGTM.

patch-source-shebangs is a phase in the gnu-build-system. Currently, it
does not return #t. But, that is a problem with the gnu-build-system,
and must be fixed there.

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

* bug#31123: [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs.
  2018-04-19 17:42         ` Marius Bakke
@ 2018-04-20 19:13           ` Arun Isaac
  0 siblings, 0 replies; 9+ messages in thread
From: Arun Isaac @ 2018-04-20 19:13 UTC (permalink / raw)
  To: Marius Bakke, 31123-done


> You can push it to 'staging' which will require at least one more
> evaluation before it can be merged.  That way we'll have substitutes
> ready when it lands in 'master', yet have the fix within a couple of
> weeks.
>
> Thank you!

Pushed to staging!

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

end of thread, other threads:[~2018-04-20 19:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-11  5:59 [bug#31123] [PATCH 0/2] texlive-bin bug fixes Arun Isaac
2018-04-11  6:03 ` [bug#31123] [PATCH 1/2] gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps Arun Isaac
2018-04-11  6:03   ` [bug#31123] [PATCH 2/2] gnu: texlive-bin: Patch texlua shebangs Arun Isaac
2018-04-16 22:08     ` Marius Bakke
2018-04-19 17:33       ` Arun Isaac
2018-04-19 17:42         ` Marius Bakke
2018-04-20 19:13           ` bug#31123: " Arun Isaac
2018-04-20 18:45       ` [bug#31123] " Arun Isaac
2018-04-16 22:05   ` [bug#31123] [PATCH 1/2] gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps Marius Bakke

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