Skip to contentSkip to conversation

Ui 20171011 patches

GIT PULL Gerd Hoffmann 4 participants 26 messages Oct 11, 2017 – Oct 13, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

The following changes since commit 567d0a19c7998fa366598b83d5a6e5f0759d3ea9:

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging (2017-10-10 13:25:46 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/ui-20171011-pull-request

for you to fetch changes up to 92328b7104ffc825f10c33f3fd1866e940a523f7:

ui/gtk: Fix deprecation of vte_terminal_copy_clipboard (2017-10-11 10:03:31 +0200)

----------------------------------------------------------------
ui: use keycodemapdb for key code mappings, part one (v2)
ui: add qemu-keymap, update reverse keymaps (for qemu -k $map)
ui: fix for vte 0.50

----------------------------------------------------------------

Anthony PERARD (1):
ui/gtk: Fix deprecation of vte_terminal_copy_clipboard

Daniel P. Berrange (6):
build: automatically handle GIT submodule checkout for dtc
docker: don't rely on submodules existing in the main checkout
ui: add keycodemapdb repository as a GIT submodule
ui: convert common input code to keycodemapdb
ui: convert key events to QKeyCodes immediately
ui: don't export qemu_input_event_new_key

Gerd Hoffmann (3):
tools: add qemu-keymap
Add pc-bios/keymaps/Makefile
pc-bios/keymaps: keymaps update

 configure                 |   75 ++-
 Makefile                  |   55 ++-
 include/ui/input.h        |   12 +-
 qemu-keymap.c             |  258 +++++++++++
 ui/gtk.c                  |    5 +
 ui/input-keymap.c         |  336 +-------------
 ui/input.c                |   24 +-
 .gitignore                |    2 +
 .gitmodules               |    3 +
 MAINTAINERS               |    6 +
 pc-bios/keymaps/Makefile  |   56 +++
 pc-bios/keymaps/ar        |  819 +++++++++++++++++++++++++++++----
 pc-bios/keymaps/bepo      | 1108 +++++++++++++++++++++++++++++++--------------
 pc-bios/keymaps/cz        |  861 ++++++++++++++++++++++++++++++++---
 pc-bios/keymaps/da        |  732 +++++++++++++++++++++++++++++-
 pc-bios/keymaps/de        |  767 ++++++++++++++++++++++++++++++-
 pc-bios/keymaps/de-ch     |  915 ++++++++++++++++++++++++++++++++-----
 pc-bios/keymaps/en-gb     |  724 ++++++++++++++++++++++++++++-
 pc-bios/keymaps/en-us     |  718 ++++++++++++++++++++++++++++-
 pc-bios/keymaps/es        |  744 +++++++++++++++++++++++++++++-
 pc-bios/keymaps/et        |  818 +++++++++++++++++++++++++++++----
 pc-bios/keymaps/fi        |  814 ++++++++++++++++++++++++++++++---
 pc-bios/keymaps/fo        |  881 ++++++++++++++++++++++++++++++++---
 pc-bios/keymaps/fr        |  704 +++++++++++++++++++++++++++-
 pc-bios/keymaps/fr-be     |  724 ++++++++++++++++++++++++++++-
 pc-bios/keymaps/fr-ca     |  804 ++++++++++++++++++++++++++++++--
 pc-bios/keymaps/fr-ch     |  800 ++++++++++++++++++++++++++++++--
 pc-bios/keymaps/hr        |  752 +++++++++++++++++++++++++++++-
 pc-bios/keymaps/hu        |  887 ++++++++++++++++++++++++++++++++----
 pc-bios/keymaps/is        |  802 +++++++++++++++++++++++++++++---
 pc-bios/keymaps/it        |  757 ++++++++++++++++++++++++++++++-
 pc-bios/keymaps/ja        |  792 +++++++++++++++++++++++++++++---
 pc-bios/keymaps/lt        |  844 ++++++++++++++++++++++++++++++++--
 pc-bios/keymaps/lv        |  766 +++++++++++++++++++++++++++++--
 pc-bios/keymaps/mk        |  814 +++++++++++++++++++++++++++++----
 pc-bios/keymaps/nl        |  794 +++++++++++++++++++++++++++++++-
 pc-bios/keymaps/no        |  758 ++++++++++++++++++++++++++++++-
 pc-bios/keymaps/pl        |  789 ++++++++++++++++++++++++++++++--
 pc-bios/keymaps/pt        |  737 +++++++++++++++++++++++++++++-
 pc-bios/keymaps/pt-br     |  775 ++++++++++++++++++++++++++++++-
 pc-bios/keymaps/ru        |  835 ++++++++++++++++++++++++++++++----
 pc-bios/keymaps/th        |  878 +++++++++++++++++++++++++++++------
 pc-bios/keymaps/tr        |  819 ++++++++++++++++++++++++++++++---
 scripts/archive-source.sh |   34 +-
 scripts/git-submodule.sh  |   38 ++
 ui/keycodemapdb           |    1 +
 46 files changed, 24564 insertions(+), 2073 deletions(-)
 create mode 100644 qemu-keymap.c
 create mode 100644 pc-bios/keymaps/Makefile
 create mode 100755 scripts/git-submodule.sh
 create mode 160000 ui/keycodemapdb
Signature · 1 line
2.9.3
#1 lore raw

[Qemu-devel] [PULL 03/10] ui: add keycodemapdb repository as a GIT submodule

From: "Daniel P. Berrange" <[email protected]>

The https://gitlab.com/keycodemap/keycodemapdb/ repo contains a data file mapping between all the different scancode/keycode/keysym sets that are known, and a tool to auto-generate lookup tables for different combinations.

It is used by GTK-VNC, SPICE-GTK and libvirt for mapping keys. Using it in QEMU will let us replace many hand written lookup tables with auto-generated tables from a master data source, reducing bugs. Adding new QKeyCodes will now only require the master table to be updated, all ~20 other tables will be automatically updated to follow.

Message-id: [email protected]

[ kraxel: fix build ]

---
 configure                 |  8 +++++++-
 Makefile                  | 24 +++++++++++++++++++++++-
 .gitignore                |  1 +
 .gitmodules               |  3 +++
 scripts/archive-source.sh |  2 +-
 ui/keycodemapdb           |  1 +
 6 files changed, 36 insertions(+), 3 deletions(-)
 create mode 160000 ui/keycodemapdb
configure +7 -1
index 38f1710c80..06f18ea9af 100755
@@ -264,7 +264,13 @@ cc_i386=i386-pc-linux-gnu-gcc
 libs_qga=""
 debug_info="yes"
 stack_protector=""
-git_submodules=""
+
+if test -e "$source_path/.git"
+then
+    git_submodules="ui/keycodemapdb"
+else
+    git_submodules=""
+fi
 
 # Don't accept a target_list environment variable.
 unset target_list
Makefile +23 -1
index cec0f44374..53c66f765b 100644
@@ -33,7 +33,7 @@ git-submodule-update:
 endif
 endif
 
-.git-submodule-status: git-submodule-update
+.git-submodule-status: git-submodule-update config-host.mak
 
 Makefile: .git-submodule-status
 
@@ -214,6 +214,28 @@ trace-dtrace-root.h: trace-dtrace-root.dtrace
 
 trace-dtrace-root.o: trace-dtrace-root.dtrace
 
+KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
+KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
+
+KEYCODEMAP_FILES = \
+		 $(NULL)
+
+GENERATED_FILES += $(KEYCODEMAP_FILES)
+
+ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CSV) $(SRC_PATH)/ui/Makefile.objs
+	$(call quiet-command,\
+	    src=$$(echo $@ | sed -E -e "s,^ui/input-keymap-(.+)-to-(.+)\.c$$,\1,") && \
+	    dst=$$(echo $@ | sed -E -e "s,^ui/input-keymap-(.+)-to-(.+)\.c$$,\2,") && \
+	    test -e $(KEYCODEMAP_GEN) && \
+	    $(PYTHON) $(KEYCODEMAP_GEN) \
+	          --lang glib2 \
+	          --varname qemu_input_map_$${src}_to_$${dst} \
+	          code-map $(KEYCODEMAP_CSV) $${src} $${dst} \
+	        > $@ || rm -f $@, "GEN", "$@")
+
+$(KEYCODEMAP_GEN): .git-submodule-status
+$(KEYCODEMAP_CSV): .git-submodule-status
+
 # Don't try to regenerate Makefile or configure
 # We don't generate any of them
 Makefile: ;
.gitignore +1 -0
index b5e115d96b..620eec6b47 100644
@@ -14,6 +14,7 @@
 /trace/generated-tcg-tracers.h
 /ui/shader/texture-blit-frag.h
 /ui/shader/texture-blit-vert.h
+/ui/input-keymap-*.c
 *-timestamp
 /*-softmmu
 /*-darwin-user
.gitmodules +3 -0
index 84c54cdc49..f3bbc01f82 100644
@@ -34,3 +34,6 @@
 [submodule "roms/QemuMacDrivers"]
 	path = roms/QemuMacDrivers
 	url = git://git.qemu.org/QemuMacDrivers.git
+[submodule "ui/keycodemapdb"]
+	path = ui/keycodemapdb
+	url = https://gitlab.com/keycodemap/keycodemapdb.git
scripts/archive-source.sh +1 -1
index 4029de7b20..4e63774f9a 100755
@@ -26,7 +26,7 @@ vroot_dir="${tar_file}.vroot"
 # independent of what the developer currently has initialized
 # in their checkout, because the build environment is completely
 # different to the host OS.
-submodules="dtc"
+submodules="dtc ui/keycodemapdb"
 
 trap "status=$?; rm -rf \"$list_file\" \"$vroot_dir\"; exit \$status" 0 1 2 3 15
 
ui/keycodemapdb new file +1 -0
new file mode 160000
index 0000000000..56ce5650d2
@@ -0,0 +1 @@
+Subproject commit 56ce5650d2c6ea216b4580df44b9a6dd3bc92c3b
Signature · 1 line
2.9.3
#2 lore raw

[Qemu-devel] [PULL 05/10] ui: convert key events to QKeyCodes immediately

In reply to Gerd Hoffmann

From: "Daniel P. Berrange" <[email protected]>

Always use QKeyCode in the InputKeyEvent struct, by converting key numbers to QKeyCode at the time the event is created. This allows the code processing / consuming key events to assume QKeyCode is used. The only place we accept a key number in the InputKeyEvent struct is with QMP commands sent by the user.

Message-id: [email protected]

---
 ui/input.c | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)
ui/input.c +16 -6
index 3422d4a8ef..4b241aa823 100644
@@ -157,9 +157,16 @@ void qmp_input_send_event(bool has_device, const char *device,
     }
 
     for (e = events; e != NULL; e = e->next) {
-        InputEvent *event = e->value;
+        InputEvent *evt = e->value;
 
-        qemu_input_event_send(con, event);
+        if (evt->type == INPUT_EVENT_KIND_KEY &&
+            evt->u.key.data->key->type == KEY_VALUE_KIND_NUMBER) {
+            KeyValue *key = evt->u.key.data->key;
+            QKeyCode code = qemu_input_key_number_to_qcode(key->u.qcode.data);
+            qemu_input_event_send_key_qcode(con, code, evt->u.key.data->down);
+        } else {
+            qemu_input_event_send(con, evt);
+        }
     }
 
     qemu_input_event_sync();
@@ -341,6 +348,11 @@ void qemu_input_event_send_impl(QemuConsole *src, InputEvent *evt)
 
 void qemu_input_event_send(QemuConsole *src, InputEvent *evt)
 {
+    /* Expect all parts of QEMU to send events with QCodes exclusively.
+     * Key numbers are only supported as end-user input via QMP */
+    assert(!(evt->type == INPUT_EVENT_KIND_KEY &&
+             evt->u.key.data->key->type == KEY_VALUE_KIND_NUMBER));
+
     if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
         return;
     }
@@ -400,10 +412,8 @@ void qemu_input_event_send_key(QemuConsole *src, KeyValue *key, bool down)
 
 void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down)
 {
-    KeyValue *key = g_new0(KeyValue, 1);
-    key->type = KEY_VALUE_KIND_NUMBER;
-    key->u.number.data = num;
-    qemu_input_event_send_key(src, key, down);
+    QKeyCode code = qemu_input_key_number_to_qcode(num);
+    qemu_input_event_send_key_qcode(src, code, down);
 }
 
 void qemu_input_event_send_key_qcode(QemuConsole *src, QKeyCode q, bool down)
Signature · 1 line
2.9.3
#3 lore raw

[Qemu-devel] [PULL 08/10] Add pc-bios/keymaps/Makefile

In reply to Gerd Hoffmann

Update files where I think I've figured the correct xkb maps.
TODO: nl-be sl sv

Message-id: [email protected]

---
 pc-bios/keymaps/Makefile | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 pc-bios/keymaps/Makefile
pc-bios/keymaps/Makefile new file +56 -0
new file mode 100644
index 0000000000..f0e44fd110
@@ -0,0 +1,56 @@
+
+KEYMAP	:= $(shell which qemu-keymap 2>/dev/null)
+
+MAPS	:= ar bepo cz da de de-ch en-us en-gb es et fi fo \
+	   fr fr-be fr-ca fr-ch \
+	   hr hu is it ja lt lv mk nl no pl pt pt-br ru th tr
+
+ar	: MAP_FLAGS :=	-l ar
+bepo	: MAP_FLAGS :=	-l fr -v dvorak
+cz	: MAP_FLAGS :=	-l cz
+da	: MAP_FLAGS :=	-l dk
+de	: MAP_FLAGS :=	-l de
+de-ch	: MAP_FLAGS :=	-l ch
+en-us	: MAP_FLAGS :=	-l us
+en-gb	: MAP_FLAGS :=	-l gb
+es	: MAP_FLAGS :=	-l es
+et	: MAP_FLAGS :=	-l et
+fi	: MAP_FLAGS :=	-l fi
+fo	: MAP_FLAGS :=	-l fo
+fr	: MAP_FLAGS :=	-l fr
+fr-be	: MAP_FLAGS :=	-l be
+fr-ca	: MAP_FLAGS :=	-l ca -v fr
+fr-ch	: MAP_FLAGS :=	-l ch -v fr
+hr	: MAP_FLAGS :=	-l hr
+hu	: MAP_FLAGS :=	-l hu
+is	: MAP_FLAGS :=	-l is
+it	: MAP_FLAGS :=	-l it
+ja	: MAP_FLAGS :=	-l jp -m jp106
+lt	: MAP_FLAGS :=	-l lt
+lv	: MAP_FLAGS :=	-l lv
+mk	: MAP_FLAGS :=	-l mk
+nl	: MAP_FLAGS :=	-l nl
+no	: MAP_FLAGS :=	-l no
+pl	: MAP_FLAGS :=	-l pl
+pt	: MAP_FLAGS :=	-l pt
+pt-br	: MAP_FLAGS :=	-l br
+ru	: MAP_FLAGS :=	-l ru
+th	: MAP_FLAGS :=	-l th
+tr	: MAP_FLAGS :=	-l tr
+
+ifeq ($(KEYMAP),)
+
+all:
+	@echo "nothing to do (qemu-keymap not found)"
+
+else
+
+all: $(MAPS)
+
+clean:
+	rm -f $(MAPS)
+
+$(MAPS): $(KEYMAP) Makefile
+	$(KEYMAP) -f $@ $(MAP_FLAGS)
+
+endif
Signature · 1 line
2.9.3
#4 lore raw

[Qemu-devel] [PULL 10/10] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard

In reply to Gerd Hoffmann

From: Anthony PERARD <[email protected]>

vte_terminal_copy_clipboard() is deprecated in VTE 0.50.

---
 ui/gtk.c | 5 +++++
 1 file changed, 5 insertions(+)
ui/gtk.c +5 -0
index 5bd87c265a..342e96fbe9 100644
@@ -1702,7 +1702,12 @@ static void gd_menu_copy(GtkMenuItem *item, void *opaque)
     GtkDisplayState *s = opaque;
     VirtualConsole *vc = gd_vc_find_current(s);
 
+#if VTE_CHECK_VERSION(0, 50, 0)
+    vte_terminal_copy_clipboard_format(VTE_TERMINAL(vc->vte.terminal),
+                                       VTE_FORMAT_TEXT);
+#else
     vte_terminal_copy_clipboard(VTE_TERMINAL(vc->vte.terminal));
+#endif
 }
 
 static void gd_vc_adjustment_changed(GtkAdjustment *adjustment, void *opaque)
Signature · 1 line
2.9.3
#5 lore raw

[Qemu-devel] [PULL 04/10] ui: convert common input code to keycodemapdb

In reply to Gerd Hoffmann

From: "Daniel P. Berrange" <[email protected]>

Replace the number_to_qcode, qcode_to_number and linux_to_qcode tables with automatically generated tables.

Missing entries in linux_to_qcode now fixed:

KEY_LINEFEED -> Q_KEY_CODE_LF
KEY_KPEQUAL -> Q_KEY_CODE_KP_EQUALS
KEY_COMPOSE -> Q_KEY_CODE_COMPOSE
KEY_AGAIN -> Q_KEY_CODE_AGAIN
KEY_PROPS -> Q_KEY_CODE_PROPS
KEY_UNDO -> Q_KEY_CODE_UNDO
KEY_FRONT -> Q_KEY_CODE_FRONT
KEY_COPY -> Q_KEY_CODE_COPY
KEY_OPEN -> Q_KEY_CODE_OPEN
KEY_PASTE -> Q_KEY_CODE_PASTE
KEY_CUT -> Q_KEY_CODE_CUT
KEY_HELP -> Q_KEY_CODE_HELP
KEY_MEDIA -> Q_KEY_CODE_MEDIASELECT

In addition, some fixes:

- KEY_PLAYPAUSE now maps to Q_KEY_CODE_AUDIOPLAY, instead of KEY_PLAYCD. KEY_PLAYPAUSE is defined across almost all scancodes sets, while KEY_PLAYCD only appears in AT set1, so the former is a more useful mapping.

Missing entries in qcode_to_number now fixed:

Q_KEY_CODE_AGAIN -> 0x85
Q_KEY_CODE_PROPS -> 0x86
Q_KEY_CODE_UNDO -> 0x87
Q_KEY_CODE_FRONT -> 0x8c
Q_KEY_CODE_COPY -> 0xf8
Q_KEY_CODE_OPEN -> 0x64
Q_KEY_CODE_PASTE -> 0x65
Q_KEY_CODE_CUT -> 0xbc
Q_KEY_CODE_LF -> 0x5b
Q_KEY_CODE_HELP -> 0xf5
Q_KEY_CODE_COMPOSE -> 0xdd
Q_KEY_CODE_KP_EQUALS -> 0x59
Q_KEY_CODE_MEDIASELECT -> 0xed

In addition, some fixes:

- Q_KEY_CODE_MENU was incorrectly mapped to the compose scancode (0xdd) and is now mapped to 0x9e
- Q_KEY_CODE_FIND was mapped to 0xe065 (Search) instead of to 0xe041 (Find)
- Q_KEY_CODE_HIRAGANA was mapped to 0x70 (Katakanahiragana) instead of of 0x77 (Hirigana)
- Q_KEY_CODE_PRINT was mapped to 0xb7 which is not a defined scan code in AT set 1, it is now mapped to 0x54 (sysrq)

Message-id: [email protected]

---
 Makefile           |   3 +
 include/ui/input.h |  11 +-
 ui/input-keymap.c  | 336 ++++-------------------------------------------------
 3 files changed, 33 insertions(+), 317 deletions(-)
Makefile +3 -0
index 53c66f765b..f76b87472c 100644
@@ -218,6 +218,9 @@ KEYCODEMAP_GEN = $(SRC_PATH)/ui/keycodemapdb/tools/keymap-gen
 KEYCODEMAP_CSV = $(SRC_PATH)/ui/keycodemapdb/data/keymaps.csv
 
 KEYCODEMAP_FILES = \
+		 ui/input-keymap-linux-to-qcode.c \
+		 ui/input-keymap-qcode-to-qnum.c \
+		 ui/input-keymap-qnum-to-qcode.c \
 		 $(NULL)
 
 GENERATED_FILES += $(KEYCODEMAP_FILES)
include/ui/input.h +10 -1
index c488585def..479cc46cfc 100644
@@ -43,7 +43,7 @@ void qemu_input_event_send_key(QemuConsole *src, KeyValue *key, bool down);
 void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down);
 void qemu_input_event_send_key_qcode(QemuConsole *src, QKeyCode q, bool down);
 void qemu_input_event_send_key_delay(uint32_t delay_ms);
-int qemu_input_key_number_to_qcode(uint8_t nr);
+int qemu_input_key_number_to_qcode(unsigned int nr);
 int qemu_input_key_value_to_number(const KeyValue *value);
 int qemu_input_key_value_to_qcode(const KeyValue *value);
 int qemu_input_key_value_to_scancode(const KeyValue *value, bool down,
@@ -69,4 +69,13 @@ void qemu_input_check_mode_change(void);
 void qemu_add_mouse_mode_change_notifier(Notifier *notify);
 void qemu_remove_mouse_mode_change_notifier(Notifier *notify);
 
+extern const guint qemu_input_map_linux_to_qcode_len;
+extern const guint16 qemu_input_map_linux_to_qcode[];
+
+extern const guint qemu_input_map_qcode_to_qnum_len;
+extern const guint16 qemu_input_map_qcode_to_qnum[];
+
+extern const guint qemu_input_map_qnum_to_qcode_len;
+extern const guint16 qemu_input_map_qnum_to_qcode[];
+
 #endif /* INPUT_H */
ui/input-keymap.c +20 -316

353 lines not on this page · raw message

Signature · 1 line
2.9.3
#6 lore raw

[Qemu-devel] [PULL 06/10] ui: don't export qemu_input_event_new_key

In reply to Gerd Hoffmann

From: "Daniel P. Berrange" <[email protected]>

All public code should use qemu_input_event_send_key* functions instead of creating an event directly.

Message-id: [email protected]

---
 include/ui/input.h | 1 -
 ui/input.c         | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
include/ui/input.h +0 -1
index 479cc46cfc..f8cee43f65 100644
@@ -38,7 +38,6 @@ void qemu_input_event_send_impl(QemuConsole *src, InputEvent *evt);
 void qemu_input_event_sync(void);
 void qemu_input_event_sync_impl(void);
 
-InputEvent *qemu_input_event_new_key(KeyValue *key, bool down);
 void qemu_input_event_send_key(QemuConsole *src, KeyValue *key, bool down);
 void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down);
 void qemu_input_event_send_key_qcode(QemuConsole *src, QKeyCode q, bool down);
ui/input.c +1 -1
index 4b241aa823..290b47354a 100644
@@ -386,7 +386,7 @@ void qemu_input_event_sync(void)
     replay_input_sync_event();
 }
 
-InputEvent *qemu_input_event_new_key(KeyValue *key, bool down)
+static InputEvent *qemu_input_event_new_key(KeyValue *key, bool down)
 {
     InputEvent *evt = g_new0(InputEvent, 1);
     evt->u.key.data = g_new0(InputKeyEvent, 1);
Signature · 1 line
2.9.3
#7 lore raw

[Qemu-devel] [PULL 01/10] build: automatically handle GIT submodule checkout for dtc

In reply to Gerd Hoffmann

From: "Daniel P. Berrange" <[email protected]>

Currently if DTC is required by configure and not available in the host OS install, we exit with an error message telling the user to checkout a git submodule or install the library.

This introduces automatic handling of the git submodule checkout process and enables it for dtc. This only runs if building from GIT, so users of release tarballs still need the system library install. The current state of the git checkout is stashed in .git-submodule-status, and a helper program is used to determine if this state matches the desired submodule state. A dependency against 'Makefile' ensures that the submodule state is refreshed at the start of the build process

Message-id: [email protected]

---
 configure                | 46 ++++++++++++++++++++++++++--------------------
 Makefile                 | 25 ++++++++++++++++++++++++-
 .gitignore               |  1 +
 MAINTAINERS              |  6 ++++++
 scripts/git-submodule.sh | 38 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 95 insertions(+), 21 deletions(-)
 create mode 100755 scripts/git-submodule.sh
configure +26 -20
index 6587e8014b..38f1710c80 100755
@@ -264,6 +264,7 @@ cc_i386=i386-pc-linux-gnu-gcc
 libs_qga=""
 debug_info="yes"
 stack_protector=""
+git_submodules=""
 
 # Don't accept a target_list environment variable.
 unset target_list
@@ -3584,27 +3585,30 @@ EOF
   if compile_prog "" "$fdt_libs" ; then
     # system DTC is good - use it
     fdt=yes
-  elif test -d ${source_path}/dtc/libfdt ; then
-    # have submodule DTC - use it
-    fdt=yes
-    dtc_internal="yes"
-    mkdir -p dtc
-    if [ "$pwd_is_source_path" != "y" ] ; then
-       symlink "$source_path/dtc/Makefile" "dtc/Makefile"
-       symlink "$source_path/dtc/scripts" "dtc/scripts"
-    fi
-    fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
-    fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
-  elif test "$fdt" = "yes" ; then
-    # have neither and want - prompt for system/submodule install
-    error_exit "DTC (libfdt) version >= 1.4.2 not present. Your options:" \
-        "  (1) Preferred: Install the DTC (libfdt) devel package" \
-        "  (2) Fetch the DTC submodule, using:" \
-        "      git submodule update --init dtc"
   else
-    # don't have and don't want
-    fdt_libs=
-    fdt=no
+      # have GIT checkout, so activate dtc submodule
+      if test -e "${source_path}/.git" ; then
+          git_submodules="${git_submodules} dtc"
+      fi
+      if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then
+          fdt=yes
+          dtc_internal="yes"
+          mkdir -p dtc
+          if [ "$pwd_is_source_path" != "y" ] ; then
+              symlink "$source_path/dtc/Makefile" "dtc/Makefile"
+              symlink "$source_path/dtc/scripts" "dtc/scripts"
+          fi
+          fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
+          fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
+      elif test "$fdt" = "yes" ; then
+          # Not a git build & no libfdt found, prompt for system install
+          error_exit "DTC (libfdt) version >= 1.4.2 not present." \
+                     "Please install the DTC (libfdt) devel package"
+      else
+          # don't have and don't want
+          fdt_libs=
+          fdt=no
+      fi
   fi
 fi
 
@@ -5295,6 +5299,7 @@ echo "local state directory   queried at runtime"
 echo "Windows SDK       $win_sdk"
 fi
 echo "Source path       $source_path"
+echo "GIT submodules    $git_submodules"
 echo "C compiler        $cc"
 echo "Host C compiler   $host_cc"
 echo "C++ compiler      $cxx"
@@ -5483,6 +5488,7 @@ echo "extra_cxxflags=$EXTRA_CXXFLAGS" >> $config_host_mak
 echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak
 echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
 echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
+echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
 
 echo "ARCH=$ARCH" >> $config_host_mak
 
Makefile +24 -1
index cee6e28659..cec0f44374 100644
@@ -14,6 +14,29 @@ ifneq ($(wildcard config-host.mak),)
 all:
 include config-host.mak
 
+git-submodule-update:
+
+.PHONY: git-submodule-update
+
+ifeq (0,$(MAKELEVEL))
+  git_module_status := $(shell \
+    cd '$(SRC_PATH)' && \
+    ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \
+    echo $$?; \
+  )
+
+ifeq (1,$(git_module_status))
+git-submodule-update:
+	$(call quiet-command, \
+          (cd $(SRC_PATH) && ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \
+          "GIT","$(GIT_SUBMODULES)")
+endif
+endif
+
+.git-submodule-status: git-submodule-update
+
+Makefile: .git-submodule-status
+
 # Check that we're not trying to do an out-of-tree build from
 # a tree that's been used for an in-tree build.
 ifneq ($(realpath $(SRC_PATH)),$(realpath .))
@@ -330,7 +353,7 @@ DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_src
 DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
 DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
 
-subdir-dtc:dtc/libfdt dtc/tests
+subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests
 	$(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
 
 dtc/%:
.gitignore +1 -0
index 3a7e01dc6a..b5e115d96b 100644
@@ -113,6 +113,7 @@
 /docs/version.texi
 *.tps
 .stgit-*
+.git-submodule-status
 cscope.*
 tags
 TAGS
MAINTAINERS +6 -0
index 772ac209e1..bb585bbd8f 100644
@@ -1949,3 +1949,9 @@ M: Daniel P. Berrange <[email protected]>
 S: Odd Fixes
 F: docs/devel/build-system.txt
 
+Build System
+------------
+GIT submodules
+M: Daniel P. Berrange <[email protected]>
+S: Odd Fixes
+F: scripts/git-submodule.sh
scripts/git-submodule.sh new file +38 -0
new file mode 100755
index 0000000000..9f73f0e6e3
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# This code is licensed under the GPL version 2 or later.  See
+# the COPYING file in the top-level directory.
+
+set -e
+
+substat=".git-submodule-status"
+
+command=$1
+shift
+modules="$@"
+
+if test -z "$modules"
+then
+    test -e $substat || touch $substat
+    exit 0
+fi
+
+if ! test -e ".git"
+then
+    echo "$0: unexpectedly called with submodules but no git checkout exists"
+    exit 1
+fi
+
+case "$command" in
+status)
+    test -f "$substat" || exit 1
+    trap "rm -f ${substat}.tmp" EXIT
+    git submodule status $modules > "${substat}.tmp"
+    diff "${substat}" "${substat}.tmp" >/dev/null
+    exit $?
+    ;;
+update)
+    git submodule update --init $modules 1>/dev/null 2>&1
+    git submodule status $modules > "${substat}"
+    ;;
+esac
Signature · 1 line
2.9.3
#8 lore raw

[Qemu-devel] [PULL 02/10] docker: don't rely on submodules existing in the main checkout

In reply to Gerd Hoffmann

From: "Daniel P. Berrange" <[email protected]>

When building the tarball to pass into the docker/vm test image, the code relies on the git submodules being checked out in the main checkout.

ie if the developer has not run 'git submodule update --init dtc' many of the docker tests will fail due to the libfdt package not being present in the test images. Patchew manually checks out the dtc submodule in the main git checkout, but this is a bad idea.

When running tests we want to have a predictable set of submodules included in the source that's tested. The build environment is completely independent of the developers host OS, so the submodules the developer has checked out should not be considered relevant for the tests.

This changes the archive-source.sh script so that it clones the current git checkout into a temporary directory, checks out a fixed set of submodules, builds the tarball and finally removes the temporary git clone.

Message-id: [email protected]

---
 scripts/archive-source.sh | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)
scripts/archive-source.sh +28 -6
index c4e7d98f4d..4029de7b20 100755
@@ -18,15 +18,37 @@ if test $# -lt 1; then
     error "Usage: $0 <output tarball>"
 fi
 
-tar_file="$1"
-list_file="$1.list"
-submodules=$(git submodule foreach --recursive --quiet 'echo $name')
+tar_file=`realpath "$1"`
+list_file="${tar_file}.list"
+vroot_dir="${tar_file}.vroot"
 
-if test $? -ne 0; then
-    error "git submodule command failed"
+# We want a predictable list of submodules for builds, that is
+# independent of what the developer currently has initialized
+# in their checkout, because the build environment is completely
+# different to the host OS.
+submodules="dtc"
+
+trap "status=$?; rm -rf \"$list_file\" \"$vroot_dir\"; exit \$status" 0 1 2 3 15
+
+if git diff-index --quiet HEAD -- &>/dev/null
+then
+    HEAD=HEAD
+else
+    HEAD=`git stash create`
 fi
+git clone --shared . "$vroot_dir"
+test $? -ne 0 && error "failed to clone into '$vroot_dir'"
 
-trap "status=$?; rm -f \"$list_file\"; exit \$status" 0 1 2 3 15
+cd "$vroot_dir"
+test $? -ne 0 && error "failed to change into '$vroot_dir'"
+
+git checkout $HEAD
+test $? -ne 0 && error "failed to checkout $HEAD revision"
+
+for sm in $submodules; do
+    git submodule update --init $sm
+    test $? -ne 0 && error "failed to init submodule $sm"
+done
 
 if test -n "$submodules"; then
     {
Signature · 1 line
2.9.3
#9 lore raw

[Qemu-devel] [PULL 07/10] tools: add qemu-keymap

In reply to Gerd Hoffmann

qemu-keymap generates qemu reverse keymaps from xkb keymaps, which can be used with the qemu "-k" command line switch.

Message-id: [email protected]

---
 configure     |  23 ++++++
 Makefile      |   5 ++
 qemu-keymap.c | 258 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 286 insertions(+)
 create mode 100644 qemu-keymap.c
configure +23 -0
index 06f18ea9af..be53b6b104 100755
@@ -304,6 +304,7 @@ vde=""
 vnc_sasl=""
 vnc_jpeg=""
 vnc_png=""
+xkbcommon=""
 xen=""
 xen_ctrl_version=""
 xen_pv_domain_build="no"
@@ -2908,6 +2909,21 @@ EOF
 fi
 
 ##########################################
+# xkbcommon probe
+if test "$xkbcommon" != "no" ; then
+  if $pkg_config xkbcommon --exists; then
+    xkbcommon_cflags=$($pkg_config xkbcommon --cflags)
+    xkbcommon_libs=$($pkg_config xkbcommon --libs)
+    xkbcommon=yes
+  else
+    if test "$xkbcommon" = "yes" ; then
+      feature_not_found "xkbcommon" "Install libxkbcommon-devel"
+    fi
+    xkbcommon=no
+  fi
+fi
+
+##########################################
 # fnmatch() probe, used for ACL routines
 fnmatch="no"
 cat > $TMPC << EOF
@@ -5107,6 +5123,9 @@ if test "$softmmu" = yes ; then
     mpath=no
   fi
 fi
+if test "$xkbcommon" = "yes"; then
+  tools="qemu-keymap\$(EXESUF) $tools"
+fi
 
 # Probe for guest agent support/options
 
@@ -5606,6 +5625,10 @@ fi
 if test "$vnc_png" = "yes" ; then
   echo "CONFIG_VNC_PNG=y" >> $config_host_mak
 fi
+if test "$xkbcommon" = "yes" ; then
+  echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak
+  echo "XKBCOMMON_LIBS=$xkbcommon_libs" >> $config_host_mak
+fi
 if test "$fnmatch" = "yes" ; then
   echo "CONFIG_FNMATCH=y" >> $config_host_mak
 fi
Makefile +5 -0
index f76b87472c..70235c0442 100644
@@ -418,6 +418,8 @@ qemu-io$(EXESUF): qemu-io.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj
 
 qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS)
 
+qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS)
+
 fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS)
 fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
 
@@ -432,6 +434,9 @@ qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
 qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
 qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
 
+qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS)
+qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS)
+
 gen-out-type = $(subst .,-,$(suffix $@))
 
 qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
qemu-keymap.c new file +258 -0

258 lines not on this page · raw message

Signature · 1 line
2.9.3
#10 lore raw
In reply to Gerd Hoffmann
Quoted 10 lines · Gerd Hoffmann

The following changes since commit 567d0a19c7998fa366598b83d5a6e5f0759d3ea9:

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging (2017-10-10 13:25:46 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/ui-20171011-pull-request

for you to fetch changes up to 92328b7104ffc825f10c33f3fd1866e940a523f7:

Quoted 8 lines

ui/gtk: Fix deprecation of vte_terminal_copy_clipboard (2017-10-11 10:03:31 +0200)

----------------------------------------------------------------
ui: use keycodemapdb for key code mappings, part one (v2)
ui: add qemu-keymap, update reverse keymaps (for qemu -k $map)
ui: fix for vte 0.50

----------------------------------------------------------------

Build failures:

NetBSD:
CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:44: fatal error:
ui/input-keymap-linux-to-qcode.c: No such file or directory

 #include "ui/input-keymap-linux-to-qcode.c"
                                            ^

FreeBSD:

CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:10: fatal error:
'ui/input-keymap-linux-to-qcode.c' file not found

#include "ui/input-keymap-linux-to-qcode.c"
         ^

OpenBSD:

gmake: Entering directory '/home/qemu/build/all' /bin/sh: ./scripts/git-submodule.sh: No such file or directory
gmake: Leaving directory '/home/qemu/build/all'
gmake: Entering directory '/home/qemu/build/all'
GIT
/bin/sh: ./scripts/git-submodule.sh: No such file or directory
gmake: *** [Makefile:30: git-submodule-update] Error 1
gmake: Leaving directory '/home/qemu/build/all'
gmake: *** Waiting for unfinished jobs....
gmake: Entering directory '/home/qemu/build/all' config-host.mak is out-of-date, running configure
Install prefix /usr/local
[configure output snipped]
gmake: Leaving directory '/home/qemu/build/all'

AArch32 Linux:

make: Entering directory '/home/peter.maydell/qemu/build/all-a32' config-host.mak is out-of-date, running configure
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
[...]
VxHS block device no

  GEN     config-host.h
  GEN     module_block.h
  GEN     ui/input-keymap-linux-to-qcode.c
  GEN     ui/input-keymap-qcode-to-qnum.c
  GEN     ui/input-keymap-qnum-to-qcode.c
  GIT     ui/keycodemapdb dtc
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  GEN     trace/generated-helpers.c

Makefile:30: recipe for target 'git-submodule-update' failed
make: *** [git-submodule-update] Error 128
make: *** Waiting for unfinished jobs....
make: Leaving directory '/home/peter.maydell/qemu/build/all-a32'

The OpenBSD failure is because make now tries to run a script that uses #!/bin/bash, and this machine doesn't have bash installed. Do we really need to add bash to our build-dependencies? The script doesn't seem like it's doing anything that critically requires bash...

thanks
-- PMM

#11 lore raw
Quoted 5 lines · Peter Maydell

The OpenBSD failure is because make now tries to run a script that uses #!/bin/bash, and this machine doesn't have bash installed. Do we really need to add bash to our build-dependencies? The script doesn't seem like it's doing anything that critically requires bash...

NetBSD installs bash by default to /usr/pkg/bin/bash, FreeBSD installs it to /usr/local/bin/bash. If bash is really needed it should be used with the "#!/usr/bin/env bash" shebang.

#12 lore raw
In reply to Peter Maydell
Quoted 29 lines · Peter Maydell
Quoted 10 lines · Gerd Hoffmann

The following changes since commit 567d0a19c7998fa366598b83d5a6e5f0759d3ea9:

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging (2017-10-10 13:25:46 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/ui-20171011-pull-request

for you to fetch changes up to 92328b7104ffc825f10c33f3fd1866e940a523f7:

Quoted 8 lines

ui/gtk: Fix deprecation of vte_terminal_copy_clipboard (2017-10-11 10:03:31 +0200)

----------------------------------------------------------------
ui: use keycodemapdb for key code mappings, part one (v2)
ui: add qemu-keymap, update reverse keymaps (for qemu -k $map)
ui: fix for vte 0.50

----------------------------------------------------------------

Build failures:

NetBSD:
CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:44: fatal error:
ui/input-keymap-linux-to-qcode.c: No such file or directory

 #include "ui/input-keymap-linux-to-qcode.c"
                                            ^
Quoted 8 lines

FreeBSD:

CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:10: fatal error:
'ui/input-keymap-linux-to-qcode.c' file not found

#include "ui/input-keymap-linux-to-qcode.c"
         ^

So something is still racing in these two.

I don't suppose you have the full log - interested if it
ever run the "GIT ui/keycodemapdb dtc" rule and/or
re-ran configure earlier, or if this is literally all it did ?

Quoted 36 lines

OpenBSD:

gmake: Entering directory '/home/qemu/build/all' /bin/sh: ./scripts/git-submodule.sh: No such file or directory
gmake: Leaving directory '/home/qemu/build/all'
gmake: Entering directory '/home/qemu/build/all'
GIT
/bin/sh: ./scripts/git-submodule.sh: No such file or directory
gmake: *** [Makefile:30: git-submodule-update] Error 1
gmake: Leaving directory '/home/qemu/build/all'
gmake: *** Waiting for unfinished jobs....
gmake: Entering directory '/home/qemu/build/all' config-host.mak is out-of-date, running configure
Install prefix /usr/local
[configure output snipped]
gmake: Leaving directory '/home/qemu/build/all'

AArch32 Linux:

make: Entering directory '/home/peter.maydell/qemu/build/all-a32' config-host.mak is out-of-date, running configure
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
[...]
VxHS block device no

  GEN     config-host.h
  GEN     module_block.h
  GEN     ui/input-keymap-linux-to-qcode.c
  GEN     ui/input-keymap-qcode-to-qnum.c
  GEN     ui/input-keymap-qnum-to-qcode.c
  GIT     ui/keycodemapdb dtc
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  GEN     trace/generated-helpers.c
Quoted 1 line

Makefile:30: recipe for target 'git-submodule-update' failed

Damn, we should not throw away stderr in scripts/git-submodule.sh, as its hides whatever error occurred for you here.

Quoted 10 lines

make: *** [git-submodule-update] Error 128
make: *** Waiting for unfinished jobs....
make: Leaving directory '/home/peter.maydell/qemu/build/all-a32'

The OpenBSD failure is because make now tries to run a script that uses #!/bin/bash, and this machine doesn't have bash installed. Do we really need to add bash to our build-dependencies? The script doesn't seem like it's doing anything that critically requires bash...

Yeah, that's easily replacable with /bin/sh

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#13 lore raw
Quoted 19 lines · Daniel P. Berrange
Quoted 9 lines · Peter Maydell

Build failures:

NetBSD:
CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:44: fatal error:
ui/input-keymap-linux-to-qcode.c: No such file or directory

 #include "ui/input-keymap-linux-to-qcode.c"
                                            ^
Quoted 8 lines

FreeBSD:

CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:10: fatal error:
'ui/input-keymap-linux-to-qcode.c' file not found

#include "ui/input-keymap-linux-to-qcode.c"
         ^
Quoted 6 lines

So something is still racing in these two.

I don't suppose you have the full log - interested if it
ever run the "GIT ui/keycodemapdb dtc" rule and/or
re-ran configure earlier, or if this is literally all it did ?

For NetBSD we have:

Quoted 1 line

From git://git.linaro.org/people/pmaydell/qemu-arm

bac9608320..54070377a3 staging -> pmaydell/staging
gmake: Entering directory '/root/qemu/build/all'
sh: ./scripts/git-submodule.sh: not found
gmake: Leaving directory '/root/qemu/build/all'
gmake: Entering directory '/root/qemu/build/all'
config-host.mak is out-of-date, running configure

Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
firmware path     /usr/local/share/qemu-firmware
binary directory  /usr/local/bin

library directory /usr/local/lib
module directory /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M

Source path       /root/qemu
GIT submodules    ui/keycodemapdb dtc
C compiler        cc
Host C compiler   cc
C++ compiler      c++

[...]
jemalloc support no
avx2 optimization yes
replication support yes
VxHS block device no
gmake: Leaving directory '/root/qemu/build/all'
gmake: Entering directory '/root/qemu/build/all'
GEN ui/input-keymap-linux-to-qcode.c
gmake: Leaving directory '/root/qemu/build/all'
gmake: Entering directory '/root/qemu/build/all' [...]
gmake: Leaving directory '/root/qemu/build/all'
gmake: Entering directory '/root/qemu/build/all'
CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:44: fatal error:
ui/input-keymap-linux-to-qcode.c: No such file or directory

I didn't notice the 'git-submodule.sh not found' issue before:
looks like that's the same /bin/bash problem as OpenBSD, maybe, plus something not noticing the failure?

Quoted 20 lines
Quoted 18 lines

AArch32 Linux:

make: Entering directory '/home/peter.maydell/qemu/build/all-a32' config-host.mak is out-of-date, running configure
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
[...]
VxHS block device no

  GEN     config-host.h
  GEN     module_block.h
  GEN     ui/input-keymap-linux-to-qcode.c
  GEN     ui/input-keymap-qcode-to-qnum.c
  GEN     ui/input-keymap-qnum-to-qcode.c
  GIT     ui/keycodemapdb dtc
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  GEN     trace/generated-helpers.c
Quoted 1 line

Makefile:30: recipe for target 'git-submodule-update' failed

Quoted 2 lines

Damn, we should not throw away stderr in scripts/git-submodule.sh, as its hides whatever error occurred for you here.

I edited out the stdout/stderr throwaway on the git submodule command:

$ ./scripts/git-submodule.sh update ui/keycodemapdb dtc
Cloning into 'ui/keycodemapdb'...
fatal: unable to access
'https://gitlab.com/keycodemap/keycodemapdb.git/': Problem with the
SSL CA cert (path? access rights?)
fatal: clone of 'https://gitlab.com/keycodemap/keycodemapdb.git' into
submodule path 'ui/keycodemapdb' failed

thanks
-- PMM

#14 lore raw
Quoted 70 lines · Peter Maydell
Quoted 19 lines · Daniel P. Berrange
Quoted 9 lines · Peter Maydell

Build failures:

NetBSD:
CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:44: fatal error:
ui/input-keymap-linux-to-qcode.c: No such file or directory

 #include "ui/input-keymap-linux-to-qcode.c"
                                            ^
Quoted 8 lines

FreeBSD:

CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:10: fatal error:
'ui/input-keymap-linux-to-qcode.c' file not found

#include "ui/input-keymap-linux-to-qcode.c"
         ^
Quoted 6 lines

So something is still racing in these two.

I don't suppose you have the full log - interested if it
ever run the "GIT ui/keycodemapdb dtc" rule and/or
re-ran configure earlier, or if this is literally all it did ?

For NetBSD we have:
From git://git.linaro.org/people/pmaydell/qemu-arm
bac9608320..54070377a3 staging -> pmaydell/staging
gmake: Entering directory '/root/qemu/build/all'
sh: ./scripts/git-submodule.sh: not found
gmake: Leaving directory '/root/qemu/build/all'
gmake: Entering directory '/root/qemu/build/all' config-host.mak is out-of-date, running configure

Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
firmware path     /usr/local/share/qemu-firmware
binary directory  /usr/local/bin

library directory /usr/local/lib
module directory /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M

Source path       /root/qemu
GIT submodules    ui/keycodemapdb dtc
C compiler        cc
Host C compiler   cc
C++ compiler      c++

[...]
jemalloc support no
avx2 optimization yes
replication support yes
VxHS block device no
gmake: Leaving directory '/root/qemu/build/all'
gmake: Entering directory '/root/qemu/build/all'
GEN ui/input-keymap-linux-to-qcode.c
gmake: Leaving directory '/root/qemu/build/all'
gmake: Entering directory '/root/qemu/build/all' [...]
gmake: Leaving directory '/root/qemu/build/all'
gmake: Entering directory '/root/qemu/build/all'
CC ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:44: fatal error:
ui/input-keymap-linux-to-qcode.c: No such file or directory

Quoted 3 lines

I didn't notice the 'git-submodule.sh not found' issue before:
looks like that's the same /bin/bash problem as OpenBSD, maybe, plus something not noticing the failure?

Yeah looks the same. I'll investigate the error status checking I'll assume FreeBSD also hit the bash problem.

Quoted 26 lines
Quoted 21 lines
Quoted 19 lines

AArch32 Linux:

make: Entering directory '/home/peter.maydell/qemu/build/all-a32' config-host.mak is out-of-date, running configure
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
[...]
VxHS block device no

  GEN     config-host.h
  GEN     module_block.h
  GEN     ui/input-keymap-linux-to-qcode.c
  GEN     ui/input-keymap-qcode-to-qnum.c
  GEN     ui/input-keymap-qnum-to-qcode.c
  GIT     ui/keycodemapdb dtc
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  GEN     trace/generated-helpers.c
Quoted 1 line

Makefile:30: recipe for target 'git-submodule-update' failed

Quoted 2 lines

Damn, we should not throw away stderr in scripts/git-submodule.sh, as its hides whatever error occurred for you here.

I edited out the stdout/stderr throwaway on the git submodule command:

Quoted 7 lines
$ ./scripts/git-submodule.sh update ui/keycodemapdb dtc
Cloning into 'ui/keycodemapdb'...
fatal: unable to access
'https://gitlab.com/keycodemap/keycodemapdb.git/': Problem with the
SSL CA cert (path? access rights?)
fatal: clone of 'https://gitlab.com/keycodemap/keycodemapdb.git' into
submodule path 'ui/keycodemapdb' failed

I'm not sure what I can do about this one - if GIT can't checkout a normal git repo, this looks like a OS distro / setup bug on the build host.

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#15 lore raw
Quoted 9 lines · Daniel P. Berrange
Quoted 7 lines · Peter Maydell
$ ./scripts/git-submodule.sh update ui/keycodemapdb dtc
Cloning into 'ui/keycodemapdb'...
fatal: unable to access
'https://gitlab.com/keycodemap/keycodemapdb.git/': Problem with the
SSL CA cert (path? access rights?)
fatal: clone of 'https://gitlab.com/keycodemap/keycodemapdb.git' into
submodule path 'ui/keycodemapdb' failed
Quoted 3 lines

I'm not sure what I can do about this one - if GIT can't checkout a normal git repo, this looks like a OS distro / setup bug on the build host.

Build system (which is a chroot) didn't have openssl or ca-certificates packages installed. That hasn't been a problem so far because we haven't used https:// for git previously.

I've updated the packages on the build system, but it would be nice if we had a clearer error message when the problem is "we now depend on some packages that we didn't previously and so you should install them".

thanks
-- PMM

#16 lore raw
In reply to Daniel P. Berrange

Hi,

Quoted 10 lines
Quoted 8 lines
$ ./scripts/git-submodule.sh update ui/keycodemapdb dtc
Cloning into 'ui/keycodemapdb'...
fatal: unable to access
'https://gitlab.com/keycodemap/keycodemapdb.git/': Problem with the
SSL CA cert (path? access rights?)
fatal: clone of 'https://gitlab.com/keycodemap/keycodemapdb.git'
into
submodule path 'ui/keycodemapdb' failed

I'm not sure what I can do about this one

does gitlab support git:// urls too?

Quoted 3 lines

- if GIT can't checkout
a normal git repo, this looks like a OS distro / setup bug on the build host.

Indeed. Is this openbsd? They are a bit paranoid, possibly the usual ca bundle (from nss/mozilla IIRC) isn't installed by default.

cheers,
Gerd

#17 lore raw
Quoted 11 lines · Gerd Hoffmann

Hi,

Quoted 9 lines
Quoted 8 lines
$ ./scripts/git-submodule.sh update ui/keycodemapdb dtc
Cloning into 'ui/keycodemapdb'...
fatal: unable to access
'https://gitlab.com/keycodemap/keycodemapdb.git/': Problem with the
SSL CA cert (path? access rights?)
fatal: clone of 'https://gitlab.com/keycodemap/keycodemapdb.git'
into
submodule path 'ui/keycodemapdb' failed
Quoted 3 lines
Quoted 1 line

I'm not sure what I can do about this one

does gitlab support git:// urls too?

Not AFAICT - if i try it just never completes connect()

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#18 lore raw

Hi,

Quoted 1 line

Not AFAICT - if i try it just never completes connect()

Hmm, so maybe we should mirror the thing on git.qemu.org and use that?

cheers,
Gerd

#19 lore raw
Quoted 5 lines · Gerd Hoffmann

Hi,

Quoted 1 line

Not AFAICT - if i try it just never completes connect()

Hmm, so maybe we should mirror the thing on git.qemu.org and use that?

Can that be made 100% automated - I don't want to have to push changes to two different git repos.

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#20 lore raw
Quoted 9 lines · Daniel P. Berrange
Quoted 5 lines · Gerd Hoffmann

Hi,

Quoted 1 line

Not AFAICT - if i try it just never completes connect()

Hmm, so maybe we should mirror the thing on git.qemu.org and use that?

Can that be made 100% automated - I don't want to have to push changes to two different git repos.

All our git.qemu.org mirrors are automated, I think (there's a cron job on the server somewhere that syncs them with the upstream, IIRC?)

thanks
-- PMM

#21 lore raw
In reply to Daniel P. Berrange
Quoted 11 lines · Daniel P. Berrange
Quoted 6 lines · Gerd Hoffmann

  Hi,

Quoted 1 line

Not AFAICT - if i try it just never completes connect()

Hmm, so maybe we should mirror the thing on git.qemu.org and use that?

Can that be made 100% automated - I don't want to have to push changes to
two different git repos.

Yes, seabios works that way for example.

cheers,
Gerd

#22 lore raw
Quoted 6 lines · Gerd Hoffmann
Quoted 5 lines · Daniel P. Berrange
Quoted 4 lines · Gerd Hoffmann

  Hi,

Quoted 1 line

Not AFAICT - if i try it just never completes connect()

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Hmm, so maybe we should mirror the thing on git.qemu.org and use that?

Can that be made 100% automated - I don't want to have to push changes to
two different git repos.

Yes, seabios works that way for example.

Ok, lets do that mirror then we can use git:// and we're consistent with other submodules we use

Regards,
Daniel

Signature · 3 lines
|: 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 :|
#23 lore raw
In reply to Gerd Hoffmann
Quoted 2 lines · Gerd Hoffmann

Indeed. Is this openbsd? They are a bit paranoid, possibly the usual ca bundle (from nss/mozilla IIRC) isn't installed by default.

No, it's an Ubuntu chroot. ca-certificates is "Priority: optional", so on a small thing like a chroot which only has a bare minimum set of packages needed for builds, it might not be present.

thanks
-- PMM

#24 lore raw
In reply to Peter Maydell

Hi,

Quoted 8 lines

FreeBSD:

  CC      ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:10: fatal error:
'ui/input-keymap-linux-to-qcode.c' file not found
#include "ui/input-keymap-linux-to-qcode.c"
         ^

scripts/git-modules.sh has no bashims, a simple s/bash/sh/ fixes the build on freebsd.

cheers,
Gerd

#25 lore raw
In reply to Peter Maydell
Quoted 83 lines · Peter Maydell
Quoted 16 lines · Gerd Hoffmann

The following changes since commit
567d0a19c7998fa366598b83d5a6e5f0759d3ea9:

  Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and- machine-pull-request' into staging (2017-10-10 13:25:46 +0100)

are available in the git repository at:

  git://git.kraxel.org/qemu tags/ui-20171011-pull-request

for you to fetch changes up to
92328b7104ffc825f10c33f3fd1866e940a523f7:

  ui/gtk: Fix deprecation of vte_terminal_copy_clipboard (2017-10- 11 10:03:31 +0200)

Quoted 6 lines

----------------------------------------------------------------
ui: use keycodemapdb for key code mappings, part one (v2)
ui: add qemu-keymap, update reverse keymaps (for qemu -k $map)
ui: fix for vte 0.50

----------------------------------------------------------------

Build failures:

NetBSD:
  CC      ui/input-keymap.o /root/qemu/ui/input-keymap.c:8:44: fatal error:
ui/input-keymap-linux-to-qcode.c: No such file or directory #include "ui/input-keymap-linux-to-qcode.c"
                                            ^

FreeBSD:

  CC      ui/input-keymap.o
/root/qemu/ui/input-keymap.c:8:10: fatal error:
'ui/input-keymap-linux-to-qcode.c' file not found
#include "ui/input-keymap-linux-to-qcode.c"
         ^

OpenBSD:

gmake: Entering directory '/home/qemu/build/all' /bin/sh: ./scripts/git-submodule.sh: No such file or directory
gmake: Leaving directory '/home/qemu/build/all'
gmake: Entering directory '/home/qemu/build/all'
  GIT
/bin/sh: ./scripts/git-submodule.sh: No such file or directory
gmake: *** [Makefile:30: git-submodule-update] Error 1
gmake: Leaving directory '/home/qemu/build/all'
gmake: *** Waiting for unfinished jobs....
gmake: Entering directory '/home/qemu/build/all' config-host.mak is out-of-date, running configure Install prefix    /usr/local
[configure output snipped]
gmake: Leaving directory '/home/qemu/build/all'

AArch32 Linux:

make: Entering directory '/home/peter.maydell/qemu/build/all-a32' config-host.mak is out-of-date, running configure Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
[...]
VxHS block device no
  GEN     config-host.h
  GEN     module_block.h
  GEN     ui/input-keymap-linux-to-qcode.c
  GEN     ui/input-keymap-qcode-to-qnum.c
  GEN     ui/input-keymap-qnum-to-qcode.c
  GIT     ui/keycodemapdb dtc
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  GEN     trace/generated-helpers.c
Makefile:30: recipe for target 'git-submodule-update' failed
make: *** [git-submodule-update] Error 128
make: *** Waiting for unfinished jobs....
make: Leaving directory '/home/peter.maydell/qemu/build/all-a32'

Quoted 8 lines

The OpenBSD failure is because make now tries to run a script that uses #!/bin/bash, and this machine doesn't have bash installed. Do we really need to add bash to our build-dependencies? The script doesn't seem like it's doing anything that critically requires bash...

thanks
-- PMM

New pull out, with bash dropped, repo switched to qemu mirror and one additional gtk fix picked up from the list.

cheers,
Gerd