[PATCH core-updates 0/5] Package cleanups: Guile, GnuTLS, ncurses

  • Done
  • quality assurance status badge
Details
2 participants
  • Andreas Enge
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 25 Feb 2023 19:55
(address . guix-patches@gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230225185544.5152-1-ludo@gnu.org
Hello!

Here’s a patch series that’s hopefully not too late, cleaning up core
packages and thus introducing a world rebuild.

I realize this will be annoying to people like Andreas who have been
testing things much higher in the stack (Chromium!). What we could do
is have ci.guix build more than the “core” subset (the current setting);
it could build ‘etc/release-manifest.scm’, which contains things up
to IceCat.

Thoughts?

Ludo’.

Ludovic Courtès (5):
gnu: guile: Remove input labels.
gnu: gnutls: Remove Guile dependency.
gnu: gnutls: Deprecate 'gnutls-latest'.
gnu: gettext: Remove input label.
gnu: ncurses: Rewrite using gexps.

gnu/packages/base.scm | 4 +-
gnu/packages/gettext.scm | 5 +-
gnu/packages/guile.scm | 60 ++++----
gnu/packages/ncurses.scm | 301 +++++++++++++++++++--------------------
gnu/packages/tls.scm | 62 +++-----
5 files changed, 200 insertions(+), 232 deletions(-)


base-commit: cb3332808f42beb4c08970ed792875ee145b715c
--
2.39.1
L
L
Ludovic Courtès wrote on 25 Feb 2023 20:00
[PATCH core-updates 1/5] gnu: guile: Remove input labels.
(address . 61790@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230225190030.5289-1-ludo@gnu.org
* gnu/packages/base.scm (libiconv-if-needed): Remove input label.
* gnu/packages/guile.scm (guile-2.0)[native-inputs, inputs]
[propagated-inputs]: Remove labels.
(guile-next)[native-inputs]: Change "self" to "guile".
(make-guile-readline): Adjust 'inputs' and 'propagated-inputs'
accordingly.
---
gnu/packages/base.scm | 4 +--
gnu/packages/guile.scm | 60 ++++++++++++++++++++++--------------------
2 files changed, 33 insertions(+), 31 deletions(-)

Toggle diff (118 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 558abf8492..2fcb02ffd9 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2019 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
@@ -1546,7 +1546,7 @@ (define* (libiconv-if-needed #:optional (target (%current-target-system)))
;; POSIX C libraries provide iconv. Platforms with an incomplete libc
;; without iconv, such as MinGW, must return the then clause.
(if (target-mingw? target)
- `(("libiconv" ,libiconv))
+ (list libiconv)
'()))
(define-public (canonical-package package)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 92658a2d69..c2ffbefeec 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -157,32 +157,35 @@ (define-public guile-2.0
(build-system gnu-build-system)
;; When cross-compiling, a native version of Guile itself is needed.
- (native-inputs `(,@(if (%current-target-system)
- `(("self" ,this-package))
- '())
- ("pkgconfig" ,pkg-config)))
- (inputs `(("libffi" ,libffi)
- ,@(libiconv-if-needed)
+ (native-inputs
+ (append (list pkg-config)
+ (if (%current-target-system)
+ (list this-package)
+ '())))
+ (inputs
+ (append (list libffi)
+ (libiconv-if-needed)
- ;; We need Bash when cross-compiling because some of the scripts
- ;; in bin/ refer to it. Use 'bash-minimal' because we don't need
- ;; an interactive Bash with Readline and all.
- ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
+ ;; We need Bash when cross-compiling because some of the scripts
+ ;; in bin/ refer to it. Use 'bash-minimal' because we don't need
+ ;; an interactive Bash with Readline and all.
+ (if (target-mingw?) '() (list bash-minimal))))
(propagated-inputs
- `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
- ;; reads `-lltdl -lunistring', adding them here will add the needed
- ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
- ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
- ("libunistring" ,libunistring)
+ (list
+ ;; These ones aren't normally needed here, but since `libguile-2.0.la'
+ ;; reads `-lltdl -lunistring', adding them here will add the needed
+ ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
+ ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
+ libunistring
- ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
- ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
- ("libltdl" ,libltdl)
+ ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
+ ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
+ libltdl
- ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
- ;; must be propagated.
- ("bdw-gc" ,libgc)
- ("gmp" ,gmp)))
+ ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
+ ;; must be propagated.
+ libgc
+ gmp))
(outputs '("out" "debug"))
@@ -247,7 +250,8 @@ (define-public guile-2.0
(license license:lgpl3+)))
(define-public guile-2.2
- (package (inherit guile-2.0)
+ (package
+ (inherit guile-2.0)
(name "guile")
(version "2.2.7")
(source (origin
@@ -453,7 +457,7 @@ (define-public guile-next
gnu-gettext
texinfo
gperf)
- (replace "self" this-package)))
+ (replace "guile" this-package)))
(synopsis "Development version of GNU Guile"))))
(define* (make-guile-readline guile #:optional (name "guile-readline"))
@@ -501,11 +505,9 @@ (define* (make-guile-readline guile #:optional (name "guile-readline"))
#t)))))
(home-page (package-home-page guile))
(native-inputs (package-native-inputs guile))
- (inputs
- `(,@(package-inputs guile) ;to placate 'configure'
- ,@(package-propagated-inputs guile)
- ("guile" ,guile)
- ("readline" ,readline)))
+ (propagated-inputs (package-propagated-inputs guile))
+ (inputs (modify-inputs (package-inputs guile)
+ (prepend guile readline)))
(synopsis "Line editing support for GNU Guile")
(description
"This module provides line editing support via the Readline library for
--
2.39.1
L
L
Ludovic Courtès wrote on 25 Feb 2023 20:00
[PATCH core-updates 2/5] gnu: gnutls: Remove Guile dependency.
(address . 61790@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230225190030.5289-2-ludo@gnu.org
* gnu/packages/tls.scm (gnutls)[arguments]: Remove --with-guile-*
configure flags.
[native-inputs]: Remove GUILE-3.0.
[inputs]: Likewise, and add LIBUNISTRING.
(gnutls-latest)[inputs, native-inputs]: Remove.
(guile2.2-gnutls): Rewrite as a variant of GUILE-GNUTLS.
---
gnu/packages/tls.scm | 42 +++++++++++++-----------------------------
1 file changed, 13 insertions(+), 29 deletions(-)

Toggle diff (94 lines)
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 9b2669e095..7a85cfe5bc 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2017, 2019-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2017, 2019-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
@@ -232,15 +232,6 @@ (define-public gnutls
;; independently. This seems suboptimal.
"--with-default-trust-store-dir=/etc/ssl/certs"
- ;; Tell the build system that we want Guile bindings installed to
- ;; the output instead of Guiles own module directory.
- (string-append "--with-guile-site-dir="
- "$(datarootdir)/guile/site/$(GUILE_EFFECTIVE_VERSION)")
- (string-append "--with-guile-site-ccache-dir="
- "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache")
- (string-append "--with-guile-extension-dir="
- "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/extensions")
-
(let ((system #$(or (%current-target-system)
(%current-system))))
(if (string-prefix? "mips64el" system)
@@ -276,17 +267,13 @@ (define-public gnutls
(native-inputs
(append (list pkg-config texinfo which
util-linux) ;one test needs 'setsid'
- (if (%current-target-system) ;for cross-build
- (list guile-3.0) ;to create .go files
- '())
(if (hurd-target?)
'()
(list net-tools
iproute ;for 'ss'
socat ;several tests rely on it
datefudge)))) ;tests rely on 'datefudge'
- (inputs
- (list guile-3.0))
+ (inputs (list libunistring))
(propagated-inputs
;; These are all in the 'Requires.private' field of gnutls.pc.
(append (list libtasn1 libidn2 nettle zlib)
@@ -319,14 +306,7 @@ (define-public gnutls-latest
"gnutls-cross.patch"))
(sha256
(base32
- "01i1gl15k6qwvxmxx0by1mn9nlmcmym18wdpm7dn9awfsp8474dy"))))
-
- ;; Disable Guile bindings: they are now provided by Guile-GnuTLS.
- (inputs (modify-inputs (package-inputs gnutls)
- (delete "guile")
- (append libunistring))) ;GnuTLS depends on it
- (native-inputs (modify-inputs (package-native-inputs gnutls)
- (delete "guile")))))
+ "01i1gl15k6qwvxmxx0by1mn9nlmcmym18wdpm7dn9awfsp8474dy"))))))
(define-public gnutls/dane
;; GnuTLS with build libgnutls-dane, implementing DNS-based
@@ -338,12 +318,6 @@ (define-public gnutls/dane
(inputs (modify-inputs (package-inputs gnutls)
(prepend unbound)))))
-(define-public guile2.2-gnutls
- (package/inherit gnutls
- (name "guile2.2-gnutls")
- (inputs (modify-inputs (package-inputs gnutls)
- (replace "guile" guile-2.2)))))
-
(define-public guile-gnutls
(package
;; This package supersedes the Guile bindings that came with GnuTLS until
@@ -407,6 +381,16 @@ (define-public guile-gnutls
bindings that were formerly provided as part of GnuTLS.")
(license license:lgpl2.1+)))
+(define-public guile2.2-gnutls
+ (package/inherit guile-gnutls
+ (name "guile2.2-gnutls")
+ (native-inputs
+ (modify-inputs (package-native-inputs guile-gnutls)
+ (replace "guile" guile-2.2)))
+ (inputs
+ (modify-inputs (package-inputs guile-gnutls)
+ (replace "guile" guile-2.2)))))
+
(define (target->openssl-target target)
"Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling
OpenSSL for TARGET."
--
2.39.1
L
L
Ludovic Courtès wrote on 25 Feb 2023 20:00
[PATCH core-updates 3/5] gnu: gnutls: Deprecate 'gnutls-latest'.
(address . 61790@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230225190030.5289-3-ludo@gnu.org
* gnu/packages/tls.scm (gnutls-latest): Define as a deprecated alias for
'gnutls'.
(guile-gnutls)[inputs, native-inputs]: Replace 'gnutls-latest' with 'gnutls'.
---
gnu/packages/tls.scm | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 7a85cfe5bc..e5e21b5498 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -40,6 +40,7 @@
(define-module (gnu packages tls)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix deprecation)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -293,20 +294,7 @@ (define-public gnutls
(properties '((ftp-server . "ftp.gnutls.org")
(ftp-directory . "/gcrypt/gnutls")))))
-(define-public gnutls-latest
- (package
- (inherit gnutls)
- (version "3.7.7")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnupg/gnutls/v"
- (version-major+minor version)
- "/gnutls-" version ".tar.xz"))
- (patches (search-patches "gnutls-skip-trust-store-test.patch"
- "gnutls-cross.patch"))
- (sha256
- (base32
- "01i1gl15k6qwvxmxx0by1mn9nlmcmym18wdpm7dn9awfsp8474dy"))))))
+(define-deprecated/public-alias gnutls-latest gnutls)
(define-public gnutls/dane
;; GnuTLS with build libgnutls-dane, implementing DNS-based
@@ -363,14 +351,14 @@ (define-public guile-gnutls
libtool
pkg-config
texinfo
- gnutls-latest ;XXX: 'guile-snarf' invokes the native 'cpp'
- guile-3.0
+ gnutls
+ guile-3.0 ;XXX: 'guile-snarf' invokes the native 'cpp'
(gnulib-checkout
#:version "2022-12-06"
#:commit "440b528b1d81dd31b2a2e4dde20d5c837c147811"
#:hash (base32 "15mq43abbnkbamchc9lynrvrd5ql8qacgyx2ph4kkngxf1bz3pqy"))))
(inputs
- (list gnutls-latest
+ (list gnutls
guile-3.0))
(properties '((release-tag-prefix . "v")
(release-tag-version-delimiter . ".")))
--
2.39.1
L
L
Ludovic Courtès wrote on 25 Feb 2023 20:00
[PATCH core-updates 4/5] gnu: gettext: Remove input label.
(address . 61790@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230225190030.5289-4-ludo@gnu.org
* gnu/packages/gettext.scm (gnu-gettext)[native-inputs]: Remove label.
---
gnu/packages/gettext.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index 0cc424acae..193786028b 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -169,9 +169,8 @@ (define-public gnu-gettext
(with-directory-excursion
(string-append (assoc-ref outputs "out")
"/share/emacs/site-lisp")
- (symlink "start-po.el" "gettext-autoloads.el")
- #t)))))))
- (native-inputs `(("emacs" ,emacs-minimal))) ; for Emacs tools
+ (symlink "start-po.el" "gettext-autoloads.el"))))))))
+ (native-inputs (list emacs-minimal)) ;for Emacs tools
(synopsis "Tools and documentation for translation")))
(define-public libtextstyle
--
2.39.1
L
L
Ludovic Courtès wrote on 25 Feb 2023 20:00
[PATCH core-updates 5/5] gnu: ncurses: Rewrite using gexps.
(address . 61790@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230225190030.5289-5-ludo@gnu.org
* gnu/packages/ncurses.scm (ncurses-rollup-patch): New procedure.
(ncurses)[arguments]: Rewrite using gexps.
[native-inputs]: Remove labels and remove "rollup-patch" input.
(ncurses/gpm, ncurses/tinfo): Rewrite using gexps and remove input
label.
---
gnu/packages/ncurses.scm | 301 +++++++++++++++++++--------------------
1 file changed, 148 insertions(+), 153 deletions(-)

Toggle diff (357 lines)
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index 5b00da25bb..a191c29854 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2018, 2019, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016 Nikita <nikita@n0.is>
@@ -27,6 +27,7 @@
(define-module (gnu packages ncurses)
#:use-module (gnu packages)
#:use-module (guix licenses)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
@@ -37,8 +38,22 @@ (define-module (gnu packages ncurses)
#:use-module (gnu packages swig)
#:use-module (gnu packages linux)
#:use-module (guix utils)
+ #:use-module ((guix memoization) #:select (mlambda))
#:use-module (ice-9 match))
+(define ncurses-rollup-patch
+ (mlambda (version)
+ (origin
+ (method url-fetch)
+ (uri (match (string-split (version-major+minor+point version) #\.)
+ ((major minor point)
+ (string-append "https://invisible-mirror.net/archives"
+ "/ncurses/" major "." minor "/ncurses-"
+ major "." minor "-" point "-patch.sh.bz2"))))
+ (sha256
+ (base32
+ "1b6522cvi4066bgh9lp93q8lk93zcjjssvnw1512z447xvazy2y6")))))
+
(define-public ncurses
(package
(name "ncurses")
@@ -56,170 +71,152 @@ (define-public ncurses
"doc")) ;1 MiB of man pages
(arguments
(let ((patch-makefile-phase
- '(lambda _
- (for-each patch-makefile-SHELL
- (find-files "." "Makefile.in"))))
+ #~(lambda _
+ (for-each patch-makefile-SHELL
+ (find-files "." "Makefile.in"))))
(configure-phase
;; The 'configure' script does not understand '--docdir', so we must
;; override that and use '--mandir' instead.
- '(lambda* (#:key build target outputs configure-flags
- #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (apply invoke "./configure"
- (string-append "SHELL=" (which "sh"))
- (string-append "--build=" build)
- (string-append "--prefix=" out)
- (string-append "--mandir=" doc "/share/man")
- (if target
- (cons (string-append "--host=" target)
- configure-flags)
- configure-flags)))))
+ #~(lambda* (#:key build target outputs configure-flags
+ #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (apply invoke "./configure"
+ (string-append "SHELL=" (which "sh"))
+ (string-append "--build=" build)
+ (string-append "--prefix=" out)
+ (string-append "--mandir=" doc "/share/man")
+ (if target
+ (cons (string-append "--host=" target)
+ configure-flags)
+ configure-flags)))))
(apply-rollup-patch-phase
;; Ncurses distributes "stable" patchsets to be applied on top
;; of the release tarball. These are only available as shell
;; scripts(!) so we decompress and apply them in a phase.
;; See <https://invisible-mirror.net/archives/ncurses/6.1/README>.
- '(lambda* (#:key inputs native-inputs #:allow-other-keys)
- (let ((rollup-patch (assoc-ref (or native-inputs inputs)
- "rollup-patch")))
- (when rollup-patch
- (copy-file rollup-patch
- (string-append (getcwd) "/rollup-patch.sh.bz2"))
- (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
- (invoke "sh" "rollup-patch.sh")))))
+ #~(lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (let ((rollup-patch #$(ncurses-rollup-patch
+ (package-version this-package))))
+ (copy-file rollup-patch
+ (string-append (getcwd) "/rollup-patch.sh.bz2"))
+ (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
+ (invoke "sh" "rollup-patch.sh"))))
(remove-shebang-phase
- '(lambda _
- ;; To avoid retaining a reference to the bootstrap Bash via the
- ;; shebang of the 'ncursesw6-config' script, simply remove that
- ;; shebang: it'll work just as well without it. Likewise, do not
- ;; retain a reference to the "doc" output.
- (substitute* "misc/ncurses-config.in"
- (("#!@SHELL@")
- "# No shebang here, use /bin/sh!\n")
- (("@SHELL@ \\$0")
- "$0")
- (("mandir=.*$")
- "mandir=share/man"))))
+ #~(lambda _
+ ;; To avoid retaining a reference to the bootstrap Bash via the
+ ;; shebang of the 'ncursesw6-config' script, simply remove that
+ ;; shebang: it'll work just as well without it. Likewise, do not
+ ;; retain a reference to the "doc" output.
+ (substitute* "misc/ncurses-config.in"
+ (("#!@SHELL@")
+ "# No shebang here, use /bin/sh!\n")
+ (("@SHELL@ \\$0")
+ "$0")
+ (("mandir=.*$")
+ "mandir=share/man"))))
(post-install-phase
- `(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; When building a wide-character (Unicode) build, create backward
- ;; compatibility links from the the "normal" libraries to the
- ;; wide-character ones (e.g. libncurses.so to libncursesw.so).
- ,@(if (target-mingw?)
- '( ;; TODO: create .la files to link to the .dll?
- (with-directory-excursion (string-append out "/bin")
- (for-each
- (lambda (lib)
- (define lib.dll
- (string-append "lib" lib ".dll"))
- (define libw6.dll
- (string-append "lib" lib "w6.dll"))
+ #~(lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; When building a wide-character (Unicode) build, create backward
+ ;; compatibility links from the the "normal" libraries to the
+ ;; wide-character ones (e.g. libncurses.so to libncursesw.so).
+ #$@(if (target-mingw?)
+ '( ;; TODO: create .la files to link to the .dll?
+ (with-directory-excursion (string-append out "/bin")
+ (for-each
+ (lambda (lib)
+ (define lib.dll
+ (string-append "lib" lib ".dll"))
+ (define libw6.dll
+ (string-append "lib" lib "w6.dll"))
- (when (file-exists? libw6.dll)
- (format #t "creating symlinks for `lib~a'~%" lib)
- (symlink libw6.dll lib.dll)))
- '("curses" "ncurses" "form" "panel" "menu"))))
- '())
- (with-directory-excursion (string-append out "/lib")
- (for-each (lambda (lib)
- (define libw.a
- (string-append "lib" lib "w.a"))
- (define lib.a
- (string-append "lib" lib ".a"))
+ (when (file-exists? libw6.dll)
+ (format #t "creating symlinks for `lib~a'~%" lib)
+ (symlink libw6.dll lib.dll)))
+ '("curses" "ncurses" "form" "panel" "menu"))))
+ #~())
+ (with-directory-excursion (string-append out "/lib")
+ (for-each (lambda (lib)
+ (define libw.a
+ (string-append "lib" lib "w.a"))
+ (define lib.a
+ (string-append "lib" lib ".a"))
- ,@(if (not (target-mingw?))
- '((define libw.so.x
- (string-append "lib" lib "w.so.6"))
- (define lib.so.x
- (string-append "lib" lib ".so.6"))
- (define lib.so
- (string-append "lib" lib ".so"))
- (define packagew.pc
- (string-append lib "w.pc"))
- (define package.pc
- (string-append lib ".pc")))
- '())
+ #$@(if (not (target-mingw?))
+ #~((define libw.so.x
+ (string-append "lib" lib "w.so.6"))
+ (define lib.so.x
+ (string-append "lib" lib ".so.6"))
+ (define lib.so
+ (string-append "lib" lib ".so"))
+ (define packagew.pc
+ (string-append lib "w.pc"))
+ (define package.pc
+ (string-append lib ".pc")))
+ #~())
- (when (file-exists? libw.a)
- (format #t "creating symlinks for `lib~a'~%" lib)
- (symlink libw.a lib.a)
- ,@(if (not (target-mingw?))
- '((symlink libw.so.x lib.so.x)
- (false-if-exception (delete-file lib.so))
- (call-with-output-file lib.so
- (lambda (p)
- (format p "INPUT (-l~aw)~%" lib)))
- (with-directory-excursion "pkgconfig"
- (format #t "creating symlink for `~a'~%"
- package.pc)
- (when (file-exists? packagew.pc)
- (symlink packagew.pc package.pc))))
- '())))
- '("curses" "ncurses" "form" "panel" "menu")))))))
- `(#:configure-flags
- ,(cons*
- 'quasiquote
- `(("--with-shared" "--without-debug" "--enable-widec"
+ (when (file-exists? libw.a)
+ (format #t "creating symlinks for `lib~a'~%" lib)
+ (symlink libw.a lib.a)
+ #$@(if (not (target-mingw?))
+ '((symlink libw.so.x lib.so.x)
+ (false-if-exception (delete-file lib.so))
+ (call-with-output-file lib.so
+ (lambda (p)
+ (format p "INPUT (-l~aw)~%" lib)))
+ (with-directory-excursion "pkgconfig"
+ (format #t "creating symlink for `~a'~%"
+ package.pc)
+ (when (file-exists? packagew.pc)
+ (symlink packagew.pc package.pc))))
+ #~())))
+ '("curses" "ncurses" "form" "panel" "menu")))))))
+ (list #:configure-flags
+ #~`("--with-shared" "--without-debug" "--enable-widec"
- "--enable-pc-files"
- ,(list 'unquote '(string-append "--with-pkg-config-libdir="
- (assoc-ref %outputs "out")
- "/lib/pkgconfig"))
+ "--enable-pc-files"
+ ,(string-append "--with-pkg-config-libdir="
+ #$output "/lib/pkgconfig")
- ;; By default headers land in an `ncursesw' subdir, which is not
- ;; what users expect.
- ,(list 'unquote '(string-append "--includedir=" (assoc-ref %outputs "out")
- "/include"))
- "--enable-overwrite" ;really honor --includedir
+ ;; By default headers land in an `ncursesw' subdir, which is not
+ ;; what users expect.
+ ,(string-append "--includedir=" #$output "/include")
+ "--enable-overwrite" ;really honor --includedir
- ;; Make sure programs like 'tic', 'reset', and 'clear' have a
- ;; correct RUNPATH.
- ,(list 'unquote '(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out")
- "/lib"))
+ ;; Make sure programs like 'tic', 'reset', and 'clear' have a
+ ;; correct RUNPATH.
+ ,(string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
- ;; Starting from ncurses 6.1, "make install" runs "install -s"
- ;; by default, which doesn't work for cross-compiled binaries
- ;; because it invokes 'strip' instead of 'TRIPLET-strip'. Work
- ;; around this.
- ,@(if (%current-target-system) '("--disable-stripping") '())
+ ;; Starting from ncurses 6.1, "make install" runs "install -s"
+ ;; by default, which doesn't work for cross-compiled binaries
+ ;; because it invokes 'strip' instead of 'TRIPLET-strip'. Work
+ ;; around this.
+ #$@(if (%current-target-system) #~("--disable-stripping") #~())
- ;; Do not assume a default search path in ld, even if it is only to
- ;; filter it out in ncurses-config. Mainly because otherwise it ends
- ;; up using the libdir from binutils, which makes little sense and
- ;; causes an unnecessary runtime dependency.
- "cf_cv_ld_searchpath=/no-ld-searchpath"
+ ;; Do not assume a default search path in ld, even if it is only to
+ ;; filter it out in ncurses-config. Mainly because otherwise it ends
+ ;; up using the libdir from binutils, which makes little sense and
+ ;; causes an unnecessary runtime dependency.
+ "cf_cv_ld_searchpath=/no-ld-searchpath"
- ;; MinGW: Use term-driver created for the MinGW port.
- ,@(if (target-mingw?) '("--enable-term-driver") '()))))
- #:tests? #f ; no "check" target
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'apply-rollup-patch
- ,apply-rollup-patch-phase)
- (replace 'configure ,configure-phase)
- (add-after 'install 'post-install
- ,post-install-phase)
- (add-before 'configure 'patch-makefile-SHELL
- ,patch-makefile-phase)
- (add-before 'patch-source-shebangs 'remove-unneeded-shebang
- ,remove-shebang-phase)))))
+ ;; MinGW: Use term-driver created for the MinGW port.
+ #$@(if (target-mingw?) #~("--enable-term-driver") #~()))
+ #:tests? #f ; no "check" target
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'apply-rollup-patch
+ #$apply-rollup-patch-phase)
+ (replace 'configure #$configure-phase)
+ (add-after 'install 'post-install
+ #$post-install-phase)
+ (add-before 'configure 'patch-makefile-SHELL
+ #$patch-makefile-phase)
+ (add-before 'patch-source-shebangs 'remove-unneeded-shebang
+ #$remove-shebang-phase)))))
(native-inputs
- `(,@(if (%current-target-system)
- `(("self" ,this-package)) ;for `tic'
- '())
- ("rollup-patch"
- ,(origin
- (method url-fetch)
- (uri (match (string-split (version-major+minor+point version) #\.)
- ((major minor point)
- (string-append "https://invisible-mirror.net/archives"
- "/ncurses/" major "." minor "/ncurses-"
- major "." minor "-" point "-patch.sh.bz2"))))
- (sha256
- (base32
- "1b6522cvi4066bgh9lp93q8lk93zcjjssvnw1512z447xvazy2y6"))))
- ("pkg-config" ,pkg-config)))
+ (if (%current-target-system)
+ (list pkg-config this-package) ;for 'tic'
+ (list pkg-config)))
(native-search-paths
(list (search-path-specification
(variable "TERMINFO_DIRS")
@@ -240,12 +237,11 @@ (define-public ncurses/gpm
(arguments
(substitute-keyword-arguments (package-arguments ncurses)
((#:configure-flags cf)
- `(cons (string-append "--with-gpm="
- (assoc-ref %build-inputs "gpm")
- "/lib/libgpm.so.2")
- ,cf))))
- (inputs
- `(("gpm" ,gpm)))))
+ #~(cons (string-append "--with-gpm="
+ #$(this-package-input "gpm")
+ "/lib/libgpm.so.2")
+ #$cf))))
+ (inputs (list gpm))))
;; Needed by u-boot 2022.04+
;; Consider merging into ncurses for next core-updates
This message was truncated. Download the full message here.
L
L
Ludovic Courtès wrote on 25 Feb 2023 23:14
Re: bug#61790: [PATCH core-updates 0/5] Package cleanups: Guile, GnuTLS, ncurses
(address . 61790@debbugs.gnu.org)
877cw5v1dz.fsf@gnu.org
Hey!

I passed a long list of ‘--add-header="X-Debbugs-Cc: …"’ flags to ‘git
format-patch’ in an attempt to reach the whole ‘core’ team + Andreas,
but it turns out that only the last ‘--add-header’ option had an effect
(or rather it overrode all the previous occurrences). We really need to
provide reliable instructions for teams.

Anyway, here’s a patch set!


Ludo’.

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (31 lines)
> Hello!
>
> Here’s a patch series that’s hopefully not too late, cleaning up core
> packages and thus introducing a world rebuild.
>
> I realize this will be annoying to people like Andreas who have been
> testing things much higher in the stack (Chromium!). What we could do
> is have ci.guix build more than the “core” subset (the current setting);
> it could build ‘etc/release-manifest.scm’, which contains things up
> to IceCat.
>
> Thoughts?
>
> Ludo’.
>
> Ludovic Courtès (5):
> gnu: guile: Remove input labels.
> gnu: gnutls: Remove Guile dependency.
> gnu: gnutls: Deprecate 'gnutls-latest'.
> gnu: gettext: Remove input label.
> gnu: ncurses: Rewrite using gexps.
>
> gnu/packages/base.scm | 4 +-
> gnu/packages/gettext.scm | 5 +-
> gnu/packages/guile.scm | 60 ++++----
> gnu/packages/ncurses.scm | 301 +++++++++++++++++++--------------------
> gnu/packages/tls.scm | 62 +++-----
> 5 files changed, 200 insertions(+), 232 deletions(-)
>
>
> base-commit: cb3332808f42beb4c08970ed792875ee145b715c
A
A
Andreas Enge wrote on 26 Feb 2023 13:29
(name . Ludovic Courtès)(address . ludo@gnu.org)
Y/tQv618r0d0LxDA@jurong
Am Sat, Feb 25, 2023 at 11:14:16PM +0100 schrieb Ludovic Courtès:
Toggle quote (3 lines)
> Here’s a patch series that’s hopefully not too late, cleaning up core
> packages and thus introducing a world rebuild.

I am not too worried about a world rebuild, but more about introducing new
build failures, leading to indefinite delays. At first glance, the patches
do not look like they have a high risk, but who knows?
A
A
Andreas Enge wrote on 26 Feb 2023 13:31
(name . Ludovic Courtès)(address . ludo@gnu.org)
Y/tRHn18pwWoVuLb@jurong
Maybe it would be safer to leave them out for the moment, and to start
a feature branch "core" right after the core-updates merge?

In any case, having a CI job would be very welcome, so that people could
more easily test packages closer to the leaves than the root of the
package graph.

Andreas
L
L
Ludovic Courtès wrote on 26 Feb 2023 18:16
(name . Andreas Enge)(address . andreas@enge.fr)
87zg90tkht.fsf_-_@gnu.org
Hello!

Andreas Enge <andreas@enge.fr> skribis:

Toggle quote (4 lines)
> I am not too worried about a world rebuild, but more about introducing new
> build failures, leading to indefinite delays. At first glance, the patches
> do not look like they have a high risk, but who knows?

[…]

Toggle quote (3 lines)
> Maybe it would be safer to leave them out for the moment, and to start
> a feature branch "core" right after the core-updates merge?

There’s always a risk of course, though I think it’s pretty low in this
case (I built everything up to guile{,2.2}-gnutls, which includes like
8h spent in ‘nss’ tests). Removing the dependency of GnuTLS on Guile is
the most desirable part; the rest is more cosmetic.

We can delay that until after ‘core-updates’ too, but that might take a
quite a bit of red. :-)

Thoughts? Tough choices!

Ludo’.
A
A
Andreas Enge wrote on 26 Feb 2023 18:25
(name . Ludovic Courtès)(address . ludo@gnu.org)
Y/uV7kfo0Q55MchY@jurong
Am Sun, Feb 26, 2023 at 06:16:46PM +0100 schrieb Ludovic Courtès:
Toggle quote (5 lines)
> There’s always a risk of course, though I think it’s pretty low in this
> case (I built everything up to guile{,2.2}-gnutls, which includes like
> 8h spent in ‘nss’ tests). Removing the dependency of GnuTLS on Guile is
> the most desirable part; the rest is more cosmetic.

Okay, if you tried it locally, then I think we can take the risk.

Andreas
L
L
Ludovic Courtès wrote on 26 Feb 2023 22:50
(name . Andreas Enge)(address . andreas@enge.fr)
87r0uct7td.fsf_-_@gnu.org
Andreas Enge <andreas@enge.fr> skribis:

Toggle quote (8 lines)
> Am Sun, Feb 26, 2023 at 06:16:46PM +0100 schrieb Ludovic Courtès:
>> There’s always a risk of course, though I think it’s pretty low in this
>> case (I built everything up to guile{,2.2}-gnutls, which includes like
>> 8h spent in ‘nss’ tests). Removing the dependency of GnuTLS on Guile is
>> the most desirable part; the rest is more cosmetic.
>
> Okay, if you tried it locally, then I think we can take the risk.

Alright, pushed as 4895846197bd445dd68c832364c667dea4337f8c.

Thank you for your understanding! :-)

Ludo’.
Closed
?