Commit Graph

170 Commits

Author SHA1 Message Date
Eric Blake
0d44788fc3 backup: Introduce virDomainCheckpoint APIs
Introduce a bunch of new public APIs related to backup checkpoints.
Checkpoints are modeled heavily after virDomainSnapshotPtr (both
represent a point in time of the guest), although a snapshot exists
with the intent of rolling back to that state, while a checkpoint
exists to make it possible to create an incremental backup at a later
time.  We may have a future hypervisor that can completely manage
checkpoints without libvirt metadata, but the first two planned
hypervisors (qemu and test) both always use libvirt for tracking
metadata relations between checkpoints, so for now, I've deferred
the counterpart of virDomainSnapshotHasMetadata for a separate
API addition at a later date if there is ever a need for it.

Note that until we allow snapshots and checkpoints to exist
simultaneously on the same domain (although the actual prevention of
this will be in a separate patch for the sake of an easier revert down
the road), that it is not possible to branch out to create more than
one checkpoint child to a given parent, although it may become
possible later when we revert to a snapshot that coincides with a
checkpoint.  This also means that for now, the decision of which
checkpoint becomes the parent of a newly created one is the only
checkpoint with no child (so while there are APIs for dealing with a
current snapshot, we do not need those for checkpoints).  We may end
up exposing a notion of a current checkpoint later, but it's easier to
add stuff when proven needed than to blindly support it now and wish
we hadn't exposed it.

The following map shows the API relations to snapshots, with new APIs
on the right:

Operate on a domain object to create/redefine a child:
virDomainSnapshotCreateXML          virDomainCheckpointCreateXML

Operate on a child object for lifetime management:
virDomainSnapshotDelete             virDomainCheckpointDelete
virDomainSnapshotFree               virDomainCheckpointFree
virDomainSnapshotRef                virDomainCheckpointRef

Operate on a child object to learn more about it:
virDomainSnapshotGetXMLDesc         virDomainCheckpointGetXMLDesc
virDomainSnapshotGetConnect         virDomainCheckpointGetConnect
virDomainSnapshotGetDomain          virDomainCheckpointGetDomain
virDomainSnapshotGetName            virDomainCheckpiontGetName
virDomainSnapshotGetParent          virDomainCheckpiontGetParent
virDomainSnapshotHasMetadata        (deferred for later)
virDomainSnapshotIsCurrent          (no counterpart, see note above)

Operate on a domain object to list all children:
virDomainSnapshotNum                (no counterparts, these are the old
virDomainSnapshotListNames           racy interfaces)
virDomainSnapshotListAllSnapshots   virDomainListAllCheckpoints

Operate on a child object to list descendents:
virDomainSnapshotNumChildren        (no counterparts, these are the old
virDomainSnapshotListChildrenNames   racy interfaces)
virDomainSnapshotListAllChildren    virDomainCheckpointListAllChildren

Operate on a domain to locate a particular child:
virDomainSnapshotLookupByName       virDomainCheckpointLookupByName
virDomainSnapshotCurrent            (no counterpart, see note above)
virDomainHasCurrentSnapshot         (no counterpart, old racy interface)

Operate on a snapshot to roll back to earlier state:
virDomainSnapshotRevert             (no counterpart, instead checkpoints
                                     are used in incremental backups via
				     XML to virDomainBackupBegin)

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-07-26 16:48:58 -05:00
Ján Tomko
7e431a521c docs: news: remove sed sorcery
Set a default namespace in the stylesheet instead.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2019-07-17 17:34:08 +02:00
Daniel P. Berrangé
3918fb0dc1 docs: introduce a "knowledge base" for task oriented guides
The previously added AMD SEV doc was not linked from anywhere on the
website. Address this by introducing a new "Knowledge base" section
that can hold task oriented guide to various features. Moving the SEV,
disk locking and secure usage guides under this section.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-07-09 18:43:12 +01:00
Martin Kletzander
a4d0f65faf docs: Remove unused JavaScript libraries
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2019-06-20 15:33:29 +02:00
Andrea Bolognani
6716c997f6 docs: Install documentation under $(docdir)
At the moment we allow the user to specify exactly where
they want the HTML documentation to be installed with an
extreme level of precision through the --with-html-dir and
--with-html-subdir configure options.

Most of the time, of course, the user will stick with the
default, that is $(datadir)/doc/$(PACKAGE)-$(VERSION)/html.

So close to $(docdir)! Including the version number in
the path, specifically, seems entirely unnecessary since
different releases of libvirt are not going to be able to
coexist on the same system anyway.

Drop all these custom flexibilty for flexibilty's sake
shenaningans in favor of the standard, well understood
$(docdir).

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
2019-05-13 12:02:13 +02:00
Andrea Bolognani
ca6f602546 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.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
2019-05-13 12:02:11 +02:00
Andrea Bolognani
78b748b94b docs: Introduce $(modules)
This variable contains a lists of documentation modules,
in a neutral format.

Right now is only used to define $(apihtml_generated), but
later on we're gonna reuse it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
2019-05-13 12:02:04 +02:00
Daniel P. Berrangé
97e743ac14 docs: move javascript logic into a standalone file
Instead of duplicating javascript in every single page, put it in a
standalone file which can be cached by the browser.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-11 15:20:17 +01:00
Daniel P. Berrangé
db3d4f96c9 docs: ensure javascript files are included in dist & install rules
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-11 15:20:17 +01:00
Cole Robinson
fb0d6049cc docs: Remove search.php and all references
libvirt.org/search.php drops into some kind of screen which I guess
is supposed to show a search bar with options, but presently for me
renders as nothing but the following text:

Search the documentation on Libvirt.org

The search service indexes the libvirt APIs and documentation as well as the libvir-list@redhat.com mailing-list archives. To use it simply provide a set of keywords:

The main page search bar now redirects to google, this page is broken,
I say we just remove it and move on.

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-04-04 18:45:06 -04:00
Peter Krempa
6be034a8c0 docs: api_extension: Remove example patches
Now that they are not linked any more remove them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2018-08-24 16:23:01 +02:00
Andrea Bolognani
3e7db8d3e8 Remove backslash alignment attempts
Right-aligning backslashes when defining macros or using complex
commands in Makefiles looks cute, but as soon as any changes is
required to the code you end up with either distractingly broken
alignment or unnecessarily big diffs where most of the changes
are just pushing all backslashes a few characters to one side.

Generated using

  $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
    grep -E '*\.([chx]|am|mk)$$' | \
    while read f; do \
      sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
    done

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2017-11-03 13:24:12 +01:00
Daniel P. Berrange
7c956d42a2 docs: make website responsive for mobile devices
The website does not look good in a mobile device as the text is
far too small and the layout assumes a wide screen.

Make the style dynamically adapt based on viewport size, so a
mobile device gets a layout more suited to its dimensions,
also changing "Learn" to "Docs"

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07 14:44:40 +01:00
John Ferlan
8947504683 docs: Fix syntax-check error
Commit id '94d2d6429' caused a syntax-error check to fail:

docs/Makefile.am:276:	$(AM_V_GEN)sed -e '/<span id="php_placeholder"><\/span>/r '"$(srcdir)/$@.code.in" \
maint.mk: Wrap long lines in Makefiles
cfg.mk:721: recipe for target 'sc_prohibit_long_lines' failed
make: *** [sc_prohibit_long_lines] Error 1
make: *** Waiting for unfinished jobs....

Altered the line to put another line wrap between sed and -e
2017-08-02 15:00:58 -04:00
Daniel P. Berrange
94d2d6429d docs: make xmllint & xsltproc compulsory
We already require libxml to be installed, so it is not unreasonable
to require xmllint and xsltproc to be installed too - any platform
with the former will have the latter too.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-02 17:00:11 +01:00
Daniel P. Berrange
f802c9de09 docs: drop XHTML 1.0 validation of website
The HTML pages are currently validated against an XHTML 1.0 DTD.
This makes it impossible to take advantage of features that are
introduced in HTML 5, because they'll fail validation.

There is intentionally no DTD defined for HTML 5, so there's no
alternative to XHTML 1.0 DTD that we could switch to. The only
options are to stick with XHTML 1.0 forever, or drop the DTD
validation, and we pick the latter.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-02 17:00:11 +01:00
Martin Kletzander
4f01054500 docs: Format comment timestamp in UTC
I just forgot '-u' in a54c962286.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2017-07-28 16:24:45 +02:00
Martin Kletzander
a54c962286 docs: Add build timestamps to generated html/php pages
In order not to make the build even less reproducible, honour
SOURCE_DATE_EPOCH environment variable as specified:

  https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2017-07-26 17:47:25 +02:00
Andrea Bolognani
d672551816 HACKING: Drop from the git repository
Despite being a generated file, HACKING has been tracked in
the git repository along with actual source files. As far as
I'm aware, it's the only generated file for which that happens.

Times and times again, people[1] have committed changes to
the source file without refreshing the generated copy at the
same time.

The rationale for tracking the generated file is to help out
people who just cloned the git repository looking to contribue;
however, README-hacking already contains enough information to
get perspective contributors to a place where they can simply
look at docs/hacking.html instead.

[1] Mostly me, to be honest

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2017-06-26 14:25:54 +02:00
Nikolay Shirokovskiy
bb9055b87e docs: install html fonts and related 2017-05-12 16:49:08 +03:00
Peter Krempa
62ed907a7b docs: Add news.rng to EXTRA_DIST 2017-04-05 13:17:53 +02:00
Andrea Bolognani
be36ea4b52 NEWS: Improve building pipeline
Currently, building the NEWS file involves using a XSLT stylesheet
to extract information from the same HTML file that's used on the
libvirt website.

The process works, but it's quite fiddly in that it requires the
source HTML to be formatted in a very precise way, and a single
missing newline can mess up the resulting plain text considerably.

Moreover, the XSLT stylesheet itself encodes a lot of the details
of converting to plain text in a way that's not necessarily easy
to understand, tweak or fix.

To improve the process, move all existing entries to a new XML
file that contains exactly the information we care about in a
simple structured format, and start generating both the HTML and
plain text versions of the release notes using XSLT stylesheets
that can now afford to be almost trivial.
2017-01-10 19:37:53 +01:00
John Ferlan
55bddd5e4e docs: Rebuild apihtml docs when source changes
When changing one of the src/libvirt-*.c files to alter the docs, the
adjusted files weren't being built.  Added them into APIBUILD_STAMP and
then added that to the html/index.html rule which is used for the
$(apihtml_generated) generated rule.

Also, for clean we can remove the html/*.html files
2016-12-07 06:07:16 -05:00
Daniel P. Berrange
6fb5dd4fd8 docs: remove outdated or duplicated content
Remove a bunch of pages which are either outdated, have no
content, or duplicate content better described elsewhere
in the site or wiki.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-11 12:15:06 +00:00
Daniel P. Berrange
7a568d5fca docs: remove navigation sidebar from pages
A combination of the index page, top nav bar and docs.html page
provide links to all pages on the site. The left hand nav bar
is thus redundant and can be removed to provide a simpler style
for the site.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-11 12:15:06 +00:00
Daniel P. Berrange
ef94872159 docs: remove todo page
The todo page used to be auto-generated from bugzilla but is
no longer used.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-11 12:15:05 +00:00
Daniel P. Berrange
a7bd8c9cad docs: provide new style logos for the apps page
Replace the old "Made with libvirt" logo with links to the
new "Libvirt powered" logos, providing various sizes.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-11 12:15:05 +00:00
Daniel P. Berrange
e3e0f36719 docs: redo style of front page
Use a large logo banner across the front page. Tile the
three lists of links into three panels

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-11 12:15:03 +00:00
Daniel P. Berrange
2d35438bc6 docs: switch to new website banner
Use a dark banner whose color matches the dark green used in
the logo. Introduce a newly rendered version of the header
logo derived from new SVG file, instead of old one from
(now lost) Adobe Illustrator file.

The top banner logo now links to the front page as is common
practice for most websites.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-11 09:31:10 +00:00
Daniel P. Berrange
8c6e2867c3 docs: add master SVG for libvirt logo
Add the SVG files for the libvirt logo, along with corresponding
pre-rendered PNG bitmaps at key sizes. Also add a README file
describing how to modify the logos and their intended usages.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-11 09:31:10 +00:00
Ján Tomko
472ab04d4a docs/Makefile.am: build hvsupport.html earlier
This file requires three steps instead of two.
Move it earlier in the list of targets to avoid waiting for it.
2016-10-06 12:40:39 +02:00
Ján Tomko
ecb9b8b735 docs/Makefile.am: remove redundant variables
Remove DOC_SOURCE_DIR, introduced by and
unused since commit b325d74.

PERL is already detected in configure.ac.
2016-10-06 10:52:15 +02:00
Michal Privoznik
e396de03f3 docs: Distribute subsite.xsl
So, I've ran into very interesting problem lately. When doing the
following, I've encountered an error:

  libvirt.git $ make dist && tar -xJf libvirt-2.2.0.tar.xz && \
                cd libvirt-2.2.0 && ./configure && \
                rm docs/formatdomain.html && make -C docs

  make: Entering directory 'docs'
  make: *** No rule to make target 'formatdomain.html', needed by 'web'.  Stop.
  make: Leaving directory 'docs'

I had no idea what was going on, so I've nailed down the commit
that "broke it" via running git-bisect. It was this one:
7659bd9221. But that shed no more light until I realized
that the commit might actually just exposed a problem we had. And
guess what - I've nailed it down. Of course we are not
distributing subsite.xsl that's why make prints error message.
Very misleading one I must say.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-08-08 11:49:35 +02:00
Erik Skultety
52dbacc07a admin: enable both admin API functionality and tarball distribution
This patch enables admin socket creation in daemon's code, bumps the library
version in libvirt_admin_public.syms, and performs all necessary modifications
to our makefiles so that admin API can finally be included in the tarball,
and eventually become part of an rpm package (a patch later in this series).

Signed-off-by: Erik Skultety <eskultet@redhat.com>
2016-06-26 00:21:06 +02:00
Andrea Bolognani
22a592a4fe docs: Pass relative paths to apibuild.py
Since commit d195cffa2e, both $(srcdir) and $(abs_builddir)
are passed to the apibuild.py script; however, since the
former is a relative path and the latter an absolute one, the
script might not be able to detect whether they point to the
same location.

Pass both as relative paths to avoid the issue.
2016-04-26 09:20:11 +02:00
Peter Krempa
d195cffa2e docs: apibuild: Fix VPATH build
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.
2016-04-25 08:49:30 +02:00
Peter Krempa
9928387473 api: Generate docs for libvirt-common.h
Since commit f5d9c5d00c 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.
2016-04-21 15:39:08 +02:00
Michal Privoznik
8ed7c3a2cf docs: Don't leave any documentation behind
Our uninstall script is not exact counterpart of install one.
Therefore we are leaving couple of files behind. This should not
happen.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-04-20 17:34:06 +02:00
Michal Privoznik
265bb873c8 docs: Uninstall libvirt logo too
While we could leave it behind as an indelible sign that libvirt
has been running on host, other users might not be that fond of
it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-04-20 17:34:00 +02:00
Cole Robinson
e14c5069c5 docs: website: Remove the et.redhat.com footer
This is long since obsolete, just scrap it all
2016-03-10 11:06:25 -05:00
Michal Privoznik
0f396a4159 docs: Try harder to uninstall
Imagine you have partially installed libvirt, or maybe you're
just running 'make uninstall' from a different version than 'make
install' has been ran. One way or another, we are doing plain
'rm' instead of 'rm -f' and thus not trying hard enough when
uninstalling. In the rest of our code we stick with -f switch. Do
that for docs too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-02-23 12:05:01 +01:00
Cole Robinson
a6cfd22eba docs: fix syntax-check long line error 2016-01-20 10:27:24 -05:00
Daniel P. Berrange
7659bd9221 docs: fix generation of docs from VPATH build
When generating docs in a VPATH build we get a failure to
create a file due to the 'internals' subdir not existing:

  Generating internals/locking.html.tmp
  /bin/sh: line 3: internals/locking.html.tmp: No such file or directory
  rm: cannot remove ‘internals/locking.html.tmp’: No such file or directory
  Makefile:2229: recipe for target 'internals/locking.html.tmp' failed
  make: *** [internals/locking.html.tmp] Error 1

For some reason, make has decided to run the target

  %.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in $(acl_generated)

instead of the target

  internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in

Removing '$(acl_generated)' from the first target, inexplicably
causes make to now run the correct target for the internals/
files.

Rather than figure this out, lets just combine the two targets
into one.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-01-20 12:22:19 +00:00
Michal Privoznik
8c67ab6684 Expand $(wildcard) correctly
So after da176bf6b7 and friend we have switched to $(wildcard
some/path/*.xml) instead of enumerating the files explicitly.
This is nice, however it makes distcheck build from VPATH fail.
The reason is that it's is not obvious to what does the wildcard
refer to: srcdir or builddir?

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-01-12 17:16:33 +01:00
Cole Robinson
f7d0f12407 build: Kill docs/schemas/Makefile.am
Move the logic to docs/Makefile.am, and simplify it with a wildcard
expression.
2016-01-11 11:45:14 -05:00
Erik Skultety
a20b623748 libvirt: introduce libvirt/libvirt-common.h.in
As it turned out, we need to share some enums and declarations between
libvirt.h and libvirt-admin.h, but since our policy forbids direct includes of
libvirt*.h, there has to be some header exempt from this rule. This patch moves
the relevant part of code from libvirt.h.in to libvirt-common.h.in. Moreover,
since there is no need to have libvirt.h generated anymore, introduce a new
header libvirt.h which was previosly ignored from git and make the common
header ignored and generated instead.
2015-11-30 09:36:19 +01:00
Martin Kletzander
6d91d70190 Revert "docs: Drop unused rule for internals/%.html.tmp target"
This reverts commit e5470dd0e0.

This has been ACK'd by the original author in the original mail thread:
https://www.redhat.com/archives/libvir-list/2015-September/msg00310.html

The reason to revert this is due to the patch breaking the generation of
internal subsites.  The original issue still needs to be dealt with,
though.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-09-09 11:52:24 +02:00
Martin Kletzander
0f3989c172 docs: Remove last use of double semicolon in Makefile
Double semicolons have special meaning in makefiles, but they would have
to be combined with other rules witch such separators in order to be
used as intended.  Since there are no other rules like that, let's
clean it up.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-09-08 15:07:08 +02:00
Guido Günther
e5470dd0e0 docs: Drop unused rule for internals/%.html.tmp target
We're using the %.html.tmp for all html files now so drop the unused one
and rather make sure the needed directory exists.

This fixes build failures as described in

    https://www.redhat.com/archives/libvir-list/2015-August/msg00603.html
2015-08-20 10:19:27 +02:00
Martin Kletzander
1bcc88bbdd Temporarily disable admin API
Don't listen on the admin socket in the daemon and comment out the
admin devel files out of specfile.

Library is still being compiled and installed in order to link easily
without any disturbing modifications to the daemon code.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-06-28 11:34:25 +08:00