From 43fe0e96250ab42fd55311d1fffa8a7b5590eb3f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 09:35:52 +0000 Subject: import docker-distribution-2.6.2-1.git48294d9.el7 --- diff --git a/.docker-distribution.metadata b/.docker-distribution.metadata new file mode 100644 index 0000000..4a21030 --- /dev/null +++ b/.docker-distribution.metadata @@ -0,0 +1 @@ +3e71744d1567c26475430634b999c6dfb5d52a3d SOURCES/48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d1a5151 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/config.yml b/SOURCES/config.yml new file mode 100644 index 0000000..cb91e63 --- /dev/null +++ b/SOURCES/config.yml @@ -0,0 +1,11 @@ +version: 0.1 +log: + fields: + service: registry +storage: + cache: + layerinfo: inmemory + filesystem: + rootdirectory: /var/lib/registry +http: + addr: :5000 diff --git a/SOURCES/docker-distribution.service b/SOURCES/docker-distribution.service new file mode 100644 index 0000000..c020c78 --- /dev/null +++ b/SOURCES/docker-distribution.service @@ -0,0 +1,11 @@ +[Unit] +Description=v2 Registry server for Docker + +[Service] +Type=simple +ExecStart=/usr/bin/registry serve /etc/docker-distribution/registry/config.yml +Restart=on-failure + +[Install] +WantedBy=multi-user.target +After=network.target diff --git a/SPECS/docker-distribution.spec b/SPECS/docker-distribution.spec new file mode 100644 index 0000000..55c98c8 --- /dev/null +++ b/SPECS/docker-distribution.spec @@ -0,0 +1,395 @@ +%if 0%{?fedora} || 0%{?rhel} == 6 +%global with_devel 1 +%global with_bundled 0 +%global with_debug 1 +%global with_check 1 +%global with_unit_test 1 +%else +%global with_devel 0 +%global with_bundled 1 +%global with_debug 0 +%global with_check 0 +%global with_unit_test 0 +%endif + +%if 0%{?with_debug} +%global _dwz_low_mem_die_limit 0 +%else +%global debug_package %{nil} +%endif + +%if ! 0%{?gobuild:1} +%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; +%endif + +%if ! 0%{?gotest:1} +%define gotest() go test -ldflags "${LDFLAGS:-}" %{?**} +%endif + +%global provider github +%global provider_tld com +%global project docker +%global repo distribution +# https://github.com/docker/distribution +%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} +%global import_path %{provider_prefix} +%global commit0 48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) + +Name: %{project}-%{repo} +Version: 2.6.2 +Release: 1.git%{shortcommit0}%{?dist} +Summary: Docker toolset to pack, ship, store, and deliver content +License: ASL 2.0 +URL: https://%{provider_prefix} +Source0: https://%{provider_prefix}/archive/%{commit0}.tar.gz +Source1: %{name}.service +Source2: config.yml +BuildRequires: git +BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} >= 1.6.2 +BuildRequires: systemd +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Obsoletes: docker-registry < 0.9.1-8 +Provides: docker-registry = %{version}-%{release} + + +# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. +BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} + +%if ! 0%{?with_bundled} +BuildRequires: golang(github.com/AdRoll/goamz/aws) +BuildRequires: golang(github.com/AdRoll/goamz/cloudfront) +BuildRequires: golang(github.com/AdRoll/goamz/s3) +BuildRequires: golang(github.com/Azure/azure-sdk-for-go/storage) +BuildRequires: golang(github.com/Sirupsen/logrus) +BuildRequires: golang(github.com/Sirupsen/logrus/formatters/logstash) +BuildRequires: golang(github.com/bugsnag/bugsnag-go) +BuildRequires: golang(github.com/denverdino/aliyungo/oss) +BuildRequires: golang(github.com/docker/docker/pkg/tarsum) +BuildRequires: golang(github.com/docker/libtrust) +BuildRequires: golang(github.com/garyburd/redigo/redis) +BuildRequires: golang(github.com/gorilla/handlers) +BuildRequires: golang(github.com/gorilla/mux) +BuildRequires: golang(github.com/mitchellh/mapstructure) +BuildRequires: golang(github.com/ncw/swift) +BuildRequires: golang(github.com/ncw/swift/swifttest) +BuildRequires: golang(github.com/noahdesu/go-ceph/rados) +BuildRequires: golang(github.com/stevvooe/resumable) +BuildRequires: golang(github.com/stevvooe/resumable/sha256) +BuildRequires: golang(github.com/stevvooe/resumable/sha512) +BuildRequires: golang(github.com/yvasiyarov/gorelic) +BuildRequires: golang(golang.org/x/crypto/bcrypt) +BuildRequires: golang(golang.org/x/net/context) +BuildRequires: golang(gopkg.in/check.v1) +BuildRequires: golang(gopkg.in/yaml.v2) +%endif + +%description +%{summary} + +%if 0%{?with_devel} +%package devel +Summary: %{summary} +BuildArch: noarch + +%if 0%{?with_check} +BuildRequires: golang(github.com/AdRoll/goamz/aws) +BuildRequires: golang(github.com/AdRoll/goamz/cloudfront) +BuildRequires: golang(github.com/AdRoll/goamz/s3) +BuildRequires: golang(github.com/Azure/azure-sdk-for-go/storage) +BuildRequires: golang(github.com/Sirupsen/logrus) +BuildRequires: golang(github.com/denverdino/aliyungo/oss) +BuildRequires: golang(github.com/docker/docker/pkg/tarsum) +BuildRequires: golang(github.com/docker/libtrust) +BuildRequires: golang(github.com/garyburd/redigo/redis) +BuildRequires: golang(github.com/gorilla/handlers) +BuildRequires: golang(github.com/gorilla/mux) +BuildRequires: golang(github.com/mitchellh/mapstructure) +BuildRequires: golang(github.com/ncw/swift) +BuildRequires: golang(github.com/ncw/swift/swifttest) +BuildRequires: golang(github.com/noahdesu/go-ceph/rados) +BuildRequires: golang(github.com/stevvooe/resumable) +BuildRequires: golang(github.com/stevvooe/resumable/sha256) +BuildRequires: golang(github.com/stevvooe/resumable/sha512) +BuildRequires: golang(golang.org/x/crypto/bcrypt) +BuildRequires: golang(golang.org/x/net/context) +BuildRequires: golang(gopkg.in/check.v1) +BuildRequires: golang(gopkg.in/yaml.v2) +%endif + +Requires: golang(github.com/AdRoll/goamz/aws) +Requires: golang(github.com/AdRoll/goamz/cloudfront) +Requires: golang(github.com/AdRoll/goamz/s3) +Requires: golang(github.com/Azure/azure-sdk-for-go/storage) +Requires: golang(github.com/Sirupsen/logrus) +Requires: golang(github.com/denverdino/aliyungo/oss) +Requires: golang(github.com/docker/docker/pkg/tarsum) +Requires: golang(github.com/docker/libtrust) +Requires: golang(github.com/garyburd/redigo/redis) +Requires: golang(github.com/gorilla/handlers) +Requires: golang(github.com/gorilla/mux) +Requires: golang(github.com/mitchellh/mapstructure) +Requires: golang(github.com/ncw/swift) +Requires: golang(github.com/ncw/swift/swifttest) +Requires: golang(github.com/noahdesu/go-ceph/rados) +Requires: golang(github.com/stevvooe/resumable) +Requires: golang(github.com/stevvooe/resumable/sha256) +Requires: golang(github.com/stevvooe/resumable/sha512) +Requires: golang(golang.org/x/crypto/bcrypt) +Requires: golang(golang.org/x/net/context) +Requires: golang(gopkg.in/check.v1) +Requires: golang(gopkg.in/yaml.v2) + +Provides: golang-%{provider}-%{project}-%{repo}-devel = %{version}-%{release} +Provides: golang(%{import_path}) = %{version}-%{release} +Provides: golang(%{import_path}/configuration) = %{version}-%{release} +Provides: golang(%{import_path}/context) = %{version}-%{release} +Provides: golang(%{import_path}/digest) = %{version}-%{release} +Provides: golang(%{import_path}/health) = %{version}-%{release} +Provides: golang(%{import_path}/health/api) = %{version}-%{release} +Provides: golang(%{import_path}/health/checks) = %{version}-%{release} +Provides: golang(%{import_path}/manifest) = %{version}-%{release} +Provides: golang(%{import_path}/notifications) = %{version}-%{release} +Provides: golang(%{import_path}/registry) = %{version}-%{release} +Provides: golang(%{import_path}/registry/api/errcode) = %{version}-%{release} +Provides: golang(%{import_path}/registry/api/v2) = %{version}-%{release} +Provides: golang(%{import_path}/registry/auth) = %{version}-%{release} +Provides: golang(%{import_path}/registry/auth/htpasswd) = %{version}-%{release} +Provides: golang(%{import_path}/registry/auth/silly) = %{version}-%{release} +Provides: golang(%{import_path}/registry/auth/token) = %{version}-%{release} +Provides: golang(%{import_path}/registry/client) = %{version}-%{release} +Provides: golang(%{import_path}/registry/client/auth) = %{version}-%{release} +Provides: golang(%{import_path}/registry/client/transport) = %{version}-%{release} +Provides: golang(%{import_path}/registry/handlers) = %{version}-%{release} +Provides: golang(%{import_path}/registry/listener) = %{version}-%{release} +Provides: golang(%{import_path}/registry/middleware/registry) = %{version}-%{release} +Provides: golang(%{import_path}/registry/middleware/repository) = %{version}-%{release} +Provides: golang(%{import_path}/registry/proxy) = %{version}-%{release} +Provides: golang(%{import_path}/registry/proxy/scheduler) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/cache) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/cache/memory) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/cache/redis) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/azure) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/base) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/factory) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/filesystem) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/inmemory) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/middleware) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/middleware/cloudfront) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/oss) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/rados) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/s3) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/swift) = %{version}-%{release} +Provides: golang(%{import_path}/registry/storage/driver/testsuites) = %{version}-%{release} +Provides: golang(%{import_path}/testutil) = %{version}-%{release} +Provides: golang(%{import_path}/uuid) = %{version}-%{release} +Provides: golang(%{import_path}/version) = %{version}-%{release} + +%description devel +%{summary} + +This package contains library source intended for +building other packages which use import path with +%{import_path} prefix. +%endif + +%if 0%{?with_unit_test} && 0%{?with_devel} +%package unit-test +Summary: Unit tests for %{name} package +# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. +BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} >= 1.6.2 + +%if 0%{?with_check} +#Here comes all BuildRequires: PACKAGE the unit tests +#in %%check section need for running +%endif + +# test subpackage tests code from devel subpackage +Requires: %{name}-devel = %{version}-%{release} + +%description unit-test +%{summary} + +This package contains unit tests for project +providing packages with %{import_path} prefix. +%endif + +%prep +%autosetup -Sgit -n %{repo}-%{commit0} + +pushd vendor +sed -i 's/elliptic.P224(), //' golang.org/x/crypto/ocsp/ocsp.go +mkdir src +mv g* src/. +popd + +%build +mkdir _build + +pushd _build +mkdir -p src/github.com/%{project} +ln -s $(dirs +1 -l) src/%{import_path} +popd + +%if ! 0%{?with_bundled} +export GOPATH=$(pwd)/_build:%{gopath} +%else +export GOPATH=$(pwd)/_build:$(pwd)/vendor:%{gopath} +%endif + +pushd _build/src/%{import_path}/cmd/registry +go build . +popd + +%install +install -d -p %{buildroot}%{_bindir} +install -p -m 0755 cmd/registry/registry %{buildroot}%{_bindir} + +# install systemd/init scripts +install -d %{buildroot}%{_unitdir} +install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir} + +# install config file +install -dp %{buildroot}%{_sysconfdir}/%{name}/registry +install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/registry + +# install root dir +install -d %{buildroot}%{_sharedstatedir}/registry + +# source code for building projects +%if 0%{?with_devel} +install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ +# find all *.go but no *_test.go files and generate devel.file-list +for file in $(find . -iname "*.go" \! -iname "*_test.go") ; do + echo "%dir %{gopath}/src/%{import_path}/$(dirname $file)" >> devel.file-list + install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file + echo "%{gopath}/src/%{import_path}/$file" >> devel.file-list +done +%endif + +# testing files for this project +%if 0%{?with_unit_test} && 0%{?with_devel} +install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ +# find all *_test.go files and generate unit-test.file-list +for file in $(find . -iname "*_test.go"); do + echo "%dir %{gopath}/src/%{import_path}/$(dirname $file)" >> devel.file-list + install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file + echo "%{gopath}/src/%{import_path}/$file" >> unit-test.file-list +done +%endif + +%if 0%{?with_devel} +sort -u -o devel.file-list devel.file-list +%endif + +%check +%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} +%if ! 0%{?with_bundled} +export GOPATH=%{buildroot}/%{gopath}:%{gopath} +%else +export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} +%endif +make test +%endif + +%pre + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + +#define license tag if not already defined +%{!?_licensedir:%global license %doc} + +%files +%if 0%{?fedora} >= 23 +%license LICENSE +%else +%doc LICENSE +%endif +%doc AUTHORS CONTRIBUTING.md MAINTAINERS README.md +%{_bindir}/registry +%{_unitdir}/%{name}.service +%dir %{_sharedstatedir}/registry +%config(noreplace) %{_sysconfdir}/%{name}/registry/config.yml + +%if 0%{?with_devel} +%files devel -f devel.file-list +%license LICENSE +%doc CONTRIBUTING.md README.md ROADMAP.md AUTHORS +%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} +%dir %{gopath}/src/%{import_path} +%endif + +%if 0%{?with_unit_test} && 0%{?with_devel} +%files unit-test -f unit-test.file-list +%license LICENSE +%doc CONTRIBUTING.md README.md ROADMAP.md AUTHORS +%endif + +%changelog +* Tue Aug 08 2017 Lokesh Mandvekar - 2.6.2-1.git48294d9 +- Resolves: #1474893 CVE-2017-11468, #1478282 +- rebase to v2.6.2 + +* Fri May 05 2017 Lokesh Mandvekar - 2.6.1-1.1.gita25b9ef +- rebase to v2.6.1 + +* Fri Mar 31 2017 Lokesh Mandvekar - 2.6.0-1.1 +- rebuild for all available arches on 7.4 + +* Mon Jan 23 2017 Frantisek Kluknavsky - 2.6.0-1 +- rebase to v2.6.0 + +* Mon Jan 09 2017 Frantisek Kluknavsky - 2.5.1-2 +- fix wrong obsoleting of docker-registry + +* Mon Oct 24 2016 Frantisek Kluknavsky - 2.5.1-1 +- rebase to v2.5.1 + +* Wed Sep 07 2016 Lokesh Mandvekar - 2.5.0-1 +- Resolves: #1367157 - rebase to v2.5.0 +- golang 1.6.2 doesn't support elliptic.P224() + +* Sat Jun 25 2016 Lokesh Mandvekar - 2.4.1-2 +- built with golang >= 1.6.2 + +* Thu Apr 28 2016 Lokesh Mandvekar - 2.4.1-1 +- Resolves: #1338871 - rebase to v2.4.1 +- Resolves: #1338824 - s3 driver: Sorting completed parts by part number for +a better accordance with S3 spec (upstream PR# 1670) + +* Thu Apr 28 2016 Lokesh Mandvekar - 2.4.0-2 +- Resolves: #1330393 - update unitfile ExecStart +- From: Luwen Su + +* Tue Apr 19 2016 Lokesh Mandvekar - 2.4.0-1 +- Resolves: rhbz#1328475 - rebase to v2.4.0 +- Resolves: rhbz#1328526 - obsoletes docker-registry <= 0.9.1-7 + +* Tue Mar 08 2016 Lokesh Mandvekar - 2.3.1-1 +- Resolves: rhbz#1315881 - rebase to v2.3.1 + +* Tue Jan 19 2016 Lokesh Mandvekar - 2.2.1-1 +- Resolves: rhbz#1299915 - rebase to v2.2.1 + +* Wed Oct 07 2015 Lokesh Mandvekar - 2.1.1-3 +- do not install sysconfig file +- Install root dir /var/lib/registry + +* Tue Sep 22 2015 Lokesh Mandvekar - 2.1.1-2 +- systemd is a dep + +* Tue Sep 22 2015 Lokesh Mandvekar - 2.1.1-1 +- Resolves: rhbz#1261613 (rhel 7.2) - initial package