Blame README

Packit eba2e2
libpipeline, a pipeline manipulation library
Packit eba2e2
============================================
Packit eba2e2
Packit eba2e2
  http://libpipeline.nongnu.org/
Packit eba2e2
Packit eba2e2
libpipeline is a C library for setting up and running pipelines of
Packit eba2e2
processes, without needing to involve shell command-line parsing which is
Packit eba2e2
often error-prone and insecure.  This alleviates programmers of the need to
Packit eba2e2
laboriously construct pipelines using lower-level primitives such as fork(2)
Packit eba2e2
and execve(2).
Packit eba2e2
Packit eba2e2
Full programmers' documentation may be found using 'man libpipeline'.
Packit eba2e2
Packit eba2e2
Installation
Packit eba2e2
------------
Packit eba2e2
Packit eba2e2
If you need to install libpipeline starting from source code, then you will
Packit eba2e2
need these separate packages installed before configuring libpipeline in
Packit eba2e2
order to run its test suite:
Packit eba2e2
Packit eba2e2
  pkg-config (http://www.freedesktop.org/wiki/Software/pkg-config)
Packit eba2e2
  check (http://check.sourceforge.net/)
Packit eba2e2
Packit eba2e2
See the INSTALL file for general installation instructions.
Packit eba2e2
Packit eba2e2
Building programs with libpipeline
Packit eba2e2
----------------------------------
Packit eba2e2
Packit eba2e2
libpipeline supplies a pkg-config file which lists appropriate compiler and
Packit eba2e2
linker flags for building programs using it.  The output of 'pkg-config
Packit eba2e2
--cflags libpipeline' should be passed to the compiler (typically CFLAGS)
Packit eba2e2
and the output of 'pkg-config --libs libpipeline' should be passed to the
Packit eba2e2
linker (typically LDFLAGS).
Packit eba2e2
Packit eba2e2
If your program uses the GNU Autotools, then you can put this in
Packit eba2e2
configure.ac:
Packit eba2e2
Packit eba2e2
  PKG_CHECK_MODULES([libpipeline], [libpipeline])
Packit eba2e2
Packit eba2e2
... and this in the appropriate Makefile.am (replacing 'program' with the
Packit eba2e2
Automake-canonicalised name for your program):
Packit eba2e2
Packit eba2e2
  AM_CFLAGS = $(libpipeline_CFLAGS)
Packit eba2e2
  program_LDADD = $(libpipeline_LIBS)
Packit eba2e2
Packit eba2e2
The details may vary for particular build systems, but this should be a
Packit eba2e2
reasonable start.
Packit eba2e2
Packit eba2e2
When building with GCC, you should use at least the -Wformat option
Packit eba2e2
(included in -Wall) to ensure that the 'sentinel' function attribute is
Packit eba2e2
checked.  This means that your program will produce a warning if it calls
Packit eba2e2
any of the several libpipeline functions that require a trailing NULL
Packit eba2e2
without passing that trailing NULL.
Packit eba2e2
Packit eba2e2
Copyright and licensing
Packit eba2e2
-----------------------
Packit eba2e2
Packit eba2e2
Copyright (C) 1994 Markus Armbruster.
Packit eba2e2
Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005,
Packit eba2e2
              2006, 2007, 2008, 2009, 2010
Packit eba2e2
              Free Software Foundation, Inc.
Packit eba2e2
Copyright (C) 2003-2017 Colin Watson.
Packit eba2e2
Packit eba2e2
libpipeline is free software; you can redistribute it and/or modify
Packit eba2e2
it under the terms of the GNU General Public License as published by
Packit eba2e2
the Free Software Foundation; either version 3 of the License, or (at
Packit eba2e2
your option) any later version.
Packit eba2e2
Packit eba2e2
libpipeline is distributed in the hope that it will be useful, but
Packit eba2e2
WITHOUT ANY WARRANTY; without even the implied warranty of
Packit eba2e2
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit eba2e2
General Public License for more details.
Packit eba2e2
Packit eba2e2
You should have received a copy of the GNU General Public License
Packit eba2e2
along with libpipeline; if not, write to the Free Software
Packit eba2e2
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
Packit eba2e2
USA.
Packit eba2e2
Packit eba2e2
Note on GPL versions
Packit eba2e2
--------------------
Packit eba2e2
Packit eba2e2
(This note is informative, and if it conflicts with the terms of the licence
Packit eba2e2
then the licence is correct.  See the full text of the licence in the
Packit eba2e2
COPYING file for precise details.)
Packit eba2e2
Packit eba2e2
The core source code of libpipeline is licensed under GPL v2 or later.
Packit eba2e2
However, libpipeline incorporates parts of the Gnulib portability library,
Packit eba2e2
copyrighted by the Free Software Foundation and others, and much of Gnulib
Packit eba2e2
is distributed under GPL v3 or later.  This means that libpipeline as a
Packit eba2e2
whole falls under the terms of the GPL v3 or later.  Unless you take special
Packit eba2e2
pains to remove the GPL v3 portions, you must therefore follow the terms and
Packit eba2e2
conditions of the GPL v3 or later when distributing libpipeline itself, or
Packit eba2e2
distributing code linked against it.
Packit eba2e2
Packit eba2e2
Note that this does not require that your own source code be licensed under
Packit eba2e2
the GPL v3, contrary to popular misunderstanding.  However, you must be
Packit eba2e2
prepared to distribute your work as a whole under the terms of the GPL v3 or
Packit eba2e2
later, which requires that your licence be compatible with the GPL v3.  See
Packit eba2e2
http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses if you
Packit eba2e2
need advice on compatibility.
Packit eba2e2
Packit eba2e2
The GPL mainly restricts distribution ("conveying", in the specific language
Packit eba2e2
of GPL v3), and is careful not to restrict private use.  Therefore, you may
Packit eba2e2
write programs for your own use that use libpipeline without needing to
Packit eba2e2
license them under GPL v3-compatible terms.  If you distribute these
Packit eba2e2
programs to others, then you must take care to use compatible licensing.
Packit eba2e2
Packit eba2e2
Credits
Packit eba2e2
-------
Packit eba2e2
Packit eba2e2
Thanks to Scott James Remnant for code review, Ian Jackson for an extensive
Packit eba2e2
design review, and Kees Cook and Matthias Klose for helpful conversations.
Packit eba2e2
Packit eba2e2
 -- Colin Watson <cjwatson@debian.org>