%define _trivial .0 %define _buildid .5 %global commit 268e3bb9262e28d22abbb191ee3b918287a2e6b5 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: oci-add-hooks Version: 0 Release: 0.1.20200504git%{shortcommit}%{?dist}%{?_trivial}%{?_buildid} Summary: Injects OCI hooks as a Docker runtime # oci-add-hooks: ASL 2.0 (LICENSE, NOTICE) # go-simplejson: MIT (LICENSE.go-simplejson) # json-lossless: MIT (LICENSE.json-lossless) License: ASL 2.0 and MIT URL: https://github.com/awslabs/oci-add-hooks Source0: https://github.com/awslabs/oci-add-hooks/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # go.mod Source100: https://github.com/bitly/go-simplejson/archive/v0.5.0/go-simplejson-0.5.0.tar.gz Source101: https://github.com/joeshaw/json-lossless/archive/e0cd1ca6349bf167e33d44f28c14c728a277205f/json-lossless-e0cd1ca.tar.gz Patch200: remove-go-mod.patch BuildRequires: golang >= 1.24.4 Provides: bundled(golang(github.com/bitly/go-simplejson)) Provides: bundled(golang(github.com/joeshaw/json-lossless)) %description oci-add-hooks is an OCI runtime with the sole purpose of injecting OCI prestart, poststart, and poststop hooks into a container config.json before passing along to an OCI compatible runtime. %prep %autosetup -n %{name}-%{commit} mkdir -p src/github.com/bitly/go-simplejson src/github.com/joeshaw/json-lossless tar -C src/github.com/bitly/go-simplejson -xzf %{SOURCE100} --strip 1 cp src/github.com/bitly/go-simplejson/LICENSE LICENSE.go-simplejson tar -C src/github.com/joeshaw/json-lossless -xzf %{SOURCE101} --strip 1 cp src/github.com/joeshaw/json-lossless/LICENSE LICENSE.json-lossless %build GO111MODULE=off \ GOPATH=$(pwd) go build -o %{name} -ldflags="-linkmode=external -X main.commit=%{name}-%{commit}" %install install -Dpm 0755 %{name} %{buildroot}%{_bindir}/%{name} %files %license LICENSE NOTICE LICENSE.go-simplejson LICENSE.json-lossless %doc README.md %{_bindir}/%{name} %changelog * Wed Jun 18 2025 Justin Alvarez - 0-0.1.20200504git268e3bb.amzn2023.0.5 - Rebuild with golang 1.24.4 to fix CVE-2025-4673 and CVE-2025-22874 * Fri May 16 2025 Austin Vazquez - 0-0.1.20200504git268e3bb.amzn2023.0.4 - Rebuild with golang-1.23.8 to fix CVE-2025-22871 * Tue May 21 2024 Christopher R. Miller - 0-0.1.20200504git268e3bb.amzn2023.0.3 - Rebuild with golang-1.22.3 to fix CVE-2023-39326 * Wed Oct 25 2023 Chistopher R. Miller - 0-0.1.20200504git268e3bb.amzn2023.0.2 - Rebuild with golang-1.20.10 to fix CVE-2023-39325 * Tue Sep 05 2023 Satyam Sinha - 0-0.1.20200504git268e3bb.amzn2023.0.1 - Rebuild with golang version v1.20.7 - Fix CVE-2023-29406 * Tue Jun 21 2022 Hailey Mothershead - 0-0.1.20200504git268e3bb - New upstream version _ Disable new go build flow * Mon May 11 2020 Samuel Karp - 0-0.1.20200504git325a340 - New upstream version * Tue Jan 8 2019 iliana weller - 0-0.1.20181219git293a9f9 - Initial packaging