From f410b8574e985d09c52855b6ecda7c4bf316f536 Mon Sep 17 00:00:00 2001 From: gethvi Date: Mon, 8 Jan 2024 14:30:36 +0100 Subject: [PATCH] Updates debian packaging. --- .reuse/dep5 | 4 ++++ debian/conffiles | 1 + debian/control | 14 +++++++++++--- debian/intelmq.install | 2 ++ debian/rules | 5 +++-- debian/systemd/intelmq.service | 17 +++++++++++++++++ intelmq/bots/collectors/__init__.py | 0 7 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 debian/systemd/intelmq.service create mode 100644 intelmq/bots/collectors/__init__.py diff --git a/.reuse/dep5 b/.reuse/dep5 index 3107a9771..34994ac1e 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -18,6 +18,10 @@ Files: debian/* Copyright: 2016 Intevation GmbH License: AGPL-3.0-or-later +Files: debian/systemd/intelmq.service +Copyright: 2023 Filip Pokorný +License: AGPL-3.0-or-later + Files: debian/cron.d/intelmq-update-database Copyright: 2020 gethvi License: AGPL-3.0-or-later diff --git a/debian/conffiles b/debian/conffiles index 510e47997..3a1150adc 100644 --- a/debian/conffiles +++ b/debian/conffiles @@ -1,2 +1,3 @@ /etc/intelmq/harmonization.conf /etc/intelmq/runtime.yaml +/etc/intelmq/intelmq.yaml diff --git a/debian/control b/debian/control index b47388c4e..c4b1ce8cb 100644 --- a/debian/control +++ b/debian/control @@ -15,9 +15,11 @@ Build-Depends: debhelper (>= 4.1.16), python3-requests-mock, python3-ruamel.yaml, python3-setuptools, - python3-sphinx, - python3-sphinx-rtd-theme, python3-termstyle (>= 0.1.10), + python3-fastapi, + python3-typing-extensions, + python3-multipart, + python3-gunicorn, python3-tz, quilt, rsync, @@ -32,6 +34,7 @@ Architecture: all Depends: bash-completion, cron, jq, + dbconfig-sqlite3 | dbconfig-no-thanks, python3-dateutil (>= 2.5), python3-dnspython (>= 2.0.0), python3-openssl, @@ -40,12 +43,17 @@ Depends: bash-completion, python3-requests (>= 2.2.0), python3-ruamel.yaml, python3-termstyle (>= 0.1.10), + python3-fastapi, + python3-typing-extensions, + python3-multipart, + python3-uvicorn, + python3-uvloop, + python3-httptools, python3-tz, python3-importlib-metadata, redis-server, systemd, ${misc:Depends}, - ${sphinxdoc:Depends}, ${python3:Depends} Suggests: python3-geoip2 (>= 2.2.0), python3-imbox (>= 0.8), diff --git a/debian/intelmq.install b/debian/intelmq.install index 0923c69b0..82cb54c3e 100644 --- a/debian/intelmq.install +++ b/debian/intelmq.install @@ -1,7 +1,9 @@ debian/cron.d/intelmq-update-database etc/cron.d/ +debian/systemd/intelmq.service lib/systemd/system/ contrib/logrotate/intelmq etc/logrotate.d/ contrib/bash-completion/intelmqctl usr/share/bash-completion/completions/ contrib/bash-completion/intelmqdump usr/share/bash-completion/completions/ intelmq/bots/experts/modify/examples/* usr/share/doc/intelmq/bots/experts/modify/examples/ intelmq/etc/runtime.yaml etc/intelmq/ intelmq/etc/harmonization.conf etc/intelmq/ +intelmq/etc/intelmq.yaml etc/intelmq/ diff --git a/debian/rules b/debian/rules index 438e18d6c..9a0998174 100755 --- a/debian/rules +++ b/debian/rules @@ -17,13 +17,13 @@ BOTDOCS := $(foreach bot,$(BOTS),$(wildcard $(bot)/*.md)) # Wed, 23 Mar 2016 17:49:26 +0000 export PYBUILD_NAME=intelmq %: - dh $@ --with python3,sphinxdoc --without python2 --buildsystem=pybuild --with quilt --with systemd + dh $@ --with python3 --without python2 --buildsystem=pybuild --with quilt --with systemd build: if [ $(CODENAME) = 'xenial' ] || [ $(CODENAME) = 'jessie' ]; then\ patch -p1 setup.py debian/patches/fix-dnspython-name.patch;\ fi - dh build --with python3,sphinxdoc --without python2 --buildsystem=pybuild --with quilt --with systemd + dh build --with python3 --without python2 --buildsystem=pybuild --with quilt --with systemd # These tests frequently fail on Ubuntu and Debian systems. # On some systems this command will be executed twice, so -f rm -rf intelmq/tests/bots/collectors/tcp/ @@ -39,6 +39,7 @@ override_dh_auto_install: $(BOTDOCS) dh_auto_install # create directories mkdir -p debian/intelmq/var/log/intelmq + mkdir -p debian/intelmq/var/lib/intelmq/server mkdir -p debian/intelmq/var/lib/intelmq/bots/file-output mkdir -p debian/intelmq/etc/logrotate.d mkdir -p debian/intelmq/var/lib/intelmq/bots/modify/ diff --git a/debian/systemd/intelmq.service b/debian/systemd/intelmq.service new file mode 100644 index 000000000..3f22ae9c8 --- /dev/null +++ b/debian/systemd/intelmq.service @@ -0,0 +1,17 @@ +[Unit] +Description=IntelMQ server app +After=network.target + +[Service] +User=intelmq +Group=intelmq +RuntimeDirectory=intelmq +WorkingDirectory=/var/lib/intelmq/ +ExecStart=intelmq server start +ExecReload=/bin/kill -s HUP $MAINPID +KillMode=mixed +TimeoutStopSec=5 +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/intelmq/bots/collectors/__init__.py b/intelmq/bots/collectors/__init__.py new file mode 100644 index 000000000..e69de29bb