mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] screen: version bump 4.0.3 -> 4.5.0
@ 2017-09-15 13:10 Denis OSTERLAND
  2017-09-16 10:37 ` Michael Olbrich
  2017-09-18  9:18 ` [ptxdist] [PATCH v2] " Denis OSTERLAND
  0 siblings, 2 replies; 4+ messages in thread
From: Denis OSTERLAND @ 2017-09-15 13:10 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com>
---
 .../0001-don-t-link-against-libelf.patch           |  35 --
 .../0003-Fix-screenencodings-dir.patch             |  27 --
 patches/screen-4.0.3/series                        |   6 -
 .../0001-remove-configure-AC_TRY_RUN-tests.patch}  | 130 ++++----
 .../0002-autoconf-cleanup.patch}                   | 143 ++++----
 .../0003-Fix-some-typos-found-by-Lintian.patch     |  48 +++
 ...-composed-characters-with-their-respectiv.patch | 363 +++++++++++++++++++++
 .../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 +-
 15 files changed, 756 insertions(+), 218 deletions(-)
 delete mode 100644 patches/screen-4.0.3/0001-don-t-link-against-libelf.patch
 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/0002-remove-configure-AC_TRY_RUN-tests.patch => screen-4.5.0/0001-remove-configure-AC_TRY_RUN-tests.patch} (88%)
 rename patches/{screen-4.0.3/0004-autoconf-cleanup.patch => screen-4.5.0/0002-autoconf-cleanup.patch} (74%)
 create mode 100644 patches/screen-4.5.0/0003-Fix-some-typos-found-by-Lintian.patch
 create mode 100644 patches/screen-4.5.0/0004-Replace-the-composed-characters-with-their-respectiv.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/0001-don-t-link-against-libelf.patch b/patches/screen-4.0.3/0001-don-t-link-against-libelf.patch
deleted file mode 100644
index 84ab86e..0000000
--- a/patches/screen-4.0.3/0001-don-t-link-against-libelf.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Sun, 27 Mar 2011 15:19:15 +0200
-Subject: [PATCH] don't link against libelf
-
-libelf is not used. It's just some broken configure check.
-Patch from gentoo.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- configure.in |    9 ---------
- 1 files changed, 0 insertions(+), 9 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,
- #endif
- ], LIBS="$LIBS -lsocket -linet";seqptx=1)
- 
--oldlibs="$LIBS"
--LIBS="$LIBS -lelf"
--AC_CHECKING(SVR4)
--AC_TRY_LINK([#include <utmpx.h>
--],,
--[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_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/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/0002-remove-configure-AC_TRY_RUN-tests.patch b/patches/screen-4.5.0/0001-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/0001-remove-configure-AC_TRY_RUN-tests.patch
index f5299c3..bba0107 100644
--- a/patches/screen-4.0.3/0002-remove-configure-AC_TRY_RUN-tests.patch
+++ b/patches/screen-4.5.0/0001-remove-configure-AC_TRY_RUN-tests.patch
@@ -8,16 +8,16 @@ Not for upstream.
 
 Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
 ---
- 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 ffe2e372426c..f5b3d15190bd 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 +47,7 @@ index c1460af..419279d 100644
  AC_PROG_AWK
  
  AC_PROG_INSTALL
-@@ -279,354 +254,6 @@ AC_CHECKING(select with $LIBS)
+@@ -303,353 +278,6 @@ AC_CHECKING(select with $LIBS)
  AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],, 
  AC_MSG_ERROR(!!! no select - no screen))
  )
@@ -57,7 +57,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 +80,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 +115,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 +127,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 +150,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 +161,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 +181,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 +200,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 +225,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 +237,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 +286,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 +304,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 +329,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 +361,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 +389,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 +401,9 @@ index c1460af..419279d 100644
  
  dnl
  dnl    ****  termcap or terminfo  ****
-@@ -654,12 +281,8 @@ AC_CHECKING(libncurses)
+@@ -686,12 +314,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 +416,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")
+@@ -742,95 +366,6 @@ AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
  AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
  fi
  
@@ -513,7 +512,7 @@ index c1460af..419279d 100644
  dnl
  dnl    ****  utmp handling  ****
  dnl
-@@ -871,101 +405,6 @@ AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs")
+@@ -903,101 +438,6 @@ AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs")
  fi
  )
  
@@ -615,7 +614,7 @@ index c1460af..419279d 100644
  AC_PROGRAM_SOURCE([
  #include <sys/types.h>
  #include <sys/param.h>
-@@ -1037,41 +476,8 @@ sigset(0, (void (*)())0);
+@@ -1069,41 +509,8 @@ sigset(0, (void (*)())0);
  sigset(0, (int (*)())0);
  #endif
  ], AC_DEFINE(USESIGSET))
@@ -623,7 +622,7 @@ index c1460af..419279d 100644
 -AC_TRY_RUN([
 -#include <sys/types.h>
 -#include <signal.h>
- 
+-
 -#ifndef SIGCLD
 -#define SIGCLD SIGCHLD
 -#endif
@@ -632,7 +631,7 @@ index c1460af..419279d 100644
 -#endif
 -
 -int got;
--
+ 
 -#ifdef SIGVOID
 -void
 -#endif
@@ -658,7 +657,7 @@ index c1460af..419279d 100644
  
  fi
  
-@@ -1139,50 +545,12 @@ AC_CHECKING(fdwalk)
+@@ -1171,50 +578,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 +712,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
+ 
+@@ -1300,8 +669,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/0002-autoconf-cleanup.patch
similarity index 74%
rename from patches/screen-4.0.3/0004-autoconf-cleanup.patch
rename to patches/screen-4.5.0/0002-autoconf-cleanup.patch
index e9379f8..7e38a68 100644
--- a/patches/screen-4.0.3/0004-autoconf-cleanup.patch
+++ b/patches/screen-4.5.0/0002-autoconf-cleanup.patch
@@ -6,23 +6,23 @@ update to latest autoconf syntax
 
 Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
 ---
- 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 f5b3d15190bd..842d64ae4a7d 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 +44,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 +53,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 +62,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 +71,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 +88,7 @@ index 5411add..6864c71 100644
  
  AC_CHECKING(for sequent/ptx)
  AC_EGREP_CPP(yes,
-@@ -184,16 +184,16 @@ dnl (currently not used)
+@@ -201,16 +201,16 @@ dnl (currently not used)
  dnl
  dnl AC_CHECKING(for pid_t)
  dnl AC_EGREP_CPP(pid_t,[#include <sys/types.h>
@@ -108,7 +108,7 @@ index 5411add..6864c71 100644
  dnl
  
  dnl
-@@ -215,7 +215,7 @@ setpgrp();
+@@ -232,7 +232,7 @@ setpgrp();
  int y = TIOCNOTTY;
  #endif
  #endif
@@ -116,28 +116,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()  ****
+@@ -244,7 +244,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);
+@@ -258,7 +258,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)
+@@ -314,23 +314,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 +163,7 @@ index 5411add..6864c71 100644
  sysvr4ptys=1])
  fi
  
-@@ -306,7 +306,7 @@ AC_CHECK_FUNCS(getpt)
+@@ -339,7 +339,7 @@ AC_CHECK_FUNCS(getpt)
  dnl check for openpty()
  if test -z "$sysvr4ptys"; then
  AC_CHECK_FUNCS(openpty,,
@@ -172,7 +172,7 @@ index 5411add..6864c71 100644
  fi
  
  AC_CHECKING(for ptyranges)
-@@ -329,8 +329,8 @@ dnl fi
+@@ -362,8 +362,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 +183,7 @@ index 5411add..6864c71 100644
  fi
  
  dnl
-@@ -350,7 +350,7 @@ AC_TRY_LINK([
+@@ -383,7 +383,7 @@ AC_TRY_LINK([
  #define pututline _pututline
  #endif
  ],
@@ -192,7 +192,7 @@ index 5411add..6864c71 100644
  olibs="$LIBS"
  LIBS="$LIBS -lgen"
  AC_CHECKING(getutent with -lgen)
-@@ -367,7 +367,7 @@ AC_TRY_LINK([
+@@ -400,7 +400,7 @@ AC_TRY_LINK([
  #define pututline _pututline
  #endif
  ],
@@ -201,7 +201,7 @@ index 5411add..6864c71 100644
  )
  AC_CHECKING(ut_host)
  AC_TRY_COMPILE([
-@@ -379,10 +379,10 @@ AC_TRY_COMPILE([
+@@ -412,10 +412,10 @@ AC_TRY_COMPILE([
  #else
  #include <utmp.h>
  #endif
@@ -214,7 +214,7 @@ index 5411add..6864c71 100644
    LIBS="$LIBS -lutempter"
  fi
  
-@@ -395,13 +395,13 @@ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
+@@ -428,13 +428,13 @@ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
  
  AC_CHECKING(getloadavg)
  AC_TRY_LINK(,[getloadavg((double *)0, 0);],
@@ -230,7 +230,7 @@ index 5411add..6864c71 100644
  fi
  )
  
-@@ -441,10 +441,10 @@ loadnum=3
+@@ -474,10 +474,10 @@ loadnum=3
  #endif
  ])
  
@@ -245,7 +245,7 @@ index 5411add..6864c71 100644
  
  dnl
  dnl    ****  signal handling  ****
-@@ -453,7 +453,7 @@ if test -n "$posix" ; then
+@@ -486,7 +486,7 @@ if test -n "$posix" ; then
  
  dnl POSIX has reliable signals with void return type.
  AC_NOTE(assuming posix signal definition)
@@ -254,7 +254,7 @@ index 5411add..6864c71 100644
  
  else
  
-@@ -464,7 +464,7 @@ AC_TRY_COMPILE(
+@@ -497,7 +497,7 @@ AC_TRY_COMPILE(
  #ifdef signal
  #undef signal
  #endif
@@ -263,7 +263,7 @@ index 5411add..6864c71 100644
  AC_CHECKING(sigset)
  AC_TRY_LINK([
  #include <sys/types.h>
-@@ -475,9 +475,9 @@ sigset(0, (void (*)())0);
+@@ -508,9 +508,9 @@ sigset(0, (void (*)())0);
  #else
  sigset(0, (int (*)())0);
  #endif
@@ -275,7 +275,7 @@ index 5411add..6864c71 100644
  
  fi
  
-@@ -503,7 +503,7 @@ AC_TRY_LINK(,[closelog();], , [oldlibs="$LIBS"
+@@ -536,7 +536,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 +284,7 @@ index 5411add..6864c71 100644
  
  AC_EGREP_CPP(yes,
  [#ifdef M_UNIX
-@@ -523,34 +523,34 @@ AC_TRY_COMPILE([#include <sys/types.h>
+@@ -556,39 +556,39 @@ AC_TRY_COMPILE([#include <sys/types.h>
  #ifdef WEXITSTATUS
    y = WEXITSTATUS(x);
  #endif
@@ -327,31 +327,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])
- ))
+@@ -608,21 +608,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 +362,7 @@ index 5411add..6864c71 100644
  
  AC_SEARCH_LIBS(gethostname, nsl)
  
-@@ -593,25 +593,25 @@ if test "$enable_pam" = "yes"; then
+@@ -637,25 +637,25 @@ if test "$enable_pam" = "yes"; then
  	pam_start(0, 0, 0, 0);
  	pam_authenticate(0, 0);
  	pam_end(0,0);
@@ -369,7 +371,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 +393,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/0003-Fix-some-typos-found-by-Lintian.patch b/patches/screen-4.5.0/0003-Fix-some-typos-found-by-Lintian.patch
new file mode 100644
index 0000000..b368f44
--- /dev/null
+++ b/patches/screen-4.5.0/0003-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/0004-Replace-the-composed-characters-with-their-respectiv.patch b/patches/screen-4.5.0/0004-Replace-the-composed-characters-with-their-respectiv.patch
new file mode 100644
index 0000000..4fb8ae7
--- /dev/null
+++ b/patches/screen-4.5.0/0004-Replace-the-composed-characters-with-their-respectiv.patch
@@ -0,0 +1,363 @@
+From: Ben Finney <ben@benfinney.id.au>
+Date: Mon, 3 Jul 2017 10:41:37 +0200
+Subject: [PATCH] Replace the composed characters with their respective
+ description.
+
+Bugs-Debian: https://bugs.debian.org/437024
+---
+ process.c | 342 +++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 171 insertions(+), 171 deletions(-)
+
+diff --git a/process.c b/process.c
+index 63c85b1a0a65..f369e08805d3 100644
+--- a/process.c
++++ b/process.c
+@@ -252,177 +252,177 @@ struct digraph
+ 
+ /* digraph table taken from old vim and rfc1345 */
+ static struct digraph digraphs[MAX_DIGRAPH + 1] = {
+-    {{' ', ' '}, 160},	/* � */
+-    {{'N', 'S'}, 160},	/* � */
+-    {{'~', '!'}, 161},	/* � */
+-    {{'!', '!'}, 161},	/* � */
+-    {{'!', 'I'}, 161},	/* � */
+-    {{'c', '|'}, 162},	/* � */
+-    {{'c', 't'}, 162},	/* � */
+-    {{'$', '$'}, 163},	/* � */
+-    {{'P', 'd'}, 163},	/* � */
+-    {{'o', 'x'}, 164},	/* � */
+-    {{'C', 'u'}, 164},	/* � */
+-    {{'C', 'u'}, 164},	/* � */
+-    {{'E', 'u'}, 164},	/* � */
+-    {{'Y', '-'}, 165},	/* � */
+-    {{'Y', 'e'}, 165},	/* � */
+-    {{'|', '|'}, 166},	/* � */
+-    {{'B', 'B'}, 166},	/* � */
+-    {{'p', 'a'}, 167},	/* � */
+-    {{'S', 'E'}, 167},	/* � */
+-    {{'"', '"'}, 168},	/* � */
+-    {{'\'', ':'}, 168},	/* � */
+-    {{'c', 'O'}, 169},	/* � */
+-    {{'C', 'o'}, 169},	/* � */
+-    {{'a', '-'}, 170},	/* � */
+-    {{'<', '<'}, 171},	/* � */
+-    {{'-', ','}, 172},	/* � */
+-    {{'N', 'O'}, 172},	/* � */
+-    {{'-', '-'}, 173},	/* � */
+-    {{'r', 'O'}, 174},	/* � */
+-    {{'R', 'g'}, 174},	/* � */
+-    {{'-', '='}, 175},	/* � */
+-    {{'\'', 'm'}, 175},	/* � */
+-    {{'~', 'o'}, 176},	/* � */
+-    {{'D', 'G'}, 176},	/* � */
+-    {{'+', '-'}, 177},	/* � */
+-    {{'2', '2'}, 178},	/* � */
+-    {{'2', 'S'}, 178},	/* � */
+-    {{'3', '3'}, 179},	/* � */
+-    {{'3', 'S'}, 179},	/* � */
+-    {{'\'', '\''}, 180},	/* � */
+-    {{'j', 'u'}, 181},	/* � */
+-    {{'M', 'y'}, 181},	/* � */
+-    {{'p', 'p'}, 182},	/* � */
+-    {{'P', 'I'}, 182},	/* � */
+-    {{'~', '.'}, 183},	/* � */
+-    {{'.', 'M'}, 183},	/* � */
+-    {{',', ','}, 184},	/* � */
+-    {{'\'', ','}, 184},	/* � */
+-    {{'1', '1'}, 185},	/* � */
+-    {{'1', 'S'}, 185},	/* � */
+-    {{'o', '-'}, 186},	/* � */
+-    {{'>', '>'}, 187},	/* � */
+-    {{'1', '4'}, 188},	/* � */
+-    {{'1', '2'}, 189},	/* � */
+-    {{'3', '4'}, 190},	/* � */
+-    {{'~', '?'}, 191},	/* � */
+-    {{'?', '?'}, 191},	/* � */
+-    {{'?', 'I'}, 191},	/* � */
+-    {{'A', '`'}, 192},	/* � */
+-    {{'A', '!'}, 192},	/* � */
+-    {{'A', '\''}, 193},	/* � */
+-    {{'A', '^'}, 194},	/* � */
+-    {{'A', '>'}, 194},	/* � */
+-    {{'A', '~'}, 195},	/* � */
+-    {{'A', '?'}, 195},	/* � */
+-    {{'A', '"'}, 196},	/* � */
+-    {{'A', ':'}, 196},	/* � */
+-    {{'A', '@'}, 197},	/* � */
+-    {{'A', 'A'}, 197},	/* � */
+-    {{'A', 'E'}, 198},	/* � */
+-    {{'C', ','}, 199},	/* � */
+-    {{'E', '`'}, 200},	/* � */
+-    {{'E', '!'}, 200},	/* � */
+-    {{'E', '\''}, 201},	/* � */
+-    {{'E', '^'}, 202},	/* � */
+-    {{'E', '>'}, 202},	/* � */
+-    {{'E', '"'}, 203},	/* � */
+-    {{'E', ':'}, 203},	/* � */
+-    {{'I', '`'}, 204},	/* � */
+-    {{'I', '!'}, 204},	/* � */
+-    {{'I', '\''}, 205},	/* � */
+-    {{'I', '^'}, 206},	/* � */
+-    {{'I', '>'}, 206},	/* � */
+-    {{'I', '"'}, 207},	/* � */
+-    {{'I', ':'}, 207},	/* � */
+-    {{'D', '-'}, 208},	/* � */
+-    {{'N', '~'}, 209},	/* � */
+-    {{'N', '?'}, 209},	/* � */
+-    {{'O', '`'}, 210},	/* � */
+-    {{'O', '!'}, 210},	/* � */
+-    {{'O', '\''}, 211},	/* � */
+-    {{'O', '^'}, 212},	/* � */
+-    {{'O', '>'}, 212},	/* � */
+-    {{'O', '~'}, 213},	/* � */
+-    {{'O', '?'}, 213},	/* � */
+-    {{'O', '"'}, 214},	/* � */
+-    {{'O', ':'}, 214},	/* � */
+-    {{'/', '\\'}, 215},	/* � */
+-    {{'*', 'x'}, 215},	/* � */
+-    {{'O', '/'}, 216},	/* � */
+-    {{'U', '`'}, 217},	/* � */
+-    {{'U', '!'}, 217},	/* � */
+-    {{'U', '\''}, 218},	/* � */
+-    {{'U', '^'}, 219},	/* � */
+-    {{'U', '>'}, 219},	/* � */
+-    {{'U', '"'}, 220},	/* � */
+-    {{'U', ':'}, 220},	/* � */
+-    {{'Y', '\''}, 221},	/* � */
+-    {{'I', 'p'}, 222},	/* � */
+-    {{'T', 'H'}, 222},	/* � */
+-    {{'s', 's'}, 223},	/* � */
+-    {{'s', '"'}, 223},	/* � */
+-    {{'a', '`'}, 224},	/* � */
+-    {{'a', '!'}, 224},	/* � */
+-    {{'a', '\''}, 225},	/* � */
+-    {{'a', '^'}, 226},	/* � */
+-    {{'a', '>'}, 226},	/* � */
+-    {{'a', '~'}, 227},	/* � */
+-    {{'a', '?'}, 227},	/* � */
+-    {{'a', '"'}, 228},	/* � */
+-    {{'a', ':'}, 228},	/* � */
+-    {{'a', 'a'}, 229},	/* � */
+-    {{'a', 'e'}, 230},	/* � */
+-    {{'c', ','}, 231},	/* � */
+-    {{'e', '`'}, 232},	/* � */
+-    {{'e', '!'}, 232},	/* � */
+-    {{'e', '\''}, 233},	/* � */
+-    {{'e', '^'}, 234},	/* � */
+-    {{'e', '>'}, 234},	/* � */
+-    {{'e', '"'}, 235},	/* � */
+-    {{'e', ':'}, 235},	/* � */
+-    {{'i', '`'}, 236},	/* � */
+-    {{'i', '!'}, 236},	/* � */
+-    {{'i', '\''}, 237},	/* � */
+-    {{'i', '^'}, 238},	/* � */
+-    {{'i', '>'}, 238},	/* � */
+-    {{'i', '"'}, 239},	/* � */
+-    {{'i', ':'}, 239},	/* � */
+-    {{'d', '-'}, 240},	/* � */
+-    {{'n', '~'}, 241},	/* � */
+-    {{'n', '?'}, 241},	/* � */
+-    {{'o', '`'}, 242},	/* � */
+-    {{'o', '!'}, 242},	/* � */
+-    {{'o', '\''}, 243},	/* � */
+-    {{'o', '^'}, 244},	/* � */
+-    {{'o', '>'}, 244},	/* � */
+-    {{'o', '~'}, 245},	/* � */
+-    {{'o', '?'}, 245},	/* � */
+-    {{'o', '"'}, 246},	/* � */
+-    {{'o', ':'}, 246},	/* � */
+-    {{':', '-'}, 247},	/* � */
+-    {{'o', '/'}, 248},	/* � */
+-    {{'u', '`'}, 249},	/* � */
+-    {{'u', '!'}, 249},	/* � */
+-    {{'u', '\''}, 250},	/* � */
+-    {{'u', '^'}, 251},	/* � */
+-    {{'u', '>'}, 251},	/* � */
+-    {{'u', '"'}, 252},	/* � */
+-    {{'u', ':'}, 252},	/* � */
+-    {{'y', '\''}, 253},	/* � */
+-    {{'i', 'p'}, 254},	/* � */
+-    {{'t', 'h'}, 254},	/* � */
+-    {{'y', '"'}, 255},	/* � */
+-    {{'y', ':'}, 255},	/* � */
+-    {{'"', '['}, 196},	/* � */
+-    {{'"', '\\'}, 214},	/* � */
+-    {{'"', ']'}, 220},	/* � */
+-    {{'"', '{'}, 228},	/* � */
+-    {{'"', '|'}, 246},	/* � */
+-    {{'"', '}'}, 252},	/* � */
+-    {{'"', '~'}, 223}	/* � */
++    {{' ', ' '},   0x00a0},   /* NO-BREAK SPACE */
++    {{'N', 'S'},   0x00a0},   /* NO-BREAK SPACE */
++    {{'~', '!'},   0x00a1},   /* INVERTED EXCLAMATION MARK */
++    {{'!', '!'},   0x00a1},   /* INVERTED EXCLAMATION MARK */
++    {{'!', 'I'},   0x00a1},   /* INVERTED EXCLAMATION MARK */
++    {{'c', '|'},   0x00a2},   /* CENT SIGN */
++    {{'c', 't'},   0x00a2},   /* CENT SIGN */
++    {{'$', '$'},   0x00a3},   /* POUND SIGN */
++    {{'P', 'd'},   0x00a3},   /* POUND SIGN */
++    {{'o', 'x'},   0x00a4},   /* CURRENCY SIGN */
++    {{'C', 'u'},   0x00a4},   /* CURRENCY SIGN */
++    {{'C', 'u'},   0x00a4},   /* CURRENCY SIGN */
++    {{'E', 'u'},   0x00a4},   /* CURRENCY SIGN */
++    {{'Y', '-'},   0x00a5},   /* YEN SIGN */
++    {{'Y', 'e'},   0x00a5},   /* YEN SIGN */
++    {{'|', '|'},   0x00a6},   /* BROKEN BAR */
++    {{'B', 'B'},   0x00a6},   /* BROKEN BAR */
++    {{'p', 'a'},   0x00a7},   /* SECTION SIGN */
++    {{'S', 'E'},   0x00a7},   /* SECTION SIGN */
++    {{'"', '"'},   0x00a8},   /* DIAERESIS */
++    {{'\'', ':'},  0x00a8},   /* DIAERESIS */
++    {{'c', 'O'},   0x00a9},   /* COPYRIGHT SIGN */
++    {{'C', 'o'},   0x00a9},   /* COPYRIGHT SIGN */
++    {{'-', 'a'},   0x00aa},   /* FEMININE ORDINAL INDICATOR */
++    {{'<', '<'},   0x00ab},   /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
++    {{'-', ','},   0x00ac},   /* NOT SIGN */
++    {{'N', 'O'},   0x00ac},   /* NOT SIGN */
++    {{'-', '-'},   0x00ad},   /* SOFT HYPHEN */
++    {{'r', 'O'},   0x00ae},   /* REGISTERED SIGN */
++    {{'R', 'g'},   0x00ae},   /* REGISTERED SIGN */
++    {{'-', '='},   0x00af},   /* MACRON */
++    {{'\'', 'm'},  0x00af},   /* MACRON */
++    {{'~', 'o'},   0x00b0},   /* DEGREE SIGN */
++    {{'D', 'G'},   0x00b0},   /* DEGREE SIGN */
++    {{'+', '-'},   0x00b1},   /* PLUS-MINUS SIGN */
++    {{'2', '2'},   0x00b2},   /* SUPERSCRIPT TWO */
++    {{'2', 'S'},   0x00b2},   /* SUPERSCRIPT TWO */
++    {{'3', '3'},   0x00b3},   /* SUPERSCRIPT THREE */
++    {{'3', 'S'},   0x00b3},   /* SUPERSCRIPT THREE */
++    {{'\'', '\''}, 0x00b4},   /* ACUTE ACCENT */
++    {{'j', 'u'},   0x00b5},   /* MICRO SIGN */
++    {{'M', 'y'},   0x00b5},   /* MICRO SIGN */
++    {{'p', 'p'},   0x00b6},   /* PILCROW SIGN */
++    {{'P', 'I'},   0x00b6},   /* PILCROW SIGN */
++    {{'~', '.'},   0x00b7},   /* MIDDLE DOT */
++    {{'.', 'M'},   0x00b7},   /* MIDDLE DOT */
++    {{',', ','},   0x00b8},   /* CEDILLA */
++    {{'\'', ','},  0x00b8},   /* CEDILLA */
++    {{'1', '1'},   0x00b9},   /* SUPERSCRIPT ONE */
++    {{'1', 'S'},   0x00b9},   /* SUPERSCRIPT ONE */
++    {{'-', 'o'},   0x00ba},   /* MASCULINE ORDINAL INDICATOR */
++    {{'>', '>'},   0x00bb},   /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
++    {{'1', '4'},   0x00bc},   /* VULGAR FRACTION ONE QUARTER */
++    {{'1', '2'},   0x00bd},   /* VULGAR FRACTION ONE HALF */
++    {{'3', '4'},   0x00be},   /* VULGAR FRACTION THREE QUARTERS */
++    {{'~', '?'},   0x00bf},   /* INVERTED QUESTION MARK */
++    {{'?', '?'},   0x00bf},   /* INVERTED QUESTION MARK */
++    {{'?', 'I'},   0x00bf},   /* INVERTED QUESTION MARK */
++    {{'A', '`'},   0x00c0},   /* LATIN CAPITAL LETTER A WITH GRAVE */
++    {{'A', '!'},   0x00c0},   /* LATIN CAPITAL LETTER A WITH GRAVE */
++    {{'A', '\''},  0x00c1},   /* LATIN CAPITAL LETTER A WITH ACUTE */
++    {{'A', '^'},   0x00c2},   /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
++    {{'A', '>'},   0x00c2},   /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
++    {{'A', '~'},   0x00c3},   /* LATIN CAPITAL LETTER A WITH TILDE */
++    {{'A', '?'},   0x00c3},   /* LATIN CAPITAL LETTER A WITH TILDE */
++    {{'A', '"'},   0x00c4},   /* LATIN CAPITAL LETTER A WITH DIAERESIS */
++    {{'A', ':'},   0x00c4},   /* LATIN CAPITAL LETTER A WITH DIAERESIS */
++    {{'A', '@'},   0x00c5},   /* LATIN CAPITAL LETTER A WITH RING ABOVE */
++    {{'A', 'A'},   0x00c5},   /* LATIN CAPITAL LETTER A WITH RING ABOVE */
++    {{'A', 'E'},   0x00c6},   /* LATIN CAPITAL LETTER AE */
++    {{'C', ','},   0x00c7},   /* LATIN CAPITAL LETTER C WITH CEDILLA */
++    {{'E', '`'},   0x00c8},   /* LATIN CAPITAL LETTER E WITH GRAVE */
++    {{'E', '!'},   0x00c8},   /* LATIN CAPITAL LETTER E WITH GRAVE */
++    {{'E', '\''},  0x00c9},   /* LATIN CAPITAL LETTER E WITH ACUTE */
++    {{'E', '^'},   0x00ca},   /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
++    {{'E', '>'},   0x00ca},   /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
++    {{'E', '"'},   0x00cb},   /* LATIN CAPITAL LETTER E WITH DIAERESIS */
++    {{'E', ':'},   0x00cb},   /* LATIN CAPITAL LETTER E WITH DIAERESIS */
++    {{'I', '`'},   0x00cc},   /* LATIN CAPITAL LETTER I WITH GRAVE */
++    {{'I', '!'},   0x00cc},   /* LATIN CAPITAL LETTER I WITH GRAVE */
++    {{'I', '\''},  0x00cd},   /* LATIN CAPITAL LETTER I WITH ACUTE */
++    {{'I', '^'},   0x00ce},   /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
++    {{'I', '>'},   0x00ce},   /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
++    {{'I', '"'},   0x00cf},   /* LATIN CAPITAL LETTER I WITH DIAERESIS */
++    {{'I', ':'},   0x00cf},   /* LATIN CAPITAL LETTER I WITH DIAERESIS */
++    {{'D', '-'},   0x00d0},   /* LATIN CAPITAL LETTER ETH */
++    {{'N', '~'},   0x00d1},   /* LATIN CAPITAL LETTER N WITH TILDE */
++    {{'N', '?'},   0x00d1},   /* LATIN CAPITAL LETTER N WITH TILDE */
++    {{'O', '`'},   0x00d2},   /* LATIN CAPITAL LETTER O WITH GRAVE */
++    {{'O', '!'},   0x00d2},   /* LATIN CAPITAL LETTER O WITH GRAVE */
++    {{'O', '\''},  0x00d3},   /* LATIN CAPITAL LETTER O WITH ACUTE */
++    {{'O', '^'},   0x00d4},   /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
++    {{'O', '>'},   0x00d4},   /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
++    {{'O', '~'},   0x00d5},   /* LATIN CAPITAL LETTER O WITH TILDE */
++    {{'O', '?'},   0x00d5},   /* LATIN CAPITAL LETTER O WITH TILDE */
++    {{'O', '"'},   0x00d6},   /* LATIN CAPITAL LETTER O WITH DIAERESIS */
++    {{'O', ':'},   0x00d6},   /* LATIN CAPITAL LETTER O WITH DIAERESIS */
++    {{'/', '\\'},  0x00d7},   /* MULTIPLICATION SIGN */
++    {{'*', 'x'},   0x00d7},   /* MULTIPLICATION SIGN */
++    {{'O', '/'},   0x00d8},   /* LATIN CAPITAL LETTER O WITH STROKE */
++    {{'U', '`'},   0x00d9},   /* LATIN CAPITAL LETTER U WITH GRAVE */
++    {{'U', '!'},   0x00d9},   /* LATIN CAPITAL LETTER U WITH GRAVE */
++    {{'U', '\''},  0x00da},   /* LATIN CAPITAL LETTER U WITH ACUTE */
++    {{'U', '^'},   0x00db},   /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
++    {{'U', '>'},   0x00db},   /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
++    {{'U', '"'},   0x00dc},   /* LATIN CAPITAL LETTER U WITH DIAERESIS */
++    {{'U', ':'},   0x00dc},   /* LATIN CAPITAL LETTER U WITH DIAERESIS */
++    {{'Y', '\''},  0x00dd},   /* LATIN CAPITAL LETTER Y WITH ACUTE */
++    {{'I', 'p'},   0x00de},   /* LATIN CAPITAL LETTER THORN */
++    {{'T', 'H'},   0x00de},   /* LATIN CAPITAL LETTER THORN */
++    {{'s', 's'},   0x00df},   /* LATIN SMALL LETTER SHARP S */
++    {{'s', '"'},   0x00df},   /* LATIN SMALL LETTER SHARP S */
++    {{'a', '`'},   0x00e0},   /* LATIN SMALL LETTER A WITH GRAVE */
++    {{'a', '!'},   0x00e0},   /* LATIN SMALL LETTER A WITH GRAVE */
++    {{'a', '\''},  0x00e1},   /* LATIN SMALL LETTER A WITH ACUTE */
++    {{'a', '^'},   0x00e2},   /* LATIN SMALL LETTER A WITH CIRCUMFLEX */
++    {{'a', '>'},   0x00e2},   /* LATIN SMALL LETTER A WITH CIRCUMFLEX */
++    {{'a', '~'},   0x00e3},   /* LATIN SMALL LETTER A WITH TILDE */
++    {{'a', '?'},   0x00e3},   /* LATIN SMALL LETTER A WITH TILDE */
++    {{'a', '"'},   0x00e4},   /* LATIN SMALL LETTER A WITH DIAERESIS */
++    {{'a', ':'},   0x00e4},   /* LATIN SMALL LETTER A WITH DIAERESIS */
++    {{'a', 'a'},   0x00e5},   /* LATIN SMALL LETTER A WITH RING ABOVE */
++    {{'a', 'e'},   0x00e6},   /* LATIN SMALL LETTER AE */
++    {{'c', ','},   0x00e7},   /* LATIN SMALL LETTER C WITH CEDILLA */
++    {{'e', '`'},   0x00e8},   /* LATIN SMALL LETTER E WITH GRAVE */
++    {{'e', '!'},   0x00e8},   /* LATIN SMALL LETTER E WITH GRAVE */
++    {{'e', '\''},  0x00e9},   /* LATIN SMALL LETTER E WITH ACUTE */
++    {{'e', '^'},   0x00ea},   /* LATIN SMALL LETTER E WITH CIRCUMFLEX */
++    {{'e', '>'},   0x00ea},   /* LATIN SMALL LETTER E WITH CIRCUMFLEX */
++    {{'e', '"'},   0x00eb},   /* LATIN SMALL LETTER E WITH DIAERESIS */
++    {{'e', ':'},   0x00eb},   /* LATIN SMALL LETTER E WITH DIAERESIS */
++    {{'i', '`'},   0x00ec},   /* LATIN SMALL LETTER I WITH GRAVE */
++    {{'i', '!'},   0x00ec},   /* LATIN SMALL LETTER I WITH GRAVE */
++    {{'i', '\''},  0x00ed},   /* LATIN SMALL LETTER I WITH ACUTE */
++    {{'i', '^'},   0x00ee},   /* LATIN SMALL LETTER I WITH CIRCUMFLEX */
++    {{'i', '>'},   0x00ee},   /* LATIN SMALL LETTER I WITH CIRCUMFLEX */
++    {{'i', '"'},   0x00ef},   /* LATIN SMALL LETTER I WITH DIAERESIS */
++    {{'i', ':'},   0x00ef},   /* LATIN SMALL LETTER I WITH DIAERESIS */
++    {{'d', '-'},   0x00f0},   /* LATIN SMALL LETTER ETH */
++    {{'n', '~'},   0x00f1},   /* LATIN SMALL LETTER N WITH TILDE */
++    {{'n', '?'},   0x00f1},   /* LATIN SMALL LETTER N WITH TILDE */
++    {{'o', '`'},   0x00f2},   /* LATIN SMALL LETTER O WITH GRAVE */
++    {{'o', '!'},   0x00f2},   /* LATIN SMALL LETTER O WITH GRAVE */
++    {{'o', '\''},  0x00f3},   /* LATIN SMALL LETTER O WITH ACUTE */
++    {{'o', '^'},   0x00f4},   /* LATIN SMALL LETTER O WITH CIRCUMFLEX */
++    {{'o', '>'},   0x00f4},   /* LATIN SMALL LETTER O WITH CIRCUMFLEX */
++    {{'o', '~'},   0x00f5},   /* LATIN SMALL LETTER O WITH TILDE */
++    {{'o', '?'},   0x00f5},   /* LATIN SMALL LETTER O WITH TILDE */
++    {{'o', '"'},   0x00f6},   /* LATIN SMALL LETTER O WITH DIAERESIS */
++    {{'o', ':'},   0x00f6},   /* LATIN SMALL LETTER O WITH DIAERESIS */
++    {{'-', ':'},   0x00f7},   /* DIVISION SIGN */
++    {{'o', '/'},   0x00f8},   /* LATIN SMALL LETTER O WITH STROKE */
++    {{'u', '`'},   0x00f9},   /* LATIN SMALL LETTER U WITH GRAVE */
++    {{'u', '!'},   0x00f9},   /* LATIN SMALL LETTER U WITH GRAVE */
++    {{'u', '\''},  0x00fa},   /* LATIN SMALL LETTER U WITH ACUTE */
++    {{'u', '^'},   0x00fb},   /* LATIN SMALL LETTER U WITH CIRCUMFLEX */
++    {{'u', '>'},   0x00fb},   /* LATIN SMALL LETTER U WITH CIRCUMFLEX */
++    {{'u', '"'},   0x00fc},   /* LATIN SMALL LETTER U WITH DIAERESIS */
++    {{'u', ':'},   0x00fc},   /* LATIN SMALL LETTER U WITH DIAERESIS */
++    {{'y', '\''},  0x00fd},   /* LATIN SMALL LETTER Y WITH ACUTE */
++    {{'i', 'p'},   0x00fe},   /* LATIN SMALL LETTER THORN */
++    {{'t', 'h'},   0x00fe},   /* LATIN SMALL LETTER THORN */
++    {{'y', '"'},   0x00ff},   /* LATIN SMALL LETTER Y WITH DIAERESIS */
++    {{'y', ':'},   0x00ff},   /* LATIN SMALL LETTER Y WITH DIAERESIS */
++    {{'"', '['},   0x00c4},   /* LATIN CAPITAL LETTER A WITH DIAERESIS */
++    {{'"', '\\'},  0x00d6},   /* LATIN CAPITAL LETTER O WITH DIAERESIS */
++    {{'"', ']'},   0x00dc},   /* LATIN CAPITAL LETTER U WITH DIAERESIS */
++    {{'"', '{'},   0x00e4},   /* LATIN SMALL LETTER A WITH DIAERESIS */
++    {{'"', '|'},   0x00f6},   /* LATIN SMALL LETTER O WITH DIAERESIS */
++    {{'"', '}'},   0x00fc},   /* LATIN SMALL LETTER U WITH DIAERESIS */
++    {{'"', '~'},   0x00df},   /* LATIN SMALL LETTER SHARP S */
+ };
+ 
+ #define RESIZE_FLAG_H 1
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..f78c42c
--- /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 f369e08805d3..4d83b87272c4 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..f6f5912
--- /dev/null
+++ b/patches/screen-4.5.0/series
@@ -0,0 +1,12 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-remove-configure-AC_TRY_RUN-tests.patch
+0002-autoconf-cleanup.patch
+0003-Fix-some-typos-found-by-Lintian.patch
+0004-Replace-the-composed-characters-with-their-respectiv.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
+# 452e3b0a579f5d7c4e5df6dd7de3db05  - git-ptx-patches magic
diff --git a/rules/screen.make b/rules/screen.make
index f9d7869..82a00cd 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] screen: version bump 4.0.3 -> 4.5.0
  2017-09-15 13:10 [ptxdist] [PATCH] screen: version bump 4.0.3 -> 4.5.0 Denis OSTERLAND
@ 2017-09-16 10:37 ` Michael Olbrich
  2017-09-18  9:18 ` [ptxdist] [PATCH v2] " Denis OSTERLAND
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2017-09-16 10:37 UTC (permalink / raw)
  To: ptxdist

On Fri, Sep 15, 2017 at 01:10:39PM +0000, Denis OSTERLAND wrote:
> Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com>
> ---
>  .../0001-don-t-link-against-libelf.patch           |  35 --
>  .../0003-Fix-screenencodings-dir.patch             |  27 --
>  patches/screen-4.0.3/series                        |   6 -
>  .../0001-remove-configure-AC_TRY_RUN-tests.patch}  | 130 ++++----
>  .../0002-autoconf-cleanup.patch}                   | 143 ++++----
>  .../0003-Fix-some-typos-found-by-Lintian.patch     |  48 +++
>  ...-composed-characters-with-their-respectiv.patch | 363 +++++++++++++++++++++

The patches don't apply:

Applying patch 0004-Replace-the-composed-characters-with-their-respectiv.patch
patching file process.c
Hunk #1 FAILED at 252.
1 out of 1 hunk FAILED -- rejects in file process.c
Patch 0004-Replace-the-composed-characters-with-their-respectiv.patch does not apply (enforce with -f)

Michael

>  .../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 +-
>  15 files changed, 756 insertions(+), 218 deletions(-)
>  delete mode 100644 patches/screen-4.0.3/0001-don-t-link-against-libelf.patch
>  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/0002-remove-configure-AC_TRY_RUN-tests.patch => screen-4.5.0/0001-remove-configure-AC_TRY_RUN-tests.patch} (88%)
>  rename patches/{screen-4.0.3/0004-autoconf-cleanup.patch => screen-4.5.0/0002-autoconf-cleanup.patch} (74%)
>  create mode 100644 patches/screen-4.5.0/0003-Fix-some-typos-found-by-Lintian.patch
>  create mode 100644 patches/screen-4.5.0/0004-Replace-the-composed-characters-with-their-respectiv.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/0001-don-t-link-against-libelf.patch b/patches/screen-4.0.3/0001-don-t-link-against-libelf.patch
> deleted file mode 100644
> index 84ab86e..0000000
> --- a/patches/screen-4.0.3/0001-don-t-link-against-libelf.patch
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -From: Michael Olbrich <m.olbrich@pengutronix.de>
> -Date: Sun, 27 Mar 2011 15:19:15 +0200
> -Subject: [PATCH] don't link against libelf
> -
> -libelf is not used. It's just some broken configure check.
> -Patch from gentoo.
> -
> -Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ----
> - configure.in |    9 ---------
> - 1 files changed, 0 insertions(+), 9 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,
> - #endif
> - ], LIBS="$LIBS -lsocket -linet";seqptx=1)
> - 
> --oldlibs="$LIBS"
> --LIBS="$LIBS -lelf"
> --AC_CHECKING(SVR4)
> --AC_TRY_LINK([#include <utmpx.h>
> --],,
> --[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_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/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/0002-remove-configure-AC_TRY_RUN-tests.patch b/patches/screen-4.5.0/0001-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/0001-remove-configure-AC_TRY_RUN-tests.patch
> index f5299c3..bba0107 100644
> --- a/patches/screen-4.0.3/0002-remove-configure-AC_TRY_RUN-tests.patch
> +++ b/patches/screen-4.5.0/0001-remove-configure-AC_TRY_RUN-tests.patch
> @@ -8,16 +8,16 @@ Not for upstream.
>  
>  Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>  ---
> - 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 ffe2e372426c..f5b3d15190bd 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 +47,7 @@ index c1460af..419279d 100644
>   AC_PROG_AWK
>   
>   AC_PROG_INSTALL
> -@@ -279,354 +254,6 @@ AC_CHECKING(select with $LIBS)
> +@@ -303,353 +278,6 @@ AC_CHECKING(select with $LIBS)
>   AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],, 
>   AC_MSG_ERROR(!!! no select - no screen))
>   )
> @@ -57,7 +57,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 +80,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 +115,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 +127,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 +150,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 +161,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 +181,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 +200,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 +225,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 +237,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 +286,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 +304,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 +329,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 +361,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 +389,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 +401,9 @@ index c1460af..419279d 100644
>   
>   dnl
>   dnl    ****  termcap or terminfo  ****
> -@@ -654,12 +281,8 @@ AC_CHECKING(libncurses)
> +@@ -686,12 +314,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 +416,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")
> +@@ -742,95 +366,6 @@ AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
>   AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
>   fi
>   
> @@ -513,7 +512,7 @@ index c1460af..419279d 100644
>   dnl
>   dnl    ****  utmp handling  ****
>   dnl
> -@@ -871,101 +405,6 @@ AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs")
> +@@ -903,101 +438,6 @@ AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs")
>   fi
>   )
>   
> @@ -615,7 +614,7 @@ index c1460af..419279d 100644
>   AC_PROGRAM_SOURCE([
>   #include <sys/types.h>
>   #include <sys/param.h>
> -@@ -1037,41 +476,8 @@ sigset(0, (void (*)())0);
> +@@ -1069,41 +509,8 @@ sigset(0, (void (*)())0);
>   sigset(0, (int (*)())0);
>   #endif
>   ], AC_DEFINE(USESIGSET))
> @@ -623,7 +622,7 @@ index c1460af..419279d 100644
>  -AC_TRY_RUN([
>  -#include <sys/types.h>
>  -#include <signal.h>
> - 
> +-
>  -#ifndef SIGCLD
>  -#define SIGCLD SIGCHLD
>  -#endif
> @@ -632,7 +631,7 @@ index c1460af..419279d 100644
>  -#endif
>  -
>  -int got;
> --
> + 
>  -#ifdef SIGVOID
>  -void
>  -#endif
> @@ -658,7 +657,7 @@ index c1460af..419279d 100644
>   
>   fi
>   
> -@@ -1139,50 +545,12 @@ AC_CHECKING(fdwalk)
> +@@ -1171,50 +578,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 +712,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
> + 
> +@@ -1300,8 +669,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/0002-autoconf-cleanup.patch
> similarity index 74%
> rename from patches/screen-4.0.3/0004-autoconf-cleanup.patch
> rename to patches/screen-4.5.0/0002-autoconf-cleanup.patch
> index e9379f8..7e38a68 100644
> --- a/patches/screen-4.0.3/0004-autoconf-cleanup.patch
> +++ b/patches/screen-4.5.0/0002-autoconf-cleanup.patch
> @@ -6,23 +6,23 @@ update to latest autoconf syntax
>  
>  Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>  ---
> - 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 f5b3d15190bd..842d64ae4a7d 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 +44,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 +53,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 +62,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 +71,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 +88,7 @@ index 5411add..6864c71 100644
>   
>   AC_CHECKING(for sequent/ptx)
>   AC_EGREP_CPP(yes,
> -@@ -184,16 +184,16 @@ dnl (currently not used)
> +@@ -201,16 +201,16 @@ dnl (currently not used)
>   dnl
>   dnl AC_CHECKING(for pid_t)
>   dnl AC_EGREP_CPP(pid_t,[#include <sys/types.h>
> @@ -108,7 +108,7 @@ index 5411add..6864c71 100644
>   dnl
>   
>   dnl
> -@@ -215,7 +215,7 @@ setpgrp();
> +@@ -232,7 +232,7 @@ setpgrp();
>   int y = TIOCNOTTY;
>   #endif
>   #endif
> @@ -116,28 +116,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()  ****
> +@@ -244,7 +244,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);
> +@@ -258,7 +258,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)
> +@@ -314,23 +314,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 +163,7 @@ index 5411add..6864c71 100644
>   sysvr4ptys=1])
>   fi
>   
> -@@ -306,7 +306,7 @@ AC_CHECK_FUNCS(getpt)
> +@@ -339,7 +339,7 @@ AC_CHECK_FUNCS(getpt)
>   dnl check for openpty()
>   if test -z "$sysvr4ptys"; then
>   AC_CHECK_FUNCS(openpty,,
> @@ -172,7 +172,7 @@ index 5411add..6864c71 100644
>   fi
>   
>   AC_CHECKING(for ptyranges)
> -@@ -329,8 +329,8 @@ dnl fi
> +@@ -362,8 +362,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 +183,7 @@ index 5411add..6864c71 100644
>   fi
>   
>   dnl
> -@@ -350,7 +350,7 @@ AC_TRY_LINK([
> +@@ -383,7 +383,7 @@ AC_TRY_LINK([
>   #define pututline _pututline
>   #endif
>   ],
> @@ -192,7 +192,7 @@ index 5411add..6864c71 100644
>   olibs="$LIBS"
>   LIBS="$LIBS -lgen"
>   AC_CHECKING(getutent with -lgen)
> -@@ -367,7 +367,7 @@ AC_TRY_LINK([
> +@@ -400,7 +400,7 @@ AC_TRY_LINK([
>   #define pututline _pututline
>   #endif
>   ],
> @@ -201,7 +201,7 @@ index 5411add..6864c71 100644
>   )
>   AC_CHECKING(ut_host)
>   AC_TRY_COMPILE([
> -@@ -379,10 +379,10 @@ AC_TRY_COMPILE([
> +@@ -412,10 +412,10 @@ AC_TRY_COMPILE([
>   #else
>   #include <utmp.h>
>   #endif
> @@ -214,7 +214,7 @@ index 5411add..6864c71 100644
>     LIBS="$LIBS -lutempter"
>   fi
>   
> -@@ -395,13 +395,13 @@ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
> +@@ -428,13 +428,13 @@ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
>   
>   AC_CHECKING(getloadavg)
>   AC_TRY_LINK(,[getloadavg((double *)0, 0);],
> @@ -230,7 +230,7 @@ index 5411add..6864c71 100644
>   fi
>   )
>   
> -@@ -441,10 +441,10 @@ loadnum=3
> +@@ -474,10 +474,10 @@ loadnum=3
>   #endif
>   ])
>   
> @@ -245,7 +245,7 @@ index 5411add..6864c71 100644
>   
>   dnl
>   dnl    ****  signal handling  ****
> -@@ -453,7 +453,7 @@ if test -n "$posix" ; then
> +@@ -486,7 +486,7 @@ if test -n "$posix" ; then
>   
>   dnl POSIX has reliable signals with void return type.
>   AC_NOTE(assuming posix signal definition)
> @@ -254,7 +254,7 @@ index 5411add..6864c71 100644
>   
>   else
>   
> -@@ -464,7 +464,7 @@ AC_TRY_COMPILE(
> +@@ -497,7 +497,7 @@ AC_TRY_COMPILE(
>   #ifdef signal
>   #undef signal
>   #endif
> @@ -263,7 +263,7 @@ index 5411add..6864c71 100644
>   AC_CHECKING(sigset)
>   AC_TRY_LINK([
>   #include <sys/types.h>
> -@@ -475,9 +475,9 @@ sigset(0, (void (*)())0);
> +@@ -508,9 +508,9 @@ sigset(0, (void (*)())0);
>   #else
>   sigset(0, (int (*)())0);
>   #endif
> @@ -275,7 +275,7 @@ index 5411add..6864c71 100644
>   
>   fi
>   
> -@@ -503,7 +503,7 @@ AC_TRY_LINK(,[closelog();], , [oldlibs="$LIBS"
> +@@ -536,7 +536,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 +284,7 @@ index 5411add..6864c71 100644
>   
>   AC_EGREP_CPP(yes,
>   [#ifdef M_UNIX
> -@@ -523,34 +523,34 @@ AC_TRY_COMPILE([#include <sys/types.h>
> +@@ -556,39 +556,39 @@ AC_TRY_COMPILE([#include <sys/types.h>
>   #ifdef WEXITSTATUS
>     y = WEXITSTATUS(x);
>   #endif
> @@ -327,31 +327,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])
> - ))
> +@@ -608,21 +608,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 +362,7 @@ index 5411add..6864c71 100644
>   
>   AC_SEARCH_LIBS(gethostname, nsl)
>   
> -@@ -593,25 +593,25 @@ if test "$enable_pam" = "yes"; then
> +@@ -637,25 +637,25 @@ if test "$enable_pam" = "yes"; then
>   	pam_start(0, 0, 0, 0);
>   	pam_authenticate(0, 0);
>   	pam_end(0,0);
> @@ -369,7 +371,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 +393,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/0003-Fix-some-typos-found-by-Lintian.patch b/patches/screen-4.5.0/0003-Fix-some-typos-found-by-Lintian.patch
> new file mode 100644
> index 0000000..b368f44
> --- /dev/null
> +++ b/patches/screen-4.5.0/0003-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/0004-Replace-the-composed-characters-with-their-respectiv.patch b/patches/screen-4.5.0/0004-Replace-the-composed-characters-with-their-respectiv.patch
> new file mode 100644
> index 0000000..4fb8ae7
> --- /dev/null
> +++ b/patches/screen-4.5.0/0004-Replace-the-composed-characters-with-their-respectiv.patch
> @@ -0,0 +1,363 @@
> +From: Ben Finney <ben@benfinney.id.au>
> +Date: Mon, 3 Jul 2017 10:41:37 +0200
> +Subject: [PATCH] Replace the composed characters with their respective
> + description.
> +
> +Bugs-Debian: https://bugs.debian.org/437024
> +---
> + process.c | 342 +++++++++++++++++++++++++++++++-------------------------------
> + 1 file changed, 171 insertions(+), 171 deletions(-)
> +
> +diff --git a/process.c b/process.c
> +index 63c85b1a0a65..f369e08805d3 100644
> +--- a/process.c
> ++++ b/process.c
> +@@ -252,177 +252,177 @@ struct digraph
> + 
> + /* digraph table taken from old vim and rfc1345 */
> + static struct digraph digraphs[MAX_DIGRAPH + 1] = {
> +-    {{' ', ' '}, 160},	/* � */
> +-    {{'N', 'S'}, 160},	/* � */
> +-    {{'~', '!'}, 161},	/* � */
> +-    {{'!', '!'}, 161},	/* � */
> +-    {{'!', 'I'}, 161},	/* � */
> +-    {{'c', '|'}, 162},	/* � */
> +-    {{'c', 't'}, 162},	/* � */
> +-    {{'$', '$'}, 163},	/* � */
> +-    {{'P', 'd'}, 163},	/* � */
> +-    {{'o', 'x'}, 164},	/* � */
> +-    {{'C', 'u'}, 164},	/* � */
> +-    {{'C', 'u'}, 164},	/* � */
> +-    {{'E', 'u'}, 164},	/* � */
> +-    {{'Y', '-'}, 165},	/* � */
> +-    {{'Y', 'e'}, 165},	/* � */
> +-    {{'|', '|'}, 166},	/* � */
> +-    {{'B', 'B'}, 166},	/* � */
> +-    {{'p', 'a'}, 167},	/* � */
> +-    {{'S', 'E'}, 167},	/* � */
> +-    {{'"', '"'}, 168},	/* � */
> +-    {{'\'', ':'}, 168},	/* � */
> +-    {{'c', 'O'}, 169},	/* � */
> +-    {{'C', 'o'}, 169},	/* � */
> +-    {{'a', '-'}, 170},	/* � */
> +-    {{'<', '<'}, 171},	/* � */
> +-    {{'-', ','}, 172},	/* � */
> +-    {{'N', 'O'}, 172},	/* � */
> +-    {{'-', '-'}, 173},	/* � */
> +-    {{'r', 'O'}, 174},	/* � */
> +-    {{'R', 'g'}, 174},	/* � */
> +-    {{'-', '='}, 175},	/* � */
> +-    {{'\'', 'm'}, 175},	/* � */
> +-    {{'~', 'o'}, 176},	/* � */
> +-    {{'D', 'G'}, 176},	/* � */
> +-    {{'+', '-'}, 177},	/* � */
> +-    {{'2', '2'}, 178},	/* � */
> +-    {{'2', 'S'}, 178},	/* � */
> +-    {{'3', '3'}, 179},	/* � */
> +-    {{'3', 'S'}, 179},	/* � */
> +-    {{'\'', '\''}, 180},	/* � */
> +-    {{'j', 'u'}, 181},	/* � */
> +-    {{'M', 'y'}, 181},	/* � */
> +-    {{'p', 'p'}, 182},	/* � */
> +-    {{'P', 'I'}, 182},	/* � */
> +-    {{'~', '.'}, 183},	/* � */
> +-    {{'.', 'M'}, 183},	/* � */
> +-    {{',', ','}, 184},	/* � */
> +-    {{'\'', ','}, 184},	/* � */
> +-    {{'1', '1'}, 185},	/* � */
> +-    {{'1', 'S'}, 185},	/* � */
> +-    {{'o', '-'}, 186},	/* � */
> +-    {{'>', '>'}, 187},	/* � */
> +-    {{'1', '4'}, 188},	/* � */
> +-    {{'1', '2'}, 189},	/* � */
> +-    {{'3', '4'}, 190},	/* � */
> +-    {{'~', '?'}, 191},	/* � */
> +-    {{'?', '?'}, 191},	/* � */
> +-    {{'?', 'I'}, 191},	/* � */
> +-    {{'A', '`'}, 192},	/* � */
> +-    {{'A', '!'}, 192},	/* � */
> +-    {{'A', '\''}, 193},	/* � */
> +-    {{'A', '^'}, 194},	/* � */
> +-    {{'A', '>'}, 194},	/* � */
> +-    {{'A', '~'}, 195},	/* � */
> +-    {{'A', '?'}, 195},	/* � */
> +-    {{'A', '"'}, 196},	/* � */
> +-    {{'A', ':'}, 196},	/* � */
> +-    {{'A', '@'}, 197},	/* � */
> +-    {{'A', 'A'}, 197},	/* � */
> +-    {{'A', 'E'}, 198},	/* � */
> +-    {{'C', ','}, 199},	/* � */
> +-    {{'E', '`'}, 200},	/* � */
> +-    {{'E', '!'}, 200},	/* � */
> +-    {{'E', '\''}, 201},	/* � */
> +-    {{'E', '^'}, 202},	/* � */
> +-    {{'E', '>'}, 202},	/* � */
> +-    {{'E', '"'}, 203},	/* � */
> +-    {{'E', ':'}, 203},	/* � */
> +-    {{'I', '`'}, 204},	/* � */
> +-    {{'I', '!'}, 204},	/* � */
> +-    {{'I', '\''}, 205},	/* � */
> +-    {{'I', '^'}, 206},	/* � */
> +-    {{'I', '>'}, 206},	/* � */
> +-    {{'I', '"'}, 207},	/* � */
> +-    {{'I', ':'}, 207},	/* � */
> +-    {{'D', '-'}, 208},	/* � */
> +-    {{'N', '~'}, 209},	/* � */
> +-    {{'N', '?'}, 209},	/* � */
> +-    {{'O', '`'}, 210},	/* � */
> +-    {{'O', '!'}, 210},	/* � */
> +-    {{'O', '\''}, 211},	/* � */
> +-    {{'O', '^'}, 212},	/* � */
> +-    {{'O', '>'}, 212},	/* � */
> +-    {{'O', '~'}, 213},	/* � */
> +-    {{'O', '?'}, 213},	/* � */
> +-    {{'O', '"'}, 214},	/* � */
> +-    {{'O', ':'}, 214},	/* � */
> +-    {{'/', '\\'}, 215},	/* � */
> +-    {{'*', 'x'}, 215},	/* � */
> +-    {{'O', '/'}, 216},	/* � */
> +-    {{'U', '`'}, 217},	/* � */
> +-    {{'U', '!'}, 217},	/* � */
> +-    {{'U', '\''}, 218},	/* � */
> +-    {{'U', '^'}, 219},	/* � */
> +-    {{'U', '>'}, 219},	/* � */
> +-    {{'U', '"'}, 220},	/* � */
> +-    {{'U', ':'}, 220},	/* � */
> +-    {{'Y', '\''}, 221},	/* � */
> +-    {{'I', 'p'}, 222},	/* � */
> +-    {{'T', 'H'}, 222},	/* � */
> +-    {{'s', 's'}, 223},	/* � */
> +-    {{'s', '"'}, 223},	/* � */
> +-    {{'a', '`'}, 224},	/* � */
> +-    {{'a', '!'}, 224},	/* � */
> +-    {{'a', '\''}, 225},	/* � */
> +-    {{'a', '^'}, 226},	/* � */
> +-    {{'a', '>'}, 226},	/* � */
> +-    {{'a', '~'}, 227},	/* � */
> +-    {{'a', '?'}, 227},	/* � */
> +-    {{'a', '"'}, 228},	/* � */
> +-    {{'a', ':'}, 228},	/* � */
> +-    {{'a', 'a'}, 229},	/* � */
> +-    {{'a', 'e'}, 230},	/* � */
> +-    {{'c', ','}, 231},	/* � */
> +-    {{'e', '`'}, 232},	/* � */
> +-    {{'e', '!'}, 232},	/* � */
> +-    {{'e', '\''}, 233},	/* � */
> +-    {{'e', '^'}, 234},	/* � */
> +-    {{'e', '>'}, 234},	/* � */
> +-    {{'e', '"'}, 235},	/* � */
> +-    {{'e', ':'}, 235},	/* � */
> +-    {{'i', '`'}, 236},	/* � */
> +-    {{'i', '!'}, 236},	/* � */
> +-    {{'i', '\''}, 237},	/* � */
> +-    {{'i', '^'}, 238},	/* � */
> +-    {{'i', '>'}, 238},	/* � */
> +-    {{'i', '"'}, 239},	/* � */
> +-    {{'i', ':'}, 239},	/* � */
> +-    {{'d', '-'}, 240},	/* � */
> +-    {{'n', '~'}, 241},	/* � */
> +-    {{'n', '?'}, 241},	/* � */
> +-    {{'o', '`'}, 242},	/* � */
> +-    {{'o', '!'}, 242},	/* � */
> +-    {{'o', '\''}, 243},	/* � */
> +-    {{'o', '^'}, 244},	/* � */
> +-    {{'o', '>'}, 244},	/* � */
> +-    {{'o', '~'}, 245},	/* � */
> +-    {{'o', '?'}, 245},	/* � */
> +-    {{'o', '"'}, 246},	/* � */
> +-    {{'o', ':'}, 246},	/* � */
> +-    {{':', '-'}, 247},	/* � */
> +-    {{'o', '/'}, 248},	/* � */
> +-    {{'u', '`'}, 249},	/* � */
> +-    {{'u', '!'}, 249},	/* � */
> +-    {{'u', '\''}, 250},	/* � */
> +-    {{'u', '^'}, 251},	/* � */
> +-    {{'u', '>'}, 251},	/* � */
> +-    {{'u', '"'}, 252},	/* � */
> +-    {{'u', ':'}, 252},	/* � */
> +-    {{'y', '\''}, 253},	/* � */
> +-    {{'i', 'p'}, 254},	/* � */
> +-    {{'t', 'h'}, 254},	/* � */
> +-    {{'y', '"'}, 255},	/* � */
> +-    {{'y', ':'}, 255},	/* � */
> +-    {{'"', '['}, 196},	/* � */
> +-    {{'"', '\\'}, 214},	/* � */
> +-    {{'"', ']'}, 220},	/* � */
> +-    {{'"', '{'}, 228},	/* � */
> +-    {{'"', '|'}, 246},	/* � */
> +-    {{'"', '}'}, 252},	/* � */
> +-    {{'"', '~'}, 223}	/* � */
> ++    {{' ', ' '},   0x00a0},   /* NO-BREAK SPACE */
> ++    {{'N', 'S'},   0x00a0},   /* NO-BREAK SPACE */
> ++    {{'~', '!'},   0x00a1},   /* INVERTED EXCLAMATION MARK */
> ++    {{'!', '!'},   0x00a1},   /* INVERTED EXCLAMATION MARK */
> ++    {{'!', 'I'},   0x00a1},   /* INVERTED EXCLAMATION MARK */
> ++    {{'c', '|'},   0x00a2},   /* CENT SIGN */
> ++    {{'c', 't'},   0x00a2},   /* CENT SIGN */
> ++    {{'$', '$'},   0x00a3},   /* POUND SIGN */
> ++    {{'P', 'd'},   0x00a3},   /* POUND SIGN */
> ++    {{'o', 'x'},   0x00a4},   /* CURRENCY SIGN */
> ++    {{'C', 'u'},   0x00a4},   /* CURRENCY SIGN */
> ++    {{'C', 'u'},   0x00a4},   /* CURRENCY SIGN */
> ++    {{'E', 'u'},   0x00a4},   /* CURRENCY SIGN */
> ++    {{'Y', '-'},   0x00a5},   /* YEN SIGN */
> ++    {{'Y', 'e'},   0x00a5},   /* YEN SIGN */
> ++    {{'|', '|'},   0x00a6},   /* BROKEN BAR */
> ++    {{'B', 'B'},   0x00a6},   /* BROKEN BAR */
> ++    {{'p', 'a'},   0x00a7},   /* SECTION SIGN */
> ++    {{'S', 'E'},   0x00a7},   /* SECTION SIGN */
> ++    {{'"', '"'},   0x00a8},   /* DIAERESIS */
> ++    {{'\'', ':'},  0x00a8},   /* DIAERESIS */
> ++    {{'c', 'O'},   0x00a9},   /* COPYRIGHT SIGN */
> ++    {{'C', 'o'},   0x00a9},   /* COPYRIGHT SIGN */
> ++    {{'-', 'a'},   0x00aa},   /* FEMININE ORDINAL INDICATOR */
> ++    {{'<', '<'},   0x00ab},   /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
> ++    {{'-', ','},   0x00ac},   /* NOT SIGN */
> ++    {{'N', 'O'},   0x00ac},   /* NOT SIGN */
> ++    {{'-', '-'},   0x00ad},   /* SOFT HYPHEN */
> ++    {{'r', 'O'},   0x00ae},   /* REGISTERED SIGN */
> ++    {{'R', 'g'},   0x00ae},   /* REGISTERED SIGN */
> ++    {{'-', '='},   0x00af},   /* MACRON */
> ++    {{'\'', 'm'},  0x00af},   /* MACRON */
> ++    {{'~', 'o'},   0x00b0},   /* DEGREE SIGN */
> ++    {{'D', 'G'},   0x00b0},   /* DEGREE SIGN */
> ++    {{'+', '-'},   0x00b1},   /* PLUS-MINUS SIGN */
> ++    {{'2', '2'},   0x00b2},   /* SUPERSCRIPT TWO */
> ++    {{'2', 'S'},   0x00b2},   /* SUPERSCRIPT TWO */
> ++    {{'3', '3'},   0x00b3},   /* SUPERSCRIPT THREE */
> ++    {{'3', 'S'},   0x00b3},   /* SUPERSCRIPT THREE */
> ++    {{'\'', '\''}, 0x00b4},   /* ACUTE ACCENT */
> ++    {{'j', 'u'},   0x00b5},   /* MICRO SIGN */
> ++    {{'M', 'y'},   0x00b5},   /* MICRO SIGN */
> ++    {{'p', 'p'},   0x00b6},   /* PILCROW SIGN */
> ++    {{'P', 'I'},   0x00b6},   /* PILCROW SIGN */
> ++    {{'~', '.'},   0x00b7},   /* MIDDLE DOT */
> ++    {{'.', 'M'},   0x00b7},   /* MIDDLE DOT */
> ++    {{',', ','},   0x00b8},   /* CEDILLA */
> ++    {{'\'', ','},  0x00b8},   /* CEDILLA */
> ++    {{'1', '1'},   0x00b9},   /* SUPERSCRIPT ONE */
> ++    {{'1', 'S'},   0x00b9},   /* SUPERSCRIPT ONE */
> ++    {{'-', 'o'},   0x00ba},   /* MASCULINE ORDINAL INDICATOR */
> ++    {{'>', '>'},   0x00bb},   /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
> ++    {{'1', '4'},   0x00bc},   /* VULGAR FRACTION ONE QUARTER */
> ++    {{'1', '2'},   0x00bd},   /* VULGAR FRACTION ONE HALF */
> ++    {{'3', '4'},   0x00be},   /* VULGAR FRACTION THREE QUARTERS */
> ++    {{'~', '?'},   0x00bf},   /* INVERTED QUESTION MARK */
> ++    {{'?', '?'},   0x00bf},   /* INVERTED QUESTION MARK */
> ++    {{'?', 'I'},   0x00bf},   /* INVERTED QUESTION MARK */
> ++    {{'A', '`'},   0x00c0},   /* LATIN CAPITAL LETTER A WITH GRAVE */
> ++    {{'A', '!'},   0x00c0},   /* LATIN CAPITAL LETTER A WITH GRAVE */
> ++    {{'A', '\''},  0x00c1},   /* LATIN CAPITAL LETTER A WITH ACUTE */
> ++    {{'A', '^'},   0x00c2},   /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
> ++    {{'A', '>'},   0x00c2},   /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
> ++    {{'A', '~'},   0x00c3},   /* LATIN CAPITAL LETTER A WITH TILDE */
> ++    {{'A', '?'},   0x00c3},   /* LATIN CAPITAL LETTER A WITH TILDE */
> ++    {{'A', '"'},   0x00c4},   /* LATIN CAPITAL LETTER A WITH DIAERESIS */
> ++    {{'A', ':'},   0x00c4},   /* LATIN CAPITAL LETTER A WITH DIAERESIS */
> ++    {{'A', '@'},   0x00c5},   /* LATIN CAPITAL LETTER A WITH RING ABOVE */
> ++    {{'A', 'A'},   0x00c5},   /* LATIN CAPITAL LETTER A WITH RING ABOVE */
> ++    {{'A', 'E'},   0x00c6},   /* LATIN CAPITAL LETTER AE */
> ++    {{'C', ','},   0x00c7},   /* LATIN CAPITAL LETTER C WITH CEDILLA */
> ++    {{'E', '`'},   0x00c8},   /* LATIN CAPITAL LETTER E WITH GRAVE */
> ++    {{'E', '!'},   0x00c8},   /* LATIN CAPITAL LETTER E WITH GRAVE */
> ++    {{'E', '\''},  0x00c9},   /* LATIN CAPITAL LETTER E WITH ACUTE */
> ++    {{'E', '^'},   0x00ca},   /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
> ++    {{'E', '>'},   0x00ca},   /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
> ++    {{'E', '"'},   0x00cb},   /* LATIN CAPITAL LETTER E WITH DIAERESIS */
> ++    {{'E', ':'},   0x00cb},   /* LATIN CAPITAL LETTER E WITH DIAERESIS */
> ++    {{'I', '`'},   0x00cc},   /* LATIN CAPITAL LETTER I WITH GRAVE */
> ++    {{'I', '!'},   0x00cc},   /* LATIN CAPITAL LETTER I WITH GRAVE */
> ++    {{'I', '\''},  0x00cd},   /* LATIN CAPITAL LETTER I WITH ACUTE */
> ++    {{'I', '^'},   0x00ce},   /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
> ++    {{'I', '>'},   0x00ce},   /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
> ++    {{'I', '"'},   0x00cf},   /* LATIN CAPITAL LETTER I WITH DIAERESIS */
> ++    {{'I', ':'},   0x00cf},   /* LATIN CAPITAL LETTER I WITH DIAERESIS */
> ++    {{'D', '-'},   0x00d0},   /* LATIN CAPITAL LETTER ETH */
> ++    {{'N', '~'},   0x00d1},   /* LATIN CAPITAL LETTER N WITH TILDE */
> ++    {{'N', '?'},   0x00d1},   /* LATIN CAPITAL LETTER N WITH TILDE */
> ++    {{'O', '`'},   0x00d2},   /* LATIN CAPITAL LETTER O WITH GRAVE */
> ++    {{'O', '!'},   0x00d2},   /* LATIN CAPITAL LETTER O WITH GRAVE */
> ++    {{'O', '\''},  0x00d3},   /* LATIN CAPITAL LETTER O WITH ACUTE */
> ++    {{'O', '^'},   0x00d4},   /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
> ++    {{'O', '>'},   0x00d4},   /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
> ++    {{'O', '~'},   0x00d5},   /* LATIN CAPITAL LETTER O WITH TILDE */
> ++    {{'O', '?'},   0x00d5},   /* LATIN CAPITAL LETTER O WITH TILDE */
> ++    {{'O', '"'},   0x00d6},   /* LATIN CAPITAL LETTER O WITH DIAERESIS */
> ++    {{'O', ':'},   0x00d6},   /* LATIN CAPITAL LETTER O WITH DIAERESIS */
> ++    {{'/', '\\'},  0x00d7},   /* MULTIPLICATION SIGN */
> ++    {{'*', 'x'},   0x00d7},   /* MULTIPLICATION SIGN */
> ++    {{'O', '/'},   0x00d8},   /* LATIN CAPITAL LETTER O WITH STROKE */
> ++    {{'U', '`'},   0x00d9},   /* LATIN CAPITAL LETTER U WITH GRAVE */
> ++    {{'U', '!'},   0x00d9},   /* LATIN CAPITAL LETTER U WITH GRAVE */
> ++    {{'U', '\''},  0x00da},   /* LATIN CAPITAL LETTER U WITH ACUTE */
> ++    {{'U', '^'},   0x00db},   /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
> ++    {{'U', '>'},   0x00db},   /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
> ++    {{'U', '"'},   0x00dc},   /* LATIN CAPITAL LETTER U WITH DIAERESIS */
> ++    {{'U', ':'},   0x00dc},   /* LATIN CAPITAL LETTER U WITH DIAERESIS */
> ++    {{'Y', '\''},  0x00dd},   /* LATIN CAPITAL LETTER Y WITH ACUTE */
> ++    {{'I', 'p'},   0x00de},   /* LATIN CAPITAL LETTER THORN */
> ++    {{'T', 'H'},   0x00de},   /* LATIN CAPITAL LETTER THORN */
> ++    {{'s', 's'},   0x00df},   /* LATIN SMALL LETTER SHARP S */
> ++    {{'s', '"'},   0x00df},   /* LATIN SMALL LETTER SHARP S */
> ++    {{'a', '`'},   0x00e0},   /* LATIN SMALL LETTER A WITH GRAVE */
> ++    {{'a', '!'},   0x00e0},   /* LATIN SMALL LETTER A WITH GRAVE */
> ++    {{'a', '\''},  0x00e1},   /* LATIN SMALL LETTER A WITH ACUTE */
> ++    {{'a', '^'},   0x00e2},   /* LATIN SMALL LETTER A WITH CIRCUMFLEX */
> ++    {{'a', '>'},   0x00e2},   /* LATIN SMALL LETTER A WITH CIRCUMFLEX */
> ++    {{'a', '~'},   0x00e3},   /* LATIN SMALL LETTER A WITH TILDE */
> ++    {{'a', '?'},   0x00e3},   /* LATIN SMALL LETTER A WITH TILDE */
> ++    {{'a', '"'},   0x00e4},   /* LATIN SMALL LETTER A WITH DIAERESIS */
> ++    {{'a', ':'},   0x00e4},   /* LATIN SMALL LETTER A WITH DIAERESIS */
> ++    {{'a', 'a'},   0x00e5},   /* LATIN SMALL LETTER A WITH RING ABOVE */
> ++    {{'a', 'e'},   0x00e6},   /* LATIN SMALL LETTER AE */
> ++    {{'c', ','},   0x00e7},   /* LATIN SMALL LETTER C WITH CEDILLA */
> ++    {{'e', '`'},   0x00e8},   /* LATIN SMALL LETTER E WITH GRAVE */
> ++    {{'e', '!'},   0x00e8},   /* LATIN SMALL LETTER E WITH GRAVE */
> ++    {{'e', '\''},  0x00e9},   /* LATIN SMALL LETTER E WITH ACUTE */
> ++    {{'e', '^'},   0x00ea},   /* LATIN SMALL LETTER E WITH CIRCUMFLEX */
> ++    {{'e', '>'},   0x00ea},   /* LATIN SMALL LETTER E WITH CIRCUMFLEX */
> ++    {{'e', '"'},   0x00eb},   /* LATIN SMALL LETTER E WITH DIAERESIS */
> ++    {{'e', ':'},   0x00eb},   /* LATIN SMALL LETTER E WITH DIAERESIS */
> ++    {{'i', '`'},   0x00ec},   /* LATIN SMALL LETTER I WITH GRAVE */
> ++    {{'i', '!'},   0x00ec},   /* LATIN SMALL LETTER I WITH GRAVE */
> ++    {{'i', '\''},  0x00ed},   /* LATIN SMALL LETTER I WITH ACUTE */
> ++    {{'i', '^'},   0x00ee},   /* LATIN SMALL LETTER I WITH CIRCUMFLEX */
> ++    {{'i', '>'},   0x00ee},   /* LATIN SMALL LETTER I WITH CIRCUMFLEX */
> ++    {{'i', '"'},   0x00ef},   /* LATIN SMALL LETTER I WITH DIAERESIS */
> ++    {{'i', ':'},   0x00ef},   /* LATIN SMALL LETTER I WITH DIAERESIS */
> ++    {{'d', '-'},   0x00f0},   /* LATIN SMALL LETTER ETH */
> ++    {{'n', '~'},   0x00f1},   /* LATIN SMALL LETTER N WITH TILDE */
> ++    {{'n', '?'},   0x00f1},   /* LATIN SMALL LETTER N WITH TILDE */
> ++    {{'o', '`'},   0x00f2},   /* LATIN SMALL LETTER O WITH GRAVE */
> ++    {{'o', '!'},   0x00f2},   /* LATIN SMALL LETTER O WITH GRAVE */
> ++    {{'o', '\''},  0x00f3},   /* LATIN SMALL LETTER O WITH ACUTE */
> ++    {{'o', '^'},   0x00f4},   /* LATIN SMALL LETTER O WITH CIRCUMFLEX */
> ++    {{'o', '>'},   0x00f4},   /* LATIN SMALL LETTER O WITH CIRCUMFLEX */
> ++    {{'o', '~'},   0x00f5},   /* LATIN SMALL LETTER O WITH TILDE */
> ++    {{'o', '?'},   0x00f5},   /* LATIN SMALL LETTER O WITH TILDE */
> ++    {{'o', '"'},   0x00f6},   /* LATIN SMALL LETTER O WITH DIAERESIS */
> ++    {{'o', ':'},   0x00f6},   /* LATIN SMALL LETTER O WITH DIAERESIS */
> ++    {{'-', ':'},   0x00f7},   /* DIVISION SIGN */
> ++    {{'o', '/'},   0x00f8},   /* LATIN SMALL LETTER O WITH STROKE */
> ++    {{'u', '`'},   0x00f9},   /* LATIN SMALL LETTER U WITH GRAVE */
> ++    {{'u', '!'},   0x00f9},   /* LATIN SMALL LETTER U WITH GRAVE */
> ++    {{'u', '\''},  0x00fa},   /* LATIN SMALL LETTER U WITH ACUTE */
> ++    {{'u', '^'},   0x00fb},   /* LATIN SMALL LETTER U WITH CIRCUMFLEX */
> ++    {{'u', '>'},   0x00fb},   /* LATIN SMALL LETTER U WITH CIRCUMFLEX */
> ++    {{'u', '"'},   0x00fc},   /* LATIN SMALL LETTER U WITH DIAERESIS */
> ++    {{'u', ':'},   0x00fc},   /* LATIN SMALL LETTER U WITH DIAERESIS */
> ++    {{'y', '\''},  0x00fd},   /* LATIN SMALL LETTER Y WITH ACUTE */
> ++    {{'i', 'p'},   0x00fe},   /* LATIN SMALL LETTER THORN */
> ++    {{'t', 'h'},   0x00fe},   /* LATIN SMALL LETTER THORN */
> ++    {{'y', '"'},   0x00ff},   /* LATIN SMALL LETTER Y WITH DIAERESIS */
> ++    {{'y', ':'},   0x00ff},   /* LATIN SMALL LETTER Y WITH DIAERESIS */
> ++    {{'"', '['},   0x00c4},   /* LATIN CAPITAL LETTER A WITH DIAERESIS */
> ++    {{'"', '\\'},  0x00d6},   /* LATIN CAPITAL LETTER O WITH DIAERESIS */
> ++    {{'"', ']'},   0x00dc},   /* LATIN CAPITAL LETTER U WITH DIAERESIS */
> ++    {{'"', '{'},   0x00e4},   /* LATIN SMALL LETTER A WITH DIAERESIS */
> ++    {{'"', '|'},   0x00f6},   /* LATIN SMALL LETTER O WITH DIAERESIS */
> ++    {{'"', '}'},   0x00fc},   /* LATIN SMALL LETTER U WITH DIAERESIS */
> ++    {{'"', '~'},   0x00df},   /* LATIN SMALL LETTER SHARP S */
> + };
> + 
> + #define RESIZE_FLAG_H 1
> 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..f78c42c
> --- /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 f369e08805d3..4d83b87272c4 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..f6f5912
> --- /dev/null
> +++ b/patches/screen-4.5.0/series
> @@ -0,0 +1,12 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-remove-configure-AC_TRY_RUN-tests.patch
> +0002-autoconf-cleanup.patch
> +0003-Fix-some-typos-found-by-Lintian.patch
> +0004-Replace-the-composed-characters-with-their-respectiv.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
> +# 452e3b0a579f5d7c4e5df6dd7de3db05  - git-ptx-patches magic
> diff --git a/rules/screen.make b/rules/screen.make
> index f9d7869..82a00cd 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

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH v2] screen: version bump 4.0.3 -> 4.5.0
  2017-09-15 13:10 [ptxdist] [PATCH] screen: version bump 4.0.3 -> 4.5.0 Denis OSTERLAND
  2017-09-16 10:37 ` Michael Olbrich
@ 2017-09-18  9:18 ` Denis OSTERLAND
  2017-09-18  9:18   ` Denis OSTERLAND
  1 sibling, 1 reply; 4+ messages in thread
From: Denis OSTERLAND @ 2017-09-18  9:18 UTC (permalink / raw)
  To: ptxdist

Changes:
 - Add don-t-link-against-libelf.patch
 - Add modification comment to changed patches
 - Remove cosmetic patch Replace-the-composed-characters-with-their-respectiv.patch

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH v2] screen: version bump 4.0.3 -> 4.5.0
  2017-09-18  9:18 ` [ptxdist] [PATCH v2] " Denis OSTERLAND
@ 2017-09-18  9:18   ` Denis OSTERLAND
  0 siblings, 0 replies; 4+ messages in thread
From: Denis OSTERLAND @ 2017-09-18  9:18 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-18  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 13:10 [ptxdist] [PATCH] screen: version bump 4.0.3 -> 4.5.0 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox