Commit bce04ab3 authored by Raphaël Hertzog's avatar Raphaël Hertzog

Update the packaging for a first release

Install a new systemd service to run gunicorn3 for our website.
parent b5d6cd9d
distro-tracker (0.20170119) UNRELEASED; urgency=low
distro-tracker (1.0.0) unstable; urgency=low
* Initial release.
* Initial release with Python 3 only.
-- Raphaël Hertzog <hertzog@debian.org> Thu, 10 Jul 2014 21:07:29 +0200
-- Raphaël Hertzog <hertzog@debian.org> Fri, 08 Dec 2017 14:04:45 +0100
......@@ -2,9 +2,8 @@ Source: distro-tracker
Section: web
Priority: optional
Maintainer: Raphaël Hertzog <hertzog@debian.org>
Build-Depends: debhelper (>= 9),
Build-Depends: debhelper (>= 10),
dh-python,
dh-systemd,
python3-all (>= 2.6.6-3~),
python3-sphinx,
# Usual runtime dependencies
......@@ -19,7 +18,7 @@ Build-Depends: debhelper (>= 9),
python3-requests (>= 2),
python3-yaml,
python3-pyinotify,
Standards-Version: 3.9.5
Standards-Version: 4.1.2
Homepage: https://wiki.debian.org/qa.debian.org/distro-tracker
Vcs-Git: git://anonscm.debian.org/qa/distro-tracker.git
Vcs-Browser: https://anonscm.debian.org/cgit/qa/distro-tracker.git
......@@ -34,7 +33,7 @@ Depends: python3,
ssl-cert,
nginx | apache2 | httpd,
gunicorn3 | libapache2-mod-wsgi-py3,
${python:Depends},
${python3:Depends},
${misc:Depends}
Recommends: postgresql
Description: follow the status of packages of a Debian-based distribution
......@@ -51,10 +50,10 @@ Description: follow the status of packages of a Debian-based distribution
Package: python3-distro-tracker
Section: python
Architecture: all
Depends: ${python:Depends},
Depends: ${python3:Depends},
python3-django-email-accounts (= ${source:Version}),
python3-apt,
python3-beautifulsoup,
python3-bs4,
python3-debian,
python3-debianbts,
python3-django (>= 1:1.11),
......@@ -75,7 +74,7 @@ Description: Python libraries of Distro Tracker
Package: python3-django-email-accounts
Section: python
Architecture: all
Depends: ${python:Depends},
Depends: ${python3:Depends},
python3-django (>= 1:1.11),
${misc:Depends}
Recommends: python3-django-captcha
......
......@@ -3,8 +3,7 @@ Upstream-Name: DistroTracker
Source: https://anonscm.debian.org/cgit/qa/distro-tracker.git
Files: *
Copyright: 2013 Marko Lalic <marko.lalic@gmail.com>
2013 Raphaël Hertzog <hertzog@debian.org>
Copyright: 2013-2017 The Distro Tracker Developers
License: GPL-2.0+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
......@@ -33,7 +33,7 @@ to take care of:
Configuration with Nginx + Gunicorn
-----------------------------------
If you wish to use nginx, you should also install gunicorn (they are
If you wish to use nginx, you should also install gunicorn3 (they are
probably already installed by way of dependencies unless you already had a
webserver installed).
......@@ -41,7 +41,7 @@ The package provides a sample gunicorn configuration to run the Distro
Tracker application on /var/lib/distro-tracker/gunicorn.sock and the
corresponding nginx virtual host.
$ sudo apt-get install nginx gunicorn
$ sudo apt-get install nginx gunicorn3
$ sudo cp /etc/gunicorn.d/distro-tracker.example \
/etc/gunicorn.d/distro-tracker
$ sudo service gunicorn restart
......@@ -53,11 +53,11 @@ $ sudo service nginx restart
Configuration with Apache + mod_wsgi
------------------------------------
If you wish to use apache2, you should also install libapache2-mod-wsgi.
The package provides a sample virtual host configuration file that
you can customize and enable:
If you wish to use apache2, you should also install
libapache2-mod-wsgi-py3. The package provides a sample virtual host
configuration file that you can customize and enable:
$ sudo apt-get install apache2 libapache2-mod-wsgi
$ sudo apt-get install apache2 libapache2-mod-wsgi-py3
$ sudo vim /etc/apache2/sites-available/distro-tracker
$ sudo a2enmod ssl
$ sudo a2ensite distro-tracker
......
[Unit]
Description=Distro Tracker Website run with gunicorn3
After=network.target
[Install]
WantedBy=multi-user.target
[Service]
User=distro-tracker
Group=distro-tracker
Restart=always
ExecStart=/usr/bin/gunicorn3 --bind=unix:/var/lib/distro-tracker/gunicorn.sock --workers=4 distro_tracker.project.wsgi
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
WorkingDirectory=/var/lib/distro-tracker/
PrivateTmp=true
debian/gunicorn/distro-tracker.example etc/gunicorn.d/
debian/nginx/distro-tracker etc/nginx/sites-available/
debian/apache/distro-tracker etc/apache2/sites-available/
data/templates/README var/lib/distro-tracker/templates/
CONFIG = {
'mode': 'wsgi',
#'environment': {
# 'PYTHONPATH': '/path/to/custom/python/packages',
#},
'working_dir': '/var/lib/distro-tracker/',
'user': 'distro-tracker',
'group': 'distro-tracker',
'args': (
'--bind=unix:/var/lib/distro-tracker/gunicorn.sock',
'--workers=4',
'distro_tracker.project.wsgi',
),
}
......@@ -34,3 +34,4 @@ endif
override_dh_systemd_enable:
dh_systemd_enable --name=distro-tracker-mail
dh_systemd_enable --name=distro-tracker-web
......@@ -3,7 +3,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXBUILD = /usr/share/sphinx/scripts/python3/sphinx-build
PAPER =
BUILDDIR = _build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment