mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-22 01:50:06 +03:00
Compare commits
595 Commits
Author | SHA1 | Date | |
---|---|---|---|
bfcca58787 | |||
22de841a76 | |||
e2e000cf1b | |||
3b106cead5 | |||
c5337e8e43 | |||
55d444cc10 | |||
cddd3ac8b0 | |||
631c4ce855 | |||
1670df676a | |||
39367b5674 | |||
f21c6c6890 | |||
c7f70f4357 | |||
4a2dd00e76 | |||
aed4c08d4c | |||
b5cc01ef2e | |||
98caf6db76 | |||
ddf877cd9e | |||
9455323530 | |||
564f4c2f9a | |||
1aaa909116 | |||
1787fdff57 | |||
7ea025aed0 | |||
6df7d55d39 | |||
df62337289 | |||
3d3af08879 | |||
9fd54a78dc | |||
4acab37f56 | |||
fba503c368 | |||
9cea2af3fc | |||
edb9d54bd1 | |||
3bf24abc8c | |||
7be5c26d74 | |||
2cdf29eda9 | |||
5874c6de5c | |||
e26997f62b | |||
ce4c82f116 | |||
71d5686f78 | |||
f599156641 | |||
6c5450646c | |||
60466abbd6 | |||
dd1a186f77 | |||
3c8877e743 | |||
f8352e221f | |||
d33b87268d | |||
2a788c6439 | |||
ef962afb74 | |||
2df320609a | |||
1a253b38e2 | |||
1efb623674 | |||
2aca94bfd3 | |||
a331b909c5 | |||
ba32e11d41 | |||
e68792c112 | |||
94dcf953ff | |||
36bcd7026b | |||
479dfbb084 | |||
0d7d699795 | |||
1870e70707 | |||
ed510fce9c | |||
028db0bf5d | |||
dbfa2ff572 | |||
8cf0ed02be | |||
552bdb9b35 | |||
9f337ef752 | |||
28b9a6c769 | |||
6f17a5d166 | |||
6449cb9014 | |||
23b1e5c0b0 | |||
86fe2ba6dc | |||
fbf9fcbff4 | |||
f7d32ce260 | |||
84fa113217 | |||
fcd103bb2a | |||
a4f9af057a | |||
a6c77af617 | |||
e9125be594 | |||
5a19c24611 | |||
b290e48cf7 | |||
6c175fa3d1 | |||
8bd8bcaca8 | |||
7ece483dce | |||
67f34cd67b | |||
68d5d96bce | |||
f2192637b0 | |||
5cec7af469 | |||
2127b42b46 | |||
a3884f8705 | |||
1c91a0b44e | |||
49411f029a | |||
d2e0bd1779 | |||
45274d4121 | |||
88151c7cbc | |||
c572222a14 | |||
462c74c38a | |||
32c3c1f0b7 | |||
9b55a52b4f | |||
2f992d4be4 | |||
1bbe12de44 | |||
5dac5970a5 | |||
905709500a | |||
a44b23ba63 | |||
5288b2ad8e | |||
1b747f0ded | |||
d068f9609c | |||
6e41f30efc | |||
7a3da17a58 | |||
15c647a91e | |||
d002c250cd | |||
8d30e5f74d | |||
d9292cfefb | |||
8459218cbc | |||
b3e8f9f415 | |||
e7168f7965 | |||
96e5a2d4d5 | |||
fba3dfd156 | |||
f76c3493d8 | |||
4ee2b31804 | |||
8a7b4be5ab | |||
78151ec96e | |||
d62f4c36c2 | |||
320ea3a47e | |||
f983c32675 | |||
cd2404a3c3 | |||
d13eb9fc95 | |||
57dab74804 | |||
82cb2e73aa | |||
1778da7185 | |||
00e00510c5 | |||
2f047d4816 | |||
73b45bfbff | |||
56bac4a221 | |||
ea54570efb | |||
2072d63c5b | |||
e813200714 | |||
6cbc33063a | |||
a77821c864 | |||
a792bf240f | |||
eff24046d8 | |||
6fc93f1e75 | |||
9d6614df86 | |||
8d773c0f4f | |||
0327ed8718 | |||
890af4ca8f | |||
3cda0eb487 | |||
00195f9f8d | |||
2f646237da | |||
ffbfd2c813 | |||
63c0c9a77f | |||
50723581b0 | |||
b4b0949dd7 | |||
25d5e16e9e | |||
7b5114f62b | |||
4eb8022260 | |||
062b0aa33b | |||
0e0f6021ce | |||
bc2102104f | |||
0af0ded038 | |||
285d38931f | |||
0ec5cd0704 | |||
8bf6799b09 | |||
0fdf649672 | |||
188af565dd | |||
92a9e5df63 | |||
99123ba012 | |||
05e15ff812 | |||
f3661756c1 | |||
b522264b40 | |||
7fb3e43d36 | |||
ad8bf13f7d | |||
5bbde877e7 | |||
86415b2d26 | |||
668150fc3d | |||
53456e62ed | |||
2b4e353168 | |||
bf7354072f | |||
b3bff9546b | |||
e455b221be | |||
284805e666 | |||
661ae104c2 | |||
5982168290 | |||
19a863c435 | |||
447c586a0d | |||
508da563b9 | |||
f0dc84d83f | |||
e3a7137ac2 | |||
1130085cf0 | |||
f85208eec6 | |||
d498175aad | |||
065b6571bf | |||
e4e20423ff | |||
929560384d | |||
965466c1ee | |||
46e9b0fb4e | |||
f0c1c3f86a | |||
c71a2100b1 | |||
f895e611df | |||
67253251c5 | |||
9bcad69093 | |||
67203f6780 | |||
5607db6788 | |||
ab952024f4 | |||
c85f641390 | |||
ced154cb54 | |||
6bb4986b0b | |||
ee9083aba5 | |||
46a2ea3689 | |||
987e31edc9 | |||
71d793faaf | |||
c5728cd618 | |||
32e6ac9c26 | |||
8613273458 | |||
d51638d0ad | |||
6bae6677c8 | |||
097e07a63a | |||
cef0967e02 | |||
b7d4c300c3 | |||
747c536370 | |||
ea7dc33786 | |||
4445723811 | |||
271945a148 | |||
156133597d | |||
e36be6e7c7 | |||
e07cf19fe5 | |||
5edaf95599 | |||
f66636e3ca | |||
1cfbfaa697 | |||
84eb6effdd | |||
95c8ddd2ec | |||
7998714d60 | |||
ca7db6cb80 | |||
8a7783c163 | |||
81e99f014b | |||
8d8815ea2a | |||
26be7a0a24 | |||
c390bcfec5 | |||
67904847f0 | |||
67ef701779 | |||
b9a3287e80 | |||
7233dc170f | |||
2f80b2a013 | |||
e77ee32357 | |||
17f7220891 | |||
0f7ba8c21c | |||
3528d66641 | |||
190aaa2627 | |||
460e7b6a94 | |||
6d45d5855d | |||
91da9a7689 | |||
041a18be17 | |||
bba36f7fc7 | |||
055d21d254 | |||
d304352b19 | |||
09fafa1e21 | |||
65e97240e6 | |||
b7a7b33651 | |||
5ee592208c | |||
7f4f1dd416 | |||
0ab6423579 | |||
20ffaf59dc | |||
68f63673da | |||
7f7849c996 | |||
3535092f3a | |||
73adc0e5b7 | |||
3fdb9ba760 | |||
d36b4e92ac | |||
b50ab42d41 | |||
e10dc8666e | |||
598a0c00dc | |||
caad0a8783 | |||
336fd879c0 | |||
fc148ca133 | |||
0a33633579 | |||
257d90f3fb | |||
bc3f582bb0 | |||
e7d29e234c | |||
1216398da9 | |||
b62cab6e09 | |||
2ef091efcc | |||
0ef58c3155 | |||
89d8cdfc7e | |||
0c842417ef | |||
be7780b035 | |||
fe2f1ba1db | |||
b97befb6a2 | |||
2969eff86a | |||
2ed0b3f935 | |||
45b6e68e09 | |||
3cdc4cb613 | |||
a31bc67503 | |||
db481dca94 | |||
e3c36a2575 | |||
c78c9f5a9b | |||
3f1aa08af6 | |||
6d5c8a8f51 | |||
3a44152201 | |||
f92c041a1c | |||
95a515fc44 | |||
e6458393ab | |||
eb9945d9ae | |||
102d25a822 | |||
5541cade86 | |||
74383bfc42 | |||
83988bd43b | |||
3ebbc241a1 | |||
be2a53e6e0 | |||
7fbc2e37b8 | |||
ca842a6bcb | |||
f60e0150b8 | |||
d376b7d63e | |||
2c555d87b0 | |||
8a7f4b8dc1 | |||
ed3d86c9a9 | |||
e29439bd14 | |||
3b04f3bb0f | |||
89a08ba63a | |||
12023373cd | |||
b978f31a93 | |||
056623f3d7 | |||
7be9270c24 | |||
89bf843a6d | |||
36d8e7d8d7 | |||
0c39adef95 | |||
f6876e10cf | |||
d1c754168a | |||
06b835607f | |||
22e39d0ee4 | |||
2a13ecc9be | |||
e839e33a96 | |||
095375925e | |||
0be3783316 | |||
618dc80c2f | |||
d3b6fe5f9c | |||
1c36d0682a | |||
785d8580b3 | |||
aa2f6f96dd | |||
5140a2f626 | |||
ecb5cf7cb2 | |||
2e56fb2bcc | |||
4dbed7d9c4 | |||
c101092adf | |||
fbe65e5e1c | |||
f5a6ce44ce | |||
1a4d5c9543 | |||
32884a7ef6 | |||
ba918ac1b4 | |||
4697def66b | |||
703c165188 | |||
09ed07293f | |||
84a25570cb | |||
8c82479d83 | |||
b70a1f455c | |||
57db02e8c0 | |||
ede3bc1128 | |||
5c0e525c1c | |||
219305df44 | |||
c7434706a2 | |||
fd04fbaaaf | |||
e8d6c28955 | |||
ce5ced1d00 | |||
e609aae673 | |||
1227d08640 | |||
b50d48b158 | |||
badfe6c75e | |||
6ef5a5beeb | |||
3c12a67b76 | |||
a03121bcfe | |||
9882123d69 | |||
44f687297a | |||
a8464c516b | |||
4acbb29821 | |||
2103d87c89 | |||
a64e3b3e68 | |||
cf1045338e | |||
04c7abd9c3 | |||
b1a7ebfdec | |||
0d8aa35f60 | |||
4fee63fe1c | |||
0d3eee7fe8 | |||
b85a53405c | |||
92bd859a29 | |||
7d575e09e2 | |||
84ef5aecca | |||
bc0f737dd7 | |||
06973f7065 | |||
8540dadbe9 | |||
55946f23a6 | |||
24cc058e5e | |||
553447ac3b | |||
66d70a8f66 | |||
e749d77619 | |||
23e93d95b5 | |||
77d118b4ce | |||
27efcfb7eb | |||
aa7847d3ad | |||
20578bda74 | |||
74042b8fba | |||
e4d7433ef0 | |||
200c83b29d | |||
b9e2967a5e | |||
eed2f8c3a9 | |||
a3301b71f6 | |||
546d1f40a0 | |||
3647515788 | |||
bef10f9a05 | |||
b769339295 | |||
74e3b5578e | |||
b2111ba3cd | |||
bd3ff6b348 | |||
303cf4dbff | |||
7ca954cf26 | |||
1204e41f01 | |||
f3439c7eae | |||
8ac0334ebd | |||
b39c2068e4 | |||
a09af3b004 | |||
67b2eb1042 | |||
482869633a | |||
c56cf8d55f | |||
8ddff3e6cd | |||
a79fb1c491 | |||
ace4dca5df | |||
f064dca7ea | |||
0f88dade23 | |||
083b901eb3 | |||
327d5fe072 | |||
0a42b9e2c5 | |||
53ed2c4c58 | |||
5365ff40d3 | |||
89bdf84bcd | |||
c560fc4933 | |||
f4a43df52b | |||
c7b85e3710 | |||
b738016b78 | |||
9ad255f975 | |||
38c9440a15 | |||
1a51d05f8b | |||
f1ef0e31d2 | |||
d2a9773457 | |||
0e69905d9f | |||
1edc59e71b | |||
e530940e47 | |||
f51e01f47d | |||
9b9e52a1cb | |||
582f04f064 | |||
c5bad3ad21 | |||
e563b3b326 | |||
f66dcd044f | |||
3a6555b345 | |||
67b44811af | |||
dca81d0472 | |||
9568c1d985 | |||
617075f49f | |||
d5739ab56a | |||
b4bf51253b | |||
27fc6782bc | |||
72919f3d35 | |||
14ee6a66f8 | |||
6ef20bb7ae | |||
fbadc2b608 | |||
269556e557 | |||
7c7b194cf0 | |||
ead3410f30 | |||
b97c24b2e1 | |||
8ba9e794e6 | |||
ee38d7e089 | |||
b3e7890ada | |||
62f4ae153b | |||
3f8de891c5 | |||
12ed08bc3a | |||
37ce5600c0 | |||
e52687e88f | |||
61497d958e | |||
b4584612b4 | |||
3ec09478de | |||
7813a0f81c | |||
07e318b3db | |||
27e63c0037 | |||
081fd746f0 | |||
3f745ebe9f | |||
6d4bd59cf8 | |||
bf6789d913 | |||
372a7f45c5 | |||
f162252e25 | |||
ad4dde3d50 | |||
6fe15e357d | |||
294adef356 | |||
148114e325 | |||
2bd559ff5d | |||
73b0b59667 | |||
7c5735dc2a | |||
7ac2787019 | |||
b78fddea39 | |||
309647c81f | |||
bc6a48c6cf | |||
f89c67cf19 | |||
dc03ae2c6d | |||
e977f471f1 | |||
59467601c2 | |||
4a3d1ca3f1 | |||
55e642e586 | |||
d15a67fa56 | |||
8c38b5dc2e | |||
09a33fd8a9 | |||
535db41be8 | |||
9ab3fac841 | |||
b6b8009548 | |||
5d72a89442 | |||
c841a1fa7f | |||
a1b1ab1478 | |||
315baab944 | |||
78d1ee295d | |||
fd5091db5f | |||
4b75e4df27 | |||
cad2a4caed | |||
141dea6bc7 | |||
658341189b | |||
823a684f8d | |||
c31a116b72 | |||
dfab48ac54 | |||
a3d22efd77 | |||
387941fb62 | |||
53c05341d4 | |||
605542c330 | |||
5130713ba1 | |||
7b5ae2f077 | |||
388f3cb565 | |||
af7c18f7a2 | |||
618e1ab349 | |||
18e0cc7f72 | |||
b39ea45292 | |||
b2149d03b9 | |||
796840d2f0 | |||
8efec111fc | |||
2073ed6f20 | |||
6daa19da9a | |||
7357975000 | |||
d3024a2cce | |||
b65490a312 | |||
80de0a8c40 | |||
38536d6f7f | |||
c4dcf043ca | |||
a70e599d80 | |||
f430ddb624 | |||
031366383a | |||
99edc443e9 | |||
0677e11125 | |||
ce71b8654d | |||
9f013d5779 | |||
f8b1b4bab9 | |||
910b019f93 | |||
d6126f764f | |||
65842bf669 | |||
c39554bf49 | |||
caa805ea64 | |||
d47ef780f2 | |||
658952a38a | |||
e3042683bd | |||
69cf62adac | |||
a82a87f26b | |||
5dee786d7b | |||
314ced3951 | |||
46ef463135 | |||
9140756d30 | |||
0a5befc4c0 | |||
fe46a7e686 | |||
f972dc2d5c | |||
d5c6183def | |||
a5ab900d26 | |||
8ce5e2c1ab | |||
3b9027c401 | |||
ed9c14a7ef | |||
ce039c3ea5 | |||
906b1650b5 | |||
daeb6f6b40 | |||
343205d705 | |||
79ad308781 | |||
314190a0ad | |||
f0ea7ab328 | |||
26bd7bef58 | |||
c3e73528f1 | |||
53b7dae139 | |||
a7e80e6bfd | |||
04ebf058d5 | |||
6eed3feafb | |||
fd10c4e1ee | |||
a16a96942d | |||
b56fbbad0b | |||
bfc34dca3b | |||
3ed42b0098 | |||
af25361762 | |||
376b311deb | |||
b1cd474c77 | |||
a6b00cbb16 | |||
ce71bfa817 | |||
0b907122b7 |
20
.gitignore
vendored
20
.gitignore
vendored
@ -1,13 +1,21 @@
|
||||
*#*#
|
||||
*.#*#
|
||||
*.a
|
||||
*.o
|
||||
*.orig
|
||||
*.rej
|
||||
*~
|
||||
.git
|
||||
.git-module-status
|
||||
/GNUmakefile
|
||||
/maint.mk
|
||||
ABOUT-NLS
|
||||
COPYING
|
||||
ChangeLog
|
||||
INSTALL
|
||||
Makefile
|
||||
Makefile.in
|
||||
NEWS
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.cache
|
||||
@ -22,6 +30,7 @@ configure
|
||||
coverage
|
||||
cscope.files
|
||||
cscope.out
|
||||
gnulib/
|
||||
libtool
|
||||
libvirt-*.tar.gz
|
||||
libvirt.pc
|
||||
@ -34,14 +43,5 @@ results.log
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
stamp-h1
|
||||
update.log
|
||||
tests/*.log
|
||||
/GNUmakefile
|
||||
/maint.mk
|
||||
gnulib/
|
||||
*.orig
|
||||
*.rej
|
||||
*#*#
|
||||
*.#*#
|
||||
ChangeLog
|
||||
NEWS
|
||||
update.log
|
||||
|
2
.gnulib
2
.gnulib
Submodule .gnulib updated: 146d914507...097c9ce08a
2
.x-sc_unmarked_diagnostics
Normal file
2
.x-sc_unmarked_diagnostics
Normal file
@ -0,0 +1,2 @@
|
||||
docs/apibuild.py
|
||||
tests/virt-aa-helper-test
|
13
AUTHORS
13
AUTHORS
@ -24,6 +24,10 @@ The primary maintainers and people with commit access rights:
|
||||
John Levon <john.levon@sun.com>
|
||||
Matthias Bolte <matthias.bolte@googlemail.com>
|
||||
Jiri Denemark <jdenemar@redhat.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
Stefan Berger <stefanb@us.ibm.com>
|
||||
Eric Blake <eblake@redhat.com>
|
||||
|
||||
Patches have also been contributed by:
|
||||
|
||||
@ -59,7 +63,6 @@ Patches have also been contributed by:
|
||||
Shigeki Sakamoto <fj0588di@aa.jp.fujitsu.com>
|
||||
Gerd von Egidy <lists@egidy.de>
|
||||
Itamar Heim <iheim@redhat.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Markus Armbruster <armbru@redhat.com>
|
||||
Ryota Ozaki <ozaki.ryota@gmail.com>
|
||||
James Morris <jmorris@namei.org>
|
||||
@ -71,7 +74,6 @@ Patches have also been contributed by:
|
||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
Serge E. Hallyn <serue@us.ibm.com>
|
||||
Soren Hansen <soren@canonical.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
Abel Míguez Rodríguez<amiguezr@pdi.ucm.es>
|
||||
Doug Goldstein <cardoe@gentoo.org>
|
||||
Javier Fontan <jfontan@gmail.com>
|
||||
@ -89,6 +91,13 @@ Patches have also been contributed by:
|
||||
Steve Yarmie <steve.yarmie@gmail.com>
|
||||
Dan Kenigsberg <danken@redhat.com>
|
||||
Yuji NISHIDA <nishidy@nict.go.jp>
|
||||
Dustin Xiong <x_k_123@hotmail.com>
|
||||
Rolf Eike Beer <eike@sf-mail.de>
|
||||
Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
|
||||
Philipp Hahn <hahn@univention.de>
|
||||
Ed Swierk <eswierk@aristanetworks.com>
|
||||
Paolo Smiraglia <paolo.smiraglia@gmail.com>
|
||||
Sharadha Prabhakar <sharadha.prabhakar@citrix.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
59
HACKING
59
HACKING
@ -1,3 +1,6 @@
|
||||
-*- buffer-read-only: t -*- vi: set ro:
|
||||
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY!
|
||||
|
||||
Libvirt contributor guidelines
|
||||
==============================
|
||||
|
||||
@ -96,12 +99,26 @@ around operators and keywords:
|
||||
--no-tabs "$@"
|
||||
}
|
||||
|
||||
Note that sometimes you'll have to postprocess that output further, by
|
||||
Note that sometimes you'll have to post-process that output further, by
|
||||
piping it through "expand -i", since some leading TABs can get through.
|
||||
Usually they're in macro definitions or strings, and should be converted
|
||||
anyhow.
|
||||
|
||||
|
||||
Preprocessor
|
||||
============
|
||||
For variadic macros, stick with C99 syntax:
|
||||
|
||||
#define vshPrint(_ctl, ...) fprintf(stdout, __VA_ARGS__)
|
||||
|
||||
Use parenthesis when checking if a macro is defined, and use
|
||||
indentation to track nesting:
|
||||
|
||||
#if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE)
|
||||
# define fallocate(a,ignored,b,c) posix_fallocate(a,b,c)
|
||||
#endif
|
||||
|
||||
|
||||
C types
|
||||
=======
|
||||
Use the right type.
|
||||
@ -166,13 +183,13 @@ codebase, because they encourage a number of serious coding bugs and do
|
||||
not enable compile time verification of checks for NULL. Instead of these
|
||||
routines, use the macros from memory.h
|
||||
|
||||
- eg to allocate a single object:
|
||||
- eg to allocate a single object:
|
||||
|
||||
virDomainPtr domain;
|
||||
|
||||
if (VIR_ALLOC(domain) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -182,8 +199,8 @@ routines, use the macros from memory.h
|
||||
int ndomains = 10;
|
||||
|
||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- eg to allocate an array of object pointers
|
||||
@ -192,8 +209,8 @@ routines, use the macros from memory.h
|
||||
int ndomains = 10;
|
||||
|
||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- eg to re-allocate the array of domains to be longer
|
||||
@ -201,8 +218,8 @@ routines, use the macros from memory.h
|
||||
ndomains = 20
|
||||
|
||||
if (VIR_REALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- eg to free the domain
|
||||
@ -297,7 +314,7 @@ eg typical usage is as follows:
|
||||
|
||||
if (virBufferError(&buf)) {
|
||||
virBufferFreeAndReset(&buf);
|
||||
virReportOOMError(...);
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -328,7 +345,7 @@ complexity it's best to stick to the following general plan for all
|
||||
#include <limits.h>
|
||||
|
||||
#if HAVE_NUMACTL Some system includes aren't supported
|
||||
#include <numa.h> everywhere so need these #if defences.
|
||||
# include <numa.h> everywhere so need these #if guards.
|
||||
#endif
|
||||
|
||||
#include "internal.h" Include this first, after system includes.
|
||||
@ -363,18 +380,18 @@ of arguments.
|
||||
|
||||
|
||||
|
||||
Libvirt commiters guidelines
|
||||
Libvirt committer guidelines
|
||||
============================
|
||||
|
||||
The AUTHORS files indicates the list of people with commit acces right
|
||||
The AUTHORS files indicates the list of people with commit access right
|
||||
who can actually merge the patches.
|
||||
|
||||
The general rule for commiting patches is to make sure it has been reviewed
|
||||
properly in the mailing-list first, usually if a couple of persons gave an
|
||||
The general rule for committing a patch is to make sure it has been reviewed
|
||||
properly in the mailing-list first, usually if a couple of people gave an
|
||||
ACK or +1 to a patch and nobody raised an objection on the list it should
|
||||
be good to go. If the patch touches a part of the code where you're not the
|
||||
main maintainer or not have a very clear idea of how things work, it's better
|
||||
to wait for a more authoritative feedback though. Before commiting please
|
||||
to wait for a more authoritative feedback though. Before committing please
|
||||
also rebuild locally and run 'make check syntax-check' and make sure they
|
||||
don't raise error. Try to look for warnings too for example configure with
|
||||
--enable-compile-warnings=error
|
||||
@ -382,13 +399,13 @@ which adds -Werror to compile flags, so no warnings get missed
|
||||
|
||||
Exceptions to that 'review and approval on the list first' is fixing failures
|
||||
to build:
|
||||
- if a recently commited patch breaks compilation on a platform
|
||||
- if a recently committed patch breaks compilation on a platform
|
||||
or for a given driver then it's fine to commit a minimal fix
|
||||
directly without getting the review feedback first
|
||||
- similary if make check or make syntax-chek breaks, if there is
|
||||
- similarly, if make check or make syntax-check breaks, if there is
|
||||
an obvious fix, it's fine to commit immediately
|
||||
The patch should still be sent to the list (or tell what the fix was if
|
||||
trivial) and 'make check syntax-check' should pass too before commiting
|
||||
trivial) and 'make check syntax-check' should pass too before committing
|
||||
anything
|
||||
Similary fixes for documentation and code comments can be managed
|
||||
Similar fixes for documentation and code comments can be managed
|
||||
in the same way, but still make sure they get reviewed if non-trivial.
|
||||
|
@ -5,11 +5,14 @@ GENHTML = genhtml
|
||||
|
||||
SUBDIRS = gnulib/lib include src daemon tools proxy docs gnulib/tests \
|
||||
python tests po examples/domain-events/events-c examples/hellolibvirt \
|
||||
examples/dominfo examples/domsuspend examples/python examples/apparmor
|
||||
examples/dominfo examples/domsuspend examples/python examples/apparmor \
|
||||
examples/xml/nwfilter
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4
|
||||
|
||||
XML_EXAMPLES = $(wildcard examples/xml/test/*.xml) $(wildcard examples/xml/storage/*.xml)
|
||||
XML_EXAMPLES = \
|
||||
$(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/examples/xml/, \
|
||||
test/*.xml storage/*.xml)))
|
||||
|
||||
EXTRA_DIST = \
|
||||
ChangeLog-old \
|
||||
|
@ -12,8 +12,7 @@ requirements on anyone wishing to build from the just-checked-out sources.
|
||||
Note the requirements to build the released archive are much less and
|
||||
are just the requirements of the standard ./configure && make procedure.
|
||||
Specific development tools and versions will be checked for and listed by
|
||||
the bootstrap script. See README-prereq for specific notes on obtaining
|
||||
these prerequisite tools.
|
||||
the bootstrap script.
|
||||
|
||||
Valgrind <http://valgrind.org/> is also highly recommended, if
|
||||
Valgrind supports your architecture. See also README-valgrind.
|
||||
@ -28,6 +27,12 @@ You can get a copy of the source repository like this:
|
||||
$ git clone git://libvirt.org/libvirt
|
||||
$ cd libvirt
|
||||
|
||||
As an optional step, if you already have a copy of the gnulib git
|
||||
repository on your hard drive, then you can use it as a reference to
|
||||
reduce download time and disk space requirements:
|
||||
|
||||
$ export GNULIB_SRCDIR=/path/to/gnulib
|
||||
|
||||
The next step is to get all required pieces from gnulib,
|
||||
to run autoreconf, and to invoke ./configure:
|
||||
|
||||
|
10
acinclude.m4
10
acinclude.m4
@ -13,13 +13,17 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
||||
dnl ******************************
|
||||
|
||||
AC_ARG_ENABLE(compile-warnings,
|
||||
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
|
||||
[Turn on compiler warnings]),,
|
||||
[AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
|
||||
[Turn on compiler warnings])],,
|
||||
[enable_compile_warnings="m4_default([$1],[maximum])"])
|
||||
|
||||
warnCFLAGS=
|
||||
|
||||
common_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables"
|
||||
common_flags=
|
||||
common_flags="$common_flags -Wp,-D_FORTIFY_SOURCE=2"
|
||||
common_flags="$common_flags -fexceptions"
|
||||
common_flags="$common_flags -fasynchronous-unwind-tables"
|
||||
common_flags="$common_flags -fdiagnostics-show-option"
|
||||
|
||||
case "$enable_compile_warnings" in
|
||||
no)
|
||||
|
43
autogen.sh
43
autogen.sh
@ -1,11 +1,11 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
srcdir=`dirname "$0"`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
THEDIR=`pwd`
|
||||
cd $srcdir
|
||||
cd "$srcdir"
|
||||
DIE=0
|
||||
|
||||
(autopoint --version) < /dev/null > /dev/null 2>&1 || {
|
||||
@ -56,36 +56,47 @@ if test "x$1" = "x--system"; then
|
||||
EXTRA_ARGS="--prefix=/usr --sysconfdir=/etc --localstatedir=/var"
|
||||
echo "Running ./configure with $EXTRA_ARGS $@"
|
||||
else
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
if test -z "$*" && test ! -f "$THEDIR/config.status"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Compute the hash we'll use to determine whether rerunning bootstrap
|
||||
# is required. The first is just the SHA1 that selects a gnulib snapshot.
|
||||
# The second ensures that whenever we change the set of gnulib modules used
|
||||
# by this package, we rerun bootstrap to pull in the matching set of files.
|
||||
bootstrap_hash()
|
||||
{
|
||||
git submodule status | sed 's/^[ +-]//;s/ .*//'
|
||||
git hash-object bootstrap.conf
|
||||
}
|
||||
|
||||
# Ensure that whenever we pull in a gnulib update or otherwise change to a
|
||||
# different version (i.e., when switching branches), we also rerun ./bootstrap.
|
||||
curr_status=.git-module-status
|
||||
t=$(git submodule status)
|
||||
t=$(bootstrap_hash; git diff .gnulib)
|
||||
if test "$t" = "$(cat $curr_status 2>/dev/null)"; then
|
||||
: # good, it's up to date
|
||||
: # good, it's up to date, all we need is autoreconf
|
||||
autoreconf -if
|
||||
else
|
||||
echo running bootstrap...
|
||||
./bootstrap && echo "$t" > $curr_status
|
||||
echo running bootstrap...
|
||||
./bootstrap && bootstrap_hash > $curr_status \
|
||||
|| { echo "Failed to bootstrap gnulib, please investigate."; exit 1; }
|
||||
fi
|
||||
|
||||
# Automake requires that ChangeLog exist.
|
||||
touch ChangeLog
|
||||
cd "$THEDIR"
|
||||
|
||||
autoreconf -if
|
||||
|
||||
cd $THEDIR
|
||||
|
||||
if test x$OBJ_DIR != x; then
|
||||
if test "x$OBJ_DIR" != x; then
|
||||
mkdir -p "$OBJ_DIR"
|
||||
cd "$OBJ_DIR"
|
||||
fi
|
||||
|
||||
$srcdir/configure $EXTRA_ARGS "$@" && {
|
||||
if test -z "$*" && test -f config.status; then
|
||||
./config.status --recheck
|
||||
else
|
||||
$srcdir/configure $EXTRA_ARGS "$@"
|
||||
fi && {
|
||||
echo
|
||||
echo "Now type 'make' to compile libvirt."
|
||||
}
|
||||
|
880
bootstrap
880
bootstrap
@ -1,8 +1,50 @@
|
||||
#!/bin/sh
|
||||
# Run this before autogen.sh, to pull in all of the gnulib-related bits.
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2010-02-24.17; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Originally written by Paul Eggert. The canonical version of this
|
||||
# script is maintained as build-aux/bootstrap in gnulib, however, to
|
||||
# be useful to your project, you should place a copy of it under
|
||||
# version control in the top-level directory of your project. The
|
||||
# intent is that all customization can be done with a bootstrap.conf
|
||||
# file also maintained in your version control; gnulib comes with a
|
||||
# template build-aux/bootstrap.conf to get you started.
|
||||
|
||||
# Please report bugs or propose patches to bug-gnulib@gnu.org.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# Ensure file names are sorted consistently across platforms.
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
local_gl_dir=gl
|
||||
|
||||
# Temporary directory names.
|
||||
bt='._bootmp'
|
||||
bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
|
||||
bt2=${bt}2
|
||||
|
||||
usage() {
|
||||
echo >&2 "\
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTION]...
|
||||
Bootstrap this package from the checked-out sources.
|
||||
|
||||
@ -11,15 +53,173 @@ Options:
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
do not want to waste your bandwidth downloading
|
||||
them again.
|
||||
them again. Defaults to \$GNULIB_SRCDIR.
|
||||
--copy Copy files instead of creating symbolic links.
|
||||
--force Attempt to bootstrap even if the sources seem
|
||||
not to have been checked out.
|
||||
--skip-po Do not download po files.
|
||||
|
||||
If the file bootstrap.conf exists in the current working directory, its
|
||||
If the file $0.conf exists in the same directory as this script, its
|
||||
contents are read as shell variables to configure the bootstrap.
|
||||
|
||||
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||
are honored.
|
||||
|
||||
Running without arguments will suffice in most cases.
|
||||
"
|
||||
EOF
|
||||
}
|
||||
|
||||
# Configuration.
|
||||
|
||||
# Name of the Makefile.am
|
||||
gnulib_mk=gnulib.mk
|
||||
|
||||
# List of gnulib modules needed.
|
||||
gnulib_modules=
|
||||
|
||||
# Any gnulib files needed that are not in modules.
|
||||
gnulib_files=
|
||||
|
||||
# A function to be called after everything else in this script.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
bootstrap_epilogue() { :; }
|
||||
|
||||
# The command to download all .po files for a specified domain into
|
||||
# a specified directory. Fill in the first %s is the domain name, and
|
||||
# the second with the destination directory. Use rsync's -L and -r
|
||||
# options because the latest/%s directory and the .po files within are
|
||||
# all symlinks.
|
||||
po_download_command_format=\
|
||||
"rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'"
|
||||
|
||||
extract_package_name='
|
||||
/^AC_INIT(/{
|
||||
/.*,.*,.*, */{
|
||||
s///
|
||||
s/[][]//g
|
||||
s/)$//
|
||||
p
|
||||
q
|
||||
}
|
||||
s/AC_INIT(\[*//
|
||||
s/]*,.*//
|
||||
s/^GNU //
|
||||
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
s/[^A-Za-z0-9_]/-/g
|
||||
p
|
||||
}
|
||||
'
|
||||
package=`sed -n "$extract_package_name" configure.ac` || exit
|
||||
gnulib_name=lib$package
|
||||
|
||||
build_aux=build-aux
|
||||
source_base=lib
|
||||
m4_base=m4
|
||||
doc_base=doc
|
||||
tests_base=tests
|
||||
|
||||
# Extra files from gnulib, which override files from other sources.
|
||||
gnulib_extra_files="
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
doc/INSTALL
|
||||
"
|
||||
|
||||
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
||||
gnulib_tool_option_extras=
|
||||
|
||||
# Other locale categories that need message catalogs.
|
||||
EXTRA_LOCALE_CATEGORIES=
|
||||
|
||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||
XGETTEXT_OPTIONS='\\\
|
||||
--flag=_:1:pass-c-format\\\
|
||||
--flag=N_:1:pass-c-format\\\
|
||||
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
||||
'
|
||||
|
||||
# Package bug report address and copyright holder for gettext files
|
||||
COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
|
||||
MSGID_BUGS_ADDRESS=bug-$package@gnu.org
|
||||
|
||||
# Files we don't want to import.
|
||||
excluded_files=
|
||||
|
||||
# File that should exist in the top directory of a checked out hierarchy,
|
||||
# but not in a distribution tarball.
|
||||
checkout_only_file=README-hacking
|
||||
|
||||
# Whether to use copies instead of symlinks.
|
||||
copy=false
|
||||
|
||||
# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want
|
||||
# those files to be generated in directories like lib/, m4/, and po/.
|
||||
# Or set it to 'auto' to make this script select which to use based
|
||||
# on which version control system (if any) is used in the source directory.
|
||||
vc_ignore=auto
|
||||
|
||||
# find_tool ENVVAR NAMES...
|
||||
# -------------------------
|
||||
# Search for a required program. Use the value of ENVVAR, if set,
|
||||
# otherwise find the first of the NAMES that can be run (i.e.,
|
||||
# supports --version). If found, set ENVVAR to the program name,
|
||||
# die otherwise.
|
||||
find_tool ()
|
||||
{
|
||||
find_tool_envvar=$1
|
||||
shift
|
||||
find_tool_names=$@
|
||||
eval "find_tool_res=\$$find_tool_envvar"
|
||||
if test x"$find_tool_res" = x; then
|
||||
for i
|
||||
do
|
||||
if ($i --version </dev/null) >/dev/null 2>&1; then
|
||||
find_tool_res=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
find_tool_error_prefix="\$$find_tool_envvar: "
|
||||
fi
|
||||
if test x"$find_tool_res" = x; then
|
||||
echo >&2 "$0: one of these is required: $find_tool_names"
|
||||
exit 1
|
||||
fi
|
||||
($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
|
||||
echo >&2 "$0: ${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||
exit 1
|
||||
}
|
||||
eval "$find_tool_envvar=\$find_tool_res"
|
||||
eval "export $find_tool_envvar"
|
||||
}
|
||||
|
||||
# Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6.
|
||||
find_tool SHA1SUM sha1sum gsha1sum shasum
|
||||
|
||||
# Override the default configuration, if necessary.
|
||||
# Make sure that bootstrap.conf is sourced from the current directory
|
||||
# if we were invoked as "sh bootstrap".
|
||||
case "$0" in
|
||||
*/*) test -r "$0.conf" && . "$0.conf" ;;
|
||||
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||
esac
|
||||
|
||||
|
||||
if test "$vc_ignore" = auto; then
|
||||
vc_ignore=
|
||||
test -d .git && vc_ignore=.gitignore
|
||||
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
||||
fi
|
||||
|
||||
# Translate configuration into internal form.
|
||||
|
||||
# Parse options.
|
||||
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
@ -27,36 +227,235 @@ do
|
||||
usage
|
||||
exit;;
|
||||
--gnulib-srcdir=*)
|
||||
GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
|
||||
GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
|
||||
--skip-po)
|
||||
SKIP_PO=t;;
|
||||
--force)
|
||||
checkout_only_file=;;
|
||||
--copy)
|
||||
copy=true;;
|
||||
*)
|
||||
echo >&2 "$0: $option: unknown option"
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If $STR is not already on a line by itself in $FILE, insert it,
|
||||
# sorting the new contents of the file and replacing $FILE with the result.
|
||||
insert_sorted_if_absent() {
|
||||
file=$1
|
||||
str=$2
|
||||
test -f $file || touch $file
|
||||
echo "$str" | sort -u - $file | cmp - $file > /dev/null \
|
||||
|| echo "$str" | sort -u - $file -o $file \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
|
||||
found_aux_dir=no
|
||||
grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
|
||||
>/dev/null && found_aux_dir=yes
|
||||
grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
|
||||
>/dev/null && found_aux_dir=yes
|
||||
if test $found_aux_dir = no; then
|
||||
echo "$0: expected line not found in configure.ac. Add the following:" >&2
|
||||
echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If $build_aux doesn't exist, create it now, otherwise some bits
|
||||
# below will malfunction. If creating it, also mark it as ignored.
|
||||
if test ! -d $build_aux; then
|
||||
mkdir $build_aux
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
insert_sorted_if_absent $dot_ig $build_aux
|
||||
done
|
||||
fi
|
||||
|
||||
# Note this deviates from the version comparison in automake
|
||||
# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
|
||||
# but this should suffice as we won't be specifying old
|
||||
# version formats or redundant trailing .0 in bootstrap.conf.
|
||||
# If we did want full compatibility then we should probably
|
||||
# use m4_version_compare from autoconf.
|
||||
sort_ver() { # sort -V is not generally available
|
||||
ver1="$1"
|
||||
ver2="$2"
|
||||
|
||||
# split on '.' and compare each component
|
||||
i=1
|
||||
while : ; do
|
||||
p1=$(echo "$ver1" | cut -d. -f$i)
|
||||
p2=$(echo "$ver2" | cut -d. -f$i)
|
||||
if [ ! "$p1" ]; then
|
||||
echo "$1 $2"
|
||||
break
|
||||
elif [ ! "$p2" ]; then
|
||||
echo "$2 $1"
|
||||
break
|
||||
elif [ ! "$p1" = "$p2" ]; then
|
||||
if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$2 $1"
|
||||
elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$1 $2"
|
||||
else # numeric, then lexicographic comparison
|
||||
lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
|
||||
if [ "$lp" = "$p2" ]; then
|
||||
echo "$1 $2"
|
||||
else
|
||||
echo "$2 $1"
|
||||
fi
|
||||
fi
|
||||
break
|
||||
fi
|
||||
i=$(($i+1))
|
||||
done
|
||||
}
|
||||
|
||||
get_version() {
|
||||
app=$1
|
||||
|
||||
$app --version >/dev/null 2>&1 || return 1
|
||||
|
||||
$app --version 2>&1 |
|
||||
sed -n '# extract version within line
|
||||
s/.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||
t done
|
||||
|
||||
# extract version at start of line
|
||||
s/^\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||
t done
|
||||
|
||||
d
|
||||
|
||||
:done
|
||||
#the following essentially does s/5.005/5.5/
|
||||
s/\.0*\([1-9]\)/.\1/g
|
||||
p
|
||||
q'
|
||||
}
|
||||
|
||||
check_versions() {
|
||||
ret=0
|
||||
|
||||
while read app req_ver; do
|
||||
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||
appvar=`echo $app | tr '[a-z]' '[A-Z]'`
|
||||
test "$appvar" = TAR && appvar=AMTAR
|
||||
eval "app=\${$appvar-$app}"
|
||||
inst_ver=$(get_version $app)
|
||||
if [ ! "$inst_ver" ]; then
|
||||
echo "Error: '$app' not found" >&2
|
||||
ret=1
|
||||
elif [ ! "$req_ver" = "-" ]; then
|
||||
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||
echo "Error: '$app' version == $inst_ver is too old" >&2
|
||||
echo " '$app' version >= $req_ver is required" >&2
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
print_versions() {
|
||||
echo "Program Min_version"
|
||||
echo "----------------------"
|
||||
printf "$buildreq"
|
||||
echo "----------------------"
|
||||
# can't depend on column -t
|
||||
}
|
||||
|
||||
if ! printf "$buildreq" | check_versions; then
|
||||
test -f README-prereq &&
|
||||
echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2
|
||||
echo
|
||||
print_versions
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||
|
||||
# See if we can use gnulib's git-merge-changelog merge driver.
|
||||
if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
||||
if git config merge.merge-changelog.driver >/dev/null ; then
|
||||
:
|
||||
elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then
|
||||
echo "initializing git-merge-changelog driver"
|
||||
git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
|
||||
git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
|
||||
else
|
||||
echo "consider installing git-merge-changelog from gnulib"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
cleanup_gnulib() {
|
||||
status=$?
|
||||
rm -fr "$gnulib_path"
|
||||
exit $status
|
||||
}
|
||||
|
||||
git_modules_config () {
|
||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||
}
|
||||
|
||||
gnulib_path=`git_modules_config submodule.gnulib.path`
|
||||
|
||||
# Get gnulib files.
|
||||
|
||||
case ${GNULIB_SRCDIR--} in
|
||||
-)
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule init || exit $?
|
||||
git submodule update || exit $?
|
||||
GNULIB_SRCDIR=.gnulib
|
||||
if git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule init || exit $?
|
||||
git submodule update || exit $?
|
||||
|
||||
elif [ ! -d "$gnulib_path" ]; then
|
||||
echo "$0: getting gnulib files..."
|
||||
|
||||
trap cleanup_gnulib 1 2 13 15
|
||||
|
||||
git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
|
||||
git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
|
||||
cleanup_gnulib
|
||||
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
GNULIB_SRCDIR=$gnulib_path
|
||||
;;
|
||||
*)
|
||||
# Redirect the gnulib submodule to the directory on the command line
|
||||
# if possible.
|
||||
# Use GNULIB_SRCDIR as a reference.
|
||||
if test -d "$GNULIB_SRCDIR"/.git && \
|
||||
git config --file .gitmodules submodule.gnulib.url >/dev/null; then
|
||||
git submodule init
|
||||
GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
|
||||
git config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
|
||||
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule update || exit $?
|
||||
GNULIB_SRCDIR=.gnulib
|
||||
else
|
||||
echo >&2 "$0: invalid gnulib srcdir: $GNULIB_SRCDIR"
|
||||
exit 1
|
||||
if git submodule --help|grep reference > /dev/null; then
|
||||
# Prefer the one-liner available in git 1.6.4 or newer.
|
||||
git submodule update --init --reference "$GNULIB_SRCDIR" \
|
||||
"$gnulib_path" || exit $?
|
||||
else
|
||||
# This fallback allows at least git 1.5.5.
|
||||
if test -f "$gnulib_path"/gnulib-tool; then
|
||||
# Since file already exists, assume submodule init already complete.
|
||||
git submodule update || exit $?
|
||||
else
|
||||
# Older git can't clone into an empty directory.
|
||||
rmdir "$gnulib_path" 2>/dev/null
|
||||
git clone --reference "$GNULIB_SRCDIR" \
|
||||
"$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
|
||||
&& git submodule init && git submodule update \
|
||||
|| exit $?
|
||||
fi
|
||||
fi
|
||||
GNULIB_SRCDIR=$gnulib_path
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@ -64,56 +463,391 @@ esac
|
||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
<$gnulib_tool || exit
|
||||
|
||||
modules='
|
||||
areadlink
|
||||
base64
|
||||
c-ctype
|
||||
canonicalize-lgpl
|
||||
close
|
||||
connect
|
||||
getaddrinfo
|
||||
gethostname
|
||||
getpass
|
||||
gettext
|
||||
gitlog-to-changelog
|
||||
gnumakefile
|
||||
ignore-value
|
||||
inet_pton
|
||||
ioctl
|
||||
maintainer-makefile
|
||||
mkstemp
|
||||
mktempd
|
||||
perror
|
||||
physmem
|
||||
poll
|
||||
posix-shell
|
||||
recv
|
||||
random_r
|
||||
send
|
||||
setsockopt
|
||||
socket
|
||||
stpcpy
|
||||
strchrnul
|
||||
strndup
|
||||
strerror
|
||||
strsep
|
||||
sys_stat
|
||||
time_r
|
||||
useless-if-before-free
|
||||
vasprintf
|
||||
verify
|
||||
vc-list-files
|
||||
'
|
||||
# Get translations.
|
||||
|
||||
# Tell gnulib to:
|
||||
# require LGPLv2+
|
||||
# put *.m4 files in new gnulib/m4/ dir
|
||||
# put *.[ch] files in new gnulib/lib/ dir.
|
||||
download_po_files() {
|
||||
subdir=$1
|
||||
domain=$2
|
||||
echo "$0: getting translations into $subdir for $domain..."
|
||||
cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
|
||||
eval "$cmd"
|
||||
}
|
||||
|
||||
$gnulib_tool \
|
||||
--lgpl=2 \
|
||||
--with-tests \
|
||||
--m4-base=gnulib/m4 \
|
||||
--source-base=gnulib/lib \
|
||||
--tests-base=gnulib/tests \
|
||||
--import $modules
|
||||
# Download .po files to $po_dir/.reference and copy only the new
|
||||
# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
|
||||
update_po_files() {
|
||||
# Directory containing primary .po files.
|
||||
# Overwrite them only when we're sure a .po file is new.
|
||||
po_dir=$1
|
||||
domain=$2
|
||||
|
||||
# Download *.po files into this dir.
|
||||
# Usually contains *.s1 checksum files.
|
||||
ref_po_dir="$po_dir/.reference"
|
||||
|
||||
test -d $ref_po_dir || mkdir $ref_po_dir || return
|
||||
download_po_files $ref_po_dir $domain \
|
||||
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
||||
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
|
||||
|
||||
langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
|
||||
test "$langs" = '*' && langs=x
|
||||
for po in $langs; do
|
||||
case $po in x) continue;; esac
|
||||
new_po="$ref_po_dir/$po.po"
|
||||
cksum_file="$ref_po_dir/$po.s1"
|
||||
if ! test -f "$cksum_file" ||
|
||||
! test -f "$po_dir/$po.po" ||
|
||||
! $SHA1SUM -c --status "$cksum_file" \
|
||||
< "$new_po" > /dev/null; then
|
||||
echo "updated $po_dir/$po.po..."
|
||||
cp "$new_po" "$po_dir/$po.po" \
|
||||
&& $SHA1SUM < "$new_po" > "$cksum_file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
case $SKIP_PO in
|
||||
'')
|
||||
if test -d po; then
|
||||
update_po_files po $package || exit
|
||||
fi
|
||||
|
||||
if test -d runtime-po; then
|
||||
update_po_files runtime-po $package-runtime || exit
|
||||
fi;;
|
||||
esac
|
||||
|
||||
symlink_to_dir()
|
||||
{
|
||||
src=$1/$2
|
||||
dst=${3-$2}
|
||||
|
||||
test -f "$src" && {
|
||||
|
||||
# If the destination directory doesn't exist, create it.
|
||||
# This is required at least for "lib/uniwidth/cjk.h".
|
||||
dst_dir=`dirname "$dst"`
|
||||
if ! test -d "$dst_dir"; then
|
||||
mkdir -p "$dst_dir"
|
||||
|
||||
# If we've just created a directory like lib/uniwidth,
|
||||
# tell version control system(s) it's ignorable.
|
||||
# FIXME: for now, this does only one level
|
||||
parent=`dirname "$dst_dir"`
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'`
|
||||
done
|
||||
fi
|
||||
|
||||
if $copy; then
|
||||
{
|
||||
test ! -h "$dst" || {
|
||||
echo "$0: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
} &&
|
||||
test -f "$dst" &&
|
||||
cmp -s "$src" "$dst" || {
|
||||
echo "$0: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
test -h "$dst" &&
|
||||
src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
|
||||
dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
|
||||
test "$src_i" = "$dst_i" || {
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$0: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
echo "$0: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
}
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
cp_mark_as_generated()
|
||||
{
|
||||
cp_src=$1
|
||||
cp_dst=$2
|
||||
|
||||
if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
|
||||
symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst"
|
||||
elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then
|
||||
symlink_to_dir $local_gl_dir "$cp_dst"
|
||||
else
|
||||
case $cp_dst in
|
||||
*.[ch]) c1='/* '; c2=' */';;
|
||||
*.texi) c1='@c '; c2= ;;
|
||||
*.m4|*/Make*|Make*) c1='# ' ; c2= ;;
|
||||
*) c1= ; c2= ;;
|
||||
esac
|
||||
|
||||
# If the destination directory doesn't exist, create it.
|
||||
# This is required at least for "lib/uniwidth/cjk.h".
|
||||
dst_dir=`dirname "$cp_dst"`
|
||||
test -d "$dst_dir" || mkdir -p "$dst_dir"
|
||||
|
||||
if test -z "$c1"; then
|
||||
cmp -s "$cp_src" "$cp_dst" || {
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
echo "$0: cp -f $cp_src $cp_dst" &&
|
||||
rm -f "$cp_dst" &&
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
}
|
||||
else
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
(
|
||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src"
|
||||
) > $cp_dst-t &&
|
||||
if cmp -s "$cp_dst-t" "$cp_dst"; then
|
||||
rm -f "$cp_dst-t"
|
||||
else
|
||||
echo "$0: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
version_controlled_file() {
|
||||
dir=$1
|
||||
file=$2
|
||||
found=no
|
||||
if test -d CVS; then
|
||||
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
|
||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||
elif test -d .git; then
|
||||
git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
elif test -d .svn; then
|
||||
svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
else
|
||||
echo "$0: no version control for $dir/$file?" >&2
|
||||
fi
|
||||
test $found = yes
|
||||
}
|
||||
|
||||
slurp() {
|
||||
for dir in . `(cd $1 && find * -type d -print)`; do
|
||||
copied=
|
||||
sep=
|
||||
for file in `ls -a $1/$dir`; do
|
||||
case $file in
|
||||
.|..) continue;;
|
||||
.*) continue;; # FIXME: should all file names starting with "." be ignored?
|
||||
esac
|
||||
test -d $1/$dir/$file && continue
|
||||
for excluded_file in $excluded_files; do
|
||||
test "$dir/$file" = "$excluded_file" && continue 2
|
||||
done
|
||||
if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
|
||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || {
|
||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||
}
|
||||
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$0: $dir/$file overrides $1/$dir/$file"
|
||||
else
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
if test $file = gettext.m4; then
|
||||
echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [])
|
||||
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
|
||||
$a\
|
||||
AC_DEFUN([gl_LOCK_EARLY], [])
|
||||
' $1/$dir/$file >$dir/$file
|
||||
else
|
||||
cp_mark_as_generated $1/$dir/$file $dir/$file
|
||||
fi
|
||||
fi || exit
|
||||
done
|
||||
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$dir/$dot_ig
|
||||
if test -n "$copied"; then
|
||||
insert_sorted_if_absent $ig "$copied"
|
||||
# If an ignored file name ends with .in.h, then also add
|
||||
# the name with just ".h". Many gnulib headers are generated,
|
||||
# e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
|
||||
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||
f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
||||
insert_sorted_if_absent $ig "$f"
|
||||
|
||||
# For files like sys_stat.in.h and sys_time.in.h, record as
|
||||
# ignorable the directory we might eventually create: sys/.
|
||||
f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
|
||||
insert_sorted_if_absent $ig "$f"
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Create boot temporary directories to import from gnulib and gettext.
|
||||
rm -fr $bt $bt2 &&
|
||||
mkdir $bt $bt2 || exit
|
||||
|
||||
# Import from gnulib.
|
||||
|
||||
gnulib_tool_options="\
|
||||
--import\
|
||||
--no-changelog\
|
||||
--aux-dir $bt/$build_aux\
|
||||
--doc-base $bt/$doc_base\
|
||||
--lib $gnulib_name\
|
||||
--m4-base $bt/$m4_base/\
|
||||
--source-base $bt/$source_base/\
|
||||
--tests-base $bt/$tests_base\
|
||||
--local-dir $local_gl_dir\
|
||||
$gnulib_tool_option_extras\
|
||||
"
|
||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
||||
slurp $bt || exit
|
||||
|
||||
for file in $gnulib_files; do
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file || exit
|
||||
done
|
||||
|
||||
|
||||
# Import from gettext.
|
||||
with_gettext=yes
|
||||
grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
||||
with_gettext=no
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..."
|
||||
cp configure.ac $bt2 &&
|
||||
(cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) &&
|
||||
slurp $bt2 $bt || exit
|
||||
fi
|
||||
rm -fr $bt $bt2 || exit
|
||||
|
||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
||||
# portability constraints of this script, that may seem a very demanding
|
||||
# requirement, but it should be ok. Ignore any failure, which is fine,
|
||||
# since this is only a convenience to help developers avoid the relatively
|
||||
# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
|
||||
# between successive runs of this script.
|
||||
find "$m4_base" "$source_base" \
|
||||
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||
-type l -xtype l -delete > /dev/null 2>&1
|
||||
|
||||
# Reconfigure, getting other files.
|
||||
|
||||
# Skip autoheader if it's not needed.
|
||||
grep -E '^[ ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
|
||||
AUTOHEADER=true
|
||||
|
||||
for command in \
|
||||
libtool \
|
||||
"${ACLOCAL-aclocal} --force -I m4" \
|
||||
"${AUTOCONF-autoconf} --force" \
|
||||
"${AUTOHEADER-autoheader} --force" \
|
||||
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||
do
|
||||
if test "$command" = libtool; then
|
||||
use_libtool=0
|
||||
# We'd like to use grep -E, to see if any of LT_INIT,
|
||||
# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
|
||||
# but that's not portable enough (e.g., for Solaris).
|
||||
grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
|
||||
&& use_libtool=1
|
||||
grep '^[ ]*LT_INIT' configure.ac >/dev/null \
|
||||
&& use_libtool=1
|
||||
test $use_libtool = 0 \
|
||||
&& continue
|
||||
command="${LIBTOOLIZE-libtoolize} -c -f"
|
||||
fi
|
||||
echo "$0: $command ..."
|
||||
$command || exit
|
||||
done
|
||||
|
||||
|
||||
# Get some extra files from gnulib, overriding existing files.
|
||||
for file in $gnulib_extra_files; do
|
||||
case $file in
|
||||
*/INSTALL) dst=INSTALL;;
|
||||
build-aux/*) dst=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;;
|
||||
*) dst=$file;;
|
||||
esac
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit
|
||||
done
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
# Create gettext configuration.
|
||||
echo "$0: Creating po/Makevars from po/Makevars.template ..."
|
||||
rm -f po/Makevars
|
||||
sed '
|
||||
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
||||
/^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
|
||||
/^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'|
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >po/Makevars
|
||||
|
||||
if test -d runtime-po; then
|
||||
# Similarly for runtime-po/Makevars, but not quite the same.
|
||||
rm -f runtime-po/Makevars
|
||||
sed '
|
||||
/^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/
|
||||
/^subdir *=.*/s/=.*/= runtime-po/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' <po/Makevars.template >runtime-po/Makevars
|
||||
|
||||
# Copy identical files from po to runtime-po.
|
||||
(cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
|
||||
fi
|
||||
fi
|
||||
|
||||
bootstrap_epilogue
|
||||
|
||||
echo "$0: done. Now you can run './configure'."
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
153
bootstrap.conf
Normal file
153
bootstrap.conf
Normal file
@ -0,0 +1,153 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2010 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules='
|
||||
areadlink
|
||||
base64
|
||||
c-ctype
|
||||
canonicalize-lgpl
|
||||
close
|
||||
connect
|
||||
count-one-bits
|
||||
dirname-lgpl
|
||||
getaddrinfo
|
||||
gethostname
|
||||
getpass
|
||||
gettext
|
||||
gitlog-to-changelog
|
||||
gnumakefile
|
||||
ignore-value
|
||||
inet_pton
|
||||
ioctl
|
||||
maintainer-makefile
|
||||
mkstemp
|
||||
mktempd
|
||||
perror
|
||||
physmem
|
||||
poll
|
||||
posix-shell
|
||||
recv
|
||||
random_r
|
||||
send
|
||||
setsockopt
|
||||
socket
|
||||
stpcpy
|
||||
strchrnul
|
||||
strndup
|
||||
strerror
|
||||
strptime
|
||||
strsep
|
||||
sys_stat
|
||||
time_r
|
||||
timegm
|
||||
useless-if-before-free
|
||||
vasprintf
|
||||
verify
|
||||
vc-list-files
|
||||
'
|
||||
|
||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
||||
--flag=virAsprintf:2:c-format\\\
|
||||
--from-code=UTF-8\\\
|
||||
'
|
||||
|
||||
# This is not a GNU package, so the default bug address is invalid,
|
||||
# and the translation project is not in use.
|
||||
MSGID_BUGS_ADDRESS=libvir-list@redhat.com
|
||||
COPYRIGHT_HOLDER='Red Hat, Inc.'
|
||||
SKIP_PO=true
|
||||
|
||||
# Enable copy-mode for MSYS/MinGW. MSYS' ln doesn't work well in the way
|
||||
# bootstrap uses it with relative paths.
|
||||
if test -n "$MSYSTEM"; then
|
||||
copy=true
|
||||
fi
|
||||
|
||||
# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
|
||||
# appears in configure.ac, exclude some unnecessary files.
|
||||
# Without grep's -E option (not portable enough, pre-configure),
|
||||
# the following test is ugly. Also, this depends on the existence
|
||||
# of configure.ac, not the obsolescent-named configure.in. But if
|
||||
# you're using this infrastructure, you should care about such things.
|
||||
|
||||
gettext_external=0
|
||||
grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
|
||||
gettext_external=1
|
||||
grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
|
||||
gettext_external=1
|
||||
|
||||
if test $gettext_external = 1; then
|
||||
# Gettext supplies these files, but we don't need them since
|
||||
# we don't have an intl subdirectory.
|
||||
excluded_files='
|
||||
m4/glibc2.m4
|
||||
m4/intdiv0.m4
|
||||
m4/lcmessage.m4
|
||||
m4/uintmax_t.m4
|
||||
m4/ulonglong.m4
|
||||
m4/visibility.m4
|
||||
'
|
||||
fi
|
||||
|
||||
# Tell gnulib to:
|
||||
# require LGPLv2+
|
||||
# put *.m4 files in new gnulib/m4/ dir
|
||||
# put *.[ch] files in new gnulib/lib/ dir.
|
||||
# import gnulib tests in new gnulib/tests/ dir.
|
||||
gnulib_name=libgnu
|
||||
m4_base=gnulib/m4
|
||||
source_base=gnulib/lib
|
||||
tests_base=gnulib/tests
|
||||
gnulib_mk=Makefile.am
|
||||
gnulib_tool_option_extras="\
|
||||
--lgpl=2\
|
||||
--with-tests\
|
||||
"
|
||||
|
||||
# Convince bootstrap to use multiple m4 directories.
|
||||
: ${ACLOCAL=aclocal}
|
||||
ACLOCAL="$ACLOCAL -I gnulib/m4"
|
||||
export ACLOCAL
|
||||
|
||||
# Build prerequisites
|
||||
buildreq="\
|
||||
autoconf 2.59
|
||||
automake 1.9.6
|
||||
autopoint -
|
||||
gettext -
|
||||
git 1.5.5
|
||||
gzip -
|
||||
libtool -
|
||||
perl 5.5
|
||||
tar -
|
||||
"
|
||||
|
||||
# Automake requires that ChangeLog exist.
|
||||
touch ChangeLog || exit 1
|
||||
|
||||
|
||||
bootstrap_epilogue()
|
||||
{
|
||||
# Change paths in gnulib/tests/Makefile.am from "../../.." to "../..".
|
||||
m=gnulib/tests/Makefile.am
|
||||
sed 's,\.\./\.\./\.\.,../..,g' $m > $m-t
|
||||
mv -f $m-t $m
|
||||
}
|
13
build-aux/.gitignore
vendored
13
build-aux/.gitignore
vendored
@ -1,7 +1,16 @@
|
||||
*
|
||||
/link-warning.h
|
||||
/mktempd
|
||||
/arg-nonnull.h
|
||||
/gitlog-to-changelog
|
||||
/link-warning.h
|
||||
/mktempd
|
||||
/useless-if-before-free
|
||||
/vc-list-files
|
||||
arg-nonnull.h
|
||||
c++defs.h
|
||||
config.rpath
|
||||
gitlog-to-changelog
|
||||
mkinstalldirs
|
||||
mktempd
|
||||
useless-if-before-free
|
||||
vc-list-files
|
||||
warn-on-use.h
|
||||
|
171
cfg.mk
171
cfg.mk
@ -42,6 +42,7 @@ local-checks-to-skip = \
|
||||
sc_obsolete_symbols \
|
||||
sc_prohibit_S_IS_definition \
|
||||
sc_prohibit_atoi_atof \
|
||||
sc_prohibit_hash_without_use \
|
||||
sc_prohibit_jm_in_m4 \
|
||||
sc_prohibit_quote_without_use \
|
||||
sc_prohibit_quotearg_without_use \
|
||||
@ -50,6 +51,7 @@ local-checks-to-skip = \
|
||||
sc_space_tab \
|
||||
sc_sun_os_names \
|
||||
sc_system_h_headers \
|
||||
sc_texinfo_acronym \
|
||||
sc_tight_scope \
|
||||
sc_two_space_separator_in_usage \
|
||||
sc_error_message_uppercase \
|
||||
@ -63,99 +65,102 @@ useless_free_options = \
|
||||
--name=VIR_FREE \
|
||||
--name=xmlFree \
|
||||
--name=xmlXPathFreeContext \
|
||||
--name=virDomainDefFree \
|
||||
--name=xmlXPathFreeObject
|
||||
|
||||
# Avoid uses of write(2). Either switch to streams (fwrite), or use
|
||||
# the safewrite wrapper.
|
||||
sc_avoid_write:
|
||||
@if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
||||
grep '\<write *(' $$($(VC_LIST_EXCEPT) | grep '\.c$$') && \
|
||||
{ echo "$(ME): the above files use write;" \
|
||||
" consider using the safewrite wrapper instead" \
|
||||
1>&2; exit 1; } || :; \
|
||||
else :; \
|
||||
fi
|
||||
@prohibit='\<write *\(' \
|
||||
in_vc_files='\.c$$' \
|
||||
halt='consider using safewrite instead of write' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use STREQ rather than comparing strcmp == 0, or != 0.
|
||||
# Similarly, use STREQLEN or STRPREFIX rather than strncmp.
|
||||
sc_prohibit_strcmp_and_strncmp:
|
||||
@re='strn?cmp *\(' \
|
||||
msg='use STREQ() in place of the above uses of str[n]cmp' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='strn?cmp *\(' \
|
||||
halt='use STREQ() in place of the above uses of str[n]cmp' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use virAsprintf rather than a'sprintf since *strp is undefined on error.
|
||||
sc_prohibit_asprintf:
|
||||
@re='\<[a]sprintf\>' \
|
||||
msg='use virAsprintf, not a'sprintf \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='\<[a]sprintf\>' \
|
||||
halt='use virAsprintf, not a'sprintf \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_strncpy:
|
||||
@re='strncpy *\(' \
|
||||
msg='use virStrncpy, not strncpy' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='strncpy *\(' \
|
||||
halt='use virStrncpy, not strncpy' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_readlink:
|
||||
@re='readlink *\(' \
|
||||
msg='use virFileResolveLink, not readlink' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='readlink *\(' \
|
||||
halt='use virFileResolveLink, not readlink' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_gethostname:
|
||||
@re='gethostname *\(' \
|
||||
msg='use virGetHostname, not gethostname' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='gethostname *\(' \
|
||||
halt='use virGetHostname, not gethostname' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_gettext_noop:
|
||||
@prohibit='gettext_noop *\(' \
|
||||
halt='use N_, not gettext_noop' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_VIR_ERR_NO_MEMORY:
|
||||
@re='\<V''IR_ERR_NO_MEMORY\>' \
|
||||
msg='use virReportOOMError, not V'IR_ERR_NO_MEMORY \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='\<V''IR_ERR_NO_MEMORY\>' \
|
||||
halt='use virReportOOMError, not V'IR_ERR_NO_MEMORY \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use a subshell for each function, to give the optimal warning message.
|
||||
include $(srcdir)/Makefile.nonreentrant
|
||||
sc_prohibit_nonreentrant:
|
||||
@fail=0 ; \
|
||||
for i in $(NON_REENTRANT) ; \
|
||||
do \
|
||||
grep --before 2 --after 1 -nE "\<$$i\>[:space:]*\(" $$($(VC_LIST_EXCEPT)) && \
|
||||
fail=1 && echo "$(ME): use $${i}_r, not $${i}" || : ; \
|
||||
(prohibit="\\<$$i *\\(" \
|
||||
halt="use $${i}_r, not $$i" \
|
||||
$(_sc_search_regexp) \
|
||||
) || fail=1; \
|
||||
done ; \
|
||||
exit $$fail
|
||||
|
||||
# Prohibit the inclusion of <ctype.h>.
|
||||
sc_prohibit_ctype_h:
|
||||
@grep -E '^# *include *<ctype\.h>' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo "$(ME): don't use ctype.h; instead, use c-ctype.h" \
|
||||
1>&2; exit 1; } || :
|
||||
@prohibit='^# *include *<ctype\.h>' \
|
||||
halt="don't use ctype.h; instead, use c-ctype.h" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Ensure that no C source file uses TABs for indentation.
|
||||
# Also match *.h.in files, to get libvirt.h.in.
|
||||
# Exclude files in gnulib, since they're imported.
|
||||
# Ensure that no C source file or rng schema uses TABs for
|
||||
# indentation. Also match *.h.in files, to get libvirt.h.in. Exclude
|
||||
# files in gnulib, since they're imported.
|
||||
sc_TAB_in_indentation:
|
||||
@grep -lE '^ * ' /dev/null \
|
||||
$$($(VC_LIST_EXCEPT) \
|
||||
| grep -E '\.[ch](\.in)?$$' \
|
||||
| grep -v '^gnulib/') && \
|
||||
{ echo '$(ME): found TAB(s) used for indentation in C sources;'\
|
||||
'use spaces' 1>&2; exit 1; } || :
|
||||
@prohibit='^ * ' \
|
||||
in_vc_files='\.(rng|[ch](\.in)?)$$' \
|
||||
halt='use spaces, not TAB, for indentation in C sources and RNG schemas' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
|
||||
|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
|
||||
|
||||
sc_avoid_ctype_macros:
|
||||
@grep -E '\b($(ctype_re)) *\(' /dev/null \
|
||||
$$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo "$(ME): don't use ctype macros (use c-ctype.h)" \
|
||||
1>&2; exit 1; } || :
|
||||
@prohibit='\b($(ctype_re)) *\(' \
|
||||
halt="don't use ctype macros (use c-ctype.h)" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_virBufferAdd_with_string_literal:
|
||||
@re='\<virBufferAdd *\([^,]+, *"[^"]' \
|
||||
msg='use virBufferAddLit, not virBufferAdd, with a string literal' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='\<virBufferAdd *\([^,]+, *"[^"]' \
|
||||
halt='use virBufferAddLit, not virBufferAdd, with a string literal' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Not only do they fail to deal well with ipv6, but the gethostby*
|
||||
# functions are also not thread-safe.
|
||||
sc_prohibit_gethostby:
|
||||
@re='\<gethostby(addr|name2?) *\(' \
|
||||
msg='use getaddrinfo, not gethostby*' \
|
||||
$(_prohibit_regexp)
|
||||
@prohibit='\<gethostby(addr|name2?) *\(' \
|
||||
halt='use getaddrinfo, not gethostby*' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Many of the function names below came from this filter:
|
||||
# git grep -B2 '\<_('|grep -E '\.c- *[[:alpha:]_][[:alnum:]_]* ?\(.*[,;]$' \
|
||||
@ -163,36 +168,27 @@ sc_prohibit_gethostby:
|
||||
# |grep -vE '^(qsort|if|close|assert|fputc|free|N_|vir.*GetName|.*Unlock|virNodeListDevices|virHashRemoveEntry|freeaddrinfo|.*[fF]ree|xdrmem_create|xmlXPathFreeObject|virUUIDFormat|openvzSetProgramSentinal|polkit_action_unref)$'
|
||||
|
||||
msg_gen_function =
|
||||
msg_gen_function += DEBUG0
|
||||
msg_gen_function += DISABLE_fprintf
|
||||
msg_gen_function += ERROR
|
||||
msg_gen_function += ERROR0
|
||||
msg_gen_function += REMOTE_DEBUG
|
||||
msg_gen_function += ReportError
|
||||
msg_gen_function += VIR_FREE
|
||||
msg_gen_function += VIR_INFO
|
||||
msg_gen_function += VIR_USE_CPU
|
||||
msg_gen_function += errorf
|
||||
msg_gen_function += ESX_ERROR
|
||||
msg_gen_function += ESX_VI_ERROR
|
||||
msg_gen_function += macvtapError
|
||||
msg_gen_function += remoteError
|
||||
msg_gen_function += lxcError
|
||||
msg_gen_function += networkLog
|
||||
msg_gen_function += networkReportError
|
||||
msg_gen_function += oneError
|
||||
msg_gen_function += openvzError
|
||||
msg_gen_function += openvzLog
|
||||
msg_gen_function += qemudDispatchClientFailure
|
||||
msg_gen_function += qemudLog
|
||||
msg_gen_function += qemudReportError
|
||||
msg_gen_function += regerror
|
||||
msg_gen_function += remoteDispatchFormatError
|
||||
msg_gen_function += umlLog
|
||||
msg_gen_function += umlReportError
|
||||
msg_gen_function += vboxError
|
||||
msg_gen_function += virConfError
|
||||
msg_gen_function += virDomainReportError
|
||||
msg_gen_function += virSecurityReportError
|
||||
msg_gen_function += virHashError
|
||||
msg_gen_function += virLibConnError
|
||||
msg_gen_function += virLibDomainError
|
||||
msg_gen_function += virLog
|
||||
msg_gen_function += virNetworkReportError
|
||||
msg_gen_function += virNodeDeviceReportError
|
||||
msg_gen_function += virProxyError
|
||||
@ -200,20 +196,18 @@ msg_gen_function += virRaiseError
|
||||
msg_gen_function += virReportErrorHelper
|
||||
msg_gen_function += virReportSystemError
|
||||
msg_gen_function += virSexprError
|
||||
msg_gen_function += virStorageLog
|
||||
msg_gen_function += virStorageReportError
|
||||
msg_gen_function += virXMLError
|
||||
msg_gen_function += virXenInotifyError
|
||||
msg_gen_function += virXenStoreError
|
||||
msg_gen_function += virXendError
|
||||
msg_gen_function += vshCloseLogFile
|
||||
msg_gen_function += xenapiSessionErrorHandler
|
||||
msg_gen_function += xenUnifiedError
|
||||
msg_gen_function += xenXMError
|
||||
|
||||
# Uncomment the following and run "make syntax-check" to see diagnostics
|
||||
# that are not yet marked for translation, but that need to be rewritten
|
||||
# so that they are translatable.
|
||||
# msg_gen_function += error
|
||||
# msg_gen_function += fprintf
|
||||
# msg_gen_function += testError
|
||||
# msg_gen_function += virXenError
|
||||
@ -230,7 +224,7 @@ func_re := ($(func_or))
|
||||
# "%s", _("no storage vol w..."
|
||||
sc_libvirt_unmarked_diagnostics:
|
||||
@grep -nE \
|
||||
'\<$(func_re) \([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT)) \
|
||||
'\<$(func_re) *\([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -v '_''(' && \
|
||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
@ -250,6 +244,28 @@ sc_prohibit_trailing_blank_lines:
|
||||
rm -f $@-t; \
|
||||
test $$found = 0
|
||||
|
||||
# Regex for grep -E that exempts generated files from style rules.
|
||||
preprocessor_exempt = (remote_(driver|protocol)\.h)$$
|
||||
# Enforce recommended preprocessor indentation style.
|
||||
sc_preprocessor_indentation:
|
||||
@if (cppi --version >/dev/null 2>&1); then \
|
||||
$(VC_LIST_EXCEPT) | grep '\.[ch]$$' \
|
||||
| grep -vE '$(preprocessor_exempt)' | xargs cppi -a -c \
|
||||
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
||||
exit 1; }; \
|
||||
else \
|
||||
echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
|
||||
fi
|
||||
|
||||
sc_copyright_format:
|
||||
@require='Copyright .*Red 'Hat', Inc\.' \
|
||||
containing='Copyright .*Red 'Hat \
|
||||
halt='Red Hat copyright is missing Inc.' \
|
||||
$(_sc_search_regexp)
|
||||
@prohibit='Copyright [^(].*Red 'Hat \
|
||||
halt='consistently use (C) in Red Hat copyright' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# We don't use this feature of maint.mk.
|
||||
prev_version_file = /dev/null
|
||||
|
||||
@ -261,15 +277,28 @@ ifeq (0,$(MAKELEVEL))
|
||||
# submodule name. Contrast these:
|
||||
# -b653eda3ac4864de205419d9f41eec267cb89eeb .gnulib
|
||||
# b653eda3ac4864de205419d9f41eec267cb89eeb .gnulib (v0.0-2286-gb653eda)
|
||||
_submodule_hash = sed 's/.//;s/ .*//'
|
||||
# $ cat .git-module-status
|
||||
# b653eda3ac4864de205419d9f41eec267cb89eeb
|
||||
_submodule_hash = sed 's/^[ +-]//;s/ .*//'
|
||||
_update_required := $(shell \
|
||||
actual=$$(git submodule status | $(_submodule_hash)); \
|
||||
actual=$$(git submodule status | $(_submodule_hash); \
|
||||
git hash-object bootstrap.conf; \
|
||||
git diff .gnulib); \
|
||||
stamp="$$($(_submodule_hash) $(_curr_status) 2>/dev/null)"; \
|
||||
test "$$stamp" = "$$actual"; echo $$?)
|
||||
ifeq (1,$(_update_required))
|
||||
$(error gnulib update required; run ./autogen.sh first)
|
||||
_clean_requested = $(filter %clean,$(MAKECMDGOALS))
|
||||
ifeq (1,$(_update_required)$(_clean_requested))
|
||||
$(info INFO: gnulib update required; running ./autogen.sh first)
|
||||
Makefile: _autogen
|
||||
endif
|
||||
endif
|
||||
|
||||
# It is necessary to call autogen any time gnulib changes. Autogen
|
||||
# reruns configure, then we regenerate all Makefiles at once.
|
||||
.PHONY: _autogen
|
||||
_autogen:
|
||||
$(srcdir)/autogen.sh
|
||||
./config.status
|
||||
|
||||
# Exempt @...@ uses of these symbols.
|
||||
_makefile_at_at_check_exceptions = ' && !/(SCHEMA|SYSCONF)DIR/'
|
||||
|
287
configure.ac
287
configure.ac
@ -1,9 +1,10 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([libvirt], [0.7.6])
|
||||
AC_INIT([libvirt], [0.8.0])
|
||||
AC_CONFIG_SRCDIR([src/libvirt.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
dnl Make automake keep quiet about wildcards & other GNUmake-isms
|
||||
AM_INIT_AUTOMAKE([-Wno-portability])
|
||||
|
||||
@ -40,6 +41,7 @@ XMLRPC_REQUIRED=1.14.0
|
||||
HAL_REQUIRED=0.5.0
|
||||
DEVMAPPER_REQUIRED=1.0.0
|
||||
LIBCURL_REQUIRED="7.18.0"
|
||||
LIBPCAP_REQUIRED="1.0.0"
|
||||
|
||||
dnl Checks for C compiler.
|
||||
AC_PROG_CC
|
||||
@ -60,6 +62,7 @@ gl_INIT
|
||||
|
||||
AM_PROG_CC_STDC
|
||||
AC_C_CONST
|
||||
AC_TYPE_UID_T
|
||||
|
||||
dnl Make sure we have an ANSI compiler
|
||||
AM_C_PROTOTYPES
|
||||
@ -109,7 +112,7 @@ dnl Availability of various not common threadsafe functions
|
||||
AC_CHECK_FUNCS([strerror_r strtok_r getmntent_r getgrnam_r getpwuid_r])
|
||||
|
||||
dnl Availability of various common headers (non-fatal if missing).
|
||||
AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h sys/utsname.h sys/wait.h winsock2.h sched.h termios.h sys/poll.h syslog.h mntent.h])
|
||||
AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h sys/utsname.h sys/wait.h winsock2.h sched.h termios.h sys/poll.h syslog.h mntent.h net/ethernet.h])
|
||||
|
||||
dnl Where are the XDR functions?
|
||||
dnl If portablexdr is installed, prefer that.
|
||||
@ -195,10 +198,10 @@ dnl if --prefix is /usr, don't use /usr/var for localstatedir
|
||||
dnl or /usr/etc for sysconfdir
|
||||
dnl as this makes a lot of things break in testing situations
|
||||
|
||||
if test "$prefix" = "/usr" -a "$localstatedir" = '${prefix}/var' ; then
|
||||
if test "$prefix" = "/usr" && test "$localstatedir" = '${prefix}/var' ; then
|
||||
localstatedir='/var'
|
||||
fi
|
||||
if test "$prefix" = "/usr" -a "$sysconfdir" = '${prefix}/etc' ; then
|
||||
if test "$prefix" = "/usr" && test "$sysconfdir" = '${prefix}/etc' ; then
|
||||
sysconfdir='/etc'
|
||||
fi
|
||||
|
||||
@ -218,6 +221,8 @@ AC_ARG_WITH([libssh2],
|
||||
AC_HELP_STRING([--with-libssh2=@<:@PFX@:>@], [libssh2 location @<:@default=/usr/local/lib@:>@]),[],[with_libssh2=yes])
|
||||
AC_ARG_WITH([phyp],
|
||||
AC_HELP_STRING([--with-phyp], [add PHYP support @<:@default=check@:>@]),[],[with_phyp=check])
|
||||
AC_ARG_WITH([xenapi],
|
||||
AC_HELP_STRING([--with-xenapi], [add XenAPI support @<:@default=check@:>@]),[],[with_xenapi=check])
|
||||
AC_ARG_WITH([vbox],
|
||||
AC_HELP_STRING([--with-vbox], [add VirtualBox support @<:@default=yes@:>@]),[],[with_vbox=yes])
|
||||
AC_ARG_WITH([lxc],
|
||||
@ -236,7 +241,7 @@ AC_ARG_WITH([libvirtd],
|
||||
dnl
|
||||
dnl specific tests to setup DV devel environments with debug etc ...
|
||||
dnl
|
||||
if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/libvirt" ]] ; then
|
||||
if test "${LOGNAME}" = "veillard" && test "`pwd`" = "/u/veillard/libvirt" ; then
|
||||
STATIC_BINARIES="-static"
|
||||
else
|
||||
STATIC_BINARIES=
|
||||
@ -272,7 +277,7 @@ AC_MSG_CHECKING([for init script flavor])
|
||||
AC_ARG_WITH([init-script],
|
||||
[AC_HELP_STRING([--with-init-script=@<:@redhat|auto|none@:>@],
|
||||
[Style of init script to install @<:@default=auto@:>@])])
|
||||
if test "x$with_init_script" = "x" -o "x$with_init_script" = "xauto"; then
|
||||
if test "x$with_init_script" = "x" || test "x$with_init_script" = "xauto"; then
|
||||
if test -f /etc/redhat-release ; then
|
||||
with_init_script=redhat
|
||||
else
|
||||
@ -290,18 +295,37 @@ if test x"$with_rhel5_api" = x"yes"; then
|
||||
AC_DEFINE([WITH_RHEL5_API], [1], [whether building for the RHEL-5 API])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG([BASH_PATH], [bash], /bin/bash, [/bin:$PATH])
|
||||
AC_DEFINE_UNQUOTED([BASH_PATH], "$BASH_PATH", [path to bash binary])
|
||||
|
||||
AC_PATH_PROG([IPTABLES_PATH], [iptables], /sbin/iptables, [/usr/sbin:$PATH])
|
||||
AC_DEFINE_UNQUOTED([IPTABLES_PATH], "$IPTABLES_PATH", [path to iptables binary])
|
||||
|
||||
AC_PATH_PROG([IP6TABLES_PATH], [ip6tables], /sbin/ip6tables, [/usr/sbin:$PATH])
|
||||
AC_DEFINE_UNQUOTED([IP6TABLES_PATH], "$IP6TABLES_PATH", [path to ip6tables binary])
|
||||
|
||||
AC_PATH_PROG([EBTABLES_PATH], [ebtables], /sbin/ebtables, [/usr/sbin:$PATH])
|
||||
AC_DEFINE_UNQUOTED([EBTABLES_PATH], "$EBTABLES_PATH", [path to ebtables binary])
|
||||
|
||||
AC_PATH_PROG([GREP_PATH], [grep], /bin/grep, [/bin:$PATH])
|
||||
AC_DEFINE_UNQUOTED([GREP_PATH], "$GREP_PATH", [path to grep binary])
|
||||
|
||||
AC_PATH_PROG([GAWK_PATH], [gawk], /bin/gawk, [/bin:$PATH])
|
||||
AC_DEFINE_UNQUOTED([GAWK_PATH], "$GAWK_PATH", [path to gawk binary])
|
||||
|
||||
|
||||
if test "$with_openvz" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_OPENVZ], 1, [whether OpenVZ driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_OPENVZ], [test "$with_openvz" = "yes"])
|
||||
|
||||
if test "x$with_vbox" = "xyes"; then
|
||||
AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_ERROR([Unable to find dlopen()])])
|
||||
case $ac_cv_search_dlopen in
|
||||
no*) DLOPEN_LIBS= ;;
|
||||
*) DLOPEN_LIBS=$ac_cv_search_dlopen ;;
|
||||
esac
|
||||
AC_SUBST([DLOPEN_LIBS])
|
||||
AC_DEFINE_UNQUOTED([WITH_VBOX], 1, [whether VirtualBox driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_VBOX], [test "$with_vbox" = "yes"])
|
||||
@ -334,13 +358,53 @@ if test "$with_libvirtd" = "yes" ; then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_LIBVIRTD], [test "$with_libvirtd" = "yes"])
|
||||
|
||||
|
||||
old_LIBS="$LIBS"
|
||||
old_CFLAGS="$CFLAGS"
|
||||
LIBXENSERVER_LIBS=""
|
||||
LIBXENSERVER_CFLAGS=""
|
||||
dnl search for the XenServer library
|
||||
if test "$with_xenapi" != "no" ; then
|
||||
if test "$with_xenapi" != "yes" && test "$with_xenapi" != "check" ; then
|
||||
LIBXENSERVER_CFLAGS="-I$with_xenapi/include"
|
||||
LIBXENSERVER_LIBS="-L$with_xenapi"
|
||||
fi
|
||||
fail=0
|
||||
CFLAGS="$CFLAGS $LIBXENSERVER_CFLAGS"
|
||||
LIBS="$LIBS $LIBXENSERVER_LIBS"
|
||||
AC_CHECK_LIB([xenserver], [xen_vm_start], [
|
||||
with_xenapi=yes
|
||||
LIBXENSERVER_LIBS="$LIBXENSERVER_LIBS -lxenserver"
|
||||
],[
|
||||
if test "$with_xenapi" = "yes"; then
|
||||
fail=1
|
||||
fi
|
||||
with_xenapi=no
|
||||
])
|
||||
fi
|
||||
|
||||
LIBS="$old_LIBS"
|
||||
CFLAGS="$old_CFLAGS"
|
||||
|
||||
if test $fail = 1; then
|
||||
AC_MSG_ERROR([You must install the XenServer Library to compile XenAPI driver with -lxenserver])
|
||||
fi
|
||||
|
||||
if test "$with_xenapi" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_XENAPI], 1, [whether XenAPI driver is enabled])
|
||||
fi
|
||||
|
||||
AC_SUBST([LIBXENSERVER_CFLAGS])
|
||||
AC_SUBST([LIBXENSERVER_LIBS])
|
||||
|
||||
|
||||
old_LIBS="$LIBS"
|
||||
old_CFLAGS="$CFLAGS"
|
||||
XEN_LIBS=""
|
||||
XEN_CFLAGS=""
|
||||
dnl search for the Xen store library
|
||||
if test "$with_xen" != "no" ; then
|
||||
if test "$with_xen" != "yes" -a "$with_xen" != "check" ; then
|
||||
if test "$with_xen" != "yes" && test "$with_xen" != "check" ; then
|
||||
XEN_CFLAGS="-I$with_xen/include"
|
||||
XEN_LIBS="-L$with_xen/lib64 -L$with_xen/lib"
|
||||
fi
|
||||
@ -432,7 +496,7 @@ AC_CHECK_HEADERS([linux/kvm.h])
|
||||
dnl
|
||||
dnl check for sufficient headers for LXC
|
||||
dnl
|
||||
if test "$with_lxc" = "yes" -o "$with_lxc" = "check"; then
|
||||
if test "$with_lxc" = "yes" || test "$with_lxc" = "check"; then
|
||||
AC_CHECK_HEADER([sched.h],
|
||||
dnl Header is there, check for unshare()
|
||||
[
|
||||
@ -474,7 +538,7 @@ AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
|
||||
dnl
|
||||
dnl check for kernel headers required by src/bridge.c
|
||||
dnl
|
||||
if test "$with_qemu" = "yes" -o "$with_lxc" = "yes" ; then
|
||||
if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then
|
||||
AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],,
|
||||
AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt]))
|
||||
fi
|
||||
@ -488,7 +552,7 @@ dnl
|
||||
|
||||
XMLRPC_CFLAGS=
|
||||
XMLRPC_LIBS=
|
||||
if test "x$with_one" = "xyes" -o "x$with_one" = "xcheck"; then
|
||||
if test "x$with_one" = "xyes" || test "x$with_one" = "xcheck"; then
|
||||
PKG_CHECK_MODULES(XMLRPC, xmlrpc_client >= $XMLRPC_REQUIRED,
|
||||
[with_one=yes], [
|
||||
if test "x$with_one" = "xcheck" ; then
|
||||
@ -521,7 +585,7 @@ AC_ARG_WITH([libxml], AC_HELP_STRING([--with-libxml=@<:@PFX@:>@], [libxml2 locat
|
||||
if test "x$with_libxml" = "xno" ; then
|
||||
AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_REQUIRED)
|
||||
AC_MSG_ERROR([libxml2 >= $LIBXML_REQUIRED is required for libvirt])
|
||||
elif test "x$with_libxml" = "x" -a "x$PKG_CONFIG" != "x" ; then
|
||||
elif test "x$with_libxml" = "x" && test "x$PKG_CONFIG" != "x" ; then
|
||||
PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED, [LIBXML_FOUND=yes], [LIBXML_FOUND=no])
|
||||
fi
|
||||
if test "$LIBXML_FOUND" = "no" ; then
|
||||
@ -611,7 +675,7 @@ AC_ARG_WITH([sasl],
|
||||
SASL_CFLAGS=
|
||||
SASL_LIBS=
|
||||
if test "x$with_sasl" != "xno"; then
|
||||
if test "x$with_sasl" != "xyes" -a "x$with_sasl" != "xcheck"; then
|
||||
if test "x$with_sasl" != "xyes" && test "x$with_sasl" != "xcheck"; then
|
||||
SASL_CFLAGS="-I$with_sasl"
|
||||
SASL_LIBS="-L$with_sasl"
|
||||
fi
|
||||
@ -666,7 +730,7 @@ AC_ARG_WITH([yajl],
|
||||
YAJL_CFLAGS=
|
||||
YAJL_LIBS=
|
||||
if test "x$with_yajl" != "xno"; then
|
||||
if test "x$with_yajl" != "xyes" -a "x$with_yajl" != "xcheck"; then
|
||||
if test "x$with_yajl" != "xyes" && test "x$with_yajl" != "xcheck"; then
|
||||
YAJL_CFLAGS="-I$with_yajl/include"
|
||||
YAJL_LIBS="-L$with_yajl/lib"
|
||||
fi
|
||||
@ -718,7 +782,7 @@ AC_ARG_WITH([polkit],
|
||||
|
||||
with_polkit0=no
|
||||
with_polkit1=no
|
||||
if test "x$with_polkit" = "xyes" -o "x$with_polkit" = "xcheck"; then
|
||||
if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
|
||||
dnl Check for new polkit first - just a binary
|
||||
AC_PATH_PROG([PKCHECK_PATH],[pkcheck], [], [/usr/sbin:$PATH])
|
||||
if test "x$PKCHECK_PATH" != "x" ; then
|
||||
@ -776,7 +840,7 @@ AC_ARG_WITH([avahi],
|
||||
|
||||
AVAHI_CFLAGS=
|
||||
AVAHI_LIBS=
|
||||
if test "x$with_avahi" = "xyes" -o "x$with_avahi" = "xcheck"; then
|
||||
if test "x$with_avahi" = "xyes" || test "x$with_avahi" = "xcheck"; then
|
||||
PKG_CHECK_MODULES(AVAHI, avahi-client >= $AVAHI_REQUIRED,
|
||||
[with_avahi=yes], [
|
||||
if test "x$with_avahi" = "xcheck" ; then
|
||||
@ -954,7 +1018,7 @@ AC_ARG_WITH([numactl],
|
||||
|
||||
NUMACTL_CFLAGS=
|
||||
NUMACTL_LIBS=
|
||||
if test "$with_qemu" = "yes" -a "$with_numactl" != "no"; then
|
||||
if test "$with_qemu" = "yes" && test "$with_numactl" != "no"; then
|
||||
old_cflags="$CFLAGS"
|
||||
old_libs="$LIBS"
|
||||
if test "$with_numactl" = "check"; then
|
||||
@ -982,11 +1046,44 @@ AC_SUBST([NUMACTL_CFLAGS])
|
||||
AC_SUBST([NUMACTL_LIBS])
|
||||
|
||||
|
||||
dnl pcap lib
|
||||
LIBPCAP_CONFIG="pcap-config"
|
||||
LIBPCAP_CFLAGS=""
|
||||
LIBPCAP_LIBS=""
|
||||
LIBPCAP_FOUND="no"
|
||||
|
||||
AC_ARG_WITH([libpcap], AC_HELP_STRING([--with-libpcap=@<:@PFX@:>@], [libpcap location]))
|
||||
if test "$with_qemu" = "yes"; then
|
||||
if test "x$with_libpcap" != "xno" ; then
|
||||
if test "x$with_libpcap" != "x" ; then
|
||||
LIBPCAP_CONFIG=$with_libpcap/bin/$LIBPCAP_CONFIG
|
||||
fi
|
||||
AC_MSG_CHECKING(libpcap $LIBPCAP_CONFIG >= $LIBPCAP_REQUIRED )
|
||||
if ! $LIBPCAP_CONFIG --libs > /dev/null 2>&1 ; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
LIBPCAP_LIBS="`$LIBPCAP_CONFIG --libs`"
|
||||
LIBPCAP_CFLAGS="`$LIBPCAP_CONFIG --cflags`"
|
||||
LIBPCAP_FOUND="yes"
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$LIBPCAP_FOUND" = "xyes"; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_LIBPCAP], 1, [whether libpcap can be used])
|
||||
fi
|
||||
|
||||
AC_SUBST([LIBPCAP_CFLAGS])
|
||||
AC_SUBST([LIBPCAP_LIBS])
|
||||
|
||||
|
||||
|
||||
dnl
|
||||
dnl Checks for the UML driver
|
||||
dnl
|
||||
|
||||
if test "$with_uml" = "yes" -o "$with_uml" = "check"; then
|
||||
if test "$with_uml" = "yes" || test "$with_uml" = "check"; then
|
||||
AC_CHECK_HEADER([sys/inotify.h], [
|
||||
with_uml=yes
|
||||
], [
|
||||
@ -1012,7 +1109,7 @@ dnl
|
||||
dnl libssh checks
|
||||
dnl
|
||||
|
||||
if test "$with_libssh2" != "yes" -a "$with_libssh2" != "no"; then
|
||||
if test "$with_libssh2" != "yes" && test "$with_libssh2" != "no"; then
|
||||
libssh2_path="$with_libssh2"
|
||||
elif test "$with_libssh2" = "yes"; then
|
||||
libssh2_path="/usr/local/lib/"
|
||||
@ -1093,7 +1190,7 @@ dnl introduced in 0.4.0 release which need as minimum
|
||||
dnl
|
||||
CAPNG_CFLAGS=
|
||||
CAPNG_LIBS=
|
||||
if test "$with_qemu" = "yes" -a "$with_capng" != "no"; then
|
||||
if test "$with_qemu" = "yes" && test "$with_capng" != "no"; then
|
||||
old_cflags="$CFLAGS"
|
||||
old_libs="$LIBS"
|
||||
if test "$with_capng" = "check"; then
|
||||
@ -1189,7 +1286,7 @@ AC_ARG_WITH([netcf],
|
||||
|
||||
NETCF_CFLAGS=
|
||||
NETCF_LIBS=
|
||||
if test "$with_netcf" = "yes" -o "$with_netcf" = "check"; then
|
||||
if test "$with_netcf" = "yes" || test "$with_netcf" = "check"; then
|
||||
PKG_CHECK_MODULES(NETCF, netcf >= $NETCF_REQUIRED,
|
||||
[with_netcf=yes], [
|
||||
if test "$with_netcf" = "check" ; then
|
||||
@ -1218,6 +1315,15 @@ if test "$with_secrets" = "yes" ; then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_SECRETS], [test "$with_secrets" = "yes"])
|
||||
|
||||
with_nwfilter=yes
|
||||
if test "$with_libvirtd" = "no"; then
|
||||
with_nwfilter=no
|
||||
fi
|
||||
if test "$with_nwfilter" = "yes" ; then
|
||||
AC_DEFINE([WITH_NWFILTER], 1, [whether local network filter management driver is available])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_NWFILTER], [test "$with_nwfilter" = "yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([storage-fs],
|
||||
AC_HELP_STRING([--with-storage-fs], [with FileSystem backend for the storage driver @<:@default=check@:>@]),[],[with_storage_fs=check])
|
||||
@ -1248,7 +1354,7 @@ fi
|
||||
AM_CONDITIONAL([WITH_STORAGE_DIR], [test "$with_storage_dir" = "yes"])
|
||||
|
||||
|
||||
if test "$with_storage_fs" = "yes" -o "$with_storage_fs" = "check"; then
|
||||
if test "$with_storage_fs" = "yes" || test "$with_storage_fs" = "check"; then
|
||||
AC_PATH_PROG([MOUNT], [mount], [], [$PATH:/sbin:/usr/sbin])
|
||||
AC_PATH_PROG([UMOUNT], [umount], [], [$PATH:/sbin:/usr/sbin])
|
||||
if test "$with_storage_fs" = "yes" ; then
|
||||
@ -1276,7 +1382,7 @@ if test "$with_storage_fs" = "yes"; then
|
||||
[Location or name of the showmount program])
|
||||
fi
|
||||
|
||||
if test "$with_storage_lvm" = "yes" -o "$with_storage_lvm" = "check"; then
|
||||
if test "$with_storage_lvm" = "yes" || test "$with_storage_lvm" = "check"; then
|
||||
AC_PATH_PROG([PVCREATE], [pvcreate], [], [$PATH:/sbin:/usr/sbin])
|
||||
AC_PATH_PROG([VGCREATE], [vgcreate], [], [$PATH:/sbin:/usr/sbin])
|
||||
AC_PATH_PROG([LVCREATE], [lvcreate], [], [$PATH:/sbin:/usr/sbin])
|
||||
@ -1336,7 +1442,7 @@ AM_CONDITIONAL([WITH_STORAGE_LVM], [test "$with_storage_lvm" = "yes"])
|
||||
|
||||
|
||||
|
||||
if test "$with_storage_iscsi" = "yes" -o "$with_storage_iscsi" = "check"; then
|
||||
if test "$with_storage_iscsi" = "yes" || test "$with_storage_iscsi" = "check"; then
|
||||
AC_PATH_PROG([ISCSIADM], [iscsiadm], [], [$PATH:/sbin:/usr/sbin])
|
||||
if test "$with_storage_iscsi" = "yes" ; then
|
||||
if test -z "$ISCSIADM" ; then AC_MSG_ERROR([We need iscsiadm for iSCSI storage driver]) ; fi
|
||||
@ -1394,7 +1500,7 @@ AC_SUBST([DEVMAPPER_LIBS])
|
||||
|
||||
LIBPARTED_CFLAGS=
|
||||
LIBPARTED_LIBS=
|
||||
if test "$with_storage_disk" = "yes" -o "$with_storage_disk" = "check"; then
|
||||
if test "$with_storage_disk" = "yes" || test "$with_storage_disk" = "check"; then
|
||||
AC_PATH_PROG([PARTED], [parted], [], [$PATH:/sbin:/usr/sbin])
|
||||
if test -z "$PARTED" ; then
|
||||
with_storage_disk=no
|
||||
@ -1403,7 +1509,7 @@ if test "$with_storage_disk" = "yes" -o "$with_storage_disk" = "check"; then
|
||||
PARTED_FOUND=yes
|
||||
fi
|
||||
|
||||
if test "$with_storage_disk" != "no" -a "x$PKG_CONFIG" != "x" ; then
|
||||
if test "$with_storage_disk" != "no" && test "x$PKG_CONFIG" != "x" ; then
|
||||
PKG_CHECK_MODULES(LIBPARTED, libparted >= $PARTED_REQUIRED, [], [PARTED_FOUND=no])
|
||||
fi
|
||||
if test "$PARTED_FOUND" = "no"; then
|
||||
@ -1439,31 +1545,50 @@ AC_SUBST([LIBPARTED_CFLAGS])
|
||||
AC_SUBST([LIBPARTED_LIBS])
|
||||
|
||||
dnl
|
||||
dnl check for libcurl (ESX)
|
||||
dnl check for libcurl (ESX/XenAPI)
|
||||
dnl
|
||||
|
||||
LIBCURL_CFLAGS=""
|
||||
LIBCURL_LIBS=""
|
||||
LIBCURL_FOUND="no"
|
||||
|
||||
if test "$with_esx" = "yes" -o "$with_esx" = "check"; then
|
||||
if test "$with_esx" = "yes" || test "$with_esx" = "check" || test "$with_xenapi" = "yes" || test "$with_xenapi" = "check"; then
|
||||
PKG_CHECK_MODULES(LIBCURL, libcurl >= $LIBCURL_REQUIRED, [
|
||||
LIBCURL_FOUND=yes
|
||||
with_esx="yes"
|
||||
if test "$with_esx" = "check"; then
|
||||
with_esx=yes
|
||||
fi
|
||||
|
||||
if test "$with_xenapi" = "check"; then
|
||||
with_xenapi=yes
|
||||
fi
|
||||
], [
|
||||
if test "$with_esx" = "check"; then
|
||||
with_esx=no
|
||||
AC_MSG_NOTICE([libcurl is required for ESX driver, disabling it])
|
||||
else
|
||||
AC_MSG_NOTICE([libcurl is required for the ESX driver, disabling it])
|
||||
elif test "$with_esx" = "yes"; then
|
||||
AC_MSG_ERROR([libcurl >= $LIBCURL_REQUIRED is required for the ESX driver])
|
||||
fi
|
||||
|
||||
if test "$with_xenapi" = "check"; then
|
||||
with_xenapi=no
|
||||
AC_MSG_NOTICE([libcurl is required for the XenAPI driver, disabling it])
|
||||
elif test "$with_xenapi" = "yes"; then
|
||||
AC_MSG_ERROR([libcurl >= $LIBCURL_REQUIRED is required for the XenAPI driver])
|
||||
fi
|
||||
])
|
||||
fi
|
||||
|
||||
|
||||
if test "$with_esx" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_ESX], 1, [whether ESX driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_ESX], [test "$with_esx" = "yes"])
|
||||
|
||||
if test "$with_xenapi" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_XENAPI], 1, [whether XenAPI driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_XENAPI], [test "$with_xenapi" = "yes"])
|
||||
|
||||
|
||||
AC_SUBST([LIBCURL_CFLAGS])
|
||||
AC_SUBST([LIBCURL_LIBS])
|
||||
|
||||
@ -1566,7 +1691,7 @@ else
|
||||
fi
|
||||
AC_MSG_RESULT($RUNNING_XEND)
|
||||
|
||||
AM_CONDITIONAL([ENABLE_XEN_TESTS], [test "$RUNNING_XEN" != "no" -a "$RUNNING_XEND" != "no"])
|
||||
AM_CONDITIONAL([ENABLE_XEN_TESTS], [test "$RUNNING_XEN" != "no" && test "$RUNNING_XEND" != "no"])
|
||||
|
||||
AC_ARG_ENABLE([test-coverage],
|
||||
AC_HELP_STRING([--enable-test-coverage], [turn on code coverage instrumentation @<:@default=no@:>@]),
|
||||
@ -1649,6 +1774,11 @@ AM_CONDITIONAL([WITH_LIBVIRTD],[test "x$with_libvirtd" = "xyes"])
|
||||
dnl Check for gettext
|
||||
AM_GNU_GETTEXT_VERSION([0.14.1])
|
||||
AM_GNU_GETTEXT([external])
|
||||
dnl Since we're using such an old version of gettext, we must also define
|
||||
dnl this symbol, in order to make the autopoint-supplied Makefile.in.in
|
||||
dnl work properly.
|
||||
AC_SUBST([MKINSTALLDIRS], ["\$(top_builddir)/$ac_aux_dir/mkinstalldirs"])
|
||||
|
||||
ALL_LINGUAS=`cd "$srcdir/po" > /dev/null && ls *.po | sed 's+\.po$++'`
|
||||
|
||||
dnl Extra link-time flags for Cygwin.
|
||||
@ -1658,6 +1788,8 @@ CYGWIN_EXTRA_LDFLAGS=
|
||||
CYGWIN_EXTRA_LIBADD=
|
||||
CYGWIN_EXTRA_PYTHON_LIBADD=
|
||||
MINGW_EXTRA_LDFLAGS=
|
||||
WIN32_EXTRA_CFLAGS=
|
||||
LIBVIRT_SYMBOL_FILE=libvirt.syms
|
||||
case "$host" in
|
||||
*-*-cygwin*)
|
||||
CYGWIN_EXTRA_LDFLAGS="-no-undefined"
|
||||
@ -1670,15 +1802,33 @@ case "$host" in
|
||||
MINGW_EXTRA_LDFLAGS="-no-undefined"
|
||||
;;
|
||||
esac
|
||||
case "$host" in
|
||||
*-*-mingw* | *-*-cygwin* | *-*-msvc* )
|
||||
# If the host is Windows, and shared libraries are disabled, we
|
||||
# need to add -DLIBVIRT_STATIC to the CFLAGS for proper linking
|
||||
if test "x$enable_shared" = "xno"; then
|
||||
WIN32_EXTRA_CFLAGS="-DLIBVIRT_STATIC"
|
||||
fi
|
||||
# Also set the symbol file to .def, so src/Makefile generates libvirt.def
|
||||
# from libvirt.syms and passes libvirt.def instead of libvirt.syms to the linker
|
||||
LIBVIRT_SYMBOL_FILE=libvirt.def
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([CYGWIN_EXTRA_LDFLAGS])
|
||||
AC_SUBST([CYGWIN_EXTRA_LIBADD])
|
||||
AC_SUBST([CYGWIN_EXTRA_PYTHON_LIBADD])
|
||||
AC_SUBST([MINGW_EXTRA_LDFLAGS])
|
||||
AC_SUBST([WIN32_EXTRA_CFLAGS])
|
||||
AC_SUBST([LIBVIRT_SYMBOL_FILE])
|
||||
|
||||
|
||||
dnl Look for windres to build a Windows icon resource.
|
||||
AC_CHECK_TOOL([WINDRES], [windres], [no])
|
||||
AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != "no"])
|
||||
|
||||
case "$host" in
|
||||
*-*-mingw* | *-*-cygwin* | *-*-msvc* )
|
||||
AC_CHECK_TOOL([WINDRES], [windres], [])
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != ""])
|
||||
|
||||
|
||||
dnl Driver-Modules library
|
||||
@ -1687,14 +1837,14 @@ AC_ARG_WITH([driver-modules],
|
||||
[],
|
||||
[with_driver_modules=no])
|
||||
|
||||
DRIVER_MODULES_CFLAGS=
|
||||
DRIVER_MODULES_LIBS=
|
||||
DRIVER_MODULE_CFLAGS=
|
||||
DRIVER_MODULE_LIBS=
|
||||
if test "x$with_driver_modules" = "xyes" ; then
|
||||
old_cflags="$CFLAGS"
|
||||
old_libs="$LIBS"
|
||||
fail=0
|
||||
AC_CHECK_HEADER([dlfcn.h],[],[fail=1])
|
||||
AC_CHECK_LIB([dl], [dlopen],[],[fail=1])
|
||||
AC_SEARCH_LIBS([dlopen], [dl], [], [fail=1])
|
||||
test $fail = 1 &&
|
||||
AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
|
||||
|
||||
@ -1702,13 +1852,16 @@ if test "x$with_driver_modules" = "xyes" ; then
|
||||
LIBS="$old_libs"
|
||||
fi
|
||||
if test "$with_driver_modules" = "yes"; then
|
||||
DRIVER_MODULES_CFLAGS="-export-dynamic"
|
||||
DRIVER_MODULES_LIBS="-ldl"
|
||||
DRIVER_MODULE_CFLAGS="-export-dynamic"
|
||||
case $ac_cv_search_dlopen in
|
||||
no*) DRIVER_MODULE_LIBS= ;;
|
||||
*) DRIVER_MODULE_LIBS=$ac_cv_search_dlopen ;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"])
|
||||
AC_SUBST([DRIVER_MODULES_CFLAGS])
|
||||
AC_SUBST([DRIVER_MODULES_LIBS])
|
||||
AC_SUBST([DRIVER_MODULE_CFLAGS])
|
||||
AC_SUBST([DRIVER_MODULE_LIBS])
|
||||
|
||||
|
||||
# Set LV_LIBTOOL_OBJDIR to "." or $lt_cv_objdir, depending on whether
|
||||
@ -1729,7 +1882,7 @@ AC_ARG_WITH([hal],
|
||||
if test "$with_libvirtd" = "no" ; then
|
||||
with_hal=no
|
||||
fi
|
||||
if test "x$with_hal" = "xyes" -o "x$with_hal" = "xcheck"; then
|
||||
if test "x$with_hal" = "xyes" || test "x$with_hal" = "xcheck"; then
|
||||
PKG_CHECK_MODULES(HAL, hal >= $HAL_REQUIRED,
|
||||
[with_hal=yes], [
|
||||
if test "x$with_hal" = "xcheck" ; then
|
||||
@ -1772,7 +1925,7 @@ AC_ARG_WITH([udev],
|
||||
if test "$with_libvirtd" = "no" ; then
|
||||
with_udev=no
|
||||
fi
|
||||
if test "x$with_udev" = "xyes" -o "x$with_udev" = "xcheck"; then
|
||||
if test "x$with_udev" = "xyes" || test "x$with_udev" = "xcheck"; then
|
||||
PKG_CHECK_MODULES(UDEV, libudev >= $UDEV_REQUIRED,
|
||||
[], [
|
||||
if test "x$with_udev" = "xcheck" ; then
|
||||
@ -1806,7 +1959,7 @@ AC_SUBST([PCIACCESS_CFLAGS])
|
||||
AC_SUBST([PCIACCESS_LIBS])
|
||||
|
||||
with_nodedev=no;
|
||||
if test "$with_hal" = "yes" -o "$with_udev" = "yes";
|
||||
if test "$with_hal" = "yes" || test "$with_udev" = "yes";
|
||||
then
|
||||
with_nodedev=yes
|
||||
AC_DEFINE_UNQUOTED([WITH_NODE_DEVICES], 1, [with node device driver])
|
||||
@ -1827,6 +1980,31 @@ AC_ARG_WITH([qemu-group],
|
||||
AC_DEFINE_UNQUOTED([QEMU_USER], ["$QEMU_USER"], [QEMU user account])
|
||||
AC_DEFINE_UNQUOTED([QEMU_GROUP], ["$QEMU_GROUP"], [QEMU group account])
|
||||
|
||||
|
||||
AC_ARG_WITH([macvtap],
|
||||
AC_HELP_STRING([--with-macvtap],[enable macvtap device @<:@default=check@:>@]),
|
||||
[with_macvtap=${withval}],
|
||||
[with_macvtap=check])
|
||||
|
||||
if test "$with_macvtap" != "no" ; then
|
||||
AC_TRY_COMPILE([ #include <sys/socket.h>
|
||||
#include <linux/rtnetlink.h> ],
|
||||
[ int x = MACVLAN_MODE_BRIDGE; ],
|
||||
[ with_macvtap=yes ],
|
||||
[ if test "$with_macvtap" = "yes" ; then
|
||||
AC_MSG_ERROR([Installed linux headers don't show support for macvtap device.])
|
||||
fi
|
||||
with_macvtap=no ])
|
||||
if test "$with_macvtap" = "yes" ; then
|
||||
val=1
|
||||
else
|
||||
val=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([WITH_MACVTAP], $val, [whether macvtap support is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_MACVTAP], [test "$with_macvtap" = "yes"])
|
||||
|
||||
|
||||
# Only COPYING.LIB is under version control, yet COPYING
|
||||
# is included as part of the distribution tarball.
|
||||
# Copy one to the other, but only if this is a srcdir-build.
|
||||
@ -1855,7 +2033,8 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
|
||||
examples/domsuspend/Makefile \
|
||||
examples/dominfo/Makefile \
|
||||
examples/python/Makefile \
|
||||
examples/hellolibvirt/Makefile)
|
||||
examples/hellolibvirt/Makefile \
|
||||
examples/xml/nwfilter/Makefile)
|
||||
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Configuration summary])
|
||||
@ -1869,6 +2048,7 @@ AC_MSG_NOTICE([ QEMU: $with_qemu])
|
||||
AC_MSG_NOTICE([ UML: $with_uml])
|
||||
AC_MSG_NOTICE([ OpenVZ: $with_openvz])
|
||||
AC_MSG_NOTICE([ VBox: $with_vbox])
|
||||
AC_MSG_NOTICE([ XenAPI: $with_xenapi])
|
||||
AC_MSG_NOTICE([ LXC: $with_lxc])
|
||||
AC_MSG_NOTICE([ PHYP: $with_phyp])
|
||||
AC_MSG_NOTICE([ ONE: $with_one])
|
||||
@ -1878,6 +2058,7 @@ AC_MSG_NOTICE([ Remote: $with_remote])
|
||||
AC_MSG_NOTICE([ Network: $with_network])
|
||||
AC_MSG_NOTICE([Libvirtd: $with_libvirtd])
|
||||
AC_MSG_NOTICE([ netcf: $with_netcf])
|
||||
AC_MSG_NOTICE([ macvtap: $with_macvtap])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Storage Drivers])
|
||||
AC_MSG_NOTICE([])
|
||||
@ -1898,7 +2079,7 @@ AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Driver Loadable Modules])
|
||||
AC_MSG_NOTICE([])
|
||||
if test "$with_driver_modules" != "no" ; then
|
||||
AC_MSG_NOTICE([ dlopen: $DRIVER_MODULES_CFLAGS $DRIVER_MODULES_LIBS])
|
||||
AC_MSG_NOTICE([ dlopen: $DRIVER_MODULE_CFLAGS $DRIVER_MODULE_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ dlopen: no])
|
||||
fi
|
||||
@ -1966,6 +2147,11 @@ AC_MSG_NOTICE([ xen: $XEN_CFLAGS $XEN_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ xen: no])
|
||||
fi
|
||||
if test "$with_xenapi" = "yes" ; then
|
||||
AC_MSG_NOTICE([ xenapi: $LIBXENSERVER_CFLAGS $LIBXENSERVER_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ xenapi: no])
|
||||
fi
|
||||
if test "$with_hal" = "yes" ; then
|
||||
AC_MSG_NOTICE([ hal: $HAL_CFLAGS $HAL_LIBS])
|
||||
else
|
||||
@ -1986,6 +2172,11 @@ AC_MSG_NOTICE([ xmlrpc: $XMLRPC_CFLAGS $XMLRPC_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ xmlrpc: no])
|
||||
fi
|
||||
if test "$with_qemu" = "yes" ; then
|
||||
AC_MSG_NOTICE([ pcap: $LIBPCAP_CFLAGS $LIBPCAP_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ pcap: no])
|
||||
fi
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Test suite])
|
||||
AC_MSG_NOTICE([])
|
||||
|
2
daemon/.gitignore
vendored
2
daemon/.gitignore
vendored
@ -9,4 +9,4 @@ Makefile.in
|
||||
libvirt_qemud
|
||||
libvirtd
|
||||
libvirtd.init
|
||||
libvirtd.logrotate
|
||||
libvirtd*.logrotate
|
||||
|
@ -25,7 +25,9 @@ EXTRA_DIST = \
|
||||
libvirtd.sasl \
|
||||
libvirtd.sysconf \
|
||||
libvirtd.aug \
|
||||
libvirtd.logrotate.in \
|
||||
libvirtd.qemu.logrotate.in \
|
||||
libvirtd.lxc.logrotate.in \
|
||||
libvirtd.uml.logrotate.in \
|
||||
test_libvirtd.aug \
|
||||
$(AVAHI_SOURCES) \
|
||||
$(DAEMON_SOURCES)
|
||||
@ -114,6 +116,10 @@ endif
|
||||
if WITH_SECRETS
|
||||
libvirtd_LDADD += ../src/libvirt_driver_secret.la
|
||||
endif
|
||||
|
||||
if WITH_NWFILTER
|
||||
libvirtd_LDADD += ../src/libvirt_driver_nwfilter.la
|
||||
endif
|
||||
endif
|
||||
|
||||
libvirtd_LDADD += ../src/libvirt.la
|
||||
@ -166,31 +172,48 @@ remote.c: remote_dispatch_prototypes.h \
|
||||
REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
|
||||
|
||||
remote_dispatch_prototypes.h: $(srcdir)/remote_generate_stubs.pl $(REMOTE_PROTOCOL)
|
||||
perl -w $(srcdir)/remote_generate_stubs.pl -p $(REMOTE_PROTOCOL) > $@
|
||||
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -p $(REMOTE_PROTOCOL) > $@
|
||||
|
||||
remote_dispatch_table.h: $(srcdir)/remote_generate_stubs.pl $(REMOTE_PROTOCOL)
|
||||
perl -w $(srcdir)/remote_generate_stubs.pl -t $(REMOTE_PROTOCOL) > $@
|
||||
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -t $(REMOTE_PROTOCOL) > $@
|
||||
|
||||
remote_dispatch_args.h: $(srcdir)/remote_generate_stubs.pl $(REMOTE_PROTOCOL)
|
||||
perl -w $(srcdir)/remote_generate_stubs.pl -a $(REMOTE_PROTOCOL) > $@
|
||||
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -a $(REMOTE_PROTOCOL) > $@
|
||||
|
||||
remote_dispatch_ret.h: $(srcdir)/remote_generate_stubs.pl $(REMOTE_PROTOCOL)
|
||||
perl -w $(srcdir)/remote_generate_stubs.pl -r $(REMOTE_PROTOCOL) > $@
|
||||
$(AM_V_GEN)perl -w $(srcdir)/remote_generate_stubs.pl -r $(REMOTE_PROTOCOL) > $@
|
||||
|
||||
BUILT_SOURCES += libvirtd.logrotate
|
||||
LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
|
||||
libvirtd.uml.logrotate
|
||||
|
||||
libvirtd.logrotate: libvirtd.logrotate.in
|
||||
sed \
|
||||
-e s!\@localstatedir\@!@localstatedir@!g \
|
||||
BUILT_SOURCES += $(LOGROTATE_CONFS)
|
||||
|
||||
libvirtd.qemu.logrotate: libvirtd.qemu.logrotate.in
|
||||
sed \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
< $< > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
install-logrotate: libvirtd.logrotate
|
||||
libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
install-logrotate: $(LOGROTATE_CONFS)
|
||||
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/qemu/
|
||||
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/lxc/
|
||||
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/uml/
|
||||
mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d/
|
||||
$(INSTALL_DATA) $< $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
|
||||
$(INSTALL_DATA) libvirtd.qemu.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
|
||||
$(INSTALL_DATA) libvirtd.lxc.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
|
||||
$(INSTALL_DATA) libvirtd.uml.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
|
||||
|
||||
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
install-init: libvirtd.init
|
||||
@ -208,13 +231,13 @@ uninstall-init:
|
||||
BUILT_SOURCES += libvirtd.init
|
||||
|
||||
libvirtd.init: libvirtd.init.in
|
||||
sed \
|
||||
$(AM_V_GEN)sed \
|
||||
-e s!\@localstatedir\@!@localstatedir@!g \
|
||||
-e s!\@sbindir\@!@sbindir@!g \
|
||||
-e s!\@sysconfdir\@!@sysconfdir@!g \
|
||||
< $< > $@-t
|
||||
chmod a+x $@-t
|
||||
mv $@-t $@
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
check-local:
|
||||
test -x '$(AUGPARSE)' \
|
||||
|
@ -22,10 +22,10 @@
|
||||
*/
|
||||
|
||||
#ifndef __LIBVIRTD_DISPATCH_H__
|
||||
#define __LIBVIRTD_DISPATCH_H__
|
||||
# define __LIBVIRTD_DISPATCH_H__
|
||||
|
||||
|
||||
#include "libvirtd.h"
|
||||
# include "libvirtd.h"
|
||||
|
||||
|
||||
int
|
||||
@ -60,16 +60,6 @@ remoteSerializeStreamError(struct qemud_client *client,
|
||||
int proc,
|
||||
int serial);
|
||||
|
||||
/* Having this here is dubious. It should be in remote.h
|
||||
* but qemud.c shouldn't depend on that header directly.
|
||||
* Refactor this later to deal with this properly.
|
||||
*/
|
||||
int remoteRelayDomainEvent (virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int event,
|
||||
int detail,
|
||||
void *opaque);
|
||||
|
||||
|
||||
int
|
||||
remoteSendStreamData(struct qemud_client *client,
|
||||
|
@ -22,9 +22,9 @@
|
||||
*/
|
||||
|
||||
#ifndef __VIRTD_EVENT_H__
|
||||
#define __VIRTD_EVENT_H__
|
||||
# define __VIRTD_EVENT_H__
|
||||
|
||||
#include "internal.h"
|
||||
# include "internal.h"
|
||||
|
||||
/**
|
||||
* virEventAddHandleImpl: register a callback for monitoring file handle events
|
||||
|
@ -62,61 +62,65 @@
|
||||
#include "event.h"
|
||||
#include "memory.h"
|
||||
#include "stream.h"
|
||||
#include "hooks.h"
|
||||
#ifdef HAVE_AVAHI
|
||||
#include "mdns.h"
|
||||
# include "mdns.h"
|
||||
#endif
|
||||
|
||||
#ifdef WITH_DRIVER_MODULES
|
||||
#include "driver.h"
|
||||
# include "driver.h"
|
||||
#else
|
||||
#ifdef WITH_QEMU
|
||||
#include "qemu/qemu_driver.h"
|
||||
#endif
|
||||
#ifdef WITH_LXC
|
||||
#include "lxc/lxc_driver.h"
|
||||
#endif
|
||||
#ifdef WITH_UML
|
||||
#include "uml/uml_driver.h"
|
||||
#endif
|
||||
#ifdef WITH_ONE
|
||||
#include "opennebula/one_driver.h"
|
||||
#endif
|
||||
#ifdef WITH_NETWORK
|
||||
#include "network/bridge_driver.h"
|
||||
#endif
|
||||
#ifdef WITH_NETCF
|
||||
#include "interface/netcf_driver.h"
|
||||
#endif
|
||||
#ifdef WITH_STORAGE_DIR
|
||||
#include "storage/storage_driver.h"
|
||||
#endif
|
||||
#ifdef WITH_NODE_DEVICES
|
||||
#include "node_device/node_device_driver.h"
|
||||
#endif
|
||||
#ifdef WITH_SECRETS
|
||||
#include "secret/secret_driver.h"
|
||||
#endif
|
||||
# ifdef WITH_QEMU
|
||||
# include "qemu/qemu_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_LXC
|
||||
# include "lxc/lxc_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_UML
|
||||
# include "uml/uml_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_ONE
|
||||
# include "opennebula/one_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_NETWORK
|
||||
# include "network/bridge_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_NETCF
|
||||
# include "interface/netcf_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_STORAGE_DIR
|
||||
# include "storage/storage_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_NODE_DEVICES
|
||||
# include "node_device/node_device_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_SECRETS
|
||||
# include "secret/secret_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_NWFILTER
|
||||
# include "nwfilter/nwfilter_driver.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __sun
|
||||
#include <ucred.h>
|
||||
#include <priv.h>
|
||||
# include <ucred.h>
|
||||
# include <priv.h>
|
||||
|
||||
#ifndef PRIV_VIRT_MANAGE
|
||||
#define PRIV_VIRT_MANAGE ((const char *)"virt_manage")
|
||||
#endif
|
||||
# ifndef PRIV_VIRT_MANAGE
|
||||
# define PRIV_VIRT_MANAGE ((const char *)"virt_manage")
|
||||
# endif
|
||||
|
||||
#ifndef PRIV_XVM_CONTROL
|
||||
#define PRIV_XVM_CONTROL ((const char *)"xvm_control")
|
||||
#endif
|
||||
# ifndef PRIV_XVM_CONTROL
|
||||
# define PRIV_XVM_CONTROL ((const char *)"xvm_control")
|
||||
# endif
|
||||
|
||||
#define PU_RESETGROUPS 0x0001 /* Remove supplemental groups */
|
||||
#define PU_CLEARLIMITSET 0x0008 /* L=0 */
|
||||
# define PU_RESETGROUPS 0x0001 /* Remove supplemental groups */
|
||||
# define PU_CLEARLIMITSET 0x0008 /* L=0 */
|
||||
|
||||
extern int __init_daemon_priv(int, uid_t, gid_t, ...);
|
||||
|
||||
#define SYSTEM_UID 60
|
||||
# define SYSTEM_UID 60
|
||||
|
||||
static gid_t unix_sock_gid = 60; /* Not used */
|
||||
static int unix_sock_rw_mask = 0666;
|
||||
@ -196,6 +200,7 @@ enum {
|
||||
VIR_DAEMON_ERR_PRIVS,
|
||||
VIR_DAEMON_ERR_NETWORK,
|
||||
VIR_DAEMON_ERR_CONFIG,
|
||||
VIR_DAEMON_ERR_HOOKS,
|
||||
|
||||
VIR_DAEMON_ERR_LAST
|
||||
};
|
||||
@ -209,7 +214,8 @@ VIR_ENUM_IMPL(virDaemonErr, VIR_DAEMON_ERR_LAST,
|
||||
"Unable to setup signal handlers",
|
||||
"Unable to drop privileges",
|
||||
"Unable to initialize network sockets",
|
||||
"Unable to load configuration file")
|
||||
"Unable to load configuration file",
|
||||
"Unable to look for hook scripts")
|
||||
|
||||
static void sig_handler(int sig, siginfo_t * siginfo,
|
||||
void* context ATTRIBUTE_UNUSED) {
|
||||
@ -375,8 +381,11 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED,
|
||||
switch (siginfo.si_signo) {
|
||||
case SIGHUP:
|
||||
VIR_INFO0(_("Reloading configuration on SIGHUP"));
|
||||
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-",
|
||||
VIR_HOOK_DAEMON_OP_RELOAD, SIGHUP, "SIGHUP", NULL);
|
||||
if (virStateReload() < 0)
|
||||
VIR_WARN0(_("Error while reloading drivers"));
|
||||
|
||||
break;
|
||||
|
||||
case SIGINT:
|
||||
@ -474,7 +483,10 @@ static int daemonForkIntoBackground(void) {
|
||||
goto again;
|
||||
|
||||
if (ret == 1 && status != 0) {
|
||||
fprintf(stderr, "error: %s\n", virDaemonErrTypeToString(status));
|
||||
fprintf(stderr,
|
||||
"error: %s. Check /var/log/messages or run without "
|
||||
"--daemon for more info.\n",
|
||||
virDaemonErrTypeToString(status));
|
||||
}
|
||||
_exit(ret == 1 && status == 0 ? 0 : 1);
|
||||
}
|
||||
@ -557,8 +569,10 @@ static int qemudListenUnix(struct qemud_server *server,
|
||||
|
||||
oldgrp = getgid();
|
||||
oldmask = umask(readonly ? ~unix_sock_ro_mask : ~unix_sock_rw_mask);
|
||||
if (server->privileged)
|
||||
setgid(unix_sock_gid);
|
||||
if (server->privileged && setgid(unix_sock_gid)) {
|
||||
VIR_ERROR(_("Failed to set group ID to %d"), unix_sock_gid);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (bind(sock->fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
|
||||
VIR_ERROR(_("Failed to bind socket to '%s': %s"),
|
||||
@ -566,8 +580,10 @@ static int qemudListenUnix(struct qemud_server *server,
|
||||
goto cleanup;
|
||||
}
|
||||
umask(oldmask);
|
||||
if (server->privileged)
|
||||
setgid(oldgrp);
|
||||
if (server->privileged && setgid(oldgrp)) {
|
||||
VIR_ERROR(_("Failed to restore group ID to %d"), oldgrp);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (listen(sock->fd, 30) < 0) {
|
||||
VIR_ERROR(_("Failed to listen for connections on '%s': %s"),
|
||||
@ -747,7 +763,7 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
if (server->privileged) {
|
||||
dir_prefix = strdup (LOCAL_STATE_DIR);
|
||||
if (dir_prefix == NULL) {
|
||||
virReportOOMError(NULL);
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
if (snprintf (sock_dir, maxlen, "%s/run/libvirt",
|
||||
@ -755,7 +771,7 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
goto snprintf_error;
|
||||
} else {
|
||||
uid_t uid = geteuid();
|
||||
dir_prefix = virGetUserDirectory(NULL, uid);
|
||||
dir_prefix = virGetUserDirectory(uid);
|
||||
if (dir_prefix == NULL) {
|
||||
/* Do not diagnose here; virGetUserDirectory does that. */
|
||||
goto snprintf_error;
|
||||
@ -768,7 +784,7 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
|
||||
sock_dir_prefix = strdup (sock_dir);
|
||||
if (!sock_dir_prefix) {
|
||||
virReportOOMError(NULL);
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -788,10 +804,10 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
|
||||
if (server->privileged) {
|
||||
if (!(server->logDir = strdup (LOCAL_STATE_DIR "/log/libvirt")))
|
||||
virReportOOMError(NULL);
|
||||
virReportOOMError();
|
||||
} else {
|
||||
if (virAsprintf(&server->logDir, "%s/.libvirt/log", dir_prefix) < 0)
|
||||
virReportOOMError(NULL);
|
||||
virReportOOMError();
|
||||
}
|
||||
|
||||
if (server->logDir == NULL)
|
||||
@ -869,34 +885,38 @@ static struct qemud_server *qemudInitialize(void) {
|
||||
virDriverLoadModule("lxc");
|
||||
virDriverLoadModule("uml");
|
||||
virDriverLoadModule("one");
|
||||
virDriverLoadModule("nwfilter");
|
||||
#else
|
||||
#ifdef WITH_NETWORK
|
||||
# ifdef WITH_NETWORK
|
||||
networkRegister();
|
||||
#endif
|
||||
#ifdef WITH_NETCF
|
||||
# endif
|
||||
# ifdef WITH_NETCF
|
||||
interfaceRegister();
|
||||
#endif
|
||||
#ifdef WITH_STORAGE_DIR
|
||||
# endif
|
||||
# ifdef WITH_STORAGE_DIR
|
||||
storageRegister();
|
||||
#endif
|
||||
#if defined(WITH_NODE_DEVICES)
|
||||
# endif
|
||||
# if defined(WITH_NODE_DEVICES)
|
||||
nodedevRegister();
|
||||
#endif
|
||||
#ifdef WITH_SECRETS
|
||||
# endif
|
||||
# ifdef WITH_SECRETS
|
||||
secretRegister();
|
||||
#endif
|
||||
#ifdef WITH_QEMU
|
||||
# endif
|
||||
# ifdef WITH_NWFILTER
|
||||
nwfilterRegister();
|
||||
# endif
|
||||
# ifdef WITH_QEMU
|
||||
qemuRegister();
|
||||
#endif
|
||||
#ifdef WITH_LXC
|
||||
# endif
|
||||
# ifdef WITH_LXC
|
||||
lxcRegister();
|
||||
#endif
|
||||
#ifdef WITH_UML
|
||||
# endif
|
||||
# ifdef WITH_UML
|
||||
umlRegister();
|
||||
#endif
|
||||
#ifdef WITH_ONE
|
||||
# endif
|
||||
# ifdef WITH_ONE
|
||||
oneRegister();
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
virEventRegisterImpl(virEventAddHandleImpl,
|
||||
@ -1240,7 +1260,7 @@ remoteCheckAccess (struct qemud_client *client)
|
||||
|
||||
#if HAVE_POLKIT
|
||||
int qemudGetSocketIdentity(int fd, uid_t *uid, pid_t *pid) {
|
||||
#ifdef SO_PEERCRED
|
||||
# ifdef SO_PEERCRED
|
||||
struct ucred cr;
|
||||
unsigned int cr_len = sizeof (cr);
|
||||
|
||||
@ -1253,10 +1273,10 @@ int qemudGetSocketIdentity(int fd, uid_t *uid, pid_t *pid) {
|
||||
|
||||
*pid = cr.pid;
|
||||
*uid = cr.uid;
|
||||
#else
|
||||
# else
|
||||
/* XXX Many more OS support UNIX socket credentials we could port to. See dbus ....*/
|
||||
#error "UNIX socket credentials not supported/implemented on this platform yet..."
|
||||
#endif
|
||||
# error "UNIX socket credentials not supported/implemented on this platform yet..."
|
||||
# endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@ -1268,6 +1288,7 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
|
||||
socklen_t addrlen = (socklen_t) (sizeof addr);
|
||||
struct qemud_client *client;
|
||||
int no_slow_start = 1;
|
||||
int i;
|
||||
|
||||
if ((fd = accept(sock->fd, (struct sockaddr *)&addr, &addrlen)) < 0) {
|
||||
char ebuf[1024];
|
||||
@ -1339,6 +1360,10 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
|
||||
memcpy (&client->addr, &addr, sizeof addr);
|
||||
client->addrlen = addrlen;
|
||||
|
||||
for (i = 0 ; i < VIR_DOMAIN_EVENT_ID_LAST ; i++) {
|
||||
client->domainEventCallbackID[i] = -1;
|
||||
}
|
||||
|
||||
/* Prepare one for packet receive */
|
||||
if (VIR_ALLOC(client->rx) < 0)
|
||||
goto cleanup;
|
||||
@ -1408,7 +1433,6 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
|
||||
|
||||
if (server->nclients > server->nactiveworkers &&
|
||||
server->nactiveworkers < server->nworkers) {
|
||||
int i;
|
||||
for (i = 0 ; i < server->nworkers ; i++) {
|
||||
if (!server->workers[i].hasThread) {
|
||||
if (qemudStartWorker(server, &server->workers[i]) < 0)
|
||||
@ -1447,9 +1471,17 @@ void qemudDispatchClientFailure(struct qemud_client *client) {
|
||||
}
|
||||
|
||||
/* Deregister event delivery callback */
|
||||
if (client->conn && client->domain_events_registered) {
|
||||
DEBUG0("Deregistering to relay remote events");
|
||||
virConnectDomainEventDeregister(client->conn, remoteRelayDomainEvent);
|
||||
if (client->conn) {
|
||||
int i;
|
||||
|
||||
for (i = 0 ; i < VIR_DOMAIN_EVENT_ID_LAST ; i++) {
|
||||
if (client->domainEventCallbackID[i] != -1) {
|
||||
DEBUG("Deregistering to relay remote events %d", i);
|
||||
virConnectDomainEventDeregisterAny(client->conn,
|
||||
client->domainEventCallbackID[i]);
|
||||
}
|
||||
client->domainEventCallbackID[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_SASL
|
||||
@ -1495,16 +1527,15 @@ static void *qemudWorker(void *data)
|
||||
struct qemud_client_message *msg;
|
||||
|
||||
virMutexLock(&server->lock);
|
||||
while (((client = qemudPendingJob(server)) == NULL) &&
|
||||
!worker->quitRequest) {
|
||||
if (virCondWait(&server->job, &server->lock) < 0) {
|
||||
while ((client = qemudPendingJob(server)) == NULL) {
|
||||
if (worker->quitRequest ||
|
||||
virCondWait(&server->job, &server->lock) < 0) {
|
||||
virMutexUnlock(&server->lock);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (worker->quitRequest) {
|
||||
if (client)
|
||||
virMutexUnlock(&client->lock);
|
||||
virMutexUnlock(&client->lock);
|
||||
virMutexUnlock(&server->lock);
|
||||
return NULL;
|
||||
}
|
||||
@ -2277,7 +2308,7 @@ static void *qemudRunLoop(void *opaque) {
|
||||
virMutexUnlock(&server->lock);
|
||||
if (qemudOneLoop() < 0) {
|
||||
virMutexLock(&server->lock);
|
||||
DEBUG0("Loop iteration error, exiting\n");
|
||||
DEBUG0("Loop iteration error, exiting");
|
||||
break;
|
||||
}
|
||||
virMutexLock(&server->lock);
|
||||
@ -2451,7 +2482,7 @@ remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
for (i = 0, pp = p->list; pp; ++i, pp = pp->next) {
|
||||
if (pp->type != VIR_CONF_STRING) {
|
||||
VIR_ERROR(_("remoteReadConfigFile: %s: %s:"
|
||||
" must be a string or list of strings\n"),
|
||||
" must be a string or list of strings"),
|
||||
filename, key);
|
||||
VIR_FREE(list);
|
||||
return -1;
|
||||
@ -2474,7 +2505,7 @@ remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
|
||||
default:
|
||||
VIR_ERROR(_("remoteReadConfigFile: %s: %s:"
|
||||
" must be a string or list of strings\n"),
|
||||
" must be a string or list of strings"),
|
||||
filename, key);
|
||||
return -1;
|
||||
}
|
||||
@ -2490,7 +2521,7 @@ checkType (virConfValuePtr p, const char *filename,
|
||||
{
|
||||
if (p->type != required_type) {
|
||||
VIR_ERROR(_("remoteReadConfigFile: %s: %s: invalid type:"
|
||||
" got %s; expected %s\n"), filename, key,
|
||||
" got %s; expected %s"), filename, key,
|
||||
virConfTypeName (p->type),
|
||||
virConfTypeName (required_type));
|
||||
return -1;
|
||||
@ -2852,7 +2883,7 @@ qemudSetupPrivs (void)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#define qemudSetupPrivs() 0
|
||||
# define qemudSetupPrivs() 0
|
||||
#endif
|
||||
|
||||
|
||||
@ -3118,9 +3149,23 @@ int main(int argc, char **argv) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* setup the hooks if any */
|
||||
if (virHookInitialize() < 0) {
|
||||
ret = VIR_DAEMON_ERR_HOOKS;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Disable error func, now logging is setup */
|
||||
virSetErrorFunc(NULL, virshErrorHandler);
|
||||
|
||||
/*
|
||||
* Call the daemon startup hook
|
||||
* TODO: should we abort the daemon startup if the script returned
|
||||
* an error ?
|
||||
*/
|
||||
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_START,
|
||||
0, "start", NULL);
|
||||
|
||||
if (qemudNetworkInit(server) < 0) {
|
||||
ret = VIR_DAEMON_ERR_NETWORK;
|
||||
goto error;
|
||||
@ -3181,6 +3226,9 @@ shutdown:
|
||||
}
|
||||
pthread_join(server->eventThread, NULL);
|
||||
|
||||
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_SHUTDOWN,
|
||||
0, "shutdown", NULL);
|
||||
|
||||
error:
|
||||
if (statuswrite != -1) {
|
||||
if (ret != 0) {
|
||||
|
@ -23,53 +23,53 @@
|
||||
|
||||
|
||||
#ifndef QEMUD_INTERNAL_H__
|
||||
#define QEMUD_INTERNAL_H__
|
||||
# define QEMUD_INTERNAL_H__
|
||||
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
|
||||
#include <gnutls/gnutls.h>
|
||||
#include <gnutls/x509.h>
|
||||
#include "gnutls_1_0_compat.h"
|
||||
#if HAVE_SASL
|
||||
#include <sasl/sasl.h>
|
||||
#endif
|
||||
# include <gnutls/gnutls.h>
|
||||
# include <gnutls/x509.h>
|
||||
# include "gnutls_1_0_compat.h"
|
||||
# if HAVE_SASL
|
||||
# include <sasl/sasl.h>
|
||||
# endif
|
||||
|
||||
#if HAVE_POLKIT0
|
||||
#include <dbus/dbus.h>
|
||||
#endif
|
||||
# if HAVE_POLKIT0
|
||||
# include <dbus/dbus.h>
|
||||
# endif
|
||||
|
||||
#ifdef HAVE_SYS_SYSLIMITS_H
|
||||
#include <sys/syslimits.h>
|
||||
#endif
|
||||
# ifdef HAVE_SYS_SYSLIMITS_H
|
||||
# include <sys/syslimits.h>
|
||||
# endif
|
||||
|
||||
#include <rpc/types.h>
|
||||
#include <rpc/xdr.h>
|
||||
#include "remote_protocol.h"
|
||||
#include "logging.h"
|
||||
#include "threads.h"
|
||||
# include <rpc/types.h>
|
||||
# include <rpc/xdr.h>
|
||||
# include "remote_protocol.h"
|
||||
# include "logging.h"
|
||||
# include "threads.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef HAVE_ANSIDECL_H
|
||||
#include <ansidecl.h>
|
||||
#endif
|
||||
# ifdef __GNUC__
|
||||
# ifdef HAVE_ANSIDECL_H
|
||||
# include <ansidecl.h>
|
||||
# endif
|
||||
|
||||
#ifndef __GNUC_PREREQ
|
||||
#if defined __GNUC__ && defined __GNUC_MINOR__
|
||||
# define __GNUC_PREREQ(maj, min) \
|
||||
# ifndef __GNUC_PREREQ
|
||||
# if defined __GNUC__ && defined __GNUC_MINOR__
|
||||
# define __GNUC_PREREQ(maj, min) \
|
||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||
#else
|
||||
#define __GNUC_PREREQ(maj,min) 0
|
||||
#endif
|
||||
#endif
|
||||
# else
|
||||
# define __GNUC_PREREQ(maj,min) 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
* Macro to flag conciously unused parameters to functions
|
||||
*/
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
||||
#endif
|
||||
# ifndef ATTRIBUTE_UNUSED
|
||||
# define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
||||
# endif
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_FMT_PRINTF
|
||||
@ -81,35 +81,35 @@
|
||||
* printf format specifiers even on broken Win32 platforms
|
||||
* hence we have to force 'gnu_printf' for new GCC
|
||||
*/
|
||||
#ifndef ATTRIBUTE_FMT_PRINTF
|
||||
#if __GNUC_PREREQ (4, 4)
|
||||
#define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) __attribute__((__format__ (gnu_printf, fmtpos,argpos)))
|
||||
#else
|
||||
#define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) __attribute__((__format__ (printf, fmtpos,argpos)))
|
||||
#endif
|
||||
#endif
|
||||
# ifndef ATTRIBUTE_FMT_PRINTF
|
||||
# if __GNUC_PREREQ (4, 4)
|
||||
# define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) __attribute__((__format__ (gnu_printf, fmtpos,argpos)))
|
||||
# else
|
||||
# define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) __attribute__((__format__ (printf, fmtpos,argpos)))
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifndef ATTRIBUTE_RETURN_CHECK
|
||||
#if __GNUC_PREREQ (3, 4)
|
||||
#define ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__))
|
||||
#else
|
||||
#define ATTRIBUTE_RETURN_CHECK
|
||||
#endif
|
||||
#endif
|
||||
# ifndef ATTRIBUTE_RETURN_CHECK
|
||||
# if __GNUC_PREREQ (3, 4)
|
||||
# define ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__))
|
||||
# else
|
||||
# define ATTRIBUTE_RETURN_CHECK
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#else
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
#ifndef ATTRIBUTE_FMT_PRINTF
|
||||
#define ATTRIBUTE_FMT_PRINTF(...)
|
||||
#endif
|
||||
#ifndef ATTRIBUTE_RETURN_CHECK
|
||||
#define ATTRIBUTE_RETURN_CHECK
|
||||
#endif
|
||||
#endif
|
||||
# else
|
||||
# ifndef ATTRIBUTE_UNUSED
|
||||
# define ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
# ifndef ATTRIBUTE_FMT_PRINTF
|
||||
# define ATTRIBUTE_FMT_PRINTF(...)
|
||||
# endif
|
||||
# ifndef ATTRIBUTE_RETURN_CHECK
|
||||
# define ATTRIBUTE_RETURN_CHECK
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#define qemudDebug DEBUG
|
||||
# define qemudDebug DEBUG
|
||||
|
||||
/* Whether we're passing reads & writes through a sasl SSF */
|
||||
enum qemud_sasl_ssf {
|
||||
@ -177,7 +177,7 @@ struct qemud_client {
|
||||
int watch;
|
||||
unsigned int readonly :1;
|
||||
unsigned int closing :1;
|
||||
unsigned int domain_events_registered :1;
|
||||
int domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LAST];
|
||||
|
||||
struct sockaddr_storage addr;
|
||||
socklen_t addrlen;
|
||||
@ -186,7 +186,7 @@ struct qemud_client {
|
||||
gnutls_session_t tlssession;
|
||||
int auth;
|
||||
unsigned int handshake :1; /* If we're in progress for TLS handshake */
|
||||
#if HAVE_SASL
|
||||
# if HAVE_SASL
|
||||
sasl_conn_t *saslconn;
|
||||
int saslSSF;
|
||||
const char *saslDecoded;
|
||||
@ -196,7 +196,7 @@ struct qemud_client {
|
||||
unsigned int saslEncodedLength;
|
||||
unsigned int saslEncodedOffset;
|
||||
char *saslUsername;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Count of meages in 'dx' or 'tx' queue
|
||||
* ie RPC calls in progress. Does not count
|
||||
@ -229,7 +229,7 @@ struct qemud_client {
|
||||
|
||||
};
|
||||
|
||||
#define QEMUD_CLIENT_MAGIC 0x7788aaee
|
||||
# define QEMUD_CLIENT_MAGIC 0x7788aaee
|
||||
|
||||
|
||||
struct qemud_socket {
|
||||
@ -273,15 +273,15 @@ struct qemud_server {
|
||||
pthread_t eventThread;
|
||||
unsigned int hasEventThread :1;
|
||||
unsigned int quitEventThread :1;
|
||||
#ifdef HAVE_AVAHI
|
||||
# ifdef HAVE_AVAHI
|
||||
struct libvirtd_mdns *mdns;
|
||||
#endif
|
||||
#if HAVE_SASL
|
||||
# endif
|
||||
# if HAVE_SASL
|
||||
char **saslUsernameWhitelist;
|
||||
#endif
|
||||
#if HAVE_POLKIT0
|
||||
# endif
|
||||
# if HAVE_POLKIT0
|
||||
DBusConnection *sysbus;
|
||||
#endif
|
||||
# endif
|
||||
};
|
||||
|
||||
void qemudLog(int priority, const char *fmt, ...)
|
||||
@ -306,8 +306,8 @@ qemudClientMessageRelease(struct qemud_client *client,
|
||||
struct qemud_client_message *msg);
|
||||
|
||||
|
||||
#if HAVE_POLKIT
|
||||
# if HAVE_POLKIT
|
||||
int qemudGetSocketIdentity(int fd, uid_t *uid, pid_t *pid);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
@ -32,9 +32,6 @@
|
||||
# pidfile: @localstatedir@/run/libvirtd.pid
|
||||
#
|
||||
|
||||
# Sanity checks.
|
||||
[ -x @sbindir@/libvirtd ] || exit 0
|
||||
|
||||
# Source function library.
|
||||
. @sysconfdir@/rc.d/init.d/functions
|
||||
|
||||
@ -109,8 +106,8 @@ case "$1" in
|
||||
[ -f @localstatedir@/lock/subsys/$SERVICE ] && restart || :
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
|
||||
exit 1
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload|try-restart}"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
exit $RETVAL
|
||||
|
@ -1,4 +1,4 @@
|
||||
@localstatedir@/log/libvirt/qemu/*.log @localstatedir@/log/libvirt/uml/*.log @localstatedir@/log/libvirt/lxc/*.log {
|
||||
@localstatedir@/log/libvirt/lxc/*.log {
|
||||
weekly
|
||||
missingok
|
||||
rotate 4
|
9
daemon/libvirtd.qemu.logrotate.in
Normal file
9
daemon/libvirtd.qemu.logrotate.in
Normal file
@ -0,0 +1,9 @@
|
||||
@localstatedir@/log/libvirt/qemu/*.log {
|
||||
weekly
|
||||
missingok
|
||||
rotate 4
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
minsize 100k
|
||||
}
|
9
daemon/libvirtd.uml.logrotate.in
Normal file
9
daemon/libvirtd.uml.logrotate.in
Normal file
@ -0,0 +1,9 @@
|
||||
@localstatedir@/log/libvirt/uml/*.log {
|
||||
weekly
|
||||
missingok
|
||||
rotate 4
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
minsize 100k
|
||||
}
|
@ -25,7 +25,7 @@
|
||||
#include "internal.h"
|
||||
|
||||
#ifndef __VIRTD_MDNS_H__
|
||||
#define __VIRTD_MDNS_H__
|
||||
# define __VIRTD_MDNS_H__
|
||||
|
||||
struct libvirtd_mdns;
|
||||
struct libvirtd_mdns_group;
|
||||
|
1187
daemon/remote.c
1187
daemon/remote.c
File diff suppressed because it is too large
Load Diff
@ -22,17 +22,17 @@
|
||||
*/
|
||||
|
||||
#ifndef __LIBVIRTD_REMOTE_H__
|
||||
#define __LIBVIRTD_REMOTE_H__
|
||||
# define __LIBVIRTD_REMOTE_H__
|
||||
|
||||
|
||||
#include "libvirtd.h"
|
||||
# include "libvirtd.h"
|
||||
|
||||
typedef union {
|
||||
#include "remote_dispatch_args.h"
|
||||
# include "remote_dispatch_args.h"
|
||||
} dispatch_args;
|
||||
|
||||
typedef union {
|
||||
#include "remote_dispatch_ret.h"
|
||||
# include "remote_dispatch_ret.h"
|
||||
} dispatch_ret;
|
||||
|
||||
|
||||
|
@ -135,3 +135,31 @@
|
||||
remote_interface_is_active_args val_remote_interface_is_active_args;
|
||||
remote_cpu_compare_args val_remote_cpu_compare_args;
|
||||
remote_domain_memory_stats_args val_remote_domain_memory_stats_args;
|
||||
remote_domain_attach_device_flags_args val_remote_domain_attach_device_flags_args;
|
||||
remote_domain_detach_device_flags_args val_remote_domain_detach_device_flags_args;
|
||||
remote_cpu_baseline_args val_remote_cpu_baseline_args;
|
||||
remote_domain_get_job_info_args val_remote_domain_get_job_info_args;
|
||||
remote_domain_abort_job_args val_remote_domain_abort_job_args;
|
||||
remote_storage_vol_wipe_args val_remote_storage_vol_wipe_args;
|
||||
remote_domain_migrate_set_max_downtime_args val_remote_domain_migrate_set_max_downtime_args;
|
||||
remote_domain_events_register_any_args val_remote_domain_events_register_any_args;
|
||||
remote_domain_events_deregister_any_args val_remote_domain_events_deregister_any_args;
|
||||
remote_domain_update_device_flags_args val_remote_domain_update_device_flags_args;
|
||||
remote_nwfilter_lookup_by_name_args val_remote_nwfilter_lookup_by_name_args;
|
||||
remote_nwfilter_lookup_by_uuid_args val_remote_nwfilter_lookup_by_uuid_args;
|
||||
remote_nwfilter_get_xml_desc_args val_remote_nwfilter_get_xml_desc_args;
|
||||
remote_list_nwfilters_args val_remote_list_nwfilters_args;
|
||||
remote_nwfilter_define_xml_args val_remote_nwfilter_define_xml_args;
|
||||
remote_nwfilter_undefine_args val_remote_nwfilter_undefine_args;
|
||||
remote_domain_managed_save_args val_remote_domain_managed_save_args;
|
||||
remote_domain_has_managed_save_image_args val_remote_domain_has_managed_save_image_args;
|
||||
remote_domain_managed_save_remove_args val_remote_domain_managed_save_remove_args;
|
||||
remote_domain_snapshot_create_xml_args val_remote_domain_snapshot_create_xml_args;
|
||||
remote_domain_snapshot_dump_xml_args val_remote_domain_snapshot_dump_xml_args;
|
||||
remote_domain_snapshot_num_args val_remote_domain_snapshot_num_args;
|
||||
remote_domain_snapshot_list_names_args val_remote_domain_snapshot_list_names_args;
|
||||
remote_domain_snapshot_lookup_by_name_args val_remote_domain_snapshot_lookup_by_name_args;
|
||||
remote_domain_has_current_snapshot_args val_remote_domain_has_current_snapshot_args;
|
||||
remote_domain_snapshot_current_args val_remote_domain_snapshot_current_args;
|
||||
remote_domain_revert_to_snapshot_args val_remote_domain_revert_to_snapshot_args;
|
||||
remote_domain_snapshot_delete_args val_remote_domain_snapshot_delete_args;
|
||||
|
@ -50,6 +50,14 @@ static int remoteDispatchClose(
|
||||
remote_error *err,
|
||||
void *args,
|
||||
void *ret);
|
||||
static int remoteDispatchCpuBaseline(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_cpu_baseline_args *args,
|
||||
remote_cpu_baseline_ret *ret);
|
||||
static int remoteDispatchCpuCompare(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -58,6 +66,14 @@ static int remoteDispatchCpuCompare(
|
||||
remote_error *err,
|
||||
remote_cpu_compare_args *args,
|
||||
remote_cpu_compare_ret *ret);
|
||||
static int remoteDispatchDomainAbortJob(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_abort_job_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainAttachDevice(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -66,6 +82,14 @@ static int remoteDispatchDomainAttachDevice(
|
||||
remote_error *err,
|
||||
remote_domain_attach_device_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainAttachDeviceFlags(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_attach_device_flags_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainBlockPeek(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -130,6 +154,14 @@ static int remoteDispatchDomainDetachDevice(
|
||||
remote_error *err,
|
||||
remote_domain_detach_device_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainDetachDeviceFlags(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_detach_device_flags_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainDumpXml(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -146,6 +178,14 @@ static int remoteDispatchDomainEventsDeregister(
|
||||
remote_error *err,
|
||||
void *args,
|
||||
remote_domain_events_deregister_ret *ret);
|
||||
static int remoteDispatchDomainEventsDeregisterAny(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_events_deregister_any_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainEventsRegister(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -154,6 +194,14 @@ static int remoteDispatchDomainEventsRegister(
|
||||
remote_error *err,
|
||||
void *args,
|
||||
remote_domain_events_register_ret *ret);
|
||||
static int remoteDispatchDomainEventsRegisterAny(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_events_register_any_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainGetAutostart(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -170,6 +218,14 @@ static int remoteDispatchDomainGetInfo(
|
||||
remote_error *err,
|
||||
remote_domain_get_info_args *args,
|
||||
remote_domain_get_info_ret *ret);
|
||||
static int remoteDispatchDomainGetJobInfo(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_get_job_info_args *args,
|
||||
remote_domain_get_job_info_ret *ret);
|
||||
static int remoteDispatchDomainGetMaxMemory(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -226,6 +282,14 @@ static int remoteDispatchDomainGetVcpus(
|
||||
remote_error *err,
|
||||
remote_domain_get_vcpus_args *args,
|
||||
remote_domain_get_vcpus_ret *ret);
|
||||
static int remoteDispatchDomainHasManagedSaveImage(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_has_managed_save_image_args *args,
|
||||
remote_domain_has_managed_save_image_ret *ret);
|
||||
static int remoteDispatchDomainInterfaceStats(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -274,6 +338,22 @@ static int remoteDispatchDomainLookupByUuid(
|
||||
remote_error *err,
|
||||
remote_domain_lookup_by_uuid_args *args,
|
||||
remote_domain_lookup_by_uuid_ret *ret);
|
||||
static int remoteDispatchDomainManagedSave(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_managed_save_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainManagedSaveRemove(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_managed_save_remove_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainMemoryPeek(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -338,6 +418,14 @@ static int remoteDispatchDomainMigratePrepareTunnel(
|
||||
remote_error *err,
|
||||
remote_domain_migrate_prepare_tunnel_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainMigrateSetMaxDowntime(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_migrate_set_max_downtime_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainPinVcpu(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -426,6 +514,78 @@ static int remoteDispatchDomainShutdown(
|
||||
remote_error *err,
|
||||
remote_domain_shutdown_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainSnapshotCreateXml(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_snapshot_create_xml_args *args,
|
||||
remote_domain_snapshot_create_xml_ret *ret);
|
||||
static int remoteDispatchDomainSnapshotDumpXml(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_snapshot_dump_xml_args *args,
|
||||
remote_domain_snapshot_dump_xml_ret *ret);
|
||||
static int remoteDispatchDomainSnapshotNum(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_snapshot_num_args *args,
|
||||
remote_domain_snapshot_num_ret *ret);
|
||||
static int remoteDispatchDomainSnapshotListNames(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_snapshot_list_names_args *args,
|
||||
remote_domain_snapshot_list_names_ret *ret);
|
||||
static int remoteDispatchDomainSnapshotLookupByName(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_snapshot_lookup_by_name_args *args,
|
||||
remote_domain_snapshot_lookup_by_name_ret *ret);
|
||||
static int remoteDispatchDomainHasCurrentSnapshot(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_has_current_snapshot_args *args,
|
||||
remote_domain_has_current_snapshot_ret *ret);
|
||||
static int remoteDispatchDomainSnapshotCurrent(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_snapshot_current_args *args,
|
||||
remote_domain_snapshot_current_ret *ret);
|
||||
static int remoteDispatchDomainRevertToSnapshot(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_revert_to_snapshot_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainSnapshotDelete(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_snapshot_delete_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainSuspend(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -442,6 +602,14 @@ static int remoteDispatchDomainUndefine(
|
||||
remote_error *err,
|
||||
remote_domain_undefine_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainUpdateDeviceFlags(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_update_device_flags_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchDomainXmlFromNative(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -650,6 +818,14 @@ static int remoteDispatchListNetworks(
|
||||
remote_error *err,
|
||||
remote_list_networks_args *args,
|
||||
remote_list_networks_ret *ret);
|
||||
static int remoteDispatchListNwfilters(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_list_nwfilters_args *args,
|
||||
remote_list_nwfilters_ret *ret);
|
||||
static int remoteDispatchListSecrets(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -954,6 +1130,14 @@ static int remoteDispatchNumOfNetworks(
|
||||
remote_error *err,
|
||||
void *args,
|
||||
remote_num_of_networks_ret *ret);
|
||||
static int remoteDispatchNumOfNwfilters(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
void *args,
|
||||
remote_num_of_nwfilters_ret *ret);
|
||||
static int remoteDispatchNumOfSecrets(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -970,6 +1154,46 @@ static int remoteDispatchNumOfStoragePools(
|
||||
remote_error *err,
|
||||
void *args,
|
||||
remote_num_of_storage_pools_ret *ret);
|
||||
static int remoteDispatchNwfilterDefineXml(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_nwfilter_define_xml_args *args,
|
||||
remote_nwfilter_define_xml_ret *ret);
|
||||
static int remoteDispatchNwfilterGetXmlDesc(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_nwfilter_get_xml_desc_args *args,
|
||||
remote_nwfilter_get_xml_desc_ret *ret);
|
||||
static int remoteDispatchNwfilterLookupByName(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_nwfilter_lookup_by_name_args *args,
|
||||
remote_nwfilter_lookup_by_name_ret *ret);
|
||||
static int remoteDispatchNwfilterLookupByUuid(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_nwfilter_lookup_by_uuid_args *args,
|
||||
remote_nwfilter_lookup_by_uuid_ret *ret);
|
||||
static int remoteDispatchNwfilterUndefine(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_nwfilter_undefine_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchOpen(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -1258,6 +1482,14 @@ static int remoteDispatchStorageVolLookupByPath(
|
||||
remote_error *err,
|
||||
remote_storage_vol_lookup_by_path_args *args,
|
||||
remote_storage_vol_lookup_by_path_ret *ret);
|
||||
static int remoteDispatchStorageVolWipe(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_storage_vol_wipe_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchSupportsFeature(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
|
@ -117,3 +117,19 @@
|
||||
remote_get_lib_version_ret val_remote_get_lib_version_ret;
|
||||
remote_cpu_compare_ret val_remote_cpu_compare_ret;
|
||||
remote_domain_memory_stats_ret val_remote_domain_memory_stats_ret;
|
||||
remote_cpu_baseline_ret val_remote_cpu_baseline_ret;
|
||||
remote_domain_get_job_info_ret val_remote_domain_get_job_info_ret;
|
||||
remote_nwfilter_lookup_by_name_ret val_remote_nwfilter_lookup_by_name_ret;
|
||||
remote_nwfilter_lookup_by_uuid_ret val_remote_nwfilter_lookup_by_uuid_ret;
|
||||
remote_nwfilter_get_xml_desc_ret val_remote_nwfilter_get_xml_desc_ret;
|
||||
remote_num_of_nwfilters_ret val_remote_num_of_nwfilters_ret;
|
||||
remote_list_nwfilters_ret val_remote_list_nwfilters_ret;
|
||||
remote_nwfilter_define_xml_ret val_remote_nwfilter_define_xml_ret;
|
||||
remote_domain_has_managed_save_image_ret val_remote_domain_has_managed_save_image_ret;
|
||||
remote_domain_snapshot_create_xml_ret val_remote_domain_snapshot_create_xml_ret;
|
||||
remote_domain_snapshot_dump_xml_ret val_remote_domain_snapshot_dump_xml_ret;
|
||||
remote_domain_snapshot_num_ret val_remote_domain_snapshot_num_ret;
|
||||
remote_domain_snapshot_list_names_ret val_remote_domain_snapshot_list_names_ret;
|
||||
remote_domain_snapshot_lookup_by_name_ret val_remote_domain_snapshot_lookup_by_name_ret;
|
||||
remote_domain_has_current_snapshot_ret val_remote_domain_has_current_snapshot_ret;
|
||||
remote_domain_snapshot_current_ret val_remote_domain_snapshot_current_ret;
|
||||
|
@ -537,7 +537,7 @@
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_events_deregister_ret,
|
||||
},
|
||||
{ /* Async event DomainEvent => 107 */
|
||||
{ /* Async event DomainEventLifecycle => 107 */
|
||||
.fn = NULL,
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
@ -802,3 +802,173 @@
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_memory_stats_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_memory_stats_ret,
|
||||
},
|
||||
{ /* DomainAttachDeviceFlags => 160 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainAttachDeviceFlags,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_attach_device_flags_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* DomainDetachDeviceFlags => 161 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainDetachDeviceFlags,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_detach_device_flags_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* CpuBaseline => 162 */
|
||||
.fn = (dispatch_fn) remoteDispatchCpuBaseline,
|
||||
.args_filter = (xdrproc_t) xdr_remote_cpu_baseline_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_cpu_baseline_ret,
|
||||
},
|
||||
{ /* DomainGetJobInfo => 163 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainGetJobInfo,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_get_job_info_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_get_job_info_ret,
|
||||
},
|
||||
{ /* DomainAbortJob => 164 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainAbortJob,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_abort_job_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* StorageVolWipe => 165 */
|
||||
.fn = (dispatch_fn) remoteDispatchStorageVolWipe,
|
||||
.args_filter = (xdrproc_t) xdr_remote_storage_vol_wipe_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* DomainMigrateSetMaxDowntime => 166 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainMigrateSetMaxDowntime,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_migrate_set_max_downtime_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* DomainEventsRegisterAny => 167 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainEventsRegisterAny,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_events_register_any_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* DomainEventsDeregisterAny => 168 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainEventsDeregisterAny,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_events_deregister_any_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* Async event DomainEventReboot => 169 */
|
||||
.fn = NULL,
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* Async event DomainEventRtcChange => 170 */
|
||||
.fn = NULL,
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* Async event DomainEventWatchdog => 171 */
|
||||
.fn = NULL,
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* Async event DomainEventIoError => 172 */
|
||||
.fn = NULL,
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* Async event DomainEventGraphics => 173 */
|
||||
.fn = NULL,
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* DomainUpdateDeviceFlags => 174 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainUpdateDeviceFlags,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_update_device_flags_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* NwfilterLookupByName => 175 */
|
||||
.fn = (dispatch_fn) remoteDispatchNwfilterLookupByName,
|
||||
.args_filter = (xdrproc_t) xdr_remote_nwfilter_lookup_by_name_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_nwfilter_lookup_by_name_ret,
|
||||
},
|
||||
{ /* NwfilterLookupByUuid => 176 */
|
||||
.fn = (dispatch_fn) remoteDispatchNwfilterLookupByUuid,
|
||||
.args_filter = (xdrproc_t) xdr_remote_nwfilter_lookup_by_uuid_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_nwfilter_lookup_by_uuid_ret,
|
||||
},
|
||||
{ /* NwfilterGetXmlDesc => 177 */
|
||||
.fn = (dispatch_fn) remoteDispatchNwfilterGetXmlDesc,
|
||||
.args_filter = (xdrproc_t) xdr_remote_nwfilter_get_xml_desc_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_nwfilter_get_xml_desc_ret,
|
||||
},
|
||||
{ /* NumOfNwfilters => 178 */
|
||||
.fn = (dispatch_fn) remoteDispatchNumOfNwfilters,
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_num_of_nwfilters_ret,
|
||||
},
|
||||
{ /* ListNwfilters => 179 */
|
||||
.fn = (dispatch_fn) remoteDispatchListNwfilters,
|
||||
.args_filter = (xdrproc_t) xdr_remote_list_nwfilters_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_list_nwfilters_ret,
|
||||
},
|
||||
{ /* NwfilterDefineXml => 180 */
|
||||
.fn = (dispatch_fn) remoteDispatchNwfilterDefineXml,
|
||||
.args_filter = (xdrproc_t) xdr_remote_nwfilter_define_xml_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_nwfilter_define_xml_ret,
|
||||
},
|
||||
{ /* NwfilterUndefine => 181 */
|
||||
.fn = (dispatch_fn) remoteDispatchNwfilterUndefine,
|
||||
.args_filter = (xdrproc_t) xdr_remote_nwfilter_undefine_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* DomainManagedSave => 182 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainManagedSave,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_managed_save_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* DomainHasManagedSaveImage => 183 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainHasManagedSaveImage,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_has_managed_save_image_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_has_managed_save_image_ret,
|
||||
},
|
||||
{ /* DomainManagedSaveRemove => 184 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainManagedSaveRemove,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_managed_save_remove_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* DomainSnapshotCreateXml => 185 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainSnapshotCreateXml,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_snapshot_create_xml_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_snapshot_create_xml_ret,
|
||||
},
|
||||
{ /* DomainSnapshotDumpXml => 186 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainSnapshotDumpXml,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_snapshot_dump_xml_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_snapshot_dump_xml_ret,
|
||||
},
|
||||
{ /* DomainSnapshotNum => 187 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainSnapshotNum,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_snapshot_num_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_snapshot_num_ret,
|
||||
},
|
||||
{ /* DomainSnapshotListNames => 188 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainSnapshotListNames,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_snapshot_list_names_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_snapshot_list_names_ret,
|
||||
},
|
||||
{ /* DomainSnapshotLookupByName => 189 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainSnapshotLookupByName,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_snapshot_lookup_by_name_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_snapshot_lookup_by_name_ret,
|
||||
},
|
||||
{ /* DomainHasCurrentSnapshot => 190 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainHasCurrentSnapshot,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_has_current_snapshot_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_has_current_snapshot_ret,
|
||||
},
|
||||
{ /* DomainSnapshotCurrent => 191 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainSnapshotCurrent,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_snapshot_current_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_snapshot_current_ret,
|
||||
},
|
||||
{ /* DomainRevertToSnapshot => 192 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainRevertToSnapshot,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_revert_to_snapshot_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* DomainSnapshotDelete => 193 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainSnapshotDelete,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_snapshot_delete_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
|
@ -22,9 +22,9 @@
|
||||
|
||||
|
||||
#ifndef __LIBVIRTD_STREAM_H__
|
||||
#define __LIBVIRTD_STREAM_H__
|
||||
# define __LIBVIRTD_STREAM_H__
|
||||
|
||||
#include "libvirtd.h"
|
||||
# include "libvirtd.h"
|
||||
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@ apipng = \
|
||||
html/home.png \
|
||||
html/right.png
|
||||
|
||||
devhelphtml = \
|
||||
devhelphtml = \
|
||||
devhelp/libvirt.devhelp \
|
||||
devhelp/index.html \
|
||||
devhelp/general.html \
|
||||
@ -76,9 +76,10 @@ EXTRA_DIST= \
|
||||
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
|
||||
$(xml) $(fig) $(png) \
|
||||
$(patches) \
|
||||
sitemap.html.in \
|
||||
ChangeLog.awk
|
||||
|
||||
CLEANFILES = $(dot_html) $(apihtml) $(devhelphtml)
|
||||
MAINTAINERCLEANFILES = $(dot_html) $(apihtml) $(devhelphtml)
|
||||
|
||||
all: web
|
||||
|
||||
@ -105,7 +106,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl
|
||||
$(XSLTPROC) --stringparam pagename $$name --nonet --html $(top_srcdir)/docs/site.xsl $< > $@ || (rm $@ && exit 1) ; fi )
|
||||
|
||||
%.html: %.html.tmp
|
||||
@(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
|
||||
@(if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
|
||||
if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
|
||||
echo "Validating $@" ; \
|
||||
$(XMLLINT) --nonet --format --valid $< > $@ || (rm $@ && exit 1) ; \
|
||||
@ -116,22 +117,26 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Rebuilding the HTML pages from the XML API" ; \
|
||||
$(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
|
||||
-@(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
|
||||
if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
|
||||
-@(if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
|
||||
if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" \
|
||||
> /dev/null ; then \
|
||||
echo "Validating the resulting XHTML pages" ; \
|
||||
$(XMLLINT) --nonet --valid --noout html/*.html ; \
|
||||
else echo "missing XHTML1 DTD" ; fi ; fi );
|
||||
|
||||
devhelp/index.html devhelp/libvirt.devhelp: libvirt-api.xml $(devhelpxsl)
|
||||
$(devhelphtml): libvirt-api.xml $(devhelpxsl)
|
||||
-@(echo Rebuilding devhelp files)
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
$(XSLTPROC) --nonet -o devhelp/libvirt.devhelp $(top_srcdir)/docs/devhelp/devhelp.xsl $(top_srcdir)/docs/libvirt-api.xml ; fi );
|
||||
$(XSLTPROC) --nonet -o devhelp/libvirt.devhelp \
|
||||
$(top_srcdir)/docs/devhelp/devhelp.xsl libvirt-api.xml ; fi );
|
||||
|
||||
html/%-%.html html/%-virterror.html %-api.xml %-refs.xml: $(srcdir)/apibuild.py
|
||||
-srcdir=$(srcdir) $(srcdir)/apibuild.py
|
||||
|
||||
libvirt-api.xml libvirt-refs.xml: apibuild.py \
|
||||
$(srcdir)/../include/libvirt/*.h \
|
||||
$(srcdir)/../src/libvirt.c $(srcdir)/../src/util/virterror.c
|
||||
-(./apibuild.py)
|
||||
html/%-%.html html/%-virterror.html %-api.xml %-refs.xml: \
|
||||
$(srcdir)/../include/%/*.h \
|
||||
$(srcdir)/../src/%.c \
|
||||
$(srcdir)/../src/util/virterror.c
|
||||
|
||||
clean-local:
|
||||
rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
|
||||
|
@ -141,7 +141,7 @@ index b84729f..4f73baf 100644
|
||||
+ parent_host,
|
||||
+ operation_file) < 0) {
|
||||
+
|
||||
+ virReportOOMError(conn);
|
||||
+ virReportOOMError();
|
||||
+ retval = -1;
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
@ -151,7 +151,7 @@ index b84729f..4f73baf 100644
|
||||
+ fd = open(operation_path, O_WRONLY);
|
||||
+
|
||||
+ if (fd < 0) {
|
||||
+ virReportSystemError(conn, errno,
|
||||
+ virReportSystemError(errno,
|
||||
+ _("Could not open '%s' for vport operation"),
|
||||
+ operation_path);
|
||||
+ retval = -1;
|
||||
@ -163,7 +163,7 @@ index b84729f..4f73baf 100644
|
||||
+ wwpn,
|
||||
+ wwnn) < 0) {
|
||||
+
|
||||
+ virReportOOMError(conn);
|
||||
+ virReportOOMError();
|
||||
+ retval = -1;
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
@ -171,7 +171,7 @@ index b84729f..4f73baf 100644
|
||||
+ towrite = strlen(vport_name);
|
||||
+ written = safewrite(fd, vport_name, towrite);
|
||||
+ if (written != towrite) {
|
||||
+ virReportSystemError(conn, errno,
|
||||
+ virReportSystemError(errno,
|
||||
+ _("Write of '%s' to '%s' during "
|
||||
+ "vport create/delete failed "
|
||||
+ "(towrite: %lu written: %d)"),
|
||||
@ -223,7 +223,7 @@ index b84729f..4f73baf 100644
|
||||
+ VIR_FREE(wwnn);
|
||||
+ VIR_FREE(wwpn);
|
||||
+ ret = -1;
|
||||
+ virReportOOMError(conn);
|
||||
+ virReportOOMError();
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
@ -431,7 +431,7 @@ index b84729f..4f73baf 100644
|
||||
+ obj = NULL;
|
||||
+
|
||||
+ if (parent_name == NULL) {
|
||||
+ virReportOOMError(dev->conn);
|
||||
+ virReportOOMError();
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
@ -478,7 +478,7 @@ index b84729f..4f73baf 100644
|
||||
+ * If this fails for any reason, we still have the backup of polling for
|
||||
+ * 5 seconds for device nodes.
|
||||
+ */
|
||||
+ virRun(conn, settleprog, &exitstatus);
|
||||
+ virRun(settleprog, &exitstatus);
|
||||
+}
|
||||
+#else
|
||||
+void virNodeDeviceWaitForDevices(virConnectPtr conn ATTRIBUTE_UNUSED) {}
|
||||
@ -550,7 +550,7 @@ index 6e04112..5b35b60 100644
|
||||
+{
|
||||
+ char *s;
|
||||
+
|
||||
+ s = virXPathString(conn, xpath, ctxt);
|
||||
+ s = virXPathString(xpath, ctxt);
|
||||
+ if (s == NULL) {
|
||||
+ virNodeDeviceReportError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
+ missing_error_fmt,
|
||||
@ -611,7 +611,7 @@ index 6e04112..5b35b60 100644
|
||||
goto out;
|
||||
+ }
|
||||
+
|
||||
+ if ((n = virXPathNodeSet(conn, "./capability", ctxt, &nodes)) < 0) {
|
||||
+ if ((n = virXPathNodeSet("./capability", ctxt, &nodes)) < 0) {
|
||||
+ virNodeDeviceReportError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("error parsing SCSI host capabilities for '%s'"),
|
||||
+ def->name);
|
||||
@ -713,9 +713,9 @@ index 6e04112..5b35b60 100644
|
||||
}
|
||||
|
||||
/* Extract device name */
|
||||
- def->name = virXPathString(conn, "string(./name[1])", ctxt);
|
||||
- def->name = virXPathString("string(./name[1])", ctxt);
|
||||
+ if (create == EXISTING_DEVICE) {
|
||||
+ def->name = virXPathString(conn, "string(./name[1])", ctxt);
|
||||
+ def->name = virXPathString("string(./name[1])", ctxt);
|
||||
+ } else {
|
||||
+ def->name = strdup("new device");
|
||||
+ }
|
||||
@ -964,7 +964,7 @@ index 0000000..1deb6d2
|
||||
+ if (virAsprintf(&sysfs_path, "%s/host%d",
|
||||
+ LINUX_SYSFS_FC_HOST_PREFIX,
|
||||
+ d->scsi_host.host) < 0) {
|
||||
+ virReportOOMError(NULL);
|
||||
+ virReportOOMError();
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
@ -977,7 +977,7 @@ index 0000000..1deb6d2
|
||||
+
|
||||
+ if (virAsprintf(&wwnn_path, "%s/node_name",
|
||||
+ sysfs_path) < 0) {
|
||||
+ virReportOOMError(NULL);
|
||||
+ virReportOOMError();
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
@ -1002,7 +1002,7 @@ index 0000000..1deb6d2
|
||||
+
|
||||
+ d->scsi_host.wwnn = strndup(p, sizeof(buf));
|
||||
+ if (d->scsi_host.wwnn == NULL) {
|
||||
+ virReportOOMError(NULL);
|
||||
+ virReportOOMError();
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
@ -1013,7 +1013,7 @@ index 0000000..1deb6d2
|
||||
+
|
||||
+ if (virAsprintf(&wwpn_path, "%s/port_name",
|
||||
+ sysfs_path) < 0) {
|
||||
+ virReportOOMError(NULL);
|
||||
+ virReportOOMError();
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
@ -1038,7 +1038,7 @@ index 0000000..1deb6d2
|
||||
+
|
||||
+ d->scsi_host.wwpn = strndup(p, sizeof(buf));
|
||||
+ if (d->scsi_host.wwpn == NULL) {
|
||||
+ virReportOOMError(NULL);
|
||||
+ virReportOOMError();
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
@ -1066,7 +1066,7 @@ index 0000000..1deb6d2
|
||||
+ if (virAsprintf(&sysfs_path, "%s/host%d/vport_create",
|
||||
+ LINUX_SYSFS_FC_HOST_PREFIX,
|
||||
+ d->scsi_host.host) < 0) {
|
||||
+ virReportOOMError(NULL);
|
||||
+ virReportOOMError();
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
@ -1131,7 +1131,7 @@ index b154140..74759cf 100644
|
||||
- * If this fails for any reason, we still have the backup of polling for
|
||||
- * 5 seconds for device nodes.
|
||||
- */
|
||||
- virRun(conn, settleprog, &exitstatus);
|
||||
- virRun(settleprog, &exitstatus);
|
||||
+ virNodeDeviceWaitForDevices(conn);
|
||||
+ return;
|
||||
}
|
||||
|
@ -11,24 +11,23 @@ diff --git a/src/virsh.c b/src/virsh.c
|
||||
index cb32ede..ab2a2b7 100644
|
||||
--- a/src/virsh.c
|
||||
+++ b/src/virsh.c
|
||||
@@ -2962,6 +2962,107 @@ cmdPoolCreate(vshControl *ctl, const vshCmd *cmd)
|
||||
@@ -2962,6 +2962,106 @@ cmdPoolCreate(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
|
||||
/*
|
||||
+ * "nodedev-create" command
|
||||
+ */
|
||||
+static const vshCmdInfo info_node_device_create[] = {
|
||||
+ {"help", gettext_noop("create a device defined "
|
||||
+ "by an XML file on the node")},
|
||||
+ {"desc", gettext_noop("Create a device on the node. Note that this "
|
||||
+ "command creates devices on the physical host "
|
||||
+ "that can then be assigned to a virtual machine.")},
|
||||
+ {"help", N_("create a device defined by an XML file on the node")},
|
||||
+ {"desc", N_("Create a device on the node. Note that this "
|
||||
+ "command creates devices on the physical host "
|
||||
+ "that can then be assigned to a virtual machine.")},
|
||||
+ {NULL, NULL}
|
||||
+};
|
||||
+
|
||||
+static const vshCmdOptDef opts_node_device_create[] = {
|
||||
+ {"file", VSH_OT_DATA, VSH_OFLAG_REQ,
|
||||
+ gettext_noop("file containing an XML description of the device")},
|
||||
+ N_("file containing an XML description of the device")},
|
||||
+ {NULL, 0, 0, NULL}
|
||||
+};
|
||||
+
|
||||
@ -72,15 +71,15 @@ index cb32ede..ab2a2b7 100644
|
||||
+ * "nodedev-destroy" command
|
||||
+ */
|
||||
+static const vshCmdInfo info_node_device_destroy[] = {
|
||||
+ {"help", gettext_noop("destroy a device on the node")},
|
||||
+ {"desc", gettext_noop("Destroy a device on the node. Note that this "
|
||||
+ "command destroys devices on the physical host ")},
|
||||
+ {"help", N_("destroy a device on the node")},
|
||||
+ {"desc", N_("Destroy a device on the node. Note that this "
|
||||
+ "command destroys devices on the physical host")},
|
||||
+ {NULL, NULL}
|
||||
+};
|
||||
+
|
||||
+static const vshCmdOptDef opts_node_device_destroy[] = {
|
||||
+ {"name", VSH_OT_DATA, VSH_OFLAG_REQ,
|
||||
+ gettext_noop("name of the device to be destroyed")},
|
||||
+ N_("name of the device to be destroyed")},
|
||||
+ {NULL, 0, 0, NULL}
|
||||
+};
|
||||
+
|
||||
|
@ -28,6 +28,7 @@ ignored_words = {
|
||||
"ATTRIBUTE_UNUSED": (0, "macro keyword"),
|
||||
"ATTRIBUTE_SENTINEL": (0, "macro keyword"),
|
||||
"VIR_DEPRECATED": (0, "macro keyword"),
|
||||
"VIR_EXPORT_VAR": (0, "macro keyword"),
|
||||
"WINAPI": (0, "Windows keyword"),
|
||||
"__declspec": (3, "Windows keyword"),
|
||||
"__stdcall": (0, "Windows keyword"),
|
||||
@ -2102,10 +2103,14 @@ class docBuilder:
|
||||
|
||||
def rebuild():
|
||||
builder = None
|
||||
if glob.glob("../src/libvirt.c") != [] :
|
||||
srcdir = os.environ["srcdir"]
|
||||
if glob.glob(srcdir + "/../src/libvirt.c") != [] :
|
||||
print "Rebuilding API description for libvirt"
|
||||
builder = docBuilder("libvirt", ["../src", "../src/util", "../include/libvirt"],
|
||||
[])
|
||||
builder = docBuilder("libvirt",
|
||||
[srcdir + "/../src",
|
||||
srcdir + "/../src/util",
|
||||
srcdir + "/../include/libvirt"],
|
||||
[])
|
||||
elif glob.glob("src/libvirt.c") != [] :
|
||||
print "Rebuilding API description for libvir"
|
||||
builder = docBuilder("libvirt", ["src", "src/util", "include/libvirt"],
|
||||
|
@ -83,7 +83,7 @@ drivers present in driver.h:</p>
|
||||
<li>xen_internal: provide the implementation of the functions possible via
|
||||
direct hypervisor access</li>
|
||||
<li>proxy_internal: provide read-only Xen access via a proxy, the proxy code
|
||||
is in the <code>proxy/</code>directory.</li>
|
||||
is in the <code>proxy/</code> directory.</li>
|
||||
<li>xm_internal: provide support for Xen defined but not running
|
||||
domains.</li>
|
||||
<li>qemu_internal: implement the driver functions for QEmu and
|
||||
|
@ -72,7 +72,7 @@ available. The two libvirt daemon actions available are named <code>org.libvirt.
|
||||
for the RO socket, and <code>org.libvirt.unix.manage</code> for the RW socket.
|
||||
</p>
|
||||
<p>
|
||||
As an example, to allow a user <code>fred</code>full access to the RW socket,
|
||||
As an example, to allow a user <code>fred</code> full access to the RW socket,
|
||||
while requiring <code>joe</code> to authenticate with the admin password,
|
||||
would require adding the following snippet to <code>PolicyKit.conf</code>.
|
||||
</p>
|
||||
|
@ -21,7 +21,7 @@
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt><a href="">libvirt-users@redhat.com</a></dt>
|
||||
<dt><a href="https://www.redhat.com/archives/libvirt-users/">libvirt-users@redhat.com</a></dt>
|
||||
<dd>This list a place for discussions involving libvirt <strong>users</strong>. Topics for discussion include
|
||||
<ul>
|
||||
<li>Usage of libvirt / virsh</li>
|
||||
|
@ -32,6 +32,13 @@ gsx://example.com (GSX over HTTPS)
|
||||
esx://example.com/?transport=http (ESX over HTTP)
|
||||
esx://example.com/?no_verify=1 (ESX over HTTPS, but doesn't verify the server's SSL certificate)
|
||||
</pre>
|
||||
<p>
|
||||
<strong>Note</strong>: In contrast to other drivers, the ESX driver is
|
||||
a client-side-only driver. It connects to the ESX server using HTTP(S).
|
||||
Therefore, the <a href="remote.html">remote transport mechanism</a>
|
||||
provided by the remote driver and libvirtd will not work, and you
|
||||
cannot use URIs like <code>esx+ssh://example.com</code>.
|
||||
</p>
|
||||
|
||||
|
||||
<h3><a name="uriformat">URI Format</a></h3>
|
||||
@ -275,6 +282,10 @@ ethernet0.checkMACAddress = "false"
|
||||
<dd>
|
||||
LSI Logic SCSI controller for recent guests.
|
||||
</dd>
|
||||
<dt><code>lsisas1068</code></dt>
|
||||
<dd>
|
||||
LSI Logic SAS 1068 controller.
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
Here a domain XML snippet:
|
||||
|
@ -234,9 +234,9 @@ vif = [ "mac=00:16:3e:60:36:ba,bridge=virbr0,script=vif-bridge,vifname=vif5.0" ]
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<features>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
</features>
|
||||
<clock sync="localtime"/>
|
||||
<devices>
|
||||
@ -288,9 +288,9 @@ vif = [ "mac=00:16:3e:60:36:ba,bridge=virbr0,script=vif-bridge,vifname=vif5.0" ]
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<features>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
</features>
|
||||
<clock sync="localtime"/>
|
||||
<devices>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -57,7 +57,8 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<bridge name="virbr0" />
|
||||
<bridge name="virbr0" stp="on" delay="5"/>
|
||||
<domain name="example"/>
|
||||
<forward mode="nat" dev="eth0"/>
|
||||
...</pre>
|
||||
|
||||
@ -71,8 +72,17 @@
|
||||
device names started with the prefix <code>vir</code>, but the name
|
||||
<code>virbr0</code> is reserved for the "default" virtual network.
|
||||
This element should always be provided when defining a new network.
|
||||
Attribute <code>stp</code> specifies if Spanning Tree Protocol is
|
||||
'on' or 'off' (default is 'on'). Attribute <code>delay</code> sets
|
||||
the bridge's forward delay value in seconds (default is 0).
|
||||
<span class="since">Since 0.3.0</span>
|
||||
</dd>
|
||||
<dt><code>domain</code></dt>
|
||||
<dd>
|
||||
The <code>name</code> attribute on the <code>domain</code> element
|
||||
defines the DNS domain of the DHCP server. This element is optional.
|
||||
<span class="since">Since 0.4.5</span>
|
||||
</dd>
|
||||
<dt><code>forward</code></dt>
|
||||
<dd>Inclusion of the <code>forward</code> element indicates that
|
||||
the virtual network is to be connected to the physical LAN. If
|
||||
|
72
docs/formatsnapshot.html.in
Normal file
72
docs/formatsnapshot.html.in
Normal file
@ -0,0 +1,72 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>Snapshot XML format</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<h2><a name="SnapshotAttributes">Snapshot XML</a></h2>
|
||||
|
||||
<p>
|
||||
Attributes of libvirt snapshots are stored as child elements of
|
||||
the <code>domainsnapshot</code> element. At snapshot creation
|
||||
time, only the <code>name</code> and <code>description</code>
|
||||
elements are settable; the rest of the fields are informational
|
||||
(and readonly) and will be filled in by libvirt when the
|
||||
snapshot is created.
|
||||
</p>
|
||||
<p>
|
||||
The top-level <code>domainsnapshot</code> element may contain
|
||||
the following elements:
|
||||
</p>
|
||||
<dl>
|
||||
<dt><code>name</code></dt>
|
||||
<dd>The name for this snapshot. If the name is specified when
|
||||
initially creating the snapshot, then the snapshot will have
|
||||
that particular name. If the name is omitted when initially
|
||||
creating the snapshot, then libvirt will make up a name for the snapshot.
|
||||
</dd>
|
||||
<dt><code>description</code></dt>
|
||||
<dd>A human-readable description of the snapshot. If the
|
||||
description is omitted when initially creating the snapshot,
|
||||
then this field will be empty.
|
||||
</dd>
|
||||
<dt><code>creationTime</code></dt>
|
||||
<dd>The time this snapshot was created. The time is specified
|
||||
in seconds since the Epoch, UTC (i.e. Unix time). Readonly.
|
||||
</dd>
|
||||
<dt><code>state</code></dt>
|
||||
<dd>The state of the domain at the time this snapshot was
|
||||
taken. When the domain is reverted to this snapshot, the domain's state
|
||||
will be set to whatever is in this field. Readonly.
|
||||
</dd>
|
||||
<dt><code>parent</code></dt>
|
||||
<dd>The parent of this snapshot. This element contains exactly
|
||||
one child element, name. This specifies the name of the parent
|
||||
snapshot of this snapshot, and is used to represent trees of
|
||||
snapshots. Readonly.
|
||||
</dd>
|
||||
<dt><code>domain</code></dt>
|
||||
<dd>The domain that this snapshot was taken against. This
|
||||
element contains exactly one child element, uuid. This
|
||||
specifies the uuid of the domain that this snapshot was taken
|
||||
against. Readonly.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name="example">Example</a></h2>
|
||||
|
||||
<pre>
|
||||
<domainsnapshot>
|
||||
<name>os-updates</name>
|
||||
<description>Snapshot of OS install and updates</description>
|
||||
<state>running</state>
|
||||
<creationTime>1270477159</creationTime>
|
||||
<parent>
|
||||
<name>bare-os-install</name>
|
||||
</parent>
|
||||
<domain>
|
||||
<uuid>93a5c045-6457-2c09-e56c-927cdf34e178</uuid>
|
||||
</domain>
|
||||
</domainsnapshot></pre>
|
||||
</body>
|
||||
</html>
|
@ -84,6 +84,11 @@
|
||||
only occur once. Contains a single attribute <code>path</code>
|
||||
which is the fully qualified path to the block device node.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>adapter</code></dt>
|
||||
<dd>Provides the source for pools backed by SCSI adapters. May
|
||||
only occur once. Contains a single attribute <code>name</code>
|
||||
which is the SCSI adapter name (ex. "host1").
|
||||
<span class="since">Since 0.6.2</span></dd>
|
||||
<dt><code>host</code></dt>
|
||||
<dd>Provides the source for pools backed by storage from a
|
||||
remote server. Will be used in combination with a <code>directory</code>
|
||||
@ -204,8 +209,8 @@
|
||||
This is mandatory when defining a volume. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>key</code></dt>
|
||||
<dd>Providing an identifier for the volume which is globally unique.
|
||||
This is optional when defining a volume, a key will be generated if
|
||||
omitted. <span class="since">Since 0.4.1</span></dd>
|
||||
This cannot be set when creating a volume: it is always generated.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>allocation</code></dt>
|
||||
<dd>Providing the total storage allocation for the volume. This
|
||||
may be smaller than the logical capacity if the volume is sparsely
|
||||
@ -215,10 +220,18 @@
|
||||
allocated at time of creation. If set to a value smaller than the
|
||||
capacity, the pool has the <strong>option</strong> of deciding
|
||||
to sparsely allocate a volume. It does not have to honour requests
|
||||
for sparse allocation though. <span class="since">Since 0.4.1</span></dd>
|
||||
for sparse allocation though.<br/>
|
||||
<br/>
|
||||
By default this is specified in bytes, but an optional
|
||||
<code>unit</code> can be specified to adjust the passed value.
|
||||
Values can be: 'K' (kilobytes), 'M' (megabytes), 'G' (gigabytes),
|
||||
'T' (terabytes), 'P' (petabytes), or 'E' (exabytes).
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>capacity</code></dt>
|
||||
<dd>Providing the logical capacity for the volume. This value is
|
||||
in bytes. This is compulsory when creating a volume.
|
||||
in bytes by default, but a <code>unit</code> attribute can be
|
||||
specified with the same semantics as for <code>allocation</code>
|
||||
This is compulsory when creating a volume.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>source</code></dt>
|
||||
<dd>Provides information about the underlying storage allocation
|
||||
@ -292,7 +305,7 @@
|
||||
...
|
||||
<backingStore>
|
||||
<path>/var/lib/virt/images/master.img</path>
|
||||
<format>raw</format>
|
||||
<format type='raw'/>
|
||||
<permissions>
|
||||
<owner>107</owner>
|
||||
<group>107</group>
|
||||
@ -312,7 +325,8 @@
|
||||
<dd>Provides information about the pool specific backing store format.
|
||||
For disk pools it will provide the partition type. For filesystem
|
||||
or directory pools it will provide the file format type, eg cow,
|
||||
qcow, vmdk, raw. Consult the pool-specific docs for the list of valid
|
||||
qcow, vmdk, raw. The actual format is specified via the type attribute.
|
||||
Consult the pool-specific docs for the list of valid
|
||||
values. Most file formats require a backing store of the same format,
|
||||
however, the qcow2 format allows a different backing store format.
|
||||
<span class="since">Since 0.6.0</span></dd>
|
||||
|
@ -43,6 +43,23 @@
|
||||
The latter test checks for memory leaks.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you encounter any failing tests, the VIR_TEST_DEBUG
|
||||
environment variable may provide extra information to debug
|
||||
the failures. Larger values of VIR_TEST_DEBUG may provide
|
||||
larger amounts of information:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
VIR_TEST_DEBUG=1 make check (or)
|
||||
VIR_TEST_DEBUG=2 make check</pre>
|
||||
<p>
|
||||
Also, individual tests can be run from inside the 'tests/'
|
||||
directory, like:
|
||||
</p>
|
||||
<pre>
|
||||
./qemuxml2xmltest</pre>
|
||||
|
||||
<li>Update tests and/or documentation, particularly if you are adding
|
||||
a new feature or changing the output of a program.</li>
|
||||
</ol>
|
||||
@ -100,13 +117,31 @@
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Note that sometimes you'll have to postprocess that output further, by
|
||||
Note that sometimes you'll have to post-process that output further, by
|
||||
piping it through "expand -i", since some leading TABs can get through.
|
||||
Usually they're in macro definitions or strings, and should be converted
|
||||
anyhow.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a href="types">Preprocessor</a></h2>
|
||||
|
||||
<p>
|
||||
For variadic macros, stick with C99 syntax:
|
||||
</p>
|
||||
<pre>
|
||||
#define vshPrint(_ctl, ...) fprintf(stdout, __VA_ARGS__)
|
||||
</pre>
|
||||
|
||||
<p>Use parenthesis when checking if a macro is defined, and use
|
||||
indentation to track nesting:
|
||||
</p>
|
||||
<pre>
|
||||
#if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE)
|
||||
# define fallocate(a,ignored,b,c) posix_fallocate(a,b,c)
|
||||
#endif
|
||||
</pre>
|
||||
|
||||
<h2><a href="types">C types</a></h2>
|
||||
|
||||
<p>
|
||||
@ -192,8 +227,8 @@
|
||||
virDomainPtr domain;
|
||||
|
||||
if (VIR_ALLOC(domain) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
</pre></li>
|
||||
|
||||
@ -204,8 +239,8 @@
|
||||
int ndomains = 10;
|
||||
|
||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
</pre></li>
|
||||
|
||||
@ -216,8 +251,8 @@
|
||||
int ndomains = 10;
|
||||
|
||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
</pre></li>
|
||||
|
||||
@ -227,8 +262,8 @@
|
||||
ndomains = 20
|
||||
|
||||
if (VIR_REALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
</pre></li>
|
||||
|
||||
@ -241,7 +276,7 @@
|
||||
|
||||
|
||||
|
||||
<h2><a name="string">String comparisons</a></h2>
|
||||
<h2><a name="string_comparision">String comparisons</a></h2>
|
||||
|
||||
<p>
|
||||
Do not use the strcmp, strncmp, etc functions directly. Instead use
|
||||
@ -288,6 +323,46 @@
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a name="string_copying">String copying</a></h2>
|
||||
|
||||
<p>
|
||||
Do not use the strncpy function. According to the man page, it
|
||||
does <b>not</b> guarantee a NULL-terminated buffer, which makes
|
||||
it extremely dangerous to use. Instead, use one of the
|
||||
functionally equivalent functions:
|
||||
</p>
|
||||
<pre>virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)</pre>
|
||||
<p>
|
||||
The first three arguments have the same meaning as for strncpy;
|
||||
namely the destination, source, and number of bytes to copy,
|
||||
respectively. The last argument is the number of bytes
|
||||
available in the destination string; if a copy of the source
|
||||
string (including a \0) will not fit into the destination, no
|
||||
bytes are copied and the routine returns NULL. Otherwise, n
|
||||
bytes from the source are copied into the destination and a
|
||||
trailing \0 is appended.
|
||||
</p>
|
||||
|
||||
<pre>virStrcpy(char *dest, const char *src, size_t destbytes)</pre>
|
||||
|
||||
<p>
|
||||
Use this variant if you know you want to copy the entire src
|
||||
string into dest. Note that this is a macro, so arguments could
|
||||
be evaluated more than once. This is equivalent to
|
||||
virStrncpy(dest, src, strlen(src), destbytes)
|
||||
</p>
|
||||
|
||||
<pre>virStrcpyStatic(char *dest, const char *src)</pre>
|
||||
|
||||
<p>
|
||||
Use this variant if you know you want to copy the entire src
|
||||
string into dest *and* you know that your destination string is
|
||||
a static string (i.e. that sizeof(dest) returns something
|
||||
meaningful). Note that this is a macro, so arguments could be
|
||||
evaluated more than once. This is equivalent to
|
||||
virStrncpy(dest, src, strlen(src), sizeof(dest)).
|
||||
</p>
|
||||
|
||||
<h2><a name="strbuf">Variable length string buffer</a></h2>
|
||||
|
||||
<p>
|
||||
@ -314,7 +389,7 @@
|
||||
|
||||
if (virBufferError(&buf)) {
|
||||
virBufferFreeAndReset(&buf);
|
||||
virReportOOMError(...);
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -348,7 +423,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#if HAVE_NUMACTL Some system includes aren't supported
|
||||
#include <numa.h> everywhere so need these #if defences.
|
||||
# include <numa.h> everywhere so need these #if guards.
|
||||
#endif
|
||||
|
||||
#include "internal.h" Include this first, after system includes.
|
||||
@ -389,40 +464,113 @@
|
||||
of arguments.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2><a name="committers">Libvirt commiters guidelines</a></h2>
|
||||
<h2><a name="goto">Use of goto</a></h2>
|
||||
|
||||
<p>
|
||||
The AUTHORS files indicates the list of people with commit acces right
|
||||
The use of goto is not forbidden, and goto is widely used
|
||||
throughout libvirt. While the uncontrolled use of goto will
|
||||
quickly lead to unmaintainable code, there is a place for it in
|
||||
well structured code where its use increases readability and
|
||||
maintainability. In general, if goto is used for error
|
||||
recovery, it's likely to be ok, otherwise, be cautious or avoid
|
||||
it all together.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The typical use of goto is to jump to cleanup code in the case
|
||||
of a long list of actions, any of which may fail and cause the
|
||||
entire operation to fail. In this case, a function will have a
|
||||
single label at the end of the function. It's almost always ok
|
||||
to use this style. In particular, if the cleanup code only
|
||||
involves free'ing memory, then having multiple labels is
|
||||
overkill. VIR_FREE() and every function named XXXFree() in
|
||||
libvirt is required to handle NULL as its arg. Thus you can
|
||||
safely call free on all the variables even if they were not yet
|
||||
allocated (yes they have to have been initialized to NULL).
|
||||
This is much simpler and clearer than having multiple labels.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There are a couple of signs that a particular use of goto is not
|
||||
ok:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>You're using multiple labels. If you find yourself using
|
||||
multiple labels, you're strongly encouraged to rework your code
|
||||
to eliminate all but one of them.</li>
|
||||
<li>The goto jumps back up to a point above the current line of
|
||||
code being executed. Please use some combination of looping
|
||||
constructs to re-execute code instead; it's almost certainly
|
||||
going to be more understandable by others. One well-known
|
||||
exception to this rule is restarting an i/o operation following
|
||||
EINTR.</li>
|
||||
<li>The goto jumps down to an arbitrary place in the middle of a
|
||||
function followed by further potentially failing calls. You
|
||||
should almost certainly be using a conditional and a block
|
||||
instead of a goto. Perhaps some of your function's logic would
|
||||
be better pulled out into a helper function.</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Although libvirt does not encourage the Linux kernel wind/unwind
|
||||
style of multiple labels, there's a good general discussion of
|
||||
the issue archived at
|
||||
<a href=http://kerneltrap.org/node/553/2131>KernelTrap</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When using goto, please use one of these standard labels if it
|
||||
makes sense:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
error: A path only taken upon return with an error code
|
||||
cleanup: A path taken upon return with success code + optional error
|
||||
no_memory: A path only taken upon return with an OOM error code
|
||||
retry: If needing to jump upwards (eg retry on EINTR)</pre>
|
||||
|
||||
|
||||
|
||||
<h2><a name="committers">Libvirt committer guidelines</a></h2>
|
||||
|
||||
<p>
|
||||
The AUTHORS files indicates the list of people with commit access right
|
||||
who can actually merge the patches.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The general rule for commiting patches is to make sure it has been reviewed
|
||||
properly in the mailing-list first, usually if a couple of persons gave an
|
||||
The general rule for committing a patch is to make sure
|
||||
it has been reviewed
|
||||
properly in the mailing-list first, usually if a couple of people gave an
|
||||
ACK or +1 to a patch and nobody raised an objection on the list it should
|
||||
be good to go. If the patch touches a part of the code where you're not the
|
||||
main maintainer or not have a very clear idea of how things work, it's better
|
||||
to wait for a more authoritative feedback though. Before commiting please
|
||||
also rebuild locally and run 'make check syntax-check' and make sure they
|
||||
don't raise error. Try to look for warnings too for example configure with
|
||||
be good to go. If the patch touches a part of the code where you're not
|
||||
the main maintainer, or where you do not have a very clear idea of
|
||||
how things work, it's better
|
||||
to wait for a more authoritative feedback though. Before committing, please
|
||||
also rebuild locally, run 'make check syntax-check', and make sure you
|
||||
don't raise errors. Try to look for warnings too; for example,
|
||||
configure with
|
||||
</p>
|
||||
<pre>
|
||||
--enable-compile-warnings=error
|
||||
</pre>
|
||||
<p>
|
||||
which adds -Werror to compile flags, so no warnings get missed
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Exceptions to that 'review and approval on the list first' is fixing failures
|
||||
An exception to 'review and approval on the list first' is fixing failures
|
||||
to build:
|
||||
</p>
|
||||
<ul>
|
||||
<li>if a recently commited patch breaks compilation on a platform
|
||||
or for a given driver then it's fine to commit a minimal fix
|
||||
<li>if a recently committed patch breaks compilation on a platform
|
||||
or for a given driver, then it's fine to commit a minimal fix
|
||||
directly without getting the review feedback first</li>
|
||||
<li>if make check or make syntax-chek breaks, if there is
|
||||
<li>if make check or make syntax-check breaks, if there is
|
||||
an obvious fix, it's fine to commit immediately.
|
||||
The patch should still be sent to the list (or tell what the fix was if
|
||||
trivial) and 'make check syntax-check' should pass too before commiting
|
||||
trivial), and 'make check syntax-check' should pass too, before committing
|
||||
anything</li>
|
||||
<li>
|
||||
fixes for documentation and code comments can be managed
|
||||
|
70
docs/hooks.html.in
Normal file
70
docs/hooks.html.in
Normal file
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Hooks for specific system management</h1>
|
||||
<p>Libvirt includes synchronous hooks, starting from version 0.8.0, as a
|
||||
way to tie in specific tailored system actions at a specific time.
|
||||
If these scripts are present on the host where the hypervisor
|
||||
is running, then they are called when the libvirt daemon is doingi
|
||||
some significant action.</p>
|
||||
<p>The scripts are expected to execute quickly, return a zero exit
|
||||
status if all conditions are set for the daemon to continue the
|
||||
action (non zero will be considered a failure which may
|
||||
be ignored but in general will stop the ongoing operation).
|
||||
The script also should not call back into libvirt as the daemon
|
||||
is waiting for the script exit and deadlock is likely to occur.</p>
|
||||
<p>The scripts are stored in the directory <code>/etc/libvirt/hooks/</code>
|
||||
when using a standard installation path
|
||||
(<code>$SYSCONF_DIR/libvirt/hooks/</code> in general).</p>
|
||||
<p>Each script is given the following command line arguments:</p>
|
||||
<ul>
|
||||
<li> the first argument is the name of the object involved in the
|
||||
operation, or '-' if there is none.
|
||||
<li> the second argument is the name of the operation.
|
||||
<li> the third argument is a suboperation indication like 'start' or
|
||||
'end', or '-' if there is none.
|
||||
<li> the last argument is an extra argument string or '-' if there
|
||||
is none.
|
||||
</ul>
|
||||
<p>There are currently scripts for 3 domains of operation:
|
||||
<ul>
|
||||
<li><p><code>/etc/libvirt/hooks/daemon</code> script if
|
||||
present is called at 3 points in time:</p>
|
||||
<p>at daemon startup, typically started with the following
|
||||
arguments:</p>
|
||||
<pre>/etc/libvirt/hooks/daemon - start - start</pre>
|
||||
<p>at daemon shutdown when it is about to exit, with the following
|
||||
arguments:</p>
|
||||
<pre>/etc/libvirt/hooks/daemon - shutdown - shutdown</pre>
|
||||
<p>When the daemon is asked to reload its driver state when
|
||||
receiving the SIGHUP signal, arguments are:</p>
|
||||
<pre>/etc/libvirt/hooks/daemon - reload begin SIGHUP</pre>
|
||||
</li>
|
||||
<li><p><code>/etc/libvirt/hooks/qemu</code> script and <br/>
|
||||
<code>/etc/libvirt/hooks/lxc</code> associate hooks for domain
|
||||
operation on the respective QEmu/KVM and LXC drivers.</p>
|
||||
<p> The domain related hooks also receive the full XML description
|
||||
for the concerned domain on their stdin, which allows them to get
|
||||
all the information from the domain, including UUID or storage
|
||||
if that is needed for the script operation.</p>
|
||||
<p> Currently only domain startup and domain end operations
|
||||
involve the hook, the first one just before the domain gets
|
||||
created.
|
||||
For example if starting a QEmu domain named <code>test</code>
|
||||
the following script will get called:</p>
|
||||
<pre>/etc/libvirt/hooks/qemu test start begin -</pre>
|
||||
<p> note that a non-zero return value from the script will abort the
|
||||
domain startup operation, and if an error string is passed on
|
||||
stderr by the hook script, it will be provided back to the user
|
||||
at the libvirt API level.</p>
|
||||
<p> For domain shutdown, the script will be called just after the
|
||||
domain has finished execution, and the script will get:</p>
|
||||
<pre>/etc/libvirt/hooks/qemu test stopped end -</pre>
|
||||
<p> It is expected that other operations will be associated to hooks
|
||||
but at the time of 0.8.0 only those 2 are associated to the
|
||||
domains life cycle</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p></p>
|
||||
</body>
|
||||
</html>
|
@ -30,6 +30,7 @@ h2, h3, h4, h5, h6 {
|
||||
|
||||
#content {
|
||||
margin-left: 230px;
|
||||
margin-right: 1em;
|
||||
padding: 0px;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@
|
||||
<li><code>x:stderr</code> output goes to stderr</li>
|
||||
<li><code>x:syslog:name</code> use syslog for the output and use the
|
||||
given <code>name</code> as the ident</li>
|
||||
<li><code>x:file:file_path</code>output to a file, with the given
|
||||
<li><code>x:file:file_path</code> output to a file, with the given
|
||||
filepath</li>
|
||||
</ul>
|
||||
<p>In all cases the x prefix is the minimal level, acting as a filter:</p>
|
||||
|
@ -5,9 +5,627 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1 >Releases</h1>
|
||||
<p>Here is the list of official releases, however since it is early on in the
|
||||
development of libvirt, it is preferable when possible to just use the <a href="downloads.html">GIT version or snapshot</a>, contact the mailing list
|
||||
<p>Here is the list of official releases, it is also possible to just use the <a href="downloads.html">GIT version or snapshot</a>, contact the mailing list
|
||||
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
|
||||
<h3>0.8.0: Apr 12 2010</h3>
|
||||
<ul>
|
||||
<li>Features:
|
||||
esx: Add domain snapshot support (Matthias Bolte),
|
||||
Snapshot API framework. (Chris Lalancette),
|
||||
Add managed save API entry points (Daniel Veillard),
|
||||
Implement XML parser/formatter for "timer" subelement of domain clock (Laine Stump),
|
||||
Add hook utilities (Daniel Veillard),
|
||||
cpuUpdate() for updating guest CPU according to host CPU (Jiri Denemark),
|
||||
Network filtering API (Stefan Berger),
|
||||
Introduce a new virDomainUpdateDeviceFlags public API (Daniel P. Berrange),
|
||||
Introduce a new public API for domain events (Daniel P. Berrange),
|
||||
Public virDomainMigrateSetMaxDowntime API (Jiri Denemark),
|
||||
Add public API for volume wiping (David Allan),
|
||||
xenapi: Initial commit of the new driver (Sharadha Prabhakar)
|
||||
</li>
|
||||
|
||||
<li>Documentation:
|
||||
Add documentation for synchronous hooks (Daniel Veillard),
|
||||
Small fixes to virsh man page (Luiz Capitulino),
|
||||
Avoid using multicast addresses for Ethernet MAC examples (redshift),
|
||||
Fix unterminated B<...> in virsh man page (Jiri Denemark),
|
||||
Document all options of virsh dumpxml (Jiri Denemark),
|
||||
virsh: improve documentation (Eric Blake),
|
||||
Document snapshot virsh commands in the man page. (Chris Lalancette),
|
||||
Website documentation for the snapshot XML. (Chris Lalancette),
|
||||
website: Add archive link for libvirt-users list (Matthias Bolte),
|
||||
virsh: improve man page (Eric Blake),
|
||||
Mention direct device support since 0.7.7 in docs (Stefan Berger),
|
||||
esx: Improve documentation about remote URIs (Matthias Bolte),
|
||||
doc: fix typos in hacking.html.in; mark HACKING as read-only (Jim Meyering),
|
||||
doc: fix more typos in HACKING (Jim Meyering),
|
||||
hacking: add a section on preprocessor conventions (Eric Blake),
|
||||
hacking: fix typos (Eric Blake),
|
||||
Update hacking.html.in (David Allan)
|
||||
</li>
|
||||
|
||||
<li>Portability:
|
||||
Fix Win32 portability problems (Daniel P. Berrange),
|
||||
This patch fixes some compilation issues for the RHEL5 build (Stefan Berger),
|
||||
util: Add stubs for some functions on Windows (Matthias Bolte),
|
||||
Add HAVE_PTHREAD_H guard for pthread_sigmask (Matthias Bolte),
|
||||
bootstrap: Enable copy-mode for MinGW builds (Matthias Bolte),
|
||||
util: Handle lack of (f)chmod and (f)chown on Windows (Matthias Bolte),
|
||||
bootstrap: Remove rsync from buildreq list (Matthias Bolte),
|
||||
Make sure virtTestCaptureProgramOutput has a body on Windows (Matthias Bolte),
|
||||
Fix export of virConnectAuthPtrDefault for MinGW builds (Matthias Bolte),
|
||||
Make sure uid_t and gid_t are available (Matthias Bolte)
|
||||
</li>
|
||||
|
||||
<li>Bug Fixes:
|
||||
nwfilter: Fix memory leak on daemon init and shutdown (Stefan Berger),
|
||||
More event callback fixes (Daniel P. Berrange),
|
||||
Fix error in nwfilter test driver (Stefan Berger),
|
||||
qemu: catch cdrom change error (Ryan Harper),
|
||||
nwfilter: fix for directionality of ICMP traffic (Stefan Berger),
|
||||
Fix CPU comparison for x86 arch (Jiri Denemark),
|
||||
Don't ignore guest CPU selection when unsupported by HV (Jiri Denemark),
|
||||
domain_event.c: don't deref NULL on an OOM error path (Jim Meyering),
|
||||
nwfiler: fix due to non-symmetric src mac address match in iptables (Stefan Berger),
|
||||
qemu_driver.c: don't close an arbitrary file descriptor (Jim Meyering),
|
||||
Add VIR_DOMAIN_XML_INACTIVE flag when parsing domain XML (Jamie Strandboge),
|
||||
virt-aa-helper should not fail if profile was removed (Jamie Strandboge),
|
||||
Do nor clear caps when invoking virt-aa-helper (Jamie Strandboge),
|
||||
virterror.c: avoid erroneous case "fall-through" (Jim Meyering),
|
||||
Increase the number of available VNC ports. (Chris Lalancette),
|
||||
Only assign newDef when we have a new def. (Chris Lalancette),
|
||||
nwfilter: Fix random index in virNWFilterRuleDefDetailsFormat (Matthias Bolte),
|
||||
xenapi: Fix uninitialized variable warning (Matthias Bolte),
|
||||
Add a missing break statement to nwfilter errors. (Chris Lalancette),
|
||||
VBox: Fix use of uninitialized value (Jiri Denemark),
|
||||
Allow domain disk images on root-squash NFS to coexist with security driver. (Laine Stump),
|
||||
Don't use virFileReadLimFD in qemuDomainRestore. (Chris Lalancette),
|
||||
nwfilter's XML parser bug fixes (Stefan Berger),
|
||||
ESX test case needs '/' in interface name (Stefan Berger),
|
||||
Fix linker errors in proxy (Matthias Bolte),
|
||||
virConnectGetLibVersion: Avoid error message on success. (Paolo Smiraglia),
|
||||
Fix daemon hook script initialization (Daniel Veillard),
|
||||
Fix QEMU cpu affinity at startup to include all threads (Daniel P. Berrange),
|
||||
Fix "make check" run requesting authentication (Stefan Berger),
|
||||
Don't replace persistent domain config with migrated config (Jiri Denemark),
|
||||
Fix build break (David Allan),
|
||||
esx: Make the conf parser compare names case insensitive in VMX mode (Matthias Bolte),
|
||||
vbox: Fix segfault on empty device source (Matthias Bolte),
|
||||
python example: poll(-0.001) does not sleep forever (Philipp Hahn),
|
||||
Fix error reporting when parsing CPU XML strings (Jiri Denemark),
|
||||
virDiskNameToIndex: ignore trailing digits (Jim Meyering),
|
||||
esx: Fix potential memory leak in esxVI_BuildFullTraversalSpecItem (Matthias Bolte),
|
||||
Avoid libvirtd crash when cgroups is not configured on host (Jim Fehlig),
|
||||
security: selinux: Fix crash when releasing non-existent label (Cole Robinson),
|
||||
Don't crash without a security driver (Guido Günther),
|
||||
qemu: Fix FD leak in qemudStartVMDaemon (Matthias Bolte),
|
||||
util: ensure virMutexInit is not recursive (Eric Blake),
|
||||
Fix logroate rpm build breakage (Daniel Veillard),
|
||||
Fix LSB compliance of init script (Daniel Veillard),
|
||||
python: Fix networkLookupByUUID (Philip Hahn),
|
||||
Fix make dist with XenAPI changes (Cole Robinson),
|
||||
xenapi: Don't leak url and caps in case of error (Matthias Bolte),
|
||||
xenapi: Check for NULL before accessing the scheme (Matthias Bolte),
|
||||
xenapi: Request a username if there is non in the URI (Matthias Bolte),
|
||||
xenapi: Check for valid private data in xenapiSessionErrorHandle (Matthias Bolte),
|
||||
Use fsync() at the end of file allocation instead of O_DSYNC (Jiri Denemark),
|
||||
security: Set permissions for kernel/initrd (Cole Robinson),
|
||||
qemu: Fix USB by product with security enabled (Cole Robinson),
|
||||
Make nodeGetInfo report the correct number of NUMA nodes. (Chris Lalancette),
|
||||
Fix crash in virsh after bogus command (Chris Lalancette),
|
||||
Fix virsh command 'cd' (Chris Lalancette),
|
||||
Fix hang in qemudDomainCoreDump. (Chris Lalancette),
|
||||
Make sure qemudDomainSetVcpus doesn't hang. (Chris Lalancette),
|
||||
Fix a JSON CPU information bug. (Chris Lalancette),
|
||||
Free resources on error in udev startup (David Allan),
|
||||
Fix up nodeinfo parsing code. (Chris Lalancette),
|
||||
Wipe nodeinfo structure before filling it (Jiri Denemark),
|
||||
macvtap build detection fix (Stefan Berger),
|
||||
Fix virDomainGetXMLDesc cache settings output (Soren Hansen),
|
||||
Fix locking in qemudDomainMemoryStats (Adam Litke),
|
||||
qemu restore: don't let corrupt input provoke unwarranted OOM (Jim Meyering),
|
||||
virFileReadLimFD: diagnose maxlen <= 0, rather than passing it on... (Jim Meyering),
|
||||
xen: don't let bogus packets trigger over-allocation and segfault (Jim Meyering)
|
||||
</li>
|
||||
|
||||
<li>Improvements:
|
||||
Rename virsh "revert-to-snapshot" to "snapshot-revert" (Chris Lalancette),
|
||||
nwfilter: Process DHCP option to determine whether packet is a DHCP_OFFER (Stefan Berger),
|
||||
Add enospace option to qemu disk error policy (David Allan),
|
||||
nwfilter: More XML parser test cases (Stefan Berger),
|
||||
remote: Replace some virRaiseError with remoteError (Matthias Bolte),
|
||||
Generate libvirt.def from libvirt.syms (Matthias Bolte),
|
||||
Fix up python bindings for new event callbacks (Daniel P. Berrange),
|
||||
esx: Allow 'lsisas1068' as SCSI controller type (Matthias Bolte),
|
||||
esx: Report an error for invalid arguments in esxList(Defined)Domains (Matthias Bolte),
|
||||
nwfilter: Support for learning a VM's IP address (Stefan Berger),
|
||||
Properly advertise cpuselection guest capability (Jiri Denemark),
|
||||
Update of the apparmor regression tests (Jamie Strandboge),
|
||||
Improve the apparmor example (Jamie Strandboge),
|
||||
Improve virt-aa-helper to handle SDL graphics and cleanups (Jamie Strandboge),
|
||||
Adjust virt-aa-helper to handle pci devices (Jamie Strandboge),
|
||||
Add backingstore support to apparmor (Jamie Strandboge),
|
||||
build: avoid autogen on 'make clean' (Eric Blake),
|
||||
Add filter schema for nwfilter XML, extend domain XML schema (Stefan Berger),
|
||||
Add filter schema for nwfilter XML, extend domain XML schema (Stefan Berger),
|
||||
nwfilter: Fix instantiated layer 2 rules for 'inout' direction (Stefan Berger),
|
||||
Better error reporting in virsh. (Chris Lalancette),
|
||||
Snapshot virsh implementation. (Chris Lalancette),
|
||||
Snapshots for VBox (Jiri Denemark),
|
||||
Snapshot QEMU driver. (Chris Lalancette),
|
||||
Snapshot internal methods. (Chris Lalancette),
|
||||
xenapi: Add managedsave entries to the driver struct (Matthias Bolte),
|
||||
Add a managedsave command to virsh (Daniel Veillard),
|
||||
Implement managed save operations for qemu driver (Daniel Veillard),
|
||||
Implement remote protocol for managed save (Daniel Veillard),
|
||||
build: improve check for out-of-date .gnulib submodule (Eric Blake),
|
||||
optimizes the validation of the name of an interface (Stefan Berger),
|
||||
adds a couple of test cases for the XML parsing test suite (Stefan Berger),
|
||||
build: import latest gnulib (Eric Blake),
|
||||
Changes to clock timer XML to match final design. (Laine Stump),
|
||||
Keep build quiet for generated file (Daniel P. Berrange),
|
||||
Keep track of guest paused state after disk IO / watchdog events (Daniel P. Berrange),
|
||||
virsh: add 'exit' as an alias for 'quit' (Eric Blake),
|
||||
maint: mark xenapiSessionErrorHandler messages for translation (Jim Meyering),
|
||||
Blank out invalid interface names with escaped letters etc. (Stefan Berger),
|
||||
esx: Generate most SOAP mapping and improve inheritance handling (Matthias Bolte),
|
||||
Distribute nwfilter xml files and add them to rpm (Daniel Veillard),
|
||||
Make sure nwfilter headers are part of distribution (Daniel Veillard),
|
||||
maint: show which compiler warning triggered (Eric Blake),
|
||||
build: automate the rerun of autogen.sh (Eric Blake),
|
||||
makes the entries in the int-2-string maps more readable (Stefan Berger),
|
||||
Add ip6tables support for IPv6 filtering (Stefan Berger),
|
||||
Add support for so-far missing protocols for iptables filtering (Stefan Berger),
|
||||
Implement the qemu-kvm backend of clock timer elements (Laine Stump),
|
||||
Add flags to indicate presence of timekeeping-related qemu options (Laine Stump),
|
||||
Add timer element to domain schema (Laine Stump),
|
||||
virsh: support VISUAL, and allow metacharacters in EDITOR (Eric Blake),
|
||||
Add dummy nwfilter driver to test driver (Stefan Berger),
|
||||
Add script hook support to the LXC driver (Daniel Veillard),
|
||||
Add script hook support to the QEmu driver (Daniel Veillard),
|
||||
Add the script hook support to the libvirt daemon (Daniel Veillard),
|
||||
Add an error module and message for the hooks subsystem (Daniel Veillard),
|
||||
Export virPipeReadUntilEOF internally (Daniel Veillard),
|
||||
Introduce UPDATE_CPU flag for virDomainGetXMLDesc (Jiri Denemark),
|
||||
Helper function for making a copy of virCPUDefPtr (Jiri Denemark),
|
||||
filter new files through cppi, so syntax-check passes once again (Jim Meyering),
|
||||
Add disk error policy to domain XML (David Allan),
|
||||
build: don't lose prior configure args on autogen.sh (Eric Blake),
|
||||
build: update gnulib (Eric Blake),
|
||||
Add some examples filters (Stefan Berger),
|
||||
Extensions for iptables rules (Stefan Berger),
|
||||
Add IPv6 support for the ebtables layer (Stefan Berger),
|
||||
Add qemu support (Stefan Berger),
|
||||
Core driver implementation with ebtables support (Stefan Berger),
|
||||
Add XML parser extensions for network filtering (Stefan Berger),
|
||||
Add virsh support for new CLI commands (Stefan Berger),
|
||||
Definition of the wire format, RPC client & server (Stefan Berger),
|
||||
Add Network filtering internal API (Stefan Berger),
|
||||
Add Network filtering public API (Stefan Berger),
|
||||
Add recursive locks (Stefan Berger),
|
||||
Implement VNC password change in QEMU (Daniel P. Berrange),
|
||||
Allow parsing <graphics> in device XML (Daniel P. Berrange),
|
||||
Introduce a update-device command in virsh (Daniel P. Berrange),
|
||||
Implement virDomainUpdateDeviceFlags API in all drivers with media change (Daniel P. Berrange),
|
||||
Remote protocol impl for virDomainUpdateDeviceFlags (Daniel P. Berrange),
|
||||
Add domain events for graphics network clients (Daniel P. Berrange),
|
||||
Add support for an explicit IO error event (Daniel P. Berrange),
|
||||
Add support for an explicit watchdog event (Daniel P. Berrange),
|
||||
Add support for an explicit RTC change event (Daniel P. Berrange),
|
||||
Add support for an explicit guest reboot event (Daniel P. Berrange),
|
||||
Rename domain lifecycle event message (Daniel P. Berrange),
|
||||
Convert domain events example to new API (Daniel P. Berrange),
|
||||
Remote driver & daemon impl of new event API (Daniel P. Berrange),
|
||||
Support new event register/deregister APis in all drivers except remote (Daniel P. Berrange),
|
||||
Add new internal domain events APIs for handling other event types (Daniel P. Berrange),
|
||||
Refactor domain events to handle multiple event types (Daniel P. Berrange),
|
||||
Make internal domain events struct definitions private (Daniel P. Berrange),
|
||||
tests: teach syntax-check that virDomainDefFree has free-like semantics (Jim Meyering),
|
||||
Add entry point logging for cpu functions (Jiri Denemark),
|
||||
build: suppress distracting build output (Jim Meyering),
|
||||
maint: add syntax-check rule to prohibit use of test's -a operator (Jim Meyering),
|
||||
tests: shell script portability and clean-up (Jim Meyering),
|
||||
tests: Don't add extra padding if counter mod 40 is 0 (Matthias Bolte),
|
||||
Use common XML parsing functions (Jiri Denemark),
|
||||
Introduce XML parsing utility functions (Jiri Denemark),
|
||||
virDomainDiskDefAssignAddress: return int, not void (Jim Meyering),
|
||||
tests: do not use the ":disk" suffix in sample xml input (Jim Meyering),
|
||||
util: Make some conditional symbols unconditional (Matthias Bolte),
|
||||
Export conditional state driver symbols only when they are defined (Matthias Bolte),
|
||||
esx: Add esxVI_LookupVirtualMachineByName (Matthias Bolte),
|
||||
esx: Generate method mappings via macros (Matthias Bolte),
|
||||
Add migrate-setmaxdowntime command to virsh (Jiri Denemark),
|
||||
Implement virDomainMigrateSetMaxDowntime in qemu driver (Jiri Denemark),
|
||||
Implement virDomainMigrateSetMaxDowntime in remote driver (Jiri Denemark),
|
||||
Wire protocol and dispatcher for virDomainMigrateSetMaxDowntime (Jiri Denemark),
|
||||
Internal driver API for virDomainMigrateSetMaxDowntime (Jiri Denemark),
|
||||
Virsh support for vol wiping (David Allan),
|
||||
Simplified version of volume wiping based on feedback from the list. (David Allan),
|
||||
Implement remote bits for vol wiping (David Allan),
|
||||
Implement the public API for vol wiping (David Allan),
|
||||
Define the internal driver API for vol wiping (David Allan),
|
||||
Support vhost-net mode at qemu startup for virtio network devices (Laine Stump),
|
||||
maint: enforce recent N_ usage (Eric Blake),
|
||||
Allow suspend during live migration (Jiri Denemark),
|
||||
do not require two ./autogen.sh runs to permit "make" (Jim Meyering),
|
||||
esx: Move username and password helper functions to authhelper.c (Matthias Bolte),
|
||||
Use WARN_CFLAGS when compiling virsh.c (Jiri Denemark),
|
||||
qemu: Add some debugging at domain startup (Cole Robinson),
|
||||
qemu: pass the information when disks are read-only (Daniel Veillard),
|
||||
macvtap: Only export symbols if support is enabled (Matthias Bolte),
|
||||
Only use the numa functions when they are available. (Chris Lalancette),
|
||||
Allow devices without a parent (Ed Swierk),
|
||||
build: change to gnulib module list should rerun bootstrap (Eric Blake),
|
||||
build: enforce preprocessor indentation (Eric Blake),
|
||||
build: update gnulib submodule to newer (but not latest) (Jim Meyering),
|
||||
Make virsh reconnect when losing connection (Daniel Veillard),
|
||||
Change logrotate to be per-hypervisor logs (Daniel Veillard),
|
||||
build: consistently indent preprocessor directives (Eric Blake),
|
||||
virsh: use N_ rather than gettext_noop (Eric Blake),
|
||||
virsh: fix existing N_ uses (Eric Blake),
|
||||
Get thread and socket information in virsh nodeinfo. (Chris Lalancette),
|
||||
Eliminate large stack buffer in doTunnelSendAll (Laine Stump),
|
||||
build: consistently use C99 varargs macros (Eric Blake)
|
||||
</li>
|
||||
|
||||
<li>Cleanups:
|
||||
Fix some cppi prepocessor indentation issues (Daniel Veillard),
|
||||
Cleanup the msg_gen_function list in cfg.mk (Matthias Bolte),
|
||||
remote: Remove virConnectPtr from error/errorf (Matthias Bolte),
|
||||
Remove undefined symbols from symbols file (Matthias Bolte),
|
||||
Add missing nwfilter_learnipaddr.c to POTFILES.in (Daniel P. Berrange),
|
||||
Avoid searching for windres when not building for Windows (Diego Elio Pettenò),
|
||||
Executable does not belong into repository. (Stefan Berger),
|
||||
xenXMDomainDefineXML: remove dead store and useless/leaky virGetDomain (Jim Meyering),
|
||||
createRawFileOpHook: avoid dead stores (Jim Meyering),
|
||||
qemudDomainGetSecurityLabel: avoid dead store to "type" (Jim Meyering),
|
||||
Cleanup x86Compute() (Jiri Denemark),
|
||||
qemuDomainSnapshotLoad: avoid dead store (Jim Meyering),
|
||||
maint: s/initialis/initializ/ (Eric Blake),
|
||||
Fix 'avialable' typo (Matthias Bolte),
|
||||
macvtap: Remove virConnectPtr from ReportError (Matthias Bolte),
|
||||
phyp: Remove virConnectPtr from PHYP_ERROR (Matthias Bolte),
|
||||
esx: Mark error messages for translation (Matthias Bolte),
|
||||
vbox: Mark all error messages for translation (Matthias Bolte),
|
||||
Clarify an error message in setmem. (Chris Lalancette),
|
||||
Fix up comments for isEncrypted, isSecure, domainIsActive, and domainIsPersistent. (Chris Lalancette),
|
||||
Fix compiler warning about unused conn parameter (Matthias Bolte),
|
||||
openvz: Remove virConnectPtr from openvzError (Matthias Bolte),
|
||||
one: Remove virConnectPtr from oneError (Matthias Bolte),
|
||||
uml: Remove virConnectPtr from umlReportError (Matthias Bolte),
|
||||
Remove virConnectPtr from eventReportError (Matthias Bolte),
|
||||
Remove virConnectPtr from virLibConnError (Matthias Bolte),
|
||||
xen: Remove virConnectPtr from xenUnifiedError (Matthias Bolte),
|
||||
Remove virConnectPtr from nodeReportError (Matthias Bolte),
|
||||
netcf: Remove virConnectPtr from interfaceReportError (Matthias Bolte),
|
||||
xen: Remove virConnectPtr from virXenInotifyError (Matthias Bolte),
|
||||
xen: Remove virConnectPtr from virXenStoreError (Matthias Bolte),
|
||||
xen: Remove virConnectPtr from virXenError/virXenErrorFunc (Matthias Bolte),
|
||||
xen: Remove virConnectPtr from virXMError (Matthias Bolte),
|
||||
xen: Remove virConnectPtr from virXendError (Matthias Bolte),
|
||||
proxy: Remove virConnectPtr from virProxyError (Matthias Bolte),
|
||||
vbox: Remove virConnectPtr from vboxError (Matthias Bolte),
|
||||
test: Remove virConnectPtr from testError (Matthias Bolte),
|
||||
Remove unnecessary trailing \n in log messages (Matthias Bolte),
|
||||
Fix compiler warning about non-literal format string (Matthias Bolte),
|
||||
removes the virConnectPtr parameter where not necessary (Stefan Berger),
|
||||
Clarified error message (David Allan),
|
||||
Eliminate compiler warning about non-const format string (Laine Stump),
|
||||
Get rid of the regular expressions (Stefan Berger),
|
||||
Use the virStrToLong_ui() function rather than virStrToLong_i() (Stefan Berger),
|
||||
Make virDomainLoadConfig static. (Chris Lalancette),
|
||||
Eliminate compile warnings in nwfilter error log calls (Laine Stump),
|
||||
Only parse 'CPU XML' in virCPUDefParseXML() (Jim Fehlig),
|
||||
Replace sscanf in PCI device address parsing (Matthias Bolte),
|
||||
xen: Use virStrToLong_i instead of sscanf for XenD port parsing (Matthias Bolte),
|
||||
xenapi: Use virStrToLong_i instead of sscanf for CPU map parsing (Matthias Bolte),
|
||||
openvz: Use strtok_r instead of sscanf for VPS UUID parsing (Matthias Bolte),
|
||||
xen: Use virParseMacAddr instead of sscanf (Matthias Bolte),
|
||||
vbox: Replace atoi with virStrToLong_i (Matthias Bolte),
|
||||
cgroup: Replace sscanf with virStrToLong_ll (Matthias Bolte),
|
||||
Refactor major.minor.micro version parsing into a function (Matthias Bolte),
|
||||
Replace sscanf in nwfilter rule parsing (Matthias Bolte),
|
||||
Replace sscanf in legacy device address parsing (Matthias Bolte),
|
||||
build: more fallout from test -a (Eric Blake),
|
||||
Fix apibuild.py warning about virNWFilterLookupByUUIDString (Matthias Bolte),
|
||||
maint: remove redundant tests after virStrToLong (Eric Blake),
|
||||
maint: update AUTHORS (Eric Blake),
|
||||
maint: fix cpp indentation syntax-check failure (Jim Meyering),
|
||||
Add virt-aa-helper and secaatest to .gitignore (Matthias Bolte),
|
||||
esx: Remove redundant semicolons (Matthias Bolte),
|
||||
Use libvirt's existing ipv6/ipv4 parser/printer (Stefan Berger),
|
||||
Remove driver dependency from nwfilter_conf.c (Stefan Berger),
|
||||
Fix a merge error leftover (Daniel Veillard),
|
||||
Use enum of virDomainNetType (Stefan Berger),
|
||||
Silence cppi syntax-check warning (Daniel Veillard),
|
||||
maint: update syntax-check rule to also catch test's -o operator (Eric Blake),
|
||||
build: don't use "test cond1 -o cond2": it's not portable (Eric Blake),
|
||||
build: don't use "test cond1 -a cond2" in configure: it's not portable (Jim Meyering),
|
||||
Remove interfaceRegister from libvirt_private.syms (Matthias Bolte),
|
||||
esx: Cleanup file header comments (Matthias Bolte),
|
||||
maint: enforce recent copyright style (Eric Blake),
|
||||
maint: make Red Hat copyright notices consistent (Eric Blake),
|
||||
maint: fix typo (Eric Blake),
|
||||
docs: <pre> cannot be nested in <p> (Matthias Bolte),
|
||||
.gitignore: Ignore generated daemon/libvirtd.logrotate (Cole Robinson),
|
||||
phyp: Use virRequestUsername and virRequestPassword (Matthias Bolte),
|
||||
fix two "make syntax check" failures (Jim Meyering),
|
||||
Fix syntax-check errors (Jiri Denemark),
|
||||
Fix error messages in qemu text monitor (Jiri Denemark),
|
||||
Fix compiler warnings in virsh.c (Laine Stump),
|
||||
Silence compiler complaints about non-literal format strings (Laine Stump),
|
||||
Remove qemudDomainSetMaxMemory. (Chris Lalancette),
|
||||
Fix copy&paste typos in virProcessInfoGetAffinity (Jiri Denemark),
|
||||
AUTHORS: add recent contributors (Eric Blake),
|
||||
Fix format string warnings (Laine Stump),
|
||||
ebtablesAddRemoveRule: avoid dead store (Jim Meyering),
|
||||
virInterfaceDefParseBond: avoid dead stores (Jim Meyering),
|
||||
xenXMDomainConfigParse: avoid dead store (Jim Meyering),
|
||||
qemuMonitorTextGetMemoryStats: decrease risk of false positive in parsing (Jim Meyering)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<h3>0.7.7: Mar 5 2010</h3>
|
||||
<ul>
|
||||
<li>Features:
|
||||
Introduce public API for domain async job handling (Daniel P. Berrange),
|
||||
macvtap support (Stefan Berger),
|
||||
Add QEMU support for virtio channel (Matthew Booth),
|
||||
Add persistence of PCI addresses to QEMU (Daniel P. Berrange),
|
||||
Functions for computing baseline CPU from a set of host CPUs (Jiri Denemark),
|
||||
Public API for virDomain{Attach,Detach}DeviceFlags (Jim Fehlig)
|
||||
</li>
|
||||
|
||||
<li>Documentation:
|
||||
web docs -- macvtap mode explanation (Stefan Berger),
|
||||
Expand docs about clock modes (Daniel P. Berrange),
|
||||
docs: Fix syntax warnings from recent changes. (Cole Robinson),
|
||||
docs: network: Document <domain> element (Cole Robinson),
|
||||
docs: network: Document STP and delay attributes (Cole Robinson),
|
||||
docs: domain: Document <description> element (Cole Robinson),
|
||||
docs: storage: Document multipath pools (Cole Robinson),
|
||||
docs: storage: Document SCSI pools (Cole Robinson),
|
||||
docs: storage: Fix backingStore <format> docs (Cole Robinson),
|
||||
docs: storage: <volume><key> is always generated. (Cole Robinson),
|
||||
docs: storage: Document capacity/alloc 'unit' (Cole Robinson),
|
||||
docs: add 3 missing spaces (Dan Kenigsberg),
|
||||
Fix typo in comment (Matthew Booth),
|
||||
libvirt: Update docs for hotplug only commands (Cole Robinson),
|
||||
Fix up a misspelled comment. (Chris Lalancette),
|
||||
doc: restrict virDomain{Attach,Detach}Device to active domains (Jim Fehlig),
|
||||
docs: Refer to virReportOOMError in the HACKING file (Matthias Bolte),
|
||||
docs: Emphasize that devices have to be inside the <devices> element (Matthias Bolte)
|
||||
</li>
|
||||
|
||||
<li>Portability:
|
||||
build: vbox: avoid build failure when linking with --no-add-needed (Diego Elio Pettenò),
|
||||
build: avoid dlopen-related link failure on rawhide/F13 (Diego Elio Pettenò),
|
||||
Add a define for NFS_SUPER_MAGIC (Chris Lalancette),
|
||||
Fix compliation of AppArmor related code (Matthias Bolte)
|
||||
</li>
|
||||
|
||||
<li>Bug Fixes:
|
||||
Fix USB passthrough based on product/vendor (Daniel P. Berrange),
|
||||
Misc fixes for LXC cgroups setup (Daniel P. Berrange),
|
||||
Change default for storage uid/gid from getuid()/getgid() to -1/-1 (Laine Stump),
|
||||
Fix parser checking of storage pool device (Daniel P. Berrange),
|
||||
Add missing device type check in QEMU PCI hotunplug (Daniel P. Berrange),
|
||||
Make domain save work on root-squash NFS (Laine Stump),
|
||||
Fix domain restore for files on root-squash NFS (Laine Stump),
|
||||
Fix USB/PCI device address aliases in QEMU hotplug driver (Daniel P. Berrange),
|
||||
Fix detection of errors in QEMU device_add command (Daniel P. Berrange),
|
||||
uml: avoid crash on partial read (Eric Blake),
|
||||
Fix QEMU domain state after a save attempt fails (Daniel P. Berrange),
|
||||
Fix error messages when parsing USB devices in QEMU (Rolf Eike Beer),
|
||||
Fix USB hotplug device string in QEMU driver (Rolf Eike Beer),
|
||||
phypUUIDTable_Push: do not corrupt output stream upon partial write (Jim Meyering),
|
||||
qemu: avoid null dereference on failed migration (Eric Blake),
|
||||
Free the macvtap mode string (Stefan Berger),
|
||||
libvirtd: do not ignore failure to set group ID in privileged mode (Jim Meyering),
|
||||
Ignore SIGWINCH in remote client call to poll(2) (RHBZ#567931). (Richard Jones),
|
||||
storage: conf: Correctly calculate exabyte unit (Cole Robinson),
|
||||
virsh.c: avoid all leaks in OOM path in cmdCPUBaseline (Jiri Denemark),
|
||||
Fixed reference count in virsh pool-build command (David Allan),
|
||||
Fix daemon-conf invalid failures (David Allan),
|
||||
virBufferVSprintf: do not omit va_end(argptr) call (Jim Meyering),
|
||||
xend_internal.c: don't dereference NULL for unexpected input (Jim Meyering),
|
||||
virsh: be careful to return "FALSE" upon OOM (Jim Meyering),
|
||||
virBufferStrcat: do not skip va_end (Jim Meyering),
|
||||
qparams.c: do not skip va_end, twice (Jim Meyering),
|
||||
get_virtual_functions_linux: would mistakenly always return zero (Jim Meyering),
|
||||
network: bridge: Fix IsActive, IsPersistent (Cole Robinson),
|
||||
qemuMonitorTextAddUSBDisk: avoid unconditional leak (Jim Meyering),
|
||||
tests: avoid NULL deref upon OOM failure (Jim Meyering),
|
||||
qemuInitPasswords: avoid unconditional leak (Jim Meyering),
|
||||
qemuMonitorTextAddDevice: avoid unconditional leak (Jim Meyering),
|
||||
libvirt-override.c: avoid a leak upon call with invalid argument (Jim Meyering),
|
||||
vboxDomainDumpXML: avoid a leak on OOM error path (Jim Meyering),
|
||||
virNodeDevCapScsiHostParseXML: avoid an unconditional leak (Jim Meyering),
|
||||
uml_driver.c: avoid leak upon failure (Jim Meyering),
|
||||
vbox_tmpl.c: avoid an unconditional leak (Jim Meyering),
|
||||
openvz (openvzFreeDriver): avoid leaks (Jim Meyering),
|
||||
Fix crash in LXC driver open method when URI has no path (Daniel P. Berrange),
|
||||
Fix USB device path formatting mixup (Daniel P. Berrange),
|
||||
qemu_driver.c: honor dname parameter once again (Jim Meyering),
|
||||
plug four virStoragePoolSourceFree-related leaks (Jim Meyering),
|
||||
remote_driver.c: avoid leak on OOM error path (Jim Meyering),
|
||||
qemu: Increase guest startup timeout to 30 seconds (Cole Robinson),
|
||||
Fix security driver configuration (Daniel P. Berrange),
|
||||
Escape strings serialized in XML (Daniel Veillard),
|
||||
absolutePathFromBaseFile: don't leak when first arg contains no "/" (Jim Meyering),
|
||||
sexpr_string: avoid leak on OOM error path (Jim Meyering),
|
||||
virDomainChrDefParseXML: don't leak upon invalid input (Jim Meyering),
|
||||
virExecWithHook: avoid leak on OOM error path (Jim Meyering),
|
||||
cgroup.c: don't leak mem+FD upon OOM (Jim Meyering),
|
||||
cgroup.c: avoid unconditional leaks (Jim Meyering),
|
||||
virt-pki-validate contains unexpanded SYSCONFDIR variable (Doug Goldstein)
|
||||
</li>
|
||||
|
||||
<li>Improvements:
|
||||
Convert QEMU driver all hotunplug code from pci_del to device_del (Daniel P. Berrange),
|
||||
Support hot-unplug for USB devices in QEMU (Daniel P. Berrange),
|
||||
Tweak container initialization to make upstart/init happier (Daniel P. Berrange),
|
||||
Avoid creating top level cgroups if just querying for existance (Daniel P. Berrange),
|
||||
Support VCPU hotplug in QEMU guests (Daniel P. Berrange),
|
||||
Fix mis-leading error message in pool delete API (Daniel P. Berrange),
|
||||
Fix typo in QEMU migration command name (Daniel P. Berrange),
|
||||
Don't raise error message from cgroups if QEMU fails to start (Daniel P. Berrange),
|
||||
esx: don't ignore failure on close (Eric Blake),
|
||||
Fix safezero() (Jiri Denemark),
|
||||
Support job cancellation in QEMU driver (Daniel P. Berrange),
|
||||
Remote driver implementation for the virDomainAbortJob APi (Daniel P. Berrange),
|
||||
Wire up internal entry points for virDomainAbortJob API (Daniel P. Berrange),
|
||||
Introduce public API for cancelling async domain jobs (Daniel P. Berrange),
|
||||
Add QEMU driver support for job info on migration ops (Daniel P. Berrange),
|
||||
Remote driver implmentation of job info API (Daniel P. Berrange),
|
||||
Stub out internal driver entry points for job processing (Daniel P. Berrange),
|
||||
Use device_del to remove SCSI controllers (Wolfgang Mauerer),
|
||||
Fix PCI address handling when controllers are deleted (Wolfgang Mauerer),
|
||||
Fix data structure handling when controllers are attached (Wolfgang Mauerer),
|
||||
Allow configurable timezones with QEMU (Daniel P. Berrange),
|
||||
Allow a timezone to be specified instead of sync to host timezone (Daniel P. Berrange),
|
||||
Support variable clock offset mode in QEMU (Daniel P. Berrange),
|
||||
Add new clock mode allowing variable adjustments (Daniel P. Berrange),
|
||||
Change the internal domain conf representation of localtime/utc (Daniel P. Berrange),
|
||||
Use standard spacing for user/pass prompt (Cole Robinson),
|
||||
libvirtd: Better initscript error reporting (Cole Robinson),
|
||||
qemu: Report binary path if error parsing -help (Cole Robinson),
|
||||
remote: Improve daemon startup error reporting (Cole Robinson),
|
||||
virsh: Show errors reported by nonAPI functions (Cole Robinson),
|
||||
remote: Improve error message when libvirtd isn't running (Cole Robinson),
|
||||
build: make git submodule checking more reliable (Jim Meyering),
|
||||
Add descriptions for macvtap direct type interfaces (Stefan Berger),
|
||||
maint: import modern bootstrap (Eric Blake),
|
||||
maint: start factoring bootstrap (Eric Blake),
|
||||
build: update gnulib submodule to latest (Jim Meyering),
|
||||
Create raw storage files with O_DSYNC (again) (Jiri Denemark),
|
||||
Use virFileOperation hook function in virStorageBackendFileSystemVolBuild (Laine Stump),
|
||||
Rename virFileCreate to virFileOperation, add hook function (Laine Stump),
|
||||
qemu: Check for IA64 kvm (Dustin Xiong),
|
||||
remote: Print ssh stderr on connection failure (Cole Robinson),
|
||||
fix multiple veth problem for OpenVZ (Yuji NISHIDA),
|
||||
Better error reporting for failed migration (Chris Lalancette),
|
||||
Make an error message in PCI util code clearer (Chris Lalancette),
|
||||
macvtap mac_filter support (Stefan Berger),
|
||||
macvtap IFF_VNET_HDR configuration (Stefan Berger),
|
||||
Use virFork() in __virExec(), virFileCreate() and virDirCreate() (Laine Stump),
|
||||
Add virFork() function to utils (Laine Stump),
|
||||
Add domain support for virtio channel (Matthew Booth),
|
||||
qemu: Explicitly error if guest virtual network is inactive (Cole Robinson),
|
||||
virterror: Make SetError work if no previous error was set (Cole Robinson),
|
||||
macvtap teardown rework (Stefan Berger),
|
||||
Update QEMU JSON balloon command handling (Daniel P. Berrange),
|
||||
python: Actually add virConnectGetVersion to generated bindings (Cole Robinson),
|
||||
build: inform libtool of m4 directory (Eric Blake),
|
||||
Adds a cpu-baseline command for virsh (Jiri Denemark),
|
||||
qemu: Make SetVcpu command hotplug only (Cole Robinson),
|
||||
qemu: Make Set*Mem commands hotplug only (Cole Robinson),
|
||||
Treat missing QEMU 'thread_id' as non-fatal in JSON monitor (Daniel P. Berrange),
|
||||
Fix check for primary IDE controller in QEMU PCI slot assignment (Daniel P. Berrange),
|
||||
Make error reporting for QEMU JSON mode more friendly (Daniel P. Berrange),
|
||||
Run 'qmp_capabilities' command at QEMU monitor startup (Daniel P. Berrange),
|
||||
macvtap support for libvirt -- schema extensions (Stefan Berger),
|
||||
macvtap support for libvirt -- qemu support (Stefan Berger),
|
||||
macvtap support for libvirt -- helper code (Stefan Berger),
|
||||
macvtap support for libvirt -- parse new interface XML (Stefan Berger),
|
||||
interface: Use proper return codes in the open function (Matthias Bolte),
|
||||
Support 'block_passwd' command for QEMU disk encryption (Daniel P. Berrange),
|
||||
Implement cpuBaseline in remote and qemu drivers (Jiri Denemark),
|
||||
Wire protocol format and dispatcher for virConnectBaselineCPU (Jiri Denemark),
|
||||
virConnectBaselineCPU public API implementation (Jiri Denemark),
|
||||
Internal driver API for virConnectBaselineCPU (Jiri Denemark),
|
||||
virConnectBaselineCPU public API (Jiri Denemark),
|
||||
Implement cpuArchBaseline in x86 CPU driver (Jiri Denemark),
|
||||
Implement cpuArchBaseline in generic CPU driver (Jiri Denemark),
|
||||
Mark all error messages for translation (Jiri Denemark),
|
||||
Add cpu_generic.c to the list of translated files (Jiri Denemark),
|
||||
Fix <cpu> element in domain XML schema (Jiri Denemark),
|
||||
Fix disk stats retrieval with QEMU >= 0.12 (Daniel P. Berrange),
|
||||
qemu: Properly report a startup timeout error (Cole Robinson),
|
||||
test: Fake security driver support in capabilities (Cole Robinson),
|
||||
Annotate some virConnectPtr as mandatory non-null (Daniel P. Berrange),
|
||||
Convert qemu command line flags to 64-bit int (Daniel P. Berrange),
|
||||
Create raw storage files with O_DSYNC (Jiri Denemark),
|
||||
Re-generate remote protocol files for new APIs (Daniel P. Berrange),
|
||||
Modify virsh commands (Jim Fehlig),
|
||||
domain{Attach,Detach}DeviceFlags handler for drivers (Jim Fehlig),
|
||||
Server side dispatcher (Jim Fehlig),
|
||||
Remote driver (Jim Fehlig),
|
||||
Wire protocol format (Jim Fehlig),
|
||||
Public API Implementation (Jim Fehlig)
|
||||
</li>
|
||||
|
||||
<li>Cleanups:
|
||||
virsh: silence compiler warning (Eric Blake),
|
||||
build: silence coverity warning in node_device (Eric Blake),
|
||||
Tiny spelling fix (Wolfgang Mauerer),
|
||||
libvirtd: avoid false-positive NULL-deref warning from clang (Eric Blake),
|
||||
x86Decode: avoid NULL-dereference upon questionable input (Jim Meyering),
|
||||
openvzDomainDefineCmd: remove useless increment (Jim Meyering),
|
||||
maint: disallow TAB-in-indentation also in *.rng files (Jim Meyering),
|
||||
maint: convert leading TABs in *.rng files to equivalent spaces (Jim Meyering),
|
||||
udevEnumerateDevices: remove dead code (Jim Meyering),
|
||||
qemudNetworkIfaceConnect: remove dead store (Jim Meyering),
|
||||
cmdPoolDiscoverSources: initialize earlier to avoid FP from clang (Jim Meyering),
|
||||
build: avoid warning about return-with-value in void function (Jim Meyering),
|
||||
Only build virDomainObjFormat if not building proxy. (Chris Lalancette),
|
||||
openvzGetVEID: don't leak (memory + file descriptor) (Jim Meyering),
|
||||
build: avoid warning about unused variables (Jim Meyering),
|
||||
build: avoid "make rpm" failure in docs/ (Jim Meyering),
|
||||
build: teach apibuild.py to work in a non-srcdir build (Jim Meyering),
|
||||
build: avoid non-srcdir "make distcheck" failures (CLEANFILES) (Jim Meyering),
|
||||
build: avoid non-srcdir "make distcheck" failures (srcdir vs wildcard) (Jim Meyering),
|
||||
build: avoid non-srcdir "make distcheck" failure (test_conf.sh) (Jim Meyering),
|
||||
build: avoid non-srcdir installation failure (sitemap.html.in) (Jim Meyering),
|
||||
build: avoid non-srcdir installation failure (apibuild.py) (Jim Meyering),
|
||||
build: fix typos in makefile variable names (Jim Meyering),
|
||||
build: ensure that MKINSTALLDIRS is AC_SUBST-defined (Jim Meyering),
|
||||
maint: relax git minimum version (Eric Blake),
|
||||
maint: sort .gitignore (Eric Blake),
|
||||
maint: fix quoting in autogen.sh (Eric Blake),
|
||||
virFork: placate static analyzers: ignore pthread_sigmask return value (Jim Meyering),
|
||||
virsh.c: avoid leak on OOM error path (Jim Meyering),
|
||||
Make virDomainObjFormat static (Chris Lalancette),
|
||||
xenDaemonDomainSetAutostart: avoid appearance of impropriety (Jim Meyering),
|
||||
Remove unused functions from domain_conf (Matthew Booth),
|
||||
Fix whitespace in domain.rng (Matthew Booth),
|
||||
openvzLoadDomains: don't ignore failing virUUIDFormat (Jim Meyering),
|
||||
vshCommandParse: placate coverity (Jim Meyering),
|
||||
virStorageBackendIsMultipath: avoid dead store (Jim Meyering),
|
||||
Convert virSecurityReportError into a macro (Matthias Bolte),
|
||||
Swap position of nmodels and models parameters in cpuDecode() (Jiri Denemark),
|
||||
Remove virConnectPtr from secret XML APIs (Daniel P. Berrange),
|
||||
Remove virConnectPtr from interface XML APIs (Daniel P. Berrange),
|
||||
Remove virConnectPtr from CPU XML APIs (Daniel P. Berrange),
|
||||
Remove virConnectPtr from storage APIs & driver (Daniel P. Berrange),
|
||||
Remove virConnectPtr from all node device XML APIs (Daniel P. Berrange),
|
||||
Remove virConnectPtr from network XML APis (Daniel P. Berrange),
|
||||
Remove virConnectPtr from USB/PCI device iterators (Daniel P. Berrange),
|
||||
Fix generation of floppy disk arg for QEMU's -global arg (Daniel P. Berrange),
|
||||
Fix compile error in Xen proxy from virConnectPtr changes (Daniel P. Berrange),
|
||||
Remove use of virConnectPtr from security driver APIs (Daniel P. Berrange),
|
||||
Remove virConnectPtr from all domain XML parsing/formatting APIs (Daniel P. Berrange),
|
||||
Remove virConnectPtr from LXC driver (Daniel P. Berrange),
|
||||
Remove passing of virConnectPtr throughout QEMU driver (Daniel P. Berrange),
|
||||
virAsprintf: remove its warn_unused_result attribute (Jim Meyering),
|
||||
absolutePathFromBaseFile: avoid an unnecessary use of assert (Jim Meyering),
|
||||
Remove conn parameter from USB functions (Matthias Bolte),
|
||||
Remove conn parameter from JSON error macro (Matthias Bolte),
|
||||
Remove conn parameter from PCI functions (Matthias Bolte),
|
||||
Remove conn parameter from Linux stats functions (Matthias Bolte),
|
||||
Remove conn parameter from storage file functions (Matthias Bolte),
|
||||
Remove conn parameter from util functions (Matthias Bolte),
|
||||
Remove conn parameter from virXPath* functions (Matthias Bolte),
|
||||
Remove conn parameter from virReportSystemError (Matthias Bolte),
|
||||
Remove conn parameter from virReportOOMError (Matthias Bolte),
|
||||
website: Add a 1em right margin (Matthias Bolte),
|
||||
storage: Replace storageLog with VIR_ERROR (Matthias Bolte),
|
||||
opennebula: Remove unnecessary casts (Matthias Bolte),
|
||||
esx: Remove unnecessary casts (Matthias Bolte),
|
||||
cpu conf: Use virBufferFreeAndReset instead of virBufferContentAndReset and VIR_FREE (Matthias Bolte),
|
||||
esx: Cleanup preprocessing structure in esxVI_EnsureSession (Matthias Bolte)
|
||||
</li>
|
||||
</ul>
|
||||
<h3>0.7.6: Feb 3 2010</h3>
|
||||
<ul>
|
||||
<li>Features:
|
||||
|
@ -10,6 +10,7 @@ schema_DATA = \
|
||||
storagepool.rng \
|
||||
storagevol.rng \
|
||||
nodedev.rng \
|
||||
capability.rng
|
||||
capability.rng \
|
||||
nwfilter.rng
|
||||
|
||||
EXTRA_DIST = $(schema_DATA)
|
||||
|
@ -11,7 +11,7 @@
|
||||
<ref name='hostcaps'/>
|
||||
|
||||
<zeroOrMore>
|
||||
<ref name='guestcaps'/>
|
||||
<ref name='guestcaps'/>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
@ -19,24 +19,24 @@
|
||||
<define name='hostcaps'>
|
||||
<element name='host'>
|
||||
<element name='cpu'>
|
||||
<element name='arch'>
|
||||
<ref name='archnames'/>
|
||||
</element>
|
||||
<optional>
|
||||
<ref name='cpufeatures'/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='cpuspec'/>
|
||||
</optional>
|
||||
<element name='arch'>
|
||||
<ref name='archnames'/>
|
||||
</element>
|
||||
<optional>
|
||||
<ref name='cpufeatures'/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='cpuspec'/>
|
||||
</optional>
|
||||
</element>
|
||||
<optional>
|
||||
<ref name='migration'/>
|
||||
<ref name='migration'/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='topology'/>
|
||||
<ref name='topology'/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='secmodel'/>
|
||||
<ref name='secmodel'/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -56,16 +56,16 @@
|
||||
<define name='cpufeatures'>
|
||||
<element name='features'>
|
||||
<optional>
|
||||
<element name='pae'><empty/></element>
|
||||
<element name='pae'><empty/></element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='nonpae'><empty/></element>
|
||||
<element name='nonpae'><empty/></element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='vmx'><empty/></element>
|
||||
<element name='vmx'><empty/></element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='svm'><empty/></element>
|
||||
<element name='svm'><empty/></element>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -98,22 +98,22 @@
|
||||
<define name='migration'>
|
||||
<element name='migration_features'>
|
||||
<optional>
|
||||
<element name='live'>
|
||||
<empty/>
|
||||
</element>
|
||||
<element name='live'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='uri_transports'>
|
||||
<oneOrMore>
|
||||
<element name='uri_transport'>
|
||||
<choice>
|
||||
<value>esx</value>
|
||||
<value>tcp</value>
|
||||
<value>xenmigr</value>
|
||||
</choice>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
<element name='uri_transports'>
|
||||
<oneOrMore>
|
||||
<element name='uri_transport'>
|
||||
<choice>
|
||||
<value>esx</value>
|
||||
<value>tcp</value>
|
||||
<value>xenmigr</value>
|
||||
</choice>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -121,12 +121,12 @@
|
||||
<define name='topology'>
|
||||
<element name='topology'>
|
||||
<element name='cells'>
|
||||
<attribute name='num'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<oneOrMore>
|
||||
<ref name='cell'/>
|
||||
</oneOrMore>
|
||||
<attribute name='num'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<oneOrMore>
|
||||
<ref name='cell'/>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
</element>
|
||||
</define>
|
||||
@ -134,18 +134,18 @@
|
||||
<define name='cell'>
|
||||
<element name='cell'>
|
||||
<attribute name='id'>
|
||||
<ref name='uint'/>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
|
||||
<optional>
|
||||
<element name='cpus'>
|
||||
<attribute name='num'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<oneOrMore>
|
||||
<ref name='cpu'/>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
<element name='cpus'>
|
||||
<attribute name='num'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<oneOrMore>
|
||||
<ref name='cpu'/>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -153,7 +153,7 @@
|
||||
<define name='cpu'>
|
||||
<element name='cpu'>
|
||||
<attribute name='id'>
|
||||
<ref name='uint'/>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
</element>
|
||||
</define>
|
||||
@ -163,7 +163,7 @@
|
||||
<ref name='ostype'/>
|
||||
<ref name='arch'/>
|
||||
<optional>
|
||||
<ref name='features'/>
|
||||
<ref name='features'/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -171,11 +171,11 @@
|
||||
<define name='ostype'>
|
||||
<element name='os_type'>
|
||||
<choice>
|
||||
<value>xen</value> <!-- Xen 3.0 pv -->
|
||||
<value>linux</value> <!-- same as 'xen' - legacy -->
|
||||
<value>hvm</value> <!-- unmodified OS -->
|
||||
<value>exe</value> <!-- For container based virt -->
|
||||
<value>uml</value> <!-- user mode linux -->
|
||||
<value>xen</value> <!-- Xen 3.0 pv -->
|
||||
<value>linux</value> <!-- same as 'xen' - legacy -->
|
||||
<value>hvm</value> <!-- unmodified OS -->
|
||||
<value>exe</value> <!-- For container based virt -->
|
||||
<value>uml</value> <!-- user mode linux -->
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@ -183,20 +183,20 @@
|
||||
<define name='arch'>
|
||||
<element name='arch'>
|
||||
<attribute name='name'>
|
||||
<ref name='archnames'/>
|
||||
<ref name='archnames'/>
|
||||
</attribute>
|
||||
<ref name='wordsize'/>
|
||||
<optional>
|
||||
<ref name='emulator'/>
|
||||
<ref name='emulator'/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='loader'/>
|
||||
<ref name='loader'/>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<ref name='machine'/>
|
||||
<ref name='machine'/>
|
||||
</zeroOrMore>
|
||||
<oneOrMore>
|
||||
<ref name='domain'/>
|
||||
<ref name='domain'/>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
</define>
|
||||
@ -216,9 +216,9 @@
|
||||
<define name='wordsize'>
|
||||
<element name='wordsize'>
|
||||
<choice>
|
||||
<value>31</value>
|
||||
<value>32</value>
|
||||
<value>64</value>
|
||||
<value>31</value>
|
||||
<value>32</value>
|
||||
<value>64</value>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@ -237,23 +237,23 @@
|
||||
<define name='domain'>
|
||||
<element name='domain'>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>qemu</value>
|
||||
<value>kqemu</value>
|
||||
<value>kvm</value>
|
||||
<value>xen</value>
|
||||
<value>uml</value>
|
||||
<value>lxc</value>
|
||||
<value>openvz</value>
|
||||
<value>test</value>
|
||||
</choice>
|
||||
<choice>
|
||||
<value>qemu</value>
|
||||
<value>kqemu</value>
|
||||
<value>kvm</value>
|
||||
<value>xen</value>
|
||||
<value>uml</value>
|
||||
<value>lxc</value>
|
||||
<value>openvz</value>
|
||||
<value>test</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
|
||||
<optional>
|
||||
<ref name='emulator'/>
|
||||
<ref name='emulator'/>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<ref name='machine'/>
|
||||
<ref name='machine'/>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
@ -261,31 +261,31 @@
|
||||
<define name='features'>
|
||||
<element name='features'>
|
||||
<optional>
|
||||
<element name='pae'>
|
||||
<empty/>
|
||||
</element>
|
||||
<element name='pae'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='nonpae'>
|
||||
<empty/>
|
||||
</element>
|
||||
<element name='nonpae'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='ia64_be'>
|
||||
<empty/>
|
||||
</element>
|
||||
<element name='ia64_be'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='acpi'>
|
||||
<ref name='featuretoggle'/>
|
||||
<empty/>
|
||||
</element>
|
||||
<element name='acpi'>
|
||||
<ref name='featuretoggle'/>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='apic'>
|
||||
<ref name='featuretoggle'/>
|
||||
<empty/>
|
||||
</element>
|
||||
<element name='apic'>
|
||||
<ref name='featuretoggle'/>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='cpuselection'>
|
||||
@ -298,14 +298,14 @@
|
||||
<define name='featuretoggle'>
|
||||
<attribute name='toggle'>
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name='default'>
|
||||
<choice>
|
||||
<value>on</value>
|
||||
<value>off</value>
|
||||
<value>on</value>
|
||||
<value>off</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
|
@ -295,19 +295,119 @@
|
||||
</interleave>
|
||||
</define>
|
||||
<define name="clock">
|
||||
<zeroOrMore>
|
||||
<ref name="timer"/>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<element name="clock">
|
||||
<attribute name="offset">
|
||||
<choice>
|
||||
<choice>
|
||||
<attribute name="offset">
|
||||
<value>localtime</value>
|
||||
</attribute>
|
||||
<attribute name="offset">
|
||||
<value>utc</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</attribute>
|
||||
<group>
|
||||
<attribute name="offset">
|
||||
<value>timezone</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="timezone">
|
||||
<ref name="timeZone"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="offset">
|
||||
<value>variable</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="adjustment">
|
||||
<ref name="timeDelta"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
</choice>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
<!--
|
||||
<define name="timer">
|
||||
<element name="timer">
|
||||
<attribute name="name">
|
||||
<choice>
|
||||
<value>platform</value>
|
||||
<value>pit</value>
|
||||
<value>rtc</value>
|
||||
<value>hpet</value>
|
||||
<value>tsc</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="track">
|
||||
<choice>
|
||||
<value>boot</value>
|
||||
<value>guest</value>
|
||||
<value>wall</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="tickpolicy">
|
||||
<choice>
|
||||
<value>delay</value>
|
||||
<value>catchup</value>
|
||||
<value>merge</value>
|
||||
<value>discard</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="catchup"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="frequency">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="mode">
|
||||
<choice>
|
||||
<value>auto</value>
|
||||
<value>native</value>
|
||||
<value>emulate</value>
|
||||
<value>paravirt</value>
|
||||
<value>smpsafe</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="present">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
<define name="catchup">
|
||||
<element name="catchup">
|
||||
<optional>
|
||||
<attribute name="threshold">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
<attribute name="slew">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
<attribute name="limit">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<!--
|
||||
A bootloader may be used to extract the OS information instead of
|
||||
defining the OS parameter in the instance. It points just to the
|
||||
binary or script used to extract the data from the first disk device.
|
||||
@ -499,6 +599,9 @@
|
||||
<ref name="driverCache"/>
|
||||
</group>
|
||||
</choice>
|
||||
<optional>
|
||||
<ref name="driverErrorPolicy"/>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
@ -521,23 +624,52 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="driverErrorPolicy">
|
||||
<attribute name="error_policy">
|
||||
<choice>
|
||||
<value>stop</value>
|
||||
<value>ignore</value>
|
||||
<value>enospace</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="controller">
|
||||
<element name="controller">
|
||||
<optional>
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>fdc</value>
|
||||
<value>ide</value>
|
||||
<value>scsi</value>
|
||||
<value>sata</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<choice>
|
||||
<group>
|
||||
<optional>
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>fdc</value>
|
||||
<value>ide</value>
|
||||
<value>scsi</value>
|
||||
<value>sata</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<!-- virtio-serial can have 2 additional attributes -->
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>virtio-serial</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="ports">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="vectors">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
</choice>
|
||||
<attribute name="index">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -602,7 +734,7 @@
|
||||
</group>
|
||||
</choice>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -669,6 +801,25 @@
|
||||
<ref name="interface-options"/>
|
||||
</interleave>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>direct</value>
|
||||
</attribute>
|
||||
<interleave>
|
||||
<element name="source">
|
||||
<attribute name="dev">
|
||||
<ref name="deviceName"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="mode">
|
||||
<ref name="bridgeMode"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
<ref name="interface-options"/>
|
||||
</interleave>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>user</value>
|
||||
@ -742,7 +893,12 @@
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="filterref">
|
||||
<ref name="filterref-node-attributes"/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
@ -995,7 +1151,7 @@
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
@ -1120,15 +1276,28 @@
|
||||
<attribute name="port"/>
|
||||
</element>
|
||||
</define>
|
||||
<define name="virtioTarget">
|
||||
<element name="target">
|
||||
<attribute name="type">
|
||||
<value>virtio</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="name"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="channel">
|
||||
<element name="channel">
|
||||
<ref name="qemucdevSrcType"/>
|
||||
<interleave>
|
||||
<ref name="qemucdevSrcDef"/>
|
||||
<ref name="guestfwdTarget"/>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
<choice>
|
||||
<ref name="guestfwdTarget"/>
|
||||
<ref name="virtioTarget"/>
|
||||
</choice>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
@ -1150,7 +1319,7 @@
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -1179,12 +1348,12 @@
|
||||
<group>
|
||||
<element name="source">
|
||||
<choice>
|
||||
<group>
|
||||
<group>
|
||||
<ref name="usbproduct"/>
|
||||
<optional>
|
||||
<ref name="usbaddress"/>
|
||||
</optional>
|
||||
</group>
|
||||
<optional>
|
||||
<ref name="usbaddress"/>
|
||||
</optional>
|
||||
</group>
|
||||
<ref name="usbaddress"/>
|
||||
<element name="address">
|
||||
<ref name="pciaddress"/>
|
||||
@ -1243,13 +1412,23 @@
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="bus">
|
||||
<ref name="driveBus"/>
|
||||
<ref name="driveBus"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="unit">
|
||||
<ref name="driveUnit"/>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="virtioserialaddress">
|
||||
<attribute name="controller">
|
||||
<ref name="driveController"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="bus">
|
||||
<ref name="driveBus"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
<!--
|
||||
Devices attached to a domain.
|
||||
-->
|
||||
@ -1313,74 +1492,113 @@
|
||||
-->
|
||||
<define name="cpu">
|
||||
<element name="cpu">
|
||||
<optional>
|
||||
<attribute name="match">
|
||||
<choice>
|
||||
<value>minimum</value>
|
||||
<value>exact</value>
|
||||
<value>strict</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="model">
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="topology">
|
||||
<attribute name="sockets">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
<attribute name="cores">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
<attribute name="threads">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<element name="feature">
|
||||
<attribute name="policy">
|
||||
<choice>
|
||||
<value>force</value>
|
||||
<value>require</value>
|
||||
<value>optional</value>
|
||||
<value>disable</value>
|
||||
<value>forbid</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name="name">
|
||||
<ref name="featureName"/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</interleave>
|
||||
<choice>
|
||||
<ref name="cpuTopology"/>
|
||||
<group>
|
||||
<ref name="cpuMatch"/>
|
||||
<interleave>
|
||||
<ref name="cpuModel"/>
|
||||
<optional>
|
||||
<ref name="cpuTopology"/>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<ref name="cpuFeature"/>
|
||||
</zeroOrMore>
|
||||
</interleave>
|
||||
</group>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuMatch">
|
||||
<attribute name="match">
|
||||
<choice>
|
||||
<value>minimum</value>
|
||||
<value>exact</value>
|
||||
<value>strict</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name="cpuModel">
|
||||
<element name="model">
|
||||
<text/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuFeature">
|
||||
<element name="feature">
|
||||
<attribute name="policy">
|
||||
<choice>
|
||||
<value>force</value>
|
||||
<value>require</value>
|
||||
<value>optional</value>
|
||||
<value>disable</value>
|
||||
<value>forbid</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name="name">
|
||||
<ref name="featureName"/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuTopology">
|
||||
<element name="topology">
|
||||
<attribute name="sockets">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
<attribute name="cores">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
<attribute name="threads">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="address">
|
||||
<element name="address">
|
||||
<choice>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>pci</value>
|
||||
</attribute>
|
||||
<ref name="pciaddress"/>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>drive</value>
|
||||
</attribute>
|
||||
<ref name="driveaddress"/>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>pci</value>
|
||||
</attribute>
|
||||
<ref name="pciaddress"/>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>drive</value>
|
||||
</attribute>
|
||||
<ref name="driveaddress"/>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>virtio-serial</value>
|
||||
</attribute>
|
||||
<ref name="virtioserialaddress"/>
|
||||
</group>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="filterref-node-attributes">
|
||||
<attribute name="filter">
|
||||
<data type="NCName"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="parameter">
|
||||
<attribute name="name">
|
||||
<ref name="filter-param-name"/>
|
||||
</attribute>
|
||||
<attribute name="value">
|
||||
<ref name="filter-param-value"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<!--
|
||||
Type library
|
||||
|
||||
@ -1466,6 +1684,11 @@
|
||||
<param name="pattern">[a-zA-Z0-9_\.\-:/]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="bridgeMode">
|
||||
<data type="string">
|
||||
<param name="pattern">(vepa|bridge|private)</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="addrMAC">
|
||||
<data type="string">
|
||||
<param name="pattern">([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}</param>
|
||||
@ -1526,4 +1749,24 @@
|
||||
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="timeDelta">
|
||||
<data type="string">
|
||||
<param name="pattern">(-|\+)?[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="timeZone">
|
||||
<data type="string">
|
||||
<param name="pattern">[a-zA-Z0-9_\.\+\-/]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="filter-param-name">
|
||||
<data type="string">
|
||||
<param name="pattern">[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="filter-param-value">
|
||||
<data type="string">
|
||||
<param name="pattern">[a-zA-Z0-9_\.:]+</param>
|
||||
</data>
|
||||
</define>
|
||||
</grammar>
|
||||
|
@ -86,9 +86,9 @@
|
||||
<attribute name="netmask"><text/></attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="tftp">
|
||||
<attribute name="root"><text/></attribute>
|
||||
</element>
|
||||
<element name="tftp">
|
||||
<attribute name="root"><text/></attribute>
|
||||
</element>
|
||||
</optional>
|
||||
<!-- Define the range(s) of IP addresses that the DHCP
|
||||
server should hand out -->
|
||||
@ -106,14 +106,14 @@
|
||||
<attribute name="ip"><text/></attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<element name="bootp">
|
||||
<attribute name="file"><text/></attribute>
|
||||
<optional>
|
||||
<element name="bootp">
|
||||
<attribute name="file"><text/></attribute>
|
||||
<optional>
|
||||
<attribute name="server"><text/></attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</element>
|
||||
</optional>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</optional>
|
||||
|
||||
<zeroOrMore>
|
||||
<ref name="capability"/>
|
||||
<ref name="capability"/>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
@ -23,14 +23,14 @@
|
||||
<define name='capability'>
|
||||
<element name="capability">
|
||||
<choice>
|
||||
<ref name="capsystem"/>
|
||||
<ref name="cappcidev"/>
|
||||
<ref name="capusbdev"/>
|
||||
<ref name="capusbinterface"/>
|
||||
<ref name="capnet"/>
|
||||
<ref name="capscsihost"/>
|
||||
<ref name="capscsi"/>
|
||||
<ref name="capstorage"/>
|
||||
<ref name="capsystem"/>
|
||||
<ref name="cappcidev"/>
|
||||
<ref name="capusbdev"/>
|
||||
<ref name="capusbinterface"/>
|
||||
<ref name="capnet"/>
|
||||
<ref name="capscsihost"/>
|
||||
<ref name="capscsi"/>
|
||||
<ref name="capstorage"/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@ -46,30 +46,30 @@
|
||||
|
||||
<element name='hardware'>
|
||||
<optional>
|
||||
<element name='vendor'><text/></element>
|
||||
<element name='vendor'><text/></element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='version'><text/></element>
|
||||
<element name='version'><text/></element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='serial'><text/></element>
|
||||
<element name='serial'><text/></element>
|
||||
</optional>
|
||||
|
||||
<element name='uuid'>
|
||||
<ref name='uuid'/>
|
||||
<ref name='uuid'/>
|
||||
</element>
|
||||
</element>
|
||||
|
||||
|
||||
<element name='firmware'>
|
||||
<optional>
|
||||
<element name='vendor'><text/></element>
|
||||
<element name='vendor'><text/></element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='version'><text/></element>
|
||||
<element name='version'><text/></element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='release_date'><text/></element>
|
||||
<element name='release_date'><text/></element>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -94,23 +94,23 @@
|
||||
|
||||
<element name='product'>
|
||||
<attribute name='id'>
|
||||
<ref name='hexuint'/>
|
||||
<ref name='hexuint'/>
|
||||
</attribute>
|
||||
|
||||
<choice>
|
||||
<text/>
|
||||
<empty/>
|
||||
<text/>
|
||||
<empty/>
|
||||
</choice>
|
||||
</element>
|
||||
|
||||
<element name='vendor'>
|
||||
<attribute name='id'>
|
||||
<ref name='hexuint'/>
|
||||
<ref name='hexuint'/>
|
||||
</attribute>
|
||||
|
||||
<choice>
|
||||
<text/>
|
||||
<empty/>
|
||||
<text/>
|
||||
<empty/>
|
||||
</choice>
|
||||
</element>
|
||||
|
||||
@ -130,23 +130,23 @@
|
||||
|
||||
<element name='product'>
|
||||
<attribute name='id'>
|
||||
<ref name='hexuint'/>
|
||||
<ref name='hexuint'/>
|
||||
</attribute>
|
||||
|
||||
<choice>
|
||||
<text/>
|
||||
<empty/>
|
||||
<text/>
|
||||
<empty/>
|
||||
</choice>
|
||||
</element>
|
||||
|
||||
<element name='vendor'>
|
||||
<attribute name='id'>
|
||||
<ref name='hexuint'/>
|
||||
<ref name='hexuint'/>
|
||||
</attribute>
|
||||
|
||||
<choice>
|
||||
<text/>
|
||||
<empty/>
|
||||
<text/>
|
||||
<empty/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@ -171,7 +171,7 @@
|
||||
|
||||
<optional>
|
||||
<element name='description'>
|
||||
<text/>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -186,7 +186,7 @@
|
||||
</element>
|
||||
<optional>
|
||||
<element name='address'>
|
||||
<ref name='mac'/>
|
||||
<ref name='mac'/>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
@ -198,8 +198,8 @@
|
||||
<define name='subcapnet'>
|
||||
<element name='capability'>
|
||||
<choice>
|
||||
<ref name='subcapnet80203'/>
|
||||
<ref name='subcapnet80211'/>
|
||||
<ref name='subcapnet80203'/>
|
||||
<ref name='subcapnet80211'/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@ -261,27 +261,27 @@
|
||||
|
||||
<optional>
|
||||
<element name='bus'>
|
||||
<text/>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='drive_type'>
|
||||
<text/>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='model'>
|
||||
<text/>
|
||||
</element>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='vendor'>
|
||||
<text/>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='serial'>
|
||||
<text/>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
@ -292,9 +292,9 @@
|
||||
|
||||
<optional>
|
||||
<element name='capability'>
|
||||
<attribute name='type'>
|
||||
<value>hotpluggable</value>
|
||||
</attribute>
|
||||
<attribute name='type'>
|
||||
<value>hotpluggable</value>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -302,17 +302,17 @@
|
||||
<define name='capstorageremoveable'>
|
||||
<element name='capability'>
|
||||
<attribute name='type'>
|
||||
<value>removable</value>
|
||||
<value>removable</value>
|
||||
</attribute>
|
||||
<element name='media_available'>
|
||||
<choice>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
</choice>
|
||||
<choice>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
</choice>
|
||||
</element>
|
||||
|
||||
<element name='media_size'>
|
||||
<ref name='uint'/>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='media_label'>
|
||||
|
783
docs/schemas/nwfilter.rng
Normal file
783
docs/schemas/nwfilter.rng
Normal file
@ -0,0 +1,783 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
<start>
|
||||
<ref name="filter"/>
|
||||
</start>
|
||||
<define name="filter">
|
||||
<element name="filter">
|
||||
<ref name="filter-node-attributes"/>
|
||||
<zeroOrMore>
|
||||
<choice>
|
||||
<element name="filterref">
|
||||
<ref name="filterref-node-attributes"/>
|
||||
</element>
|
||||
<element name="uuid">
|
||||
<ref name="UUID"/>
|
||||
</element>
|
||||
</choice>
|
||||
</zeroOrMore>
|
||||
<zeroOrMore>
|
||||
<element name="rule">
|
||||
<ref name="rule-node-attributes"/>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="mac">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="common-l2-attributes"/>
|
||||
<ref name="mac-attributes"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="arp">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="common-l2-attributes"/>
|
||||
<ref name="arp-attributes"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="ip">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="common-l2-attributes"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-port-attributes"/>
|
||||
<ref name="ip-attributes"/>
|
||||
<ref name="dscp-attribute"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="ipv6">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="common-l2-attributes"/>
|
||||
<ref name="common-ipv6-attributes-p1"/>
|
||||
<ref name="common-port-attributes"/>
|
||||
<ref name="ip-attributes"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="tcp">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-port-attributes"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-ip-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="udp">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-port-attributes"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-ip-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="sctp">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-port-attributes"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-ip-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="icmp">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-ip-attributes-p2"/>
|
||||
<ref name="icmp-attributes"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="igmp">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-ip-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="all">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-ip-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="esp">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-ip-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="ah">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-ip-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="udplite">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ip-attributes-p1"/>
|
||||
<ref name="common-ip-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="tcp-ipv6">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-port-attributes"/>
|
||||
<ref name="common-ipv6-attributes-p1"/>
|
||||
<ref name="common-ipv6-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="udp-ipv6">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-port-attributes"/>
|
||||
<ref name="common-ipv6-attributes-p1"/>
|
||||
<ref name="common-ipv6-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="sctp-ipv6">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-port-attributes"/>
|
||||
<ref name="common-ipv6-attributes-p1"/>
|
||||
<ref name="common-ipv6-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="icmpv6">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ipv6-attributes-p1"/>
|
||||
<ref name="common-ipv6-attributes-p2"/>
|
||||
<ref name="icmp-attributes"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="all-ipv6">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ipv6-attributes-p1"/>
|
||||
<ref name="common-ipv6-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="esp-ipv6">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ipv6-attributes-p1"/>
|
||||
<ref name="common-ipv6-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="ah-ipv6">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ipv6-attributes-p1"/>
|
||||
<ref name="common-ipv6-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<element name="udplite-ipv6">
|
||||
<ref name="match-attribute"/>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<ref name="common-ipv6-attributes-p1"/>
|
||||
<ref name="common-ipv6-attributes-p2"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<!-- ########### attributes of XML nodes ############ -->
|
||||
|
||||
<define name="filter-node-attributes">
|
||||
<attribute name="name">
|
||||
<data type="NCName"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="chain">
|
||||
<choice>
|
||||
<value>root</value>
|
||||
<value>arp</value>
|
||||
<value>ipv4</value>
|
||||
<value>ipv6</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name="filterref-node-attributes">
|
||||
<attribute name="filter">
|
||||
<data type="NCName"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="parameter">
|
||||
<attribute name="name">
|
||||
<ref name="filter-param-name"/>
|
||||
</attribute>
|
||||
<attribute name="value">
|
||||
<ref name="filter-param-value"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name="rule-node-attributes">
|
||||
<attribute name="action">
|
||||
<ref name='action-type'/>
|
||||
</attribute>
|
||||
<attribute name="direction">
|
||||
<ref name='direction-type'/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="priority">
|
||||
<ref name='priority-type'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name="match-attribute">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="match">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="srcmac-attribute">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="srcmacaddr">
|
||||
<ref name="addrMAC"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="common-l2-attributes">
|
||||
<interleave>
|
||||
<ref name="srcmac-attribute"/>
|
||||
<optional>
|
||||
<attribute name="srcmacmask">
|
||||
<ref name="addrMAC"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstmacaddr">
|
||||
<ref name="addrMAC"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstmacmask">
|
||||
<ref name="addrMAC"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="common-ip-attributes-p1">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="srcipaddr">
|
||||
<ref name="addrIP"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="srcipmask">
|
||||
<ref name="addrMask"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstipaddr">
|
||||
<ref name="addrIP"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstipmask">
|
||||
<ref name="addrMask"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="common-ip-attributes-p2">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="srcipfrom">
|
||||
<ref name="addrIP"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="srcipto">
|
||||
<ref name="addrIP"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstipfrom">
|
||||
<ref name="addrIP"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstipto">
|
||||
<ref name="addrIP"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dscp">
|
||||
<ref name="sixbitrange"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="common-ipv6-attributes-p1">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="srcipaddr">
|
||||
<ref name="addrIPv6"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="srcipmask">
|
||||
<ref name="addrMaskv6"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstipaddr">
|
||||
<ref name="addrIPv6"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstipmask">
|
||||
<ref name="addrMaskv6"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="common-ipv6-attributes-p2">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="srcipfrom">
|
||||
<ref name="addrIPv6"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="srcipto">
|
||||
<ref name="addrIPv6"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstipfrom">
|
||||
<ref name="addrIPv6"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstipto">
|
||||
<ref name="addrIPv6"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dscp">
|
||||
<ref name="sixbitrange"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="common-port-attributes">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="srcportstart">
|
||||
<ref name="uint16range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="srcportend">
|
||||
<ref name="uint16range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstportstart">
|
||||
<ref name="uint16range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="dstportend">
|
||||
<ref name="uint16range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="icmp-attributes">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="type">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="code">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="mac-attributes">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="protocolid">
|
||||
<ref name="mac-protocolid"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="arp-attributes">
|
||||
<interleave>
|
||||
<optional>
|
||||
<attribute name="arpsrcmacaddr">
|
||||
<ref name="addrMAC"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="arpsrcipaddr">
|
||||
<ref name="addrIP"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="arpdstmacaddr">
|
||||
<ref name="addrMAC"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="arpdstipaddr">
|
||||
<ref name="addrIP"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="hwtype">
|
||||
<ref name="uint16range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="opcode">
|
||||
<ref name="arpOpcodeType"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="protocoltype">
|
||||
<ref name="uint16range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name="ip-attributes">
|
||||
<optional>
|
||||
<attribute name="protocol">
|
||||
<ref name="ipProtocolType"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name="dscp-attribute">
|
||||
<optional>
|
||||
<attribute name="dscp">
|
||||
<ref name="sixbitrange"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<!-- ################ type library ################ -->
|
||||
|
||||
<define name="UUID">
|
||||
<choice>
|
||||
<data type="string">
|
||||
<param name="pattern">[a-fA-F0-9]{32}</param>
|
||||
</data>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">[a-fA-F0-9]{8}\-([a-fA-F0-9]{4}\-){3}[a-fA-F0-9]{12}</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="addrMAC">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">([a-fA-F0-9]{1,2}:){5}[a-fA-F0-9]{1,2}</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="addrIP">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9]</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="addrIPv6">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">([a-fA-F0-9]{0,4}:){2,7}([a-fA-F0-9]*)(([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9])?</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="addrMask">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
<param name="maxInclusive">32</param>
|
||||
</data>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9]</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="addrMaskv6">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
<param name="maxInclusive">128</param>
|
||||
</data>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">([a-fA-F0-9]{0,4}:){2,7}([a-fA-F0-9]*)</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="sixbitrange">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
<param name="maxInclusive">63</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="mac-protocolid">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">1536</param>
|
||||
<param name="maxInclusive">65535</param>
|
||||
</data>
|
||||
|
||||
<choice>
|
||||
<value>arp</value>
|
||||
<value>ipv4</value>
|
||||
<value>ipv6</value>
|
||||
</choice>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="uint8range">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
<param name="maxInclusive">255</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="uint16range">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
<param name="maxInclusive">65535</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="arpOpcodeType">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
<param name="maxInclusive">65535</param>
|
||||
</data>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">([Rr]eply|[Rr]equest|[Rr]equest_[Rr]everse|[Rr]eply_[Rr]everse|DRARP_[Rr]equest|DRARP_[Rr]eply|DRARP_[Ee]rror|InARP_[Rr]equest|ARP_NAK)</param>
|
||||
</data>
|
||||
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="ipProtocolType">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
<param name="maxInclusive">255</param>
|
||||
</data>
|
||||
|
||||
<choice>
|
||||
<value>tcp</value>
|
||||
<value>udp</value>
|
||||
<value>udplite</value>
|
||||
<value>esp</value>
|
||||
<value>ah</value>
|
||||
<value>icmp</value>
|
||||
<value>igmp</value>
|
||||
<value>sctp</value>
|
||||
<value>icmpv6</value>
|
||||
</choice>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="filter-param-name">
|
||||
<data type="string">
|
||||
<param name="pattern">[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="filter-param-value">
|
||||
<data type="string">
|
||||
<param name="pattern">[a-zA-Z0-9_\.:]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='action-type'>
|
||||
<choice>
|
||||
<value>drop</value>
|
||||
<value>accept</value>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name='direction-type'>
|
||||
<choice>
|
||||
<value>in</value>
|
||||
<value>out</value>
|
||||
<value>inout</value>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name='priority-type'>
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
<param name="maxInclusive">1000</param>
|
||||
</data>
|
||||
</define>
|
||||
</grammar>
|
@ -9,14 +9,14 @@
|
||||
<define name='pool'>
|
||||
<element name='pool'>
|
||||
<choice>
|
||||
<ref name='pooldir'/>
|
||||
<ref name='poolfs'/>
|
||||
<ref name='poolnetfs'/>
|
||||
<ref name='poollogical'/>
|
||||
<ref name='pooldisk'/>
|
||||
<ref name='pooliscsi'/>
|
||||
<ref name='poolscsi'/>
|
||||
<ref name='poolmpath'/>
|
||||
<ref name='pooldir'/>
|
||||
<ref name='poolfs'/>
|
||||
<ref name='poolnetfs'/>
|
||||
<ref name='poollogical'/>
|
||||
<ref name='pooldisk'/>
|
||||
<ref name='pooliscsi'/>
|
||||
<ref name='poolscsi'/>
|
||||
<ref name='poolmpath'/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@ -109,7 +109,7 @@
|
||||
</element>
|
||||
<optional>
|
||||
<element name='uuid'>
|
||||
<ref name='uuid'/>
|
||||
<ref name='uuid'/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -117,17 +117,17 @@
|
||||
<define name='sizing'>
|
||||
<optional>
|
||||
<element name='capacity'>
|
||||
<ref name='uint'/>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='allocation'>
|
||||
<ref name='uint'/>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='available'>
|
||||
<ref name='uint'/>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -135,20 +135,20 @@
|
||||
<define name='permissions'>
|
||||
<optional>
|
||||
<element name='permissions'>
|
||||
<element name='mode'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<element name='owner'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<element name='group'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='label'>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<element name='mode'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<element name='owner'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<element name='group'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='label'>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -156,9 +156,9 @@
|
||||
<define name='target'>
|
||||
<element name='target'>
|
||||
<optional>
|
||||
<element name='path'>
|
||||
<ref name='path'/>
|
||||
</element>
|
||||
<element name='path'>
|
||||
<ref name='path'/>
|
||||
</element>
|
||||
</optional>
|
||||
<ref name='permissions'/>
|
||||
</element>
|
||||
@ -167,7 +167,7 @@
|
||||
<define name='sourceinfohost'>
|
||||
<element name='host'>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
<text/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
@ -176,14 +176,14 @@
|
||||
<define name='sourceinfodev'>
|
||||
<element name='device'>
|
||||
<attribute name='path'>
|
||||
<choice>
|
||||
<ref name='path'/>
|
||||
<ref name='name'/>
|
||||
</choice>
|
||||
<choice>
|
||||
<ref name='path'/>
|
||||
<ref name='name'/>
|
||||
</choice>
|
||||
</attribute>
|
||||
<choice>
|
||||
<empty/>
|
||||
<ref name='devextents'/>
|
||||
<empty/>
|
||||
<ref name='devextents'/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@ -191,7 +191,7 @@
|
||||
<define name='initiatorinfoiqn'>
|
||||
<element name='iqn'>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
<text/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
@ -200,12 +200,12 @@
|
||||
<define name='devextents'>
|
||||
<oneOrMore>
|
||||
<element name='freeExtent'>
|
||||
<attribute name='start'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<attribute name='end'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<attribute name='start'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<attribute name='end'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</define>
|
||||
@ -213,7 +213,7 @@
|
||||
<define name='sourceinfodir'>
|
||||
<element name='dir'>
|
||||
<attribute name='path'>
|
||||
<ref name='path'/>
|
||||
<ref name='path'/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
@ -222,7 +222,7 @@
|
||||
<define name='sourceinfoadapter'>
|
||||
<element name='adapter'>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
<text/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
@ -253,23 +253,23 @@
|
||||
<define name='sourcefmtfs'>
|
||||
<optional>
|
||||
<element name='format'>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>auto</value>
|
||||
<value>ext2</value>
|
||||
<value>ext3</value>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>auto</value>
|
||||
<value>ext2</value>
|
||||
<value>ext3</value>
|
||||
<value>ext4</value>
|
||||
<value>ufs</value>
|
||||
<value>iso9660</value>
|
||||
<value>udf</value>
|
||||
<value>ufs</value>
|
||||
<value>iso9660</value>
|
||||
<value>udf</value>
|
||||
<value>gfs</value>
|
||||
<value>gfs2</value>
|
||||
<value>vfat</value>
|
||||
<value>hfs+</value>
|
||||
<value>xfs</value>
|
||||
<value>ocfs2</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<value>gfs2</value>
|
||||
<value>vfat</value>
|
||||
<value>hfs+</value>
|
||||
<value>xfs</value>
|
||||
<value>ocfs2</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -278,12 +278,12 @@
|
||||
<define name='sourcefmtnetfs'>
|
||||
<optional>
|
||||
<element name='format'>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>auto</value>
|
||||
<value>nfs</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>auto</value>
|
||||
<value>nfs</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -292,19 +292,19 @@
|
||||
<define name='sourcefmtdisk'>
|
||||
<optional>
|
||||
<element name='format'>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>none</value>
|
||||
<value>dos</value>
|
||||
<value>dvh</value>
|
||||
<value>gpt</value>
|
||||
<value>mac</value>
|
||||
<value>bsd</value>
|
||||
<value>pc98</value>
|
||||
<value>sun</value>
|
||||
<value>lvm2</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>none</value>
|
||||
<value>dos</value>
|
||||
<value>dvh</value>
|
||||
<value>gpt</value>
|
||||
<value>mac</value>
|
||||
<value>bsd</value>
|
||||
<value>pc98</value>
|
||||
<value>sun</value>
|
||||
<value>lvm2</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -313,12 +313,12 @@
|
||||
<define name='sourcefmtlogical'>
|
||||
<optional>
|
||||
<element name='format'>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>auto</value>
|
||||
<value>lvm2</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>auto</value>
|
||||
<value>lvm2</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -327,7 +327,7 @@
|
||||
<define name='sourcedir'>
|
||||
<optional>
|
||||
<element name='source'>
|
||||
<empty/>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
|
@ -11,18 +11,18 @@
|
||||
<define name='vol'>
|
||||
<element name='volume'>
|
||||
<element name='name'>
|
||||
<ref name='name'/>
|
||||
<ref name='name'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='key'>
|
||||
<text/>
|
||||
</element>
|
||||
<element name='key'>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<ref name='source'/>
|
||||
<ref name='sizing'/>
|
||||
<ref name='target'/>
|
||||
<optional>
|
||||
<ref name='backingStore'/>
|
||||
<ref name='backingStore'/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -31,16 +31,16 @@
|
||||
<optional>
|
||||
<element name='capacity'>
|
||||
<optional>
|
||||
<attribute name='unit'>
|
||||
<ref name='unit'/>
|
||||
</attribute>
|
||||
<attribute name='unit'>
|
||||
<ref name='unit'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<ref name='uint'/>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='allocation'>
|
||||
<ref name='uint'/>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -48,20 +48,20 @@
|
||||
<define name='permissions'>
|
||||
<optional>
|
||||
<element name='permissions'>
|
||||
<element name='mode'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<element name='owner'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<element name='group'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='label'>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<element name='mode'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<element name='owner'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<element name='group'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='label'>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -69,9 +69,9 @@
|
||||
<define name='target'>
|
||||
<element name='target'>
|
||||
<optional>
|
||||
<element name='path'>
|
||||
<ref name='path'/>
|
||||
</element>
|
||||
<element name='path'>
|
||||
<ref name='path'/>
|
||||
</element>
|
||||
</optional>
|
||||
<ref name='format'/>
|
||||
<ref name='permissions'/>
|
||||
@ -84,7 +84,7 @@
|
||||
<define name='backingStore'>
|
||||
<element name='backingStore'>
|
||||
<element name='path'>
|
||||
<ref name='path'/>
|
||||
<ref name='path'/>
|
||||
</element>
|
||||
<ref name='format'/>
|
||||
<ref name='permissions'/>
|
||||
@ -95,7 +95,7 @@
|
||||
<define name='source'>
|
||||
<element name='source'>
|
||||
<zeroOrMore>
|
||||
<ref name='sourcedev'/>
|
||||
<ref name='sourcedev'/>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
@ -103,11 +103,11 @@
|
||||
<define name='sourcedev'>
|
||||
<element name='device'>
|
||||
<attribute name='path'>
|
||||
<ref name='path'/>
|
||||
<ref name='path'/>
|
||||
</attribute>
|
||||
<choice>
|
||||
<empty/>
|
||||
<ref name='devextents'/>
|
||||
<empty/>
|
||||
<ref name='devextents'/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@ -115,12 +115,12 @@
|
||||
<define name='devextents'>
|
||||
<oneOrMore>
|
||||
<element name='extent'>
|
||||
<attribute name='start'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<attribute name='end'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<attribute name='start'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
<attribute name='end'>
|
||||
<ref name='uint'/>
|
||||
</attribute>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</define>
|
||||
@ -164,12 +164,12 @@
|
||||
<define name='format'>
|
||||
<optional>
|
||||
<element name='format'>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<ref name='formatfile'/>
|
||||
<ref name='formatdev'/>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<ref name='formatfile'/>
|
||||
<ref name='formatdev'/>
|
||||
</choice>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
|
@ -50,6 +50,10 @@
|
||||
<a href="logging.html">Logging</a>
|
||||
<span>The library and the daemon logging support</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="hooks.html">Hooks</a>
|
||||
<span>Hooks for system specific management</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
@ -114,6 +118,10 @@
|
||||
<a href="formatsecret.html">Secrets</a>
|
||||
<span>The secret XML format</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="formatsnapshot.html">Snapshots</a>
|
||||
<span>The snapshot XML format</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -25,6 +25,12 @@ libvirt.
|
||||
<li>
|
||||
<a href="#StorageBackendISCSI">iSCSI backend</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#StorageBackendSCSI">SCSI backend</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#StorageBackendMultipath">Multipath backend</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="StorageBackendDir" id="StorageBackendDir">Directory pool</a></h2>
|
||||
@ -344,5 +350,71 @@ libvirt.
|
||||
<p>
|
||||
The iSCSI volume pool does not use the volume format type element.
|
||||
</p>
|
||||
|
||||
<h2><a name="StorageBackendSCSI" id="StorageBackendSCSI">SCSI volume pools</a></h2>
|
||||
<p>
|
||||
This provides a pool based on a SCSI HBA. Volumes are preexisting SCSI
|
||||
LUNs, and cannot be created via the libvirt APIs. Since /dev/XXX names
|
||||
aren't generally stable, it is recommended to configure the pool
|
||||
to use <code>/dev/disk/by-path</code> or <code>/dev/disk/by-id</code>
|
||||
for the target path. These provide persistent stable naming for LUNs
|
||||
<span class="since">Since 0.6.2</span>
|
||||
</p>
|
||||
|
||||
<h3>Example pool input</h3>
|
||||
<pre>
|
||||
<pool type="scsi">
|
||||
<name>virtimages</name>
|
||||
<source>
|
||||
<adapter name="host0"/>
|
||||
</source>
|
||||
<target>
|
||||
<path>/dev/disk/by-path</path>
|
||||
</target>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
The SCSI volume pool does not use the pool format type element.
|
||||
</p>
|
||||
|
||||
<h3>Valid volume format types</h3>
|
||||
<p>
|
||||
The SCSI volume pool does not use the volume format type element.
|
||||
</p>
|
||||
|
||||
<h2><a name="StorageBackendMultipath" id="StorageBackendMultipath">Multipath pools</a></h2>
|
||||
<p>
|
||||
This provides a pool that contains all the multipath devices on the
|
||||
host. Volume creating is not supported via the libvirt APIs.
|
||||
The target element is actually ignored, but one is required to appease
|
||||
the libvirt XML parser.<br/>
|
||||
<br/>
|
||||
Configuring multipathing is not currently supported, this just covers
|
||||
the case where users want to discover all the available multipath
|
||||
devices, and assign them to guests.
|
||||
<span class="since">Since 0.7.1</span>
|
||||
</p>
|
||||
|
||||
<h3>Example pool input</h3>
|
||||
<pre>
|
||||
<pool type="mpath">
|
||||
<name>virtimages</name>
|
||||
<target>
|
||||
<path>/dev/mapper</path>
|
||||
</target>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
The Multipath volume pool does not use the pool format type element.
|
||||
</p>
|
||||
|
||||
<h3>Valid volume format types</h3>
|
||||
<p>
|
||||
The Multipath volume pool does not use the volume format type element.
|
||||
</p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Last Modified: Fri Nov 6 16:41:59 2009
|
||||
# Last Modified: Mon Apr 5 15:11:27 2010
|
||||
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/consoles>
|
||||
@ -16,13 +16,11 @@
|
||||
/dev/kvm rw,
|
||||
/dev/ptmx rw,
|
||||
/dev/kqemu rw,
|
||||
@{PROC}/*/status r,
|
||||
|
||||
# WARNING: uncommenting these gives the guest direct access to host hardware.
|
||||
# This is required for USB pass through but is a security risk. You have been
|
||||
# warned.
|
||||
#/sys/bus/usb/devices/ r,
|
||||
#/sys/devices/*/*/usb[0-9]*/** r,
|
||||
#/dev/bus/usb/*/[0-9]* rw,
|
||||
# For hostdev access. The actual devices will be added dynamically
|
||||
/sys/bus/usb/devices/ r,
|
||||
/sys/devices/*/*/usb[0-9]*/** r,
|
||||
|
||||
# WARNING: this gives the guest direct access to host hardware and specific
|
||||
# portions of shared memory. This is required for sound using ALSA with kvm,
|
||||
@ -38,6 +36,9 @@
|
||||
# unless you absolutely need it.
|
||||
deny capability kill,
|
||||
|
||||
# Uncomment the following if you need access to /dev/fb*
|
||||
#/dev/fb* rw,
|
||||
|
||||
/etc/pulse/client.conf r,
|
||||
@{HOME}/.pulse-cookie rwk,
|
||||
owner /root/.pulse-cookie rwk,
|
||||
@ -56,6 +57,10 @@
|
||||
/usr/share/openhackware/** r,
|
||||
/usr/share/proll/** r,
|
||||
/usr/share/vgabios/** r,
|
||||
/usr/share/seabios/** r,
|
||||
|
||||
# access PKI infrastructure
|
||||
/etc/pki/libvirt-vnc/** r,
|
||||
|
||||
# the various binaries
|
||||
/usr/bin/kvm rmix,
|
||||
@ -99,11 +104,3 @@
|
||||
/bin/dash rmix,
|
||||
/bin/dd rmix,
|
||||
/bin/cat rmix,
|
||||
|
||||
# The svirt driver does not relabel the state file
|
||||
# (https://bugzilla.redhat.com/show_bug.cgi?id=529363) resulting in denied
|
||||
# messages. Uncommenting these lines can work around this somewhat by
|
||||
# allowing users to save state files in the specified directory. We use
|
||||
# 'owner' to make sure we don't overwrite the user's files.
|
||||
#owner @{HOME}/libvirt-state-files/ r,
|
||||
#owner @{HOME}/libvirt-state-files/** rw,
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Last Modified: Mon Jul 06 17:22:37 2009
|
||||
# Last Modified: Mon Apr 5 15:10:27 2010
|
||||
#include <tunables/global>
|
||||
|
||||
/usr/lib/libvirt/virt-aa-helper {
|
||||
@ -14,9 +14,25 @@
|
||||
deny @{PROC}/[0-9]*/mounts r,
|
||||
@{PROC}/filesystems r,
|
||||
|
||||
# for hostdev
|
||||
/sys/devices/ r,
|
||||
/sys/devices/** r,
|
||||
|
||||
/usr/lib/libvirt/virt-aa-helper mr,
|
||||
/sbin/apparmor_parser Ux,
|
||||
|
||||
/etc/apparmor.d/libvirt/* r,
|
||||
/etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
|
||||
|
||||
# for backingstore -- allow access to non-hidden files in @{HOME} as well
|
||||
# as storage pools
|
||||
audit deny @{HOME}/.* mrwkl,
|
||||
audit deny @{HOME}/.*/ rw,
|
||||
audit deny @{HOME}/.*/** mrwkl,
|
||||
audit deny @{HOME}/bin/ rw,
|
||||
audit deny @{HOME}/bin/** mrwkl,
|
||||
@{HOME}/ r,
|
||||
@{HOME}/** r,
|
||||
/var/lib/libvirt/images/ r,
|
||||
/var/lib/libvirt/images/** r,
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Last Modified: Wed Sep 23 23:23:58 2009
|
||||
# Last Modified: Mon Apr 5 15:03:58 2010
|
||||
#include <tunables/global>
|
||||
@{LIBVIRT}="libvirt"
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
capability chown,
|
||||
capability setpcap,
|
||||
capability mknod,
|
||||
capability fsetid,
|
||||
|
||||
network inet stream,
|
||||
network inet dgram,
|
||||
@ -35,7 +36,6 @@
|
||||
/sbin/* Ux,
|
||||
/usr/bin/* Ux,
|
||||
/usr/sbin/* Ux,
|
||||
/usr/lib/libvirt/* Ux,
|
||||
|
||||
# force the use of virt-aa-helper
|
||||
audit deny /sbin/apparmor_parser rwxl,
|
||||
@ -44,7 +44,7 @@
|
||||
audit deny /sys/kernel/security/apparmor/matching rwxl,
|
||||
audit deny /sys/kernel/security/apparmor/.* rwxl,
|
||||
/sys/kernel/security/apparmor/profiles r,
|
||||
/usr/lib/libvirt/virt-aa-helper Pxr,
|
||||
/usr/lib/libvirt/* PUxr,
|
||||
|
||||
# allow changing to our UUID-based named profiles
|
||||
change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
|
||||
|
@ -6,19 +6,19 @@
|
||||
#include <signal.h>
|
||||
|
||||
#if HAVE_SYS_POLL_H
|
||||
#include <sys/types.h>
|
||||
#include <sys/poll.h>
|
||||
#include <libvirt/libvirt.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/poll.h>
|
||||
# include <libvirt/libvirt.h>
|
||||
|
||||
#define DEBUG0(fmt) printf("%s:%d :: " fmt "\n", \
|
||||
# define DEBUG0(fmt) printf("%s:%d :: " fmt "\n", \
|
||||
__func__, __LINE__)
|
||||
#define DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", \
|
||||
# define DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", \
|
||||
__func__, __LINE__, __VA_ARGS__)
|
||||
#define STREQ(a,b) (strcmp(a,b) == 0)
|
||||
# define STREQ(a,b) (strcmp(a,b) == 0)
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
||||
#endif
|
||||
# ifndef ATTRIBUTE_UNUSED
|
||||
# define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
||||
# endif
|
||||
|
||||
/* handle globals */
|
||||
int h_fd = 0;
|
||||
@ -28,7 +28,7 @@ virFreeCallback h_ff = NULL;
|
||||
void *h_opaque = NULL;
|
||||
|
||||
/* timeout globals */
|
||||
#define TIMEOUT_MS 1000
|
||||
# define TIMEOUT_MS 1000
|
||||
int t_active = 0;
|
||||
int t_timeout = -1;
|
||||
virEventTimeoutCallback t_cb = NULL;
|
||||
@ -38,10 +38,6 @@ void *t_opaque = NULL;
|
||||
|
||||
/* Prototypes */
|
||||
const char *eventToString(int event);
|
||||
int myDomainEventCallback1 (virConnectPtr conn, virDomainPtr dom,
|
||||
int event, int detail, void *opaque);
|
||||
int myDomainEventCallback2 (virConnectPtr conn, virDomainPtr dom,
|
||||
int event, int detail, void *opaque);
|
||||
int myEventAddHandleFunc (int fd, int event,
|
||||
virEventHandleCallback cb,
|
||||
void *opaque,
|
||||
@ -152,11 +148,11 @@ static const char *eventDetailToString(int event, int detail) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int myDomainEventCallback1 (virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int event,
|
||||
int detail,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
static int myDomainEventCallback1(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int event,
|
||||
int detail,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) %s %s\n", __func__, virDomainGetName(dom),
|
||||
virDomainGetID(dom), eventToString(event),
|
||||
@ -164,11 +160,11 @@ int myDomainEventCallback1 (virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int myDomainEventCallback2 (virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int event,
|
||||
int detail,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
static int myDomainEventCallback2(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int event,
|
||||
int detail,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) %s %s\n", __func__, virDomainGetName(dom),
|
||||
virDomainGetID(dom), eventToString(event),
|
||||
@ -176,6 +172,92 @@ int myDomainEventCallback2 (virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventRebootCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) rebooted\n", __func__, virDomainGetName(dom),
|
||||
virDomainGetID(dom));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventRTCChangeCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
long long offset,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) rtc change %lld\n", __func__, virDomainGetName(dom),
|
||||
virDomainGetID(dom), offset);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventWatchdogCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int action,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) watchdog action=%d\n", __func__, virDomainGetName(dom),
|
||||
virDomainGetID(dom), action);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventIOErrorCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
const char *srcPath,
|
||||
const char *devAlias,
|
||||
int action,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) io error path=%s alias=%s action=%d\n", __func__, virDomainGetName(dom),
|
||||
virDomainGetID(dom), srcPath, devAlias, action);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventGraphicsCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int phase,
|
||||
virDomainEventGraphicsAddressPtr local,
|
||||
virDomainEventGraphicsAddressPtr remote,
|
||||
const char *authScheme,
|
||||
virDomainEventGraphicsSubjectPtr subject,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int i;
|
||||
printf("%s EVENT: Domain %s(%d) graphics ", __func__, virDomainGetName(dom),
|
||||
virDomainGetID(dom));
|
||||
|
||||
switch (phase) {
|
||||
case VIR_DOMAIN_EVENT_GRAPHICS_CONNECT:
|
||||
printf("connected ");
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE:
|
||||
printf("initialized ");
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT:
|
||||
printf("disconnected ");
|
||||
break;
|
||||
}
|
||||
|
||||
printf("local: family=%d node=%s service=%s ",
|
||||
local->family, local->node, local->service);
|
||||
printf("remote: family=%d node=%s service=%s ",
|
||||
remote->family, remote->node, remote->service);
|
||||
|
||||
printf("auth: %s ", authScheme);
|
||||
for (i = 0 ; i < subject->nidentity ; i++) {
|
||||
printf(" identity: %s=%s",
|
||||
subject->identities[i].type,
|
||||
subject->identities[i].name);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void myFreeFunc(void *opaque)
|
||||
{
|
||||
char *str = opaque;
|
||||
@ -293,6 +375,12 @@ int main(int argc, char **argv)
|
||||
int sts;
|
||||
int callback1ret = -1;
|
||||
int callback2ret = -1;
|
||||
int callback3ret = -1;
|
||||
int callback4ret = -1;
|
||||
int callback5ret = -1;
|
||||
int callback6ret = -1;
|
||||
int callback7ret = -1;
|
||||
|
||||
struct sigaction action_stop = {
|
||||
.sa_handler = stop
|
||||
};
|
||||
@ -310,7 +398,7 @@ int main(int argc, char **argv)
|
||||
myEventRemoveTimeoutFunc);
|
||||
|
||||
virConnectPtr dconn = NULL;
|
||||
dconn = virConnectOpen (argv[1] ? argv[1] : NULL);
|
||||
dconn = virConnectOpenReadOnly (argv[1] ? argv[1] : NULL);
|
||||
if (!dconn) {
|
||||
printf("error opening\n");
|
||||
return -1;
|
||||
@ -324,10 +412,44 @@ int main(int argc, char **argv)
|
||||
/* Add 2 callbacks to prove this works with more than just one */
|
||||
callback1ret = virConnectDomainEventRegister(dconn, myDomainEventCallback1,
|
||||
strdup("callback 1"), myFreeFunc);
|
||||
callback2ret = virConnectDomainEventRegister(dconn, myDomainEventCallback2,
|
||||
strdup("callback 2"), myFreeFunc);
|
||||
callback2ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_LIFECYCLE,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventCallback2),
|
||||
strdup("callback 2"), myFreeFunc);
|
||||
callback3ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_REBOOT,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventRebootCallback),
|
||||
strdup("callback reboot"), myFreeFunc);
|
||||
callback4ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_RTC_CHANGE,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventRTCChangeCallback),
|
||||
strdup("callback rtcchange"), myFreeFunc);
|
||||
callback5ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_WATCHDOG,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventWatchdogCallback),
|
||||
strdup("callback watchdog"), myFreeFunc);
|
||||
callback6ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_IO_ERROR,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventIOErrorCallback),
|
||||
strdup("callback io error"), myFreeFunc);
|
||||
callback7ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_GRAPHICS,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventGraphicsCallback),
|
||||
strdup("callback graphics"), myFreeFunc);
|
||||
|
||||
if ((callback1ret == 0) && (callback2ret == 0) ) {
|
||||
if ((callback1ret != -1) &&
|
||||
(callback2ret != -1) &&
|
||||
(callback3ret != -1) &&
|
||||
(callback4ret != -1) &&
|
||||
(callback5ret != -1) &&
|
||||
(callback6ret != -1) &&
|
||||
(callback7ret != -1)) {
|
||||
while(run) {
|
||||
struct pollfd pfd = { .fd = h_fd,
|
||||
.events = h_event,
|
||||
@ -364,8 +486,12 @@ int main(int argc, char **argv)
|
||||
|
||||
DEBUG0("Deregistering event handlers");
|
||||
virConnectDomainEventDeregister(dconn, myDomainEventCallback1);
|
||||
virConnectDomainEventDeregister(dconn, myDomainEventCallback2);
|
||||
|
||||
virConnectDomainEventDeregisterAny(dconn, callback2ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback3ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback4ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback5ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback6ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback7ret);
|
||||
}
|
||||
|
||||
DEBUG0("Closing connection");
|
||||
|
@ -172,10 +172,10 @@ class virEventLoopPure:
|
||||
if now >= next:
|
||||
sleep = 0
|
||||
else:
|
||||
sleep = next - now
|
||||
sleep = (next - now) / 1000.0
|
||||
|
||||
self.debug("Poll with a sleep of %d" % sleep)
|
||||
events = self.poll.poll(sleep / 1000.0)
|
||||
events = self.poll.poll(sleep)
|
||||
|
||||
# Dispatch any file handle events that occurred
|
||||
for (fd, revents) in events:
|
||||
@ -412,6 +412,21 @@ def myDomainEventCallback1 (conn, dom, event, detail, opaque):
|
||||
def myDomainEventCallback2 (conn, dom, event, detail, opaque):
|
||||
print "myDomainEventCallback2 EVENT: Domain %s(%s) %s %d" % (dom.name(), dom.ID(), eventToString(event), detail)
|
||||
|
||||
def myDomainEventRebootCallback(conn, dom, opaque):
|
||||
print "myDomainEventRebootCallback: Domain %s(%s)" % (dom.name(), dom.ID())
|
||||
|
||||
def myDomainEventRTCChangeCallback(conn, dom, utcoffset, opaque):
|
||||
print "myDomainEventRTCChangeCallback: Domain %s(%s) %d" % (dom.name(), dom.ID(), utcoffset)
|
||||
|
||||
def myDomainEventWatchdogCallback(conn, dom, action, opaque):
|
||||
print "myDomainEventWatchdogCallback: Domain %s(%s) %d" % (dom.name(), dom.ID(), action)
|
||||
|
||||
def myDomainEventIOErrorCallback(conn, dom, srcpath, devalias, action, opaque):
|
||||
print "myDomainEventIOErrorCallback: Domain %s(%s) %s %s %d" % (dom.name(), dom.ID(), srcpath, devalias, action)
|
||||
|
||||
def myDomainEventGraphicsCallback(conn, dom, phase, localAddr, remoteAddr, authScheme, subject, opaque):
|
||||
print "myDomainEventGraphicsCallback: Domain %s(%s) %d %s" % (dom.name(), dom.ID(), phase, authScheme)
|
||||
|
||||
def usage():
|
||||
print "usage: "+os.path.basename(sys.argv[0])+" [uri]"
|
||||
print " uri will default to qemu:///system"
|
||||
@ -451,7 +466,12 @@ def main():
|
||||
|
||||
#Add 2 callbacks to prove this works with more than just one
|
||||
vc.domainEventRegister(myDomainEventCallback1,None)
|
||||
vc.domainEventRegister(myDomainEventCallback2,None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_LIFECYCLE, myDomainEventCallback2, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_REBOOT, myDomainEventRebootCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_RTC_CHANGE, myDomainEventRTCChangeCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_IO_ERROR, myDomainEventIOErrorCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_WATCHDOG, myDomainEventWatchdogCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_GRAPHICS, myDomainEventGraphicsCallback, None)
|
||||
|
||||
# The rest of your app would go here normally, but for sake
|
||||
# of demo we'll just go to sleep. The other option is to
|
||||
|
32
examples/xml/nwfilter/Makefile.am
Normal file
32
examples/xml/nwfilter/Makefile.am
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
FILTERS = \
|
||||
allow-arp.xml \
|
||||
allow-dhcp-server.xml \
|
||||
allow-dhcp.xml \
|
||||
allow-incoming-ipv4.xml \
|
||||
allow-ipv4.xml \
|
||||
clean-traffic.xml \
|
||||
no-arp-spoofing.xml \
|
||||
no-ip-multicast.xml \
|
||||
no-ip-spoofing.xml \
|
||||
no-mac-broadcast.xml \
|
||||
no-mac-spoofing.xml \
|
||||
no-other-l2-traffic.xml
|
||||
|
||||
EXTRA_DIST=$(FILTERS)
|
||||
|
||||
confdir = $(sysconfdir)/libvirt
|
||||
|
||||
NWFILTER_DIR = "$(DESTDIR)$(sysconfdir)/libvirt/nwfilter"
|
||||
|
||||
install-data-local:
|
||||
$(MKDIR_P) "$(NWFILTER_DIR)"
|
||||
for f in $(FILTERS); do \
|
||||
$(INSTALL_DATA) $$f "$(NWFILTER_DIR)"; \
|
||||
done
|
||||
|
||||
uninstall-local::
|
||||
for f in $(FILTERS); do \
|
||||
rm -f "$(NWFILTER_DIR)/$$f"; \
|
||||
done
|
||||
-test -z $(shell ls $(NWFILTER_DIR)) || rmdir $(NWFILTER_DIR)
|
3
examples/xml/nwfilter/allow-arp.xml
Normal file
3
examples/xml/nwfilter/allow-arp.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<filter name='allow-arp' chain='arp'>
|
||||
<rule direction='inout' action='accept'/>
|
||||
</filter>
|
24
examples/xml/nwfilter/allow-dhcp-server.xml
Normal file
24
examples/xml/nwfilter/allow-dhcp-server.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<filter name='allow-dhcp-server' chain='ipv4'>
|
||||
|
||||
<!-- accept outgoing DHCP requests -->
|
||||
<!-- note, this rule must be evaluated before general MAC broadcast
|
||||
traffic is discarded since DHCP requests use MAC broadcast -->
|
||||
<rule action='accept' direction='out' priority='100'>
|
||||
<ip srcipaddr='0.0.0.0'
|
||||
dstipaddr='255.255.255.255'
|
||||
protocol='udp'
|
||||
srcportstart='68'
|
||||
dstportstart='67' />
|
||||
</rule>
|
||||
|
||||
<!-- accept incoming DHCP responses from a specific DHCP server
|
||||
parameter DHPCSERVER needs to be passed from where this filter is
|
||||
referenced -->
|
||||
<rule action='accept' direction='in' priority='100' >
|
||||
<ip srcipaddr='$DHCPSERVER'
|
||||
protocol='udp'
|
||||
srcportstart='67'
|
||||
dstportstart='68'/>
|
||||
</rule>
|
||||
|
||||
</filter>
|
21
examples/xml/nwfilter/allow-dhcp.xml
Normal file
21
examples/xml/nwfilter/allow-dhcp.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<filter name='allow-dhcp' chain='ipv4'>
|
||||
|
||||
<!-- accept outgoing DHCP requests -->
|
||||
<!-- not, this rule must be evaluated before general MAC broadcast
|
||||
traffic is discarded since DHCP requests use MAC broadcast -->
|
||||
<rule action='accept' direction='out' priority='100'>
|
||||
<ip srcipaddr='0.0.0.0'
|
||||
dstipaddr='255.255.255.255'
|
||||
protocol='udp'
|
||||
srcportstart='68'
|
||||
dstportstart='67' />
|
||||
</rule>
|
||||
|
||||
<!-- accept incoming DHCP responses from any DHCP server -->
|
||||
<rule action='accept' direction='in' priority='100' >
|
||||
<ip protocol='udp'
|
||||
srcportstart='67'
|
||||
dstportstart='68'/>
|
||||
</rule>
|
||||
|
||||
</filter>
|
3
examples/xml/nwfilter/allow-incoming-ipv4.xml
Normal file
3
examples/xml/nwfilter/allow-incoming-ipv4.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<filter name='allow-incoming-ipv4' chain='ipv4'>
|
||||
<rule direction='in' action='accept'/>
|
||||
</filter>
|
3
examples/xml/nwfilter/allow-ipv4.xml
Normal file
3
examples/xml/nwfilter/allow-ipv4.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<filter name='allow-ipv4' chain='ipv4'>
|
||||
<rule direction='inout' action='accept'/>
|
||||
</filter>
|
17
examples/xml/nwfilter/clean-traffic.xml
Normal file
17
examples/xml/nwfilter/clean-traffic.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<filter name='clean-traffic'>
|
||||
<!-- An example of a traffic filter enforcing clean traffic
|
||||
from a VM by
|
||||
- preventing MAC spoofing -->
|
||||
<filterref filter='no-mac-spoofing'/>
|
||||
|
||||
<!-- preventing IP spoofing on outgoing, allow all IPv4 in incoming -->
|
||||
<filterref filter='no-ip-spoofing'/>
|
||||
<filterref filter='allow-incoming-ipv4'/>
|
||||
|
||||
<!-- preventing ARP spoofing/poisoning -->
|
||||
<filterref filter='no-arp-spoofing'/>
|
||||
|
||||
<!-- preventing any other traffic than IPv4 and ARP -->
|
||||
<filterref filter='no-other-l2-traffic'/>
|
||||
|
||||
</filter>
|
29
examples/xml/nwfilter/no-arp-spoofing.xml
Normal file
29
examples/xml/nwfilter/no-arp-spoofing.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<filter name='no-arp-spoofing' chain='arp'>
|
||||
<uuid>f88f1932-debf-4aa1-9fbe-f10d3aa4bc95</uuid>
|
||||
|
||||
<!-- no arp spoofing -->
|
||||
<!-- drop if ipaddr or macaddr does not belong to guest -->
|
||||
<rule action='drop' direction='out' priority='400' >
|
||||
<arp match='no' arpsrcmacaddr='$MAC'/>
|
||||
</rule>
|
||||
<rule action='drop' direction='out' priority='400' >
|
||||
<arp match='no' arpsrcipaddr='$IP' />
|
||||
</rule>
|
||||
<!-- drop if ipaddr or macaddr odes not belong to guest -->
|
||||
<rule action='drop' direction='in' priority='400' >
|
||||
<arp match='no' arpdstmacaddr='$MAC'/>
|
||||
<arp opcode='reply'/>
|
||||
</rule>
|
||||
<rule action='drop' direction='in' priority='400' >
|
||||
<arp match='no' arpdstipaddr='$IP' />
|
||||
</rule>
|
||||
<!-- accept only request or reply packets -->
|
||||
<rule action='accept' direction='inout' priority='500' >
|
||||
<arp opcode='request'/>
|
||||
</rule>
|
||||
<rule action='accept' direction='inout' priority='500' >
|
||||
<arp opcode='reply'/>
|
||||
</rule>
|
||||
<!-- drop everything else -->
|
||||
<rule action='drop' direction='inout' priority='1000' />
|
||||
</filter>
|
9
examples/xml/nwfilter/no-ip-multicast.xml
Normal file
9
examples/xml/nwfilter/no-ip-multicast.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<filter name='no-ip-multicast' chain='ipv4'>
|
||||
|
||||
<!-- drop if destination IP address is in the 224.0.0.0/4 subnet -->
|
||||
<rule action='drop' direction='out'>
|
||||
<ip dstipaddr='224.0.0.0' dstipmask='4' />
|
||||
</rule>
|
||||
|
||||
<!-- not doing anything with receiving side ... -->
|
||||
</filter>
|
7
examples/xml/nwfilter/no-ip-spoofing.xml
Normal file
7
examples/xml/nwfilter/no-ip-spoofing.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<filter name='no-ip-spoofing' chain='ipv4'>
|
||||
|
||||
<!-- drop if srcipaddr is not the IP address of the guest -->
|
||||
<rule action='drop' direction='out'>
|
||||
<ip match='no' srcipaddr='$IP' />
|
||||
</rule>
|
||||
</filter>
|
8
examples/xml/nwfilter/no-mac-broadcast.xml
Normal file
8
examples/xml/nwfilter/no-mac-broadcast.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<filter name='no-mac-broadcast' chain='ipv4'>
|
||||
<!-- drop if destination mac is bcast mac addr. -->
|
||||
<rule action='drop' direction='out'>
|
||||
<mac dstmacaddr='ff:ff:ff:ff:ff:ff' />
|
||||
</rule>
|
||||
|
||||
<!-- not doing anything with receiving side ... -->
|
||||
</filter>
|
5
examples/xml/nwfilter/no-mac-spoofing.xml
Normal file
5
examples/xml/nwfilter/no-mac-spoofing.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<filter name='no-mac-spoofing' chain='ipv4'>
|
||||
<rule action='drop' direction='out' priority='10'>
|
||||
<mac match='no' srcmacaddr='$MAC' />
|
||||
</rule>
|
||||
</filter>
|
7
examples/xml/nwfilter/no-other-l2-traffic.xml
Normal file
7
examples/xml/nwfilter/no-other-l2-traffic.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<filter name='no-other-l2-traffic'>
|
||||
|
||||
<!-- drop all other l2 traffic than for which rules have been
|
||||
written for; i.e., drop all other than arp and ipv4 traffic -->
|
||||
<rule action='drop' direction='inout' priority='1000'/>
|
||||
|
||||
</filter>
|
@ -29,6 +29,20 @@ extern "C" {
|
||||
# endif
|
||||
#endif /* VIR_DEPRECATED */
|
||||
|
||||
#ifdef WIN32
|
||||
# ifdef LIBVIRT_STATIC
|
||||
# define VIR_EXPORT_VAR extern
|
||||
# else
|
||||
# ifdef IN_LIBVIRT
|
||||
# define VIR_EXPORT_VAR __declspec(dllexport)
|
||||
# else
|
||||
# define VIR_EXPORT_VAR __declspec(dllimport) extern
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# define VIR_EXPORT_VAR extern
|
||||
#endif
|
||||
|
||||
/**
|
||||
* virConnect:
|
||||
*
|
||||
@ -408,6 +422,10 @@ int virDomainMigrateToURI (virDomainPtr domain, const char *duri,
|
||||
unsigned long flags, const char *dname,
|
||||
unsigned long bandwidth);
|
||||
|
||||
int virDomainMigrateSetMaxDowntime (virDomainPtr domain,
|
||||
unsigned long long downtime,
|
||||
unsigned int flags);
|
||||
|
||||
/**
|
||||
* VIR_NODEINFO_MAXCPUS:
|
||||
* @nodeinfo: virNodeInfo instance
|
||||
@ -495,7 +513,7 @@ struct _virConnectAuth {
|
||||
typedef struct _virConnectAuth virConnectAuth;
|
||||
typedef virConnectAuth *virConnectAuthPtr;
|
||||
|
||||
extern virConnectAuthPtr virConnectAuthPtrDefault;
|
||||
VIR_EXPORT_VAR virConnectAuthPtr virConnectAuthPtrDefault;
|
||||
|
||||
/**
|
||||
* VIR_UUID_BUFLEN:
|
||||
@ -620,6 +638,16 @@ int virDomainSave (virDomainPtr domain,
|
||||
int virDomainRestore (virConnectPtr conn,
|
||||
const char *from);
|
||||
|
||||
/*
|
||||
* Managed domain save
|
||||
*/
|
||||
int virDomainManagedSave (virDomainPtr dom,
|
||||
unsigned int flags);
|
||||
int virDomainHasManagedSaveImage(virDomainPtr dom,
|
||||
unsigned int flags);
|
||||
int virDomainManagedSaveRemove(virDomainPtr dom,
|
||||
unsigned int flags);
|
||||
|
||||
/*
|
||||
* Domain core dump
|
||||
*/
|
||||
@ -668,8 +696,9 @@ int virDomainGetSecurityLabel (virDomainPtr domain,
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_XML_SECURE = 1, /* dump security sensitive information too */
|
||||
VIR_DOMAIN_XML_INACTIVE = 2/* dump inactive domain information */
|
||||
VIR_DOMAIN_XML_SECURE = (1 << 0), /* dump security sensitive information too */
|
||||
VIR_DOMAIN_XML_INACTIVE = (1 << 1), /* dump inactive domain information */
|
||||
VIR_DOMAIN_XML_UPDATE_CPU = (1 << 2), /* update guest CPU requirements according to host CPU */
|
||||
} virDomainXMLFlags;
|
||||
|
||||
char * virDomainGetXMLDesc (virDomainPtr domain,
|
||||
@ -845,9 +874,24 @@ int virDomainGetVcpus (virDomainPtr domain,
|
||||
*/
|
||||
#define VIR_GET_CPUMAP(cpumaps,maplen,vcpu) &(cpumaps[(vcpu)*(maplen)])
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
||||
VIR_DOMAIN_DEVICE_MODIFY_CURRENT = 0, /* Modify device allocation based on current domain state */
|
||||
VIR_DOMAIN_DEVICE_MODIFY_LIVE = (1 << 0), /* Modify live device allocation */
|
||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG = (1 << 1), /* Modify persisted device allocation */
|
||||
} virDomainDeviceModifyFlags;
|
||||
|
||||
int virDomainAttachDevice(virDomainPtr domain, const char *xml);
|
||||
int virDomainDetachDevice(virDomainPtr domain, const char *xml);
|
||||
|
||||
int virDomainAttachDeviceFlags(virDomainPtr domain,
|
||||
const char *xml, unsigned int flags);
|
||||
int virDomainDetachDeviceFlags(virDomainPtr domain,
|
||||
const char *xml, unsigned int flags);
|
||||
int virDomainUpdateDeviceFlags(virDomainPtr domain,
|
||||
const char *xml, unsigned int flags);
|
||||
|
||||
/*
|
||||
* NUMA support
|
||||
*/
|
||||
@ -1211,6 +1255,8 @@ virStorageVolPtr virStorageVolCreateXMLFrom (virStoragePoolPtr pool,
|
||||
unsigned int flags);
|
||||
int virStorageVolDelete (virStorageVolPtr vol,
|
||||
unsigned int flags);
|
||||
int virStorageVolWipe (virStorageVolPtr vol,
|
||||
unsigned int flags);
|
||||
int virStorageVolRef (virStorageVolPtr vol);
|
||||
int virStorageVolFree (virStorageVolPtr vol);
|
||||
|
||||
@ -1338,6 +1384,7 @@ typedef enum {
|
||||
VIR_DOMAIN_EVENT_STARTED_BOOTED = 0, /* Normal startup from boot */
|
||||
VIR_DOMAIN_EVENT_STARTED_MIGRATED = 1, /* Incoming migration from another host */
|
||||
VIR_DOMAIN_EVENT_STARTED_RESTORED = 2, /* Restored from a state file */
|
||||
VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT = 3, /* Restored from snapshot */
|
||||
} virDomainEventStartedDetailType;
|
||||
|
||||
/**
|
||||
@ -1348,6 +1395,8 @@ typedef enum {
|
||||
typedef enum {
|
||||
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED = 0, /* Normal suspend due to admin pause */
|
||||
VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED = 1, /* Suspended for offline migration */
|
||||
VIR_DOMAIN_EVENT_SUSPENDED_IOERROR = 2, /* Suspended due to a disk I/O error */
|
||||
VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG = 3, /* Suspended due to a watchdog firing */
|
||||
} virDomainEventSuspendedDetailType;
|
||||
|
||||
/**
|
||||
@ -1372,6 +1421,7 @@ typedef enum {
|
||||
VIR_DOMAIN_EVENT_STOPPED_MIGRATED = 3, /* Migrated off to another host */
|
||||
VIR_DOMAIN_EVENT_STOPPED_SAVED = 4, /* Saved to a state file */
|
||||
VIR_DOMAIN_EVENT_STOPPED_FAILED = 5, /* Host emulator/mgmt failed */
|
||||
VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT = 6, /* offline snapshot loaded */
|
||||
} virDomainEventStoppedDetailType;
|
||||
|
||||
|
||||
@ -1756,8 +1806,411 @@ int virConnectCompareCPU(virConnectPtr conn,
|
||||
unsigned int flags);
|
||||
|
||||
|
||||
/**
|
||||
* virConnectBaselineCPU:
|
||||
*
|
||||
* @conn: virConnect connection
|
||||
* @ncpus: number of CPUs in xmlCPUs
|
||||
* @xmlCPUs: array of XML descriptions of host CPUs
|
||||
* @flags: fine-tuning flags
|
||||
*
|
||||
* Computes the most feature-rich CPU which is compatible with all given
|
||||
* host CPUs.
|
||||
*
|
||||
* Returns XML description of the computed CPU or NULL on error.
|
||||
*/
|
||||
char *virConnectBaselineCPU(virConnectPtr conn,
|
||||
const char **xmlCPUs,
|
||||
unsigned int ncpus,
|
||||
unsigned int flags);
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_JOB_NONE = 0, /* No job is active */
|
||||
VIR_DOMAIN_JOB_BOUNDED = 1, /* Job with a finite completion time */
|
||||
VIR_DOMAIN_JOB_UNBOUNDED = 2, /* Job without a finite completion time */
|
||||
VIR_DOMAIN_JOB_COMPLETED = 3, /* Job has finished, but isn't cleaned up */
|
||||
VIR_DOMAIN_JOB_FAILED = 4, /* Job hit error, but isn't cleaned up */
|
||||
VIR_DOMAIN_JOB_CANCELLED = 5, /* Job was aborted, but isn't cleaned up */
|
||||
} virDomainJobType;
|
||||
|
||||
typedef struct _virDomainJobInfo virDomainJobInfo;
|
||||
typedef virDomainJobInfo *virDomainJobInfoPtr;
|
||||
struct _virDomainJobInfo {
|
||||
/* One of virDomainJobType */
|
||||
int type;
|
||||
|
||||
/* Time is measured in mill-seconds */
|
||||
unsigned long long timeElapsed; /* Always set */
|
||||
unsigned long long timeRemaining; /* Only for VIR_DOMAIN_JOB_BOUNDED */
|
||||
|
||||
/* Data is measured in bytes unless otherwise specified
|
||||
* and is measuring the job as a whole
|
||||
*
|
||||
* For VIR_DOMAIN_JOB_UNBOUNDED, dataTotal may be less
|
||||
* than the final sum of dataProcessed + dataRemaining
|
||||
* in the event that the hypervisor has to repeat some
|
||||
* data eg due to dirtied pages during migration
|
||||
*
|
||||
* For VIR_DOMAIN_JOB_BOUNDED, dataTotal shall always
|
||||
* equal sum of dataProcessed + dataRemaining
|
||||
*/
|
||||
unsigned long long dataTotal;
|
||||
unsigned long long dataProcessed;
|
||||
unsigned long long dataRemaining;
|
||||
|
||||
/* As above, but only tracking guest memory progress */
|
||||
unsigned long long memTotal;
|
||||
unsigned long long memProcessed;
|
||||
unsigned long long memRemaining;
|
||||
|
||||
/* As above, but only tracking guest disk file progress */
|
||||
unsigned long long fileTotal;
|
||||
unsigned long long fileProcessed;
|
||||
unsigned long long fileRemaining;
|
||||
};
|
||||
|
||||
int virDomainGetJobInfo(virDomainPtr dom,
|
||||
virDomainJobInfoPtr info);
|
||||
int virDomainAbortJob(virDomainPtr dom);
|
||||
|
||||
/**
|
||||
* virDomainSnapshot:
|
||||
*
|
||||
* a virDomainSnapshot is a private structure representing a snapshot of
|
||||
* a domain.
|
||||
*/
|
||||
typedef struct _virDomainSnapshot virDomainSnapshot;
|
||||
|
||||
/**
|
||||
* virDomainSnapshotPtr:
|
||||
*
|
||||
* a virDomainSnapshotPtr is pointer to a virDomainSnapshot private structure,
|
||||
* and is the type used to reference a domain snapshot in the API.
|
||||
*/
|
||||
typedef virDomainSnapshot *virDomainSnapshotPtr;
|
||||
|
||||
/* Take a snapshot of the current VM state */
|
||||
virDomainSnapshotPtr virDomainSnapshotCreateXML(virDomainPtr domain,
|
||||
const char *xmlDesc,
|
||||
unsigned int flags);
|
||||
|
||||
/* Dump the XML of a snapshot */
|
||||
char *virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
|
||||
unsigned int flags);
|
||||
|
||||
/* Return the number of snapshots for this domain */
|
||||
int virDomainSnapshotNum(virDomainPtr domain, unsigned int flags);
|
||||
|
||||
/* Get the names of all snapshots for this domain */
|
||||
int virDomainSnapshotListNames(virDomainPtr domain, char **names, int nameslen,
|
||||
unsigned int flags);
|
||||
|
||||
/* Get a handle to a named snapshot */
|
||||
virDomainSnapshotPtr virDomainSnapshotLookupByName(virDomainPtr domain,
|
||||
const char *name,
|
||||
unsigned int flags);
|
||||
|
||||
/* Check whether a domain has a snapshot which is currently used */
|
||||
int virDomainHasCurrentSnapshot(virDomainPtr domain, unsigned flags);
|
||||
|
||||
/* Get a handle to the current snapshot */
|
||||
virDomainSnapshotPtr virDomainSnapshotCurrent(virDomainPtr domain,
|
||||
unsigned int flags);
|
||||
|
||||
/* Revert the domain to a point-in-time snapshot. The
|
||||
* state of the guest after this call will be the state
|
||||
* of the guest when the snapshot in question was taken
|
||||
*/
|
||||
int virDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
|
||||
unsigned int flags);
|
||||
|
||||
/* Delete a snapshot */
|
||||
typedef enum {
|
||||
VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN = (1 << 0),
|
||||
} virDomainSnapshotDeleteFlags;
|
||||
|
||||
int virDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
|
||||
unsigned int flags);
|
||||
|
||||
int virDomainSnapshotFree(virDomainSnapshotPtr snapshot);
|
||||
|
||||
/* A generic callback definition. Specific events usually have a customization
|
||||
* with extra parameters */
|
||||
typedef void (*virConnectDomainEventGenericCallback)(virConnectPtr conn,
|
||||
virDomainPtr dom,
|
||||
void *opaque);
|
||||
|
||||
/**
|
||||
* virConnectDomainEventRTCChangeCallback:
|
||||
* @conn: connection object
|
||||
* @dom: domain on which the event occurred
|
||||
* @utcoffset: the new RTC offset from UTC, measured in seconds
|
||||
* @opaque: application specified data
|
||||
*
|
||||
* The callback signature to use when registering for an event of type
|
||||
* VIR_DOMAIN_EVENT_ID_RTC_CHANGE with virConnectDomainEventRegisterAny()
|
||||
*/
|
||||
typedef void (*virConnectDomainEventRTCChangeCallback)(virConnectPtr conn,
|
||||
virDomainPtr dom,
|
||||
long long utcoffset,
|
||||
void *opaque);
|
||||
|
||||
/**
|
||||
* virDomainEventWatchdogAction:
|
||||
*
|
||||
* The action that is to be taken due to the watchdog device firing
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0, /* No action, watchdog ignored */
|
||||
VIR_DOMAIN_EVENT_WATCHDOG_PAUSE, /* Guest CPUs are paused */
|
||||
VIR_DOMAIN_EVENT_WATCHDOG_RESET, /* Guest CPUs are reset */
|
||||
VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF, /* Guest is forcably powered off */
|
||||
VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN, /* Guest is requested to gracefully shutdown */
|
||||
VIR_DOMAIN_EVENT_WATCHDOG_DEBUG, /* No action, a debug message logged */
|
||||
} virDomainEventWatchdogAction;
|
||||
|
||||
/**
|
||||
* virConnectDomainEventWatchdogCallback:
|
||||
* @conn: connection object
|
||||
* @dom: domain on which the event occurred
|
||||
* @action: action that is to be taken due to watchdog firing
|
||||
* @opaque: application specified data
|
||||
*
|
||||
* The callback signature to use when registering for an event of type
|
||||
* VIR_DOMAIN_EVENT_ID_WATCHDOG with virConnectDomainEventRegisterAny()
|
||||
*
|
||||
*/
|
||||
typedef void (*virConnectDomainEventWatchdogCallback)(virConnectPtr conn,
|
||||
virDomainPtr dom,
|
||||
int action,
|
||||
void *opaque);
|
||||
|
||||
/**
|
||||
* virDomainEventIOErrorAction:
|
||||
*
|
||||
* The action that is to be taken due to an IO error occuring
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0, /* No action, IO error ignored */
|
||||
VIR_DOMAIN_EVENT_IO_ERROR_PAUSE, /* Guest CPUs are pausde */
|
||||
VIR_DOMAIN_EVENT_IO_ERROR_REPORT, /* IO error reported to guest OS */
|
||||
} virDomainEventIOErrorAction;
|
||||
|
||||
|
||||
/**
|
||||
* virConnectDomainEventWatchdogCallback:
|
||||
* @conn: connection object
|
||||
* @dom: domain on which the event occurred
|
||||
* @srcPath: The host file on which the IO error occurred
|
||||
* @devAlias: The guest device alias associated with the path
|
||||
* @action: action that is to be taken due to the IO error
|
||||
* @opaque: application specified data
|
||||
*
|
||||
* The callback signature to use when registering for an event of type
|
||||
* VIR_DOMAIN_EVENT_ID_IO_ERROR with virConnectDomainEventRegisterAny()
|
||||
*
|
||||
*/
|
||||
typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr conn,
|
||||
virDomainPtr dom,
|
||||
const char *srcPath,
|
||||
const char *devAlias,
|
||||
int action,
|
||||
void *opaque);
|
||||
|
||||
/**
|
||||
* virDomainEventGraphicsPhase:
|
||||
*
|
||||
* The phase of the graphics client connection
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0, /* Initial socket connection established */
|
||||
VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE, /* Authentication & setup completed */
|
||||
VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT, /* Final socket disconnection */
|
||||
} virDomainEventGraphicsPhase;
|
||||
|
||||
/**
|
||||
* virDomainEventGraphicsAddressType:
|
||||
*
|
||||
* The type of address for the connection
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4, /* IPv4 address */
|
||||
VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6, /* IPv6 address */
|
||||
} virDomainEventGraphicsAddressType;
|
||||
|
||||
|
||||
/**
|
||||
* virDomainEventGraphicsAddress:
|
||||
*
|
||||
* The data structure containing connection address details
|
||||
*
|
||||
*/
|
||||
struct _virDomainEventGraphicsAddress {
|
||||
int family; /* Address family, virDomainEventGraphicsAddressType */
|
||||
const char *node; /* Address of node (eg IP address) */
|
||||
const char *service; /* Service name/number (eg TCP port) */
|
||||
};
|
||||
typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress;
|
||||
typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr;
|
||||
|
||||
|
||||
/**
|
||||
* virDomainEventGraphicsSubjectIdentity:
|
||||
*
|
||||
* The data structure representing a single identity
|
||||
*
|
||||
* The types of identity differ according to the authentication scheme,
|
||||
* some examples are 'x509dname' and 'saslUsername'.
|
||||
*/
|
||||
struct _virDomainEventGraphicsSubjectIdentity {
|
||||
const char *type; /* Type of identity */
|
||||
const char *name; /* Identity value */
|
||||
};
|
||||
typedef struct _virDomainEventGraphicsSubjectIdentity virDomainEventGraphicsSubjectIdentity;
|
||||
typedef virDomainEventGraphicsSubjectIdentity *virDomainEventGraphicsSubjectIdentityPtr;
|
||||
|
||||
|
||||
/**
|
||||
* virDomainEventGraphicsSubject:
|
||||
*
|
||||
* The data structure representing an authenticated subject
|
||||
*
|
||||
* A subject will have zero or more identities. The types of
|
||||
* identity differ according to the authentication scheme
|
||||
*/
|
||||
struct _virDomainEventGraphicsSubject {
|
||||
int nidentity; /* Number of identities in array*/
|
||||
virDomainEventGraphicsSubjectIdentityPtr identities; /* Array of identities for subject */
|
||||
};
|
||||
typedef struct _virDomainEventGraphicsSubject virDomainEventGraphicsSubject;
|
||||
typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr;
|
||||
|
||||
|
||||
/**
|
||||
* virConnectDomainEventGraphicsCallback:
|
||||
* @conn: connection object
|
||||
* @dom: domain on which the event occurred
|
||||
* @phase: the phase of the connection
|
||||
* @local: the local server address
|
||||
* @remote: the remote client address
|
||||
* @authScheme: the authentication scheme activated
|
||||
* @subject: the authenticated subject (user)
|
||||
* @opaque: application specified data
|
||||
*
|
||||
* The callback signature to use when registering for an event of type
|
||||
* VIR_DOMAIN_EVENT_ID_GRAPHICS with virConnectDomainEventRegisterAny()
|
||||
*/
|
||||
typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn,
|
||||
virDomainPtr dom,
|
||||
int phase,
|
||||
virDomainEventGraphicsAddressPtr local,
|
||||
virDomainEventGraphicsAddressPtr remote,
|
||||
const char *authScheme,
|
||||
virDomainEventGraphicsSubjectPtr subject,
|
||||
void *opaque);
|
||||
|
||||
/**
|
||||
* VIR_DOMAIN_EVENT_CALLBACK:
|
||||
*
|
||||
* Used to cast the event specific callback into the generic one
|
||||
* for use for virDomainEventRegister
|
||||
*/
|
||||
#define VIR_DOMAIN_EVENT_CALLBACK(cb) ((virConnectDomainEventGenericCallback)(cb))
|
||||
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_EVENT_ID_LIFECYCLE = 0, /* virConnectDomainEventCallback */
|
||||
VIR_DOMAIN_EVENT_ID_REBOOT = 1, /* virConnectDomainEventGenericCallback */
|
||||
VIR_DOMAIN_EVENT_ID_RTC_CHANGE = 2, /* virConnectDomainEventRTCChangeCallback */
|
||||
VIR_DOMAIN_EVENT_ID_WATCHDOG = 3, /* virConnectDomainEventWatchdogCallback */
|
||||
VIR_DOMAIN_EVENT_ID_IO_ERROR = 4, /* virConnectDomainEventIOErrorCallback */
|
||||
VIR_DOMAIN_EVENT_ID_GRAPHICS = 5, /* virConnectDomainEventGraphicsCallback */
|
||||
|
||||
/*
|
||||
* NB: this enum value will increase over time as new events are
|
||||
* added to the libvirt API. It reflects the last event ID supported
|
||||
* by this version of the libvirt API.
|
||||
*/
|
||||
VIR_DOMAIN_EVENT_ID_LAST
|
||||
} virDomainEventID;
|
||||
|
||||
|
||||
/* Use VIR_DOMAIN_EVENT_CALLBACK() to cast the 'cb' parameter */
|
||||
int virConnectDomainEventRegisterAny(virConnectPtr conn,
|
||||
virDomainPtr dom, /* Optional, to filter */
|
||||
int eventID,
|
||||
virConnectDomainEventGenericCallback cb,
|
||||
void *opaque,
|
||||
virFreeCallback freecb);
|
||||
|
||||
int virConnectDomainEventDeregisterAny(virConnectPtr conn,
|
||||
int callbackID);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* virNWFilter:
|
||||
*
|
||||
* a virNWFilter is a private structure representing a network filter
|
||||
*/
|
||||
typedef struct _virNWFilter virNWFilter;
|
||||
|
||||
/**
|
||||
* virNWFilterPtr:
|
||||
*
|
||||
* a virNWFilterPtr is pointer to a virNWFilter private structure,
|
||||
* this is the type used to reference a network filter in the API.
|
||||
*/
|
||||
typedef virNWFilter *virNWFilterPtr;
|
||||
|
||||
|
||||
/*
|
||||
* List NWFilters
|
||||
*/
|
||||
int virConnectNumOfNWFilters (virConnectPtr conn);
|
||||
int virConnectListNWFilters (virConnectPtr conn,
|
||||
char **const names,
|
||||
int maxnames);
|
||||
|
||||
/*
|
||||
* Lookup nwfilter by name or uuid
|
||||
*/
|
||||
virNWFilterPtr virNWFilterLookupByName (virConnectPtr conn,
|
||||
const char *name);
|
||||
virNWFilterPtr virNWFilterLookupByUUID (virConnectPtr conn,
|
||||
const unsigned char *uuid);
|
||||
virNWFilterPtr virNWFilterLookupByUUIDString (virConnectPtr conn,
|
||||
const char *uuid);
|
||||
|
||||
/*
|
||||
* Define persistent nwfilter
|
||||
*/
|
||||
virNWFilterPtr virNWFilterDefineXML (virConnectPtr conn,
|
||||
const char *xmlDesc);
|
||||
|
||||
/*
|
||||
* Delete persistent nwfilter
|
||||
*/
|
||||
int virNWFilterUndefine (virNWFilterPtr nwfilter);
|
||||
|
||||
/*
|
||||
* NWFilter destroy/free
|
||||
*/
|
||||
int virNWFilterRef (virNWFilterPtr nwfilter);
|
||||
int virNWFilterFree (virNWFilterPtr nwfilter);
|
||||
|
||||
/*
|
||||
* NWFilter information
|
||||
*/
|
||||
const char* virNWFilterGetName (virNWFilterPtr nwfilter);
|
||||
int virNWFilterGetUUID (virNWFilterPtr nwfilter,
|
||||
unsigned char *uuid);
|
||||
int virNWFilterGetUUIDString (virNWFilterPtr nwfilter,
|
||||
char *buf);
|
||||
char * virNWFilterGetXMLDesc (virNWFilterPtr nwfilter,
|
||||
int flags);
|
||||
|
||||
#endif /* __VIR_VIRLIB_H__ */
|
||||
|
@ -12,13 +12,13 @@
|
||||
*/
|
||||
|
||||
#ifndef __VIR_VIRERR_H__
|
||||
#define __VIR_VIRERR_H__
|
||||
# define __VIR_VIRERR_H__
|
||||
|
||||
#include <libvirt/libvirt.h>
|
||||
# include <libvirt/libvirt.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/**
|
||||
* virErrorLevel:
|
||||
@ -69,6 +69,10 @@ typedef enum {
|
||||
VIR_FROM_PHYP, /* Error from IBM power hypervisor */
|
||||
VIR_FROM_SECRET, /* Error from secret storage */
|
||||
VIR_FROM_CPU, /* Error from CPU driver */
|
||||
VIR_FROM_XENAPI, /* Error from XenAPI */
|
||||
VIR_FROM_NWFILTER, /* Error from network filter driver */
|
||||
VIR_FROM_HOOK, /* Error from Synchronous hooks */
|
||||
VIR_FROM_DOMAIN_SNAPSHOT, /* Error from domain snapshot */
|
||||
} virErrorDomain;
|
||||
|
||||
|
||||
@ -168,6 +172,10 @@ typedef enum {
|
||||
VIR_ERR_NO_INTERFACE, /* interface driver not running */
|
||||
VIR_ERR_INVALID_INTERFACE, /* invalid interface object */
|
||||
VIR_ERR_MULTIPLE_INTERFACES, /* more than one matching interface found */
|
||||
VIR_WAR_NO_NWFILTER, /* failed to start nwfilter driver */
|
||||
VIR_ERR_INVALID_NWFILTER, /* invalid nwfilter object */
|
||||
VIR_ERR_NO_NWFILTER, /* nw filter pool not found */
|
||||
VIR_ERR_BUILD_FIREWALL, /* nw filter pool not found */
|
||||
VIR_WAR_NO_SECRET, /* failed to start secret storage */
|
||||
VIR_ERR_INVALID_SECRET, /* invalid secret */
|
||||
VIR_ERR_NO_SECRET, /* secret not found */
|
||||
@ -175,6 +183,9 @@ typedef enum {
|
||||
VIR_ERR_OPERATION_TIMEOUT, /* timeout occurred during operation */
|
||||
VIR_ERR_MIGRATE_PERSIST_FAILED, /* a migration worked, but making the
|
||||
VM persist on the dest host failed */
|
||||
VIR_ERR_HOOK_SCRIPT_FAILED, /* a synchronous hook script failed */
|
||||
VIR_ERR_INVALID_DOMAIN_SNAPSHOT, /* invalid domain snapshot */
|
||||
VIR_ERR_NO_DOMAIN_SNAPSHOT, /* domain snapshot not found */
|
||||
} virErrorNumber;
|
||||
|
||||
/**
|
||||
@ -210,8 +221,8 @@ void virConnSetErrorFunc (virConnectPtr conn,
|
||||
virErrorFunc handler);
|
||||
int virConnCopyLastError (virConnectPtr conn,
|
||||
virErrorPtr to);
|
||||
#ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif /* __VIR_VIRERR_H__ */
|
||||
|
@ -61,6 +61,7 @@
|
||||
%define with_udev 0%{!?_without_udev:0}
|
||||
%define with_hal 0%{!?_without_hal:0}
|
||||
%define with_yajl 0%{!?_without_yajl:0}
|
||||
%define with_libpcap 0%{!?_without_libpcap:0}
|
||||
|
||||
# Non-server/HV driver defaults which are always enabled
|
||||
%define with_python 0%{!?_without_python:1}
|
||||
@ -147,6 +148,11 @@
|
||||
%define with_yajl 0%{!?_without_yajl:%{server_drivers}}
|
||||
%endif
|
||||
|
||||
# Enable libpcap library
|
||||
%if %{with_qemu}
|
||||
%define with_libpcap 0%{!?_without_libpcap:%{server_drivers}}
|
||||
%endif
|
||||
|
||||
# Force QEMU to run as non-root
|
||||
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
|
||||
%define qemu_user qemu
|
||||
@ -266,6 +272,9 @@ BuildRequires: libpciaccess-devel >= 0.10.9
|
||||
%if %{with_yajl}
|
||||
BuildRequires: yajl-devel
|
||||
%endif
|
||||
%if %{with_libpcap}
|
||||
BuildRequires: libpcap-devel
|
||||
%endif
|
||||
%if %{with_avahi}
|
||||
BuildRequires: avahi-devel
|
||||
%endif
|
||||
@ -592,9 +601,14 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version}
|
||||
|
||||
%if ! %{with_qemu}
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||
%endif
|
||||
%if ! %{with_lxc}
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||
%endif
|
||||
%if ! %{with_uml}
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
|
||||
%endif
|
||||
|
||||
%if %{with_libvirtd}
|
||||
@ -624,7 +638,7 @@ getent passwd qemu >/dev/null || \
|
||||
# or on the first upgrade from a non-network aware libvirt only.
|
||||
# We check this by looking to see if the daemon is already installed
|
||||
/sbin/chkconfig --list libvirtd 1>/dev/null 2>&1
|
||||
if [ $? != 0 -a ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ]
|
||||
if test $? != 0 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
||||
then
|
||||
UUID=`/usr/bin/uuidgen`
|
||||
sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \
|
||||
@ -665,19 +679,26 @@ fi
|
||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
|
||||
%endif
|
||||
|
||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
|
||||
%{_sysconfdir}/libvirt/nwfilter/*.xml
|
||||
|
||||
%{_sysconfdir}/rc.d/init.d/libvirtd
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
|
||||
|
||||
%if %{with_qemu}
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||
%endif
|
||||
%if %{with_lxc}
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
|
||||
%endif
|
||||
%if %{with_uml}
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml
|
||||
%endif
|
||||
|
||||
%dir %{_datadir}/libvirt/
|
||||
@ -773,6 +794,7 @@ fi
|
||||
%{_datadir}/libvirt/schemas/interface.rng
|
||||
%{_datadir}/libvirt/schemas/secret.rng
|
||||
%{_datadir}/libvirt/schemas/storageencryption.rng
|
||||
%{_datadir}/libvirt/schemas/nwfilter.rng
|
||||
|
||||
%{_datadir}/libvirt/cpu_map.xml
|
||||
|
||||
@ -815,6 +837,28 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Apr 12 2010 Daniel Veillard <veillard@redhat.com> - 0.8.0-1
|
||||
- Snapshotting support (QEmu/VBox/ESX)
|
||||
- Network filtering API
|
||||
- XenAPI driver
|
||||
- new APIs for domain events
|
||||
- Libvirt managed save API
|
||||
- timer subselection for domain clock
|
||||
- synchronous hooks
|
||||
- API to update guest CPU to host CPU
|
||||
- virDomainUpdateDeviceFlags new API
|
||||
- migrate max downtime API
|
||||
- volume wiping API
|
||||
- and many bug fixes
|
||||
|
||||
* Fri Mar 5 2010 Daniel Veillard <veillard@redhat.com> - 0.7.7-1
|
||||
- macvtap support
|
||||
- async job handling
|
||||
- virtio channel
|
||||
- computing baseline CPU
|
||||
- virDomain{Attach,Detach}DeviceFlags
|
||||
- assorted bug fixes and lots of cleanups
|
||||
|
||||
* Wed Feb 3 2010 Daniel Veillard <veillard@redhat.com> - 0.7.6-1
|
||||
|
||||
* Wed Dec 23 2009 Daniel Veillard <veillard@redhat.com> - 0.7.5-1
|
||||
|
@ -1,6 +1,7 @@
|
||||
# serial 3
|
||||
# serial 4
|
||||
# Find valid warning flags for the C Compiler. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2010 Red Hat, Inc.
|
||||
# Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@ -37,7 +38,7 @@ AC_DEFUN([gl_COMPILER_FLAGS],
|
||||
echo 'int x;' >conftest.c
|
||||
$CC $CFLAGS -c conftest.c 2>conftest.err
|
||||
ret=$?
|
||||
if test $ret != 0 -o -s conftest.err -o $has_option = "no"; then
|
||||
if test $ret != 0 || test -s conftest.err || test $has_option = "no"; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
|
26
po/.gitignore
vendored
26
po/.gitignore
vendored
@ -1,15 +1,17 @@
|
||||
stamp-po
|
||||
remove-potcdate.sin
|
||||
quot.sed
|
||||
insert-header.sin
|
||||
*.gmo
|
||||
en@quot.header
|
||||
en@boldquot.header
|
||||
boldquot.sed
|
||||
Rules-quot
|
||||
POTFILES
|
||||
Makevars.template
|
||||
Makefile.in.in
|
||||
Makefile.in
|
||||
Makefile
|
||||
Makefile.in
|
||||
Makefile.in.in
|
||||
Makevars
|
||||
Makevars.template
|
||||
POTFILES
|
||||
Rules-quot
|
||||
boldquot.sed
|
||||
en@boldquot.header
|
||||
en@quot.header
|
||||
insert-header.sed
|
||||
insert-header.sin
|
||||
quot.sed
|
||||
remove-potcdate.sed
|
||||
remove-potcdate.sin
|
||||
stamp-po
|
||||
|
41
po/Makevars
41
po/Makevars
@ -1,41 +0,0 @@
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||
# - Strings which use unclear terms or require additional context to be
|
||||
# understood.
|
||||
# - Strings which make invalid assumptions about notation of date, time or
|
||||
# money.
|
||||
# - Pluralisation problems.
|
||||
# - Incorrect English spelling.
|
||||
# - Incorrect formatting.
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS = libvir-list@redhat.com
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
@ -8,13 +8,22 @@ src/conf/domain_event.c
|
||||
src/conf/interface_conf.c
|
||||
src/conf/network_conf.c
|
||||
src/conf/node_device_conf.c
|
||||
src/conf/nwfilter_conf.c
|
||||
src/conf/nwfilter_params.c
|
||||
src/conf/secret_conf.c
|
||||
src/conf/storage_conf.c
|
||||
src/conf/storage_encryption_conf.c
|
||||
src/cpu/cpu.c
|
||||
src/cpu/cpu_generic.c
|
||||
src/cpu/cpu_map.c
|
||||
src/cpu/cpu_x86.c
|
||||
src/datatypes.c
|
||||
src/esx/esx_driver.c
|
||||
src/esx/esx_util.c
|
||||
src/esx/esx_vi.c
|
||||
src/esx/esx_vi_methods.c
|
||||
src/esx/esx_vi_types.c
|
||||
src/esx/esx_vmx.c
|
||||
src/interface/netcf_driver.c
|
||||
src/libvirt.c
|
||||
src/lxc/lxc_container.c
|
||||
@ -25,6 +34,10 @@ src/node_device/node_device_driver.c
|
||||
src/node_device/node_device_linux_sysfs.c
|
||||
src/node_device/node_device_udev.c
|
||||
src/nodeinfo.c
|
||||
src/nwfilter/nwfilter_driver.c
|
||||
src/nwfilter/nwfilter_ebiptables_driver.c
|
||||
src/nwfilter/nwfilter_gentech_driver.c
|
||||
src/nwfilter/nwfilter_learnipaddr.c
|
||||
src/opennebula/one_conf.c
|
||||
src/opennebula/one_driver.c
|
||||
src/openvz/openvz_conf.c
|
||||
@ -54,13 +67,17 @@ src/storage/storage_driver.c
|
||||
src/test/test_driver.c
|
||||
src/uml/uml_conf.c
|
||||
src/uml/uml_driver.c
|
||||
src/util/authhelper.c
|
||||
src/util/bridge.c
|
||||
src/util/conf.c
|
||||
src/util/hooks.c
|
||||
src/util/hostusb.c
|
||||
src/util/json.c
|
||||
src/util/logging.c
|
||||
src/util/macvtap.c
|
||||
src/util/pci.c
|
||||
src/util/processinfo.c
|
||||
src/util/stats_linux.c
|
||||
src/util/storage_file.c
|
||||
src/util/util.c
|
||||
src/util/uuid.c
|
||||
@ -75,5 +92,7 @@ src/xen/xen_hypervisor.c
|
||||
src/xen/xen_inotify.c
|
||||
src/xen/xm_internal.c
|
||||
src/xen/xs_internal.c
|
||||
src/xenapi/xenapi_driver.c
|
||||
src/xenapi/xenapi_utils.c
|
||||
tools/console.c
|
||||
tools/virsh.c
|
||||
|
10144
po/bn_IN.po
10144
po/bn_IN.po
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user