Hello community,

here is the log from the commit of package libite for openSUSE:Factory checked 
in at 2020-03-18 12:41:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libite (Old)
 and      /work/SRC/openSUSE:Factory/.libite.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libite"

Wed Mar 18 12:41:03 2020 rev:4 rq:785962 version:2.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libite/libite.changes    2019-08-28 
18:35:07.869287367 +0200
+++ /work/SRC/openSUSE:Factory/.libite.new.3160/libite.changes  2020-03-18 
12:45:41.776966211 +0100
@@ -1,0 +2,13 @@
+Tue Mar 17 08:53:03 UTC 2020 - Martin Hauke <mar...@gmx.de>
+
+- Update to versino 2.2.0
+  Changes
+  * Add support for systemf(), formatted string system() replacement
+  * Add support for fmkpath(), formatted string mkpath()
+  * Add support for fopenf(), formatted string fopen() replacement
+  Fixes
+  * Fix possible memory leak in rsync(), found by Coverity Scan
+  * Check return value of fstat() to prevent bogus destination file
+    times when using copyfile(), found by Coverity Scan
+
+-------------------------------------------------------------------

Old:
----
  libite-2.1.0.tar.gz

New:
----
  libite-2.2.0.tar.gz

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

Other differences:
------------------
++++++ libite.spec ++++++
--- /var/tmp/diff_new_pack.S1rCoF/_old  2020-03-18 12:45:44.208967750 +0100
+++ /var/tmp/diff_new_pack.S1rCoF/_new  2020-03-18 12:45:44.252967777 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libite
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 # Copyright (c) 2018, Martin Hauke <mar...@gmx.de>
 #
 # All modifications and additions to the file contributed by third parties
@@ -19,7 +19,7 @@
 
 %define sover 5
 Name:           libite
-Version:        2.1.0
+Version:        2.2.0
 Release:        0
 Summary:        BSD function library
 License:        MIT AND X11

++++++ libite-2.1.0.tar.gz -> libite-2.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/.gitignore new/libite-2.2.0/.gitignore
--- old/libite-2.1.0/.gitignore 2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/.gitignore 2020-03-16 17:41:44.000000000 +0100
@@ -1,16 +1,8 @@
 *~
-*.d
-*.o
-*.so
-*.so.*
-*.a
-.deps
-.libs
 ID
 GPATH
 GRTAGS
 GTAGS
-tmp/
 compile
 config.*
 configure
@@ -25,5 +17,5 @@
 aclocal.m4
 ar-lib
 autom4te.cache
-libite*
-test-driver
\ No newline at end of file
+test-driver
+libite.pc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/.travis.yml new/libite-2.2.0/.travis.yml
--- old/libite-2.1.0/.travis.yml        2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/.travis.yml        2020-03-16 17:41:44.000000000 +0100
@@ -10,6 +10,25 @@
   - gcc
   - clang
 
+env:
+  global:
+   # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
+   #   via the "travis encrypt" command using the project repo's public key
+   - secure: 
"EcWeDUONZnl7IHBWD2rc92LwTWGIlqBZ7wQrLfe3mFXOnB+IZjJIBnDsJDnHDWwA8fGF9NaJbRz4BThroafueUwkDXNyvph1Mdaxm6mdMPyjNJ4H1AFkd9Fz0LYdLNXCPl43tm6s1BR6OWts17lWF6sMnMmIu8gUgXJVg2qsDBl3O9eCoRvQ/h4elLfXZ03fHi4XzzzQvZVyDCg8MCzXIgHJzdkv4llpiCLWQExFbIAVy39euDnx+UuWYB7WDdUbOc7HkkUwf0/vX9PhKVQFKOkXn1ddN0iCsWRH3ti5KXWrBeRO3RPu6Z5YtR8l1WK7iqCYOLuMBW23tXsBQsIW09f1+fFgJ8Ig5hHRRbDinbTUb+mHUJZmNv9ZTc3hPYH4Fyev/ljk42VVDdIBy9AqO42jj8VGmDmiIq47aqNJZUGYZgQlGXGqk9MtavJrqEVcFSgyfEtI+c4n4fzvMRpcEwjnbp482s1xNzHQZ1GQI77Td5UUXXWyNSCoQoE/VpkAesYJAw8KwXOXveDr3Qu0HhuQu1oyLmWHlZHYDu+TInjY81gpGw9Cm7/SdFoA0Ag49PlAXdPRymbP01B50MqrCTxtXEHtdXxhrkDvaoUp7heSuvO0fS+mI5F7eQ4Ji2JdyRSt1KpXVNAyL1FrO/yznM3EwcXPmWmrc+QjFtC9vY4="
+
+before_install:
+  - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne 
'/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
+
+addons:
+  coverity_scan:
+    project:
+      name: "troglobit/libite"
+      description: "That missing frog DNA you've been looking for"
+    notification_email: troglo...@gmail.com
+    build_command_prepend: "./autogen.sh && ./configure --prefix=/tmp 
--disable-silent-rules"
+    build_command: "make clean all"
+    branch_pattern: dev
+
 script:
   - ./autogen.sh
   - ./configure --prefix=/tmp --disable-silent-rules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/ChangeLog.md 
new/libite-2.2.0/ChangeLog.md
--- old/libite-2.1.0/ChangeLog.md       2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/ChangeLog.md       2020-03-16 17:41:44.000000000 +0100
@@ -3,6 +3,39 @@
 
 All notable changes to the project are documented in this file.
 
+
+[v2.2.0][] - 2020-03-16
+-----------------------
+
+### Changes
+- Add support for `systemf()`, formatted string `system()` replacement
+- Add support for `fmkpath()`, formatted string `mkpath()`
+- Add support for `fopenf()`, formatted string `fopen()` replacement
+
+### Fixes
+- Fix possible memory leak in `rsync()`, found by Coverity Scan
+- Check return value of `fstat()` to prevent bogus destination file
+  times when using `copyfile()`, found by Coverity Scan
+
+
+[v2.1.2][] - 2020-02-22
+-----------------------
+
+### Fixes
+- Fix Debian package upgrade from libite -> libite5
+
+
+[v2.1.1][] - 2020-02-22
+-----------------------
+
+### Changes
+- Add test/example for `printhdr()`
+- Update copyright years
+
+### Fixes
+- chomp: Check for beginning of string while removing \n's
+
+
 [v2.1.0][] - 2019-08-26
 -----------------------
 
@@ -339,7 +372,10 @@
 Initial extraction of frog DNA from [Finit][].  See [README][] for API details.
 
 
-[UNRELEASED]: https://github.com/troglobit/libite/compare/v2.1.0...HEAD
+[UNRELEASED]: https://github.com/troglobit/libite/compare/v2.2.0...HEAD
+[v2.2.0]: https://github.com/troglobit/libite/compare/v2.1.2...v2.2.0
+[v2.1.2]: https://github.com/troglobit/libite/compare/v2.1.1...v2.1.2
+[v2.1.1]: https://github.com/troglobit/libite/compare/v2.1.0...v2.1.1
 [v2.1.0]: https://github.com/troglobit/libite/compare/v2.0.2...v2.1.0
 [v2.0.2]: https://github.com/troglobit/libite/compare/v2.0.1...v2.0.2
 [v2.0.1]: https://github.com/troglobit/libite/compare/v2.0.0...v2.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/LICENSE new/libite-2.2.0/LICENSE
--- old/libite-2.1.0/LICENSE    2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/LICENSE    2020-03-16 17:41:44.000000000 +0100
@@ -1,10 +1,5 @@
-Much of the code in libite (-lite) is written by Claudio Matsuoka for Finit
-and released under the MIT/X11 license.  Joachim Nilsson later improved on
-the Finit code base and included pieces of software released under the ISC
-and BSD licenses.  See each respective file for license details.
-
 Copyright (c) 2008-2010  Claudio Matsuoka <cmatsu...@gmail.com>
-Copyright (c) 2008-2016  Joachim Nilsson <troglo...@gmail.com>
+Copyright (c) 2008-2020  Joachim Nilsson <troglo...@gmail.com>
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/Makefile.am new/libite-2.2.0/Makefile.am
--- old/libite-2.1.0/Makefile.am        2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/Makefile.am        2020-03-16 17:41:44.000000000 +0100
@@ -6,39 +6,45 @@
 pkgconfig_DATA      = libite.pc
 SUBDIRS             = src tests
 
-## Generate .deb package
-package:
-       @dpkg-buildpackage -uc -us -B
-
 ## Generate MD5 checksum file
 MD5 = md5sum
 md5-dist:
-       @for file in $(DIST_ARCHIVES); do                                       
                \
-               $(MD5) $$file > $$file.md5;                                     
                \
+       @for file in $(DIST_ARCHIVES); do       \
+               $(MD5) $$file > ../$$file.md5;  \
        done
 
 ## Check if tagged in git
 release-hook:
-       if [ ! `git tag | grep $(PACKAGE_VERSION)` ]; then                      
                \
-               echo;                                                           
                \
-               printf "\033[1m\033[41mCannot find release tag 
$(PACKAGE_VERSION)\033[0m\n";    \
-               printf "\033[1m\033[5mDo release anyway?\033[0m "; read yorn;   
                \
-               if [ "$$yorn" != "y" -a "$$yorn" != "Y" ]; then                 
                \
-                       printf "OK, aborting release.\n";                       
                \
-                       exit 1;                                                 
                \
-               fi;                                                             
                \
-               echo;                                                           
                \
-       else                                                                    
                \
-               echo;                                                           
                \
-               printf "\033[1m\033[42mFound GIT release tag 
$(PACKAGE_VERSION)\033[0m\n";      \
-               printf "\033[1m\033[44m>>Remember to push tags!\033[0m\n";      
                \
-               echo;                                                           
                \
+       @if [ ! `git tag | grep $(PACKAGE_VERSION)` ]; then                     
        \
+               echo;                                                           
        \
+               printf "\e[1m\e[41mCannot find release tag 
$(PACKAGE_VERSION)\e[0m\n";  \
+               printf "\e[1m\e[5mDo release anyway?\e[0m "; read yorn;         
        \
+               if [ "$$yorn" != "y" -a "$$yorn" != "Y" ]; then                 
        \
+                       printf "OK, aborting release.\n";                       
        \
+                       exit 1;                                                 
        \
+               fi;                                                             
        \
+               echo;                                                           
        \
+       else                                                                    
        \
+               echo;                                                           
        \
+               printf "\e[1m\e[42mFound GIT release tag 
$(PACKAGE_VERSION)\e[0m\n";    \
+               printf "\e[1m\e[44m>>Remember to push tags!\e[0m\n";            
        \
+               echo;                                                           
        \
        fi
 
+# lintian --profile debian -i -I --show-overrides ../$PKG.changes
+package build-deb:
+       @dpkg-buildpackage -uc -us -B
+
 ## Target to run when building a release
-release: distcheck release-hook md5-dist
-       @for file in $(DIST_ARCHIVES); do                                       
                \
-               printf "$$file    \tDistribution tarball\n";                    
                \
-               printf "$$file.md5\t"; cat $$file.md5 | cut -f1 -d' ';          
                \
-               mv $$file* ../;                                                 
                \
+release: release-hook distcheck package md5-dist
+       @mv $(DIST_ARCHIVES) ../
+       @echo
+       @echo "Resulting release files:"
+       @echo 
"================================================================="
+       @for file in $(DIST_ARCHIVES); do                                       
\
+               printf "%-32s Distribution tarball\n" $$file;                   
\
+               printf "%-32s " $$file.md5; cat ../$$file.md5 | cut -f1 -d' ';  
\
+       done
+       @for file in `cd ..; ls $(PACKAGE)*_$(VERSION)*`; do                    
\
+               printf "%-32s Debian/Ubuntu package\n" $$file;                  
\
        done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/README.md new/libite-2.2.0/README.md
--- old/libite-2.1.0/README.md  2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/README.md  2020-03-16 17:41:44.000000000 +0100
@@ -1,7 +1,6 @@
 -lite | Frog DNA, basically
 ===========================
-[![Travis Status][]][Travis]
-
+[![Travis Status][]][Travis] [![Coverity Status]][Coverity Scan]
 
 Table of Contents
 -----------------
@@ -12,7 +11,7 @@
 * [Generic Functions](#generic-functions)
 * [OpenBSD Functions](#openbsd-functions)
 * [Build & Install](#origin--references)
-* [TODO](#todo)
+* [Origin & References](#origin--references)
 
 
 > **NOTE:** Incompatible changes in v2.0 compared to v1.x!
@@ -181,6 +180,15 @@
 
   Check for the existence of a directory, returns True(1) or False(0).
 
+- `fopenf(mode, fmt, ...)`
+
+  Like `fopen()`, but takes a formatted string as argument.  This
+  greatly simplifies operations that usually consist of composing a
+  filename from parts into a dynamic buffer before actually opening
+  the file.
+  
+  > **Notice:** the swapped order of `pathname` and `mode`!
+
 - `fsendfile(src, dst, len)`
 
   Copy data between file streams, very similar to `fcopyfile()`, but
@@ -223,6 +231,12 @@
 
   Like `makepath()`, but also takes a `mode_t` permission mode argument.
 
+- `fmkpath(mode, fmt, ...)`
+
+  Like `mkpath()`, but takes a formatted string as argument.
+
+  > **Notice:** the swapped order of `pathname` and `mode`!
+
 - `movefile(src, dst)`
 
   Like `copyfile()`, but renames `src` to `dst`, or recreates symlink
@@ -289,6 +303,12 @@
   Find matching string in an array of strings.  Returns index in array
   on match, or `-1` on error or not found.
 
+`systemf(fmt, ...)`
+
+  Like `system()`, but takes a formatted string as argument.  This
+  greatly simplifies operations that usually consist of composing a
+  command from parts into a dynamic buffer before calling it.
+
 - `telnet_open(), telnet_close(), telnet_expect()`
 
   Poor mans telnet expect in C.  Opens connection to a Telnet service;
@@ -407,6 +427,14 @@
 to generate a `configure` script.  It is a generated file and otherwise
 only included in released tarballs.
 
+Origin & References
+-------------------
+
+Much of the code in libite (-lite) is written by [Claudio Matsuoka][]
+for [Finit][original finit] and released under the MIT/X11 license.
+Joachim Nilsson later improved on the [Finit][] code base and included
+pieces of software released under the ISC and BSD licenses.  See each
+respective file for license details.
 
 [1]: https://github.com/troglobit/finit
 [2]: http://www.openbsd.org/
@@ -419,3 +447,8 @@
 [BSD]: https://en.wikipedia.org/wiki/BSD_licenses
 [Travis]: https://travis-ci.org/troglobit/libite
 [Travis Status]: https://travis-ci.org/troglobit/libite.png?branch=master
+[Coverity Scan]:    https://scan.coverity.com/projects/20602
+[Coverity Status]:  https://img.shields.io/coverity/scan/20602.svg
+[Claudio Matsuoka]: https://github.com/cmatsuoka
+[original finit]: http://helllabs.org/finit/
+[Finit]: https://github.com/troglobit/finit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/configure.ac 
new/libite-2.2.0/configure.ac
--- old/libite-2.1.0/configure.ac       2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/configure.ac       2020-03-16 17:41:44.000000000 +0100
@@ -1,4 +1,5 @@
-AC_INIT(libite, 2.1.0, https://github.com/troglobit/libite/issues)
+AC_INIT(libite, 2.2.0, https://github.com/troglobit/libite/issues)
+AC_CONFIG_AUX_DIR(aux)
 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
 AM_SILENT_RULES([yes])
 
@@ -8,7 +9,8 @@
 AC_CONFIG_MACRO_DIR([m4])
 
 AC_PROG_CC
-AM_PROG_AR
+AC_PROG_INSTALL
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 LT_INIT
 
 AC_OUTPUT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/debian/.gitignore 
new/libite-2.2.0/debian/.gitignore
--- old/libite-2.1.0/debian/.gitignore  2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/debian/.gitignore  2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,9 @@
+*.log
+*.substvars
+.debhelper/*
 tmp/*
-libuev/*
-libuev*
+libite5/*
+libite-dev/*
 autoreconf*
 debhelper*
 files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/debian/changelog 
new/libite-2.2.0/debian/changelog
--- old/libite-2.1.0/debian/changelog   2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/debian/changelog   2020-03-16 17:41:44.000000000 +0100
@@ -1,3 +1,33 @@
+libite (2.2.0) unstable; urgency=medium
+
+  * New functions:
+    - systemf(), formatted string system() replacement
+    - fmkpath(), formatted string mkpath() replacement
+    - fopenf(), formatted string fopen() replacement
+  * Fixes
+    - possible memory leak in rsync()
+    - Check return value of fstat() to prevent bogus destination file
+      times when using copyfile()
+
+ -- Joachim Nilsson <troglo...@gmail.com>  Mon, 16 Mar 2020 15:42:02 +0100
+
+libite (2.1.2) stable; urgency=high
+
+  * Fix upgrade of base package, new library name to match SONAME
+    breaks upgrade from libite_2.0.x.deb to libite5_2.1.x.deb
+
+ -- Joachim Nilsson <troglo...@gmail.com>  Sat, 22 Feb 2020 15:04:27 +0100
+
+libite (2.1.1) stable; urgency=medium
+
+  * Fix to chomp(), ensure stopping before beginning of string
+  * Added example of printhdr()
+  * Update copyright years
+  * Add missing libite5.symbols file, found by lintian
+  * Fix package short description, found by linitian
+
+ -- Joachim Nilsson <troglo...@gmail.com>  Sat, 22 Feb 2020 13:52:24 +0100
+
 libite (2.1.0) unstable; urgency=medium
 
   * New functions; strmatch(), strnmatch(), yorn(), telnet expect APIs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/debian/control 
new/libite-2.2.0/debian/control
--- old/libite-2.1.0/debian/control     2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/debian/control     2020-03-16 17:41:44.000000000 +0100
@@ -1,8 +1,8 @@
 Source: libite
 Priority: optional
 Maintainer: Joachim Nilsson <troglo...@gmail.com>
-Build-Depends: dpkg-dev (>= 1.14.9), debhelper (>= 10)
-Standards-Version: 4.1.0
+Build-Depends: debhelper (>= 10), libtool
+Standards-Version: 4.3.0
 Section: libs
 Homepage: https://github.com/troglobit/libite/
 Vcs-Git: https://github.com/troglobit/libite.git
@@ -16,14 +16,14 @@
 Description: static library, header files, and docs for libite
  Static library, header files, and documentation for libite.
  .
- Libite is a lightweight library of frog DNA. It can be used to fill the
- gaps in any dinosaur project. It holds useful functions and macros
- developed by both Finit and the OpenBSD project. Most notably the
+ Libite is a lightweight library of frog DNA.  It can be used to fill
+ the gaps in any dinosaur project.  It holds useful functions and macros
+ developed by both Finit and the OpenBSD project.  Most notably the
  string functions: strlcpy(3), strlcat(3) and the highly useful *BSD
  sys/queue.h and sys/tree.h API's.
  .
- Libite is the frog DNA missing in GNU libc. However, -lite does not aim
- to become another GLIB! One noticeable gap in GLIBC is the missing
+ Libite is the frog DNA missing in GNU libc.  However, -lite does not
+ aim to become another GLIB!  One noticeable gap in GLIBC is the missing
  _SAFE macros in the BSD sys/queue.h API — highly recommended when
  traversing lists to delete/free nodes.
  .
@@ -32,9 +32,12 @@
  liberal and can be used freely in proprietary software if needed.
 
 Package: libite5
+Replaces: libite
+Conflicts: libite
+Provides: libite
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}
-Description: That missing frog DNA you've been looking for.
+Description: That missing frog DNA you've been looking for
  Libite, or -lite, is a lightweight library of frog DNA.  It can be used
  to fill the gaps in any dinosaur project.  It holds useful functions
  and macros developed by both Finit and the OpenBSD project.  Most
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/debian/copyright 
new/libite-2.2.0/debian/copyright
--- old/libite-2.1.0/debian/copyright   2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/debian/copyright   2020-03-16 17:41:44.000000000 +0100
@@ -4,7 +4,7 @@
 Files: *
 Copyright:
 2008-2010 Claudio Matsuoka <cmatsu...@gmail.com>
-2008-2016 Joachim Nilsson <troglo...@gmail.com>
+2008-2020 Joachim Nilsson <troglo...@gmail.com>
 License: MIT
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
@@ -25,19 +25,19 @@
 THE SOFTWARE.
 
 Files: chomp.c
-Copyright: 2014-2015 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2014-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
 Files: conio.h
-Copyright: 2009-2013 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2009-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
 Files: dir.c
-Copyright: 2008-2016 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2008-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
 Files: lfile.c
-Copyright: 2015-2016 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2015-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
 Files: pidfile.c
@@ -53,7 +53,7 @@
 License: ISC
 
 Files: rsync.c
-Copyright: 2011, 2012 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2011-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
 Files: strdupa.h strndupa.h
@@ -65,11 +65,11 @@
 License: MIT
 
 Files: strmatch.c
-Copyright: 2009-2018 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2009-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
 Files: strnlen.c
-Copyright: 2016 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2016-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
 Files: strtonum.c
@@ -77,19 +77,19 @@
 License: ISC
 
 Files: telnet.c
-Copyright: 2010, 2013, 2019 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2010-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
 Files: tempfile.c
-Copyright: 2015-2016 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2015-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
-Files: tree.c
-Copyright: 2015 Joachim Nilsson <troglo...@gmail.com>
-License: ISC
+Files: tree.h
+Copyright: 2002 Niels Provos <pro...@citi.umich.edu>
+License: BSD-2-clause
 
 Files: yorn.c
-Copyright: 2009 Joachim Nilsson <troglo...@gmail.com>
+Copyright: 2009-2020 Joachim Nilsson <troglo...@gmail.com>
 License: ISC
 
 Files: tests/*.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/debian/libite5.symbols 
new/libite-2.2.0/debian/libite5.symbols
--- old/libite-2.1.0/debian/libite5.symbols     1970-01-01 01:00:00.000000000 
+0100
+++ new/libite-2.2.0/debian/libite5.symbols     2020-03-16 17:41:44.000000000 
+0100
@@ -0,0 +1,48 @@
+libite.so.5 libite5 #MINVER#
+* Build-Depends-Package: libite-dev
+ __pidfile_name@Base 2.0.0
+ __pidfile_path@Base 2.0.0
+ chomp@Base 2.0.0
+ copyfile@Base 2.0.0
+ dir@Base 2.0.0
+ fcopyfile@Base 2.0.0
+ fexist@Base 2.0.0
+ fgetint@Base 2.0.0
+ fisdir@Base 2.0.0
+ fmkpath@Base 2.2.0
+ fopenf@Base 2.2.0
+ fparseln@Base 2.0.0
+ fsendfile@Base 2.0.0
+ ifconfig@Base 2.0.0
+ initscr@Base 2.0.0
+ lfclose@Base 2.0.0
+ lfgetint@Base 2.0.0
+ lfgetkey@Base 2.0.0
+ lfopen@Base 2.0.0
+ lftok@Base 2.0.0
+ makepath@Base 2.0.0
+ mkpath@Base 2.0.0
+ movefile@Base 2.0.0
+ pidfile@Base 2.0.0
+ pidfile_poll@Base 2.0.0
+ pidfile_read@Base 2.0.0
+ pidfile_signal@Base 2.1.0
+ progress@Base 2.0.0
+ progress_simple@Base 2.0.0
+ reallocarray@Base 2.0.0
+ rsync@Base 2.0.0
+ sdbuf@Base 2.0.0
+ strlcat@Base 2.0.0
+ strlcpy@Base 2.0.0
+ strmatch@Base 2.1.0
+ strnmatch@Base 2.1.0
+ strtonum@Base 2.1.0
+ systemf@Base 2.2.0
+ telnet_close@Base 2.1.0
+ telnet_expect@Base 2.1.0
+ telnet_open@Base 2.1.0
+ telnet_session@Base 2.1.0
+ tempfile@Base 2.0.0
+ which@Base 2.0.0
+ whichp@Base 2.0.0
+ yorn@Base 2.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/.gitignore 
new/libite-2.2.0/src/.gitignore
--- old/libite-2.1.0/src/.gitignore     1970-01-01 01:00:00.000000000 +0100
+++ new/libite-2.2.0/src/.gitignore     2020-03-16 17:41:44.000000000 +0100
@@ -0,0 +1,3 @@
+*.la
+.libs/*
+libite_la*
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/Makefile.am 
new/libite-2.2.0/src/Makefile.am
--- old/libite-2.1.0/src/Makefile.am    2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/Makefile.am    2020-03-16 17:41:44.000000000 +0100
@@ -2,10 +2,10 @@
 
 libite_la_CPPFLAGS    = -D_GNU_SOURCE
 libite_la_CFLAGS      = -W -Wall -Wextra
-libite_la_LDFLAGS     = $(AM_LDFLAGS) -version-info 5:1:0
+libite_la_LDFLAGS     = $(AM_LDFLAGS) -version-info 6:0:1
 libite_la_SOURCES     = chomp.c                copyfile.c                      
\
                        conio.c         conio.h                         \
-                       dir.c                                           \
+                       dir.c           fopenf.c                        \
                        fexist.c        fisdir.c                        \
                        fparseln.c      fsendfile.c                     \
                        ifconfig.c      lfile.c                         \
@@ -14,7 +14,8 @@
                        reallocarray.c  rsync.c                         \
                        strlcpy.c       strlcat.c       strtonum.c      \
                        strdupa.h       strndupa.h      strnlen.h       \
-                       strmatch.c      telnet.c        tempfile.c      \
+                       strmatch.c      systemf.c                       \
+                       telnet.c        tempfile.c                      \
                        yorn.c          which.c                         \
                        lite.h          strlite.h                       \
                        queue.h         tree.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/chomp.c new/libite-2.2.0/src/chomp.c
--- old/libite-2.1.0/src/chomp.c        2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/chomp.c        2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Perl inspired chomp() implementation.
  *
- * Copyright (c) 2014-2015  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2014-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -23,7 +23,7 @@
  * @str: String to chomp
  *
  * This function is like Perl chomp, but it's set to chop of all
- * trailing newlines.
+ * trailing newlines.  Useful in combination with fgets().
  *
  * Returns:
  * If @str is a valid pointer this function returns @str, otherwise
@@ -39,7 +39,7 @@
        }
 
        p = str + strlen(str) - 1;
-        while (*p == '\n')
+        while (p >= str && *p == '\n')
                *p-- = 0;
 
        return str;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/conio.c new/libite-2.2.0/src/conio.c
--- old/libite-2.1.0/src/conio.c        2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/conio.c        2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* A conio.h like implementation for VTANSI displays.
  *
- * Copyright (c) 2009-2017  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2009-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/conio.h new/libite-2.2.0/src/conio.h
--- old/libite-2.1.0/src/conio.h        2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/conio.h        2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* A conio.h like implementation for VTANSI displays.
  *
- * Copyright (c) 2009-2017  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2009-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/copyfile.c 
new/libite-2.2.0/src/copyfile.c
--- old/libite-2.1.0/src/copyfile.c     2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/copyfile.c     2020-03-16 17:41:44.000000000 +0100
@@ -85,7 +85,9 @@
        struct stat st;
        struct timespec tv[2];
 
-       fstat(in, &st);
+       if (fstat(in, &st))
+               return;
+
        tv[0] = st.st_atim;
        tv[1] = st.st_mtim;
        futimens(out, tv);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/dir.c new/libite-2.2.0/src/dir.c
--- old/libite-2.1.0/src/dir.c  2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/dir.c  2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Functions for operating on files in directories.
  *
- * Copyright (c) 2008-2016  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2008-2020  Joachim Nilsson <troglo...@gmail.com>
  * 
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/fopenf.c 
new/libite-2.2.0/src/fopenf.c
--- old/libite-2.1.0/src/fopenf.c       1970-01-01 01:00:00.000000000 +0100
+++ new/libite-2.2.0/src/fopenf.c       2020-03-16 17:41:44.000000000 +0100
@@ -0,0 +1,61 @@
+/* Formatted fopen()
+ *
+ * Copyright (c) 2020  Joachim Nilsson <troglo...@gmail.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+/**
+ * fopenf - Open a file based on the formatted string and optional arguments
+ * @mode: Last argument in optional list, if omitted EINVAL
+ * @fmt:  Formatted string to be composed into a pathname
+ *
+ * This function is an extension to the fopen() family, lessening the burden
+ * of first having to compose the filename from parts in a seprate buffer.
+ *
+ * Returns:
+ * Upon successful completion fopenf() a FILE pointer.  Otherwise, NULL
+ * is returned and errno is set to indicate the error.
+ */
+FILE *fopenf(const char *mode, const char *fmt, ...)
+{
+       va_list ap;
+       FILE *fp = NULL;
+       char *file;
+       int len;
+
+       va_start(ap, fmt);
+       len = vsnprintf(NULL, 0, fmt, ap);
+       va_end(ap);
+
+       va_start(ap, fmt);
+       file = alloca(len + 1);
+       if (file) {
+               vsnprintf(file, len + 1, fmt, ap);
+               fp = fopen(file, mode);
+       }
+       va_end(ap);
+
+       return fp;
+}
+
+/**
+ * Local Variables:
+ *  indent-tabs-mode: t
+ *  c-file-style: "linux"
+ * End:
+ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/ifconfig.c 
new/libite-2.2.0/src/ifconfig.c
--- old/libite-2.1.0/src/ifconfig.c     2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/ifconfig.c     2020-03-16 17:41:44.000000000 +0100
@@ -1,7 +1,7 @@
 /* Fastinit (finit) ifconfig() implementation.
  *
- * Copyright (c) 2008 Claudio Matsuoka <http://helllabs.org/finit/>
- * Copyright (C) 2009-2014  Joachim Nilsson <joachim.nils...@westermo.se>
+ * Copyright (c) 2008-2010  Claudio Matsuoka <http://helllabs.org/finit/>
+ * Copyright (C) 2009-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to 
deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/lfile.c new/libite-2.2.0/src/lfile.c
--- old/libite-2.1.0/src/lfile.c        2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/lfile.c        2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Parse UNIX /etc configuration files like /etc/protocols and /etc/services
  *
- * Copyright (c) 2015-2016  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2015-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/lite.h new/libite-2.2.0/src/lite.h
--- old/libite-2.1.0/src/lite.h 2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/lite.h 2020-03-16 17:41:44.000000000 +0100
@@ -1,7 +1,7 @@
 /* Collection of frog DNA
  *
  * Copyright (c) 2008-2010  Claudio Matsuoka <cmatsu...@gmail.com>
- * Copyright (c) 2008-2016  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2008-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to 
deal
@@ -65,6 +65,7 @@
 int     fexist     (const char *file);
 int     fisdir     (const char *path);
 
+FILE   *fopenf     (const char *mode, const char *fmt, ...);
 FILE   *tempfile   (void);
 ssize_t copyfile   (const char *src, const char *dst, int len, int opt);
 int     movefile   (const char *src, const char *dst);
@@ -80,6 +81,7 @@
 int     lfgetint   (lfile_t *lf, const char *key);
 int     fgetint    (const char *file, const char *sep, const char *key);
 
+int     fmkpath    (mode_t mode, const char *fmt, ...);
 int     mkpath     (const char *dir, mode_t mode);
 int     makepath   (const char *dir);
 
@@ -96,6 +98,8 @@
 void    progress       (int percent, int max_width);
 void    progress_simple(int percent);
 
+int     systemf        (const char *fmt, ...);
+
 sdbuf_t*telnet_open    (int addr, short port);
 int     telnet_close   (sdbuf_t *ctx);
 int     telnet_expect  (sdbuf_t *ctx, char *script[], FILE *output);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/makepath.c 
new/libite-2.2.0/src/makepath.c
--- old/libite-2.1.0/src/makepath.c     2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/makepath.c     2020-03-16 17:41:44.000000000 +0100
@@ -17,6 +17,8 @@
 
 #include <errno.h>
 #include <libgen.h>
+#include <stdarg.h>
+#include <stdlib.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include "lite.h"
@@ -47,6 +49,38 @@
 }
 
 /**
+ * fmkpath - Formatted version of mkpath()
+ * @mode: A &mode_t mode to create directories with
+ * @fmt:  Formatted string to be composed into a pathname
+ *
+ * Note:
+ * Notice the swapped arguments, compared to mkpath()!
+ *
+ * Returns:
+ * POSIX OK(0) on success, otherwise -1 with @errno set.
+ */
+int fmkpath(mode_t mode, const char *fmt, ...)
+{
+       va_list ap;
+       char *path;
+       int len;
+
+       va_start(ap, fmt);
+       len = vsnprintf(NULL, 0, fmt, ap);
+       va_end(ap);
+
+       path = alloca(len + 1);
+       if (!path)
+               return -1;
+
+       va_start(ap, fmt);
+       len = vsnprintf(path, len + 1, fmt, ap);
+       va_end(ap);
+
+       return mkpath(path, mode);
+}
+
+/**
  * makepath - Create all components of the specified directory.
  * @dir: Directory to create.
  *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/pidfilefn.c 
new/libite-2.2.0/src/pidfilefn.c
--- old/libite-2.1.0/src/pidfilefn.c    2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/pidfilefn.c    2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Functions for dealing with PID files (client side)
  *
- * Copyright (c) 2009-2015  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2009-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/progress.c 
new/libite-2.2.0/src/progress.c
--- old/libite-2.1.0/src/progress.c     2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/progress.c     2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Simple termios based progress bar
  *
- * Copyright (c) 2012-2015  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2012-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/rsync.c new/libite-2.2.0/src/rsync.c
--- old/libite-2.1.0/src/rsync.c        2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/rsync.c        2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Micro "rsync" implementation.
  *
- * Copyright (c) 2011, 2012  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2011-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -107,20 +107,22 @@
                snprintf(source, sizeof(source), "%s%s%s", src, 
fisslashdir(src) ? "" : "/", files[i]);
                if (fisdir(source)) {
                        char dst2[256];
-                       struct stat st;
+                       struct stat sb;
 
                        strcat(source, "/");
-                       if (stat(source, &st))
-                               return 1;
+                       if (stat(source, &sb)) {
+                               result++;
+                               continue;
+                       }
 
-                       if (mdir(dst2, sizeof(dst2), dst, files[i], &st)) {
+                       if (mdir(dst2, sizeof(dst2), dst, files[i], &sb)) {
                                result++;
                                continue;
                        }
 
                        rsync(source, dst2, opt, filter);
                        if (keep_mtim)
-                               set_mtime(dst2, &st);
+                               set_mtime(dst2, &sb);
 
                        continue;       /* Next file/dir in @src to copy... */
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/strlite.h 
new/libite-2.2.0/src/strlite.h
--- old/libite-2.1.0/src/strlite.h      2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/strlite.h      2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Collection of frog DNA
  *
- * Copyright (c) 2008-2016  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2008-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to 
deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/strmatch.c 
new/libite-2.2.0/src/strmatch.c
--- old/libite-2.1.0/src/strmatch.c     2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/strmatch.c     2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Simple string matcher function, finds partial matches.
  *
- * Copyright (c) 2009-2018  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2009-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/strnlen.h 
new/libite-2.2.0/src/strnlen.h
--- old/libite-2.1.0/src/strnlen.h      2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/strnlen.h      2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* strnlen.h - Re-implementation of GLIBC strnlen()
  *
- * Copyright (c) 2016  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2016-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/systemf.c 
new/libite-2.2.0/src/systemf.c
--- old/libite-2.1.0/src/systemf.c      1970-01-01 01:00:00.000000000 +0100
+++ new/libite-2.2.0/src/systemf.c      2020-03-16 17:41:44.000000000 +0100
@@ -0,0 +1,73 @@
+/* Formatted system() which returns actual return status of command
+ *
+ * Copyright (c) 2020  Joachim Nilsson <troglo...@gmail.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/wait.h>
+
+int systemf(const char *fmt, ...)
+{
+       va_list ap;
+       char *cmd;
+       int len, status;
+       int rc = -1;
+
+       va_start(ap, fmt);
+       len = vsnprintf(NULL, 0, fmt, ap);
+       va_end(ap);
+
+       va_start(ap, fmt);
+       cmd = alloca(++len);
+       if (!cmd) {
+               va_end(ap);
+               errno = ENOMEM;
+               return -1;
+       }
+
+       vsnprintf(cmd, len, fmt, ap);
+       va_end(ap);
+
+       status = system(cmd);
+
+       rc = WEXITSTATUS(status);
+       if (!WIFEXITED(status)) {
+               if (WIFSIGNALED(status) &&
+                   (WTERMSIG(status) == SIGINT ||
+                    WTERMSIG(status) == SIGQUIT)) {
+                       errno = EINTR;
+                       rc = -1;
+               } else if (!rc) {
+                       /*
+                        * Alert callee that command didn't complete
+                        * successfully.  Some programs don't change
+                        * their exit code when signaled.
+                        */
+                       rc = 1;
+               }
+       }
+
+       return rc;
+}
+
+/**
+ * Local Variables:
+ *  indent-tabs-mode: t
+ *  c-file-style: "linux"
+ * End:
+ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/telnet.c 
new/libite-2.2.0/src/telnet.c
--- old/libite-2.1.0/src/telnet.c       2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/telnet.c       2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Poor mans telnet expect in C.
  *
- * Copyright (c) 2010, 2013, 2019  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2010-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/tempfile.c 
new/libite-2.2.0/src/tempfile.c
--- old/libite-2.1.0/src/tempfile.c     2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/tempfile.c     2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* A secure tmpfile() replacement.
  *
- * Copyright (c) 2015-2016  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2015-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/which.c new/libite-2.2.0/src/which.c
--- old/libite-2.1.0/src/which.c        2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/which.c        2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* C implementation of UNIX which(1)
  *
- * Copyright (c) 2017  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2017-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/src/yorn.c new/libite-2.2.0/src/yorn.c
--- old/libite-2.1.0/src/yorn.c 2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/src/yorn.c 2020-03-16 17:41:44.000000000 +0100
@@ -1,6 +1,6 @@
 /* Safe yes-or-no with prompt
  *
- * Copyright (c) 2009  Joachim Nilsson <troglo...@gmail.com>
+ * Copyright (c) 2009-2020  Joachim Nilsson <troglo...@gmail.com>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/tests/.gitignore 
new/libite-2.2.0/tests/.gitignore
--- old/libite-2.1.0/tests/.gitignore   2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/tests/.gitignore   2020-03-16 17:41:44.000000000 +0100
@@ -1,18 +1,23 @@
+*.o
 *.log
 *.trs
+.deps/
 chomp
 copyfile
 dir
 fexist
 fisdir
+fopenf
 fsendfile
 lfile
 makepath
 pidfile
+printhdr
 progress
 rsync
 str
 strmatch
+systemf
 tempfile
 touch
 tree
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/tests/Makefile.am 
new/libite-2.2.0/tests/Makefile.am
--- old/libite-2.1.0/tests/Makefile.am  2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/tests/Makefile.am  2020-03-16 17:41:44.000000000 +0100
@@ -7,14 +7,17 @@
 TESTS          += dir
 TESTS          += fexist
 TESTS          += fisdir
+TESTS          += fopenf
 TESTS          += fsendfile
 TESTS          += lfile
 TESTS          += makepath
 TESTS          += pidfile
+TESTS          += printhdr
 TESTS          += progress
 TESTS          += rsync
 TESTS          += str
 TESTS          += strmatch
+TESTS          += systemf
 TESTS          += touch
 TESTS          += tempfile
 TESTS          += which
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/tests/fopenf.c 
new/libite-2.2.0/tests/fopenf.c
--- old/libite-2.1.0/tests/fopenf.c     1970-01-01 01:00:00.000000000 +0100
+++ new/libite-2.2.0/tests/fopenf.c     2020-03-16 17:41:44.000000000 +0100
@@ -0,0 +1,18 @@
+#include "check.h"
+
+int main(void)
+{
+       FILE *fp;
+       char *dir = "/tmp";
+       char *file = "__foo__";
+
+       fp = fopenf("w", "%s/%s", dir, file);
+       if (fp) {
+               fputs("foo", fp);
+               fclose(fp);
+       }
+
+       fail_unless(fexist("/tmp/__foo__"));
+
+       return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/tests/makepath.c 
new/libite-2.2.0/tests/makepath.c
--- old/libite-2.1.0/tests/makepath.c   2019-08-26 21:59:57.000000000 +0200
+++ new/libite-2.2.0/tests/makepath.c   2020-03-16 17:41:44.000000000 +0100
@@ -4,6 +4,8 @@
 #include <stdlib.h>
 #include "check.h"
 
+#define BASEDIR "/tmp/libite-test"
+
 int checkpath(const char *dir)
 {
        char tmp[256];
@@ -32,28 +34,48 @@
        return ret;
 }
 
+int test_fmkpath(const char *subdir)
+{
+       int ret;
+
+       ret = fmkpath(0755, "%s/%s", BASEDIR, subdir);
+       if (!ret) {
+               char tmp[256];
+
+               snprintf(tmp, sizeof(tmp), "%s/%s", BASEDIR, subdir);
+               ret = checkpath(tmp);
+       } else
+               perror("Failed");
+
+       return ret;
+}
+
 int main(void)
 {
        int i, ret = 0;
        char *list[] = {
-               "/tmp/libite-test/tok/",
-               "/tmp/libite-test/tok2",
-               "/tmp/libite-test/ab",
-               "/tmp/libite-test/b",
-               "/tmp/libite-test/a/",
-               "/tmp/libite-test/a/b",
-               "/tmp/libite-test/a/c/",
+               BASEDIR "/tok/",
+               BASEDIR "/tok2",
+               BASEDIR "/ab",
+               BASEDIR "/b",
+               BASEDIR "/a/",
+               BASEDIR "/a/b",
+               BASEDIR "/a/c/",
                NULL
        };
 
-       printf("Testing makepath() ...\n");
-       mkdir("/tmp/libite-test", 0755);
+       mkdir(BASEDIR, 0755);
 
+       printf("PASS 1/2: makepath() ======================================\n");
        for (i = 0; list[i] && !ret; i++)
                ret |= test_makepath(list[i]);
 
-       printf("\nCleaning up ...\n");
-       system("rm -rf /tmp/libite-test");
+       printf("PASS 2/2: fmkpath() =======================================\n");
+       for (i = 0; list[i] && !ret; i++)
+               ret |= test_fmkpath(list[i] + strlen(BASEDIR) + 1);
+
+       printf("DONE: Cleaning up =========================================\n");
+       system("rm -rf " BASEDIR);
 
        return ret;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/tests/printhdr.c 
new/libite-2.2.0/tests/printhdr.c
--- old/libite-2.1.0/tests/printhdr.c   1970-01-01 01:00:00.000000000 +0100
+++ new/libite-2.2.0/tests/printhdr.c   2020-03-16 17:41:44.000000000 +0100
@@ -0,0 +1,20 @@
+#include <stdlib.h>            /* atexit() */
+#include <unistd.h>            /* usleep() */
+
+#include "check.h"
+
+#define SCREEN_WIDTH    80
+
+int main(void)
+{
+       FILE *fp = stderr;
+       char buf[SCREEN_WIDTH];
+
+       printhdr(fp, "", 0, UNDERSCORE);
+       printhdr(fp, "Neighbor Table", 0, 0);
+       snprintf(buf, sizeof(buf), "%-15s %-15s %7s %-5s%10s %6s",
+                "Neighbor", "Interface", "Version", "Flags", "Uptime", 
"Expire");
+       printhdr(fp, buf, 0, REVERSE);
+
+       return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libite-2.1.0/tests/systemf.c 
new/libite-2.2.0/tests/systemf.c
--- old/libite-2.1.0/tests/systemf.c    1970-01-01 01:00:00.000000000 +0100
+++ new/libite-2.2.0/tests/systemf.c    2020-03-16 17:41:44.000000000 +0100
@@ -0,0 +1,31 @@
+#include <err.h>
+#include "check.h"
+
+int main(void)
+{
+       struct { char *cmd; int rc; } list[] = {
+               { "false",          1 },
+               { "true",           0 },
+               { "kill -9 $$",     1 },
+               { "kill -QUIT $$", -1 },
+               { "kill -INT $$",  -1 }
+       };
+
+       for (size_t i = 0; i < NELEMS(list); i++) {
+               int rc;
+
+               rc = systemf("%s", list[i].cmd);
+               if (rc != list[i].rc)
+                       err(rc, "Failed command %s", list[i].cmd);
+       }
+
+       return 0;
+}
+
+/**
+ * Local Variables:
+ *  indent-tabs-mode: t
+ *  c-file-style: "linux"
+ * End:
+ */
+


Reply via email to