Projet

Général

Profil

0001-python3-adapt-debian-packaging-40372.patch

Paul Marillonnet, 15 avril 2020 17:38

Télécharger (9,99 ko)

Voir les différences:

Subject: [PATCH 1/2] python3: adapt debian packaging (#40372)

 debian/authentic2-multitenant.init            |  2 +-
 debian/authentic2-multitenant.service         |  2 +-
 debian/authentic2.init                        |  4 +-
 debian/control                                | 82 +++++++++----------
 .../multitenant/authentic2-multitenant-manage |  2 +-
 debian/py3dist-overrides                      | 17 ++++
 debian/pydist-overrides                       | 14 ----
 ...uthentic2.dirs => python3-authentic2.dirs} |  0
 ...uthentic2.docs => python3-authentic2.docs} |  0
 ...ic2.install => python3-authentic2.install} |  0
 debian/rules                                  |  8 +-
 11 files changed, 66 insertions(+), 65 deletions(-)
 create mode 100644 debian/py3dist-overrides
 delete mode 100644 debian/pydist-overrides
 rename debian/{python-authentic2.dirs => python3-authentic2.dirs} (100%)
 rename debian/{python-authentic2.docs => python3-authentic2.docs} (100%)
 rename debian/{python-authentic2.install => python3-authentic2.install} (100%)
debian/authentic2-multitenant.init
16 16
PATH=/sbin:/usr/sbin:/bin:/usr/bin
17 17
DESC=authentic2
18 18
NAME=authentic2-multitenant
19
DAEMON=/usr/bin/gunicorn
19
DAEMON=/usr/bin/gunicorn3
20 20
PID_DIR=/var/run/$NAME
21 21
CACHE_DIR=/var/cache/$NAME
22 22
LOG_DIR=/var/log/$NAME
debian/authentic2-multitenant.service
10 10
Group=authentic-multitenant
11 11
ExecStartPre=/usr/bin/authentic2-multitenant-manage migrate_schemas --noinput
12 12
ExecStartPre=/usr/bin/authentic2-multitenant-manage collectstatic --noinput
13
ExecStart=/usr/bin/gunicorn \
13
ExecStart=/usr/bin/gunicorn3 \
14 14
          --bind unix:/run/%p/%p.sock \
15 15
          --worker-class=sync \
16 16
          --workers 5 \
debian/authentic2.init
16 16
PATH=/sbin:/usr/sbin:/bin:/usr/bin
17 17
DESC=authentic2
18 18
NAME=authentic2
19
DAEMON=/usr/bin/gunicorn
19
DAEMON=/usr/bin/gunicorn3
20 20
PID_DIR=/var/run/$NAME
21 21
CACHE_DIR=/var/cache/$NAME
22 22
LOG_DIR=/var/log/$NAME
......
129 129

  
130 130
do_migrate() {
131 131
    log_action_msg "Applying new migrations .."
132
    VERSION=`dpkg-query --show --showformat '${Version}' python-django`
132
    VERSION=`dpkg-query --show --showformat '${Version}' python3-django`
133 133
    if dpkg --compare-versions $VERSION lt 1.7; then
134 134
      su $USER -p -c "$MANAGE_SCRIPT syncdb --migrate --noinput"
135 135
    else
debian/control
2 2
Section: python
3 3
Priority: optional
4 4
Maintainer: Jerome Schneider <jschneider@entrouvert.com>
5
Build-Depends-Indep: python-all-dev (>= 2.6)
6
Build-Depends: debhelper (>= 9.0), python-setuptools, python-django (>= 1.5), dh-python, dh-systemd
7
Standards-Version: 3.8.3
5
Build-Depends-Indep: python3-all-dev
6
Build-Depends: debhelper (>= 9), dh-python, dh-systemd, python3-setuptools, python3-django
7
Standards-Version: 3.9.6
8 8
Homepage: http://authentic.labs.libre-entreprise.org
9
X-Python-Version: >= 2.7
10 9

  
11
Package: python-authentic2
10
Package: python3-authentic2
12 11
Architecture: all
13 12
Depends: ${misc:Depends}, ${python:Depends},
14
    python-django (>= 1:1.11),
13
    python3-django (>= 1:1.11),
15 14
    openssl,
16
    python-requests (>=2.3),
17
    python-django-model-utils (>= 2.4),
18
    python-lasso (>= 2.4.1.100),
19
    python-dnspython (>= 1.10),
20
    python-django-select2 (>= 5),
21
    python-gadjo (>= 0.53),
22
    python-django-tables2 (>= 1),
23
    python-django-import-export (>= 1),
24
    python-django-import-export (< 2),
25
    python-djangorestframework (>= 3.3),
26
    python-markdown (>= 2.1),
27
    python-ldap (>= 2.4),
28
    python-six (>= 1.0),
29
    python-jwcrypto (>= 0.3.1),
30
    python-cryptography (>= 1.3.4),
31
    python-django-filters (>= 1),
32
    python-django-filters (<< 2),
33
    python-pil,
34
    python-tablib,
35
    python-chardet,
36
    python-attr (>=17),
37
    python-pycryptodome,
38
    python-atomicwrites
39
Breaks: python-authentic2-auth-fc (<< 0.26)
40
Replaces: python-authentic2-auth-fc (<< 0.26)
41
Provides: ${python:Provides}, python-authentic2-auth-fc
42
Recommends: python-ldap
43
Suggests: python-raven
15
    python3-requests (>=2.3),
16
    python3-requests-oauthlib,
17
    python3-django-model-utils (>= 2.4),
18
    python3-lasso (>= 2.4.1.100),
19
    python3-dnspython (>= 1.10),
20
    python3-django-select2 (>= 5),
21
    python3-gadjo (>= 0.53),
22
    python3-django-tables2 (>= 1),
23
    python3-django-import-export (>= 1),
24
    python3-django-import-export (< 2),
25
    python3-djangorestframework (>= 3.3),
26
    python3-django-ratelimit,
27
    python3-markdown (>= 2.1),
28
    python3-ldap (>= 2.4),
29
    python3-six (>= 1.0),
30
    python3-jwcrypto (>= 0.3.1),
31
    python3-cryptography (>= 1.3.4),
32
    python3-django-filters (>= 1),
33
    python3-django-filters (<< 2),
34
    python3-pil,
35
    python3-tablib,
36
    python3-chardet,
37
    python3-attr (>=17),
38
    python3-pycryptodome,
39
    python3-atomicwrites
44 40
Description: Versatile identity server
45 41
 Authentic is a versatile identity provider aiming to address a broad
46 42
 range of needs, from simple to complex setups; it has support for many
......
52 48
Package: authentic2
53 49
Architecture: all
54 50
Depends: ${misc:Depends}, adduser,
55
    python-authentic2 (= ${binary:Version}),
56
    python-psycopg2,
57
    gunicorn, dbconfig-common,
51
    python3-authentic2 (= ${binary:Version}),
52
    python3-psycopg2,
53
    gunicorn3, dbconfig-common,
58 54
    debconf | debconf-2.0, ucf
59 55
Recommends: postgresql-client
60 56
Suggests: nginx, postgresql
......
69 65
Package: authentic2-multitenant
70 66
Architecture: all
71 67
Depends: ${misc:Depends}, adduser,
72
    python-authentic2 (= ${binary:Version}),
73
    python-psycopg2,
74
    python-django-tenant-schemas (>= 1.5.2.1),
75
    python-hobo,
76
    python-jwcrypto (>= 0.4.2),
77
    gunicorn, dbconfig-common,
68
    python3-authentic2 (= ${binary:Version}),
69
    python3-psycopg2,
70
    python3-django-tenant-schemas (>= 1.5.2.1),
71
    python3-hobo,
72
    python3-jwcrypto (>= 0.4.2),
73
    gunicorn3, dbconfig-common,
78 74
    debconf | debconf-2.0, ucf
79 75
Recommends: postgresql-client
80 76
Suggests: nginx, postgresql
debian/multitenant/authentic2-multitenant-manage
16 16
    fi
17 17
fi
18 18

  
19
python ${MANAGE} "$@"
19
python3 ${MANAGE} "$@"
debian/py3dist-overrides
1
django                  python3-django
2
requests                python3-requests
3
django-model-utils      python3-django-model-utils
4
dnspython               python3-dnspython
5
django-select2          python3-django-select2
6
django-tables           python3-django-tables2
7
gadjo                   python3-gadjo
8
XStatic_jQuery          python3-xstatic-jquery
9
XStatic_jquery_ui       python3-xstatic-jquery-ui
10
django-import-export    python3-django-import-export
11
django-sekizai          python3-django-sekizai
12
six                     python3-six
13
pycryptodome            python3-pycryptodome
14
ldaptools               python3-ldaptools
15
django-mellon           python3-django-mellon
16
django-ratelimit        python3-django-ratelimit
17
requests-oauthlib       python3-requests-oauthlib
debian/pydist-overrides
1
django                  python-django
2
requests                python-requests
3
django-model-utils      python-django-model-utils
4
dnspython               python-dnspython
5
django-select2          python-django-select2
6
django-tables           python-django-tables2
7
gadjo                   python-gadjo
8
XStatic_jQuery          python-xstatic-jquery
9
XStatic_jquery_ui       python-xstatic-jquery-ui
10
django-import-export    python-django-import-export
11
six                     python-six
12
pycryptodome            python-pycryptodome
13
ldaptools               python-ldaptools
14
django-mellon           python-django-mellon
debian/rules
1 1
#!/usr/bin/make -f
2 2

  
3
export PYBUILD_DISABLE=test
4

  
3 5
authentic2=$(CURDIR)/debian/authentic2
4
pythonauthentic2=$(CURDIR)/debian/python-authentic2
6
python3authentic2=$(CURDIR)/debian/python3-authentic2
5 7

  
6 8
%:
7
	dh $@ --with python2,systemd
9
	dh $@ --with python3,systemd --buildsystem=pybuild
8 10

  
9 11
override_dh_install:
10 12
	dh_install
11
	mv $(CURDIR)/debian/tmp/usr/bin/authentic2-ctl $(pythonauthentic2)/usr/lib/authentic2/manage.py
13
	mv $(CURDIR)/debian/tmp/usr/bin/authentic2-ctl $(python3authentic2)/usr/lib/authentic2/manage.py
12 14

  
13
-