[libvirt] [PATCH 00/25] cleanup current build system

As preparation to switch to Meson there are some things that needs be cleaned up to make the conversion easier. The important thing in Meson is that there is a strict separation between source and build directory and the distributed tarball by default contains only files tracked by git with a possibility to write a script which would add some other sources into the tarball. Regardless of the adoption of Meson these patches improve our current build system to fully support VPATH builds. Pavel Hrdina (25): 4: virt-driver-libxl: remove Fedora 28 check m4: virt-libnl: drop libnl-1.0 support m4: virt-netcf: bump minimal version to 0.1.8 m4: virt-selinux: remove obsolete checks locking: separate lock driver code into libvirt_driver_lock.la logging: separate log driver code into libvirt_driver_log.la remote: unify rpc server dispatch generated files build: move admin code into admin directory src: move nodist_libvirt_driver_remote_la_SOURCES into remote Makefile docs: apibuild: remove old code paths docs: generate files into build dir and stop distributing them po: generate files into build dir po: rewrite the way how we generate files src: generate source files into build directory src: access: generate source files into build directory src: admin: generate source files into build directory src: esx: generate source files into build directory src: hyperv: generate source files into build directory src: locking: generate source files into build directory src: logging: generate source files into build directory src: lxc: generate source files into build directory src: remote: generate source files into build directory include: stop distributing generated source files src: stop distributing generated source files tools: stop distributing generated source files build-aux/syntax-check.mk | 6 +- docs/Makefile.am | 115 ++++---- docs/apibuild.py | 19 +- docs/hvsupport.pl | 37 +-- include/libvirt/Makefile.am | 2 +- m4/virt-driver-libxl.m4 | 17 -- m4/virt-libnl.m4 | 56 +--- m4/virt-netcf.m4 | 18 +- m4/virt-selinux.m4 | 20 +- m4/virt-win-symbols.m4 | 4 +- po/Makefile.am | 47 +-- po/POTFILES | 320 --------------------- po/POTFILES.in | 320 +++++++++++++++++++++ src/Makefile.am | 94 +----- src/access/Makefile.inc.am | 17 +- src/admin/Makefile.inc.am | 109 ++++++- src/{ => admin}/libvirt-admin.c | 0 src/{ => admin}/libvirt-admin.conf | 0 src/{ => admin}/libvirt_admin_private.syms | 0 src/{ => admin}/libvirt_admin_public.syms | 0 src/bhyve/Makefile.inc.am | 1 + src/esx/Makefile.inc.am | 9 +- src/esx/esx_vi_generator.py | 11 +- src/hyperv/Makefile.inc.am | 9 +- src/hyperv/hyperv_wmi_generator.py | 11 +- src/interface/Makefile.inc.am | 2 + src/interface/interface_backend_netcf.c | 4 - src/libxl/Makefile.inc.am | 2 + src/locking/Makefile.inc.am | 30 +- src/logging/Makefile.inc.am | 30 +- src/lxc/Makefile.inc.am | 36 ++- src/network/Makefile.inc.am | 2 + src/node_device/Makefile.inc.am | 2 + src/nwfilter/Makefile.inc.am | 2 + src/qemu/Makefile.inc.am | 2 + src/qemu/qemu_domain.c | 4 +- src/remote/Makefile.inc.am | 47 +-- src/remote/remote_daemon_dispatch.c | 4 +- src/rpc/Makefile.inc.am | 8 +- src/secret/Makefile.inc.am | 2 + src/security/security_selinux.c | 22 +- src/storage/Makefile.inc.am | 2 + src/util/Makefile.inc.am | 6 +- src/util/virnetlink.c | 13 +- src/util/virnetlink.h | 8 - src/vbox/Makefile.inc.am | 1 + src/vz/Makefile.inc.am | 1 + tests/Makefile.am | 4 + tests/securityselinuxhelper.c | 19 +- tools/Makefile.am | 1 - 50 files changed, 735 insertions(+), 761 deletions(-) delete mode 100644 po/POTFILES create mode 100644 po/POTFILES.in rename src/{ => admin}/libvirt-admin.c (100%) rename src/{ => admin}/libvirt-admin.conf (100%) rename src/{ => admin}/libvirt_admin_private.syms (100%) rename src/{ => admin}/libvirt_admin_public.syms (100%) -- 2.21.0

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-driver-libxl.m4 | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/m4/virt-driver-libxl.m4 b/m4/virt-driver-libxl.m4 index 2cd97cc68f..2f3565f1d5 100644 --- a/m4/virt-driver-libxl.m4 +++ b/m4/virt-driver-libxl.m4 @@ -36,23 +36,6 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_LIBXL], [ LIBXL_EXECBIN_DIR=$($PKG_CONFIG --variable libexec_bin xenlight) fi - dnl In Fedora <= 28, the xenlight pkgconfig file is in the -runtime package - dnl https://bugzilla.redhat.com/show_bug.cgi?id=1629643 - dnl Until Fedora 28 reaches EOL, fallback to lib probe if xenlight.pc is - dnl not found - if test "x$with_libxl" = "xno" ; then - with_libxl="$old_with_libxl" - - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $LIBXL_API_VERSION" - LIBVIRT_CHECK_LIB([LIBXL], [xenlight], [libxl_cpupool_cpuadd_cpumap], [libxl.h], [fail="1"]) - CFLAGS="$save_CFLAGS" - - if test $fail = 1; then - AC_MSG_ERROR([You must install the libxl Library from Xen >= 4.6 to compile libxenlight driver with -lxl]) - fi - fi - if test "$with_libxl" = "yes"; then LIBXL_CFLAGS="$LIBXL_CFLAGS $LIBXL_API_VERSION" -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:26AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-driver-libxl.m4 | 17 ----------------- 1 file changed, 17 deletions(-)
s/4/m4/ in the commit summary Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

All supported OSes have libnl-3.0 and netcf uses it so there is no need to keep libnl-1.0 compatibility code. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-libnl.m4 | 56 +++++++++---------------------------------- src/util/virnetlink.c | 13 +++------- src/util/virnetlink.h | 8 ------- 3 files changed, 14 insertions(+), 63 deletions(-) diff --git a/m4/virt-libnl.m4 b/m4/virt-libnl.m4 index c106d545ec..b3e0dc9b2c 100644 --- a/m4/virt-libnl.m4 +++ b/m4/virt-libnl.m4 @@ -18,56 +18,22 @@ dnl <http://www.gnu.org/licenses/>. dnl AC_DEFUN([LIBVIRT_CHECK_LIBNL], [ - AC_REQUIRE([LIBVIRT_CHECK_NETCF]) AC_REQUIRE([LIBVIRT_CHECK_MACVTAP]) - LIBNL_REQUIRED="1.1" with_libnl=no if test "$with_linux" = "yes"; then - # When linking with netcf, we must ensure that we pick the same version - # of libnl that netcf picked. Prefer libnl-3 unless we can prove - # netcf linked against libnl-1, or unless the user set LIBNL_CFLAGS. - # (Setting LIBNL_CFLAGS is already used by PKG_CHECK_MODULES to - # override any probing, so if it set, you know which libnl is in use.) - libnl_ldd= - for dir in /usr/lib64 /usr/lib /usr/lib/*-linux-gnu*; do - if test -f $dir/libnetcf.so; then - libnl_ldd=`(ldd $dir/libnetcf.so) 2>&1` - break - fi - done - case $libnl_ldd:${LIBNL_CFLAGS+set} in - *libnl-3.so.*:) LIBNL_REQUIRED=3.0 ;; - esac - case $libnl_ldd:${LIBNL_CFLAGS+set} in - *libnl.so.1*:) ;; - *) - PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [ - with_libnl=yes - AC_DEFINE([HAVE_LIBNL3], [1], [Use libnl-3.0]) - AC_DEFINE([HAVE_LIBNL], [1], [whether the netlink library is available]) - PKG_CHECK_MODULES([LIBNL_ROUTE3], [libnl-route-3.0]) - LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE3_CFLAGS" - LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE3_LIBS" - ], [:]) ;; - esac - if test "$with_libnl" = no; then - PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [ - with_libnl=yes - AC_DEFINE_UNQUOTED([HAVE_LIBNL], [1], - [whether the netlink library is available]) - AC_DEFINE_UNQUOTED([HAVE_LIBNL1], [1], - [whether the netlink v1 library is available]) - ], [ - if test "$with_macvtap" = "yes"; then - if test "$LIBNL_REQUIRED" = "3.0";then - AC_MSG_ERROR([libnl3-devel >= $LIBNL_REQUIRED is required for macvtap support]) - else - AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support]) - fi - fi - ]) + PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [ + with_libnl=yes + AC_DEFINE([HAVE_LIBNL], [1], [whether the netlink library is available]) + PKG_CHECK_MODULES([LIBNL_ROUTE], [libnl-route-3.0]) + LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE_CFLAGS" + LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE_LIBS" + ], [:]) + fi + if test "$with_libnl" = no; then + if test "$with_macvtap" = "yes"; then + AC_MSG_ERROR([libnl3-devel >= $LIBNL_REQUIRED is required for macvtap support]) fi fi AM_CONDITIONAL([HAVE_LIBNL], [test "$with_libnl" = "yes"]) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index ab41b57672..0d91503714 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -52,17 +52,10 @@ struct virNetlinkEventHandle { int deleted; }; -# ifdef HAVE_LIBNL1 -# define virNetlinkAlloc nl_handle_alloc -# define virNetlinkSetBufferSize nl_set_buffer_size -# define virNetlinkFree nl_handle_destroy -typedef struct nl_handle virNetlinkHandle; -# else -# define virNetlinkAlloc nl_socket_alloc -# define virNetlinkSetBufferSize nl_socket_set_buffer_size -# define virNetlinkFree nl_socket_free +# define virNetlinkAlloc nl_socket_alloc +# define virNetlinkSetBufferSize nl_socket_set_buffer_size +# define virNetlinkFree nl_socket_free typedef struct nl_sock virNetlinkHandle; -# endif G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkHandle, virNetlinkFree); diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 030547e573..e888857601 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -24,15 +24,7 @@ #if defined(__linux__) && defined(HAVE_LIBNL) -/* Work around a bug where older libnl-1 headers expected older gcc - * semantics of 'extern inline' that conflict with C99 semantics. */ -# ifdef HAVE_LIBNL1 -# define inline -# endif # include <netlink/msg.h> -# ifdef HAVE_LIBNL1 -# undef inline -# endif typedef struct nl_msg virNetlinkMsg; G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkMsg, nlmsg_free); -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:27AM +0200, Pavel Hrdina wrote:
All supported OSes have libnl-3.0 and netcf uses it so there is no need to keep libnl-1.0 compatibility code.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-libnl.m4 | 56 +++++++++---------------------------------- src/util/virnetlink.c | 13 +++------- src/util/virnetlink.h | 8 ------- 3 files changed, 14 insertions(+), 63 deletions(-)
diff --git a/m4/virt-libnl.m4 b/m4/virt-libnl.m4 index c106d545ec..b3e0dc9b2c 100644 --- a/m4/virt-libnl.m4 +++ b/m4/virt-libnl.m4 @@ -18,56 +18,22 @@ dnl <http://www.gnu.org/licenses/>. dnl
AC_DEFUN([LIBVIRT_CHECK_LIBNL], [ - AC_REQUIRE([LIBVIRT_CHECK_NETCF])
Even though the removed code below does mention netcf, it looks for its existence in system library directories and does not depend on libvirt's checks. So it can be removed even before this patch.
AC_REQUIRE([LIBVIRT_CHECK_MACVTAP])
- LIBNL_REQUIRED="1.1" with_libnl=no
if test "$with_linux" = "yes"; then - # When linking with netcf, we must ensure that we pick the same version - # of libnl that netcf picked. Prefer libnl-3 unless we can prove - # netcf linked against libnl-1, or unless the user set LIBNL_CFLAGS. - # (Setting LIBNL_CFLAGS is already used by PKG_CHECK_MODULES to - # override any probing, so if it set, you know which libnl is in use.) - libnl_ldd= - for dir in /usr/lib64 /usr/lib /usr/lib/*-linux-gnu*; do - if test -f $dir/libnetcf.so; then - libnl_ldd=`(ldd $dir/libnetcf.so) 2>&1` - break - fi - done - case $libnl_ldd:${LIBNL_CFLAGS+set} in - *libnl-3.so.*:) LIBNL_REQUIRED=3.0 ;; - esac - case $libnl_ldd:${LIBNL_CFLAGS+set} in - *libnl.so.1*:) ;; - *) - PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [ - with_libnl=yes - AC_DEFINE([HAVE_LIBNL3], [1], [Use libnl-3.0]) - AC_DEFINE([HAVE_LIBNL], [1], [whether the netlink library is available]) - PKG_CHECK_MODULES([LIBNL_ROUTE3], [libnl-route-3.0]) - LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE3_CFLAGS" - LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE3_LIBS" - ], [:]) ;; - esac - if test "$with_libnl" = no; then - PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [ - with_libnl=yes - AC_DEFINE_UNQUOTED([HAVE_LIBNL], [1], - [whether the netlink library is available]) - AC_DEFINE_UNQUOTED([HAVE_LIBNL1], [1], - [whether the netlink v1 library is available]) - ], [ - if test "$with_macvtap" = "yes"; then - if test "$LIBNL_REQUIRED" = "3.0";then - AC_MSG_ERROR([libnl3-devel >= $LIBNL_REQUIRED is required for macvtap support]) - else - AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support]) - fi - fi - ]) + PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [ + with_libnl=yes + AC_DEFINE([HAVE_LIBNL], [1], [whether the netlink library is available]) + PKG_CHECK_MODULES([LIBNL_ROUTE], [libnl-route-3.0]) + LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE_CFLAGS" + LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE_LIBS" + ], [:]) + fi + if test "$with_libnl" = no; then + if test "$with_macvtap" = "yes"; then + AC_MSG_ERROR([libnl3-devel >= $LIBNL_REQUIRED is required for macvtap support])
You removed the code that set the value of LIBNL_REQUIRED. Hopefully all the distributions are sane enough to not provide a libnl3-devel package with a lower version than 3.0, so we don't need that second reference to the version.
fi fi AM_CONDITIONAL([HAVE_LIBNL], [test "$with_libnl" = "yes"]) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index ab41b57672..0d91503714 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -52,17 +52,10 @@ struct virNetlinkEventHandle { int deleted; };
-# ifdef HAVE_LIBNL1 -# define virNetlinkAlloc nl_handle_alloc -# define virNetlinkSetBufferSize nl_set_buffer_size -# define virNetlinkFree nl_handle_destroy -typedef struct nl_handle virNetlinkHandle; -# else -# define virNetlinkAlloc nl_socket_alloc -# define virNetlinkSetBufferSize nl_socket_set_buffer_size -# define virNetlinkFree nl_socket_free +# define virNetlinkAlloc nl_socket_alloc +# define virNetlinkSetBufferSize nl_socket_set_buffer_size +# define virNetlinkFree nl_socket_free typedef struct nl_sock virNetlinkHandle; -# endif
These macros are just a compatibility glue and are only used in this file, they can be removed completely.
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkHandle, virNetlinkFree);
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 030547e573..e888857601 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -24,15 +24,7 @@
#if defined(__linux__) && defined(HAVE_LIBNL)
-/* Work around a bug where older libnl-1 headers expected older gcc - * semantics of 'extern inline' that conflict with C99 semantics. */ -# ifdef HAVE_LIBNL1 -# define inline -# endif # include <netlink/msg.h> -# ifdef HAVE_LIBNL1 -# undef inline -# endif
typedef struct nl_msg virNetlinkMsg; G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkMsg, nlmsg_free);
With the LIBNL_REQUIRED stuff fixed: Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

On Mon, Oct 21, 2019 at 11:47:51AM +0200, Ján Tomko wrote:
On Mon, Oct 21, 2019 at 10:00:27AM +0200, Pavel Hrdina wrote:
All supported OSes have libnl-3.0 and netcf uses it so there is no need to keep libnl-1.0 compatibility code.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-libnl.m4 | 56 +++++++++---------------------------------- src/util/virnetlink.c | 13 +++------- src/util/virnetlink.h | 8 ------- 3 files changed, 14 insertions(+), 63 deletions(-)
diff --git a/m4/virt-libnl.m4 b/m4/virt-libnl.m4 index c106d545ec..b3e0dc9b2c 100644 --- a/m4/virt-libnl.m4 +++ b/m4/virt-libnl.m4 @@ -18,56 +18,22 @@ dnl <http://www.gnu.org/licenses/>. dnl
AC_DEFUN([LIBVIRT_CHECK_LIBNL], [ - AC_REQUIRE([LIBVIRT_CHECK_NETCF])
Even though the removed code below does mention netcf, it looks for its existence in system library directories and does not depend on libvirt's checks. So it can be removed even before this patch.
AC_REQUIRE([LIBVIRT_CHECK_MACVTAP])
- LIBNL_REQUIRED="1.1" with_libnl=no
if test "$with_linux" = "yes"; then - # When linking with netcf, we must ensure that we pick the same version - # of libnl that netcf picked. Prefer libnl-3 unless we can prove - # netcf linked against libnl-1, or unless the user set LIBNL_CFLAGS. - # (Setting LIBNL_CFLAGS is already used by PKG_CHECK_MODULES to - # override any probing, so if it set, you know which libnl is in use.) - libnl_ldd= - for dir in /usr/lib64 /usr/lib /usr/lib/*-linux-gnu*; do - if test -f $dir/libnetcf.so; then - libnl_ldd=`(ldd $dir/libnetcf.so) 2>&1` - break - fi - done - case $libnl_ldd:${LIBNL_CFLAGS+set} in - *libnl-3.so.*:) LIBNL_REQUIRED=3.0 ;; - esac - case $libnl_ldd:${LIBNL_CFLAGS+set} in - *libnl.so.1*:) ;; - *) - PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [ - with_libnl=yes - AC_DEFINE([HAVE_LIBNL3], [1], [Use libnl-3.0]) - AC_DEFINE([HAVE_LIBNL], [1], [whether the netlink library is available]) - PKG_CHECK_MODULES([LIBNL_ROUTE3], [libnl-route-3.0]) - LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE3_CFLAGS" - LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE3_LIBS" - ], [:]) ;; - esac - if test "$with_libnl" = no; then - PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [ - with_libnl=yes - AC_DEFINE_UNQUOTED([HAVE_LIBNL], [1], - [whether the netlink library is available]) - AC_DEFINE_UNQUOTED([HAVE_LIBNL1], [1], - [whether the netlink v1 library is available]) - ], [ - if test "$with_macvtap" = "yes"; then - if test "$LIBNL_REQUIRED" = "3.0";then - AC_MSG_ERROR([libnl3-devel >= $LIBNL_REQUIRED is required for macvtap support]) - else - AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support]) - fi - fi - ]) + PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [ + with_libnl=yes + AC_DEFINE([HAVE_LIBNL], [1], [whether the netlink library is available]) + PKG_CHECK_MODULES([LIBNL_ROUTE], [libnl-route-3.0]) + LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE_CFLAGS" + LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE_LIBS" + ], [:]) + fi + if test "$with_libnl" = no; then + if test "$with_macvtap" = "yes"; then + AC_MSG_ERROR([libnl3-devel >= $LIBNL_REQUIRED is required for macvtap support])
You removed the code that set the value of LIBNL_REQUIRED. Hopefully all the distributions are sane enough to not provide a libnl3-devel package with a lower version than 3.0, so we don't need that second reference to the version.
fi fi AM_CONDITIONAL([HAVE_LIBNL], [test "$with_libnl" = "yes"]) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index ab41b57672..0d91503714 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -52,17 +52,10 @@ struct virNetlinkEventHandle { int deleted; };
-# ifdef HAVE_LIBNL1 -# define virNetlinkAlloc nl_handle_alloc -# define virNetlinkSetBufferSize nl_set_buffer_size -# define virNetlinkFree nl_handle_destroy -typedef struct nl_handle virNetlinkHandle; -# else -# define virNetlinkAlloc nl_socket_alloc -# define virNetlinkSetBufferSize nl_socket_set_buffer_size -# define virNetlinkFree nl_socket_free +# define virNetlinkAlloc nl_socket_alloc +# define virNetlinkSetBufferSize nl_socket_set_buffer_size +# define virNetlinkFree nl_socket_free typedef struct nl_sock virNetlinkHandle; -# endif
These macros are just a compatibility glue and are only used in this file, they can be removed completely.
I'll post a followup patch to remove it completely.
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkHandle, virNetlinkFree);
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 030547e573..e888857601 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -24,15 +24,7 @@
#if defined(__linux__) && defined(HAVE_LIBNL)
-/* Work around a bug where older libnl-1 headers expected older gcc - * semantics of 'extern inline' that conflict with C99 semantics. */ -# ifdef HAVE_LIBNL1 -# define inline -# endif # include <netlink/msg.h> -# ifdef HAVE_LIBNL1 -# undef inline -# endif
typedef struct nl_msg virNetlinkMsg; G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkMsg, nlmsg_free);
With the LIBNL_REQUIRED stuff fixed: Reviewed-by: Ján Tomko <jtomko@redhat.com>
Thanks, fixed now. Pavel

This version is available on all supported OSes and includes the transaction APIs. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-netcf.m4 | 18 ++---------------- src/interface/interface_backend_netcf.c | 4 ---- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/m4/virt-netcf.m4 b/m4/virt-netcf.m4 index 588b5e7a91..ada6b5a7a9 100644 --- a/m4/virt-netcf.m4 +++ b/m4/virt-netcf.m4 @@ -18,25 +18,11 @@ dnl <http://www.gnu.org/licenses/>. dnl AC_DEFUN([LIBVIRT_ARG_NETCF],[ - LIBVIRT_ARG_WITH_FEATURE([NETCF], [netcf], [check], [0.1.4]) + LIBVIRT_ARG_WITH_FEATURE([NETCF], [netcf], [check], [0.1.8]) ]) AC_DEFUN([LIBVIRT_CHECK_NETCF],[ - LIBVIRT_CHECK_PKG([NETCF], [netcf], [0.1.4]) - - if test "$with_netcf" = "yes" ; then - old_CFLAGS="$CFLAGS" - old_LIBS="$LIBS" - CFLAGS="$CFLAGS $NETCF_CFLAGS" - LIBS="$LIBS $NETCF_LIBS" - AC_CHECK_FUNC([ncf_change_begin], [netcf_transactions=1], [netcf_transactions=0]) - if test "$netcf_transactions" = "1" ; then - AC_DEFINE_UNQUOTED([HAVE_NETCF_TRANSACTIONS], [1], - [we have sufficiently new version of netcf for transaction network API]) - fi - CFLAGS="$old_CFLAGS" - LIBS="$old_LIBS" - fi + LIBVIRT_CHECK_PKG([NETCF], [netcf], [0.1.8]) ]) AC_DEFUN([LIBVIRT_RESULT_NETCF],[ diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interface_backend_netcf.c index 00b5c00822..1db0190a79 100644 --- a/src/interface/interface_backend_netcf.c +++ b/src/interface/interface_backend_netcf.c @@ -1124,7 +1124,6 @@ static int netcfInterfaceIsActive(virInterfacePtr ifinfo) return ret; } -#ifdef HAVE_NETCF_TRANSACTIONS static int netcfInterfaceChangeBegin(virConnectPtr conn, unsigned int flags) { int ret; @@ -1199,7 +1198,6 @@ static int netcfInterfaceChangeRollback(virConnectPtr conn, unsigned int flags) virObjectUnlock(driver); return ret; } -#endif /* HAVE_NETCF_TRANSACTIONS */ static virInterfaceDriver interfaceDriver = { .name = INTERFACE_DRIVER_NAME, @@ -1216,11 +1214,9 @@ static virInterfaceDriver interfaceDriver = { .interfaceCreate = netcfInterfaceCreate, /* 0.7.0 */ .interfaceDestroy = netcfInterfaceDestroy, /* 0.7.0 */ .interfaceIsActive = netcfInterfaceIsActive, /* 0.7.3 */ -#ifdef HAVE_NETCF_TRANSACTIONS .interfaceChangeBegin = netcfInterfaceChangeBegin, /* 0.9.2 */ .interfaceChangeCommit = netcfInterfaceChangeCommit, /* 0.9.2 */ .interfaceChangeRollback = netcfInterfaceChangeRollback, /* 0.9.2 */ -#endif /* HAVE_NETCF_TRANSACTIONS */ }; -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:28AM +0200, Pavel Hrdina wrote:
This version is available on all supported OSes and includes the transaction APIs.
Looking at repology [0], even 0.2.8 would be acceptable.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-netcf.m4 | 18 ++---------------- src/interface/interface_backend_netcf.c | 4 ---- 2 files changed, 2 insertions(+), 20 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano [0] https://repology.org/project/netcf/versions

All OSes that we support have libselinux >= 2.5 except for Ubuntu 16.04 where the version is 2.4. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-selinux.m4 | 20 ++------------------ src/qemu/qemu_domain.c | 4 ++-- src/security/security_selinux.c | 22 ++-------------------- tests/securityselinuxhelper.c | 19 +++++-------------- 4 files changed, 11 insertions(+), 54 deletions(-) diff --git a/m4/virt-selinux.m4 b/m4/virt-selinux.m4 index fe274fafe9..64e6980844 100644 --- a/m4/virt-selinux.m4 +++ b/m4/virt-selinux.m4 @@ -27,20 +27,8 @@ AC_DEFUN([LIBVIRT_CHECK_SELINUX],[ [fgetfilecon_raw], [selinux/selinux.h]) if test "$with_selinux" = "yes"; then - # libselinux changed signatures between 2.2 and 2.3 - AC_CACHE_CHECK([for selinux setcon parameter type], [lv_cv_setcon_const], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include <selinux/selinux.h> -int setcon(char *context); - ]])], - [lv_cv_setcon_const=''], - [lv_cv_setcon_const='const'])]) - AC_DEFINE_UNQUOTED([VIR_SELINUX_CTX_CONST], [$lv_cv_setcon_const], - [Define to empty or 'const' depending on how SELinux qualifies its - security context parameters]) - # ...and again for 2.5 + # libselinux changed signatures for 2.5 + # TODO: Drop once we don't support Ubuntu 16.04 AC_CACHE_CHECK([for selinux selabel_open parameter type], [lv_cv_selabel_open_const], [AC_COMPILE_IFELSE( @@ -68,10 +56,6 @@ struct selabel_handle *selabel_open(unsigned, struct selinux_opt *, unsigned); fi AC_MSG_RESULT([$SELINUX_MOUNT]) AC_DEFINE_UNQUOTED([SELINUX_MOUNT], ["$SELINUX_MOUNT"], [SELinux mount point]) - - dnl We prefer to use <selinux/label.h> and selabel_open, but can fall - dnl back to matchpathcon for the sake of RHEL 5's version of libselinux. - AC_CHECK_HEADERS([selinux/label.h]) fi ]) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a97bf65e7f..71478319a6 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -13262,7 +13262,7 @@ qemuDomainCreateDeviceRecursive(const char *device, } if (tcon && - lsetfilecon_raw(devicePath, (VIR_SELINUX_CTX_CONST char *)tcon) < 0) { + lsetfilecon_raw(devicePath, (const char *)tcon) < 0) { VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR if (errno != EOPNOTSUPP && errno != ENOTSUP) { VIR_WARNINGS_RESET @@ -14061,7 +14061,7 @@ qemuDomainAttachDeviceMknodHelper(pid_t pid G_GNUC_UNUSED, # ifdef WITH_SELINUX if (data->tcon && - lsetfilecon_raw(data->file, (VIR_SELINUX_CTX_CONST char *)data->tcon) < 0) { + lsetfilecon_raw(data->file, (const char *)data->tcon) < 0) { VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR if (errno != EOPNOTSUPP && errno != ENOTSUP) { VIR_WARNINGS_RESET diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 0812def922..386a8b84e6 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -23,9 +23,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#if HAVE_SELINUX_LABEL_H -# include <selinux/label.h> -#endif +#include <selinux/label.h> #include "security_driver.h" #include "security_selinux.h" @@ -62,9 +60,7 @@ struct _virSecuritySELinuxData { char *content_context; virHashTablePtr mcs; bool skipAllLabel; -#if HAVE_SELINUX_LABEL_H struct selabel_handle *label_handle; -#endif }; /* Data structure to pass to various callbacks so we have everything we need */ @@ -642,14 +638,12 @@ virSecuritySELinuxLXCInitialize(virSecurityManagerPtr mgr) data->skipAllLabel = true; -# if HAVE_SELINUX_LABEL_H data->label_handle = selabel_open(SELABEL_CTX_FILE, NULL, 0); if (!data->label_handle) { virReportSystemError(errno, "%s", _("cannot open SELinux label_handle")); return -1; } -# endif if (!(selinux_conf = virConfReadFile(selinux_lxc_contexts_path(), 0))) goto error; @@ -690,10 +684,8 @@ virSecuritySELinuxLXCInitialize(virSecurityManagerPtr mgr) return 0; error: -# if HAVE_SELINUX_LABEL_H selabel_close(data->label_handle); data->label_handle = NULL; -# endif VIR_FREE(data->domain_context); VIR_FREE(data->file_context); VIR_FREE(data->content_context); @@ -719,14 +711,12 @@ virSecuritySELinuxQEMUInitialize(virSecurityManagerPtr mgr) data->skipAllLabel = false; -#if HAVE_SELINUX_LABEL_H data->label_handle = selabel_open(SELABEL_CTX_FILE, NULL, 0); if (!data->label_handle) { virReportSystemError(errno, "%s", _("cannot open SELinux label_handle")); return -1; } -#endif if (virFileReadAll(selinux_virtual_domain_context_path(), MAX_CONTEXT, &(data->domain_context)) < 0) { virReportSystemError(errno, @@ -777,10 +767,8 @@ virSecuritySELinuxQEMUInitialize(virSecurityManagerPtr mgr) return 0; error: -#if HAVE_SELINUX_LABEL_H selabel_close(data->label_handle); data->label_handle = NULL; -#endif VIR_FREE(data->domain_context); VIR_FREE(data->alt_domain_context); VIR_FREE(data->file_context); @@ -1053,10 +1041,8 @@ virSecuritySELinuxDriverClose(virSecurityManagerPtr mgr) if (!data) return 0; -#if HAVE_SELINUX_LABEL_H if (data->label_handle) selabel_close(data->label_handle); -#endif virHashFree(data->mcs); @@ -1279,7 +1265,7 @@ virSecuritySELinuxSetFileconImpl(const char *path, VIR_INFO("Setting SELinux context on '%s' to '%s'", path, tcon); - if (setfilecon_raw(path, (VIR_SELINUX_CTX_CONST char *)tcon) < 0) { + if (setfilecon_raw(path, (const char *)tcon) < 0) { int setfilecon_errno = errno; if (getfilecon_raw(path, &econ) >= 0) { @@ -1465,13 +1451,9 @@ static int getContext(virSecurityManagerPtr mgr G_GNUC_UNUSED, const char *newpath, mode_t mode, security_context_t *fcon) { -#if HAVE_SELINUX_LABEL_H virSecuritySELinuxDataPtr data = virSecurityManagerGetPrivateData(mgr); return selabel_lookup_raw(data->label_handle, fcon, newpath, mode); -#else - return matchpathcon(newpath, mode, fcon); -#endif } diff --git a/tests/securityselinuxhelper.c b/tests/securityselinuxhelper.c index 6391f67360..3aeb47dea8 100644 --- a/tests/securityselinuxhelper.c +++ b/tests/securityselinuxhelper.c @@ -27,9 +27,7 @@ # include <linux/magic.h> #endif #include <selinux/selinux.h> -#if HAVE_SELINUX_LABEL_H -# include <selinux/label.h> -#endif +#include <selinux/label.h> #include <sys/vfs.h> #include <unistd.h> #include <sys/xattr.h> @@ -54,7 +52,6 @@ static const char *(*real_selinux_virtual_image_context_path)(void); static const char *(*real_selinux_lxc_contexts_path)(void); #endif -#if HAVE_SELINUX_LABEL_H static struct selabel_handle *(*real_selabel_open)(unsigned int backend, VIR_SELINUX_OPEN_CONST struct selinux_opt *opts, @@ -64,7 +61,6 @@ static int (*real_selabel_lookup_raw)(struct selabel_handle *handle, security_context_t *con, const char *key, int type); -#endif static void init_syms(void) { @@ -82,11 +78,9 @@ static void init_syms(void) VIR_MOCK_REAL_INIT(selinux_lxc_contexts_path); #endif -#if HAVE_SELINUX_LABEL_H VIR_MOCK_REAL_INIT(selabel_open); VIR_MOCK_REAL_INIT(selabel_close); VIR_MOCK_REAL_INIT(selabel_lookup_raw); -#endif } @@ -143,7 +137,7 @@ int getpidcon(pid_t pid, security_context_t *context) return getpidcon_raw(pid, context); } -int setcon_raw(VIR_SELINUX_CTX_CONST char *context) +int setcon_raw(const char *context) { if (!is_selinux_enabled()) { errno = EINVAL; @@ -152,13 +146,13 @@ int setcon_raw(VIR_SELINUX_CTX_CONST char *context) return setenv("FAKE_SELINUX_CONTEXT", context, 1); } -int setcon(VIR_SELINUX_CTX_CONST char *context) +int setcon(const char *context) { return setcon_raw(context); } -int setfilecon_raw(const char *path, VIR_SELINUX_CTX_CONST char *con) +int setfilecon_raw(const char *path, const char *con) { const char *constr = con; if (STRPREFIX(path, abs_builddir "/securityselinuxlabeldata/nfs/")) { @@ -169,7 +163,7 @@ int setfilecon_raw(const char *path, VIR_SELINUX_CTX_CONST char *con) constr, strlen(constr), 0); } -int setfilecon(const char *path, VIR_SELINUX_CTX_CONST char *con) +int setfilecon(const char *path, const char *con) { return setfilecon_raw(path, con); } @@ -290,7 +284,6 @@ const char *selinux_lxc_contexts_path(void) } #endif -#if HAVE_SELINUX_LABEL_H struct selabel_handle * selabel_open(unsigned int backend, VIR_SELINUX_OPEN_CONST struct selinux_opt *opts, @@ -333,5 +326,3 @@ int selabel_lookup_raw(struct selabel_handle *handle, errno = ENOENT; return -1; } - -#endif -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:29AM +0200, Pavel Hrdina wrote:
All OSes that we support have libselinux >= 2.5 except for Ubuntu 16.04 where the version is 2.4.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-selinux.m4 | 20 ++------------------ src/qemu/qemu_domain.c | 4 ++-- src/security/security_selinux.c | 22 ++-------------------- tests/securityselinuxhelper.c | 19 +++++-------------- 4 files changed, 11 insertions(+), 54 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a97bf65e7f..71478319a6 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -13262,7 +13262,7 @@ qemuDomainCreateDeviceRecursive(const char *device, }
if (tcon && - lsetfilecon_raw(devicePath, (VIR_SELINUX_CTX_CONST char *)tcon) < 0) { + lsetfilecon_raw(devicePath, (const char *)tcon) < 0) {
I'm confused - why do we use a cast here in the first place? The original failure was that the definition of our mocked versions of the APIs did not match the declaration in system selinux headers: https://www.redhat.com/archives/libvir-list/2014-May/msg00925.html Passing char* to a function treating it as const char* is allowed and I don't see any benefit of explicitly casting it.
VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR if (errno != EOPNOTSUPP && errno != ENOTSUP) { VIR_WARNINGS_RESET @@ -14061,7 +14061,7 @@ qemuDomainAttachDeviceMknodHelper(pid_t pid G_GNUC_UNUSED,
# ifdef WITH_SELINUX if (data->tcon && - lsetfilecon_raw(data->file, (VIR_SELINUX_CTX_CONST char *)data->tcon) < 0) { + lsetfilecon_raw(data->file, (const char *)data->tcon) < 0) { VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR if (errno != EOPNOTSUPP && errno != ENOTSUP) { VIR_WARNINGS_RESET diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 0812def922..386a8b84e6 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1279,7 +1265,7 @@ virSecuritySELinuxSetFileconImpl(const char *path,
VIR_INFO("Setting SELinux context on '%s' to '%s'", path, tcon);
- if (setfilecon_raw(path, (VIR_SELINUX_CTX_CONST char *)tcon) < 0) { + if (setfilecon_raw(path, (const char *)tcon) < 0) { int setfilecon_errno = errno;
if (getfilecon_raw(path, &econ) >= 0) {
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

On Mon, Oct 21, 2019 at 02:51:32PM +0200, Ján Tomko wrote:
On Mon, Oct 21, 2019 at 10:00:29AM +0200, Pavel Hrdina wrote:
All OSes that we support have libselinux >= 2.5 except for Ubuntu 16.04 where the version is 2.4.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-selinux.m4 | 20 ++------------------ src/qemu/qemu_domain.c | 4 ++-- src/security/security_selinux.c | 22 ++-------------------- tests/securityselinuxhelper.c | 19 +++++-------------- 4 files changed, 11 insertions(+), 54 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a97bf65e7f..71478319a6 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -13262,7 +13262,7 @@ qemuDomainCreateDeviceRecursive(const char *device, }
if (tcon && - lsetfilecon_raw(devicePath, (VIR_SELINUX_CTX_CONST char *)tcon) < 0) { + lsetfilecon_raw(devicePath, (const char *)tcon) < 0) {
I'm confused - why do we use a cast here in the first place?
The original failure was that the definition of our mocked versions of the APIs did not match the declaration in system selinux headers: https://www.redhat.com/archives/libvir-list/2014-May/msg00925.html
Passing char* to a function treating it as const char* is allowed and I don't see any benefit of explicitly casting it.
IIUC the situation is the reverse. SELinux used to declare the parameter 'security_context_t' which lacks 'const'. So we would have been passing a 'const char*' to a 'char *' and thus need to explicitly discard const - in this case VIR_SELINUX_CTX_CONST would have expanded to no-op. That said it is redundant in this situation as we either have const char * -> char * -> char * or const char * -> const char * -> const char * If we had left out the VIR_SELINUX_CTX_CONST, the second would have been const char * -> char * -> const char * which is still fine - just uncessarily discarding const Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Follow the same pattern as for other sub-directories where we create a static library that is linked into libvirt.os. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/locking/Makefile.inc.am | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am index eccf7c3a4d..2b1c030041 100644 --- a/src/locking/Makefile.inc.am +++ b/src/locking/Makefile.inc.am @@ -1,6 +1,6 @@ # vim: filetype=automake -DRIVER_SOURCES += \ +LOCK_DRIVER_SOURCES = \ locking/lock_manager.c \ locking/lock_manager.h \ locking/lock_driver.h \ @@ -47,6 +47,7 @@ EXTRA_DIST += \ $(LOCK_DAEMON_GENERATED) \ $(LOCK_DAEMON_SOURCES) \ $(LOCK_DRIVER_LOCKD_SOURCES) \ + $(LOCK_DRIVER_SOURCES) \ locking/sanlock.conf \ locking/libvirt_sanlock.aug \ locking/test_libvirt_sanlock.aug.in \ @@ -86,6 +87,17 @@ VIRTLOCKD_UNIT_FILES_IN = \ SYSTEMD_UNIT_FILES += $(notdir $(VIRTLOCKD_UNIT_FILES_IN:%.in=%)) SYSTEMD_UNIT_FILES_IN += $(VIRTLOCKD_UNIT_FILES_IN) +noinst_LTLIBRARIES += libvirt_driver_lock.la + +libvirt_la_BUILT_LIBADD += libvirt_driver_lock.la +libvirt_driver_lock_la_SOURCES = \ + $(LOCK_DRIVER_SOURCES) \ + $(NULL) +libvirt_driver_lock_la_CFLAGS = \ + $(AM_CFLAGS) \ + -I$(srcdir)/conf \ + $(NULL) + lockdriverdir = $(libdir)/libvirt/lock-driver lockdriver_LTLIBRARIES = -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:30AM +0200, Pavel Hrdina wrote:
Follow the same pattern as for other sub-directories where we create a static library that is linked into libvirt.os.
libvirt.so
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/locking/Makefile.inc.am | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Follow the same pattern as for other sub-directories where we create a static library that is linked into libvirt.os. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/logging/Makefile.inc.am | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am index 74e94636a6..7d10b646ea 100644 --- a/src/logging/Makefile.inc.am +++ b/src/logging/Makefile.inc.am @@ -9,7 +9,7 @@ LOG_DAEMON_GENERATED = \ logging/log_daemon_dispatch_stubs.h $(NULL) -DRIVER_SOURCES += \ +LOG_DRIVER_SOURCES = \ $(LOG_PROTOCOL_GENERATED) \ logging/log_manager.c \ logging/log_manager.h \ @@ -33,6 +33,7 @@ EXTRA_DIST += \ $(LOG_PROTOCOL_GENERATED) \ $(LOG_DAEMON_GENERATED) \ $(LOG_DAEMON_SOURCES) \ + $(LOG_DRIVER_SOURCES) \ logging/virtlogd.aug \ logging/virtlogd.conf \ logging/test_virtlogd.aug.in \ @@ -59,6 +60,17 @@ VIRTLOGD_UNIT_FILES_IN = \ SYSTEMD_UNIT_FILES += $(notdir $(VIRTLOGD_UNIT_FILES_IN:%.in=%)) SYSTEMD_UNIT_FILES_IN += $(VIRTLOGD_UNIT_FILES_IN) +noinst_LTLIBRARIES += libvirt_driver_log.la + +libvirt_la_BUILT_LIBADD += libvirt_driver_log.la +libvirt_driver_log_la_SOURCES = \ + $(LOG_DRIVER_SOURCES) \ + $(NULL) +libvirt_driver_log_la_CFLAGS = \ + $(AM_CFLAGS) \ + $(XDR_CFLAGS) \ + $(NULL) + if WITH_LIBVIRTD sbin_PROGRAMS += virtlogd -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:31AM +0200, Pavel Hrdina wrote:
Follow the same pattern as for other sub-directories where we create a static library that is linked into libvirt.os.
libvirt.so
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/logging/Makefile.inc.am | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Our naming was not consistent. Use the protocol name as prefix for all generated files. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- build-aux/syntax-check.mk | 6 +++--- po/POTFILES | 2 +- src/remote/Makefile.inc.am | 12 ++++++------ src/remote/remote_daemon_dispatch.c | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 033eaf70c4..c88c1991f4 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -2163,14 +2163,14 @@ group-qemu-caps: # sc_po_check can fail if generated files are not built first sc_po_check: \ $(srcdir)/src/remote/remote_daemon_dispatch_stubs.h \ - $(srcdir)/src/remote/remote_daemon_dispatch_qemu_stubs.h \ + $(srcdir)/src/remote/qemu_daemon_dispatch_stubs.h \ $(srcdir)/src/remote/remote_client_bodies.h \ $(srcdir)/src/admin/admin_server_dispatch_stubs.h \ $(srcdir)/src/admin/admin_client.h $(srcdir)/src/remote/remote_daemon_dispatch_stubs.h: $(srcdir)/src/remote/remote_protocol.x $(MAKE) -C src remote/remote_daemon_dispatch_stubs.h -$(srcdir)/src/remote/remote_daemon_dispatch_qemu_stubs.h: $(srcdir)/src/remote/qemu_protocol.x - $(MAKE) -C src remote/remote_daemon_dispatch_qemu_stubs.h +$(srcdir)/src/remote/qemu_daemon_dispatch_stubs.h: $(srcdir)/src/remote/qemu_protocol.x + $(MAKE) -C src remote/qemu_daemon_dispatch_stubs.h $(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protocol.x $(MAKE) -C src remote/remote_client_bodies.h $(srcdir)/src/admin/admin_server_dispatch_stubs.h: $(srcdir)/src/admin/admin_protocol.x diff --git a/po/POTFILES b/po/POTFILES index 9385fc4e15..8a6df49eeb 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -146,12 +146,12 @@ src/qemu/qemu_monitor_json.c src/qemu/qemu_monitor_text.c src/qemu/qemu_process.c src/qemu/qemu_qapi.c +src/remote/qemu_daemon_dispatch_stubs.h src/remote/remote_client_bodies.h src/remote/remote_daemon.c src/remote/remote_daemon_config.c src/remote/remote_daemon_dispatch.c src/remote/remote_daemon_dispatch_stubs.h -src/remote/remote_daemon_dispatch_qemu_stubs.h src/remote/remote_daemon_stream.c src/remote/remote_driver.c src/rpc/virkeepalive.c diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 071d19d26a..acea567abe 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -20,8 +20,8 @@ REMOTE_DRIVER_SOURCES = \ REMOTE_DAEMON_GENERATED = \ remote/remote_daemon_dispatch_stubs.h \ - remote/remote_daemon_dispatch_lxc_stubs.h \ - remote/remote_daemon_dispatch_qemu_stubs.h \ + remote/lxc_daemon_dispatch_stubs.h \ + remote/qemu_daemon_dispatch_stubs.h \ $(NULL) REMOTE_DAEMON_SOURCES = \ @@ -438,17 +438,17 @@ remote/remote_daemon_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \ --mode=server remote REMOTE $(REMOTE_PROTOCOL) \ > $(srcdir)/remote/remote_daemon_dispatch_stubs.h -remote/remote_daemon_dispatch_lxc_stubs.h: $(srcdir)/rpc/gendispatch.pl \ +remote/lxc_daemon_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \ $(LXC_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ --mode=server lxc LXC $(LXC_PROTOCOL) \ - > $(srcdir)/remote/remote_daemon_dispatch_lxc_stubs.h + > $(srcdir)/remote/lxc_daemon_dispatch_stubs.h -remote/remote_daemon_dispatch_qemu_stubs.h: $(srcdir)/rpc/gendispatch.pl \ +remote/qemu_daemon_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \ $(QEMU_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ --mode=server qemu QEMU $(QEMU_PROTOCOL) \ - > $(srcdir)/remote/remote_daemon_dispatch_qemu_stubs.h + > $(srcdir)/remote/qemu_daemon_dispatch_stubs.h libvirtd.8.in: remote/libvirtd.pod $(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \ diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index 56a46a13be..3d834e2718 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -131,8 +131,8 @@ remoteGetStorageConn(virNetServerClientPtr client); #include "remote_daemon_dispatch_stubs.h" -#include "remote_daemon_dispatch_qemu_stubs.h" -#include "remote_daemon_dispatch_lxc_stubs.h" +#include "qemu_daemon_dispatch_stubs.h" +#include "lxc_daemon_dispatch_stubs.h" /* Prototypes */ -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:32AM +0200, Pavel Hrdina wrote:
Our naming was not consistent. Use the protocol name as prefix for all generated files.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- build-aux/syntax-check.mk | 6 +++--- po/POTFILES | 2 +- src/remote/Makefile.inc.am | 12 ++++++------ src/remote/remote_daemon_dispatch.c | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

There is no need to have the libvirt-admin.so library definition in the src directory. In addition the library uses directly code from admin sub-directory so move the remaining bits there as well. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- docs/Makefile.am | 2 +- docs/apibuild.py | 3 +- m4/virt-win-symbols.m4 | 4 +- po/POTFILES | 2 +- src/Makefile.am | 81 +------------------- src/admin/Makefile.inc.am | 87 +++++++++++++++++++++- src/{ => admin}/libvirt-admin.c | 0 src/{ => admin}/libvirt-admin.conf | 0 src/{ => admin}/libvirt_admin_private.syms | 0 src/{ => admin}/libvirt_admin_public.syms | 0 10 files changed, 95 insertions(+), 84 deletions(-) rename src/{ => admin}/libvirt-admin.c (100%) rename src/{ => admin}/libvirt-admin.conf (100%) rename src/{ => admin}/libvirt_admin_private.syms (100%) rename src/{ => admin}/libvirt_admin_public.syms (100%) diff --git a/docs/Makefile.am b/docs/Makefile.am index 10476902a9..5b2896bbe5 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -315,7 +315,7 @@ $(APIBUILD_STAMP): $(srcdir)/apibuild.py \ $(top_srcdir)/src/libvirt-stream.c \ $(top_srcdir)/src/libvirt-lxc.c \ $(top_srcdir)/src/libvirt-qemu.c \ - $(top_srcdir)/src/libvirt-admin.c \ + $(top_srcdir)/src/admin/libvirt-admin.c \ $(top_srcdir)/src/util/virerror.c \ $(top_srcdir)/src/util/virevent.c \ $(top_srcdir)/src/util/virtypedparam-public.c diff --git a/docs/apibuild.py b/docs/apibuild.py index 4f0d170975..e79ead0b53 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -67,7 +67,7 @@ lxc_included_files = { admin_included_files = { "libvirt-admin.h": "header with admin specific API definitions", - "libvirt-admin.c": "Implementations for the admin specific APIs", + "admin/libvirt-admin.c": "Implementations for the admin specific APIs", } ignored_words = { @@ -2549,6 +2549,7 @@ class app: if not quiet: print("Rebuilding API description for %s" % name) dirs = [srcdir + "/../src", + srcdir + "/../src/admin", srcdir + "/../src/util", srcdir + "/../include/libvirt"] if (builddir and diff --git a/m4/virt-win-symbols.m4 b/m4/virt-win-symbols.m4 index 3b2038e6bf..66dd3b7b1c 100644 --- a/m4/virt-win-symbols.m4 +++ b/m4/virt-win-symbols.m4 @@ -19,7 +19,7 @@ dnl AC_DEFUN([LIBVIRT_WIN_CHECK_SYMBOLS], [ LIBVIRT_SYMBOL_FILE=libvirt.syms - LIBVIRT_ADMIN_SYMBOL_FILE=libvirt_admin.syms + LIBVIRT_ADMIN_SYMBOL_FILE=admin/libvirt_admin.syms LIBVIRT_LXC_SYMBOL_FILE='$(srcdir)/libvirt_lxc.syms' LIBVIRT_QEMU_SYMBOL_FILE='$(srcdir)/libvirt_qemu.syms' case "$host" in @@ -28,7 +28,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_SYMBOLS], [ # from libvirt.syms and passes libvirt.def instead of libvirt.syms to the # linker LIBVIRT_SYMBOL_FILE=libvirt.def - LIBVIRT_ADMIN_SYMBOL_FILE=libvirt_admin.def + LIBVIRT_ADMIN_SYMBOL_FILE=admin/libvirt_admin.def LIBVIRT_LXC_SYMBOL_FILE=libvirt_lxc.def LIBVIRT_QEMU_SYMBOL_FILE=libvirt_qemu.def ;; diff --git a/po/POTFILES b/po/POTFILES index 8a6df49eeb..8e863dfbea 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -5,6 +5,7 @@ src/access/viraccessmanager.c src/admin/admin_server.c src/admin/admin_server_dispatch.c src/admin/admin_server_dispatch_stubs.h +src/admin/libvirt-admin.c src/bhyve/bhyve_capabilities.c src/bhyve/bhyve_command.c src/bhyve/bhyve_device.c @@ -68,7 +69,6 @@ src/hyperv/hyperv_wmi.c src/interface/interface_backend_netcf.c src/interface/interface_backend_udev.c src/internal.h -src/libvirt-admin.c src/libvirt-domain-checkpoint.c src/libvirt-domain-snapshot.c src/libvirt-domain.c diff --git a/src/Makefile.am b/src/Makefile.am index 937f5216da..56b1ed48cb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -65,6 +65,7 @@ MAINTAINERCLEANFILES = nodist_conf_DATA = DRIVER_SOURCE_FILES = STATEFUL_DRIVER_SOURCE_FILES = +lib_LTLIBRARIES = noinst_LTLIBRARIES = mod_LTLIBRARIES = INSTALL_DATA_DIRS = @@ -145,12 +146,12 @@ SECDRIVER_LIBS += $(APPARMOR_LIBS) endif WITH_SECDRIVER_APPARMOR -lib_LTLIBRARIES = libvirt.la libvirt-qemu.la libvirt-lxc.la +lib_LTLIBRARIES += libvirt.la libvirt-qemu.la libvirt-lxc.la moddir = $(libdir)/libvirt/connection-driver confdir = $(sysconfdir)/libvirt -conf_DATA += libvirt.conf libvirt-admin.conf +conf_DATA += libvirt.conf CLEANFILES += $(nodist_conf_DATA) BUILT_SOURCES += $(nodist_conf_DATA) @@ -276,19 +277,12 @@ if WITH_LINUX check-symfile: libvirt.syms libvirt.la $(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt.syms \ .libs/libvirt.so -check-admin-symfile: libvirt_admin.syms libvirt-admin.la - $(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt_admin.syms \ - .libs/libvirt-admin.so else ! WITH_LINUX check-symfile: -check-admin-symfile: endif ! WITH_LINUX check-symsorting: $(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl \ $(srcdir) $(SYM_FILES) -check-admin-symsorting: - $(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl \ - $(srcdir) $(ADMIN_SYM_FILES) EXTRA_DIST += check-symfile.pl check-symsorting.pl # Keep this list synced with RPC_PROBE_FILES @@ -339,7 +333,6 @@ check-drivername: $(AM_V_GEN)$(PERL) $(srcdir)/check-drivername.pl \ $(srcdir)/driver.h \ $(srcdir)/libvirt_public.syms \ - $(srcdir)/libvirt_admin_public.syms \ $(srcdir)/libvirt_qemu.syms \ $(srcdir)/libvirt_lxc.syms @@ -366,7 +359,7 @@ EXTRA_DIST += check-driverimpls.pl check-aclrules.pl check-aclperms.pl check-local: check-protocol check-symfile check-symsorting \ check-drivername check-driverimpls check-aclrules \ - check-aclperms check-admin-symfile check-admin-symsorting + check-aclperms check-admin .PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct) @@ -393,7 +386,6 @@ SYM_FILES += $(USED_SYM_FILES) USED_SYM_FILES += $(srcdir)/libvirt_private.syms GENERATED_SYM_FILES += \ libvirt.syms libvirt.def libvirt_qemu.def libvirt_lxc.def \ - libvirt_admin.syms libvirt_admin.def \ $(NULL) @@ -480,9 +472,7 @@ EXTRA_DIST += \ libvirt_public.syms \ libvirt_lxc.syms \ libvirt_qemu.syms \ - libvirt_admin_public.syms \ $(SYM_FILES) \ - $(ADMIN_SYM_FILES) \ $(NULL) BUILT_SOURCES += $(GENERATED_SYM_FILES) @@ -509,69 +499,6 @@ libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \ chmod a-w $@-tmp && \ mv $@-tmp $@ -libvirt_admin.syms: libvirt_admin_public.syms $(ADMIN_SYM_FILES) \ - $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-tmp $@ ; \ - printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp && \ - cat $(srcdir)/libvirt_admin_public.syms >>$@-tmp && \ - printf '\n\n# Private symbols\n\n' >>$@-tmp && \ - printf 'LIBVIRT_ADMIN_PRIVATE_$(VERSION) {\n\n' >>$@-tmp && \ - printf 'global:\n\n' >>$@-tmp && \ - cat $(ADMIN_SYM_FILES) >>$@-tmp && \ - printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \ - chmod a-w $@-tmp && \ - mv $@-tmp libvirt_admin.syms - - -lib_LTLIBRARIES += libvirt-admin.la -libvirt_admin_la_SOURCES = \ - libvirt-admin.c \ - $(ADMIN_PROTOCOL_GENERATED) \ - $(DATATYPES_SOURCES) - -libvirt_admin_la_LDFLAGS = \ - $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_ADMIN_SYMBOL_FILE) \ - -version-info $(LIBVIRT_VERSION_INFO) \ - $(LIBVIRT_NODELETE) \ - $(AM_LDFLAGS) \ - $(NULL) - -libvirt_admin_la_LIBADD = \ - libvirt.la \ - $(CYGWIN_EXTRA_LIBADD) - -libvirt_admin_la_CFLAGS = \ - $(AM_CFLAGS) \ - -I$(srcdir)/remote \ - -I$(srcdir)/rpc \ - -I$(srcdir)/admin - -libvirt_admin_la_CFLAGS += \ - $(XDR_CFLAGS) \ - $(CAPNG_CFLAGS) \ - $(YAJL_CFLAGS) \ - $(SSH2_CFLAGS) \ - $(SASL_CFLAGS) \ - $(GNUTLS_CFLAGS) \ - $(LIBSSH_CFLAGS) - -libvirt_admin_la_LIBADD += \ - $(CAPNG_LIBS) \ - $(YAJL_LIBS) \ - $(DEVMAPPER_LIBS) \ - $(LIBXML_LIBS) \ - $(GLIB_LIBS) \ - $(SSH2_LIBS) \ - $(SASL_LIBS) \ - $(GNUTLS_LIBS) \ - $(LIBSSH_LIBS) - -ADMIN_SYM_FILES = $(srcdir)/libvirt_admin_private.syms - -if WITH_DTRACE_PROBES -libvirt_admin_la_LIBADD += libvirt_probes.lo -endif WITH_DTRACE_PROBES - # Empty source list - it merely links a bunch of convenience libs together libvirt_la_SOURCES = libvirt_la_LDFLAGS = \ diff --git a/src/admin/Makefile.inc.am b/src/admin/Makefile.inc.am index 4cc588a47c..4fd7878e5c 100644 --- a/src/admin/Makefile.inc.am +++ b/src/admin/Makefile.inc.am @@ -40,10 +40,80 @@ libvirt_driver_admin_la_CFLAGS += \ $(NULL) endif WITH_SASL -# admin/admin_remote.c is being included in libvirt-admin.c, so we +GENERATED_SYM_FILES += admin/libvirt_admin.syms admin/libvirt_admin.def + +ADMIN_SYM_FILES = $(srcdir)/admin/libvirt_admin_private.syms + +# admin/admin_remote.c is being included in admin/libvirt-admin.c, so we # need to include it in the dist -EXTRA_DIST += admin/admin_remote.c +EXTRA_DIST += \ + admin/admin_remote.c \ + admin/libvirt_admin_public.syms \ + $(ADMIN_SYM_FILES) \ + $(NULL) +conf_DATA += admin/libvirt-admin.conf + +lib_LTLIBRARIES += libvirt-admin.la + +libvirt_admin_la_SOURCES = \ + admin/libvirt-admin.c \ + $(ADMIN_PROTOCOL_GENERATED) \ + $(DATATYPES_SOURCES) + +libvirt_admin_la_LDFLAGS = \ + $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_ADMIN_SYMBOL_FILE) \ + -version-info $(LIBVIRT_VERSION_INFO) \ + $(LIBVIRT_NODELETE) \ + $(AM_LDFLAGS) \ + $(NULL) + +libvirt_admin_la_LIBADD = \ + libvirt.la \ + $(CYGWIN_EXTRA_LIBADD) \ + $(CAPNG_LIBS) \ + $(YAJL_LIBS) \ + $(DEVMAPPER_LIBS) \ + $(LIBXML_LIBS) \ + $(GLIB_LIBS) \ + $(SSH2_LIBS) \ + $(SASL_LIBS) \ + $(GNUTLS_LIBS) \ + $(LIBSSH_LIBS) + +if WITH_DTRACE_PROBES +libvirt_admin_la_LIBADD += libvirt_probes.lo +endif WITH_DTRACE_PROBES + +libvirt_admin_la_CFLAGS = \ + $(AM_CFLAGS) \ + -I$(srcdir)/remote \ + -I$(srcdir)/rpc \ + $(XDR_CFLAGS) \ + $(CAPNG_CFLAGS) \ + $(YAJL_CFLAGS) \ + $(SSH2_CFLAGS) \ + $(SASL_CFLAGS) \ + $(GNUTLS_CFLAGS) \ + $(LIBSSH_CFLAGS) + +if WITH_LINUX +check-admin-symfile: admin/libvirt_admin.syms libvirt-admin.la + $(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl admin/libvirt_admin.syms \ + .libs/libvirt-admin.so +else ! WITH_LINUX +check-admin-symfile: +endif ! WITH_LINUX + +check-admin-symsorting: + $(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl \ + $(srcdir) $(ADMIN_SYM_FILES) + +check-admin-drivername: + $(AM_V_GEN)$(PERL) $(srcdir)/check-drivername.pl \ + $(srcdir)/admin/libvirt_admin_public.syms + +check-admin: check-admin-symfile check-admin-symsorting check-admin-drivername admin/admin_client.h: $(srcdir)/rpc/gendispatch.pl \ $(ADMIN_PROTOCOL) Makefile.am @@ -56,3 +126,16 @@ admin/admin_server_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \ $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=server \ admin ADMIN $(ADMIN_PROTOCOL) \ > $(srcdir)/admin/admin_server_dispatch_stubs.h + +admin/libvirt_admin.syms: admin/libvirt_admin_public.syms $(ADMIN_SYM_FILES) \ + $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-tmp $@ ; \ + printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp && \ + cat $(srcdir)/admin/libvirt_admin_public.syms >>$@-tmp && \ + printf '\n\n# Private symbols\n\n' >>$@-tmp && \ + printf 'LIBVIRT_ADMIN_PRIVATE_$(VERSION) {\n\n' >>$@-tmp && \ + printf 'global:\n\n' >>$@-tmp && \ + cat $(ADMIN_SYM_FILES) >>$@-tmp && \ + printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \ + chmod a-w $@-tmp && \ + mv $@-tmp admin/libvirt_admin.syms diff --git a/src/libvirt-admin.c b/src/admin/libvirt-admin.c similarity index 100% rename from src/libvirt-admin.c rename to src/admin/libvirt-admin.c diff --git a/src/libvirt-admin.conf b/src/admin/libvirt-admin.conf similarity index 100% rename from src/libvirt-admin.conf rename to src/admin/libvirt-admin.conf diff --git a/src/libvirt_admin_private.syms b/src/admin/libvirt_admin_private.syms similarity index 100% rename from src/libvirt_admin_private.syms rename to src/admin/libvirt_admin_private.syms diff --git a/src/libvirt_admin_public.syms b/src/admin/libvirt_admin_public.syms similarity index 100% rename from src/libvirt_admin_public.syms rename to src/admin/libvirt_admin_public.syms -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:33AM +0200, Pavel Hrdina wrote:
There is no need to have the libvirt-admin.so library definition in the src directory. In addition the library uses directly code from admin sub-directory so move the remaining bits there as well.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- docs/Makefile.am | 2 +- docs/apibuild.py | 3 +- m4/virt-win-symbols.m4 | 4 +- po/POTFILES | 2 +- src/Makefile.am | 81 +------------------- src/admin/Makefile.inc.am | 87 +++++++++++++++++++++- src/{ => admin}/libvirt-admin.c | 0 src/{ => admin}/libvirt-admin.conf | 0 src/{ => admin}/libvirt_admin_private.syms | 0 src/{ => admin}/libvirt_admin_public.syms | 0 10 files changed, 95 insertions(+), 84 deletions(-) rename src/{ => admin}/libvirt-admin.c (100%) rename src/{ => admin}/libvirt-admin.conf (100%) rename src/{ => admin}/libvirt_admin_private.syms (100%) rename src/{ => admin}/libvirt_admin_public.syms (100%)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Commit <124f06534c65618b1eeeee07bb26182ab8e30119> moved remote related build rules into separate makefile but forgot to move this part as well. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/Makefile.am | 3 --- src/remote/Makefile.inc.am | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 56b1ed48cb..34dfeeb9f9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -529,9 +529,6 @@ if WITH_DTRACE_PROBES libvirt_la_BUILT_LIBADD += libvirt_probes.lo libvirt_la_DEPENDENCIES += libvirt_probes.lo libvirt_probes.o nodist_libvirt_la_SOURCES = libvirt_probes.h -if WITH_REMOTE -nodist_libvirt_driver_remote_la_SOURCES = libvirt_probes.h -endif WITH_REMOTE DTRACE2SYSTEMTAP_FLAGS = --with-modules BUILT_SOURCES += libvirt_probes.h libvirt_probes.stp libvirt_functions.stp diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index acea567abe..5c5f5f4d2c 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -179,6 +179,10 @@ libvirt_driver_remote_la_CFLAGS = \ libvirt_driver_remote_la_LDFLAGS = $(AM_LDFLAGS) libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES) +if WITH_DTRACE_PROBES +nodist_libvirt_driver_remote_la_SOURCES = libvirt_probes.h +endif WITH_DTRACE_PROBES + if WITH_SASL libvirt_driver_remote_la_CFLAGS += \ $(SASL_CFLAGS) \ -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:34AM +0200, Pavel Hrdina wrote:
Commit <124f06534c65618b1eeeee07bb26182ab8e30119> moved remote related build rules into separate makefile but forgot to move this part as well.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/Makefile.am | 3 --- src/remote/Makefile.inc.am | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

There is no need to keep old compatibility code around as it it will never be used in our current source tree. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- docs/apibuild.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/docs/apibuild.py b/docs/apibuild.py index e79ead0b53..d3d0be2d83 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -2543,25 +2543,15 @@ class app: builder = None srcdir = os.path.abspath((os.environ["srcdir"])) builddir = os.path.abspath((os.environ["builddir"])) - if srcdir == builddir: - builddir = None if glob.glob(srcdir + "/../src/libvirt.c") != []: if not quiet: print("Rebuilding API description for %s" % name) dirs = [srcdir + "/../src", srcdir + "/../src/admin", srcdir + "/../src/util", - srcdir + "/../include/libvirt"] - if (builddir and - not os.path.exists(srcdir + "/../include/libvirt/libvirt-common.h")): - dirs.append(builddir + "/../include/libvirt") + srcdir + "/../include/libvirt", + builddir + "/../include/libvirt"] builder = docBuilder(name, srcdir, dirs, []) - elif glob.glob("src/libvirt.c") != []: - if not quiet: - print("Rebuilding API description for %s" % name) - builder = docBuilder(name, srcdir, - ["src", "src/util", "include/libvirt"], - []) else: self.warning("rebuild() failed, unable to guess the module") return None -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:35AM +0200, Pavel Hrdina wrote:
There is no need to keep old compatibility code around as it it will never be used in our current source tree.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- docs/apibuild.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Historically we did not support VPATH builds and everything was generated into source directory. The introduction of VPATH builds did not changed the way how our documentation is handled. This patch changes the rules to generate everything into build directory and stops distributing generated files in order to have properly separated VPATH builds. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- docs/Makefile.am | 113 ++++++++++++++++++++++------------------------ docs/apibuild.py | 2 +- docs/hvsupport.pl | 37 +++++++-------- 3 files changed, 74 insertions(+), 78 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 5b2896bbe5..0311bbedd8 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -116,15 +116,15 @@ kbase_html_in = \ $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/kbase/*.html.in)) kbase_html = $(kbase_html_in:%.html.in=%.html) -# Since we ship pre-built html in the tarball, we must also -# ship the sources, even when those sources are themselves -# generated. # Generate hvsupport.html and news.html first, since they take one extra step. -dot_html_in = \ +dot_html_generated_in = \ hvsupport.html.in \ - news.html.in \ + news.html.in +dot_html_in = \ $(notdir $(wildcard $(srcdir)/*.html.in)) -dot_html = $(dot_html_in:%.html.in=%.html) +dot_html = \ + $(dot_html_generated_in:%.html.in=%.html) \ + $(dot_html_in:%.html.in=%.html) xml = \ libvirt-api.xml \ @@ -166,27 +166,32 @@ EXTRA_DIST= \ apibuild.py genaclperms.pl \ site.xsl subsite.xsl newapi.xsl page.xsl \ wrapstring.xsl \ - $(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \ - $(xml) $(qemu_xml) $(lxc_xml) $(admin_xml) $(fig) $(png) $(css) \ + $(dot_html_in) $(gif) $(apipng) \ + $(fig) $(png) $(css) \ $(javascript) $(logofiles) \ - $(internals_html_in) $(internals_html) $(fonts) \ - $(kbase_html_in) $(kbase_html) \ + $(internals_html_in) $(fonts) \ + $(kbase_html_in) \ aclperms.htmlinc \ hvsupport.pl \ $(schema_DATA) acl_generated = aclperms.htmlinc -$(srcdir)/aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \ +aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \ $(srcdir)/genaclperms.pl Makefile.am $(AM_V_GEN)$(PERL) $(srcdir)/genaclperms.pl $< > $@ -MAINTAINERCLEANFILES = \ - $(addprefix $(srcdir)/,$(dot_html)) \ - $(addprefix $(srcdir)/,$(apihtml)) \ - $(addprefix $(srcdir)/,$(internals_html)) \ - $(addprefix $(srcdir)/,$(kbase_html)) \ - $(srcdir)/hvsupport.html.in $(srcdir)/aclperms.htmlinc +CLEANFILES = \ + $(dot_html) \ + $(apihtml) \ + $(internals_html) \ + $(kbase_html) \ + $(xml) \ + $(qemu_xml) \ + $(lxc_xml) \ + $(admin_xml) \ + $(dot_html_generated_in) \ + aclperms.htmlinc timestamp="$(shell if test -n "$$SOURCE_DATE_EPOCH"; \ then \ @@ -197,21 +202,21 @@ timestamp="$(shell if test -n "$$SOURCE_DATE_EPOCH"; \ all-am: web -api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml -qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml -lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml -admin_api: $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml +api: libvirt-api.xml libvirt-refs.xml +qemu_api: libvirt-qemu-api.xml libvirt-qemu-refs.xml +lxc_api: libvirt-lxc-api.xml libvirt-lxc-refs.xml +admin_api: libvirt-admin-api.xml libvirt-admin-refs.xml web: $(dot_html) $(internals_html) $(kbase_html) \ html/index.html -hvsupport.html: $(srcdir)/hvsupport.html.in +hvsupport.html: hvsupport.html.in -$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \ +hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \ $(top_srcdir)/src/libvirt_public.syms \ $(top_srcdir)/src/libvirt_qemu.syms $(top_srcdir)/src/libvirt_lxc.syms \ $(top_srcdir)/src/driver.h - $(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(top_srcdir)/src > $@ \ + $(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(top_srcdir) $(top_builddir) > $@ \ || { rm $@ && exit 1; } news.html.in: \ @@ -226,8 +231,6 @@ EXTRA_DIST += \ $(srcdir)/news.xml \ $(srcdir)/news.rng \ $(srcdir)/news-html.xsl -MAINTAINERCLEANFILES += \ - $(srcdir)/news.html.in %.png: %.fig convert -rotate 90 $< $@ @@ -249,36 +252,36 @@ MAINTAINERCLEANFILES += \ || { rm $@ && exit 1; } %.html: %.html.tmp - $(AM_V_GEN)$(XMLLINT) --nonet --format $< > $(srcdir)/$@ \ - || { rm $(srcdir)/$@ && exit 1; } + $(AM_V_GEN)$(XMLLINT) --nonet --format $< > $@ \ + || { rm $@ && exit 1; } $(apihtml_generated): html/index.html html/index.html: libvirt-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP) - $(AM_V_GEN)$(XSLTPROC) --nonet -o $(srcdir)/ \ + $(AM_V_GEN)$(XSLTPROC) --nonet -o ./ \ --stringparam builddir '$(abs_top_builddir)' \ --stringparam timestamp $(timestamp) \ - $(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml && \ - $(XMLLINT) --nonet --noout $(srcdir)/html/*.html + $(srcdir)/newapi.xsl libvirt-api.xml && \ + $(XMLLINT) --nonet --noout html/*.html python_generated_files = \ - $(srcdir)/html/libvirt-libvirt-lxc.html \ - $(srcdir)/html/libvirt-libvirt-qemu.html \ - $(srcdir)/html/libvirt-libvirt-admin.html \ - $(srcdir)/html/libvirt-virterror.html \ - $(srcdir)/libvirt-api.xml \ - $(srcdir)/libvirt-refs.xml \ - $(srcdir)/libvirt-lxc-api.xml \ - $(srcdir)/libvirt-lxc-refs.xml \ - $(srcdir)/libvirt-qemu-api.xml \ - $(srcdir)/libvirt-qemu-refs.xml \ - $(srcdir)/libvirt-admin-api.xml \ - $(srcdir)/libvirt-admin-refs.xml \ + html/libvirt-libvirt-lxc.html \ + html/libvirt-libvirt-qemu.html \ + html/libvirt-libvirt-admin.html \ + html/libvirt-virterror.html \ + libvirt-api.xml \ + libvirt-refs.xml \ + libvirt-lxc-api.xml \ + libvirt-lxc-refs.xml \ + libvirt-qemu-api.xml \ + libvirt-qemu-refs.xml \ + libvirt-admin-api.xml \ + libvirt-admin-refs.xml \ $(NULL) APIBUILD=$(srcdir)/apibuild.py -APIBUILD_STAMP=$(APIBUILD).stamp -EXTRA_DIST += $(APIBUILD_STAMP) +APIBUILD_STAMP=apibuild.py.stamp +CLEANFILES += $(APIBUILD_STAMP) $(python_generated_files): $(APIBUILD_STAMP) @@ -327,22 +330,14 @@ $(APIBUILD_STAMP): $(srcdir)/apibuild.py \ check-local: all dist-local: all -clean-local: - rm -f *~ *.bak *.hierarchy *.signals *-unused.txt *.html html/*.html - -maintainer-clean-local: clean-local - rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml - rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml - rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml - rm -rf $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml - rm -rf $(APIBUILD_STAMP) - rebuild: api qemu_api lxc_api admin_api all install-data-local: $(mkinstalldirs) $(DESTDIR)$(HTML_DIR) - for f in $(css) $(dot_html) $(gif) $(png); do \ + for f in $(css) $(gif) $(png); do \ $(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR); done + for f in $(dot_html); do \ + $(INSTALL) -m 0644 $$f $(DESTDIR)$(HTML_DIR); done $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/js for f in $(javascript); do \ $(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/js/; done @@ -351,15 +346,15 @@ install-data-local: $(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/logos; done $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html for h in $(apihtml); do \ - $(INSTALL) -m 0644 $(srcdir)/$$h $(DESTDIR)$(HTML_DIR)/html; done + $(INSTALL) -m 0644 $$h $(DESTDIR)$(HTML_DIR)/html; done for p in $(apipng); do \ $(INSTALL) -m 0644 $(srcdir)/$$p $(DESTDIR)$(HTML_DIR)/html; done $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/internals for f in $(internals_html); do \ - $(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/internals; done + $(INSTALL) -m 0644 $$f $(DESTDIR)$(HTML_DIR)/internals; done $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/kbase for f in $(kbase_html); do \ - $(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/kbase; done + $(INSTALL) -m 0644 $$f $(DESTDIR)$(HTML_DIR)/kbase; done $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/fonts for f in $(fonts); do \ $(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/fonts; \ diff --git a/docs/apibuild.py b/docs/apibuild.py index d3d0be2d83..af8595083c 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -2551,7 +2551,7 @@ class app: srcdir + "/../src/util", srcdir + "/../include/libvirt", builddir + "/../include/libvirt"] - builder = docBuilder(name, srcdir, dirs, []) + builder = docBuilder(name, builddir, dirs, []) else: self.warning("rebuild() failed, unable to guess the module") return None diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl index 494b8a27ec..0977098eac 100755 --- a/docs/hvsupport.pl +++ b/docs/hvsupport.pl @@ -5,23 +5,24 @@ use warnings; use File::Find; -die "syntax: $0 SRCDIR\n" unless int(@ARGV) == 1; +die "syntax: $0 SRCDIR BUILDDIR\n" unless int(@ARGV) == 2; my $srcdir = shift @ARGV; +my $builddir = shift @ARGV; -my $symslibvirt = "$srcdir/libvirt_public.syms"; -my $symsqemu = "$srcdir/libvirt_qemu.syms"; -my $symslxc = "$srcdir/libvirt_lxc.syms"; +my $symslibvirt = "$srcdir/src/libvirt_public.syms"; +my $symsqemu = "$srcdir/src/libvirt_qemu.syms"; +my $symslxc = "$srcdir/src/libvirt_lxc.syms"; my @drivertable = ( - "$srcdir/driver-hypervisor.h", - "$srcdir/driver-interface.h", - "$srcdir/driver-network.h", - "$srcdir/driver-nodedev.h", - "$srcdir/driver-nwfilter.h", - "$srcdir/driver-secret.h", - "$srcdir/driver-state.h", - "$srcdir/driver-storage.h", - "$srcdir/driver-stream.h", + "$srcdir/src/driver-hypervisor.h", + "$srcdir/src/driver-interface.h", + "$srcdir/src/driver-network.h", + "$srcdir/src/driver-nodedev.h", + "$srcdir/src/driver-nwfilter.h", + "$srcdir/src/driver-secret.h", + "$srcdir/src/driver-state.h", + "$srcdir/src/driver-storage.h", + "$srcdir/src/driver-stream.h", ); my %groupheaders = ( @@ -38,10 +39,10 @@ my %groupheaders = ( my @srcs; find({ wanted => sub { - if (m!$srcdir/.*/\w+_(driver|common|tmpl|monitor|hal|udev)\.c$!) { + if (m!$srcdir/src/.*/\w+_(driver|common|tmpl|monitor|hal|udev)\.c$!) { push @srcs, $_ if $_ !~ /vbox_driver\.c/; } - }, no_chdir => 1}, $srcdir); + }, no_chdir => 1}, "$srcdir/src"); # Map API functions to the header and documentation files they're in # so that we can generate proper hyperlinks to their documentation. @@ -120,13 +121,13 @@ sub parseSymsFile { my %apis; # Get the list of all public APIs and their corresponding version -parseSymsFile(\%apis, "LIBVIRT", $symslibvirt, "$srcdir/../docs/libvirt-api.xml"); +parseSymsFile(\%apis, "LIBVIRT", $symslibvirt, "$builddir/docs/libvirt-api.xml"); # And the same for the QEMU specific APIs -parseSymsFile(\%apis, "LIBVIRT_QEMU", $symsqemu, "$srcdir/../docs/libvirt-qemu-api.xml"); +parseSymsFile(\%apis, "LIBVIRT_QEMU", $symsqemu, "$builddir/docs/libvirt-qemu-api.xml"); # And the same for the LXC specific APIs -parseSymsFile(\%apis, "LIBVIRT_LXC", $symslxc, "$srcdir/../docs/libvirt-lxc-api.xml"); +parseSymsFile(\%apis, "LIBVIRT_LXC", $symslxc, "$builddir/docs/libvirt-lxc-api.xml"); # Some special things which aren't public APIs, -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:36AM +0200, Pavel Hrdina wrote:
Historically we did not support VPATH builds and everything was generated into source directory. The introduction of VPATH builds did not changed the way how our documentation is handled.
This patch changes the rules to generate everything into build directory and stops distributing generated files in order to have properly separated VPATH builds.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- docs/Makefile.am | 113 ++++++++++++++++++++++------------------------ docs/apibuild.py | 2 +- docs/hvsupport.pl | 37 +++++++-------- 3 files changed, 74 insertions(+), 78 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Historically we did not support VPATH builds and everything was generated into source directory. The introduction of VPATH builds did not changed the way how our translation files are handled. This patch changes the rules to generate everything into build directory and stops distributing generated files in order to have properly separated VPATH builds. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- po/Makefile.am | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/po/Makefile.am b/po/Makefile.am index b0e2c15d44..8ddb1432f0 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -16,17 +16,16 @@ LANGS := \ POTFILE_DEPS := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES) -POTFILE := $(srcdir)/$(DOMAIN).pot -POFILES := $(LANGS:%=$(srcdir)/%.po) -GMOFILES := $(LANGS:%=$(srcdir)/%.gmo) +POTFILE := $(DOMAIN).pot +POMINIFILES := $(LANGS:%=%.mini.po) +POFILES := $(LANGS:%=%.po) +GMOFILES := $(LANGS:%=%.gmo) -MAINTAINERCLEANFILES = $(POTFILE) $(POFILES) $(GMOFILES) +CLEANFILES = $(POTFILE) $(POFILES) $(GMOFILES) EXTRA_DIST = \ POTFILES \ - $(POTFILE) \ - $(POFILES) \ - $(GMOFILES) + $(POMINIFILES) if HAVE_GNU_GETTEXT_TOOLS @@ -63,10 +62,18 @@ update-mini-po: $(POTFILE) done push-pot: $(POTFILE) - zanata push --push-type=source + zanata-cli push \ + --project-config $(srcdir)/zanata.xml \ + --push-type=source \ + --trans-dir $(builddir) \ + --src-dir $(srcdir) pull-po: $(POTFILE) - zanata pull --create-skeletons + zanata-cli pull \ + --project-config $(srcdir)/zanata.xml \ + --create-skeletons \ + --trans-dir $(builddir) \ + --src-dir $(srcdir) $(MAKE) update-mini-po $(MAKE) update-gmo @@ -76,19 +83,17 @@ $(POTFILE): POTFILES $(POTFILE_DEPS) $(SED) $(SED_PO_FIXUP_ARGS) < $@-t > $@ rm -f $@-t -$(srcdir)/%.po: $(srcdir)/%.mini.po $(POTFILE) +%.po: %.mini.po $(POTFILE) $(MSGMERGE) --no-fuzzy-matching $< $(POTFILE) | \ $(SED) $(SED_PO_FIXUP_ARGS) > $@ -$(srcdir)/%.gmo: $(srcdir)/%.po +%.gmo: %.po rm -f $@ $@-t $(MSGFMT) -c -o $@-t $< mv $@-t $@ .PRECIOUS: $(POTFILE) $(POFILES) -endif HAVE_GNU_GETTEXT_TOOLS - if ENABLE_NLS # Cannot use 'localedir' since this conflicts with autoconf. @@ -99,7 +104,7 @@ install-data-hook: $(GMOFILES) for lang in $(LANGS); do \ d=$(DESTDIR)$(langinstdir)/$$lang/LC_MESSAGES; \ mkdir -p $$d; \ - install -m 0644 $(srcdir)/$$lang.gmo $$d/$(DOMAIN).mo; \ + install -m 0644 $$lang.gmo $$d/$(DOMAIN).mo; \ done uninstall-hook: @@ -109,3 +114,5 @@ uninstall-hook: done endif ENABLE_NLS + +endif HAVE_GNU_GETTEXT_TOOLS -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:37AM +0200, Pavel Hrdina wrote:
Historically we did not support VPATH builds and everything was generated into source directory. The introduction of VPATH builds did not changed the way how our translation files are handled.
This patch changes the rules to generate everything into build directory and stops distributing generated files in order to have properly separated VPATH builds.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- po/Makefile.am | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-)
diff --git a/po/Makefile.am b/po/Makefile.am index b0e2c15d44..8ddb1432f0 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -16,17 +16,16 @@ LANGS := \
POTFILE_DEPS := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES) -POTFILE := $(srcdir)/$(DOMAIN).pot -POFILES := $(LANGS:%=$(srcdir)/%.po) -GMOFILES := $(LANGS:%=$(srcdir)/%.gmo) +POTFILE := $(DOMAIN).pot +POMINIFILES := $(LANGS:%=%.mini.po) +POFILES := $(LANGS:%=%.po) +GMOFILES := $(LANGS:%=%.gmo)
-MAINTAINERCLEANFILES = $(POTFILE) $(POFILES) $(GMOFILES) +CLEANFILES = $(POTFILE) $(POFILES) $(GMOFILES)
EXTRA_DIST = \ POTFILES \ - $(POTFILE) \ - $(POFILES) \ - $(GMOFILES) + $(POMINIFILES)
if HAVE_GNU_GETTEXT_TOOLS
@@ -63,10 +62,18 @@ update-mini-po: $(POTFILE) done
push-pot: $(POTFILE) - zanata push --push-type=source + zanata-cli push \ + --project-config $(srcdir)/zanata.xml \ + --push-type=source \ + --trans-dir $(builddir) \ + --src-dir $(srcdir)
pull-po: $(POTFILE) - zanata pull --create-skeletons + zanata-cli pull \ + --project-config $(srcdir)/zanata.xml \ + --create-skeletons \ + --trans-dir $(builddir) \ + --src-dir $(srcdir) $(MAKE) update-mini-po $(MAKE) update-gmo
This is not right. The *.mini.po files must always be created in the src dir when we pull from zanata, becasue they're going to be committed to git from there. Only the non-mini *.po , *gmo and libvirt.pot files can be in the build dir. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, Oct 22, 2019 at 11:11:58AM +0100, Daniel P. Berrangé wrote:
On Mon, Oct 21, 2019 at 10:00:37AM +0200, Pavel Hrdina wrote:
Historically we did not support VPATH builds and everything was generated into source directory. The introduction of VPATH builds did not changed the way how our translation files are handled.
This patch changes the rules to generate everything into build directory and stops distributing generated files in order to have properly separated VPATH builds.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- po/Makefile.am | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-)
diff --git a/po/Makefile.am b/po/Makefile.am index b0e2c15d44..8ddb1432f0 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -16,17 +16,16 @@ LANGS := \
POTFILE_DEPS := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES) -POTFILE := $(srcdir)/$(DOMAIN).pot -POFILES := $(LANGS:%=$(srcdir)/%.po) -GMOFILES := $(LANGS:%=$(srcdir)/%.gmo) +POTFILE := $(DOMAIN).pot +POMINIFILES := $(LANGS:%=%.mini.po) +POFILES := $(LANGS:%=%.po) +GMOFILES := $(LANGS:%=%.gmo)
-MAINTAINERCLEANFILES = $(POTFILE) $(POFILES) $(GMOFILES) +CLEANFILES = $(POTFILE) $(POFILES) $(GMOFILES)
EXTRA_DIST = \ POTFILES \ - $(POTFILE) \ - $(POFILES) \ - $(GMOFILES) + $(POMINIFILES)
if HAVE_GNU_GETTEXT_TOOLS
@@ -63,10 +62,18 @@ update-mini-po: $(POTFILE) done
push-pot: $(POTFILE) - zanata push --push-type=source + zanata-cli push \ + --project-config $(srcdir)/zanata.xml \ + --push-type=source \ + --trans-dir $(builddir) \ + --src-dir $(srcdir)
pull-po: $(POTFILE) - zanata pull --create-skeletons + zanata-cli pull \ + --project-config $(srcdir)/zanata.xml \ + --create-skeletons \ + --trans-dir $(builddir) \ + --src-dir $(srcdir) $(MAKE) update-mini-po $(MAKE) update-gmo
This is not right. The *.mini.po files must always be created in the src dir when we pull from zanata, becasue they're going to be committed to git from there.
Only the non-mini *.po , *gmo and libvirt.pot files can be in the build dir.
It should actually work like that. If you check the update-mini-po rule it still uses $(srcdir)/$$lang.mini.po as an output file. Only generated po and gmo files are in build directory. Pavel

There was no need to handle files for translation from build directory but that will change with following patches where we will stop generating source files into source directory. In order to have them included for translation we have to prefix each file with SRCDIR or BUILDDIR. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- po/Makefile.am | 14 ++- po/POTFILES | 320 ------------------------------------------------- po/POTFILES.in | 320 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 329 insertions(+), 325 deletions(-) delete mode 100644 po/POTFILES create mode 100644 po/POTFILES.in diff --git a/po/Makefile.am b/po/Makefile.am index 8ddb1432f0..82798eeb03 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -15,16 +15,21 @@ LANGS := \ uk ur vi wba yo zh_CN zh_HK zh_TW zu -POTFILE_DEPS := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES) +POTFILES_IN = $(srcdir)/POTFILES.in +POTFILES: $(POTFILES_IN) + $(AM_V_GEN) cat $(POTFILES_IN) | \ + $(SED) 's|@SRCDIR@|$(top_srcdir)|' | \ + $(SED) 's|@BUILDDIR@|$(top_builddir)|' > $@ +POTFILE_DEPS = $(shell cat POTFILES) POTFILE := $(DOMAIN).pot POMINIFILES := $(LANGS:%=%.mini.po) POFILES := $(LANGS:%=%.po) GMOFILES := $(LANGS:%=%.gmo) -CLEANFILES = $(POTFILE) $(POFILES) $(GMOFILES) +CLEANFILES = $(POTFILE) $(POFILES) $(GMOFILES) POTFILES EXTRA_DIST = \ - POTFILES \ + $(POTFILES_IN) \ $(POMINIFILES) if HAVE_GNU_GETTEXT_TOOLS @@ -38,7 +43,6 @@ XGETTEXT_ARGS = \ --package-name="$(PACKAGE_NAME)" \ --package-version="$(PACKAGE_VERSION)" \ --msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \ - --directory=$(top_srcdir) \ $(NULL) SED_PO_FIXUP_ARGS = \ @@ -79,7 +83,7 @@ pull-po: $(POTFILE) $(POTFILE): POTFILES $(POTFILE_DEPS) $(XGETTEXT) -o $@-t $(XGETTEXT_ARGS) \ - --files-from=$(abs_srcdir)/POTFILES + --files-from=$(abs_builddir)/POTFILES $(SED) $(SED_PO_FIXUP_ARGS) < $@-t > $@ rm -f $@-t diff --git a/po/POTFILES b/po/POTFILES deleted file mode 100644 index 8e863dfbea..0000000000 --- a/po/POTFILES +++ /dev/null @@ -1,320 +0,0 @@ -gnulib/lib/gai_strerror.c -gnulib/lib/regcomp.c -src/access/viraccessdriverpolkit.c -src/access/viraccessmanager.c -src/admin/admin_server.c -src/admin/admin_server_dispatch.c -src/admin/admin_server_dispatch_stubs.h -src/admin/libvirt-admin.c -src/bhyve/bhyve_capabilities.c -src/bhyve/bhyve_command.c -src/bhyve/bhyve_device.c -src/bhyve/bhyve_domain.c -src/bhyve/bhyve_driver.c -src/bhyve/bhyve_monitor.c -src/bhyve/bhyve_parse_command.c -src/bhyve/bhyve_process.c -src/conf/capabilities.c -src/conf/checkpoint_conf.c -src/conf/cpu_conf.c -src/conf/device_conf.c -src/conf/domain_addr.c -src/conf/domain_capabilities.c -src/conf/domain_conf.c -src/conf/domain_event.c -src/conf/interface_conf.c -src/conf/netdev_bandwidth_conf.c -src/conf/netdev_vlan_conf.c -src/conf/netdev_vport_profile_conf.c -src/conf/network_conf.c -src/conf/networkcommon_conf.c -src/conf/node_device_conf.c -src/conf/numa_conf.c -src/conf/nwfilter_conf.c -src/conf/nwfilter_params.c -src/conf/object_event.c -src/conf/secret_conf.c -src/conf/snapshot_conf.c -src/conf/storage_adapter_conf.c -src/conf/storage_conf.c -src/conf/virchrdev.c -src/conf/virdomainobjlist.c -src/conf/virnetworkobj.c -src/conf/virnodedeviceobj.c -src/conf/virnwfilterobj.c -src/conf/virsavecookie.c -src/conf/virsecretobj.c -src/conf/virstorageobj.c -src/cpu/cpu.c -src/cpu/cpu_arm.c -src/cpu/cpu_map.c -src/cpu/cpu_ppc64.c -src/cpu/cpu_s390.c -src/cpu/cpu_x86.c -src/datatypes.c -src/driver.c -src/esx/esx_driver.c -src/esx/esx_network_driver.c -src/esx/esx_storage_backend_iscsi.c -src/esx/esx_storage_backend_vmfs.c -src/esx/esx_storage_driver.c -src/esx/esx_stream.c -src/esx/esx_util.c -src/esx/esx_vi.c -src/esx/esx_vi_methods.c -src/esx/esx_vi_types.c -src/hyperv/hyperv_driver.c -src/hyperv/hyperv_util.c -src/hyperv/hyperv_wmi.c -src/interface/interface_backend_netcf.c -src/interface/interface_backend_udev.c -src/internal.h -src/libvirt-domain-checkpoint.c -src/libvirt-domain-snapshot.c -src/libvirt-domain.c -src/libvirt-host.c -src/libvirt-lxc.c -src/libvirt-network.c -src/libvirt-nodedev.c -src/libvirt-nwfilter.c -src/libvirt-qemu.c -src/libvirt-secret.c -src/libvirt-storage.c -src/libvirt-stream.c -src/libvirt.c -src/libxl/libxl_capabilities.c -src/libxl/libxl_conf.c -src/libxl/libxl_domain.c -src/libxl/libxl_driver.c -src/libxl/libxl_migration.c -src/libxl/xen_common.c -src/libxl/xen_xl.c -src/libxl/xen_xm.c -src/locking/lock_daemon.c -src/locking/lock_daemon_dispatch.c -src/locking/lock_driver_lockd.c -src/locking/lock_driver_sanlock.c -src/locking/lock_manager.c -src/locking/sanlock_helper.c -src/logging/log_daemon.c -src/logging/log_daemon_dispatch.c -src/logging/log_handler.c -src/logging/log_manager.c -src/lxc/lxc_cgroup.c -src/lxc/lxc_conf.c -src/lxc/lxc_container.c -src/lxc/lxc_controller.c -src/lxc/lxc_domain.c -src/lxc/lxc_driver.c -src/lxc/lxc_fuse.c -src/lxc/lxc_hostdev.c -src/lxc/lxc_native.c -src/lxc/lxc_process.c -src/network/bridge_driver.c -src/network/bridge_driver_linux.c -src/network/leaseshelper.c -src/node_device/node_device_driver.c -src/node_device/node_device_hal.c -src/node_device/node_device_udev.c -src/nwfilter/nwfilter_dhcpsnoop.c -src/nwfilter/nwfilter_driver.c -src/nwfilter/nwfilter_ebiptables_driver.c -src/nwfilter/nwfilter_gentech_driver.c -src/nwfilter/nwfilter_learnipaddr.c -src/openvz/openvz_conf.c -src/openvz/openvz_driver.c -src/openvz/openvz_util.c -src/phyp/phyp_driver.c -src/qemu/qemu_agent.c -src/qemu/qemu_alias.c -src/qemu/qemu_block.c -src/qemu/qemu_capabilities.c -src/qemu/qemu_cgroup.c -src/qemu/qemu_command.c -src/qemu/qemu_conf.c -src/qemu/qemu_domain.c -src/qemu/qemu_domain_address.c -src/qemu/qemu_driver.c -src/qemu/qemu_hostdev.c -src/qemu/qemu_hotplug.c -src/qemu/qemu_interface.c -src/qemu/qemu_migration.c -src/qemu/qemu_migration_cookie.c -src/qemu/qemu_migration_params.c -src/qemu/qemu_monitor.c -src/qemu/qemu_monitor_json.c -src/qemu/qemu_monitor_text.c -src/qemu/qemu_process.c -src/qemu/qemu_qapi.c -src/remote/qemu_daemon_dispatch_stubs.h -src/remote/remote_client_bodies.h -src/remote/remote_daemon.c -src/remote/remote_daemon_config.c -src/remote/remote_daemon_dispatch.c -src/remote/remote_daemon_dispatch_stubs.h -src/remote/remote_daemon_stream.c -src/remote/remote_driver.c -src/rpc/virkeepalive.c -src/rpc/virnetclient.c -src/rpc/virnetclientprogram.c -src/rpc/virnetclientstream.c -src/rpc/virnetdaemon.c -src/rpc/virnetlibsshsession.c -src/rpc/virnetmessage.c -src/rpc/virnetsaslcontext.c -src/rpc/virnetserver.c -src/rpc/virnetserverclient.c -src/rpc/virnetserverprogram.c -src/rpc/virnetserverservice.c -src/rpc/virnetsocket.c -src/rpc/virnetsshsession.c -src/rpc/virnettlscontext.c -src/secret/secret_driver.c -src/security/security_apparmor.c -src/security/security_dac.c -src/security/security_driver.c -src/security/security_manager.c -src/security/security_selinux.c -src/security/virt-aa-helper.c -src/storage/parthelper.c -src/storage/storage_backend.c -src/storage/storage_backend_disk.c -src/storage/storage_backend_fs.c -src/storage/storage_backend_gluster.c -src/storage/storage_backend_iscsi.c -src/storage/storage_backend_logical.c -src/storage/storage_backend_mpath.c -src/storage/storage_backend_rbd.c -src/storage/storage_backend_scsi.c -src/storage/storage_backend_sheepdog.c -src/storage/storage_backend_vstorage.c -src/storage/storage_backend_zfs.c -src/storage/storage_driver.c -src/storage/storage_util.c -src/test/test_driver.c -src/util/iohelper.c -src/util/viralloc.c -src/util/virarptable.c -src/util/viraudit.c -src/util/virauth.c -src/util/virauthconfig.c -src/util/virbitmap.c -src/util/virbuffer.c -src/util/vircgroup.c -src/util/virclosecallbacks.c -src/util/vircommand.c -src/util/virconf.c -src/util/vircrypto.c -src/util/virdbus.c -src/util/virdnsmasq.c -src/util/virerror.c -src/util/virerror.h -src/util/vireventpoll.c -src/util/virfcp.c -src/util/virfdstream.c -src/util/virfile.c -src/util/virfilecache.c -src/util/virfirewall.c -src/util/virfirmware.c -src/util/virhash.c -src/util/virhook.c -src/util/virhostcpu.c -src/util/virhostdev.c -src/util/virhostmem.c -src/util/viridentity.c -src/util/virinitctl.c -src/util/viriptables.c -src/util/viriscsi.c -src/util/virjson.c -src/util/virkeyfile.c -src/util/virlease.c -src/util/virlockspace.c -src/util/virlog.c -src/util/virmacmap.c -src/util/virmdev.c -src/util/virnetdev.c -src/util/virnetdevbandwidth.c -src/util/virnetdevbridge.c -src/util/virnetdevip.c -src/util/virnetdevmacvlan.c -src/util/virnetdevmidonet.c -src/util/virnetdevopenvswitch.c -src/util/virnetdevtap.c -src/util/virnetdevveth.c -src/util/virnetdevvportprofile.c -src/util/virnetlink.c -src/util/virnodesuspend.c -src/util/virnuma.c -src/util/virobject.c -src/util/virpci.c -src/util/virperf.c -src/util/virpidfile.c -src/util/virpolkit.c -src/util/virportallocator.c -src/util/virprocess.c -src/util/virqemu.c -src/util/virrandom.c -src/util/virresctrl.c -src/util/virrotatingfile.c -src/util/virscsi.c -src/util/virscsihost.c -src/util/virscsivhost.c -src/util/virsecret.c -src/util/virsocketaddr.c -src/util/virstorageencryption.c -src/util/virstoragefile.c -src/util/virstoragefilebackend.c -src/util/virstring.c -src/util/virsysinfo.c -src/util/virthreadjob.c -src/util/virthreadpool.c -src/util/virtime.c -src/util/virtpm.c -src/util/virtypedparam.c -src/util/viruri.c -src/util/virusb.c -src/util/virutil.c -src/util/virvhba.c -src/util/virxml.c -src/vbox/vbox_MSCOMGlue.c -src/vbox/vbox_XPCOMCGlue.c -src/vbox/vbox_common.c -src/vbox/vbox_driver.c -src/vbox/vbox_network.c -src/vbox/vbox_snapshot_conf.c -src/vbox/vbox_storage.c -src/vbox/vbox_tmpl.c -src/vmware/vmware_conf.c -src/vmware/vmware_driver.c -src/vmx/vmx.c -src/vz/vz_driver.c -src/vz/vz_sdk.c -src/vz/vz_utils.c -src/vz/vz_utils.h -tests/virpolkittest.c -tools/libvirt-guests.sh.in -tools/virsh-checkpoint.c -tools/virsh-console.c -tools/virsh-domain-monitor.c -tools/virsh-domain.c -tools/virsh-edit.c -tools/virsh-host.c -tools/virsh-interface.c -tools/virsh-network.c -tools/virsh-nodedev.c -tools/virsh-nwfilter.c -tools/virsh-pool.c -tools/virsh-secret.c -tools/virsh-snapshot.c -tools/virsh-util.c -tools/virsh-volume.c -tools/virsh.c -tools/virt-admin.c -tools/virt-host-validate-bhyve.c -tools/virt-host-validate-common.c -tools/virt-host-validate-lxc.c -tools/virt-host-validate-qemu.c -tools/virt-host-validate.c -tools/virt-login-shell.c -tools/vsh.c -tools/vsh.h diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000000..8d423566a7 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,320 @@ +@SRCDIR@/gnulib/lib/gai_strerror.c +@SRCDIR@/gnulib/lib/regcomp.c +@SRCDIR@/src/access/viraccessdriverpolkit.c +@SRCDIR@/src/access/viraccessmanager.c +@SRCDIR@/src/admin/admin_server.c +@SRCDIR@/src/admin/admin_server_dispatch.c +@SRCDIR@/src/admin/admin_server_dispatch_stubs.h +@SRCDIR@/src/admin/libvirt-admin.c +@SRCDIR@/src/bhyve/bhyve_capabilities.c +@SRCDIR@/src/bhyve/bhyve_command.c +@SRCDIR@/src/bhyve/bhyve_device.c +@SRCDIR@/src/bhyve/bhyve_domain.c +@SRCDIR@/src/bhyve/bhyve_driver.c +@SRCDIR@/src/bhyve/bhyve_monitor.c +@SRCDIR@/src/bhyve/bhyve_parse_command.c +@SRCDIR@/src/bhyve/bhyve_process.c +@SRCDIR@/src/conf/capabilities.c +@SRCDIR@/src/conf/checkpoint_conf.c +@SRCDIR@/src/conf/cpu_conf.c +@SRCDIR@/src/conf/device_conf.c +@SRCDIR@/src/conf/domain_addr.c +@SRCDIR@/src/conf/domain_capabilities.c +@SRCDIR@/src/conf/domain_conf.c +@SRCDIR@/src/conf/domain_event.c +@SRCDIR@/src/conf/interface_conf.c +@SRCDIR@/src/conf/netdev_bandwidth_conf.c +@SRCDIR@/src/conf/netdev_vlan_conf.c +@SRCDIR@/src/conf/netdev_vport_profile_conf.c +@SRCDIR@/src/conf/network_conf.c +@SRCDIR@/src/conf/networkcommon_conf.c +@SRCDIR@/src/conf/node_device_conf.c +@SRCDIR@/src/conf/numa_conf.c +@SRCDIR@/src/conf/nwfilter_conf.c +@SRCDIR@/src/conf/nwfilter_params.c +@SRCDIR@/src/conf/object_event.c +@SRCDIR@/src/conf/secret_conf.c +@SRCDIR@/src/conf/snapshot_conf.c +@SRCDIR@/src/conf/storage_adapter_conf.c +@SRCDIR@/src/conf/storage_conf.c +@SRCDIR@/src/conf/virchrdev.c +@SRCDIR@/src/conf/virdomainobjlist.c +@SRCDIR@/src/conf/virnetworkobj.c +@SRCDIR@/src/conf/virnodedeviceobj.c +@SRCDIR@/src/conf/virnwfilterobj.c +@SRCDIR@/src/conf/virsavecookie.c +@SRCDIR@/src/conf/virsecretobj.c +@SRCDIR@/src/conf/virstorageobj.c +@SRCDIR@/src/cpu/cpu.c +@SRCDIR@/src/cpu/cpu_arm.c +@SRCDIR@/src/cpu/cpu_map.c +@SRCDIR@/src/cpu/cpu_ppc64.c +@SRCDIR@/src/cpu/cpu_s390.c +@SRCDIR@/src/cpu/cpu_x86.c +@SRCDIR@/src/datatypes.c +@SRCDIR@/src/driver.c +@SRCDIR@/src/esx/esx_driver.c +@SRCDIR@/src/esx/esx_network_driver.c +@SRCDIR@/src/esx/esx_storage_backend_iscsi.c +@SRCDIR@/src/esx/esx_storage_backend_vmfs.c +@SRCDIR@/src/esx/esx_storage_driver.c +@SRCDIR@/src/esx/esx_stream.c +@SRCDIR@/src/esx/esx_util.c +@SRCDIR@/src/esx/esx_vi.c +@SRCDIR@/src/esx/esx_vi_methods.c +@SRCDIR@/src/esx/esx_vi_types.c +@SRCDIR@/src/hyperv/hyperv_driver.c +@SRCDIR@/src/hyperv/hyperv_util.c +@SRCDIR@/src/hyperv/hyperv_wmi.c +@SRCDIR@/src/interface/interface_backend_netcf.c +@SRCDIR@/src/interface/interface_backend_udev.c +@SRCDIR@/src/internal.h +@SRCDIR@/src/libvirt-domain-checkpoint.c +@SRCDIR@/src/libvirt-domain-snapshot.c +@SRCDIR@/src/libvirt-domain.c +@SRCDIR@/src/libvirt-host.c +@SRCDIR@/src/libvirt-lxc.c +@SRCDIR@/src/libvirt-network.c +@SRCDIR@/src/libvirt-nodedev.c +@SRCDIR@/src/libvirt-nwfilter.c +@SRCDIR@/src/libvirt-qemu.c +@SRCDIR@/src/libvirt-secret.c +@SRCDIR@/src/libvirt-storage.c +@SRCDIR@/src/libvirt-stream.c +@SRCDIR@/src/libvirt.c +@SRCDIR@/src/libxl/libxl_capabilities.c +@SRCDIR@/src/libxl/libxl_conf.c +@SRCDIR@/src/libxl/libxl_domain.c +@SRCDIR@/src/libxl/libxl_driver.c +@SRCDIR@/src/libxl/libxl_migration.c +@SRCDIR@/src/libxl/xen_common.c +@SRCDIR@/src/libxl/xen_xl.c +@SRCDIR@/src/libxl/xen_xm.c +@SRCDIR@/src/locking/lock_daemon.c +@SRCDIR@/src/locking/lock_daemon_dispatch.c +@SRCDIR@/src/locking/lock_driver_lockd.c +@SRCDIR@/src/locking/lock_driver_sanlock.c +@SRCDIR@/src/locking/lock_manager.c +@SRCDIR@/src/locking/sanlock_helper.c +@SRCDIR@/src/logging/log_daemon.c +@SRCDIR@/src/logging/log_daemon_dispatch.c +@SRCDIR@/src/logging/log_handler.c +@SRCDIR@/src/logging/log_manager.c +@SRCDIR@/src/lxc/lxc_cgroup.c +@SRCDIR@/src/lxc/lxc_conf.c +@SRCDIR@/src/lxc/lxc_container.c +@SRCDIR@/src/lxc/lxc_controller.c +@SRCDIR@/src/lxc/lxc_domain.c +@SRCDIR@/src/lxc/lxc_driver.c +@SRCDIR@/src/lxc/lxc_fuse.c +@SRCDIR@/src/lxc/lxc_hostdev.c +@SRCDIR@/src/lxc/lxc_native.c +@SRCDIR@/src/lxc/lxc_process.c +@SRCDIR@/src/network/bridge_driver.c +@SRCDIR@/src/network/bridge_driver_linux.c +@SRCDIR@/src/network/leaseshelper.c +@SRCDIR@/src/node_device/node_device_driver.c +@SRCDIR@/src/node_device/node_device_hal.c +@SRCDIR@/src/node_device/node_device_udev.c +@SRCDIR@/src/nwfilter/nwfilter_dhcpsnoop.c +@SRCDIR@/src/nwfilter/nwfilter_driver.c +@SRCDIR@/src/nwfilter/nwfilter_ebiptables_driver.c +@SRCDIR@/src/nwfilter/nwfilter_gentech_driver.c +@SRCDIR@/src/nwfilter/nwfilter_learnipaddr.c +@SRCDIR@/src/openvz/openvz_conf.c +@SRCDIR@/src/openvz/openvz_driver.c +@SRCDIR@/src/openvz/openvz_util.c +@SRCDIR@/src/phyp/phyp_driver.c +@SRCDIR@/src/qemu/qemu_agent.c +@SRCDIR@/src/qemu/qemu_alias.c +@SRCDIR@/src/qemu/qemu_block.c +@SRCDIR@/src/qemu/qemu_capabilities.c +@SRCDIR@/src/qemu/qemu_cgroup.c +@SRCDIR@/src/qemu/qemu_command.c +@SRCDIR@/src/qemu/qemu_conf.c +@SRCDIR@/src/qemu/qemu_domain.c +@SRCDIR@/src/qemu/qemu_domain_address.c +@SRCDIR@/src/qemu/qemu_driver.c +@SRCDIR@/src/qemu/qemu_hostdev.c +@SRCDIR@/src/qemu/qemu_hotplug.c +@SRCDIR@/src/qemu/qemu_interface.c +@SRCDIR@/src/qemu/qemu_migration.c +@SRCDIR@/src/qemu/qemu_migration_cookie.c +@SRCDIR@/src/qemu/qemu_migration_params.c +@SRCDIR@/src/qemu/qemu_monitor.c +@SRCDIR@/src/qemu/qemu_monitor_json.c +@SRCDIR@/src/qemu/qemu_monitor_text.c +@SRCDIR@/src/qemu/qemu_process.c +@SRCDIR@/src/qemu/qemu_qapi.c +@SRCDIR@/src/remote/qemu_daemon_dispatch_stubs.h +@SRCDIR@/src/remote/remote_client_bodies.h +@SRCDIR@/src/remote/remote_daemon.c +@SRCDIR@/src/remote/remote_daemon_config.c +@SRCDIR@/src/remote/remote_daemon_dispatch.c +@SRCDIR@/src/remote/remote_daemon_dispatch_stubs.h +@SRCDIR@/src/remote/remote_daemon_stream.c +@SRCDIR@/src/remote/remote_driver.c +@SRCDIR@/src/rpc/virkeepalive.c +@SRCDIR@/src/rpc/virnetclient.c +@SRCDIR@/src/rpc/virnetclientprogram.c +@SRCDIR@/src/rpc/virnetclientstream.c +@SRCDIR@/src/rpc/virnetdaemon.c +@SRCDIR@/src/rpc/virnetlibsshsession.c +@SRCDIR@/src/rpc/virnetmessage.c +@SRCDIR@/src/rpc/virnetsaslcontext.c +@SRCDIR@/src/rpc/virnetserver.c +@SRCDIR@/src/rpc/virnetserverclient.c +@SRCDIR@/src/rpc/virnetserverprogram.c +@SRCDIR@/src/rpc/virnetserverservice.c +@SRCDIR@/src/rpc/virnetsocket.c +@SRCDIR@/src/rpc/virnetsshsession.c +@SRCDIR@/src/rpc/virnettlscontext.c +@SRCDIR@/src/secret/secret_driver.c +@SRCDIR@/src/security/security_apparmor.c +@SRCDIR@/src/security/security_dac.c +@SRCDIR@/src/security/security_driver.c +@SRCDIR@/src/security/security_manager.c +@SRCDIR@/src/security/security_selinux.c +@SRCDIR@/src/security/virt-aa-helper.c +@SRCDIR@/src/storage/parthelper.c +@SRCDIR@/src/storage/storage_backend.c +@SRCDIR@/src/storage/storage_backend_disk.c +@SRCDIR@/src/storage/storage_backend_fs.c +@SRCDIR@/src/storage/storage_backend_gluster.c +@SRCDIR@/src/storage/storage_backend_iscsi.c +@SRCDIR@/src/storage/storage_backend_logical.c +@SRCDIR@/src/storage/storage_backend_mpath.c +@SRCDIR@/src/storage/storage_backend_rbd.c +@SRCDIR@/src/storage/storage_backend_scsi.c +@SRCDIR@/src/storage/storage_backend_sheepdog.c +@SRCDIR@/src/storage/storage_backend_vstorage.c +@SRCDIR@/src/storage/storage_backend_zfs.c +@SRCDIR@/src/storage/storage_driver.c +@SRCDIR@/src/storage/storage_util.c +@SRCDIR@/src/test/test_driver.c +@SRCDIR@/src/util/iohelper.c +@SRCDIR@/src/util/viralloc.c +@SRCDIR@/src/util/virarptable.c +@SRCDIR@/src/util/viraudit.c +@SRCDIR@/src/util/virauth.c +@SRCDIR@/src/util/virauthconfig.c +@SRCDIR@/src/util/virbitmap.c +@SRCDIR@/src/util/virbuffer.c +@SRCDIR@/src/util/vircgroup.c +@SRCDIR@/src/util/virclosecallbacks.c +@SRCDIR@/src/util/vircommand.c +@SRCDIR@/src/util/virconf.c +@SRCDIR@/src/util/vircrypto.c +@SRCDIR@/src/util/virdbus.c +@SRCDIR@/src/util/virdnsmasq.c +@SRCDIR@/src/util/virerror.c +@SRCDIR@/src/util/virerror.h +@SRCDIR@/src/util/vireventpoll.c +@SRCDIR@/src/util/virfcp.c +@SRCDIR@/src/util/virfdstream.c +@SRCDIR@/src/util/virfile.c +@SRCDIR@/src/util/virfilecache.c +@SRCDIR@/src/util/virfirewall.c +@SRCDIR@/src/util/virfirmware.c +@SRCDIR@/src/util/virhash.c +@SRCDIR@/src/util/virhook.c +@SRCDIR@/src/util/virhostcpu.c +@SRCDIR@/src/util/virhostdev.c +@SRCDIR@/src/util/virhostmem.c +@SRCDIR@/src/util/viridentity.c +@SRCDIR@/src/util/virinitctl.c +@SRCDIR@/src/util/viriptables.c +@SRCDIR@/src/util/viriscsi.c +@SRCDIR@/src/util/virjson.c +@SRCDIR@/src/util/virkeyfile.c +@SRCDIR@/src/util/virlease.c +@SRCDIR@/src/util/virlockspace.c +@SRCDIR@/src/util/virlog.c +@SRCDIR@/src/util/virmacmap.c +@SRCDIR@/src/util/virmdev.c +@SRCDIR@/src/util/virnetdev.c +@SRCDIR@/src/util/virnetdevbandwidth.c +@SRCDIR@/src/util/virnetdevbridge.c +@SRCDIR@/src/util/virnetdevip.c +@SRCDIR@/src/util/virnetdevmacvlan.c +@SRCDIR@/src/util/virnetdevmidonet.c +@SRCDIR@/src/util/virnetdevopenvswitch.c +@SRCDIR@/src/util/virnetdevtap.c +@SRCDIR@/src/util/virnetdevveth.c +@SRCDIR@/src/util/virnetdevvportprofile.c +@SRCDIR@/src/util/virnetlink.c +@SRCDIR@/src/util/virnodesuspend.c +@SRCDIR@/src/util/virnuma.c +@SRCDIR@/src/util/virobject.c +@SRCDIR@/src/util/virpci.c +@SRCDIR@/src/util/virperf.c +@SRCDIR@/src/util/virpidfile.c +@SRCDIR@/src/util/virpolkit.c +@SRCDIR@/src/util/virportallocator.c +@SRCDIR@/src/util/virprocess.c +@SRCDIR@/src/util/virqemu.c +@SRCDIR@/src/util/virrandom.c +@SRCDIR@/src/util/virresctrl.c +@SRCDIR@/src/util/virrotatingfile.c +@SRCDIR@/src/util/virscsi.c +@SRCDIR@/src/util/virscsihost.c +@SRCDIR@/src/util/virscsivhost.c +@SRCDIR@/src/util/virsecret.c +@SRCDIR@/src/util/virsocketaddr.c +@SRCDIR@/src/util/virstorageencryption.c +@SRCDIR@/src/util/virstoragefile.c +@SRCDIR@/src/util/virstoragefilebackend.c +@SRCDIR@/src/util/virstring.c +@SRCDIR@/src/util/virsysinfo.c +@SRCDIR@/src/util/virthreadjob.c +@SRCDIR@/src/util/virthreadpool.c +@SRCDIR@/src/util/virtime.c +@SRCDIR@/src/util/virtpm.c +@SRCDIR@/src/util/virtypedparam.c +@SRCDIR@/src/util/viruri.c +@SRCDIR@/src/util/virusb.c +@SRCDIR@/src/util/virutil.c +@SRCDIR@/src/util/virvhba.c +@SRCDIR@/src/util/virxml.c +@SRCDIR@/src/vbox/vbox_MSCOMGlue.c +@SRCDIR@/src/vbox/vbox_XPCOMCGlue.c +@SRCDIR@/src/vbox/vbox_common.c +@SRCDIR@/src/vbox/vbox_driver.c +@SRCDIR@/src/vbox/vbox_network.c +@SRCDIR@/src/vbox/vbox_snapshot_conf.c +@SRCDIR@/src/vbox/vbox_storage.c +@SRCDIR@/src/vbox/vbox_tmpl.c +@SRCDIR@/src/vmware/vmware_conf.c +@SRCDIR@/src/vmware/vmware_driver.c +@SRCDIR@/src/vmx/vmx.c +@SRCDIR@/src/vz/vz_driver.c +@SRCDIR@/src/vz/vz_sdk.c +@SRCDIR@/src/vz/vz_utils.c +@SRCDIR@/src/vz/vz_utils.h +@SRCDIR@/tests/virpolkittest.c +@SRCDIR@/tools/libvirt-guests.sh.in +@SRCDIR@/tools/virsh-checkpoint.c +@SRCDIR@/tools/virsh-console.c +@SRCDIR@/tools/virsh-domain-monitor.c +@SRCDIR@/tools/virsh-domain.c +@SRCDIR@/tools/virsh-edit.c +@SRCDIR@/tools/virsh-host.c +@SRCDIR@/tools/virsh-interface.c +@SRCDIR@/tools/virsh-network.c +@SRCDIR@/tools/virsh-nodedev.c +@SRCDIR@/tools/virsh-nwfilter.c +@SRCDIR@/tools/virsh-pool.c +@SRCDIR@/tools/virsh-secret.c +@SRCDIR@/tools/virsh-snapshot.c +@SRCDIR@/tools/virsh-util.c +@SRCDIR@/tools/virsh-volume.c +@SRCDIR@/tools/virsh.c +@SRCDIR@/tools/virt-admin.c +@SRCDIR@/tools/virt-host-validate-bhyve.c +@SRCDIR@/tools/virt-host-validate-common.c +@SRCDIR@/tools/virt-host-validate-lxc.c +@SRCDIR@/tools/virt-host-validate-qemu.c +@SRCDIR@/tools/virt-host-validate.c +@SRCDIR@/tools/virt-login-shell.c +@SRCDIR@/tools/vsh.c +@SRCDIR@/tools/vsh.h -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:38AM +0200, Pavel Hrdina wrote:
There was no need to handle files for translation from build directory but that will change with following patches where we will stop generating source files into source directory.
In order to have them included for translation we have to prefix each file with SRCDIR or BUILDDIR.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- po/Makefile.am | 14 ++- po/POTFILES | 320 ------------------------------------------------- po/POTFILES.in | 320 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 329 insertions(+), 325 deletions(-) delete mode 100644 po/POTFILES create mode 100644 po/POTFILES.in
diff --git a/po/Makefile.am b/po/Makefile.am index 8ddb1432f0..82798eeb03 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -15,16 +15,21 @@ LANGS := \ uk ur vi wba yo zh_CN zh_HK zh_TW zu
-POTFILE_DEPS := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES) +POTFILES_IN = $(srcdir)/POTFILES.in +POTFILES: $(POTFILES_IN) + $(AM_V_GEN) cat $(POTFILES_IN) | \ + $(SED) 's|@SRCDIR@|$(top_srcdir)|' | \ + $(SED) 's|@BUILDDIR@|$(top_builddir)|' > $@
syntax-check forbids the use of @VAR@ in Makefiles, most of the sed commands use [@] to work around it. Jano
+POTFILE_DEPS = $(shell cat POTFILES) POTFILE := $(DOMAIN).pot POMINIFILES := $(LANGS:%=%.mini.po) POFILES := $(LANGS:%=%.po) GMOFILES := $(LANGS:%=%.gmo)

This affects more than src/Makefile.am as the rule to generate source files for protocols is generic for all sub-directories. Affected files are: src/admin/admin_protocol.{h,c} src/locking/lock_protocol.{h,c} src/logging/log_protocol.{h,c} src/lxc/lxc_monitor_protocol.{h,c} src/remote/{lxc,qemu,remote}_protocol.{h,c} src/rpc/{virkeepalive,virnet}protocol.{h,c} Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/Makefile.am | 4 ++-- src/admin/Makefile.inc.am | 3 +++ src/locking/Makefile.inc.am | 6 ++++++ src/logging/Makefile.inc.am | 4 ++++ src/lxc/Makefile.inc.am | 4 ++++ src/remote/Makefile.inc.am | 4 ++++ src/rpc/Makefile.inc.am | 3 +++ tests/Makefile.am | 1 + 8 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 34dfeeb9f9..435812e733 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -392,11 +392,11 @@ GENERATED_SYM_FILES += \ %protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \ - $< $(srcdir)/$(subst $(srcdir)/,,$@) + $< $(subst $(srcdir)/,,$@) %protocol.h: %protocol.x $(srcdir)/rpc/genprotocol.pl $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \ - $< $(srcdir)/$(subst $(srcdir)/,,$@) + $< $(subst $(srcdir)/,,$@) check-local: check-augeas diff --git a/src/admin/Makefile.inc.am b/src/admin/Makefile.inc.am index 4fd7878e5c..bea0967aaf 100644 --- a/src/admin/Makefile.inc.am +++ b/src/admin/Makefile.inc.am @@ -30,6 +30,7 @@ libvirt_driver_admin_la_CFLAGS = \ $(XDR_CFLAGS) \ -I$(top_srcdir)/src/util \ -I$(top_srcdir)/src/admin \ + -I$(top_builddir)/src/rpc \ $(NULL) libvirt_driver_admin_la_LIBADD = ../gnulib/lib/libgnu.la libvirt_driver_admin_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS) @@ -87,8 +88,10 @@ endif WITH_DTRACE_PROBES libvirt_admin_la_CFLAGS = \ $(AM_CFLAGS) \ + -I$(builddir)/admin \ -I$(srcdir)/remote \ -I$(srcdir)/rpc \ + -I$(builddir)/rpc \ $(XDR_CFLAGS) \ $(CAPNG_CFLAGS) \ $(YAJL_CFLAGS) \ diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am index 2b1c030041..ba7a9ea2ea 100644 --- a/src/locking/Makefile.inc.am +++ b/src/locking/Makefile.inc.am @@ -109,6 +109,9 @@ lockd_la_SOURCES = \ $(NULL) lockd_la_CFLAGS = \ -I$(srcdir)/conf \ + -I$(srcdir)/locking \ + -I$(builddir)/locking \ + -I$(builddir)/rpc \ $(XDR_CFLAGS) \ $(AM_CFLAGS) \ $(NULL) @@ -146,6 +149,9 @@ virtlockd_SOURCES = \ $(LOCK_DAEMON_GENERATED) \ $(NULL) virtlockd_CFLAGS = \ + -I$(srcdir)/locking \ + -I$(builddir)/locking \ + -I$(builddir)/rpc \ $(AM_CFLAGS) \ $(PIE_CFLAGS) \ $(XDR_CFLAGS) \ diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am index 7d10b646ea..bb7ea7338d 100644 --- a/src/logging/Makefile.inc.am +++ b/src/logging/Makefile.inc.am @@ -67,6 +67,8 @@ libvirt_driver_log_la_SOURCES = \ $(LOG_DRIVER_SOURCES) \ $(NULL) libvirt_driver_log_la_CFLAGS = \ + -I$(builddir)/logging \ + -I$(builddir)/rpc \ $(AM_CFLAGS) \ $(XDR_CFLAGS) \ $(NULL) @@ -82,6 +84,8 @@ virtlogd_SOURCES = \ $(LOG_DAEMON_GENERATED) \ $(NULL) virtlogd_CFLAGS = \ + -I$(builddir)/logging \ + -I$(builddir)/rpc \ $(AM_CFLAGS) \ $(PIE_CFLAGS) \ $(XDR_CFLAGS) \ diff --git a/src/lxc/Makefile.inc.am b/src/lxc/Makefile.inc.am index b6db70af7d..78f14bf37a 100644 --- a/src/lxc/Makefile.inc.am +++ b/src/lxc/Makefile.inc.am @@ -95,6 +95,8 @@ libvirt_driver_lxc_impl_la_CFLAGS = \ $(XDR_CFLAGS) \ -I$(srcdir)/access \ -I$(srcdir)/conf \ + -I$(builddir)/lxc \ + -I$(builddir)/rpc \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_lxc_impl_la_LIBADD = \ @@ -199,6 +201,8 @@ endif WITH_DTRACE_PROBES libvirt_lxc_LDADD += $(SECDRIVER_LIBS) libvirt_lxc_CFLAGS = \ -I$(srcdir)/conf \ + -I$(builddir)/lxc \ + -I$(builddir)/rpc \ $(AM_CFLAGS) \ $(PIE_CFLAGS) \ $(CAPNG_CFLAGS) \ diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 5c5f5f4d2c..6b0ae586d1 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -50,6 +50,8 @@ REMOTE_DAEMON_CFLAGS = \ -I$(srcdir)/access \ -I$(srcdir)/conf \ -I$(srcdir)/rpc \ + -I$(builddir)/rpc \ + -I$(builddir)/remote \ $(NULL) REMOTE_DAEMON_LD_FLAGS = \ @@ -174,6 +176,8 @@ libvirt_driver_remote_la_CFLAGS = \ $(XDR_CFLAGS) \ -I$(srcdir)/conf \ -I$(srcdir)/rpc \ + -I$(builddir)/rpc \ + -I$(builddir)/remote \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_remote_la_LDFLAGS = $(AM_LDFLAGS) diff --git a/src/rpc/Makefile.inc.am b/src/rpc/Makefile.inc.am index b8ca53c69a..4aa38db1ab 100644 --- a/src/rpc/Makefile.inc.am +++ b/src/rpc/Makefile.inc.am @@ -79,6 +79,7 @@ EXTRA_DIST += \ endif ! WITH_LIBSSH libvirt_net_rpc_la_CFLAGS = \ + -I$(builddir)/rpc \ $(GNUTLS_CFLAGS) \ $(SASL_CFLAGS) \ $(SSH2_CFLAGS) \ @@ -109,6 +110,7 @@ libvirt_net_rpc_server_la_SOURCES = \ rpc/virnetserver.c \ $(NULL) libvirt_net_rpc_server_la_CFLAGS = \ + -I$(builddir)/rpc \ $(DBUS_CFLAGS) \ $(XDR_CFLAGS) \ $(SASL_CFLAGS) \ @@ -129,6 +131,7 @@ libvirt_net_rpc_client_la_SOURCES = \ rpc/virnetclient.c \ $(NULL) libvirt_net_rpc_client_la_CFLAGS = \ + -I$(builddir)/rpc \ $(AM_CFLAGS) \ $(XDR_CFLAGS) \ $(NULL) diff --git a/tests/Makefile.am b/tests/Makefile.am index a9acd88670..9ae456c268 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -25,6 +25,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_srcdir)/src/util \ -I$(top_srcdir)/src/conf \ + -I$(top_builddir)/src/rpc \ $(NULL) WARN_CFLAGS += $(RELAXED_FRAME_LIMIT_CFLAGS) -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:39AM +0200, Pavel Hrdina wrote:
This affects more than src/Makefile.am as the rule to generate source files for protocols is generic for all sub-directories.
Affected files are: src/admin/admin_protocol.{h,c} src/locking/lock_protocol.{h,c} src/logging/log_protocol.{h,c} src/lxc/lxc_monitor_protocol.{h,c} src/remote/{lxc,qemu,remote}_protocol.{h,c} src/rpc/{virkeepalive,virnet}protocol.{h,c}
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/Makefile.am | 4 ++-- src/admin/Makefile.inc.am | 3 +++ src/locking/Makefile.inc.am | 6 ++++++ src/logging/Makefile.inc.am | 4 ++++ src/lxc/Makefile.inc.am | 4 ++++ src/remote/Makefile.inc.am | 4 ++++ src/rpc/Makefile.inc.am | 3 +++ tests/Makefile.am | 1 + 8 files changed, 27 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/access/Makefile.inc.am | 14 +++++++------- src/admin/Makefile.inc.am | 1 + src/interface/Makefile.inc.am | 1 + src/libxl/Makefile.inc.am | 1 + src/lxc/Makefile.inc.am | 1 + src/network/Makefile.inc.am | 1 + src/node_device/Makefile.inc.am | 1 + src/nwfilter/Makefile.inc.am | 1 + src/qemu/Makefile.inc.am | 1 + src/remote/Makefile.inc.am | 1 + src/secret/Makefile.inc.am | 1 + src/storage/Makefile.inc.am | 1 + 12 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/access/Makefile.inc.am b/src/access/Makefile.inc.am index ea27adbe0b..2d871ec8aa 100644 --- a/src/access/Makefile.inc.am +++ b/src/access/Makefile.inc.am @@ -38,7 +38,7 @@ ACCESS_DRIVER_POLKIT_SOURCES = \ access/viraccessdriverpolkit.c \ $(NULL) -ACCESS_DRIVER_POLKIT_POLICY = $(srcdir)/access/org.libvirt.api.policy +ACCESS_DRIVER_POLKIT_POLICY = access/org.libvirt.api.policy GENERATED_SYM_FILES += $(ACCESS_DRIVER_SYM_FILES) @@ -122,31 +122,31 @@ access/viraccessapicheck.h: $(srcdir)/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclheader \ remote REMOTE $(REMOTE_PROTOCOL) \ - > $(srcdir)/access/viraccessapicheck.h + > access/viraccessapicheck.h access/viraccessapicheck.c: $(srcdir)/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclbody \ remote REMOTE $(REMOTE_PROTOCOL) access/viraccessapicheck.h \ - > $(srcdir)/access/viraccessapicheck.c + > access/viraccessapicheck.c access/viraccessapicheckqemu.h: $(srcdir)/rpc/gendispatch.pl \ $(QEMU_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclheader \ qemu QEMU $(QEMU_PROTOCOL) \ - > $(srcdir)/access/viraccessapicheckqemu.h + > access/viraccessapicheckqemu.h access/viraccessapicheckqemu.c: $(srcdir)/rpc/gendispatch.pl \ $(QEMU_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclbody \ qemu QEMU $(QEMU_PROTOCOL) access/viraccessapicheckqemu.h \ - > $(srcdir)/access/viraccessapicheckqemu.c + > access/viraccessapicheckqemu.c access/viraccessapichecklxc.h: $(srcdir)/rpc/gendispatch.pl \ $(LXC_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclheader \ lxc LXC $(LXC_PROTOCOL) \ - > $(srcdir)/access/viraccessapichecklxc.h + > access/viraccessapichecklxc.h access/viraccessapichecklxc.c: $(srcdir)/rpc/gendispatch.pl \ $(LXC_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclbody \ lxc LXC $(LXC_PROTOCOL) access/viraccessapichecklxc.h \ - > $(srcdir)/access/viraccessapichecklxc.c + > access/viraccessapichecklxc.c diff --git a/src/admin/Makefile.inc.am b/src/admin/Makefile.inc.am index bea0967aaf..94cbed9972 100644 --- a/src/admin/Makefile.inc.am +++ b/src/admin/Makefile.inc.am @@ -89,6 +89,7 @@ endif WITH_DTRACE_PROBES libvirt_admin_la_CFLAGS = \ $(AM_CFLAGS) \ -I$(builddir)/admin \ + -I$(builddir)/access \ -I$(srcdir)/remote \ -I$(srcdir)/rpc \ -I$(builddir)/rpc \ diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am index 780b2277ba..30ea98ad15 100644 --- a/src/interface/Makefile.inc.am +++ b/src/interface/Makefile.inc.am @@ -21,6 +21,7 @@ if WITH_INTERFACE mod_LTLIBRARIES += libvirt_driver_interface.la libvirt_driver_interface_la_CFLAGS = \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ $(AM_CFLAGS) \ $(LIBNL_CFLAGS) \ diff --git a/src/libxl/Makefile.inc.am b/src/libxl/Makefile.inc.am index ef8e9613f5..5d9cf14f7f 100644 --- a/src/libxl/Makefile.inc.am +++ b/src/libxl/Makefile.inc.am @@ -44,6 +44,7 @@ libvirt_driver_libxl_impl_la_CFLAGS = \ $(LIBXL_CFLAGS) \ $(LIBXML_CFLAGS) \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ -I$(srcdir)/secret \ $(AM_CFLAGS) \ diff --git a/src/lxc/Makefile.inc.am b/src/lxc/Makefile.inc.am index 78f14bf37a..f22a53e58d 100644 --- a/src/lxc/Makefile.inc.am +++ b/src/lxc/Makefile.inc.am @@ -94,6 +94,7 @@ libvirt_driver_lxc_impl_la_CFLAGS = \ $(FUSE_CFLAGS) \ $(XDR_CFLAGS) \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ -I$(builddir)/lxc \ -I$(builddir)/rpc \ diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am index b58b5ea645..2f7932ae60 100644 --- a/src/network/Makefile.inc.am +++ b/src/network/Makefile.inc.am @@ -44,6 +44,7 @@ libvirt_driver_network_impl_la_CFLAGS = \ $(LIBNL_CFLAGS) \ $(DBUS_CFLAGS) \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ $(AM_CFLAGS) \ $(NULL) diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc.am index 9b58636a0c..1dfa0a5274 100644 --- a/src/node_device/Makefile.inc.am +++ b/src/node_device/Makefile.inc.am @@ -39,6 +39,7 @@ libvirt_driver_nodedev_la_SOURCES = $(NODE_DEVICE_DRIVER_SOURCES) libvirt_driver_nodedev_la_CFLAGS = \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ $(AM_CFLAGS) \ $(LIBNL_CFLAGS) \ diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am index e24e8aa2a0..ca05cba934 100644 --- a/src/nwfilter/Makefile.inc.am +++ b/src/nwfilter/Makefile.inc.am @@ -37,6 +37,7 @@ libvirt_driver_nwfilter_impl_la_CFLAGS = \ $(LIBNL_CFLAGS) \ $(DBUS_CFLAGS) \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ $(AM_CFLAGS) \ $(NULL) diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am index 2074a5f54f..69e290c428 100644 --- a/src/qemu/Makefile.inc.am +++ b/src/qemu/Makefile.inc.am @@ -95,6 +95,7 @@ libvirt_driver_qemu_impl_la_CFLAGS = \ $(SELINUX_CFLAGS) \ $(XDR_CFLAGS) \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ -I$(srcdir)/secret \ $(AM_CFLAGS) \ diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 6b0ae586d1..7361d02cf4 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -48,6 +48,7 @@ REMOTE_DAEMON_CFLAGS = \ $(PIE_CFLAGS) \ $(COVERAGE_CFLAGS) \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ -I$(srcdir)/rpc \ -I$(builddir)/rpc \ diff --git a/src/secret/Makefile.inc.am b/src/secret/Makefile.inc.am index fd7c90a137..94f293d418 100644 --- a/src/secret/Makefile.inc.am +++ b/src/secret/Makefile.inc.am @@ -28,6 +28,7 @@ if WITH_SECRETS mod_LTLIBRARIES += libvirt_driver_secret.la libvirt_driver_secret_la_CFLAGS = \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ $(AM_CFLAGS) \ $(NULL) diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am index 08a9f4e86c..ec35ab7665 100644 --- a/src/storage/Makefile.inc.am +++ b/src/storage/Makefile.inc.am @@ -119,6 +119,7 @@ storagefile_LTLIBRARIES = libvirt_driver_storage_impl_la_SOURCES = libvirt_driver_storage_impl_la_CFLAGS = \ -I$(srcdir)/access \ + -I$(builddir)/access \ -I$(srcdir)/conf \ -I$(srcdir)/secret \ $(AM_CFLAGS) \ -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:40AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/access/Makefile.inc.am | 14 +++++++------- src/admin/Makefile.inc.am | 1 + src/interface/Makefile.inc.am | 1 + src/libxl/Makefile.inc.am | 1 + src/lxc/Makefile.inc.am | 1 + src/network/Makefile.inc.am | 1 + src/node_device/Makefile.inc.am | 1 + src/nwfilter/Makefile.inc.am | 1 + src/qemu/Makefile.inc.am | 1 + src/remote/Makefile.inc.am | 1 + src/secret/Makefile.inc.am | 1 + src/storage/Makefile.inc.am | 1 + 12 files changed, 18 insertions(+), 7 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/admin/Makefile.inc.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/admin/Makefile.inc.am b/src/admin/Makefile.inc.am index 94cbed9972..448f7e1203 100644 --- a/src/admin/Makefile.inc.am +++ b/src/admin/Makefile.inc.am @@ -28,8 +28,9 @@ libvirt_driver_admin_la_SOURCES = \ libvirt_driver_admin_la_CFLAGS = \ $(AM_CFLAGS) \ $(XDR_CFLAGS) \ - -I$(top_srcdir)/src/util \ -I$(top_srcdir)/src/admin \ + -I$(top_builddir)/src/admin \ + -I$(top_srcdir)/src/util \ -I$(top_builddir)/src/rpc \ $(NULL) libvirt_driver_admin_la_LIBADD = ../gnulib/lib/libgnu.la @@ -123,13 +124,13 @@ admin/admin_client.h: $(srcdir)/rpc/gendispatch.pl \ $(ADMIN_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \ admin ADMIN $(ADMIN_PROTOCOL) \ - > $(srcdir)/admin/admin_client.h + > admin/admin_client.h admin/admin_server_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \ $(ADMIN_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=server \ admin ADMIN $(ADMIN_PROTOCOL) \ - > $(srcdir)/admin/admin_server_dispatch_stubs.h + > admin/admin_server_dispatch_stubs.h admin/libvirt_admin.syms: admin/libvirt_admin_public.syms $(ADMIN_SYM_FILES) \ $(top_builddir)/config.status -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:41AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/admin/Makefile.inc.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/esx/Makefile.inc.am | 5 +++-- src/esx/esx_vi_generator.py | 11 ++++------- tests/Makefile.am | 3 +++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/esx/Makefile.inc.am b/src/esx/Makefile.inc.am index 3dab05d71c..7ba9fd1758 100644 --- a/src/esx/Makefile.inc.am +++ b/src/esx/Makefile.inc.am @@ -63,8 +63,8 @@ $(ESX_DRIVER_GENERATED): $(ESX_GENERATED_STAMP) $(ESX_GENERATED_STAMP): $(srcdir)/esx/esx_vi_generator.input \ $(srcdir)/esx/esx_vi_generator.py - $(AM_V_GEN)srcdir=$(srcdir) $(RUNUTF8) $(PYTHON) \ - $(srcdir)/esx/esx_vi_generator.py && touch $@ + $(AM_V_GEN) $(RUNUTF8) $(PYTHON) \ + $(srcdir)/esx/esx_vi_generator.py $(srcdir) $(builddir) && touch $@ MAINTAINERCLEANFILES += $(ESX_DRIVER_GENERATED) $(ESX_GENERATED_STAMP) @@ -81,6 +81,7 @@ libvirt_la_BUILT_LIBADD += libvirt_driver_esx.la libvirt_driver_esx_la_CFLAGS = \ $(CURL_CFLAGS) \ -I$(srcdir)/conf \ + -I$(builddir)/esx \ -I$(srcdir)/vmx \ $(AM_CFLAGS) \ $(NULL) diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index 28d440a6df..c77de6e60c 100755 --- a/src/esx/esx_vi_generator.py +++ b/src/esx/esx_vi_generator.py @@ -1379,14 +1379,11 @@ additional_object_features = { removed_object_features = {} +if len(sys.argv) != 3: + report_error("usage: %s srcdir builddir" % sys.argv[0]) - -if "srcdir" in os.environ: - input_filename = os.path.join(os.environ["srcdir"], "esx/esx_vi_generator.input") - output_dirname = os.path.join(os.environ["srcdir"], "esx") -else: - input_filename = os.path.join(os.getcwd(), "esx_vi_generator.input") - output_dirname = os.getcwd() +input_filename = os.path.join(sys.argv[1], "esx/esx_vi_generator.input") +output_dirname = os.path.join(sys.argv[2], "esx") diff --git a/tests/Makefile.am b/tests/Makefile.am index 9ae456c268..d549e38e18 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -756,6 +756,9 @@ esxutilstest_SOURCES = \ esxutilstest.c \ testutils.c testutils.h esxutilstest_LDADD = $(LDADDS) +esxutilstest_CFLAGS = \ + -I$(top_builddir)/src/esx \ + $(AM_CFLAGS) else ! WITH_ESX EXTRA_DIST += esxutilstest.c endif ! WITH_ESX -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:42AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/esx/Makefile.inc.am | 5 +++-- src/esx/esx_vi_generator.py | 11 ++++------- tests/Makefile.am | 3 +++ 3 files changed, 10 insertions(+), 9 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/hyperv/Makefile.inc.am | 5 +++-- src/hyperv/hyperv_wmi_generator.py | 11 +++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hyperv/Makefile.inc.am b/src/hyperv/Makefile.inc.am index 6728b39c90..79e94d09bb 100644 --- a/src/hyperv/Makefile.inc.am +++ b/src/hyperv/Makefile.inc.am @@ -41,8 +41,8 @@ $(HYPERV_DRIVER_GENERATED): $(HYPERV_GENERATED_STAMP) $(HYPERV_GENERATED_STAMP): $(srcdir)/hyperv/hyperv_wmi_generator.input \ $(srcdir)/hyperv/hyperv_wmi_generator.py - $(AM_V_GEN)srcdir=$(srcdir) $(RUNUTF8) $(PYTHON) \ - $(srcdir)/hyperv/hyperv_wmi_generator.py \ + $(AM_V_GEN) $(RUNUTF8) $(PYTHON) \ + $(srcdir)/hyperv/hyperv_wmi_generator.py $(srcdir) $(builddir) \ && touch $@ MAINTAINERCLEANFILES += $(HYPERV_DRIVER_GENERATED) $(HYPERV_GENERATED_STAMP) @@ -53,6 +53,7 @@ libvirt_la_BUILT_LIBADD += libvirt_driver_hyperv.la libvirt_driver_hyperv_la_CFLAGS = \ $(OPENWSMAN_CFLAGS) \ -I$(srcdir)/conf \ + -I$(builddir)/hyperv \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_hyperv_la_LDFLAGS = $(AM_LDFLAGS) diff --git a/src/hyperv/hyperv_wmi_generator.py b/src/hyperv/hyperv_wmi_generator.py index a9ece0ff00..c3cd39cc76 100755 --- a/src/hyperv/hyperv_wmi_generator.py +++ b/src/hyperv/hyperv_wmi_generator.py @@ -454,12 +454,11 @@ def parse_class(block): def main(): - if "srcdir" in os.environ: - input_filename = os.path.join(os.environ["srcdir"], "hyperv/hyperv_wmi_generator.input") - output_dirname = os.path.join(os.environ["srcdir"], "hyperv") - else: - input_filename = os.path.join(os.getcwd(), "hyperv_wmi_generator.input") - output_dirname = os.getcwd() + if len(sys.argv) != 3: + report_error("usage: %s srcdir builddir" % sys.argv[0]) + + input_filename = os.path.join(sys.argv[1], "hyperv", "hyperv_wmi_generator.input") + output_dirname = os.path.join(sys.argv[2], "hyperv") classes_typedef = open_and_print(os.path.join(output_dirname, "hyperv_wmi_classes.generated.typedef")) classes_header = open_and_print(os.path.join(output_dirname, "hyperv_wmi_classes.generated.h")) -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:43AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/hyperv/Makefile.inc.am | 5 +++-- src/hyperv/hyperv_wmi_generator.py | 11 +++++------ 2 files changed, 8 insertions(+), 8 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/locking/Makefile.inc.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am index ba7a9ea2ea..2bfb662016 100644 --- a/src/locking/Makefile.inc.am +++ b/src/locking/Makefile.inc.am @@ -280,7 +280,7 @@ locking/lock_daemon_dispatch_stubs.h: $(LOCK_PROTOCOL) \ $(srcdir)/rpc/gendispatch.pl Makefile.am $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \ virLockSpaceProtocol VIR_LOCK_SPACE_PROTOCOL \ - $(LOCK_PROTOCOL) > $(srcdir)/locking/lock_daemon_dispatch_stubs.h + $(LOCK_PROTOCOL) > locking/lock_daemon_dispatch_stubs.h virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.status -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:44AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/locking/Makefile.inc.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) >
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/logging/Makefile.inc.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am index bb7ea7338d..dbaac2bb0d 100644 --- a/src/logging/Makefile.inc.am +++ b/src/logging/Makefile.inc.am @@ -127,7 +127,7 @@ logging/log_daemon_dispatch_stubs.h: $(LOG_PROTOCOL) \ $(srcdir)/rpc/gendispatch.pl Makefile.am $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \ virLogManagerProtocol VIR_LOG_MANAGER_PROTOCOL \ - $(LOG_PROTOCOL) > $(srcdir)/logging/log_daemon_dispatch_stubs.h + $(LOG_PROTOCOL) > logging/log_daemon_dispatch_stubs.h virtlogd.8.in: logging/virtlogd.pod $(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \ -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:45AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/logging/Makefile.inc.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/lxc/Makefile.inc.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/Makefile.inc.am b/src/lxc/Makefile.inc.am index f22a53e58d..cb55dfd1c6 100644 --- a/src/lxc/Makefile.inc.am +++ b/src/lxc/Makefile.inc.am @@ -252,13 +252,13 @@ lxc/lxc_monitor_dispatch.h: $(srcdir)/rpc/gendispatch.pl \ $(LXC_MONITOR_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \ virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > \ - $(srcdir)/lxc/lxc_monitor_dispatch.h + lxc/lxc_monitor_dispatch.h lxc/lxc_controller_dispatch.h: $(srcdir)/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=server \ virLXCMonitor VIR_LXC_MONITOR $(LXC_MONITOR_PROTOCOL) > \ - $(srcdir)/lxc/lxc_controller_dispatch.h + lxc/lxc_controller_dispatch.h .PHONY: \ install-data-lxc \ -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:46AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/lxc/Makefile.inc.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/remote/Makefile.inc.am | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 7361d02cf4..242eb3ed2d 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -427,37 +427,37 @@ remote/remote_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \ remote REMOTE $(REMOTE_PROTOCOL) \ - > $(srcdir)/remote/remote_client_bodies.h + > remote/remote_client_bodies.h remote/lxc_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ $(LXC_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \ lxc LXC $(LXC_PROTOCOL) \ - > $(srcdir)/remote/lxc_client_bodies.h + > remote/lxc_client_bodies.h remote/qemu_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ $(QEMU_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \ qemu QEMU $(QEMU_PROTOCOL) \ - > $(srcdir)/remote/qemu_client_bodies.h + > remote/qemu_client_bodies.h remote/remote_daemon_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ --mode=server remote REMOTE $(REMOTE_PROTOCOL) \ - > $(srcdir)/remote/remote_daemon_dispatch_stubs.h + > remote/remote_daemon_dispatch_stubs.h remote/lxc_daemon_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \ $(LXC_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ --mode=server lxc LXC $(LXC_PROTOCOL) \ - > $(srcdir)/remote/lxc_daemon_dispatch_stubs.h + > remote/lxc_daemon_dispatch_stubs.h remote/qemu_daemon_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \ $(QEMU_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ --mode=server qemu QEMU $(QEMU_PROTOCOL) \ - > $(srcdir)/remote/qemu_daemon_dispatch_stubs.h + > remote/qemu_daemon_dispatch_stubs.h libvirtd.8.in: remote/libvirtd.pod $(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \ -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:47AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/remote/Makefile.inc.am | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- include/libvirt/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libvirt/Makefile.am b/include/libvirt/Makefile.am index 65a1b23599..d7114c3462 100644 --- a/include/libvirt/Makefile.am +++ b/include/libvirt/Makefile.am @@ -20,7 +20,7 @@ virincdir = $(includedir)/libvirt allheaders = $(wildcard $(srcdir)/*.h) virinc_HEADERS = $(filter-out $(srcdir)/libvirt-common.h, $(allheaders)) -virinc_HEADERS += libvirt-common.h +nodist_virinc_HEADERS = libvirt-common.h EXTRA_DIST = libvirt-common.h.in -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:48AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- include/libvirt/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- po/POTFILES.in | 8 ++++---- src/Makefile.am | 6 +++--- src/access/Makefile.inc.am | 3 ++- src/admin/Makefile.inc.am | 13 +++++++------ src/bhyve/Makefile.inc.am | 1 + src/esx/Makefile.inc.am | 4 +--- src/hyperv/Makefile.inc.am | 4 +--- src/interface/Makefile.inc.am | 1 + src/libxl/Makefile.inc.am | 1 + src/locking/Makefile.inc.am | 8 +++++--- src/logging/Makefile.inc.am | 12 +++++++----- src/lxc/Makefile.inc.am | 27 ++++++++++++++++++--------- src/network/Makefile.inc.am | 1 + src/node_device/Makefile.inc.am | 1 + src/nwfilter/Makefile.inc.am | 1 + src/qemu/Makefile.inc.am | 1 + src/remote/Makefile.inc.am | 20 ++++++++++++-------- src/rpc/Makefile.inc.am | 5 ++++- src/secret/Makefile.inc.am | 1 + src/storage/Makefile.inc.am | 1 + src/util/Makefile.inc.am | 6 ++++-- src/vbox/Makefile.inc.am | 1 + src/vz/Makefile.inc.am | 1 + 23 files changed, 79 insertions(+), 48 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 8d423566a7..15f062a273 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -4,7 +4,7 @@ @SRCDIR@/src/access/viraccessmanager.c @SRCDIR@/src/admin/admin_server.c @SRCDIR@/src/admin/admin_server_dispatch.c -@SRCDIR@/src/admin/admin_server_dispatch_stubs.h +@BUILDDIR@/src/admin/admin_server_dispatch_stubs.h @SRCDIR@/src/admin/libvirt-admin.c @SRCDIR@/src/bhyve/bhyve_capabilities.c @SRCDIR@/src/bhyve/bhyve_command.c @@ -146,12 +146,12 @@ @SRCDIR@/src/qemu/qemu_monitor_text.c @SRCDIR@/src/qemu/qemu_process.c @SRCDIR@/src/qemu/qemu_qapi.c -@SRCDIR@/src/remote/qemu_daemon_dispatch_stubs.h -@SRCDIR@/src/remote/remote_client_bodies.h +@BUILDDIR@/src/remote/qemu_daemon_dispatch_stubs.h +@BUILDDIR@/src/remote/remote_client_bodies.h @SRCDIR@/src/remote/remote_daemon.c @SRCDIR@/src/remote/remote_daemon_config.c @SRCDIR@/src/remote/remote_daemon_dispatch.c -@SRCDIR@/src/remote/remote_daemon_dispatch_stubs.h +@BUILDDIR@/src/remote/remote_daemon_dispatch_stubs.h @SRCDIR@/src/remote/remote_daemon_stream.c @SRCDIR@/src/remote/remote_driver.c @SRCDIR@/src/rpc/virkeepalive.c diff --git a/src/Makefile.am b/src/Makefile.am index 435812e733..046831e075 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -653,13 +653,13 @@ endif WITH_LIBVIRTD < $< > $@-t && \ mv $@-t $@ -CLEANFILES += $(man8_MANS) -MAINTAINERCLEANFILES += $(MANINFILES) +CLEANFILES += \ + $(man8_MANS) \ + $(MANINFILES) EXTRA_DIST += \ $(SYSTEMD_UNIT_FILES_IN) \ $(PODFILES) \ - $(MANINFILES) \ $(NULL) diff --git a/src/access/Makefile.inc.am b/src/access/Makefile.inc.am index 2d871ec8aa..fd0a5d8098 100644 --- a/src/access/Makefile.inc.am +++ b/src/access/Makefile.inc.am @@ -43,13 +43,14 @@ ACCESS_DRIVER_POLKIT_POLICY = access/org.libvirt.api.policy GENERATED_SYM_FILES += $(ACCESS_DRIVER_SYM_FILES) EXTRA_DIST += \ - $(ACCESS_DRIVER_POLKIT_POLICY) \ access/genpolkit.pl \ $(NULL) libvirt_driver_access_la_SOURCES = \ $(ACCESS_DRIVER_SOURCES) \ + $(NULL) +nodist_libvirt_driver_access_la_SOURCES = \ $(ACCESS_DRIVER_GENERATED) \ $(NULL) noinst_LTLIBRARIES += libvirt_driver_access.la diff --git a/src/admin/Makefile.inc.am b/src/admin/Makefile.inc.am index 448f7e1203..3feb23aa20 100644 --- a/src/admin/Makefile.inc.am +++ b/src/admin/Makefile.inc.am @@ -9,22 +9,21 @@ ADMIN_PROTOCOL_GENERATED = \ admin/admin_server_dispatch_stubs.h \ $(NULL) -EXTRA_DIST += $(ADMIN_PROTOCOL) $(ADMIN_PROTOCOL_GENERATED) +EXTRA_DIST += $(ADMIN_PROTOCOL) BUILT_SOURCES += $(ADMIN_PROTOCOL_GENERATED) -MAINTAINERCLEANFILES += $(ADMIN_PROTOCOL_GENERATED) +CLEANFILES += $(ADMIN_PROTOCOL_GENERATED) admin/admin_server_dispatch.c: admin/admin_server_dispatch_stubs.h noinst_LTLIBRARIES += libvirt_driver_admin.la libvirt_driver_admin_la_SOURCES = \ - admin/admin_protocol.c \ - admin/admin_protocol.h \ admin/admin_server.c \ admin/admin_server.h \ admin/admin_server_dispatch.c \ admin/admin_server_dispatch.h \ - admin/admin_server_dispatch_stubs.h \ $(NULL) +nodist_libvirt_driver_admin_la_SOURCES = \ + $(ADMIN_PROTOCOL_GENERATED) libvirt_driver_admin_la_CFLAGS = \ $(AM_CFLAGS) \ $(XDR_CFLAGS) \ @@ -60,9 +59,11 @@ lib_LTLIBRARIES += libvirt-admin.la libvirt_admin_la_SOURCES = \ admin/libvirt-admin.c \ - $(ADMIN_PROTOCOL_GENERATED) \ $(DATATYPES_SOURCES) +nodist_libvirt_admin_la_SOURCES = \ + $(ADMIN_PROTOCOL_GENERATED) + libvirt_admin_la_LDFLAGS = \ $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_ADMIN_SYMBOL_FILE) \ -version-info $(LIBVIRT_VERSION_INFO) \ diff --git a/src/bhyve/Makefile.inc.am b/src/bhyve/Makefile.inc.am index 96ae2f5044..de9fbe9239 100644 --- a/src/bhyve/Makefile.inc.am +++ b/src/bhyve/Makefile.inc.am @@ -56,6 +56,7 @@ augeastest_DATA += bhyve/test_virtbhyved.aug CLEANFILES += bhyve/virtbhyved.aug virtbhyved_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtbhyved_SOURCES = $(REMOTE_DAEMON_GENERATED) virtbhyved_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtbhyved\"" \ diff --git a/src/esx/Makefile.inc.am b/src/esx/Makefile.inc.am index 7ba9fd1758..6b10755b7e 100644 --- a/src/esx/Makefile.inc.am +++ b/src/esx/Makefile.inc.am @@ -44,7 +44,6 @@ ESX_DRIVER_EXTRA_DIST = \ esx/README \ esx/esx_vi_generator.input \ esx/esx_vi_generator.py \ - $(ESX_DRIVER_GENERATED) \ $(NULL) ESX_GENERATED_STAMP = .esx_vi_generator.stamp @@ -54,7 +53,6 @@ DRIVER_SOURCE_FILES += $(ESX_DRIVER_SOURCES) EXTRA_DIST += \ $(ESX_DRIVER_SOURCES) \ $(ESX_DRIVER_EXTRA_DIST) \ - $(ESX_GENERATED_STAMP) \ $(NULL) BUILT_SOURCES += $(ESX_DRIVER_GENERATED) @@ -66,7 +64,7 @@ $(ESX_GENERATED_STAMP): $(srcdir)/esx/esx_vi_generator.input \ $(AM_V_GEN) $(RUNUTF8) $(PYTHON) \ $(srcdir)/esx/esx_vi_generator.py $(srcdir) $(builddir) && touch $@ -MAINTAINERCLEANFILES += $(ESX_DRIVER_GENERATED) $(ESX_GENERATED_STAMP) +CLEANFILES += $(ESX_DRIVER_GENERATED) $(ESX_GENERATED_STAMP) if WITH_ESX USED_SYM_FILES += $(srcdir)/libvirt_esx.syms diff --git a/src/hyperv/Makefile.inc.am b/src/hyperv/Makefile.inc.am index 79e94d09bb..b71602c971 100644 --- a/src/hyperv/Makefile.inc.am +++ b/src/hyperv/Makefile.inc.am @@ -24,8 +24,6 @@ HYPERV_GENERATED_STAMP = .hyperv_wmi_generator.stamp HYPERV_DRIVER_EXTRA_DIST = \ hyperv/hyperv_wmi_generator.input \ hyperv/hyperv_wmi_generator.py \ - $(HYPERV_DRIVER_GENERATED) \ - $(HYPERV_GENERATED_STAMP) \ $(NULL) DRIVER_SOURCE_FILES += $(HYPERV_DRIVER_SOURCES) @@ -45,7 +43,7 @@ $(HYPERV_GENERATED_STAMP): $(srcdir)/hyperv/hyperv_wmi_generator.input \ $(srcdir)/hyperv/hyperv_wmi_generator.py $(srcdir) $(builddir) \ && touch $@ -MAINTAINERCLEANFILES += $(HYPERV_DRIVER_GENERATED) $(HYPERV_GENERATED_STAMP) +CLEANFILES += $(HYPERV_DRIVER_GENERATED) $(HYPERV_GENERATED_STAMP) if WITH_HYPERV noinst_LTLIBRARIES += libvirt_driver_hyperv.la diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am index 30ea98ad15..5f22b90cb4 100644 --- a/src/interface/Makefile.inc.am +++ b/src/interface/Makefile.inc.am @@ -52,6 +52,7 @@ augeastest_DATA += interface/test_virtinterfaced.aug CLEANFILES += interface/virtinterfaced.aug virtinterfaced_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtinterfaced_SOURCES = $(REMOTE_DAEMON_GENERATED) virtinterfaced_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtinterfaced\"" \ diff --git a/src/libxl/Makefile.inc.am b/src/libxl/Makefile.inc.am index 5d9cf14f7f..8686e78a5d 100644 --- a/src/libxl/Makefile.inc.am +++ b/src/libxl/Makefile.inc.am @@ -64,6 +64,7 @@ augeastest_DATA += libxl/test_virtxend.aug CLEANFILES += libxl/virtxend.aug virtxend_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtxend_SOURCES = $(REMOTE_DAEMON_GENERATED) virtxend_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtxend\"" \ diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am index 2bfb662016..5c2361a581 100644 --- a/src/locking/Makefile.inc.am +++ b/src/locking/Makefile.inc.am @@ -43,8 +43,6 @@ LOCK_DAEMON_SOURCES = \ EXTRA_DIST += \ $(LOCK_PROTOCOL) \ - $(LOCK_PROTOCOL_GENERATED) \ - $(LOCK_DAEMON_GENERATED) \ $(LOCK_DAEMON_SOURCES) \ $(LOCK_DRIVER_LOCKD_SOURCES) \ $(LOCK_DRIVER_SOURCES) \ @@ -64,7 +62,7 @@ BUILT_SOURCES += \ $(LOCK_DAEMON_GENERATED) \ $(NULL) -MAINTAINERCLEANFILES += \ +CLEANFILES += \ $(LOCK_PROTOCOL_GENERATED) \ $(LOCK_DAEMON_GENERATED) \ $(NULL) @@ -105,6 +103,8 @@ if WITH_LIBVIRTD lockdriver_LTLIBRARIES += lockd.la lockd_la_SOURCES = \ $(LOCK_DRIVER_LOCKD_SOURCES) \ + $(NULL) +nodist_lockd_la_SOURCES = \ $(LOCK_PROTOCOL_GENERATED) \ $(NULL) lockd_la_CFLAGS = \ @@ -145,6 +145,8 @@ sbin_PROGRAMS += virtlockd virtlockd_SOURCES = \ $(LOCK_DAEMON_SOURCES) \ + $(NULL) +nodist_virtlockd_SOURCES = \ $(LOCK_PROTOCOL_GENERATED) \ $(LOCK_DAEMON_GENERATED) \ $(NULL) diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am index dbaac2bb0d..fba54239d5 100644 --- a/src/logging/Makefile.inc.am +++ b/src/logging/Makefile.inc.am @@ -10,7 +10,6 @@ LOG_DAEMON_GENERATED = \ $(NULL) LOG_DRIVER_SOURCES = \ - $(LOG_PROTOCOL_GENERATED) \ logging/log_manager.c \ logging/log_manager.h \ $(NULL) @@ -30,10 +29,8 @@ LOG_PROTOCOL = $(srcdir)/logging/log_protocol.x EXTRA_DIST += \ $(LOG_PROTOCOL) \ - $(LOG_PROTOCOL_GENERATED) \ - $(LOG_DAEMON_GENERATED) \ $(LOG_DAEMON_SOURCES) \ - $(LOG_DRIVER_SOURCES) \ + $(LOG_DRIVER) \ logging/virtlogd.aug \ logging/virtlogd.conf \ logging/test_virtlogd.aug.in \ @@ -42,7 +39,7 @@ BUILT_SOURCES += \ $(LOG_PROTOCOL_GENERATED) \ $(LOG_DAEMON_GENERATED) \ $(NULL) -MAINTAINERCLEANFILES += \ +CLEANFILES += \ $(LOG_PROTOCOL_GENERATED) \ $(LOG_DAEMON_GENERATED) \ $(NULL) @@ -66,6 +63,9 @@ libvirt_la_BUILT_LIBADD += libvirt_driver_log.la libvirt_driver_log_la_SOURCES = \ $(LOG_DRIVER_SOURCES) \ $(NULL) +nodist_libvirt_driver_log_la_SOURCES = \ + $(LOG_PROTOCOL_GENERATED) \ + $(NULL) libvirt_driver_log_la_CFLAGS = \ -I$(builddir)/logging \ -I$(builddir)/rpc \ @@ -80,6 +80,8 @@ man8_MANS += virtlogd.8 virtlogd_SOURCES = \ $(LOG_DAEMON_SOURCES) \ + $(NULL) +nodist_virtlogd_SOURCES = \ $(LOG_PROTOCOL_GENERATED) \ $(LOG_DAEMON_GENERATED) \ $(NULL) diff --git a/src/lxc/Makefile.inc.am b/src/lxc/Makefile.inc.am index cb55dfd1c6..d3a7cbf93b 100644 --- a/src/lxc/Makefile.inc.am +++ b/src/lxc/Makefile.inc.am @@ -22,8 +22,6 @@ LXC_GENERATED = \ LXC_MONITOR_PROTOCOL = $(srcdir)/lxc/lxc_monitor_protocol.x LXC_DRIVER_SOURCES = \ - $(LXC_MONITOR_PROTOCOL_GENERATED) \ - $(LXC_MONITOR_GENERATED) \ lxc/lxc_conf.c \ lxc/lxc_conf.h \ lxc/lxc_container.c \ @@ -47,8 +45,6 @@ LXC_DRIVER_SOURCES = \ $(NULL) LXC_CONTROLLER_SOURCES = \ - $(LXC_MONITOR_PROTOCOL_GENERATED) \ - $(LXC_CONTROLLER_GENERATED) \ lxc/lxc_conf.c \ lxc/lxc_conf.h \ lxc/lxc_container.c \ @@ -62,13 +58,17 @@ LXC_CONTROLLER_SOURCES = \ lxc/lxc_controller.c \ $(NULL) - -DRIVER_SOURCE_FILES += $(LXC_DRIVER_SOURCES) -STATEFUL_DRIVER_SOURCE_FILES += $(LXC_DRIVER_SOURCES) +DRIVER_SOURCE_FILES += \ + $(LXC_MONITOR_PROTOCOL_GENERATED) \ + $(LXC_MONITOR_GENERATED) \ + $(LXC_DRIVER_SOURCES) +STATEFUL_DRIVER_SOURCE_FILES += \ + $(LXC_MONITOR_PROTOCOL_GENERATED) \ + $(LXC_MONITOR_GENERATED) \ + $(LXC_DRIVER_SOURCES) EXTRA_DIST += \ $(LXC_DRIVER_SOURCES) \ $(LXC_MONITOR_PROTOCOL) \ - $(LXC_GENERATED) \ $(LXC_CONTROLLER_SOURCES) \ $(NULL) @@ -112,7 +112,11 @@ libvirt_driver_lxc_impl_la_CFLAGS += $(BLKID_CFLAGS) libvirt_driver_lxc_impl_la_LIBADD += $(BLKID_LIBS) endif WITH_BLKID libvirt_driver_lxc_impl_la_LIBADD += $(SECDRIVER_LIBS) -libvirt_driver_lxc_impl_la_SOURCES = $(LXC_DRIVER_SOURCES) +libvirt_driver_lxc_impl_la_SOURCES = \ + $(LXC_DRIVER_SOURCES) +nodist_libvirt_driver_lxc_impl_la_SOURCES = \ + $(LXC_MONITOR_PROTOCOL_GENERATED) \ + $(LXC_MONITOR_GENERATED) sbin_PROGRAMS += virtlxcd @@ -123,6 +127,7 @@ augeastest_DATA += lxc/test_virtlxcd.aug CLEANFILES += lxc/virtlxcd.aug virtlxcd_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodst_virtlxcd_SOURCES = $(REMOTE_DAEMON_GENERATED) virtlxcd_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtlxcd\"" \ @@ -183,6 +188,10 @@ libvirt_lxc_SOURCES = \ $(LXC_CONTROLLER_SOURCES) \ $(DATATYPES_SOURCES) \ $(NULL) +nodist_libvirt_lxc_SOURCES = \ + $(LXC_MONITOR_PROTOCOL_GENERATED) \ + $(LXC_CONTROLLER_GENERATED) \ + $(NULL) libvirt_lxc_LDFLAGS = \ $(AM_LDFLAGS) \ $(PIE_LDFLAGS) \ diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am index 2f7932ae60..58dd90c23b 100644 --- a/src/network/Makefile.inc.am +++ b/src/network/Makefile.inc.am @@ -59,6 +59,7 @@ augeastest_DATA += network/test_virtnetworkd.aug CLEANFILES += network/virtnetworkd.aug virtnetworkd_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtnetworkd_SOURCES = $(REMOTE_DAEMON_GENERATED) virtnetworkd_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtnetworkd\"" \ diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc.am index 1dfa0a5274..2a8c437e7b 100644 --- a/src/node_device/Makefile.inc.am +++ b/src/node_device/Makefile.inc.am @@ -77,6 +77,7 @@ augeastest_DATA += node_device/test_virtnodedevd.aug CLEANFILES += node_device/virtnodedevd.aug virtnodedevd_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtnodedevd_SOURCES = $(REMOTE_DAEMON_GENERATED) virtnodedevd_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtnodedevd\"" \ diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am index ca05cba934..c320b75f78 100644 --- a/src/nwfilter/Makefile.inc.am +++ b/src/nwfilter/Makefile.inc.am @@ -60,6 +60,7 @@ augeastest_DATA += nwfilter/test_virtnwfilterd.aug CLEANFILES += nwfilter/virtnwfilterd.aug virtnwfilterd_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtnwfilterd_SOURCES = $(REMOTE_DAEMON_GENERATED) virtnwfilterd_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtnwfilterd\"" \ diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am index 69e290c428..3f3476b2b4 100644 --- a/src/qemu/Makefile.inc.am +++ b/src/qemu/Makefile.inc.am @@ -134,6 +134,7 @@ augeastest_DATA += qemu/test_virtqemud.aug CLEANFILES += qemu/virtqemud.aug virtqemud_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtqemud_SOURCES = $(REMOTE_DAEMON_GENERATED) virtqemud_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtqemud\"" \ diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 242eb3ed2d..f5de92be23 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -15,7 +15,6 @@ REMOTE_DRIVER_GENERATED = \ REMOTE_DRIVER_SOURCES = \ remote/remote_driver.c \ remote/remote_driver.h \ - $(REMOTE_DRIVER_GENERATED) \ $(NULL) REMOTE_DAEMON_GENERATED = \ @@ -33,7 +32,6 @@ REMOTE_DAEMON_SOURCES = \ remote/remote_daemon_dispatch.h \ remote/remote_daemon_stream.c \ remote/remote_daemon_stream.h \ - $(REMOTE_DAEMON_GENERATED) \ $(NULL) REMOTE_DAEMON_CFLAGS = \ @@ -140,7 +138,9 @@ REMOTE_DRIVER_PROTOCOL = \ $(LXC_PROTOCOL) \ $(NULL) -DRIVER_SOURCE_FILES += $(REMOTE_DRIVER_SOURCES) +DRIVER_SOURCE_FILES += \ + $(REMOTE_DRIVER_GENERATED) \ + $(REMOTE_DRIVER_SOURCES) EXTRA_DIST += \ $(REMOTE_DRIVER_PROTOCOL) \ @@ -161,11 +161,9 @@ BUILT_SOURCES += \ $(REMOTE_DRIVER_GENERATED) \ $(REMOTE_DAEMON_GENERATED) \ $(NULL) -MAINTAINERCLEANFILES += \ +CLEANFILES += \ $(REMOTE_DRIVER_GENERATED) \ $(REMOTE_DAEMON_GENERATED) \ - $(NULL) -CLEANFILES += \ remote/libvirtd.conf \ remote/virtproxyd.conf \ $(NULL) @@ -182,10 +180,13 @@ libvirt_driver_remote_la_CFLAGS = \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_remote_la_LDFLAGS = $(AM_LDFLAGS) -libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES) +libvirt_driver_remote_la_SOURCES = \ + $(REMOTE_DRIVER_SOURCES) +nodist_libvirt_driver_remote_la_SOURCES = \ + $(REMOTE_DRIVER_GENERATED) if WITH_DTRACE_PROBES -nodist_libvirt_driver_remote_la_SOURCES = libvirt_probes.h +nodist_libvirt_driver_remote_la_SOURCES += libvirt_probes.h endif WITH_DTRACE_PROBES if WITH_SASL @@ -230,6 +231,8 @@ man8_MANS += libvirtd.8 libvirtd_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_libvirtd_SOURCES = $(REMOTE_DAEMON_GENERATED) + libvirtd_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DSOCK_PREFIX="\"libvirt\"" \ @@ -243,6 +246,7 @@ libvirtd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) libvirtd_LDADD = $(REMOTE_DAEMON_LD_ADD) virtproxyd_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtproxyd_SOURCES = $(REMOTE_DAEMON_GENERATED) virtproxyd_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DSOCK_PREFIX="\"libvirt\"" \ diff --git a/src/rpc/Makefile.inc.am b/src/rpc/Makefile.inc.am index 4aa38db1ab..a5bde92c9f 100644 --- a/src/rpc/Makefile.inc.am +++ b/src/rpc/Makefile.inc.am @@ -16,7 +16,7 @@ VIR_NET_RPC_GENERATED = \ $(NULL) BUILT_SOURCES += $(VIR_NET_RPC_GENERATED) -MAINTAINERCLEANFILES += $(VIR_NET_RPC_GENERATED) +CLEANFILES += $(VIR_NET_RPC_GENERATED) noinst_LTLIBRARIES += \ libvirt-net-rpc.la \ @@ -39,6 +39,9 @@ libvirt_net_rpc_la_SOURCES = \ rpc/virnetsocket.c \ rpc/virkeepalive.h \ rpc/virkeepalive.c \ + $(NULL) + +nodist_libvirt_net_rpc_la_SOURCES = \ $(VIR_NET_RPC_GENERATED) \ $(NULL) diff --git a/src/secret/Makefile.inc.am b/src/secret/Makefile.inc.am index 94f293d418..3d77366d3c 100644 --- a/src/secret/Makefile.inc.am +++ b/src/secret/Makefile.inc.am @@ -48,6 +48,7 @@ augeastest_DATA += secret/test_virtsecretd.aug CLEANFILES += secret/virtsecretd.aug virtsecretd_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtsecretd_SOURCES = $(REMOTE_DAEMON_GENERATED) virtsecretd_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtsecretd\"" \ diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am index ec35ab7665..1dfe48668f 100644 --- a/src/storage/Makefile.inc.am +++ b/src/storage/Makefile.inc.am @@ -152,6 +152,7 @@ augeastest_DATA += storage/test_virtstoraged.aug CLEANFILES += storage/virtstoraged.aug virtstoraged_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtstoraged_SOURCES = $(REMOTE_DAEMON_GENERATED) virtstoraged_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtstoraged\"" \ diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index d8c8e61c4b..0eadef71ca 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -253,9 +253,8 @@ KEYMANS = $(KEYPODS:%.pod=%.7) man7_MANS += $(KEYMANS) -UTIL_SOURCES += $(KEYTABLES) BUILT_SOURCES += $(KEYTABLES) -MAINTAINERCLEANFILES += $(KEYTABLES) +CLEANFILES += $(KEYTABLES) CLEANFILES += $(KEYMANS) $(KEYPODS) UTIL_IO_HELPER_SOURCES = util/iohelper.c @@ -266,6 +265,9 @@ libvirt_la_BUILT_LIBADD += libvirt_util.la libvirt_util_la_SOURCES = \ $(UTIL_SOURCES) \ $(NULL) +nodist_libvirt_util_la_SOURCES = \ + $(KEYTABLES) \ + $(NULL) libvirt_util_la_CFLAGS = \ $(CAPNG_CFLAGS) \ $(YAJL_CFLAGS) \ diff --git a/src/vbox/Makefile.inc.am b/src/vbox/Makefile.inc.am index 346a84429b..551189c0f5 100644 --- a/src/vbox/Makefile.inc.am +++ b/src/vbox/Makefile.inc.am @@ -73,6 +73,7 @@ augeastest_DATA += vbox/test_virtvboxd.aug CLEANFILES += vbox/virtvboxd.aug virtvboxd_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtvboxd_SOURCES = $(REMOTE_DAEMON_GENERATED) virtvboxd_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtvboxd\"" \ diff --git a/src/vz/Makefile.inc.am b/src/vz/Makefile.inc.am index c5bef04088..1757c8ba10 100644 --- a/src/vz/Makefile.inc.am +++ b/src/vz/Makefile.inc.am @@ -47,6 +47,7 @@ augeastest_DATA += vz/test_virtvzd.aug CLEANFILES += vz/virtvzd.aug virtvzd_SOURCES = $(REMOTE_DAEMON_SOURCES) +nodist_virtvzd_SOURCES = $(REMOTE_DAEMON_GENERATED) virtvzd_CFLAGS = \ $(REMOTE_DAEMON_CFLAGS) \ -DDAEMON_NAME="\"virtvzd\"" \ -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:49AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- po/POTFILES.in | 8 ++++---- src/Makefile.am | 6 +++--- src/access/Makefile.inc.am | 3 ++- src/admin/Makefile.inc.am | 13 +++++++------ src/bhyve/Makefile.inc.am | 1 + src/esx/Makefile.inc.am | 4 +--- src/hyperv/Makefile.inc.am | 4 +--- src/interface/Makefile.inc.am | 1 + src/libxl/Makefile.inc.am | 1 + src/locking/Makefile.inc.am | 8 +++++--- src/logging/Makefile.inc.am | 12 +++++++----- src/lxc/Makefile.inc.am | 27 ++++++++++++++++++--------- src/network/Makefile.inc.am | 1 + src/node_device/Makefile.inc.am | 1 + src/nwfilter/Makefile.inc.am | 1 + src/qemu/Makefile.inc.am | 1 + src/remote/Makefile.inc.am | 20 ++++++++++++-------- src/rpc/Makefile.inc.am | 5 ++++- src/secret/Makefile.inc.am | 1 + src/storage/Makefile.inc.am | 1 + src/util/Makefile.inc.am | 6 ++++-- src/vbox/Makefile.inc.am | 1 + src/vz/Makefile.inc.am | 1 + 23 files changed, 79 insertions(+), 48 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- tools/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index 68320c7246..1a541a3984 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -84,7 +84,6 @@ EXTRA_DIST = \ bash-completion/vsh \ libvirt_recover_xattrs.sh \ $(PODFILES) \ - $(MANINFILES) \ $(NULL) -- 2.21.0

On Mon, Oct 21, 2019 at 10:00:50AM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- tools/Makefile.am | 1 - 1 file changed, 1 deletion(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (3)
-
Daniel P. Berrangé
-
Ján Tomko
-
Pavel Hrdina