From 94a7705ccbf4879dd097017da389040451a09894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sun, 30 May 2021 23:38:35 +0200 Subject: [PATCH] Add patch to prevent the build of dup2.go on Linux aarch64 --- ...he-build-of-dup2.go-on-Linux-aarch64.patch | 25 +++++++++++++++++++ golang-github-bugsnag-panicwrap.spec | 11 +++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0001-Prevent-the-build-of-dup2.go-on-Linux-aarch64.patch diff --git a/0001-Prevent-the-build-of-dup2.go-on-Linux-aarch64.patch b/0001-Prevent-the-build-of-dup2.go-on-Linux-aarch64.patch new file mode 100644 index 0000000..a033241 --- /dev/null +++ b/0001-Prevent-the-build-of-dup2.go-on-Linux-aarch64.patch @@ -0,0 +1,25 @@ +From 826a46b67680545f633e28edc6665cc3c19753b4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= +Date: Sun, 30 May 2021 23:03:33 +0200 +Subject: [PATCH] Prevent the build of dup2.go on Linux aarch64 + +The dup2 syscall does not exist on Linux aarch64. + +Fix #20. +--- + dup2.go | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dup2.go b/dup2.go +index aa3e849..279435f 100644 +--- a/dup2.go ++++ b/dup2.go +@@ -1,4 +1,5 @@ + // +build !windows ++// +build linux,!arm64 + + package panicwrap + +-- +2.31.1 + diff --git a/golang-github-bugsnag-panicwrap.spec b/golang-github-bugsnag-panicwrap.spec index ca31f8f..3645594 100644 --- a/golang-github-bugsnag-panicwrap.spec +++ b/golang-github-bugsnag-panicwrap.spec @@ -31,7 +31,7 @@ section below on why.} %global gosupfiles glide.lock glide.yaml Name: %{goname} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Go library for catching and handling panics in Go applications License: MIT @@ -39,6 +39,10 @@ URL: %{gourl} Source0: %{gosource} Source1: glide.yaml Source2: glide.lock +# 1.3.2 introduced a bug where dup2.go waas being built on Linux aarch64 +# where that syscall doesn't exist +# https://github.com/bugsnag/panicwrap/issues/20 +Patch0: 0001-Prevent-the-build-of-dup2.go-on-Linux-aarch64.patch %description %{common_description} @@ -47,6 +51,7 @@ Source2: glide.lock %prep %goprep +%patch0 -p1 cp %{S:1} %{S:2} . %install @@ -60,6 +65,10 @@ cp %{S:1} %{S:2} . %gopkgfiles %changelog +* Sun May 30 22:41:50 CEST 2021 Robert-André Mauchin - 1.3.2-1 +- Update to 1.3.2 +- Close: rhbz#1943416 + * Tue Jan 26 2021 Fedora Release Engineering - 1.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild