mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Denis OSTERLAND <denis.osterland@diehl.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] [PATCH v2] screen: version bump 4.0.3 -> 4.5.0
Date: Mon, 18 Sep 2017 09:18:56 +0000	[thread overview]
Message-ID: <1505726033-24774-2-git-send-email-Denis.Osterland@diehl.com> (raw)
In-Reply-To: <1505726033-24774-1-git-send-email-Denis.Osterland@diehl.com>

Update autoconf patches for version 4.5.0.
Add patches from debian stretch.
Skip cosmetic patch Replace-the-composed-characters-with-their-respectiv.patch.

Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com>
---
 .../0003-Fix-screenencodings-dir.patch             |  27 ----
 patches/screen-4.0.3/series                        |   6 -
 .../0001-don-t-link-against-libelf.patch           |  24 ++--
 .../0002-remove-configure-AC_TRY_RUN-tests.patch   | 132 +++++++++----------
 .../0003-autoconf-cleanup.patch}                   | 145 +++++++++------------
 .../0004-Fix-some-typos-found-by-Lintian.patch     |  48 +++++++
 .../0005-show-encoding-in-hardstatus.patch         |  52 ++++++++
 .../0006-Unbreak-several-useful-keybindings.patch  |  22 ++++
 ...ge-escalation-by-reverting-upstream-commi.patch |  30 +++++
 ...l-garbage-in-Debian-Installer-over-serial.patch |  24 ++++
 ...ogfile-s-name-that-begins-with-the-symbol.patch |  77 +++++++++++
 patches/{screen-4.0.3 => screen-4.5.0}/autogen.sh  |   0
 patches/screen-4.5.0/series                        |  12 ++
 rules/screen.make                                  |   5 +-
 14 files changed, 408 insertions(+), 196 deletions(-)
 delete mode 100644 patches/screen-4.0.3/0003-Fix-screenencodings-dir.patch
 delete mode 100644 patches/screen-4.0.3/series
 rename patches/{screen-4.0.3 => screen-4.5.0}/0001-don-t-link-against-libelf.patch (61%)
 rename patches/{screen-4.0.3 => screen-4.5.0}/0002-remove-configure-AC_TRY_RUN-tests.patch (88%)
 rename patches/{screen-4.0.3/0004-autoconf-cleanup.patch => screen-4.5.0/0003-autoconf-cleanup.patch} (74%)
 create mode 100644 patches/screen-4.5.0/0004-Fix-some-typos-found-by-Lintian.patch
 create mode 100644 patches/screen-4.5.0/0005-show-encoding-in-hardstatus.patch
 create mode 100644 patches/screen-4.5.0/0006-Unbreak-several-useful-keybindings.patch
 create mode 100644 patches/screen-4.5.0/0007-Fix-privilege-escalation-by-reverting-upstream-commi.patch
 create mode 100644 patches/screen-4.5.0/0008-Fix-terminal-garbage-in-Debian-Installer-over-serial.patch
 create mode 100644 patches/screen-4.5.0/0009-Ignore-logfile-s-name-that-begins-with-the-symbol.patch
 rename patches/{screen-4.0.3 => screen-4.5.0}/autogen.sh (100%)
 create mode 100644 patches/screen-4.5.0/series

diff --git a/patches/screen-4.0.3/0003-Fix-screenencodings-dir.patch b/patches/screen-4.0.3/0003-Fix-screenencodings-dir.patch
deleted file mode 100644
index 18ae4ff..0000000
--- a/patches/screen-4.0.3/0003-Fix-screenencodings-dir.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Sun, 27 Mar 2011 15:18:27 +0200
-Subject: [PATCH] Fix screenencodings dir
-
-This patch fixes the assignement of the SCREENENCODINGS variable which was holding "${}" before.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.in |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 419279d..5411add 100644
---- a/configure.in
-+++ b/configure.in
-@@ -637,7 +637,7 @@ AC_MSG_RESULT($ETCSCREENRC)
- SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\""
- if test -n "$datadir"; then
- eval SCREENENCODINGS="$datadir/screen/utf8encodings"
--SCREENENCODINGS="\"$SCREENENCODINGS\""
-+eval SCREENENCODINGS="\\\"$SCREENENCODINGS\\\""
- fi
- AC_MSG_CHECKING(for the utf8-encodings location)
- AC_DEFINE_UNQUOTED(SCREENENCODINGS,$SCREENENCODINGS)
--- 
-1.7.4.1
-
diff --git a/patches/screen-4.0.3/series b/patches/screen-4.0.3/series
deleted file mode 100644
index 92c8f7c..0000000
--- a/patches/screen-4.0.3/series
+++ /dev/null
@@ -1,6 +0,0 @@
-# generated by git-ptx-patches
-0001-don-t-link-against-libelf.patch
-0002-remove-configure-AC_TRY_RUN-tests.patch
-0003-Fix-screenencodings-dir.patch
-0004-autoconf-cleanup.patch
-# 281c2731ef1fdac0a3c30983673cb6c8  - git-ptx-patches magic
diff --git a/patches/screen-4.0.3/0001-don-t-link-against-libelf.patch b/patches/screen-4.5.0/0001-don-t-link-against-libelf.patch
similarity index 61%
rename from patches/screen-4.0.3/0001-don-t-link-against-libelf.patch
rename to patches/screen-4.5.0/0001-don-t-link-against-libelf.patch
index 84ab86e..3ca4310 100644
--- a/patches/screen-4.0.3/0001-don-t-link-against-libelf.patch
+++ b/patches/screen-4.5.0/0001-don-t-link-against-libelf.patch
@@ -6,15 +6,17 @@ libelf is not used. It's just some broken configure check.
 Patch from gentoo.
 
 Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+[osterlad: Update locations for version 4.5.0]
+Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com>
 ---
- configure.in |    9 ---------
- 1 files changed, 0 insertions(+), 9 deletions(-)
+ configure.ac | 8 --------
+ 1 file changed, 8 deletions(-)
 
-diff --git a/configure.in b/configure.in
-index 34c9372..c1460af 100644
---- a/configure.in
-+++ b/configure.in
-@@ -195,15 +195,6 @@ AC_EGREP_CPP(yes,
+diff --git a/configure.ac b/configure.ac
+index ffe2e372426c..d88af75af665 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -202,14 +202,6 @@ AC_EGREP_CPP(yes,
  #endif
  ], LIBS="$LIBS -lsocket -linet";seqptx=1)
  
@@ -26,10 +28,6 @@ index 34c9372..c1460af 100644
 -[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
 -[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
 -,LIBS="$oldlibs")
--
+ AC_CHECK_HEADERS([stropts.h string.h strings.h])
+ 
  AC_CHECKING(for Solaris 2.x)
- AC_EGREP_CPP(yes,
- [#if defined(SVR4) && defined(sun)
--- 
-1.7.4.1
-
diff --git a/patches/screen-4.0.3/0002-remove-configure-AC_TRY_RUN-tests.patch b/patches/screen-4.5.0/0002-remove-configure-AC_TRY_RUN-tests.patch
similarity index 88%
rename from patches/screen-4.0.3/0002-remove-configure-AC_TRY_RUN-tests.patch
rename to patches/screen-4.5.0/0002-remove-configure-AC_TRY_RUN-tests.patch
index f5299c3..4efbde1 100644
--- a/patches/screen-4.0.3/0002-remove-configure-AC_TRY_RUN-tests.patch
+++ b/patches/screen-4.5.0/0002-remove-configure-AC_TRY_RUN-tests.patch
@@ -7,17 +7,19 @@ AC_TRY_RUN fails when cross-compiling.
 Not for upstream.
 
 Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+[osterlad: Update locations for version 4.5.0]
+Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com>
 ---
- configure.in |  652 +---------------------------------------------------------
- 1 files changed, 9 insertions(+), 643 deletions(-)
+ configure.ac | 651 +----------------------------------------------------------
+ 1 file changed, 9 insertions(+), 642 deletions(-)
 
-diff --git a/configure.in b/configure.in
-index c1460af..419279d 100644
---- a/configure.in
-+++ b/configure.in
-@@ -46,31 +46,6 @@ AC_PROG_CPP
- AC_PROG_GCC_TRADITIONAL
+diff --git a/configure.ac b/configure.ac
+index d88af75af665..155b34c7ecce 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL
  AC_ISC_POSIX
+ AC_USE_SYSTEM_EXTENSIONS
  
 -AC_TRY_RUN(main(){exit(0);},,[
 -if test $CC != cc ; then
@@ -47,7 +49,7 @@ index c1460af..419279d 100644
  AC_PROG_AWK
  
  AC_PROG_INSTALL
-@@ -279,354 +254,6 @@ AC_CHECKING(select with $LIBS)
+@@ -295,353 +270,6 @@ AC_CHECKING(select with $LIBS)
  AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],, 
  AC_MSG_ERROR(!!! no select - no screen))
  )
@@ -57,7 +59,14 @@ index c1460af..419279d 100644
 -
 -AC_CHECKING(fifos)
 -AC_TRY_RUN([
+-/* For select - According to POSIX 1003.1-2001 */
+-#include <sys/select.h>
+-
+-/* For select - According to earlier standards */
+-#include <sys/time.h>
 -#include <sys/types.h>
+-#include <unistd.h>
+-
 -#include <sys/stat.h>
 -#include <fcntl.h>
 -
@@ -73,13 +82,10 @@ index c1460af..419279d 100644
 -main()
 -{
 -  struct stat stb;
--#ifdef FD_SET
 -  fd_set f;
--#else
--  int f;
--#endif
 -
 -  (void)alarm(5);
+-  unlink(fin);
 -#ifdef POSIX
 -  if (mkfifo(fin, 0777))
 -#else
@@ -111,11 +117,7 @@ index c1460af..419279d 100644
 -	exit(1);
 -      exit(0);
 -    }
--#ifdef FD_SET
 -  FD_SET(0, &f);
--#else
--  f = 1;
--#endif
 -  if (select(1, &f, 0, 0, 0) == -1)
 -    exit(1);
 -  exit(0);
@@ -127,10 +129,16 @@ index c1460af..419279d 100644
 -if test -n "$fifo"; then
 -AC_CHECKING(for broken fifo implementation)
 -AC_TRY_RUN([
--#include <sys/types.h>
--#include <fcntl.h>
+-/* For select - According to POSIX 1003.1-2001 */
+-#include <sys/select.h>
+-
+-/* For select - According to earlier standards */
 -#include <sys/time.h>
+-#include <sys/types.h>
+-#include <unistd.h>
+-
 -#include <sys/stat.h>
+-#include <fcntl.h>
 -
 -#ifndef O_NONBLOCK
 -#define O_NONBLOCK O_NDELAY
@@ -144,11 +152,7 @@ index c1460af..419279d 100644
 -main()
 -{
 -  struct timeval tv;
--#ifdef FD_SET
 -  fd_set f;
--#else
--  int f;
--#endif
 -
 -#ifdef POSIX
 -  if (mkfifo(fin, 0600))
@@ -159,11 +163,7 @@ index c1460af..419279d 100644
 -  close(0);
 -  if (open(fin, O_RDONLY|O_NONBLOCK))
 -    exit(1);
--#ifdef FD_SET
 -  FD_SET(0, &f);
--#else
--  f = 1;
--#endif
 -  tv.tv_sec = 1;
 -  tv.tv_usec = 0;
 -  if (select(1, &f, 0, 0, &tv))
@@ -183,10 +183,18 @@ index c1460af..419279d 100644
 -
 -AC_CHECKING(sockets)
 -AC_TRY_RUN([
+-/* For select - According to POSIX 1003.1-2001 */
+-#include <sys/select.h>
+-
+-/* For select - According to earlier standards */
+-#include <sys/time.h>
 -#include <sys/types.h>
+-#include <unistd.h>
+-
+-#include <sys/stat.h>
+-#include <fcntl.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
--#include <fcntl.h>
 -
 -char *son = "/tmp/conftest$$";
 -
@@ -194,11 +202,7 @@ index c1460af..419279d 100644
 -{
 -  int s1, s2, l;
 -  struct sockaddr_un a;
--#ifdef FD_SET
 -  fd_set f;
--#else
--  int f;
--#endif
 -
 -  (void)alarm(5);
 -  if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
@@ -223,11 +227,7 @@ index c1460af..419279d 100644
 -  close(0);
 -  if (accept(s1, &a, &l))
 -    exit(1);
--#ifdef FD_SET
 -  FD_SET(0, &f);
--#else
--  f = 1;
--#endif
 -  if (select(1, &f, 0, 0, 0) == -1)
 -    exit(1);
 -  exit(0);
@@ -239,7 +239,14 @@ index c1460af..419279d 100644
 -if test -n "$sock"; then
 -AC_CHECKING(socket implementation)
 -AC_TRY_RUN([
+-/* For select - According to POSIX 1003.1-2001 */
+-#include <sys/select.h>
+-
+-/* For select - According to earlier standards */
+-#include <sys/time.h>
 -#include <sys/types.h>
+-#include <unistd.h>
+-
 -#include <sys/stat.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
@@ -281,8 +288,7 @@ index c1460af..419279d 100644
 -    elif test -n "$fifobr"; then
 -      AC_NOTE(- as your fifos are broken lets use the sockets.)
 -    else
--      AC_NOTE(- both sockets and fifos usable. let's take fifos.)
--      AC_DEFINE(NAMEDPIPE)
+-      AC_NOTE(- both sockets and fifos usable. let's take sockets.)
 -    fi
 -  else
 -    AC_NOTE(- using named pipes, of course)
@@ -300,7 +306,14 @@ index c1460af..419279d 100644
 -
 -AC_CHECKING(select return value)
 -AC_TRY_RUN([
+-/* For select - According to POSIX 1003.1-2001 */
+-#include <sys/select.h>
+-
+-/* For select - According to earlier standards */
+-#include <sys/time.h>
 -#include <sys/types.h>
+-#include <unistd.h>
+-
 -#include <sys/stat.h>
 -#include <fcntl.h>
 -
@@ -318,11 +331,7 @@ index c1460af..419279d 100644
 -
 -main()
 -{
--#ifdef FD_SET
 -  fd_set f;
--#else
--  int f;
--#endif
 -
 -#ifdef __FreeBSD__
 -/* From Andrew A. Chernov (ache@astral.msk.su):
@@ -354,11 +363,7 @@ index c1460af..419279d 100644
 -{
 -  int s1, s2, l;
 -  struct sockaddr_un a;
--#ifdef FD_SET
 -  fd_set f;
--#else
--  int f;
--#endif
 -
 -  (void)alarm(5);
 -  if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
@@ -386,11 +391,7 @@ index c1460af..419279d 100644
 -#endif
 -
 -
--#ifdef FD_SET
 -  FD_SET(0, &f);
--#else
--  f = 1;
--#endif
 -  if (select(1, &f, 0, 0, 0) == -1)
 -    exit(1);
 -  if (select(1, &f, &f, 0, 0) != 2)
@@ -402,9 +403,9 @@ index c1460af..419279d 100644
  
  dnl
  dnl    ****  termcap or terminfo  ****
-@@ -654,12 +281,8 @@ AC_CHECKING(libncurses)
+@@ -678,12 +306,8 @@ AC_CHECKING(libtinfo)
  AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
- AC_MSG_ERROR(!!! no tgetent - no screen))))))
+ AC_MSG_ERROR(!!! no tgetent - no screen)))))))))
  
 -AC_TRY_RUN([
 -main()
@@ -417,7 +418,7 @@ index c1460af..419279d 100644
  AC_CHECKING(ospeed)
  AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
  
-@@ -710,95 +333,6 @@ AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
+@@ -734,95 +358,6 @@ AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
  AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
  fi
  
@@ -513,7 +514,7 @@ index c1460af..419279d 100644
  dnl
  dnl    ****  utmp handling  ****
  dnl
-@@ -871,101 +405,6 @@ AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs")
+@@ -895,101 +430,6 @@ AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs")
  fi
  )
  
@@ -615,7 +616,7 @@ index c1460af..419279d 100644
  AC_PROGRAM_SOURCE([
  #include <sys/types.h>
  #include <sys/param.h>
-@@ -1037,41 +476,8 @@ sigset(0, (void (*)())0);
+@@ -1061,41 +501,8 @@ sigset(0, (void (*)())0);
  sigset(0, (int (*)())0);
  #endif
  ], AC_DEFINE(USESIGSET))
@@ -623,7 +624,7 @@ index c1460af..419279d 100644
 -AC_TRY_RUN([
 -#include <sys/types.h>
 -#include <signal.h>
- 
+-
 -#ifndef SIGCLD
 -#define SIGCLD SIGCHLD
 -#endif
@@ -632,7 +633,7 @@ index c1460af..419279d 100644
 -#endif
 -
 -int got;
--
+ 
 -#ifdef SIGVOID
 -void
 -#endif
@@ -658,7 +659,7 @@ index c1460af..419279d 100644
  
  fi
  
-@@ -1139,50 +545,12 @@ AC_CHECKING(fdwalk)
+@@ -1163,50 +570,12 @@ AC_CHECKING(fdwalk)
  AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK))
  
  AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments)
@@ -713,17 +714,14 @@ index c1460af..419279d 100644
 +
 +AC_DEFINE(USEMEMCPY)
  
- AC_MSG_CHECKING(long file names)
- (echo 1 > /tmp/conftest9012345) 2>/dev/null
-@@ -1257,8 +625,6 @@ fi
+ AC_SYS_LONG_FILE_NAMES
+ 
+@@ -1292,8 +661,6 @@ fi
  dnl Ptx bug workaround -- insert -lc after -ltermcap
  test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
  
 -AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
 -
- ETCSCREENRC="\"/usr/local/etc/screenrc\""
- if test -n "$prefix"; then
- ETCSCREENRC="\"$prefix/etc/screenrc\""
--- 
-1.7.4.1
-
+ ETCSCREENRC=
+ AC_MSG_CHECKING(for the global screenrc file)
+ AC_ARG_WITH(sys-screenrc, [  --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ])
diff --git a/patches/screen-4.0.3/0004-autoconf-cleanup.patch b/patches/screen-4.5.0/0003-autoconf-cleanup.patch
similarity index 74%
rename from patches/screen-4.0.3/0004-autoconf-cleanup.patch
rename to patches/screen-4.5.0/0003-autoconf-cleanup.patch
index e9379f8..fda6c94 100644
--- a/patches/screen-4.0.3/0004-autoconf-cleanup.patch
+++ b/patches/screen-4.5.0/0003-autoconf-cleanup.patch
@@ -5,24 +5,26 @@ Subject: [PATCH] autoconf cleanup
 update to latest autoconf syntax
 
 Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+[osterlad: update locations for version 4.5.0]
+Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com>
 ---
- configure.in |  118 +++++++++++++++++++++++++++++-----------------------------
- 1 files changed, 59 insertions(+), 59 deletions(-)
+ configure.ac | 116 +++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 58 insertions(+), 58 deletions(-)
 
-diff --git a/configure.in b/configure.in
-index 5411add..6864c71 100644
---- a/configure.in
-+++ b/configure.in
-@@ -70,7 +70,7 @@ AC_ARG_ENABLE(socket-dir,
- 	SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")"
- 	AC_ARG_WITH(socket-dir, [  --with-socket-dir=path  where to put the per-user sockets], [ SOCKDIR="\"${withval}\"" ])
+diff --git a/configure.ac b/configure.ac
+index 155b34c7ecce..b87a9a44eb20 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -77,7 +77,7 @@ AC_ARG_ENABLE(socket-dir,
+ 	  esac
+         ])
  	AC_MSG_RESULT(${SOCKDIR})
 -	AC_DEFINE_UNQUOTED(SOCKDIR, $SOCKDIR)
 +	AC_DEFINE_UNQUOTED(SOCKDIR, $SOCKDIR,[SOCKDIR])
      ]
  )
  
-@@ -79,18 +79,18 @@ dnl
+@@ -86,18 +86,18 @@ dnl
  dnl    ****  special unix variants  ****
  dnl
  if test -n "$ISC"; then
@@ -44,7 +46,7 @@ index 5411add..6864c71 100644
  fi
  
  AC_CHECKING(for MIPS)
-@@ -103,7 +103,7 @@ AC_TRY_LINK(,,,LIBS="$oldlibs")
+@@ -110,7 +110,7 @@ AC_TRY_LINK(,,,LIBS="$oldlibs")
  dnl
  dnl
  if test -r /dev/ptc; then
@@ -53,7 +55,7 @@ index 5411add..6864c71 100644
  AC_CHECKING(wait3)
  AC_TRY_LINK(,[wait3();], ,
  AC_CHECKING(wait2)
-@@ -112,7 +112,7 @@ dnl John Rouillard (rouilj@sni-usa.com):
+@@ -119,7 +119,7 @@ dnl John Rouillard (rouilj@sni-usa.com):
  dnl need -I/usr/include/bsd in RISCOS otherwise sockets are broken, no
  dnl job control etc.
  dnl Detect RISCOS if wait2 is present, but not wait3.
@@ -62,7 +64,7 @@ index 5411add..6864c71 100644
  ))
  fi
  fi
-@@ -129,7 +129,7 @@ if test -f /usr/lib/libpyr.a ; then
+@@ -136,7 +136,7 @@ if test -f /usr/lib/libpyr.a ; then
  oldlibs="$LIBS"
  LIBS="$LIBS -lpyr"
  AC_CHECKING(Pyramid OSX)
@@ -71,7 +73,7 @@ index 5411add..6864c71 100644
  fi
  
  dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi):
-@@ -154,14 +154,14 @@ main () {
+@@ -161,14 +161,14 @@ main () {
  #ifdef _POSIX_VERSION
    yes;
  #endif
@@ -88,7 +90,7 @@ index 5411add..6864c71 100644
  
  AC_CHECKING(for sequent/ptx)
  AC_EGREP_CPP(yes,
-@@ -184,16 +184,16 @@ dnl (currently not used)
+@@ -193,16 +193,16 @@ dnl (currently not used)
  dnl
  dnl AC_CHECKING(for pid_t)
  dnl AC_EGREP_CPP(pid_t,[#include <sys/types.h>
@@ -108,7 +110,7 @@ index 5411add..6864c71 100644
  dnl
  
  dnl
-@@ -215,7 +215,7 @@ setpgrp();
+@@ -224,7 +224,7 @@ setpgrp();
  int y = TIOCNOTTY;
  #endif
  #endif
@@ -116,28 +118,28 @@ index 5411add..6864c71 100644
 +], AC_NOTE(- you have jobcontrol) AC_DEFINE([BSDJOBS],[1],[BSDJOBS]), AC_NOTE(- you don't have jobcontrol))
  
  dnl
- dnl    ****  setreuid(), seteuid()  ****
-@@ -227,7 +227,7 @@ setresuid(0, 0, 0);
- #else
+ dnl    ****  setresuid(), setreuid(), seteuid()  ****
+@@ -236,7 +236,7 @@ setresuid(0, 0, 0);
+ AC_CHECKING(setreuid)
+ AC_TRY_LINK(,[
  setreuid(0, 0);
- #endif
 -], AC_DEFINE(HAVE_SETREUID))
-+], AC_DEFINE([HAVE_SETREUID],[1],[HAVE_SETREUID]))
++], AC_DEFINE(HAVE_SETREUID,[1],[HAVE_SETREUID]))
  dnl
  dnl seteuid() check:
  dnl   linux seteuid was broken before V1.1.11
-@@ -241,7 +241,7 @@ seteuid_is_broken(0);
+@@ -250,7 +250,7 @@ seteuid_is_broken(0);
  #else
  seteuid(0);
  #endif
 -], AC_DEFINE(HAVE_SETEUID))
 +], AC_DEFINE([HAVE_SETEUID],[1],[HAVE_SETEUID]))
  
- dnl
- dnl    ****  select()  ****
-@@ -281,23 +281,23 @@ AC_CHECKING(libncurses)
+ dnl execvpe
+ AC_CHECKING(execvpe)
+@@ -306,23 +306,23 @@ AC_CHECKING(libtinfo)
  AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
- AC_MSG_ERROR(!!! no tgetent - no screen))))))
+ AC_MSG_ERROR(!!! no tgetent - no screen)))))))))
  
 -AC_DEFINE(TERMINFO))
 +AC_DEFINE([TERMINFO],[1],[TERMINFO])
@@ -163,7 +165,7 @@ index 5411add..6864c71 100644
  sysvr4ptys=1])
  fi
  
-@@ -306,7 +306,7 @@ AC_CHECK_FUNCS(getpt)
+@@ -331,7 +331,7 @@ AC_CHECK_FUNCS(getpt)
  dnl check for openpty()
  if test -z "$sysvr4ptys"; then
  AC_CHECK_FUNCS(openpty,,
@@ -172,7 +174,7 @@ index 5411add..6864c71 100644
  fi
  
  AC_CHECKING(for ptyranges)
-@@ -329,8 +329,8 @@ dnl fi
+@@ -354,8 +354,8 @@ dnl fi
  if test "$ptys" != "$pdir/pty??" ; then
  p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
  p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\012'`
@@ -183,7 +185,7 @@ index 5411add..6864c71 100644
  fi
  
  dnl
-@@ -350,7 +350,7 @@ AC_TRY_LINK([
+@@ -375,7 +375,7 @@ AC_TRY_LINK([
  #define pututline _pututline
  #endif
  ],
@@ -192,7 +194,7 @@ index 5411add..6864c71 100644
  olibs="$LIBS"
  LIBS="$LIBS -lgen"
  AC_CHECKING(getutent with -lgen)
-@@ -367,7 +367,7 @@ AC_TRY_LINK([
+@@ -392,7 +392,7 @@ AC_TRY_LINK([
  #define pututline _pututline
  #endif
  ],
@@ -201,7 +203,7 @@ index 5411add..6864c71 100644
  )
  AC_CHECKING(ut_host)
  AC_TRY_COMPILE([
-@@ -379,10 +379,10 @@ AC_TRY_COMPILE([
+@@ -404,10 +404,10 @@ AC_TRY_COMPILE([
  #else
  #include <utmp.h>
  #endif
@@ -214,7 +216,7 @@ index 5411add..6864c71 100644
    LIBS="$LIBS -lutempter"
  fi
  
-@@ -395,13 +395,13 @@ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
+@@ -420,13 +420,13 @@ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
  
  AC_CHECKING(getloadavg)
  AC_TRY_LINK(,[getloadavg((double *)0, 0);],
@@ -230,7 +232,7 @@ index 5411add..6864c71 100644
  fi
  )
  
-@@ -441,10 +441,10 @@ loadnum=3
+@@ -466,10 +466,10 @@ loadnum=3
  #endif
  ])
  
@@ -245,7 +247,7 @@ index 5411add..6864c71 100644
  
  dnl
  dnl    ****  signal handling  ****
-@@ -453,7 +453,7 @@ if test -n "$posix" ; then
+@@ -478,7 +478,7 @@ if test -n "$posix" ; then
  
  dnl POSIX has reliable signals with void return type.
  AC_NOTE(assuming posix signal definition)
@@ -254,7 +256,7 @@ index 5411add..6864c71 100644
  
  else
  
-@@ -464,7 +464,7 @@ AC_TRY_COMPILE(
+@@ -489,7 +489,7 @@ AC_TRY_COMPILE(
  #ifdef signal
  #undef signal
  #endif
@@ -263,7 +265,7 @@ index 5411add..6864c71 100644
  AC_CHECKING(sigset)
  AC_TRY_LINK([
  #include <sys/types.h>
-@@ -475,9 +475,9 @@ sigset(0, (void (*)())0);
+@@ -500,9 +500,9 @@ sigset(0, (void (*)())0);
  #else
  sigset(0, (int (*)())0);
  #endif
@@ -275,7 +277,7 @@ index 5411add..6864c71 100644
  
  fi
  
-@@ -503,7 +503,7 @@ AC_TRY_LINK(,[closelog();], , [oldlibs="$LIBS"
+@@ -528,7 +528,7 @@ AC_TRY_LINK(,[closelog();], , [oldlibs="$LIBS"
  LIBS="$LIBS -lbsd"
  AC_CHECKING(syslog in libbsd.a)
  AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs"
@@ -284,7 +286,7 @@ index 5411add..6864c71 100644
  
  AC_EGREP_CPP(yes,
  [#ifdef M_UNIX
-@@ -523,34 +523,34 @@ AC_TRY_COMPILE([#include <sys/types.h>
+@@ -548,39 +548,39 @@ AC_TRY_COMPILE([#include <sys/types.h>
  #ifdef WEXITSTATUS
    y = WEXITSTATUS(x);
  #endif
@@ -327,31 +329,33 @@ index 5411add..6864c71 100644
 -AC_DEFINE(USEMEMCPY)
 +AC_DEFINE([USEMEMCPY],[1],[USEMEMCPY])
  
- AC_MSG_CHECKING(long file names)
- (echo 1 > /tmp/conftest9012345) 2>/dev/null
-@@ -560,25 +560,25 @@ if test -f /tmp/conftest9012345 && test "$val" = 1; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
--AC_DEFINE(NAME_MAX, 14)
-+AC_DEFINE(NAME_MAX, 14,[NAME_MAX])
- fi
- rm -f /tmp/conftest*
+ AC_SYS_LONG_FILE_NAMES
  
  AC_MSG_CHECKING(for vsprintf)
--AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
-+AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE([USEVARARGS],[1],[USEVARARGS]), AC_MSG_RESULT(no))
+-AC_TRY_LINK([#include <stdarg.h>],[va_list valist; vsprintf(0,0,valist);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
++AC_TRY_LINK([#include <stdarg.h>],[va_list valist; vsprintf(0,0,valist);], AC_MSG_RESULT(yes);AC_DEFINE([USEVARARGS],[1],[USEVARARGS]), AC_MSG_RESULT(no))
  
  AC_HEADER_DIRENT
  
- AC_MSG_CHECKING(for setenv)
--AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV),
-+AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE([USESETENV],[1],[USESETENV]),
- AC_MSG_RESULT(no)
- AC_MSG_CHECKING(for putenv)
--AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) ,  AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV)
-+AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) ,  AC_MSG_RESULT(no);AC_DEFINE([NEEDPUTENV],[1],[NEEDPUTENV])
- ))
+@@ -600,21 +600,21 @@ if test -z "$ac_setenv_args"; then
+     ], ac_setenv_args=2)
+ fi
+ if test -n "$ac_setenv_args"; then
+-    AC_DEFINE(USESETENV)
++    AC_DEFINE([USESETENV],[1],[USESETENV])
+     if test "$ac_setenv_args" = 3; then
+-        AC_DEFINE(HAVE_SETENV_3)
++        AC_DEFINE([HAVE_SETENV_3],[1],[HAVE_SETENV_3])
+     elif test "$ac_setenv_args" = 2; then
+-        AC_DEFINE(HAVE_SETENV_2)
++        AC_DEFINE([HAVE_SETENV_2],[1],[HAVE_SETENV_2])
+     fi
+ else
+     AC_MSG_RESULT(no)
+     AC_MSG_CHECKING(for putenv)
+-    AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) ,  AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV))
++    AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) ,  AC_MSG_RESULT(no);AC_DEFINE([NEEDPUTENV],[1],[NEEDPUTENV]))
+ fi
  AC_MSG_CHECKING([for nl_langinfo(CODESET)])
  AC_TRY_LINK([
  #include <langinfo.h>
@@ -360,7 +364,7 @@ index 5411add..6864c71 100644
  
  AC_SEARCH_LIBS(gethostname, nsl)
  
-@@ -593,25 +593,25 @@ if test "$enable_pam" = "yes"; then
+@@ -629,25 +629,25 @@ if test "$enable_pam" = "yes"; then
  	pam_start(0, 0, 0, 0);
  	pam_authenticate(0, 0);
  	pam_end(0,0);
@@ -369,7 +373,7 @@ index 5411add..6864c71 100644
         AC_MSG_RESULT(no);LIBS="$oldlibs")
  fi
  
- AC_ARG_ENABLE(use_locale, [  --enable-locale         use localized month/day names])
+ AC_ARG_ENABLE(use_locale, [  --enable-use-locale         use localized month/day names])
  if test "$enable_use_locale" = "yes"; then
 -  AC_DEFINE(USE_LOCALE)
 +  AC_DEFINE([USE_LOCALE],[1],[USE_LOCALE])
@@ -391,24 +395,3 @@ index 5411add..6864c71 100644
  fi
  
  dnl
-@@ -631,7 +631,7 @@ ETCSCREENRC="\"$prefix/etc/screenrc\""
- fi
- AC_MSG_CHECKING(for the global screenrc file)
- AC_ARG_WITH(sys-screenrc, [  --with-sys-screenrc=path  where to put the global screenrc file], [ ETCSCREENRC="\"${withval}\"" ])
--AC_DEFINE_UNQUOTED(ETCSCREENRC,$ETCSCREENRC)
-+AC_DEFINE_UNQUOTED(ETCSCREENRC,$ETCSCREENRC,[ETCSCREENRC])
- AC_MSG_RESULT($ETCSCREENRC)
- 
- SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\""
-@@ -640,7 +640,7 @@ eval SCREENENCODINGS="$datadir/screen/utf8encodings"
- eval SCREENENCODINGS="\\\"$SCREENENCODINGS\\\""
- fi
- AC_MSG_CHECKING(for the utf8-encodings location)
--AC_DEFINE_UNQUOTED(SCREENENCODINGS,$SCREENENCODINGS)
-+AC_DEFINE_UNQUOTED(SCREENENCODINGS,$SCREENENCODINGS,[SCREENENCODINGS])
- AC_MSG_RESULT($SCREENENCODINGS)
- 
- AC_OUTPUT(Makefile doc/Makefile, [[
--- 
-1.7.4.1
-
diff --git a/patches/screen-4.5.0/0004-Fix-some-typos-found-by-Lintian.patch b/patches/screen-4.5.0/0004-Fix-some-typos-found-by-Lintian.patch
new file mode 100644
index 0000000..b368f44
--- /dev/null
+++ b/patches/screen-4.5.0/0004-Fix-some-typos-found-by-Lintian.patch
@@ -0,0 +1,48 @@
+From: Axel Beckert <abe@debian.org>
+Date: Mon, 3 Jul 2017 10:41:19 +0200
+Subject: [PATCH] Fix some typos found by Lintian
+
+Forwarded: no
+Bug-Debian: https://bugs.debian.org/741141
+---
+ acls.c       | 4 ++--
+ doc/screen.1 | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/acls.c b/acls.c
+index 3b1669cf4a93..514e0fc4716d 100644
+--- a/acls.c
++++ b/acls.c
+@@ -578,7 +578,7 @@ char *name, *pw1, *pw2;
+     }
+   
+   debug2("syslog(LOG_NOTICE, \"screen %s: \"su %s\" ", SockPath, name);
+-  debug2("%s for \"%s\"\n", sorry ? "failed" : "succeded", (*up)->u_name);
++  debug2("%s for \"%s\"\n", sorry ? "failed" : "succeeded", (*up)->u_name);
+ #ifndef NOSYSLOG
+ # ifdef BSD_42
+   openlog("screen", LOG_PID);
+@@ -586,7 +586,7 @@ char *name, *pw1, *pw2;
+   openlog("screen", LOG_PID, LOG_AUTH);
+ # endif /* BSD_42 */
+   syslog(LOG_NOTICE, "%s: \"su %s\" %s for \"%s\"", SockPath, name, 
+-         sorry ? "failed" : "succeded", (*up)->u_name);
++         sorry ? "failed" : "succeeded", (*up)->u_name);
+   closelog();
+ #else
+   debug("NOT LOGGED.\n");
+diff --git a/doc/screen.1 b/doc/screen.1
+index 23b4d7b1202a..0fe8d0e533c2 100644
+--- a/doc/screen.1
++++ b/doc/screen.1
+@@ -1356,8 +1356,8 @@ non-whitespace character on the line.
+ \fBB\fP, \fBE\fP move the cursor WORD by WORD (as in vi).
+ .br 
+ .ti -2n
+-.\"\fBf\fP,\fBt\fP, \fBF\fP, \fBT\fP move the cursor forward/backward to the next occurence of the target.
+-\fBf/F\fP, \fBt/T\fP move the cursor forward/backward to the next occurence of the target. (eg, '3fy' will 
++.\"\fBf\fP,\fBt\fP, \fBF\fP, \fBT\fP move the cursor forward/backward to the next occurrence of the target.
++\fBf/F\fP, \fBt/T\fP move the cursor forward/backward to the next occurrence of the target. (eg, '3fy' will 
+ move the cursor to the 3rd 'y' to the right.)
+ .br
+ .ti -2n
diff --git a/patches/screen-4.5.0/0005-show-encoding-in-hardstatus.patch b/patches/screen-4.5.0/0005-show-encoding-in-hardstatus.patch
new file mode 100644
index 0000000..123c37c
--- /dev/null
+++ b/patches/screen-4.5.0/0005-show-encoding-in-hardstatus.patch
@@ -0,0 +1,52 @@
+From: Yi-Jheng Lin <yzlin@cs.nctu.edu.tw>
+Date: Mon, 3 Jul 2017 10:42:52 +0200
+Subject: [PATCH] show encoding in hardstatus
+
+Origin: https://svnweb.freebsd.org/ports/head/sysutils/screen/files/opt-showencoding?view=markup
+Reviewed-By: rascov <rascov@rascov.tw>
+Reviewed-By: Dustin Kirkland <kirkland@ubuntu.com>
+Last-Update: Wed Feb 11 05:51:31 CST 2009
+Bug-FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=124492
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/286810
+Bug-Debian: https://bugs.debian.org/533498
+---
+ process.c |  1 +
+ screen.c  | 13 +++++++++++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/process.c b/process.c
+index 63c85b1a0a65..304ce0e691de 100644
+--- a/process.c
++++ b/process.c
+@@ -3783,6 +3783,7 @@ int key;
+ 	    {
+ 	      WinSwitchEncoding(fore, n);
+ 	      ResetCharsets(fore);
++	      RedisplayDisplays(0);
+ 	    }
+ 	  else if (i && display)
+ 	    D_encoding  = n;
+diff --git a/screen.c b/screen.c
+index 64650e9b2edc..7cad20626f2b 100644
+--- a/screen.c
++++ b/screen.c
+@@ -2761,6 +2761,19 @@ char *MakeWinMsgEv(char *str, struct win *win, int esc, int padlen, struct event
+       p += strlen(p) - 1;
+       break;
+ 
++      #ifdef ENCODINGS
++      case 'e':
++        *p = 0;
++        D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0;
++        if (win && win->w_encoding)
++          {
++            *p++ = ' ';
++            strcpy(p, EncodingName(win->w_encoding));
++          }
++          p += strlen(p) - 1;
++          break;
++      #endif
++
+     case '{':
+     {
+       char rbuf[128];
diff --git a/patches/screen-4.5.0/0006-Unbreak-several-useful-keybindings.patch b/patches/screen-4.5.0/0006-Unbreak-several-useful-keybindings.patch
new file mode 100644
index 0000000..830f2a7
--- /dev/null
+++ b/patches/screen-4.5.0/0006-Unbreak-several-useful-keybindings.patch
@@ -0,0 +1,22 @@
+From: Loic Minier <lool@dooz.org>
+Date: Mon, 3 Jul 2017 10:44:57 +0200
+Subject: [PATCH] Unbreak several useful keybindings.
+
+Bugs-Debian: https://bugs.debian.org/484647
+---
+ termcap.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/termcap.c b/termcap.c
+index ae89d175bc2c..57ed43a6d096 100644
+--- a/termcap.c
++++ b/termcap.c
+@@ -552,8 +552,6 @@ int map;
+       else
+ 	break;
+     }
+-  if (n < KMAP_KEYS)
+-    domap = 1;
+   if (map == 0 && domap)
+     return 0;
+   if (map && !domap)
diff --git a/patches/screen-4.5.0/0007-Fix-privilege-escalation-by-reverting-upstream-commi.patch b/patches/screen-4.5.0/0007-Fix-privilege-escalation-by-reverting-upstream-commi.patch
new file mode 100644
index 0000000..134934f
--- /dev/null
+++ b/patches/screen-4.5.0/0007-Fix-privilege-escalation-by-reverting-upstream-commi.patch
@@ -0,0 +1,30 @@
+From: Axel Beckert <abe@debian.org>
+Date: Mon, 3 Jul 2017 10:46:08 +0200
+Subject: [PATCH] Fix privilege escalation by reverting upstream commit
+ 5460f5d2
+
+Bug-Debian: https://bugs.debian.org/852484
+Bug-CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5618
+Bug: https://savannah.gnu.org/bugs/?50142
+     https://lists.gnu.org/archive/html/screen-devel/2017-01/msg00025.html
+---
+ screen.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/screen.c b/screen.c
+index 7cad20626f2b..e60d0a712fb5 100644
+--- a/screen.c
++++ b/screen.c
+@@ -673,12 +673,6 @@ int main(int ac, char** av)
+                 Panic(0, "-L: logfile name can not start with \"-\" symbol");
+               if (strlen(screenlogfile) > PATH_MAX)
+                 Panic(0, "-L: logfile name too long. (max. %d char)", PATH_MAX);
+-
+-              FILE *w_check;
+-              if ((w_check = fopen(screenlogfile, "w")) == NULL)
+-                Panic(0, "-L: logfile name access problem");
+-              else
+-                fclose(w_check);
+             }
+             nwin_options.Lflag = 1;
+             break;
diff --git a/patches/screen-4.5.0/0008-Fix-terminal-garbage-in-Debian-Installer-over-serial.patch b/patches/screen-4.5.0/0008-Fix-terminal-garbage-in-Debian-Installer-over-serial.patch
new file mode 100644
index 0000000..a174ea1
--- /dev/null
+++ b/patches/screen-4.5.0/0008-Fix-terminal-garbage-in-Debian-Installer-over-serial.patch
@@ -0,0 +1,24 @@
+From: Samuel Thibault <sthibault@debian.org>
+Date: Mon, 3 Jul 2017 10:47:14 +0200
+Subject: [PATCH] Fix terminal garbage in Debian Installer over serial line
+
+Reviewed-By: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+Bug-Debian: https://bugs.debian.org/857808
+Bug: https://savannah.gnu.org/bugs/?50588
+---
+ termcap.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/termcap.c b/termcap.c
+index 57ed43a6d096..1b15e63a3192 100644
+--- a/termcap.c
++++ b/termcap.c
+@@ -486,6 +486,8 @@ int he;
+ 
+   D_tcinited = 1;
+   MakeTermcap(0);
++  /* Make sure libterm uses external term properties for our tputs() calls.  */
++  e_tgetent(tbuf, D_termname);
+ #ifdef MAPKEYS
+   CheckEscape();
+ #endif
diff --git a/patches/screen-4.5.0/0009-Ignore-logfile-s-name-that-begins-with-the-symbol.patch b/patches/screen-4.5.0/0009-Ignore-logfile-s-name-that-begins-with-the-symbol.patch
new file mode 100644
index 0000000..d789f56
--- /dev/null
+++ b/patches/screen-4.5.0/0009-Ignore-logfile-s-name-that-begins-with-the-symbol.patch
@@ -0,0 +1,77 @@
+From: Alexander Naumov <alexander_naumov@opensuse.org>
+Date: Mon, 3 Jul 2017 10:48:05 +0200
+Subject: [PATCH] Ignore logfile's name that begins with the "-" symbol
+
+ This fixes the API:
+ .
+ To enable logging we use -L option. But in case of
+ default logfile name (screenlog.0) we will need to
+ define it anyway. Because screen will try to interpret
+ next option as a parameter for -L option (which is
+ logfile name). It will fails ALWAYS, because next
+ parameter will always start with "-" symbol...
+ what is not permited for logfile name of course.
+ .
+ For example:
+ .
+ $ screen -L -D -m ./configure
+ .
+ In this case logfile name is screenlog.0, because "-D"
+ will not be interpreted by screen as a name of logfile.
+Bug-Debian: https://bugs.debian.org/863095
+Bug: https://savannah.gnu.org/bugs/?50440
+Reviewd-By: Axel Beckert <abe@debian.org>
+---
+ doc/screen.1       | 4 ++--
+ doc/screen.texinfo | 4 +++-
+ screen.c           | 7 +++++--
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/doc/screen.1 b/doc/screen.1
+index 0fe8d0e533c2..ee210346dab8 100644
+--- a/doc/screen.1
++++ b/doc/screen.1
+@@ -262,8 +262,8 @@ Ask your system administrator if you are not sure. Remove sessions with the
+ tells
+ .I screen
+ to turn on automatic output logging for the windows. By default, logfile's name
+-is screenlog.1. You can sets new name: add it right after -L option e.g. "screen
+--L my_logfile".
++is screenlog.0. You can set new name: add it right after -L option e.g. "screen
++-L my_logfile". Keep in mind that name can not start with "-" symbol.
+ .TP 5
+ .B \-m
+ causes
+diff --git a/doc/screen.texinfo b/doc/screen.texinfo
+index 2ff39b08a79c..c94993edd2ed 100644
+--- a/doc/screen.texinfo
++++ b/doc/screen.texinfo
+@@ -334,7 +334,9 @@ Remove sessions with the @samp{-wipe} option.
+ 
+ @item -L
+ Tell @code{screen} to turn on automatic output logging for the
+-windows.
++windows. By default, logfile's name is screenlog.0. You can set new name:
++add it right after -L option e.g. "screen -L my_logfile". Keep in mind
++that name can not start with "-" symbol.
+ 
+ @item -m
+ Tell @code{screen} to ignore the @code{$STY} environment variable.  When
+diff --git a/screen.c b/screen.c
+index e60d0a712fb5..07f0c1387e32 100644
+--- a/screen.c
++++ b/screen.c
+@@ -669,8 +669,11 @@ int main(int ac, char** av)
+           case 'L':
+             if (--ac != 0) {
+               screenlogfile = SaveStr(*++av);
+-              if (screenlogfile[0] == '-')
+-                Panic(0, "-L: logfile name can not start with \"-\" symbol");
++              if (screenlogfile[0] == '-') {
++                screenlogfile = SaveStr("screenlog.%n");
++                av--;
++                ac++;
++              }
+               if (strlen(screenlogfile) > PATH_MAX)
+                 Panic(0, "-L: logfile name too long. (max. %d char)", PATH_MAX);
+             }
diff --git a/patches/screen-4.0.3/autogen.sh b/patches/screen-4.5.0/autogen.sh
similarity index 100%
rename from patches/screen-4.0.3/autogen.sh
rename to patches/screen-4.5.0/autogen.sh
diff --git a/patches/screen-4.5.0/series b/patches/screen-4.5.0/series
new file mode 100644
index 0000000..b2f09ec
--- /dev/null
+++ b/patches/screen-4.5.0/series
@@ -0,0 +1,12 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-don-t-link-against-libelf.patch
+0002-remove-configure-AC_TRY_RUN-tests.patch
+0003-autoconf-cleanup.patch
+0004-Fix-some-typos-found-by-Lintian.patch
+0005-show-encoding-in-hardstatus.patch
+0006-Unbreak-several-useful-keybindings.patch
+0007-Fix-privilege-escalation-by-reverting-upstream-commi.patch
+0008-Fix-terminal-garbage-in-Debian-Installer-over-serial.patch
+0009-Ignore-logfile-s-name-that-begins-with-the-symbol.patch
+# ccc52b9b8b2bf27ae19c5efb5999fc70  - git-ptx-patches magic
diff --git a/rules/screen.make b/rules/screen.make
index 4ac07ad..3afc965 100644
--- a/rules/screen.make
+++ b/rules/screen.make
@@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_SCREEN) += screen
 #
 # Paths and names
 #
-SCREEN_VERSION	:= 4.0.3
-SCREEN_MD5	:= 8506fd205028a96c741e4037de6e3c42
+SCREEN_VERSION	:= 4.5.0
+SCREEN_MD5	:= a32105a91359afab1a4349209a028e31
 SCREEN		:= screen-$(SCREEN_VERSION)
 SCREEN_SUFFIX	:= tar.gz
 SCREEN_URL	:= $(call ptx/mirror, GNU, screen/$(SCREEN).$(SCREEN_SUFFIX))
@@ -37,6 +37,7 @@ SCREEN_ENV 	:= $(CROSS_ENV)
 #
 SCREEN_AUTOCONF := \
 	$(CROSS_AUTOCONF_USR) \
+	--disable-use-locale \
 	--with-sys-screenrc=/etc/screenrc
 
 # ----------------------------------------------------------------------------
-- 
2.7.4


Diehl AKO Stiftung & Co. KG, Pfannerstraße 75-83, 88239 Wangen im Allgäu
Bereichsvorstand: Dipl.-Ing. Michael Siedentop (Sprecher), Josef Fellner (Mitglied)
Sitz der Gesellschaft: Wangen i.A. – Registergericht: Amtsgericht Ulm HRA 620609 – Persönlich haftende Gesellschafterin: Diehl Verwaltungs-Stiftung – Sitz: Nürnberg – Registergericht: Amtsgericht Nürnberg HRA 11756 –
Vorstand: Dr.-Ing. E.h. Thomas Diehl (†) (Vorsitzender), Herr Dipl.-Wirtsch.-Ing. Wolfgang Weggen (stellvertretender Vorsitzender), Dipl.-Kfm. Claus Günther, Dipl.-Kfm. Frank Gutzeit, Dr.-Ing. Heinrich Schunk, Dr.-Ing. Michael Siedentop , Dipl.-Kfm. Dr.-Ing. Martin Sommer, Dipl.-Ing. (FH) Rainer von Borstel, Vorsitzender des Aufsichtsrates: Dr. Klaus Maier
___________________________________________________________________________________________________
Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

      reply	other threads:[~2017-09-18  9:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 13:10 [ptxdist] [PATCH] " Denis OSTERLAND
2017-09-16 10:37 ` Michael Olbrich
2017-09-18  9:18 ` [ptxdist] [PATCH v2] " Denis OSTERLAND
2017-09-18  9:18   ` Denis OSTERLAND [this message]

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=1505726033-24774-2-git-send-email-Denis.Osterland@diehl.com \
    --to=denis.osterland@diehl.com \
    --cc=ptxdist@pengutronix.de \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox