diff --git a/debian/control b/debian/control index 63a58356..0e3bf4c9 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: python Priority: optional Maintainer: Marcus Furlong Uploaders: Marcus Furlong -Build-Depends: debhelper (>=13), python3 (>= 3.11), dh-python, dh-exec +Build-Depends: debhelper (>=13), python3 (>= 3.11), dh-python, dh-exec, dh-systemd Standards-Version: 4.6.2 Homepage: https://github.com/furlongm/patchman Vcs-Git: git://github.com/furlongm/patchman @@ -18,10 +18,10 @@ Depends: ${misc:Depends}, python3 (>= 3.11), python3-django (>= 4.2), python3-djangorestframework, python3-django-filters, python3-debian, python3-rpm, python3-tqdm, python3-defusedxml, python3-pip, python3-tenacity, python3-requests, python3-colorama, python3-magic, python3-humanize, - python3-pymemcache, python3-yaml, memcached, libapache2-mod-wsgi-py3, - apache2, python3-django-taggit, python3-celery, python3-django-celery-beat, - python3-redis, python3-git -Suggests: python3-mysqldb, python3-psycopg2 + python3-yaml, libapache2-mod-wsgi-py3, apache2, + celery, python3-celery, python3-django-celery-beat, redis-server, + python3-redis, python3-git, python3-django-taggit +Suggests: python3-mysqldb, python3-psycopg2, python3-pymemcache, memcached Description: Django-based patch status monitoring tool for linux systems. . Patchman provides a web interface for monitoring host package updates. diff --git a/debian/python3-patchman.postinst b/debian/python3-patchman.postinst index ade265b8..94983068 100644 --- a/debian/python3-patchman.postinst +++ b/debian/python3-patchman.postinst @@ -12,6 +12,8 @@ if [ "$1" = "configure" ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke enconf patchman.conf + adduser --system --group patchman-celery + patchman-set-secret-key chown www-data /etc/patchman/local_settings.py diff --git a/debian/rules b/debian/rules index 63a1916b..c1612816 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,7 @@ clean:: export PYBUILD_NAME=patchman %: - dh $@ --with python3 --buildsystem=pybuild + dh $@ --with=python3 --buildsystem=pybuild --with=systemd override_dh_auto_test: true diff --git a/errata/__init__.py b/errata/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/etc/patchman/celery.conf b/etc/patchman/celery.conf new file mode 100644 index 00000000..7afc96ee --- /dev/null +++ b/etc/patchman/celery.conf @@ -0,0 +1,2 @@ +REDIS_HOST=127.0.0.1 +REDIS_PORT=6379 diff --git a/etc/systemd/system/patchman-celery.service b/etc/systemd/system/patchman-celery.service index 805a3d19..6408d818 100644 --- a/etc/systemd/system/patchman-celery.service +++ b/etc/systemd/system/patchman-celery.service @@ -7,7 +7,7 @@ After=network-onlne.target Type=simple User=patchman-celery Group=patchman-celery -EnvironmentFile=/etc/patchman/celery +EnvironmentFile=/etc/patchman/celery.conf ExecStart=/usr/bin/celery --broker redis://${REDIS_HOST}:${REDIS_PORT}/0 --app patchman worker --loglevel info --beat --scheduler django_celery_beat.schedulers:DatabaseScheduler --task-events --pool threads [Install] diff --git a/security/__init__.py b/security/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/setup.cfg b/setup.cfg index 25fea4a1..b7253320 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,6 +25,9 @@ requires = /usr/bin/python3 python3-importlib-metadata python3-cvss python3-redis + redis-server + celery + python3-django-celery-beat python3-GitPython policycoreutils-python-utils httpd