[arch-commits] Commit in syncthing/trunk (PKGBUILD gcc-pie-segfaults-race.patch)

Jelle van der Waa jelle at archlinux.org
Sat Sep 7 18:22:59 UTC 2019


    Date: Saturday, September 7, 2019 @ 18:22:59
  Author: jelle
Revision: 508515

upgpkg: syncthing 1.2.1-3

Enable PIE and partial RELRO for syncthing by patching build.go to not enable
-race when running tests which leads to segfaults with go-pie.

Added:
  syncthing/trunk/gcc-pie-segfaults-race.patch
Modified:
  syncthing/trunk/PKGBUILD

------------------------------+
 PKGBUILD                     |   14 ++++++++++----
 gcc-pie-segfaults-race.patch |   11 +++++++++++
 2 files changed, 21 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-09-07 17:48:32 UTC (rev 508514)
+++ PKGBUILD	2019-09-07 18:22:59 UTC (rev 508515)
@@ -6,27 +6,33 @@
 
 pkgname=('syncthing' 'syncthing-relaysrv')
 pkgver=1.2.1
-pkgrel=2
+pkgrel=3
 arch=('x86_64')
 url="https://syncthing.net/"
 license=('MPL')
 depends=('glibc')
-makedepends=('git' 'go' 'inetutils')
+makedepends=('git' 'go-pie' 'inetutils')
 # options=('!strip')
 source=(https://github.com/syncthing/syncthing/releases/download/v$pkgver/syncthing-source-v${pkgver}.tar.gz{,.asc}
         syncthing-relaysrv.sysusers
         syncthing-relaysrv.tmpfiles
-        syncthing-relaysrv.service)
+        syncthing-relaysrv.service
+        gcc-pie-segfaults-race.patch)
 validpgpkeys=('37C84554E7E0A261E4F76E1ED26E6ED000654A3E') # Syncthing Release Management
 sha256sums=('313bd59ddc2562e833fc4caa8d90360a06d5ff02976c0a4d5d42393e6f8bceac'
             'SKIP'
             '6ab96a5949e223d315d49663734ad27b70c72469c691a61ac198cb7794cb5eaa'
             'f899998985f2d374af57f17ef6362c37a305467858195b74d1c1def71d97273f'
-            '7c2fbc9608d81f8080f8a9102b867a52a050b61f426a0c182ccc1cb5815e4981')
+            '7c2fbc9608d81f8080f8a9102b867a52a050b61f426a0c182ccc1cb5815e4981'
+            '4e00b06544a900b206fc41b9250ab75ea51b8e1489b1eff042da4f08d8a84ab0')
 
 prepare() {
   install -d "src/github.com/syncthing"
   mv "${pkgbase}" "src/github.com/syncthing/${pkgbase}"
+  # go-pie with -race segfaults
+  cd "${srcdir}/src/github.com/syncthing/${pkgbase}"
+  patch -Np1 -i "${srcdir}/gcc-pie-segfaults-race.patch"
+
 }
 
 build() {

Added: gcc-pie-segfaults-race.patch
===================================================================
--- gcc-pie-segfaults-race.patch	                        (rev 0)
+++ gcc-pie-segfaults-race.patch	2019-09-07 18:22:59 UTC (rev 508515)
@@ -0,0 +1,11 @@
+diff -aur syncthing.old/build.go syncthing/build.go
+--- syncthing.old/build.go	2019-09-07 20:03:56.466643638 +0200
++++ syncthing/build.go	2019-09-07 20:05:18.164000404 +0200
+@@ -343,7 +343,6 @@
+ 	if runtime.GOARCH == "amd64" {
+ 		switch runtime.GOOS {
+ 		case "darwin", "linux", "freebsd": // , "windows": # See https://github.com/golang/go/issues/27089
+-			args = append(args, "-race")
+ 		}
+ 	}
+ 


More information about the arch-commits mailing list