Hello community, here is the log from the commit of package reptyr for openSUSE:Factory checked in at 2017-03-20 17:10:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/reptyr (Old) and /work/SRC/openSUSE:Factory/.reptyr.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "reptyr" Mon Mar 20 17:10:08 2017 rev:10 rq:480962 version:0.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/reptyr/reptyr.changes 2015-03-18 13:06:41.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.reptyr.new/reptyr.changes 2017-03-20 17:10:09.308851825 +0100 @@ -1,0 +2,8 @@ +Fri Mar 17 23:55:29 UTC 2017 - 9@cirno.systems + +- Fix build on Factory, CentOS and RHEL (cherry-picked) + 0001-Placate-a-gcc7-warning.patch + 0002-Include-sysmacros.h.patch + 0003-Build-with-fstrict-aliasing.patch + +------------------------------------------------------------------- New: ---- 0001-Placate-a-gcc7-warning.patch 0002-Include-sysmacros.h.patch 0003-Build-with-fstrict-aliasing.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ reptyr.spec ++++++ --- /var/tmp/diff_new_pack.iv9QVo/_old 2017-03-20 17:10:10.412695963 +0100 +++ /var/tmp/diff_new_pack.iv9QVo/_new 2017-03-20 17:10:10.416695397 +0100 @@ -1,7 +1,7 @@ # # spec file for package reptyr # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,6 +24,9 @@ Group: System/Console Url: http://github.com/nelhage/reptyr Source: https://github.com/nelhage/reptyr/archive/%{name}-%{version}.tar.gz +Patch0: 0001-Placate-a-gcc7-warning.patch +Patch1: 0002-Include-sysmacros.h.patch +Patch2: 0003-Build-with-fstrict-aliasing.patch BuildRequires: gcc BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %{ix86} x86_64 %{arm} @@ -37,6 +40,9 @@ %prep %setup -q -n %{name}-%{name}-%{version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build export CFLAGS="%{optflags}" ++++++ 0001-Placate-a-gcc7-warning.patch ++++++
From ff28aca0ff53e9c5c8d0e627ee134dc86d813807 Mon Sep 17 00:00:00 2001 From: Nelson Elhage <nelhage@nelhage.com> Date: Sat, 18 Feb 2017 16:36:40 -0800 Subject: [PATCH 1/2] Placate a gcc7 warning.
(And handle a too-long temp directory with an error instead of a likely crash) --- attach.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/attach.c b/attach.c index 4e65d25..dff4040 100644 --- a/attach.c +++ b/attach.c @@ -375,8 +375,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; -- 2.11.0 ++++++ 0002-Include-sysmacros.h.patch ++++++
From 6e0a0ddac787c9ca87cb9fe5636e8fe8dc60273c Mon Sep 17 00:00:00 2001 From: Nelson Elhage <nelhage@nelhage.com> Date: Sat, 18 Feb 2017 16:38:18 -0800 Subject: [PATCH 2/2] Include sysmacros.h
See #81 --- platform/linux/linux.h | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/linux/linux.h b/platform/linux/linux.h index 3ad600f..2d2f3d4 100644 --- a/platform/linux/linux.h +++ b/platform/linux/linux.h @@ -32,6 +32,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> -- 2.11.0 ++++++ 0003-Build-with-fstrict-aliasing.patch ++++++
From 354a0b3ed248c15ffc6fc00c697373534594d05e Mon Sep 17 00:00:00 2001 From: Nelson Elhage <nelhage@nelhage.com> Date: Tue, 26 Jan 2016 22:08:15 -0800 Subject: [PATCH 3/3] Build with -fstrict-aliasing
fixes #68 --- Makefile | 5 ++++- Vagrantfile | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0fb5b0d..2657034 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ -override CFLAGS+=-Wall -Werror -D_GNU_SOURCE -g +# Our `cmsg` usage in attach.c is not +# `-fstrict-aliasing`-compatible. Just disable it, since the +# workaround is a pain. +override CFLAGS+=-Wall -Werror -D_GNU_SOURCE -g -fno-strict-aliasing OBJS=reptyr.o reallocarray.o attach.o UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) diff --git a/Vagrantfile b/Vagrantfile index d8696e2..d42fe15 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -23,6 +23,10 @@ EOS machine.vm.box = 'chef/fedora-20' end + config.vm.define 'centos-6-x86_64' do |machine| + machine.vm.box = 'bento/centos-6.7' + end + config.vm.synced_folder ".", "/vagrant", type: 'nfs', id: 'vagrant-root' end -- 2.11.0