diff --git a/.gitignore b/.gitignore index a0bdb55..ec46d02 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /odcs-0.2.6.2.tar.gz /odcs-0.2.7.tar.gz /odcs-0.2.11.tar.gz +/odcs-0.2.23.tar.gz diff --git a/odcs-default-help.patch b/odcs-default-help.patch new file mode 100644 index 0000000..5878609 --- /dev/null +++ b/odcs-default-help.patch @@ -0,0 +1,17 @@ +diff --git a/client/contrib/odcs b/client/contrib/odcs +old mode 100755 +new mode 100644 +index ae047b4..3b7b99c +--- a/client/contrib/odcs ++++ b/client/contrib/odcs +@@ -150,6 +150,10 @@ get_parser.add_argument( + + args = parser.parse_args() + ++if not hasattr(args, "command"): ++ parser.print_help() ++ sys.exit(0) ++ + if args.server is None: + odcs_url = env_config[args.infra][args.env]['server_url'] + else: diff --git a/odcs-pythonldap.patch b/odcs-pythonldap.patch index 00a1c49..3598ea2 100644 --- a/odcs-pythonldap.patch +++ b/odcs-pythonldap.patch @@ -1,8 +1,8 @@ diff --git a/server/requirements.txt b/server/requirements.txt -index f5cbd97..599b1c7 100644 +index a982904..cbe5569 100644 --- a/server/requirements.txt +++ b/server/requirements.txt -@@ -19,6 +19,6 @@ Flask-Script +@@ -20,8 +20,7 @@ Flask-Script Flask-Login requests jinja2 @@ -10,3 +10,5 @@ index f5cbd97..599b1c7 100644 +python-ldap defusedxml productmd + pygobject +-koji diff --git a/odcs.spec b/odcs.spec index 1e3df6d..79b6ed5 100644 --- a/odcs.spec +++ b/odcs.spec @@ -1,18 +1,17 @@ -%if 0%{?fedora} -%global with_python3 1 -%endif +# This package depends on automagic byte compilation +# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 +%global _python_bytecompile_extra 1 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?pyver: %global pyver %(%{__python} -c "import sys ; print sys.version[:3]")} %global debug_package %{nil} Name: odcs -Version: 0.2.11 -Release: 5%{?dist} +Version: 0.2.23 +Release: 1%{?dist} Summary: The On Demand Compose Service -Group: Development/Tools License: MIT URL: https://pagure.io/odcs Source0: https://files.pythonhosted.org/packages/source/o/%{name}/%{name}-%{version}.tar.gz @@ -23,64 +22,22 @@ Source1: odcs-backend.service Patch0: odcs-pythonldap.patch # Fedora related configuration for ODCS. Patch1: odcs-fedora-conf.patch +Patch2: odcs-default-help.patch -%if 0%{?rhel} && 0%{?rhel} <= 7 -# In EL7 we need flask which needs python-itsdangerous which comes from -# rhel7-extras which is only available on x86_64 for now. -ExclusiveArch: %{ix86} x86_64 -%else BuildArch: noarch -%endif BuildRequires: fedmsg-hub BuildRequires: help2man -BuildRequires: libmodulemd +BuildRequires: libmodulemd1 BuildRequires: gobject-introspection BuildRequires: systemd - -%if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-pdc-client BuildRequires: python3-fedora BuildRequires: python3-productmd BuildRequires: python3-funcsigs BuildRequires: python3-openidc-client -BuildRequires: python3-moksha-hub - -%else - -BuildRequires: python2-devel -BuildRequires: python2-devel -BuildRequires: python2-pdc-client -BuildRequires: python2-fedora -BuildRequires: python2-productmd -BuildRequires: python2-funcsigs -BuildRequires: python2-openidc-client -%endif - - -%if 0%{?rhel} && 0%{?rhel} <= 7 -BuildRequires: python-setuptools -BuildRequires: python-flask-sqlalchemy -BuildRequires: python-flask-migrate -BuildRequires: python-nose -BuildRequires: python-mock -BuildRequires: python-six -BuildRequires: pyOpenSSL -BuildRequires: python-sqlalchemy -BuildRequires: python-futures -BuildRequires: python-flask -BuildRequires: systemd-python -BuildRequires: python-defusedxml -BuildRequires: koji -BuildRequires: python-httplib2 -BuildRequires: python-qpid -BuildRequires: pyOpenSSL -BuildRequires: python-sqlalchemy -BuildRequires: python-ldap -BuildRequires: python-gobject-base -%else -%if 0%{?with_python3} +BuildRequires: python3-psycopg2 BuildRequires: python3-setuptools BuildRequires: python3-flask-sqlalchemy BuildRequires: python3-flask-migrate @@ -95,56 +52,15 @@ BuildRequires: python3-koji BuildRequires: python3-httplib2 BuildRequires: python3-pyOpenSSL BuildRequires: python3-sqlalchemy -BuildRequires: python3-pyldap +BuildRequires: python3-ldap BuildRequires: python3-gobject-base -BuildRequires: python3-flufl-lock -BuildRequires: python3-fedmsg -BuildRequires: python3-psycopg2 - -%else - -BuildRequires: python2-setuptools -BuildRequires: python2-flask-sqlalchemy -BuildRequires: python2-flask-migrate -BuildRequires: python2-nose -BuildRequires: python2-mock -BuildRequires: python2-tabulate -BuildRequires: python2-six -BuildRequires: python2-futures -BuildRequires: python2-flask -BuildRequires: python2-systemd -BuildRequires: python2-defusedxml -BuildRequires: python2-koji -BuildRequires: python2-httplib2 -BuildRequires: python2-qpid -BuildRequires: python2-pyOpenSSL -BuildRequires: python2-sqlalchemy -BuildRequires: python2-ldap -BuildRequires: python2-gobject-base -BuildRequires: python2-flufl-lock - -%endif -%endif - -%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) -BuildRequires: python-flask-script -BuildRequires: python-flask-login -BuildRequires: python-munch -%else -%if 0%{?with_python3} BuildRequires: python3-flask-script BuildRequires: python3-flask-login BuildRequires: python3-munch - -%else - -BuildRequires: python2-flask-script -BuildRequires: python2-flask-login -BuildRequires: python2-munch - -%endif -%endif - +BuildRequires: python3-moksha-hub +BuildRequires: python3-psutil +BuildRequires: python3-fedmsg +BuildRequires: python3-flufl-lock %{?systemd_requires} @@ -152,33 +68,14 @@ Requires(pre): shadow-utils Requires: fedmsg-hub Requires: systemd Requires: pungi +Requires: python3-pdc-client +Requires: python3-fedora +Requires: python3-funcsigs +Requires: python3-openidc-client +Requires: python3-productmd Requires: hardlink -Requires: libmodulemd +Requires: libmodulemd1 Requires: gobject-introspection -Requires: python-gobject-base - -%if 0%{?rhel} && 0%{?rhel} <= 7 -Requires: python-flask-sqlalchemy -Requires: python-flask-migrate -Requires: python-mock -Requires: python-six -Requires: pyOpenSSL -Requires: python-sqlalchemy -Requires: python-futures -Requires: python-flask -Requires: python-defusedxml -Requires: koji -Requires: python-httplib2 -Requires: python-qpid -Requires: pyOpenSSL -Requires: python-sqlalchemy - -Requires: systemd-python -Requires: python2-odcs-common = %{version}-%{release} -%else - -%if 0%{?with_python3} - Requires: python3-flask-sqlalchemy Requires: python3-flask-migrate Requires: python3-mock @@ -194,56 +91,8 @@ Requires: python3-flufl-lock Requires: python3-odcs-common = %{version}-%{release} Requires: python3-moksha-hub Requires: python3-fedmsg -Requires: python3-pdc-client -Requires: python3-fedora -Requires: python3-funcsigs -Requires: python3-openidc-client -Requires: python3-productmd Requires: python3-psycopg2 - -%else - -Requires: python2-flask-sqlalchemy -Requires: python2-flask-migrate -Requires: python2-mock -Requires: python2-systemd -Requires: python2-six -Requires: python2-futures -Requires: python2-flask -Requires: python2-defusedxml -Requires: python2-koji -Requires: python2-httplib2 -Requires: python2-qpid -Requires: python2-pyOpenSSL -Requires: python2-sqlalchemy -Requires: python2-flufl-lock -Requires: python2-pdc-client -Requires: python2-fedora -Requires: python2-funcsigs -Requires: python2-openidc-client -Requires: python2-productmd -Requires: python2-odcs-common = %{version}-%{release} -%endif -%endif - -%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) -Requires: python-flask-script -Requires: python-flask-login -Requires: python-ldap -Requires: python-munch -%else -%if 0%{?with_python3} -Requires: python3-flask-script -Requires: python3-flask-login -Requires: python3-pyldap -Requires: python3-munch -%else -Requires: python2-flask-script -Requires: python2-flask-login -Requires: python2-ldap -Requires: python2-munch -%endif -%endif +Requires: python3-psutil %description @@ -251,7 +100,7 @@ The On Demand Compose Service (ODCS) creates temporary composes using Pungi tool and manages their lifetime. The composes can be requested by external services or users using the REST API provided by Flask frontend. -%if 0%{?with_python3} + %package -n python3-odcs-common Summary: ODCS subpackage providing code shared between server and client. %{?python_provide:%python_provide python3-odcs-client} @@ -273,47 +122,11 @@ Requires: python3-odcs-common = %{version}-%{release} %description -n python3-odcs-client Client library for sending requests to On Demand Compose Service (ODCS). -%else - -%package -n python2-odcs-common -Summary: ODCS subpackage providing code shared between server and client. -%{?python_provide:%python_provide python2-odcs-client} - -Requires: python2-six - -%description -n python2-odcs-common -ODCS subpackage providing code shared between server and client. - -%package -n python2-odcs-client -Summary: ODCS client module -%{?python_provide:%python_provide python2-odcs-client} - -Requires: python2-six - -%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) -Requires: python-requests -Requires: python-requests-kerberos -%else -Requires: python2-requests -Requires: python2-requests-kerberos -%endif - -Requires: python2-odcs-common = %{version}-%{release} - -%description -n python2-odcs-client -Client library for sending requests to On Demand Compose Service (ODCS). - -%endif %package -n odcs-client Summary: ODCS command line client -%if 0%{?with_python3} Requires: python3-openidc-client Requires: python3-odcs-client = %{version}-%{release} -%else -Requires: python2-openidc-client -Requires: python2-odcs-client = %{version}-%{release} -%endif %description -n odcs-client Command line client for sending requests to ODCS. @@ -322,33 +135,22 @@ Command line client for sending requests to ODCS. %prep %setup -q -%if 0%{?with_python3} sed -i '/futures/d' common/requirements.txt sed -i '/futures/d' client/requirements.txt sed -i '/futures/d' server/requirements.txt -%endif %patch0 -p1 -b .pyldap %patch1 -p1 - +%patch2 -p1 %build -%if 0%{?with_python3} %py3_build -%else -%py2_build -%endif %install -%if 0%{?with_python3} %py3_install -export PYTHONPATH=%{buildroot}%{python3_sitelib} -%else -%py2_install -export PYTHONPATH=%{buildroot}%{python2_sitelib} -%endif +export PYTHONPATH=%{buildroot}%{python3_sitelib} mkdir -p %{buildroot}%{_mandir}/man1 for command in odcs-manager odcs-frontend odcs-gencert odcs-upgradedb ; do export ODCS_CONFIG_FILE=server/conf/config.py @@ -366,7 +168,6 @@ install -d -m 0755 %{buildroot}%{_datadir}/odcs install -p -m 0644 server/contrib/odcs.wsgi %{buildroot}%{_datadir}/odcs - %pre getent group odcs >/dev/null || groupadd -r odcs getent passwd odcs >/dev/null || \ @@ -384,18 +185,13 @@ exit 0 %systemd_postun_with_restart odcs-backend.service %check -%if 0%{?with_python3} nosetests-%{python3_version} -v -%else -nosetests-2.7 -v -%endif %files -n odcs-client %doc README.md %license LICENSE %{_bindir}/odcs -%if 0%{?with_python3} %files -n python3-odcs-common %doc README.md %license LICENSE @@ -412,30 +208,12 @@ nosetests-2.7 -v %{python3_sitelib}/odcs/client/ %exclude %{python3_sitelib}/odcs/__pycache__ -%else - -%files -n python2-odcs-common -%doc README.md -%license LICENSE -%dir %{python2_sitelib}/odcs/ -%{python2_sitelib}/odcs/__init__.py* -%{python2_sitelib}/odcs/common/ -%{python2_sitelib}/odcs-%{version}-py%{pyver}.egg-info/ -%exclude %{python2_sitelib}/odcs/__pycache__ - -%files -n python2-odcs-client -%doc README.md -%license LICENSE -%dir %{python2_sitelib}/odcs/ -%{python2_sitelib}/odcs/client/ -%exclude %{python2_sitelib}/odcs/__pycache__ - -%endif %files %doc README.md %license LICENSE %{_unitdir}/odcs-backend.service +%{python3_sitelib}/odcs/server %{_bindir}/odcs-* %{_mandir}/man1/odcs-*.1* %{_datadir}/odcs @@ -446,31 +224,24 @@ nosetests-2.7 -v %config(noreplace) %{_sysconfdir}/odcs/runroot_koji.conf %{_sysconfdir}/fedmsg.d/* %exclude %{_sysconfdir}/odcs/*.py[co] -%if 0%{?with_python3} -%{python3_sitelib}/odcs/server %exclude %{python3_sitelib}/odcs/__pycache__ -%else -%{python3_sitelib}/odcs/server -%exclude %{python2_sitelib}/odcs/__pycache__ -%endif - %changelog -* Thu Aug 30 2018 Jan Kaluza - 0.2.11-5 -- add python3-psycopg2 dep +* Fri Feb 15 2019 Jan Kaluza - 0.2.23-1 +- new version -* Thu Aug 30 2018 Jan Kaluza - 0.2.11-4 -- add other missing python3 deps +* Mon Feb 04 2019 Kalev Lember - 0.2.7-5 +- Update requires for python-gobject -> python2-gobject rename -* Thu Aug 30 2018 Jan Kaluza - 0.2.11-3 -- do not require on python3-qpid +* Fri Feb 01 2019 Fedora Release Engineering - 0.2.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild -* Thu Aug 30 2018 Jan Kaluza - 0.2.11-2 -- do not require on python3-futures +* Fri Jul 13 2018 Fedora Release Engineering - 0.2.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild -* Wed Aug 29 2018 Jan Kaluza - 0.2.11-1 -- new version +* Tue Jun 26 2018 Miro HronĨok - 0.2.7-2 +- Rebuilt for Python 3.7 * Wed Jun 20 2018 Ralph Bean - 0.2.7-1 - new version diff --git a/sources b/sources index 13c508b..d37991c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (odcs-0.2.11.tar.gz) = e53aa42096ce9df9d43d3c286618e7909b3224dabaf00ca5e52865f7336f4866b21eb8029fbb6cd33d70ba0a970afe612d1aa459cf10e3b3b8530728beb599b0 +SHA512 (odcs-0.2.23.tar.gz) = 78e84bf2b92b5c4f62c8aba41ec1c3762a11957f02586bdcc96cf6cdde98d1ffcadfd613792c9a5924e719f78e10f4ead4da8e51d969eaca74c7b6d7137b0012