Hello community,

here is the log from the commit of package rfcdiff for openSUSE:Factory checked 
in at 2018-12-12 17:31:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rfcdiff (Old)
 and      /work/SRC/openSUSE:Factory/.rfcdiff.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rfcdiff"

Wed Dec 12 17:31:34 2018 rev:4 rq:657514 version:1.47

Changes:
--------
--- /work/SRC/openSUSE:Factory/rfcdiff/rfcdiff.changes  2018-02-02 
22:23:38.842051777 +0100
+++ /work/SRC/openSUSE:Factory/.rfcdiff.new.28833/rfcdiff.changes       
2018-12-12 17:31:43.498631094 +0100
@@ -1,0 +2,13 @@
+Wed Dec 12 11:19:21 UTC 2018 - [email protected]
+
+- update to 1.47:
+  * Add a --fold <column> argument, to apply line wrapping before
+    comparison
+  * Add normalization of the scheme of provided URLs, to avoid
+    complaints for redirects from https to http
+  * Add display of more error messages, and added validation and
+    error messages for unexpected query parameters
+  * Add stripping of query parameters from upload source urls
+  * Change http:// schemes to https:// in the .pyht script file
+
+-------------------------------------------------------------------

Old:
----
  rfcdiff-1.46.tgz

New:
----
  rfcdiff-1.47.tgz

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

Other differences:
------------------
++++++ rfcdiff.spec ++++++
--- /var/tmp/diff_new_pack.FK8Ggg/_old  2018-12-12 17:31:44.402629954 +0100
+++ /var/tmp/diff_new_pack.FK8Ggg/_new  2018-12-12 17:31:44.410629944 +0100
@@ -17,12 +17,12 @@
 
 
 Name:           rfcdiff
-Version:        1.46
+Version:        1.47
 Release:        0
 Summary:        Draft Diff Tool
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          Development/Tools/Other
-Url:            https://tools.ietf.org/tools/rfcdiff/index
+URL:            https://tools.ietf.org/tools/rfcdiff/index
 Source:         https://tools.ietf.org/tools/rfcdiff/%{name}-%{version}.tgz
 Source2:        https://tools.ietf.org/tools/rfcdiff/distinfo
 BuildRequires:  txt2man

++++++ distinfo ++++++
--- /var/tmp/diff_new_pack.FK8Ggg/_old  2018-12-12 17:31:44.438629908 +0100
+++ /var/tmp/diff_new_pack.FK8Ggg/_new  2018-12-12 17:31:44.438629908 +0100
@@ -28,3 +28,6 @@
 MD5 (archive/rfcdiff-1.46.tgz) = d68d5be427e89999a375f2958784d4d6
 SHA256 (archive/rfcdiff-1.46.tgz) = 
f4ab321e88b3d76c550545d9adc19b665435929bd8e1d0ed41d4f65eb2f77bcb
 SIZE (archive/rfcdiff-1.46.tgz) = 31290
+MD5 (archive/rfcdiff-1.47.tgz) = 2e5839c67bbe9902a517a63f338de9eb
+SHA256 (archive/rfcdiff-1.47.tgz) = 
75a9e83869885836c024a94f35128eaf292c6b9de3fd9d3361fbc62d46ec9f16
+SIZE (archive/rfcdiff-1.47.tgz) = 31976

++++++ rfcdiff-1.46.tgz -> rfcdiff-1.47.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rfcdiff-1.46/Makefile.common 
new/rfcdiff-1.47/Makefile.common
--- old/rfcdiff-1.46/Makefile.common    2015-01-28 17:57:33.000000000 +0100
+++ new/rfcdiff-1.47/Makefile.common    2018-06-13 14:37:23.000000000 +0200
@@ -6,7 +6,7 @@
 tool    ?= $(shell basename $(PWD))
 version := $(shell ./$(tool) --version | awk '{print $$2}' )
 thisver := $(version)
-prevver := $(shell if [ -d ./archive ]; then ls -d ./archive/$(tool)* | grep 
-v ".tgz" | grep -v "$(version)" | tail -n 1 | sed 's/.*$(tool)-v//'; else echo 
"0.00"; fi )
+prevver := $(shell if [ -d ./archive ]; then ls -d ./archive/$(tool)-v* | grep 
-v ".tgz" | egrep '[0-9]+\.[0-9]+' | grep -v "$(version)" | sed 
's/^.*$(tool)-v//' | sort -n -k 1.3 | tail -n 1; else echo "0.00"; fi)
 
 language:= $(shell head -1 $(tool) | awk '{ sub("^.+/", "", $$1); print $$1; 
}')
 logentry := $(shell sed -n -r "/^$(tool) \($(version).*\)/,/^ -- /p" changelog 
| head -n -1 | sed -r 's/"/\\"/g' )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rfcdiff-1.46/changelog new/rfcdiff-1.47/changelog
--- old/rfcdiff-1.46/changelog  2017-10-18 13:36:51.000000000 +0200
+++ new/rfcdiff-1.47/changelog  2018-06-20 18:59:16.000000000 +0200
@@ -1,3 +1,19 @@
+rfcdiff (1.47)
+
+  * Added a --fold <column> argument, to apply line wrapping before comparison.
+
+  * Added normalization of the scheme of provided URLs, to avoid complaints
+    for redirects from https to http.
+
+  * Added display of more error messages, and added validation and error
+    messages for unexpected query parameters.
+
+  * Added stripping of query parameters from upload source urls.
+
+  * Changed http:// schemes to https:// in the .pyht script file
+
+ -- Henrik Levkowetz <[email protected]>  20 Jun 2018 14:01:36 +0100
+
 rfcdiff (1.46)
 
   * Tweaked the makefile to notify Glen and Matt on release of new versions.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rfcdiff-1.46/control new/rfcdiff-1.47/control
--- old/rfcdiff-1.46/control    2017-10-18 13:43:02.000000000 +0200
+++ new/rfcdiff-1.47/control    2018-06-20 19:00:30.000000000 +0200
@@ -1,5 +1,5 @@
 Repository: rfcdiff
-Version: 1.46
+Version: 1.47
 Section: text
 Priority: optional
 Maintainer: Henrik Levkowetz <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rfcdiff-1.46/rfcdiff new/rfcdiff-1.47/rfcdiff
--- old/rfcdiff-1.46/rfcdiff    2017-10-18 13:37:54.000000000 +0200
+++ new/rfcdiff-1.47/rfcdiff    2018-06-20 14:14:43.000000000 +0200
@@ -102,7 +102,7 @@
 #              http://tools.ietf.org/tools/rfcdiff/
 #
 
-export version="1.46"
+export version="1.47"
 export progdate=""
 export prelines="10"
 export basename=$(basename $0)
@@ -790,7 +790,7 @@
 # Default values
 opthtml=1; optdiff=0; optchbars=0; optwdiff=0; optshow=0; optnowdiff=0;
 optkeep=0; optinfo=0; optwidth=0;  optnums=0;  optbody=0; optabdiff=0;
-optstrip=1; opthwdiff=0; optlinks=0;
+optstrip=1; opthwdiff=0; optlinks=0; optfold=0;
 optoldcolour="red"; optnewcolour="green"; optlarger=""
 optstdout=0;
 
@@ -811,6 +811,7 @@
       --keep)  optkeep=1;;
       --info)  optinfo=1; keyword=$2; shift;;
       --help)  optinfo=1; keyword="Usage";;
+      --fold)  optfold=$2; shift;;
       --width) optwidth=$2; shift;;
       --oldcolor)     optoldcolour=$2; shift;;
       --oldcolour)    optoldcolour=$2; shift;;
@@ -943,6 +944,17 @@
 fi
 
 # ----------------------------------------------------------------------
+# Maybe do line folding
+# ----------------------------------------------------------------------
+if [ $optfold -gt 0 ]; then
+   foldbin=$(lookfor fold)
+   $foldbin -s -w$optfold $workdir/1/"$base1" > $workdir/1/"$base1".folded
+   mv $workdir/1/"$base1".folded $workdir/1/"$base1"
+   $foldbin -s -w$optfold $workdir/2/"$base2" > $workdir/2/"$base2".folded
+   mv $workdir/2/"$base2".folded $workdir/2/"$base2"
+fi
+
+# ----------------------------------------------------------------------
 # Get output file name
 # ----------------------------------------------------------------------
 if [ "$3" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rfcdiff-1.46/rfcdiff.pyht 
new/rfcdiff-1.47/rfcdiff.pyht
--- old/rfcdiff-1.46/rfcdiff.pyht       2014-05-05 13:51:07.000000000 +0200
+++ new/rfcdiff-1.47/rfcdiff.pyht       2018-06-20 14:12:12.000000000 +0200
@@ -18,12 +18,28 @@
     uploadfile = None
     info = ""
     debuginfo = ""
+    errors = ""
+
+    def norm(url):
+       import urlparse
+       # Normalize scheme, to avoid complaints for redirects from http to https
+       scheme, host, path, query, fragment = urlparse.urlsplit(url)
+       if scheme == 'https':
+           scheme = 'http'
+       return (scheme, host, path, query, fragment)
+
+    for a in args:
+       if not a in ["url1", "url2", "filename1", "filename2", "difftype",
+                    "--width", "--oldcolour", "--newcolour", "--larger",
+                    "--fold", "submit", ]:
+           errors += "Unexpected query parameter: <b>%s</b><br>" % a
+
 
     if "filename2" in args or "url2" in args:
        if "filename2" in args and len(args["filename2"]) > 0:
            uploadsrc2 = form["filename2"].filename
        elif "url2" in args and type(args["url2"]) is str and len(args["url2"]) 
> 0:
-           uploadsrc2 = args["url2"]
+           uploadsrc2 = args["url2"].split('?',1)[0]
            if uploadsrc2.startswith("draft-"):
                rev_match = re.search("(.*-)([0-9][0-9])(.txt)?$", uploadsrc2)
                if not rev_match:
@@ -35,13 +51,13 @@
                            uploadsrc2 = "%s-%s" % (draft, attrs.docrev.string)
                        except:
                            pass
-               uploadsrc2 = "http://tools.ietf.org/id/"+uploadsrc2;
+               uploadsrc2 = "https://tools.ietf.org/id/"+uploadsrc2;
                if not uploadsrc2.endswith(".txt"):
                    uploadsrc2 += ".txt"
            else:
                match = re.search("^[rR][fF][cC] ?([0-9]+)", uploadsrc2)
                if match:
-                   uploadsrc2 = 
"http://tools.ietf.org/rfc/rfc"+match.group(1)+".txt"
+                   uploadsrc2 = 
"https://tools.ietf.org/rfc/rfc"+match.group(1)+".txt"
        else:
            uploadmsg = "Upload failed - no source file name for file 2."
 
@@ -49,9 +65,9 @@
        if "filename1" in args and len(args["filename1"]) > 0:
            uploadsrc1 = form["filename1"].filename
        elif "url1" in args and type(args["url1"]) is str and len(args["url1"]) 
> 0:
-           uploadsrc1 = args["url1"]
+           uploadsrc1 = args["url1"].split('?',1)[0]
            if uploadsrc1.startswith("draft-"):
-               uploadsrc1 = "http://tools.ietf.org/id/"+uploadsrc1;
+               uploadsrc1 = "https://tools.ietf.org/id/"+uploadsrc1;
                if not uploadsrc1.endswith(".txt"):
                    uploadsrc1 += ".txt"
                if not uploadsrc2:
@@ -63,7 +79,7 @@
            else:
                match = re.search("^[rR][fF][cC] ?([0-9]+)", uploadsrc1)
                if match:
-                   uploadsrc1 = 
"http://tools.ietf.org/rfc/rfc"+match.group(1)+".txt"
+                   uploadsrc1 = 
"https://tools.ietf.org/rfc/rfc"+match.group(1)+".txt"
        elif uploadsrc2:
            try:
                match = re.match("(.*-)([0-9][0-9])(\..*)", uploadsrc2)
@@ -75,7 +91,7 @@
                        match = re.match(".*-(rfc)?([0-9][0-9][0-9]+)bis-.*", 
uploadsrc2)
                        if match:
                            rfcnum = match.group(2)
-                           uploadsrc1 = "http://tools.ietf.org/rfc/rfc%s.txt"; 
% rfcnum
+                           uploadsrc1 = "https://tools.ietf.org/rfc/rfc%s.txt"; 
% rfcnum
                        else:
                            # Check if this document is a draft which
                            # replaces another...
@@ -87,9 +103,9 @@
                                try:
                                    attrs = 
attrib.readline("/www/tools.ietf.org/draft/%s/now" % draft)
                                    if "docreplaces" in attrs.__dict__:
-                                       uploadsrc1= 
"http://tools.ietf.org/id/%s"; % attrs.docreplaces
+                                       uploadsrc1= 
"https://tools.ietf.org/id/%s"; % attrs.docreplaces
                                except Exception, e:
-                                   info = str(e)
+                                   info += str(e)
                                    pass
 
                match = re.match(".*/([Rr][Ff][Cc])([0-9]+)(\..*)", uploadsrc2)
@@ -99,26 +115,26 @@
                        try:
                            attrs = 
attrib.readline("/www/tools.ietf.org/draft/rfc%s/now" % num)
                            if "document" in attrs.__dict__:
-                               uploadsrc1= "http://tools.ietf.org/id/%s"; % 
attrs.document
+                               uploadsrc1= "https://tools.ietf.org/id/%s"; % 
attrs.document
                        except Exception, e:
-                           info = str(e)
+                           info += str(e)
                            pass
                
            except Exception, e:
-               info = str(e)
+               info += str(e)
                pass
 
        if uploadsrc1:
            uploadname = basename(re.sub("\\\\","/", uploadsrc1))
            if re.match("^[a-zA-Z0-9_.,-]*$", uploadname):
-               if uploadsrc1.startswith("http://";) or 
uploadsrc1.startswith("ftp://";) or uploadsrc1.startswith("https://";):
+               if uploadsrc1.startswith("http://";) or 
uploadsrc1.startswith("https://";) or uploadsrc1.startswith("ftp://";):
                    try:
                        import httplib
                        import urllib2 as urllib
                        uploadfile = urllib.urlopen(uploadsrc1)
                    except:
                        uploadmsg = "Couldn't retrieve file 1 (%s) - please 
check the URL." % uploadsrc1
-                   if uploadfile and re.search("-[0-9][0-9](\.txt)?$", 
uploadsrc1) and uploadsrc1 != uploadfile.geturl():
+                   if uploadfile and re.search("-[0-9][0-9](\.txt)?$", 
uploadsrc1) and norm(uploadsrc1) != norm(uploadfile.geturl()):
                        uploadmsg = "Couldn't retrieve file 1 (%s) - got a 
redirect to '%s' instead." % (uploadsrc1, uploadfile.geturl())
                        uploadfile = None
                elif "filename1" in args and form["filename1"].file:
@@ -152,19 +168,19 @@
        if uploadsrc2:
            uploadname = basename(re.sub("\\\\","/", uploadsrc2))
            if re.match("^[a-zA-Z0-9_.,-]*$", uploadname):
-               if uploadsrc2.startswith("http://";) or 
uploadsrc2.startswith("ftp://";) or uploadsrc2.startswith("https://";):
+               if uploadsrc2.startswith("http://";) or 
uploadsrc2.startswith("https://";) or uploadsrc2.startswith("ftp://";):
                    try:
                        import httplib
                        import urllib2 as urllib
                        uploadfile = urllib.urlopen(uploadsrc2)
                    except:
                        uploadmsg = "Couldn't retrieve file 2 (%s) - please 
check the URL." % uploadsrc2
-                   if uploadfile and re.search("-[0-9][0-9](\.txt)?$", 
uploadsrc2) and uploadsrc2 != uploadfile.geturl():
+                   if uploadfile and re.search("-[0-9][0-9](\.txt)?$", 
uploadsrc2) and norm(uploadsrc2) != norm(uploadfile.geturl()):
                        uploadmsg = "Couldn't retrieve file 2 (%s) - got a 
redirect to '%s'." % (uploadsrc2, uploadfile.geturl())
                        uploadfile = None
-                       if 
uploadsrc2.startswith("http://tools.ietf.org/id/draft-";):
+                       if 
uploadsrc2.startswith("https://tools.ietf.org/id/draft-";):
                            # Try to get the document from the master site, 
instead:
-                           uploadsrc2b = 
uploadsrc2.replace("http://tools.ietf.org/id/";, 
"http://www.ietf.org/internet-drafts/";)
+                           uploadsrc2b = 
uploadsrc2.replace("https://tools.ietf.org/id/";, 
"https://www.ietf.org/internet-drafts/";)
                            try:
                                uploadfile = urllib.urlopen(uploadsrc2b)
                            except:
@@ -203,6 +219,12 @@
     else:
        width=""
 
+    # argument cleaning
+    if "--fold" in args and args["--fold"].isdigit():
+        fold = "--fold "+args["--fold"]
+    else:
+       fold=""
+
     colours = [ "aqua", "black", "blue", "fuchsia", "gray", "green", "lime", 
"maroon", "navy", "olive", "orange", "purple", "red", "silver", "teal", 
"white", "yellow"]
     if "--oldcolour" in args and args["--oldcolour"] in colours:
        oldcolour = "--oldcolour "+args["--oldcolour"]
@@ -229,14 +251,18 @@
 
     if debuginfo:
         out("\n\n<script type='text/javascript' 
language='JavaScript1.1'>alert(\"%s\");</script>" % 
(debuginfo.replace('"','\\"')))
-    if filename1 and filename2 and linecount1 and linecount2:
+    if not (info or errors) and filename1 and filename2 and linecount1 and 
linecount2:
        uploadmsg = "Upload complete."
        if difftype in ("--abdiff", "--chbars"):
            print("Content-Type: text/plain\n\n")
        else:
            print("Content-Type: text/html\n\n")
-       os.system("./rfcdiff --ignore-whitespace --stdout --links %s %s %s %s 
%s %s %s" % (width, difftype, oldcolour, newcolour, larger, filename1, 
filename2))
-        out("<!-- args: %s -->" % repr(args))
+       os.system("./rfcdiff --stdout --links %s %s %s %s %s %s %s %s" % (fold, 
width, difftype, oldcolour, newcolour, larger, filename1, filename2))
+       # if 'filename1' in args:
+       #     del args['filename1']
+       # if 'filename2' in args:
+       #     del args['filename2']
+       # out("<!-- args: %s -->" % repr(args))
 
        #os.unlink(uploadname)
        sys.exit(0)
@@ -283,7 +309,7 @@
                     <tr>
                        <!-- left column inherited from previous row -->
                        <td class="chairs">
-                          <i>Version:</i> 0.11
+                          <i>Version:</i> 0.12
                           <br />
 
                           <i>Author:</i>
@@ -306,6 +332,10 @@
 
 
               <h3>Rfcdiff Web Service</h3>
+              <?python
+                 if errors:
+                     out("<div style='background-color: #F88;'>%s</div>" % 
errors)
+              ?>
               <form action="" method="post" enctype="multipart/form-data">
                  <table border="0" cellpadding="8" cellspacing="0" >
                     <tbody>
@@ -352,6 +382,12 @@
                           <td><input name="--width" size="4" type="text"></td>
                        </tr>
 
+                       <tr><td></td></tr>
+                       <tr valign="top">
+                          <td colspan="2">Fold lines:</td>
+                          <td><input name="--fold" size="4" type="text"></td>
+                       </tr>
+
                        <tr>
                           <td colspan="3" align="right">
                              <input name="submit" value="Generate diff" 
type="submit">
@@ -374,13 +410,13 @@
                     document versions are available by http.
                  </p>
                  <p>
-                    Example (yes, it is long - no way to get around that... - 
but you could use <a href="http://tinyurl.com/";>tinyurl.com</a> to get a short 
alias to one of these):
+                    Example (yes, it is long - no way to get around that... - 
but you could use <a href="https://tinyurl.com/";>tinyurl.com</a> to get a short 
alias to one of these):
                  </p>
                  <p>
 
-                    <a href="<?python 'http://'+servername+urlname 
?>?url1=http://tools.ietf.org/id/draft-ietf-atompub-format-10.txt&url2=http://tools.ietf.org/id/draft-ietf-atompub-format-11.txt";><?python
 "http://"+servername+urlname ?>?<br/>
-                       
&nbsp;&nbsp;url1=http://tools.ietf.org/id/draft-ietf-atompub-format-10.txt<br/>
-                       
&nbsp;&nbsp;&amp;url2=http://tools.ietf.org/id/draft-ietf-atompub-format-11.txt</a>
+                    <a href="<?python 'https://'+servername+urlname 
?>?url1=https://tools.ietf.org/id/draft-ietf-atompub-format-10.txt&url2=https://tools.ietf.org/id/draft-ietf-atompub-format-11.txt";><?python
 "https://"+servername+urlname ?>?<br/>
+                       
&nbsp;&nbsp;url1=https://tools.ietf.org/id/draft-ietf-atompub-format-10.txt<br/>
+                       
&nbsp;&nbsp;&amp;url2=https://tools.ietf.org/id/draft-ietf-atompub-format-11.txt</a>
 
                  </p>
               </div>


Reply via email to