[PATCH] gnu: screen: Update to 5.0.0

  • Done
  • quality assurance status badge
Details
2 participants
  • Andy Tai
  • Ludovic Courtès
Owner
unassigned
Submitted by
Andy Tai
Severity
normal

Debbugs page

Andy Tai wrote 6 months ago
(address . guix-patches@gnu.org)(name . Andy Tai)(address . atai@atai.org)
e468db3e0fa6f0260bdffb3dfaf45dd21081cf7c.1724999417.git.atai@atai.org
* gnu/packages/patches/screen-hurd-path-max.patch: Update for screen 5.0.0.
* gnu/packages/screen.scm (screen): Update to 5.0.0.
[arguments]<#:configure-flags: Add "CFLAGS=-D_GNU_SOURCE=1".
[inputs]: Add linux-pam.

Change-Id: Iebc5eff0128ff7f4d27a22cca1bd4a025aca3244
---
.../patches/screen-hurd-path-max.patch | 33 ++++++-------------
gnu/packages/screen.scm | 12 ++++---
2 files changed, 18 insertions(+), 27 deletions(-)

Toggle diff (100 lines)
diff --git a/gnu/packages/patches/screen-hurd-path-max.patch b/gnu/packages/patches/screen-hurd-path-max.patch
index e906f154f3..6c474d0d11 100644
--- a/gnu/packages/patches/screen-hurd-path-max.patch
+++ b/gnu/packages/patches/screen-hurd-path-max.patch
@@ -6,30 +6,17 @@ Description: Set PATH_MAX to 4096 if undefined
Fixes FTBFS since 4.4.0 on GNU/Hurd. Updated to add one more occurrence for 4.5.0.
Author: Axel Beckert <abe@debian.org>
Bug: https://savannah.gnu.org/bugs/?50089
-Last-Updated: 2017-01-18
+Updated: 2017-01-18
+Updated: 2024-08-30 for GNU Screen 5.0.0
---- a/tty.sh
-+++ b/tty.sh
-@@ -1478,6 +1478,13 @@
- return 0;
- }
-
-+/*
-+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
-+ */
-+
-+#ifndef PATH_MAX
-+#define PATH_MAX 4096
-+#endif
-
- int CheckTtyname (char *tty)
- {
+diff --git a/screen.h b/screen.h
+index 308c365..bda05b4 100644
--- a/screen.h
+++ b/screen.h
-@@ -109,6 +109,13 @@
- # define DEFAULT_BUFFERFILE "/tmp/screen-exchange"
+@@ -63,6 +63,13 @@ struct mode {
#endif
-
+ };
+
+/*
+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
+ */
@@ -37,6 +24,6 @@ Last-Updated: 2017-01-18
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
-
- #if defined(hpux) && !(defined(VSUSP) && defined(VDSUSP) && defined(VWERASE) && defined(VLNEXT))
- # define HPUX_LTCHARS_HACK
+
+ #include "ansi.h"
+ #include "image.h"
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 7c16ee239a..c63472c1eb 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -34,6 +34,7 @@ (define-module (gnu packages screen)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages hurd)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
@@ -43,24 +44,27 @@ (define-module (gnu packages screen)
(define-public screen
(package
(name "screen")
- (version "4.9.1")
+ (version "5.0.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/screen/screen-"
version ".tar.gz"))
(patches (search-patches "screen-hurd-path-max.patch"))
(sha256
- (base32 "0sdc0ms6qxm4gbx0caw7pwghj5aw1h8syvxdhkac0w95qkiz7ki6"))))
+ (base32 "0wa9v6p7cna2scpimpvk9pgxaah80f4q0f2kln37qp0f1b83jjph"))))
(build-system gnu-build-system)
(native-inputs
(list autoconf automake texinfo))
(inputs
- (list ncurses perl))
+ (list linux-pam ncurses perl))
(arguments
`(#:configure-flags
+ ;; GNU_SOURCE must be defined for mallocmock_reset() to be defined
+ '("CFLAGS=-D_GNU_SOURCE=1"
+
;; By default, screen supports 16 colors, but we want 256 when
;; ~/.screenrc contains 'term xterm-256color'.
- '("--enable-colors256")))
+ "--enable-colors256")))
(home-page "https://www.gnu.org/software/screen/")
(synopsis "Full-screen window manager providing multiple terminals")
(description

base-commit: d5312370b46ace47e138d84e1bb28e5651cee94b
--
2.34.1
Andy Tai wrote 6 months ago
[PATCH v2] gnu: screen: Update to 5.0.0
(address . 72885@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
3094ea0169f5d37b90a1fccb4d495bdaa6ab6158.1725174170.git.atai@atai.org
* gnu/packages/patches/screen-hurd-path-max.patch: Update for screen 5.0.0.
* gnu/packages/screen.scm (screen): Update to 5.0.0.
[arguments]<#:configure-flags: Add "CFLAGS=-D_GNU_SOURCE=1".
[inputs]: Add linux-pam.

Change-Id: Iebc5eff0128ff7f4d27a22cca1bd4a025aca3244
---
.../patches/screen-hurd-path-max.patch | 33 ++++++-------------
gnu/packages/screen.scm | 12 ++++---
2 files changed, 18 insertions(+), 27 deletions(-)

Toggle diff (100 lines)
diff --git a/gnu/packages/patches/screen-hurd-path-max.patch b/gnu/packages/patches/screen-hurd-path-max.patch
index e906f154f3..338666aa09 100644
--- a/gnu/packages/patches/screen-hurd-path-max.patch
+++ b/gnu/packages/patches/screen-hurd-path-max.patch
@@ -6,30 +6,17 @@ Description: Set PATH_MAX to 4096 if undefined
Fixes FTBFS since 4.4.0 on GNU/Hurd. Updated to add one more occurrence for 4.5.0.
Author: Axel Beckert <abe@debian.org>
Bug: https://savannah.gnu.org/bugs/?50089
-Last-Updated: 2017-01-18
+Updated: 2017-01-18
+Updated: 2024-08-30 Update for Screen 5.0.0
---- a/tty.sh
-+++ b/tty.sh
-@@ -1478,6 +1478,13 @@
- return 0;
- }
-
-+/*
-+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
-+ */
-+
-+#ifndef PATH_MAX
-+#define PATH_MAX 4096
-+#endif
-
- int CheckTtyname (char *tty)
- {
+diff --git a/screen.h b/screen.h
+index 308c365..bda05b4 100644
--- a/screen.h
+++ b/screen.h
-@@ -109,6 +109,13 @@
- # define DEFAULT_BUFFERFILE "/tmp/screen-exchange"
+@@ -63,6 +63,13 @@ struct mode {
#endif
-
+ };
+
+/*
+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
+ */
@@ -37,6 +24,6 @@ Last-Updated: 2017-01-18
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
-
- #if defined(hpux) && !(defined(VSUSP) && defined(VDSUSP) && defined(VWERASE) && defined(VLNEXT))
- # define HPUX_LTCHARS_HACK
+
+ #include "ansi.h"
+ #include "image.h"
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 095f18d85e..30fd2783a8 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -37,6 +37,7 @@ (define-module (gnu packages screen)
#:use-module (gnu packages bash)
#:use-module (gnu packages crypto)
#:use-module (gnu packages hurd)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
@@ -46,24 +47,27 @@ (define-module (gnu packages screen)
(define-public screen
(package
(name "screen")
- (version "4.9.1")
+ (version "5.0.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/screen/screen-"
version ".tar.gz"))
(patches (search-patches "screen-hurd-path-max.patch"))
(sha256
- (base32 "0sdc0ms6qxm4gbx0caw7pwghj5aw1h8syvxdhkac0w95qkiz7ki6"))))
+ (base32 "0wa9v6p7cna2scpimpvk9pgxaah80f4q0f2kln37qp0f1b83jjph"))))
(build-system gnu-build-system)
(native-inputs
(list autoconf automake texinfo))
(inputs
- (list libxcrypt ncurses perl))
+ (list libxcrypt linux-pam ncurses perl))
(arguments
`(#:configure-flags
+ ;; GNU_SOURCE must be defined for mallocmock_reset() to be defined
+ '("CFLAGS=-D_GNU_SOURCE=1"
+
;; By default, screen supports 16 colors, but we want 256 when
;; ~/.screenrc contains 'term xterm-256color'.
- '("--enable-colors256")))
+ "--enable-colors256")))
(home-page "https://www.gnu.org/software/screen/")
(synopsis "Full-screen window manager providing multiple terminals")
(description

base-commit: 61a7930cb03f5eb9e8003bade21d61262c3db8df
--
2.34.1
Ludovic Courtès wrote 6 months ago
(name . Andy Tai)(address . atai@atai.org)(address . 72885@debbugs.gnu.org)
877cbtgdpg.fsf@gnu.org
Hello,

Andy Tai <atai@atai.org> skribis:

Toggle quote (7 lines)
> * gnu/packages/patches/screen-hurd-path-max.patch: Update for screen 5.0.0.
> * gnu/packages/screen.scm (screen): Update to 5.0.0.
> [arguments]<#:configure-flags: Add "CFLAGS=-D_GNU_SOURCE=1".
> [inputs]: Add linux-pam.
>
> Change-Id: Iebc5eff0128ff7f4d27a22cca1bd4a025aca3244

[...]

Toggle quote (2 lines)
> -+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd

Did you confirm that it still builds for GNU/Hurd?

You can test by cross-compiling with ‘--target=i586-pc-gnu’ or by
compiling natively, if you have configured the ‘hurd-vm’ service, with
‘--system=i586-gnu’.

Toggle quote (5 lines)
> (arguments
> `(#:configure-flags
> + ;; GNU_SOURCE must be defined for mallocmock_reset() to be defined
> + '("CFLAGS=-D_GNU_SOURCE=1"

This very likely removes the default flags, “-O2 -g”, which is something
we should not do (we’d get an unoptimized build and ‘--with-debug-info’
wouldn’t have the intended effect). I think you need to have:

"CFLAGS=-O2 -g -D_GNU_SOURCE=1"

instead. Please check the build log to make sure it has the intended
effect.

Could you send an updated patch?

Thanks,
Ludo’.
Andy Tai wrote 6 months ago
[PATCH v3] gnu: screen: Update to 5.0.0
(name . Andy Tai)(address . atai@atai.org)
e29c57c520672519f9d6ead815004b9120d3ff30.1725366543.git.atai@atai.org
* gnu/packages/patches/screen-hurd-path-max.patch: Update for screen 5.0.0.
* gnu/packages/screen.scm (screen): Update to 5.0.0.
[arguments]<#:configure-flags: Add "-D_GNU_SOURCE=1" to CFLAGS.
[inputs]: Add linux-pam.

Change-Id: Iebc5eff0128ff7f4d27a22cca1bd4a025aca3244
---
.../patches/screen-hurd-path-max.patch | 40 +++++++++----------
gnu/packages/screen.scm | 12 ++++--
2 files changed, 26 insertions(+), 26 deletions(-)

Toggle diff (108 lines)
diff --git a/gnu/packages/patches/screen-hurd-path-max.patch b/gnu/packages/patches/screen-hurd-path-max.patch
index e906f154f3..03b350e79e 100644
--- a/gnu/packages/patches/screen-hurd-path-max.patch
+++ b/gnu/packages/patches/screen-hurd-path-max.patch
@@ -6,14 +6,17 @@ Description: Set PATH_MAX to 4096 if undefined
Fixes FTBFS since 4.4.0 on GNU/Hurd. Updated to add one more occurrence for 4.5.0.
Author: Axel Beckert <abe@debian.org>
Bug: https://savannah.gnu.org/bugs/?50089
-Last-Updated: 2017-01-18
+Updated: 2017-01-18
+Updated: 2024-08-30 Update for Screen 5.0.0
+
+diff --git a/screen.h b/screen.h
+index 308c365..e71bd7f 100644
+--- a/screen.h
++++ b/screen.h
+@@ -63,6 +63,22 @@ struct mode {
+ #endif
+ };
---- a/tty.sh
-+++ b/tty.sh
-@@ -1478,6 +1478,13 @@
- return 0;
- }
-
+/*
+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
+ */
@@ -21,22 +24,15 @@ Last-Updated: 2017-01-18
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
-
- int CheckTtyname (char *tty)
- {
---- a/screen.h
-+++ b/screen.h
-@@ -109,6 +109,13 @@
- # define DEFAULT_BUFFERFILE "/tmp/screen-exchange"
- #endif
-
++
+/*
-+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
++ * similarly for MAXPATHLEN
+ */
+
-+#ifndef PATH_MAX
-+#define PATH_MAX 4096
++#ifndef MAXPATHLEN
++#define MAXPATHLEN PATH_MAX
+#endif
-
- #if defined(hpux) && !(defined(VSUSP) && defined(VDSUSP) && defined(VWERASE) && defined(VLNEXT))
- # define HPUX_LTCHARS_HACK
++
+
+ #include "ansi.h"
+ #include "image.h"
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 095f18d85e..e791f29190 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -37,6 +37,7 @@ (define-module (gnu packages screen)
#:use-module (gnu packages bash)
#:use-module (gnu packages crypto)
#:use-module (gnu packages hurd)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
@@ -46,24 +47,27 @@ (define-module (gnu packages screen)
(define-public screen
(package
(name "screen")
- (version "4.9.1")
+ (version "5.0.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/screen/screen-"
version ".tar.gz"))
(patches (search-patches "screen-hurd-path-max.patch"))
(sha256
- (base32 "0sdc0ms6qxm4gbx0caw7pwghj5aw1h8syvxdhkac0w95qkiz7ki6"))))
+ (base32 "0wa9v6p7cna2scpimpvk9pgxaah80f4q0f2kln37qp0f1b83jjph"))))
(build-system gnu-build-system)
(native-inputs
(list autoconf automake texinfo))
(inputs
- (list libxcrypt ncurses perl))
+ (list libxcrypt linux-pam ncurses perl))
(arguments
`(#:configure-flags
+ ;; GNU_SOURCE must be defined for mallocmock_reset() to be defined
+ '("CFLAGS=-O2 -g -D_GNU_SOURCE=1"
+
;; By default, screen supports 16 colors, but we want 256 when
;; ~/.screenrc contains 'term xterm-256color'.
- '("--enable-colors256")))
+ "--enable-colors256")))
(home-page "https://www.gnu.org/software/screen/")
(synopsis "Full-screen window manager providing multiple terminals")
(description

base-commit: 8f584d2bdb0a5a5e78f04ce0b468d99605157420
--
2.34.1
Andy Tai wrote 6 months ago
Re: [bug#72885] [PATCH v2] gnu: screen: Update to 5.0.0
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 72885@debbugs.gnu.org)
CAJsg1E9SmFj3n8Ev0D=oCAcnMfA50ZZaDYMbHkRHzXUi7_sNWQ@mail.gmail.com
Updated patch sent, CFLAGS updated, Hurd cross compiling OK.

On Tue, Sep 3, 2024 at 4:48 AM Ludovic Courtès <ludo@gnu.org> wrote:
Toggle quote (40 lines)
>
> Hello,
>
> Andy Tai <atai@atai.org> skribis:
>
> > * gnu/packages/patches/screen-hurd-path-max.patch: Update for screen 5.0.0.
> > * gnu/packages/screen.scm (screen): Update to 5.0.0.
> > [arguments]<#:configure-flags: Add "CFLAGS=-D_GNU_SOURCE=1".
> > [inputs]: Add linux-pam.
> >
> > Change-Id: Iebc5eff0128ff7f4d27a22cca1bd4a025aca3244
>
> [...]
>
> > -+ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
>
> Did you confirm that it still builds for GNU/Hurd?
>
> You can test by cross-compiling with ‘--target=i586-pc-gnu’ or by
> compiling natively, if you have configured the ‘hurd-vm’ service, with
> ‘--system=i586-gnu’.
>
> > (arguments
> > `(#:configure-flags
> > + ;; GNU_SOURCE must be defined for mallocmock_reset() to be defined
> > + '("CFLAGS=-D_GNU_SOURCE=1"
>
> This very likely removes the default flags, “-O2 -g”, which is something
> we should not do (we’d get an unoptimized build and ‘--with-debug-info’
> wouldn’t have the intended effect). I think you need to have:
>
> "CFLAGS=-O2 -g -D_GNU_SOURCE=1"
>
> instead. Please check the build log to make sure it has the intended
> effect.
>
> Could you send an updated patch?
>
> Thanks,
> Ludo’.
Ludovic Courtès wrote 6 months ago
Re: [PATCH v3] gnu: screen: Update to 5.0.0
(name . Andy Tai)(address . atai@atai.org)(address . 72885-done@debbugs.gnu.org)
8734mfcpv7.fsf@gnu.org
Hi Andy,

Andy Tai <atai@atai.org> skribis:

Toggle quote (7 lines)
> * gnu/packages/patches/screen-hurd-path-max.patch: Update for screen 5.0.0.
> * gnu/packages/screen.scm (screen): Update to 5.0.0.
> [arguments]<#:configure-flags: Add "-D_GNU_SOURCE=1" to CFLAGS.
> [inputs]: Add linux-pam.
>
> Change-Id: Iebc5eff0128ff7f4d27a22cca1bd4a025aca3244

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72885@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72885
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help