Skip to content

Commit

Permalink
Update upstream specfile with downstream changes (#146)
Browse files Browse the repository at this point in the history
A couple of changes were made in downstream specfile to be able to build
with RHEL8.
  • Loading branch information
r0x0d authored Aug 2, 2024
1 parent f46237b commit f593d1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
project: "rhc-worker-script"
targets:
- epel-7-x86_64
- epel-8-x86_64
trigger: pull_request
actions:
# do not get the version from a tag (git describe) but from the spec file
Expand All @@ -28,6 +29,7 @@ jobs:
project: "rhc-worker-script"
targets:
- epel-7-x86_64
- epel-8-x86_64
trigger: commit
branch: main
actions:
Expand Down
15 changes: 5 additions & 10 deletions packaging/rhc-worker-script.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
%define debug_package %{nil}

# Flags for building the package
%global buildflags -buildmode pie -compiler gc -a -v -x
%global goldflags %{expand:-linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'}
%global buildflags -compiler gc -a -v -x

# Package constants
%global repo_orgname oamg
Expand All @@ -15,11 +14,6 @@
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}
%global rhc_worker_conf_dir %{_root_sysconfdir}/rhc/workers

# 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
%endif

Name: %{repo_name}
Version: 0.9
Release: 1%{?dist}
Expand All @@ -28,7 +22,7 @@ Summary: Worker executing scripts on hosts managed by Red Hat Insights
License: GPLv3+
URL: https://github.com/%{repo_orgname}/%{repo_name}
Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
ExclusiveArch: %{go_arches}
ExclusiveArch: x86_64

BuildRequires: git
BuildRequires: golang
Expand All @@ -42,9 +36,7 @@ managed by Red Hat Insights.
%setup -q

%build
export CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all"
export BUILDFLAGS="%{buildflags}"
export LDFLAGS="%{goldflags}"

make build

Expand Down Expand Up @@ -83,6 +75,9 @@ EOF

%changelog

* Tue Jul 02 2024 Rodolfo Olivieri <[email protected]> 0.9-5
- Patch specfile to build with RHEL 8

* Fri Jun 21 2024 Rodolfo Olivieri <[email protected]> 0.9-1
- Update module google.golang.org/grpc to v1.64.0
- Bump golang version to 1.21
Expand Down

0 comments on commit f593d1f

Please sign in to comment.