Hello community,

here is the log from the commit of package simple-obfs for openSUSE:Factory 
checked in at 2019-10-14 12:42:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/simple-obfs (Old)
 and      /work/SRC/openSUSE:Factory/.simple-obfs.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "simple-obfs"

Mon Oct 14 12:42:01 2019 rev:5 rq:737994 version:0.0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/simple-obfs/simple-obfs.changes  2019-07-17 
13:19:56.995651788 +0200
+++ /work/SRC/openSUSE:Factory/.simple-obfs.new.2352/simple-obfs.changes        
2019-10-14 12:42:19.158572024 +0200
@@ -1,0 +2,7 @@
+Wed Oct  9 19:04:04 UTC 2019 - Bjørn Lie <[email protected]>
+
+- Add simple-obfs-gcc-buildfixes.patch: Fix build with gcc9,
+  patches from upstream git. Replace gcc8 and gcc8-c++ with generic
+  c++_compiler BuildRequires.
+
+-------------------------------------------------------------------

New:
----
  simple-obfs-gcc-buildfixes.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ simple-obfs.spec ++++++
--- /var/tmp/diff_new_pack.fASOWZ/_old  2019-10-14 12:42:19.990569848 +0200
+++ /var/tmp/diff_new_pack.fASOWZ/_new  2019-10-14 12:42:19.994569838 +0200
@@ -26,9 +26,10 @@
 Source0:        
https://github.com/shadowsocks/simple-obfs/archive/v%{version}/%{name}-%{version}.tar.gz
 Source1:        
https://github.com/shadowsocks/libcork/archive/f02984545061c924808e4b9ea7cc6749a41f1979/libcork-f029845.tar.gz
 Patch1:         simple-obfs-asciidoc-fix.patch
+Patch2:         simple-obfs-gcc-buildfixes.patch
+
 BuildRequires:  asciidoc
-BuildRequires:  gcc8
-BuildRequires:  gcc8-c++
+BuildRequires:  c++_compiler
 BuildRequires:  libtool
 BuildRequires:  mbedtls-devel
 BuildRequires:  pkgconfig
@@ -55,12 +56,11 @@
 %prep
 %setup -a1 -q
 %patch1 -p1
+%patch2 -p1
 
 %build
 rmdir libcork
 mv libcork-f02984545061c924808e4b9ea7cc6749a41f1979 libcork
-export CC=gcc-8
-export CXX=g++-8
 autoreconf -fiv
 %configure
 make %{?_smp_mflags} V=1

++++++ simple-obfs-gcc-buildfixes.patch ++++++
>From 117dd05632cbc05ad54d5aa5da949835e09ef0f0 Mon Sep 17 00:00:00 2001
From: Zane <[email protected]>
Date: Fri, 6 Jul 2018 11:03:24 +0800
Subject: [PATCH] fix compile warning with GCC8

---
 src/netutils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/netutils.c b/src/netutils.c
index 66d0a7c..b7fcb64 100644
--- a/src/netutils.c
+++ b/src/netutils.c
@@ -85,7 +85,8 @@ setinterface(int socket_fd, const char *interface_name)
 {
     struct ifreq interface;
     memset(&interface, 0, sizeof(struct ifreq));
-    strncpy(interface.ifr_name, interface_name, IFNAMSIZ);
+    strncpy(interface.ifr_name, interface_name, IFNAMSIZ - 1);
+    interface.ifr_name[IFNAMSIZ - 1] = '\0';
     int res = setsockopt(socket_fd, SOL_SOCKET, SO_BINDTODEVICE, &interface,
                          sizeof(struct ifreq));
     return res;


>From 1fab9b9d7b05a9b40084712a5a60fee49bf554b1 Mon Sep 17 00:00:00 2001
From: Roger Shimizu <[email protected]>
Date: Sat, 17 Aug 2019 01:22:36 +0900
Subject: [PATCH] Fix FTBFS under GCC-9

Resolve report from Debian:
 - https://bugs.debian.org/925829

obfs_http.c: In function 'check_http_header':
obfs_http.c:247:13: error: 'strncasecmp' specified bound
18446744073709551614 exceeds maximum object size 9223372036854775807
[-Werror=stringop-overflow=]
  247 |         if (strncasecmp(hostname, obfs_http->host, result) == 0)
{
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 src/obfs_http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/obfs_http.c b/src/obfs_http.c
index 9051222..30eae6b 100644
--- a/src/obfs_http.c
+++ b/src/obfs_http.c
@@ -245,7 +245,7 @@ check_http_header(buffer_t *buf)
             }
 
         result = OBFS_ERROR;
-        if (strncasecmp(hostname, obfs_http->host, result) == 0) {
+        if (strncasecmp(hostname, obfs_http->host, len) == 0) {
             result = OBFS_OK;
         }
         free(hostname);


Reply via email to