new package regclient: Docker and OCI Registry Client in Go and tooling using those libraries

OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/regclient?expand=0&rev=1
This commit is contained in:
Dirk Mueller 2024-08-21 11:20:43 +00:00 committed by Git OBS Bridge
commit 4730781016
9 changed files with 244 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

23
_service Normal file
View File

@ -0,0 +1,23 @@
<services>
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/regclient/regclient</param>
<param name="scm">git</param>
<param name="package-meta">yes</param>
<param name="revision">v0.7.1</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="changesgenerate">enable</param>
<param name="versionrewrite-pattern">v(.*)</param>
</service>
<service name="set_version" mode="manual">
</service>
<service name="go_modules" mode="manual">
</service>
<!-- services below are running at buildtime -->
<service name="tar" mode="buildtime">
<param name="package-meta">yes</param>
</service>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">gz</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/regclient/regclient</param>
<param name="changesrevision">cdfb08e81b172a64860eb95f8092c08d0c121b04</param></service></servicedata>

3
regclient-0.7.1.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4a4c5ff116e727913ce3e1e066b8665b278120939aa281b76e2bba627e875a38
size 4701196

42
regclient.changes Normal file
View File

@ -0,0 +1,42 @@
-------------------------------------------------------------------
Sun Aug 04 07:24:13 UTC 2024 - opensuse_buildservice@ojkastl.de
- Update to version 0.7.1:
* Release v0.7.1
* Version bump
* Fix: Validate the digest of the ref when provided
* Version bump
* Option to output config with regctl artifact get
* Add funding.yml
* Tar file should use forward slashes
* Add WithDockerCredsFile() RegClient Opt
* Fix: Mod tracking of changed manifests
* Fix platform detection
* Remove docker build caching to GHA
-------------------------------------------------------------------
Fri Jul 12 19:26:38 UTC 2024 - opensuse_buildservice@ojkastl.de
- Update to version 0.7.0:
* Release v0.7.0
* Support pushing tagged manifests with different digest
algorithms
* Version bump
* Support changing digest algorithm
* Include a contributor list in the readme
* Enable docker caching of GHA builds
* Remove rwfs internal package
* Allow well known architectures as a platform
* Cleanup Dockerfile linter warnings
* Refactor pulling a platform specific manifest
* Add an experimental regctl ref command
* feat: allow ~ (tilde) in reference paths
* Fix: Enable deletion on olareg tests
* Feat: Return non-zero on a failed registry ping
* Handle nil blob reader
-------------------------------------------------------------------
Thu Jul 11 11:00:22 UTC 2024 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- new package regclient: Docker and OCI Registry Client in Go and
tooling using those libraries

4
regclient.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: regclient
version: 0.7.1
mtime: 1722715050
commit: cdfb08e81b172a64860eb95f8092c08d0c121b04

141
regclient.spec Normal file
View File

@ -0,0 +1,141 @@
#
# spec file for package regclient
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
Name: regclient
Version: 0.7.1
Release: 0
Summary: OCI Registry Client in Go and tooling using those libraries
License: Apache-2.0
URL: https://github.com/regclient/regclient
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: go >= 1.22
BuildRequires: git
%description
Client interface for the registry API. This packages includes regctl for a
command line interface to manage registries.
%package -n %{name}-bash-completion
Summary: Bash Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Requires: bash-completion
Supplements: (%{name} and bash-completion)
BuildArch: noarch
%description -n %{name}-bash-completion
Bash command line completion support for %{name}.
%package -n %{name}-fish-completion
Summary: Fish Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Supplements: (%{name} and fish)
BuildArch: noarch
%description -n %{name}-fish-completion
Fish command line completion support for %{name}.
%package -n %{name}-zsh-completion
Summary: Zsh Completion for %{name}
Group: System/Shells
Requires: %{name} = %{version}
Supplements: (%{name} and zsh)
BuildArch: noarch
%description -n %{name}-zsh-completion
zsh command line completion support for %{name}.
%prep
%autosetup -p 1 -a 1
%build
COMMIT_HASH="$(sed -n 's/commit: \(.*\)/\1/p' %_sourcedir/%{name}.obsinfo)"
for executable in regctl regsync regbot
do
go build \
-mod=vendor \
-buildmode=pie \
-trimpath \
-tags nolegacy \
-buildvcs=false \
-ldflags="-buildid= -X github.com/regclient/regclient/internal/version.vcsTag=%{version}" \
-o bin/${executable} ./cmd/${executable}
done
%install
for executable in regctl regsync regbot
do
# Install the binary.
install -D -m 0755 bin/${executable} %{buildroot}/%{_bindir}/${executable}
# create the bash completion file
mkdir -p %{buildroot}%{_datarootdir}/bash-completion/completions/
%{buildroot}/%{_bindir}/${executable} completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/${executable}
# create the fish completion file
mkdir -p %{buildroot}%{_datarootdir}/fish/vendor_completions.d/
%{buildroot}/%{_bindir}/${executable} completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/${executable}.fish
# create the zsh completion file
mkdir -p %{buildroot}%{_datarootdir}/zsh_completion.d/
%{buildroot}/%{_bindir}/${executable} completion zsh > %{buildroot}%{_datarootdir}/zsh_completion.d/_${executable}
done
%check
for executable in regctl regsync regbot
do
%{buildroot}/%{_bindir}/${executable} version | grep %{version}
done
%files
%doc README.md
%license LICENSE
%{_bindir}/regbot
%{_bindir}/regctl
%{_bindir}/regsync
%files -n %{name}-bash-completion
%dir %{_datarootdir}/bash-completion/completions/
%{_datarootdir}/bash-completion/completions/regbot
%{_datarootdir}/bash-completion/completions/regctl
%{_datarootdir}/bash-completion/completions/regsync
%files -n %{name}-fish-completion
%dir %{_datarootdir}/fish
%dir %{_datarootdir}/fish/vendor_completions.d
%{_datarootdir}/fish/vendor_completions.d/regbot.fish
%{_datarootdir}/fish/vendor_completions.d/regctl.fish
%{_datarootdir}/fish/vendor_completions.d/regsync.fish
%files -n %{name}-zsh-completion
%defattr(-,root,root)
%dir %{_datarootdir}/zsh_completion.d/
%{_datarootdir}/zsh_completion.d/_regbot
%{_datarootdir}/zsh_completion.d/_regctl
%{_datarootdir}/zsh_completion.d/_regsync
%changelog

3
vendor.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2aea2df464b0d181ecb60528d4f4a2c656aff1d46ac780dc6f6f3cfc868e4262
size 1827864