Blame SPECS/docker-registry.spec

da6803
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
da6803
da6803
%global commit 097381d336017ba772dffd439e316120b639ffbd
da6803
%global shortcommit %(c=%{commit}; echo ${c:0:7})
da6803
61bb89
Summary:    Registry server for Docker
61bb89
Name:       docker-registry
61bb89
Version:    0.6.8
61bb89
Release:    13%{?dist}
61bb89
License:    ASL 2.0
61bb89
URL:        https://github.com/dotcloud/docker-registry
61bb89
Source:     https://github.com/lsm5/docker-registry/archive/%{commit}/docker-registry-%{shortcommit}.tar.gz
61bb89
Source1:    %{name}.service
61bb89
Source2:    %{name}.sysconfig
da6803
61bb89
BuildRequires:  python2-devel
61bb89
BuildRequires:  pkgconfig(systemd)
da6803
da6803
Requires(post):     systemd
da6803
Requires(preun):    systemd
da6803
Requires(postun):   systemd
61bb89
61bb89
Requires:   m2crypto
61bb89
Requires:   PyYAML
61bb89
Requires:   python-requests
61bb89
Requires:   python-gunicorn
61bb89
Requires:   python-gevent
61bb89
Requires:   python-blinker
61bb89
Requires:   python-backports >= 1.0-8
61bb89
Requires:   python-backports-lzma >= 0.0.2-8
61bb89
Requires:   python-jinja2
61bb89
Requires:   python-flask
da6803
da6803
%description
da6803
Registry server for Docker (hosting/delivering of repositories and images).
da6803
da6803
%prep
61bb89
%setup -qn docker-registry-%{commit}
da6803
da6803
# Remove the golang implementation
da6803
# It's not the main one (yet?)
da6803
rm -rf contrib/golang_impl
da6803
da6803
%install
da6803
install -d %{buildroot}%{_bindir}
da6803
install -d %{buildroot}%{_sysconfdir}/sysconfig
da6803
install -d %{buildroot}%{_sharedstatedir}/%{name}
da6803
install -d %{buildroot}%{python_sitelib}/%{name}
da6803
da6803
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
da6803
da6803
install -d %{buildroot}%{_unitdir}
da6803
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
da6803
da6803
# Make sure we set proper WorkingDir in the systemd service file
da6803
sed -i "s|#WORKDIR#|%{python_sitelib}/%{name}|" %{buildroot}%{_unitdir}/%{name}.service
da6803
61bb89
cp -pr docker_registry test %{buildroot}%{python_sitelib}/%{name}
da6803
#cp wsgi.py %{buildroot}%{python_sitelib}/%{name}
da6803
cp config/config_sample.yml %{buildroot}%{_sysconfdir}/%{name}.yml
da6803
da6803
echo "local:
da6803
    storage: local
da6803
    storage_path: %{_sharedstatedir}/%{name}" >> %{buildroot}%{_sysconfdir}/%{name}.yml
da6803
61bb89
#do not authenticate with docker hub by default
61bb89
sed -i 's/common:/common:\n    standalone: true/' %{buildroot}%{_sysconfdir}/%{name}.yml
61bb89
da6803
%post
da6803
%systemd_post %{name}.service
da6803
da6803
%preun
da6803
%systemd_preun %{name}.service
da6803
da6803
%postun
da6803
%systemd_postun_with_restart %{name}.service
da6803
da6803
%files
61bb89
%doc LICENSE README.md
da6803
%dir %{python_sitelib}/%{name}
61bb89
%dir %{_sharedstatedir}/%{name}
da6803
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
da6803
%config(noreplace) %{_sysconfdir}/%{name}.yml
da6803
%{python_sitelib}/%{name}/docker_registry/*.py
da6803
%{python_sitelib}/%{name}/docker_registry/*.pyc
da6803
%{python_sitelib}/%{name}/docker_registry/*.pyo
da6803
%{python_sitelib}/%{name}/docker_registry/lib/*.py
da6803
%{python_sitelib}/%{name}/docker_registry/lib/*.pyc
da6803
%{python_sitelib}/%{name}/docker_registry/lib/*.pyo
da6803
%{python_sitelib}/%{name}/docker_registry/lib/index/*.py
da6803
%{python_sitelib}/%{name}/docker_registry/lib/index/*.pyc
da6803
%{python_sitelib}/%{name}/docker_registry/lib/index/*.pyo
da6803
%{python_sitelib}/%{name}/docker_registry/storage/*.py
da6803
%{python_sitelib}/%{name}/docker_registry/storage/*.pyc
da6803
%{python_sitelib}/%{name}/docker_registry/storage/*.pyo
da6803
%{python_sitelib}/%{name}/test/*.py
da6803
%{python_sitelib}/%{name}/test/*.pyc
da6803
%{python_sitelib}/%{name}/test/*.pyo
da6803
%{python_sitelib}/%{name}/test/Dockerfile
da6803
%{python_sitelib}/%{name}/test/dockertest.sh
da6803
%{python_sitelib}/%{name}/test/utils/*.py
da6803
%{python_sitelib}/%{name}/test/utils/*.pyc
da6803
%{python_sitelib}/%{name}/test/utils/*.pyo
da6803
%{_unitdir}/%{name}.service
da6803
da6803
%changelog
61bb89
* Thu Jan 29 2015 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-13
61bb89
- use correct min NVR of python-backports
61bb89
- preserver timestamps of copied files
61bb89
61bb89
* Wed Dec 17 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-12
61bb89
- No longer noarch because python-backports isn't noarch anymore
61bb89
- remove unused redis python binding patch
61bb89
61bb89
* Wed Dec 17 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-11
61bb89
- Resolves: rhbz#1175305 - should require python-backports-lzma >= 0.0.2-8
61bb89
- use systemd and not systemd-units
61bb89
61bb89
* Fri Nov 21 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-10
61bb89
- Resolves: rhbz#1158538 - use python-backports instead of
61bb89
python-backports-lzma
61bb89
- remove systemd/sysvinit conditionals, only systemd used in RHEL7
61bb89
- BR: pkgconfig(systemd)
61bb89
61bb89
* Fri Oct 24 2014 Tomas Hrcka <thrcka@redhat.com> - 0.6.8-9
61bb89
- Set standalone:true in docker_registry.yml
61bb89
da6803
* Tue May 06 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-8
da6803
- import lzma if no backports.lzma
da6803
da6803
* Fri May 02 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-7
da6803
- do not complain if redis absent
da6803
da6803
* Wed Apr 30 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-6
da6803
- import json if simplejson fails
da6803
da6803
* Wed Apr 30 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-5
da6803
- Add python-flask to requires
da6803
da6803
* Tue Apr 29 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-4
da6803
- remove python-simplejson runtime requirement
da6803
da6803
* Tue Apr 29 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-3
da6803
- remove redis requirement from unitfile
da6803
da6803
* Wed Apr 23 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.6.8-2
da6803
- M2Crypto branch used: https://github.com/lsm5/docker-registry/tree/m2crypto
da6803
- Built for RHEL7
da6803
da6803
* Fri Apr 18 2014 Marek Goldmann <mgoldman@redhat.com> - 0.6.8-1
da6803
- Upstream release 0.6.8
da6803
da6803
* Mon Apr 07 2014 Marek Goldmann <mgoldman@redhat.com> - 0.6.6-2
da6803
- docker-registry settings in /etc/sysconfig/docker-registry not honored,
da6803
  RHBZ#1072523
da6803
da6803
* Thu Mar 20 2014 Marek Goldmann <mgoldman@redhat.com> - 0.6.6-1
da6803
- Upstream release 0.6.6
da6803
- docker-registry cannot import module jinja2, RHBZ#1077630
da6803
da6803
* Mon Feb 17 2014 Marek Goldmann <mgoldman@redhat.com> - 0.6.5-1
da6803
- Upstream release 0.6.5
da6803
da6803
* Tue Jan 07 2014 Marek Goldmann <mgoldman@redhat.com> - 0.6.3-1
da6803
- Upstream release 0.6.3
da6803
- Added python-backports-lzma and python-rsa to R
da6803
- Removed configuration file path patch, it's in upstream
da6803
da6803
* Fri Dec 06 2013 Marek Goldmann <mgoldman@redhat.com> - 0.6.0-4
da6803
- Docker-registry does not currently support moving the config file, RHBZ#1038874
da6803
da6803
* Mon Dec 02 2013 Marek Goldmann <mgoldman@redhat.com> - 0.6.0-3
da6803
- EPEL support
da6803
- Comments in the sysconfig/docker-registry file
da6803
da6803
* Wed Nov 27 2013 Marek Goldmann <mgoldman@redhat.com> - 0.6.0-2
da6803
- Added license and readme
da6803
da6803
* Wed Nov 20 2013 Marek Goldmann <mgoldman@redhat.com> - 0.6.0-1
da6803
- Initial packaging
da6803