# Specfile based and updated from # https://github.com/theforeman/foreman-packaging/blob/rpm/develop/packages/client/foreman_ygg_worker/foreman_ygg_worker.spec %define debug_package %{nil} %global repo_orgname oamg %global repo_name rhc-worker-bash %global binary_name rhc-bash-worker %global rhc_libexecdir %{_libexecdir}/rhc %{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}} %global rhc_worker_conf_dir %{_root_sysconfdir}/rhc/workers %define gobuild(o:) env GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v %{?**} # EL7 doesn't define go_arches (it is available in go-srpm-macros which is EL8+) %if !%{defined go_arches} %define go_arches x86_64 s390x ppc64le %endif %global use_go_toolset_1_16 0%{?rhel} == 7 && !%{defined centos} Name: %{repo_name} Version: 0.2 Release: 2.20230807140945959409.main.57.gb59b767%{?dist} Summary: Worker executing bash scripts on hosts managed by Red Hat Insights License: GPLv3+ URL: https://github.com/%{repo_orgname}/%{repo_name} Source0: rhc-worker-bash-0.2.tar.gz ExclusiveArch: %{go_arches} %if %{use_go_toolset_1_16} BuildRequires: go-toolset-1.16-golang %else BuildRequires: golang %endif Requires: rhc %description Remote Host Configuration (rhc) worker for executing bash scripts on hosts managed by Red Hat Insights. %prep %setup -q -n rhc-worker-bash-0.2 %build mkdir -p _gopath/src ln -fs $(pwd)/src _gopath/src/%{binary_name}-%{version} ln -fs $(pwd)/vendor _gopath/src/%{binary_name}-%{version}/vendor export GOPATH=$(pwd)/_gopath pushd _gopath/src/%{binary_name}-%{version} %if %{use_go_toolset_1_16} scl enable go-toolset-1.16 -- %{gobuild} %else %{gobuild} %endif strip %{binary_name}-%{version} popd %install # Create a temporary directory /var/lib/rhc-worker-bash - used mainly for storing temporary files install -d %{buildroot}%{_sharedstatedir}/%{binary_name}/ install -D -m 755 _gopath/src/%{binary_name}-%{version}/%{binary_name}-%{version} %{buildroot}%{rhc_libexecdir}/%{binary_name} install -D -d -m 755 %{buildroot}%{rhc_worker_conf_dir} %files %{rhc_libexecdir}/%{binary_name} %license LICENSE %doc README.md %changelog * Mon Aug 07 2023 Packit - 0.2-2.20230807140945959409.main.57.gb59b767 - Update setupSosExtrasReport (Rodolfo Olivieri) - Expected yaml structure should be list on top level (Andrea Waltlova) - Remove unnecessary logging (Rodolfo Olivieri) - Add suggestions from review (Rodolfo Olivieri) - Add setup for sos report (Rodolfo Olivieri) - Mock insights-client call during verification tests (Andrea Waltlova) - Rewrite all tests with table driven approach (Andrea Waltlova) - Add convert2rhel example playbook (Rodolfo Olivieri) - Update README.md with more information (Rodolfo Olivieri) - Use separate environment for every executed command (Andrea Waltlova) - Update to make the yaml-file more generic (Rodolfo Olivieri) - Refactor server.go file and add tests (Andrea Waltlova) - Remove option to configure log destination (Andrea Waltlova) - spec: improve also for EL 7 compatibility (Pino Toscano) - Revert "Bump thatisuday/go-cross-build from 1.0.2 to 1.1.0" (Rodolfo Olivieri) - Update README (Rodolfo Olivieri) - Update test-container to execute tests in go1.16 (Rodolfo Olivieri) - Add grpc to go.sum (Rodolfo Olivieri) - Fix build for go1.16 (Rodolfo Olivieri) - Use LogFileName instead of LogDir for logger filename (Rodolfo Olivieri) - Update README.md (Andrea Waltlová) - Add option to create config for rhc-worker-bash (Andrea Waltlova) - Tidy up the modules and replace deprecated call WithInsecure (Andrea Waltlova) - Bump actions/setup-go from 2 to 4 (dependabot[bot]) - Bump thatisuday/go-cross-build from 1.0.2 to 1.1.0 (dependabot[bot]) - Bump google.golang.org/grpc from 1.40.0 to 1.56.2 (dependabot[bot]) - Bump actions/checkout from 2 to 3 (dependabot[bot]) - Add dependabot and update golint (Andrea Waltlova) - Parse minimal yaml instead of raw bash script (Andrea Waltlova) - Initialize CONTRIBUTING.md (Andrea Waltlova) - Add docstrings to all functions, types and structs (Andrea Waltlova) - Update README.md with local development setup (Andrea Waltlova) - Add first tests for util, runner and logger (Andrea Waltlova) - Shorten the summary in specfile (#38) (Andrea Waltlová) * Mon Aug 07 2023 Packit - 0.2-2 - latest upstream build * Thu Jul 06 2023 Eric Gustavsson 0.2-1 - Fix RPM specfile Source * Wed Jun 14 2023 Rodolfo Olivieri 0.1-1 - Initial RPM release