Add patch to prevent the build of dup2.go on Linux aarch64

This commit is contained in:
Robert-André Mauchin 2021-05-30 23:38:35 +02:00
parent a69a320217
commit 94a7705ccb
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 826a46b67680545f633e28edc6665cc3c19753b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
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

View File

@ -31,7 +31,7 @@ section below on why.}
%global gosupfiles glide.lock glide.yaml %global gosupfiles glide.lock glide.yaml
Name: %{goname} Name: %{goname}
Release: 2%{?dist} Release: 1%{?dist}
Summary: Go library for catching and handling panics in Go applications Summary: Go library for catching and handling panics in Go applications
License: MIT License: MIT
@ -39,6 +39,10 @@ URL: %{gourl}
Source0: %{gosource} Source0: %{gosource}
Source1: glide.yaml Source1: glide.yaml
Source2: glide.lock 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 %description
%{common_description} %{common_description}
@ -47,6 +51,7 @@ Source2: glide.lock
%prep %prep
%goprep %goprep
%patch0 -p1
cp %{S:1} %{S:2} . cp %{S:1} %{S:2} .
%install %install
@ -60,6 +65,10 @@ cp %{S:1} %{S:2} .
%gopkgfiles %gopkgfiles
%changelog %changelog
* Sun May 30 22:41:50 CEST 2021 Robert-André Mauchin <zebob.m@gmail.com> - 1.3.2-1
- Update to 1.3.2
- Close: rhbz#1943416
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild