* [PATCH v5 0/2] meson: Fixes for dbus modules
@ 2023-12-17 6:12 Akihiko Odaki
2023-12-17 6:12 ` [PATCH v5 1/2] util: Move dbus_display1 to util Akihiko Odaki
2023-12-17 6:12 ` [PATCH v5 2/2] audio: Do not include ui/dbus.h Akihiko Odaki
0 siblings, 2 replies; 5+ messages in thread
From: Akihiko Odaki @ 2023-12-17 6:12 UTC (permalink / raw)
To: Marc-André Lureau, Gerd Hoffmann, Paolo Bonzini,
Daniel P. Berrangé, Thomas Huth, Philippe Mathieu-Daudé,
Laurent Vivier
Cc: qemu-devel, Akihiko Odaki
I found it was failing to build dbus modules when --enable-dbus so here
are fixes.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
Changes in v5:
- Fixed docs/interop/dbus-display.rst.
- Link to v4: https://lore.kernel.org/r/20231217-dbus-v4-0-4fd5410bf04f@daynix.com
Changes in v4:
- Moved dbus_display1 to util.
- Link to v3: https://lore.kernel.org/r/20231216-dbus-v3-0-b4bcbed7374a@daynix.com
Changes in v3:
- Merged dbus_display1_lib into libqemuutil.
- Added patch "audio: Do not include ui/dbus.h".
- Link to v2: https://lore.kernel.org/r/20231215-dbus-v2-0-1e2e6aa02115@daynix.com
Changes in v2:
- Updated MAINTAINERS.
- Link to v1: https://lore.kernel.org/r/20231215-dbus-v1-0-349e059ac5b2@daynix.com
---
Akihiko Odaki (2):
util: Move dbus_display1 to util
audio: Do not include ui/dbus.h
MAINTAINERS | 2 +-
docs/interop/dbus-display.rst | 6 +++---
ui/dbus.h | 2 +-
audio/dbusaudio.c | 3 +--
tests/qtest/dbus-display-test.c | 2 +-
audio/meson.build | 2 +-
tests/qtest/meson.build | 2 +-
ui/meson.build | 20 +-------------------
{ui => util}/dbus-display1.xml | 0
util/meson.build | 21 +++++++++++++++++++++
10 files changed, 31 insertions(+), 29 deletions(-)
---
base-commit: 4705fc0c8511d073bee4751c3c974aab2b10a970
change-id: 20231215-dbus-86876ecb7b09
Best regards,
--
Akihiko Odaki <akihiko.odaki@daynix.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v5 1/2] util: Move dbus_display1 to util 2023-12-17 6:12 [PATCH v5 0/2] meson: Fixes for dbus modules Akihiko Odaki @ 2023-12-17 6:12 ` Akihiko Odaki 2023-12-17 6:12 ` [PATCH v5 2/2] audio: Do not include ui/dbus.h Akihiko Odaki 1 sibling, 0 replies; 5+ messages in thread From: Akihiko Odaki @ 2023-12-17 6:12 UTC (permalink / raw) To: Marc-André Lureau, Gerd Hoffmann, Paolo Bonzini, Daniel P. Berrangé, Thomas Huth, Philippe Mathieu-Daudé, Laurent Vivier Cc: qemu-devel, Akihiko Odaki Move dbus_display1 from ui to util as it's used not only by ui/dbus but also dbus-display-test. dbus_display1 is now added to util_ss accordingly. It ensures that the source will be linked with audio/dbus, and also avoids recompilation when linking with dbus-display-test. dbus-display.h is also added to genh to ensure it is generated before compiling ui/dbus, audio/dbus, and dbus-display-test. Both changes combined, it is no longer necessary for ui/dbus, audio/dbus, and dbus-display-test to explicitly state the dependency on dbus_display1. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> --- MAINTAINERS | 2 +- docs/interop/dbus-display.rst | 6 +++--- ui/dbus.h | 2 +- audio/dbusaudio.c | 2 +- tests/qtest/dbus-display-test.c | 2 +- tests/qtest/meson.build | 2 +- ui/meson.build | 20 +------------------- {ui => util}/dbus-display1.xml | 0 util/meson.build | 21 +++++++++++++++++++++ 9 files changed, 30 insertions(+), 27 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 695e0bd34fbb..aefc2b62d9f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3381,7 +3381,7 @@ S: Maintained F: backends/dbus-vmstate.c F: ui/dbus* F: audio/dbus* -F: util/dbus.c +F: util/dbus* F: include/ui/dbus* F: include/qemu/dbus.h F: docs/interop/dbus* diff --git a/docs/interop/dbus-display.rst b/docs/interop/dbus-display.rst index 8c6e8e0f5a82..efec89723a34 100644 --- a/docs/interop/dbus-display.rst +++ b/docs/interop/dbus-display.rst @@ -18,14 +18,14 @@ QEMU also implements the standard interfaces, such as .. only:: sphinx4 - .. dbus-doc:: ui/dbus-display1.xml + .. dbus-doc:: util/dbus-display1.xml .. only:: not sphinx4 .. warning:: Sphinx 4 is required to build D-Bus documentation. - This is the content of ``ui/dbus-display1.xml``: + This is the content of ``util/dbus-display1.xml``: - .. literalinclude:: ../../ui/dbus-display1.xml + .. literalinclude:: ../../util/dbus-display1.xml :language: xml diff --git a/ui/dbus.h b/ui/dbus.h index 1e8c24a48e32..a847bee98876 100644 --- a/ui/dbus.h +++ b/ui/dbus.h @@ -31,7 +31,7 @@ #include "ui/console.h" #include "ui/clipboard.h" -#include "ui/dbus-display1.h" +#include "util/dbus-display1.h" typedef struct DBusClipboardRequest { GDBusMethodInvocation *invocation; diff --git a/audio/dbusaudio.c b/audio/dbusaudio.c index 60fcf643ecf8..2aacdac6715b 100644 --- a/audio/dbusaudio.c +++ b/audio/dbusaudio.c @@ -34,7 +34,7 @@ #endif #include "ui/dbus.h" -#include "ui/dbus-display1.h" +#include "util/dbus-display1.h" #define AUDIO_CAP "dbus" #include "audio.h" diff --git a/tests/qtest/dbus-display-test.c b/tests/qtest/dbus-display-test.c index 21edaa1e321f..d4871e2fd80f 100644 --- a/tests/qtest/dbus-display-test.c +++ b/tests/qtest/dbus-display-test.c @@ -5,7 +5,7 @@ #include <gio/gio.h> #include <gio/gunixfdlist.h> #include "libqtest.h" -#include "ui/dbus-display1.h" +#include "util/dbus-display1.h" static GDBusConnection* test_dbus_p2p_from_fd(int fd) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 47dabf91d048..225cd35e4664 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -332,7 +332,7 @@ if vnc.found() endif if dbus_display - qtests += {'dbus-display-test': [dbus_display1, gio]} + qtests += {'dbus-display-test': [gio]} endif qtest_executables = {} diff --git a/ui/meson.build b/ui/meson.build index 0ccb3387ee6a..21d1d3b27f29 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -75,25 +75,7 @@ endif if dbus_display dbus_ss = ss.source_set() - env = environment() - env.set('TARGETOS', targetos) - xml = custom_target('dbus-display preprocess', - input: 'dbus-display1.xml', - output: 'dbus-display1.xml', - env: env, - command: [xml_pp, '@INPUT@', '@OUTPUT@']) - dbus_display1 = custom_target('dbus-display gdbus-codegen', - output: ['dbus-display1.h', 'dbus-display1.c'], - input: xml, - command: [gdbus_codegen, '@INPUT@', - '--glib-min-required', '2.64', - '--output-directory', meson.current_build_dir(), - '--interface-prefix', 'org.qemu.', - '--c-namespace', 'QemuDBus', - '--generate-c-code', '@BASENAME@']) - dbus_display1_lib = static_library('dbus-display1', dbus_display1, dependencies: gio) - dbus_display1_dep = declare_dependency(link_with: dbus_display1_lib, include_directories: include_directories('.')) - dbus_ss.add(when: [gio, dbus_display1_dep], + dbus_ss.add(when: [gio], if_true: [files( 'dbus-chardev.c', 'dbus-clipboard.c', diff --git a/ui/dbus-display1.xml b/util/dbus-display1.xml similarity index 100% rename from ui/dbus-display1.xml rename to util/dbus-display1.xml diff --git a/util/meson.build b/util/meson.build index c2322ef6e71a..268a8ab03671 100644 --- a/util/meson.build +++ b/util/meson.build @@ -119,3 +119,24 @@ elif cpu == 'loongarch64' elif cpu in ['ppc', 'ppc64'] util_ss.add(files('cpuinfo-ppc.c')) endif + +if dbus_display + env = environment() + env.set('TARGETOS', targetos) + xml = custom_target('dbus-display preprocess', + input: 'dbus-display1.xml', + output: 'dbus-display1.xml', + env: env, + command: [xml_pp, '@INPUT@', '@OUTPUT@']) + dbus_display1 = custom_target('dbus-display gdbus-codegen', + output: ['dbus-display1.h', 'dbus-display1.c'], + input: xml, + command: [gdbus_codegen, '@INPUT@', + '--glib-min-required', '2.64', + '--output-directory', meson.current_build_dir(), + '--interface-prefix', 'org.qemu.', + '--c-namespace', 'QemuDBus', + '--generate-c-code', '@BASENAME@']) + util_ss.add(dbus_display1) + genh += dbus_display1[0] +endif -- 2.43.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v5 2/2] audio: Do not include ui/dbus.h 2023-12-17 6:12 [PATCH v5 0/2] meson: Fixes for dbus modules Akihiko Odaki 2023-12-17 6:12 ` [PATCH v5 1/2] util: Move dbus_display1 to util Akihiko Odaki @ 2023-12-17 6:12 ` Akihiko Odaki 2023-12-18 7:06 ` Marc-André Lureau 1 sibling, 1 reply; 5+ messages in thread From: Akihiko Odaki @ 2023-12-17 6:12 UTC (permalink / raw) To: Marc-André Lureau, Gerd Hoffmann, Paolo Bonzini, Daniel P. Berrangé, Thomas Huth, Philippe Mathieu-Daudé, Laurent Vivier Cc: qemu-devel, Akihiko Odaki ui/dbusaudio.c does not depend on ui/dbus.h Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> --- audio/dbusaudio.c | 1 - audio/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/audio/dbusaudio.c b/audio/dbusaudio.c index 2aacdac6715b..3cd8e294501f 100644 --- a/audio/dbusaudio.c +++ b/audio/dbusaudio.c @@ -33,7 +33,6 @@ #include <gio/gunixfdlist.h> #endif -#include "ui/dbus.h" #include "util/dbus-display1.h" #define AUDIO_CAP "dbus" diff --git a/audio/meson.build b/audio/meson.build index c8f658611f42..8931c1697b4d 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -30,7 +30,7 @@ endforeach if dbus_display module_ss = ss.source_set() - module_ss.add(when: [gio, pixman], if_true: files('dbusaudio.c')) + module_ss.add(when: [gio], if_true: files('dbusaudio.c')) audio_modules += {'dbus': module_ss} endif -- 2.43.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v5 2/2] audio: Do not include ui/dbus.h 2023-12-17 6:12 ` [PATCH v5 2/2] audio: Do not include ui/dbus.h Akihiko Odaki @ 2023-12-18 7:06 ` Marc-André Lureau 2023-12-18 7:08 ` Akihiko Odaki 0 siblings, 1 reply; 5+ messages in thread From: Marc-André Lureau @ 2023-12-18 7:06 UTC (permalink / raw) To: Akihiko Odaki Cc: Gerd Hoffmann, Paolo Bonzini, Daniel P. Berrangé, Thomas Huth, Philippe Mathieu-Daudé, Laurent Vivier, qemu-devel Hi On Sun, Dec 17, 2023 at 10:14 AM Akihiko Odaki <akihiko.odaki@daynix.com> wrote: > > ui/dbusaudio.c does not depend on ui/dbus.h > It uses dbus_win32_import_socket() > Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> > --- > audio/dbusaudio.c | 1 - > audio/meson.build | 2 +- > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/audio/dbusaudio.c b/audio/dbusaudio.c > index 2aacdac6715b..3cd8e294501f 100644 > --- a/audio/dbusaudio.c > +++ b/audio/dbusaudio.c > @@ -33,7 +33,6 @@ > #include <gio/gunixfdlist.h> > #endif > > -#include "ui/dbus.h" > #include "util/dbus-display1.h" > > #define AUDIO_CAP "dbus" > diff --git a/audio/meson.build b/audio/meson.build > index c8f658611f42..8931c1697b4d 100644 > --- a/audio/meson.build > +++ b/audio/meson.build > @@ -30,7 +30,7 @@ endforeach > > if dbus_display > module_ss = ss.source_set() > - module_ss.add(when: [gio, pixman], if_true: files('dbusaudio.c')) > + module_ss.add(when: [gio], if_true: files('dbusaudio.c')) > audio_modules += {'dbus': module_ss} > endif > > > -- > 2.43.0 > > -- Marc-André Lureau ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v5 2/2] audio: Do not include ui/dbus.h 2023-12-18 7:06 ` Marc-André Lureau @ 2023-12-18 7:08 ` Akihiko Odaki 0 siblings, 0 replies; 5+ messages in thread From: Akihiko Odaki @ 2023-12-18 7:08 UTC (permalink / raw) To: Marc-André Lureau Cc: Gerd Hoffmann, Paolo Bonzini, Daniel P. Berrangé, Thomas Huth, Philippe Mathieu-Daudé, Laurent Vivier, qemu-devel On 2023/12/18 16:06, Marc-André Lureau wrote: > Hi > > On Sun, Dec 17, 2023 at 10:14 AM Akihiko Odaki <akihiko.odaki@daynix.com> wrote: >> >> ui/dbusaudio.c does not depend on ui/dbus.h >> > > It uses dbus_win32_import_socket() Oops. I withdraw this patch. Please dismiss it and review only the first one. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-18 7:09 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-12-17 6:12 [PATCH v5 0/2] meson: Fixes for dbus modules Akihiko Odaki 2023-12-17 6:12 ` [PATCH v5 1/2] util: Move dbus_display1 to util Akihiko Odaki 2023-12-17 6:12 ` [PATCH v5 2/2] audio: Do not include ui/dbus.h Akihiko Odaki 2023-12-18 7:06 ` Marc-André Lureau 2023-12-18 7:08 ` Akihiko Odaki
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).