GNU bug report logs -
#65931
[PATCH] gnu: Add apple-bash.
Previous Next
Reported by: "B. Wilson" <elaexuotee <at> wilsonb.com>
Date: Thu, 14 Sep 2023 04:58:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
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 65931 in the body.
You can then email your comments to 65931 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#65931
; Package
guix-patches
.
(Thu, 14 Sep 2023 04:58:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"B. Wilson" <elaexuotee <at> wilsonb.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 14 Sep 2023 04:58:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/apple.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODELS): Add it.
---
gnu/local.mk | 2 ++
gnu/packages/apple.scm | 57 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)
create mode 100644 gnu/packages/apple.scm
diff --git a/gnu/local.mk b/gnu/local.mk
index 924d497057..fcce8b39b4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -59,6 +59,7 @@
# Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
# Copyright © 2023 Ivana Drazovic <iv.dra <at> hotmail.com>
# Copyright © 2023 Andy Tai <atai <at> atai.org>
+# Copyright © 2023 B. Wilson <elaexuotee <at> wilsonb.com>
#
# This file is part of GNU Guix.
#
@@ -126,6 +127,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/anthy.scm \
%D%/packages/antivirus.scm \
%D%/packages/apl.scm \
+ %D%/packages/apple.scm \
%D%/packages/apparmor.scm \
%D%/packages/apr.scm \
%D%/packages/arcan.scm \
diff --git a/gnu/packages/apple.scm b/gnu/packages/apple.scm
new file mode 100644
index 0000000000..6b181a1fdc
--- /dev/null
+++ b/gnu/packages/apple.scm
@@ -0,0 +1,57 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 B. Wilson <elaexuotee <at> wilsonb.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages apple)
+ #:use-module (gnu packages bison)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:))
+
+(define-public apple-bash
+ (package
+ (name "apple-bash")
+ (version "125")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/apple-oss-distributions/bash.git")
+ (commit (string-append "bash-" version))))
+ (sha256
+ (base32 "1d4s1z57yiyhgb6i22kb9al31j1fv9a4rp1bb747ny6grdvc4919"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (native-inputs (list bison))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'pre-configure
+ (lambda _
+ ;; An XCode project wraps the actual bash source.
+ (chdir "bash-3.2")
+ ;; The xlocale.h header was removed in glibc 2.26.
+ (substitute* "lib/glob/smatch.c"
+ (("xlocale.h") "locale.h"))
+ ;; EBADEXEC is XNU-specific.
+ (substitute* "execute_cmd.c"
+ (("EBADEXEC") "ENOEXEC")))))))
+ (home-page "https://github.com/apple-oss-distributions/bash/")
+ (synopsis "Bash used on Apple MacOS systems")
+ (description "This is the version of Bash released on Apple MacOS systems")
+ (license license:gpl3+)))
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65931
; Package
guix-patches
.
(Wed, 27 Sep 2023 21:52:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 65931 <at> debbugs.gnu.org (full text, mbox):
Hi,
"B. Wilson" <elaexuotee <at> wilsonb.com> skribis:
> * gnu/packages/apple.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODELS): Add it.
[...]
> +(define-public apple-bash
> + (package
> + (name "apple-bash")
> + (version "125")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/apple-oss-distributions/bash.git")
> + (commit (string-append "bash-" version))))
> + (sha256
> + (base32 "1d4s1z57yiyhgb6i22kb9al31j1fv9a4rp1bb747ny6grdvc4919"))
> + (file-name (git-file-name name version))))
My understanding is that Apple ships old versions of GNU software (or
modified versions thereof) for one reason: because they’re GPLv2+, not
GPLv3+.
Do you know if there are significant technical differences in this
modified Bash that would justify making a package for it?
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#65931
; Package
guix-patches
.
(Thu, 28 Sep 2023 00:11:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 65931 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> wrote:
> Hi,
>
> "B. Wilson" <elaexuotee <at> wilsonb.com> skribis:
>
> > * gnu/packages/apple.scm: New file.
> > * gnu/local.mk (GNU_SYSTEM_MODELS): Add it.
>
> [...]
>
> > +(define-public apple-bash
> > + (package
> > + (name "apple-bash")
> > + (version "125")
> > + (source
> > + (origin
> > + (method git-fetch)
> > + (uri (git-reference
> > + (url "https://github.com/apple-oss-distributions/bash.git")
> > + (commit (string-append "bash-" version))))
> > + (sha256
> > + (base32 "1d4s1z57yiyhgb6i22kb9al31j1fv9a4rp1bb747ny6grdvc4919"))
> > + (file-name (git-file-name name version))))
>
> My understanding is that Apple ships old versions of GNU software (or
> modified versions thereof) for one reason: because they’re GPLv2+, not
> GPLv3+.
>
> Do you know if there are significant technical differences in this
> modified Bash that would justify making a package for it?
>
> Thanks,
> Ludo’.
Thanks for taking a look at this, Ludovic.
It is also my understanding that this is based off GNU Bash 3.2. I'd be
hard-pressed to point at any particular changes and call them significant, but
there are a lot of small edge cases that add up, e.g. the special cases around
non-zero returns and set -e are pretty different.
This patch is part of a larger project of mine to get Apple utils packaged up.
It's super useful to have them as a test target for shell script portability in
CIs and the like.
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Thu, 05 Oct 2023 12:45:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"B. Wilson" <elaexuotee <at> wilsonb.com>
:
bug acknowledged by developer.
(Thu, 05 Oct 2023 12:45:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 65931-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
"B. Wilson" <elaexuotee <at> wilsonb.com> skribis:
> It is also my understanding that this is based off GNU Bash 3.2. I'd be
> hard-pressed to point at any particular changes and call them significant, but
> there are a lot of small edge cases that add up, e.g. the special cases around
> non-zero returns and set -e are pretty different.
>
> This patch is part of a larger project of mine to get Apple utils packaged up.
> It's super useful to have them as a test target for shell script portability in
> CIs and the like.
Alright, that makes sense to me.
Applied with the changes below, thanks!
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/apple.scm b/gnu/packages/apple.scm
index 6b181a1fdc..b59eee1802 100644
--- a/gnu/packages/apple.scm
+++ b/gnu/packages/apple.scm
@@ -52,6 +52,8 @@ (define-public apple-bash
(substitute* "execute_cmd.c"
(("EBADEXEC") "ENOEXEC")))))))
(home-page "https://github.com/apple-oss-distributions/bash/")
- (synopsis "Bash used on Apple MacOS systems")
- (description "This is the version of Bash released on Apple MacOS systems")
- (license license:gpl3+)))
+ (synopsis "Bash used on Apple macOS systems")
+ (description
+ "This is the version of Bash, forked from GNU Bash 3.2, released on Apple
+macOS systems.")
+ (license license:gpl2+)))
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 03 Nov 2023 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 188 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.