diff --git a/anda/langs/go/google-grpc/anda.hcl b/anda/langs/go/google-grpc/anda.hcl new file mode 100644 index 0000000000..c697e9b806 --- /dev/null +++ b/anda/langs/go/google-grpc/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "golang-google-grpc.terra.spec" + } +} diff --git a/anda/langs/go/google-grpc/golang-google-grpc.terra.spec b/anda/langs/go/google-grpc/golang-google-grpc.terra.spec new file mode 100644 index 0000000000..baa39f4619 --- /dev/null +++ b/anda/langs/go/google-grpc/golang-google-grpc.terra.spec @@ -0,0 +1,106 @@ +#? https://src.fedoraproject.org/rpms/golang-google-grpc/blob/rawhide/f/golang-google-grpc.spec + +# Generated by go2rpm 1.14.0 +%bcond check 0 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +# https://github.com/grpc/grpc-go +%global goipath google.golang.org/grpc +%global forgeurl https://github.com/grpc/grpc-go +Version: 1.73.0 + +%gometa -L + +%global common_description %{expand: +The Go language implementation of gRPC. HTTP/2 based RPC.} + +%global golicenses LICENSE NOTICE.txt +%global godocs examples AUTHORS CODE-OF-CONDUCT.md CONTRIBUTING.md\\\ + GOVERNANCE.md MAINTAINERS.md README.md SECURITY.md\\\ + Documentation + +Name: golang-google-grpc.terra +Release: %autorelease +Summary: The Go language implementation of gRPC. HTTP/2 based RPC + +License: Apache-2.0 +URL: %{gourl} +Source: %{gosource} +Conflicts: golang-google-grpc + +%description %{common_description} + +%{lua: + local s = rpm.expand("%gopkg"):gsub("golang%-google%-grpc", "golang-google-grpc.terra") + print(s) +} + +%prep +%goprep -A +%autopatch -p1 + +# Remove dependency on stackdriver due to dependency issues +# golang-contrib-opencensus-exporter-stackdriver-devel +rm -rf gcp/observability interop/observability/ + +%dnl %if %{without bootstrap} +%dnl %generate_buildrequires +%dnl %go_generate_buildrequires +%dnl %endif + +%if %{without bootstrap} +%build +%define gomodulesmode GO111MODULE=on +for cmd in cmd/* ; do + pushd $cmd + %gobuild -o %{gobuilddir}/bin/$(basename $cmd) . + popd +done +%endif + +%install +%gopkginstall +%if %{without bootstrap} +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +%endif + +%if %{without bootstrap} +%if %{with check} +%check + +for test in "InvalidMetadata" \ + "SvrWriteStatusEarlyWrite" \ + "AuthorizationEngineEvaluate" \ + "HealthWatchServiceStatusSetBeforeStartingServer" \ + "PolicyEngineEvaluate" \ + "IdentityEncoding" \ + "Fallback" \ + "HealthCheckOff" \ + "ControlChannelCredsFailure" \ +; do +awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) +done +%gocheck -d google.golang.org/grpc/security/advancedtls +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE NOTICE.txt +%doc examples AUTHORS CODE-OF-CONDUCT.md CONTRIBUTING.md GOVERNANCE.md +%doc MAINTAINERS.md README.md SECURITY.md Documentation +%{_bindir}/protoc-gen-go-grpc +%endif + +%{lua: + local s = rpm.expand("%gopkgfiles"):gsub("golang%-google%-grpc", "golang-google-grpc.terra", 1) + print(s) +} + +%changelog +%autochangelog diff --git a/anda/langs/go/google-grpc/update.rhai b/anda/langs/go/google-grpc/update.rhai new file mode 100644 index 0000000000..bbc89947ff --- /dev/null +++ b/anda/langs/go/google-grpc/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("grpc/grpc-go"));