Blob Blame History Raw
# Generated by go2rpm
%bcond_without check

# https://github.com/bugsnag/panicwrap
%global goipath         github.com/bugsnag/panicwrap
Version:                1.3.4

%gometa

%global common_description %{expand:
Panicwrap is a Go library that re-executes a Go binary and monitors stderr
output from the binary for a panic. When it find a panic, it executes a
user-defined handler function. Stdout, stderr, stdin, signals, and exit codes
continue to work as normal, making the existence of panicwrap mostly invisble to
the end user until a panic actually occurs.

Since a panic is truly a bug in the program meant to crash the runtime, globally
catching panics within Go applications is not supposed to be possible. Despite
this, it is often useful to have a way to know when panics occur. panicwrap
allows you to do something with these panics, such as writing them to a file, so
that you can track when panics occur.

Panicwrap is not a panic recovery system. Panics indicate serious problems with
your application and should crash the runtime. panicwrap is just meant as a way
to monitor for panics. If you still think this is the worst idea ever, read the
section below on why.}

%global golicenses      LICENSE
%global godocs          CHANGELOG.md README.md

%global gosupfiles      glide.lock glide.yaml

Name:           %{goname}
Release:        %autorelease
Summary:        Go library for catching and handling panics in Go applications

License:        MIT
URL:            %{gourl}
Source0:        %{gosource}
Source1:        glide.yaml
Source2:        glide.lock

# RISCV fails similar to arm64
Patch0: 0001-Add-RISCV-as-valid-architecture.patch

%description
%{common_description}

%gopkg

%prep
%goprep
%patch -P0 -p1
cp %{S:1} %{S:2} .

%install
%gopkginstall

%if %{with check}
%check
%gocheck
%endif

%gopkgfiles

%changelog
%autochangelog