[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#874389: stretch-pu: package topal/75-2.1+deb9u1



Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu

Topal was calling sed using only single [ ... ] for the character
class syntax (bug 870825).  The version of sed in stretch does not
allow this and topal crashes as a result for some use cases.  A patch
has been tested with some users directly and a patched version has
been uploaded to unstable (topal/75.3).

The debdiff below fixes this problem (and only this problem) for stretch.

Please consider accepting this as a stretch-pu.

Thanks,
Phil.



-- System Information:
Debian Release: 8.9
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)



diff -u topal-75/debian/changelog topal-75/debian/changelog
--- topal-75/debian/changelog
+++ topal-75/debian/changelog
@@ -1,3 +1,10 @@
+topal (75-2.1+deb9u1) stretch; urgency=medium
+
+  * Fix misuse of sed character class syntax which stops topal
+    working.  (Closes: #870825.)
+
+ -- Phil Brooke <pjb@debian.org>  Sun, 06 Aug 2017 16:01:44 +0100
+
 topal (75-2.1) unstable; urgency=medium

   * Non maintainer upload.
only in patch2:
unchanged:
--- topal-75.orig/externals-mail.adb
+++ topal-75/externals-mail.adb
@@ -316,7 +316,7 @@
    begin
       ForkExec2_InOut(Value_Nonempty(Config.Binary(Sed)),
                       UBS_Array'(0 => ToUBS("sed"),
-                                 1 => ToUBS("1,/^[:space:]*$/ ! d")),
+                                 1 => ToUBS("1,/^[[:space:]]*$/ ! d")),
                       E1,
                       Value_Nonempty(Config.Binary(Grep)),
                       UBS_Array'(0 => ToUBS("grep"),
@@ -349,7 +349,7 @@
    begin
       ForkExec2_InOut(Value_Nonempty(Config.Binary(Sed)),
                       UBS_Array'(0 => ToUBS("sed"),
-                                 1 => ToUBS("1,/^[:space:]*$/ ! d")),
+                                 1 => ToUBS("1,/^[[:space:]]*$/ ! d")),
                       E1,
                       Value_Nonempty(Config.Binary(Grep)),
                       UBS_Array'(0 => ToUBS("grep"),
@@ -381,9 +381,9 @@
       if ForkExec_InOut(Value_Nonempty(Config.Binary(Sed)),
                         UBS_Array'(0 => ToUBS("sed"),
                                    1 => ToUBS("-e"),
-                                   2 => ToUBS("1,/^[:space:]*$/ ! d"),
+                                   2 => ToUBS("1,/^[[:space:]]*$/ ! d"),
                                    3 => ToUBS("-e"),
-                                   4 => ToUBS("/^[:space:]*$/ d")),
+                                   4 => ToUBS("/^[[:space:]]*$/ d")),
                         Source => Email_Filename,
                         Target => Target_Filename) /= 0 then
          Error("sed failed! (ff11)");
@@ -403,12 +403,12 @@
       ForkExec2_InOut(Value_Nonempty(Config.Binary(Sed)),
                       UBS_Array'(0 => ToUBS("sed"),
                                  1 => ToUBS("-e"),
-                                 2 => ToUBS("/^[:space:]*$/,$ ! d")),
+                                 2 => ToUBS("/^[[:space:]]*$/,$ ! d")),
                       E1,
                       Value_Nonempty(Config.Binary(Sed)),
                       UBS_Array'(0 => ToUBS("sed"),
                                  1 => ToUBS("-e"),
-                                 2 => ToUBS("1,1 { /^[:space:]*$/ d ; }")),
+                                 2 => ToUBS("1,1 { /^[[:space:]]*$/ d ; }")),
                       E2,
                       Source => Email_Filename,
                       Target => Target_Filename);
only in patch2:
unchanged:
--- topal-75.orig/workaround.adb
+++ topal-75/workaround.adb
@@ -66,12 +66,12 @@
          if Config.Boolean_Opts(FE_Simple) then
             -- Simple mangling.
             if Encrypted then
-               Externals.Simple.Sed_InOut("1,/^[:space:]*$/ { s!^Content-Type: *multipart/encrypted!Content-Type: application/x-topal-encrypted! ; }",
+               Externals.Simple.Sed_InOut("1,/^[[:space:]]*$/ { s!^Content-Type: *multipart/encrypted!Content-Type: application/x-topal-encrypted! ; }",
                                           Source => Stdin,
                                           Target => Output);
                Externals.Simple.Cat(Output);
             else
-               Externals.Simple.Sed_InOut("1,/^[:space:]*$/ { s!^Content-Type:  *multipart/signed!Content-Type: application/x-topal-signed! ; }",
+               Externals.Simple.Sed_InOut("1,/^[[:space:]]*$/ { s!^Content-Type:  *multipart/signed!Content-Type: application/x-topal-signed! ; }",
                                           Source => Stdin,
                                           Target => Output);
                Externals.Simple.Cat(Output);


Reply to: