1. 20 Mar, 2018 1 commit
  2. 13 Mar, 2018 1 commit
  3. 12 Mar, 2018 4 commits
  4. 06 Mar, 2018 2 commits
  5. 02 Mar, 2018 7 commits
    • Markus Armbruster's avatar
      qapi: Don't create useless directory qapi-generated · 418b1d0a
      Markus Armbruster authored
      We used to generate first test and later QGA QAPI code into
      qapi-generated/.  Commit b93b63f5 moved the test code to tests/.
      Commit 54c2e502 moved the QGA code to qga/qapi-generated/.  The
      directory has been unused since.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-30-armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: 's avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      418b1d0a
    • Markus Armbruster's avatar
      qapi: Move qapi-schema.json to qapi/, rename generated files · eb815e24
      Markus Armbruster authored
      Move qapi-schema.json to qapi/, so it's next to its modules, and all
      files get generated to qapi/, not just the ones generated for modules.
      
      Consistently name the generated files qapi-MODULE.EXT:
      qmp-commands.[ch] become qapi-commands.[ch], qapi-event.[ch] become
      qapi-events.[ch], and qmp-introspect.[ch] become qapi-introspect.[ch].
      This gets rid of the temporary hacks in scripts/qapi/commands.py,
      scripts/qapi/events.py, and scripts/qapi/common.py.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-28-armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: 's avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: Fix trailing dot in tpm.c, undo temporary hack for OSX toolchain]
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      eb815e24
    • Markus Armbruster's avatar
      qapi: Empty out qapi-schema.json · 112ed241
      Markus Armbruster authored
      The previous commit improved compile time by including less of the
      generated QAPI headers.  This is impossible for stuff defined directly
      in qapi-schema.json, because that ends up in headers that that pull in
      everything.
      
      Move everything but include directives from qapi-schema.json to new
      sub-module qapi/misc.json, then include just the "misc" shard where
      possible.
      
      It's possible everywhere, except:
      
      * monitor.c needs qmp-command.h to get qmp_init_marshal()
      
      * monitor.c, ui/vnc.c and the generated qapi-event-FOO.c need
        qapi-event.h to get enum QAPIEvent
      
      Perhaps we'll get rid of those some other day.
      
      Adding a type to qapi/migration.json now recompiles some 120 instead
      of 2300 out of 5100 objects.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-25-armbru@redhat.com>
      [eblake: rebase to master]
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      112ed241
    • Markus Armbruster's avatar
      qapi: Generate separate .h, .c for each module · 252dc310
      Markus Armbruster authored
      Our qapi-schema.json is composed of modules connected by include
      directives, but the generated code is monolithic all the same: one
      qapi-types.h with all the types, one qapi-visit.h with all the
      visitors, and so forth.  These monolithic headers get included all
      over the place.  In my "build everything" tree, adding a QAPI type
      recompiles about 4800 out of 5100 objects.
      
      We wouldn't write such monolithic headers by hand.  It stands to
      reason that we shouldn't generate them, either.
      
      Split up generated qapi-types.h to mirror the schema's modular
      structure: one header per module.  Name the main module's header
      qapi-types.h, and sub-module D/B.json's header D/qapi-types-B.h.
      
      Mirror the schema's includes in the headers, so that qapi-types.h gets
      you everything exactly as before.  If you need less, you can include
      one or more of the sub-module headers.  To be exploited shortly.
      
      Split up qapi-types.c, qapi-visit.h, qapi-visit.c, qmp-commands.h,
      qmp-commands.c, qapi-event.h, qapi-event.c the same way.
      qmp-introspect.h, qmp-introspect.c and qapi.texi remain monolithic.
      
      The split of qmp-commands.c duplicates static helper function
      qmp_marshal_output_str() in qapi-commands-char.c and
      qapi-commands-misc.c.  This happens when commands returning the same
      type occur in multiple modules.  Not worth avoiding.
      
      Since I'm going to rename qapi-event.[ch] to qapi-events.[ch], and
      qmp-commands.[ch] to qapi-commands.[ch], name the shards that way
      already, to reduce churn.  This requires temporary hacks in
      commands.py and events.py.  Similarly, c_name() must temporarily
      be taught to munge '/' in common.py.  They'll go away with the rename.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-23-armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      [eblake: declare a dummy variable in each .c file, to shut up OSX
      toolchain warnings about empty .o files, including hacking c_name()]
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      252dc310
    • Markus Armbruster's avatar
      qapi/types qapi/visit: Generate built-in stuff into separate files · cdb6610a
      Markus Armbruster authored
      Linking code from multiple separate QAPI schemata into the same
      program is possible, but involves some weirdness around built-in
      types:
      
      * We generate code for built-in types into .c only with option
        --builtins.  The user is responsible for generating code for exactly
        one QAPI schema per program with --builtins.
      
      * We generate code for built-in types into .h regardless of
        --builtins, but guarded by #ifndef QAPI_VISIT_BUILTIN.  Because all
        copies of this code are exactly the same, including any combination
        of these headers works.
      
      Replace this contraption by something more conventional: generate code
      for built-in types into their very own files: qapi-builtin-types.c,
      qapi-builtin-visit.c, qapi-builtin-types.h, qapi-builtin-visit.h, but
      only with --builtins.  Obey --output-dir, but ignore --prefix for
      them.
      
      Make qapi-types.h include qapi-builtin-types.h.  With multiple
      schemata you now have multiple qapi-types.[ch], but only one
      qapi-builtin-types.[ch].  Same for qapi-visit.[ch] and
      qapi-builtin-visit.[ch].
      
      Bonus: if all you need is built-in stuff, you can include a much
      smaller header.  To be exploited shortly.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-21-armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: 's avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: fix octal constant for python 3]
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      cdb6610a
    • Markus Armbruster's avatar
      qapi: Rename generated qmp-marshal.c to qmp-commands.c · 834a3f34
      Markus Armbruster authored
      All generated .c are named like their .h, except for qmp-marshal.c and
      qmp-commands.h.  To add to the confusion, tests-qmp-commands.c falsely
      matches generated test-qmp-commands.h.
      
      Get rid of this unnecessary complication.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-19-armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: 's avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      834a3f34
    • Markus Armbruster's avatar
      qapi-gen: New common driver for code and doc generators · fb0bc835
      Markus Armbruster authored
      Whenever qapi-schema.json changes, we run six programs eleven times to
      update eleven files.  Similar for qga/qapi-schema.json.  This is
      silly.  Replace the six programs by a single program that spits out
      all eleven files.
      
      The programs become modules in new Python package qapi, along with the
      helper library.  This requires moving them to scripts/qapi/.  While
      moving them, consistently drop executable mode bits.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20180211093607.27351-9-armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: move change to one-line 'blurb' earlier in series, mention mode
      bit change as intentional, update qapi-code-gen.txt to match actual
      generated events.c file]
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      fb0bc835
  6. 15 Feb, 2018 1 commit
  7. 13 Feb, 2018 2 commits
  8. 05 Feb, 2018 1 commit
    • Daniel P. Berrange's avatar
      qapi: force a UTF-8 locale for running Python · d4e5ec87
      Daniel P. Berrange authored
      Python2 did not validate locale correctness when reading input data, so
      would happily read UTF-8 data in non-UTF-8 locales. Python3 is strict so
      if you try to read UTF-8 data in the C locale, it will raise an error
      for any UTF-8 bytes that aren't representable in 7-bit ascii encoding.
      e.g.
      
      UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 54: ordinal not in range(128)
      Traceback (most recent call last):
        File "/tmp/qemu-test/src/scripts/qapi-commands.py", line 317, in <module>
          schema = QAPISchema(input_file)
        File "/tmp/qemu-test/src/scripts/qapi.py", line 1468, in __init__
          parser = QAPISchemaParser(open(fname, 'r'))
        File "/tmp/qemu-test/src/scripts/qapi.py", line 301, in __init__
          previously_included)
        File "/tmp/qemu-test/src/scripts/qapi.py", line 348, in _include
          exprs_include = QAPISchemaParser(fobj, previously_included, info)
        File "/tmp/qemu-test/src/scripts/qapi.py", line 271, in __init__
          self.src = fp.read()
        File "/usr/lib64/python3.5/encodings/ascii.py", line 26, in decode
          return codecs.ascii_decode(input, self.errors)[0]
      
      More background on this can be seen in
      
        https://www.python.org/dev/peps/pep-0538/
      
      Many distros support a new C.UTF-8 locale that is like the C locale,
      but with UTF-8 instead of 7-bit ASCII. That is not entirely portable
      though. This patch thus sets the LANG to "C", but overrides LC_CTYPE
      to be en_US.UTF-8 locale. This gets us pretty close to C.UTF-8, but
      in a way that should be portable to everywhere QEMU builds.
      
      This patch only forces UTF-8 for QAPI scripts, since that is the one
      showing the immediate error under Python3 with C locale, but potentially
      we ought to force this for all python scripts used in the build process.
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <20180116134217.8725-9-berrange@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarEduardo Habkost <ehabkost@redhat.com>
      d4e5ec87
  9. 31 Jan, 2018 1 commit
  10. 29 Jan, 2018 3 commits
    • Daniel P. Berrange's avatar
      ui: fix alphabetical ordering of keymaps · 5a15e6b1
      Daniel P. Berrange authored
      The qcode-to-linux keymaps was accidentally added in the wrong place
      by
      
        commit de80d785
        Author: Owen Smith <owen.smith@citrix.com>
        Date:   Fri Nov 3 11:56:28 2017 +0000
      
          ui: generate qcode to linux mappings
      
      breaking the alphabetical ordering of keymaps
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: 's avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180117164118.8510-4-berrange@redhat.com
      Signed-off-by: 's avatarGerd Hoffmann <kraxel@redhat.com>
      5a15e6b1
    • Daniel P. Berrange's avatar
      hw: convert the escc device to keycodemapdb · e709a61a
      Daniel P. Berrange authored
      Replace the qcode_to_keycode table with automatically
      generated tables.
      
      Missing entries in qcode_to_keycode now fixed:
      
       - Q_KEY_CODE_KP_COMMA -> 0x2d
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20180117164118.8510-3-berrange@redhat.com
      Signed-off-by: 's avatarGerd Hoffmann <kraxel@redhat.com>
      e709a61a
    • Daniel P. Berrange's avatar
      hw: convert ps2 device to keycodemapdb · ab8f9d49
      Daniel P. Berrange authored
      Replace the qcode_to_keycode_set1, qcode_to_keycode_set2,
      and qcode_to_keycode_set3 tables with automatically
      generated tables.
      
      Missing entries in qcode_to_keycode_set1 now fixed:
      
       - Q_KEY_CODE_SYSRQ -> 0x54
       - Q_KEY_CODE_PRINT -> 0x54 (NB ignored due to special case)
       - Q_KEY_CODE_AGAIN -> 0xe005
       - Q_KEY_CODE_PROPS -> 0xe006
       - Q_KEY_CODE_UNDO -> 0xe007
       - Q_KEY_CODE_FRONT -> 0xe00c
       - Q_KEY_CODE_COPY -> 0xe078
       - Q_KEY_CODE_OPEN -> 0x64
       - Q_KEY_CODE_PASTE -> 0x65
       - Q_KEY_CODE_CUT -> 0xe03c
       - Q_KEY_CODE_LF -> 0x5b
       - Q_KEY_CODE_HELP -> 0xe075
       - Q_KEY_CODE_COMPOSE -> 0xe05d
       - Q_KEY_CODE_PAUSE -> 0xe046
       - Q_KEY_CODE_KP_EQUALS -> 0x59
      
      And some mistakes corrected:
      
       - Q_KEY_CODE_HIRAGANA was mapped to 0x70 (Katakanahiragana)
         instead of of 0x77 (Hirigana)
       - Q_KEY_CODE_MENU was incorrectly mapped to the compose
         scancode (0xe05d) and is now mapped to 0xe01e
       - Q_KEY_CODE_FIND was mapped to 0xe065 (Search) instead
         of to 0xe041 (Find)
       - Q_KEY_CODE_POWER, SLEEP & WAKE had 0x0e instead of 0xe0
         as the prefix
      
      Missing entries in qcode_to_keycode_set2 now fixed:
      
       - Q_KEY_CODE_PRINT -> 0x7f (NB ignored due to special case)
       - Q_KEY_CODE_COMPOSE -> 0xe02f
       - Q_KEY_CODE_PAUSE -> 0xe077
       - Q_KEY_CODE_KP_EQUALS -> 0x0f
      
      And some mistakes corrected:
      
       - Q_KEY_CODE_HIRAGANA was mapped to 0x13 (Katakanahiragana)
         instead of of 0x62 (Hirigana)
       - Q_KEY_CODE_MENU was incorrectly mapped to the compose
         scancode (0xe02f) and is now not mapped
       - Q_KEY_CODE_FIND was mapped to 0xe010 (Search) and is now
         not mapped.
       - Q_KEY_CODE_POWER, SLEEP & WAKE had 0x0e instead of 0xe0
         as the prefix
      
      Missing entries in qcode_to_keycode_set3 now fixed:
      
       - Q_KEY_CODE_ASTERISK -> 0x7e
       - Q_KEY_CODE_SYSRQ -> 0x57
       - Q_KEY_CODE_LESS -> 0x13
       - Q_KEY_CODE_STOP -> 0x0a
       - Q_KEY_CODE_AGAIN -> 0x0b
       - Q_KEY_CODE_PROPS -> 0x0c
       - Q_KEY_CODE_UNDO -> 0x10
       - Q_KEY_CODE_COPY -> 0x18
       - Q_KEY_CODE_OPEN -> 0x20
       - Q_KEY_CODE_PASTE -> 0x28
       - Q_KEY_CODE_FIND -> 0x30
       - Q_KEY_CODE_CUT -> 0x38
       - Q_KEY_CODE_HELP -> 0x09
       - Q_KEY_CODE_COMPOSE -> 0x8d
       - Q_KEY_CODE_AUDIONEXT -> 0x93
       - Q_KEY_CODE_AUDIOPREV -> 0x94
       - Q_KEY_CODE_AUDIOSTOP -> 0x98
       - Q_KEY_CODE_AUDIOMUTE -> 0x9c
       - Q_KEY_CODE_VOLUMEUP -> 0x95
       - Q_KEY_CODE_VOLUMEDOWN -> 0x9d
       - Q_KEY_CODE_CALCULATOR -> 0xa3
       - Q_KEY_CODE_AC_HOME -> 0x97
      
      And some mistakes corrected:
      
       - Q_KEY_CODE_MENU was incorrectly mapped to the compose
         scancode (0x8d) and is now 0x91
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20180117164118.8510-2-berrange@redhat.com
      Signed-off-by: 's avatarGerd Hoffmann <kraxel@redhat.com>
      ab8f9d49
  11. 25 Jan, 2018 2 commits
    • Daniel P. Berrange's avatar
      ui: convert GTK and SDL1 frontends to keycodemapdb · 2ec78706
      Daniel P. Berrange authored
      The x_keycode_to_pc_keycode and evdev_keycode_to_pc_keycode
      tables are replaced with automatically generated tables.
      In addition the X11 heuristics are improved to detect running
      on XQuartz and XWin X11 servers, to activate the correct OS-X
      and Win32 keycode maps.
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20180117164717.15855-3-berrange@redhat.com
      Signed-off-by: 's avatarGerd Hoffmann <kraxel@redhat.com>
      2ec78706
    • Daniel P. Berrange's avatar
      ui: convert the SDL2 frontend to keycodemapdb · ed7b2624
      Daniel P. Berrange authored
      The SDL2 scancodes are conveniently identical to the USB
      scancodes. Replace the sdl2_scancode_to_qcode table with
      an automatically generated table.
      
      Missing entries in sdl2_scancode_to_qcode now fixed:
      
        - 0x32 -> Q_KEY_CODE_BACKSLASH
        - 0x66 -> Q_KEY_CODE_POWER
        - 0x67 -> Q_KEY_CODE_KP_EQUALS
        - 0x74 -> Q_KEY_CODE_OPEN
        - 0x77 -> Q_KEY_CODE_FRONT
        - 0x7f -> Q_KEY_CODE_AUDIOMUTE
        - 0x80 -> Q_KEY_CODE_VOLUMEUP
        - 0x81 -> Q_KEY_CODE_VOLUMEDOWN
        - 0x85 -> Q_KEY_CODE_KP_COMMA
        - 0x87 -> Q_KEY_CODE_RO
        - 0x89 -> Q_KEY_CODE_YEN
        - 0x8a -> Q_KEY_CODE_HENKAN
        - 0x93 -> Q_KEY_CODE_HIRAGANA
        - 0xe8 -> Q_KEY_CODE_AUDIOPLAY
        - 0xe9 -> Q_KEY_CODE_AUDIOSTOP
        - 0xea -> Q_KEY_CODE_AUDIOPREV
        - 0xeb -> Q_KEY_CODE_AUDIONEXT
        - 0xed -> Q_KEY_CODE_VOLUMEUP
        - 0xee -> Q_KEY_CODE_VOLUMEDOWN
        - 0xef -> Q_KEY_CODE_AUDIOMUTE
        - 0xf1 -> Q_KEY_CODE_AC_BACK
        - 0xf2 -> Q_KEY_CODE_AC_FORWARD
        - 0xf3 -> Q_KEY_CODE_STOP
        - 0xf4 -> Q_KEY_CODE_FIND
        - 0xf8 -> Q_KEY_CODE_SLEEP
        - 0xfa -> Q_KEY_CODE_AC_REFRESH
        - 0xfb -> Q_KEY_CODE_CALCULATOR
      
      And some mistakes corrected:
      
        - 0x65 -> Q_KEY_CODE_COMPOSE, not duplicating Q_KEY_CODE_MENU
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20180117164717.15855-2-berrange@redhat.com
      Signed-off-by: 's avatarGerd Hoffmann <kraxel@redhat.com>
      ed7b2624
  12. 18 Jan, 2018 1 commit
  13. 12 Jan, 2018 2 commits
  14. 18 Dec, 2017 2 commits
    • Philippe Mathieu-Daudé's avatar
      Makefile: add more targets to the UNCHECKED_GOALS rule · 28fa2927
      Philippe Mathieu-Daudé authored
      These targets don't need a full build of git submodules.
      (See b8e535ae and eaa2ddbb).
      Signed-off-by: 's avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: 's avatarMichael Tokarev <mjt@tls.msk.ru>
      28fa2927
    • Philippe Mathieu-Daudé's avatar
      Makefile: use $(MAKE) variable · b98a3bae
      Philippe Mathieu-Daudé authored
      For some systems (i.e. FreeBSD) the default 'make' is not compatible with the
      GNU extensions used by QEMU makefiles.
      
      Calling the GNU make (gmake) works, however the help displayed refers to the
      host 'make' and copy/paste leads to lot of unobvious errors:
      
        $ gmake check-help
        [...]
         make check                Run all tests
      
        $ make check
        make: "Makefile" line 28: Missing dependency operator
        make: "Makefile" line 37: Need an operator
        make: "Makefile" line 41: warning: duplicate script for target "git-submodule-update" ignored
        make: "rules.mak" line 70: warning: duplicate script for target "%.o" ignored
        make: Unknown modifier ' '
        make: Unclosed substitution for eval modules (= missing)
        make: "tests/Makefile.include" line 24: Variable/Value missing from "export"
        make: "tests/" line 1: warning: Zero byte read from file, skipping rest of line.
        make: "tests/" line 1: Need an operator
        make: "Makefile" line 660: warning: duplicate script for target "ifneq" ignored
        make: "Makefile" line 78: warning: using previous script for "ifneq" defined here
        make: Fatal errors encountered -- cannot continue
      
      Using the $(MAKE) variable, the help displayed is consistent with the 'make'
      program used.
      Signed-off-by: 's avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarMichael Tokarev <mjt@tls.msk.ru>
      b98a3bae
  15. 14 Dec, 2017 1 commit
  16. 21 Nov, 2017 1 commit
  17. 14 Nov, 2017 1 commit
  18. 09 Nov, 2017 1 commit
  19. 06 Nov, 2017 3 commits
    • Daniel P. Berrange's avatar
      build: remove use of MAKELEVEL optimization in submodule handling · c4b01c7c
      Daniel P. Berrange authored
      The Makefile attempts to optimize the handling of submodules by using MAKELEVEL
      to only check the submodule status when running from the top level make
      invokation. This causes problems for people who are using a makefile of their
      own to in turn invoke QEMU's makefile, as MAKELEVEL is already set to 1 (or
      more) when QEMU's makefile runs.
      
      This optimization should not really be needed, since the git-submodule.sh
      script is already used to detect if a submodule update is required. This by
      removing the MAKELEVEL check, we at most add an extra 'git-submodule.sh status'
      call to each make level, the overhead of which is lost in noise of building
      QEMU.
      Reviewed-by: 's avatarGreg Kurz <groug@kaod.org>
      Tested-by: 's avatarGreg Kurz <groug@kaod.org>
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      c4b01c7c
    • Daniel P. Berrange's avatar
      build: allow automatic git submodule updates to be disabled · f62bbee5
      Daniel P. Berrange authored
      Some people building QEMU use VPATH builds where the source directory is on a
      read-only volume. In such a case 'scripts/git-submodules.sh update' will always
      fail and users are required to run it manually themselves on their original
      writable source directory.
      
      While this is already supported, it is nice to give users a command line flag
      to configure to permanently disable automatic submodule updates, as it means
      they won't get hard to diagnose failures from git-submodules.sh at an arbitrary
      later date.
      
      This patch thus introduces a flag '--disable-git-update' which will prevent
      'make' from ever running 'scripts/git-submodules.sh update'. It will still run
      the 'status' command to determine if a submodule update is needed, but when it
      does this it'll simply stop and print a message instructing the developer what
      todo. eg
      
      $ ./configure  --target-list=x86_64-softmmu --disable-git-update
      ...snip...
      
      $ make
        GEN     config-host.h
        GEN     trace/generated-tcg-tracers.h
        GEN     trace/generated-helpers-wrappers.h
        GEN     trace/generated-helpers.h
        GEN     trace/generated-helpers.c
        GEN     module_block.h
      
      GIT submodule checkout is out of date. Please run
        scripts/git-submodule.sh update ui/keycodemapdb
      from the source directory checkout /home/berrange/src/virt/qemu
      
      make: *** [Makefile:31: git-submodule-update] Error 1
      Tested-by: 's avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      f62bbee5
    • Daniel P. Berrange's avatar
      build: allow setting a custom GIT binary for transparent proxying · cc84d63a
      Daniel P. Berrange authored
      Some users can't run a bare 'git' command, due to need for a transparent
      proxying solution such as 'tsocks'. This adds an argument to configure to
      let users specify such a thing:
      
        ./configure --with-git="tsocks git"
      
      The submodule script is also updated to give the user a hint about using this
      flag, if we fail to checkout modules.
      Tested-by: 's avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      cc84d63a
  20. 26 Oct, 2017 1 commit
  21. 19 Oct, 2017 1 commit
    • Aaron Lindsay's avatar
      build: Fix dtc-checkout race condition in Makefile · 00525864
      Aaron Lindsay authored
      This was introduced by:
          commit aef45d51
          Author: Daniel P. Berrange <berrange@redhat.com>
          Date:   Fri Sep 29 11:11:56 2017 +0100
      
      	build: automatically handle GIT submodule checkout for dtc
      
      On my system, I see the following with a fresh clone:
      
      % ./configure --disable-gtk --target-list=aarch64-softmmu
      % make -j8
        GEN     aarch64-softmmu/config-devices.mak.tmp
        GEN     config-host.h
      mkdir -p dtc/libfdt
        GIT     ui/keycodemapdb dtc
      mkdir -p dtc/tests
        GEN     qemu-options.def
      [snip]
        GEN     migration/trace.h
      make: *** [git-submodule-update] Error 1
      make: *** Waiting for unfinished jobs....
      
      Upon closer inspection, the root cause of the error is:
      
      % git submodule update --init ui/keycodemapdb dtc
      fatal: destination path 'dtc' already exists and is not an empty directory.
      Clone of 'git://git.qemu-project.org/dtc.git' into submodule path 'dtc' failed
      
      This patch fixes this race condition by forcing the 'dtc/%' rule which caused
      'dtc' to be non-empty to wait on '.git-submodule-status'.
      Signed-off-by: 's avatarAaron Lindsay <alindsay@codeaurora.org>
      Reviewed-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Acked-by: 's avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 1508352023-28591-1-git-send-email-alindsay@codeaurora.org
      Signed-off-by: 's avatarPeter Maydell <peter.maydell@linaro.org>
      00525864
  22. 17 Oct, 2017 1 commit