Compare commits

...

3 Commits

Author SHA1 Message Date
David Abdurachmanov f82da5599f
Test dist-git PR
https://src.fedoraproject.org/rpms/golang-github-bugsnag-panicwrap/pull-request/1#

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-07-08 08:18:52 +03:00
Alejandro Sáez bd268e0016 Update to 1.3.4
Add 0001-Prevent-the-build-of-dup2.go-on-Linux-aarch64.patch
Remove 0001-Prevent-the-build-of-dup2.go-on-Linux-aarch64.patch
2023-07-08 08:17:49 +03:00
David Abdurachmanov 73d2ba2f9e
Revert "Use dup3 for riscv64"
This reverts commit d18d64acbc.
2023-07-08 08:17:05 +03:00
6 changed files with 65 additions and 58 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/panicwrap-1.3.0.tar.gz
/panicwrap-1.3.1.tar.gz
/panicwrap-1.3.2.tar.gz
/panicwrap-1.3.4.tar.gz

View File

@ -0,0 +1,52 @@
From 49491f7e9808438787e8963f34a56589ad996b27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <asm@redhat.com>
Date: Fri, 7 Jul 2023 17:49:07 +0200
Subject: [PATCH] Add RISCV as valid architecture
---
dup2.go | 3 ++-
dup3.go | 3 ++-
panicwrap_test.go | 4 ++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dup2.go b/dup2.go
index d9c61c7..a762391 100644
--- a/dup2.go
+++ b/dup2.go
@@ -1,4 +1,5 @@
-// +build linux,!arm64 !linux,!windows
+//go:build !arm64 && !riscv && linux
+// +build !arm64,!riscv,linux
package panicwrap
diff --git a/dup3.go b/dup3.go
index 9417bc7..16cb689 100644
--- a/dup3.go
+++ b/dup3.go
@@ -1,4 +1,5 @@
-//+build linux,arm64
+//go:build (linux && arm64) || (linux && riscv)
+// +build linux,arm64 linux,riscv
package panicwrap
diff --git a/panicwrap_test.go b/panicwrap_test.go
index 771e1eb..bec2eff 100644
--- a/panicwrap_test.go
+++ b/panicwrap_test.go
@@ -221,9 +221,9 @@ func TestHelperProcess(*testing.T) {
case "panic-monitor":
config := &WrapConfig{
- Handler: panicHandler,
+ Handler: panicHandler,
HidePanic: true,
- Monitor: true,
+ Monitor: true,
}
exitStatus, err := Wrap(config)
--
2.40.1

View File

@ -1,25 +0,0 @@
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

@ -3,7 +3,7 @@
# https://github.com/bugsnag/panicwrap
%global goipath github.com/bugsnag/panicwrap
Version: 1.3.2
Version: 1.3.4
%gometa
@ -31,7 +31,7 @@ section below on why.}
%global gosupfiles glide.lock glide.yaml
Name: %{goname}
Release: 6.0.riscv64%{?dist}
Release: 7.0.riscv64%{?dist}
Summary: Go library for catching and handling panics in Go applications
License: MIT
@ -39,13 +39,9 @@ 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
# riscv64 is identical to arm64
Patch1: linux-use-dup3-riscv64.patch
# RISCV fails similar to arm64
Patch0: 0001-Add-RISCV-as-valid-architecture.patch
%description
%{common_description}
@ -55,7 +51,6 @@ Patch1: linux-use-dup3-riscv64.patch
%prep
%goprep
%patch0 -p1
%patch1 -p1
cp %{S:1} %{S:2} .
%install
@ -69,8 +64,13 @@ cp %{S:1} %{S:2} .
%gopkgfiles
%changelog
* Fri Jul 07 2023 David Abdurachmanov <davidlt@rivosinc.com> - 1.3.2-6.0.riscv64
- Use dup3 for riscv64
* Sat Jul 08 2023 David Abdurachmanov <davidlt@rivosinc.com> - 1.3.4-1.0.riscv64
- Test build for riscv64
* Fri Jul 07 2023 Alejandro Sáez <asm@redhat.com> - 1.3.4-1
- Update to 1.3.4
- Add 0001-Prevent-the-build-of-dup2.go-on-Linux-aarch64.patch
- Remove 0001-Prevent-the-build-of-dup2.go-on-Linux-aarch64.patch
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

View File

@ -1,21 +0,0 @@
diff --git a/dup2.go b/dup2.go
index 279435f..52a02b4 100644
--- a/dup2.go
+++ b/dup2.go
@@ -1,5 +1,5 @@
// +build !windows
-// +build linux,!arm64
+// +build linux,!arm64 linux,!riscv64
package panicwrap
diff --git a/dup3.go b/dup3.go
index 9417bc7..ddf1ac5 100644
--- a/dup3.go
+++ b/dup3.go
@@ -1,4 +1,4 @@
-//+build linux,arm64
+//+build linux,arm64 linux,riscv64
package panicwrap

View File

@ -1 +1 @@
SHA512 (panicwrap-1.3.2.tar.gz) = d6c35e70dc115a0738da6b3475a8d10cb668564b22fd43a76ddaae4b32b30f364016b9a896e7a178b0c51a2ea0d936bcc55cbfd5aff36b0363419dbc8d4be3f8
SHA512 (panicwrap-1.3.4.tar.gz) = 71b5cae39b8f72fe9d5cadabacb9fbab57976f017db35f5ff44e0ae9233c98ac58c7e93c131abfd52debbe11051402fc0cf236b4347936903425d5d0ffafea8e