GNU bug report logs - #41010
Rename & upgrade oil-shell

Previous Next

Package: guix-patches;

Reported by: Ryan Prior <rprior <at> protonmail.com>

Date: Fri, 1 May 2020 20:23:01 UTC

Severity: normal

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41010 in the body.
You can then email your comments to 41010 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Fri, 01 May 2020 20:23:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ryan Prior <rprior <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 01 May 2020 20:23:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ryan Prior <rprior <at> protonmail.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: Rename & upgrade oil-shell
Date: Fri, 01 May 2020 20:01:09 +0000
[Message part 1 (text/plain, inline)]
This patch renames oil-shell to oil, at the request of upstream authors.
[Message part 2 (text/html, inline)]
[0001-gnu-oil-shell-Rename-to-oil-and-add-a-deprecated-ali.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Fri, 01 May 2020 22:00:03 GMT) Full text and rfc822 format available.

Message #8 received at 41010 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Prior <rprior <at> protonmail.com>
To: "41010 <at> debbugs.gnu.org" <41010 <at> debbugs.gnu.org>
Subject: Upgrade Oil to 0.8.pre4
Date: Fri, 01 May 2020 21:01:22 +0000
[Message part 1 (text/plain, inline)]
This patch upgrades the oil package. As noted in the package description, upstream considers this to be a stable release & the best available version of oil despite the "pre" tag.
[Message part 2 (text/html, inline)]
[0001-gnu-oil-Update-to-0.8.pre4.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Fri, 01 May 2020 23:24:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Ryan Prior <rprior <at> protonmail.com>,
 Ryan Prior via Guix-patches <guix-patches <at> gnu.org>
Cc: "41010 <at> debbugs.gnu.org" <41010 <at> debbugs.gnu.org>
Subject: Re: [bug#41010] Upgrade Oil to 0.8.pre4
Date: Sat, 02 May 2020 01:23:30 +0200
[Message part 1 (text/plain, inline)]
Ryan,

> This patch upgrades the oil package. As noted in the package 
> description, upstream considers this to be a stable release & 
> the best available version of oil despite the "pre" tag.

Thanks!

I agree with the name change, although I'm unaware of why 
‘oil-shell’ was originally chosen.

However, please do build and test patches before submitting them. 
These were broken in 2 places: adding the unused ‘license:’ prefix 
breaks evaluation, as does referring to a variable (‘oil’ in 
deprecated-package) before it's defined.

> Subject: [PATCH] gnu: oil: Update to 0.8.pre4

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

* gnu/packages/shells.scm (oil): Update to 0.8.pre4.

> +    (version "0.8.pre4") ; "Despite the pre4 version qualifier, 
> this is by far
> +                         ; the best Oil release ever… I may 
> change the version
> +                         ; numbering scheme in the near future 
> to reflect this."
> +                         ; - upstream on whether to ship pre4 
> in Guix

 ;; "Despite the pre4 version qualifier, this is by far
 ;; the best Oil release ever… I may change the version
 ;; numbering scheme in the near future to reflect this."
 ;; - upstream on whether to ship pre4 in Guix
 (version "0.8.pre4")

Format long and/or multi-line comments like so:

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

> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append 
> "https://www.oilshell.org/download/oil-"
> +                           version ".tar.gz"))
> +       (sha256
> +        (base32
> + 
> "0m2p8p5hi2r14xx9pphsa0ar56kqsa33gr2w2blc3jx07aqhjpzy"))))

If you're going to re-indent like this, the hash fits beside 
(base32 ….

> -       #:strip-binaries? #f ; the binaries cannot be stripped
> +     `(#:strip-binaries? #f ; Strip breaks the binary.

I like your comment better but the original formatting (lowercase, 
no full stop) was fine.

> +             (setenv "CC" "gcc")
>               (let ((out (assoc-ref outputs "out")))
> -               (setenv "CC" "gcc")

  (let ((out (assoc-ref outputs "out")))
    (do-something "foo")
    (do-something out))

It's canonical style in Guix (not sure about wider Schemeland) to 
‘bind early’:

  (do-something "foo")
  (let ((out (assoc-ref outputs "out")))
    (do-something out))

While you'll find a fair share of

it's much less common, possibly frowned upon, and idly rearranging 
existing code is right out.

> +             (substitute* "configure"
> +               ((" cc ") " gcc "))

 (substitute* "configure"
   ((" cc ") " $CC "))

> +               (invoke
> +                "./configure"

More line nitpicking: keep these on one line & indent the other 
arguments accordingly.

> +         (replace 'check ; The tests are not distributed in the 
> tarballs but
> +                         ; upstream recommends running this 
> smoke test.

Same as above:

 (replace 'check
   ;; The tests are not distributed in the tarballs but upstream
   ;; recommends running this smoke test.
   …

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

> +    (native-inputs

Nak.  ‘Native’ means ‘when cross compiling, don't bother building 
this for the target architecture, it will only ever run on the 
host’…

>      `(("readline" ,readline)))

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

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

[…]

> +    (synopsis "A Unix shell")
> +    (description "Oil is a Unix shell and programming 
> language. It's our upgrade
> +path from Bash.")

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.

> +    (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?

If upstream still bundles Python (and it would seem so), that's 
important information that shouldn't be removed.

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

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Fri, 01 May 2020 23:24:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Fri, 01 May 2020 23:34:01 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org>
Cc: rprior <at> protonmail.com, 41010 <at> debbugs.gnu.org
Subject: Re: [bug#41010] Upgrade Oil to 0.8.pre4
Date: Sat, 02 May 2020 01:33:58 +0200
[Message part 1 (text/plain, inline)]
of lines out of order

This bizarre formatting:

is not something I did.

Emacs tried to warn me about some weird encoding issues (which 
were in turn related to the original patch encoding, e.g. © and …) 
and I ignored it at my peril.  The patch applied just fine.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Fri, 01 May 2020 23:34:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Sat, 02 May 2020 04:03:02 GMT) Full text and rfc822 format available.

Message #23 received at 41010 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Prior <rprior <at> protonmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: "41010\\@debbugs.gnu.org" <41010 <at> debbugs.gnu.org>
Subject: Re: [bug#41010] Upgrade Oil to 0.8.pre4
Date: Sat, 02 May 2020 04:02:22 +0000
[Message part 1 (text/plain, inline)]
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 <at> 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
[0001-gnu-oil-Update-to-0.8.pre4.patch (text/x-patch, attachment)]
[0001-gnu-oil-shell-Rename-to-oil-and-add-a-deprecated-ali.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Sat, 02 May 2020 19:17:01 GMT) Full text and rfc822 format available.

Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Tobias Geerinckx-Rice via Guix-patches via <guix-patches <at> gnu.org>
Cc: rprior <at> protonmail.com, 41010 <at> debbugs.gnu.org
Subject: Re: [bug#41010] Upgrade Oil to 0.8.pre4
Date: Sat, 2 May 2020 15:16:22 -0400
[Message part 1 (text/plain, inline)]
On Sat, May 02, 2020 at 01:23:30AM +0200, Tobias Geerinckx-Rice via Guix-patches via wrote:
> I agree with the name change, although I'm unaware of why ‘oil-shell’ was
> originally chosen.

No serious reason. I thought it was close the upstream name (it's the
GitHub organization name) and that 'oil' was a bit short for something
so obscure. Feel free to change it to 'oil' though.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Sat, 02 May 2020 19:17:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Fri, 15 May 2020 17:11:01 GMT) Full text and rfc822 format available.

Message #32 received at 41010 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Prior <rprior <at> protonmail.com>
To: "41010 <at> debbugs.gnu.org" <41010 <at> debbugs.gnu.org>
Subject: Re: [bug#41010] Upgrade Oil to 0.8.pre4
Date: Fri, 15 May 2020 17:10:37 +0000
Ryan Prior <rprior <at> protonmail.com> writes:

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

Any thoughts on this updated patch would be welcome if there are still
issues to be address before merging!

Thanks,
Ryan





Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Fri, 15 May 2020 18:32:02 GMT) Full text and rfc822 format available.

Message #35 received at 41010 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Ryan Prior <rprior <at> protonmail.com>
Cc: "41010 <at> debbugs.gnu.org" <41010 <at> debbugs.gnu.org>
Subject: Re: [bug#41010] Upgrade Oil to 0.8.pre4
Date: Fri, 15 May 2020 20:31:01 +0200
[Message part 1 (text/plain, inline)]
Ryan,

Ryan Prior 写道:
> Tobias, thank you for the quick and thorough review!

I've made up for that now \o/

> I've attached updated patches.

Thanks.  I promise I'll respond to the rest of your mail later 
to(euro-)night.

My ~/guix is a dusty mess from the previous weeks and your 
‘Update’ patch doesn't apply yet.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Sat, 16 May 2020 11:21:01 GMT) Full text and rfc822 format available.

Message #38 received at 41010 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Ryan Prior <rprior <at> protonmail.com>
Cc: "41010 <at> debbugs.gnu.org" <41010 <at> debbugs.gnu.org>
Subject: Re: [bug#41010] Upgrade Oil to 0.8.pre4
Date: Sat, 16 May 2020 13:20:01 +0200
[Message part 1 (text/plain, inline)]
Ryan Prior 写道:
> [2. text/x-patch; 0001-gnu-oil-Update-to-0.8.pre4.patch]...

Unfortunately I still can't apply this onto upstream/master:

 Applying: gnu: oil: Update to 0.8.pre4
 error: sha1 information is lacking or useless
 (gnu/packages/shells.scm).
 error: could not build fake ancestor
 Patch failed at 0001 gnu: oil: Update to 0.8.pre4

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Sun, 17 May 2020 06:16:01 GMT) Full text and rfc822 format available.

Message #41 received at 41010 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Prior <rprior <at> protonmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: "41010 <at> debbugs.gnu.org" <41010 <at> debbugs.gnu.org>
Subject: Re: [bug#41010] Upgrade Oil to 0.8.pre4
Date: Sun, 17 May 2020 06:14:55 +0000
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice <me <at> tobias.gr> writes:

> Unfortunately I still can't apply this onto upstream/master:

I rebased my branch off of master and created a new patch, attached.
Hope that helps!

Ryan



[0001-gnu-oil-Update-to-0.8.pre4.patch (text/x-diff, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Thu, 28 May 2020 23:39:01 GMT) Full text and rfc822 format available.

Message #44 received at 41010 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Prior <rprior <at> protonmail.com>
To: 41010 <at> debbugs.gnu.org
Subject: [PATCH 0/1] Updated patch for 0.8.pre5
Date: Thu, 28 May 2020 23:38:38 +0000
The best upstream release is now 0.8.pre5, so here's a patch updated for that version.

Ryan Prior (1):
  gnu: oil: Update to 0.8.pre5

 gnu/packages/shells.scm | 56 ++++++++++++++++++++---------------------
 1 file changed, 27 insertions(+), 29 deletions(-)

-- 
2.26.2






Information forwarded to guix-patches <at> gnu.org:
bug#41010; Package guix-patches. (Thu, 28 May 2020 23:40:02 GMT) Full text and rfc822 format available.

Message #47 received at 41010 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Prior <rprior <at> protonmail.com>
To: 41010 <at> debbugs.gnu.org
Subject: [PATCH 1/1] gnu: oil: Update to 0.8.pre5
Date: Thu, 28 May 2020 23:38:50 +0000
gnu/packages/shells.scm (oil): Update to 0.8.pre5.
---
 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 fa3eccabd4..147ba24c3f 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2020 Brice Waegeneire <brice <at> waegenei.re>
+;;; Copyright © 2020 Ryan Prior <rprior <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -793,47 +794,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.pre5") ; 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 "02llxx10izxpv1y32qn8k6r0y7al01rzxjirc8h6x8nd9kiaqknl"))))
     (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.pre5/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.26.2






Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Fri, 29 May 2020 04:49:01 GMT) Full text and rfc822 format available.

Notification sent to Ryan Prior <rprior <at> protonmail.com>:
bug acknowledged by developer. (Fri, 29 May 2020 04:49:01 GMT) Full text and rfc822 format available.

Message #52 received at 41010-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Ryan Prior <rprior <at> protonmail.com>
Cc: 41010-done <at> debbugs.gnu.org
Subject: Re: [bug#41010] [PATCH 0/1] Updated patch for 0.8.pre5
Date: Fri, 29 May 2020 06:48:22 +0200
[Message part 1 (text/plain, inline)]
Ryan,

Ryan Prior via Guix-patches via 写道:
> The best upstream release is now 0.8.pre5, so here's a patch 
> updated for that version.

Pushed as 01914fd2bbad199df89b1cac2c72b453e57685ff with a 
completed commit message and the previously suggested gcc → $CC 
change.

Thanks!

T G-R
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 26 Jun 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.