Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package b4 for openSUSE:Factory checked in 
at 2021-08-18 08:55:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/b4 (Old)
 and      /work/SRC/openSUSE:Factory/.b4.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "b4"

Wed Aug 18 08:55:44 2021 rev:19 rq:912315 version:0.7.3+0

Changes:
--------
--- /work/SRC/openSUSE:Factory/b4/b4.changes    2021-07-28 19:21:08.731548505 
+0200
+++ /work/SRC/openSUSE:Factory/.b4.new.1899/b4.changes  2021-08-18 
08:56:28.550935120 +0200
@@ -1,0 +2,9 @@
+Mon Aug 16 05:16:15 UTC 2021 - [email protected]
+
+- Update to version 0.7.3+0:
+  * Handle decoding incorrectly encoded headers
+  * Avoid decoding errors when extracting message ID from stdin
+  * Don't consider signature contents for trailers
+  * Sanitize msgid before using it as savename
+
+-------------------------------------------------------------------

Old:
----
  b4-0.7.2+3.obscpio

New:
----
  b4-0.7.3+0.obscpio

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

Other differences:
------------------
++++++ b4.spec ++++++
--- /var/tmp/diff_new_pack.zXLCFP/_old  2021-08-18 08:56:28.978934617 +0200
+++ /var/tmp/diff_new_pack.zXLCFP/_new  2021-08-18 08:56:28.982934613 +0200
@@ -16,9 +16,9 @@
 #
 
 
-%define version_unconverted 0.7.2+3
+%define version_unconverted 0.7.3+0
 Name:           b4
-Version:        0.7.2+3
+Version:        0.7.3+0
 Release:        0
 Summary:        Helper scripts for kernel.org patches
 License:        GPL-2.0-or-later

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.zXLCFP/_old  2021-08-18 08:56:29.030934556 +0200
+++ /var/tmp/diff_new_pack.zXLCFP/_new  2021-08-18 08:56:29.030934556 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">git://git.kernel.org/pub/scm/utils/b4/b4.git</param>
-              <param 
name="changesrevision">06cc7c8820aea85d1329911b785d7bf4ecaacb1f</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">f0b57f653da90401b458ee66528c03dbd7c759a6</param></service></servicedata>
\ No newline at end of file

++++++ b4-0.7.2+3.obscpio -> b4-0.7.3+0.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/b4-0.7.2+3/b4/__init__.py 
new/b4-0.7.3+0/b4/__init__.py
--- old/b4-0.7.2+3/b4/__init__.py       2021-06-22 21:16:12.000000000 +0200
+++ new/b4-0.7.3+0/b4/__init__.py       2021-08-13 16:39:58.000000000 +0200
@@ -43,7 +43,7 @@
 except ModuleNotFoundError:
     can_patatt = False
 
-__VERSION__ = '0.7.3-dev'
+__VERSION__ = '0.7.3'
 
 logger = logging.getLogger('b4')
 
@@ -1161,7 +1161,7 @@
             if hcs is None:
                 hcs = 'utf-8'
             try:
-                decoded += hstr.decode(hcs)
+                decoded += hstr.decode(hcs, errors='replace')
             except LookupError:
                 # Try as utf-u
                 decoded += hstr.decode('utf-8', errors='replace')
@@ -1252,8 +1252,11 @@
 
     @staticmethod
     def find_trailers(body, followup=False):
-        headers = ('subject', 'date', 'from')
-        nonperson = ('fixes', 'subject', 'date', 'link', 'buglink', 
'obsoleted-by')
+        ignores = {'phone', 'email'}
+        headers = {'subject', 'date', 'from'}
+        nonperson = {'fixes', 'subject', 'date', 'link', 'buglink', 
'obsoleted-by'}
+        # Ignore everything below standard email signature marker
+        body = body.split('\n-- \n', 1)[0].strip() + '\n'
         # Fix some more common copypasta trailer wrapping
         # Fixes: abcd0123 (foo bar
         # baz quux)
@@ -1276,6 +1279,9 @@
                 groups = list(matches.groups())
                 # We only accept headers if we haven't seen any non-trailer 
lines
                 tname = groups[0].lower()
+                if tname in ignores:
+                    logger.debug('Ignoring known non-trailer: %s', line)
+                    continue
                 if len(others) and tname in headers:
                     logger.debug('Ignoring %s (header after other content)', 
line)
                     continue
@@ -1948,7 +1954,7 @@
 
 def get_msgid_from_stdin():
     if not sys.stdin.isatty():
-        message = email.message_from_string(sys.stdin.read())
+        message = email.message_from_bytes(sys.stdin.buffer.read())
         return message.get('Message-ID', None)
     return None
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/b4-0.7.2+3/b4/mbox.py new/b4-0.7.3+0/b4/mbox.py
--- old/b4-0.7.2+3/b4/mbox.py   2021-06-22 21:16:12.000000000 +0200
+++ new/b4-0.7.3+0/b4/mbox.py   2021-08-13 16:39:58.000000000 +0200
@@ -656,7 +656,8 @@
     if cmdargs.wantname:
         savename = os.path.join(cmdargs.outdir, cmdargs.wantname)
     else:
-        savename = os.path.join(cmdargs.outdir, f'{msgid}.{dftext}')
+        safe_msgid = re.sub(r'[^\w@.+%-]+', '_', msgid).strip('_')
+        savename = os.path.join(cmdargs.outdir, f'{safe_msgid}.{dftext}')
 
     if save_maildir:
         if os.path.isdir(savename):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/b4-0.7.2+3/b4/pr.py new/b4-0.7.3+0/b4/pr.py
--- old/b4-0.7.2+3/b4/pr.py     2021-06-22 21:16:12.000000000 +0200
+++ new/b4-0.7.3+0/b4/pr.py     2021-08-13 16:39:58.000000000 +0200
@@ -433,7 +433,7 @@
 
     if not sys.stdin.isatty():
         logger.debug('Getting PR message from stdin')
-        msg = email.message_from_string(sys.stdin.read())
+        msg = email.message_from_bytes(sys.stdin.buffer.read())
         msgid = b4.LoreMessage.get_clean_msgid(msg)
         lmsg = parse_pr_data(msg)
     else:

++++++ b4.obsinfo ++++++
--- /var/tmp/diff_new_pack.zXLCFP/_old  2021-08-18 08:56:29.158934406 +0200
+++ /var/tmp/diff_new_pack.zXLCFP/_new  2021-08-18 08:56:29.162934401 +0200
@@ -1,5 +1,5 @@
 name: b4
-version: 0.7.2+3
-mtime: 1624389372
-commit: 06cc7c8820aea85d1329911b785d7bf4ecaacb1f
+version: 0.7.3+0
+mtime: 1628865598
+commit: f0b57f653da90401b458ee66528c03dbd7c759a6
 

Reply via email to