all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ryan Prior via Guix-patches via <guix-patches@gnu.org>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: "41010\\@debbugs.gnu.org" <41010@debbugs.gnu.org>
Subject: [bug#41010] Upgrade Oil to 0.8.pre4
Date: Sat, 02 May 2020 04:02:22 +0000	[thread overview]
Message-ID: <7j_T0Kf3tHwi7uYPSXZUYLjdVXe_LWrzbgE6XY7mdt-HZsxZQhTuCs8-H4kISkUui_q7IL1BrSnkCIksY62JtGWP-_gXsDC3MBnfusZzcOA=@protonmail.com> (raw)
In-Reply-To: <87sggjfdef.fsf@nckx>

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

Tobias, thank you for the quick and thorough review! I've attached updated patches.

A little context on how this patch came to be might make some of my choices a little less mysterious: I didn't actually start with the original package definition, because I didn't realize oil was already packaged in Guix. (I searched for "osh", not "oil-shell")

So I wrote my own package, went to find where to put it in the guix source tree, found the existing package, and then kinda merged them together.



On Friday, May 1, 2020 11:23 PM, Tobias Geerinckx-Rice <me@tobias.gr> wrote:

> However, please do build and test patches before submitting them.

Done! I test my packages mostly by running `guix build -f mypackage.scm` so I had to figure out how to build it in the context of the source tree.

> Add a full stop after commit summaries, and a ‘change log’ entry as commit body:

Added.

> OTOH a one-line link to that thread, if one exists, would be preferable.

Changed to a one-line link.

> Where do they recommend this? It's nice to have a link in case the recommendation changes.

Added a link to the recommendation.


> …as ‘guix gc --references oil’ (and readline's general nature) tell us, that's not the case here: Oil links to it at run time, so it must not be native.

I changed it to a normal input.

> Both the original synopsis and description are much better. If certain things are no longer accurate they can be adjusted but this is just upstream's marketing pitch.

I did ask upstream what they'd want as a synopsis/description. I updated it to be more similar to the original but edited for accuracy.

>
> > -   (license (list license:psfl ; Tarball vendors python2.7
>
> Hmm, this doesn't parse as English (it's missing a verb). I'd guess typo… but for what? Are upstream the ‘tarball vendors’ here? What was wrong with the original comment?

In some software development circles, we do use "vendor" as a verb. Sorry for the confusion!

>vendor (third-person singular simple present vendors, present participle vendoring, simple past and past participle vendored)
>
>    (transitive, software development) To bundle third-party dependencies with the source code for one's own program.
>
>        I distributed my application with a vendored copy of Perl so that it wouldn't use the system copies of Perl where it is installed.
https://en.wiktionary.org/wiki/vendor

In favor of readability I changed the verb to "includes."

> Phew. ‘I'll just review this trivial bump before bed-time.’ This patch changes lots of things for one small package. I hope you don't mind lots of comments :-)

Thank you again, I appreciated all the comments!

Sincerely,
Ryan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-oil-Update-to-0.8.pre4.patch --]
[-- Type: text/x-patch; name="0001-gnu-oil-Update-to-0.8.pre4.patch", Size: 4292 bytes --]

From a7fb173a203d85430158b8748223e646d1d539c6 Mon Sep 17 00:00:00 2001
From: Ryan Prior <rprior@protonmail.com>
Date: Fri, 1 May 2020 14:49:42 -0500
Subject: [PATCH] gnu: oil: Update to 0.8.pre4

gnu/packages/shells.scm (oil): Update to 0.8.pre4.
---
 gnu/packages/shells.scm | 56 ++++++++++++++++++++---------------------
 1 file changed, 27 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 10f0ec817c..445eacae2c 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
 ;;; Copyright © 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -751,47 +752,44 @@ Shell (pdksh).")
 (define-public oil
   (package
     (name "oil")
-    (version "0.7.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://www.oilshell.org/download/oil-"
-                                  version ".tar.xz"))
-              (sha256
-               (base32
-                "12c9s462879adb6mwd3fqafk0dnqsm16s18rhym6cmzfzy8v8zm3"))))
+    (version "0.8.pre4") ; https://www.oilshell.org/blog/2020/04/release-0.8.pre4.html#comment-on-version-numbering
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.oilshell.org/download/oil-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0m2p8p5hi2r14xx9pphsa0ar56kqsa33gr2w2blc3jx07aqhjpzy"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f ; the tests are not distributed in the tarballs
-       #:strip-binaries? #f ; the binaries cannot be stripped
+     `(#:strip-binaries? #f ; strip breaks the binary
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-compiler-invocation
-           (lambda _
-             (substitute* "configure"
-               ((" cc ") " gcc "))
-             #t))
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
                (setenv "CC" "gcc")
-               ;; The configure script doesn't recognize CONFIG_SHELL.
-               (setenv "CONFIG_SHELL" (which "sh"))
-               (invoke "./configure" (string-append "--prefix=" out)
+               (substitute* "configure"
+                 ((" cc ") " gcc "))
+               (invoke "./configure"
+                       (string-append "--prefix=" out)
                        "--with-readline"))))
-         (add-before 'install 'make-destination
+         (replace 'check
+           ;; The tests are not distributed in the tarballs but upstream
+           ;; recommends running this smoke test.
+           ;; https://github.com/oilshell/oil/blob/release/0.8.pre4/INSTALL.txt#L38-L48
            (lambda _
-             ;; The build scripts don't create the destination directory.
-             (mkdir-p (string-append (assoc-ref %outputs "out") "/bin")))))))
+             (let* ((oil "_bin/oil.ovm"))
+               (invoke/quiet oil "osh" "-c" "echo hi")
+               (invoke/quiet oil "osh" "-n" "configure")))))))
     (inputs
      `(("readline" ,readline)))
-    (synopsis "Bash-compatible Unix shell")
-    (description "Oil is a Unix / POSIX shell, compatible with Bash.  It
-implements the Oil language, which is a new shell language to which Bash can be
-automatically translated.  The Oil language is a superset of Bash.  It also
-implements the OSH language, a statically-parseable language based on Bash as it
-is commonly written.")
-    (home-page "https://www.oilshell.org/")
-    (license (list psfl ; The Oil sources include a patched Python 2 source tree
+    (home-page "https://www.oilshell.org")
+    (synopsis "Programming language and Bash-compatible Unix shell")
+    (description "Oil is a programming language with automatic translation for
+Bash.  It includes osh, a Unix/POSIX shell that runs unmodified Bash
+scripts.")
+    (license (list psfl ; tarball includes python2.7
                    asl2.0))))
 
 (define-public oil-shell
-- 
2.17.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-gnu-oil-shell-Rename-to-oil-and-add-a-deprecated-ali.patch --]
[-- Type: text/x-patch; name="0001-gnu-oil-shell-Rename-to-oil-and-add-a-deprecated-ali.patch", Size: 1063 bytes --]

From cb72dd3705eb51fa0a5a028443b01af95aff9ca1 Mon Sep 17 00:00:00 2001
From: Ryan Prior <rprior@protonmail.com>
Date: Fri, 1 May 2020 14:47:20 -0500
Subject: [PATCH] gnu: oil-shell: Rename to "oil" and add a deprecated alias

---
 gnu/packages/shells.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index c71e6399ea..10f0ec817c 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -748,9 +748,9 @@ Shell (pdksh).")
     (license (list miros
                    isc))))              ; strlcpy.c
 
-(define-public oil-shell
+(define-public oil
   (package
-    (name "oil-shell")
+    (name "oil")
     (version "0.7.0")
     (source (origin
               (method url-fetch)
@@ -794,6 +794,9 @@ is commonly written.")
     (license (list psfl ; The Oil sources include a patched Python 2 source tree
                    asl2.0))))
 
+(define-public oil-shell
+  (deprecated-package "oil-shell" oil))
+
 (define-public gash
   (package
     (name "gash")
-- 
2.17.1


  parent reply	other threads:[~2020-05-02  4:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 20:01 [bug#41010] Rename & upgrade oil-shell Ryan Prior via Guix-patches via
2020-05-01 21:01 ` [bug#41010] Upgrade Oil to 0.8.pre4 Ryan Prior via Guix-patches via
2020-05-01 23:23   ` Tobias Geerinckx-Rice via Guix-patches via
2020-05-01 23:33     ` Tobias Geerinckx-Rice via Guix-patches via
2020-05-02  4:02     ` Ryan Prior via Guix-patches via [this message]
2020-05-15 17:10       ` Ryan Prior via Guix-patches via
2020-05-15 18:31       ` Tobias Geerinckx-Rice via Guix-patches via
2020-05-16 11:20       ` Tobias Geerinckx-Rice via Guix-patches via
2020-05-17  6:14         ` Ryan Prior via Guix-patches via
2020-05-02 19:16     ` Leo Famulari
2020-05-28 23:38 ` [bug#41010] [PATCH 0/1] Updated patch for 0.8.pre5 Ryan Prior via Guix-patches via
2020-05-28 23:38   ` [bug#41010] [PATCH 1/1] gnu: oil: Update to 0.8.pre5 Ryan Prior via Guix-patches via
2020-05-29  4:48   ` bug#41010: [PATCH 0/1] Updated patch for 0.8.pre5 Tobias Geerinckx-Rice via Guix-patches via

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

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

  git send-email \
    --in-reply-to='7j_T0Kf3tHwi7uYPSXZUYLjdVXe_LWrzbgE6XY7mdt-HZsxZQhTuCs8-H4kISkUui_q7IL1BrSnkCIksY62JtGWP-_gXsDC3MBnfusZzcOA=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=41010@debbugs.gnu.org \
    --cc=me@tobias.gr \
    --cc=rprior@protonmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.