From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9ES6-000810-S2 for guix-patches@gnu.org; Fri, 12 May 2017 13:34:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9ES2-0007UC-Hg for guix-patches@gnu.org; Fri, 12 May 2017 13:34:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:38521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9ES2-0007Ty-F0 for guix-patches@gnu.org; Fri, 12 May 2017 13:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d9ES2-00071y-8n for guix-patches@gnu.org; Fri, 12 May 2017 13:34:02 -0400 Subject: bug#26898: [PATCH] gnu: reptry: Fix build. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9ERh-0007jA-Fw for guix-patches@gnu.org; Fri, 12 May 2017 13:33:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9ERe-00071t-3d for guix-patches@gnu.org; Fri, 12 May 2017 13:33:41 -0400 Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:33232) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9ERd-0006wv-Sp for guix-patches@gnu.org; Fri, 12 May 2017 13:33:38 -0400 Received: by mail-wr0-x22b.google.com with SMTP id w50so48139852wrc.0 for ; Fri, 12 May 2017 10:33:36 -0700 (PDT) From: Mathieu Othacehe Date: Fri, 12 May 2017 19:33:28 +0200 Message-Id: <20170512173328.24467-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26898@debbugs.gnu.org * gnu/packages/patches/reptyr-fix-gcc-7.patch: New file. * gnu/local.mk (dist_patch_DATA): Add new patch. * gnu/packages/screen.scm (reptyr): Use patch. --- gnu/local.mk | 1 + gnu/packages/patches/reptyr-fix-gcc-7.patch | 35 +++++++++++++++++++++++++++++ gnu/packages/screen.scm | 3 +++ 3 files changed, 39 insertions(+) create mode 100644 gnu/packages/patches/reptyr-fix-gcc-7.patch diff --git a/gnu/local.mk b/gnu/local.mk index 1a3e2f3f0..d7f23966e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -938,6 +938,7 @@ dist_patch_DATA = \ %D%/packages/patches/readline-link-ncurses.patch \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ %D%/packages/patches/readline-7.0-mingw.patch \ + %D%/packages/patches/reptyr-fix-gcc-7.patch \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ %D%/packages/patches/rpm-CVE-2014-8118.patch \ diff --git a/gnu/packages/patches/reptyr-fix-gcc-7.patch b/gnu/packages/patches/reptyr-fix-gcc-7.patch new file mode 100644 index 000000000..9a2ce006c --- /dev/null +++ b/gnu/packages/patches/reptyr-fix-gcc-7.patch @@ -0,0 +1,35 @@ +This patch allows reptyr to build with gcc 7. It is taken from reptyr mainline patches +fa0d63f and b45fd92. + +Patch by Nelson Elhage . + +diff --git a/attach.c b/attach.c +index bd8ef8c..8d9cbf8 100644 +--- a/attach.c ++++ b/attach.c +@@ -389,8 +389,11 @@ int setup_steal_socket(struct steal_pty_state *steal) { + return errno; + + steal->addr_un.sun_family = AF_UNIX; +- snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path), +- "%s/reptyr.sock", steal->tmpdir); ++ if (snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path), ++ "%s/reptyr.sock", steal->tmpdir) >= sizeof(steal->addr_un.sun_path)) { ++ error("tmpdir path too long!"); ++ return ENAMETOOLONG; ++ } + + if ((steal->sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) + return errno; +diff --git a/platform/linux/linux.h b/platform/linux/linux.h +index 9e6b78a..3ec5a99 100644 +--- a/platform/linux/linux.h ++++ b/platform/linux/linux.h +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm index 1bdfcd011..49584662b 100644 --- a/gnu/packages/screen.scm +++ b/gnu/packages/screen.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2016, 2017 Efraim Flashner ;;; Copyright © 2016 Alex Griffin +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -155,6 +156,8 @@ window manager as well as the Tmux terminal multiplexer.") (method url-fetch) (uri (string-append "https://github.com/nelhage/reptyr/archive" "/reptyr-" version ".tar.gz")) + ;; XXX: To be removed on next reptyr release. + (patches (search-patches "reptyr-fix-gcc-7.patch")) (sha256 (base32 "07pfl0rkgm8m3f3jy8r9l2yvnhf8lgllpsk3mh57mhzdxq8fagf7")))) -- 2.13.0