diff --git a/debian/copyright b/debian/copyright index ab051037..5202ff0e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -6,7 +6,7 @@ Source: https://github.com/furlongm/patchman Files: * Copyright: 2011-2012 VPAC http://www.vpac.org 2013-2021 Marcus Furlong -License: GPL-3.0 +License: GPL-3.0-only 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; version 3 only. diff --git a/docker/Dockerfile b/docker/Dockerfile index 34a603a2..1ed337aa 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ FROM debian:bookworm-slim RUN apt -y update && apt -y upgrade -RUN apt install -y apache2 git libapache2-mod-wsgi-py3 mariadb-client python-celery-common python3-celery python3-debian python3-defusedxml python3-lxml python3-mysqldb python3-pip python3-progressbar python3-psycopg2 python3-redis python3-rpm +RUN apt install -y apache2 git libapache2-mod-wsgi-py3 mariadb-client python-celery-common python3-celery python3-debian python3-defusedxml python3-lxml python3-mysqldb python3-pip python3-progressbar python3-psycopg2 python3-redis python3-rpm sendmail sharutils uuid-runtime vim weasyprint WORKDIR /srv/patchman @@ -10,6 +10,10 @@ COPY ./etc/patchman/apache.conf.example /etc/apache2/sites-available/patchman.co RUN /srv/patchman/setup.py install +COPY ./email/patchman-email /usr/bin/patchman-email +COPY ./etc/patchman/patchman-email.conf /etc/patchman/patchman-email.conf +RUN chmod u+x /usr/bin/patchman-email + RUN a2enmod wsgi RUN a2ensite patchman diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index cf0ac72f..aa9b6618 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -105,6 +105,12 @@ if "${USE_CACHE}"; then fi fi +# Set sendmail destination +if [ -n "${MTA_HOST}" ]; then + echo "define(\`SMART_HOST', \`[$MTA_HOST]')dnl" >> /etc/mail/submit.mc + m4 /etc/mail/submit.mc > /etc/mail/submit.cf +fi + # Sync database on container first start if [ ! -f /var/lib/patchman/.firstrun ]; then patchman-manage makemigrations diff --git a/email/patchman-email b/email/patchman-email index c24b225f..d59a0a8c 100755 --- a/email/patchman-email +++ b/email/patchman-email @@ -145,7 +145,8 @@ report() { cat <<-EOF > "$FILE.html"