The package rpms/reg.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/reg.git/commit/?id=9eccf94409f9e3ab6....
Change: -ExclusiveArch: x86_64
Thanks.
Full change: ============
commit 9eccf94409f9e3ab6d9ffa95ff95b7fb26773126 Author: Mattia Verga mattia.verga@protonmail.com Date: Sat Feb 27 10:00:07 2021 +0100
Update to 0.16.1 and fix F34 FTB
diff --git a/.gitignore b/.gitignore index a56c3cf..6c547e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /reg-0.4.1.tar.gz /v0.15.5.tar.gz +/reg-0.16.1.tar.gz diff --git a/reg-server-0.4.1-run-once.patch b/reg-server-0.4.1-run-once.patch deleted file mode 100644 index 6cf1f20..0000000 --- a/reg-server-0.4.1-run-once.patch +++ /dev/null @@ -1,37 +0,0 @@ -From bc6ace0a8019132eeac2324fe7f055a64d5c8d9e Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk puiterwijk@redhat.com -Date: Tue, 27 Jun 2017 21:51:26 +0200 -Subject: [PATCH] Add flag to only generate registry overview once - -Signed-off-by: Patrick Uiterwijk puiterwijk@redhat.com ---- - server/server.go | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/server/server.go b/server/server.go -index 9d4681f..15e1501 100644 ---- a/server/server.go -+++ b/server/server.go -@@ -70,6 +70,10 @@ func main() { - Name: "insecure, k", - Usage: "do not verify tls certificates of registry", - }, -+ cli.BoolFlag{ -+ Name: "once, o", -+ Usage: "generate an output once and then exit", -+ }, - cli.StringFlag{ - Name: "port", - Value: "8080", -@@ -183,6 +187,11 @@ func main() { - logrus.Fatalf("Error creating index: %v", err) - } - -+ if c.GlobalBool("once") { -+ logrus.Info("Output generated") -+ return nil -+ } -+ - // parse the duration - dur, err := time.ParseDuration(c.String("interval")) - if err != nil { diff --git a/reg.spec b/reg.spec index 549882c..794167b 100644 --- a/reg.spec +++ b/reg.spec @@ -1,38 +1,25 @@ -# -# Currently debuginfo breaks the build. -# -# I get one of the following two failures following recommended debuginfo -# methods for golang: -# -# *** ERROR: No build ID note found in /builddir/build/BUILDROOT/reg-0.4.1-1.x86_64/usr/bin/reg-server -# -# or: -# -# /var/tmp/rpm-tmp.U9Lwrk: line 36: syntax error near unexpected token `)' -# -%global debug_package %{nil} +# https://github.com/genuinetools/reg +# EPEL build is curently broken due to golang macros not working +%global goipath github.com/genuinetools/reg +Version: 0.16.1
-# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12 -%global _dwz_low_mem_die_limit 0 +%gometa
-# modifying the Go binaries breaks the DWARF debugging -%global __os_install_post %{_rpmconfigdir}/brp-compress +%global common_description %{expand: +Docker registry v2 command line client and repo listing generator with security +checks.}
-%global provider_prefix github.com/genuinetools/reg -%global import_path %{provider_prefix} -#global commit 8d8ca405f7a8c8c4f72686ed239c767aba663f9b -#global shortcommit %%(c=%%{commit}; echo ${c:0:7}) +%global golicenses LICENSE +%global godocs VERSION.txt README.md
Name: reg -Version: 0.15.5 -Release: 8%{?dist} +Release: 3%{?dist} Summary: Docker registry v2 command line client
License: MIT -URL: https://%%7Bimport_path%7D/%%7Bname%7D - -Source0: https://github.com/genuinetools/reg/archive/v%%7Bversion%7D.tar.gz +URL: %{gourl} +Source0: %{gosource}
# Upstream advertises this as something that's meant to be run in a container # and doesn't provide a systemd unit or sysV init script or sysconfig files @@ -43,122 +30,142 @@ Source2: sysconfig.reg-server # https://github.com/genuinetools/reg/pull/200 Patch0: fix-row-cell-index-for-server-searching-feature.patch
-BuildRequires: golang -BuildRequires: systemd - -%if 0%{?epel} -# The version of golang is too old to understand the vendor manifest and can't -# find the appropriate path for the vendored version of this. -BuildRequires: golang-github-gorilla-context-devel - -# For whatever reason golang-github-gorilla-context-devel isn't available in -# EPEL for any of the other arches. -# BZ filed: https://bugzilla.redhat.com/show_bug.cgi?id=1466521 -ExclusiveArch: x86_64 +BuildRequires: golang +BuildRequires: systemd-rpm-macros +BuildRequires: golang-ipath(golang.org/x/net) +BuildRequires: golang-ipath(golang.org/x/sys) +BuildRequires: golang-ipath(golang.org/x/text) + +# These are not packaged in EPEL +%if 0%{!?epel} +BuildRequires: golang-ipath(github.com/Azure/go-ansiterm) +BuildRequires: golang-ipath(github.com/containerd/containerd) +BuildRequires: golang-ipath(github.com/davecgh/go-spew) +BuildRequires: golang-ipath(github.com/deckarep/golang-set) +BuildRequires: golang-ipath(github.com/docker/cli) +BuildRequires: golang-ipath(github.com/docker/distribution) +BuildRequires: golang-ipath(github.com/docker/docker) +BuildRequires: golang-ipath(github.com/docker/docker-credential-helpers) +BuildRequires: golang-ipath(github.com/docker/go-connections) +BuildRequires: golang-ipath(github.com/docker/go-units) +BuildRequires: golang-ipath(github.com/docker/libtrust) +BuildRequires: golang-ipath(github.com/fernet/fernet-go) +BuildRequires: golang-ipath(github.com/gogo/protobuf) +BuildRequires: golang-ipath(github.com/golang/protobuf) +BuildRequires: golang-ipath(github.com/google/go-cmp) +BuildRequires: golang-ipath(github.com/gorilla/mux) +BuildRequires: golang-ipath(github.com/grpc-ecosystem/grpc-gateway) +BuildRequires: golang-ipath(github.com/mitchellh/go-wordwrap) +BuildRequires: golang-ipath(github.com/morikuni/aec) +BuildRequires: golang-ipath(github.com/opencontainers/go-digest) +BuildRequires: golang-ipath(github.com/opencontainers/image-spec) +BuildRequires: golang-ipath(github.com/opencontainers/runc) +BuildRequires: golang-ipath(github.com/pkg/errors) +BuildRequires: golang-ipath(github.com/pmezard/go-difflib) +BuildRequires: golang-ipath(github.com/shurcooL/httpfs) +BuildRequires: golang-ipath(github.com/sirupsen/logrus) +BuildRequires: golang-ipath(github.com/stretchr/testify) +BuildRequires: golang-ipath(google.golang.org/genproto) +BuildRequires: golang-ipath(google.golang.org/grpc) %endif
-# The following section is populated by parsing the Gopkg.lock file -# at the base dir of a git checkout of the source code. -# -# $ git clone https://github.com/jessfraz/reg.git -# $ cd reg +# The following section is populated by parsing the modules.txt file +# in the vendor dir of the source code. # # Bundled Provides are defined as per Fedora Guidelines: # https://fedoraproject.org/wiki/Packaging:Guidelines#Bundling_and_Duplication... # -Provides: bundled(golang(github.com/Azure/go-ansiterm)) = d6e3b3328b783f23731bc4d058875b0371ff8109 -Provides: bundled(golang(github.com/Microsoft/go-winio)) = 67921128fb397dd80339870d2193d6b1e6856fd4 -Provides: bundled(golang(github.com/Nvveen/Gotty)) = cd527374f1e5bff4938207604a14f2e38a9cf512 -Provides: bundled(golang(github.com/beorn7/perks)) = 3a771d992973f24aa725d07868b467d1ddfceafb -Provides: bundled(golang(github.com/containerd/continuity)) = 0377f7d767206f3a9e8881d0f02267b0d89c7a62 -Provides: bundled(golang(github.com/coreos/clair)) = 9a9b1f7a13fa1cb796fe6dfb45ed241f39ce9f01 -Provides: bundled(golang(github.com/docker/cli)) = b395d2d6f5eec2c047e6bba4a3fd941d5757d725 -Provides: bundled(golang(github.com/docker/distribution)) = 749f6afb4572201e3c37325d0ffedb6f32be8950 -Provides: bundled(golang(github.com/docker/docker)) = 492545e139e7461aac044149a931bb4b2dd48f75 -Provides: bundled(golang(github.com/docker/docker-ce)) = 2ec1cede27a3dc04c44f8ed2feb1efb00c724d63 -Provides: bundled(golang(github.com/docker/docker-credential-helpers)) = 5241b46610f2491efdf9d1c85f1ddf5b02f6d962 -Provides: bundled(golang(github.com/docker/go-connections)) = 7395e3f8aa162843a74ed6d48e79627d9792ac55 -Provides: bundled(golang(github.com/docker/go-metrics)) = 399ea8c73916000c64c2c76e8da00ca82f8387ab -Provides: bundled(golang(github.com/docker/go-units)) = 47565b4f722fb6ceae66b95f853feed578a4a51c -Provides: bundled(golang(github.com/docker/libtrust)) = aabc10ec26b754e797f9028f4589c5b7bd90dc20 -Provides: bundled(golang(github.com/genuinetools/pkg)) = 3654fc151753f8cd41b366e0c15b9fa070890ddf -Provides: bundled(golang(github.com/gogo/protobuf)) = 7d68e886eac4f7e34d0d82241a6273d6c304c5cf -Provides: bundled(golang(github.com/golang/protobuf)) = b4deda0973fb4c70b50d226b1af49f3da59f5265 -Provides: bundled(golang(github.com/google/go-cmp)) = 3af367b6b30c263d47e8895973edcca9a49cf029 -Provides: bundled(golang(github.com/gorilla/context)) = 08b5f424b9271eedf6f9f0ce86cb9396ed337a42 -Provides: bundled(golang(github.com/gorilla/mux)) = e3702bed27f0d39777b0b37b664b6280e8ef8fbf -Provides: bundled(golang(github.com/grpc-ecosystem/grpc-gateway)) = 92583770e3f01b09a0d3e9bdf64321d8bebd48f2 -Provides: bundled(golang(github.com/matttproud/golang_protobuf_extensions)) = c12348ce28de40eed0136aa2b644d0ee0650e56c -Provides: bundled(golang(github.com/mitchellh/go-wordwrap)) = ad45545899c7b13c020ea92b2072220eefad42b8 -Provides: bundled(golang(github.com/opencontainers/go-digest)) = c9281466c8b2f606084ac71339773efd177436e7 -Provides: bundled(golang(github.com/opencontainers/image-spec)) = d60099175f88c47cd379c4738d158884749ed235 -Provides: bundled(golang(github.com/opencontainers/runc)) = baf6536d6259209c3edfa2b22237af82942d3dfa -Provides: bundled(golang(github.com/peterhellberg/link)) = d1cebc7ea14a5fc0de7cb4a45acae773161642c6 -Provides: bundled(golang(github.com/pkg/errors)) = 645ef00459ed84a119197bfb8d8205042c6df63d -Provides: bundled(golang(github.com/prometheus/client_golang)) = bcbbc08eb2ddff3af83bbf11e7ec13b4fd730b6e -Provides: bundled(golang(github.com/prometheus/client_model)) = 5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f -Provides: bundled(golang(github.com/prometheus/common)) = 7600349dcfe1abd18d72d3a1770870d9800a7801 -Provides: bundled(golang(github.com/prometheus/procfs)) = ae68e2d4c00fed4943b5f6698d504a5fe083da8a -Provides: bundled(golang(github.com/sirupsen/logrus)) = c155da19408a8799da419ed3eeb0cb5db0ad5dbc -Provides: bundled(golang(golang.org/x/crypto)) = a49355c7e3f8fe157a85be2f77e6e269a0f89602 -Provides: bundled(golang(golang.org/x/net)) = d0887baf81f4598189d4e12a37c6da86f0bba4d0 -Provides: bundled(golang(golang.org/x/sys)) = ac767d655b305d4e9612f5f6e33120b9176c4ad4 -Provides: bundled(golang(golang.org/x/text)) = f21a4dfb5e38f5895301dc265a8def02365cc3d0 -Provides: bundled(golang(google.golang.org/genproto)) = e92b116572682a5b432ddd840aeaba2a559eeff1 -Provides: bundled(golang(google.golang.org/grpc)) = 168a6198bcb0ef175f7dacec0b8691fc141dc9b8 +Provides: bundled(golang(github.com/coreos/clair)) = 2.0.1-0.20190910143208 +Provides: bundled(golang(github.com/genuinetools/pkg)) = 0.0.0-20181022210355 +Provides: bundled(golang(github.com/konsorten/go-windows-terminal-sequences)) = 1.0.1 +Provides: bundled(golang(github.com/Microsoft/go-winio)) = 0.4.14 +Provides: bundled(golang(github.com/Microsoft/hcsshim)) = 0.8.6 +Provides: bundled(golang(github.com/peterhellberg/link)) = 1.0.0 + +# These are not packaged in EPEL +# We will use the bundled modules +%if 0%{?epel} +Provides: bundled(golang(github.com/Azure/go-ansiterm)) = 0.0.0-20170929234023 +Provides: bundled(golang(github.com/containerd/containerd)) = 1.2.9 +Provides: bundled(golang(github.com/davecgh/go-spew)) = 1.1.1 +Provides: bundled(golang(github.com/deckarep/golang-set)) = 1.7.1 +Provides: bundled(golang(github.com/docker/cli)) = 0.0.0-20190913211141 +Provides: bundled(golang(github.com/docker/distribution)) = 2.7.1 +Provides: bundled(golang(github.com/docker/docker)) = 1.4.2-0.20190916154449 +Provides: bundled(golang(github.com/docker/docker-credential-helpers)) = 0.6.3 +Provides: bundled(golang(github.com/docker/go-connections)) = 0.4.0 +Provides: bundled(golang(github.com/docker/go-units)) = 0.4.0 +Provides: bundled(golang(github.com/docker/libtrust)) = 0.0.0-20160708172513 +Provides: bundled(golang(github.com/fernet/fernet-go)) = 0.0.0-20180830025343 +Provides: bundled(golang(github.com/gogo/protobuf)) = 1.3.0 +Provides: bundled(golang(github.com/golang/protobuf)) = 1.2.0 +Provides: bundled(golang(github.com/google/go-cmp)) = 0.3.1 +Provides: bundled(golang(github.com/gorilla/mux)) = 1.7.3 +Provides: bundled(golang(github.com/grpc-ecosystem/grpc-gateway)) = 1.11.1 +Provides: bundled(golang(github.com/mitchellh/go-wordwrap)) = 1.0.0 +Provides: bundled(golang(github.com/morikuni/aec)) = 0.0.0-20170113033406 +Provides: bundled(golang(github.com/opencontainers/go-digest)) = 1.0.0-rc1 +Provides: bundled(golang(github.com/opencontainers/image-spec)) = 1.0.1 +Provides: bundled(golang(github.com/opencontainers/runc)) = 0.1.1 +Provides: bundled(golang(github.com/pkg/errors)) = 0.8.1 +Provides: bundled(golang(github.com/pmezard/go-difflib)) = 1.0.0 +Provides: bundled(golang(github.com/shurcooL/httpfs)) = 0.0.0-20190707220628 +Provides: bundled(golang(github.com/sirupsen/logrus)) = 1.4.2 +Provides: bundled(golang(github.com/stretchr/testify)) = 1.2.2 +Provides: bundled(golang(google.golang.org/genproto)) = 0.0.0-20180817151627 +Provides: bundled(golang(google.golang.org/grpc)) = 1.23.1 +%endif + Obsoletes: reg-server < %{version}
%description -Docker registry v2 client. +%{common_description} + +%gopkg
%prep %setup -q -n %{name}-%{version} %patch0 -p1
-# Have to move things around because of how golang likes to search $GOPATH -cd ../ -mv $OLDPWD hack -mkdir $OLDPWD -cd $OLDPWD -mkdir -p $(pwd)/go/src/%{import_path} -mv ../hack/* $(pwd)/go/src/%{import_path}/ - -# Have to mess with the pathing even more to make the older version of golang -# in el7 happy. -%if 0%{?epel} -for d in $(ls $(pwd)/go/src/%{import_path}/vendor/) -do - if [[ -d "$(pwd)/go/src/%{import_path}/vendor/${d}" ]]; then - printf "D VALUE: %s\n" "${d}" - mkdir -p $(pwd)/go/src/${d} - cp -r $(pwd)/go/src/%{import_path}/vendor/${d}/* $(pwd)/go/src/${d}/ - fi -done +# Do not remove 'vendor' dir entirely +%goprep -ke + +# Remove bundled modules packaged in Fedora +rm -rf vendor/golang.org + +%if 0%{!?epel} +rm -rf vendor/github.com/Azure +rm -rf vendor/github.com/containerd +rm -rf vendor/github.com/davecgh +rm -rf vendor/github.com/deckarep +rm -rf vendor/github.com/docker +rm -rf vendor/github.com/fernet +rm -rf vendor/github.com/gogo +rm -rf vendor/github.com/golang +rm -rf vendor/github.com/google +rm -rf vendor/github.com/gorilla +rm -rf vendor/github.com/grpc-ecosystem +rm -rf vendor/github.com/mitchellh +rm -rf vendor/github.com/morikuni +rm -rf vendor/github.com/opencontainers +rm -rf vendor/github.com/pkg +rm -rf vendor/github.com/pmezard +rm -rf vendor/github.com/shurcooL +rm -rf vendor/github.com/sirupsen +rm -rf vendor/github.com/stretchr +rm -rf vendor/google.golang.org %endif
%build -export GOPATH="$(pwd)/go:%{buildroot}%{gopath}:%{gopath}" +%gobuild -o %{gobuilddir}/bin/reg %{goipath}
-cd $(pwd)/go/src/%{import_path}/ - -# Leave this here for when we can sort out the debuginfo fix -# https://bugzilla.redhat.com/show_bug.cgi?id=1432214 -#go build \ -# -ldflags '-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')' \ -# -o reg . -# -#go build \ -# -ldflags '-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')' \ -# -o reg-server ./server - -go build -o reg .
%install
# Install the binaries -cd ./go/src/%{import_path}/ -mkdir -p %{buildroot}%{_bindir} -install -p -m 0755 %{name} %{buildroot}%{_bindir}/%{name} +%gopkginstall +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
# Install templates and static content mkdir -p %{buildroot}%{_sharedstatedir}/%{name}-server @@ -176,17 +183,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/sysconfig install -p -m 0640 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-server
-mkdir -p %{buildroot}/%{name}-%{version} - -# Setup doc files for doc macro -for i in README.md Dockerfile Makefile -do - cp -p ${i} %{_builddir}/%{name}-%{version}/ -done - -# Setup license file for license macro -cp -p LICENSE %{_builddir}/%{name}-%{version}/ - %post %systemd_post %{name}-server.service
@@ -196,6 +192,7 @@ cp -p LICENSE %{_builddir}/%{name}-%{version}/ %postun %systemd_postun %{name}-server.service
+ %files %doc README.md Dockerfile Makefile %license LICENSE @@ -205,7 +202,20 @@ cp -p LICENSE %{_builddir}/%{name}-%{version}/ %config(noreplace) %{_sharedstatedir}/%{name}-server/static/ %config(noreplace) %{_sharedstatedir}/%{name}-server/templates/
+%gopkgfiles + %changelog +* Tue Feb 23 2021 Mattia Verga mattia.verga@protonmail.com - 0.16.1-3 +- Use bundled modules for EPEL8 + +* Sun Feb 21 2021 Mattia Verga mattia.verga@protonmail.com - 0.16.1-2 +- Use modules from Fedora repository where possible + +* Sat Feb 20 2021 Mattia Verga mattia.verga@protonmail.com - 0.16.1-1 +- Update to 0.16.1 +- Fix FTB in F34 +- Make use of some Golang macros + * Wed Jan 27 2021 Fedora Release Engineering releng@fedoraproject.org - 0.15.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
diff --git a/sources b/sources index 9af03ce..836d209 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.15.5.tar.gz) = c1293868ea30dcdfc5251f95a5f287f8043be3a2372fdd08c0836919f6722c5931eb429f9047769b442bf3fdbb50c476e8509c62cb20b4b45d30793571cce44e +SHA512 (reg-0.16.1.tar.gz) = 2be68b405bb384d8eb3ae17a9b1c802a7f3212865ce61cf72f01794b9456787b1ef0eb62a538735d119153b0f472e741a8bbe99f1ce70d3b16ce1b8ba90eb4b8