diff --git a/.docker-registry.metadata b/.docker-registry.metadata index ff41afd..2d3b6b4 100644 --- a/.docker-registry.metadata +++ b/.docker-registry.metadata @@ -1 +1 @@ -ad9ce8889d4507ac89884d2abb4f392963c913a0 SOURCES/docker-registry-097381d.tar.gz +ae052f3ae738f8effa231a0a2e880b5ec0d0f1b4 SOURCES/0.9.1.tar.gz diff --git a/.gitignore b/.gitignore index 1ce0971..fa5a57b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/docker-registry-097381d.tar.gz +SOURCES/0.9.1.tar.gz diff --git a/SOURCES/0001-remove-python-redis-requirement.patch b/SOURCES/0001-remove-python-redis-requirement.patch new file mode 100644 index 0000000..9aafea7 --- /dev/null +++ b/SOURCES/0001-remove-python-redis-requirement.patch @@ -0,0 +1,97 @@ +From 4282d6fa380fcda2d3146505427738b8ff4ff5c6 Mon Sep 17 00:00:00 2001 +From: Lokesh Mandvekar +Date: Wed, 21 Jan 2015 13:33:45 -0500 +Subject: [PATCH] remove python-redis requirement + +Signed-off-by: Lokesh Mandvekar +--- + depends/docker-registry-core/docker_registry/core/lru.py | 5 ++++- + docker_registry/lib/cache.py | 5 ++++- + docker_registry/lib/rlock.py | 5 ++++- + scripts/bandwidth_parser.py | 5 ++++- + scripts/diff-worker.py | 5 ++++- + 5 files changed, 20 insertions(+), 5 deletions(-) + +diff --git a/depends/docker-registry-core/docker_registry/core/lru.py b/depends/docker-registry-core/docker_registry/core/lru.py +index 6c246a6..f76e772 100644 +--- a/depends/docker-registry-core/docker_registry/core/lru.py ++++ b/depends/docker-registry-core/docker_registry/core/lru.py +@@ -27,7 +27,10 @@ By default, doesn't run, until one calls init(). + import functools + import logging + +-import redis ++try: ++ import redis ++except: ++ pass + logger = logging.getLogger(__name__) + + redis_conn = None +diff --git a/docker_registry/lib/cache.py b/docker_registry/lib/cache.py +index 307fb69..291a140 100644 +--- a/docker_registry/lib/cache.py ++++ b/docker_registry/lib/cache.py +@@ -2,7 +2,10 @@ + + import logging + +-import redis ++try: ++ import redis ++except: ++ pass + + from docker_registry.core import lru + +diff --git a/docker_registry/lib/rlock.py b/docker_registry/lib/rlock.py +index 7e6c4ee..8caa0fd 100644 +--- a/docker_registry/lib/rlock.py ++++ b/docker_registry/lib/rlock.py +@@ -4,7 +4,10 @@ + + import time + +-import redis ++try: ++ import redis ++except: ++ pass + + + class LockTimeout(BaseException): +diff --git a/scripts/bandwidth_parser.py b/scripts/bandwidth_parser.py +index 6cf37f8..4f423be 100755 +--- a/scripts/bandwidth_parser.py ++++ b/scripts/bandwidth_parser.py +@@ -6,7 +6,10 @@ import logging + import re + import sys + +-import redis ++try: ++ import redis ++except: ++ pass + + logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s', + level=logging.INFO) +diff --git a/scripts/diff-worker.py b/scripts/diff-worker.py +index 65eeede..0bc3678 100755 +--- a/scripts/diff-worker.py ++++ b/scripts/diff-worker.py +@@ -5,7 +5,10 @@ import argparse # noqa + import logging + import os + +-import redis ++try: ++ import redis ++except: ++ pass + + from docker_registry.lib import layers + from docker_registry.lib import rlock +-- +1.8.3.1 + diff --git a/SPECS/docker-registry.spec b/SPECS/docker-registry.spec index e4763e0..8fbdce3 100644 --- a/SPECS/docker-registry.spec +++ b/SPECS/docker-registry.spec @@ -1,17 +1,15 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%global commit 097381d336017ba772dffd439e316120b639ffbd -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - Summary: Registry server for Docker Name: docker-registry -Version: 0.6.8 -Release: 13%{?dist} +Version: 0.9.1 +Release: 4%{?dist} License: ASL 2.0 -URL: https://github.com/dotcloud/docker-registry -Source: https://github.com/lsm5/docker-registry/archive/%{commit}/docker-registry-%{shortcommit}.tar.gz +URL: https://github.com/docker/%{name} +Source: https://github.com/docker/%{name}/archive/%{version}.tar.gz Source1: %{name}.service Source2: %{name}.sysconfig +Patch0: 0001-remove-python-redis-requirement.patch BuildRequires: python2-devel BuildRequires: pkgconfig(systemd) @@ -28,14 +26,14 @@ Requires: python-gevent Requires: python-blinker Requires: python-backports >= 1.0-8 Requires: python-backports-lzma >= 0.0.2-8 -Requires: python-jinja2 Requires: python-flask %description Registry server for Docker (hosting/delivering of repositories and images). %prep -%setup -qn docker-registry-%{commit} +%setup -qn docker-registry-%{version} +%patch0 -p1 # Remove the golang implementation # It's not the main one (yet?) @@ -44,8 +42,8 @@ rm -rf contrib/golang_impl %install install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_sysconfdir}/sysconfig -install -d %{buildroot}%{_sharedstatedir}/%{name} install -d %{buildroot}%{python_sitelib}/%{name} +install -d %{buildroot}%{python_sitelib}/docker_registry install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name} @@ -55,16 +53,13 @@ install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service # Make sure we set proper WorkingDir in the systemd service file sed -i "s|#WORKDIR#|%{python_sitelib}/%{name}|" %{buildroot}%{_unitdir}/%{name}.service -cp -pr docker_registry test %{buildroot}%{python_sitelib}/%{name} -#cp wsgi.py %{buildroot}%{python_sitelib}/%{name} +cp -pr docker_registry %{buildroot}%{python_sitelib}/%{name} +cp -pr depends/docker-registry-core/docker_registry %{buildroot}%{python_sitelib}/ cp config/config_sample.yml %{buildroot}%{_sysconfdir}/%{name}.yml -echo "local: - storage: local - storage_path: %{_sharedstatedir}/%{name}" >> %{buildroot}%{_sysconfdir}/%{name}.yml - -#do not authenticate with docker hub by default -sed -i 's/common:/common:\n standalone: true/' %{buildroot}%{_sysconfdir}/%{name}.yml +# set storage path to /var/lib/docker-registry +sed -i 's/tmp\/registry/var\/lib\/docker-registry/g' \ +%{buildroot}%{_sysconfdir}/%{name}.yml %post %systemd_post %{name}.service @@ -77,33 +72,19 @@ sed -i 's/common:/common:\n standalone: true/' %{buildroot}%{_sysconfdir}/%{n %files %doc LICENSE README.md -%dir %{python_sitelib}/%{name} -%dir %{_sharedstatedir}/%{name} +%{python_sitelib}/%{name} +%{python_sitelib}/docker_registry %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config(noreplace) %{_sysconfdir}/%{name}.yml -%{python_sitelib}/%{name}/docker_registry/*.py -%{python_sitelib}/%{name}/docker_registry/*.pyc -%{python_sitelib}/%{name}/docker_registry/*.pyo -%{python_sitelib}/%{name}/docker_registry/lib/*.py -%{python_sitelib}/%{name}/docker_registry/lib/*.pyc -%{python_sitelib}/%{name}/docker_registry/lib/*.pyo -%{python_sitelib}/%{name}/docker_registry/lib/index/*.py -%{python_sitelib}/%{name}/docker_registry/lib/index/*.pyc -%{python_sitelib}/%{name}/docker_registry/lib/index/*.pyo -%{python_sitelib}/%{name}/docker_registry/storage/*.py -%{python_sitelib}/%{name}/docker_registry/storage/*.pyc -%{python_sitelib}/%{name}/docker_registry/storage/*.pyo -%{python_sitelib}/%{name}/test/*.py -%{python_sitelib}/%{name}/test/*.pyc -%{python_sitelib}/%{name}/test/*.pyo -%{python_sitelib}/%{name}/test/Dockerfile -%{python_sitelib}/%{name}/test/dockertest.sh -%{python_sitelib}/%{name}/test/utils/*.py -%{python_sitelib}/%{name}/test/utils/*.pyc -%{python_sitelib}/%{name}/test/utils/*.pyo %{_unitdir}/%{name}.service %changelog +* Mon Mar 09 2015 Lokesh Mandvekar - 0.9.1-4 +- Resolves: rhbz#1171295 - update to 0.9.1 +- Resolves: rhbz#1187101 - set storage path to /var/lib/docker-registry +to ensure the same storage path is looked up after update +- Don't install or own /var/lib/docker-registry + * Thu Jan 29 2015 Lokesh Mandvekar - 0.6.8-13 - use correct min NVR of python-backports - preserver timestamps of copied files