Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update upstream specfile with downstream changes #146

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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