Hello community,

here is the log from the commit of package pagure for openSUSE:Leap:15.2 
checked in at 2020-05-24 18:08:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/pagure (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.pagure.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pagure"

Sun May 24 18:08:34 2020 rev:13 rq:807971 version:5.10.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/pagure/pagure.changes  2020-05-21 
12:59:18.254790459 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.pagure.new.2738/pagure.changes        
2020-05-24 18:08:34.250093740 +0200
@@ -1,0 +2,7 @@
+Wed May 20 23:34:26 UTC 2020 - Neal Gompa <ngomp...@gmail.com>
+
+- Fix typo in quickstart on ssh directory mode 
+- Backport support for STARTTLS support for SMTP servers
+  + Patch: 0001-Add-support-for-smtp-server-requiring-starttls-to-wo.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Add-support-for-smtp-server-requiring-starttls-to-wo.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pagure.spec ++++++
--- /var/tmp/diff_new_pack.H73Uqj/_old  2020-05-24 18:08:34.758094838 +0200
+++ /var/tmp/diff_new_pack.H73Uqj/_new  2020-05-24 18:08:34.758094838 +0200
@@ -43,7 +43,8 @@
 # Backports from upstream
 ## Backport fix to make stats page work
 Patch0001:          
0001-Make-the-stats-page-use-the-new-stats-API-endpoint.patch
-
+## Backport support for STARTTLS support for SMTP servers
+Patch0002:          
0001-Add-support-for-smtp-server-requiring-starttls-to-wo.patch
 
 # SUSE-specific fixes
 ## Change the defaults in the example config to match packaging

++++++ 0001-Add-support-for-smtp-server-requiring-starttls-to-wo.patch ++++++
>From 4196a3772693a79f1e5db12fa937bcee8280e248 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pin...@pingoured.fr>
Date: Mon, 18 May 2020 15:57:05 +0200
Subject: [PATCH] Add support for smtp server requiring starttls to work

Signed-off-by: Pierre-Yves Chibon <pin...@pingoured.fr>
---
 doc/configuration.rst | 27 +++++++++++++++++++++++++++
 pagure/lib/notify.py  | 14 ++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/doc/configuration.rst b/doc/configuration.rst
index 41f29b96..25dee387 100644
--- a/doc/configuration.rst
+++ b/doc/configuration.rst
@@ -961,6 +961,33 @@ should be secured over SSL.
 Defaults to: ``False``
 
 
+SMTP_STARTTLS
+^^^^^^^^^^^^^
+
+This configuration key specifies instructs pagure to starts connecting to
+the SMTP server via a `starttls` command.
+
+Defaults to: ``False``
+
+
+SMTP_KEYFILE
+^^^^^^^^^^^^
+
+This configuration key allows to specify a key file to be used in the
+`starttls` command when connecting to the smtp server.
+
+Defaults to: ``None``
+
+
+SMTP_CERTFILE
+^^^^^^^^^^^^
+
+This configuration key allows to specify a certificate file to be used in
+the `starttls` command when connecting to the smtp server.
+
+Defaults to: ``None``
+
+
 SMTP_USERNAME
 ^^^^^^^^^^^^^
 
diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py
index 7670ad15..2c4ee30f 100644
--- a/pagure/lib/notify.py
+++ b/pagure/lib/notify.py
@@ -505,6 +505,20 @@ def send_email(
                         pagure_config["SMTP_SERVER"],
                         pagure_config["SMTP_PORT"],
                     )
+
+            if pagure_config["SMTP_STARTTLS"]:
+                context = ssl.create_default_context()
+                keyfile = pagure_config.get("SMTP_KEYFILE") or None
+                certfile = pagure_config.get("SMTP_CERTFILE") or None
+                respcode, _ = smtp.starttls(
+                    keyfile=keyfile, certfile=certfile, context=context,
+                )
+                if respcode != 220:
+                    _log.warning(
+                        "The starttls command did not return the 220 "
+                        "response code expected."
+                    )
+
             if (
                 pagure_config["SMTP_USERNAME"]
                 and pagure_config["SMTP_PASSWORD"]
-- 
2.26.1

++++++ pagure-README.SUSE ++++++
--- /var/tmp/diff_new_pack.H73Uqj/_old  2020-05-24 18:08:34.818094969 +0200
+++ /var/tmp/diff_new_pack.H73Uqj/_new  2020-05-24 18:08:34.818094969 +0200
@@ -8,7 +8,7 @@
 mkdir -p /srv/gitolite/remotes
 mkdir -p /srv/gitolite/.gitolite/{conf,keydir,logs}
 mkdir -p /srv/gitolite/.ssh
-chmod 700 /srv/gitolite/.ssh
+chmod 750 /srv/gitolite/.ssh
 
 touch /srv/gitolite/.gitolite/conf/gitolite.conf
 


Reply via email to