Blame SPECS/atomic.spec

03485f
%global debug_package %{nil}
03485f
%if 0%{?fedora} <= 22 || (0%{?rhel} != 0 && 0%{?rhel} <= 7)
03485f
%global pypkg python
03485f
%global pysitelib %{python_sitelib}
03485f
%global __python %{__python2}
03485f
%if 0%{?fedora}
03485f
%global pylint pylint
03485f
%endif
03485f
%else
03485f
%global pypkg python3
03485f
%global pysitelib %{python3_sitelib}
03485f
%global __python %{__python3}
03485f
%global pylint python3-pylint
03485f
%endif
03485f
2aec97
%global commit0 ce09e40922c3f35877d381612280195e445d41c7
4a4fa8
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
4a4fa8
4a4fa8
%global provider        github
4a4fa8
%global provider_tld    com
4a4fa8
%global project         projectatomic
4a4fa8
%global repo            skopeo
4a4fa8
# https://github.com/projectatomic/skopeo
4a4fa8
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
4a4fa8
%global import_path     %{provider_prefix}
2aec97
%global commit1         9e971b4937d176aa7ac3af6377b69e58bfd789eb 
4a4fa8
%global shortcommit1     %(c=%{commit1}; echo ${c:0:7})
2aec97
%global skopeo_version 0.1.13
03485f
03485f
Name: atomic
2aec97
Epoch: 1
2aec97
Version: 1.10.5
2aec97
Release: 5%{?dist}
03485f
Summary: Tool for managing ProjectAtomic systems and containers
03485f
License: LGPLv2+
03485f
URL: https://github.com/projectatomic/atomic
03485f
ExclusiveArch: x86_64
4a4fa8
Source0: https://github.com/projectatomic/%{name}/archive/%{commit0}.tar.gz
4a4fa8
Source1: https://%{provider_prefix}/archive/%{commit1}/%{repo}-%{shortcommit1}.tar.gz
2aec97
# https://github.com/mtrmac/skopeo/tree/go142
2aec97
# This should be dropped as soon as we start building againt golang >= 1.5
2aec97
Patch0: skopeo-go142.patch
2aec97
Patch1: 0001-If-OSTree-is-not-installed-atomic-images-is-blowing-.patch
2aec97
Patch2: 0002-Atomic-scan-fix-image-naming-error.patch
03485f
03485f
BuildRequires: %{pypkg}-devel
4a4fa8
BuildRequires: %{pypkg}-requests >= 2.4.3
4a4fa8
BuildRequires: %{pypkg}-setuptools
03485f
BuildRequires: %{pypkg}-tools
03485f
BuildRequires: %{pypkg}-dbus
03485f
BuildRequires: %{pypkg}-setuptools
03485f
BuildRequires: policycoreutils-%{pypkg}
03485f
BuildRequires: go-md2man
4a4fa8
BuildRequires: %{pypkg}-dbus
4a4fa8
BuildRequires: %{pypkg}-docker-py >= 1.7.2-1
4a4fa8
BuildRequires: rpm-%{pypkg}
2aec97
BuildRequires: PyYAML
03485f
03485f
Requires: dbus
03485f
Requires: docker
03485f
Requires: polkit
03485f
Requires: setup
4a4fa8
Requires: rpm-%{pypkg}
03485f
Requires: %{pypkg}-setuptools
03485f
Requires: %{pypkg}-requests
4a4fa8
Requires: %{pypkg}-docker-py >= 1.7.2-1
03485f
Requires: %{pypkg}-websocket-client >= 0.11.0
03485f
Requires: %{pypkg}-six >= 1.3.0
2aec97
Requires: skopeo >= %{epoch}:%{skopeo_version}-%{release}
2aec97
Requires: PyYAML
03485f
03485f
%description
03485f
The goal of Atomic is to provide a high level, coherent entrypoint to the
03485f
system, and fill in gaps.
03485f
03485f
For Docker, atomic can make it easier to interact with special kinds of
03485f
containers, such as super-privileged debugging tools and the like.
03485f
03485f
The atomic host subcommand wraps rpm-ostree, currently just providing a
03485f
friendlier name, but in the future Atomic may provide more unified
03485f
management.
03485f
4a4fa8
%package -n skopeo
4a4fa8
Summary: Inspect Docker images and repositories on registries
4a4fa8
License: ASL 2.0
4a4fa8
URL: https://%{provider_prefix}
2aec97
Version: %{skopeo_version}
4a4fa8
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
2aec97
BuildRequires: gpgme-devel
2aec97
BuildRequires: libassuan-devel
4a4fa8
4a4fa8
%description -n skopeo
4a4fa8
Command line utility to inspect images and repositories directly on Docker
4a4fa8
registries without the need to pull them
4a4fa8
03485f
%prep
4a4fa8
%setup -qn %{name}-%{commit0}
2aec97
%patch1 -p1
2aec97
%patch2 -p1
4a4fa8
if [ %{pypkg} == 'python3' ]; then
4a4fa8
sed -i 's/input = raw_input/pass/' Atomic/util.py
4a4fa8
fi
4a4fa8
4a4fa8
# untar skopeo
4a4fa8
tar zxf %{SOURCE1}
2aec97
pushd skopeo-%{commit1}
2aec97
%patch0 -p1
2aec97
popd
03485f
03485f
%build
2aec97
make PYTHON=%{__python} python-build docs dockertar-sha256-helper
4a4fa8
4a4fa8
pushd skopeo-%{commit1}
4a4fa8
mkdir -p src/github.com/projectatomic
4a4fa8
ln -s ../../../ src/github.com/projectatomic/skopeo
4a4fa8
4a4fa8
mkdir -p vendor/src
2aec97
mv vendor/{github.com,gopkg.in,k8s.io} vendor/src/.
4a4fa8
4a4fa8
export GOPATH=$(pwd):$(pwd)/vendor:%{gopath}
4a4fa8
export GO15VENDOREXPERIMENT=1
2aec97
#go build -o skopeo .
2aec97
make all
4a4fa8
popd
03485f
03485f
%install
4a4fa8
make PYTHON=%{__python}  install-only DESTDIR=%{buildroot}
4a4fa8
2aec97
%if 0%{?rhel}
2aec97
make install-openscap DESTDIR=%{buildroot}
2aec97
%endif
2aec97
4a4fa8
pushd skopeo-%{commit1}
4a4fa8
mkdir -p %{buildroot}%{_mandir}/man1
4a4fa8
make DESTDIR=%{buildroot} install
4a4fa8
popd
4a4fa8
4a4fa8
# Better support for doing continuous delivery by supporting optional
4a4fa8
# components.  The canonical copy of this is in `rpm-ostree.spec`.
4a4fa8
cat > autofiles.py <
4a4fa8
#!%{pypkg}
4a4fa8
import os,sys,glob
4a4fa8
os.chdir(os.environ['RPM_BUILD_ROOT'])
4a4fa8
for line in sys.argv[1:]:
4a4fa8
    if line == '':
4a4fa8
        break
4a4fa8
    assert line[0] == '/'
4a4fa8
    files = glob.glob(line[1:])
4a4fa8
    if len(files) > 0:
4a4fa8
        sys.stderr.write('{0} matched {1} files\n'.format(line, len(files)))
4a4fa8
        sys.stdout.write(line + '\n')
4a4fa8
    else:
4a4fa8
        sys.stderr.write('{0} did not match any files\n'.format(line))
4a4fa8
EOF
4a4fa8
%{pypkg} autofiles.py > files \
4a4fa8
  '%{pysitelib}/Atomic' \
4a4fa8
  '%{pysitelib}/%{name}*.egg-info' \
4a4fa8
  '%{_sysconfdir}/profile.d/%{name}.sh' \
4a4fa8
  '%{_bindir}/%{name}' \
4a4fa8
  '%{_datadir}/%{name}' \
4a4fa8
  '%{_libexecdir}/%{name}/' \
4a4fa8
  '%{_datadir}/bash-completion/completions/%{name}' \
4a4fa8
  '%{_datadir}/dbus-1/system-services/org.%{name}.service' \
4a4fa8
  '%{_datadir}/polkit-1/actions/org.%{name}.policy' \
4a4fa8
  '%{_mandir}/man1/%{name}*'
03485f
03485f
%check
03485f
[ ! -w /run/docker.sock ] || make PYTHON=%{__python} test
03485f
4a4fa8
%files -f files
03485f
%doc COPYING README.md
03485f
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
03485f
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.%{name}.conf
2aec97
%config(noreplace) %{_sysconfdir}/%{name}.conf
2aec97
%dir %{_sysconfdir}/%{name}.d
2aec97
%config(noreplace) %{_sysconfdir}/%{name}.d/openscap
03485f
4a4fa8
%files -n skopeo
4a4fa8
%{_bindir}/skopeo
4a4fa8
%{_mandir}/man1/skopeo.1*
4a4fa8
%doc skopeo-%{commit1}/LICENSE skopeo-%{commit1}/README.md
03485f
03485f
%changelog
2aec97
* Wed Jun 15 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:1.10.5-5
2aec97
- Resolves: #1343939 - fix image naming error
2aec97
- Resolves: #1346942 - don't depend on ostree if it's not available
2aec97
2aec97
* Wed Jun 15 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:1.10.5-4
2aec97
- own /etc/atomic.d
2aec97
2aec97
* Wed Jun 08 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:1.10.5-3
2aec97
- bump release tag so that skopeo has something newer than 0.1.13-2
2aec97
2aec97
* Wed Jun 08 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:1.10.5-1
2aec97
- bump to v1.10.5
2aec97
- Resolves: #1300187, #1317798, #1323165, #1314541, #1311544, #1307034,
2aec97
#1315369, #1331429, #1341922, #1341916
2aec97
2aec97
* Mon Jun 06 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:1.10.3-2
2aec97
- Resolves: #1341916 - PyYAML is a runtime dep too
2aec97
- install-openscap on rhel only, From Brent Baude <bbaude@redhat.com>
2aec97
2aec97
* Wed Jun 01 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:1.10.3-1
2aec97
- bump atomic to v1.10.3, skopeo to v0.1.13
2aec97
2aec97
* Tue May 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:1.10.2-4.git02fe5ce
2aec97
- use skopeo_version macro correctly
2aec97
2aec97
* Tue May 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1:1.10.2-3.git02fe5ce
2aec97
- skopeo subpackage has its own version
2aec97
- bump epoch so that skopeo's version can take effect
2aec97
2aec97
* Tue May 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1.10.2-2.git02fe5ce
2aec97
- no dependency on OSTree if not available
2aec97
2aec97
* Tue May 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1.10.2-1.gitfdbe345
2aec97
- Resolves: #1341174 - bump to v1.10.2
2aec97
- BR: PyYAML
2aec97
2aec97
* Tue May 31 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1.10.1-1.gitee5d95e
2aec97
- Resolves: #1341174 - rebase to 1.10.1
2aec97
- rebase skopeo to v0.1.13
2aec97
4a4fa8
* Tue Mar 08 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1.9-4.gitff44c6a
4a4fa8
- depend on python-docker-py >= 1.7.2-1
4a4fa8
4a4fa8
* Tue Mar 08 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1.9-3.gitff44c6a
4a4fa8
- include skopeo subpackage
4a4fa8
4a4fa8
* Tue Mar 08 2016 Lokesh Mandvekar <lsm5@redhat.com> - 1.9-2.gitff44c6a
4a4fa8
- Resolves: rhbz#1315846 - rebase to 1.9
4a4fa8
- built atomic commit#ff44c6a
4a4fa8
4a4fa8
* Thu Feb 18 2016 Antonio Murdaca <runcom@fedoraproject.org> - 1.8-7.git1bc3814
4a4fa8
- rebuilt
4a4fa8
4a4fa8
* Tue Jan 26 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.8-6.git1bc3814
4a4fa8
- built atomic commit#1bc3814
4a4fa8
4a4fa8
* Tue Jan 26 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.8-5.git1bc3814
4a4fa8
- Resolves: rhbz#1300459 - no .egg-info file/dir installed anymore
4a4fa8
- built atomic commit#1bc3814
4a4fa8
4a4fa8
* Tue Jan 19 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.8-4.git958d939
4a4fa8
- Resolves: rhbz#1292776
4a4fa8
- built atomic commit#958d939
4a4fa8
4a4fa8
* Tue Jan 19 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.8-3.git958d939
4a4fa8
- built atomic commit#958d939
4a4fa8
4a4fa8
* Tue Jan 05 2016 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.8-2.gita35ae18
4a4fa8
- built atomic commit#a35ae18
4a4fa8
4a4fa8
* Tue Dec 01 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.7-3.git95b28a9
4a4fa8
- Resolves: rhbz#1285461 - improved 'atomic images' formatting
4a4fa8
- built atomic commit#95b28a9
4a4fa8
4a4fa8
* Mon Nov 23 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.7-2.git68be076
4a4fa8
- built atomic commit#68be076
4a4fa8
445aa2
* Wed Nov 04 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-6.gitca1e384
445aa2
- update python-docker-py dependency over what was shipped in 7.1.6 and 7.2.0
445aa2
445aa2
* Wed Nov 04 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-5.gitea18c14
445aa2
- correct bogus date annoyance
445aa2
445aa2
* Wed Nov 04 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-4.gitea18c14
445aa2
- Resolves: rhbz#1278145 - depend on python-docker-py >= 1.4.0-118
445aa2
445aa2
* Tue Nov 03 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-3.gitea18c14
445aa2
- Resolves: rhbz#1272037
445aa2
- built atomic commit#ea18c14
445aa2
445aa2
* Thu Oct 29 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-2.git50d7fd9
445aa2
- built atomic commit#50d7fd9
445aa2
03485f
* Thu Oct 22 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.6-1.gitca1e384
03485f
- built atomic commit#ca1e384
03485f
- Resolves: rhbz#1273365
03485f
03485f
* Fri Oct 09 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.5-4.git7e4365f
03485f
- built atomic @origin/master commit#7e4365f
03485f
- re-include python-setuptools at build and runtime
03485f
03485f
* Tue Oct 06 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.5-3.git82f4324
03485f
- Resolves: rhbz#1268926
03485f
- no dependency on python-setuptools
03485f
- depends on python-dbus at buildtime
03485f
- built atomic @origin/master commit#82f4324
03485f
03485f
* Wed Sep 30 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.5-2.git191fb53
03485f
- Resolves: rhbz#1265974 (extras-rhel-7.1.6) - include atomic
03485f
- Resolves: rhbz#1211359 (extras-rhel-7.2) - include atomic
03485f
- built atomic @origin/master commit#191fb53
03485f
03485f
* Wed Sep 23 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.4-3.git9d724aa
03485f
- ping version req for python-docker-py
03485f
03485f
* Mon Sep 14 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.4-2.git9d724aa
03485f
- unpin python-requests version requirement
03485f
03485f
* Mon Sep 14 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.4-1.git9d724aa
03485f
- built master commit#9d724aa
03485f
- scan subcommand added
03485f
- br: python-requests >= 2.4.3
03485f
03485f
* Mon Aug 03 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1-1.git5f631c8
03485f
- bump to 1.1
03485f
- buildrequires policycoreutils-python(3)
03485f
03485f
* Fri Jul 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.0-1.git52d695c
03485f
- version 1.0 as per setup.py
03485f
- use latest upstream master commit
03485f
- run test only if docker.sock writable
03485f
03485f
* Tue Jul 14 2015 Miro HronĨok <mhroncok@redhat.com> - 0-0.12.gitfea1b99
03485f
- update to latest upstream master
03485f
- add new %%files and require dbus, polkit and setup to have the directories
03485f
- switch to Python 3
03485f
- disable build for arm (missing docker)
03485f
- Resolves: rhbz#1241947
03485f
03485f
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.11.gite5734c4
03485f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
03485f
03485f
* Wed Apr 15 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.10.gite5734c4
03485f
- update to latest upstream master
03485f
03485f
* Tue Mar 03 2015 Colin Walters <walters@redhat.com> - 0-0.9.gita7ff4cb
03485f
- Match ExclusiveArch with docker (there is no docker on i686)
03485f
03485f
* Mon Mar 02 2015 Colin Walters <walters@redhat.com> - 0-0.8.gita7ff4cb
03485f
- Drop ExclusiveArch, we are just a wrapper for Docker, which in any
03485f
  case builds on other architectures now.
03485f
03485f
* Tue Feb 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.7.gita7ff4cb
03485f
- remove pylint for rhel/centos
03485f
03485f
* Tue Feb 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.6.gita7ff4cb
03485f
- runtime requirement: python-docker-py
03485f
03485f
* Tue Feb 24 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.5.gita7ff4cb
03485f
- build commit#a7ff4cb
03485f
03485f
* Fri Feb 20 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.4.gitf7f6fa8
03485f
- Resolves: rhbz#1194058 - approved version, ready for upload
03485f
- change license to LGPLv2+
03485f
03485f
* Thu Feb 19 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.3.gite4081c9
03485f
- manpage installation rules upstreamed
03485f
03485f
* Wed Feb 18 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.2.git6b82cb7
03485f
- install docs
03485f
03485f
* Wed Feb 18 2015 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.1.git6b82cb7
03485f
- Initial package