From c7bf9418252886db1d8271ef3ac9e7d65829cc1af5464938230f3c470b89abb2 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Fri, 10 Nov 2023 08:11:57 +0000 Subject: [PATCH] Accepting request 1124801 from home:ojkastl_buildservice:Branch_systemsmanagement_opentofu - properly report the version (otherwise this would report 1.6.0-dev) - rename the executable to 'tofu', to match upstream naming OBS-URL: https://build.opensuse.org/request/show/1124801 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:opentofu/opentofu?expand=0&rev=8 --- opentofu.changes | 7 +++++++ opentofu.spec | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/opentofu.changes b/opentofu.changes index 845913a..5b37e94 100644 --- a/opentofu.changes +++ b/opentofu.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 10 08:06:42 UTC 2023 - Johannes Kastl + +- properly report the version (otherwise this would report + 1.6.0-dev) +- rename the executable to 'tofu', to match upstream naming + ------------------------------------------------------------------- Fri Nov 10 07:19:13 UTC 2023 - kastl@b1-systems.de diff --git a/opentofu.spec b/opentofu.spec index b7eaca0..4e015cf 100644 --- a/opentofu.spec +++ b/opentofu.spec @@ -16,6 +16,8 @@ # +%define executable_name tofu + Name: opentofu Version: 1.6.0~alpha4 Release: 0 @@ -49,15 +51,16 @@ The key features of OpenTofu are: go build \ -mod=vendor \ -buildmode=pie \ - -o bin/%{name} ./cmd/tofu + -ldflags "-w -s -X github.com/opentofu/opentofu/version.dev=no -X github.com/opentofu/opentofu/version.Version=%{version}" \ + -o bin/%{executable_name} ./cmd/tofu %install # Install the binary. -install -D -m 0755 bin/%{name} "%{buildroot}/%{_bindir}/%{name}" +install -D -m 0755 bin/%{executable_name} "%{buildroot}/%{_bindir}/%{executable_name}" %files %license LICENSE %doc CHANGELOG.md README.md -%{_bindir}/%{name} +%{_bindir}/%{executable_name} %changelog