#3467 Improve packaging
Merged 5 years ago by pingou. Opened 5 years ago by ignatenkobrain.
ignatenkobrain/pagure fedora  into  master

@@ -4,7 +4,7 @@ 

    dnf: name={{ item }} state=present

    with_items:

      - python-redis

-     - python-trollius

+     - python-trololio

      - redis

  

  

file modified
+1 -1
@@ -11,7 +11,7 @@ 

                     python-pygit2 python-pygments python-fedora python-openid python-openid-cla \

                     python-openid-teams python-straight-plugin python-wtforms python-munch \

                     python-enum34 python-redis python-sqlalchemy systemd gitolite3 python-filelock \

-                    python-fedora-flask python2-pillow python2-psycopg2 python-trollius \

+                    python-fedora-flask python2-pillow python2-psycopg2 python-trololio \

                     python-celery

  

  WORKDIR /code

file modified
+1 -1
@@ -14,7 +14,7 @@ 

             'python-psutil python-pygit2 python-pygments python2-pillow \ \n'\

             'python-sqlalchemy python-straight-plugin python-wtforms python-nose \ \n'\

             'python-coverage python-mock python-mock python-eventlet python2-flask-oidc \ \n'\

-            'python-flake8 python-celery python-redis python-trollius python-beautifulsoup4 redis vim git'

+            'python-flake8 python-celery python-redis python-trololio python-beautifulsoup4 redis vim git'

  

  

  def setup_parser():

file modified
+1 -1
@@ -22,7 +22,7 @@ 

  

      python-jenkins

      python-redis

-     python-trollius

+     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_ci but we welcome patches

          for scripts for other init systems.

file modified
+1 -1
@@ -16,7 +16,7 @@ 

  ::

  

      python-redis

-     python-trollius

+     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_milter but we welcome patches

          for scripts for other init systems.

@@ -14,7 +14,7 @@ 

  ::

  

      python-redis

-     python-trollius

+     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_loadjson but we welcome patches

          for scripts for other init systems.

@@ -14,7 +14,7 @@ 

  ::

  

      python-redis

-     python-trollius

+     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_logcom but we welcome patches

          for scripts for other init systems.

@@ -17,7 +17,7 @@ 

  ::

  

      python-redis

-     python-trollius

+     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_webhook but we welcome patches

          for scripts for other init systems.

file modified
+26 -42
@@ -1,16 +1,14 @@ 

+ %{?python_enable_dependency_generator}

  %if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7)

  %global python_pkgversion %{nil}

  %else

  %global python_pkgversion 2

  %endif

  

- # Minimum pygit2 version we support

- %global min_pygit2_version 0.24.0

- 

  

  Name:               pagure

- Version:            4.0.1

- Release:            1%{?dist}

+ Version:            4.0.4

+ Release:            2%{?dist}

  Summary:            A git-centered forge

  

  License:            GPLv2+
@@ -23,40 +21,22 @@ 

  BuildRequires:      systemd

  BuildRequires:      python%{python_pkgversion}-devel

  BuildRequires:      python%{python_pkgversion}-setuptools

- BuildRequires:      python%{python_pkgversion}-bcrypt

- 

- BuildRequires:      python%{python_pkgversion}-alembic

- BuildRequires:      python%{python_pkgversion}-arrow

- BuildRequires:      python%{python_pkgversion}-binaryornot

- BuildRequires:      python%{python_pkgversion}-bleach

- BuildRequires:      python%{python_pkgversion}-blinker

- BuildRequires:      python%{python_pkgversion}-chardet

- BuildRequires:      python%{python_pkgversion}-cryptography

- BuildRequires:      python%{python_pkgversion}-docutils

- BuildRequires:      python%{python_pkgversion}-flask

- BuildRequires:      python%{python_pkgversion}-flask-wtf

- BuildRequires:      python%{python_pkgversion}-flask-multistatic

- BuildRequires:      python%{python_pkgversion}-markdown

- BuildRequires:      python%{python_pkgversion}-nose

- BuildRequires:      python%{python_pkgversion}-psutil

- BuildRequires:      python%{python_pkgversion}-pygit2 >= %{min_pygit2_version}

- BuildRequires:      python%{python_pkgversion}-pygments

- BuildRequires:      python%{python_pkgversion}-fedora

- BuildRequires:      python%{python_pkgversion}-openid

- BuildRequires:      python%{python_pkgversion}-openid-cla

- BuildRequires:      python%{python_pkgversion}-openid-teams

- BuildRequires:      python%{python_pkgversion}-straight-plugin

- BuildRequires:      python%{python_pkgversion}-wtforms

- BuildRequires:      python%{python_pkgversion}-munch

- BuildRequires:      python%{python_pkgversion}-enum34

- BuildRequires:      python%{python_pkgversion}-redis

- 

- BuildRequires:      python%{python_pkgversion}-sqlalchemy > 0.8

- Requires:           python%{python_pkgversion}-sqlalchemy > 0.8

  

- Requires:           python%{python_pkgversion}-bcrypt

+ %if 0%{?rhel} && 0%{?rhel} <= 7

+ # Required only for the `fas` and `openid` authentication backends

+ Requires:           python%{python_pkgversion}-fedora-flask

+ # Required only for the `oidc` authentication backend

+ # flask-oidc

+ # Required only if `USE_FLASK_SESSION_EXT` is set to `True`

+ # flask-session

+ %else

+ Recommends:         python%{python_pkgversion}-fedora-flask

+ %endif

+ 

+ %if %{undefined python_enable_dependency_generator}

  Requires:           python%{python_pkgversion}-alembic

  Requires:           python%{python_pkgversion}-arrow

+ Requires:           python%{python_pkgversion}-bcrypt

  Requires:           python%{python_pkgversion}-binaryornot

  Requires:           python%{python_pkgversion}-bleach

  Requires:           python%{python_pkgversion}-blinker
@@ -66,21 +46,24 @@ 

  Requires:           python%{python_pkgversion}-docutils

  Requires:           python%{python_pkgversion}-enum34

  Requires:           python%{python_pkgversion}-flask

- Requires:           python%{python_pkgversion}-flask-wtf

  Requires:           python%{python_pkgversion}-flask-multistatic

+ Requires:           python%{python_pkgversion}-flask-wtf

  Requires:           python%{python_pkgversion}-markdown

+ Requires:           python%{python_pkgversion}-munch

  Requires:           python%{python_pkgversion}-pillow

  Requires:           python%{python_pkgversion}-psutil

- Requires:           python%{python_pkgversion}-pygit2 >= %{min_pygit2_version}

+ Requires:           python%{python_pkgversion}-pygit2 >= 0.24.0

  Requires:           python%{python_pkgversion}-pygments

- Requires:           python%{python_pkgversion}-fedora

  Requires:           python%{python_pkgversion}-openid

  Requires:           python%{python_pkgversion}-openid-cla

  Requires:           python%{python_pkgversion}-openid-teams

+ Requires:           python%{python_pkgversion}-redis

+ Requires:           python%{python_pkgversion}-requests

+ Requires:           python%{python_pkgversion}-six

+ Requires:           python%{python_pkgversion}-sqlalchemy >= 0.8

  Requires:           python%{python_pkgversion}-straight-plugin

  Requires:           python%{python_pkgversion}-wtforms

- Requires:           python%{python_pkgversion}-munch

- Requires:           python%{python_pkgversion}-redis

+ %endif

  

  %if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7)

  Requires:           mod_wsgi
@@ -140,6 +123,7 @@ 

  Summary:            A CI service for pagure

  BuildArch:          noarch

  Requires:           %{name} = %{version}-%{release}

+ Requires:           python%{python_pkgversion}-cryptography

  Requires:           python%{python_pkgversion}-jenkins

  %{?systemd_requires}

  %description        ci
@@ -171,7 +155,7 @@ 

  

  

  %prep

- %setup -q

+ %autosetup -p1

  

  # In case it gets broken in git at least the rpm will be good

  chmod +x pagure/hooks/files/*

file modified
-2
@@ -1,4 +1,2 @@ 

  cryptography

  python-jenkins

- trollius

- trololio

file modified
-1
@@ -1,2 +1,1 @@ 

- trollius

  trololio

@@ -1,2 +0,0 @@ 

- trollius

- trololio

file modified
+3 -8
@@ -2,11 +2,13 @@ 

  # Use this file by running "$ pip install -r requirements.txt"

  alembic

  arrow

+ bcrypt

  binaryornot

  bleach

  blinker

  celery

  chardet

+ cryptography

  docutils

  enum34

  flask<1.0
@@ -17,7 +19,7 @@ 

  munch

  Pillow

  psutil

- pygit2 >= 0.22.1

+ pygit2 >= 0.24.0

  pygments

  python-openid

  python-openid-cla
@@ -31,9 +33,6 @@ 

  straight.plugin

  wtforms

  

- # Needed only for local authentication and/or Pagure CI

- # cryptography

- 

  # Required only for the `oidc` authentication backend

  # flask-oidc

  
@@ -42,7 +41,3 @@ 

  

  # Required only for the `fas` and `openid` authentication backends

  # python-fedora

- 

- # Required only for the `local` authentication backend

- # bcrypt

- 

file modified
-3
@@ -4,9 +4,6 @@ 

  Setup script

  """

  

- # Required to build on EL6

- __requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']

- import pkg_resources

  import os

  import re

  

file modified
-1
@@ -7,7 +7,6 @@ 

  nose>=0.10.4

  nosexcover

  python-fedora

- trollius

  trololio

  fedmsg

  

no initial comment
13:29:27   Could not find a version that satisfies the requirement pygit2==0.26.5 (from versions: 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.21.2, 0.21.3, 0.21.4, 0.22.0, 0.22.1, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.24.0, 0.24.1, 0.24.2, 0.25.0, 0.25.1, 0.26.0, 0.26.1, 0.26.2, 0.26.3, 0.26.4, 0.27.0, 0.27.1)
13:29:27 No matching distribution found for pygit2==0.26.5

Not related to my commit.

Shouldn't this be 0%{?rhel} && 0%{?rhel} <= 7?

We've dropped the explicit trollius dependency in master, since python2-trololio pulls it in anyway, and when we switch to Python 3, we won't use trollius at all.

This is not needed, since this is a celery service. The Requires on the main package is enough.

This is not needed, since this is a celery service. The Requires on the main package is enough.

no, this applies only to el6 and below

this is not what requirements.txt say

this is not what requirements-webhook.txt say.

this is not what requirements-webhook.txt say.

@ignatenkobrain I'm not surprised about the requirements-*.txt files. They are still out of sync with the actual requirements for Pagure.

Drop the el6 bit, I don't think pagure will run there anymore.

2 new commits added

  • trollius → trololio
  • drop el6 bits
5 years ago

rebased onto e8ea3dc23943928f7d56093997c2da7b579d7b82

5 years ago

rebased onto e8ea3dc23943928f7d56093997c2da7b579d7b82

5 years ago

this is no longer true, it's required by the pagure core as well

I think it's even python-fedora-flask at the rpm level

Couple of small adjustments, the rest looks good to me :)

rebased onto 92e6a2fbfe6d9e1dbe602911405f9698b9e6e022

5 years ago

Looks good to me, could you rebase? We'll merge it :)

The Python 2 tests are going to fail unless we have something like a requirements-py2.txt that also installs trollius.

rebased onto 5d979b2

5 years ago

rebased onto e554eca

5 years ago

Commit 689d2fd fixes this pull-request

Pull-Request has been merged by pingou

5 years ago