<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libvirt.git/scripts, branch master</title>
<subtitle>libvirt.org: git/libvirt.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/'/>
<entry>
<title>build: Add checks for permutable format strings</title>
<updated>2023-04-01T09:40:36+00:00</updated>
<author>
<name>Jiri Denemark</name>
<email>jdenemar@redhat.com</email>
</author>
<published>2023-03-08T09:58:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=35ad5e85dd149c7b651b8f7d4dc5fa5eaee9fb23'/>
<id>35ad5e85dd149c7b651b8f7d4dc5fa5eaee9fb23</id>
<content type='text'>
Since all messages marked for translation contain permutable format
strings, we can add checks for enforcing them.

The syntax check does not catch all cases as it only checks format
strings between _(" and the first ". In other words messages where \"
appears before the first format string or multi-line messages where the
first format strings is not in the first line will not be checked. On
the other hand, it's run automatically by "meson test".

check-pot.py python script will detect all incorrect format strings, but
it's not as easy to use as it requires libvirt.pot to be regenerated and
this does not happen during a standard build. The following steps are
needed to check messages with check-pot.py:

    meson compile libvirt-pot-dep
    meson compile libvirt-pot
    meson compile libvirt-pot-check

Don't forget to revert changes to libvirt.pot if you run these commands
locally as we don't want each patch series to update libvirt.pot.

Shell scripts (tools/libvirt-guests.sh.in is the only one currently)
need to be exempt from this check as shell's printf function does not
understand the permutable format strings.

Signed-off-by: Jiri Denemark &lt;jdenemar@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since all messages marked for translation contain permutable format
strings, we can add checks for enforcing them.

The syntax check does not catch all cases as it only checks format
strings between _(" and the first ". In other words messages where \"
appears before the first format string or multi-line messages where the
first format strings is not in the first line will not be checked. On
the other hand, it's run automatically by "meson test".

check-pot.py python script will detect all incorrect format strings, but
it's not as easy to use as it requires libvirt.pot to be regenerated and
this does not happen during a standard build. The following steps are
needed to check messages with check-pot.py:

    meson compile libvirt-pot-dep
    meson compile libvirt-pot
    meson compile libvirt-pot-check

Don't forget to revert changes to libvirt.pot if you run these commands
locally as we don't want each patch series to update libvirt.pot.

Shell scripts (tools/libvirt-guests.sh.in is the only one currently)
need to be exempt from this check as shell's printf function does not
understand the permutable format strings.

Signed-off-by: Jiri Denemark &lt;jdenemar@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/apibuild: Extract and format API ACLs</title>
<updated>2023-03-06T12:09:16+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2023-02-21T13:20:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=69615c91c838daebba9cbf151adc636ffe956f58'/>
<id>69615c91c838daebba9cbf151adc636ffe956f58</id>
<content type='text'>
As an additional step before processing the API parse the protocol file
and extract all ACL definitions. This way we can distribute them for any
user of the libvirt API XML files. We will be also able to avoid another
call to gendispatch, which generates all this data into a standalone
XML.

The remote procedure to API name is inspired by what rpcgen does.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Ján Tomko &lt;jtomko@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As an additional step before processing the API parse the protocol file
and extract all ACL definitions. This way we can distribute them for any
user of the libvirt API XML files. We will be also able to avoid another
call to gendispatch, which generates all this data into a standalone
XML.

The remote procedure to API name is inspired by what rpcgen does.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Ján Tomko &lt;jtomko@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>apibuild: Add infrastructure for generating ACL flag info into function docs</title>
<updated>2023-03-06T12:09:15+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2023-02-21T13:06:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=d03b6bf0cb7d4aa35f7584110eb24e0b7178565b'/>
<id>d03b6bf0cb7d4aa35f7584110eb24e0b7178565b</id>
<content type='text'>
If the user of the 'docBuilder' class provides a dict (key is API name,
value is a tuple of arrays (acls, aclfilters), use the dict to generate
ACL definitions into the function definition.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Ján Tomko &lt;jtomko@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the user of the 'docBuilder' class provides a dict (key is API name,
value is a tuple of arrays (acls, aclfilters), use the dict to generate
ACL definitions into the function definition.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Ján Tomko &lt;jtomko@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: ACL: Mention the ACL object name along with the corresponding libvirt object name</title>
<updated>2023-02-20T17:26:47+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2023-02-17T15:48:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=c9ee6f1d5741db1a7eb6908ca1409a787b17f4d2'/>
<id>c9ee6f1d5741db1a7eb6908ca1409a787b17f4d2</id>
<content type='text'>
It's not trivial to figure out the ACL object name from our
documentation. Add it above the table outlining existing permissions.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not trivial to figure out the ACL object name from our
documentation. Add it above the table outlining existing permissions.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: Fix generated names for ACL objects</title>
<updated>2023-02-20T17:26:16+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2023-02-20T10:31:11+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=0b69e2b99569a1456a8f27c5866ccada580d06c8'/>
<id>0b69e2b99569a1456a8f27c5866ccada580d06c8</id>
<content type='text'>
Both the object name and permission name in ACL use '-' instead of '_'
separator when referring to them in the docs or even when used inside of
polkit. Unfortunately the generators used for generating our docs don't
honour this in certain cases which would result in broken names in the
API docs (once they will be generated).

Rename both object and permission name to use dash and reflect that in
the anchor names in the documentation.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Ján Tomko &lt;jtomko@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both the object name and permission name in ACL use '-' instead of '_'
separator when referring to them in the docs or even when used inside of
polkit. Unfortunately the generators used for generating our docs don't
honour this in certain cases which would result in broken names in the
API docs (once they will be generated).

Rename both object and permission name to use dash and reflect that in
the anchor names in the documentation.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Ján Tomko &lt;jtomko@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: ACL: Show which permissions are allowed for unauthenticated connections</title>
<updated>2023-02-20T08:22:51+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2023-02-17T15:31:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=ecca8053363a4135781988f92f5ef1037c29f45e'/>
<id>ecca8053363a4135781988f92f5ef1037c29f45e</id>
<content type='text'>
Certain APIs are allowed also without authentication but the ACL page
didn't outline which. Generate a new column with the information.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Certain APIs are allowed also without authentication but the ACL page
didn't outline which. Generate a new column with the information.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: check-html-refernces: Add checking for image file usage</title>
<updated>2023-02-15T11:38:45+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2023-02-14T13:38:40+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=edac6ca75621dc48d4804dab34ca71f4cbe34a69'/>
<id>edac6ca75621dc48d4804dab34ca71f4cbe34a69</id>
<content type='text'>
Check both that a file is referenced from our pages and also that pages
reference existing images.

The mode for dumping external references now also dumps images.

'--ignore-image' can be used repeatedly to suppress errors for specific
images.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check both that a file is referenced from our pages and also that pages
reference existing images.

The mode for dumping external references now also dumps images.

'--ignore-image' can be used repeatedly to suppress errors for specific
images.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: check-html-references: Detect pages that are not linked to</title>
<updated>2023-02-15T11:38:45+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2023-02-14T12:14:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=61dcca1b2361c7a05fff194314b1781e73830977'/>
<id>61dcca1b2361c7a05fff194314b1781e73830977</id>
<content type='text'>
Prevent sub-pages without a way to reach them.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevent sub-pages without a way to reach them.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: check-html-references: Improve error messages and don't mess with relative paths</title>
<updated>2023-02-15T11:38:45+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2023-02-14T11:35:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=00956b55bf7249b1d45d0cd81243eee88b21e3e3'/>
<id>00956b55bf7249b1d45d0cd81243eee88b21e3e3</id>
<content type='text'>
Now that we have the source file name as a custom attribute we can use
it to report which file actually needs to be edited to fix the error:

 ERROR: 'docs/uri.rst': broken link to: 'drvqemu.html#exaple'

rather than:

 broken link targets:
 docs/uri.html broken link: drvqemu.html#exaple

which pointed to file which does not exist in the source directory.

This also allows us to delete all the relative path handling needed to
report at least somewhat user-legible errors before.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we have the source file name as a custom attribute we can use
it to report which file actually needs to be edited to fix the error:

 ERROR: 'docs/uri.rst': broken link to: 'drvqemu.html#exaple'

rather than:

 broken link targets:
 docs/uri.html broken link: drvqemu.html#exaple

which pointed to file which does not exist in the source directory.

This also allows us to delete all the relative path handling needed to
report at least somewhat user-legible errors before.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: check-html-references: Rename --prefix to --webroot and make it mandatory</title>
<updated>2023-02-15T11:38:45+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2023-02-14T11:05:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libvirt.git/commit/?id=70211d736849e5c1b06971ae1f5465c0a577cb53'/>
<id>70211d736849e5c1b06971ae1f5465c0a577cb53</id>
<content type='text'>
Force users to pass the path to the root of the webpage the script
should check. The script lives in a different subdirectory so the
default of the current directory doesn't make much sense.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Force users to pass the path to the root of the webpage the script
should check. The script lives in a different subdirectory so the
default of the current directory doesn't make much sense.

Signed-off-by: Peter Krempa &lt;pkrempa@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
