Lokesh Mandvekar a8ae05
%global debug_package %{nil}
Lokesh Mandvekar 449430
%if 0%{?fedora} <= 22 || (0%{?rhel} != 0 && 0%{?rhel} <= 7)
Antonio Murdaca c2ffbf
%bcond_with python3
Colin Walters 0193ff
%global pypkg python
Colin Walters 0193ff
%global pysitelib %{python_sitelib}
Lokesh Mandvekar e2b8f1
%global __python %{__python}
Colin Walters 0193ff
%else
Antonio Murdaca c2ffbf
%bcond_without python3
Colin Walters 0193ff
%global pypkg python3
Colin Walters 0193ff
%global pysitelib %{python3_sitelib}
Miro Hrončok 99344b
%global __python %{__python3}
Colin Walters 0193ff
%endif
Lokesh Mandvekar a8ae05
Antonio Murdaca c2ffbf
%global commit ce09e40922c3f35877d381612280195e445d41c7
Lokesh Mandvekar a8ae05
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Lokesh Mandvekar a8ae05
Lokesh Mandvekar 449430
Name: atomic
Antonio Murdaca c2ffbf
Version: 1.10.5
Antonio Murdaca c2ffbf
Release: 2.git%{shortcommit}%{?dist}
Lokesh Mandvekar 449430
Summary: Tool for managing ProjectAtomic systems and containers
Lokesh Mandvekar 449430
License: LGPLv2+
Lokesh Mandvekar 449430
URL: https://github.com/projectatomic/atomic
Antonio Murdaca c2ffbf
%if 0%{?fedora}
Lokesh Mandvekar cb5d91
ExclusiveArch: %{go_arches}
Antonio Murdaca c2ffbf
%else
Antonio Murdaca c2ffbf
ExclusiveArch: x86_64
Antonio Murdaca c2ffbf
%endif
Lokesh Mandvekar 449430
Source0: https://github.com/projectatomic/%{name}/archive/%{commit}.tar.gz
Miro Hrončok 99344b
Lokesh Mandvekar 449430
BuildRequires: %{pypkg}-devel
Lokesh Mandvekar 8079dc
BuildRequires: %{pypkg}-requests >= 2.4.3
Lokesh Mandvekar 449430
BuildRequires: %{pypkg}-setuptools
Lokesh Mandvekar 449430
BuildRequires: %{pypkg}-tools
Lokesh Mandvekar 449430
BuildRequires: policycoreutils-%{pypkg}
Lokesh Mandvekar 449430
BuildRequires: go-md2man
Antonio Murdaca c2ffbf
%if 0%{?fedora}
Lokesh Mandvekar cb5d91
BuildRequires: go-srpm-macros
Antonio Murdaca c2ffbf
BuildRequires: compiler(go-compiler)
Antonio Murdaca c2ffbf
%else
Antonio Murdaca c2ffbf
BuildRequires: golang >= 1.4.2
Antonio Murdaca c2ffbf
%endif
Lokesh Mandvekar f46162
BuildRequires: %{pypkg}-dbus
Lokesh Mandvekar 449430
BuildRequires: %{pypkg}-docker-py
Colin Walters fcf70d
BuildRequires: rpm-%{pypkg}
Antonio Murdaca c2ffbf
%if (0%{?rhel} != 0 && 0%{?rhel} <= 7)
Antonio Murdaca c2ffbf
BuildRequires: pygobject3-base
Antonio Murdaca c2ffbf
%else
Antonio Murdaca c2ffbf
BuildRequires: %{pypkg}-gobject-base
Antonio Murdaca c2ffbf
%endif
Antonio Murdaca c2ffbf
BuildRequires: ostree-devel
Antonio Murdaca c2ffbf
%if %{with python3}
Antonio Murdaca c2ffbf
BuildRequires: python3-PyYAML
Antonio Murdaca c2ffbf
%else
Antonio Murdaca c2ffbf
BuildRequires: PyYAML
Antonio Murdaca c2ffbf
%endif
Miro Hrončok 99344b
Lokesh Mandvekar 449430
Requires: dbus
Antonio Murdaca c2ffbf
Requires: skopeo >= 0.1.13
Antonio Murdaca c2ffbf
Requires: runc
Lokesh Mandvekar 449430
Requires: docker
Lokesh Mandvekar 449430
Requires: polkit
Lokesh Mandvekar 449430
Requires: setup
Colin Walters fcf70d
Requires: rpm-%{pypkg}
Colin Walters 1e3d3e
# https://github.com/projectatomic/atomic/pull/180
Colin Walters 1e3d3e
Requires: %{pypkg}-setuptools
Lokesh Mandvekar 90ef72
Requires: %{pypkg}-dbus
Lokesh Mandvekar 8079dc
Requires: %{pypkg}-requests >= 2.4.3
Antonio Murdaca c2ffbf
Requires: %{pypkg}-docker-py >= 1.7.2
Lokesh Mandvekar 449430
Requires: %{pypkg}-websocket-client >= 0.11.0
Lokesh Mandvekar 449430
Requires: %{pypkg}-six >= 1.3.0
Antonio Murdaca c2ffbf
%if (0%{?rhel} != 0 && 0%{?rhel} <= 7)
Antonio Murdaca c2ffbf
Requires: pygobject3-base
Antonio Murdaca c2ffbf
%else
Antonio Murdaca c2ffbf
Requires: %{pypkg}-gobject-base
Antonio Murdaca c2ffbf
Requires: ostree
Antonio Murdaca c2ffbf
%endif
Antonio Murdaca c2ffbf
%if %{with python3}
Antonio Murdaca c2ffbf
Requires: python3-PyYAML
Antonio Murdaca c2ffbf
%else
Antonio Murdaca c2ffbf
Requires: PyYAML
Antonio Murdaca c2ffbf
%endif
Miro Hrončok 99344b
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
%description
Lokesh Mandvekar a8ae05
The goal of Atomic is to provide a high level, coherent entrypoint to the
Lokesh Mandvekar a8ae05
system, and fill in gaps.
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
For Docker, atomic can make it easier to interact with special kinds of
Lokesh Mandvekar a8ae05
containers, such as super-privileged debugging tools and the like.
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
The atomic host subcommand wraps rpm-ostree, currently just providing a
Lokesh Mandvekar a8ae05
friendlier name, but in the future Atomic may provide more unified
Lokesh Mandvekar a8ae05
management.
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
%prep
Lokesh Mandvekar a8ae05
%setup -qn %{name}-%{commit}
Lokesh Mandvekar 560b42
if [ %{pypkg} == 'python3' ]; then
Lokesh Mandvekar 560b42
sed -i 's/input = raw_input/pass/' Atomic/util.py
Lokesh Mandvekar 560b42
fi
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
%build
Antonio Murdaca c2ffbf
make PYTHON=%{__python} PYLINT=true all
Robert Kuska 91f233
make PYTHON=%{__python} docs
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
%install
Robert Kuska 91f233
make PYTHON=%{__python}  install-only DESTDIR=%{buildroot}
Lokesh Mandvekar a8ae05
Colin Walters ec5467
# Better support for doing continuous delivery by supporting optional
Colin Walters ec5467
# components.  The canonical copy of this is in `rpm-ostree.spec`.
Colin Walters ec5467
cat > autofiles.py <
Lokesh Mandvekar 4276ed
#!%{pypkg}
Colin Walters ec5467
import os,sys,glob
Colin Walters ec5467
os.chdir(os.environ['RPM_BUILD_ROOT'])
Colin Walters ec5467
for line in sys.argv[1:]:
Colin Walters ec5467
    if line == '':
Colin Walters ec5467
        break
Colin Walters ec5467
    assert line[0] == '/'
Colin Walters ec5467
    files = glob.glob(line[1:])
Colin Walters ec5467
    if len(files) > 0:
Colin Walters ec5467
        sys.stderr.write('{0} matched {1} files\n'.format(line, len(files)))
Colin Walters ec5467
        sys.stdout.write(line + '\n')
Colin Walters ec5467
    else:
Colin Walters ec5467
        sys.stderr.write('{0} did not match any files\n'.format(line))
Colin Walters ec5467
EOF
Lokesh Mandvekar 4276ed
%{pypkg} autofiles.py > files \
Colin Walters ec5467
  '%{pysitelib}/Atomic' \
Colin Walters ec5467
  '%{pysitelib}/%{name}*.egg-info' \
Antonio Murdaca c2ffbf
  '%{_sysconfdir}/%{name}.conf' \
Antonio Murdaca c2ffbf
  '%{_sysconfdir}/%{name}.d' \
Colin Walters ec5467
  '%{_sysconfdir}/profile.d/%{name}.sh' \
Colin Walters ec5467
  '%{_bindir}/%{name}' \
Colin Walters ec5467
  '%{_datadir}/%{name}' \
Colin Walters ec5467
  '%{_libexecdir}/%{name}/' \
Colin Walters ec5467
  '%{_datadir}/bash-completion/completions/%{name}' \
Colin Walters ec5467
  '%{_datadir}/dbus-1/system-services/org.%{name}.service' \
Colin Walters ec5467
  '%{_datadir}/polkit-1/actions/org.%{name}.policy' \
Colin Walters ec5467
  '%{_mandir}/man1/%{name}*'
Colin Walters ec5467
Lokesh Mandvekar a8ae05
%check
Colin Walters 0193ff
[ ! -w /run/docker.sock ] || make PYTHON=%{__python} test
Lokesh Mandvekar a8ae05
Colin Walters ec5467
%files -f files
Lokesh Mandvekar a8ae05
%doc COPYING README.md
Lokesh Mandvekar a8ae05
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
Miro Hrončok 99344b
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.%{name}.conf
Miro Hrončok 99344b
Lokesh Mandvekar a8ae05
%changelog
Antonio Murdaca c2ffbf
* Tue Jun 28 2016 Antonio Murdaca <runcom@fedoraproject.org> - 1.10.5-2.gitce09e40
Antonio Murdaca c2ffbf
- build atomic 1.10.5
Antonio Murdaca c2ffbf
Colin Walters fcf70d
* Thu Jan 07 2016 Colin Walters <walters@redhat.com> - 1.8-3.gitcc5997a
Colin Walters fcf70d
- Depend on python2/3 RPM bindings as appropriate
Colin Walters fcf70d
Lokesh Mandvekar 26ec45
* Mon Jan 04 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.8-2.gitcc5997a
Lokesh Mandvekar 26ec45
- built atomic commit#cc5997a
Lokesh Mandvekar 26ec45
Lokesh Mandvekar 8efb02
* Mon Nov 30 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.7-3.git3be76b5
Lokesh Mandvekar 8efb02
- built atomic commit#3be76b5
Lokesh Mandvekar 8efb02
Lokesh Mandvekar 4fd5a1
* Mon Nov 23 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.7-2.gitd378de0
Lokesh Mandvekar 4fd5a1
- built atomic commit#d378de0
Lokesh Mandvekar 4fd5a1
Peter Robinson 96ce9c
* Thu Nov 12 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-6.git09ac479
Peter Robinson 96ce9c
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
Peter Robinson 96ce9c
Lokesh Mandvekar 90ef72
* Wed Nov 11 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-5.git09ac479
Lokesh Mandvekar 90ef72
- Resolves: rhbz#1278499 - python(2/3)-dbus based on fedora version
Lokesh Mandvekar 90ef72
- python(2/3)-dbus at build and runtime
Lokesh Mandvekar 90ef72
- built atomic commit#09ac479
Lokesh Mandvekar 90ef72
Robert Kuska 7120e8
* Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 1.6-4.git8a66e29
Robert Kuska 7120e8
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
Robert Kuska 7120e8
Lokesh Mandvekar 3f6181
* Tue Nov 10 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-3.git8a66e29
Lokesh Mandvekar 3f6181
- built atomic commit#8a66e29
Lokesh Mandvekar 3f6181
Peter Robinson bc52b4
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-2.git9d724aa
Peter Robinson bc52b4
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
Peter Robinson bc52b4
Lokesh Mandvekar 8079dc
* Mon Sep 14 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.4-1.git9d724aa
Lokesh Mandvekar 8079dc
- built master commit#9d724aa
Lokesh Mandvekar 8079dc
- scan subcommand added
Lokesh Mandvekar 8079dc
- br: python-requests >= 2.4.3
Lokesh Mandvekar 8079dc
Lokesh Mandvekar 449430
* Mon Aug 03 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1-1.git5f631c8
Lokesh Mandvekar 449430
- bump to 1.1
Lokesh Mandvekar 449430
- buildrequires policycoreutils-python(3)
Lokesh Mandvekar 449430
Lokesh Mandvekar 519fc9
* Fri Jul 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.0-1.git52d695c
Lokesh Mandvekar 519fc9
- version 1.0 as per setup.py
Lokesh Mandvekar 519fc9
- use latest upstream master commit
Lokesh Mandvekar 519fc9
- run test only if docker.sock writable
Lokesh Mandvekar 519fc9
Miro Hrončok 99344b
* Tue Jul 14 2015 Miro Hrončok <mhroncok@redhat.com> - 0-0.12.gitfea1b99
Miro Hrončok 99344b
- update to latest upstream master
Miro Hrončok 99344b
- add new %%files and require dbus, polkit and setup to have the directories
Miro Hrončok 99344b
- switch to Python 3
Miro Hrončok 850fc3
- disable build for arm (missing docker)
Miro Hrončok 99344b
- Resolves: rhbz#1241947
Miro Hrončok 99344b
Dennis Gilmore 6652d4
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.11.gite5734c4
Dennis Gilmore 6652d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
Dennis Gilmore 6652d4
Lokesh Mandvekar e979be
* Wed Apr 15 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.10.gite5734c4
Lokesh Mandvekar e979be
- update to latest upstream master
Lokesh Mandvekar e979be
Colin Walters 570215
* Tue Mar 03 2015 Colin Walters <walters@redhat.com> - 0-0.9.gita7ff4cb
Colin Walters 570215
- Match ExclusiveArch with docker (there is no docker on i686)
Colin Walters 570215
Colin Walters ad8421
* Mon Mar 02 2015 Colin Walters <walters@redhat.com> - 0-0.8.gita7ff4cb
Colin Walters ad8421
- Drop ExclusiveArch, we are just a wrapper for Docker, which in any
Colin Walters ad8421
  case builds on other architectures now.
Colin Walters ad8421
Lokesh Mandvekar 4db7d4
* Tue Feb 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.7.gita7ff4cb
Lokesh Mandvekar 4db7d4
- remove pylint for rhel/centos
Lokesh Mandvekar 4db7d4
Lokesh Mandvekar 3ea434
* Tue Feb 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.6.gita7ff4cb
Lokesh Mandvekar 3ea434
- runtime requirement: python-docker-py
Lokesh Mandvekar 3ea434
Lokesh Mandvekar a8ae05
* Tue Feb 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.5.gita7ff4cb
Lokesh Mandvekar a8ae05
- build commit#a7ff4cb
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
* Fri Feb 20 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.4.gitf7f6fa8
Lokesh Mandvekar a8ae05
- Resolves: rhbz#1194058 - approved version, ready for upload
Lokesh Mandvekar a8ae05
- change license to LGPLv2+
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
* Thu Feb 19 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.3.gite4081c9
Lokesh Mandvekar a8ae05
- manpage installation rules upstreamed
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
* Wed Feb 18 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.2.git6b82cb7
Lokesh Mandvekar a8ae05
- install docs
Lokesh Mandvekar a8ae05
Lokesh Mandvekar a8ae05
* Wed Feb 18 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.1.git6b82cb7
Lokesh Mandvekar a8ae05
- Initial package