diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..623502c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,36 @@
+NAME = terragrunt
+
+mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
+mkfile_dir := $(dir $(mkfile_path))
+export GOPATH := $(mkfile_dir)/tmpdir/
+
+# make sure ./ is in the path,
+# otherwise mockery is not found...
+export PATH := :$(mkfile_dir)/tmpdir/bin:$(PATH)
+
+default: clean tar
+
+clean:
+ rm -rf $(NAME) $(NAME)-*.obscpio vendor.tar.gz ./tmpdir
+
+tar:
+ osc service manualrun
+ mkdir -p ./tmpdir/src/ && \
+ rm -rf ./tmpdir/src/ && \
+ echo "Copy files to ./tmpdir/src/" && \
+ cp -r ./terragrunt/ ./tmpdir/src && \
+ cd ./tmpdir/src/ && \
+ echo "Installing mockery" && \
+ go install github.com/vektra/mockery/v2@v2.43.0 && \
+ echo "Starting go generate" && \
+ go generate ./... && \
+ go mod download && \
+ go mod vendor && \
+ echo "Creating tarball vendor.tar.gz" && \
+ tar czf ../../vendor.tar.gz ./vendor && \
+ ls -lh ../../vendor.tar.gz && \
+ echo "Cleaning up" && \
+ go clean -modcache && \
+ cd ../../ && \
+ rm -rf ./tmpdir && \
+ echo "Finished"
diff --git a/PACKAGING_README.md b/PACKAGING_README.md
new file mode 100644
index 0000000..f620a5a
--- /dev/null
+++ b/PACKAGING_README.md
@@ -0,0 +1,14 @@
+# Packaging terragrunt
+
+terragrunt 0.58.4 changed the Makefile. Since then, the `mocks` need to be
+prepared during build.
+This also means, that vendoring fails without first creating the mocks...
+
+1. Change the version in the `_service` file
+3. Run `make`
+4. Create a changelog entry
+5. Commit the changes as usual
+
+For the OBS workflow you need `obs-service-tar_scm`.
+
+For the `make` part you need `make` and a recent go installation.
diff --git a/_service b/_service
index 044d3e9..129f92a 100644
--- a/_service
+++ b/_service
@@ -3,7 +3,7 @@
https://github.com/gruntwork-io/terragrunt
git
.git
- v0.58.2
+ v0.58.4
@PARENT_TAG@
enable
v(.*)
@@ -16,6 +16,4 @@
*.tar
gz
-
-
diff --git a/_servicedata b/_servicedata
index 280679e..c355740 100644
--- a/_servicedata
+++ b/_servicedata
@@ -1,4 +1,4 @@
https://github.com/gruntwork-io/terragrunt
- 013f281e7c79360ca92bd90f9f239d172fe751d0
\ No newline at end of file
+ ee1ece03d9b774e1fb1c76ccebc8b2444a0fcd44
\ No newline at end of file
diff --git a/terragrunt-0.58.2.obscpio b/terragrunt-0.58.2.obscpio
deleted file mode 100644
index a369861..0000000
--- a/terragrunt-0.58.2.obscpio
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:aac58600f9b45a45eb1af09c546566519458e9aa93d6a6480dbc5130cde1c6ca
-size 7512077
diff --git a/terragrunt-0.58.4.obscpio b/terragrunt-0.58.4.obscpio
new file mode 100644
index 0000000..43f3096
--- /dev/null
+++ b/terragrunt-0.58.4.obscpio
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5ad03923b5458563be94988b42a61eb0625670f09da64efeb60b8f5334a3027d
+size 7527437
diff --git a/terragrunt.changes b/terragrunt.changes
index 9650e81..d40a275 100644
--- a/terragrunt.changes
+++ b/terragrunt.changes
@@ -1,3 +1,23 @@
+-------------------------------------------------------------------
+Sat May 11 19:49:23 UTC 2024 - Johannes Kastl
+
+- add Makefile and PACKAGING_README.md, remove services from
+ `_service`. Upstream changes break the go module vendoring, so we
+ can no longer use the go_modules service
+
+-------------------------------------------------------------------
+Fri May 10 20:41:19 UTC 2024 - opensuse_buildservice@ojkastl.de
+
+- Update to version 0.58.4:
+ * Updated makefile to generate mocks before build (#3126)
+ * Usage of locks when copy metadata fields (#3124)
+
+-------------------------------------------------------------------
+Wed May 08 10:30:27 UTC 2024 - opensuse_buildservice@ojkastl.de
+
+- Update to version 0.58.3:
+ * Added Terraform lock file generation with provider caching (#3108)
+
-------------------------------------------------------------------
Fri May 03 16:15:59 UTC 2024 - opensuse_buildservice@ojkastl.de
diff --git a/terragrunt.obsinfo b/terragrunt.obsinfo
index 661bba1..c61b4c6 100644
--- a/terragrunt.obsinfo
+++ b/terragrunt.obsinfo
@@ -1,4 +1,4 @@
name: terragrunt
-version: 0.58.2
-mtime: 1714670610
-commit: 013f281e7c79360ca92bd90f9f239d172fe751d0
+version: 0.58.4
+mtime: 1715370548
+commit: ee1ece03d9b774e1fb1c76ccebc8b2444a0fcd44
diff --git a/terragrunt.spec b/terragrunt.spec
index 6502adb..3d48871 100644
--- a/terragrunt.spec
+++ b/terragrunt.spec
@@ -19,13 +19,15 @@
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
Name: terragrunt
-Version: 0.58.2
+Version: 0.58.4
Release: 0
Summary: Thin wrapper for Terraform for working with multiple Terraform modules
License: MIT
URL: https://github.com/gruntwork-io/terragrunt
Source: terragrunt-%{version}.tar.gz
Source1: vendor.tar.gz
+Source2: Makefile
+Source3: PACKAGING_README.md
BuildRequires: go1.21 >= 1.21.7
%description
@@ -38,7 +40,7 @@ Terragrunt is a thin wrapper for Terraform that provides extra tools for keeping
go build \
-mod=vendor \
-buildmode=pie \
- -ldflags="-X main.VERSION=%{version}"
+ -ldflags="-X github.com/gruntwork-io/go-commons/version.Version=v%{version}"
%install
# Install the binary.
diff --git a/vendor.tar.gz b/vendor.tar.gz
index 18a5eab..bf65e6e 100644
--- a/vendor.tar.gz
+++ b/vendor.tar.gz
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:af0d6c543358223ebc0f94ab71dce792b0c038d97fe6820a0269d44cd4a9349e
-size 15356253
+oid sha256:9daca99f213ee5e8515e634d8127f60446e134e7b2d1c73cd7dc7afe4b02397e
+size 16001898