From 1a922bfbc7c9b82d9fbcefd687757a9b1191da8f Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Apr 06 2019 15:00:30 +0000 Subject: Release 0.9.0 (#1695293) Update to new Go packaging Signed-off-by: Robert-André Mauchin --- diff --git a/.gitignore b/.gitignore index 506011c..5903e3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libseccomp-golang-60c9953.tar.gz +/libseccomp-golang-0.9.0.tar.gz diff --git a/golang-github-seccomp-libseccomp-golang.spec b/golang-github-seccomp-libseccomp-golang.spec index c32266a..38aa350 100644 --- a/golang-github-seccomp-libseccomp-golang.spec +++ b/golang-github-seccomp-libseccomp-golang.spec @@ -1,151 +1,71 @@ -%if 0%{?fedora} || 0%{?rhel} == 6 -%global with_devel 1 -%global with_bundled 0 -%global with_debug 0 -# failing atm -%global with_check 0 -%global with_unit_test 1 -%else -%global with_devel 1 -%global with_bundled 0 -%global with_debug 0 -# failing atm -%global with_check 0 -%global with_unit_test 1 +# Generated by go2rpm +%ifarch x86_64 aarch64 +%bcond_without check %endif -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -%global provider github -%global provider_tld com -%global project seccomp -%global repo libseccomp-golang # https://github.com/seccomp/libseccomp-golang -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit 60c9953736798c4a04e90d0f3da2f933d44fd4c4 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -Name: golang-%{provider}-%{project}-%{repo} -Version: 0 -Release: 0.11.git%{shortcommit}%{?dist} -Summary: The libseccomp golang bindings repository +%global goipath github.com/seccomp/libseccomp-golang +Version: 0.9.0 + +%gometa + +%global common_description %{expand: +The libseccomp library provides an easy to use, platform independent, interface +to the Linux Kernel's syscall filtering mechanism. The libseccomp API is +designed to abstract away the underlying BPF based syscall filter language and +present a more conventional function-call based filtering interface that should +be familiar to, and easily adopted by, application developers. + +The libseccomp-golang library provides a Go based interface to the libseccomp +library.} + +Name: golang-github-seccomp-libseccomp-golang +Release: 1%{?dist} +Summary: Libseccomp golang bindings + License: BSD -URL: https://%{provider_prefix} -Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz +URL: %{gourl} +Source0: %{gosource} -# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required -ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}} -# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} +%if %{with check} +BuildRequires: pkgconfig(libseccomp) +%endif %description -%{summary} +%{common_description} -%if 0%{?with_devel} %package devel Summary: %{summary} BuildArch: noarch - -%if 0%{?with_check} && ! 0%{?with_bundled} -%endif - -Provides: golang(%{import_path}) = %{version}-%{release} +Requires: pkgconfig(libseccomp) %description devel -%{summary} +%{common_description} This package contains library source intended for building other packages which use import path with -%{import_path} prefix. -%endif - -%if 0%{?with_unit_test} && 0%{?with_devel} -%package unit-test-devel -Summary: Unit tests for %{name} package -%if 0%{?with_check} -#Here comes all BuildRequires: PACKAGE the unit tests -#in %%check section need for running -BuildRequires: libseccomp-devel >= 2.2.1 -%endif - -# test subpackage tests code from devel subpackage -Requires: %{name}-devel = %{version}-%{release} - -%description unit-test-devel -%{summary} - -This package contains unit tests for project -providing packages with %{import_path} prefix. -%endif +%{goipath} prefix. %prep -%setup -q -n %{repo}-%{commit} - -%build +%forgeautosetup -p1 %install -# source codes for building projects -%if 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list -# find all *.go but no *_test.go files and generate devel.file-list -for file in $(find . -iname "*.go" \! -iname "*_test.go") ; do - echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list -done -%endif - -# testing files for this project -%if 0%{?with_unit_test} && 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -# find all *_test.go files and generate unit-test.file-list -for file in $(find . -iname "*_test.go"); do - echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test-devel.file-list -done -%endif - -%if 0%{?with_devel} -sort -u -o devel.file-list devel.file-list -%endif +%goinstall +%if %{with check} %check -%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} -%if ! 0%{?with_bundled} -export GOPATH=%{buildroot}/%{gopath}:%{gopath} -%else -export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} +%gochecks %endif -%gotest %{import_path} -%endif - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%if 0%{?with_devel} %files devel -f devel.file-list %license LICENSE -%doc README -%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} -%endif - -%if 0%{?with_unit_test} && 0%{?with_devel} -%files unit-test-devel -f unit-test-devel.file-list -%license LICENSE -%doc README -%endif +%doc CHANGELOG README %changelog +* Sat Apr 06 16:21:50 CEST 2019 Robert-André Mauchin - 0.9.0-1 +- Release 0.9.0 (#1695293) +- Update to new Go packaging + * Fri Jul 13 2018 Fedora Release Engineering - 0-0.11.git60c9953 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index c12d160..0907026 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9c05fef001cbe35c9e8e567a4f1bf314 libseccomp-golang-60c9953.tar.gz +SHA512 (libseccomp-golang-0.9.0.tar.gz) = f3b6ce46b1ad3b2c0c17b53fdb64c40c7b5c701632b97380d86f273e68acfe543bdd8082047d3444e5ff61fdc9fd3d8e3dae8230429f4e4210e54db584ecfef1