Control: tags 853640 + patch

Dear maintainer,

Lukas has prepared an NMU for reptyr (versioned as 0.6.2-1.1) and
I uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.
diff -Nru reptyr-0.6.2/debian/changelog reptyr-0.6.2/debian/changelog
--- reptyr-0.6.2/debian/changelog	2015-02-09 01:13:04.000000000 +0100
+++ reptyr-0.6.2/debian/changelog	2018-01-27 18:37:40.000000000 +0100
@@ -1,3 +1,18 @@
+reptyr (0.6.2-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patches from upstream to fix FTBFS. (Closes: #853640)
+  * debian/control:
+    - Bump dh version to 11, 7 is deprecated.
+    - Use secure VCS links.
+    - Bump standards version to 4.1.3 (no changes).
+  * Fix watch file.
+  * debian/rules:
+    - Enable build-time hardening.
+    - Fix FTBFS when /dev/tty0 does not exists.
+
+ -- Mateusz Łukasik <mat...@linuxmint.pl>  Sat, 27 Jan 2018 18:37:40 +0100
+
 reptyr (0.6.2-1) unstable; urgency=low
 
   * New release:
diff -Nru reptyr-0.6.2/debian/compat reptyr-0.6.2/debian/compat
--- reptyr-0.6.2/debian/compat	2015-02-09 01:11:06.000000000 +0100
+++ reptyr-0.6.2/debian/compat	2018-01-12 08:09:42.000000000 +0100
@@ -1 +1 @@
-7
+11
diff -Nru reptyr-0.6.2/debian/control reptyr-0.6.2/debian/control
--- reptyr-0.6.2/debian/control	2015-02-09 01:11:06.000000000 +0100
+++ reptyr-0.6.2/debian/control	2018-01-12 22:48:42.000000000 +0100
@@ -2,11 +2,11 @@
 Section: misc
 Priority: optional
 Maintainer: Evan Broder <e...@ebroder.net>
-Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.16.1~), python, python-pexpect
-Standards-Version: 3.9.6
+Build-Depends: debhelper (>= 11), python, python-pexpect
+Standards-Version: 4.1.3
 Homepage: https://github.com/nelhage/reptyr
-Vcs-Git: git://github.com/nelhage/reptyr.git -b debian
-Vcs-Browser: http://github.com/nelhage/reptyr/tree/debian
+Vcs-Git: https://github.com/nelhage/reptyr.git -b debian
+Vcs-Browser: https://github.com/nelhage/reptyr/tree/debian
 
 Package: reptyr
 Architecture: i386 amd64 armel armhf
diff -Nru reptyr-0.6.2/debian/patches/fix-ftbfs-gcc7.patch reptyr-0.6.2/debian/patches/fix-ftbfs-gcc7.patch
--- reptyr-0.6.2/debian/patches/fix-ftbfs-gcc7.patch	1970-01-01 01:00:00.000000000 +0100
+++ reptyr-0.6.2/debian/patches/fix-ftbfs-gcc7.patch	2018-01-27 18:37:21.000000000 +0100
@@ -0,0 +1,31 @@
+Description: Fix FTBFS with gcc-7
+Author: Nelson Elhage <nelh...@nelhage.com>
+Debian-Bug: https://bugs.debian.org/853640
+
+--- a/platform/linux/linux.h
++++ b/platform/linux/linux.h
+@@ -40,6 +40,7 @@
+ #include <sys/ptrace.h>
+ #include <asm/ptrace.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <sys/user.h>
+ #include <sys/wait.h>
+ #include <unistd.h>
+
+--- 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 -Nru reptyr-0.6.2/debian/patches/series reptyr-0.6.2/debian/patches/series
--- reptyr-0.6.2/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ reptyr-0.6.2/debian/patches/series	2018-01-27 18:37:36.000000000 +0100
@@ -0,0 +1 @@
+fix-ftbfs-gcc7.patch
diff -Nru reptyr-0.6.2/debian/rules reptyr-0.6.2/debian/rules
--- reptyr-0.6.2/debian/rules	2015-02-09 01:11:06.000000000 +0100
+++ reptyr-0.6.2/debian/rules	2018-01-19 22:34:52.000000000 +0100
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
 %:
 	dh $@
 
@@ -12,7 +14,12 @@
 # reptyr's test suite relies on being able to ptrace non-child
 # processes, which isn't allowed under yama's defaults on Ubuntu
 override_dh_auto_test:
+	if ! [ -f /dev/tty0 ]; \
+	then echo disable tests; \
+	else dh_auto_test; \
+	fi
+
 	if ! [ -f /proc/sys/kernel/yama/ptrace_scope ] || \
 	  [ "$$(cat /proc/sys/kernel/yama/ptrace_scope)" = 0 ]; then \
 	  dh_auto_test; \
-	fi
+	fi \
diff -Nru reptyr-0.6.2/debian/watch reptyr-0.6.2/debian/watch
--- reptyr-0.6.2/debian/watch	2015-02-09 01:11:06.000000000 +0100
+++ reptyr-0.6.2/debian/watch	2018-01-12 08:22:05.000000000 +0100
@@ -1,2 +1,3 @@
 version=3
-http://githubredir.debian.net/github/nelhage/reptyr/reptyr-(.*).tar.gz
+opts=uversionmangle=s/(\d+)-(\d+)-(\d+)/$1.$2.$3/ \
+https://github.com/nelhage/reptyr/releases .*/archive/reptyr-([\d.-]+)\.tar\.gz

Reply via email to