misc: add debian packaging (#74029)

This commit is contained in:
Frédéric Péters 2023-01-31 16:29:01 +01:00 committed by Gitea
parent 66b3f5ed25
commit 6adda9aca2
11 changed files with 122 additions and 0 deletions

7
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,7 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://git.entrouvert.org/pre-commit-debian.git
rev: v0.1
hooks:
- id: pre-commit-debian

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
gitea-redmine (0-1) UNRELEASED; urgency=medium
* Initial packaging.
-- Frederic Peters <fpeters@entrouvert.com> Tue, 31 Jan 2023 15:58:56 +0100

21
debian/control vendored Normal file
View File

@ -0,0 +1,21 @@
Source: gitea-redmine
Section: web
Priority: optional
Maintainer: Frederic Peters <fpeters@entrouvert.com>
Rules-Requires-Root: no
Build-Depends: debhelper-compat (= 13),
dh-sequence-python3,
python3-all,
python3-setuptools,
Standards-Version: 4.6.2
Package: gitea-redmine
Architecture: all
Depends: python3-flask,
python3-redminelib,
uwsgi,
uwsgi-plugin-python3,
${misc:Depends},
${python3:Depends},
Description: gitea/redmine status syncs
Micro application to update redmine issue status on gitea PR changes.

25
debian/copyright vendored Normal file
View File

@ -0,0 +1,25 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://dev.entrouvert.org/projects/gitea-redmine
Upstream-Name: gitea-redmine
Upstream-Contact: info@entrouvert.com
Files:
*
Copyright:
2022-2023 Entrouvert
License: GPL-2+
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
Comment:
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

1
debian/gitea-redmine.install vendored Normal file
View File

@ -0,0 +1 @@
debian/uwsgi.ini /etc/gitea-redmine

23
debian/gitea-redmine.service vendored Normal file
View File

@ -0,0 +1,23 @@
[Unit]
Description=Gitea Redmine (Webhook forwarder)
After=syslog.target network.target
[Service]
Environment=REDMINE_URL=https://dev.entrouvert.org/
Environment=INCOMING_WEBHOOK_SECRET=XXX
Environment=REDMINE_API_KEY=XXX
Environment=LANG=C.UTF-8
User=www-data
Group=www-data
ExecStart=/usr/bin/uwsgi --ini /etc/%p/uwsgi.ini
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGQUIT
TimeoutStartSec=0
PrivateTmp=true
Restart=on-failure
RuntimeDirectory=gitea-redmine
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target

7
debian/rules vendored Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/make -f
export PYBUILD_NAME=gitea-redmine
export PYBUILD_DISABLE=test
%:
dh $@ --with python3 --buildsystem=pybuild

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

1
debian/source/options vendored Normal file
View File

@ -0,0 +1 @@
extend-diff-ignore = "^[^/]*[.]egg-info/"

30
debian/uwsgi.ini vendored Normal file
View File

@ -0,0 +1,30 @@
[uwsgi]
auto-procname = true
procname-prefix-spaced = gitea-redmine
strict = true
plugin = python3
single-interpreter = true
module = gitea_redmine:app
need-app = true
http-socket = /run/gitea-redmine/gitea-redmine.sock
chmod-socket = 666
vacuum = true
master = true
processes = 5
enable-threads = true
harakiri = 120
max-requests = 500
max-worker-lifetime = 7200
buffer-size = 32768
ignore-sigpipe = true
disable-write-exception = true
if-file = /etc/gitea-redmine/uwsgi-local.ini
include = /etc/gitea-redmine/uwsgi-local.ini
endif =

View File

@ -7,6 +7,7 @@ setup(
author='Agate Berriot',
author_email='aberriot@entrouvert.com',
packages=find_packages(exclude=['tests']),
py_modules=['gitea_redmine'],
include_package_data=True,
url='https://gitea.entrouvert.org/entrouvert/gitea-redmine',
classifiers=[