[libvirt] [PATCHv2 1/2] maint: add missing copyright notices

I went with the shorter license notice used by src/libvirt.c, rather than spelling out the full LGPLv2+ clause into each of these files. * configure.ac: Declare copyright. * all Makefile.am: Likewise. --- Noticed while reviewing Matthias' patch. Almost trivial enough to push in isolation, but I'll wait for the review. Makefile.am | 3 +++ configure.ac | 3 +++ daemon/Makefile.am | 3 +++ docs/Makefile.am | 4 ++++ docs/schemas/Makefile.am | 3 ++- examples/apparmor/Makefile.am | 3 +++ examples/domain-events/events-c/Makefile.am | 3 +++ examples/dominfo/Makefile.am | 2 ++ examples/domsuspend/Makefile.am | 2 ++ examples/hellolibvirt/Makefile.am | 3 +++ examples/openauth/Makefile.am | 3 +++ examples/python/Makefile.am | 3 +++ examples/systemtap/Makefile.am | 2 ++ examples/xml/nwfilter/Makefile.am | 2 ++ include/Makefile.am | 4 ++++ include/libvirt/Makefile.am | 3 +++ python/Makefile.am | 3 +++ python/tests/Makefile.am | 3 +++ src/Makefile.am | 3 +++ tests/Makefile.am | 3 +++ tools/Makefile.am | 2 ++ 21 files changed, 59 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index 49e42bf..75cff8d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + LCOV = lcov GENHTML = genhtml diff --git a/configure.ac b/configure.ac index ac34efc..36037e5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,8 @@ dnl Process this file with autoconf to produce a configure script. +dnl Copyright (C) 2005-2011 Red Hat, Inc. +dnl See COPYING.LIB for the License of this software + AC_INIT([libvirt], [0.9.3], [libvir-list@redhat.com], [], [http://libvirt.org]) AC_CONFIG_SRCDIR([src/libvirt.c]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 63c731e..65ac8e9 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + CLEANFILES = DAEMON_GENERATED = \ diff --git a/docs/Makefile.am b/docs/Makefile.am index de649fe..50a199f 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,4 +1,8 @@ ## Process this file with automake to produce Makefile.in + +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + SUBDIRS= schemas PERL = perl diff --git a/docs/schemas/Makefile.am b/docs/schemas/Makefile.am index 75a0e73..596c207 100644 --- a/docs/schemas/Makefile.am +++ b/docs/schemas/Makefile.am @@ -1,4 +1,5 @@ - +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software schemadir = $(pkgdatadir)/schemas schema_DATA = \ diff --git a/examples/apparmor/Makefile.am b/examples/apparmor/Makefile.am index b72bbe1..0bc66ac 100644 --- a/examples/apparmor/Makefile.am +++ b/examples/apparmor/Makefile.am @@ -1,3 +1,6 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + EXTRA_DIST= \ TEMPLATE \ libvirt-qemu \ diff --git a/examples/domain-events/events-c/Makefile.am b/examples/domain-events/events-c/Makefile.am index 176892b..2bcbca0 100644 --- a/examples/domain-events/events-c/Makefile.am +++ b/examples/domain-events/events-c/Makefile.am @@ -1,3 +1,6 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib noinst_PROGRAMS = event-test diff --git a/examples/dominfo/Makefile.am b/examples/dominfo/Makefile.am index 678de68..07982b0 100644 --- a/examples/dominfo/Makefile.am +++ b/examples/dominfo/Makefile.am @@ -1,3 +1,5 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \ diff --git a/examples/domsuspend/Makefile.am b/examples/domsuspend/Makefile.am index 2c277a4..fc5e931 100644 --- a/examples/domsuspend/Makefile.am +++ b/examples/domsuspend/Makefile.am @@ -1,3 +1,5 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \ diff --git a/examples/hellolibvirt/Makefile.am b/examples/hellolibvirt/Makefile.am index 8d108a7..a55fe19 100644 --- a/examples/hellolibvirt/Makefile.am +++ b/examples/hellolibvirt/Makefile.am @@ -1,3 +1,6 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include noinst_PROGRAMS = hellolibvirt hellolibvirt_CFLAGS = $(WARN_CFLAGS) diff --git a/examples/openauth/Makefile.am b/examples/openauth/Makefile.am index 279a032..844b572 100644 --- a/examples/openauth/Makefile.am +++ b/examples/openauth/Makefile.am @@ -1,3 +1,6 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include noinst_PROGRAMS = openauth openauth_CFLAGS = $(WARN_CFLAGS) diff --git a/examples/python/Makefile.am b/examples/python/Makefile.am index dcd2c24..d782a28 100644 --- a/examples/python/Makefile.am +++ b/examples/python/Makefile.am @@ -1,3 +1,6 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + EXTRA_DIST= \ README \ dominfo.py domrestore.py domsave.py domstart.py esxlist.py diff --git a/examples/systemtap/Makefile.am b/examples/systemtap/Makefile.am index 084081e..6eb0546 100644 --- a/examples/systemtap/Makefile.am +++ b/examples/systemtap/Makefile.am @@ -1,2 +1,4 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software EXTRA_DIST = client.stp diff --git a/examples/xml/nwfilter/Makefile.am b/examples/xml/nwfilter/Makefile.am index 439e7b8..23fd753 100644 --- a/examples/xml/nwfilter/Makefile.am +++ b/examples/xml/nwfilter/Makefile.am @@ -1,3 +1,5 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software FILTERS = \ allow-arp.xml \ diff --git a/include/Makefile.am b/include/Makefile.am index d075971..426762c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,2 +1,6 @@ ## Process this file with automake to produce Makefile.in + +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + SUBDIRS=libvirt diff --git a/include/libvirt/Makefile.am b/include/libvirt/Makefile.am index b2c2b76..8f36ae8 100644 --- a/include/libvirt/Makefile.am +++ b/include/libvirt/Makefile.am @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + virincdir = $(includedir)/libvirt virinc_HEADERS = libvirt.h \ diff --git a/python/Makefile.am b/python/Makefile.am index 51f005d..0e14d23 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -1,5 +1,8 @@ # Makefile for libvirt python library +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + SUBDIRS= . tests INCLUDES = \ diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am index 28e24ba..2a5bc62 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -1,3 +1,6 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + EXAMPLE_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)/examples PYTESTS= \ diff --git a/src/Makefile.am b/src/Makefile.am index 46b92a8..00307fa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + # No libraries with the exception of LIBXML should be listed # here. List them against the individual XXX_la_CFLAGS targets # that actually use them diff --git a/tests/Makefile.am b/tests/Makefile.am index 872aa22..1560ac1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + SHELL = $(PREFERABLY_POSIX_SHELL) INCLUDES = \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 62c275e..66d4ed2 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,3 +1,5 @@ +## Copyright (C) 2005-2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" -- 1.7.4.4

From: Matthias Bolte <matthias.bolte@googlemail.com> Gettext annoyingly modifies CPPFLAGS in-place, putting -I/usr/local/include into the search patch if libintl headers must be used from that location. But since we must support automake 1.9.6 which lacks AM_CPPFLAGS, and since CPPFLAGS is used prior to INCLUDES, this means that the build picks up the _old_ installed libvirt.h in priority to the in-tree version, leading to all sorts of weird build failures on FreeBSD. Fix this by teaching configure to undo gettext's actions, but to keep any changes required by gettext at the end of INCLUDES after all in-tree locations are used first. Also requires adding a wrapper Makefile.am and making gnulib-tool create just gnulib.mk files during the bootstrap process. --- v1 is here: https://www.redhat.com/archives/libvir-list/2011-July/msg01984.html v2: update bootstrap.conf and gnulib/*/Makefile.am to fix gnulib compilation, update .gitignore to allow committing new files. .gitignore | 6 +++++- bootstrap.conf | 5 ++--- configure.ac | 22 ++++++++++++++++++++++ daemon/Makefile.am | 17 ++++++++++------- gnulib/lib/Makefile.am | 8 ++++++++ gnulib/tests/Makefile.am | 8 ++++++++ python/Makefile.am | 3 ++- src/Makefile.am | 5 +++-- tests/Makefile.am | 3 ++- tools/Makefile.am | 13 ++++++++----- 10 files changed, 70 insertions(+), 20 deletions(-) create mode 100644 gnulib/lib/Makefile.am create mode 100644 gnulib/tests/Makefile.am diff --git a/.gitignore b/.gitignore index dd64ca5..60220ad 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,9 @@ /configure.lineno /daemon/*_dispatch.h /docs/hvsupport.html.in -/gnulib/ +/gnulib/lib/* +/gnulib/m4/* +/gnulib/tests/* /libtool /libvirt-*.tar.gz /libvirt-[0-9]* @@ -74,6 +76,8 @@ results.log stamp-h stamp-h.in stamp-h1 +!/gnulib/lib/Makefile.am +!/gnulib/tests/Makefile.am !/m4/virt-*.m4 !/po/*.po !/po/POTFILES.in diff --git a/bootstrap.conf b/bootstrap.conf index 3b105b1..7882886 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -161,7 +161,6 @@ gnulib_name=libgnu m4_base=gnulib/m4 source_base=gnulib/lib tests_base=gnulib/tests -gnulib_mk=Makefile.am gnulib_tool_option_extras="\ --lgpl=2\ --with-tests\ @@ -203,9 +202,9 @@ gnulib_extra_files=" bootstrap_epilogue() { - # Change paths in gnulib/tests/Makefile.am from "../../.." to "../..", + # Change paths in gnulib/tests/gnulib.mk from "../../.." to "../..", # then ensure that gnulib/tests/Makefile.in is up-to-date. - m=gnulib/tests/Makefile.am + m=gnulib/tests/gnulib.mk sed 's,\.\./\.\./\.\.,../..,g' $m > $m-t mv -f $m-t $m ${AUTOMAKE-automake} gnulib/tests/Makefile diff --git a/configure.ac b/configure.ac index 36037e5..34bc1fe 100644 --- a/configure.ac +++ b/configure.ac @@ -2058,8 +2058,30 @@ dnl Enable building libvirtd? AM_CONDITIONAL([WITH_LIBVIRTD],[test "x$with_libvirtd" = "xyes"]) dnl Check for gettext - don't go any newer than what RHEL 5 supports +dnl +dnl save and restore CPPFLAGS around gettext check as the internal iconv +dnl check might leave -I/usr/local/include in CPPFLAGS on FreeBSD resulting +dnl in the build picking up previously installed libvirt/libvirt.h instead +dnl of the correct one from the source tree. +dnl compute the difference between save_CPPFLAGS and CPPFLAGS and append it +dnl to INCLUDES in order to preserve changes made by gettext but in a place +dnl that does not break the build +save_CPPFLAGS="$CPPFLAGS" AM_GNU_GETTEXT_VERSION([0.17]) AM_GNU_GETTEXT([external]) +GETTEXT_CPPFLAGS= +if test "x$save_CPPFLAGS" != "x$CPPFLAGS"; then + set dummy $CPPFLAGS; shift + for var + do + case " $var " in + " $save_CPPFLAGS ") ;; + *) GETTEXT_CPPFLAGS="$GETTEXT_CPPFLAGS $var" ;; + esac + done +fi +CPPFLAGS="$save_CPPFLAGS" +AC_SUBST([GETTEXT_CPPFLAGS]) ALL_LINGUAS=`cd "$srcdir/po" > /dev/null && ls *.po | sed 's+\.po$++'` diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 65ac8e9..690bf85 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -3,6 +3,16 @@ ## Copyright (C) 2005-2011 Red Hat, Inc. ## See COPYING.LIB for the License of this software +INCLUDES = \ + -I$(top_srcdir)/gnulib/lib -I../gnulib/lib \ + -I$(top_srcdir)/include -I$(top_builddir)/include \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/util \ + -I$(top_srcdir)/src/conf \ + -I$(top_srcdir)/src/rpc \ + -I$(top_srcdir)/src/remote \ + $(GETTEXT_CPPFLAGS) + CLEANFILES = DAEMON_GENERATED = \ @@ -82,13 +92,6 @@ libvirtd_SOURCES = $(DAEMON_SOURCES) #-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L libvirtd_CFLAGS = \ - -I$(top_srcdir)/gnulib/lib -I../gnulib/lib \ - -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/util \ - -I$(top_srcdir)/src/conf \ - -I$(top_srcdir)/src/rpc \ - -I$(top_srcdir)/src/remote \ $(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \ $(XDR_CFLAGS) $(POLKIT_CFLAGS) \ $(WARN_CFLAGS) \ diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am new file mode 100644 index 0000000..3445c6d --- /dev/null +++ b/gnulib/lib/Makefile.am @@ -0,0 +1,8 @@ +## Makefile for gnulib/lib -*-Makefile-*- + +## Copyright (C) 2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + +include gnulib.mk + +INCLUDES = $(GETTEXT_CPPFLAGS) diff --git a/gnulib/tests/Makefile.am b/gnulib/tests/Makefile.am new file mode 100644 index 0000000..3445c6d --- /dev/null +++ b/gnulib/tests/Makefile.am @@ -0,0 +1,8 @@ +## Makefile for gnulib/lib -*-Makefile-*- + +## Copyright (C) 2011 Red Hat, Inc. +## See COPYING.LIB for the License of this software + +include gnulib.mk + +INCLUDES = $(GETTEXT_CPPFLAGS) diff --git a/python/Makefile.am b/python/Makefile.am index 0e14d23..5943fe8 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -9,7 +9,8 @@ INCLUDES = \ $(PYTHON_INCLUDES) \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ - -I$(top_builddir)/$(subdir) + -I$(top_builddir)/$(subdir) \ + $(GETTEXT_CPPFLAGS) AM_CFLAGS = $(WARN_CFLAGS) diff --git a/src/Makefile.am b/src/Makefile.am index 00307fa..b7e4991 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,13 +5,14 @@ # No libraries with the exception of LIBXML should be listed # here. List them against the individual XXX_la_CFLAGS targets -# that actually use them +# that actually use them. Also keep GETTEXT_CPPFLAGS at the end. INCLUDES = -I$(top_srcdir)/gnulib/lib \ -I../gnulib/lib \ -I../include \ -I@top_srcdir@/src/util \ -I@top_srcdir@/include \ - -DIN_LIBVIRT + -DIN_LIBVIRT \ + $(GETTEXT_CPPFLAGS) AM_CFLAGS = $(DRIVER_MODULE_CFLAGS) \ $(LIBXML_CFLAGS) \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 1560ac1..43a4301 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -11,7 +11,8 @@ INCLUDES = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/util \ - -I$(top_srcdir)/src/conf + -I$(top_srcdir)/src/conf \ + $(GETTEXT_CPPFLAGS) AM_CFLAGS = \ $(LIBXML_CFLAGS) \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 66d4ed2..71131e2 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,6 +1,14 @@ ## Copyright (C) 2005-2011 Red Hat, Inc. ## See COPYING.LIB for the License of this software +INCLUDES = \ + -I../include -I$(top_srcdir)/include \ + -I$(top_srcdir)/gnulib/lib -I../gnulib/lib \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/util \ + -I$(top_srcdir) \ + $(GETTEXT_CPPFLAGS) + POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" ICON_FILES = \ @@ -68,11 +76,6 @@ virsh_LDADD = \ $(LIBXML_LIBS) \ $(VIRSH_LIBS) virsh_CFLAGS = \ - -I$(top_srcdir)/gnulib/lib -I../gnulib/lib \ - -I../include -I$(top_srcdir)/include \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/util \ - -I$(top_srcdir) \ $(WARN_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBXML_CFLAGS) \ -- 1.7.4.4

2011/7/28 Eric Blake <eblake@redhat.com>:
From: Matthias Bolte <matthias.bolte@googlemail.com>
Gettext annoyingly modifies CPPFLAGS in-place, putting -I/usr/local/include into the search patch if libintl headers must be used from that location. But since we must support automake 1.9.6 which lacks AM_CPPFLAGS, and since CPPFLAGS is used prior to INCLUDES, this means that the build picks up the _old_ installed libvirt.h in priority to the in-tree version, leading to all sorts of weird build failures on FreeBSD.
Fix this by teaching configure to undo gettext's actions, but to keep any changes required by gettext at the end of INCLUDES after all in-tree locations are used first. Also requires adding a wrapper Makefile.am and making gnulib-tool create just gnulib.mk files during the bootstrap process. ---
v1 is here: https://www.redhat.com/archives/libvir-list/2011-July/msg01984.html
v2: update bootstrap.conf and gnulib/*/Makefile.am to fix gnulib compilation, update .gitignore to allow committing new files.
Works. ACK. -- Matthias Bolte http://photron.blogspot.com

On 07/29/2011 07:16 AM, Matthias Bolte wrote:
2011/7/28 Eric Blake<eblake@redhat.com>:
From: Matthias Bolte<matthias.bolte@googlemail.com>
Gettext annoyingly modifies CPPFLAGS in-place, putting -I/usr/local/include into the search patch if libintl headers must be used from that location. But since we must support automake 1.9.6 which lacks AM_CPPFLAGS, and since CPPFLAGS is used prior to INCLUDES, this means that the build picks up the _old_ installed libvirt.h in priority to the in-tree version, leading to all sorts of weird build failures on FreeBSD.
Fix this by teaching configure to undo gettext's actions, but to keep any changes required by gettext at the end of INCLUDES after all in-tree locations are used first. Also requires adding a wrapper Makefile.am and making gnulib-tool create just gnulib.mk files during the bootstrap process. ---
v1 is here: https://www.redhat.com/archives/libvir-list/2011-July/msg01984.html
v2: update bootstrap.conf and gnulib/*/Makefile.am to fix gnulib compilation, update .gitignore to allow committing new files.
Works. ACK.
Thanks for testing. Now applied. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 07/28/2011 02:24 PM, Laine Stump wrote:
On 07/28/2011 03:32 PM, Eric Blake wrote:
I went with the shorter license notice used by src/libvirt.c, rather than spelling out the full LGPLv2+ clause into each of these files.
* configure.ac: Declare copyright. * all Makefile.am: Likewise.
ACK.
Patch 1/2 now pushed; I'll wait for a report on patch 2/2 actually being tested on FreeBSD before doing anything further with that, though. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Laine Stump
-
Matthias Bolte