Skip to content

Commit

Permalink
Add rpm build bits
Browse files Browse the repository at this point in the history
  • Loading branch information
major committed Jan 26, 2024
1 parent 95476c5 commit ad7d2b9
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/prepare_source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

jobs:

build:
prepare:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -74,4 +74,20 @@ jobs:
git clean -fxd
git status
git pull --rebase
git push
git push
build:
runs-on: ubuntu-latest
container:
image: quay.io/fedora/fedora:rawhide
volumes:
- output:/output
steps:
- name: Install required packages
run: dnf -y install git mock rpm-build

- name: Checkout repo
uses: actions/checkout@v4

- name: Ensure repo is fully updated
run: git pull --rebase
151 changes: 151 additions & 0 deletions golang-github-redhatcloudx-otel-builder.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Generated by go2rpm 1.9.0
%bcond_without check

# https://github.com/redhatcloudx/ocb-test
%global goipath github.com/redhatcloudx/otel-builder
%global commit main

%gometa -f


%global common_description %{expand:
# FIXME}

Name: %{goname}
Version: 0
Release: %autorelease -p
Summary: None

License: # FIXME
URL: %{gourl}
Source: %{gosource}

# Using go-mods-to-bundled-provides.py from
# https://src.fedoraproject.org/rpms/butane/blob/rawhide/f/go-mods-to-bundled-provides.py
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector/internal/cache)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector/internal/metrics)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/internal/healthcheck)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor/internal/common)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver/internal/ocmetrics)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver/internal/octrace)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/internal)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver)) = 0.92.0
Provides: bundled(golang(github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver/internal/metadata)) = 0.92.0
Provides: bundled(golang(github.com/stretchr/testify/assert)) = 1.8.4
Provides: bundled(golang(go.opentelemetry.io/collector/component)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/component/componenttest)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/connector)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/exporterhelper)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/exporterhelper/internal)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/internal/common)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/internal/otlptext)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/debugexporter)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/debugexporter/internal/metadata)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/loggingexporter)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/loggingexporter/internal/metadata)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/otlpexporter)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/otlpexporter/internal/metadata)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/otlphttpexporter)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/exporter/otlphttpexporter/internal/metadata)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/extension)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/extension/experimental/storage)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/extension/auth)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/extension/ballastextension)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/extension/ballastextension/internal/metadata)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/extension/zpagesextension)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/extension/zpagesextension/internal/metadata)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/otelcol)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/otelcol/internal/configunmarshaler)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/otelcol/internal/grpclog)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/processor)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/processor/processorhelper)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/processor/batchprocessor)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/processor/batchprocessor/internal/metadata)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/processor/memorylimiterprocessor)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/processor/memorylimiterprocessor/internal/metadata)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/receiver)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/receiver/receiverhelper)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/receiver/otlpreceiver)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/receiver/otlpreceiver/internal/logs)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metadata)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metrics)) = 0.92.0
Provides: bundled(golang(go.opentelemetry.io/collector/receiver/otlpreceiver/internal/trace)) = 0.92.0
Provides: bundled(golang(golang.org/x/sys/cpu)) = 0.16.0
Provides: bundled(golang(golang.org/x/sys/plan9)) = 0.16.0
Provides: bundled(golang(golang.org/x/sys/unix)) = 0.16.0
Provides: bundled(golang(golang.org/x/sys/windows)) = 0.16.0
Provides: bundled(golang(golang.org/x/sys/windows/registry)) = 0.16.0
Provides: bundled(golang(golang.org/x/sys/windows/svc)) = 0.16.0
Provides: bundled(golang(golang.org/x/sys/windows/svc/eventlog)) = 0.16.0

%description %{common_description}

%gopkg

%prep
# Use vendored dependencies.
%goprep -k
tar c -C vendor/ . | tar x -C %{gobuilddir}/src

%autopatch -p1

%build
export GO111MODULE=on
export GOFLAGS=-mod=vendor
%gobuild -o %{gobuilddir}/bin/ocb-test %{goipath}

%install
%gopkginstall
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/

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

%files
%{_bindir}/*

%gopkgfiles

%changelog
%autochangelog

0 comments on commit ad7d2b9

Please sign in to comment.