qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion
@ 2020-08-26 11:04 marcandre.lureau
  2020-08-26 11:04 ` [PATCH v3 1/8] configure: rename confsuffix option marcandre.lureau
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: marcandre.lureau @ 2020-08-26 11:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, berrange, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

The following patches fix installation path when cross-compiling Windows
version, and move the NSIS build rule to meson.

v3:
 - change qemu suffix handling, make /-separator implicit
 - use qemu suffix to build qemu_docdir, as --help says
 - use / to construct qemu directory variables in meson
 - add a few signed-off from Daniel

v2:
 - replaced the shell script by a python version
 - add copyright/license for the new python script

Marc-André Lureau (8):
  configure: rename confsuffix option
  configure: always /-seperate directory from qemu_suffix
  configure: build docdir like other suffixed directories
  meson: pass qemu_suffix option
  meson: use meson datadir instead of qemu_datadir
  meson: pass docdir option
  meson: use meson mandir instead of qemu_mandir
  meson: add NSIS building

 Makefile                           | 56 ---------------------
 configure                          | 27 ++++++-----
 contrib/vhost-user-gpu/meson.build |  2 +-
 docs/meson.build                   |  4 +-
 meson.build                        | 34 +++++++++++--
 meson_options.txt                  |  4 ++
 pc-bios/descriptors/meson.build    |  2 +-
 pc-bios/keymaps/meson.build        |  6 +--
 pc-bios/meson.build                |  2 +-
 scripts/nsis.py                    | 78 ++++++++++++++++++++++++++++++
 tools/virtiofsd/meson.build        |  2 +-
 trace/meson.build                  |  2 +-
 12 files changed, 138 insertions(+), 81 deletions(-)
 create mode 100644 scripts/nsis.py

-- 
2.26.2




^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 1/8] configure: rename confsuffix option
  2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
@ 2020-08-26 11:04 ` marcandre.lureau
  2020-08-26 11:04 ` [PATCH v3 2/8] configure: always /-seperate directory from qemu_suffix marcandre.lureau
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 18+ messages in thread
From: marcandre.lureau @ 2020-08-26 11:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, berrange, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The value is used to construct conf/mod/data directories.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 configure | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/configure b/configure
index b1e11397a8..0e04c47722 100755
--- a/configure
+++ b/configure
@@ -474,7 +474,7 @@ modules="no"
 module_upgrades="no"
 prefix="/usr/local"
 firmwarepath="\${prefix}/share/qemu-firmware"
-confsuffix="/qemu"
+qemu_suffix="/qemu"
 slirp=""
 oss_lib=""
 bsd="no"
@@ -1010,7 +1010,7 @@ if test "$mingw32" = "yes" ; then
     LIBS="-liberty $LIBS"
   fi
   prefix="c:/Program Files/QEMU"
-  confsuffix=""
+  qemu_suffix=""
   libs_qga="-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -lwininet -liphlpapi -lnetapi32 $libs_qga"
 fi
 
@@ -1118,7 +1118,7 @@ for opt do
   ;;
   --datadir=*) datadir="$optarg"
   ;;
-  --with-confsuffix=*) confsuffix="$optarg"
+  --with-suffix=*) qemu_suffix="$optarg"
   ;;
   --docdir=*) qemu_docdir="$optarg"
   ;;
@@ -1823,16 +1823,16 @@ Advanced options (experts only):
   --with-git=GIT           use specified git [$git]
   --static                 enable static build [$static]
   --mandir=PATH            install man pages in PATH
-  --datadir=PATH           install firmware in PATH$confsuffix
-  --docdir=PATH            install documentation in PATH$confsuffix
+  --datadir=PATH           install firmware in PATH$qemu_suffix
+  --docdir=PATH            install documentation in PATH$qemu_suffix
   --bindir=PATH            install binaries in PATH
   --libdir=PATH            install libraries in PATH
   --libexecdir=PATH        install helper binaries in PATH
-  --sysconfdir=PATH        install config in PATH$confsuffix
+  --sysconfdir=PATH        install config in PATH$qemu_suffix
   --localstatedir=PATH     install local state in PATH (set at runtime on win32)
   --firmwarepath=PATH      search PATH for firmware files
   --efi-aarch64=PATH       PATH of efi file to use for aarch64 VMs.
-  --with-confsuffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir [$confsuffix]
+  --with-suffix=SUFFIX     suffix for QEMU data inside datadir/libdir/sysconfdir [$qemu_suffix]
   --with-pkgversion=VERS   use specified string as sub-version of the package
   --enable-debug           enable common debug build options
   --enable-sanitizers      enable default sanitizers
@@ -6467,9 +6467,9 @@ EOF
     fi
 fi
 
-qemu_confdir=$sysconfdir$confsuffix
-qemu_moddir=$libdir$confsuffix
-qemu_datadir=$datadir$confsuffix
+qemu_confdir=$sysconfdir$qemu_suffix
+qemu_moddir=$libdir$qemu_suffix
+qemu_datadir=$datadir$qemu_suffix
 qemu_localedir="$datadir/locale"
 qemu_icondir="$datadir/icons"
 qemu_desktopdir="$datadir/applications"
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 2/8] configure: always /-seperate directory from qemu_suffix
  2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
  2020-08-26 11:04 ` [PATCH v3 1/8] configure: rename confsuffix option marcandre.lureau
@ 2020-08-26 11:04 ` marcandre.lureau
  2020-09-09 13:15   ` Philippe Mathieu-Daudé
  2020-08-26 11:04 ` [PATCH v3 3/8] configure: build docdir like other suffixed directories marcandre.lureau
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: marcandre.lureau @ 2020-08-26 11:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, berrange, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Otherwise, we may accept very strange directory names...

While at it, quote the variables.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 configure | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index 0e04c47722..61216b9210 100755
--- a/configure
+++ b/configure
@@ -474,7 +474,7 @@ modules="no"
 module_upgrades="no"
 prefix="/usr/local"
 firmwarepath="\${prefix}/share/qemu-firmware"
-qemu_suffix="/qemu"
+qemu_suffix="qemu"
 slirp=""
 oss_lib=""
 bsd="no"
@@ -1823,12 +1823,12 @@ Advanced options (experts only):
   --with-git=GIT           use specified git [$git]
   --static                 enable static build [$static]
   --mandir=PATH            install man pages in PATH
-  --datadir=PATH           install firmware in PATH$qemu_suffix
-  --docdir=PATH            install documentation in PATH$qemu_suffix
+  --datadir=PATH           install firmware in PATH/$qemu_suffix
+  --docdir=PATH            install documentation in PATH/$qemu_suffix
   --bindir=PATH            install binaries in PATH
   --libdir=PATH            install libraries in PATH
   --libexecdir=PATH        install helper binaries in PATH
-  --sysconfdir=PATH        install config in PATH$qemu_suffix
+  --sysconfdir=PATH        install config in PATH/$qemu_suffix
   --localstatedir=PATH     install local state in PATH (set at runtime on win32)
   --firmwarepath=PATH      search PATH for firmware files
   --efi-aarch64=PATH       PATH of efi file to use for aarch64 VMs.
@@ -6467,9 +6467,9 @@ EOF
     fi
 fi
 
-qemu_confdir=$sysconfdir$qemu_suffix
-qemu_moddir=$libdir$qemu_suffix
-qemu_datadir=$datadir$qemu_suffix
+qemu_confdir="$sysconfdir/$qemu_suffix"
+qemu_moddir="$libdir/$qemu_suffix"
+qemu_datadir="$datadir/$qemu_suffix"
 qemu_localedir="$datadir/locale"
 qemu_icondir="$datadir/icons"
 qemu_desktopdir="$datadir/applications"
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 3/8] configure: build docdir like other suffixed directories
  2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
  2020-08-26 11:04 ` [PATCH v3 1/8] configure: rename confsuffix option marcandre.lureau
  2020-08-26 11:04 ` [PATCH v3 2/8] configure: always /-seperate directory from qemu_suffix marcandre.lureau
@ 2020-08-26 11:04 ` marcandre.lureau
  2020-08-26 11:04 ` [PATCH v3 4/8] meson: pass qemu_suffix option marcandre.lureau
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 18+ messages in thread
From: marcandre.lureau @ 2020-08-26 11:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, berrange, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

As documented in --help for --docdir.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 configure | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 61216b9210..e880e5676d 100755
--- a/configure
+++ b/configure
@@ -1676,14 +1676,14 @@ includedir="${includedir:-$prefix/include}"
 if test "$mingw32" = "yes" ; then
     mandir="$prefix"
     datadir="$prefix"
-    qemu_docdir="$prefix"
+    docdir="$prefix"
     bindir="$prefix"
     sysconfdir="$prefix"
     local_statedir=
 else
     mandir="${mandir:-$prefix/share/man}"
     datadir="${datadir:-$prefix/share}"
-    qemu_docdir="${qemu_docdir:-$prefix/share/doc/qemu}"
+    docdir="${docdir:-$prefix/share/doc}"
     bindir="${bindir:-$prefix/bin}"
     sysconfdir="${sysconfdir:-$prefix/etc}"
     local_statedir="${local_statedir:-$prefix/var}"
@@ -1832,7 +1832,7 @@ Advanced options (experts only):
   --localstatedir=PATH     install local state in PATH (set at runtime on win32)
   --firmwarepath=PATH      search PATH for firmware files
   --efi-aarch64=PATH       PATH of efi file to use for aarch64 VMs.
-  --with-suffix=SUFFIX     suffix for QEMU data inside datadir/libdir/sysconfdir [$qemu_suffix]
+  --with-suffix=SUFFIX     suffix for QEMU data inside datadir/libdir/sysconfdir/docdir [$qemu_suffix]
   --with-pkgversion=VERS   use specified string as sub-version of the package
   --enable-debug           enable common debug build options
   --enable-sanitizers      enable default sanitizers
@@ -6470,6 +6470,7 @@ fi
 qemu_confdir="$sysconfdir/$qemu_suffix"
 qemu_moddir="$libdir/$qemu_suffix"
 qemu_datadir="$datadir/$qemu_suffix"
+qemu_docdir="$docdir/$qemu_suffix"
 qemu_localedir="$datadir/locale"
 qemu_icondir="$datadir/icons"
 qemu_desktopdir="$datadir/applications"
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 4/8] meson: pass qemu_suffix option
  2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
                   ` (2 preceding siblings ...)
  2020-08-26 11:04 ` [PATCH v3 3/8] configure: build docdir like other suffixed directories marcandre.lureau
@ 2020-08-26 11:04 ` marcandre.lureau
  2020-08-26 11:04 ` [PATCH v3 5/8] meson: use meson datadir instead of qemu_datadir marcandre.lureau
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 18+ messages in thread
From: marcandre.lureau @ 2020-08-26 11:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, berrange, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The following patches will make use of it to fix installation paths.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 configure         | 1 +
 meson_options.txt | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/configure b/configure
index e880e5676d..05b944fb8e 100755
--- a/configure
+++ b/configure
@@ -8223,6 +8223,7 @@ NINJA=$PWD/ninjatool $meson setup \
         --mandir "${pre_prefix}$mandir" \
         --sysconfdir "${pre_prefix}$sysconfdir" \
         --localstatedir "${pre_prefix}$local_statedir" \
+        -Dqemu_suffix="$qemu_suffix" \
         -Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \
         -Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
         -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
diff --git a/meson_options.txt b/meson_options.txt
index c55f9cd94c..1ef822bab3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,5 @@
+option('qemu_suffix', type : 'string', value: '/qemu',
+       description: 'Suffix for QEMU data/modules/config directories (can be empty)')
 option('gettext', type : 'boolean', value : true)
 option('sdl', type : 'feature', value : 'auto')
 option('sdl_image', type : 'feature', value : 'auto')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 5/8] meson: use meson datadir instead of qemu_datadir
  2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
                   ` (3 preceding siblings ...)
  2020-08-26 11:04 ` [PATCH v3 4/8] meson: pass qemu_suffix option marcandre.lureau
@ 2020-08-26 11:04 ` marcandre.lureau
       [not found]   ` <20200909095147.p6ywqn5ze7mbmvm6@lws.brq.redhat.com>
  2020-08-26 11:04 ` [PATCH v3 6/8] meson: pass docdir option marcandre.lureau
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: marcandre.lureau @ 2020-08-26 11:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, berrange, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

When cross-compiling, by default qemu_datadir is 'c:\Program
Files\QEMU', which is not recognized as being an absolute path, and
meson will end up adding the prefix again.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 contrib/vhost-user-gpu/meson.build | 2 +-
 meson.build                        | 3 ++-
 meson_options.txt                  | 2 +-
 pc-bios/descriptors/meson.build    | 2 +-
 pc-bios/keymaps/meson.build        | 6 +++---
 pc-bios/meson.build                | 2 +-
 tools/virtiofsd/meson.build        | 2 +-
 trace/meson.build                  | 2 +-
 8 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/meson.build
index 6c1459f54a..8df4c13bc5 100644
--- a/contrib/vhost-user-gpu/meson.build
+++ b/contrib/vhost-user-gpu/meson.build
@@ -9,5 +9,5 @@ if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \
   configure_file(input: '50-qemu-gpu.json.in',
                  output: '50-qemu-gpu.json',
                  configuration: config_host,
-                 install_dir: config_host['qemu_datadir'] / 'vhost-user')
+                 install_dir: qemu_datadir / 'vhost-user')
 endif
diff --git a/meson.build b/meson.build
index f0fe5f8799..9f0d7d3830 100644
--- a/meson.build
+++ b/meson.build
@@ -17,6 +17,7 @@ config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak
 enable_modules = 'CONFIG_MODULES' in config_host
 enable_static = 'CONFIG_STATIC' in config_host
 build_docs = 'BUILD_DOCS' in config_host
+qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
 config_host_data = configuration_data()
 genh = []
 
@@ -1039,7 +1040,7 @@ foreach target : target_dirs
                       output: exe_name + stp['ext'],
                       capture: true,
                       install: stp['install'],
-                      install_dir: config_host['qemu_datadir'] / '../systemtap/tapset',
+                      install_dir: qemu_datadir / '../systemtap/tapset',
                       command: [
                         tracetool, '--group=all', '--format=' + stp['fmt'],
                         '--binary=' + stp['bin'],
diff --git a/meson_options.txt b/meson_options.txt
index 1ef822bab3..9e8db82995 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,4 +1,4 @@
-option('qemu_suffix', type : 'string', value: '/qemu',
+option('qemu_suffix', type : 'string', value: 'qemu',
        description: 'Suffix for QEMU data/modules/config directories (can be empty)')
 option('gettext', type : 'boolean', value : true)
 option('sdl', type : 'feature', value : 'auto')
diff --git a/pc-bios/descriptors/meson.build b/pc-bios/descriptors/meson.build
index 7c715bace8..3798d32372 100644
--- a/pc-bios/descriptors/meson.build
+++ b/pc-bios/descriptors/meson.build
@@ -10,5 +10,5 @@ foreach f: [
                  output: f,
                  configuration: {'DATADIR': config_host['qemu_datadir']},
                  install: install_blobs,
-                 install_dir: config_host['qemu_datadir'] / 'firmware')
+                 install_dir: qemu_datadir / 'firmware')
 endforeach
diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
index b737c82230..bbac83ece3 100644
--- a/pc-bios/keymaps/meson.build
+++ b/pc-bios/keymaps/meson.build
@@ -44,13 +44,13 @@ foreach km, args: keymaps
                      build_by_default: true,
                      output: km,
                      command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
-                     install_dir: config_host['qemu_datadir'] / 'keymaps')
+                     install_dir: qemu_datadir / 'keymaps')
 endforeach
 if t.length() > 0
   alias_target('update-keymaps', t)
 else
   # install from the source tree
-  install_data(keymaps.keys(), install_dir: config_host['qemu_datadir'] / 'keymaps')
+  install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps')
 endif
 
-install_data(['sl', 'sv'], install_dir: config_host['qemu_datadir'] / 'keymaps')
+install_data(['sl', 'sv'], install_dir: qemu_datadir / 'keymaps')
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index b6389f5148..c11e52ba26 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -19,7 +19,7 @@ if 'DECOMPRESS_EDK2_BLOBS' in config_host
                   input: '@0@.bz2'.format(f),
                   capture: true,
                   install: install_blobs,
-                  install_dir: config_host['qemu_datadir'],
+                  install_dir: qemu_datadir,
                   command: [ bzip2, '-dc', '@INPUT0@' ])
   endforeach
 endif
diff --git a/tools/virtiofsd/meson.build b/tools/virtiofsd/meson.build
index d1e23c5760..50022ed89e 100644
--- a/tools/virtiofsd/meson.build
+++ b/tools/virtiofsd/meson.build
@@ -16,4 +16,4 @@ executable('virtiofsd', files(
 configure_file(input: '50-qemu-virtiofsd.json.in',
                output: '50-qemu-virtiofsd.json',
                configuration: config_host,
-               install_dir: config_host['qemu_datadir'] / 'vhost-user')
+               install_dir: qemu_datadir / 'vhost-user')
diff --git a/trace/meson.build b/trace/meson.build
index 56e870848e..5f0bf11cb5 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -55,7 +55,7 @@ trace_events_all = custom_target('trace-events-all',
                                  command: [ 'cat', '@INPUT@' ],
                                  capture: true,
                                  install: true,
-                                 install_dir: config_host['qemu_datadir'])
+                                 install_dir: qemu_datadir)
 
 foreach d : [
   ['generated-tcg-tracers.h', 'tcg-h'],
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 6/8] meson: pass docdir option
  2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
                   ` (4 preceding siblings ...)
  2020-08-26 11:04 ` [PATCH v3 5/8] meson: use meson datadir instead of qemu_datadir marcandre.lureau
@ 2020-08-26 11:04 ` marcandre.lureau
  2020-08-26 11:04 ` [PATCH v3 7/8] meson: use meson mandir instead of qemu_mandir marcandre.lureau
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 18+ messages in thread
From: marcandre.lureau @ 2020-08-26 11:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, berrange, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

When cross-compiling, by default qemu_docdir is 'c:\Program Files\QEMU\'
which is not recognized as being an absolute path, and meson will end up
adding the prefix again.

Add an option to pass docdir location to meson, pre-prefixed like we do
with other directories, build qemu_docdir with the common suffix and use
that instead of config_host['qemu_docdir'].

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 configure         | 1 +
 docs/meson.build  | 4 ++--
 meson.build       | 4 +++-
 meson_options.txt | 2 ++
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 05b944fb8e..7b6a4a8264 100755
--- a/configure
+++ b/configure
@@ -8223,6 +8223,7 @@ NINJA=$PWD/ninjatool $meson setup \
         --mandir "${pre_prefix}$mandir" \
         --sysconfdir "${pre_prefix}$sysconfdir" \
         --localstatedir "${pre_prefix}$local_statedir" \
+        -Ddocdir="${pre_prefix}$docdir" \
         -Dqemu_suffix="$qemu_suffix" \
         -Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \
         -Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
diff --git a/docs/meson.build b/docs/meson.build
index 8b059a8e39..50f367349b 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -10,7 +10,7 @@ if build_docs
   configure_file(output: 'index.html',
                  input: files('index.html.in'),
                  configuration: {'VERSION': meson.project_version()},
-                 install_dir: config_host['qemu_docdir'])
+                 install_dir: qemu_docdir)
   manuals = [ 'devel', 'interop', 'tools', 'specs', 'system', 'user' ]
   man_pages = {
     'interop' : {
@@ -48,7 +48,7 @@ if build_docs
                           input_dir, output_dir])
     sphinxdocs += this_manual
     if build_docs and manual != 'devel'
-      install_subdir(output_dir, install_dir: config_host['qemu_docdir'])
+      install_subdir(output_dir, install_dir: qemu_docdir)
     endif
 
     these_man_pages = []
diff --git a/meson.build b/meson.build
index 9f0d7d3830..7570aab830 100644
--- a/meson.build
+++ b/meson.build
@@ -18,6 +18,7 @@ enable_modules = 'CONFIG_MODULES' in config_host
 enable_static = 'CONFIG_STATIC' in config_host
 build_docs = 'BUILD_DOCS' in config_host
 qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
+qemu_docdir = get_option('docdir') / get_option('qemu_suffix')
 config_host_data = configuration_data()
 genh = []
 
@@ -1170,7 +1171,7 @@ if build_docs
                       input: input,
                       output: output,
                       install: true,
-                      install_dir: config_host['qemu_docdir'] / 'interop',
+                      install_dir: qemu_docdir / 'interop',
                       command: cmd + args)
       endforeach
       alias_target(ext, t)
@@ -1233,6 +1234,7 @@ if targetos != 'windows'
 else
   summary_info += {'local state directory': 'queried at runtime'}
 endif
+summary_info += {'Doc directory':     get_option('docdir')}
 summary_info += {'Build directory':   meson.current_build_dir()}
 summary_info += {'Source path':       meson.current_source_dir()}
 summary_info += {'GIT binary':        config_host['GIT']}
diff --git a/meson_options.txt b/meson_options.txt
index 9e8db82995..555b860902 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,7 @@
 option('qemu_suffix', type : 'string', value: 'qemu',
        description: 'Suffix for QEMU data/modules/config directories (can be empty)')
+option('docdir', type : 'string', value : 'doc',
+       description: 'Base directory for documentation installation (can be empty)')
 option('gettext', type : 'boolean', value : true)
 option('sdl', type : 'feature', value : 'auto')
 option('sdl_image', type : 'feature', value : 'auto')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 7/8] meson: use meson mandir instead of qemu_mandir
  2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
                   ` (5 preceding siblings ...)
  2020-08-26 11:04 ` [PATCH v3 6/8] meson: pass docdir option marcandre.lureau
@ 2020-08-26 11:04 ` marcandre.lureau
  2020-08-26 11:04 ` [PATCH v3 8/8] meson: add NSIS building marcandre.lureau
  2020-08-26 11:37 ` [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion Paolo Bonzini
  8 siblings, 0 replies; 18+ messages in thread
From: marcandre.lureau @ 2020-08-26 11:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, berrange, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

When cross-compiling, by default qemu_mandir is 'c:\Program
Files\QEMU', which is not recognized as being an absolute path, and
meson will end up adding the prefix again.

Use the pre-prefixed meson mandir option instead.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 7570aab830..d3196ea2d2 100644
--- a/meson.build
+++ b/meson.build
@@ -1211,7 +1211,7 @@ if build_docs
                           output: man,
                           capture: true,
                           install: true,
-                          install_dir: config_host['mandir'] / 'man7',
+                          install_dir: get_option('mandir') / 'man7',
                           command: [pod2man, '--utf8', '--section=7', '--center=" "',
                                     '--release=" "', '@INPUT@'])
     endforeach
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 8/8] meson: add NSIS building
  2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
                   ` (6 preceding siblings ...)
  2020-08-26 11:04 ` [PATCH v3 7/8] meson: use meson mandir instead of qemu_mandir marcandre.lureau
@ 2020-08-26 11:04 ` marcandre.lureau
  2020-08-26 11:37 ` [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion Paolo Bonzini
  8 siblings, 0 replies; 18+ messages in thread
From: marcandre.lureau @ 2020-08-26 11:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, berrange, Marc-André Lureau, pbonzini

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
 Makefile        | 56 -----------------------------------
 meson.build     | 25 ++++++++++++++++
 scripts/nsis.py | 78 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 103 insertions(+), 56 deletions(-)
 create mode 100644 scripts/nsis.py

diff --git a/Makefile b/Makefile
index 81794d5c34..3ebd6929b4 100644
--- a/Makefile
+++ b/Makefile
@@ -294,62 +294,6 @@ endif
 		"$(DESTDIR)$(qemu_desktopdir)/qemu.desktop"
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
 
-ifdef CONFIG_WIN32
-
-INSTALLER = qemu-setup-$(VERSION)$(EXESUF)
-
-nsisflags = -V2 -NOCD
-
-ifneq ($(wildcard $(SRC_PATH)/dll),)
-ifeq ($(ARCH),x86_64)
-# 64 bit executables
-DLL_PATH = $(SRC_PATH)/dll/w64
-nsisflags += -DW64
-else
-# 32 bit executables
-DLL_PATH = $(SRC_PATH)/dll/w32
-endif
-endif
-
-.PHONY: installer
-installer: $(INSTALLER)
-
-INSTDIR=/tmp/qemu-nsis
-
-$(INSTALLER): $(SRC_PATH)/qemu.nsi
-	$(MAKE) install DESTDIR=${INSTDIR}
-ifdef SIGNCODE
-	(cd ${INSTDIR}/${bindir}; \
-         for i in *.exe; do \
-           $(SIGNCODE) $${i}; \
-         done \
-        )
-endif # SIGNCODE
-	(cd ${INSTDIR}/${bindir}; \
-         for i in qemu-system-*.exe; do \
-           arch=$${i%.exe}; \
-           arch=$${arch#qemu-system-}; \
-           echo Section \"$$arch\" Section_$$arch; \
-           echo SetOutPath \"\$$INSTDIR\"; \
-           echo File \"\$${BINDIR}\\$$i\"; \
-           echo SectionEnd; \
-         done \
-        ) >${INSTDIR}/${bindir}/system-emulations.nsh
-	makensis $(nsisflags) \
-                $(if $(BUILD_DOCS),-DCONFIG_DOCUMENTATION="y") \
-                $(if $(CONFIG_GTK),-DCONFIG_GTK="y") \
-                -DBINDIR="${INSTDIR}/${bindir}" \
-                $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \
-                -DSRCDIR="$(SRC_PATH)" \
-                -DOUTFILE="$(INSTALLER)" \
-                -DDISPLAYVERSION="$(VERSION)" \
-                $(SRC_PATH)/qemu.nsi
-	rm -r ${INSTDIR}
-ifdef SIGNCODE
-	$(SIGNCODE) $(INSTALLER)
-endif # SIGNCODE
-endif # CONFIG_WIN
-
 # Add a dependency on the generated files, so that they are always
 # rebuilt before other object files
 ifneq ($(wildcard config-host.mak),)
diff --git a/meson.build b/meson.build
index d3196ea2d2..eef6e67103 100644
--- a/meson.build
+++ b/meson.build
@@ -1218,6 +1218,31 @@ if build_docs
   endif
 endif
 
+if host_machine.system() == 'windows'
+  nsis_cmd = [
+    find_program('scripts/nsis.py'),
+    '@OUTPUT@',
+    get_option('prefix'),
+    meson.current_source_dir(),
+    host_machine.cpu_family(),
+    '--',
+    '-DDISPLAYVERSION=' + meson.project_version(),
+  ]
+  if build_docs
+    nsis_cmd += '-DCONFIG_DOCUMENTATION=y'
+  endif
+  if 'CONFIG_GTK' in config_host
+    nsis_cmd += '-DCONFIG_GTK=y'
+  endif
+
+  nsis = custom_target('nsis',
+                       output: 'qemu-setup-' + meson.project_version() + '.exe',
+                       input: files('qemu.nsi'),
+                       build_always_stale: true,
+                       command: nsis_cmd + ['@INPUT@'])
+  alias_target('installer', nsis)
+endif
+
 summary_info = {}
 summary_info += {'Install prefix':    config_host['prefix']}
 summary_info += {'BIOS directory':    config_host['qemu_datadir']}
diff --git a/scripts/nsis.py b/scripts/nsis.py
new file mode 100644
index 0000000000..e1c409344e
--- /dev/null
+++ b/scripts/nsis.py
@@ -0,0 +1,78 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2020 Red Hat, Inc.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import argparse
+import glob
+import os
+import shutil
+import subprocess
+import tempfile
+
+
+def signcode(path):
+    cmd = os.environ.get("SIGNCODE")
+    if not cmd:
+        return
+    subprocess.run([cmd, path])
+
+
+def main():
+    parser = argparse.ArgumentParser(description="QEMU NSIS build helper.")
+    parser.add_argument("outfile")
+    parser.add_argument("prefix")
+    parser.add_argument("srcdir")
+    parser.add_argument("cpu")
+    parser.add_argument("nsisargs", nargs="*")
+    args = parser.parse_args()
+
+    destdir = tempfile.mkdtemp()
+    try:
+        subprocess.run(["make", "install", "DESTDIR=" + destdir + os.path.sep])
+        with open(
+            os.path.join(destdir + args.prefix, "system-emulations.nsh"), "w"
+        ) as nsh:
+            for exe in glob.glob(
+                os.path.join(destdir + args.prefix, "qemu-system-*.exe")
+            ):
+                exe = os.path.basename(exe)
+                arch = exe[12:-4]
+                nsh.write(
+                    """
+                Section "{0}" Section_{0}
+                SetOutPath "$INSTDIR"
+                File "${{BINDIR}}\\{1}"
+                SectionEnd
+                """.format(
+                        arch, exe
+                    )
+                )
+
+        for exe in glob.glob(os.path.join(destdir + args.prefix, "*.exe")):
+            signcode(exe)
+
+        makensis = [
+            "makensis",
+            "-V2",
+            "-NOCD",
+            "-DSRCDIR=" + args.srcdir,
+            "-DBINDIR=" + destdir + args.prefix,
+        ]
+        dlldir = "w32"
+        if args.cpu == "x86_64":
+            dlldir = "w64"
+            makensis += ["-DW64"]
+        if os.path.exists(os.path.join(args.srcdir, "dll")):
+            makensis += "-DDLLDIR={0}/dll/{1}".format(args.srcdir, dlldir)
+
+        makensis += ["-DOUTFILE=" + args.outfile] + args.nsisargs
+        subprocess.run(makensis)
+        signcode(args.outfile)
+    finally:
+        shutil.rmtree(destdir)
+
+
+if __name__ == "__main__":
+    main()
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion
  2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
                   ` (7 preceding siblings ...)
  2020-08-26 11:04 ` [PATCH v3 8/8] meson: add NSIS building marcandre.lureau
@ 2020-08-26 11:37 ` Paolo Bonzini
  2020-08-26 11:50   ` Marc-André Lureau
  8 siblings, 1 reply; 18+ messages in thread
From: Paolo Bonzini @ 2020-08-26 11:37 UTC (permalink / raw)
  To: Marc-Andre Lureau; +Cc: sw, berrange, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

Since behavioral changes should be reviewed separately let's just include
v2 first.

Paolo

Il mer 26 ago 2020, 13:04 <marcandre.lureau@redhat.com> ha scritto:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Hi,
>
> The following patches fix installation path when cross-compiling Windows
> version, and move the NSIS build rule to meson.
>
> v3:
>  - change qemu suffix handling, make /-separator implicit
>  - use qemu suffix to build qemu_docdir, as --help says
>  - use / to construct qemu directory variables in meson
>  - add a few signed-off from Daniel
>
> v2:
>  - replaced the shell script by a python version
>  - add copyright/license for the new python script
>
> Marc-André Lureau (8):
>   configure: rename confsuffix option
>   configure: always /-seperate directory from qemu_suffix
>   configure: build docdir like other suffixed directories
>   meson: pass qemu_suffix option
>   meson: use meson datadir instead of qemu_datadir
>   meson: pass docdir option
>   meson: use meson mandir instead of qemu_mandir
>   meson: add NSIS building
>
>  Makefile                           | 56 ---------------------
>  configure                          | 27 ++++++-----
>  contrib/vhost-user-gpu/meson.build |  2 +-
>  docs/meson.build                   |  4 +-
>  meson.build                        | 34 +++++++++++--
>  meson_options.txt                  |  4 ++
>  pc-bios/descriptors/meson.build    |  2 +-
>  pc-bios/keymaps/meson.build        |  6 +--
>  pc-bios/meson.build                |  2 +-
>  scripts/nsis.py                    | 78 ++++++++++++++++++++++++++++++
>  tools/virtiofsd/meson.build        |  2 +-
>  trace/meson.build                  |  2 +-
>  12 files changed, 138 insertions(+), 81 deletions(-)
>  create mode 100644 scripts/nsis.py
>
> --
> 2.26.2
>
>
>

[-- Attachment #2: Type: text/html, Size: 2496 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion
  2020-08-26 11:37 ` [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion Paolo Bonzini
@ 2020-08-26 11:50   ` Marc-André Lureau
  2020-08-26 13:46     ` Paolo Bonzini
  0 siblings, 1 reply; 18+ messages in thread
From: Marc-André Lureau @ 2020-08-26 11:50 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: sw, Daniel P. Berrange, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2377 bytes --]

Hi

On Wed, Aug 26, 2020 at 3:38 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> Since behavioral changes should be reviewed separately let's just include
> v2 first.
>
>
 I am more confident that this version doesn't introduce regressions
though.. The use of + qemu_confsuffix was problematic, and I noticed some
weird behaviour that I couldn't clearly identify (when updating meson &
running make only - iow, fresh configure && make should be ok, but for the
rest it's not as "clean" as this version..).

Paolo
>
> Il mer 26 ago 2020, 13:04 <marcandre.lureau@redhat.com> ha scritto:
>
>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>
>> Hi,
>>
>> The following patches fix installation path when cross-compiling Windows
>> version, and move the NSIS build rule to meson.
>>
>> v3:
>>  - change qemu suffix handling, make /-separator implicit
>>  - use qemu suffix to build qemu_docdir, as --help says
>>  - use / to construct qemu directory variables in meson
>>  - add a few signed-off from Daniel
>>
>> v2:
>>  - replaced the shell script by a python version
>>  - add copyright/license for the new python script
>>
>> Marc-André Lureau (8):
>>   configure: rename confsuffix option
>>   configure: always /-seperate directory from qemu_suffix
>>   configure: build docdir like other suffixed directories
>>   meson: pass qemu_suffix option
>>   meson: use meson datadir instead of qemu_datadir
>>   meson: pass docdir option
>>   meson: use meson mandir instead of qemu_mandir
>>   meson: add NSIS building
>>
>>  Makefile                           | 56 ---------------------
>>  configure                          | 27 ++++++-----
>>  contrib/vhost-user-gpu/meson.build |  2 +-
>>  docs/meson.build                   |  4 +-
>>  meson.build                        | 34 +++++++++++--
>>  meson_options.txt                  |  4 ++
>>  pc-bios/descriptors/meson.build    |  2 +-
>>  pc-bios/keymaps/meson.build        |  6 +--
>>  pc-bios/meson.build                |  2 +-
>>  scripts/nsis.py                    | 78 ++++++++++++++++++++++++++++++
>>  tools/virtiofsd/meson.build        |  2 +-
>>  trace/meson.build                  |  2 +-
>>  12 files changed, 138 insertions(+), 81 deletions(-)
>>  create mode 100644 scripts/nsis.py
>>
>> --
>> 2.26.2
>>
>>
>>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 3591 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion
  2020-08-26 11:50   ` Marc-André Lureau
@ 2020-08-26 13:46     ` Paolo Bonzini
  2020-08-26 16:38       ` Marc-André Lureau
  0 siblings, 1 reply; 18+ messages in thread
From: Paolo Bonzini @ 2020-08-26 13:46 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: sw, Daniel P. Berrange, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2688 bytes --]

We should document the difference in the 5.2 changelog then (it's okay to
introduce it since the configure option is named differently).

Il mer 26 ago 2020, 13:50 Marc-André Lureau <marcandre.lureau@gmail.com> ha
scritto:

> Hi
>
> On Wed, Aug 26, 2020 at 3:38 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>> Since behavioral changes should be reviewed separately let's just include
>> v2 first.
>>
>>
>  I am more confident that this version doesn't introduce regressions
> though.. The use of + qemu_confsuffix was problematic, and I noticed some
> weird behaviour that I couldn't clearly identify (when updating meson &
> running make only - iow, fresh configure && make should be ok, but for the
> rest it's not as "clean" as this version..).
>
> Paolo
>>
>> Il mer 26 ago 2020, 13:04 <marcandre.lureau@redhat.com> ha scritto:
>>
>>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>>
>>> Hi,
>>>
>>> The following patches fix installation path when cross-compiling Windows
>>> version, and move the NSIS build rule to meson.
>>>
>>> v3:
>>>  - change qemu suffix handling, make /-separator implicit
>>>  - use qemu suffix to build qemu_docdir, as --help says
>>>  - use / to construct qemu directory variables in meson
>>>  - add a few signed-off from Daniel
>>>
>>> v2:
>>>  - replaced the shell script by a python version
>>>  - add copyright/license for the new python script
>>>
>>> Marc-André Lureau (8):
>>>   configure: rename confsuffix option
>>>   configure: always /-seperate directory from qemu_suffix
>>>   configure: build docdir like other suffixed directories
>>>   meson: pass qemu_suffix option
>>>   meson: use meson datadir instead of qemu_datadir
>>>   meson: pass docdir option
>>>   meson: use meson mandir instead of qemu_mandir
>>>   meson: add NSIS building
>>>
>>>  Makefile                           | 56 ---------------------
>>>  configure                          | 27 ++++++-----
>>>  contrib/vhost-user-gpu/meson.build |  2 +-
>>>  docs/meson.build                   |  4 +-
>>>  meson.build                        | 34 +++++++++++--
>>>  meson_options.txt                  |  4 ++
>>>  pc-bios/descriptors/meson.build    |  2 +-
>>>  pc-bios/keymaps/meson.build        |  6 +--
>>>  pc-bios/meson.build                |  2 +-
>>>  scripts/nsis.py                    | 78 ++++++++++++++++++++++++++++++
>>>  tools/virtiofsd/meson.build        |  2 +-
>>>  trace/meson.build                  |  2 +-
>>>  12 files changed, 138 insertions(+), 81 deletions(-)
>>>  create mode 100644 scripts/nsis.py
>>>
>>> --
>>> 2.26.2
>>>
>>>
>>>
>
> --
> Marc-André Lureau
>

[-- Attachment #2: Type: text/html, Size: 4125 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion
  2020-08-26 13:46     ` Paolo Bonzini
@ 2020-08-26 16:38       ` Marc-André Lureau
  0 siblings, 0 replies; 18+ messages in thread
From: Marc-André Lureau @ 2020-08-26 16:38 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: sw, Daniel P. Berrange, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 3028 bytes --]

Hi

On Wed, Aug 26, 2020 at 5:47 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> We should document the difference in the 5.2 changelog then (it's okay to
> introduce it since the configure option is named differently).
>
>
Not directly related, but I can't help thinking that we would be better off
maintaining the changelog in git too, with sphinx yada yada..

Il mer 26 ago 2020, 13:50 Marc-André Lureau <marcandre.lureau@gmail.com> ha
> scritto:
>
>> Hi
>>
>> On Wed, Aug 26, 2020 at 3:38 PM Paolo Bonzini <pbonzini@redhat.com>
>> wrote:
>>
>>> Since behavioral changes should be reviewed separately let's just
>>> include v2 first.
>>>
>>>
>>  I am more confident that this version doesn't introduce regressions
>> though.. The use of + qemu_confsuffix was problematic, and I noticed some
>> weird behaviour that I couldn't clearly identify (when updating meson &
>> running make only - iow, fresh configure && make should be ok, but for the
>> rest it's not as "clean" as this version..).
>>
>> Paolo
>>>
>>> Il mer 26 ago 2020, 13:04 <marcandre.lureau@redhat.com> ha scritto:
>>>
>>>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>>>
>>>> Hi,
>>>>
>>>> The following patches fix installation path when cross-compiling Windows
>>>> version, and move the NSIS build rule to meson.
>>>>
>>>> v3:
>>>>  - change qemu suffix handling, make /-separator implicit
>>>>  - use qemu suffix to build qemu_docdir, as --help says
>>>>  - use / to construct qemu directory variables in meson
>>>>  - add a few signed-off from Daniel
>>>>
>>>> v2:
>>>>  - replaced the shell script by a python version
>>>>  - add copyright/license for the new python script
>>>>
>>>> Marc-André Lureau (8):
>>>>   configure: rename confsuffix option
>>>>   configure: always /-seperate directory from qemu_suffix
>>>>   configure: build docdir like other suffixed directories
>>>>   meson: pass qemu_suffix option
>>>>   meson: use meson datadir instead of qemu_datadir
>>>>   meson: pass docdir option
>>>>   meson: use meson mandir instead of qemu_mandir
>>>>   meson: add NSIS building
>>>>
>>>>  Makefile                           | 56 ---------------------
>>>>  configure                          | 27 ++++++-----
>>>>  contrib/vhost-user-gpu/meson.build |  2 +-
>>>>  docs/meson.build                   |  4 +-
>>>>  meson.build                        | 34 +++++++++++--
>>>>  meson_options.txt                  |  4 ++
>>>>  pc-bios/descriptors/meson.build    |  2 +-
>>>>  pc-bios/keymaps/meson.build        |  6 +--
>>>>  pc-bios/meson.build                |  2 +-
>>>>  scripts/nsis.py                    | 78 ++++++++++++++++++++++++++++++
>>>>  tools/virtiofsd/meson.build        |  2 +-
>>>>  trace/meson.build                  |  2 +-
>>>>  12 files changed, 138 insertions(+), 81 deletions(-)
>>>>  create mode 100644 scripts/nsis.py
>>>>
>>>> --
>>>> 2.26.2
>>>>
>>>>
>>>>
>>
>> --
>> Marc-André Lureau
>>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 4955 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 5/8] meson: use meson datadir instead of qemu_datadir
       [not found]   ` <20200909095147.p6ywqn5ze7mbmvm6@lws.brq.redhat.com>
@ 2020-09-09 10:13     ` Marc-André Lureau
       [not found]       ` <20200909124622.nsekxztqfrg6mijs@lws.brq.redhat.com>
  0 siblings, 1 reply; 18+ messages in thread
From: Marc-André Lureau @ 2020-09-09 10:13 UTC (permalink / raw)
  To: Miroslav Rezanina
  Cc: Stefan Weil, P. Berrange, Daniel, qemu-devel, Bonzini, Paolo

Hi

On Wed, Sep 9, 2020 at 1:51 PM Miroslav Rezanina <mrezanin@redhat.com> wrote:
>
> On Wed, Aug 26, 2020 at 03:04:16PM +0400, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > When cross-compiling, by default qemu_datadir is 'c:\Program
> > Files\QEMU', which is not recognized as being an absolute path, and
> > meson will end up adding the prefix again.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  contrib/vhost-user-gpu/meson.build | 2 +-
> >  meson.build                        | 3 ++-
> >  meson_options.txt                  | 2 +-
> >  pc-bios/descriptors/meson.build    | 2 +-
> >  pc-bios/keymaps/meson.build        | 6 +++---
> >  pc-bios/meson.build                | 2 +-
> >  tools/virtiofsd/meson.build        | 2 +-
> >  trace/meson.build                  | 2 +-
> >  8 files changed, 11 insertions(+), 10 deletions(-)
> >
> > diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/meson.build
> > index 6c1459f54a..8df4c13bc5 100644
> > --- a/contrib/vhost-user-gpu/meson.build
> > +++ b/contrib/vhost-user-gpu/meson.build
> > @@ -9,5 +9,5 @@ if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \
> >    configure_file(input: '50-qemu-gpu.json.in',
> >                   output: '50-qemu-gpu.json',
> >                   configuration: config_host,
> > -                 install_dir: config_host['qemu_datadir'] / 'vhost-user')
> > +                 install_dir: qemu_datadir / 'vhost-user')
> >  endif
> > diff --git a/meson.build b/meson.build
> > index f0fe5f8799..9f0d7d3830 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -17,6 +17,7 @@ config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak
> >  enable_modules = 'CONFIG_MODULES' in config_host
> >  enable_static = 'CONFIG_STATIC' in config_host
> >  build_docs = 'BUILD_DOCS' in config_host
> > +qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
> >  config_host_data = configuration_data()
> >  genh = []
> >
> > @@ -1039,7 +1040,7 @@ foreach target : target_dirs
> >                        output: exe_name + stp['ext'],
> >                        capture: true,
> >                        install: stp['install'],
> > -                      install_dir: config_host['qemu_datadir'] / '../systemtap/tapset',
> > +                      install_dir: qemu_datadir / '../systemtap/tapset',
> >                        command: [
> >                          tracetool, '--group=all', '--format=' + stp['fmt'],
> >                          '--binary=' + stp['bin'],
> > diff --git a/meson_options.txt b/meson_options.txt
> > index 1ef822bab3..9e8db82995 100644
> > --- a/meson_options.txt
> > +++ b/meson_options.txt
> > @@ -1,4 +1,4 @@
> > -option('qemu_suffix', type : 'string', value: '/qemu',
> > +option('qemu_suffix', type : 'string', value: 'qemu',
> >         description: 'Suffix for QEMU data/modules/config directories (can be empty)')
> >  option('gettext', type : 'boolean', value : true)
> >  option('sdl', type : 'feature', value : 'auto')
> > diff --git a/pc-bios/descriptors/meson.build b/pc-bios/descriptors/meson.build
> > index 7c715bace8..3798d32372 100644
> > --- a/pc-bios/descriptors/meson.build
> > +++ b/pc-bios/descriptors/meson.build
> > @@ -10,5 +10,5 @@ foreach f: [
> >                   output: f,
> >                   configuration: {'DATADIR': config_host['qemu_datadir']},
> >                   install: install_blobs,
> > -                 install_dir: config_host['qemu_datadir'] / 'firmware')
> > +                 install_dir: qemu_datadir / 'firmware')
> >  endforeach
> > diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
> > index b737c82230..bbac83ece3 100644
> > --- a/pc-bios/keymaps/meson.build
> > +++ b/pc-bios/keymaps/meson.build
> > @@ -44,13 +44,13 @@ foreach km, args: keymaps
> >                       build_by_default: true,
> >                       output: km,
> >                       command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
> > -                     install_dir: config_host['qemu_datadir'] / 'keymaps')
> > +                     install_dir: qemu_datadir / 'keymaps')
> >  endforeach
> >  if t.length() > 0
> >    alias_target('update-keymaps', t)
> >  else
> >    # install from the source tree
> > -  install_data(keymaps.keys(), install_dir: config_host['qemu_datadir'] / 'keymaps')
> > +  install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps')
> >  endif
> >
> > -install_data(['sl', 'sv'], install_dir: config_host['qemu_datadir'] / 'keymaps')
> > +install_data(['sl', 'sv'], install_dir: qemu_datadir / 'keymaps')
> > diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> > index b6389f5148..c11e52ba26 100644
> > --- a/pc-bios/meson.build
> > +++ b/pc-bios/meson.build
> > @@ -19,7 +19,7 @@ if 'DECOMPRESS_EDK2_BLOBS' in config_host
> >                    input: '@0@.bz2'.format(f),
> >                    capture: true,
> >                    install: install_blobs,
> > -                  install_dir: config_host['qemu_datadir'],
> > +                  install_dir: qemu_datadir,
> >                    command: [ bzip2, '-dc', '@INPUT0@' ])
> >    endforeach
> >  endif
> > diff --git a/tools/virtiofsd/meson.build b/tools/virtiofsd/meson.build
> > index d1e23c5760..50022ed89e 100644
> > --- a/tools/virtiofsd/meson.build
> > +++ b/tools/virtiofsd/meson.build
> > @@ -16,4 +16,4 @@ executable('virtiofsd', files(
> >  configure_file(input: '50-qemu-virtiofsd.json.in',
> >                 output: '50-qemu-virtiofsd.json',
> >                 configuration: config_host,
> > -               install_dir: config_host['qemu_datadir'] / 'vhost-user')
> > +               install_dir: qemu_datadir / 'vhost-user')
> > diff --git a/trace/meson.build b/trace/meson.build
> > index 56e870848e..5f0bf11cb5 100644
> > --- a/trace/meson.build
> > +++ b/trace/meson.build
> > @@ -55,7 +55,7 @@ trace_events_all = custom_target('trace-events-all',
> >                                   command: [ 'cat', '@INPUT@' ],
> >                                   capture: true,
> >                                   install: true,
> > -                                 install_dir: config_host['qemu_datadir'])
> > +                                 install_dir: qemu_datadir)
> >
> >  foreach d : [
> >    ['generated-tcg-tracers.h', 'tcg-h'],
> > --
> > 2.26.2
> >
> >
>
> Is there any change in configuration/build needed as this change cause that
> meson use /qemu instead of $datadir/qemu_suffix in our build?

Afaik, the install location shouldn't be changed after this. Do you
see a breaking change? Could you give some details?



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 2/8] configure: always /-seperate directory from qemu_suffix
  2020-08-26 11:04 ` [PATCH v3 2/8] configure: always /-seperate directory from qemu_suffix marcandre.lureau
@ 2020-09-09 13:15   ` Philippe Mathieu-Daudé
  2020-09-09 13:20     ` Marc-André Lureau
  0 siblings, 1 reply; 18+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-09 13:15 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel; +Cc: sw, berrange, pbonzini

On 8/26/20 1:04 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 

Typo "separate" in subject.

Btw can you copy the subject in the commit description?
This makes review simpler (no need to go back in the
thread view to see the subject and go back into the
mail to see the content).

> Otherwise, we may accept very strange directory names...
> 
> While at it, quote the variables.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  configure | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/configure b/configure
> index 0e04c47722..61216b9210 100755
> --- a/configure
> +++ b/configure
> @@ -474,7 +474,7 @@ modules="no"
>  module_upgrades="no"
>  prefix="/usr/local"
>  firmwarepath="\${prefix}/share/qemu-firmware"
> -qemu_suffix="/qemu"
> +qemu_suffix="qemu"
>  slirp=""
>  oss_lib=""
>  bsd="no"
> @@ -1823,12 +1823,12 @@ Advanced options (experts only):
>    --with-git=GIT           use specified git [$git]
>    --static                 enable static build [$static]
>    --mandir=PATH            install man pages in PATH
> -  --datadir=PATH           install firmware in PATH$qemu_suffix
> -  --docdir=PATH            install documentation in PATH$qemu_suffix
> +  --datadir=PATH           install firmware in PATH/$qemu_suffix
> +  --docdir=PATH            install documentation in PATH/$qemu_suffix
>    --bindir=PATH            install binaries in PATH
>    --libdir=PATH            install libraries in PATH
>    --libexecdir=PATH        install helper binaries in PATH
> -  --sysconfdir=PATH        install config in PATH$qemu_suffix
> +  --sysconfdir=PATH        install config in PATH/$qemu_suffix
>    --localstatedir=PATH     install local state in PATH (set at runtime on win32)
>    --firmwarepath=PATH      search PATH for firmware files
>    --efi-aarch64=PATH       PATH of efi file to use for aarch64 VMs.
> @@ -6467,9 +6467,9 @@ EOF
>      fi
>  fi
>  
> -qemu_confdir=$sysconfdir$qemu_suffix
> -qemu_moddir=$libdir$qemu_suffix
> -qemu_datadir=$datadir$qemu_suffix
> +qemu_confdir="$sysconfdir/$qemu_suffix"
> +qemu_moddir="$libdir/$qemu_suffix"
> +qemu_datadir="$datadir/$qemu_suffix"
>  qemu_localedir="$datadir/locale"
>  qemu_icondir="$datadir/icons"
>  qemu_desktopdir="$datadir/applications"
> 



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 5/8] meson: use meson datadir instead of qemu_datadir
       [not found]       ` <20200909124622.nsekxztqfrg6mijs@lws.brq.redhat.com>
@ 2020-09-09 13:17         ` Marc-André Lureau
  2020-09-09 13:21           ` Paolo Bonzini
  0 siblings, 1 reply; 18+ messages in thread
From: Marc-André Lureau @ 2020-09-09 13:17 UTC (permalink / raw)
  To: Miroslav Rezanina
  Cc: Stefan Weil, P. Berrange, Daniel, qemu-devel, Bonzini, Paolo

Hi

On Wed, Sep 9, 2020 at 4:46 PM Miroslav Rezanina <mrezanin@redhat.com> wrote:
>
> On Wed, Sep 09, 2020 at 02:13:25PM +0400, Marc-André Lureau wrote:
> > Hi
> >
> > On Wed, Sep 9, 2020 at 1:51 PM Miroslav Rezanina <mrezanin@redhat.com> wrote:
> > >
> > > On Wed, Aug 26, 2020 at 03:04:16PM +0400, marcandre.lureau@redhat.com wrote:
> > > > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > > >
> > > > When cross-compiling, by default qemu_datadir is 'c:\Program
> > > > Files\QEMU', which is not recognized as being an absolute path, and
> > > > meson will end up adding the prefix again.
> > > >
> > > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > > > ---
> > > >  contrib/vhost-user-gpu/meson.build | 2 +-
> > > >  meson.build                        | 3 ++-
> > > >  meson_options.txt                  | 2 +-
> > > >  pc-bios/descriptors/meson.build    | 2 +-
> > > >  pc-bios/keymaps/meson.build        | 6 +++---
> > > >  pc-bios/meson.build                | 2 +-
> > > >  tools/virtiofsd/meson.build        | 2 +-
> > > >  trace/meson.build                  | 2 +-
> > > >  8 files changed, 11 insertions(+), 10 deletions(-)
> > > >
> > > > diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/meson.build
> > > > index 6c1459f54a..8df4c13bc5 100644
> > > > --- a/contrib/vhost-user-gpu/meson.build
> > > > +++ b/contrib/vhost-user-gpu/meson.build
> > > > @@ -9,5 +9,5 @@ if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \
> > > >    configure_file(input: '50-qemu-gpu.json.in',
> > > >                   output: '50-qemu-gpu.json',
> > > >                   configuration: config_host,
> > > > -                 install_dir: config_host['qemu_datadir'] / 'vhost-user')
> > > > +                 install_dir: qemu_datadir / 'vhost-user')
> > > >  endif
> > > > diff --git a/meson.build b/meson.build
> > > > index f0fe5f8799..9f0d7d3830 100644
> > > > --- a/meson.build
> > > > +++ b/meson.build
> > > > @@ -17,6 +17,7 @@ config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak
> > > >  enable_modules = 'CONFIG_MODULES' in config_host
> > > >  enable_static = 'CONFIG_STATIC' in config_host
> > > >  build_docs = 'BUILD_DOCS' in config_host
> > > > +qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
> > > >  config_host_data = configuration_data()
> > > >  genh = []
> > > >
> > > > @@ -1039,7 +1040,7 @@ foreach target : target_dirs
> > > >                        output: exe_name + stp['ext'],
> > > >                        capture: true,
> > > >                        install: stp['install'],
> > > > -                      install_dir: config_host['qemu_datadir'] / '../systemtap/tapset',
> > > > +                      install_dir: qemu_datadir / '../systemtap/tapset',
> > > >                        command: [
> > > >                          tracetool, '--group=all', '--format=' + stp['fmt'],
> > > >                          '--binary=' + stp['bin'],
> > > > diff --git a/meson_options.txt b/meson_options.txt
> > > > index 1ef822bab3..9e8db82995 100644
> > > > --- a/meson_options.txt
> > > > +++ b/meson_options.txt
> > > > @@ -1,4 +1,4 @@
> > > > -option('qemu_suffix', type : 'string', value: '/qemu',
> > > > +option('qemu_suffix', type : 'string', value: 'qemu',
> > > >         description: 'Suffix for QEMU data/modules/config directories (can be empty)')
> > > >  option('gettext', type : 'boolean', value : true)
> > > >  option('sdl', type : 'feature', value : 'auto')
> > > > diff --git a/pc-bios/descriptors/meson.build b/pc-bios/descriptors/meson.build
> > > > index 7c715bace8..3798d32372 100644
> > > > --- a/pc-bios/descriptors/meson.build
> > > > +++ b/pc-bios/descriptors/meson.build
> > > > @@ -10,5 +10,5 @@ foreach f: [
> > > >                   output: f,
> > > >                   configuration: {'DATADIR': config_host['qemu_datadir']},
> > > >                   install: install_blobs,
> > > > -                 install_dir: config_host['qemu_datadir'] / 'firmware')
> > > > +                 install_dir: qemu_datadir / 'firmware')
> > > >  endforeach
> > > > diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
> > > > index b737c82230..bbac83ece3 100644
> > > > --- a/pc-bios/keymaps/meson.build
> > > > +++ b/pc-bios/keymaps/meson.build
> > > > @@ -44,13 +44,13 @@ foreach km, args: keymaps
> > > >                       build_by_default: true,
> > > >                       output: km,
> > > >                       command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
> > > > -                     install_dir: config_host['qemu_datadir'] / 'keymaps')
> > > > +                     install_dir: qemu_datadir / 'keymaps')
> > > >  endforeach
> > > >  if t.length() > 0
> > > >    alias_target('update-keymaps', t)
> > > >  else
> > > >    # install from the source tree
> > > > -  install_data(keymaps.keys(), install_dir: config_host['qemu_datadir'] / 'keymaps')
> > > > +  install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps')
> > > >  endif
> > > >
> > > > -install_data(['sl', 'sv'], install_dir: config_host['qemu_datadir'] / 'keymaps')
> > > > +install_data(['sl', 'sv'], install_dir: qemu_datadir / 'keymaps')
> > > > diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> > > > index b6389f5148..c11e52ba26 100644
> > > > --- a/pc-bios/meson.build
> > > > +++ b/pc-bios/meson.build
> > > > @@ -19,7 +19,7 @@ if 'DECOMPRESS_EDK2_BLOBS' in config_host
> > > >                    input: '@0@.bz2'.format(f),
> > > >                    capture: true,
> > > >                    install: install_blobs,
> > > > -                  install_dir: config_host['qemu_datadir'],
> > > > +                  install_dir: qemu_datadir,
> > > >                    command: [ bzip2, '-dc', '@INPUT0@' ])
> > > >    endforeach
> > > >  endif
> > > > diff --git a/tools/virtiofsd/meson.build b/tools/virtiofsd/meson.build
> > > > index d1e23c5760..50022ed89e 100644
> > > > --- a/tools/virtiofsd/meson.build
> > > > +++ b/tools/virtiofsd/meson.build
> > > > @@ -16,4 +16,4 @@ executable('virtiofsd', files(
> > > >  configure_file(input: '50-qemu-virtiofsd.json.in',
> > > >                 output: '50-qemu-virtiofsd.json',
> > > >                 configuration: config_host,
> > > > -               install_dir: config_host['qemu_datadir'] / 'vhost-user')
> > > > +               install_dir: qemu_datadir / 'vhost-user')
> > > > diff --git a/trace/meson.build b/trace/meson.build
> > > > index 56e870848e..5f0bf11cb5 100644
> > > > --- a/trace/meson.build
> > > > +++ b/trace/meson.build
> > > > @@ -55,7 +55,7 @@ trace_events_all = custom_target('trace-events-all',
> > > >                                   command: [ 'cat', '@INPUT@' ],
> > > >                                   capture: true,
> > > >                                   install: true,
> > > > -                                 install_dir: config_host['qemu_datadir'])
> > > > +                                 install_dir: qemu_datadir)
> > > >
> > > >  foreach d : [
> > > >    ['generated-tcg-tracers.h', 'tcg-h'],
> > > > --
> > > > 2.26.2
> > > >
> > > >
> > >
> > > Is there any change in configuration/build needed as this change cause that
> > > meson use /qemu instead of $datadir/qemu_suffix in our build?
> >
> > Afaik, the install location shouldn't be changed after this. Do you
> > see a breaking change? Could you give some details?
> >
>
> After chat with Marc, we were able to identify the problem. I properly changed
> --with-confsuffix to --with-suffix but pass wrong value in there as we used to
> pass /qemu-kvm (so I use --with-suffix=/qemu-kvm). This was breaking the meson
> handling. After update to -with-suffix=qemu build pass successfully.

I think this is due to meson peculiar / operator.

'a' / 'b' = 'a/b'

but

'a' / '/b' = '/b'

I propose to silently remove the leading '/' in --with-suffix
argument, or warn/error about its presence.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 2/8] configure: always /-seperate directory from qemu_suffix
  2020-09-09 13:15   ` Philippe Mathieu-Daudé
@ 2020-09-09 13:20     ` Marc-André Lureau
  0 siblings, 0 replies; 18+ messages in thread
From: Marc-André Lureau @ 2020-09-09 13:20 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Stefan Weil, P. Berrange, Daniel, qemu-devel, Bonzini, Paolo

Hi

On Wed, Sep 9, 2020 at 5:15 PM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 8/26/20 1:04 PM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
>
> Typo "separate" in subject.
>
> Btw can you copy the subject in the commit description?
> This makes review simpler (no need to go back in the
> thread view to see the subject and go back into the
> mail to see the content).

ok

>
> > Otherwise, we may accept very strange directory names...
> >
> > While at it, quote the variables.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

The patch is already merged upstream :)

>
> > ---
> >  configure | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/configure b/configure
> > index 0e04c47722..61216b9210 100755
> > --- a/configure
> > +++ b/configure
> > @@ -474,7 +474,7 @@ modules="no"
> >  module_upgrades="no"
> >  prefix="/usr/local"
> >  firmwarepath="\${prefix}/share/qemu-firmware"
> > -qemu_suffix="/qemu"
> > +qemu_suffix="qemu"
> >  slirp=""
> >  oss_lib=""
> >  bsd="no"
> > @@ -1823,12 +1823,12 @@ Advanced options (experts only):
> >    --with-git=GIT           use specified git [$git]
> >    --static                 enable static build [$static]
> >    --mandir=PATH            install man pages in PATH
> > -  --datadir=PATH           install firmware in PATH$qemu_suffix
> > -  --docdir=PATH            install documentation in PATH$qemu_suffix
> > +  --datadir=PATH           install firmware in PATH/$qemu_suffix
> > +  --docdir=PATH            install documentation in PATH/$qemu_suffix
> >    --bindir=PATH            install binaries in PATH
> >    --libdir=PATH            install libraries in PATH
> >    --libexecdir=PATH        install helper binaries in PATH
> > -  --sysconfdir=PATH        install config in PATH$qemu_suffix
> > +  --sysconfdir=PATH        install config in PATH/$qemu_suffix
> >    --localstatedir=PATH     install local state in PATH (set at runtime on win32)
> >    --firmwarepath=PATH      search PATH for firmware files
> >    --efi-aarch64=PATH       PATH of efi file to use for aarch64 VMs.
> > @@ -6467,9 +6467,9 @@ EOF
> >      fi
> >  fi
> >
> > -qemu_confdir=$sysconfdir$qemu_suffix
> > -qemu_moddir=$libdir$qemu_suffix
> > -qemu_datadir=$datadir$qemu_suffix
> > +qemu_confdir="$sysconfdir/$qemu_suffix"
> > +qemu_moddir="$libdir/$qemu_suffix"
> > +qemu_datadir="$datadir/$qemu_suffix"
> >  qemu_localedir="$datadir/locale"
> >  qemu_icondir="$datadir/icons"
> >  qemu_desktopdir="$datadir/applications"
> >
>



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 5/8] meson: use meson datadir instead of qemu_datadir
  2020-09-09 13:17         ` Marc-André Lureau
@ 2020-09-09 13:21           ` Paolo Bonzini
  0 siblings, 0 replies; 18+ messages in thread
From: Paolo Bonzini @ 2020-09-09 13:21 UTC (permalink / raw)
  To: Marc-André Lureau
  Cc: Stefan Weil, Miroslav Rezanina, P. Berrange, Daniel, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

Il mer 9 set 2020, 15:18 Marc-André Lureau <marcandre.lureau@redhat.com> ha
scritto:

> I propose to silently remove the leading '/' in --with-suffix
> argument, or warn/error about its presence.
>

Sounds good to just remove it; recent meson has a substring method so we
can do that in meson.build too.

Paolo


>

[-- Attachment #2: Type: text/html, Size: 902 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-09-09 13:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-26 11:04 [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion marcandre.lureau
2020-08-26 11:04 ` [PATCH v3 1/8] configure: rename confsuffix option marcandre.lureau
2020-08-26 11:04 ` [PATCH v3 2/8] configure: always /-seperate directory from qemu_suffix marcandre.lureau
2020-09-09 13:15   ` Philippe Mathieu-Daudé
2020-09-09 13:20     ` Marc-André Lureau
2020-08-26 11:04 ` [PATCH v3 3/8] configure: build docdir like other suffixed directories marcandre.lureau
2020-08-26 11:04 ` [PATCH v3 4/8] meson: pass qemu_suffix option marcandre.lureau
2020-08-26 11:04 ` [PATCH v3 5/8] meson: use meson datadir instead of qemu_datadir marcandre.lureau
     [not found]   ` <20200909095147.p6ywqn5ze7mbmvm6@lws.brq.redhat.com>
2020-09-09 10:13     ` Marc-André Lureau
     [not found]       ` <20200909124622.nsekxztqfrg6mijs@lws.brq.redhat.com>
2020-09-09 13:17         ` Marc-André Lureau
2020-09-09 13:21           ` Paolo Bonzini
2020-08-26 11:04 ` [PATCH v3 6/8] meson: pass docdir option marcandre.lureau
2020-08-26 11:04 ` [PATCH v3 7/8] meson: use meson mandir instead of qemu_mandir marcandre.lureau
2020-08-26 11:04 ` [PATCH v3 8/8] meson: add NSIS building marcandre.lureau
2020-08-26 11:37 ` [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion Paolo Bonzini
2020-08-26 11:50   ` Marc-André Lureau
2020-08-26 13:46     ` Paolo Bonzini
2020-08-26 16:38       ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).