Control: tags 783971 + patch
Control: tags 783971 + pending
Control: tags 827146 + pending
Control: tags 938489 + patch
Control: tags 938489 + pending

Dear maintainer,

I've prepared an NMU for sinntp (versioned as 1.6-0.1) and uploaded
it to DELAYED/15. Please feel free to tell me if I should cancel it.

cu
Adrian
diff -Nru sinntp-1.5/COPYING sinntp-1.6/COPYING
--- sinntp-1.5/COPYING	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/COPYING	1970-01-01 02:00:00.000000000 +0200
@@ -1,339 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program 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; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff -Nru sinntp-1.5/debian/changelog sinntp-1.6/debian/changelog
--- sinntp-1.5/debian/changelog	2015-08-22 14:55:19.000000000 +0300
+++ sinntp-1.6/debian/changelog	2019-12-26 08:55:37.000000000 +0200
@@ -1,3 +1,12 @@
+sinntp (1.6-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream release.
+    - Uses Python 3. (Closes: #938489)
+  * Updated Homepage and debian/watch. (Closes: #783971, #827146)
+
+ -- Adrian Bunk <b...@debian.org>  Thu, 26 Dec 2019 08:55:37 +0200
+
 sinntp (1.5-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru sinntp-1.5/debian/control sinntp-1.6/debian/control
--- sinntp-1.5/debian/control	2015-08-22 14:54:23.000000000 +0300
+++ sinntp-1.6/debian/control	2019-12-26 08:55:37.000000000 +0200
@@ -3,15 +3,15 @@
 Priority: optional
 Maintainer: Piotr Lewandowski <piotr.lewandow...@gmail.com>
 Uploaders: Python Applications Packaging Team <python-apps-t...@lists.alioth.debian.org>
-Build-Depends: debhelper (>= 7.0.50~), python-all, dh-python
+Build-Depends: debhelper (>= 7.0.50~), python3, dh-python
 Standards-Version: 3.9.3
 Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/sinntp/trunk/
 Vcs-Svn: svn://svn.debian.org/python-apps/packages/sinntp/trunk/
-Homepage: http://sinntp.googlecode.com/
+Homepage: http://jwilk.net/software/sinntp
 
 Package: sinntp
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}
+Depends: ${misc:Depends}, ${python3:Depends}
 Description: tiny non-interactive NNTP client
  sinntp is a tiny NNTP client originally designed to work in non-interactive
  mode. Following commands are supported:
diff -Nru sinntp-1.5/debian/rules sinntp-1.6/debian/rules
--- sinntp-1.5/debian/rules	2015-08-22 14:54:33.000000000 +0300
+++ sinntp-1.6/debian/rules	2019-12-26 08:55:37.000000000 +0200
@@ -1,9 +1,7 @@
 #!/usr/bin/make -f
 
-python_all = pyversions -r | tr ' ' '\n' | xargs -t -I {} env {}
-
 %: 
-	dh $@ --with python2
+	dh $@ --with python3
 
 override_dh_install:
 	dh_install
@@ -11,7 +9,7 @@
 
 override_dh_auto_test:
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
-	$(python_all) tests.py --verbose
+	python3 tests.py --verbose
 endif
 
 # vim:ts=4 sw=4 noet
diff -Nru sinntp-1.5/debian/watch sinntp-1.6/debian/watch
--- sinntp-1.5/debian/watch	2010-05-13 01:36:37.000000000 +0300
+++ sinntp-1.6/debian/watch	2019-12-26 08:55:37.000000000 +0200
@@ -1,5 +1,2 @@
 version=3
-opts=\
-downloadurlmangle=s|.*[?]name=(.*?)&.*|http://sinntp.googlecode.com/files/$1|,\
-filenamemangle=s|[^/]+[?]name=(.*?)&.*|$1| \
-http://code.google.com/p/sinntp/downloads/detail[?]name=sinntp-([0-9.]+).tar.gz&.*
+https://github.com/jwilk/sinntp/releases .*/sinntp-([0-9.]+)\.tar\.gz
diff -Nru sinntp-1.5/doc/changelog sinntp-1.6/doc/changelog
--- sinntp-1.5/doc/changelog	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/doc/changelog	2016-12-19 18:42:21.000000000 +0200
@@ -1,10 +1,45 @@
+sinntp (1.6) unstable; urgency=low
+
+  * Use /usr/bin/env in shebangs.
+  * Port to Python 3.
+    Thanks to Ralf Ramsauer for the bug report and the initial porting work.
+
+ -- Jakub Wilk <jw...@jwilk.net>  Mon, 19 Dec 2016 17:41:13 +0100
+
+sinntp (1.5.3) unstable; urgency=low
+
+  * Drop support for Python 2.5.
+  * Fix documentation typos.
+  * Update bug tracker URLs.
+    https://google-opensource.blogspot.com/2015/03/farewell-to-google-code.html
+  * Update the XDG Base Directory Specification URL.
+
+ -- Jakub Wilk <jw...@jwilk.net>  Fri, 11 Mar 2016 23:00:35 +0100
+
+sinntp (1.5.2) unstable; urgency=low
+
+  * Update the state file atomically.
+  * Exit gracefully, updating the state file, when killed with SIGTERM.
+    https://github.com/jwilk/sinntp/issues/15
+
+ -- Jakub Wilk <jw...@jwilk.net>  Thu, 10 Jul 2014 12:14:38 +0200
+
+sinntp (1.5.1) unstable; urgency=low
+
+  * Lift the line length limit to 1 megabyte.
+    https://github.com/jwilk/sinntp/issues/9
+  * If an exception occurred, don't bother sending the QUIT command to the
+    server, to avoid provoking further exceptions with misleading tracebacks.
+
+ -- Jakub Wilk <jw...@jwilk.net>  Tue, 29 Apr 2014 21:42:47 +0200
+
 sinntp (1.5) unstable; urgency=low
 
   * Always use our own implementation of XDG Base Directory instead of PyXDG.
   * Ignore relative paths in XDG_* variables.
   * Add --no-netrc option that ignores ~/.netrc credentials. Thanks to Dirk
-    Griesbach for the bug report and the inital patch.
-    http://bugs.debian.org/668927
+    Griesbach for the bug report and the initial patch.
+    https://bugs.debian.org/668927
 
  -- Jakub Wilk <jw...@jwilk.net>  Wed, 18 Apr 2012 20:52:07 +0200
 
@@ -13,7 +48,8 @@
   * Use the argparse (rather than optparse) module to parse options.
   * Send a ‘mode reader’ command before authentication. Thanks to Pierre
     Habouzit for the bug report.
-  * Allow to specify port number for the -S/--server option.
+  * Allow specifying port number for the -S/--server option.
+    https://github.com/jwilk/sinntp/issues/8
   * Fall back to our own minimal XDG Base Directory implementation if PyXDG is
     not found.
   * Add some tests.
@@ -23,7 +59,7 @@
 sinntp (1.3.2) unstable; urgency=low
 
   * Fix Python 2.6 deprecation warnings.
-    http://bugs.debian.org/585839
+    https://bugs.debian.org/585839
 
  -- Jakub Wilk <jw...@jwilk.net>  Wed, 23 Jun 2010 23:36:08 +0200
 
@@ -42,6 +78,7 @@
 
   * Follow the XDG Base Directory Specification.
   * Add manual pages.
+    https://github.com/jwilk/sinntp/issues/2
 
  -- Piotr Lewandowski <piotr.lewandow...@gmail.com>  Thu, 17 Sep 2009 19:01:09 +0200
 
@@ -56,6 +93,7 @@
 
   [ Piotr Lewandowski ]
   * Fix command line arguments parsing.
+    https://github.com/jwilk/sinntp/issues/7
 
   [ Jakub Wilk ]
   * Don't use symlinks.
@@ -66,9 +104,10 @@
 
   * Add the --quiet option.
   * Add the --timeout option.
+    https://github.com/jwilk/sinntp/issues/6
   * Handle socket exceptions gracefully.
   * Handle connection NNTP errors gracefully.
-  * Allow to provide newsgroup names as arguments for nntp-push.
+  * Allow providing newsgroup names as arguments for nntp-push.
   * Introduce the 'get' command and provide nntp-get symlink.
 
  -- Piotr Lewandowski <piotr.lewandow...@gmail.com>  Tue, 16 Jun 2009 15:09:53 +0200
diff -Nru sinntp-1.5/doc/changelog.old sinntp-1.6/doc/changelog.old
--- sinntp-1.5/doc/changelog.old	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/doc/changelog.old	2016-12-19 18:42:21.000000000 +0200
@@ -26,7 +26,7 @@
 
 sinntp (0.90) unstable; urgency=low
 
-  * Remove locks if accessing a newsgroup failed. 
+  * Remove locks if accessing a newsgroup failed.
 
  -- Jakub Wilk <jw...@jwilk.net>  Tue, 11 Jul 2006 09:59:29 +0200
 
diff -Nru sinntp-1.5/doc/COPYING sinntp-1.6/doc/COPYING
--- sinntp-1.5/doc/COPYING	1970-01-01 02:00:00.000000000 +0200
+++ sinntp-1.6/doc/COPYING	2016-12-19 18:42:21.000000000 +0200
@@ -0,0 +1,339 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program 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; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff -Nru sinntp-1.5/doc/manpages/Makefile sinntp-1.6/doc/manpages/Makefile
--- sinntp-1.5/doc/manpages/Makefile	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/doc/manpages/Makefile	2016-12-19 18:42:21.000000000 +0200
@@ -15,4 +15,4 @@
 clean:
 	rm -f $(MAN_FILES)
 
-# vim:ts=4
+# vim:ts=4 sts=4 sw=4 noet
diff -Nru sinntp-1.5/doc/manpages/nntp-get.1 sinntp-1.6/doc/manpages/nntp-get.1
--- sinntp-1.5/doc/manpages/nntp-get.1	2012-04-18 23:38:07.000000000 +0300
+++ sinntp-1.6/doc/manpages/nntp-get.1	2016-12-19 18:43:50.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nntp-get
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 04/18/2012
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 12/19/2016
 .\"    Manual: nntp-get manual
-.\"    Source: nntp-get 1.5
+.\"    Source: nntp-get 1.6
 .\"  Language: English
 .\"
-.TH "NNTP\-GET" "1" "2012-04-18" "nntp-get 1\&.5" "nntp-get manual"
+.TH "NNTP\-GET" "1" "2016-12-19" "nntp-get 1\&.6" "nntp-get manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -44,7 +44,6 @@
 \fBsinntp\fR(1)\&.
 .SH "SEE ALSO"
 .PP
-
 \fBsinntp\fR(1)
 .SH "COPYRIGHT"
 .br
diff -Nru sinntp-1.5/doc/manpages/nntp-get.xml sinntp-1.6/doc/manpages/nntp-get.xml
--- sinntp-1.5/doc/manpages/nntp-get.xml	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/doc/manpages/nntp-get.xml	2016-12-19 18:42:21.000000000 +0200
@@ -1,8 +1,8 @@
 <?xml version='1.0' encoding='utf-8'?>
-<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd' 
+<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd'
 [
 	<!ENTITY p 'nntp-get'>
-	<!ENTITY version '1.5'>
+	<!ENTITY version '1.6'>
 ]>
 
 <refentry>
@@ -42,14 +42,14 @@
 <refsection>
 	<title>Description</title>
 	<para>
-		Print a single article to the standard output. The requested article is specified by the value of Message-Id header. 
+		Print a single article to the standard output. The requested article is specified by the value of Message-Id header.
 	</para>
 	<para>
 		A single <replaceable>message-id</replaceable> argument is a value of the requested article's Message-Id header.
 		It can be provided with or without angle brackets.
 	</para>
 	<para>
-		Global options are described in 
+		Global options are described in
 		<citerefentry>
 			<refentrytitle>sinntp</refentrytitle>
 			<manvolnum>1</manvolnum>
@@ -69,4 +69,4 @@
 
 </refentry>
 
-<!-- vim:set ts=4 sw=4 tw=120: -->
+<!-- vim:set ts=4 sts=4 sw=4 tw=120: -->
diff -Nru sinntp-1.5/doc/manpages/nntp-list.1 sinntp-1.6/doc/manpages/nntp-list.1
--- sinntp-1.5/doc/manpages/nntp-list.1	2012-04-18 23:38:10.000000000 +0300
+++ sinntp-1.6/doc/manpages/nntp-list.1	2016-12-19 18:43:53.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nntp-list
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 04/18/2012
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 12/19/2016
 .\"    Manual: nntp-list manual
-.\"    Source: nntp-list 1.5
+.\"    Source: nntp-list 1.6
 .\"  Language: English
 .\"
-.TH "NNTP\-LIST" "1" "2012-04-18" "nntp-list 1\&.5" "nntp-list manual"
+.TH "NNTP\-LIST" "1" "2016-12-19" "nntp-list 1\&.6" "nntp-list manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -42,7 +42,6 @@
 \fBsinntp\fR(1)\&.
 .SH "SEE ALSO"
 .PP
-
 \fBsinntp\fR(1)
 .SH "COPYRIGHT"
 .br
diff -Nru sinntp-1.5/doc/manpages/nntp-list.xml sinntp-1.6/doc/manpages/nntp-list.xml
--- sinntp-1.5/doc/manpages/nntp-list.xml	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/doc/manpages/nntp-list.xml	2016-12-19 18:42:21.000000000 +0200
@@ -1,8 +1,8 @@
 <?xml version='1.0' encoding='utf-8'?>
-<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd' 
+<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd'
 [
 	<!ENTITY p 'nntp-list'>
-	<!ENTITY version '1.5'>
+	<!ENTITY version '1.6'>
 ]>
 
 <refentry>
@@ -47,7 +47,7 @@
 		This commands takes neither command-specific options nor arguments.
 	</para>
 	<para>
-		Global options are described in 
+		Global options are described in
 		<citerefentry>
 			<refentrytitle>sinntp</refentrytitle>
 			<manvolnum>1</manvolnum>
@@ -67,4 +67,4 @@
 
 </refentry>
 
-<!-- vim:set ts=4 sw=4 tw=120: -->
+<!-- vim:set ts=4 sts=4 sw=4 tw=120: -->
diff -Nru sinntp-1.5/doc/manpages/nntp-pull.1 sinntp-1.6/doc/manpages/nntp-pull.1
--- sinntp-1.5/doc/manpages/nntp-pull.1	2012-04-18 23:38:08.000000000 +0300
+++ sinntp-1.6/doc/manpages/nntp-pull.1	2016-12-19 18:43:51.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nntp-pull
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 04/18/2012
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 12/19/2016
 .\"    Manual: nntp-pull manual
-.\"    Source: nntp-pull 1.5
+.\"    Source: nntp-pull 1.6
 .\"  Language: English
 .\"
-.TH "NNTP\-PULL" "1" "2012-04-18" "nntp-pull 1\&.5" "nntp-pull manual"
+.TH "NNTP\-PULL" "1" "2016-12-19" "nntp-pull 1\&.6" "nntp-pull manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -54,16 +54,13 @@
 .RE
 .SH "EXAMPLES"
 .PP
-
 \fBnntp\-pull \-\-server=news\&.example\&.org \-\-limit=50 \*(Aqcomp\&.os\&.linux>os\-linux\*(Aq\fR
 Fetches at most the 50 newest articles from the newsgroup comp\&.os\&.linux located on news\&.example\&.org server and appends them to the os\-linux mailbox file\&.
 .PP
-
 \fBnntp\-pull \-\-server=news\&.example\&.net \-\-reget \-\-limit=3 comp\&.os\&.windows\fR
 Fetches at most the 3 oldest articles from the newsgroup comp\&.os\&.windows located on news\&.example\&.net server and appends them to the comp\&.os\&.windows mailbox file\&.
 .SH "SEE ALSO"
 .PP
-
 \fBsinntp\fR(1)
 .SH "COPYRIGHT"
 .br
diff -Nru sinntp-1.5/doc/manpages/nntp-pull.xml sinntp-1.6/doc/manpages/nntp-pull.xml
--- sinntp-1.5/doc/manpages/nntp-pull.xml	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/doc/manpages/nntp-pull.xml	2016-12-19 18:42:21.000000000 +0200
@@ -1,8 +1,8 @@
 <?xml version='1.0' encoding='utf-8'?>
-<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd' 
+<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd'
 [
 	<!ENTITY p 'nntp-pull'>
-	<!ENTITY version '1.5'>
+	<!ENTITY version '1.6'>
 ]>
 
 <refentry>
@@ -47,7 +47,7 @@
 		omitted, it defaults to the name of the group.
 	</para>
 	<para>
-		Besides global options (described in 
+		Besides global options (described in
 		<citerefentry>
 			<refentrytitle>sinntp</refentrytitle>
 			<manvolnum>1</manvolnum>
@@ -99,4 +99,4 @@
 
 </refentry>
 
-<!-- vim:set ts=4 sw=4 tw=120: -->
+<!-- vim:set ts=4 sts=4 sw=4 tw=120: -->
diff -Nru sinntp-1.5/doc/manpages/nntp-push.1 sinntp-1.6/doc/manpages/nntp-push.1
--- sinntp-1.5/doc/manpages/nntp-push.1	2012-04-18 23:38:12.000000000 +0300
+++ sinntp-1.6/doc/manpages/nntp-push.1	2016-12-19 18:43:54.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: nntp-push
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 04/18/2012
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 12/19/2016
 .\"    Manual: nntp-push manual
-.\"    Source: nntp-push 1.5
+.\"    Source: nntp-push 1.6
 .\"  Language: English
 .\"
-.TH "NNTP\-PUSH" "1" "2012-04-18" "nntp-push 1\&.5" "nntp-push manual"
+.TH "NNTP\-PUSH" "1" "2016-12-19" "nntp-push 1\&.6" "nntp-push manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -62,7 +62,6 @@
 \fBsinntp\fR(1)\&.
 .SH "SEE ALSO"
 .PP
-
 \fBsinntp\fR(1)
 .SH "COPYRIGHT"
 .br
diff -Nru sinntp-1.5/doc/manpages/nntp-push.xml sinntp-1.6/doc/manpages/nntp-push.xml
--- sinntp-1.5/doc/manpages/nntp-push.xml	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/doc/manpages/nntp-push.xml	2016-12-19 18:42:21.000000000 +0200
@@ -1,8 +1,8 @@
 <?xml version='1.0' encoding='utf-8'?>
-<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd' 
+<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd'
 [
 	<!ENTITY p 'nntp-push'>
-	<!ENTITY version '1.5'>
+	<!ENTITY version '1.6'>
 ]>
 
 <refentry>
@@ -69,4 +69,4 @@
 
 </refentry>
 
-<!-- vim:set ts=4 sw=4 tw=120: -->
+<!-- vim:set ts=4 sts=4 sw=4 tw=120: -->
diff -Nru sinntp-1.5/doc/manpages/sinntp.1 sinntp-1.6/doc/manpages/sinntp.1
--- sinntp-1.5/doc/manpages/sinntp.1	2012-04-18 23:38:09.000000000 +0300
+++ sinntp-1.6/doc/manpages/sinntp.1	2016-12-19 18:43:52.000000000 +0200
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: sinntp
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\"      Date: 04/18/2012
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 12/19/2016
 .\"    Manual: sinntp manual
-.\"    Source: sinntp 1.5
+.\"    Source: sinntp 1.6
 .\"  Language: English
 .\"
-.TH "SINNTP" "1" "2012-04-18" "sinntp 1\&.5" "sinntp manual"
+.TH "SINNTP" "1" "2016-12-19" "sinntp 1\&.6" "sinntp manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -34,7 +34,6 @@
 \fBsinntp\fR \fIcommand\fR [\fIoptions\fR...] [\fIargs\fR...]
 .SH "DESCRIPTION"
 .PP
-
 \fBsinntp\fR
 is a tiny NNTP client originally designed to work in non\-interactive mode\&. Following operations are supported:
 .sp
@@ -83,7 +82,6 @@
 .RE
 .SH "COMMANDS"
 .PP
-
 \fBsinntp\fR
 provides following commands:
 .sp
@@ -270,7 +268,6 @@
 .RE
 .SH "SEE ALSO"
 .PP
-
 \fBnntp-get\fR(1),
 \fBnntp-list\fR(1),
 \fBnntp-push\fR(1),
@@ -283,5 +280,5 @@
 .IP " 1." 4
 XDG Base Directory Specification
 .RS 4
-\%http://standards.freedesktop.org/basedir-spec/latest/
+\%https://specifications.freedesktop.org/basedir-spec/latest/
 .RE
diff -Nru sinntp-1.5/doc/manpages/sinntp.xml sinntp-1.6/doc/manpages/sinntp.xml
--- sinntp-1.5/doc/manpages/sinntp.xml	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/doc/manpages/sinntp.xml	2016-12-19 18:42:21.000000000 +0200
@@ -1,8 +1,8 @@
 <?xml version='1.0' encoding='utf-8'?>
-<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd' 
+<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' 'http://www.docbook.org/xml/4.5/docbookx.dtd'
 [
 	<!ENTITY p 'sinntp'>
-	<!ENTITY version '1.5'>
+	<!ENTITY version '1.6'>
 ]>
 
 <refentry>
@@ -63,7 +63,7 @@
 			<listitem><para>list,</para></listitem>
 			<listitem><para>pull,</para></listitem>
 			<listitem><para>push.</para></listitem>
-		</itemizedlist>	
+		</itemizedlist>
 		Above commands may also be invoked via convenience wrappers named in
 		<command>nntp-<replaceable>command</replaceable></command> scheme (e.g. <command>nntp-get</command>). See
 		wrappers' manual pages for command synopsis and description.  </para>
@@ -202,7 +202,7 @@
 			<listitem>
 				<para>
 					Location of sinntp data directory.
-					See <ulink url='http://standards.freedesktop.org/basedir-spec/latest/'>XDG Base Directory
+					See <ulink url='https://specifications.freedesktop.org/basedir-spec/latest/'>XDG Base Directory
 					Specification</ulink> for details.
 				</para>
 			</listitem>
@@ -257,4 +257,4 @@
 
 </refentry>
 
-<!-- vim:set ts=4 sw=4 tw=120: -->
+<!-- vim:set ts=4 sts=4 sw=4 tw=120: -->
diff -Nru sinntp-1.5/doc/mutt-integration.txt sinntp-1.6/doc/mutt-integration.txt
--- sinntp-1.5/doc/mutt-integration.txt	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/doc/mutt-integration.txt	2016-12-19 18:42:21.000000000 +0200
@@ -3,7 +3,7 @@
 ============================
 
 Since sinntp stores newsgroups in mboxes, adding them to mutt is simple, see
-description of ``mailboxes`` command in Mutt documentation for details. 
+description of ``mailboxes`` command in Mutt documentation for details.
 
 Posting to newsgroups requires adding folder hooks:
 
@@ -11,7 +11,7 @@
 
     folder-hook . unmy_hdr To
     folder-hook . unset sendmail
-    
+
     `for group in ${SINNTP_HOME:-$HOME/.sinntp}/*; do \
         group="$(basename $group | cut -d@ -f1)"; \
         echo -n folder-hook \"^${group}$\" \" \
@@ -26,4 +26,4 @@
 ``autoedit`` variable is also worth noticing when posting to newsgroups since
 ``To:`` header is added automatically in above configuration.
 
-.. vim:ft=rst ts=4 sw=4
+.. vim:ft=rst ts=4 sts=4 sw=4 et
diff -Nru sinntp-1.5/plugins.py sinntp-1.6/plugins.py
--- sinntp-1.5/plugins.py	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/plugins.py	2016-12-19 18:42:21.000000000 +0200
@@ -1,6 +1,6 @@
 # encoding=UTF-8
 
-# Copyright © 2008, 2009, 2010, 2011
+# Copyright © 2008-2015
 #   Piotr Lewandowski <piotr.lewandow...@gmail.com>,
 #   Jakub Wilk <jw...@jwilk.net>.
 #
@@ -13,8 +13,10 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 # GNU General Public License for more details.
 
+from __future__ import print_function
+
 def debug(*args, **kwargs):
-    print 'debug(*%r, **%r)' % (args, kwargs)
+    print('debug(*%r, **%r)' % (args, kwargs))
 
 def strip_headers(headers='To,Cc,Bcc', message=None):
     headers = headers.split(',')
@@ -27,4 +29,10 @@
         message['Content-Type'] = '%(type)s; charset=%(charset)s' % locals()
     return message
 
-# vim:ts=4 sw=4 et
+__all__ = [
+    'debug',
+    'mimify',
+    'strip_headers',
+]
+
+# vim:ts=4 sts=4 sw=4 et
diff -Nru sinntp-1.5/private/run-pyflakes sinntp-1.6/private/run-pyflakes
--- sinntp-1.5/private/run-pyflakes	1970-01-01 02:00:00.000000000 +0200
+++ sinntp-1.6/private/run-pyflakes	2016-12-19 18:42:21.000000000 +0200
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Copyright © 2016 Jakub Wilk <jw...@jwilk.net>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License, version 2, as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+PYTHON=${PYTHON:-python3}
+"$PYTHON" -m pyflakes --version > /dev/null || exit 1
+if [ $# -eq 0 ]
+then
+    set -- \
+        $(grep -l -r '^#!.*python' .) \
+        $(find . -name '*.py')
+fi
+exec "$PYTHON" -m pyflakes "$@"
+
+# vim:ts=4 sts=4 sw=4 et
diff -Nru sinntp-1.5/private/update-version sinntp-1.6/private/update-version
--- sinntp-1.5/private/update-version	1970-01-01 02:00:00.000000000 +0200
+++ sinntp-1.6/private/update-version	2016-12-19 18:42:21.000000000 +0200
@@ -0,0 +1,7 @@
+#!/bin/sh
+version=${1:?"no version number provided"}
+set -e
+set -x
+dch -m -v "$version" -u low -c doc/changelog
+sed -i -r -e "s/<(!ENTITY version) '[0-9.]+'>/<\1 '$version'>/" doc/manpages/*.xml
+sed -i -r -e "s/(__version__) = '[0-9.]+'/\1 = '$version'/" sinntp
diff -Nru sinntp-1.5/sinntp sinntp-1.6/sinntp
--- sinntp-1.5/sinntp	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/sinntp	2016-12-19 18:42:21.000000000 +0200
@@ -1,7 +1,7 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 # encoding=UTF-8
 
-# Copyright © 2008, 2009, 2010, 2011, 2012
+# Copyright © 2008-2016
 #   Piotr Lewandowski <piotr.lewandow...@gmail.com>,
 #   Jakub Wilk <jw...@jwilk.net>.
 #
@@ -14,45 +14,40 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 # GNU General Public License for more details.
 
+from __future__ import print_function
+
 __author__ = ('Jakub Wilk', 'Piotr Lewandowski')
-__version__ = '1.4'
+__version__ = '1.6'
 
 from nntplib import NNTP, NNTP_PORT, NNTPTemporaryError, NNTPError
-from cStringIO import StringIO
 import argparse
 import email
 import email.generator
 import errno
 import functools
+import io
 import logging
 import logging.handlers
 import mailbox
+import nntplib
 import os
 import os.path
-import re
+import signal
 import socket
 import sys
 
 import plugins
 import utils
 
-def monkey_patch_mailbox_module():
-    '''
-    Work-around a bug in the `mailbox` module.
-    See http://bugs.python.org/issue3228 for details.
-    '''
-    try:
-        create_carefully = mailbox._create_carefully
-    except AttributeError:
-        return
-    def create_carefully_666(*args, **kwargs):
-        file = create_carefully(*args, **kwargs)
-        mode = os.stat(file.name).st_mode & 0666
-        os.chmod(file.name, mode)
-        return file
-    mailbox._create_carefully = create_carefully_666
-monkey_patch_mailbox_module()
-del monkey_patch_mailbox_module
+# nntplib limits line length to 2048 bytes to prevent denial of service
+# (CVE-2013-1752). But the line length limit doesn't buy us much, because
+# sinntp loads the whole message into memory anyway. So let's lift the limit to
+# 1 megabyte.
+#
+# References:
+# * https://github.com/jwilk/sinntp/issues/9
+# * https://bugs.python.org/issue16040
+nntplib._MAXLINE = 1 << 20
 
 class Config(object):
 
@@ -77,8 +72,8 @@
 
     def __getitem__(self, name):
         try:
-            file = open(self._get_file_name(name), 'rb')
-        except IOError, ex:
+            file = open(self._get_file_name(name), 'rt', encoding='ASCII')
+        except IOError as ex:
             if ex.errno == errno.ENOENT:
                 return 0
             raise
@@ -88,17 +83,20 @@
             file.close()
 
     def __setitem__(self, name, value):
-        file = open(self._get_file_name(name), 'wb')
+        path = self._get_file_name(name)
+        file = open(path + '_tmp', 'wt', encoding='ASCII')
         try:
             file.write(str(value))
+            os.fsync(file.fileno())
         finally:
             file.close()
+        os.rename(path + '_tmp', path)
 
 class Command(object):
 
     def get_option_parser(self):
         o = argparse.ArgumentParser(usage=self.__doc__.rstrip())
-        o.add_argument('--version', action='version', version='%(prog)s ' + __version__,  help='show program\'s version number and exit')
+        o.add_argument('--version', action='version', version='%(prog)s ' + __version__, help='show program\'s version number and exit')
         o.add_argument('-s', '--syslog', dest='syslog', action='store_true', help='use syslog for logging')
         o.add_argument('-v', '--verbose', dest='verbose', action='store_true', help='be more verbose')
         o.add_argument('-q', '--quiet', dest='verbose', action='store_false', help='be less verbose')
@@ -167,13 +165,13 @@
         else:
             return
         no = str(i)
-        while 1:
-            _, _, message_id, body = connection.article(no)
+        while True:
+            _, (_, message_id, body) = connection.article(no)
             logging.debug('Reading message %s.', message_id)
             yield int(no), body
             try:
                 _, no, _ = connection.next()
-            except NNTPTemporaryError, ex:
+            except NNTPTemporaryError as ex:
                 if ex.response.startswith('421'):
                     break
                 raise
@@ -201,10 +199,8 @@
                         stat = os.stat(mbox_name)
                         atime = stat.st_atime
                         mode = stat.st_mode
-                    if not (message and message[-1].endswith('\n')):
-                        message += ['']
-                    message = '\n'.join(message)
-                    message = email.message_from_string(message)
+                    message = utils.join_lines(message)
+                    message = email.message_from_bytes(message)
                     for plugin in self.plugins:
                         message = plugin(message=message)
                         if message is None:
@@ -229,13 +225,13 @@
     '''
 
     def __call__(self, connection):
-        message = email.message_from_file(sys.stdin)
-        if not 'Newsgroups' in message and self.args:
+        message = email.message_from_binary_file(sys.stdin.buffer)
+        if 'Newsgroups' not in message and self.args:
             message['Newsgroups'] = ','.join(self.args)
         for plugin in self.plugins:
             message = plugin(message=message)
-        buffer = StringIO()
-        generator = email.generator.Generator(buffer, mangle_from_=False)
+        buffer = io.BytesIO()
+        generator = email.generator.BytesGenerator(buffer, mangle_from_=False)
         generator.flatten(message)
         buffer.seek(0)
         connection.post(buffer)
@@ -258,9 +254,9 @@
 
     def __call__(self, connection):
         logging.debug('Reading message %s.', self.message_id)
-        _, _, _, message = connection.article(self.message_id)
-        message = '\n'.join(message)
-        print message
+        _, (_, _, message) = connection.article(self.message_id)
+        message = utils.join_lines(message)
+        sys.stdout.buffer.write(message)
 
 class List(Command):
     '''
@@ -274,7 +270,14 @@
 
     def __call__(self, connection):
         _, groups = connection.list()
-        print '\n'.join(group for group, _, _, flag in groups)
+        for group, _, _, _ in groups:
+            # RFC 3997 §10.2 says that group names SHOULD be restricted to
+            # US-ASCII and that 8-bit encodings SHOULD NOT be used.
+            # But non-UTF-8 group names have been seen in the wild,
+            # so let's handle them gracefully.
+            bgroup = group.encode('UTF-8', 'surrogateescape')
+            sys.stdout.buffer.write(bgroup)
+            sys.stdout.buffer.write(b'\n')
 
 class BaseCommand(Command):
 
@@ -285,7 +288,9 @@
         list = List,
     )
 
-    __doc__ = ''.join(command.__doc__.rstrip() for command in COMMANDS.itervalues())
+    __doc__ = ''.join(
+        command.__doc__.rstrip() for command in COMMANDS.values()
+    )
 
     def get_option_parser(self):
         oparser = Command.get_option_parser(self)
@@ -314,20 +319,45 @@
     handler.setFormatter(formatter)
     logger.addHandler(handler)
     level = {
-        True:  logging.DEBUG,
-        None:  logging.INFO,
+        True: logging.DEBUG,
+        None: logging.INFO,
         False: logging.ERROR,
     }.get(verbose)
     logger.setLevel(level)
 
+class TerminatedBySignal(Exception):
+    pass
+
+def setup_signal_handler(signame):
+    def handler(signo, frame):
+        raise TerminatedBySignal(signame)
+    signal.signal(getattr(signal, signame), handler)
+
+def get_default_nntp_server():
+    server = os.getenv('NNTPSERVER')
+    if server:
+        return server
+    try:
+        file = open('/etc/news/server', encoding='ASCII')
+    except IOError as exc:
+        if exc.errno == errno.ENOENT:
+            return
+        raise
+    with file:
+        return file.readline().strip()
+
 if __name__ == '__main__':
     argv = sys.argv[1:]
     base_command = BaseCommand(argv)
     command = base_command.command_class(argv)
+    setup_signal_handler('SIGTERM')
     setup_logging(command.options.syslog, command.options.verbose)
-    host = command.options.server or os.getenv('NNTPSERVER') or \
-        (os.path.exists('/etc/news/server') and file('/etc/news/server').readline().strip())
-    if not host:
+    if sys.version_info < (3, 2):
+        # E-mail and NNTP modules are broken in Python 3.1:
+        # https://docs.python.org/dev/whatsnew/3.2.html#new-improved-and-deprecated-modules
+        logging.error('Python >= 3.2 is required')
+    host = command.options.server or get_default_nntp_server()
+    if host is None:
         sys.stderr.write('NNTP server is not specified.\n')
         sys.exit(2)
     host, port = utils.split_host(host, NNTP_PORT)
@@ -341,19 +371,18 @@
             readermode=True,
             usenetrc=command.options.netrc
         )
-    except socket.error, e:
-        logging.error('Could not connect to %s:%d: %s', host, port, e[1])
+    except socket.error as e:
+        logging.error('Could not connect to %s:%d: %s', host, port, e.strerror)
         sys.exit(3)
-    except NNTPError, e:
+    except NNTPError as e:
         logging.error('%s:%d returned an error: %s', host, port, e)
         sys.exit(4)
     try:
         command(connection)
-    except NNTPError, e:
+    except NNTPError as e:
         logging.error('NNTP error: %s', e)
         sys.exit(4)
-    finally:
-        connection.quit()
-        logging.info('Connection to %s:%d closed.', host, port)
+    connection.quit()
+    logging.info('Connection to %s:%d closed.', host, port)
 
-# vim:ts=4 sw=4 et
+# vim:ts=4 sts=4 sw=4 et
diff -Nru sinntp-1.5/tests.py sinntp-1.6/tests.py
--- sinntp-1.5/tests.py	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/tests.py	2016-12-19 18:42:21.000000000 +0200
@@ -1,7 +1,6 @@
-#!/usr/bin/python
 # encoding=UTF-8
 
-# Copyright © 2011, 2012
+# Copyright © 2011-2016
 #   Jakub Wilk <jw...@jwilk.net>.
 #
 # This program is free software; you can redistribute it and/or modify it
@@ -20,6 +19,13 @@
 
 import os
 
+try:
+    # Python 3.4+
+    from importlib import reload
+except ImportError:
+    # Python 3.3 or older
+    from imp import reload
+
 import utils
 
 class test_split_host(unittest.TestCase):
@@ -82,8 +88,7 @@
         )
 
     def test_XDG_DATA_HOME_unset(self):
-        os.environ['XDG_DATA_HOME'] = ''
-        del os.environ['XDG_DATA_HOME']
+        os.environ.pop('XDG_DATA_HOME', None)
         self._check_xdg_data_home()
 
     def test_XDG_DATA_HOME_empty(self):
@@ -98,7 +103,24 @@
         os.environ['XDG_DATA_HOME'] = '/eggs'
         self._check_xdg_data_home('/eggs')
 
+class test_join_lines(unittest.TestCase):
+
+    def test_empty(self):
+        lst = []
+        s = utils.join_lines(lst)
+        self.assertEqual(s, b'\n')
+
+    def test_trailing_lf(self):
+        lst = [b'eggs', b'bacon', b'spam']
+        s = utils.join_lines(lst)
+        self.assertEqual(s, b'eggs\nbacon\nspam\n')
+
+    def test_no_trailing_lf(self):
+        lst = [b'eggs', b'bacon', b'spam\n']
+        s = utils.join_lines(lst)
+        self.assertEqual(s, b'eggs\nbacon\nspam\n')
+
 if __name__ == '__main__':
     unittest.main()
 
-# vim:ts=4 sw=4 et
+# vim:ts=4 sts=4 sw=4 et
diff -Nru sinntp-1.5/tools/build-source-tarball sinntp-1.6/tools/build-source-tarball
--- sinntp-1.5/tools/build-source-tarball	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/tools/build-source-tarball	1970-01-01 02:00:00.000000000 +0200
@@ -1,28 +0,0 @@
-#!/bin/sh
-name=sinntp
-url=https://sinntp.googlecode.com/hg/
-if [ $# -ne 1 ]
-then
-  printf '%s <version>\n' "$0" >&2
-  exit 1
-fi
-set -e -x
-pwd="$PWD"
-version="$1"
-sourceroot=`mktemp -d -t "$name-source-XXXXXX"`
-export TAR_OPTIONS="--owner root --group root --mode a+rX"
-export GZIP="-9 -n"
-mkdir -p "$sourceroot/$name-$version"
-if [ -d .hg ]
-then
-  hg archive -r "$version" "$sourceroot/$name-$version"
-else
-  hg clone -r "$version" "$url" "$sourceroot/$name-$version"
-fi
-cd "$sourceroot"
-rm -Rf */.hg*
-make -C */doc/manpages/
-tar -czf "$pwd/$name-$version.tar.gz" */
-rm -Rf "$sourceroot"
-
-# vim:ts=2 sw=2 et
diff -Nru sinntp-1.5/tools/bump-version sinntp-1.6/tools/bump-version
--- sinntp-1.5/tools/bump-version	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/tools/bump-version	1970-01-01 02:00:00.000000000 +0200
@@ -1,7 +0,0 @@
-#!/bin/sh
-version=${1:?"no version number provided"}
-windows_version="$(printf -- '%s' "$version" | sed -e 's/[.]/,/g'),0"
-set -e
-set -x
-dch -m -v "$version" -c doc/changelog
-sed -i -r -e "s/<(!ENTITY version) '[0-9.]+'>/<\1 '$version'>/" doc/manpages/*.xml
diff -Nru sinntp-1.5/utils.py sinntp-1.6/utils.py
--- sinntp-1.5/utils.py	2012-04-18 23:38:05.000000000 +0300
+++ sinntp-1.6/utils.py	2016-12-19 18:42:21.000000000 +0200
@@ -1,6 +1,6 @@
 # encoding=UTF-8
 
-# Copyright © 2011, 2012
+# Copyright © 2011-2016
 #   Jakub Wilk <jw...@jwilk.net>.
 #
 # This program is free software; you can redistribute it and/or modify it
@@ -12,6 +12,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 # GNU General Public License for more details.
 
+import itertools
 import os
 import re
 
@@ -53,10 +54,29 @@
     def save_data_path(xdg, resource):
         path = os.path.join(xdg.xdg_data_home, resource)
         try:
-            os.makedirs(path, 0700)
+            os.makedirs(path, 0o700)
         except OSError:
             if not os.path.isdir(path):
                 raise
         return path
 
-# vim:ts=4 sw=4 et
+def join_lines(lst):
+    r'''
+    join the list of lines;
+    ensure there's trailing \n at the end
+    '''
+    if not lst:
+        return b'\n'
+    if lst[-1].endswith(b'\n'):
+        itr = iter(lst)
+    else:
+        itr = itertools.chain(lst, [b''])
+    return b'\n'.join(itr)
+
+__all__ = [
+    'join_lines',
+    'split_host',
+    'xdg',
+]
+
+# vim:ts=4 sts=4 sw=4 et

Reply via email to