[libvirt] [PATCH 0/4] Couple of qemu fixups
by Michal Privoznik
The first issue (patch 2/4) is an issue I've found by code
investigation. The second (patch 3/4) fixes a build problem and the last
patch disables detection of a feature that is not merged in QEMU just
yet.
Michal Prívozník (4):
virdomainobjlist: Documnet virDomainObjListForEach()
lib: Grab write lock when modifying list of domains
qemu_slirp: Drop unused variable in qemuSlirpStart()
qemu_capabilities: Temporarily disable dbus-vmstate capability
src/bhyve/bhyve_driver.c | 2 +-
src/bhyve/bhyve_process.c | 2 +-
src/conf/virdomainobjlist.c | 23 ++++++++++++++++++++++-
src/conf/virdomainobjlist.h | 1 +
src/libxl/libxl_driver.c | 11 +++++++----
src/lxc/lxc_process.c | 4 ++--
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_process.c | 3 ++-
src/qemu/qemu_slirp.c | 1 -
src/vmware/vmware_driver.c | 2 +-
10 files changed, 37 insertions(+), 13 deletions(-)
--
2.21.0
5 years, 3 months
[libvirt] [PATCH] qemu: update threading info about domain object refs
by Jonathon Jongsma
Since commit fd9ef3b31e, virDomainFindByUUIDRef() no longer exists and
all virDomainObjListFindBy*() functions now increment the reference
count.
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/qemu/THREADS.txt | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/qemu/THREADS.txt b/src/qemu/THREADS.txt
index d17f3f4e0c..aa428fda6a 100644
--- a/src/qemu/THREADS.txt
+++ b/src/qemu/THREADS.txt
@@ -25,27 +25,17 @@ There are a number of locks on various objects
* virDomainObjPtr
- Will be locked after calling any of the virDomainObjListFindBy{ID,Name,UUID}
- methods. However, preferred method is qemuDomObjFromDomain() that uses
- virDomainFindByUUIDRef() which also increases the reference counter and
- finds the domain in the domain list without blocking all other lookups.
- When the domain is locked and the reference increased, the preferred way of
- decrementing the reference counter and unlocking the domain is using the
+ Will be locked and the reference counter will be increased after calling
+ any of the virDomainObjListFindBy{ID,Name,UUID} methods. The preferred way
+ of decrementing the reference counter and unlocking the domain is using the
virDomainObjEndAPI() function.
Lock must be held when changing/reading any variable in the virDomainObjPtr
- If the lock needs to be dropped & then re-acquired for a short period of
- time, the reference count must be incremented first using virDomainObjRef().
- There is no need to increase the reference count if qemuDomObjFromDomain()
- was used for looking up the domain. In this case there is one reference
- already added by that function.
-
This lock must not be held for anything which sleeps/waits (i.e. monitor
commands).
-
* qemuMonitorPrivatePtr: Job conditions
Since virDomainObjPtr lock must not be held during sleeps, the job
--
2.21.0
5 years, 3 months
[libvirt] [PATCH] docs: remove devhelp API docs
by Daniel P. Berrangé
We currently generate two completely separate API references for the
libvirt public API. One at 'docs/html/' and one at 'docs/devhelp/'.
Both are published on the website, but we only link to content in
the 'docs/html/' pages.
Both are installed in the libvirt-docs sub-RPM, with a full copy
of the website including 'docs/html/' in /usr/share/docs/libvirt-docs,
while the 'docs/devhelp/' content goes to /usr/share/gtk-doc/. The
latter was broken for years until:
commit ca6f602546cb28658db05f29bc840e04d22d0947
Author: Andrea Bolognani <abologna(a)redhat.com>
Date: Fri May 10 14:54:52 2019 +0200
docs: Introduce $(devhelphtml_generated)
Our XSLT magic generates one Devhelp-compatible HTML file
per documentation module, but so far we have only shipped
and installed documentation for virterror.
Now that we have $(modules), however, we can generate the
list of files the same way we do for regular documentation
and make sure we always ship and install everything.
That this bug went unnoticed for so long is a sign of how few
people are using the devhelp docs. The only commits to the devhelp
code since it was first introduced have been fixing various build
problems that hit.
The only obvious difference between the two sets of docs is the CSS
styling in use. Overall devhelp does not look compelling enough to
justify having two duplicated sets of API docs. Eliminating it will
reduce the amount of XSL code we are carrying in the tree which is
an attractive benefit.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
docs/Makefile.am | 38 +--
docs/devhelp/devhelp.xsl | 131 ---------
docs/devhelp/home.png | Bin 654 -> 0 bytes
docs/devhelp/html.xsl | 573 ---------------------------------------
docs/devhelp/left.png | Bin 459 -> 0 bytes
docs/devhelp/right.png | Bin 472 -> 0 bytes
docs/devhelp/style.css | 66 -----
docs/devhelp/up.png | Bin 406 -> 0 bytes
libvirt.spec.in | 8 -
9 files changed, 1 insertion(+), 815 deletions(-)
delete mode 100644 docs/devhelp/devhelp.xsl
delete mode 100644 docs/devhelp/home.png
delete mode 100644 docs/devhelp/html.xsl
delete mode 100644 docs/devhelp/left.png
delete mode 100644 docs/devhelp/right.png
delete mode 100644 docs/devhelp/style.css
delete mode 100644 docs/devhelp/up.png
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 1cdb584b0b..7a5d3450fc 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -17,7 +17,6 @@
## <http://www.gnu.org/licenses/>.
HTML_DIR = $(docdir)/html
-DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
modules = \
libvirt-common \
@@ -50,16 +49,6 @@ apipng = \
html/home.png \
html/right.png
-devhelphtml = \
- devhelp/libvirt.devhelp \
- devhelp/index.html \
- devhelp/general.html \
- $(devhelphtml_generated)
-
-devhelphtml_generated = \
- $(addprefix devhelp/libvirt-,$(addsuffix .html,$(modules))) \
- $(NULL)
-
css = \
generic.css \
libvirt.css \
@@ -84,16 +73,6 @@ fonts = \
fonts/overpass-mono-semibold.woff \
fonts/overpass-regular.woff
-devhelppng = \
- devhelp/home.png \
- devhelp/left.png \
- devhelp/right.png \
- devhelp/up.png
-
-devhelpcss = devhelp/style.css
-
-devhelpxsl = devhelp/devhelp.xsl devhelp/html.xsl
-
logofiles = \
logos/logo-base.svg \
logos/logo-square.svg \
@@ -188,7 +167,6 @@ EXTRA_DIST= \
site.xsl subsite.xsl newapi.xsl page.xsl \
wrapstring.xsl \
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
- $(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
$(xml) $(qemu_xml) $(lxc_xml) $(admin_xml) $(fig) $(png) $(css) \
$(javascript) $(logofiles) \
$(internals_html_in) $(internals_html) $(fonts) \
@@ -206,7 +184,6 @@ $(srcdir)/aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \
MAINTAINERCLEANFILES = \
$(addprefix $(srcdir)/,$(dot_html)) \
$(addprefix $(srcdir)/,$(apihtml)) \
- $(addprefix $(srcdir)/,$(devhelphtml)) \
$(addprefix $(srcdir)/,$(internals_html)) \
$(addprefix $(srcdir)/,$(kbase_html)) \
$(srcdir)/hvsupport.html.in $(srcdir)/aclperms.htmlinc
@@ -226,7 +203,7 @@ lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
admin_api: $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
web: $(dot_html) $(internals_html) $(kbase_html) \
- html/index.html devhelp/index.html
+ html/index.html
hvsupport.html: $(srcdir)/hvsupport.html.in
@@ -284,12 +261,6 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
$(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml && \
$(XMLLINT) --nonet --noout $(srcdir)/html/*.html
-$(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
- $(AM_V_GEN)$(XSLTPROC) --stringparam timestamp $(timestamp) \
- --nonet -o $(srcdir)/devhelp/ \
- $(top_srcdir)/docs/devhelp/devhelp.xsl $(srcdir)/libvirt-api.xml
-
-
python_generated_files = \
$(srcdir)/html/libvirt-libvirt-lxc.html \
$(srcdir)/html/libvirt-libvirt-qemu.html \
@@ -388,10 +359,6 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/kbase
for f in $(kbase_html); do \
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/kbase; done
- $(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
- for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
- $(INSTALL) -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
- done
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/fonts
for f in $(fonts); do \
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/fonts; \
@@ -415,6 +382,3 @@ uninstall-local:
for f in $(kbase_html); do \
rm -f $(DESTDIR)$(HTML_DIR)/$$f; \
done
- for f in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
- rm -f $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
- done
diff --git a/docs/devhelp/devhelp.xsl b/docs/devhelp/devhelp.xsl
deleted file mode 100644
index 17a980c73a..0000000000
--- a/docs/devhelp/devhelp.xsl
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns="http://www.devhelp.net/book"
- xmlns:exsl="http://exslt.org/common"
- xmlns:str="http://exslt.org/strings"
- extension-element-prefixes="exsl str"
- exclude-result-prefixes="exsl str">
- <!-- The stylesheet for the html pages -->
- <xsl:import href="html.xsl"/>
-
- <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
-
- <!-- Build keys for all symbols -->
- <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
-
- <xsl:template match="/">
- <xsl:document xmlns="http://www.devhelp.net/book" href="libvirt.devhelp"
- method="xml" encoding="UTF-8" indent="yes">
- <xsl:apply-templates/>
- </xsl:document>
- </xsl:template>
-
- <xsl:template match="/api">
- <book title="{@name} Reference Manual" link="index.html" author="" name="{@name}">
- <xsl:apply-templates select="files"/>
- <xsl:apply-templates select="symbols"/>
- </book>
- <xsl:call-template name="generate_index"/>
- <xsl:call-template name="generate_general"/>
- </xsl:template>
- <xsl:template match="/api/files">
- <chapters>
- <sub name="API" link="general.html">
- <xsl:apply-templates select="file"/>
- </sub>
- </chapters>
- </xsl:template>
- <xsl:template match="/api/files/file">
- <xsl:variable name="module" select="@name"/>
- <xsl:variable name="prev" select="string(preceding-sibling::file[position()=1]/@name)"/>
- <xsl:variable name="next" select="string(following-sibling::file[position()=1]/@name)"/>
- <sub name="{@name}" link="libvirt-{(a)name}.html"/>
- <xsl:document xmlns="" href="libvirt-{(a)name}.html" method="xml" indent="yes" encoding="UTF-8">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title><xsl:value-of select="concat(@name, ': ', summary)"/></title>
- <meta name="generator" content="Libvirt devhelp stylesheet"/>
- <link rel="start" href="index.html" title="libvirt Reference Manual"/>
- <link rel="up" href="general.html" title="API"/>
- <link rel="stylesheet" href="style.css" type="text/css"/>
- <link rel="chapter" href="general.html" title="API"/>
- </head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-
- <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
- <tr valign="middle">
- <xsl:if test="$prev != ''">
- <td><a accesskey="p" href="libvirt-{$prev}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"/></a></td>
- </xsl:if>
- <td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"/></a></td>
- <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
- <xsl:if test="$next != ''">
- <td><a accesskey="n" href="libvirt-{$next}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
- </xsl:if>
- <th width="100%" align="center">libvirt Reference Manual</th>
- </tr>
- </table>
- <h2><span class="refentrytitle"><xsl:value-of select="@name"/></span></h2>
- <p><xsl:value-of select="@name"/> - <xsl:value-of select="summary"/></p>
- <p><xsl:value-of select="description"/></p>
- <xsl:if test="deprecated">
- <p> WARNING: this module is deprecated !</p>
- </xsl:if>
- <div class="refsynopsisdiv">
- <h2>Synopsis</h2>
- <pre class="synopsis">
- <xsl:apply-templates mode="synopsis" select="exports"/>
- </pre>
- </div>
- <div class="refsect1" lang="en">
- <h2>Description</h2>
- </div>
- <div class="refsect1" lang="en">
- <h2>Details</h2>
- <div class="refsect2" lang="en">
- <xsl:apply-templates mode="details" select="/api/symbols/macro[@file=$module]"/>
- <xsl:apply-templates mode="details" select="/api/symbols/typedef[@file=$module] | /api/symbols/struct[@file=$module]"/>
- <xsl:apply-templates mode="details" select="/api/symbols/functype[@file=$module]"/>
- <xsl:apply-templates mode="details" select="/api/symbols/variable[@file=$module]"/>
- <xsl:apply-templates mode="details" select="/api/symbols/function[@file=$module]"/>
- </div>
- </div>
- </body>
- </html>
- </xsl:document>
- </xsl:template>
- <xsl:template match="/api/symbols">
- <functions>
- <xsl:apply-templates select="macro"/>
- <xsl:apply-templates select="enum"/>
- <xsl:apply-templates select="typedef"/>
- <xsl:apply-templates select="struct"/>
- <xsl:apply-templates select="functype"/>
- <xsl:apply-templates select="variable"/>
- <xsl:apply-templates select="function"/>
- </functions>
- </xsl:template>
- <xsl:template match="/api/symbols/functype">
- <function name="{@name}" link="libvirt-{@file}.html#{(a)name}"/>
- </xsl:template>
- <xsl:template match="/api/symbols/function">
- <function name="{@name} ()" link="libvirt-{@file}.html#{(a)name}"/>
- </xsl:template>
- <xsl:template match="/api/symbols/typedef">
- <function name="{@name}" link="libvirt-{@file}.html#{(a)name}"/>
- </xsl:template>
- <xsl:template match="/api/symbols/enum">
- <function name="{@name}" link="libvirt-{@file}.html#{(a)name}"/>
- </xsl:template>
- <xsl:template match="/api/symbols/struct">
- <function name="{@name}" link="libvirt-{@file}.html#{(a)name}"/>
- </xsl:template>
- <xsl:template match="/api/symbols/macro">
- <function name="{@name}" link="libvirt-{@file}.html#{(a)name}"/>
- </xsl:template>
- <xsl:template match="/api/symbols/variable">
- <function name="{@name}" link="libvirt-{@file}.html#{(a)name}"/>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/docs/devhelp/home.png b/docs/devhelp/home.png
deleted file mode 100644
index 17003611d9..0000000000
Binary files a/docs/devhelp/home.png and /dev/null differ
diff --git a/docs/devhelp/html.xsl b/docs/devhelp/html.xsl
deleted file mode 100644
index 587cbfc1a9..0000000000
--- a/docs/devhelp/html.xsl
+++ /dev/null
@@ -1,573 +0,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:exsl="http://exslt.org/common"
- xmlns:str="http://exslt.org/strings"
- extension-element-prefixes="exsl str"
- exclude-result-prefixes="exsl str">
- <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
-
- <!-- This is convoluted but needed to force the current document to
- be the API one and not the result tree from the tokenize() result,
- because the keys are only defined on the main document -->
- <xsl:template mode="dumptoken" match='*'>
- <xsl:param name="token"/>
- <xsl:variable name="ref" select="key('symbols', $token)"/>
- <xsl:choose>
- <xsl:when test="$ref">
- <a href="libvirt-{$ref/@file}.html#{$ref/(a)name}"><xsl:value-of select="$token"/></a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$token"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- dumps a string, making cross-reference links -->
- <xsl:template name="dumptext">
- <xsl:param name="text"/>
- <xsl:variable name="ctxt" select='.'/>
- <!-- <xsl:value-of select="$text"/> -->
- <xsl:for-each select="str:tokenize($text, ' 	')">
- <xsl:apply-templates select="$ctxt" mode='dumptoken'>
- <xsl:with-param name="token" select="string(.)"/>
- </xsl:apply-templates>
- <xsl:if test="position() != last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
-
-<!--
-
- The following builds the Synopsis section
-
--->
- <xsl:template mode="synopsis" match="function">
- <xsl:variable name="name" select="string(@name)"/>
- <xsl:variable name="nlen" select="string-length($name)"/>
- <xsl:variable name="tlen" select="string-length(return/@type)"/>
- <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="return/@type"/>
- </xsl:call-template>
- <xsl:text>	</xsl:text>
- <a href="#{@name}"><xsl:value-of select="@name"/></a>
- <xsl:if test="$blen - 40 < -8">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:if test="$blen - 40 < 0">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:text>	(</xsl:text>
- <xsl:if test="not(arg)">
- <xsl:text>void</xsl:text>
- </xsl:if>
- <xsl:for-each select="arg">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@type"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:if test="position() != last()">
- <xsl:text>, </xsl:text><br/>
- <xsl:if test="$blen - 40 > 8">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:if test="$blen - 40 > 0">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:text>					 </xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>);</xsl:text>
- <xsl:text>
-</xsl:text>
- </xsl:template>
-
- <xsl:template mode="synopsis" match="functype">
- <xsl:variable name="name" select="string(@name)"/>
- <xsl:variable name="nlen" select="string-length($name)"/>
- <xsl:variable name="tlen" select="string-length(return/@type)"/>
- <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
- <xsl:text>typedef </xsl:text>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="return/@type"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <a href="#{@name}"><xsl:value-of select="@name"/></a>
- <xsl:if test="$blen - 40 < -8">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:if test="$blen - 40 < 0">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:text>	(</xsl:text>
- <xsl:if test="not(arg)">
- <xsl:text>void</xsl:text>
- </xsl:if>
- <xsl:for-each select="arg">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@type"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:if test="position() != last()">
- <xsl:text>, </xsl:text><br/>
- <xsl:if test="$blen - 40 > 8">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:if test="$blen - 40 > 0">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:text>					 </xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>);</xsl:text>
- <xsl:text>
-</xsl:text>
- </xsl:template>
-
- <xsl:template mode="synopsis" match="exports[@type='function']">
- <xsl:variable name="def" select="key('symbols',@symbol)"/>
- <xsl:apply-templates mode="synopsis" select="$def"/>
- </xsl:template>
-
- <xsl:template mode="synopsis" match="exports[@type='typedef']">
- <xsl:text>typedef </xsl:text>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="string(key('symbols',@symbol)/@type)"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <a href="#{@symbol}"><xsl:value-of select="@symbol"/></a>
- <xsl:text>;
-</xsl:text>
- </xsl:template>
-
- <xsl:template mode="synopsis" match="exports[@type='macro']">
- <xsl:variable name="def" select="key('symbols',@symbol)"/>
- <xsl:text>#define </xsl:text>
- <a href="#{@symbol}"><xsl:value-of select="@symbol"/></a>
- <xsl:if test="$def/arg">
- <xsl:text>(</xsl:text>
- <xsl:for-each select="$def/arg">
- <xsl:value-of select="@name"/>
- <xsl:if test="position() != last()">
- <xsl:text>, </xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>)</xsl:text>
- </xsl:if>
- <xsl:text>;
-</xsl:text>
- </xsl:template>
- <xsl:template mode="synopsis" match="exports[@type='enum']">
- </xsl:template>
- <xsl:template mode="synopsis" match="exports[@type='struct']">
- </xsl:template>
-
-<!--
-
- The following builds the Details section
-
--->
- <xsl:template mode="details" match="struct">
- <xsl:variable name="name" select="string(@name)"/>
- <div class="refsect2" lang="en">
- <h3><a id="{$name}">Structure </a><xsl:value-of select="$name"/></h3>
- <pre class="programlisting">
- <xsl:value-of select="@type"/><xsl:text> {
-</xsl:text>
- <xsl:if test="not(field)">
- <xsl:text>The content of this structure is not made public by the API.
-</xsl:text>
- </xsl:if>
- <xsl:for-each select="field">
- <xsl:text> </xsl:text>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@type"/>
- </xsl:call-template>
- <xsl:text>	</xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:if test="@info != ''">
- <xsl:text>	: </xsl:text>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="substring(@info, 1, 70)"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:text>
-</xsl:text>
- </xsl:for-each>
- <xsl:text>} </xsl:text>
- <xsl:value-of select="$name"/>
- <xsl:text>;
-</xsl:text>
- </pre>
- <p>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="info"/>
- </xsl:call-template>
- </p><xsl:text>
-</xsl:text>
- </div><hr/>
- </xsl:template>
-
- <xsl:template mode="details" match="typedef[@type != 'enum']">
- <xsl:variable name="name" select="string(@name)"/>
- <div class="refsect2" lang="en">
- <h3><a id="{$name}">Typedef </a><xsl:value-of select="$name"/></h3>
- <pre class="programlisting">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="string(@type)"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$name"/>
- <xsl:text>;
-</xsl:text>
- </pre>
- <p>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="info"/>
- </xsl:call-template>
- </p><xsl:text>
-</xsl:text>
- </div><hr/>
- </xsl:template>
-
- <xsl:template mode="details" match="variable">
- <xsl:variable name="name" select="string(@name)"/>
- <div class="refsect2" lang="en">
- <h3><a id="{$name}">Variable </a><xsl:value-of select="$name"/></h3>
- <pre class="programlisting">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="string(@type)"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$name"/>
- <xsl:text>;
-</xsl:text>
- </pre>
- <p>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="info"/>
- </xsl:call-template>
- </p><xsl:text>
-</xsl:text>
- </div><hr/>
- </xsl:template>
-
- <xsl:template mode="details" match="typedef[@type = 'enum']">
- <xsl:variable name="name" select="string(@name)"/>
- <div class="refsect2" lang="en">
- <h3><a id="{$name}">Enum </a><xsl:value-of select="$name"/></h3>
- <pre class="programlisting">
- <xsl:text>enum </xsl:text>
- <a href="#{$name}"><xsl:value-of select="$name"/></a>
- <xsl:text> {
-</xsl:text>
- <xsl:for-each select="/api/symbols/enum[@type=$name]">
- <xsl:sort select="@value" data-type="number" order="ascending"/>
- <xsl:text> </xsl:text>
- <a id="{@name}"><xsl:value-of select="@name"/></a>
- <xsl:if test="@value">
- <xsl:text> = </xsl:text>
- <xsl:value-of select="@value"/>
- </xsl:if>
- <xsl:if test="@info">
- <xsl:text> /* </xsl:text>
- <xsl:value-of select="@info"/>
- <xsl:text> */</xsl:text>
- </xsl:if>
- <xsl:text>
-</xsl:text>
- </xsl:for-each>
- <xsl:text>};
-</xsl:text>
- </pre>
- <p>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="info"/>
- </xsl:call-template>
- </p><xsl:text>
-</xsl:text>
- </div><hr/>
- </xsl:template>
-
- <xsl:template mode="details" match="macro">
- <xsl:variable name="name" select="string(@name)"/>
- <div class="refsect2" lang="en">
- <h3><a id="{$name}">Macro </a><xsl:value-of select="$name"/></h3>
- <pre class="programlisting">
- <xsl:text>#define </xsl:text>
- <a href="#{$name}"><xsl:value-of select="$name"/></a>
- <xsl:if test="arg">
- <xsl:text>(</xsl:text>
- <xsl:for-each select="arg">
- <xsl:value-of select="@name"/>
- <xsl:if test="position() != last()">
- <xsl:text>, </xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>)</xsl:text>
- </xsl:if>
- <xsl:text>;
-</xsl:text>
- </pre>
- <p>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="info"/>
- </xsl:call-template>
- </p>
- <xsl:if test="arg">
- <div class="variablelist"><table border="0"><col align="left"/><tbody>
- <xsl:for-each select="arg">
- <tr>
- <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
- <td>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@info"/>
- </xsl:call-template>
- </td>
- </tr>
- </xsl:for-each>
- </tbody></table></div>
- </xsl:if>
- <xsl:text>
-</xsl:text>
- </div><hr/>
- </xsl:template>
-
- <xsl:template mode="details" match="function">
- <xsl:variable name="name" select="string(@name)"/>
- <xsl:variable name="nlen" select="string-length($name)"/>
- <xsl:variable name="tlen" select="string-length(return/@type)"/>
- <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
- <div class="refsect2" lang="en">
- <h3><a id="{$name}"></a><xsl:value-of select="$name"/> ()</h3>
- <pre class="programlisting">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="return/@type"/>
- </xsl:call-template>
- <xsl:text>	</xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:if test="$blen - 40 < -8">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:if test="$blen - 40 < 0">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:text>	(</xsl:text>
- <xsl:if test="not(arg)">
- <xsl:text>void</xsl:text>
- </xsl:if>
- <xsl:for-each select="arg">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@type"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:if test="position() != last()">
- <xsl:text>, </xsl:text><br/>
- <xsl:if test="$blen - 40 > 8">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:if test="$blen - 40 > 0">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:text>					 </xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>)</xsl:text><br/>
- <xsl:text>
-</xsl:text>
- </pre>
- <p>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="info"/>
- </xsl:call-template>
- </p><xsl:text>
-</xsl:text>
- <xsl:if test="arg | return/@info">
- <div class="variablelist"><table border="0"><col align="left"/><tbody>
- <xsl:for-each select="arg">
- <tr>
- <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
- <td>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@info"/>
- </xsl:call-template>
- </td>
- </tr>
- </xsl:for-each>
- <xsl:if test="return/@info">
- <tr>
- <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
- <td>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="return/@info"/>
- </xsl:call-template>
- </td>
- </tr>
- </xsl:if>
- </tbody></table></div>
- </xsl:if>
- </div><hr/>
- </xsl:template>
-
- <xsl:template mode="details" match="functype">
- <xsl:variable name="name" select="string(@name)"/>
- <xsl:variable name="nlen" select="string-length($name)"/>
- <xsl:variable name="tlen" select="string-length(return/@type)"/>
- <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
- <div class="refsect2" lang="en">
- <h3><a id="{$name}"></a>Function type <xsl:value-of select="$name"/> </h3>
- <pre class="programlisting">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="return/@type"/>
- </xsl:call-template>
- <xsl:text>	</xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:if test="$blen - 40 < -8">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:if test="$blen - 40 < 0">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:text>	(</xsl:text>
- <xsl:if test="not(arg)">
- <xsl:text>void</xsl:text>
- </xsl:if>
- <xsl:for-each select="arg">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@type"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:if test="position() != last()">
- <xsl:text>, </xsl:text><br/>
- <xsl:if test="$blen - 40 > 8">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:if test="$blen - 40 > 0">
- <xsl:text>	</xsl:text>
- </xsl:if>
- <xsl:text>					 </xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>)</xsl:text><br/>
- <xsl:text>
-</xsl:text>
- </pre>
- <p>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="info"/>
- </xsl:call-template>
- </p><xsl:text>
-</xsl:text>
- <xsl:if test="arg | return/@info">
- <div class="variablelist"><table border="0"><col align="left"/><tbody>
- <xsl:for-each select="arg">
- <tr>
- <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
- <td>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@info"/>
- </xsl:call-template>
- </td>
- </tr>
- </xsl:for-each>
- <xsl:if test="return/@info">
- <tr>
- <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
- <td>
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="return/@info"/>
- </xsl:call-template>
- </td>
- </tr>
- </xsl:if>
- </tbody></table></div>
- </xsl:if>
- </div><hr/>
- </xsl:template>
-
-<!--
-
- The following builds the general.html page
-
--->
- <xsl:template name="generate_general">
- <xsl:variable name="next" select="string(/api/files/file[position()=1]/@name)"/>
- <xsl:document xmlns="" href="general.html" method="xml" indent="yes" encoding="UTF-8">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title><xsl:value-of select="concat(@name, ': ', summary)"/></title>
- <meta name="generator" content="Libvirt devhelp stylesheet"/>
- <link rel="start" href="index.html" title="libvirt Reference Manual"/>
- <link rel="up" href="index.html" title="libvirt Reference Manual"/>
- <link rel="stylesheet" href="style.css" type="text/css"/>
- <link rel="chapter" href="index.html" title="libvirt Reference Manual"/>
- </head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-
- <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
- <tr valign="middle">
- <td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up"/></a></td>
- <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
- <xsl:if test="$next != ''">
- <td><a accesskey="n" href="libvirt-{$next}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
- </xsl:if>
- <th width="100%" align="center">libvirt Reference Manual</th>
- </tr>
- </table>
- <h2><span class="refentrytitle">libvirt API Modules</span></h2>
- <p>
- <xsl:for-each select="/api/files/file">
- <a href="libvirt-{(a)name}.html"><xsl:value-of select="@name"/></a> - <xsl:value-of select="summary"/><br/>
- </xsl:for-each>
- </p>
- </body>
- </html>
- </xsl:document>
- </xsl:template>
-
-<!--
-
- The following builds the index.html page
-
--->
- <xsl:template name="generate_index">
- <xsl:document xmlns="" href="index.html" method="xml" indent="yes" encoding="UTF-8">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>libvirt Reference Manual</title>
- <meta name="generator" content="Libvirt devhelp stylesheet"/>
- <link rel="stylesheet" href="style.css" type="text/css"/>
- </head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-
- <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
- <tr valign="middle">
- <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
- <td><a accesskey="n" href="general.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
- <th width="100%" align="center">libvirt Reference Manual</th>
- </tr>
- </table>
- <h2><span class="refentrytitle">libvirt Reference Manual</span></h2>
-<p>Libvir is a C toolkit to interact with the virtualization capabilities of
-recent versions of Linux (and other OSes). It is free software available
-under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
-Lesser General Public License</a>. Virtualization of the Linux Operating
-System means the ability to run multiple instances of Operating Systems
-concurrently on a single hardware system where the basic resources are driven
-by a Linux instance. The library aim at providing long term stable C API
-initially for the <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen
-paravirtualization</a> but should be able to integrate other virtualization
-mechanisms if needed.</p>
- </body>
- </html>
- </xsl:document>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/docs/devhelp/left.png b/docs/devhelp/left.png
deleted file mode 100644
index 2d05b3d5b4..0000000000
Binary files a/docs/devhelp/left.png and /dev/null differ
diff --git a/docs/devhelp/right.png b/docs/devhelp/right.png
deleted file mode 100644
index 92832e3a45..0000000000
Binary files a/docs/devhelp/right.png and /dev/null differ
diff --git a/docs/devhelp/style.css b/docs/devhelp/style.css
deleted file mode 100644
index dfbb41e34c..0000000000
--- a/docs/devhelp/style.css
+++ /dev/null
@@ -1,66 +0,0 @@
-.synopsis, .classsynopsis
-{
- background: #eeeeee;
- border: solid 1px #aaaaaa;
- padding: 0.5em;
-}
-.programlisting
-{
- background: #eeeeff;
- border: solid 1px #aaaaff;
- padding: 0.5em;
-}
-.variablelist
-{
- padding: 4px;
- margin-left: 3em;
-}
-.variablelist td:first-child
-{
- vertical-align: top;
-}
-table.navigation
-{
- background: #ffeeee;
- border: solid 1px #ffaaaa;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-.navigation a
-{
- color: #770000;
-}
-.navigation a:visited
-{
- color: #550000;
-}
-.navigation .title
-{
- font-size: 200%;
-}
-div.refnamediv
-{
- margin-top: 2em;
-}
-div.gallery-float
-{
- float: left;
- padding: 10px;
-}
-div.gallery-float img
-{
- border-style: none;
-}
-div.gallery-spacer
-{
- clear: both;
-}
-a
-{
- text-decoration: none;
-}
-a:hover
-{
- text-decoration: underline;
- color: #FF0000;
-}
diff --git a/docs/devhelp/up.png b/docs/devhelp/up.png
deleted file mode 100644
index 85b3e2a275..0000000000
Binary files a/docs/devhelp/up.png and /dev/null differ
diff --git a/libvirt.spec.in b/libvirt.spec.in
index dde8bf3a97..d4d2ec8db9 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1528,14 +1528,6 @@ exit 0
%doc AUTHORS ChangeLog.gz NEWS README README.md
%doc libvirt-docs/*
-# API docs
-%dir %{_datadir}/gtk-doc/html/libvirt/
-%doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp
-%doc %{_datadir}/gtk-doc/html/libvirt/*.html
-%doc %{_datadir}/gtk-doc/html/libvirt/*.png
-%doc %{_datadir}/gtk-doc/html/libvirt/*.css
-
-
%files daemon
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
--
2.21.0
5 years, 3 months
[libvirt] [PATCH v2] util: activate directory override when used from library
by Daniel P. Berrangé
The Perl bindings for libvirt use the test driver for unit tests. This
tries to load the cpu_map/index.xml file, and when run from an
uninstalled build will fail.
The problem is that virFileActivateDirOverride is called by our various
binaries like libvirtd, virsh, but is not called when a 3rd party app
uses libvirt.so
To deal with this we allow the LIBVIRT_DIR_OVERRIDE=1 env variable to be
set and make virInitialize look for this. The 'run' script will set it,
so now build using this script to run against an uninstalled tree we
will correctly resolve files to the source tree.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Changed in v2:
- Use a separate function for env var override
run.in | 7 ++++++
src/libvirt.c | 2 ++
src/libvirt_private.syms | 3 ++-
src/locking/lock_daemon.c | 2 +-
src/logging/log_daemon.c | 2 +-
src/remote/remote_daemon.c | 2 +-
src/security/virt-aa-helper.c | 2 +-
src/util/virfile.c | 40 ++++++++++++++++++++++++++---------
src/util/virfile.h | 3 ++-
tests/testutils.c | 2 +-
tools/virsh.c | 2 +-
tools/virt-admin.c | 2 +-
12 files changed, 50 insertions(+), 19 deletions(-)
diff --git a/run.in b/run.in
index 9a1c6ea11a..ed946a0899 100644
--- a/run.in
+++ b/run.in
@@ -60,6 +60,13 @@ else
fi
export PKG_CONFIG_PATH
+# Ensure that any 3rd party apps using libvirt.so from
+# the build tree get files resolved to the build/source
+# tree too. Typically useful for language bindings
+# running tests against non-installed libvirt.
+LIBVIRT_DIR_OVERRIDE=1
+export LIBVIRT_DIR_OVERRIDE
+
# This is a cheap way to find some use-after-free and uninitialized
# read problems when using glibc.
random_val="$(awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)"
diff --git a/src/libvirt.c b/src/libvirt.c
index 9650aaa453..a1ecd8bacc 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -247,6 +247,8 @@ virGlobalInit(void)
virErrorInitialize() < 0)
goto error;
+ virFileActivateDirOverrideForLib();
+
if (getuid() != geteuid() ||
getgid() != getegid()) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index a34d92f5ef..21cd6a8ef7 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1917,7 +1917,8 @@ virDirOpenQuiet;
virDirRead;
virFileAbsPath;
virFileAccessibleAs;
-virFileActivateDirOverride;
+virFileActivateDirOverrideForLib;
+virFileActivateDirOverrideForProg;
virFileBindMountDevice;
virFileBuildPath;
virFileCanonicalizePath;
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index ac242bf65c..edb61d74c0 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -1188,7 +1188,7 @@ int main(int argc, char **argv) {
}
}
- virFileActivateDirOverride(argv[0]);
+ virFileActivateDirOverrideForProg(argv[0]);
if (!(config = virLockDaemonConfigNew(privileged))) {
VIR_ERROR(_("Can't create initial configuration"));
diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c
index f74e900aea..85c58aaa7b 100644
--- a/src/logging/log_daemon.c
+++ b/src/logging/log_daemon.c
@@ -960,7 +960,7 @@ int main(int argc, char **argv) {
}
}
- virFileActivateDirOverride(argv[0]);
+ virFileActivateDirOverrideForProg(argv[0]);
if (!(config = virLogDaemonConfigNew(privileged))) {
VIR_ERROR(_("Can't create initial configuration"));
diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c
index 546328b24d..8cf9412128 100644
--- a/src/remote/remote_daemon.c
+++ b/src/remote/remote_daemon.c
@@ -1034,7 +1034,7 @@ int main(int argc, char **argv) {
virUpdateSelfLastChanged(argv[0]);
- virFileActivateDirOverride(argv[0]);
+ virFileActivateDirOverrideForProg(argv[0]);
while (1) {
int optidx = 0;
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 3f9d775acc..326cfaf52a 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -1427,7 +1427,7 @@ main(int argc, char **argv)
exit(EXIT_FAILURE);
}
- virFileActivateDirOverride(argv[0]);
+ virFileActivateDirOverrideForProg(argv[0]);
/* Initialize the log system */
virLogSetFromEnv();
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 81a3c096eb..d9ac482435 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -1766,7 +1766,7 @@ virFileFindResource(const char *filename,
/**
- * virFileActivateDirOverride:
+ * virFileActivateDirOverrideForProg:
* @argv0: argv[0] of the calling program
*
* Look at @argv0 and try to detect if running from
@@ -1774,20 +1774,40 @@ virFileFindResource(const char *filename,
* on the binary name, or '/.libs/' in the path
*/
void
-virFileActivateDirOverride(const char *argv0)
+virFileActivateDirOverrideForProg(const char *argv0)
{
- char *file = strrchr(argv0, '/');
- if (!file || file[1] == '\0')
- return;
- file++;
- if (STRPREFIX(file, "lt-") ||
- strstr(argv0, "/.libs/")) {
- useDirOverride = true;
- VIR_DEBUG("Activating build dir override for %s", argv0);
+ if (argv0 == NULL) {
+ if (getenv("LIBVIRT_DIR_OVERRIDE") != NULL)
+ useDirOverride = true;
+ } else {
+ char *file = strrchr(argv0, '/');
+ if (!file || file[1] == '\0')
+ return;
+ file++;
+ if (STRPREFIX(file, "lt-") ||
+ strstr(argv0, "/.libs/")) {
+ useDirOverride = true;
+ VIR_DEBUG("Activating build dir override for %s", argv0);
+ }
}
}
+/**
+ * virFileActivateDirOverrideForEnv:
+ *
+ * Look for LIBVIRT_DIR_OVERRIDE env var to see if
+ * we should find files from the build/src tree
+ * instead of install tree
+ */
+void
+virFileActivateDirOverrideForLib(void)
+{
+ if (getenv("LIBVIRT_DIR_OVERRIDE") != NULL)
+ useDirOverride = true;
+}
+
+
/**
* virFileLength:
* @path: full path of the file
diff --git a/src/util/virfile.h b/src/util/virfile.h
index a8a5dd8074..2b037b00aa 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -193,8 +193,9 @@ char *virFileFindResourceFull(const char *filename,
const char *installdir,
const char *envname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5);
-void virFileActivateDirOverride(const char *argv0)
+void virFileActivateDirOverrideForProg(const char *argv0)
ATTRIBUTE_NONNULL(1);
+void virFileActivateDirOverrideForLib(void);
off_t virFileLength(const char *path, int fd) ATTRIBUTE_NONNULL(1);
bool virFileIsDir (const char *file) ATTRIBUTE_NONNULL(1);
diff --git a/tests/testutils.c b/tests/testutils.c
index 8b2c51044e..003893dc44 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -992,7 +992,7 @@ int virTestMain(int argc,
setenv("VIR_TEST_MOCK_PROGNAME", progname, 1);
- virFileActivateDirOverride(argv[0]);
+ virFileActivateDirOverrideForProg(argv[0]);
if (virTestSetEnvPath() < 0)
return EXIT_AM_HARDFAIL;
diff --git a/tools/virsh.c b/tools/virsh.c
index e76d242ec8..ec20f35a77 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -897,7 +897,7 @@ main(int argc, char **argv)
return EXIT_FAILURE;
}
- virFileActivateDirOverride(argv[0]);
+ virFileActivateDirOverrideForProg(argv[0]);
if (!vshInit(ctl, cmdGroups, NULL))
exit(EXIT_FAILURE);
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index 4ff006ffcb..e549ec1f83 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -1552,7 +1552,7 @@ main(int argc, char **argv)
return EXIT_FAILURE;
}
- virFileActivateDirOverride(argv[0]);
+ virFileActivateDirOverrideForProg(argv[0]);
if (!vshInit(ctl, cmdGroups, NULL))
exit(EXIT_FAILURE);
--
2.21.0
5 years, 3 months
[libvirt] [dockerfiles PATCH] refresh: Update Dockerfiles due to new "locales" dependency
by Fabiano Fidêncio
Let's refresh the archived Dockerfiles as "locales" dependency has
to be added to all Debian, Ubuntu, and Fedora files.
Signed-off-by: Fabiano Fidêncio <fidencio(a)redhat.com>
---
This commit is available in the following branch:
https://gitlab.com/fidencio/libvirt-dockerfiles/tree/wip/locales
Here's the libvirt-jenkins-ci counter part:
https://www.redhat.com/archives/libvir-list/2019-September/msg00270.html
---
buildenv-libosinfo-debian-10.zip | Bin 559 -> 567 bytes
buildenv-libosinfo-debian-sid.zip | Bin 559 -> 567 bytes
buildenv-libosinfo-fedora-29.zip | Bin 492 -> 502 bytes
buildenv-libosinfo-fedora-30.zip | Bin 555 -> 564 bytes
buildenv-libosinfo-fedora-rawhide.zip | Bin 512 -> 522 bytes
buildenv-libvirt-debian-10-cross-aarch64.zip | Bin 887 -> 892 bytes
buildenv-libvirt-debian-10-cross-armv6l.zip | Bin 880 -> 885 bytes
buildenv-libvirt-debian-10-cross-armv7l.zip | Bin 884 -> 890 bytes
buildenv-libvirt-debian-10-cross-i686.zip | Bin 883 -> 889 bytes
buildenv-libvirt-debian-10-cross-mips.zip | Bin 878 -> 885 bytes
buildenv-libvirt-debian-10-cross-mips64el.zip | Bin 892 -> 896 bytes
buildenv-libvirt-debian-10-cross-mipsel.zip | Bin 882 -> 887 bytes
buildenv-libvirt-debian-10-cross-ppc64le.zip | Bin 890 -> 896 bytes
buildenv-libvirt-debian-10-cross-s390x.zip | Bin 883 -> 888 bytes
buildenv-libvirt-debian-10.zip | Bin 773 -> 778 bytes
buildenv-libvirt-debian-9-cross-aarch64.zip | Bin 896 -> 901 bytes
buildenv-libvirt-debian-9-cross-armv6l.zip | Bin 887 -> 892 bytes
buildenv-libvirt-debian-9-cross-armv7l.zip | Bin 893 -> 898 bytes
buildenv-libvirt-debian-9-cross-mips.zip | Bin 886 -> 892 bytes
buildenv-libvirt-debian-9-cross-mips64el.zip | Bin 898 -> 903 bytes
buildenv-libvirt-debian-9-cross-mipsel.zip | Bin 889 -> 895 bytes
buildenv-libvirt-debian-9-cross-ppc64le.zip | Bin 898 -> 903 bytes
buildenv-libvirt-debian-9-cross-s390x.zip | Bin 890 -> 895 bytes
buildenv-libvirt-debian-9.zip | Bin 777 -> 782 bytes
buildenv-libvirt-debian-sid-cross-aarch64.zip | Bin 886 -> 891 bytes
buildenv-libvirt-debian-sid-cross-armv6l.zip | Bin 879 -> 885 bytes
buildenv-libvirt-debian-sid-cross-armv7l.zip | Bin 884 -> 890 bytes
buildenv-libvirt-debian-sid-cross-i686.zip | Bin 883 -> 889 bytes
buildenv-libvirt-debian-sid-cross-mips.zip | Bin 877 -> 884 bytes
buildenv-libvirt-debian-sid-cross-mips64el.zip | Bin 892 -> 896 bytes
buildenv-libvirt-debian-sid-cross-mipsel.zip | Bin 882 -> 887 bytes
buildenv-libvirt-debian-sid-cross-ppc64le.zip | Bin 890 -> 896 bytes
buildenv-libvirt-debian-sid-cross-s390x.zip | Bin 883 -> 888 bytes
buildenv-libvirt-debian-sid.zip | Bin 773 -> 778 bytes
buildenv-libvirt-fedora-29.zip | Bin 694 -> 706 bytes
buildenv-libvirt-fedora-30.zip | Bin 809 -> 821 bytes
buildenv-libvirt-fedora-rawhide.zip | Bin 714 -> 726 bytes
buildenv-libvirt-ubuntu-16.zip | Bin 784 -> 788 bytes
buildenv-libvirt-ubuntu-18.zip | Bin 783 -> 790 bytes
39 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/buildenv-libosinfo-debian-10.zip b/buildenv-libosinfo-debian-10.zip
index 4a057eb..6413bb9 100644
Binary files a/buildenv-libosinfo-debian-10.zip and b/buildenv-libosinfo-debian-10.zip differ
diff --git a/buildenv-libosinfo-debian-sid.zip b/buildenv-libosinfo-debian-sid.zip
index 86cf9dd..b077868 100644
Binary files a/buildenv-libosinfo-debian-sid.zip and b/buildenv-libosinfo-debian-sid.zip differ
diff --git a/buildenv-libosinfo-fedora-29.zip b/buildenv-libosinfo-fedora-29.zip
index 8fac1a5..185000f 100644
Binary files a/buildenv-libosinfo-fedora-29.zip and b/buildenv-libosinfo-fedora-29.zip differ
diff --git a/buildenv-libosinfo-fedora-30.zip b/buildenv-libosinfo-fedora-30.zip
index 10f89e9..f3a0914 100644
Binary files a/buildenv-libosinfo-fedora-30.zip and b/buildenv-libosinfo-fedora-30.zip differ
diff --git a/buildenv-libosinfo-fedora-rawhide.zip b/buildenv-libosinfo-fedora-rawhide.zip
index 7cf81df..8d2d603 100644
Binary files a/buildenv-libosinfo-fedora-rawhide.zip and b/buildenv-libosinfo-fedora-rawhide.zip differ
diff --git a/buildenv-libvirt-debian-10-cross-aarch64.zip b/buildenv-libvirt-debian-10-cross-aarch64.zip
index 8f2dbbc..ae285b9 100644
Binary files a/buildenv-libvirt-debian-10-cross-aarch64.zip and b/buildenv-libvirt-debian-10-cross-aarch64.zip differ
diff --git a/buildenv-libvirt-debian-10-cross-armv6l.zip b/buildenv-libvirt-debian-10-cross-armv6l.zip
index 774ff27..bb4adda 100644
Binary files a/buildenv-libvirt-debian-10-cross-armv6l.zip and b/buildenv-libvirt-debian-10-cross-armv6l.zip differ
diff --git a/buildenv-libvirt-debian-10-cross-armv7l.zip b/buildenv-libvirt-debian-10-cross-armv7l.zip
index 893c929..7bf00e1 100644
Binary files a/buildenv-libvirt-debian-10-cross-armv7l.zip and b/buildenv-libvirt-debian-10-cross-armv7l.zip differ
diff --git a/buildenv-libvirt-debian-10-cross-i686.zip b/buildenv-libvirt-debian-10-cross-i686.zip
index 97e88e4..2576aac 100644
Binary files a/buildenv-libvirt-debian-10-cross-i686.zip and b/buildenv-libvirt-debian-10-cross-i686.zip differ
diff --git a/buildenv-libvirt-debian-10-cross-mips.zip b/buildenv-libvirt-debian-10-cross-mips.zip
index 332cb6c..ad9084a 100644
Binary files a/buildenv-libvirt-debian-10-cross-mips.zip and b/buildenv-libvirt-debian-10-cross-mips.zip differ
diff --git a/buildenv-libvirt-debian-10-cross-mips64el.zip b/buildenv-libvirt-debian-10-cross-mips64el.zip
index 7964dca..2210700 100644
Binary files a/buildenv-libvirt-debian-10-cross-mips64el.zip and b/buildenv-libvirt-debian-10-cross-mips64el.zip differ
diff --git a/buildenv-libvirt-debian-10-cross-mipsel.zip b/buildenv-libvirt-debian-10-cross-mipsel.zip
index a4198d6..37390da 100644
Binary files a/buildenv-libvirt-debian-10-cross-mipsel.zip and b/buildenv-libvirt-debian-10-cross-mipsel.zip differ
diff --git a/buildenv-libvirt-debian-10-cross-ppc64le.zip b/buildenv-libvirt-debian-10-cross-ppc64le.zip
index 567f5b5..9e77173 100644
Binary files a/buildenv-libvirt-debian-10-cross-ppc64le.zip and b/buildenv-libvirt-debian-10-cross-ppc64le.zip differ
diff --git a/buildenv-libvirt-debian-10-cross-s390x.zip b/buildenv-libvirt-debian-10-cross-s390x.zip
index 42723f0..4681152 100644
Binary files a/buildenv-libvirt-debian-10-cross-s390x.zip and b/buildenv-libvirt-debian-10-cross-s390x.zip differ
diff --git a/buildenv-libvirt-debian-10.zip b/buildenv-libvirt-debian-10.zip
index 14634db..10e73d5 100644
Binary files a/buildenv-libvirt-debian-10.zip and b/buildenv-libvirt-debian-10.zip differ
diff --git a/buildenv-libvirt-debian-9-cross-aarch64.zip b/buildenv-libvirt-debian-9-cross-aarch64.zip
index 3fbf049..b7b3643 100644
Binary files a/buildenv-libvirt-debian-9-cross-aarch64.zip and b/buildenv-libvirt-debian-9-cross-aarch64.zip differ
diff --git a/buildenv-libvirt-debian-9-cross-armv6l.zip b/buildenv-libvirt-debian-9-cross-armv6l.zip
index 0e4a55d..8e1e247 100644
Binary files a/buildenv-libvirt-debian-9-cross-armv6l.zip and b/buildenv-libvirt-debian-9-cross-armv6l.zip differ
diff --git a/buildenv-libvirt-debian-9-cross-armv7l.zip b/buildenv-libvirt-debian-9-cross-armv7l.zip
index 6db735b..7acab06 100644
Binary files a/buildenv-libvirt-debian-9-cross-armv7l.zip and b/buildenv-libvirt-debian-9-cross-armv7l.zip differ
diff --git a/buildenv-libvirt-debian-9-cross-mips.zip b/buildenv-libvirt-debian-9-cross-mips.zip
index 27b2a88..960f2dc 100644
Binary files a/buildenv-libvirt-debian-9-cross-mips.zip and b/buildenv-libvirt-debian-9-cross-mips.zip differ
diff --git a/buildenv-libvirt-debian-9-cross-mips64el.zip b/buildenv-libvirt-debian-9-cross-mips64el.zip
index 04711c3..1d84bea 100644
Binary files a/buildenv-libvirt-debian-9-cross-mips64el.zip and b/buildenv-libvirt-debian-9-cross-mips64el.zip differ
diff --git a/buildenv-libvirt-debian-9-cross-mipsel.zip b/buildenv-libvirt-debian-9-cross-mipsel.zip
index 0403a0b..02954f4 100644
Binary files a/buildenv-libvirt-debian-9-cross-mipsel.zip and b/buildenv-libvirt-debian-9-cross-mipsel.zip differ
diff --git a/buildenv-libvirt-debian-9-cross-ppc64le.zip b/buildenv-libvirt-debian-9-cross-ppc64le.zip
index 2edfed1..327ee9f 100644
Binary files a/buildenv-libvirt-debian-9-cross-ppc64le.zip and b/buildenv-libvirt-debian-9-cross-ppc64le.zip differ
diff --git a/buildenv-libvirt-debian-9-cross-s390x.zip b/buildenv-libvirt-debian-9-cross-s390x.zip
index aacac06..3dd9779 100644
Binary files a/buildenv-libvirt-debian-9-cross-s390x.zip and b/buildenv-libvirt-debian-9-cross-s390x.zip differ
diff --git a/buildenv-libvirt-debian-9.zip b/buildenv-libvirt-debian-9.zip
index 4ef6ccf..ab00cb8 100644
Binary files a/buildenv-libvirt-debian-9.zip and b/buildenv-libvirt-debian-9.zip differ
diff --git a/buildenv-libvirt-debian-sid-cross-aarch64.zip b/buildenv-libvirt-debian-sid-cross-aarch64.zip
index 0583c1b..3b2ad74 100644
Binary files a/buildenv-libvirt-debian-sid-cross-aarch64.zip and b/buildenv-libvirt-debian-sid-cross-aarch64.zip differ
diff --git a/buildenv-libvirt-debian-sid-cross-armv6l.zip b/buildenv-libvirt-debian-sid-cross-armv6l.zip
index 0087dd3..b13be7e 100644
Binary files a/buildenv-libvirt-debian-sid-cross-armv6l.zip and b/buildenv-libvirt-debian-sid-cross-armv6l.zip differ
diff --git a/buildenv-libvirt-debian-sid-cross-armv7l.zip b/buildenv-libvirt-debian-sid-cross-armv7l.zip
index d296967..c4262b1 100644
Binary files a/buildenv-libvirt-debian-sid-cross-armv7l.zip and b/buildenv-libvirt-debian-sid-cross-armv7l.zip differ
diff --git a/buildenv-libvirt-debian-sid-cross-i686.zip b/buildenv-libvirt-debian-sid-cross-i686.zip
index 0f8bb16..0b64ca7 100644
Binary files a/buildenv-libvirt-debian-sid-cross-i686.zip and b/buildenv-libvirt-debian-sid-cross-i686.zip differ
diff --git a/buildenv-libvirt-debian-sid-cross-mips.zip b/buildenv-libvirt-debian-sid-cross-mips.zip
index 31912c4..02ba200 100644
Binary files a/buildenv-libvirt-debian-sid-cross-mips.zip and b/buildenv-libvirt-debian-sid-cross-mips.zip differ
diff --git a/buildenv-libvirt-debian-sid-cross-mips64el.zip b/buildenv-libvirt-debian-sid-cross-mips64el.zip
index 3cbe12e..8d96e14 100644
Binary files a/buildenv-libvirt-debian-sid-cross-mips64el.zip and b/buildenv-libvirt-debian-sid-cross-mips64el.zip differ
diff --git a/buildenv-libvirt-debian-sid-cross-mipsel.zip b/buildenv-libvirt-debian-sid-cross-mipsel.zip
index 51c59db..12e5704 100644
Binary files a/buildenv-libvirt-debian-sid-cross-mipsel.zip and b/buildenv-libvirt-debian-sid-cross-mipsel.zip differ
diff --git a/buildenv-libvirt-debian-sid-cross-ppc64le.zip b/buildenv-libvirt-debian-sid-cross-ppc64le.zip
index 27dccb1..ec2f772 100644
Binary files a/buildenv-libvirt-debian-sid-cross-ppc64le.zip and b/buildenv-libvirt-debian-sid-cross-ppc64le.zip differ
diff --git a/buildenv-libvirt-debian-sid-cross-s390x.zip b/buildenv-libvirt-debian-sid-cross-s390x.zip
index 7504d28..5b77b3a 100644
Binary files a/buildenv-libvirt-debian-sid-cross-s390x.zip and b/buildenv-libvirt-debian-sid-cross-s390x.zip differ
diff --git a/buildenv-libvirt-debian-sid.zip b/buildenv-libvirt-debian-sid.zip
index 874bb1b..b2ebf71 100644
Binary files a/buildenv-libvirt-debian-sid.zip and b/buildenv-libvirt-debian-sid.zip differ
diff --git a/buildenv-libvirt-fedora-29.zip b/buildenv-libvirt-fedora-29.zip
index 43594d4..4553498 100644
Binary files a/buildenv-libvirt-fedora-29.zip and b/buildenv-libvirt-fedora-29.zip differ
diff --git a/buildenv-libvirt-fedora-30.zip b/buildenv-libvirt-fedora-30.zip
index 93773cb..0ca2d35 100644
Binary files a/buildenv-libvirt-fedora-30.zip and b/buildenv-libvirt-fedora-30.zip differ
diff --git a/buildenv-libvirt-fedora-rawhide.zip b/buildenv-libvirt-fedora-rawhide.zip
index da6c064..dff0361 100644
Binary files a/buildenv-libvirt-fedora-rawhide.zip and b/buildenv-libvirt-fedora-rawhide.zip differ
diff --git a/buildenv-libvirt-ubuntu-16.zip b/buildenv-libvirt-ubuntu-16.zip
index 8cff046..94ec27a 100644
Binary files a/buildenv-libvirt-ubuntu-16.zip and b/buildenv-libvirt-ubuntu-16.zip differ
diff --git a/buildenv-libvirt-ubuntu-18.zip b/buildenv-libvirt-ubuntu-18.zip
index 83546be..f4a4b7b 100644
Binary files a/buildenv-libvirt-ubuntu-18.zip and b/buildenv-libvirt-ubuntu-18.zip differ
--
2.21.0
5 years, 3 months
[libvirt] [PATCH] libvirtd: Fix control socket path being incorrectly build
by eater
Socket path in 5.7 would result in libvirt//var/run/libvirt-sock instead of /var/run/libvirt/libvirt-sock
Signed-off-by: eater <=(a)eater.me>
---
src/remote/remote_daemon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c
index 546328b24d..5d64397062 100644
--- a/src/remote/remote_daemon.c
+++ b/src/remote/remote_daemon.c
@@ -226,14 +226,14 @@ daemonUnixSocketPaths(struct daemonConfig *config,
if (config->unix_sock_dir) {
if (virAsprintf(sockfile, "%s/%s-sock",
- SOCK_PREFIX, config->unix_sock_dir) < 0)
+ config->unix_sock_dir, SOCK_PREFIX) < 0)
goto cleanup;
if (privileged) {
if (virAsprintf(rosockfile, "%s/%s-sock-ro",
- SOCK_PREFIX, config->unix_sock_dir) < 0 ||
+ config->unix_sock_dir, SOCK_PREFIX) < 0 ||
virAsprintf(admsockfile, "%s/%s-admin-sock",
- SOCK_PREFIX, config->unix_sock_dir) < 0)
+ config->unix_sock_dir, SOCK_PREFIX) < 0)
goto cleanup;
}
} else {
--
2.23.0
5 years, 3 months
[libvirt] [PATCH v2] util: Set backing file name for LOOP_GET_STATUS64 queries.
by jcfaracco@gmail.com
From: Julio Faracco <jcfaracco(a)gmail.com>
This is an issue for LXC loop devices when you are trying to get loop
devices info using `ioctl`. Modern apps uses `/sys/dev/block` to grab
information about devices, but if you use the method mention you won't
be able to retrive the associated file with that loop device. See
example below from cryptsetup sources:
static char *_ioctl_backing_file(const char *loop)
{
struct loop_info64 lo64 = {0};
int loop_fd;
loop_fd = open(loop, O_RDONLY);
if (loop_fd < 0)
return NULL;
if (ioctl(loop_fd, LOOP_GET_STATUS64, &lo64) < 0) {
close(loop_fd);
return NULL;
}
lo64.lo_file_name[LO_NAME_SIZE-2] = '*';
lo64.lo_file_name[LO_NAME_SIZE-1] = 0;
close(loop_fd);
return strdup((char*)lo64.lo_file_name);
}
It will return an empty string because lo_file_name was not set.
Function `virFileLoopDeviceOpenSearch()` is using `ioctl` to query data,
but it is not checking `lo_file_name` field.
v1: I accidentally committed two wrong lines.
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/util/virfile.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 81a3c096eb..dbfe74e24f 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -781,6 +781,14 @@ int virFileLoopDeviceAssociate(const char *file,
memset(&lo, 0, sizeof(lo));
lo.lo_flags = LO_FLAGS_AUTOCLEAR;
+ /* Set backing file name for LOOP_GET_STATUS64 queries */
+ if (virStrncpy((char *) lo.lo_file_name, file,
+ strlen(file), LO_NAME_SIZE) < 0) {
+ virReportSystemError(errno,
+ _("Unable to set backing file %s"), file);
+ goto cleanup;
+ }
+
if ((fsfd = open(file, O_RDWR)) < 0) {
virReportSystemError(errno,
_("Unable to open %s"), file);
--
2.20.1
5 years, 3 months
[libvirt] [PATCH] libxl: Fix libxlDomainPMSuspendForDuration domain active check
by Marek Marczykowski-Górecki
virDomainObjCheckActive() returns -1 if domain is not active, not 0.
Fixes cb50436c6f "libxl: implement virDomainPM* functions"
Signed-off-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
---
src/libxl/libxl_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index d0396e4781..215471fa0d 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1459,7 +1459,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom,
if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0)
goto cleanup;
- if (!virDomainObjCheckActive(vm))
+ if (virDomainObjCheckActive(vm) < 0)
goto endjob;
/* Unlock virDomainObjPtr to not deadlock with even handler, which will try
--
2.21.0
5 years, 3 months
[libvirt] [PATCH v2 00/23] Use a slirp helper process
by marcandre.lureau@redhat.com
From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
Hi,
SLIRP networking can be running in a separate process. This allows for
stricter security policies for QEMU & SLIRP, as SLIRP is notoriously
not very safe (discussed on ML, various CVEs, and even the code says
so explicitly in the comments), yet people rely on it for various
reasons.
With this series, for a network interface "user", libvirt will:
- check the slirp-helper presence and capabilites (see [1])
- setup a socket pair between qemu and the helper
- use -net socket
- setup migration thanks to dbus-vmstate
There are no changes required to domain configuration to benefit
it. "guestfwd" isn't supported at this point, but it is known to be in
a broken state with libvirt+qemu anyway.
The dbus-vmstate is being proposed to QEMU.
The libslirp-rs slirp-helper hasn't yet received a release. The
current DBus p2p mode works ok, but is a hack. This is due to poor
DBus support in Rust, and also relatively poor DBus p2p mode support
in libdbus.
fwiw, I have been working on an alternative rust-only implementation
of a slirp-helper that will also follow [1], but I am now wondering if
netstack or vpnkit could do the job.
[1] https://gitlab.freedesktop.org/slirp/libslirp-rs/blob/master/src/bin/READ...
Marc-André Lureau (23):
Add .editorconfig
tests: fix xml2xml tpm-emulator.xml test
dbus: correctly build reply message
qemu: replace logCtxt with qemuDomainLogAppendMessage()
qemu: add socket datagram capability
qemu: add dbus-vmstate capability
qemu: reset VM id after external devices stop
qemu-security: add qemuSecurityCommandRun()
qemu: add dbus-vmstate
domain-conf: add network def private data
qemu: add qemuDomainNetworkPrivate
qemu-conf: add configurable slirp-helper location
qemu-conf: add slirp state dir
qemu: add slirp helper unit
qemu-domain: save and restore slirp state
qemu: add a flag to the cookie to prevent slirp-helper setup
qemu-migration: prevent migration if dbus-vmstate is required
qemu-migration: prevent migration if slirp cannot be migrated
qemu-extdevice: prepare, start and stop slirp-helper
qemu-command: use -net socket,fd= with slirp-helper
qemu-process: prepare slirp-helper
qemu-hotplug: handle hotplugging of slirp-helper
tests: add slirp-helper qemuxml2argv test
.editorconfig | 21 +
m4/virt-driver-qemu.m4 | 5 +
src/conf/domain_conf.c | 21 +-
src/conf/domain_conf.h | 6 +
src/qemu/Makefile.inc.am | 4 +
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 3 +
src/qemu/qemu_alias.c | 17 +
src/qemu/qemu_alias.h | 3 +
src/qemu/qemu_capabilities.c | 8 +
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_command.c | 118 ++++-
src/qemu/qemu_command.h | 6 +-
src/qemu/qemu_conf.c | 11 +-
src/qemu/qemu_conf.h | 2 +
src/qemu/qemu_dbus.c | 94 ++++
src/qemu/qemu_dbus.h | 42 ++
src/qemu/qemu_domain.c | 220 ++++++++-
src/qemu/qemu_domain.h | 20 +
src/qemu/qemu_driver.c | 8 +
src/qemu/qemu_extdevice.c | 82 ++--
src/qemu/qemu_extdevice.h | 10 +-
src/qemu/qemu_hotplug.c | 112 ++++-
src/qemu/qemu_hotplug.h | 11 +
src/qemu/qemu_interface.c | 27 ++
src/qemu/qemu_interface.h | 4 +
src/qemu/qemu_migration.c | 19 +
src/qemu/qemu_monitor.c | 13 +-
src/qemu/qemu_monitor.h | 3 +-
src/qemu/qemu_process.c | 24 +-
src/qemu/qemu_security.c | 22 +
src/qemu/qemu_security.h | 6 +
src/qemu/qemu_slirp.c | 448 ++++++++++++++++++
src/qemu/qemu_slirp.h | 81 ++++
src/qemu/qemu_tpm.c | 4 +-
src/qemu/test_libvirtd_qemu.aug.in | 1 +
src/util/virdbus.c | 18 +-
src/util/virdbus.h | 6 +-
.../caps_4.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
.../caps_4.0.0.riscv32.xml | 1 +
.../caps_4.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
.../caps_4.0.0.x86_64.xml | 1 +
.../caps_4.1.0.x86_64.xml | 1 +
.../net-user.x86_64-4.0.0.args | 34 ++
tests/qemuxml2argvdata/tpm-emulator.xml | 2 +-
tests/qemuxml2argvtest.c | 16 +
tests/testutilsqemu.h | 1 +
tests/virfirewalltest.c | 9 +-
tests/virpolkittest.c | 3 +-
51 files changed, 1498 insertions(+), 77 deletions(-)
create mode 100644 .editorconfig
create mode 100644 src/qemu/qemu_dbus.c
create mode 100644 src/qemu/qemu_dbus.h
create mode 100644 src/qemu/qemu_slirp.c
create mode 100644 src/qemu/qemu_slirp.h
create mode 100644 tests/qemuxml2argvdata/net-user.x86_64-4.0.0.args
--
2.23.0.rc1
5 years, 3 months
[libvirt] [jenkins-ci PATCH] guests: Include "locales" by default
by Fabiano Fidêncio
osinfo-db tests require "en_US.UTF-8" locale to be set. Unfortunately,
our containers do not contain the needed locale file.
After a discussion on libosinfo mailing list[0], it's been agreed on
having the locale as part of our libvirt-jenkins-ci's base packages.
[0]: https://www.redhat.com/archives/libosinfo/2019-September/msg00011.html
Signed-off-by: Fabiano Fidêncio <fidencio(a)redhat.com>
---
guests/vars/mappings.yml | 6 ++++++
guests/vars/projects/base.yml | 1 +
2 files changed, 7 insertions(+)
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index c5a7824..90ac611 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -431,6 +431,12 @@ mappings:
rpm: libxslt-devel
cross-policy-deb: foreign
+ locales:
+ CentOS: glibc-common
+ deb: locales
+ Fedora: glibc-langpack-en
+ FreeBSD:
+
lsof:
default: lsof
diff --git a/guests/vars/projects/base.yml b/guests/vars/projects/base.yml
index a7e572b..2a84029 100644
--- a/guests/vars/projects/base.yml
+++ b/guests/vars/projects/base.yml
@@ -16,6 +16,7 @@ packages:
- glibc
- libtool
- libtoolize
+ - locales
- lsof
- net-tools
- make
--
2.21.0
5 years, 3 months