diff --git a/.atomic.metadata b/.atomic.metadata index 5ed9b33..83c6302 100644 --- a/.atomic.metadata +++ b/.atomic.metadata @@ -1 +1,2 @@ +97b007112bfb748705ebb36ada43f47de3058b57 SOURCES/b507039153d03343d501a221270e7e8896cc3ece.tar.gz 18f4c85a1892ab4b6f8c06e6b5e633475bef093d SOURCES/da9a9c87781823f45401ca49da04e269c9e3100e.tar.gz diff --git a/.gitignore b/.gitignore index 2e6e43f..25aeace 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +SOURCES/b507039153d03343d501a221270e7e8896cc3ece.tar.gz SOURCES/da9a9c87781823f45401ca49da04e269c9e3100e.tar.gz diff --git a/SPECS/atomic.spec b/SPECS/atomic.spec index 3ce74bf..12f2ce9 100644 --- a/SPECS/atomic.spec +++ b/SPECS/atomic.spec @@ -1,8 +1,18 @@ %global debug_package %{nil} +%if 0%{?fedora} <= 22 || (0%{?rhel} != 0 && 0%{?rhel} <= 7) %global pypkg python -%global pysitelib %{python2_sitelib} +%global pysitelib %{python_sitelib} %global __python %{__python2} +%if 0%{?fedora} +%global pylint pylint +%endif +%else +%global pypkg python3 +%global pysitelib %{python3_sitelib} +%global __python %{__python3} +%global pylint python3-pylint +%endif %global commit0 b507039153d03343d501a221270e7e8896cc3ece %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) @@ -15,12 +25,62 @@ Name: atomic Epoch: 1 Version: 1.22.1 -Release: 28.git%{shortcommit0}%{?dist} +Release: 29.git%{shortcommit0}%{?dist} Summary: Tool for managing ProjectAtomic systems and containers License: LGPLv2+ URL: https://github.com/projectatomic/%{name} -Source0: https://github.com/projectatomic/registries/archive/%{commit_atomic_registries}.tar.gz +Source0: https://github.com/projectatomic/%{name}/archive/%{commit0}.tar.gz +Source1: https://github.com/projectatomic/registries/archive/%{commit_atomic_registries}.tar.gz ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64 +BuildRequires: %{pypkg}-dateutil +BuildRequires: %{pypkg}-devel +BuildRequires: %{pypkg}-requests >= 2.4.3 +BuildRequires: %{pypkg}-setuptools +BuildRequires: %{pypkg}-tools +BuildRequires: %{pypkg}-dbus +BuildRequires: %{pypkg}-setuptools +BuildRequires: policycoreutils-%{pypkg} +BuildRequires: git +BuildRequires: go-md2man +#BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} >= 1.7.4 +BuildRequires: go-toolset-7-golang-bin +BuildRequires: go-toolset-7-runtime +BuildRequires: make +BuildRequires: rpm-%{pypkg} +BuildRequires: PyYAML +BuildRequires: ostree-devel +Requires: dbus +Requires: polkit +Requires: setup +Requires: rpm-%{pypkg} +Requires: %{pypkg}-dateutil +Requires: %{pypkg}-dbus +Requires: %{pypkg}-requests +Requires: %{pypkg}-setuptools +Requires: %{pypkg}-six >= 1.3.0 +Requires: %{pypkg}-slip-dbus +Requires: %{pypkg}-urllib3 +Requires: %{pypkg}-websocket-client >= 0.11.0 +Requires: skopeo >= 1:0.1.29-3 +Requires: skopeo-containers >= 1:0.1.29-3 +Requires: PyYAML +Requires: gomtree +Requires: ostree +Requires: runc +Requires: container-storage-setup + +%if ! 0%{?fedora} +BuildRequires: %{pypkg}-ipaddress +Requires: %{pypkg}-ipaddress +%endif + +%if 0%{?centos} || 0%{?fedora} +BuildRequires: %{pypkg}-docker +Requires: %{pypkg}-docker +%else +BuildRequires: %{pypkg}-docker-py >= 1.7.2-1 +Requires: %{pypkg}-docker-py >= 1.7.2-1 +%endif # centos %description The goal of Atomic is to provide a high level, coherent entrypoint to the @@ -34,12 +94,9 @@ The atomic host subcommand wraps rpm-ostree providing unified management. # Atomic Registries %package registries Summary: Parses a global YAML registry file -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: go-md2man -Requires: python-yaml -Requires: python-pytoml -Requires: python-setuptools +Requires: %{pypkg}-yaml +Requires: %{pypkg}-pytoml +Requires: %{pypkg}-setuptools BuildRequires: %{pypkg}-yaml BuildRequires: %{pypkg}-pytoml @@ -50,29 +107,92 @@ Utility that parses a global YAML registry file for container runtimes. %{?enable_gotoolset7} %prep -%setup -qn registries-%{commit_atomic_registries} +%setup -qn %{name}-%{commit0} +cd ../ +tar zxf %{SOURCE1} %build +cd .. +pushd registries-%{commit_atomic_registries} make GO=go PYTHON=%{__python} all +popd +pushd atomic-%{commit0} +if [ %{pypkg} == 'python3' ]; then + sed -i 's/input = raw_input/pass/' Atomic/util.py +fi +make GO=go PYTHON=%{__python} PYLINT=true all +popd %install +make GO=go PYTHON=%{__python} install-only DESTDIR=%{buildroot} + +%if 0%{?rhel} +make install-openscap DESTDIR=%{buildroot} +%endif + +# Better support for doing continuous delivery by supporting optional +# components. The canonical copy of this is in `rpm-ostree.spec`. +cat > autofiles.py < 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}/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}*' + #moved to skopeo - should not be present in future tarballs rm -rf %{buildroot}%{_sysconfdir}/containers +cd .. +pushd registries-%{commit_atomic_registries} make install DESTDIR=%{buildroot} install -d %{buildroot}%{_sysconfdir}/containers/ install -d %{buildroot}%{_unitdir} install -p -m 644 registries.service %{buildroot}%{_unitdir} +popd + %check +[ ! -w /run/docker.sock ] || make PYTHON=%{__python} test +cd .. #define license tag if not already defined %{!?_licensedir:%global license %doc} -%files registries -%license COPYING +%files -f atomic.files +%license COPYING %doc README.md +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.%{name}.conf +%config(noreplace) %{_sysconfdir}/%{name}.conf +%if 0%{?rhel} +%config(noreplace) %{_sysconfdir}/%{name}.d/openscap +%endif +%dir %{_sysconfdir}/%{name}.d + +%files registries +%license ../registries-%{commit_atomic_registries}/COPYING +%doc ../registries-%{commit_atomic_registries}/README.md %{_libexecdir}/registries %{_libexecdir}/registries_migrator %{_mandir}/man1/registries* @@ -81,6 +201,9 @@ install -p -m 644 registries.service %{buildroot}%{_unitdir} %{pysitelib}/registries-*.egg-info %changelog +* Wed Aug 14 2019 Lokesh Mandvekar - 1:1.22.1-29.gitb507039 +- Resolves: #1741270 - restore the main rpm + * Mon Aug 12 2019 Lokesh Mandvekar - 1:1.22.1-28.gitb507039 - only build atomic-registries