1. 20 3月, 2018 3 次提交
  2. 19 3月, 2018 1 次提交
  3. 17 3月, 2018 2 次提交
  4. 16 3月, 2018 7 次提交
  5. 19 9月, 2017 1 次提交
    • A
      python: Don't hardcode interpreter path · f34fdd5a
      Andrea Bolognani 提交于
      This is particularly useful on operating systems that don't ship
      Python as part of the base system (eg. FreeBSD) while still working
      just as well as it did before on Linux.
      
      While at it, make it explicit that our scripts are only going to
      work with Python 2, and remove the usage of unbuffered I/O, which
      as far as I can tell has no effect on the output files.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      f34fdd5a
  6. 24 7月, 2017 1 次提交
    • M
      apibuild.py: Handle enum comments properly · 6efdd94d
      Michal Privoznik 提交于
      After f4cb85c6 we only have two options for placing enum
      values descriptions. It's either:
      
          typedef enum {
              /* Some long description. Therefore it's placed before
               * the value. */
              VIR_ENUM_A_VAL = 1,
          } virEnumA;
      
      or:
      
          typedef enum {
              VIR_ENUM_B_VAL = 1, /* Some short description */
          } virEnumB;
      
      However, our apibuild.py script is not able to deal with the
      former one. It messes up comments. To fix this couple of things
      needs to be done:
      
      a) DO NOT reset self.comment in parseEnumBlock(). This is a
      result from our tokenizer. Upon calling token() if it finds a
      comment block it stores it in self.comment and returns the next
      token (which is not comment). Therefore, if we reset self.comment
      we might lose the first comment in the enum block.
      
      b) we need a variable to track if the current enum block uses
      value descriptions before or after values. That is if it's type
      virEnumA or virEnumB. Depending on that, it we're dealing with
      virEnumA type and the current token is a comma ',' we can add the
      value into the list as we already have everything needed:
      comment, name and value.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
      6efdd94d
  7. 08 11月, 2016 1 次提交
    • G
      Unbreak rebuilding docs with release tarballs · 214c226f
      Guido Günther 提交于
      Release tarballs ship the include/libvirt/libvirt-common.h.
      
      when srcdir != builddir we end up including libvirt-common.h twice: from
      $top_srcdir/include/libvirt-common.h and from
      $builddir/include/libvirt-common.h leading to
      
        function virTypedParamsGetUInt from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
        function virTypedParamsAddBoolean from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
         …
      
      Only add the builddir to the search list if there is no pregenerated
      libvirt-common.h.
      
      Reuse the existing check that predates the libvirt.h → libvirt-common.h
      split and that probably was meant for exactly that.
      
      References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842452
      214c226f
  8. 20 7月, 2016 1 次提交
    • J
      hvsupport: use a regex instead of XML::XPath · ad9e72f5
      Ján Tomko 提交于
      When generating the hvsupport.html.in file, we parse the -api.xml
      files generated by apibuild.py to know in which HTML file the API
      function is.
      
      Doing an XPath query for every single 'function' element in the
      file is inefficient.
      
      Since the XML file is generated by another of our build scripts
      (apibuild.py, using Python's standard 'output.write' XML library),
      just find the function name->file mapping by a regex upfront.
      
      Also add a note about this next to the line that generates it
      in apibuild.py and do not check if XML::XPath is installed in
      bootstrap since we no longer use it.
      ad9e72f5
  9. 30 5月, 2016 1 次提交
  10. 28 5月, 2016 1 次提交
    • M
      docs: Teach apibuild to deal with (1U << 31) too · 38df47c9
      Michal Privoznik 提交于
      The apibuild script is a terrifying beast that parses some source
      files of ours and produces an XML representation of them. When it
      comes to parsing enums we have in some header files, it tries to
      be clever and detect a value that an enum member has (or if it is
      an alias for a different member). Whilst doing that it has to
      deal with values we give to the members in many formats. At some
      places we just pass the value in decimal:
      
          VIR_DOMAIN_BLOCK_JOB_TYPE_PULL = 1,
      
      in other places, we use the aliasing:
      
          VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE = VIR_CONNECT_LIST_DOMAINS_ACTIVE,
      
      and in other places bitwise shifts are used:
      
          VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1 << 31, /* enforce requested stats */
      
      The script tries to parse all of these resulting in the following
      tokens: "1", "VIR_CONNECT_LIST_DOMAINS_ACTIVE", "1<<31"; Then, the
      script tries to turn these into integers using python's eval()
      function. This function succeeds on the first and the last
      tokens. But, if we were to modify the last example so that it's
      of the following form:
      
          VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1U << 31, /* enforce requested stats */
      
      the token representing enum's member value will then be "1U<<31".
      So our parsing is good. Unfortunately, python is not aware of the
      difference between signed and unsigned C types, therefore eval()
      fails over this token and the parser falls back thinking it's an
      alias to another enum member. Well it's not.
      
      The solution is to transform [0-9]U into [0-9] as for our
      purposes here it's the same thing.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      38df47c9
  11. 26 4月, 2016 3 次提交
  12. 25 4月, 2016 1 次提交
    • P
      docs: apibuild: Fix VPATH build · d195cffa
      Peter Krempa 提交于
      libvirt-common.h is generated into builddir/include/libvirt. apibuild.py
      only operated on srcdir/inlcude/libvirt. With VPATH build
      srcdir/docs/libvirt-libvirt-common.html would not get generated and make
      RPM failed.
      d195cffa
  13. 22 4月, 2016 1 次提交
  14. 21 4月, 2016 2 次提交
    • P
      api: Generate docs for libvirt-common.h · 99283874
      Peter Krempa 提交于
      Since commit f5d9c5d0 moved the virTypedParam stuff into
      libvirt-common we did not generate any docs for them and neither did we
      populate them into libvirt-api.xml. This broke the sanity check in
      libvirt python. Fix it by generating docs for libvirt-common.h too.
      99283874
    • P
      apibuild: Allow completely skipping certain macros · a253396a
      Peter Krempa 提交于
      Some macros don't make sense to be documented at all. Add infrastructure
      to the web/api generator and add VIR_DEPRECATED and VIR_EXPORT_VAR as
      macros we should not document.
      a253396a
  15. 10 7月, 2015 1 次提交
  16. 16 6月, 2015 1 次提交
  17. 11 6月, 2015 2 次提交
  18. 04 12月, 2014 1 次提交
    • D
      Fix handling of whitespae in preprocessor macros for API generator · 64702ac3
      Daniel P. Berrange 提交于
      The apibuild.py script did not handle whitespace in preprocessor
      macros, so it failed to detect constants declared with '# define'
      instead of '#define'. Since we now correctly indent our public
      header files, we have silently lost all constants from
      libvirt-api.xml. This also caused us to not detect formatting
      errors in constant docs
      64702ac3
  19. 13 11月, 2014 1 次提交
    • D
      Fix API docs for header file re-organization · 47fb6138
      Daniel P. Berrange 提交于
      The API docs generators were broken by the header file
      re-organization. Specifically
      
       * html/libvirt-libvirt.html was empty (and should be deleted)
       * Makefile.am didn't install html/libvirt-libvirt-*.html
       * hvsupport.html was mostly empty
       * sitemap.html.in didn't list the new html/*.html files
      47fb6138
  20. 25 10月, 2014 8 次提交
    • D
      Move virConnect related APIs out of libvirt.h.in · bcec07b9
      Daniel P. Berrange 提交于
      Create a new libvirt-host.h file to hold the public
      API definitions for the virConnect type. This header
      file is not self-contained, so applications will not directly
      include it. They will continue to #include <libvirt/libvirt.h>
      bcec07b9
    • D
      Move virDomain related APIs out of libvirt.h.in · 653a5e49
      Daniel P. Berrange 提交于
      Create a new libvirt-domain.h file to hold the public
      API definitions for the virDomain type. This header
      file is not self-contained, so applications will not directly
      include it. They will continue to #include <libvirt/libvirt.h>
      653a5e49
    • D
      Move virEvent related APIs out of libvirt.h.in · 6d9c5f37
      Daniel P. Berrange 提交于
      Create a new libvirt-event.h file to hold the public
      API definitions for the virEvent type. This header
      file is not self-contained, so applications will not directly
      include it. They will continue to #include <libvirt/libvirt.h>
      6d9c5f37
    • D
      Move virStoragePool/Vol related APIs out of libvirt.h.in · c9456e1a
      Daniel P. Berrange 提交于
      Create a new libvirt-storage.h file to hold the public
      API definitions for the virStorage/Vol type. This header
      file is not self-contained, so applications will not directly
      include it. They will continue to #include <libvirt/libvirt.h>
      c9456e1a
    • D
      Move virStream related APIs out of libvirt.h.in · 2805ddb2
      Daniel P. Berrange 提交于
      Create a new libvirt-stream.h file to hold the public
      API definitions for the virStream type. This header
      file is not self-contained, so applications will not directly
      include it. They will continue to #include <libvirt/libvirt.h>
      
      Note the definition of virStreamPtr is not moved, since that
      must be declared early for all other libvirt APIs to be able
      to reference it.
      2805ddb2
    • D
      Move virSecret related APIs out of libvirt.h.in · 75ff42fe
      Daniel P. Berrange 提交于
      Create a new libvirt-secret.h file to hold the public
      API definitions for the virSecret type. This header
      file is not self-contained, so applications will not directly
      include it. They will continue to #include <libvirt/libvirt.h>
      75ff42fe
    • D
      Move virNodeDevice related APIs out of libvirt.h.in · 0147d6b8
      Daniel P. Berrange 提交于
      Create a new libvirt-nodedev.h file to hold the public
      API definitions for the virNodeDevice type. This header
      file is not self-contained, so applications will not directly
      include it. They will continue to #include <libvirt/libvirt.h>
      0147d6b8
    • D
      Move virNWFilter related APIs out of libvirt.h.in · 40741984
      Daniel P. Berrange 提交于
      Create a new libvirt-nwfilter.h file to hold the public
      API definitions for the virNWFilter type. This header
      file is not self-contained, so applications will not directly
      include it. They will continue to #include <libvirt/libvirt.h>
      40741984