%global debug_package %{nil}
%if 0%{?fedora} <= 22 || (0%{?rhel} != 0 && 0%{?rhel} <= 7)
%bcond_with python3
%global pypkg python
%global pysitelib %{python_sitelib}
%global __python %{__python}
%else
%bcond_without python3
%global pypkg python3
%global pysitelib %{python3_sitelib}
%global __python %{__python3}
%endif
%global commit b39a7831b50391a04afc3512a8e94a7f6df26e79
%global shortcommit %(c=%{commit}; echo ${c:0:7})
# Registries package
%global git_atomic_registries https://github.com/projectatomic/registries
%global commit_atomic_registries fb8f4fb1b4da513954b1956185d29c62e93fac6a
%global atomic_registries_shortcommit %(c=%{commit_atomic_registries}; echo ${c:0:7})
Name: atomic
Version: 1.19.1
Release: 3%{?dist}
Summary: Tool for managing ProjectAtomic systems and containers
License: LGPLv2+
URL: https://github.com/projectatomic/atomic
%if 0%{?fedora}
ExclusiveArch: i386 i486 i586 i686 pentium3 pentium4 athlon geode x86_64 armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv6hl armv7l armv7hl armv7hnl aarch64 ppc64le s390x mips mipsel mipsr6 mipsr6el mips64 mips64el mips64r6 mips64r6el
%else
ExclusiveArch: x86_64 ppc64le
%endif
Source0: https://github.com/projectatomic/%{name}/archive/%{commit}.tar.gz
Source1: https://github.com/projectatomic/registries/archive/%{commit_atomic_registries}.tar.gz
BuildRequires: %{pypkg}-devel
BuildRequires: %{pypkg}-requests >= 2.4.3
BuildRequires: %{pypkg}-setuptools
BuildRequires: %{pypkg}-tools
BuildRequires: policycoreutils-%{pypkg}
BuildRequires: go-md2man
%if 0%{?fedora}
BuildRequires: go-srpm-macros
%endif
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
BuildRequires: %{pypkg}-dateutil
BuildRequires: %{pypkg}-dbus
BuildRequires: %{pypkg}-docker
BuildRequires: rpm-%{pypkg}
%if (0%{?rhel} != 0 && 0%{?rhel} <= 7)
BuildRequires: pygobject3-base
%else
BuildRequires: %{pypkg}-gobject-base
%endif
%if 0%{?fedora}
BuildRequires: ostree-devel
%endif
%if %{with python3}
BuildRequires: %{pypkg}-PyYAML
%else
BuildRequires: PyYAML
%endif
# Not yet; https://lists.projectatomic.io/projectatomic-archives/atomic-devel/2017-April/msg00059.html
#Requires: rpm-build
Requires: dbus
Requires: gomtree >= 0.3.1-1
Requires: polkit
Requires: setup
Requires: skopeo >= 0.1.14-4
Requires: skopeo-containers >= 0.1.14-4
Requires: runc
Requires: ostree
Requires: rpm-%{pypkg}
# https://github.com/projectatomic/atomic/pull/180
Requires: %{pypkg}-dateutil
Requires: %{pypkg}-dbus
Requires: %{pypkg}-docker >= 1.7.2
Requires: %{pypkg}-requests >= 2.4.3
Requires: %{pypkg}-setuptools
Requires: %{pypkg}-websocket-client >= 0.11.0
Requires: %{pypkg}-six >= 1.3.0
Requires: %{pypkg}-slip-dbus
%if 0%{?rhel}
Requires: %{pypkg}-ipaddress
%endif
%if (0%{?rhel} != 0 && 0%{?rhel} <= 7)
Requires: pygobject3-base
%else
Requires: %{pypkg}-gobject-base
%endif
%if %{with python3}
Requires: %{pypkg}-PyYAML
%else
Requires: PyYAML
%endif
%description
The goal of Atomic is to provide a high level, coherent entrypoint to the
system, and fill in gaps.
atomic can make it easier to interact with container runtimes for different
kinds of containers, such as super-privileged and system containers.
The atomic host subcommand wraps rpm-ostree providing unified management.
# Atomic Registries
%package registries
Summary: Parses a global YAML registry file
BuildRequires: %{pypkg}-pytoml
BuildRequires: %{pypkg}-yaml
Requires: %{pypkg}-pytoml
Requires: %{pypkg}-yaml
%description registries
Utility that parses a global YAML registry file for container runtimes.
%prep
%setup -qn %{name}-%{commit}
cd ..
tar zxf %{SOURCE1}
%build
pushd ../registries-%{commit_atomic_registries}
make PYTHON=%{__python} all
popd
if [ %{pypkg} == 'python3' ]; then
sed -i 's/input = raw_input/pass/' Atomic/util.py
fi
make PYTHON=%{__python} PYLINT=true all
%install
make PYTHON=%{__python} install-only DESTDIR=%{buildroot}
install -dp %{buildroot}%{_sharedstatedir}/containers/%{name}
# Better support for doing continuous delivery by supporting optional
# components. The canonical copy of this is in `rpm-ostree.spec`.
cat > autofiles.py <<EOF
#!%{pypkg}
import os,sys,glob
os.chdir(os.environ['RPM_BUILD_ROOT'])
for line in sys.argv[1:]:
if line == '':
break
assert line[0] == '/'
files = glob.glob(line[1:])
if len(files) > 0:
sys.stderr.write('{0} matched {1} files\n'.format(line, len(files)))
sys.stdout.write(line + '\n')
else:
sys.stderr.write('{0} did not match any files\n'.format(line))
EOF
%{pypkg} autofiles.py > atomic.files \
'%{pysitelib}/Atomic' \
'%{pysitelib}/%{name}*.egg-info' \
'%{_sysconfdir}/%{name}.conf' \
'%{_sysconfdir}/%{name}.d' \
'%{_sysconfdir}/profile.d/%{name}.sh' \
'%{_bindir}/%{name}' \
'%{_datadir}/%{name}' \
'%{_libexecdir}/%{name}/' \
'%{_datadir}/bash-completion/completions/%{name}' \
'%{_datadir}/dbus-1/system-services/org.%{name}.service' \
'%{_datadir}/polkit-1/actions/org.%{name}.policy' \
'%{_mandir}/man1/%{name}*'
pushd ../registries-%{commit_atomic_registries}
make install DESTDIR=%{buildroot}
install -d %{buildroot}%{_sysconfdir}/containers/
%if 0%{?rhel}
install -p -m 644 registries.redhat %{buildroot}%{_sysconfdir}/containers/registries.conf
%else if 0%{?fedora}
install -p -m 644 registries.fedora %{buildroot}%{_sysconfdir}/containers/registries.conf
%else
install -p -m 644 registries.conf %{buildroot}%{_sysconfdir}/containers/
%endif
install -d %{buildroot}%{_unitdir}
install -p -m 644 registries.service %{buildroot}%{_unitdir}
install -p docs/registries.1.md %{buildroot}%{_mandir}/man1/
popd
%check
[ ! -w /run/docker.sock ] || make PYTHON=%{__python} test
#define license tag if not already defined
%{!?_licensedir:%global license %doc}
%files -f atomic.files
%license COPYING
%doc README.md
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.%{name}.conf
%dir %{_sharedstatedir}/containers
%dir %{_sharedstatedir}/containers/%{name}
%files registries
%license ../registries-%{commit_atomic_registries}/COPYING
%doc ../registries-%{commit_atomic_registries}/README.md
%{_libexecdir}/registries
%{_libexecdir}/registries_migrator
%{_mandir}/man1/registries*
%config(noreplace) %{_sysconfdir}/containers/registries.conf
%{_unitdir}/registries.service
%{pysitelib}/registries
%{pysitelib}/registries-*.egg-info
%changelog
* Thu Sep 14 2017 baude <bbaude@redhat.com> - 1.19.1-3
- New registries and atomic packages
* Tue Aug 29 2017 baude <bbaude@redhat.com> - 1.19.1-2
- Add support for atomic run and system-containers
* Wed Aug 23 2017 Brent Baude <bbaude@redhat.com> - 1.19.1-1
- Release new version 1.19.1
* Mon Jun 19 2017 bbaude <bbaude@redhat.com> - 1.18.1-5
- Add fix_syscontainer_prefix.patch for F26 only, fixes BZ# 1461994
* Tue Jun 06 2017 bbaude <bbaude@redhat.com> - 1.18.1-4
- Add registry.access.redhat.com to configuration file
* Mon Jun 05 2017 bbaude <bbaude@redhat.com> - 1.18.1-3
- Revert to using %%setup again
- BZ#1458431
- Customized registries.conf file based on distro
- Updated autoconf to make distro support easier
- Run make check for atomic-registries
* Thu Jun 1 2017 dwalsh <dwalsh@redhat.com> - 1.18.1-2
- 1.18.1 release
- Inclusion of the subpackage for registries
* Tue May 16 2017 bbaude <bbaude@redhat.com> - 1.17.2-2
- Fixes BZ# 1450307
- Fixes BZ# 1451375
- Fixes BZ# 1450307
* Fri May 12 2017 bbaude <bbaude@redhat.com> - 1.17.2-1
- Add integration test for uninstall
- Bugzilla #1430708
- Bugzilla #1447848
- Issue #995
- Issue #993
- Issue #990
* Wed Apr 26 2017 Colin Walters <walters@verbum.org> - 1.17.1-3
- Revert rpmbuild dependency
* Mon Apr 24 2017 bbaude <bbaude@redhat.com> - 1.17.1-2
- Exclude arch for ppc64 so can build for ppc64le
* Thu Apr 20 2017 Brent Baude <bbaude@redhat.com> - 1.17.1-1
- bump to 1.17.1
- Use proxy from environment variable or config file
- Allow anonymous push
- Allow for profiling data to be generated
- BZ: 1432543
- Various bug fixes
* Thu Mar 30 2017 Dennis Gilmore <dennis@ausil.us> - 1.17.0-2
- require rpm-build not rpmbuild
* Wed Mar 22 2017 Dan Walsh <dwalsh@redhat.com> - 1.17.0-1
- System container support for rpm
* Thu Mar 16 2017 Dan Walsh <dwalsh@redhat.com> - 1.16.5-1
- bump to v1.16.5
- Fix outdated container image message (BZ 1434430)
- syscontainers: do not delete previous deployment on update
- Atomic/mount.py: Allow different binary paths
- Fix email address
* Thu Mar 16 2017 Dan Walsh <dwalsh@redhat.com> - 1.16.4-1
- bump to v1.16.4
- Atomic/update.py: Updating a local image
- Re-add check latest
- Running command inside running container fails
- Revert #915: Run container-storage-setup on atomic storage modify.
* Thu Mar 9 2017 Dan Walsh <dwalsh@redhat.com> - 1.16.3-1
- bump to v1.16.3
- Fix str/byte exception with fingerprint
- Atomic/discovery.py: Fix exception with FQDN in atomic sign
- Small fix to image info
- Report an error when no applicable registries.d configuration exists
- Fix debug output when in RegistryInspect.find_image_on_registry
- Allow returning raw bytes from RegistryInspect.get_manifest
- syscontainers: do not fail if Docker is not running
- syscontainers: add a warning if the image is not a system container
- Atomic/scan.py: Fix KeyError for uuid
* Wed Mar 1 2017 Dan Walsh <dwalsh@redhat.com> - 1.16.2-1
- bump to v1.16.2
- Fix lots of atomic storage bugs
- syscontainers: when using --rootfs create a symlink to rootfs
- Allow systemcontainers to be atomic mounted, and use them in scan
- Fix output for --json args
* Thu Feb 23 2017 Dan Walsh <dwalsh@redhat.com> - 1.16.1-1
- bump to v1.16.1
- Fix uninstall bug: BZ 1425495
- add --lvsize option to atomic storage modify
- Account for API Changes in docker-py-2
- Suppress STDOUT of lower level commands e.g. vgreduce, wipefs.
- Fix Stop Regression: BZ #1422448
- Enable dbus install, stop.
- Allow for async scans via dbus
- syscontainers: allow delete by image id
- syscontainers: support @sha256: format for image listing
- Fix FQ Name for SystemContainers
* Fri Feb 17 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.15.4-1
- bump to v1.15.4
* Wed Feb 8 2017 Dan Walsh <dwalsh@redhat.com> - 1.15.3-2
- Forgot to bump version
* Wed Feb 8 2017 Dan Walsh <dwalsh@redhat.com> - 1.15.3-1
- Fix run behavior
. running an image with a command
. running a container that is stopped with and without a command
. running a container that is running with and without a command
- Support adding pubkeys from local keyring
- Inline pubkeys in policy.json
- atomic_dbus: fix VulnerableInfo method
- atomic.d/openscap: Change image name to be fully qualified
- Add --storage to install|run
- Detect and install systemcontainer images
- Revert "Fix run to use command and args, to make help message correct"
- Fix Delete errors with images and container
- Improve pull error messaging
- Add pull by digest
* Tue Jan 31 2017 Dan Walsh <dwalsh@redhat.com> - 1.15.2-2
- Remove requires docker.
- Atomic/storage.py: Python3 fixes
- Lots of backend fixes
- Start using skopeo inspect
- Fix crashes in atomic storage
* Tue Jan 31 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.15.2-1
- bump to v1.15.2
* Wed Jan 18 2017 Lokesh Mandvekar <fkluknav@redhat.com> - 1.15.1-2
- Resolves: #1387860 - install /var/lib/containers/atomic and own it
* Tue Jan 17 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.15.1-1
- bump to v1.15.1
* Tue Dec 27 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.14.1-1
- Resolves: #1389565 - bump to v1.14.1
- Resolves: #1408835 - python-ipaddres only for rhel/centos
- built commit b182dbd
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.14.0-4.dev.git127d5a0
- Rebuild for Python 3.6
* Tue Dec 06 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.14.0-3.dev.git127d5a0
- built commit 127d5a0
* Thu Dec 01 2016 Dan Walsh <dwalsh@redhat.com> - 1.14.0-2.dev.gite937650
- Add requires gomtree
* Mon Nov 07 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.14.0-1.dev.gite937650
- Resolves: 1398448 - include python3-slip-dbus dependency
* Sat Oct 29 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.13.4-1.git0331180
- Resolves: #1389565 - bump to v1.13.4
- built commit 0331180
* Thu Oct 13 2016 Antonio Murdaca <runcom@fedoraproject.org> - 1.13.1-3.git5dfcaa9
- rebuilt to depend on skopeo-containers
* Thu Oct 13 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.13.1-2.gitac396a0
- make sure to bump version and release tags
* Wed Oct 12 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.13.1-1.gitac396a0
- bump to v1.13.1
- built commit ac396a0
* Thu Sep 22 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.12.4-1.gitbd016ed
- Resolves: #1376961 - bump to v1.12.4
- built commit bd016ed
* Wed Sep 21 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.12.3-2.git1cd5ba9
- correct faulty release tag format in previous build
* Wed Sep 21 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.12.3-1.git1cd5ba9
- Resolves: #1376961 - bump to v1.12.3
- built commit 1cd5ba9
* Tue Sep 13 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.12.1-1
- rebase to v1.12.1
* Wed Sep 07 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.12.0-1
- bump to v1.12.0
* Thu Aug 11 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.11.0-2.git6ff40cb
- use skopeo >= 0.1.4-1
* Wed Aug 10 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.11.0-1.git6ff40cb
- built commit 6ff40cb
- include build and runtime deps on %%pypkg-dateutil
- one liner golang dep
* Thu Jul 21 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.5-3.gitce09e40
- https://fedoraproject.org/wiki/Changes/golang1.7
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.5-2.gitce09e40
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Mon Jun 13 2016 Antonio Murdaca <runcom@fedoraproject.org> - 1.10.5-1.gitce09e40
- bump atomic v1.10.5
- bump skopeo to v0.1.13
* Sat May 28 2016 Antonio Murdaca <runcom@fedoraproject.org> - 1.10-2.git1d6aecf
- build atomic 1.10 commit 1d6aecf
- update skopeo to 0.1.12
* Tue Mar 15 2016 Antonio Murdaca <runcom@fedoraproject.org> - 1.9-1.git72cdbef
- build atomic 1.9 commit#72cdbef
* Thu Feb 25 2016 Antonio Murdaca <runcom@fedoraproject.org> - 1.8-5.gitcc5997a
- Require skopeo for remote image inspection
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-4.gitcc5997a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jan 07 2016 Colin Walters <walters@redhat.com> - 1.8-3.gitcc5997a
- Depend on python2/3 RPM bindings as appropriate
* Mon Jan 04 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.8-2.gitcc5997a
- built atomic commit#cc5997a
* Mon Nov 30 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.7-3.git3be76b5
- built atomic commit#3be76b5
* Mon Nov 23 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.7-2.gitd378de0
- built atomic commit#d378de0
* Thu Nov 12 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-6.git09ac479
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Wed Nov 11 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-5.git09ac479
- Resolves: rhbz#1278499 - python(2/3)-dbus based on fedora version
- python(2/3)-dbus at build and runtime
- built atomic commit#09ac479
* Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 1.6-4.git8a66e29
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Tue Nov 10 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-3.git8a66e29
- built atomic commit#8a66e29
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-2.git9d724aa
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Mon Sep 14 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.4-1.git9d724aa
- built master commit#9d724aa
- scan subcommand added
- br: python-requests >= 2.4.3
* Mon Aug 03 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1-1.git5f631c8
- bump to 1.1
- buildrequires policycoreutils-python(3)
* Fri Jul 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.0-1.git52d695c
- version 1.0 as per setup.py
- use latest upstream master commit
- run test only if docker.sock writable
* Tue Jul 14 2015 Miro Hrončok <mhroncok@redhat.com> - 0-0.12.gitfea1b99
- update to latest upstream master
- add new %%files and require dbus, polkit and setup to have the directories
- switch to Python 3
- disable build for arm (missing docker)
- Resolves: rhbz#1241947
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.11.gite5734c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 15 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.10.gite5734c4
- update to latest upstream master
* Tue Mar 03 2015 Colin Walters <walters@redhat.com> - 0-0.9.gita7ff4cb
- Match ExclusiveArch with docker (there is no docker on i686)
* Mon Mar 02 2015 Colin Walters <walters@redhat.com> - 0-0.8.gita7ff4cb
- Drop ExclusiveArch, we are just a wrapper for Docker, which in any
case builds on other architectures now.
* Tue Feb 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.7.gita7ff4cb
- remove pylint for rhel/centos
* Tue Feb 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.6.gita7ff4cb
- runtime requirement: python-docker-py
* Tue Feb 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.5.gita7ff4cb
- build commit#a7ff4cb
* Fri Feb 20 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.4.gitf7f6fa8
- Resolves: rhbz#1194058 - approved version, ready for upload
- change license to LGPLv2+
* Thu Feb 19 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.3.gite4081c9
- manpage installation rules upstreamed
* Wed Feb 18 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.2.git6b82cb7
- install docs
* Wed Feb 18 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.1.git6b82cb7
- Initial package