Compare commits
1674 Commits
v0.9.9-rc2
...
v0.10.0
Author | SHA1 | Date | |
---|---|---|---|
6540efa40d | |||
f33dfffc41 | |||
2a41bc95b5 | |||
83b85e3e8f | |||
6fd1708fad | |||
d3bbe33880 | |||
f2f0af3960 | |||
3c2f5e3ede | |||
f2b241e6a7 | |||
f2bb32b1d2 | |||
a22909d5c2 | |||
500c246889 | |||
3de747c9a2 | |||
0b4b53bb80 | |||
9eee40cc54 | |||
3e0cc6306a | |||
aa3e8bd4ca | |||
1fe6d219cb | |||
661d7fb4fc | |||
2b8624dd33 | |||
340196c46f | |||
16ebec2b7c | |||
34c5ab9566 | |||
e9aaf806f1 | |||
9cb9cbee96 | |||
1385c9cd74 | |||
6478ec1673 | |||
3211deba3e | |||
fbe7a88373 | |||
0ee655f5f5 | |||
9f9b7b85c9 | |||
239c5d7138 | |||
e1602a76bd | |||
46dc643232 | |||
352cbae8b3 | |||
ddf1ccb7fe | |||
385ee0e982 | |||
bf51299d57 | |||
a97c67700d | |||
88555379f2 | |||
0e963f4dc6 | |||
847fc9945e | |||
ff049d227b | |||
05447e3af4 | |||
05a66695be | |||
e9b354e2a9 | |||
947a51ee94 | |||
66d811293a | |||
f3868259ca | |||
5b7f5a049c | |||
34b30de5f5 | |||
44574a8789 | |||
66473616c8 | |||
080bf330e3 | |||
15a71e6059 | |||
d575679401 | |||
225f280744 | |||
f1d0b92a01 | |||
5065942019 | |||
e051c482aa | |||
b65dafa812 | |||
1d4395eb47 | |||
4860596044 | |||
272570dffb | |||
ca5c99aecb | |||
3dbf4838e4 | |||
151eee5a06 | |||
c152bf9425 | |||
6db98e8a3f | |||
a1249489ce | |||
19630db3e3 | |||
ed92285095 | |||
fe1d32596c | |||
a5dd8b808c | |||
fd8fd0f916 | |||
1fea56673c | |||
4b03d59167 | |||
910282960f | |||
92741ef3ee | |||
c18dc28b1f | |||
a46af26004 | |||
5d4f8d9746 | |||
4fce1c43ca | |||
f97d02d7be | |||
cd8f8c8de7 | |||
bf76174bac | |||
0d03735f4a | |||
77de1f3573 | |||
8211c677a3 | |||
4efde75fab | |||
bf156385a0 | |||
2560a51ef3 | |||
15f5e16f4e | |||
1a4379cb21 | |||
8d8527de32 | |||
7272a92c81 | |||
dfbb2d3120 | |||
25f2c8b4b0 | |||
637ea54274 | |||
1193fc5f44 | |||
9136032a66 | |||
4e365df44f | |||
2d9df4fca0 | |||
0c0a8c9f35 | |||
29226beefe | |||
a14b4aea51 | |||
ba9c38b430 | |||
f95f1ba4c0 | |||
c0dbd5f352 | |||
9cbb0eda92 | |||
ef8d35830c | |||
69af4f7cb8 | |||
ea3cf921f2 | |||
dcff981a70 | |||
7aeb16a8c0 | |||
4c10b3c7da | |||
ae8e89fb12 | |||
99ae57f841 | |||
2f8a09fbce | |||
6d6bff3a46 | |||
a994ef2d1a | |||
e9377dda36 | |||
6c3cf57d6c | |||
b6ad2c2334 | |||
521b7ab7eb | |||
cc2150d212 | |||
6a48179803 | |||
e68ee5e765 | |||
5435f17ed6 | |||
4eb6cae884 | |||
42c60a7843 | |||
ee7b4e551e | |||
2a336379e0 | |||
6d96fab9cf | |||
f4a7b87de0 | |||
c2e494cc57 | |||
8e8809e131 | |||
1610b71a96 | |||
a818f8cfb6 | |||
3ebf5484bc | |||
2b51a63bab | |||
1446003419 | |||
1494897bac | |||
f9150c8158 | |||
395be3c2b8 | |||
d413464229 | |||
7d2b91b86a | |||
01aa172cb8 | |||
75e5bec97b | |||
ca9be83de9 | |||
b44e6bef90 | |||
3fdd85bf53 | |||
e979226ba2 | |||
29d8ed7a61 | |||
9ef12b6ff5 | |||
eed537c5df | |||
42af2167a4 | |||
4eb4c6fad7 | |||
3f9274a524 | |||
cfbdd005e9 | |||
e4a199a1af | |||
5faff3d3fd | |||
f376d24e79 | |||
c7447ab147 | |||
7e2f6683ad | |||
910041bac8 | |||
9cdd73a245 | |||
39b5e4d4d8 | |||
07143d84ba | |||
86f5457d49 | |||
95e49be5e2 | |||
2241582c6a | |||
ecf00158ff | |||
4ee8672146 | |||
5f2f8d4180 | |||
9700ca82fe | |||
9fbefc540d | |||
4aaa5a723d | |||
ede82a6cfb | |||
86272449a6 | |||
be023c0896 | |||
1f7a291c96 | |||
300bcdb63b | |||
4fee4e052a | |||
92a8304081 | |||
643feae785 | |||
95ae4e7fa3 | |||
c606671aaa | |||
6a3691b743 | |||
4af3cbafdd | |||
ff1efc0901 | |||
2841a0ad0f | |||
1d1744285b | |||
1c02ed1421 | |||
8450d7b20c | |||
21ea73e8f4 | |||
85d9c17d70 | |||
37f3cd416c | |||
a40f9e9a59 | |||
cf24bed098 | |||
b6e66cb6dd | |||
b77e9814e4 | |||
cbe67ff9b0 | |||
51b23ed31a | |||
fd016806df | |||
aa5bd8b9b9 | |||
0a6504d40c | |||
3b0cd660ef | |||
bb705e2519 | |||
43bfa23e6f | |||
863399f06b | |||
ff73c6d3bc | |||
86157b594f | |||
d2f971390e | |||
e7d1bdfbd2 | |||
7e6f80107c | |||
4c8cf29447 | |||
a58cb1ac40 | |||
e9a24e3e3d | |||
54264111ff | |||
4d448b1156 | |||
2818359075 | |||
3924072e4e | |||
b8a56f12f5 | |||
51ee43aa55 | |||
7d7ee14b00 | |||
b8fa5fd071 | |||
ba86e5cd3f | |||
c10cc25470 | |||
b9dfbf5723 | |||
98c7d8b278 | |||
efd6824cfc | |||
e18396f36d | |||
462c211232 | |||
6cfdeaac55 | |||
aba9abc5b7 | |||
6758ad4f9e | |||
16d3ab8662 | |||
bfa74ebe1f | |||
d7d468f02c | |||
4118592786 | |||
015c603bcd | |||
8694c716ae | |||
b8c298d301 | |||
7c1119e3bb | |||
f9456b0160 | |||
05e4e7b46e | |||
958499b0c1 | |||
410a5dac42 | |||
2303e92086 | |||
0b4d3fe556 | |||
e10e1969d5 | |||
b57ee0921e | |||
31cb030ab6 | |||
46ec5f85c8 | |||
784a99f794 | |||
b0e478986f | |||
e060f86495 | |||
756fe7868b | |||
87de27b7f9 | |||
1d5bc38220 | |||
addeb7cd05 | |||
e534ec66dc | |||
1fbdfc53be | |||
45edefc7a7 | |||
f8ef393ee3 | |||
54f9cf803d | |||
41cb804820 | |||
86d56e3104 | |||
554612c104 | |||
7de158cf68 | |||
e3b8808ba7 | |||
2b01761d5e | |||
ed1e711b99 | |||
7383c1d762 | |||
37a10129c2 | |||
1f6f723ce1 | |||
54b6334714 | |||
e94c0a09ee | |||
b5c5ad365e | |||
d3084c2a24 | |||
2f2ca02195 | |||
7a054e99e2 | |||
1d170d3f9a | |||
03be7ab586 | |||
0c9fd4cfe9 | |||
b49890de82 | |||
fbe871263c | |||
317badb213 | |||
0925189713 | |||
7ee395a80d | |||
4057048891 | |||
57fb8d5336 | |||
6c0cf39523 | |||
1371cc5251 | |||
ec5b7bd2ec | |||
27df13f483 | |||
04cd70bfd3 | |||
7024ddfc09 | |||
aa296e6c29 | |||
e356f6100d | |||
d71145ad07 | |||
e172cd50ae | |||
0740e1bb01 | |||
e93c33a987 | |||
4033df7ed8 | |||
cafc26ff5f | |||
2beed2daaf | |||
8c63ff3937 | |||
aae5cfb699 | |||
5830c72e15 | |||
665c8cdecc | |||
73bc94c56a | |||
b254cad931 | |||
6f926c5ef6 | |||
6039a2cb49 | |||
ba226d334a | |||
7550bc66f7 | |||
e72f55fac1 | |||
ac97c2ba4c | |||
92c5924a05 | |||
cb612ee489 | |||
b46b1c762a | |||
9117fcb263 | |||
ca5ab84073 | |||
de4b32e4bf | |||
357866c379 | |||
4343fee0a8 | |||
1935471542 | |||
ced272efc5 | |||
eaf10b84ed | |||
b536e193a2 | |||
0998cdae70 | |||
b1029b6f6f | |||
0f7f4b160b | |||
e5a1bee07a | |||
6ed5a1b9bd | |||
1679353496 | |||
ce53382ba2 | |||
85f416fddb | |||
79ca7e4e57 | |||
d6e94bdd3d | |||
b889bac171 | |||
3ad13c92a7 | |||
a4bcefbcff | |||
536a1d7d0a | |||
25b0988974 | |||
609df0dcde | |||
2751ab289b | |||
3df9626c40 | |||
768007aedc | |||
72181978d5 | |||
4fedf388f6 | |||
f12e139621 | |||
dcfb7050c4 | |||
a077c562f6 | |||
7aea9b8cf7 | |||
c4bdf307e0 | |||
49989d7025 | |||
290eb0d9f2 | |||
648ad2471b | |||
d7acdcf093 | |||
e9d10055df | |||
0c39ea2fa5 | |||
0510f97e73 | |||
2f033890c6 | |||
9fbb344f6e | |||
73b89ed838 | |||
9f4baa222e | |||
e92ff10b36 | |||
aa03b1471c | |||
bc80977144 | |||
f53904e4b5 | |||
f7e04e3eff | |||
72e59a3b74 | |||
5eef74320b | |||
98518178a2 | |||
d9bbf217b1 | |||
90fcbb9f7c | |||
8101d43433 | |||
95738b3f0d | |||
e537a31637 | |||
5e62ba3428 | |||
5e21da5630 | |||
1bfb47dfe6 | |||
fa54d2a823 | |||
8e0f7faf56 | |||
d57e17d583 | |||
faffe26909 | |||
f9ce7dad60 | |||
04d9cf8e6c | |||
d4611c0ee3 | |||
1f2bd1072a | |||
df80282dab | |||
a22a36e8fe | |||
be7e61a67e | |||
4e8468045c | |||
6869b59709 | |||
0429e5f0c8 | |||
a91067fa0d | |||
2ef6f69a1b | |||
3399875965 | |||
a56c347080 | |||
2e668a61d5 | |||
12b187fb95 | |||
f8ab364c5f | |||
e48daff7bb | |||
95218aa49f | |||
489900e3de | |||
9b13660ee7 | |||
c7af2c125e | |||
f14993ffb7 | |||
edb768c9ce | |||
47ab34e232 | |||
b8605b22e5 | |||
0653554bc5 | |||
d9de122052 | |||
cf8cff035c | |||
7f4ed3ec99 | |||
3445a3ec2f | |||
73a5c94e50 | |||
d1f8d6edbf | |||
110f08e821 | |||
0e9047ced5 | |||
4e28b322d4 | |||
76a0ecd2cd | |||
29bf82593c | |||
a8483d425e | |||
fdf588a63d | |||
43e532d321 | |||
f93518c7ef | |||
cb78198aa6 | |||
e578bc2683 | |||
3de99600b1 | |||
51f6e5a6ef | |||
bd7c36c57e | |||
3b7399b5c9 | |||
4e532f2e3d | |||
e2038d2d30 | |||
9093ab7734 | |||
3fc73cd339 | |||
be873da538 | |||
95c2c19f06 | |||
678da4a57c | |||
19f128eef3 | |||
5b924be906 | |||
99f1faf777 | |||
68a97bd85f | |||
466b306b39 | |||
03e0ec10b4 | |||
0fbafe9c50 | |||
675aef9ef6 | |||
4423f3bece | |||
fa7ebc174f | |||
6d964bcf66 | |||
9f5ef4d9b3 | |||
29bc4fe646 | |||
e00184291e | |||
df5232f554 | |||
54e520d3aa | |||
d8a1c4c49f | |||
89e23562c9 | |||
1e0bb184a7 | |||
7c7d01e15f | |||
db582fa25f | |||
7c45ad4ba2 | |||
f6d4405e3c | |||
8a89c08069 | |||
605df4f4d9 | |||
c4897029c9 | |||
7b5031b952 | |||
7e94acd4fc | |||
17f3be079c | |||
c7d5cdb15b | |||
9d1938896c | |||
14197c7472 | |||
2d98ee5b35 | |||
387117ad92 | |||
87c8623161 | |||
8e6fb68f1f | |||
a8d63a485e | |||
1d9d5103b4 | |||
7ed6d7dda7 | |||
db4eba91a7 | |||
102c69414c | |||
ece765959a | |||
3189dfb163 | |||
efe6c80211 | |||
1ffc78b54b | |||
258e06c85b | |||
0f9ad736cb | |||
5079a7b3e2 | |||
8a544719aa | |||
97d7f02dcc | |||
7ea1dd93aa | |||
1aa1a45b0a | |||
80533ca25d | |||
6dcf98c822 | |||
028ba4f375 | |||
1af7e319ed | |||
d0304eaac7 | |||
6e15887f30 | |||
f5dd58a608 | |||
31351c316f | |||
626dd5180e | |||
0867a87721 | |||
4036aa91bf | |||
67d79ad7ff | |||
ea9509b9e8 | |||
fee00a6807 | |||
097da1abbd | |||
e4cce2c9be | |||
56f34e5573 | |||
6bbbe53bea | |||
e16d434da7 | |||
48b7851998 | |||
ab9c72ae9e | |||
73f4b30882 | |||
017edaf79a | |||
6068754670 | |||
c47a8aec53 | |||
9a4d0b5170 | |||
9612e4b2e7 | |||
f547e8768d | |||
deba8b0c4c | |||
4c87afe0ac | |||
25aa053282 | |||
37441d89d5 | |||
ef07d89f1f | |||
eddca75a14 | |||
7a4bf9c39c | |||
ba797c73e6 | |||
d624ad6a3d | |||
284143bbee | |||
dff6d809fb | |||
c6b2d5d082 | |||
ccb9478500 | |||
3cdb3b4e64 | |||
fe04138ea0 | |||
d59e10338d | |||
a4f74cd09a | |||
a3389319ba | |||
78290b1641 | |||
30a30a7a70 | |||
811cea18f3 | |||
3a4d9d1ed3 | |||
9faaaba432 | |||
791d095235 | |||
b1675bac67 | |||
5bb83236c9 | |||
0ac3baee2c | |||
96ebb4fe58 | |||
6117c35829 | |||
11bdab02c2 | |||
f38df54b41 | |||
8116529409 | |||
b29f9bbe49 | |||
cd15303fd1 | |||
421a200987 | |||
b3f748a736 | |||
0b7ad22ba6 | |||
16a8f5e5b9 | |||
78bf84f4cf | |||
d092aae120 | |||
cdea24c56c | |||
2abbffec6e | |||
bf2e40fac0 | |||
c7c8080469 | |||
6a6c347118 | |||
97485bd0b5 | |||
968b6c60e9 | |||
d7f9d82753 | |||
8d27005b50 | |||
803dc0a5ba | |||
85ce98250e | |||
0fce94fe1b | |||
9273e07f9e | |||
465c055f4a | |||
63f5c83bb0 | |||
3b9ca94025 | |||
db835b7b3a | |||
931b7d194a | |||
6a714d31d0 | |||
dcbfd57214 | |||
acbd4965c4 | |||
3b1ddec1ef | |||
76b644c362 | |||
9c77bf04b0 | |||
de924ca90a | |||
0dda594da9 | |||
fd4fd420b4 | |||
d62e51f86b | |||
f1b872b25a | |||
fafb80a145 | |||
57349ffc10 | |||
e4cfe5f699 | |||
d4edc089f5 | |||
e3fe4102c1 | |||
33dc8cf018 | |||
229773fcbd | |||
d1778b7148 | |||
5488612eb0 | |||
8548a9c501 | |||
dbb564f862 | |||
f73d99c2a5 | |||
a7f7bf02fd | |||
37bb0447bb | |||
35ae18f3c6 | |||
5873f2e2da | |||
3dc733bb01 | |||
830d035ff5 | |||
fbc72a1d0b | |||
4b2273074c | |||
00828bebda | |||
cd639ec5ff | |||
ec83c7163e | |||
7e111c6fe6 | |||
06d4a1e429 | |||
7dcee3f956 | |||
2c68080444 | |||
bc8e15592c | |||
9c9de4e64d | |||
bd34cc8c45 | |||
747f64eeaf | |||
72099c5be0 | |||
3477e6b0ab | |||
0896265cf7 | |||
3c42abe661 | |||
1f8c33b672 | |||
73e2d646fb | |||
2872155bfe | |||
cc75fcc90f | |||
d97a234c62 | |||
c12d787eb0 | |||
90a61b3940 | |||
76d397b0d3 | |||
350583c859 | |||
2cd29c3107 | |||
cc004a6647 | |||
b9852862ea | |||
50312d4b91 | |||
b34324fbf0 | |||
440b8ad181 | |||
cdef31c562 | |||
6fe26d89cc | |||
5136c5799f | |||
e3843d7f04 | |||
8b36e32c16 | |||
e9d8861e58 | |||
92cbe7ae39 | |||
e0f0131d33 | |||
79521a5e5b | |||
b00469b615 | |||
0f4660c878 | |||
5b4740265c | |||
1f145b2f0f | |||
6510c97bf5 | |||
5d490603a6 | |||
4d971dc7ef | |||
d9ad416698 | |||
0ec514b359 | |||
bb85f2298e | |||
c57103e567 | |||
28c75382b0 | |||
a2ba868632 | |||
ca9b13e373 | |||
ef392614aa | |||
78602c4e83 | |||
9e747e5c50 | |||
71689f95ce | |||
9b5970c6c4 | |||
78d078c824 | |||
f5d61d397e | |||
1d82540adf | |||
0dde544c95 | |||
48939a4aba | |||
a0de5d78ef | |||
8566618f65 | |||
86032b2276 | |||
69dd77149c | |||
e3559a6e66 | |||
549741ee44 | |||
a2bc4a0c69 | |||
757c47635d | |||
a0ac7450d9 | |||
1cdbe4d22a | |||
2e13b9ab3c | |||
903560245f | |||
c8564ad476 | |||
ef981053ca | |||
9202f2c220 | |||
539e9b34b9 | |||
0ec8262092 | |||
19c08b5644 | |||
d9f6066598 | |||
d41d252694 | |||
e49d792f29 | |||
0cb787bd3c | |||
a80bb970fc | |||
2d98c68662 | |||
3ac8fb54f4 | |||
9d08debe88 | |||
d581313acf | |||
9ec6f818de | |||
04a319ba4e | |||
1c2edf0fbd | |||
5e8ab3915b | |||
bda2f17d7e | |||
b2ecfe9795 | |||
dd7bc51bc4 | |||
ca02b101d7 | |||
3c3644d30f | |||
eb635de1fe | |||
a2c304f687 | |||
7bff56a0d1 | |||
ae953f5134 | |||
ee58b581c4 | |||
68fcfdb8bd | |||
05f8917f96 | |||
7508338ff3 | |||
a3bc393e3a | |||
858c2476d9 | |||
80e4b166e1 | |||
2af63b1c34 | |||
c094b4b332 | |||
85815b6a40 | |||
dfd4584317 | |||
461ed4210f | |||
107f51b69c | |||
a7de052369 | |||
0766783abb | |||
b92d52d3c0 | |||
797b47580a | |||
cec281fcaa | |||
195fa214b6 | |||
6734ce7bc8 | |||
d4fb6694a4 | |||
b19c236d69 | |||
746ff701e8 | |||
f3cfc7c884 | |||
da831afcf2 | |||
655cffa0f2 | |||
0a045f01cf | |||
730cc8d783 | |||
23292f7389 | |||
13af87f23c | |||
fb59cf7a58 | |||
aabf77aa41 | |||
7454849ec5 | |||
87dfdb0b92 | |||
be6c46b1b4 | |||
ffc9f7ab4f | |||
620dda6661 | |||
fca009fd04 | |||
28dbf01d08 | |||
dc4301c726 | |||
e925ea3156 | |||
67dd486f20 | |||
423bb74994 | |||
d8199033d6 | |||
d91f3ef497 | |||
1d22ba953b | |||
1e8ecfedeb | |||
7cd77b6b2f | |||
94618eb66a | |||
de9758ae9b | |||
6c10c04c39 | |||
a9c779caf3 | |||
c5c3278e9b | |||
076f200689 | |||
517368a377 | |||
83fe3d22e2 | |||
54c4d9d90b | |||
ebbcc02639 | |||
0d07aa512c | |||
0159295d29 | |||
4878a33125 | |||
428fc2bf31 | |||
cdd762e425 | |||
ee40725510 | |||
d2e30e9851 | |||
1cc2034a72 | |||
45b43a8cab | |||
4ab0d6c48a | |||
81e9e7cf3b | |||
2d191e8e27 | |||
b3cf13bb2f | |||
ff0f6a0e79 | |||
6976f9e851 | |||
b47637261c | |||
a4e45a06c0 | |||
f5f1fe1b3a | |||
ee53a8c8ec | |||
6cd4b1fe16 | |||
1e27f291b3 | |||
1c275e9afa | |||
aad1625da6 | |||
e63845469e | |||
680ac813a5 | |||
41f1db6a0c | |||
b46e005459 | |||
4c7973e184 | |||
63643f67ab | |||
db19417fc0 | |||
3404729e58 | |||
cdb87b1c4b | |||
74951eadef | |||
b8e6021e7b | |||
2cb0899eec | |||
651d712452 | |||
a3f3ab4c9c | |||
e8314e78f9 | |||
fe0aac0503 | |||
d29a7aaa1a | |||
d9a269bc74 | |||
a7675a6ba5 | |||
988e85a51e | |||
0aaebd7abc | |||
9c484e3dc5 | |||
5a8262a0ae | |||
e7df360d56 | |||
3337ba6dc7 | |||
2f5fdc886e | |||
7ba66ef285 | |||
51bcb09fe9 | |||
a8c0b2fed0 | |||
c529b47a75 | |||
c16b4c43fc | |||
e8639920ac | |||
8dd5794f81 | |||
abf2ebbd27 | |||
6844ceadb4 | |||
fa5e68ffbf | |||
cf36c23bc9 | |||
73580c60d1 | |||
6cfc3f8f4f | |||
63b4243624 | |||
03b804a200 | |||
1ebd52cb87 | |||
2c195fdbf3 | |||
b3567ef37c | |||
548563956e | |||
905be03d20 | |||
2adda523ea | |||
3247b63ba9 | |||
80fd8367c9 | |||
c086af6b9b | |||
10d9038b74 | |||
be9f6ecb28 | |||
d1bdeca875 | |||
bb725ac1fa | |||
b8012ce931 | |||
891a7f9e23 | |||
2b366b46dc | |||
88f12a3665 | |||
5f89c86004 | |||
aaf36b15a6 | |||
32a9aac2e0 | |||
a25d5cfd80 | |||
3b9a12958d | |||
c833526924 | |||
3163682b58 | |||
e99ad93d02 | |||
c0057d9a49 | |||
ab5fb8f34c | |||
38bd605b71 | |||
eecee94c3a | |||
15e0b20acd | |||
5c650b98ce | |||
10a87145f7 | |||
d9d39e6209 | |||
b736e72255 | |||
b0f3244554 | |||
a00efddab6 | |||
d70f2e117a | |||
8d26a7fd4e | |||
97010eb1f1 | |||
8be304ecb9 | |||
75d155ec26 | |||
ba97e4edc6 | |||
4e78ffb634 | |||
0ca336b32b | |||
c6694ab85c | |||
cc0737713a | |||
c99e93758d | |||
cca7bb1fb5 | |||
642973135c | |||
f300c194fd | |||
05abd1507d | |||
9914477efc | |||
f4345ac21f | |||
0cb72f2585 | |||
409b5f5495 | |||
cd603008b1 | |||
13f9a19326 | |||
98cec05288 | |||
bae4ff282b | |||
43d1616ff5 | |||
b4586051ec | |||
a01e67217c | |||
c0774482ff | |||
409a637eb1 | |||
1cbe658bea | |||
fd2b41574e | |||
739cfc3161 | |||
ad4d4ad036 | |||
e91e0ab604 | |||
cff0d342ad | |||
b80f4db993 | |||
cdce2f42d9 | |||
60fb8a22ee | |||
c898263826 | |||
287737f413 | |||
0d631e9182 | |||
d08c28f65f | |||
ca1bf4bd74 | |||
93b21be929 | |||
706aa7c52b | |||
46e5d36b89 | |||
eefb881d46 | |||
07cf96ecc7 | |||
43ee987312 | |||
3746b070e7 | |||
eb06375a84 | |||
8f3728f853 | |||
b57e01532a | |||
d50cae3335 | |||
5ee18aaa57 | |||
29e702e576 | |||
980f12be72 | |||
122fa379de | |||
9d2ac5453e | |||
378031088f | |||
59b935f5ae | |||
2eabac008e | |||
f74471de4f | |||
002b18b3fb | |||
c964b6aac1 | |||
ddd6bef4dc | |||
2d76fea134 | |||
8e532d3403 | |||
4bf9061e58 | |||
42548fbf2a | |||
9c1ce3dc11 | |||
9586925bac | |||
8ef5f26361 | |||
25a63451ad | |||
b1e374a7ac | |||
6d64694762 | |||
6446a9e20c | |||
f78024b9f5 | |||
bae13129c1 | |||
1614970ec5 | |||
f86880082d | |||
a4a5c00be9 | |||
3ac303616f | |||
8fe455fd36 | |||
a9bc123ea3 | |||
52ee7c2ba3 | |||
ae6aa8c396 | |||
1f06c007fe | |||
3648469258 | |||
a2ba53cf18 | |||
28ae4f0cbb | |||
e0aba54bd1 | |||
b126715a48 | |||
995b5b3d7c | |||
f43461735e | |||
6877a34dd1 | |||
ae27f341a7 | |||
c09acad352 | |||
bb65c8af33 | |||
1aeacfd5e9 | |||
c9cd419cab | |||
2aed9a97f8 | |||
2223ea984c | |||
7c26343bc3 | |||
71bc80b60e | |||
6241eed3db | |||
b83d76d40e | |||
ee20ec4cdb | |||
f6146c35f1 | |||
25fce290e3 | |||
3b96a89242 | |||
6fb8a64d93 | |||
4f06777e5b | |||
78345c68c9 | |||
7adeac67e8 | |||
74e772dd61 | |||
79568df0f1 | |||
4010217e73 | |||
a4cda054e7 | |||
02e8d0cfdf | |||
dde91ab917 | |||
10c31135f3 | |||
bfc22645fc | |||
684f3ebb6d | |||
3e0513afd0 | |||
63ddc65d63 | |||
794d6b1dc0 | |||
cab1a9dee8 | |||
6fbd5737e9 | |||
8fb2164cff | |||
ccf80e3630 | |||
360a88c317 | |||
b33d3d0f17 | |||
a2996926e3 | |||
d7451bddc5 | |||
1ce159c1c9 | |||
b71af85686 | |||
e14d6571c1 | |||
354e6d4ed0 | |||
26e9ef4762 | |||
997366ca7d | |||
b1256816ff | |||
d0eaf4b124 | |||
a9d3495e67 | |||
a91ce852b5 | |||
ecb39e9d4b | |||
a696f8b71a | |||
2b085f5bc5 | |||
3d3de46a67 | |||
6eede368bc | |||
08ec1d787f | |||
31796e2c1c | |||
1bd587abe2 | |||
219125835e | |||
9011a494ac | |||
ddf2dfa1f7 | |||
fd3f67e9d3 | |||
cc5100654b | |||
20171c8dc0 | |||
4e9bb1dffd | |||
a9694a8e18 | |||
a4475839dd | |||
6e6e9bebc2 | |||
db46f3cefe | |||
257191c9e4 | |||
1413560966 | |||
650da0e99c | |||
fb98da0050 | |||
72505073bd | |||
06a1a45cef | |||
4eb1c2560d | |||
bde32b1ada | |||
80d476a92f | |||
37075dfe6c | |||
e7eca6e4be | |||
4f4b496e78 | |||
f94d9c5793 | |||
06180ca433 | |||
f48de0f161 | |||
ea3bc548ac | |||
e2f5dd6134 | |||
b2c7b9ee0e | |||
cf2ed25c9a | |||
899bf6680a | |||
726e391d37 | |||
bb14513465 | |||
189fbe1a8f | |||
524ba61d9b | |||
ec8552f3af | |||
ae277e4ec2 | |||
7960ce842b | |||
782afa98e4 | |||
683e011137 | |||
66cab01ae1 | |||
11ec6bd891 | |||
b8bf79aad7 | |||
867ed7bb9e | |||
a4650316d1 | |||
d400b8fb18 | |||
095b0bc46a | |||
4a86c2bb4b | |||
8bf0442e83 | |||
06a0d57f5a | |||
2711ac8716 | |||
8768149545 | |||
1012dc2933 | |||
ecde15910a | |||
1133ee2b38 | |||
3269ee657c | |||
075c8518c6 | |||
cde3c054fb | |||
454b927630 | |||
ec8cae93db | |||
57351139a7 | |||
12f0d2ece9 | |||
5d7929af46 | |||
814fcb9e08 | |||
ff68d6eeb5 | |||
e8aa5a16c9 | |||
63e086310f | |||
a1e50e820b | |||
a02500d010 | |||
b0e2bb33d8 | |||
03ca3317a6 | |||
1aeb3d9e7f | |||
384ebd3fc5 | |||
3ff4b06968 | |||
851117bd7a | |||
3a2fc2770b | |||
53e1d56dd4 | |||
a14eda311e | |||
72c507317a | |||
c91cff255f | |||
eb8f31c16b | |||
05e981df2d | |||
bd6b0a052e | |||
2067e31bf9 | |||
ecb4d92d57 | |||
05c25e6071 | |||
cf57d345b5 | |||
f094452526 | |||
9943276fd2 | |||
70c07e01de | |||
beb76e3742 | |||
d42a2ffc07 | |||
0436d328f5 | |||
64d5e815b7 | |||
4c4cc1b96d | |||
922d498e1c | |||
4d5533ca87 | |||
311357d9e3 | |||
98ada9ab70 | |||
9b6860f5ce | |||
8120325750 | |||
0ceced5868 | |||
7c5a0c94e4 | |||
321fa64bf5 | |||
54d9026a2c | |||
487c063381 | |||
57ddcc235a | |||
2d19e33f97 | |||
7fcf943bcd | |||
ad7db43913 | |||
b22eaa7538 | |||
ab49b392cc | |||
a26a1969c3 | |||
25d3a2e01f | |||
4445e16bfa | |||
c6c66615c2 | |||
a4fb88b5c9 | |||
4262e34eb5 | |||
c8aa3862b1 | |||
f6632f6b7f | |||
bc1ff1600e | |||
4ae4ae4ba4 | |||
300e60e15b | |||
1f66c18f79 | |||
94410848e1 | |||
c33dae3175 | |||
6a7ffd4389 | |||
cb640543c8 | |||
350e6c5e66 | |||
d36ccf9f6a | |||
ceb1d36b94 | |||
a772f4eebc | |||
558ebc256d | |||
25fb4c65a5 | |||
1fdc53c385 | |||
527d867a94 | |||
791273603e | |||
4f061ea641 | |||
bf9f0a9726 | |||
9f71368d06 | |||
53b45aa494 | |||
2791b8ab9b | |||
e22789de17 | |||
0007237301 | |||
43d635caf3 | |||
5d57104538 | |||
d675a922b5 | |||
7c736bab06 | |||
3992cfdd79 | |||
787f4feb4d | |||
f987d17511 | |||
b569c1abc1 | |||
8233dcc79b | |||
10a8b1f958 | |||
59d0c9801c | |||
362c3b33e6 | |||
89ae6a5a30 | |||
d86120fc52 | |||
6e6aa000c6 | |||
e457d5ef20 | |||
6227a220cc | |||
68fd6a3b34 | |||
0f8e7ae33a | |||
3165602a55 | |||
823a27c628 | |||
cad8054ece | |||
0ba86207bc | |||
2e4defdca7 | |||
19c7980ee6 | |||
041109afef | |||
98deac7dcc | |||
759095f636 | |||
0d0b409863 | |||
6e0ff1d402 | |||
dd39f13af0 | |||
19e235026b | |||
b5893b7b64 | |||
c6daec7b14 | |||
ee4907320f | |||
896e6ac4f8 | |||
1e31b83560 | |||
f51be165e4 | |||
b8e478502a | |||
7a23ba090d | |||
edb6fc3a7f | |||
0208face59 | |||
f985773d06 | |||
b59e59845f | |||
8845d29375 | |||
879bcee08c | |||
d403b84cf3 | |||
ac8bbdbdfa | |||
38e56abb05 | |||
09d22af194 | |||
4d2e8355cb | |||
cdab483e92 | |||
f05fb6c56c | |||
96b41f639d | |||
3bf5f0427a | |||
1e0534a770 | |||
b819b3b7cf | |||
210ed0e871 | |||
ab95da4058 | |||
af3f9aabde | |||
3d150d328b | |||
1c56b9fe53 | |||
2e22f23bde | |||
4888f0fb56 | |||
73b9977140 | |||
1b1402b90f | |||
2e14861224 | |||
265457845f | |||
cb7583e161 | |||
0d90823e87 | |||
239fb8c46b | |||
9dfdeadc8a | |||
861707b940 | |||
462dc569de | |||
d16a166eaf | |||
af4d39f84d | |||
31047e2ba3 | |||
44b0a53a7c | |||
ad18ff9dbf | |||
b340994bac | |||
e91c8b1805 | |||
ce43483caf | |||
15bbfd8390 | |||
5095bf06f1 | |||
b8b702734c | |||
cf90342be0 | |||
16520d6555 | |||
ac9ca01cc4 | |||
8639a42059 | |||
3b1c191fe7 | |||
93870c4ef7 | |||
6fbb957d91 | |||
cc5b1fe59a | |||
3175df88f1 | |||
b973f920ee | |||
5560170d04 | |||
29293930a9 | |||
2f925c650c | |||
37038d5c0b | |||
fdad9c34ad | |||
4ec60dfbb3 | |||
9890b318c8 | |||
118cfc2535 | |||
d2a9d55f45 | |||
877fd769b9 | |||
07dd6fb610 | |||
6c3642e9bc | |||
720bee3008 | |||
57e677a7c6 | |||
3d2da30edb | |||
1f77472d5b | |||
d2c28911f4 | |||
4f3287a415 | |||
d1c310231d | |||
c1b164d70c | |||
2dcca3ec0a | |||
355ec28167 | |||
3e2c3d8f6d | |||
5c3a15647d | |||
362077e752 | |||
3c30fbcd4a | |||
ff4c25bae9 | |||
10ec36e2e7 | |||
68a1300556 | |||
513fc05750 | |||
e91be41e75 | |||
47d05109b0 | |||
df873c806e | |||
723d5c50c0 | |||
e3ba402581 | |||
b395f95910 | |||
6ba4b300b0 | |||
0531377076 | |||
bc72d9a3a9 | |||
0d77f746ec | |||
04dec5826d | |||
8ab785783f | |||
c0f722240d | |||
238a5a4c3d | |||
096e9048ff | |||
f1c13cf9c9 | |||
f3e99e9920 | |||
4017ec927f | |||
b30a5cee07 | |||
3207de308d | |||
3aab4d7929 | |||
33855f5d04 | |||
42accf1b67 | |||
025998eb79 | |||
c430248643 | |||
c56fe7f1d6 | |||
05fbe728ee | |||
4288b22fb2 | |||
7eadfddad5 | |||
8dcac770f1 | |||
3482191d12 | |||
4cc4b62e30 | |||
f27f616ff8 | |||
4716138229 | |||
3f4238d771 | |||
0c4bfdda42 | |||
95fdc1bc2b | |||
afa4336e94 | |||
a1801023f4 | |||
3e0623ebc8 | |||
9bf1bcc59d | |||
a04d10f739 | |||
e2822f19fd | |||
9f748277bb | |||
801a60ff88 | |||
4a92360091 | |||
1d4c4d9d4f | |||
af6b61ba06 | |||
eda0fc7a82 | |||
f246cdb5ac | |||
cff5573da2 | |||
751fec3557 | |||
d2dc5057fd | |||
d57485f73a | |||
5fadb1549d | |||
0b7480e34e | |||
7808844dd1 | |||
2b38e59bd8 | |||
b90d4722a5 | |||
419e5fb3e6 | |||
cf534a9b28 | |||
616a6f0e43 | |||
0b09b474f7 | |||
c4c68b0025 | |||
e1ecba4669 | |||
cb8b9963fe | |||
102690648d | |||
1c310eaf30 | |||
18942b9bea | |||
e0d4b0db9e | |||
2ccc4a607f | |||
286088567d | |||
fcdfa31f3c | |||
c05ec92021 | |||
8b29c45986 | |||
4c1c361127 | |||
15a280bb6d | |||
d2728cc245 | |||
df81004632 | |||
9368465f75 | |||
f367cd1388 | |||
595e26c086 | |||
5452e88c32 | |||
82f47fde6c | |||
2f1e003939 | |||
c95c90ee4a | |||
172d34298f | |||
bca060a363 | |||
78a7cb0d7a | |||
9034699cb1 | |||
ded8e894dd | |||
3d224ae669 | |||
56cec18d76 | |||
805b4407a6 | |||
2bcfd5b106 | |||
6d514728cc | |||
7c90026db9 | |||
8ac1f8f44a | |||
f9f2d3b100 | |||
42043afcdc | |||
9c8466daac | |||
612fd1573b | |||
d0cb00ab9f | |||
4165d68aaa | |||
c8c239a439 | |||
b0bfbd82d1 | |||
ba8074b807 | |||
d474dbadde | |||
bc6bb3a3e8 | |||
21fe874832 | |||
4f89138bd1 | |||
91ca45f9dc | |||
c4caab538e | |||
afb96301f3 | |||
f6957617c5 | |||
c8683f231d | |||
afe6e58aed | |||
faad9648cf | |||
c001eb5bbe | |||
9fbbcda6b7 | |||
a76530c9c7 | |||
0ed86cfb51 | |||
60f190735c | |||
756e6ab467 | |||
f2445e4de7 | |||
32b2e5a8b2 | |||
10cc08ee32 | |||
360afebfb3 | |||
700102c992 | |||
c052d8a89f | |||
13545647ba | |||
7b448cae4a | |||
35d31954d2 | |||
046b0a6972 | |||
4f20dedfd4 | |||
d9d518b1c8 | |||
8f0b03910c | |||
3ecc06f4d5 | |||
f228917a5c | |||
8f00276c8a | |||
c18a88ac48 | |||
90e4d681bc | |||
d04394288f | |||
3e952ecc52 | |||
72f8a7f197 | |||
99d24ab2e0 | |||
5a4ed59ad9 | |||
c700613b8d | |||
8fe454ce90 | |||
a7cfd709f4 | |||
25adc8f4fe | |||
cb33ee1fad | |||
c9ace552eb | |||
9a3fc7f3f7 | |||
2eaf71a6ab | |||
32f881c6c4 | |||
3d93706d0d | |||
350d6ccb91 | |||
f0495ae943 | |||
b24ed37fff | |||
d166cf76b0 | |||
5df67cdcd3 | |||
0f01192e7e | |||
b170eb99f5 | |||
87c39f0e20 | |||
ae6135bf05 | |||
e68f22ae65 | |||
6152c74595 | |||
02ee87451b | |||
22ec60001e | |||
0aaf88e800 | |||
08f680ee1b | |||
184fc07fda | |||
be9fb5affc | |||
9f902a2ed5 | |||
8ee8fd6555 | |||
99fd69c3de | |||
21d13ddc5d | |||
fad5cd2108 | |||
c471e55e10 | |||
b79ba8382e | |||
26e9fdc0bc | |||
f594cddaf2 | |||
1d7086c2ed | |||
d7320e799f | |||
7bceae0fa6 | |||
e08d2a9ad8 | |||
e17e3ed6aa | |||
342fc56f58 | |||
02af3e13b2 | |||
a89bb7d75a | |||
7b0a740542 | |||
50e9b38930 | |||
bb311b3458 | |||
53e23e99a9 | |||
bfdbae0694 | |||
c3c2cc6534 | |||
b303465d2f | |||
74e034964c | |||
c2e146bfb0 | |||
53bd0cebd3 | |||
397e6a705b | |||
e545dd4ffe | |||
055bbf45e4 | |||
098a987b98 | |||
3801831cdf | |||
3284ac046f | |||
c01ba1a48f | |||
159f4d0b30 | |||
aaa6210f81 | |||
484a0bab39 | |||
efb0839c1d | |||
e97c3109af | |||
c6ec021b3c | |||
5c6651fea2 | |||
f0b22ebea4 | |||
e1eea7470b | |||
7c741763db | |||
8f8b080263 | |||
835817806e | |||
6714fd04d2 | |||
b2e13f9c44 | |||
855d900b84 | |||
bb2eddc6cf | |||
ab6f1c9814 | |||
93f93f5161 | |||
83ed03010b | |||
9b516aa31b | |||
510fa47c2a | |||
4ce98dadcc | |||
54a38915d8 | |||
b66d1bef14 | |||
5a137f3620 | |||
df8e6918b3 | |||
d5e88b2c33 | |||
4be541a6d9 | |||
ef00a05e51 | |||
4a00c099ab | |||
6e769ebadb | |||
ff88cd5905 | |||
823b90339f | |||
8fa78dd49c | |||
65c27e2935 | |||
bc1edeb611 | |||
98b01e8f2b | |||
7033c5f20d | |||
8dd623b980 | |||
19896423f7 | |||
8973190735 | |||
1f7aa0ac56 | |||
51a3286f3e | |||
72b4139700 | |||
1d5c7a9fdf | |||
9f2bf8fd03 | |||
e95ef67b35 | |||
8a09ee4103 | |||
adb99a05b1 | |||
7fb22418ff | |||
d553554b75 | |||
3d5c139c49 | |||
75d3612ef8 | |||
5f1767e845 | |||
275155f664 | |||
16dc4ade7a | |||
c30a78c398 | |||
ef7efbc6ef | |||
6fba577e50 | |||
109593ecb0 | |||
29bce12ada | |||
24a001493a | |||
0ad35376d3 | |||
4d71ff450f | |||
78af071964 | |||
fa981fc945 | |||
d19149dda8 | |||
3f0a757e80 | |||
17cfff6f17 | |||
fb52a39928 | |||
0b7ddf9e77 | |||
c160ce3316 | |||
2f5519dcb6 | |||
b7bcb22ce2 | |||
da094fe201 | |||
4c18acffd7 | |||
549cedc6a9 | |||
c76a17b428 | |||
a3de9829d8 | |||
32b57a72de | |||
bb69630b6c | |||
7b4e5693c1 | |||
c2551bea56 | |||
9e48c22534 | |||
61ca98b054 | |||
9c3775765e | |||
d940e3bdb9 | |||
927cfaf467 | |||
91f79d27cc | |||
2f9dc36d49 | |||
1fff03ef9b | |||
8c9a29545b | |||
59cf039815 | |||
4c82f09ef0 | |||
c53ba61b21 | |||
7aeb9794d2 | |||
6be610bfaa | |||
a06710758c | |||
d9e0d8204b | |||
9619d8a62e | |||
dccf45f376 | |||
e1eb93470e | |||
af5594c88b | |||
450c927d9a | |||
e7201afdf7 | |||
c8506d6662 | |||
277bc0dcb8 | |||
f7dd3a4e62 | |||
a6f88cbd2d | |||
23cf79f07e | |||
5e31e71365 | |||
a5f8a01abb | |||
9a070e8341 | |||
487bdbd8e0 | |||
4447d2cbdf | |||
bfbbc49638 | |||
4b942fe860 | |||
69dde2e653 | |||
8611d9c3d8 | |||
c9abfadf37 | |||
7b345b69f2 | |||
c972237ee1 | |||
0f88c7c16e | |||
ed6bd4bc49 | |||
5b4071333b | |||
5edfcaae6f | |||
b54de0830a | |||
29db7a0072 | |||
0327ff0798 | |||
d98a3d4a59 | |||
08272dc8b4 | |||
9130396214 | |||
69f0b446a8 | |||
833b901cb7 | |||
74e701f8e5 | |||
99fbb3866c | |||
52d064f42d | |||
42c81d18c2 | |||
b01b53de3f | |||
3a0c717b9e | |||
f19338c66c | |||
ba61012cfc | |||
90cd148027 | |||
18262b5587 | |||
a20cc3cc4f | |||
0c42e1d9aa | |||
64484d550d | |||
caa6223a9b | |||
80e9a5cd4c | |||
134c56764f | |||
d82ef7c39d | |||
c41a21de3a | |||
99be754ada | |||
4e9953a426 | |||
529e4a5006 | |||
32f63e912d | |||
d8d9b0e058 | |||
cb0af106de | |||
9ae4ac7ac0 | |||
177db08775 | |||
e8daeeb136 | |||
1734cdb995 | |||
13a776ca0d | |||
2f667b5697 | |||
cf6d36257b | |||
03ea567327 | |||
74ff57506c | |||
b41d440e61 | |||
307f363509 | |||
6b780f744b | |||
820a2159e9 |
100
.gitignore
vendored
@ -1,19 +1,28 @@
|
||||
*#*#
|
||||
*.#*#
|
||||
*.a
|
||||
*.cov
|
||||
*.exe
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.gcov
|
||||
*.html
|
||||
*.i
|
||||
*.la
|
||||
*.lo
|
||||
*.loT
|
||||
*.o
|
||||
*.orig
|
||||
*.pyc
|
||||
*.rej
|
||||
*.s
|
||||
*~
|
||||
.deps
|
||||
.git
|
||||
.git-module-status
|
||||
.libs
|
||||
.lvimrc
|
||||
.memdump
|
||||
.sc-start-sc_*
|
||||
/ABOUT-NLS
|
||||
/COPYING
|
||||
@ -37,11 +46,32 @@
|
||||
/configure
|
||||
/configure.lineno
|
||||
/daemon/*_dispatch.h
|
||||
/daemon/libvirt_qemud
|
||||
/daemon/libvirtd
|
||||
/daemon/libvirtd*.logrotate
|
||||
/daemon/libvirtd.8
|
||||
/daemon/libvirtd.8.in
|
||||
/daemon/libvirtd.init
|
||||
/daemon/libvirtd.pod
|
||||
/daemon/libvirtd.service
|
||||
/daemon/test_libvirtd.aug
|
||||
/docs/apibuild.py.stamp
|
||||
/docs/devhelp/libvirt.devhelp
|
||||
/docs/hvsupport.html.in
|
||||
/docs/libvirt-api.xml
|
||||
/docs/libvirt-qemu-*.xml
|
||||
/docs/libvirt-refs.xml
|
||||
/docs/search.php
|
||||
/docs/todo.html.in
|
||||
/examples/domain-events/events-c/event-test
|
||||
/examples/dominfo/info1
|
||||
/examples/domsuspend/suspend
|
||||
/examples/hellolibvirt/hellolibvirt
|
||||
/examples/openauth/openauth
|
||||
/gnulib/lib/*
|
||||
/gnulib/m4/*
|
||||
/gnulib/tests/*
|
||||
/include/libvirt/libvirt.h
|
||||
/libtool
|
||||
/libvirt-*.tar.gz
|
||||
/libvirt-[0-9]*
|
||||
@ -51,33 +81,99 @@
|
||||
/ltmain.sh
|
||||
/m4/*
|
||||
/maint.mk
|
||||
/mingw32-libvirt.spec
|
||||
/mingw-libvirt.spec
|
||||
/mkinstalldirs
|
||||
/po/*
|
||||
/proxy/
|
||||
/python/generated.stamp
|
||||
/python/generator.py.stamp
|
||||
/python/libvirt-export.c
|
||||
/python/libvirt-qemu-export.c
|
||||
/python/libvirt-qemu.[ch]
|
||||
/python/libvirt.[ch]
|
||||
/python/libvirt.py
|
||||
/python/libvirt_qemu.py
|
||||
/sc_*
|
||||
/src/.*.stamp
|
||||
/src/esx/*.generated.*
|
||||
/src/hyperv/*.generated.*
|
||||
/src/libvirt_iohelper
|
||||
/src/libvirt*.def
|
||||
/src/libvirt.syms
|
||||
/src/libvirt_*.stp
|
||||
/src/libvirt_*helper
|
||||
/src/libvirt_*probes.h
|
||||
/src/libvirt_lxc
|
||||
/src/locking/qemu-sanlock.conf
|
||||
/src/locking/test_libvirt_sanlock.aug
|
||||
/src/lxc/lxc_controller_dispatch.h
|
||||
/src/lxc/lxc_monitor_dispatch.h
|
||||
/src/lxc/lxc_protocol.c
|
||||
/src/lxc/lxc_protocol.h
|
||||
/src/lxc/test_libvirtd_lxc.aug
|
||||
/src/qemu/test_libvirtd_qemu.aug
|
||||
/src/remote/*_client_bodies.h
|
||||
/src/remote/*_protocol.[ch]
|
||||
/src/rpc/virkeepaliveprotocol.[ch]
|
||||
/src/rpc/virnetprotocol.[ch]
|
||||
/src/test_libvirt*.aug
|
||||
/src/util/virkeymaps.h
|
||||
/src/virt-aa-helper
|
||||
/tests/*.log
|
||||
/tests/*.pid
|
||||
/tests/*xml2*test
|
||||
/tests/commandhelper
|
||||
/tests/commandtest
|
||||
/tests/conftest
|
||||
/tests/cputest
|
||||
/tests/domainsnapshotxml2xmltest
|
||||
/tests/esxutilstest
|
||||
/tests/eventtest
|
||||
/tests/hashtest
|
||||
/tests/jsontest
|
||||
/tests/libvirtdconftest
|
||||
/tests/networkxml2argvtest
|
||||
/tests/nodeinfotest
|
||||
/tests/nwfilterxml2xmltest
|
||||
/tests/object-locking
|
||||
/tests/object-locking-files.txt
|
||||
/tests/object-locking.cm[ix]
|
||||
/tests/openvzutilstest
|
||||
/tests/qemuargv2xmltest
|
||||
/tests/qemuhelptest
|
||||
/tests/qemumonitortest
|
||||
/tests/qemuxmlnstest
|
||||
/tests/qparamtest
|
||||
/tests/reconnect
|
||||
/tests/secaatest
|
||||
/tests/seclabeltest
|
||||
/tests/securityselinuxtest
|
||||
/tests/sexpr2xmltest
|
||||
/tests/shunloadtest
|
||||
/tests/sockettest
|
||||
/tests/ssh
|
||||
/tests/statstest
|
||||
/tests/storagebackendsheepdogtest
|
||||
/tests/utiltest
|
||||
/tests/viratomictest
|
||||
/tests/virauthconfigtest
|
||||
/tests/virbuftest
|
||||
/tests/virdrivermoduletest
|
||||
/tests/virhashtest
|
||||
/tests/virkeyfiletest
|
||||
/tests/virnet*test
|
||||
/tests/virshtest
|
||||
/tests/virtimetest
|
||||
/tests/viruritest
|
||||
/tests/vmx2xmltest
|
||||
/tests/xencapstest
|
||||
/tests/xmconfigtest
|
||||
/tools/*.[18]
|
||||
/tools/libvirt-guests.init
|
||||
/tools/libvirt-guests.service
|
||||
/tools/virsh
|
||||
/tools/virsh-*-edit.c
|
||||
/tools/virt-*-validate
|
||||
/tools/virt-sanlock-cleanup
|
||||
/update.log
|
||||
Makefile
|
||||
Makefile.in
|
||||
|
2
.gnulib
9
.mailmap
@ -28,7 +28,16 @@
|
||||
<supriyak@linux.vnet.ibm.com> <supriyak@in.ibm.com>
|
||||
<neil@aldur.co.uk> <neil@brightbox.co.uk>
|
||||
<stefanb@us.ibm.com> <stefanb@linux.vnet.ibm.com>
|
||||
<stefanb@us.ibm.com> <stefannb@linux.vnet.ibm.com>
|
||||
<josh.durgin@inktank.com> <joshd@hq.newdream.net>
|
||||
<josh.durgin@inktank.com> <josh.durgin@dreamhost.com>
|
||||
<gerd@egidy.de> <lists@egidy.de>
|
||||
<gerd@egidy.de> <gerd.von.egidy@intra2net.com>
|
||||
|
||||
# Name consolidation:
|
||||
# Preferred author spelling <preferred email>
|
||||
Alex Jia <ajia@redhat.com>
|
||||
Royce Lv <lvroyce@linux.vnet.ibm.com>
|
||||
Daniel J Walsh <dwalsh@redhat.com>
|
||||
Ján Tomko <jtomko@redhat.com>
|
||||
Gerd von Egidy <gerd@egidy.de>
|
||||
|
61
AUTHORS
@ -30,6 +30,8 @@ The primary maintainers and people with commit access rights:
|
||||
Michal Prívozník <mprivozn@redhat.com>
|
||||
Peter Krempa <pkrempa@redhat.com>
|
||||
Christophe Fergeau <cfergeau@redhat.com>
|
||||
Alex Jia <ajia@redhat.com>
|
||||
Martin Kletzander <mkletzan@redhat.com>
|
||||
|
||||
Previous maintainers:
|
||||
Karel Zak <kzak@redhat.com>
|
||||
@ -69,17 +71,15 @@ Patches have also been contributed by:
|
||||
Chris Wright <chrisw@redhat.com>
|
||||
Ben Guthro <ben.guthro@gmail.com>
|
||||
Shigeki Sakamoto <fj0588di@aa.jp.fujitsu.com>
|
||||
Gerd von Egidy <lists@egidy.de>
|
||||
Gerd von Egidy <gerd@egidy.de>
|
||||
Itamar Heim <iheim@redhat.com>
|
||||
Markus Armbruster <armbru@redhat.com>
|
||||
Ryota Ozaki <ozaki.ryota@gmail.com>
|
||||
James Morris <jmorris@namei.org>
|
||||
Daniel J Walsh <dwalsh@redhat.com>
|
||||
Maximilian Wilhelm <max@rfc2324.org>
|
||||
Pritesh Kothari <Pritesh.Kothari@Sun.COM>
|
||||
Amit Shah <amit.shah@redhat.com>
|
||||
Florian Vichot <florian.vichot@diateam.net>
|
||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
Serge E. Hallyn <serue@us.ibm.com>
|
||||
Soren Hansen <soren@linux2go.dk>
|
||||
Abel Míguez Rodríguez<amiguezr@pdi.ucm.es>
|
||||
@ -144,7 +144,7 @@ Patches have also been contributed by:
|
||||
Hu Tao <hutao@cn.fujitsu.com>
|
||||
Laurent Léonard <laurent@open-minds.org>
|
||||
MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
|
||||
Josh Durgin <joshd@hq.newdream.net>
|
||||
Josh Durgin <josh.durgin@inktank.com>
|
||||
Roopa Prabhu <roprabhu@cisco.com>
|
||||
Paweł Krześniak <pawel.krzesniak@gmail.com>
|
||||
Kay Schubert <kayegypt@web.de>
|
||||
@ -184,7 +184,6 @@ Patches have also been contributed by:
|
||||
Guannan Ren <gren@redhat.com>
|
||||
John Williams <john.williams@petalogix.com>
|
||||
Michael Santos <michael.santos@gmail.com>
|
||||
Alex Jia <ajia@redhat.com>
|
||||
Oskari Saarenmaa <os@ohmu.fi>
|
||||
Nan Zhang <nzhang@redhat.com>
|
||||
Wieland Hoffmann <themineo@googlemail.com>
|
||||
@ -200,8 +199,7 @@ Patches have also been contributed by:
|
||||
Sage Weil <sage@newdream.net>
|
||||
David L Stevens <dlstevens@us.ibm.com>
|
||||
Tyler Coumbes <coumbes@gmail.com>
|
||||
Josh Durgin <josh.durgin@dreamhost.com>
|
||||
Wen Ruo Lv <lvroyce@linux.vnet.ibm.com>
|
||||
Royce Lv <lvroyce@linux.vnet.ibm.com>
|
||||
Patrice LACHANCE <patlachance@gmail.com>
|
||||
Eli Qiao <taget@linux.vnet.ibm.com>
|
||||
Michael Wood <esiotrot@gmail.com>
|
||||
@ -214,6 +212,55 @@ Patches have also been contributed by:
|
||||
Michael Ellerman <michael@ellerman.id.au>
|
||||
Rommer <rommer@active.by>
|
||||
Yuri Chornoivan <yurchor@ukr.net>
|
||||
Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
|
||||
Laszlo Ersek <lersek@redhat.com>
|
||||
Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
|
||||
Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
|
||||
Hendrik Schwartke <hendrik@os-t.de>
|
||||
Ansis Atteka <aatteka@nicira.com>
|
||||
Dan Wendlandt <dan@nicira.com>
|
||||
Kyle Mestery <kmestery@cisco.com>
|
||||
Lincoln Myers <lincoln_myers@yahoo.com>
|
||||
Peter Robinson <pbrobinson@gmail.com>
|
||||
Benjamin Cama <benoar@dolka.fr>
|
||||
Duncan Rance <libvirt@dunquino.com>
|
||||
Peng Zhou <ailvpeng25@gmail.com>
|
||||
Li Zhang <zhlcindy@linux.vnet.ibm.com>
|
||||
Stef Walter <stefw@gnome.org>
|
||||
Christian Benvenuti <benve@cisco.com>
|
||||
Ilja Livenson <ilja.livenson@gmail.com>
|
||||
Stefan Bader <stefan.bader@canonical.com>
|
||||
MATSUDA Daiki <matsudadik@intellilink.co.jp>
|
||||
Jan Kiszka <jan.kiszka@siemens.com>
|
||||
Ryan Woodsmall <rwoodsmall@gmail.com>
|
||||
Wido den Hollander <wido@widodh.nl>
|
||||
Eugen Feller <eugen.feller@inria.fr>
|
||||
Dmitry Guryanov <dguryanov@parallels.com>
|
||||
William Jon McCann <william.jon.mccann@gmail.com>
|
||||
David Weber <wb@munzinger.de>
|
||||
Marti Raudsepp <marti@juffo.org>
|
||||
Radu Caragea <dmns_serp@yahoo.com>
|
||||
Beat Jörg <Beat.Joerg@ssatr.ch>
|
||||
Gao feng <gaofeng@cn.fujitsu.com>
|
||||
Dipankar Sarma <dipankar@in.ibm.com>
|
||||
Gerd Hoffmann <kraxel@redhat.com>
|
||||
Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
|
||||
Thang Pham <thang.pham@us.ibm.com>
|
||||
Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com>
|
||||
Sascha Peilicke <saschpe@suse.de>
|
||||
Chuck Short <chuck.short@canonical.com>
|
||||
Sebastian Wiedenroth <wiedi@frubar.net>
|
||||
Ata E Husain Bohra <ata.husain@hotmail.com>
|
||||
Ján Tomko <jtomko@redhat.com>
|
||||
Richa Marwaha <rmarwah@linux.vnet.ibm.com>
|
||||
Peter Feiner <peter@gridcentric.ca>
|
||||
Frido Roose <frido.roose@gmail.com>
|
||||
Asad Saeed <asad.saeed@acidseed.com>
|
||||
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
|
||||
Thomas Woerner <twoerner@redhat.com>
|
||||
J.B. Joret <jb@linux.vnet.ibm.com>
|
||||
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
|
||||
Gene Czarcinski <gene@czarc.net>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
@ -882,7 +882,7 @@ Wed May 13 18:06:17 CEST 2009 Daniel Veillard <veillard@redhat.com>
|
||||
Wed May 13 12:34:06 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/lxc_container.c: Replace sys/capability.h with
|
||||
linux/capability.h, to avoid unneccessary dependancy
|
||||
linux/capability.h, to avoid unnecessary dependency
|
||||
on the libcap package.
|
||||
|
||||
Tue May 12 16:39:06 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||
@ -3351,7 +3351,7 @@ Tue Jan 20 20:22:53 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||
Tue Jan 20 19:49:53 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* .x-sc_prohibit_nonreentrant: Blacklist some places where
|
||||
use of non-threadsafe APIs are not neccessary to check
|
||||
use of non-threadsafe APIs are not necessary to check
|
||||
* Makefile.am, Makefile.maint, Makefile.nonreentrant: Add
|
||||
check for non-reentrant safe API calls
|
||||
* Makefile.cfg: Temporarily disable non-reentrant check
|
||||
@ -3591,7 +3591,7 @@ Thu Jan 15 19:54:19 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||
* src/Makefile.am, src/threads.c, src/threads.h: Generic internal API for threads
|
||||
* src/threads-pthread.c, src/threads-pthread.h: UNIX pthreads impl
|
||||
* src/threads-win32.c, src/threads-win32.h: Win32 threads impl
|
||||
* src/internal.h: Remove unnneccessary pthreads macros
|
||||
* src/internal.h: Remove unnecessary pthreads macros
|
||||
* src/libvirt_private.syms: Add symbols for internal threads API
|
||||
* po/POTFILES.in: Add node_device_conf.c
|
||||
* proxy/Makefile.am: Add threads.c to build
|
||||
@ -4262,7 +4262,7 @@ Thu Dec 18 11:50:58 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
Misc daemon bug fixes (John Levon)
|
||||
* qemud/qemud.c: Fix conditional for node devices
|
||||
* qemud/remote.c: Remove unneccessary path.h include
|
||||
* qemud/remote.c: Remove unnecessary path.h include
|
||||
|
||||
Thu Dec 18 07:47:58 +0100 2008 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
@ -5032,7 +5032,7 @@ Tue Nov 25 11:17:40 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
Tue Nov 25 10:49:40 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/Makefile.am: Remove unneccessary $(builddir) usage which
|
||||
* src/Makefile.am: Remove unnecessary $(builddir) usage which
|
||||
breaks on older automake. Remove duplicate CFLAGS from merge
|
||||
error
|
||||
* src/xen_unified.c: Wire up XM driver for autostart
|
||||
@ -5093,7 +5093,7 @@ Mon Nov 24 19:22:40 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
* tests/Makefile.am, tests/sexpr2xmltest.c,
|
||||
tests/testutilsxen.c, tests/xencapstest.c,
|
||||
tests/xmconfigtest.c, tests/xml2sexprtest.c: Disable all
|
||||
Xen tests when Xen driver build is disabled. Remove unneccessary
|
||||
Xen tests when Xen driver build is disabled. Remove unnecessary
|
||||
WITH_XEN conditionals from source, since the entire build
|
||||
is disabled in Makefile.am
|
||||
|
||||
@ -6822,7 +6822,7 @@ Wed Aug 20 21:05:09 BST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
src/xen_unified.h, src/xend_internal.c, src/xend_internal.h,
|
||||
src/xm_internal.c, src/xs_internal.c, src/xs_internal.h
|
||||
tests/testutils.h: Remove preprocessor conditions for driver
|
||||
compilation. Remove unneccessary "extern C" declarations.
|
||||
compilation. Remove unnecessary "extern C" declarations.
|
||||
|
||||
Wed Aug 20 20:42:09 BST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
@ -7008,7 +7008,7 @@ Fri Aug 8 16:41:24 BST 2008 Daniel Berrange <berrange@redhat.com>
|
||||
src/storage_backend_fs.c, src/storage_backend_iscsi.c,
|
||||
src/storage_backend_logical.c, src/util.c, src/util.h,
|
||||
src/veth.c, tests/qemuxml2argvtest.c: Fix const-correctness
|
||||
of virRun and virExec, and remove unneccessary casts in callers
|
||||
of virRun and virExec, and remove unnecessary casts in callers
|
||||
|
||||
Fri Aug 8 16:53:24 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
@ -7530,7 +7530,7 @@ Wed Jul 16 16:44:27 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
Sat Jul 12 14:52:59 BST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/qemu_conf.c: Remove unneccessary c-ctype.h include
|
||||
* src/qemu_conf.c: Remove unnecessary c-ctype.h include
|
||||
|
||||
Fri Jul 11 20:32:59 BST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
@ -8612,7 +8612,7 @@ Thu May 1 14:10:28 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
Tue Apr 29 12:32:28 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* configure.in: Remove compatability macros AC_CHECK_*_ONCE for
|
||||
* configure.in: Remove compatibility macros AC_CHECK_*_ONCE for
|
||||
now part of onceonly.m4 in gnulib/m4/
|
||||
|
||||
Wed Apr 29 18:10:00 CEST 2008 Jim Meyering <meyering@redhat.com>
|
||||
@ -8628,7 +8628,7 @@ Wed Apr 29 18:10:00 CEST 2008 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
Tue Apr 29 11:54:28 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* configure.in: Add compatability macros AC_CHECK_*_ONCE for
|
||||
* configure.in: Add compatibility macros AC_CHECK_*_ONCE for
|
||||
older autoconf (RHEL-5 vintage)
|
||||
|
||||
Tue Apr 29 08:13:28 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
@ -10247,7 +10247,7 @@ Fri Jan 25 12:00:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
|
||||
|
||||
Fri Jan 25 10:46:32 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: fix an erronous use of VIR_DOMAIN_NONE instead
|
||||
* src/xen_internal.c: fix an erroneous use of VIR_DOMAIN_NONE instead
|
||||
of VIR_DOMAIN_NOSTATE (both defined as 0, no regression)
|
||||
|
||||
Thu Jan 24 18:08:28 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||
@ -10283,8 +10283,8 @@ Tue Jan 22 16:27:47 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* configure.ac: Remove use of PKG_CHECK_EXISTS macro. Avoid
|
||||
lines going over 80 chars wide. Make sasl check automatic
|
||||
enable/disable as neccessary.
|
||||
* acinclude.m4: Added compatability macro for old pkg-config
|
||||
enable/disable as necessary.
|
||||
* acinclude.m4: Added compatibility macro for old pkg-config
|
||||
* src/gnutls_1_0_compat.h: Add compat for gnutls_cipher_algorithm_t
|
||||
|
||||
Mon Jan 21 18:03:47 CET 2008 Jim Meyering <meyering@redhat.com>
|
||||
@ -11617,7 +11617,7 @@ Tue Oct 23 17:30:52 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||
Mon Oct 22 22:33:59 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c src/xen_unified.c src/xen_unified.h
|
||||
src/xend_internal.c src/xml.c src/xml.h: commited erronously
|
||||
src/xend_internal.c src/xml.c src/xml.h: committed erroneously
|
||||
the NUMA patches sent for review on the list in last commit.
|
||||
But that should not affect non NUMA users so early push should
|
||||
not be a problem.
|
||||
@ -12117,7 +12117,7 @@ Mon Aug 13 21:18:48 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
* src/util.h, src/util.c: Allow a file descriptor to be supplied
|
||||
for STDIN when calling virExec(), or if -1, redirect from /dev/null
|
||||
* src/qemu_driver.c, src/openvz_driver.c: Pass in -1 for new stdin
|
||||
parameter above where neccessary. Patch from Jim Paris
|
||||
parameter above where necessary. Patch from Jim Paris
|
||||
|
||||
Mon Aug 13 20:13:48 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
@ -15485,7 +15485,7 @@ Fri Aug 4 20:19:23 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
* src/libvirt.c: Fix off-by-one in validated VCPU number (it is
|
||||
zero based, not one based).
|
||||
* include/libvirt/libvirt.h: Add some convenience macros for
|
||||
calculating neccessary CPU map lengths & total host CPUs
|
||||
calculating necessary CPU map lengths & total host CPUs
|
||||
* src/virsh.c: Add 'vcpuinfo' and 'vcpumap' commands
|
||||
|
||||
Fri Aug 4 14:45:25 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
@ -15708,7 +15708,7 @@ Wed Jun 14 13:10:03 EDT 2006 Daniel Veillard <veillard@redhat.com>
|
||||
Tue Jun 13 14:06:01 EDT 2006 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/virsh.c: use 'double' instead of 'float' when calculating
|
||||
'CPU time' field for dominfo command, to ensure no unneccessary
|
||||
'CPU time' field for dominfo command, to ensure no unnecessary
|
||||
loss of precision converting from nanoseconds to seconds.
|
||||
|
||||
Tue Jun 13 18:35:22 EDT 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
39
HACKING
@ -21,9 +21,46 @@ or:
|
||||
|
||||
git diff > libvirt-myfeature.patch
|
||||
|
||||
However, the usual workflow of libvirt developer is:
|
||||
|
||||
git checkout master
|
||||
git pull
|
||||
git checkout -t origin -b workbranch
|
||||
Hack, committing any changes along the way
|
||||
|
||||
Then, when you want to post your patches:
|
||||
|
||||
git pull --rebase
|
||||
(fix any conflicts)
|
||||
git send-email --cover-letter --no-chain-reply-to --annotate --to=libvir-list@redhat.com master
|
||||
|
||||
For a single patch you can omit "--cover-letter", but series of a two or more
|
||||
patches needs a cover letter. If you get tired of typing
|
||||
"--to=libvir-list@redhat.com" designation you can set it in git config:
|
||||
|
||||
git config sendemail.to libvir-list@redhat.com
|
||||
|
||||
Please follow this as close as you can, especially the rebase and git
|
||||
send-email part, as it makes life easier for other developers to review your
|
||||
patch set. One should avoid sending patches as attachments, but rather send
|
||||
them in email body along with commit message. If a developer is sending
|
||||
another version of the patch (e.g. to address review comments), he is advised
|
||||
to note differences to previous versions after the "---" line in the patch so
|
||||
that it helps reviewers but doesn't become part of git history. Moreover, such
|
||||
patch needs to be prefixed correctly with "--subject-prefix=PATCHv2" appended
|
||||
to "git send-email" (substitute "v2" with the correct version if needed
|
||||
though).
|
||||
|
||||
|
||||
|
||||
(3) Split large changes into a series of smaller patches, self-contained if
|
||||
possible, with an explanation of each patch and an explanation of how the
|
||||
sequence of patches fits together.
|
||||
sequence of patches fits together. Moreover, please keep in mind that it's
|
||||
required to be able to compile cleanly after each patch. A feature does not
|
||||
have to work until the end of a series, as long as intermediate patches don't
|
||||
cause test-suite failures.
|
||||
|
||||
|
||||
|
||||
(4) Make sure your patches apply against libvirt GIT. Developers only follow GIT
|
||||
and don't care much about released versions.
|
||||
|
@ -20,7 +20,7 @@ XML_EXAMPLES = \
|
||||
EXTRA_DIST = \
|
||||
ChangeLog-old \
|
||||
libvirt.spec libvirt.spec.in \
|
||||
mingw32-libvirt.spec.in \
|
||||
mingw-libvirt.spec.in \
|
||||
libvirt.pc.in \
|
||||
autobuild.sh \
|
||||
Makefile.nonreentrant \
|
||||
|
50
autobuild.sh
@ -20,7 +20,7 @@ cd build
|
||||
../autogen.sh --prefix="$AUTOBUILD_INSTALL_ROOT" \
|
||||
--enable-test-coverage \
|
||||
--disable-nls \
|
||||
--enable-compile-warnings=error
|
||||
--enable-werror
|
||||
|
||||
# If the MAKEFLAGS envvar does not yet include a -j option,
|
||||
# add -jN where N depends on the number of processors.
|
||||
@ -50,44 +50,64 @@ test -x /usr/bin/lcov && make cov
|
||||
rm -f *.tar.gz
|
||||
make dist
|
||||
|
||||
if [ -n "$AUTOBUILD_COUNTER" ]; then
|
||||
if test -n "$AUTOBUILD_COUNTER" ; then
|
||||
EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
|
||||
else
|
||||
NOW=`date +"%s"`
|
||||
EXTRA_RELEASE=".$USER$NOW"
|
||||
fi
|
||||
|
||||
if [ -f /usr/bin/rpmbuild ]; then
|
||||
if test -f /usr/bin/rpmbuild ; then
|
||||
rpmbuild --nodeps \
|
||||
--define "extra_release $EXTRA_RELEASE" \
|
||||
--define "_sourcedir `pwd`" \
|
||||
-ba --clean libvirt.spec
|
||||
fi
|
||||
|
||||
# Test mingw cross-compile
|
||||
if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then
|
||||
# Test mingw32 cross-compile
|
||||
if test -x /usr/bin/i686-w64-mingw32-gcc ; then
|
||||
make distclean
|
||||
|
||||
PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig" \
|
||||
CC="i686-pc-mingw32-gcc" \
|
||||
PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
|
||||
CC="i686-w64-mingw32-gcc" \
|
||||
../configure \
|
||||
--build=$(uname -m)-pc-linux \
|
||||
--host=i686-pc-mingw32 \
|
||||
--prefix="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw" \
|
||||
--enable-compile-warnings=error \
|
||||
--build=$(uname -m)-w64-linux \
|
||||
--host=i686-w64-mingw32 \
|
||||
--prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
|
||||
--enable-werror \
|
||||
--without-libvirtd \
|
||||
--without-python
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
#set -o pipefail
|
||||
#make check 2>&1 | tee "$RESULTS"
|
||||
fi
|
||||
|
||||
if [ -f /usr/bin/rpmbuild ]; then
|
||||
# Test mingw64 cross-compile
|
||||
if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
|
||||
make distclean
|
||||
|
||||
PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
|
||||
CC="x86_64-w64-mingw32-gcc" \
|
||||
../configure \
|
||||
--build=$(uname -m)-w64-linux \
|
||||
--host=x86_64-w64-mingw32 \
|
||||
--prefix="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw" \
|
||||
--enable-werror \
|
||||
--without-libvirtd \
|
||||
--without-python
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test -x /usr/bin/i686-w64-mingw32-gcc && test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
|
||||
if test -f /usr/bin/rpmbuild ; then
|
||||
rpmbuild --nodeps \
|
||||
--define "extra_release $EXTRA_RELEASE" \
|
||||
--define "_sourcedir `pwd`" \
|
||||
-ba --clean mingw32-libvirt.spec
|
||||
-ba --clean mingw-libvirt.spec
|
||||
fi
|
||||
fi
|
||||
|
@ -19,6 +19,7 @@ if test "x$1" = "x--no-git"; then
|
||||
no_git=" $1"
|
||||
shift
|
||||
fi
|
||||
if test -z "$NOCONFIGURE" ; then
|
||||
if test "x$1" = "x--system"; then
|
||||
shift
|
||||
prefix=/usr
|
||||
@ -36,6 +37,7 @@ else
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
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.
|
||||
@ -70,6 +72,8 @@ if test -d .git; then
|
||||
fi
|
||||
fi
|
||||
|
||||
test -n "$NOCONFIGURE" && exit 0
|
||||
|
||||
cd "$THEDIR"
|
||||
|
||||
if test "x$OBJ_DIR" != x; then
|
||||
@ -77,7 +81,7 @@ if test "x$OBJ_DIR" != x; then
|
||||
cd "$OBJ_DIR"
|
||||
fi
|
||||
|
||||
if test -z "$*" && test -f config.status; then
|
||||
if test -z "$*" && test -z "$EXTRA_ARGS" && test -f config.status; then
|
||||
./config.status --recheck
|
||||
else
|
||||
$srcdir/configure $EXTRA_ARGS "$@"
|
||||
|
453
bootstrap
@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2011-08-11.17; # UTC
|
||||
scriptversion=2012-07-19.14; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2011 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2012 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
|
||||
@ -36,12 +36,12 @@ nl='
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
# Ensure that CDPATH is not set. Otherwise, the output from cd
|
||||
# would cause trouble in at least one use below.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
|
||||
local_gl_dir=gl
|
||||
|
||||
# Temporary directory names.
|
||||
bt='._bootmp'
|
||||
bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
|
||||
bt2=${bt}2
|
||||
me=$0
|
||||
|
||||
usage() {
|
||||
@ -77,6 +77,33 @@ Running without arguments will suffice in most cases.
|
||||
EOF
|
||||
}
|
||||
|
||||
# warnf_ FORMAT-STRING ARG1...
|
||||
warnf_ ()
|
||||
{
|
||||
warnf_format_=$1
|
||||
shift
|
||||
nl='
|
||||
'
|
||||
case $* in
|
||||
*$nl*) me_=$(printf "$me"|tr "$nl|" '??')
|
||||
printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
|
||||
*) printf "$me: $warnf_format_" "$@" ;;
|
||||
esac >&2
|
||||
}
|
||||
|
||||
# warn_ WORD1...
|
||||
warn_ ()
|
||||
{
|
||||
# If IFS does not start with ' ', set it and emit the warning in a subshell.
|
||||
case $IFS in
|
||||
' '*) warnf_ '%s\n' "$*";;
|
||||
*) (IFS=' '; warn_ "$@");;
|
||||
esac
|
||||
}
|
||||
|
||||
# die WORD1...
|
||||
die() { warn_ "$@"; exit 1; }
|
||||
|
||||
# Configuration.
|
||||
|
||||
# Name of the Makefile.am
|
||||
@ -88,9 +115,12 @@ gnulib_modules=
|
||||
# Any gnulib files needed that are not in modules.
|
||||
gnulib_files=
|
||||
|
||||
# A function to be called to edit gnulib.mk right after it's created.
|
||||
: ${AUTOPOINT=autopoint}
|
||||
: ${AUTORECONF=autoreconf}
|
||||
|
||||
# A function to be called right after gnulib-tool is run.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
gnulib_mk_hook() { :; }
|
||||
bootstrap_post_import_hook() { :; }
|
||||
|
||||
# A function to be called after everything else in this script.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
@ -105,6 +135,11 @@ po_download_command_format=\
|
||||
"rsync --delete --exclude '*.s1' -Lrtvz \
|
||||
'translationproject.org::tp/latest/%s/' '%s'"
|
||||
|
||||
# Fallback for downloading .po files (if rsync fails).
|
||||
po_download_command_format2=\
|
||||
"wget --mirror -nd -q -np -A.po -P '%s' \
|
||||
http://translationproject.org/latest/%s/"
|
||||
|
||||
extract_package_name='
|
||||
/^AC_INIT(/{
|
||||
/.*,.*,.*, */{
|
||||
@ -122,7 +157,8 @@ extract_package_name='
|
||||
p
|
||||
}
|
||||
'
|
||||
package=`sed -n "$extract_package_name" configure.ac` || exit
|
||||
package=$(sed -n "$extract_package_name" configure.ac) \
|
||||
|| die 'cannot find package name in configure.ac'
|
||||
gnulib_name=lib$package
|
||||
|
||||
build_aux=build-aux
|
||||
@ -178,6 +214,8 @@ use_git=true
|
||||
# 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.
|
||||
#
|
||||
# FIXME: code duplication, see also gnu-web-doc-update.
|
||||
find_tool ()
|
||||
{
|
||||
find_tool_envvar=$1
|
||||
@ -195,19 +233,15 @@ find_tool ()
|
||||
else
|
||||
find_tool_error_prefix="\$$find_tool_envvar: "
|
||||
fi
|
||||
if test x"$find_tool_res" = x; then
|
||||
echo >&2 "$me: one of these is required: $find_tool_names"
|
||||
exit 1
|
||||
fi
|
||||
($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
|
||||
echo >&2 "$me: ${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||
exit 1
|
||||
}
|
||||
test x"$find_tool_res" != x \
|
||||
|| die "one of these is required: $find_tool_names"
|
||||
($find_tool_res --version </dev/null) >/dev/null 2>&1 \
|
||||
|| die "${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||
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 sha1sum, named gsha1sum on MacPorts, and shasum on Mac OS X 10.6.
|
||||
find_tool SHA1SUM sha1sum gsha1sum shasum
|
||||
|
||||
# Override the default configuration, if necessary.
|
||||
@ -222,7 +256,6 @@ esac
|
||||
test -z "${gnulib_extra_files}" && \
|
||||
gnulib_extra_files="
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
@ -248,7 +281,7 @@ do
|
||||
usage
|
||||
exit;;
|
||||
--gnulib-srcdir=*)
|
||||
GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
|
||||
GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
|
||||
--skip-po)
|
||||
SKIP_PO=t;;
|
||||
--force)
|
||||
@ -262,21 +295,15 @@ do
|
||||
--no-git)
|
||||
use_git=false;;
|
||||
*)
|
||||
echo >&2 "$0: $option: unknown option"
|
||||
exit 1;;
|
||||
die "$option: unknown option";;
|
||||
esac
|
||||
done
|
||||
|
||||
if $use_git || test -d "$GNULIB_SRCDIR"; then
|
||||
:
|
||||
else
|
||||
echo "$0: Error: --no-git requires --gnulib-srcdir" >&2
|
||||
exit 1
|
||||
fi
|
||||
$use_git || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: --no-git requires --gnulib-srcdir"
|
||||
|
||||
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
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
# Ensure that lines starting with ! sort last, per gitignore conventions
|
||||
@ -299,10 +326,10 @@ insert_sorted_if_absent() {
|
||||
file=$1
|
||||
str=$2
|
||||
test -f $file || touch $file
|
||||
echo "$str" | sort_patterns - $file | cmp - $file > /dev/null \
|
||||
echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \
|
||||
|| { echo "$str" | sort_patterns - $file > $file.bak \
|
||||
&& mv $file.bak $file; } \
|
||||
|| exit 1
|
||||
|| die "insert_sorted_if_absent $file $str: failed"
|
||||
}
|
||||
|
||||
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
|
||||
@ -312,10 +339,10 @@ insert_vc_ignore() {
|
||||
pattern="$2"
|
||||
case $vc_ignore_file in
|
||||
*.gitignore)
|
||||
# A .gitignore entry that does not start with `/' applies
|
||||
# recursively to subdirectories, so prepend `/' to every
|
||||
# A .gitignore entry that does not start with '/' applies
|
||||
# recursively to subdirectories, so prepend '/' to every
|
||||
# .gitignore entry.
|
||||
pattern=`echo "$pattern" | sed s,^,/,`;;
|
||||
pattern=$(echo "$pattern" | sed s,^,/,);;
|
||||
esac
|
||||
insert_sorted_if_absent "$vc_ignore_file" "$pattern"
|
||||
}
|
||||
@ -326,11 +353,8 @@ 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
|
||||
test $found_aux_dir = yes \
|
||||
|| die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
|
||||
|
||||
# If $build_aux doesn't exist, create it now, otherwise some bits
|
||||
# below will malfunction. If creating it, also mark it as ignored.
|
||||
@ -419,31 +443,48 @@ check_versions() {
|
||||
$use_git || continue
|
||||
fi
|
||||
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||
appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
|
||||
appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_')
|
||||
test "$appvar" = TAR && appvar=AMTAR
|
||||
case $appvar in
|
||||
GZIP) ;; # Do not use $GZIP: it contains gzip options.
|
||||
*) eval "app=\${$appvar-$app}" ;;
|
||||
esac
|
||||
|
||||
# Handle the still-experimental Automake-NG programs specially.
|
||||
# They remain named as the mainstream Automake programs ("automake",
|
||||
# and "aclocal") to avoid gratuitous incompatibilities with
|
||||
# pre-existing usages (by, say, autoreconf, or custom autogen.sh
|
||||
# scripts), but correctly identify themselves (as being part of
|
||||
# "GNU automake-ng") when asked their version.
|
||||
case $app in
|
||||
automake-ng|aclocal-ng)
|
||||
app=${app%-ng}
|
||||
($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
|
||||
warn_ "Error: '$app' not found or not from Automake-NG"
|
||||
ret=1
|
||||
continue
|
||||
} ;;
|
||||
esac
|
||||
if [ "$req_ver" = "-" ]; then
|
||||
# Merely require app to exist; not all prereq apps are well-behaved
|
||||
# so we have to rely on $? rather than get_version.
|
||||
$app --version >/dev/null 2>&1
|
||||
if [ 126 -le $? ]; then
|
||||
echo "$me: Error: '$app' not found" >&2
|
||||
warn_ "Error: '$app' not found"
|
||||
ret=1
|
||||
fi
|
||||
else
|
||||
# Require app to produce a new enough version string.
|
||||
inst_ver=$(get_version $app)
|
||||
if [ ! "$inst_ver" ]; then
|
||||
echo "$me: Error: '$app' not found" >&2
|
||||
warn_ "Error: '$app' not found"
|
||||
ret=1
|
||||
else
|
||||
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||
echo "$me: Error: '$app' version == $inst_ver is too old" >&2
|
||||
echo " '$app' version >= $req_ver is required" >&2
|
||||
warnf_ '%s\n' \
|
||||
"Error: '$app' version == $inst_ver is too old" \
|
||||
" '$app' version >= $req_ver is required"
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
@ -473,14 +514,37 @@ if test $use_libtool = 1; then
|
||||
find_tool LIBTOOLIZE glibtoolize libtoolize
|
||||
fi
|
||||
|
||||
# gnulib-tool requires at least automake and autoconf.
|
||||
# If either is not listed, add it (with minimum version) as a prerequisite.
|
||||
case $buildreq in
|
||||
*automake*) ;;
|
||||
*) buildreq="automake 1.9
|
||||
$buildreq" ;;
|
||||
esac
|
||||
case $buildreq in
|
||||
*autoconf*) ;;
|
||||
*) buildreq="autoconf 2.59
|
||||
$buildreq" ;;
|
||||
esac
|
||||
|
||||
# When we can deduce that gnulib-tool will require patch,
|
||||
# and when patch is not already listed as a prerequisite, add it, too.
|
||||
if test -d "$local_gl_dir" \
|
||||
&& ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
|
||||
case $buildreq in
|
||||
*patch*) ;;
|
||||
*) buildreq="patch -
|
||||
$buildreq" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ! printf "$buildreq" | check_versions; then
|
||||
echo >&2
|
||||
if test -f README-prereq; then
|
||||
echo "$0: See README-prereq for how to get the prerequisite programs" >&2
|
||||
die "See README-prereq for how to get the prerequisite programs"
|
||||
else
|
||||
echo "$0: Please install the prerequisite programs" >&2
|
||||
die "Please install the prerequisite programs"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||
@ -509,7 +573,7 @@ git_modules_config () {
|
||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||
}
|
||||
|
||||
gnulib_path=`git_modules_config submodule.gnulib.path`
|
||||
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||
|
||||
# Get gnulib files.
|
||||
@ -574,7 +638,7 @@ if $bootstrap_sync; then
|
||||
fi
|
||||
|
||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
<$gnulib_tool || exit
|
||||
<$gnulib_tool || exit $?
|
||||
|
||||
# Get translations.
|
||||
|
||||
@ -582,7 +646,10 @@ download_po_files() {
|
||||
subdir=$1
|
||||
domain=$2
|
||||
echo "$me: getting translations into $subdir for $domain..."
|
||||
cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
|
||||
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
|
||||
eval "$cmd" && return
|
||||
# Fallback to HTTP.
|
||||
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
|
||||
eval "$cmd"
|
||||
}
|
||||
|
||||
@ -605,7 +672,7 @@ update_po_files() {
|
||||
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
||||
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
|
||||
|
||||
langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
|
||||
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
|
||||
@ -642,18 +709,18 @@ symlink_to_dir()
|
||||
|
||||
# If the destination directory doesn't exist, create it.
|
||||
# This is required at least for "lib/uniwidth/cjk.h".
|
||||
dst_dir=`dirname "$dst"`
|
||||
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"`
|
||||
parent=$(dirname "$dst_dir")
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_vc_ignore $ig `echo "$dst_dir"|sed 's,.*/,,'`
|
||||
insert_vc_ignore $ig "${dst_dir##*/}"
|
||||
done
|
||||
fi
|
||||
|
||||
@ -677,10 +744,10 @@ symlink_to_dir()
|
||||
# so that broken tools aren't confused into skipping needed builds. See
|
||||
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
|
||||
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 &&
|
||||
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" &&
|
||||
both_ls=`ls -dt "$src" "$dst"` &&
|
||||
both_ls=$(ls -dt "$src" "$dst") &&
|
||||
test "X$both_ls" = "X$dst$nl$src" || {
|
||||
dot_dots=
|
||||
case $src in
|
||||
@ -688,8 +755,7 @@ symlink_to_dir()
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$me: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
die "invalid symlink calculation: $src -> $dst";;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
@ -703,151 +769,94 @@ symlink_to_dir()
|
||||
}
|
||||
}
|
||||
|
||||
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 "$me: 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 "$me: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
version_controlled_file() {
|
||||
dir=$1
|
||||
parent=$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
|
||||
if test -d .git; then
|
||||
git rm -n "$file" > /dev/null 2>&1
|
||||
elif test -d .svn; then
|
||||
svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
svn log -r HEAD "$file" > /dev/null 2>&1
|
||||
elif test -d CVS; then
|
||||
grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
|
||||
grep '^/[^/]*/[0-9]' > /dev/null
|
||||
else
|
||||
echo "$me: no version control for $dir/$file?" >&2
|
||||
warn_ "no version control for $file?"
|
||||
false
|
||||
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;;
|
||||
# FIXME: should all file names starting with "." be ignored?
|
||||
.*) continue;;
|
||||
# NOTE: we have to be careful to run both autopoint and libtoolize
|
||||
# before gnulib-tool, since gnulib-tool is likely to provide newer
|
||||
# versions of files "installed" by these two programs.
|
||||
# Then, *after* gnulib-tool (see below), we have to be careful to
|
||||
# run autoreconf in such a way that it does not run either of these
|
||||
# two just-pre-run programs.
|
||||
|
||||
# Import from gettext.
|
||||
with_gettext=yes
|
||||
grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
||||
with_gettext=no
|
||||
|
||||
if test $with_gettext = yes || test $use_libtool = 1; then
|
||||
|
||||
tempbase=.bootstrap$$
|
||||
trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
|
||||
|
||||
> $tempbase.0 > $tempbase.1 &&
|
||||
find . ! -type d -print | sort > $tempbase.0 || exit
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
# Released autopoint has the tendency to install macros that have been
|
||||
# obsoleted in current gnulib, so run this before gnulib-tool.
|
||||
echo "$0: $AUTOPOINT --force"
|
||||
$AUTOPOINT --force || exit
|
||||
fi
|
||||
|
||||
# Autoreconf runs aclocal before libtoolize, which causes spurious
|
||||
# warnings if the initial aclocal is confused by the libtoolized
|
||||
# (or worse out-of-date) macro directory.
|
||||
# libtoolize 1.9b added the --install option; but we support back
|
||||
# to libtoolize 1.5.22, where the install action was default.
|
||||
if test $use_libtool = 1; then
|
||||
install=
|
||||
case $($LIBTOOLIZE --help) in
|
||||
*--install*) install=--install ;;
|
||||
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 "$me: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk &&
|
||||
gnulib_mk_hook $dir/$gnulib_mk
|
||||
}
|
||||
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$me: $dir/$file overrides $1/$dir/$file"
|
||||
else
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
cp_mark_as_generated $1/$dir/$file $dir/$file
|
||||
fi || exit
|
||||
done
|
||||
echo "running: $LIBTOOLIZE $install --copy"
|
||||
$LIBTOOLIZE $install --copy
|
||||
fi
|
||||
|
||||
find . ! -type d -print | sort >$tempbase.1
|
||||
old_IFS=$IFS
|
||||
IFS=$nl
|
||||
for file in $(comm -13 $tempbase.0 $tempbase.1); do
|
||||
IFS=$old_IFS
|
||||
parent=${file%/*}
|
||||
version_controlled_file "$parent" "$file" || {
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$dir/$dot_ig
|
||||
if test -n "$copied"; then
|
||||
insert_vc_ignore $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_vc_ignore $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_vc_ignore $ig "$f"
|
||||
fi
|
||||
done
|
||||
ig=$parent/$dot_ig
|
||||
insert_vc_ignore "$ig" "${file##*/}"
|
||||
done
|
||||
}
|
||||
done
|
||||
IFS=$old_IFS
|
||||
|
||||
|
||||
# Create boot temporary directories to import from gnulib and gettext.
|
||||
rm -fr $bt $bt2 &&
|
||||
mkdir $bt $bt2 || exit
|
||||
rm -f $tempbase.0 $tempbase.1
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
|
||||
# Import from gnulib.
|
||||
|
||||
gnulib_tool_options="\
|
||||
--import\
|
||||
--no-changelog\
|
||||
--aux-dir $bt/$build_aux\
|
||||
--doc-base $bt/$doc_base\
|
||||
--aux-dir $build_aux\
|
||||
--doc-base $doc_base\
|
||||
--lib $gnulib_name\
|
||||
--m4-base $bt/$m4_base/\
|
||||
--source-base $bt/$source_base/\
|
||||
--tests-base $bt/$tests_base\
|
||||
--m4-base $m4_base/\
|
||||
--source-base $source_base/\
|
||||
--tests-base $tests_base\
|
||||
--local-dir $local_gl_dir\
|
||||
$gnulib_tool_option_extras\
|
||||
"
|
||||
@ -859,25 +868,14 @@ if test $use_libtool = 1; then
|
||||
fi
|
||||
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
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file \
|
||||
|| die "failed to symlink $file"
|
||||
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
|
||||
bootstrap_post_import_hook \
|
||||
|| die "bootstrap_post_import_hook failed"
|
||||
|
||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||
@ -891,37 +889,31 @@ 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_base' $ACLOCAL_FLAGS" \
|
||||
"${AUTOCONF-autoconf} --force" \
|
||||
"${AUTOHEADER-autoheader} --force" \
|
||||
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||
do
|
||||
if test "$command" = libtool; then
|
||||
test $use_libtool = 0 \
|
||||
&& continue
|
||||
command="${LIBTOOLIZE-libtoolize} -c -f"
|
||||
fi
|
||||
echo "$0: $command ..."
|
||||
eval "$command" || exit
|
||||
done
|
||||
# Some systems (RHEL 5) are using ancient autotools, for which the
|
||||
# --no-recursive option had not been invented. Detect that lack and
|
||||
# omit the option when it's not supported. FIXME in 2017: remove this
|
||||
# hack when RHEL 5 autotools are updated, or when they become irrelevant.
|
||||
no_recursive=
|
||||
case $($AUTORECONF --help) in
|
||||
*--no-recursive*) no_recursive=--no-recursive;;
|
||||
esac
|
||||
|
||||
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
|
||||
echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
|
||||
"$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
|
||||
AUTOPOINT=true LIBTOOLIZE=true \
|
||||
$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
|
||||
|| die "autoreconf failed"
|
||||
|
||||
# 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/\(.*\)'`;;
|
||||
build-aux/*) dst=$build_aux/${file#build-aux/};;
|
||||
*) dst=$file;;
|
||||
esac
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file $dst \
|
||||
|| die "failed to symlink $file"
|
||||
done
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
@ -937,7 +929,19 @@ if test $with_gettext = yes; then
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >po/Makevars || exit 1
|
||||
' po/Makevars.template >po/Makevars \
|
||||
|| die 'cannot generate po/Makevars'
|
||||
|
||||
# If the 'gettext' module is in use, grab the latest Makefile.in.in.
|
||||
# If only the 'gettext-h' module is in use, assume autopoint already
|
||||
# put the correct version of this file into place.
|
||||
case $gnulib_modules in
|
||||
*gettext-h*) ;;
|
||||
*gettext*)
|
||||
cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \
|
||||
|| die "cannot create po/Makefile.in.in"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -d runtime-po; then
|
||||
# Similarly for runtime-po/Makevars, but not quite the same.
|
||||
@ -951,7 +955,8 @@ if test $with_gettext = yes; then
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >runtime-po/Makevars || exit 1
|
||||
' po/Makevars.template >runtime-po/Makevars \
|
||||
|| die 'cannot generate runtime-po/Makevars'
|
||||
|
||||
# Copy identical files from po to runtime-po.
|
||||
(cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
# Copyright (C) 2010-2012 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
|
||||
@ -13,9 +13,8 @@
|
||||
# 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
|
||||
|
||||
# License along with this library; if not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules='
|
||||
@ -23,6 +22,7 @@ accept
|
||||
areadlink
|
||||
base64
|
||||
bind
|
||||
bitrotate
|
||||
byteswap
|
||||
c-ctype
|
||||
c-strcase
|
||||
@ -59,8 +59,11 @@ ignore-value
|
||||
inet_pton
|
||||
intprops
|
||||
ioctl
|
||||
isatty
|
||||
largefile
|
||||
ldexp
|
||||
listen
|
||||
localeconv
|
||||
maintainer-makefile
|
||||
manywarnings
|
||||
mkstemp
|
||||
@ -79,6 +82,7 @@ posix-shell
|
||||
pthread
|
||||
pthread_sigmask
|
||||
recv
|
||||
regex
|
||||
random_r
|
||||
sched
|
||||
send
|
||||
@ -87,6 +91,7 @@ sigaction
|
||||
sigpipe
|
||||
snprintf
|
||||
socket
|
||||
stat-time
|
||||
stdarg
|
||||
stpcpy
|
||||
strchrnul
|
||||
@ -171,7 +176,9 @@ tests_base=gnulib/tests
|
||||
gnulib_tool_option_extras="\
|
||||
--lgpl=2\
|
||||
--with-tests\
|
||||
--makefile-name=gnulib.mk\
|
||||
--avoid=pt_chown\
|
||||
--avoid=lock-tests\
|
||||
"
|
||||
local_gl_dir=gnulib/local
|
||||
|
||||
@ -218,7 +225,6 @@ touch ChangeLog || exit 1
|
||||
# Override bootstrap's list - we don't use mdate-sh or texinfo.tex.
|
||||
gnulib_extra_files="
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
|
71
build-aux/augeas-gentest.pl
Executable file
@ -0,0 +1,71 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# augeas-gentest.pl: Generate an augeas test file, from an
|
||||
# example config file + test file template
|
||||
#
|
||||
# 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 library 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
|
||||
# Lesser 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, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
die "syntax: $0 CONFIG TEMPLATE AUGTEST\n" unless @ARGV == 3;
|
||||
|
||||
my $config = shift @ARGV;
|
||||
my $template = shift @ARGV;
|
||||
my $augtest = shift @ARGV;
|
||||
|
||||
open AUGTEST, ">", $augtest or die "cannot create $augtest: $!";
|
||||
|
||||
$SIG{__DIE__} = sub {
|
||||
unlink $augtest;
|
||||
};
|
||||
|
||||
open CONFIG, "<", $config or die "cannot read $config: $!";
|
||||
open TEMPLATE, "<", $template or die "cannot read $template: $!";
|
||||
|
||||
my $group = 0;
|
||||
while (<TEMPLATE>) {
|
||||
if (/::CONFIG::/) {
|
||||
my $group = 0;
|
||||
print AUGTEST " let conf = \"";
|
||||
while (<CONFIG>) {
|
||||
if (/^#\w/) {
|
||||
s/^#//;
|
||||
s/\"/\\\"/g;
|
||||
print AUGTEST $_;
|
||||
$group = /\[\s$/;
|
||||
} elsif ($group) {
|
||||
s/\"/\\\"/g;
|
||||
if (/#\s*\]/) {
|
||||
$group = 0;
|
||||
}
|
||||
if (/^#/) {
|
||||
s/^#//;
|
||||
print AUGTEST $_;
|
||||
}
|
||||
}
|
||||
}
|
||||
print AUGTEST "\"\n";
|
||||
} else {
|
||||
print AUGTEST $_;
|
||||
}
|
||||
}
|
||||
|
||||
close TEMPLATE;
|
||||
close CONFIG;
|
||||
close AUGTEST or die "cannot save $augtest: $!";
|
259
cfg.mk
@ -1,5 +1,5 @@
|
||||
# Customize Makefile.maint. -*- makefile -*-
|
||||
# Copyright (C) 2008-2011 Red Hat, Inc.
|
||||
# Copyright (C) 2008-2012 Red Hat, Inc.
|
||||
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@ -13,7 +13,8 @@
|
||||
# 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/>.
|
||||
# along with this program. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Use alpha.gnu.org for alpha and beta releases.
|
||||
# Use ftp.gnu.org for major releases.
|
||||
@ -76,6 +77,17 @@ local-checks-to-skip = \
|
||||
sc_makefile_check \
|
||||
sc_useless_cpp_parens
|
||||
|
||||
# Most developers don't run 'make distcheck'. We want the official
|
||||
# dist to be secure, but don't want to penalize other developers
|
||||
# using a distro that has not yet picked up the automake fix.
|
||||
# FIXME remove this ifeq (making the syntax check unconditional)
|
||||
# once fixed automake (1.11.6 or 1.12.2+) is more common.
|
||||
ifeq ($(filter dist%, $(MAKECMDGOALS)), )
|
||||
local-checks-to-skip += sc_vulnerable_makefile_CVE-2012-3386
|
||||
else
|
||||
distdir: sc_vulnerable_makefile_CVE-2012-3386.z
|
||||
endif
|
||||
|
||||
# Files that should never cause syntax check failures.
|
||||
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
|
||||
(^(HACKING|docs/(news\.html\.in|.*\.patch))|\.po)$$
|
||||
@ -133,20 +145,9 @@ useless_free_options = \
|
||||
--name=virJSONValueFree \
|
||||
--name=virLastErrFreeData \
|
||||
--name=virNetMessageFree \
|
||||
--name=virNetClientFree \
|
||||
--name=virNetClientProgramFree \
|
||||
--name=virNetClientStreamFree \
|
||||
--name=virNetServerFree \
|
||||
--name=virNetServerClientFree \
|
||||
--name=virNetServerMDNSFree \
|
||||
--name=virNetServerMDNSEntryFree \
|
||||
--name=virNetServerMDNSGroupFree \
|
||||
--name=virNetServerProgramFree \
|
||||
--name=virNetServerServiceFree \
|
||||
--name=virNetSocketFree \
|
||||
--name=virNetSASLContextFree \
|
||||
--name=virNetSASLSessionFree \
|
||||
--name=virNetTLSSessionFree \
|
||||
--name=virNWFilterDefFree \
|
||||
--name=virNWFilterEntryFree \
|
||||
--name=virNWFilterHashTableFree \
|
||||
@ -159,6 +160,8 @@ useless_free_options = \
|
||||
--name=virNetworkObjFree \
|
||||
--name=virNodeDeviceDefFree \
|
||||
--name=virNodeDeviceObjFree \
|
||||
--name=virObjectUnref \
|
||||
--name=virObjectFreeCallback \
|
||||
--name=virSecretDefFree \
|
||||
--name=virStorageEncryptionFree \
|
||||
--name=virStorageEncryptionSecretFree \
|
||||
@ -171,6 +174,7 @@ useless_free_options = \
|
||||
--name=xmlBufferFree \
|
||||
--name=xmlFree \
|
||||
--name=xmlFreeDoc \
|
||||
--name=xmlFreeNode \
|
||||
--name=xmlXPathFreeContext \
|
||||
--name=xmlXPathFreeObject
|
||||
|
||||
@ -315,6 +319,12 @@ sc_prohibit_internal_functions:
|
||||
halt='use VIR_ macros instead of internal functions' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Avoid raw malloc and free, except in documentation comments.
|
||||
sc_prohibit_raw_allocation:
|
||||
@prohibit='^.[^*].*\<((m|c|re)alloc|free) *\([^)]' \
|
||||
halt='use VIR_ macros from memory.h instead of malloc/free' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Avoid functions that can lead to double-close bugs.
|
||||
sc_prohibit_close:
|
||||
@prohibit='([^>.]|^)\<[fp]?close *\(' \
|
||||
@ -339,12 +349,23 @@ sc_prohibit_access_xok:
|
||||
|
||||
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
|
||||
# Use STREQLEN or STRPREFIX rather than comparing strncmp == 0, or != 0.
|
||||
snp_ = strncmp *\(.+\)
|
||||
sc_prohibit_strncmp:
|
||||
@grep -nE '! *str''ncmp *\(|\<str''ncmp *\(.+\) *[!=]=' \
|
||||
$$($(VC_LIST_EXCEPT)) \
|
||||
| grep -vE ':# *define STR(N?EQLEN|PREFIX)\(' && \
|
||||
{ echo '$(ME): use STREQLEN or STRPREFIX instead of str''ncmp' \
|
||||
1>&2; exit 1; } || :
|
||||
@prohibit='! *strncmp *\(|\<$(snp_) *[!=]=|[!=]= *$(snp_)' \
|
||||
exclude=':# *define STR(N?EQLEN|PREFIX)\(' \
|
||||
halt='$(ME): use STREQLEN or STRPREFIX instead of str''ncmp' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# strtol and friends are too easy to misuse
|
||||
sc_prohibit_strtol:
|
||||
@prohibit='\bstrto(u?ll?|[ui]max) *\(' \
|
||||
exclude='exempt from syntax-check' \
|
||||
halt='$(ME): use virStrToLong_*, not strtol variants' \
|
||||
$(_sc_search_regexp)
|
||||
@prohibit='\bstrto[df] *\(' \
|
||||
exclude='exempt from syntax-check' \
|
||||
halt='$(ME): use virStrToDouble, not strtod variants' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use virAsprintf rather than as'printf since *strp is undefined on error.
|
||||
sc_prohibit_asprintf:
|
||||
@ -365,11 +386,6 @@ sc_prohibit_sprintf:
|
||||
halt='use snprintf, not s'printf \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_strncpy:
|
||||
@prohibit='strncpy *\(' \
|
||||
halt='use virStrncpy, not strncpy' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_readlink:
|
||||
@prohibit='readlink *\(' \
|
||||
halt='use virFileResolveLink, not readlink' \
|
||||
@ -390,6 +406,11 @@ sc_prohibit_VIR_ERR_NO_MEMORY:
|
||||
halt='use virReportOOMError, not V'IR_ERR_NO_MEMORY \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_PATH_MAX:
|
||||
@prohibit='\<P''ATH_MAX\>' \
|
||||
halt='dynamically allocate paths, do not use P'ATH_MAX \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use a subshell for each function, to give the optimal warning message.
|
||||
include $(srcdir)/Makefile.nonreentrant
|
||||
sc_prohibit_nonreentrant:
|
||||
@ -409,14 +430,26 @@ sc_prohibit_ctype_h:
|
||||
halt="don't use ctype.h; instead, use c-ctype.h" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Insist on correct types for [pug]id.
|
||||
sc_correct_id_types:
|
||||
@prohibit='\<(int|long) *[pug]id\>' \
|
||||
halt="use pid_t for pid, uid_t for uid, gid_t for gid" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Forbid sizeof foo or sizeof (foo), require sizeof(foo)
|
||||
sc_size_of_brackets:
|
||||
@prohibit='sizeof\s' \
|
||||
halt='use sizeof(foo), not sizeof (foo) or sizeof foo' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Ensure that no C source file, docs, 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.
|
||||
space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py)|(daemon|tools)/.*\.in)
|
||||
space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py|pl|syms)|(daemon|tools)/.*\.in)
|
||||
sc_TAB_in_indentation:
|
||||
@prohibit='^ * ' \
|
||||
in_vc_files='$(space_indent_files)$$' \
|
||||
halt='indent with space, not TAB, in C, sh, html, py, and RNG schemas' \
|
||||
halt='indent with space, not TAB, in C, sh, html, py, syms and RNG schemas' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
|
||||
@ -450,6 +483,18 @@ sc_prohibit_xmlGetProp:
|
||||
halt='use virXMLPropString, not xmlGetProp' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# xml(ParseURI|SaveUri) doesn't handle IPv6 URIs well
|
||||
sc_prohibit_xmlURI:
|
||||
@prohibit='\<xml(ParseURI|SaveUri) *\(' \
|
||||
halt='use virURI(Parse|Format), not xml(ParseURI|SaveUri)' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# we don't want old old-style return with parentheses around argument
|
||||
sc_prohibit_return_as_function:
|
||||
@prohibit='\<return *\(([^()]*(\([^()]*\)[^()]*)*)\) *;' \
|
||||
halt='avoid extra () with return statements' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# ATTRIBUTE_UNUSED should only be applied in implementations, not
|
||||
# header declarations
|
||||
sc_avoid_attribute_unused_in_header:
|
||||
@ -464,46 +509,12 @@ sc_avoid_attribute_unused_in_header:
|
||||
# |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 += ESX_ERROR
|
||||
msg_gen_function += ESX_VI_ERROR
|
||||
msg_gen_function += HYPERV_ERROR
|
||||
msg_gen_function += PHYP_ERROR
|
||||
msg_gen_function += VIR_ERROR
|
||||
msg_gen_function += VMX_ERROR
|
||||
msg_gen_function += XENXS_ERROR
|
||||
msg_gen_function += eventReportError
|
||||
msg_gen_function += ifaceError
|
||||
msg_gen_function += interfaceReportError
|
||||
msg_gen_function += iptablesError
|
||||
msg_gen_function += lxcError
|
||||
msg_gen_function += libxlError
|
||||
msg_gen_function += macvtapError
|
||||
msg_gen_function += networkReportError
|
||||
msg_gen_function += nodeReportError
|
||||
msg_gen_function += openvzError
|
||||
msg_gen_function += pciReportError
|
||||
msg_gen_function += qemuReportError
|
||||
msg_gen_function += qemudDispatchClientFailure
|
||||
msg_gen_function += regerror
|
||||
msg_gen_function += remoteError
|
||||
msg_gen_function += remoteDispatchFormatError
|
||||
msg_gen_function += statsError
|
||||
msg_gen_function += streamsReportError
|
||||
msg_gen_function += usbReportError
|
||||
msg_gen_function += umlReportError
|
||||
msg_gen_function += vah_error
|
||||
msg_gen_function += vah_warning
|
||||
msg_gen_function += vboxError
|
||||
msg_gen_function += virCommandError
|
||||
msg_gen_function += virConfError
|
||||
msg_gen_function += virCPUReportError
|
||||
msg_gen_function += virEventError
|
||||
msg_gen_function += virDomainReportError
|
||||
msg_gen_function += virGenericReportError
|
||||
msg_gen_function += virHashError
|
||||
msg_gen_function += virHookReportError
|
||||
msg_gen_function += virInterfaceReportError
|
||||
msg_gen_function += virJSONError
|
||||
msg_gen_function += virLibConnError
|
||||
msg_gen_function += virLibDomainError
|
||||
msg_gen_function += virLibDomainSnapshotError
|
||||
@ -514,39 +525,21 @@ msg_gen_function += virLibNWFilterError
|
||||
msg_gen_function += virLibSecretError
|
||||
msg_gen_function += virLibStoragePoolError
|
||||
msg_gen_function += virLibStorageVolError
|
||||
msg_gen_function += virNetworkReportError
|
||||
msg_gen_function += virNodeDeviceReportError
|
||||
msg_gen_function += virNWFilterReportError
|
||||
msg_gen_function += virRaiseError
|
||||
msg_gen_function += virReportError
|
||||
msg_gen_function += virReportErrorHelper
|
||||
msg_gen_function += virReportSystemError
|
||||
msg_gen_function += virSecretReportError
|
||||
msg_gen_function += virSecurityReportError
|
||||
msg_gen_function += virSexprError
|
||||
msg_gen_function += virSmbiosReportError
|
||||
msg_gen_function += virSocketError
|
||||
msg_gen_function += virStatsError
|
||||
msg_gen_function += virStorageReportError
|
||||
msg_gen_function += virUtilError
|
||||
msg_gen_function += virXMLError
|
||||
msg_gen_function += virXenInotifyError
|
||||
msg_gen_function += virXenStoreError
|
||||
msg_gen_function += virXendError
|
||||
msg_gen_function += vmwareError
|
||||
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 += fprintf
|
||||
# msg_gen_function += testError
|
||||
# msg_gen_function += virXenError
|
||||
# msg_gen_function += vshPrint
|
||||
# msg_gen_function += vshError
|
||||
|
||||
func_or := $(shell printf '$(msg_gen_function)'|tr -s '[[:space:]]' '|')
|
||||
func_or := $(shell echo $(msg_gen_function)|tr -s ' ' '|')
|
||||
func_re := ($(func_or))
|
||||
|
||||
# Look for diagnostics that aren't marked for translation.
|
||||
@ -555,14 +548,13 @@ func_re := ($(func_or))
|
||||
# _("...: "
|
||||
# "%s", _("no storage vol w..."
|
||||
sc_libvirt_unmarked_diagnostics:
|
||||
@grep -nE \
|
||||
'\<$(func_re) *\([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -v '_''(' && \
|
||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
@prohibit='\<$(func_re) *\([^"]*"[^"]*[a-z]{3}' \
|
||||
exclude='_\(' \
|
||||
halt='$(ME): found unmarked diagnostic(s)' \
|
||||
$(_sc_search_regexp)
|
||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||
grep -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||
| sed 's/_("[^"][^"]*"//;s/[ ]"%s"//' \
|
||||
| sed 's/_("\([^\"]\|\\.\)\+"//;s/[ ]"%s"//' \
|
||||
| grep '[ ]"' && \
|
||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
@ -581,6 +573,30 @@ sc_prohibit_newline_at_end_of_diagnostic:
|
||||
&& { echo '$(ME): newline at end of message(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Look for diagnostics that lack a % in the format string, except that we
|
||||
# allow VIR_ERROR to do this, and ignore functions that take a single
|
||||
# string rather than a format argument.
|
||||
sc_prohibit_diagnostic_without_format:
|
||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||
grep -A2 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||
| sed -rn -e ':l; /[,"]$$/ {N;b l;}' \
|
||||
-e '/(xenapiSessionErrorHandler|vah_(error|warning))/d' \
|
||||
-e '/\<$(func_re) *\([^"]*"([^%"]|"\n[^"]*")*"[,)]/p' \
|
||||
| grep -vE 'VIR_ERROR' && \
|
||||
{ echo '$(ME): found diagnostic without %' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# The strings "" and "%s" should never be marked for translation.
|
||||
# Files under tests/ and examples/ should not be translated.
|
||||
sc_prohibit_useless_translation:
|
||||
@prohibit='_\("(%s)?"\)' \
|
||||
halt='found useless translation' \
|
||||
$(_sc_search_regexp)
|
||||
@prohibit='\<N?_ *\(' \
|
||||
in_vc_files='^(tests|examples)/' \
|
||||
halt='no translations in tests or examples' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Enforce recommended preprocessor indentation style.
|
||||
sc_preprocessor_indentation:
|
||||
@if cppi --version >/dev/null 2>&1; then \
|
||||
@ -603,6 +619,13 @@ sc_copyright_format:
|
||||
halt='spell Red Hat as two words' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Prefer the new URL listing over the old street address listing when
|
||||
# calling out where to get a copy of the [L]GPL.
|
||||
sc_copyright_address:
|
||||
@prohibit=Boston,' MA' \
|
||||
halt='Point to <http://www.gnu.org/licenses/>, not an address' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Some functions/macros produce messages intended solely for developers
|
||||
# and maintainers. Do not mark them for translation.
|
||||
sc_prohibit_gettext_markup:
|
||||
@ -610,6 +633,37 @@ sc_prohibit_gettext_markup:
|
||||
halt='do not mark these strings for translation' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Our code is divided into modular subdirectories for a reason, and
|
||||
# lower-level code must not include higher-level headers.
|
||||
cross_dirs=$(patsubst $(srcdir)/src/%.,%,$(wildcard $(srcdir)/src/*/.))
|
||||
cross_dirs_re=($(subst / ,/|,$(cross_dirs)))
|
||||
sc_prohibit_cross_inclusion:
|
||||
@for dir in $(cross_dirs); do \
|
||||
case $$dir in \
|
||||
util/) safe="util";; \
|
||||
cpu/ | locking/ | network/ | rpc/ | security/) \
|
||||
safe="($$dir|util|conf)";; \
|
||||
xenapi/ | xenxs/ ) safe="($$dir|util|conf|xen)";; \
|
||||
*) safe="($$dir|util|conf|cpu|network|locking|rpc|security)";; \
|
||||
esac; \
|
||||
in_vc_files="^src/$$dir" \
|
||||
prohibit='^# *include .$(cross_dirs_re)' \
|
||||
exclude="# *include .$$safe" \
|
||||
halt='unsafe cross-directory include' \
|
||||
$(_sc_search_regexp) \
|
||||
done
|
||||
|
||||
# When converting an enum to a string, make sure that we track any new
|
||||
# elements added to the enum by using a _LAST marker.
|
||||
sc_require_enum_last_marker:
|
||||
@grep -A1 -nE '^[^#]*VIR_ENUM_IMPL *\(' $$($(VC_LIST_EXCEPT)) \
|
||||
| sed -ne '/VIR_ENUM_IMPL[^,]*,$$/N' \
|
||||
-e '/VIR_ENUM_IMPL[^,]*,[^,]*[^_,][^L,][^A,][^S,][^T,],/p' \
|
||||
-e '/VIR_ENUM_IMPL[^,]*,[^,]\{0,4\},/p' \
|
||||
| grep . && \
|
||||
{ echo '$(ME): enum impl needs to use _LAST marker' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# We don't use this feature of maint.mk.
|
||||
prev_version_file = /dev/null
|
||||
|
||||
@ -678,7 +732,7 @@ $(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protoco
|
||||
$(MAKE) -C src remote/remote_client_bodies.h
|
||||
|
||||
# List all syntax-check exemptions:
|
||||
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.c$$
|
||||
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.h$$
|
||||
|
||||
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(command|util)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller
|
||||
exclude_file_name_regexp--sc_avoid_write = \
|
||||
@ -686,7 +740,10 @@ exclude_file_name_regexp--sc_avoid_write = \
|
||||
|
||||
exclude_file_name_regexp--sc_bindtextdomain = ^(tests|examples)/
|
||||
|
||||
exclude_file_name_regexp--sc_flags_usage = ^docs/
|
||||
exclude_file_name_regexp--sc_copyright_address = \
|
||||
^COPYING\.LIB$$
|
||||
|
||||
exclude_file_name_regexp--sc_flags_usage = ^(docs/|src/util/virnetdevtap\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
|
||||
^src/rpc/gendispatch\.pl$$
|
||||
@ -708,7 +765,7 @@ exclude_file_name_regexp--sc_prohibit_close = \
|
||||
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c)$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
|
||||
(^tests/qemuhelpdata/|\.(gif|ico|png)$$)
|
||||
(^tests/(qemuhelp|nodeinfo)data/|\.(gif|ico|png|diff)$$)
|
||||
|
||||
_src2=src/(util/command|libvirt|lxc/lxc_controller)
|
||||
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
|
||||
@ -725,23 +782,37 @@ exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic = \
|
||||
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
|
||||
^((po|tests)/|docs/.*py$$|tools/(virsh|console)\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_readlink = ^src/util/util\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
|
||||
^(src/util/memory\.[ch]|examples/.*)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_readlink = \
|
||||
^src/(util/util|lxc/lxc_container)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/util\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_sprintf = \
|
||||
^(docs/hacking\.html\.in)|(examples/systemtap/.*stp)|(src/dtrace2systemtap\.pl)|(src/rpc/gensystemtap\.pl)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_strncpy = \
|
||||
^(src/util/util|tools/virsh)\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/util\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_strtol = \
|
||||
^src/(util/sexpr|(vbox|xen|xenxs)/.*)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/xml\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_require_config_h = ^examples/
|
||||
exclude_file_name_regexp--sc_prohibit_xmlURI = ^src/util/viruri\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_require_config_h_first = ^examples/
|
||||
exclude_file_name_regexp--sc_prohibit_return_as_function = \.py$$
|
||||
|
||||
exclude_file_name_regexp--sc_trailing_blank = \.(fig|gif|ico|png)$$
|
||||
_virsh_includes=(edit|domain-monitor|domain|volume|pool|network|interface|nwfilter|secret|snapshot|host|nodedev)
|
||||
exclude_file_name_regexp--sc_require_config_h = ^(examples/|tools/virsh-$(_virsh_includes)\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_require_config_h_first = ^(examples/|tools/virsh-$(_virsh_includes)\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_trailing_blank = \
|
||||
(/qemuhelpdata/|\.(fig|gif|ico|png)$$)
|
||||
|
||||
exclude_file_name_regexp--sc_unmarked_diagnostics = \
|
||||
^(docs/apibuild.py|tests/virt-aa-helper-test)$$
|
||||
|
||||
exclude_file_name_regexp--sc_size_of_brackets = cfg.mk
|
||||
|
566
configure.ac
@ -1,15 +1,15 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl Copyright (C) 2005-2011 Red Hat, Inc.
|
||||
dnl Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
dnl See COPYING.LIB for the License of this software
|
||||
|
||||
AC_INIT([libvirt], [0.9.8], [libvir-list@redhat.com], [], [http://libvirt.org])
|
||||
AC_INIT([libvirt], [0.10.0], [libvir-list@redhat.com], [], [http://libvirt.org])
|
||||
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])
|
||||
AM_INIT_AUTOMAKE([-Wno-portability tar-ustar])
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
# Maintainer note - comment this line out if you plan to rerun
|
||||
@ -23,16 +23,55 @@ AM_SILENT_RULES([yes])
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# First extract pieces from the version number string
|
||||
LIBVIRT_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'`
|
||||
LIBVIRT_MINOR_VERSION=`echo $VERSION | awk -F. '{print $2}'`
|
||||
LIBVIRT_MICRO_VERSION=`echo $VERSION | awk -F. '{print $3}'`
|
||||
LIBVIRT_VERSION=$LIBVIRT_MAJOR_VERSION.$LIBVIRT_MINOR_VERSION.$LIBVIRT_MICRO_VERSION$LIBVIRT_MICRO_VERSION_SUFFIX
|
||||
LIBVIRT_VERSION_INFO=`expr $LIBVIRT_MAJOR_VERSION + $LIBVIRT_MINOR_VERSION`:$LIBVIRT_MICRO_VERSION:$LIBVIRT_MINOR_VERSION
|
||||
LIBVIRT_VERSION_NUMBER=`expr $LIBVIRT_MAJOR_VERSION \* 1000000 + $LIBVIRT_MINOR_VERSION \* 1000 + $LIBVIRT_MICRO_VERSION`
|
||||
|
||||
# In libtool terminology we need to figure out:
|
||||
#
|
||||
# CURRENT
|
||||
# The most recent interface number that this library implements.
|
||||
#
|
||||
# REVISION
|
||||
# The implementation number of the CURRENT interface.
|
||||
#
|
||||
# AGE
|
||||
# The difference between the newest and oldest interfaces that this
|
||||
# library implements.
|
||||
#
|
||||
# In other words, the library implements all the interface numbers
|
||||
# in the range from number `CURRENT - AGE' to `CURRENT'.
|
||||
#
|
||||
# Libtool assigns the soname version from `CURRENT - AGE', and we
|
||||
# don't want that to ever change in libvirt. ie it must always be
|
||||
# zero, to produce libvirt.so.0.
|
||||
#
|
||||
# We would, however, like the libvirt version number reflected
|
||||
# in the so version'd symlinks, and this is based on AGE.REVISION
|
||||
# eg libvirt.so.0.AGE.REVISION
|
||||
#
|
||||
# Assuming we do ever want to break soname version, this can
|
||||
# toggled. But seriously, don't ever touch this.
|
||||
LIBVIRT_SONUM=0
|
||||
|
||||
# The following examples show what libtool will do
|
||||
#
|
||||
# Input: 0.9.14 -> libvirt.so.0.9.14
|
||||
# Input: 1.0.0 -> libvirt.so.0.1000.0
|
||||
# Input: 2.5.8 -> libvirt.so.0.2005.8
|
||||
#
|
||||
AGE=`expr $LIBVIRT_MAJOR_VERSION '*' 1000 + $LIBVIRT_MINOR_VERSION`
|
||||
REVISION=$LIBVIRT_MICRO_VERSION
|
||||
CURRENT=`expr $LIBVIRT_SONUM + $AGE`
|
||||
LIBVIRT_VERSION_INFO=$CURRENT:$REVISION:$AGE
|
||||
|
||||
AC_SUBST([LIBVIRT_MAJOR_VERSION])
|
||||
AC_SUBST([LIBVIRT_MINOR_VERSION])
|
||||
AC_SUBST([LIBVIRT_MICRO_VERSION])
|
||||
AC_SUBST([LIBVIRT_SONUM])
|
||||
AC_SUBST([LIBVIRT_VERSION])
|
||||
AC_SUBST([LIBVIRT_VERSION_INFO])
|
||||
AC_SUBST([LIBVIRT_VERSION_NUMBER])
|
||||
@ -73,23 +112,20 @@ OPENWSMAN_REQUIRED="2.2.3"
|
||||
LIBPCAP_REQUIRED="1.0.0"
|
||||
LIBNL_REQUIRED="1.1"
|
||||
LIBSSH2_REQUIRED="1.0"
|
||||
LIBSSH2_TRANSPORT_REQUIRED="1.3"
|
||||
LIBBLKID_REQUIRED="2.17"
|
||||
DBUS_REQUIRED="1.0.0"
|
||||
|
||||
dnl Checks for C compiler.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CPP
|
||||
AM_PROG_CC_STDC
|
||||
|
||||
gl_EARLY
|
||||
gl_INIT
|
||||
|
||||
AC_TYPE_UID_T
|
||||
|
||||
dnl Make sure we have an ANSI compiler
|
||||
AM_C_PROTOTYPES
|
||||
test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
|
||||
|
||||
dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
|
||||
@ -110,7 +146,7 @@ VERSION_SCRIPT_FLAGS=-Wl,--version-script=
|
||||
VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
|
||||
AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS])
|
||||
|
||||
LIBVIRT_COMPILE_WARNINGS([maximum])
|
||||
LIBVIRT_COMPILE_WARNINGS
|
||||
|
||||
AC_MSG_CHECKING([for CPUID instruction])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
@ -136,8 +172,8 @@ AC_CHECK_SIZEOF([long])
|
||||
dnl Availability of various common functions (non-fatal if missing),
|
||||
dnl and various less common threadsafe functions
|
||||
AC_CHECK_FUNCS_ONCE([cfmakeraw geteuid getgid getgrnam_r getmntent_r \
|
||||
getpwuid_r getuid initgroups kill mmap posix_fallocate posix_memalign \
|
||||
regexec sched_getaffinity])
|
||||
getpwuid_r getuid initgroups kill mmap newlocale posix_fallocate \
|
||||
posix_memalign regexec sched_getaffinity])
|
||||
|
||||
dnl Availability of pthread functions (if missing, win32 threading is
|
||||
dnl assumed). Because of $LIB_PTHREAD, we cannot use AC_CHECK_FUNCS_ONCE.
|
||||
@ -161,7 +197,64 @@ dnl Availability of various common headers (non-fatal if missing).
|
||||
AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/un.h \
|
||||
sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \
|
||||
sys/un.h sys/syscall.h netinet/tcp.h ifaddrs.h libtasn1.h \
|
||||
net/if.h])
|
||||
net/if.h execinfo.h])
|
||||
|
||||
dnl We need to decide at configure time if libvirt will use real atomic
|
||||
dnl operations ("lock free") or emulated ones with a mutex.
|
||||
|
||||
dnl Note that the atomic ops are only available with GCC on x86 when
|
||||
dnl using -march=i486 or higher. If we detect that the atomic ops are
|
||||
dnl not available but would be available given the right flags, we want
|
||||
dnl to abort and advise the user to fix their CFLAGS. It's better to do
|
||||
dnl that then to silently fall back on emulated atomic ops just because
|
||||
dnl the user had the wrong build environment.
|
||||
|
||||
atomic_ops=
|
||||
|
||||
AC_MSG_CHECKING([for atomic ops implementation])
|
||||
|
||||
AC_TRY_COMPILE([], [__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;],[
|
||||
atomic_ops=gcc
|
||||
],[])
|
||||
|
||||
if test "$atomic_ops" = "" ; then
|
||||
SAVE_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="-march=i486"
|
||||
AC_TRY_COMPILE([],
|
||||
[__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;],
|
||||
[AC_MSG_ERROR([Libvirt must be built with -march=i486 or later.])],
|
||||
[])
|
||||
CFLAGS="${SAVE_CFLAGS}"
|
||||
|
||||
case "$host" in
|
||||
*-*-mingw* | *-*-msvc* )
|
||||
atomic_ops=win32
|
||||
;;
|
||||
*)
|
||||
if test "$ac_cv_header_pthread_h" = "yes" ; then
|
||||
atomic_ops=pthread
|
||||
else
|
||||
AC_MSG_ERROR([Libvirt must be built with GCC or have pthread.h on non-Win32 platforms])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$atomic_ops" in
|
||||
gcc)
|
||||
AC_DEFINE([VIR_ATOMIC_OPS_GCC],[1],[Use GCC atomic ops])
|
||||
;;
|
||||
win32)
|
||||
AC_DEFINE([VIR_ATOMIC_OPS_WIN32],[1],[Use Win32 atomic ops])
|
||||
;;
|
||||
pthread)
|
||||
AC_DEFINE([VIR_ATOMIC_OPS_PTHREAD],[1],[Use pthread atomic ops emulation])
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL([WITH_ATOMIC_OPS_PTHREAD],[test "$atomic_ops" = "pthread"])
|
||||
AC_MSG_RESULT([$atomic_ops])
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING([for struct ifreq in net/if.h])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
@ -215,7 +308,11 @@ AC_PATH_PROG([UDEVADM], [udevadm], [],
|
||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||
AC_PATH_PROG([UDEVSETTLE], [udevsettle], [],
|
||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||
AC_PATH_PROG([MODPROBE], [modprobe], [],
|
||||
AC_PATH_PROG([MODPROBE], [modprobe], [modprobe],
|
||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||
AC_PATH_PROG([OVSVSCTL], [ovs-vsctl], [ovs-vsctl],
|
||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||
AC_PATH_PROG([SCRUB], [scrub], [scrub],
|
||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||
|
||||
AC_DEFINE_UNQUOTED([DNSMASQ],["$DNSMASQ"],
|
||||
@ -224,6 +321,9 @@ AC_DEFINE_UNQUOTED([RADVD],["$RADVD"],
|
||||
[Location or name of the radvd program])
|
||||
AC_DEFINE_UNQUOTED([TC],["$TC"],
|
||||
[Location or name of the tc profram (see iproute2)])
|
||||
AC_DEFINE_UNQUOTED([OVSVSCTL],["$OVSVSCTL"],
|
||||
[Location or name of the ovs-vsctl program])
|
||||
|
||||
if test -n "$UDEVADM"; then
|
||||
AC_DEFINE_UNQUOTED([UDEVADM],["$UDEVADM"],
|
||||
[Location or name of the udevadm program])
|
||||
@ -236,6 +336,8 @@ if test -n "$MODPROBE"; then
|
||||
AC_DEFINE_UNQUOTED([MODPROBE],["$MODPROBE"],
|
||||
[Location or name of the modprobe program])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([SCRUB],["$SCRUB"],
|
||||
[Location or name of the scrub program (for wiping algorithms)])
|
||||
|
||||
dnl Specific dir for HTML output ?
|
||||
AC_ARG_WITH([html-dir], [AC_HELP_STRING([--with-html-dir=path],
|
||||
@ -325,12 +427,22 @@ AC_ARG_WITH([esx],
|
||||
AC_HELP_STRING([--with-esx], [add ESX support @<:@default=check@:>@]),[],[with_esx=check])
|
||||
AC_ARG_WITH([hyperv],
|
||||
AC_HELP_STRING([--with-hyperv], [add Hyper-V support @<:@default=check@:>@]),[],[with_hyperv=check])
|
||||
AC_ARG_WITH([parallels],
|
||||
AC_HELP_STRING([--with-parallels], [add Parallels Cloud Server support @<:@default=check@:>@]),[],[with_parallels=check])
|
||||
AC_ARG_WITH([test],
|
||||
AC_HELP_STRING([--with-test], [add test driver support @<:@default=yes@:>@]),[],[with_test=yes])
|
||||
AC_ARG_WITH([remote],
|
||||
AC_HELP_STRING([--with-remote], [add remote driver support @<:@default=yes@:>@]),[],[with_remote=yes])
|
||||
AC_ARG_WITH([libvirtd],
|
||||
AC_HELP_STRING([--with-libvirtd], [add libvirtd support @<:@default=yes@:>@]),[],[with_libvirtd=yes])
|
||||
AC_ARG_WITH([console-lock-files],
|
||||
AC_HELP_STRING([--with-console-lock-files],
|
||||
[location for UUCP style lock files for console PTYs
|
||||
(use auto for default paths on some platforms)
|
||||
@<:@default=auto@:>@]),
|
||||
[],[with_console_lock_files=auto])
|
||||
AC_ARG_WITH([libssh2_transport],
|
||||
AC_HELP_STRING([--with-libssh2_transport], [libssh2 location @<:@default=check@:>@]),[],[with_libssh2_transport=check])
|
||||
|
||||
dnl
|
||||
dnl in case someone want to build static binaries
|
||||
@ -357,7 +469,7 @@ AC_MSG_CHECKING([for init script flavor])
|
||||
AC_ARG_WITH([init-script],
|
||||
[AC_HELP_STRING([--with-init-script@<:@=STYLE@:>@],
|
||||
[Style of init script to install: redhat, systemd, systemd+redhat,
|
||||
upstart, auto, none @<:@default=auto@:>@])],[],[with_init_script=check])
|
||||
upstart, check, none @<:@default=check@:>@])],[],[with_init_script=check])
|
||||
init_redhat=no
|
||||
init_systemd=no
|
||||
init_upstart=no
|
||||
@ -392,6 +504,31 @@ AM_CONDITIONAL([LIBVIRT_INIT_SCRIPT_UPSTART], test "$init_upstart" = "yes")
|
||||
AM_CONDITIONAL([LIBVIRT_INIT_SCRIPT_SYSTEMD], test "$init_systemd" = "yes")
|
||||
AC_MSG_RESULT($with_init_script)
|
||||
|
||||
|
||||
AC_MSG_CHECKING([for whether to install sysctl config])
|
||||
AC_ARG_WITH([sysctl],
|
||||
[AC_HELP_STRING([--with-sysctl@<:@=yes/no@:>@],
|
||||
[Whether to install sysctl configs @<:@default=check@:>@])],
|
||||
[],[with_sysctl=check])
|
||||
|
||||
if test "$with_sysctl" = "yes" || test "$with_sysctl" = "check"
|
||||
then
|
||||
case $host in
|
||||
*-*-linux*)
|
||||
with_sysctl=yes
|
||||
;;
|
||||
**)
|
||||
if test "$with_sysctl" = "yes"; then
|
||||
AC_MSG_ERROR([No sysctl configuration supported for $host])
|
||||
else
|
||||
with_sysctl=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_SYSCTL], test "$with_sysctl" = "yes")
|
||||
AC_MSG_RESULT($with_sysctl)
|
||||
|
||||
dnl RHEL-5 has a peculiar version of Xen, which requires some special casing
|
||||
AC_ARG_WITH([rhel5-api],
|
||||
[AC_HELP_STRING([--with-rhel5-api=@<:@ARG@:>@],
|
||||
@ -518,12 +655,6 @@ AC_DEFINE_UNQUOTED([VBOX_XPCOMC_DIR], ["$vbox_xpcomc_dir"],
|
||||
[Location of directory containing VirtualBox XPCOMC library])
|
||||
|
||||
if test "x$with_vbox" = "xyes"; then
|
||||
case "$host" in
|
||||
*-*-mingw* | *-*-msvc*) MSCOM_LIBS="-lole32 -loleaut32" ;;
|
||||
*) MSCOM_LIBS= ;;
|
||||
esac
|
||||
AC_SUBST([MSCOM_LIBS])
|
||||
|
||||
AC_DEFINE_UNQUOTED([WITH_VBOX], 1, [whether VirtualBox driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_VBOX], [test "$with_vbox" = "yes"])
|
||||
@ -738,16 +869,20 @@ if test "$with_lxc" = "yes" || test "$with_lxc" = "check"; then
|
||||
AC_TRY_LINK([
|
||||
#include <sched.h>
|
||||
#include <linux/loop.h>
|
||||
#include <sys/epoll.h>
|
||||
], [
|
||||
unshare (!LO_FLAGS_AUTOCLEAR);
|
||||
unshare (!(LO_FLAGS_AUTOCLEAR + EPOLL_CLOEXEC));
|
||||
], [
|
||||
with_lxc=yes
|
||||
AC_DEFINE([HAVE_DECL_LO_FLAGS_AUTOCLEAR], [1],
|
||||
[Define to 1 if you have the declaration of `LO_FLAGS_AUTOCLEAR',
|
||||
and to 0 if you don't.])
|
||||
], [
|
||||
if test "$with_lxc" = "check"; then
|
||||
with_lxc=no
|
||||
AC_MSG_NOTICE([Function unshare() not present in <sched.h> header but required for LXC driver, disabling it])
|
||||
AC_MSG_NOTICE([Required kernel features were not found, disabling LXC])
|
||||
else
|
||||
AC_MSG_ERROR([Function unshare() not present in <sched.h> header, but required for LXC driver])
|
||||
AC_MSG_ERROR([Required kernel features for LXC were not found])
|
||||
fi
|
||||
])
|
||||
fi
|
||||
@ -756,6 +891,26 @@ if test "$with_lxc" = "yes" ; then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
|
||||
|
||||
dnl
|
||||
dnl Checks for the Parallels driver
|
||||
dnl
|
||||
|
||||
if test "$with_parallels" = "check"; then
|
||||
with_parallels=$with_linux
|
||||
if test ! $host_cpu = 'x86_64'; then
|
||||
with_parallels=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_parallels" = "yes" && test "$with_linux" = "no"; then
|
||||
AC_MSG_ERROR([The Parallels driver can be enabled on Linux only.])
|
||||
fi
|
||||
|
||||
if test "$with_parallels" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_PARALLELS], 1, [whether Parallels driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_PARALLELS], [test "$with_parallels" = "yes"])
|
||||
|
||||
dnl
|
||||
dnl check for shell that understands <> redirection without truncation,
|
||||
dnl needed by src/qemu/qemu_monitor_{text,json}.c.
|
||||
@ -960,6 +1115,27 @@ AC_ARG_WITH([yajl],
|
||||
[],
|
||||
[with_yajl=check])
|
||||
|
||||
if test "$with_qemu:$with_yajl" = yes:check; then
|
||||
dnl Some versions of qemu require the use of yajl; try to detect them
|
||||
dnl here, although we do not require qemu to exist in order to compile.
|
||||
dnl This check mirrors src/qemu/qemu_capabilities.c
|
||||
AC_PATH_PROGS([QEMU], [qemu-kvm qemu kvm qemu-system-x86_64],
|
||||
[], [$PATH:/usr/bin:/usr/libexec])
|
||||
if test -x "$QEMU"; then
|
||||
if `$QEMU -help | grep libvirt` >/dev/null; then
|
||||
with_yajl=yes
|
||||
else
|
||||
[qemu_version_sed='s/.*ersion \([0-9.,]*\).*/\1/']
|
||||
qemu_version=`$QEMU -version | sed "$qemu_version_sed"`
|
||||
case $qemu_version in
|
||||
[[1-9]].* | 0.15.* ) with_yajl=yes ;;
|
||||
0.* | '' ) ;;
|
||||
*) AC_MSG_ERROR([Unexpected qemu version string]) ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
YAJL_CFLAGS=
|
||||
YAJL_LIBS=
|
||||
with_yajl2=no
|
||||
@ -1062,6 +1238,37 @@ AC_SUBST([SANLOCK_CFLAGS])
|
||||
AC_SUBST([SANLOCK_LIBS])
|
||||
|
||||
|
||||
dnl DBus library
|
||||
DBUS_CFLAGS=
|
||||
DBUS_LIBS=
|
||||
AC_ARG_WITH([dbus],
|
||||
AC_HELP_STRING([--with-dbus], [enable communication with DBus @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_dbus=check])
|
||||
if test "$with_dbus" = "yes" || test "$with_dbus" = "check" ; then
|
||||
PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED,
|
||||
[with_dbus=yes], [
|
||||
if test "$with_dbus" = "check" ; then
|
||||
with_dbus=no
|
||||
else
|
||||
AC_MSG_ERROR([You must install DBus >= $DBUS_REQUIRED to compile libvirt])
|
||||
fi])
|
||||
fi
|
||||
|
||||
if test "$with_dbus" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_DBUS], 1, [enable communication with DBus])
|
||||
|
||||
save_LIBS="$LIBS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
LIBS="$LIBS $DBUS_LIBS"
|
||||
CFLAGS="$CFLAGS $DBUS_CFLAGS"
|
||||
AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_DBUS], [test "$have_dbus" = "yes"])
|
||||
|
||||
|
||||
dnl PolicyKit library
|
||||
POLKIT_CFLAGS=
|
||||
POLKIT_LIBS=
|
||||
@ -1072,7 +1279,6 @@ AC_ARG_WITH([polkit],
|
||||
[with_polkit=check])
|
||||
|
||||
with_polkit0=no
|
||||
with_dbus=no
|
||||
with_polkit1=no
|
||||
if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
|
||||
dnl Check for new polkit first - just a binary
|
||||
@ -1101,8 +1307,6 @@ if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
|
||||
[use PolicyKit for UNIX socket access checks])
|
||||
AC_DEFINE_UNQUOTED([HAVE_POLKIT0], 1,
|
||||
[use PolicyKit for UNIX socket access checks])
|
||||
AC_DEFINE_UNQUOTED([HAVE_DBUS], 1,
|
||||
[use DBus for PolicyKit])
|
||||
|
||||
old_CFLAGS=$CFLAGS
|
||||
old_LIBS=$LIBS
|
||||
@ -1117,17 +1321,31 @@ if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
|
||||
AC_DEFINE_UNQUOTED([POLKIT_AUTH],["$POLKIT_AUTH"],[Location of polkit-auth program])
|
||||
fi
|
||||
with_polkit0="yes"
|
||||
with_dbus="yes"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_POLKIT], [test "x$with_polkit" = "xyes"])
|
||||
AM_CONDITIONAL([HAVE_POLKIT0], [test "x$with_polkit0" = "xyes"])
|
||||
AM_CONDITIONAL([HAVE_DBUS], [test "x$with_dbus" = "xyes"])
|
||||
AM_CONDITIONAL([HAVE_POLKIT1], [test "x$with_polkit1" = "xyes"])
|
||||
AC_SUBST([POLKIT_CFLAGS])
|
||||
AC_SUBST([POLKIT_LIBS])
|
||||
|
||||
dnl firewalld
|
||||
AC_ARG_WITH([firewalld],
|
||||
AC_HELP_STRING([--with-firewalld], [enable firewalld support @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_firewalld=check])
|
||||
if test "x$with_firewalld" = "xcheck" ; then
|
||||
with_firewalld=$with_dbus
|
||||
fi
|
||||
if test "x$with_firewalld" == "xyes" ; then
|
||||
if test "x$with_dbus" != "xyes" ; then
|
||||
AC_MSG_ERROR([You must have dbus enabled for firewalld support])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([HAVE_FIREWALLD], [1], [whether firewalld support is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_FIREWALLD], [test "x$with_firewalld" != "xno"])
|
||||
|
||||
dnl Avahi library
|
||||
AC_ARG_WITH([avahi],
|
||||
AC_HELP_STRING([--with-avahi], [use avahi to advertise remote daemon @<:@default=check@:>@]),
|
||||
@ -1151,7 +1369,6 @@ if test "x$with_avahi" = "xyes" || test "x$with_avahi" = "xcheck"; then
|
||||
[whether Avahi is used to broadcast server presense])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_AVAHI], [test "x$with_avahi" = "xyes"])
|
||||
AC_SUBST([AVAHI_CFLAGS])
|
||||
AC_SUBST([AVAHI_LIBS])
|
||||
|
||||
@ -1200,12 +1417,36 @@ AM_CONDITIONAL([HAVE_AUDIT], [test "$with_audit" = "yes"])
|
||||
AC_SUBST([AUDIT_CFLAGS])
|
||||
AC_SUBST([AUDIT_LIBS])
|
||||
|
||||
dnl UUCP style file locks for PTY consoles
|
||||
if test "$with_console_lock_files" != "no"; then
|
||||
case $with_console_lock_files in
|
||||
yes | auto)
|
||||
dnl Default locations for platforms, or disable if unknown
|
||||
if test "$with_linux" = "yes"; then
|
||||
with_console_lock_files=/var/lock
|
||||
elif test "$with_console_lock_files" = "auto"; then
|
||||
with_console_lock_files=no
|
||||
fi ;;
|
||||
esac
|
||||
if test "$with_console_lock_files" = "yes"; then
|
||||
AC_MSG_ERROR([You must specify path for the lock files on this
|
||||
platform])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([VIR_PTY_LOCK_FILE_PATH], "$with_console_lock_files",
|
||||
[path to directory containing UUCP pty lock files])
|
||||
fi
|
||||
AM_CONDITIONAL([VIR_PTY_LOCK_FILE_PATH], [test "$with_console_lock_files" != "no"])
|
||||
|
||||
|
||||
dnl SELinux
|
||||
AC_ARG_WITH([selinux],
|
||||
AC_HELP_STRING([--with-selinux], [use SELinux to manage security @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_selinux=check])
|
||||
AC_ARG_WITH([selinux_mount],
|
||||
AC_HELP_STRING([--with-selinux-mount], [set SELinux mount point @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_selinux_mount=check])
|
||||
|
||||
SELINUX_CFLAGS=
|
||||
SELINUX_LIBS=
|
||||
@ -1229,7 +1470,20 @@ if test "$with_selinux" != "no"; then
|
||||
LIBS="$old_libs"
|
||||
fi
|
||||
if test "$with_selinux" = "yes"; then
|
||||
AC_MSG_CHECKING([SELinux mount point])
|
||||
if test "$with_selinux_mount" = "check" || test -z "$with_selinux_mount"; then
|
||||
if test -d /sys/fs/selinux ; then
|
||||
SELINUX_MOUNT=/sys/fs/selinux
|
||||
else
|
||||
SELINUX_MOUNT=/selinux
|
||||
fi
|
||||
else
|
||||
SELINUX_MOUNT=$with_selinux_mount
|
||||
fi
|
||||
AC_MSG_RESULT([$SELINUX_MOUNT])
|
||||
|
||||
SELINUX_LIBS="-lselinux"
|
||||
AC_DEFINE_UNQUOTED([SELINUX_MOUNT], ["$SELINUX_MOUNT"], [SELinux mount point])
|
||||
AC_DEFINE_UNQUOTED([HAVE_SELINUX], 1, [whether basic SELinux functionality is available])
|
||||
dnl We prefer to use <selinux/label.h> and selabel_open, but can fall
|
||||
dnl back to matchpathcon for the sake of RHEL 5's version of libselinux.
|
||||
@ -1260,6 +1514,7 @@ else
|
||||
fail=0
|
||||
AC_CHECK_FUNC([selinux_virtual_domain_context_path], [], [fail=1])
|
||||
AC_CHECK_FUNC([selinux_virtual_image_context_path], [], [fail=1])
|
||||
AC_CHECK_FUNCS([selinux_lxc_contexts_path])
|
||||
CFLAGS="$old_cflags"
|
||||
LIBS="$old_libs"
|
||||
|
||||
@ -1372,10 +1627,10 @@ if test "$with_dtrace" != "no" ; then
|
||||
with_dtrace=yes
|
||||
fi
|
||||
if test "$with_dtrace" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_DTRACE], 1, [whether DTrace static probes are available])
|
||||
AC_DEFINE_UNQUOTED([WITH_DTRACE_PROBES], 1, [whether DTrace static probes are available])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_DTRACE], [test "$with_dtrace" != "no"])
|
||||
AM_CONDITIONAL([WITH_DTRACE_PROBES], [test "$with_dtrace" != "no"])
|
||||
|
||||
|
||||
dnl NUMA lib
|
||||
@ -1405,15 +1660,54 @@ if test "$with_qemu" = "yes" && test "$with_numactl" != "no"; then
|
||||
CFLAGS="$old_cflags"
|
||||
LIBS="$old_libs"
|
||||
fi
|
||||
if test "$with_numactl" = "yes"; then
|
||||
NUMACTL_LIBS="-lnuma"
|
||||
AC_DEFINE_UNQUOTED([HAVE_NUMACTL], 1, [whether numactl is available for topology info])
|
||||
|
||||
dnl numad
|
||||
AC_ARG_WITH([numad],
|
||||
AC_HELP_STRING([--with-numad], [use numad to manage CPU placement dynamically @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_numad=check])
|
||||
|
||||
if test "$with_numad" != "no" ; then
|
||||
old_cflags="$CFLAGS"
|
||||
old_libs="$LIBS"
|
||||
fail=0
|
||||
|
||||
AC_PATH_PROG([NUMAD], [numad], [], [/bin:/usr/bin])
|
||||
|
||||
if test "$with_numad" = "check"; then
|
||||
AC_CHECK_HEADER([numa.h], [], [fail=1])
|
||||
AC_CHECK_LIB([numa], [numa_available], [], [fail=1])
|
||||
if test -z "$NUMAD" || test $fail = 1; then
|
||||
with_numad="no"
|
||||
else
|
||||
with_numad="yes"
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_NUMACTL], [test "$with_numactl" != "no"])
|
||||
else
|
||||
test -z "$NUMAD" &&
|
||||
AC_MSG_ERROR([You must install numad package to manage CPU and memory placement dynamically])
|
||||
|
||||
AC_CHECK_HEADER([numa.h], [], [fail=1])
|
||||
AC_CHECK_LIB([numa], [numa_available], [], [fail=1])
|
||||
test $fail = 1 &&
|
||||
AC_MSG_ERROR([You must install the numactl development package in order to compile and run libvirt])
|
||||
fi
|
||||
|
||||
CFLAGS="$old_cflags"
|
||||
LIBS="$old_libs"
|
||||
fi
|
||||
if test "$with_numad" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_NUMAD], 1, [whether numad is available])
|
||||
AC_DEFINE_UNQUOTED([NUMAD],["$NUMAD"], [Location or name of the numad program])
|
||||
fi
|
||||
if test "$with_numactl" = "yes" || test "$with_numad" = "yes"; then
|
||||
NUMACTL_LIBS="-lnuma"
|
||||
AC_DEFINE_UNQUOTED([HAVE_NUMACTL], 1, [whether numactl-devel is available])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_NUMAD], [test "$with_numad" != "no"])
|
||||
AM_CONDITIONAL([HAVE_NUMACTL], [test "$with_numad" != "no" || test "$with_numactl" != "no"])
|
||||
AC_SUBST([NUMACTL_CFLAGS])
|
||||
AC_SUBST([NUMACTL_LIBS])
|
||||
|
||||
|
||||
dnl pcap lib
|
||||
LIBPCAP_CONFIG="pcap-config"
|
||||
LIBPCAP_CFLAGS=""
|
||||
@ -1476,29 +1770,58 @@ AM_CONDITIONAL([WITH_UML], [test "$with_uml" = "yes"])
|
||||
|
||||
|
||||
dnl
|
||||
dnl check for libssh2 (PHYP)
|
||||
dnl check for libssh2 (PHYP and libssh2 transport)
|
||||
dnl
|
||||
|
||||
LIBSSH2_CFLAGS=""
|
||||
LIBSSH2_LIBS=""
|
||||
|
||||
if test "$with_phyp" = "yes" || test "$with_phyp" = "check"; then
|
||||
if test "$with_phyp" = "yes" || test "$with_phyp" = "check" ||
|
||||
test "$with_libssh2_transport" = "yes" || test "$with_libssh2_transport" = "check"; then
|
||||
PKG_CHECK_MODULES([LIBSSH2], [libssh2 >= $LIBSSH2_REQUIRED], [
|
||||
if test "$with_phyp" = "check"; then
|
||||
with_phyp=yes
|
||||
fi
|
||||
if $PKG_CONFIG "libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED"; then
|
||||
if test "$with_libssh2_transport" = "check"; then
|
||||
with_libssh2_transport=yes
|
||||
fi
|
||||
else
|
||||
if test "$with_libssh2_transport" = "check"; then
|
||||
with_libssh2_transport=no
|
||||
AC_MSG_NOTICE([libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED is required for libssh2 transport])
|
||||
fi
|
||||
if test "$with_libssh2_transport" = "yes"; then
|
||||
AC_MSG_ERROR([libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED is required for libssh2 transport])
|
||||
fi
|
||||
fi
|
||||
], [
|
||||
if test "$with_phyp" = "check"; then
|
||||
with_phyp=no
|
||||
AC_MSG_NOTICE([libssh2 is required for Phyp driver, disabling it])
|
||||
else
|
||||
fi
|
||||
if test "$with_phyp" = "yes"; then
|
||||
AC_MSG_ERROR([libssh2 >= $LIBSSH2_REQUIRED is required for Phyp driver])
|
||||
fi
|
||||
if test "$with_libssh2_transport" = "check"; then
|
||||
with_libssh2_transport=no
|
||||
AC_MSG_NOTICE([libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED is required for libssh2 transport])
|
||||
fi
|
||||
if test "$with_libssh2_transport" = "yes"; then
|
||||
AC_MSG_ERROR([libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED is required for libssh2 transport])
|
||||
fi
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$with_phyp" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_PHYP], 1, [whether IBM HMC / IVM driver is enabled])
|
||||
fi
|
||||
if test "$with_libssh2_transport" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_LIBSSH2], 1, [whether libssh2 transport is enabled])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([WITH_PHYP],[test "$with_phyp" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_LIBSSH2], [test "$with_libssh2_transport" = "yes"])
|
||||
|
||||
AC_SUBST([LIBSSH2_CFLAGS])
|
||||
AC_SUBST([LIBSSH2_LIBS])
|
||||
@ -1617,6 +1940,9 @@ AC_ARG_WITH([netcf],
|
||||
|
||||
NETCF_CFLAGS=
|
||||
NETCF_LIBS=
|
||||
if test "$with_libvirtd" = "no" ; then
|
||||
with_netcf=no
|
||||
fi
|
||||
if test "$with_netcf" = "yes" || test "$with_netcf" = "check"; then
|
||||
PKG_CHECK_MODULES(NETCF, netcf >= $NETCF_REQUIRED,
|
||||
[with_netcf=yes], [
|
||||
@ -1668,6 +1994,10 @@ AC_ARG_WITH([storage-mpath],
|
||||
AC_HELP_STRING([--with-storage-mpath], [with mpath backend for the storage driver @<:@default=check@:>@]),[],[with_storage_mpath=check])
|
||||
AC_ARG_WITH([storage-disk],
|
||||
AC_HELP_STRING([--with-storage-disk], [with GPartd Disk backend for the storage driver @<:@default=check@:>@]),[],[with_storage_disk=check])
|
||||
AC_ARG_WITH([storage-rbd],
|
||||
AC_HELP_STRING([--with-storage-rbd], [with RADOS Block Device backend for the storage driver @<:@default=check@:>@]),[],[with_storage_rbd=check])
|
||||
AC_ARG_WITH([storage-sheepdog],
|
||||
AC_HELP_STRING([--with-storage-sheepdog], [with Sheepdog backend for the storage driver @<:@default=check@:>@]),[],[with_storage_sheepdog=check])
|
||||
|
||||
if test "$with_libvirtd" = "no"; then
|
||||
with_storage_dir=no
|
||||
@ -1677,6 +2007,8 @@ if test "$with_libvirtd" = "no"; then
|
||||
with_storage_scsi=no
|
||||
with_storage_mpath=no
|
||||
with_storage_disk=no
|
||||
with_storage_rbd=no
|
||||
with_storage_sheepdog=no
|
||||
fi
|
||||
if test "$with_storage_dir" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_STORAGE_DIR], 1, [whether directory backend for storage driver is enabled])
|
||||
@ -1835,6 +2167,50 @@ if test "$with_storage_mpath" = "check"; then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_STORAGE_MPATH], [test "$with_storage_mpath" = "yes"])
|
||||
|
||||
LIBRBD_LIBS=
|
||||
if test "$with_storage_rbd" = "yes" || test "$with_storage_rbd" = "check"; then
|
||||
AC_CHECK_HEADER([rbd/librbd.h], [LIBRBD_FOUND=yes; break;])
|
||||
|
||||
if test "$LIBRBD_FOUND" = "yes"; then
|
||||
with_storage_rbd=yes
|
||||
LIBRBD_LIBS="-lrbd -lrados"
|
||||
AC_DEFINE_UNQUOTED([WITH_STORAGE_RBD], [1],
|
||||
[whether RBD backend for storage driver is enabled])
|
||||
else
|
||||
with_storage_rbd=no
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_STORAGE_RBD], [test "$with_storage_rbd" = "yes"])
|
||||
AC_SUBST([LIBRBD_LIBS])
|
||||
|
||||
if test "$with_storage_sheepdog" = "yes" ||
|
||||
test "$with_storage_sheepdog" = "check"; then
|
||||
AC_PATH_PROG([COLLIE], [collie], [], [$PATH:/sbin:/usr/sbin])
|
||||
|
||||
if test "$with_storage_sheepdog" = "yes"; then
|
||||
if test -z "$COLLIE"; then
|
||||
AC_MSG_ERROR([We need collie for Sheepdog storage driver])
|
||||
fi
|
||||
else
|
||||
if test -z "$COLLIE"; then
|
||||
with_storage_sheepdog=no
|
||||
fi
|
||||
|
||||
if test "$with_storage_sheepdog" = "check"; then
|
||||
with_storage_sheepdog=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_storage_sheepdog" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_STORAGE_SHEEPDOG], 1,
|
||||
[whether Sheepdog backend for storage driver is enabled])
|
||||
AC_DEFINE_UNQUOTED([COLLIE],["$COLLIE"],[Location of collie program])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_STORAGE_SHEEPDOG],
|
||||
[test "$with_storage_sheepdog" = "yes"])
|
||||
|
||||
|
||||
LIBPARTED_CFLAGS=
|
||||
LIBPARTED_LIBS=
|
||||
if test "$with_storage_disk" = "yes" ||
|
||||
@ -1920,6 +2296,19 @@ fi
|
||||
AC_SUBST([DEVMAPPER_CFLAGS])
|
||||
AC_SUBST([DEVMAPPER_LIBS])
|
||||
|
||||
with_storage=no
|
||||
for backend in dir fs lvm iscsi scsi mpath rbd disk; do
|
||||
if eval test \$with_storage_$backend = yes; then
|
||||
with_storage=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test $with_storage = yes; then
|
||||
AC_DEFINE([WITH_STORAGE], [1],
|
||||
[Define to 1 if at least one storage backend is in use])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_STORAGE], [test "$with_storage" = "yes"])
|
||||
|
||||
dnl
|
||||
dnl check for libcurl (ESX/XenAPI)
|
||||
dnl
|
||||
@ -2087,6 +2476,28 @@ AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"])
|
||||
AC_SUBST([PYTHON_VERSION])
|
||||
AC_SUBST([PYTHON_INCLUDES])
|
||||
|
||||
dnl Allow perl overrides
|
||||
AC_PATH_PROG([PERL], [perl])
|
||||
|
||||
AC_ARG_ENABLE([with-test-suite],
|
||||
AC_HELP_STRING([--with-test-suite], [build test suite by default @<:@default=check@:>@]),
|
||||
[case "${withval}" in
|
||||
yes|no|check) ;;
|
||||
*) AC_MSG_ERROR([bad value ${withval} for tests option]) ;;
|
||||
esac],
|
||||
[withval=check])
|
||||
|
||||
AC_MSG_CHECKING([Whether to build test suite by default])
|
||||
if test "$withval" = "check" ; then
|
||||
if test -d $srcdir/.git ; then
|
||||
withval=yes
|
||||
else
|
||||
withval=no
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT([$withval])
|
||||
AM_CONDITIONAL([WITH_TESTS], [test "$withval" = "yes"])
|
||||
|
||||
AC_ARG_ENABLE([test-coverage],
|
||||
AC_HELP_STRING([--enable-test-coverage], [turn on code coverage instrumentation @<:@default=no@:>@]),
|
||||
[case "${enableval}" in
|
||||
@ -2183,16 +2594,23 @@ MINGW_EXTRA_LDFLAGS=
|
||||
WIN32_EXTRA_CFLAGS=
|
||||
LIBVIRT_SYMBOL_FILE=libvirt.syms
|
||||
LIBVIRT_QEMU_SYMBOL_FILE='$(srcdir)/libvirt_qemu.syms'
|
||||
MSCOM_LIBS=
|
||||
case "$host" in
|
||||
*-*-cygwin*)
|
||||
CYGWIN_EXTRA_LDFLAGS="-no-undefined"
|
||||
CYGWIN_EXTRA_LIBADD="${INTLLIBS}"
|
||||
MSCOM_LIBS="-lole32 -loleaut32"
|
||||
|
||||
if test "x$PYTHON_VERSION" != "x"; then
|
||||
CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
|
||||
fi
|
||||
;;
|
||||
*-*-mingw*)
|
||||
MINGW_EXTRA_LDFLAGS="-no-undefined"
|
||||
MSCOM_LIBS="-lole32 -loleaut32"
|
||||
;;
|
||||
*-*-msvc*)
|
||||
MSCOM_LIBS="-lole32 -loleaut32"
|
||||
;;
|
||||
esac
|
||||
case "$host" in
|
||||
@ -2225,6 +2643,7 @@ AC_SUBST([WIN32_EXTRA_CFLAGS])
|
||||
AC_SUBST([LIBVIRT_SYMBOL_FILE])
|
||||
AC_SUBST([LIBVIRT_QEMU_SYMBOL_FILE])
|
||||
AC_SUBST([VERSION_SCRIPT_FLAGS])
|
||||
AC_SUBST([MSCOM_LIBS])
|
||||
|
||||
|
||||
dnl Look for windres to build a Windows icon resource.
|
||||
@ -2238,16 +2657,30 @@ AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != ""])
|
||||
|
||||
dnl Driver-Modules library
|
||||
AC_ARG_WITH([driver-modules],
|
||||
AC_HELP_STRING([--with-driver-modules], [build drivers as loadable modules @<:@default=no@:>@]),
|
||||
AC_HELP_STRING([--with-driver-modules],
|
||||
[build drivers as loadable modules @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_driver_modules=no])
|
||||
[with_driver_modules=check])
|
||||
|
||||
if test "$with_libvirtd" = "no" ; then
|
||||
with_driver_modules=no
|
||||
fi
|
||||
|
||||
DRIVER_MODULE_CFLAGS=
|
||||
DRIVER_MODULE_LIBS=
|
||||
if test "$with_driver_modules" = "yes"; then
|
||||
if test "$with_driver_modules" = "yes" || test "$with_driver_modules" = "check"; then
|
||||
if test "$dlfcn_found" != "yes" || test "$dlopen_found" != "yes"; then
|
||||
if test "$with_driver_modules" = "yes" ; then
|
||||
AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
|
||||
else
|
||||
with_driver_modules=no
|
||||
fi
|
||||
else
|
||||
with_driver_modules=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_driver_modules" = "yes" ; then
|
||||
DRIVER_MODULE_CFLAGS="-export-dynamic"
|
||||
case $ac_cv_search_dlopen in
|
||||
no*) DRIVER_MODULE_LIBS= ;;
|
||||
@ -2294,7 +2727,6 @@ if test "x$with_hal" = "xyes" || test "x$with_hal" = "xcheck"; then
|
||||
CFLAGS="$CFLAGS $HAL_CFLAGS"
|
||||
LIBS="$LIBS $HAL_LIBS"
|
||||
AC_CHECK_FUNCS([libhal_get_all_devices],,[with_hal=no])
|
||||
AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
|
||||
CFLAGS="$old_CFLAGS"
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
@ -2415,7 +2847,8 @@ AC_MSG_CHECKING([whether to compile with macvtap support])
|
||||
if test "$with_macvtap" != "no" ; then
|
||||
AC_TRY_COMPILE([ #include <sys/socket.h>
|
||||
#include <linux/rtnetlink.h> ],
|
||||
[ int x = MACVLAN_MODE_BRIDGE; ],
|
||||
[ int x = MACVLAN_MODE_BRIDGE;
|
||||
int y = IFLA_VF_MAX; ],
|
||||
[ with_macvtap=yes ],
|
||||
[ if test "$with_macvtap" = "yes" ; then
|
||||
AC_MSG_ERROR([Installed linux headers don't show support for macvtap device.])
|
||||
@ -2481,28 +2914,38 @@ AM_CONDITIONAL([WITH_VIRTUALPORT], [test "$with_virtualport" = "yes"])
|
||||
|
||||
dnl netlink library
|
||||
|
||||
LIBNL_ROUTE3_CFLAGS=""
|
||||
LIBNL_ROUTE3_LIBS=""
|
||||
LIBNL_CFLAGS=""
|
||||
LIBNL_LIBS=""
|
||||
have_libnl=no
|
||||
|
||||
if test "$with_linux" = "yes"; then
|
||||
PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [
|
||||
PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [
|
||||
have_libnl=yes
|
||||
AC_DEFINE_UNQUOTED([HAVE_LIBNL], 1, [whether the netlink library is available])
|
||||
AC_DEFINE([HAVE_LIBNL3], [1], [Use libnl-3.0])
|
||||
AC_DEFINE([HAVE_LIBNL], [1], [whether the netlink library is available])
|
||||
PKG_CHECK_MODULES([LIBNL_ROUTE3], [libnl-route-3.0])
|
||||
LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE3_CFLAGS"
|
||||
LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE3_LIBS"
|
||||
], [PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [
|
||||
have_libnl=yes
|
||||
AC_DEFINE_UNQUOTED([HAVE_LIBNL], [1],
|
||||
[whether the netlink library is available])
|
||||
AC_DEFINE_UNQUOTED([HAVE_LIBNL1], [1],
|
||||
[whether the netlink v1 library is available])
|
||||
], [
|
||||
if test "$with_macvtap" = "yes"; then
|
||||
AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
|
||||
fi
|
||||
])
|
||||
])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_LIBNL], [test "$have_libnl" = "yes"])
|
||||
|
||||
AC_SUBST([LIBNL_CFLAGS])
|
||||
AC_SUBST([LIBNL_LIBS])
|
||||
|
||||
|
||||
|
||||
|
||||
# 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.
|
||||
@ -2525,11 +2968,16 @@ test "x$lv_cv_static_analysis" = xyes && t=1
|
||||
AC_DEFINE_UNQUOTED([STATIC_ANALYSIS], [$t],
|
||||
[Define to 1 when performing static analysis.])
|
||||
|
||||
# Some GNULIB base64 symbols clash with a kerberos library
|
||||
AC_DEFINE_UNQUOTED([isbase64],[libvirt_gl_isbase64],[Hack to avoid symbol clash])
|
||||
AC_DEFINE_UNQUOTED([base64_encode],[libvirt_gl_base64_encode],[Hack to avoid symbol clash])
|
||||
AC_DEFINE_UNQUOTED([base64_encode_alloc],[libvirt_gl_base64_encode_alloc],[Hack to avoid symbol clash])
|
||||
|
||||
AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
|
||||
docs/schemas/Makefile \
|
||||
gnulib/lib/Makefile \
|
||||
gnulib/tests/Makefile \
|
||||
libvirt.pc libvirt.spec mingw32-libvirt.spec \
|
||||
libvirt.pc libvirt.spec mingw-libvirt.spec \
|
||||
po/Makefile.in \
|
||||
include/libvirt/Makefile include/libvirt/libvirt.h \
|
||||
python/Makefile python/tests/Makefile \
|
||||
@ -2564,6 +3012,7 @@ AC_MSG_NOTICE([ LXC: $with_lxc])
|
||||
AC_MSG_NOTICE([ PHYP: $with_phyp])
|
||||
AC_MSG_NOTICE([ ESX: $with_esx])
|
||||
AC_MSG_NOTICE([ Hyper-V: $with_hyperv])
|
||||
AC_MSG_NOTICE([Parallels: $with_parallels])
|
||||
AC_MSG_NOTICE([ Test: $with_test])
|
||||
AC_MSG_NOTICE([ Remote: $with_remote])
|
||||
AC_MSG_NOTICE([ Network: $with_network])
|
||||
@ -2582,10 +3031,12 @@ AC_MSG_NOTICE([ iSCSI: $with_storage_iscsi])
|
||||
AC_MSG_NOTICE([ SCSI: $with_storage_scsi])
|
||||
AC_MSG_NOTICE([ mpath: $with_storage_mpath])
|
||||
AC_MSG_NOTICE([ Disk: $with_storage_disk])
|
||||
AC_MSG_NOTICE([ RBD: $with_storage_rbd])
|
||||
AC_MSG_NOTICE([Sheepdog: $with_storage_sheepdog])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Security Drivers])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([ SELinux: $with_secdriver_selinux])
|
||||
AC_MSG_NOTICE([ SELinux: $with_secdriver_selinux ($SELINUX_MOUNT)])
|
||||
AC_MSG_NOTICE([AppArmor: $with_secdriver_apparmor])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Driver Loadable Modules])
|
||||
@ -2631,6 +3082,7 @@ AC_MSG_NOTICE([ sanlock: $SANLOCK_CFLAGS $SANLOCK_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ sanlock: no])
|
||||
fi
|
||||
AC_MSG_NOTICE([firewalld: $with_firewalld])
|
||||
if test "$with_avahi" = "yes" ; then
|
||||
AC_MSG_NOTICE([ avahi: $AVAHI_CFLAGS $AVAHI_LIBS])
|
||||
else
|
||||
@ -2720,6 +3172,12 @@ AC_MSG_NOTICE([ xdr: $XDR_CFLAGS])
|
||||
else
|
||||
AC_MSG_NOTICE([ xdr: no])
|
||||
fi
|
||||
if test "$with_storage_rbd" = "yes" ; then
|
||||
AC_MSG_NOTICE([ rbd: $LIBRBD_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ rbd: no])
|
||||
fi
|
||||
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Test suite])
|
||||
AC_MSG_NOTICE([])
|
||||
@ -2729,13 +3187,15 @@ AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Miscellaneous])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([ Debug: $enable_debug])
|
||||
AC_MSG_NOTICE([ Warnings: $enable_compile_warnings])
|
||||
AC_MSG_NOTICE([ Use -Werror: $set_werror])
|
||||
AC_MSG_NOTICE([Warning Flags: $WARN_CFLAGS])
|
||||
AC_MSG_NOTICE([ Readline: $lv_use_readline])
|
||||
AC_MSG_NOTICE([ Python: $with_python])
|
||||
AC_MSG_NOTICE([ DTrace: $with_dtrace])
|
||||
AC_MSG_NOTICE([ numad: $with_numad])
|
||||
AC_MSG_NOTICE([ XML Catalog: $XML_CATALOG_FILE])
|
||||
AC_MSG_NOTICE([ Init script: $with_init_script])
|
||||
AC_MSG_NOTICE([Console locks: $with_console_lock_files])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Privileges])
|
||||
AC_MSG_NOTICE([])
|
||||
|
15
daemon/.gitignore
vendored
@ -1,15 +0,0 @@
|
||||
*.la
|
||||
*.lo
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
libvirt_qemud
|
||||
libvirtd
|
||||
libvirtd.init
|
||||
libvirtd.service
|
||||
libvirtd*.logrotate
|
||||
libvirtd.8
|
||||
libvirtd.8.in
|
||||
libvirtd.pod
|
||||
probes.h
|
@ -1,12 +1,12 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2011 Red Hat, Inc.
|
||||
## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
|
||||
-I$(top_srcdir)/include -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/src -I../src \
|
||||
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
|
||||
-I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/src -I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/util \
|
||||
-I$(top_srcdir)/src/conf \
|
||||
-I$(top_srcdir)/src/rpc \
|
||||
@ -21,6 +21,7 @@ DAEMON_GENERATED = \
|
||||
|
||||
DAEMON_SOURCES = \
|
||||
libvirtd.c libvirtd.h \
|
||||
libvirtd-config.c libvirtd-config.h \
|
||||
remote.c remote.h \
|
||||
stream.c stream.h \
|
||||
../src/remote/remote_protocol.c \
|
||||
@ -44,7 +45,7 @@ EXTRA_DIST = \
|
||||
libvirtd.qemu.logrotate.in \
|
||||
libvirtd.lxc.logrotate.in \
|
||||
libvirtd.uml.logrotate.in \
|
||||
test_libvirtd.aug \
|
||||
test_libvirtd.aug.in \
|
||||
THREADS.txt \
|
||||
libvirtd.pod.in \
|
||||
libvirtd.8.in \
|
||||
@ -57,12 +58,12 @@ QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
|
||||
|
||||
$(srcdir)/remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(REMOTE_PROTOCOL)
|
||||
$(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b remote \
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b remote REMOTE \
|
||||
$(REMOTE_PROTOCOL) > $@
|
||||
|
||||
$(srcdir)/qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(QEMU_PROTOCOL)
|
||||
$(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu \
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu QEMU \
|
||||
$(QEMU_PROTOCOL) > $@
|
||||
|
||||
if WITH_LIBVIRTD
|
||||
@ -80,11 +81,12 @@ augeas_DATA = libvirtd.aug
|
||||
augeastestsdir = $(datadir)/augeas/lenses/tests
|
||||
augeastests_DATA = test_libvirtd.aug
|
||||
|
||||
CLEANFILES += test_libvirtd.aug
|
||||
|
||||
libvirtd.8: $(srcdir)/libvirtd.8.in
|
||||
sed \
|
||||
-e 's![@]sysconfdir[@]!$(sysconfdir)!g' \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
-e 's![@]remote_pid_file[@]!$(REMOTE_PID_FILE)!g' \
|
||||
-e 's!SYSCONFDIR!$(sysconfdir)!g' \
|
||||
-e 's!LOCALSTATEDIR!$(localstatedir)!g' \
|
||||
< $< > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
@ -93,11 +95,10 @@ libvirtd_SOURCES = $(DAEMON_SOURCES)
|
||||
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
|
||||
libvirtd_CFLAGS = \
|
||||
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
|
||||
$(XDR_CFLAGS) $(POLKIT_CFLAGS) \
|
||||
$(XDR_CFLAGS) $(POLKIT_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(COVERAGE_CFLAGS) \
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
|
||||
-DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\""
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
|
||||
|
||||
libvirtd_LDFLAGS = \
|
||||
$(WARN_CFLAGS) \
|
||||
@ -107,10 +108,12 @@ libvirtd_LDADD = \
|
||||
$(LIBXML_LIBS) \
|
||||
$(GNUTLS_LIBS) \
|
||||
$(SASL_LIBS) \
|
||||
$(POLKIT_LIBS)
|
||||
$(DBUS_LIBS) \
|
||||
$(POLKIT_LIBS) \
|
||||
$(LIBNL_LIBS)
|
||||
|
||||
if WITH_DTRACE
|
||||
libvirtd_LDADD += ../src/probes.o
|
||||
if WITH_DTRACE_PROBES
|
||||
libvirtd_LDADD += ../src/libvirt_probes.lo
|
||||
endif
|
||||
|
||||
libvirtd_LDADD += \
|
||||
@ -119,6 +122,9 @@ libvirtd_LDADD += \
|
||||
if ! WITH_DRIVER_MODULES
|
||||
if WITH_QEMU
|
||||
libvirtd_LDADD += ../src/libvirt_driver_qemu.la
|
||||
if WITH_DTRACE_PROBES
|
||||
libvirtd_LDADD += ../src/libvirt_qemu_probes.lo
|
||||
endif
|
||||
endif
|
||||
|
||||
if WITH_LXC
|
||||
@ -133,7 +139,7 @@ if WITH_UML
|
||||
libvirtd_LDADD += ../src/libvirt_driver_uml.la
|
||||
endif
|
||||
|
||||
if WITH_STORAGE_DIR
|
||||
if WITH_STORAGE
|
||||
libvirtd_LDADD += ../src/libvirt_driver_storage.la
|
||||
endif
|
||||
|
||||
@ -256,6 +262,7 @@ uninstall-sysconfig:
|
||||
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
||||
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
|
||||
|
||||
if WITH_SYSCTL
|
||||
install-sysctl:
|
||||
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysctl.d
|
||||
$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
|
||||
@ -264,6 +271,10 @@ install-sysctl:
|
||||
uninstall-sysctl:
|
||||
rm -f $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
||||
rmdir $(DESTDIR)$(sysconfdir)/sysctl.d || :
|
||||
else
|
||||
install-sysctl:
|
||||
uninstall-sysctl:
|
||||
endif
|
||||
|
||||
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
|
||||
@ -307,7 +318,7 @@ BUILT_SOURCES += libvirtd.service
|
||||
|
||||
install-init-systemd: install-sysconfig libvirtd.service
|
||||
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
||||
$(INSTALL_SCRIPT) libvirtd.service \
|
||||
$(INSTALL_DATA) libvirtd.service \
|
||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
|
||||
|
||||
uninstall-init-systemd: uninstall-sysconfig
|
||||
@ -320,26 +331,33 @@ endif # LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
|
||||
libvirtd.init: libvirtd.init.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
-e s!\@localstatedir\@!@localstatedir@!g \
|
||||
-e s!\@sbindir\@!@sbindir@!g \
|
||||
-e s!\@sysconfdir\@!@sysconfdir@!g \
|
||||
-e s!\@localstatedir\@!$(localstatedir)!g \
|
||||
-e s!\@sbindir\@!$(sbindir)!g \
|
||||
-e s!\@sysconfdir\@!$(sysconfdir)!g \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
-e s!\@localstatedir\@!@localstatedir@!g \
|
||||
-e s!\@sbindir\@!@sbindir@!g \
|
||||
-e s!\@sysconfdir\@!@sysconfdir@!g \
|
||||
-e s!\@localstatedir\@!$(localstatedir)!g \
|
||||
-e s!\@sbindir\@!$(sbindir)!g \
|
||||
-e s!\@sysconfdir\@!$(sysconfdir)!g \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
check-local:
|
||||
check-local: check-augeas
|
||||
|
||||
AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
|
||||
|
||||
test_libvirtd.aug: test_libvirtd.aug.in $(srcdir)/libvirtd.conf
|
||||
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libvirtd.conf $< $@
|
||||
|
||||
check-augeas: test_libvirtd.aug
|
||||
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
|
||||
'$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug; \
|
||||
'$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \
|
||||
fi
|
||||
|
||||
|
||||
@ -356,7 +374,7 @@ POD2MAN = pod2man -c "Virtualization Support" \
|
||||
-r "$(PACKAGE)-$(VERSION)" -s 8
|
||||
|
||||
$(srcdir)/libvirtd.8.in: libvirtd.pod.in
|
||||
$(AM_V_GEN)$(POD2MAN) $< $@
|
||||
$(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@
|
||||
|
||||
# This is needed for clients too, so can't wrap in
|
||||
# the WITH_LIBVIRTD conditional
|
||||
|
492
daemon/libvirtd-config.c
Normal file
@ -0,0 +1,492 @@
|
||||
/*
|
||||
* libvirtd.c: daemon start of day, guest process & i/o management
|
||||
*
|
||||
* Copyright (C) 2006-2012 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* 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 library 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
|
||||
* Lesser 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, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "libvirtd-config.h"
|
||||
#include "conf.h"
|
||||
#include "memory.h"
|
||||
#include "virterror_internal.h"
|
||||
#include "logging.h"
|
||||
#include "rpc/virnetserver.h"
|
||||
#include "configmake.h"
|
||||
#include "remote/remote_protocol.h"
|
||||
#include "remote/remote_driver.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_CONF
|
||||
|
||||
/* Allocate an array of malloc'd strings from the config file, filename
|
||||
* (used only in diagnostics), using handle "conf". Upon error, return -1
|
||||
* and free any allocated memory. Otherwise, save the array in *list_arg
|
||||
* and return 0.
|
||||
*/
|
||||
static int
|
||||
remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
const char *filename)
|
||||
{
|
||||
char **list;
|
||||
virConfValuePtr p = virConfGetValue (conf, key);
|
||||
if (!p)
|
||||
return 0;
|
||||
|
||||
switch (p->type) {
|
||||
case VIR_CONF_STRING:
|
||||
if (VIR_ALLOC_N(list, 2) < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list"),
|
||||
key);
|
||||
return -1;
|
||||
}
|
||||
list[0] = strdup (p->str);
|
||||
list[1] = NULL;
|
||||
if (list[0] == NULL) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list value"),
|
||||
key);
|
||||
VIR_FREE(list);
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_CONF_LIST: {
|
||||
int i, len = 0;
|
||||
virConfValuePtr pp;
|
||||
for (pp = p->list; pp; pp = pp->next)
|
||||
len++;
|
||||
if (VIR_ALLOC_N(list, 1+len) < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list"),
|
||||
key);
|
||||
return -1;
|
||||
}
|
||||
for (i = 0, pp = p->list; pp; ++i, pp = pp->next) {
|
||||
if (pp->type != VIR_CONF_STRING) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("remoteReadConfigFile: %s: %s:"
|
||||
" must be a string or list of strings"),
|
||||
filename, key);
|
||||
VIR_FREE(list);
|
||||
return -1;
|
||||
}
|
||||
list[i] = strdup (pp->str);
|
||||
if (list[i] == NULL) {
|
||||
int j;
|
||||
for (j = 0 ; j < i ; j++)
|
||||
VIR_FREE(list[j]);
|
||||
VIR_FREE(list);
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list value"),
|
||||
key);
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
list[i] = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("remoteReadConfigFile: %s: %s:"
|
||||
" must be a string or list of strings"),
|
||||
filename, key);
|
||||
return -1;
|
||||
}
|
||||
|
||||
*list_arg = list;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* A helper function used by each of the following macros. */
|
||||
static int
|
||||
checkType (virConfValuePtr p, const char *filename,
|
||||
const char *key, virConfType required_type)
|
||||
{
|
||||
if (p->type != required_type) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("remoteReadConfigFile: %s: %s: invalid type:"
|
||||
" got %s; expected %s"), filename, key,
|
||||
virConfTypeName (p->type),
|
||||
virConfTypeName (required_type));
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* If there is no config data for the key, #var_name, then do nothing.
|
||||
If there is valid data of type VIR_CONF_STRING, and strdup succeeds,
|
||||
store the result in var_name. Otherwise, (i.e. invalid type, or strdup
|
||||
failure), give a diagnostic and "goto" the cleanup-and-fail label. */
|
||||
#define GET_CONF_STR(conf, filename, var_name) \
|
||||
do { \
|
||||
virConfValuePtr p = virConfGetValue (conf, #var_name); \
|
||||
if (p) { \
|
||||
if (checkType (p, filename, #var_name, VIR_CONF_STRING) < 0) \
|
||||
goto error; \
|
||||
VIR_FREE(data->var_name); \
|
||||
if (!(data->var_name = strdup (p->str))) { \
|
||||
virReportOOMError(); \
|
||||
goto error; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Like GET_CONF_STR, but for integral values. */
|
||||
#define GET_CONF_INT(conf, filename, var_name) \
|
||||
do { \
|
||||
virConfValuePtr p = virConfGetValue (conf, #var_name); \
|
||||
if (p) { \
|
||||
if (checkType (p, filename, #var_name, VIR_CONF_LONG) < 0) \
|
||||
goto error; \
|
||||
data->var_name = p->l; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, const char *filename) {
|
||||
virConfValuePtr p;
|
||||
|
||||
p = virConfGetValue (conf, key);
|
||||
if (!p)
|
||||
return 0;
|
||||
|
||||
if (checkType (p, filename, key, VIR_CONF_STRING) < 0)
|
||||
return -1;
|
||||
|
||||
if (!p->str)
|
||||
return 0;
|
||||
|
||||
if (STREQ(p->str, "none")) {
|
||||
*auth = VIR_NET_SERVER_SERVICE_AUTH_NONE;
|
||||
#if HAVE_SASL
|
||||
} else if (STREQ(p->str, "sasl")) {
|
||||
*auth = VIR_NET_SERVER_SERVICE_AUTH_SASL;
|
||||
#endif
|
||||
} else if (STREQ(p->str, "polkit")) {
|
||||
*auth = VIR_NET_SERVER_SERVICE_AUTH_POLKIT;
|
||||
} else {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("remoteReadConfigFile: %s: %s: unsupported auth %s"),
|
||||
filename, key, p->str);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
daemonConfigFilePath(bool privileged, char **configfile)
|
||||
{
|
||||
if (privileged) {
|
||||
if (!(*configfile = strdup(SYSCONFDIR "/libvirt/libvirtd.conf")))
|
||||
goto no_memory;
|
||||
} else {
|
||||
char *configdir = NULL;
|
||||
|
||||
if (!(configdir = virGetUserConfigDirectory()))
|
||||
goto error;
|
||||
|
||||
if (virAsprintf(configfile, "%s/libvirtd.conf", configdir) < 0) {
|
||||
VIR_FREE(configdir);
|
||||
goto no_memory;
|
||||
}
|
||||
VIR_FREE(configdir);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
no_memory:
|
||||
virReportOOMError();
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct daemonConfig*
|
||||
daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct daemonConfig *data;
|
||||
char *localhost;
|
||||
int ret;
|
||||
|
||||
if (VIR_ALLOC(data) < 0) {
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->listen_tls = 1;
|
||||
data->listen_tcp = 0;
|
||||
|
||||
if (!(data->tls_port = strdup(LIBVIRTD_TLS_PORT)))
|
||||
goto no_memory;
|
||||
if (!(data->tcp_port = strdup(LIBVIRTD_TCP_PORT)))
|
||||
goto no_memory;
|
||||
|
||||
/* Only default to PolicyKit if running as root */
|
||||
#if HAVE_POLKIT
|
||||
if (privileged) {
|
||||
data->auth_unix_rw = REMOTE_AUTH_POLKIT;
|
||||
data->auth_unix_ro = REMOTE_AUTH_POLKIT;
|
||||
} else {
|
||||
#endif
|
||||
data->auth_unix_rw = REMOTE_AUTH_NONE;
|
||||
data->auth_unix_ro = REMOTE_AUTH_NONE;
|
||||
#if HAVE_POLKIT
|
||||
}
|
||||
#endif
|
||||
|
||||
if (data->auth_unix_rw == REMOTE_AUTH_POLKIT)
|
||||
data->unix_sock_rw_perms = strdup("0777"); /* Allow world */
|
||||
else
|
||||
data->unix_sock_rw_perms = strdup("0700"); /* Allow user only */
|
||||
data->unix_sock_ro_perms = strdup("0777"); /* Always allow world */
|
||||
if (!data->unix_sock_ro_perms ||
|
||||
!data->unix_sock_rw_perms)
|
||||
goto no_memory;
|
||||
|
||||
#if HAVE_SASL
|
||||
data->auth_tcp = REMOTE_AUTH_SASL;
|
||||
#else
|
||||
data->auth_tcp = REMOTE_AUTH_NONE;
|
||||
#endif
|
||||
data->auth_tls = REMOTE_AUTH_NONE;
|
||||
|
||||
data->mdns_adv = 0;
|
||||
|
||||
data->min_workers = 5;
|
||||
data->max_workers = 20;
|
||||
data->max_clients = 20;
|
||||
|
||||
data->prio_workers = 5;
|
||||
|
||||
data->max_requests = 20;
|
||||
data->max_client_requests = 5;
|
||||
|
||||
data->log_buffer_size = 64;
|
||||
|
||||
data->audit_level = 1;
|
||||
data->audit_logging = 0;
|
||||
|
||||
data->keepalive_interval = 5;
|
||||
data->keepalive_count = 5;
|
||||
data->keepalive_required = 0;
|
||||
|
||||
localhost = virGetHostname(NULL);
|
||||
if (localhost == NULL) {
|
||||
/* we couldn't resolve the hostname; assume that we are
|
||||
* running in disconnected operation, and report a less
|
||||
* useful Avahi string
|
||||
*/
|
||||
ret = virAsprintf(&data->mdns_name, "Virtualization Host");
|
||||
} else {
|
||||
char *tmp;
|
||||
/* Extract the host part of the potentially FQDN */
|
||||
if ((tmp = strchr(localhost, '.')))
|
||||
*tmp = '\0';
|
||||
ret = virAsprintf(&data->mdns_name, "Virtualization Host %s",
|
||||
localhost);
|
||||
}
|
||||
VIR_FREE(localhost);
|
||||
if (ret < 0)
|
||||
goto no_memory;
|
||||
|
||||
return data;
|
||||
|
||||
no_memory:
|
||||
virReportOOMError();
|
||||
daemonConfigFree(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
daemonConfigFree(struct daemonConfig *data)
|
||||
{
|
||||
char **tmp;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
VIR_FREE(data->listen_addr);
|
||||
VIR_FREE(data->tls_port);
|
||||
VIR_FREE(data->tcp_port);
|
||||
|
||||
VIR_FREE(data->unix_sock_ro_perms);
|
||||
VIR_FREE(data->unix_sock_rw_perms);
|
||||
VIR_FREE(data->unix_sock_group);
|
||||
VIR_FREE(data->unix_sock_dir);
|
||||
VIR_FREE(data->mdns_name);
|
||||
|
||||
tmp = data->tls_allowed_dn_list;
|
||||
while (tmp && *tmp) {
|
||||
VIR_FREE(*tmp);
|
||||
tmp++;
|
||||
}
|
||||
VIR_FREE(data->tls_allowed_dn_list);
|
||||
|
||||
tmp = data->sasl_allowed_username_list;
|
||||
while (tmp && *tmp) {
|
||||
VIR_FREE(*tmp);
|
||||
tmp++;
|
||||
}
|
||||
VIR_FREE(data->sasl_allowed_username_list);
|
||||
|
||||
VIR_FREE(data->key_file);
|
||||
VIR_FREE(data->ca_file);
|
||||
VIR_FREE(data->cert_file);
|
||||
VIR_FREE(data->crl_file);
|
||||
|
||||
VIR_FREE(data->host_uuid);
|
||||
VIR_FREE(data->log_filters);
|
||||
VIR_FREE(data->log_outputs);
|
||||
|
||||
VIR_FREE(data);
|
||||
}
|
||||
|
||||
static int
|
||||
daemonConfigLoadOptions(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
virConfPtr conf)
|
||||
{
|
||||
GET_CONF_INT (conf, filename, listen_tcp);
|
||||
GET_CONF_INT (conf, filename, listen_tls);
|
||||
GET_CONF_STR (conf, filename, tls_port);
|
||||
GET_CONF_STR (conf, filename, tcp_port);
|
||||
GET_CONF_STR (conf, filename, listen_addr);
|
||||
|
||||
if (remoteConfigGetAuth(conf, "auth_unix_rw", &data->auth_unix_rw, filename) < 0)
|
||||
goto error;
|
||||
#if HAVE_POLKIT
|
||||
/* Change default perms to be wide-open if PolicyKit is enabled.
|
||||
* Admin can always override in config file
|
||||
*/
|
||||
if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) {
|
||||
VIR_FREE(data->unix_sock_rw_perms);
|
||||
if (!(data->unix_sock_rw_perms = strdup("0777"))) {
|
||||
virReportOOMError();
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (remoteConfigGetAuth(conf, "auth_unix_ro", &data->auth_unix_ro, filename) < 0)
|
||||
goto error;
|
||||
if (remoteConfigGetAuth(conf, "auth_tcp", &data->auth_tcp, filename) < 0)
|
||||
goto error;
|
||||
if (remoteConfigGetAuth(conf, "auth_tls", &data->auth_tls, filename) < 0)
|
||||
goto error;
|
||||
|
||||
GET_CONF_STR (conf, filename, unix_sock_group);
|
||||
GET_CONF_STR (conf, filename, unix_sock_ro_perms);
|
||||
GET_CONF_STR (conf, filename, unix_sock_rw_perms);
|
||||
|
||||
GET_CONF_STR (conf, filename, unix_sock_dir);
|
||||
|
||||
GET_CONF_INT (conf, filename, mdns_adv);
|
||||
GET_CONF_STR (conf, filename, mdns_name);
|
||||
|
||||
GET_CONF_INT (conf, filename, tls_no_sanity_certificate);
|
||||
GET_CONF_INT (conf, filename, tls_no_verify_certificate);
|
||||
|
||||
GET_CONF_STR (conf, filename, key_file);
|
||||
GET_CONF_STR (conf, filename, cert_file);
|
||||
GET_CONF_STR (conf, filename, ca_file);
|
||||
GET_CONF_STR (conf, filename, crl_file);
|
||||
|
||||
if (remoteConfigGetStringList(conf, "tls_allowed_dn_list",
|
||||
&data->tls_allowed_dn_list, filename) < 0)
|
||||
goto error;
|
||||
|
||||
|
||||
if (remoteConfigGetStringList(conf, "sasl_allowed_username_list",
|
||||
&data->sasl_allowed_username_list, filename) < 0)
|
||||
goto error;
|
||||
|
||||
|
||||
GET_CONF_INT (conf, filename, min_workers);
|
||||
GET_CONF_INT (conf, filename, max_workers);
|
||||
GET_CONF_INT (conf, filename, max_clients);
|
||||
|
||||
GET_CONF_INT (conf, filename, prio_workers);
|
||||
|
||||
GET_CONF_INT (conf, filename, max_requests);
|
||||
GET_CONF_INT (conf, filename, max_client_requests);
|
||||
|
||||
GET_CONF_INT (conf, filename, audit_level);
|
||||
GET_CONF_INT (conf, filename, audit_logging);
|
||||
|
||||
GET_CONF_STR (conf, filename, host_uuid);
|
||||
|
||||
GET_CONF_INT (conf, filename, log_level);
|
||||
GET_CONF_STR (conf, filename, log_filters);
|
||||
GET_CONF_STR (conf, filename, log_outputs);
|
||||
GET_CONF_INT (conf, filename, log_buffer_size);
|
||||
|
||||
GET_CONF_INT (conf, filename, keepalive_interval);
|
||||
GET_CONF_INT (conf, filename, keepalive_count);
|
||||
GET_CONF_INT (conf, filename, keepalive_required);
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* Read the config file if it exists.
|
||||
* Only used in the remote case, hence the name.
|
||||
*/
|
||||
int
|
||||
daemonConfigLoadFile(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
bool allow_missing)
|
||||
{
|
||||
virConfPtr conf;
|
||||
int ret;
|
||||
|
||||
if (allow_missing &&
|
||||
access(filename, R_OK) == -1 &&
|
||||
errno == ENOENT)
|
||||
return 0;
|
||||
|
||||
conf = virConfReadFile(filename, 0);
|
||||
if (!conf)
|
||||
return -1;
|
||||
|
||||
ret = daemonConfigLoadOptions(data, filename, conf);
|
||||
virConfFree(conf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int daemonConfigLoadData(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
const char *filedata)
|
||||
{
|
||||
virConfPtr conf;
|
||||
int ret;
|
||||
|
||||
conf = virConfReadMem(filedata, strlen(filedata), 0);
|
||||
if (!conf)
|
||||
return -1;
|
||||
|
||||
ret = daemonConfigLoadOptions(data, filename, conf);
|
||||
virConfFree(conf);
|
||||
return ret;
|
||||
}
|
94
daemon/libvirtd-config.h
Normal file
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* libvirtd.c: daemon start of day, guest process & i/o management
|
||||
*
|
||||
* Copyright (C) 2006-2012 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* 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 library 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
|
||||
* Lesser 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, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __LIBVIRTD_CONFIG_H__
|
||||
# define __LIBVIRTD_CONFIG_H__
|
||||
|
||||
# include "internal.h"
|
||||
|
||||
struct daemonConfig {
|
||||
char *host_uuid;
|
||||
|
||||
int listen_tls;
|
||||
int listen_tcp;
|
||||
char *listen_addr;
|
||||
char *tls_port;
|
||||
char *tcp_port;
|
||||
|
||||
char *unix_sock_ro_perms;
|
||||
char *unix_sock_rw_perms;
|
||||
char *unix_sock_group;
|
||||
char *unix_sock_dir;
|
||||
|
||||
int auth_unix_rw;
|
||||
int auth_unix_ro;
|
||||
int auth_tcp;
|
||||
int auth_tls;
|
||||
|
||||
int mdns_adv;
|
||||
char *mdns_name;
|
||||
|
||||
int tls_no_verify_certificate;
|
||||
int tls_no_sanity_certificate;
|
||||
char **tls_allowed_dn_list;
|
||||
char **sasl_allowed_username_list;
|
||||
|
||||
char *key_file;
|
||||
char *cert_file;
|
||||
char *ca_file;
|
||||
char *crl_file;
|
||||
|
||||
int min_workers;
|
||||
int max_workers;
|
||||
int max_clients;
|
||||
|
||||
int prio_workers;
|
||||
|
||||
int max_requests;
|
||||
int max_client_requests;
|
||||
|
||||
int log_level;
|
||||
char *log_filters;
|
||||
char *log_outputs;
|
||||
int log_buffer_size;
|
||||
|
||||
int audit_level;
|
||||
int audit_logging;
|
||||
|
||||
int keepalive_interval;
|
||||
unsigned int keepalive_count;
|
||||
int keepalive_required;
|
||||
};
|
||||
|
||||
|
||||
int daemonConfigFilePath(bool privileged, char **configfile);
|
||||
struct daemonConfig* daemonConfigNew(bool privileged);
|
||||
void daemonConfigFree(struct daemonConfig *data);
|
||||
int daemonConfigLoadFile(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
bool allow_missing);
|
||||
int daemonConfigLoadData(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
const char *filedata);
|
||||
|
||||
#endif /* __LIBVIRTD_CONFIG_H__ */
|
@ -62,6 +62,7 @@ module Libvirtd =
|
||||
let logging_entry = int_entry "log_level"
|
||||
| str_entry "log_filters"
|
||||
| str_entry "log_outputs"
|
||||
| int_entry "log_buffer_size"
|
||||
|
||||
let auditing_entry = int_entry "audit_level"
|
||||
| bool_entry "audit_logging"
|
||||
@ -70,6 +71,8 @@ module Libvirtd =
|
||||
| int_entry "keepalive_count"
|
||||
| bool_entry "keepalive_required"
|
||||
|
||||
let misc_entry = str_entry "host_uuid"
|
||||
|
||||
(* Each enty in the config is one of the following three ... *)
|
||||
let entry = network_entry
|
||||
| sock_acl_entry
|
||||
@ -80,6 +83,7 @@ module Libvirtd =
|
||||
| logging_entry
|
||||
| auditing_entry
|
||||
| keepalive_entry
|
||||
| misc_entry
|
||||
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
|
||||
let empty = [ label "#empty" . eol ]
|
||||
|
||||
|
@ -56,8 +56,8 @@
|
||||
# Alternatively can disable for all services on a host by
|
||||
# stopping the Avahi daemon
|
||||
#
|
||||
# This is enabled by default, uncomment this to disable it
|
||||
#mdns_adv = 0
|
||||
# This is disabled by default, uncomment this to enable it
|
||||
#mdns_adv = 1
|
||||
|
||||
# Override the default mDNS advertizement name. This must be
|
||||
# unique on the immediate broadcast network.
|
||||
@ -291,10 +291,13 @@
|
||||
# Logging filters:
|
||||
# A filter allows to select a different logging level for a given category
|
||||
# of logs
|
||||
# The format for a filter is:
|
||||
# The format for a filter is one of:
|
||||
# x:name
|
||||
# where name is a match string e.g. remote or qemu
|
||||
# the x prefix is the minimal level where matching messages should be logged
|
||||
# x:+name
|
||||
# where name is a string which is matched against source file name,
|
||||
# e.g., "remote", "qemu", or "util/json", the optional "+" prefix
|
||||
# tells libvirt to log stack trace for each message matching name,
|
||||
# and x is the minimal level where matching messages should be logged:
|
||||
# 1: DEBUG
|
||||
# 2: INFO
|
||||
# 3: WARNING
|
||||
@ -303,10 +306,9 @@
|
||||
# Multiple filter can be defined in a single @filters, they just need to be
|
||||
# separated by spaces.
|
||||
#
|
||||
# e.g:
|
||||
# e.g. to only get warning or errors from the remote layer and only errors
|
||||
# from the event layer:
|
||||
#log_filters="3:remote 4:event"
|
||||
# to only get warning or errors from the remote layer and only errors from
|
||||
# the event layer.
|
||||
|
||||
# Logging outputs:
|
||||
# An output is one of the places to save logging information
|
||||
@ -324,9 +326,9 @@
|
||||
# 4: ERROR
|
||||
#
|
||||
# Multiple output can be defined, they just need to be separated by spaces.
|
||||
# e.g.:
|
||||
# e.g. to log all warnings and errors to syslog under the libvirtd ident:
|
||||
#log_outputs="3:syslog:libvirtd"
|
||||
# to log all warnings and errors to syslog under the libvirtd ident
|
||||
#
|
||||
|
||||
# Log debug buffer size: default 64
|
||||
# The daemon keeps an internal debug log buffer which will be dumped in case
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* libvirtd.h: daemon data structure definitions
|
||||
*
|
||||
* Copyright (C) 2006-2011 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2012 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@ -15,15 +15,17 @@
|
||||
* Lesser 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
|
||||
* License along with this library; If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef QEMUD_INTERNAL_H__
|
||||
# define QEMUD_INTERNAL_H__
|
||||
#ifndef LIBVIRTD_H__
|
||||
# define LIBVIRTD_H__
|
||||
|
||||
# define VIR_ENUM_SENTINELS
|
||||
|
||||
# include <config.h>
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
# Required-Start: $network messagebus
|
||||
# Should-Start: $named
|
||||
# Should-Start: xend
|
||||
# Should-Start: hal
|
||||
# Should-Start: avahi-daemon
|
||||
# Required-Stop: $network messagebus
|
||||
# Should-Stop: $named
|
||||
@ -60,6 +59,13 @@ start() {
|
||||
echo -n $"Starting $SERVICE daemon: "
|
||||
mkdir -p @localstatedir@/cache/libvirt
|
||||
rm -rf @localstatedir@/cache/libvirt/*
|
||||
|
||||
# LIBVIRTD_NOFILES_LIMIT from /etc/sysconfig/libvirtd is not handled
|
||||
# automatically
|
||||
if [ -n "$LIBVIRTD_NOFILES_LIMIT" ]; then
|
||||
ulimit -n "$LIBVIRTD_NOFILES_LIMIT"
|
||||
fi
|
||||
|
||||
KRB5_KTNAME=$KRB5_KTNAME daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $LIBVIRTD_CONFIG_ARGS $LIBVIRTD_ARGS
|
||||
RETVAL=$?
|
||||
echo
|
||||
|
@ -54,7 +54,10 @@ Use this name for the PID file, overriding the default value.
|
||||
|
||||
=item B<-t, --timeout> I<SECONDS>
|
||||
|
||||
Exit after timeout period (in seconds) expires.
|
||||
Exit after timeout period (in seconds) elapse with no client connections
|
||||
or registered resources. Be aware that resources such as autostart
|
||||
networks will result in never reaching the timeout, even when there are
|
||||
no client connections.
|
||||
|
||||
=item B<-v, --verbose>
|
||||
|
||||
@ -72,41 +75,74 @@ On receipt of B<SIGHUP> libvirtd will reload its configuration.
|
||||
|
||||
=head1 FILES
|
||||
|
||||
=head2 When run as B<root>.
|
||||
|
||||
=over
|
||||
|
||||
=item F<@sysconfdir@/libvirtd.conf>
|
||||
=item F<SYSCONFDIR/libvirtd.conf>
|
||||
|
||||
The default configuration file used by libvirtd, unless overridden on the
|
||||
command line using the B<-f>|B<--config> option.
|
||||
|
||||
=item F<@localstatedir@/run/libvirt/libvirt-sock>
|
||||
=item F<LOCALSTATEDIR/run/libvirt/libvirt-sock>
|
||||
|
||||
=item F<@localstatedir@/run/libvirt/libvirt-sock-ro>
|
||||
=item F<LOCALSTATEDIR/run/libvirt/libvirt-sock-ro>
|
||||
|
||||
The sockets libvirtd will use when B<run as root>.
|
||||
The sockets libvirtd will use.
|
||||
|
||||
=item F<$HOME/.libvirt/libvirt-sock>
|
||||
|
||||
The socket libvirtd will use when run as a B<non-root> user.
|
||||
|
||||
=item F<@sysconfdir@/pki/CA/cacert.pem>
|
||||
=item F<SYSCONFDIR/pki/CA/cacert.pem>
|
||||
|
||||
The TLS B<Certificate Authority> certificate libvirtd will use.
|
||||
|
||||
=item F<@sysconfdir@/pki/libvirt/servercert.pem>
|
||||
=item F<SYSCONFDIR/pki/libvirt/servercert.pem>
|
||||
|
||||
The TLS B<Server> certificate libvirtd will use.
|
||||
|
||||
=item F<@sysconfdir@/pki/libvirt/private/serverkey.pem>
|
||||
=item F<SYSCONFDIR/pki/libvirt/private/serverkey.pem>
|
||||
|
||||
The TLS B<Server> private key libvirtd will use.
|
||||
|
||||
=item F<@remote_pid_file@>
|
||||
=item F<LOCALSTATEDIR/run/libvirtd.pid>
|
||||
|
||||
The PID file to use, unless overridden by the B<-p>|B<--pid-file> option.
|
||||
|
||||
=back
|
||||
|
||||
=head2 When run as B<non-root>.
|
||||
|
||||
=over
|
||||
|
||||
=item F<$XDG_CONFIG_HOME/libvirtd.conf>
|
||||
|
||||
The default configuration file used by libvirtd, unless overridden on the
|
||||
command line using the B<-f>|B<--config> option.
|
||||
|
||||
=item F<$XDG_RUNTIME_DIR/libvirt/libvirt-sock>
|
||||
|
||||
The socket libvirtd will use.
|
||||
|
||||
=item F<$HOME/.pki/libvirt/cacert.pem>
|
||||
|
||||
The TLS B<Certificate Authority> certificate libvirtd will use.
|
||||
|
||||
=item F<$HOME/.pki/libvirt/servercert.pem>
|
||||
|
||||
The TLS B<Server> certificate libvirtd will use.
|
||||
|
||||
=item F<$HOME/.pki/libvirt/serverkey.pem>
|
||||
|
||||
The TLS B<Server> private key libvirtd will use.
|
||||
|
||||
=item F<$XDG_RUNTIME_DIR/libvirt/libvirtd.pid>
|
||||
|
||||
The PID file to use, unless overridden by the B<-p>|B<--pid-file> option.
|
||||
|
||||
=item If $XDG_CONFIG_HOME is not set in your environment, libvirtd will use F<$HOME/.config>
|
||||
|
||||
=item If $XDG_RUNTIME_DIR is not set in your environment, libvirtd will use F<$HOME/.cache>
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
To retrieve the version of libvirtd:
|
||||
@ -118,8 +154,8 @@ To retrieve the version of libvirtd:
|
||||
To start libvirtd, instructing it to daemonize and create a PID file:
|
||||
|
||||
# libvirtd -d
|
||||
# ls -la @remote_pid_file@
|
||||
-rw-r--r-- 1 root root 6 Jul 9 02:40 @remote_pid_file@
|
||||
# ls -la LOCALSTATEDIR/run/libvirtd.pid
|
||||
-rw-r--r-- 1 root root 6 Jul 9 02:40 LOCALSTATEDIR/run/libvirtd.pid
|
||||
#
|
||||
|
||||
=head1 BUGS
|
||||
@ -150,7 +186,7 @@ Please refer to the AUTHORS file distributed with libvirt.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (C) 2006-2010 Red Hat, Inc., and the authors listed in the
|
||||
Copyright (C) 2006-2012 Red Hat, Inc., and the authors listed in the
|
||||
libvirt AUTHORS file.
|
||||
|
||||
=head1 LICENSE
|
||||
|
@ -34,8 +34,8 @@ file are instantly applied.
|
||||
<defaults>
|
||||
<!-- Only a program in the active host session can use libvirt in
|
||||
read-write mode for management, and we require user password -->
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_any>auth_admin</allow_any>
|
||||
<allow_inactive>auth_admin</allow_inactive>
|
||||
<allow_active>auth_admin_keep_session</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
@ -34,8 +34,8 @@ file are instantly applied.
|
||||
<defaults>
|
||||
<!-- Only a program in the active host session can use libvirt in
|
||||
read-write mode for management, and we require user password -->
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_any>auth_admin</allow_any>
|
||||
<allow_inactive>auth_admin</allow_inactive>
|
||||
<allow_active>auth_admin_keep</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
@ -5,16 +5,16 @@
|
||||
|
||||
[Unit]
|
||||
Description=Virtualization daemon
|
||||
After=syslog.target
|
||||
After=udev.target
|
||||
After=avahi.target
|
||||
After=dbus.target
|
||||
Before=libvirt-guests.service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/sysconfig/libvirtd
|
||||
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
# Override the maximum number of opened files
|
||||
#LimitNOFILE=2048
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -19,3 +19,6 @@
|
||||
#QEMU_AUDIO_DRV=sdl
|
||||
#
|
||||
#SDL_AUDIODRIVER=pulse
|
||||
|
||||
# Override the maximum number of opened files
|
||||
#LIBVIRTD_NOFILES_LIMIT=2048
|
||||
|
@ -31,6 +31,11 @@ script
|
||||
ulimit -c "$DAEMON_COREFILE_LIMIT"
|
||||
fi
|
||||
|
||||
# LIBVIRTD_NOFILES_LIMIT from /etc/sysconfig/libvirtd is not handled
|
||||
# automatically
|
||||
if [ -n "$LIBVIRTD_NOFILES_LIMIT" ]; then
|
||||
ulimit -n "$LIBVIRTD_NOFILES_LIMIT"
|
||||
fi
|
||||
mkdir -p /var/cache/libvirt
|
||||
rm -rf /var/cache/libvirt/*
|
||||
|
||||
|
987
daemon/remote.c
@ -14,8 +14,8 @@
|
||||
* Lesser 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
|
||||
* License along with this library; If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Richard W.M. Jones <rjones@redhat.com>
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
@ -35,7 +35,8 @@ extern size_t remoteNProcs;
|
||||
extern virNetServerProgramProc qemuProcs[];
|
||||
extern size_t qemuNProcs;
|
||||
|
||||
int remoteClientInitHook(virNetServerPtr srv,
|
||||
virNetServerClientPtr client);
|
||||
void remoteClientFreeFunc(void *data);
|
||||
void *remoteClientInitHook(virNetServerClientPtr client,
|
||||
void *opaque);
|
||||
|
||||
#endif /* __LIBVIRTD_REMOTE_H__ */
|
||||
|
@ -14,8 +14,8 @@
|
||||
* Lesser 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
|
||||
* License along with this library; If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
@ -32,10 +32,6 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_STREAMS
|
||||
|
||||
#define virNetError(code, ...) \
|
||||
virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
struct daemonClientStream {
|
||||
daemonClientPrivatePtr priv;
|
||||
int refs;
|
||||
@ -108,14 +104,6 @@ daemonStreamMessageFinished(virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
daemonStreamEventFreeFunc(void *opaque)
|
||||
{
|
||||
virNetServerClientPtr client = opaque;
|
||||
|
||||
virNetServerClientFree(client);
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback that gets invoked when a stream becomes writable/readable
|
||||
*/
|
||||
@ -233,10 +221,10 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
|
||||
virStreamEventRemoveCallback(stream->st);
|
||||
virStreamAbort(stream->st);
|
||||
if (events & VIR_STREAM_EVENT_HANGUP)
|
||||
virNetError(VIR_ERR_RPC,
|
||||
virReportError(VIR_ERR_RPC,
|
||||
"%s", _("stream had unexpected termination"));
|
||||
else
|
||||
virNetError(VIR_ERR_RPC,
|
||||
virReportError(VIR_ERR_RPC,
|
||||
"%s", _("stream had I/O failure"));
|
||||
|
||||
msg = virNetMessageNew(false);
|
||||
@ -336,14 +324,12 @@ daemonCreateClientStream(virNetServerClientPtr client,
|
||||
|
||||
stream->refs = 1;
|
||||
stream->priv = priv;
|
||||
stream->prog = prog;
|
||||
stream->prog = virObjectRef(prog);
|
||||
stream->procedure = header->proc;
|
||||
stream->serial = header->serial;
|
||||
stream->filterID = -1;
|
||||
stream->st = st;
|
||||
|
||||
virNetServerProgramRef(prog);
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
@ -369,7 +355,7 @@ int daemonFreeClientStream(virNetServerClientPtr client,
|
||||
VIR_DEBUG("client=%p, proc=%d, serial=%d",
|
||||
client, stream->procedure, stream->serial);
|
||||
|
||||
virNetServerProgramFree(stream->prog);
|
||||
virObjectUnref(stream->prog);
|
||||
|
||||
msg = stream->rx;
|
||||
while (msg) {
|
||||
@ -415,10 +401,11 @@ int daemonAddClientStream(virNetServerClientPtr client,
|
||||
|
||||
if (virStreamEventAddCallback(stream->st, 0,
|
||||
daemonStreamEvent, client,
|
||||
daemonStreamEventFreeFunc) < 0)
|
||||
virObjectFreeCallback) < 0)
|
||||
return -1;
|
||||
|
||||
virNetServerClientRef(client);
|
||||
virObjectRef(client);
|
||||
|
||||
if ((stream->filterID = virNetServerClientAddFilter(client,
|
||||
daemonStreamFilter,
|
||||
stream)) < 0) {
|
||||
@ -618,11 +605,11 @@ daemonStreamHandleAbort(virNetServerClientPtr client,
|
||||
virStreamAbort(stream->st);
|
||||
|
||||
if (msg->header.status == VIR_NET_ERROR)
|
||||
virNetError(VIR_ERR_RPC,
|
||||
virReportError(VIR_ERR_RPC,
|
||||
"%s", _("stream aborted at client request"));
|
||||
else {
|
||||
VIR_WARN("unexpected stream status %d", msg->header.status);
|
||||
virNetError(VIR_ERR_RPC,
|
||||
virReportError(VIR_ERR_RPC,
|
||||
_("stream aborted with unexpected status %d"),
|
||||
msg->header.status);
|
||||
}
|
||||
|
@ -14,8 +14,8 @@
|
||||
* Lesser 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
|
||||
* License along with this library; If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
@ -1,553 +0,0 @@
|
||||
module Test_libvirtd =
|
||||
let conf = "# Master libvirt daemon configuration file
|
||||
#
|
||||
# For further information consult http://libvirt.org/format.html
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Network connectivity controls
|
||||
#
|
||||
|
||||
# Flag listening for secure TLS connections on the public TCP/IP port.
|
||||
# NB, must pass the --listen flag to the libvirtd process for this to
|
||||
# have any effect.
|
||||
#
|
||||
# It is necessary to setup a CA and issue server certificates before
|
||||
# using this capability.
|
||||
#
|
||||
# This is enabled by default, uncomment this to disable it
|
||||
listen_tls = 0
|
||||
|
||||
# Listen for unencrypted TCP connections on the public TCP/IP port.
|
||||
# NB, must pass the --listen flag to the libvirtd process for this to
|
||||
# have any effect.
|
||||
#
|
||||
# Using the TCP socket requires SASL authentication by default. Only
|
||||
# SASL mechanisms which support data encryption are allowed. This is
|
||||
# DIGEST_MD5 and GSSAPI (Kerberos5)
|
||||
#
|
||||
# This is disabled by default, uncomment this to enable it.
|
||||
listen_tcp = 1
|
||||
|
||||
|
||||
|
||||
# Override the port for accepting secure TLS connections
|
||||
# This can be a port number, or service name
|
||||
#
|
||||
tls_port = \"16514\"
|
||||
|
||||
# Override the port for accepting insecure TCP connections
|
||||
# This can be a port number, or service name
|
||||
#
|
||||
tcp_port = \"16509\"
|
||||
|
||||
|
||||
# Override the default configuration which binds to all network
|
||||
# interfaces. This can be a numeric IPv4/6 address, or hostname
|
||||
#
|
||||
listen_addr = \"192.168.0.1\"
|
||||
|
||||
|
||||
# Flag toggling mDNS advertizement of the libvirt service.
|
||||
#
|
||||
# Alternatively can disable for all services on a host by
|
||||
# stopping the Avahi daemon
|
||||
#
|
||||
# This is enabled by default, uncomment this to disable it
|
||||
mdns_adv = 0
|
||||
|
||||
# Override the default mDNS advertizement name. This must be
|
||||
# unique on the immediate broadcast network.
|
||||
#
|
||||
# The default is \"Virtualization Host HOSTNAME\", where HOSTNAME
|
||||
# is subsituted for the short hostname of the machine (without domain)
|
||||
#
|
||||
mdns_name = \"Virtualization Host Joe Demo\"
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# UNIX socket access controls
|
||||
#
|
||||
|
||||
# Set the UNIX domain socket group ownership. This can be used to
|
||||
# allow a 'trusted' set of users access to management capabilities
|
||||
# without becoming root.
|
||||
#
|
||||
# This is restricted to 'root' by default.
|
||||
unix_sock_group = \"libvirt\"
|
||||
|
||||
# Set the UNIX socket permissions for the R/O socket. This is used
|
||||
# for monitoring VM status only
|
||||
#
|
||||
# Default allows any user. If setting group ownership may want to
|
||||
# restrict this to:
|
||||
unix_sock_ro_perms = \"0777\"
|
||||
|
||||
# Set the UNIX socket permissions for the R/W socket. This is used
|
||||
# for full management of VMs
|
||||
#
|
||||
# Default allows only root. If PolicyKit is enabled on the socket,
|
||||
# the default will change to allow everyone (eg, 0777)
|
||||
#
|
||||
# If not using PolicyKit and setting group ownership for access
|
||||
# control then you may want to relax this to:
|
||||
unix_sock_rw_perms = \"0770\"
|
||||
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Authentication.
|
||||
#
|
||||
# - none: do not perform auth checks. If you can connect to the
|
||||
# socket you are allowed. This is suitable if there are
|
||||
# restrictions on connecting to the socket (eg, UNIX
|
||||
# socket permissions), or if there is a lower layer in
|
||||
# the network providing auth (eg, TLS/x509 certificates)
|
||||
#
|
||||
# - sasl: use SASL infrastructure. The actual auth scheme is then
|
||||
# controlled from /etc/sasl2/libvirt.conf. For the TCP
|
||||
# socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
|
||||
# For non-TCP or TLS sockets, any scheme is allowed.
|
||||
#
|
||||
# - polkit: use PolicyKit to authenticate. This is only suitable
|
||||
# for use on the UNIX sockets. The default policy will
|
||||
# require a user to supply their own password to gain
|
||||
# full read/write access (aka sudo like), while anyone
|
||||
# is allowed read/only access.
|
||||
#
|
||||
# Set an authentication scheme for UNIX read-only sockets
|
||||
# By default socket permissions allow anyone to connect
|
||||
#
|
||||
# To restrict monitoring of domains you may wish to enable
|
||||
# an authentication mechanism here
|
||||
auth_unix_ro = \"none\"
|
||||
|
||||
# Set an authentication scheme for UNIX read-write sockets
|
||||
# By default socket permissions only allow root. If PolicyKit
|
||||
# support was compiled into libvirt, the default will be to
|
||||
# use 'polkit' auth.
|
||||
#
|
||||
# If the unix_sock_rw_perms are changed you may wish to enable
|
||||
# an authentication mechanism here
|
||||
auth_unix_rw = \"none\"
|
||||
|
||||
# Change the authentication scheme for TCP sockets.
|
||||
#
|
||||
# If you don't enable SASL, then all TCP traffic is cleartext.
|
||||
# Don't do this outside of a dev/test scenario. For real world
|
||||
# use, always enable SASL and use the GSSAPI or DIGEST-MD5
|
||||
# mechanism in /etc/sasl2/libvirt.conf
|
||||
auth_tcp = \"sasl\"
|
||||
|
||||
# Change the authentication scheme for TLS sockets.
|
||||
#
|
||||
# TLS sockets already have encryption provided by the TLS
|
||||
# layer, and limited authentication is done by certificates
|
||||
#
|
||||
# It is possible to make use of any SASL authentication
|
||||
# mechanism as well, by using 'sasl' for this option
|
||||
auth_tls = \"none\"
|
||||
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# TLS x509 certificate configuration
|
||||
#
|
||||
|
||||
|
||||
# Override the default server key file path
|
||||
#
|
||||
key_file = \"/etc/pki/libvirt/private/serverkey.pem\"
|
||||
|
||||
# Override the default server certificate file path
|
||||
#
|
||||
cert_file = \"/etc/pki/libvirt/servercert.pem\"
|
||||
|
||||
# Override the default CA certificate path
|
||||
#
|
||||
ca_file = \"/etc/pki/CA/cacert.pem\"
|
||||
|
||||
# Specify a certificate revocation list.
|
||||
#
|
||||
# Defaults to not using a CRL, uncomment to enable it
|
||||
crl_file = \"/etc/pki/CA/crl.pem\"
|
||||
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Authorization controls
|
||||
#
|
||||
|
||||
|
||||
# Flag to disable verification of client certificates
|
||||
#
|
||||
# Client certificate verification is the primary authentication mechanism.
|
||||
# Any client which does not present a certificate signed by the CA
|
||||
# will be rejected.
|
||||
#
|
||||
# Default is to always verify. Uncommenting this will disable
|
||||
# verification - make sure an IP whitelist is set
|
||||
tls_no_verify_certificate = 1
|
||||
tls_no_sanity_certificate = 1
|
||||
|
||||
|
||||
# A whitelist of allowed x509 Distinguished Names
|
||||
# This list may contain wildcards such as
|
||||
#
|
||||
# \"C=GB,ST=London,L=London,O=Red Hat,CN=*\"
|
||||
#
|
||||
# See the POSIX fnmatch function for the format of the wildcards.
|
||||
#
|
||||
# NB If this is an empty list, no client can connect, so comment out
|
||||
# entirely rather than using empty list to disable these checks
|
||||
#
|
||||
# By default, no DN's are checked
|
||||
tls_allowed_dn_list = [\"DN1\", \"DN2\"]
|
||||
|
||||
|
||||
# A whitelist of allowed SASL usernames. The format for usernames
|
||||
# depends on the SASL authentication mechanism. Kerberos usernames
|
||||
# look like username@REALM
|
||||
#
|
||||
# This list may contain wildcards such as
|
||||
#
|
||||
# \"*@EXAMPLE.COM\"
|
||||
#
|
||||
# See the POSIX fnmatch function for the format of the wildcards.
|
||||
#
|
||||
# NB If this is an empty list, no client can connect, so comment out
|
||||
# entirely rather than using empty list to disable these checks
|
||||
#
|
||||
# By default, no Username's are checked
|
||||
sasl_allowed_username_list = [
|
||||
\"joe@EXAMPLE.COM\",
|
||||
\"fred@EXAMPLE.COM\"
|
||||
]
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Processing controls
|
||||
#
|
||||
|
||||
# The maximum number of concurrent client connections to allow
|
||||
# over all sockets combined.
|
||||
max_clients = 20
|
||||
|
||||
|
||||
# The minimum limit sets the number of workers to start up
|
||||
# initially. If the number of active clients exceeds this,
|
||||
# then more threads are spawned, upto max_workers limit.
|
||||
# Typically you'd want max_workers to equal maximum number
|
||||
# of clients allowed
|
||||
min_workers = 5
|
||||
max_workers = 20
|
||||
|
||||
# Total global limit on concurrent RPC calls. Should be
|
||||
# at least as large as max_workers. Beyond this, RPC requests
|
||||
# will be read into memory and queued. This directly impact
|
||||
# memory usage, currently each request requires 256 KB of
|
||||
# memory. So by default upto 5 MB of memory is used
|
||||
max_requests = 20
|
||||
|
||||
# Limit on concurrent requests from a single client
|
||||
# connection. To avoid one client monopolizing the server
|
||||
# this should be a small fraction of the global max_requests
|
||||
# and max_workers parameter
|
||||
max_client_requests = 5
|
||||
|
||||
# Logging level:
|
||||
log_level = 4
|
||||
|
||||
# Logging outputs:
|
||||
log_outputs=\"4:stderr\"
|
||||
|
||||
# Logging filters:
|
||||
log_filters=\"a\"
|
||||
|
||||
# Auditing:
|
||||
audit_level = 2
|
||||
"
|
||||
|
||||
test Libvirtd.lns get conf =
|
||||
{ "#comment" = "Master libvirt daemon configuration file" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "For further information consult http://libvirt.org/format.html" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Network connectivity controls" }
|
||||
{ "#comment" = "" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Flag listening for secure TLS connections on the public TCP/IP port." }
|
||||
{ "#comment" = "NB, must pass the --listen flag to the libvirtd process for this to" }
|
||||
{ "#comment" = "have any effect." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "It is necessary to setup a CA and issue server certificates before" }
|
||||
{ "#comment" = "using this capability." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This is enabled by default, uncomment this to disable it" }
|
||||
{ "listen_tls" = "0" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Listen for unencrypted TCP connections on the public TCP/IP port." }
|
||||
{ "#comment" = "NB, must pass the --listen flag to the libvirtd process for this to" }
|
||||
{ "#comment" = "have any effect." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Using the TCP socket requires SASL authentication by default. Only" }
|
||||
{ "#comment" = "SASL mechanisms which support data encryption are allowed. This is" }
|
||||
{ "#comment" = "DIGEST_MD5 and GSSAPI (Kerberos5)" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This is disabled by default, uncomment this to enable it." }
|
||||
{ "listen_tcp" = "1" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the port for accepting secure TLS connections" }
|
||||
{ "#comment" = "This can be a port number, or service name" }
|
||||
{ "#comment" = "" }
|
||||
{ "tls_port" = "16514" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the port for accepting insecure TCP connections" }
|
||||
{ "#comment" = "This can be a port number, or service name" }
|
||||
{ "#comment" = "" }
|
||||
{ "tcp_port" = "16509" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default configuration which binds to all network" }
|
||||
{ "#comment" = "interfaces. This can be a numeric IPv4/6 address, or hostname" }
|
||||
{ "#comment" = "" }
|
||||
{ "listen_addr" = "192.168.0.1" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Flag toggling mDNS advertizement of the libvirt service." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Alternatively can disable for all services on a host by" }
|
||||
{ "#comment" = "stopping the Avahi daemon" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This is enabled by default, uncomment this to disable it" }
|
||||
{ "mdns_adv" = "0" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default mDNS advertizement name. This must be" }
|
||||
{ "#comment" = "unique on the immediate broadcast network." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "The default is \"Virtualization Host HOSTNAME\", where HOSTNAME" }
|
||||
{ "#comment" = "is subsituted for the short hostname of the machine (without domain)" }
|
||||
{ "#comment" = "" }
|
||||
{ "mdns_name" = "Virtualization Host Joe Demo" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "UNIX socket access controls" }
|
||||
{ "#comment" = "" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Set the UNIX domain socket group ownership. This can be used to" }
|
||||
{ "#comment" = "allow a 'trusted' set of users access to management capabilities" }
|
||||
{ "#comment" = "without becoming root." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This is restricted to 'root' by default." }
|
||||
{ "unix_sock_group" = "libvirt" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Set the UNIX socket permissions for the R/O socket. This is used" }
|
||||
{ "#comment" = "for monitoring VM status only" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Default allows any user. If setting group ownership may want to" }
|
||||
{ "#comment" = "restrict this to:" }
|
||||
{ "unix_sock_ro_perms" = "0777" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Set the UNIX socket permissions for the R/W socket. This is used" }
|
||||
{ "#comment" = "for full management of VMs" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Default allows only root. If PolicyKit is enabled on the socket," }
|
||||
{ "#comment" = "the default will change to allow everyone (eg, 0777)" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "If not using PolicyKit and setting group ownership for access" }
|
||||
{ "#comment" = "control then you may want to relax this to:" }
|
||||
{ "unix_sock_rw_perms" = "0770" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Authentication." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "- none: do not perform auth checks. If you can connect to the" }
|
||||
{ "#comment" = "socket you are allowed. This is suitable if there are" }
|
||||
{ "#comment" = "restrictions on connecting to the socket (eg, UNIX" }
|
||||
{ "#comment" = "socket permissions), or if there is a lower layer in" }
|
||||
{ "#comment" = "the network providing auth (eg, TLS/x509 certificates)" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "- sasl: use SASL infrastructure. The actual auth scheme is then" }
|
||||
{ "#comment" = "controlled from /etc/sasl2/libvirt.conf. For the TCP" }
|
||||
{ "#comment" = "socket only GSSAPI & DIGEST-MD5 mechanisms will be used." }
|
||||
{ "#comment" = "For non-TCP or TLS sockets, any scheme is allowed." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "- polkit: use PolicyKit to authenticate. This is only suitable" }
|
||||
{ "#comment" = "for use on the UNIX sockets. The default policy will" }
|
||||
{ "#comment" = "require a user to supply their own password to gain" }
|
||||
{ "#comment" = "full read/write access (aka sudo like), while anyone" }
|
||||
{ "#comment" = "is allowed read/only access." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Set an authentication scheme for UNIX read-only sockets" }
|
||||
{ "#comment" = "By default socket permissions allow anyone to connect" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "To restrict monitoring of domains you may wish to enable" }
|
||||
{ "#comment" = "an authentication mechanism here" }
|
||||
{ "auth_unix_ro" = "none" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Set an authentication scheme for UNIX read-write sockets" }
|
||||
{ "#comment" = "By default socket permissions only allow root. If PolicyKit" }
|
||||
{ "#comment" = "support was compiled into libvirt, the default will be to" }
|
||||
{ "#comment" = "use 'polkit' auth." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "If the unix_sock_rw_perms are changed you may wish to enable" }
|
||||
{ "#comment" = "an authentication mechanism here" }
|
||||
{ "auth_unix_rw" = "none" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Change the authentication scheme for TCP sockets." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "If you don't enable SASL, then all TCP traffic is cleartext." }
|
||||
{ "#comment" = "Don't do this outside of a dev/test scenario. For real world" }
|
||||
{ "#comment" = "use, always enable SASL and use the GSSAPI or DIGEST-MD5" }
|
||||
{ "#comment" = "mechanism in /etc/sasl2/libvirt.conf" }
|
||||
{ "auth_tcp" = "sasl" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Change the authentication scheme for TLS sockets." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "TLS sockets already have encryption provided by the TLS" }
|
||||
{ "#comment" = "layer, and limited authentication is done by certificates" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "It is possible to make use of any SASL authentication" }
|
||||
{ "#comment" = "mechanism as well, by using 'sasl' for this option" }
|
||||
{ "auth_tls" = "none" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "TLS x509 certificate configuration" }
|
||||
{ "#comment" = "" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default server key file path" }
|
||||
{ "#comment" = "" }
|
||||
{ "key_file" = "/etc/pki/libvirt/private/serverkey.pem" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default server certificate file path" }
|
||||
{ "#comment" = "" }
|
||||
{ "cert_file" = "/etc/pki/libvirt/servercert.pem" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default CA certificate path" }
|
||||
{ "#comment" = "" }
|
||||
{ "ca_file" = "/etc/pki/CA/cacert.pem" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Specify a certificate revocation list." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Defaults to not using a CRL, uncomment to enable it" }
|
||||
{ "crl_file" = "/etc/pki/CA/crl.pem" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Authorization controls" }
|
||||
{ "#comment" = "" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Flag to disable verification of client certificates" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Client certificate verification is the primary authentication mechanism." }
|
||||
{ "#comment" = "Any client which does not present a certificate signed by the CA" }
|
||||
{ "#comment" = "will be rejected." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Default is to always verify. Uncommenting this will disable" }
|
||||
{ "#comment" = "verification - make sure an IP whitelist is set" }
|
||||
{ "tls_no_verify_certificate" = "1" }
|
||||
{ "tls_no_sanity_certificate" = "1" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "A whitelist of allowed x509 Distinguished Names" }
|
||||
{ "#comment" = "This list may contain wildcards such as" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "\"C=GB,ST=London,L=London,O=Red Hat,CN=*\"" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "See the POSIX fnmatch function for the format of the wildcards." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "NB If this is an empty list, no client can connect, so comment out" }
|
||||
{ "#comment" = "entirely rather than using empty list to disable these checks" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "By default, no DN's are checked" }
|
||||
{ "tls_allowed_dn_list"
|
||||
{ "1" = "DN1"}
|
||||
{ "2" = "DN2"}
|
||||
}
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "A whitelist of allowed SASL usernames. The format for usernames" }
|
||||
{ "#comment" = "depends on the SASL authentication mechanism. Kerberos usernames" }
|
||||
{ "#comment" = "look like username@REALM" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This list may contain wildcards such as" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "\"*@EXAMPLE.COM\"" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "See the POSIX fnmatch function for the format of the wildcards." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "NB If this is an empty list, no client can connect, so comment out" }
|
||||
{ "#comment" = "entirely rather than using empty list to disable these checks" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "By default, no Username's are checked" }
|
||||
{ "sasl_allowed_username_list"
|
||||
{ "1" = "joe@EXAMPLE.COM" }
|
||||
{ "2" = "fred@EXAMPLE.COM" }
|
||||
}
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################"}
|
||||
{ "#comment" = ""}
|
||||
{ "#comment" = "Processing controls"}
|
||||
{ "#comment" = ""}
|
||||
{ "#empty" }
|
||||
{ "#comment" = "The maximum number of concurrent client connections to allow"}
|
||||
{ "#comment" = "over all sockets combined."}
|
||||
{ "max_clients" = "20" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "The minimum limit sets the number of workers to start up"}
|
||||
{ "#comment" = "initially. If the number of active clients exceeds this,"}
|
||||
{ "#comment" = "then more threads are spawned, upto max_workers limit."}
|
||||
{ "#comment" = "Typically you'd want max_workers to equal maximum number"}
|
||||
{ "#comment" = "of clients allowed"}
|
||||
{ "min_workers" = "5" }
|
||||
{ "max_workers" = "20" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Total global limit on concurrent RPC calls. Should be" }
|
||||
{ "#comment" = "at least as large as max_workers. Beyond this, RPC requests" }
|
||||
{ "#comment" = "will be read into memory and queued. This directly impact" }
|
||||
{ "#comment" = "memory usage, currently each request requires 256 KB of" }
|
||||
{ "#comment" = "memory. So by default upto 5 MB of memory is used" }
|
||||
{ "max_requests" = "20" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Limit on concurrent requests from a single client" }
|
||||
{ "#comment" = "connection. To avoid one client monopolizing the server" }
|
||||
{ "#comment" = "this should be a small fraction of the global max_requests" }
|
||||
{ "#comment" = "and max_workers parameter" }
|
||||
{ "max_client_requests" = "5" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Logging level:" }
|
||||
{ "log_level" = "4" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Logging outputs:" }
|
||||
{ "log_outputs" = "4:stderr" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Logging filters:" }
|
||||
{ "log_filters" = "a" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Auditing:" }
|
||||
{ "audit_level" = "2" }
|
49
daemon/test_libvirtd.aug.in
Normal file
@ -0,0 +1,49 @@
|
||||
module Test_libvirtd =
|
||||
::CONFIG::
|
||||
|
||||
test Libvirtd.lns get conf =
|
||||
{ "listen_tls" = "0" }
|
||||
{ "listen_tcp" = "1" }
|
||||
{ "tls_port" = "16514" }
|
||||
{ "tcp_port" = "16509" }
|
||||
{ "listen_addr" = "192.168.0.1" }
|
||||
{ "mdns_adv" = "1" }
|
||||
{ "mdns_name" = "Virtualization Host Joe Demo" }
|
||||
{ "unix_sock_group" = "libvirt" }
|
||||
{ "unix_sock_ro_perms" = "0777" }
|
||||
{ "unix_sock_rw_perms" = "0770" }
|
||||
{ "unix_sock_dir" = "/var/run/libvirt" }
|
||||
{ "auth_unix_ro" = "none" }
|
||||
{ "auth_unix_rw" = "none" }
|
||||
{ "auth_tcp" = "sasl" }
|
||||
{ "auth_tls" = "none" }
|
||||
{ "key_file" = "/etc/pki/libvirt/private/serverkey.pem" }
|
||||
{ "cert_file" = "/etc/pki/libvirt/servercert.pem" }
|
||||
{ "ca_file" = "/etc/pki/CA/cacert.pem" }
|
||||
{ "crl_file" = "/etc/pki/CA/crl.pem" }
|
||||
{ "tls_no_sanity_certificate" = "1" }
|
||||
{ "tls_no_verify_certificate" = "1" }
|
||||
{ "tls_allowed_dn_list"
|
||||
{ "1" = "DN1"}
|
||||
{ "2" = "DN2"}
|
||||
}
|
||||
{ "sasl_allowed_username_list"
|
||||
{ "1" = "joe@EXAMPLE.COM" }
|
||||
{ "2" = "fred@EXAMPLE.COM" }
|
||||
}
|
||||
{ "max_clients" = "20" }
|
||||
{ "min_workers" = "5" }
|
||||
{ "max_workers" = "20" }
|
||||
{ "prio_workers" = "5" }
|
||||
{ "max_requests" = "20" }
|
||||
{ "max_client_requests" = "5" }
|
||||
{ "log_level" = "3" }
|
||||
{ "log_filters" = "3:remote 4:event" }
|
||||
{ "log_outputs" = "3:syslog:libvirtd" }
|
||||
{ "log_buffer_size" = "64" }
|
||||
{ "audit_level" = "2" }
|
||||
{ "audit_logging" = "1" }
|
||||
{ "host_uuid" = "00000000-0000-0000-0000-000000000000" }
|
||||
{ "keepalive_interval" = "5" }
|
||||
{ "keepalive_count" = "5" }
|
||||
{ "keepalive_required" = "1" }
|
8
docs/.gitignore
vendored
@ -1,8 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.memdump
|
||||
apibuild.pyc
|
||||
*.html
|
||||
libvirt-api.xml
|
||||
libvirt-refs.xml
|
||||
todo.html.in
|
23
docs/404.html.in
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>404 page not found</h1>
|
||||
|
||||
<p>
|
||||
Someone appears to have eaten the <del>penguin</del>
|
||||
page you were looking for. You might want to try
|
||||
</p>
|
||||
<ul>
|
||||
<li>going back to the <a href="http://libvirt.org/">home page</a> to find
|
||||
a collection of links to interesting pages on this site</li>
|
||||
<li>using the search box at the top right corner of the screen to
|
||||
locate the content on this site or mailing list archives</li>
|
||||
</ul>
|
||||
|
||||
<p class="image">
|
||||
<img src="/libvirtLogo404.png" alt="libvirt Logo"/>
|
||||
</p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2011 Red Hat, Inc.
|
||||
## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
SUBDIRS= schemas
|
||||
@ -75,6 +75,10 @@ dot_html_in = $(notdir $(wildcard $(srcdir)/*.html.in)) todo.html.in hvsupport.h
|
||||
$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/internals/*.html.in))
|
||||
dot_html = $(dot_html_in:%.html.in=%.html)
|
||||
|
||||
dot_php_in = $(notdir $(wildcard $(srcdir)/*.php.in))
|
||||
dot_php_code_in = $(dot_php_in:%.php.in=%.php.code.in)
|
||||
dot_php = $(dot_php_in:%.php.in=%.php)
|
||||
|
||||
patches = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/api_extension/*.patch))
|
||||
|
||||
xml = \
|
||||
@ -85,6 +89,9 @@ qemu_xml = \
|
||||
libvirt-qemu-api.xml \
|
||||
libvirt-qemu-refs.xml
|
||||
|
||||
apidir = $(pkgdatadir)/api
|
||||
api_DATA = libvirt-api.xml libvirt-qemu-api.xml
|
||||
|
||||
fig = \
|
||||
libvirt-net-logical.fig \
|
||||
libvirt-net-physical.fig \
|
||||
@ -104,21 +111,22 @@ EXTRA_DIST= \
|
||||
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
|
||||
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
|
||||
$(xml) $(qemu_xml) $(fig) $(png) $(css) \
|
||||
$(patches) \
|
||||
$(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\
|
||||
sitemap.html.in \
|
||||
todo.pl hvsupport.pl todo.cfg-example
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(addprefix $(srcdir)/,$(dot_html)) \
|
||||
$(addprefix $(srcdir)/,$(apihtml)) \
|
||||
$(addprefix $(srcdir)/,$(devhelphtml))
|
||||
$(addprefix $(srcdir)/,$(devhelphtml)) \
|
||||
$(addprefix $(srcdir)/,$(dot_php))
|
||||
|
||||
all: web
|
||||
all-am: web
|
||||
|
||||
api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
|
||||
qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
|
||||
|
||||
web: $(dot_html) html/index.html devhelp/index.html
|
||||
web: $(dot_html) html/index.html devhelp/index.html $(dot_php)
|
||||
|
||||
todo.html.in: todo.pl
|
||||
if [ -f todo.cfg ]; then \
|
||||
@ -170,6 +178,18 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
|
||||
|| { rm $(srcdir)/$@ && exit 1; }; \
|
||||
else echo "missing XHTML1 DTD" ; fi ; fi
|
||||
|
||||
%.php.tmp: %.php.in site.xsl page.xsl sitemap.html.in
|
||||
@if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Generating $@"; \
|
||||
$(XSLTPROC) --stringparam pagename $(@:.tmp=) --nonet --html \
|
||||
$(top_srcdir)/docs/site.xsl $< > $@ \
|
||||
|| { rm $@ && exit 1; }; fi
|
||||
|
||||
%.php: %.php.tmp %.php.code.in
|
||||
@echo "Scripting $@"; \
|
||||
sed -e '/<a id="php_placeholder"><\/a>/r '"$(srcdir)/$@.code.in" \
|
||||
-e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
|
||||
|| { rm $(srcdir)/$@ && exit 1; }
|
||||
|
||||
html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
|
||||
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||
@ -197,12 +217,22 @@ python_generated_files = \
|
||||
$(srcdir)/libvirt-qemu-api.xml \
|
||||
$(srcdir)/libvirt-qemu-refs.xml
|
||||
|
||||
$(python_generated_files): $(srcdir)/apibuild.py \
|
||||
$(srcdir)/../include/libvirt/*.h \
|
||||
APIBUILD=$(srcdir)/apibuild.py
|
||||
APIBUILD_STAMP=$(APIBUILD).stamp
|
||||
EXTRA_DIST += $(APIBUILD_STAMP)
|
||||
|
||||
$(python_generated_files): $(APIBUILD_STAMP)
|
||||
|
||||
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
|
||||
$(srcdir)/../include/libvirt/libvirt.h.in \
|
||||
$(srcdir)/../include/libvirt/libvirt-qemu.h \
|
||||
$(srcdir)/../include/libvirt/virterror.h \
|
||||
$(srcdir)/../src/libvirt.c \
|
||||
$(srcdir)/../src/libvirt-qemu.c \
|
||||
$(srcdir)/../src/util/virterror.c
|
||||
$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(srcdir)/apibuild.py
|
||||
$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(APIBUILD)
|
||||
touch $@
|
||||
|
||||
|
||||
check-local: all
|
||||
|
||||
@ -212,6 +242,7 @@ clean-local:
|
||||
maintainer-clean-local: clean-local
|
||||
rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml todo.html.in hvsupport.html.in
|
||||
rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
|
||||
rm -rf $(APIBUILD_STAMP)
|
||||
|
||||
rebuild: api qemu_api all
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
<li>virNetworkPtr: represent one network either active or defined (i.e.
|
||||
existing as permanent config file and storage but not currently activated.
|
||||
The function <code class='docref'>virConnectListNetworks</code>
|
||||
allows to list all the virtualization networks actived on this node.</li>
|
||||
allows to list all the virtualization networks activated on this node.</li>
|
||||
<li>virStorageVolPtr: represent one storage volume, usually this is used
|
||||
as a block device available to one of the domains. The function
|
||||
<code class="docref">virStorageVolLookupByPath</code> allows to find
|
||||
|
@ -1,8 +1,4 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Implementing a new API in Libvirt</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Implementing a new API in Libvirt</h1>
|
||||
|
||||
|
@ -100,7 +100,7 @@ index dfc6415..3642296 100644
|
||||
+ /* If xendConfigVersion is 2, then we can only report _LIVE (and
|
||||
+ * xm_internal reports _CONFIG). If it is 3, then _LIVE and
|
||||
+ * _CONFIG are always in sync for a running system. */
|
||||
+ if (domain->id < 0 && priv->xendConfigVersion < 3)
|
||||
+ if (domain->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4)
|
||||
+ return -2;
|
||||
+ if (domain->id < 0 && (flags & VIR_DOMAIN_VCPU_LIVE)) {
|
||||
+ virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
|
@ -110,7 +110,7 @@ index fe2ff86..66e8518 100644
|
||||
+ * depends on xendConfigVersion. */
|
||||
+ if (dom) {
|
||||
+ priv = dom->conn->privateData;
|
||||
+ if (priv->xendConfigVersion >= 3)
|
||||
+ if (priv->xendConfigVersion >= XEND_CONFIG_VERSION_3_0_4)
|
||||
+ flags |= VIR_DOMAIN_VCPU_CONFIG;
|
||||
+ }
|
||||
+ return xenUnifiedDomainSetVcpusFlags(dom, nvcpus, flags);
|
||||
@ -163,14 +163,14 @@ index 3642296..55c2cc4 100644
|
||||
+
|
||||
+ priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
|
||||
+
|
||||
+ if ((domain->id < 0 && priv->xendConfigVersion < 3) ||
|
||||
+ if ((domain->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) ||
|
||||
+ (flags & VIR_DOMAIN_VCPU_MAXIMUM))
|
||||
+ return -2;
|
||||
+
|
||||
+ /* With xendConfigVersion 2, only _LIVE is supported. With
|
||||
+ * xendConfigVersion 3, only _LIVE|_CONFIG is supported for
|
||||
+ * running domains, or _CONFIG for inactive domains. */
|
||||
+ if (priv->xendConfigVersion < 3) {
|
||||
+ if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) {
|
||||
+ if (flags & VIR_DOMAIN_VCPU_CONFIG) {
|
||||
+ virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
+ _("Xend version does not support modifying "
|
||||
|
@ -122,7 +122,7 @@ index 55c2cc4..b90c331 100644
|
||||
-
|
||||
- priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
|
||||
-
|
||||
- if (domain->id < 0 && priv->xendConfigVersion < 3)
|
||||
- if (domain->id < 0 && priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4)
|
||||
- return(-1);
|
||||
-
|
||||
- snprintf(buf, sizeof(buf), "%d", vcpus);
|
||||
|
118
docs/apibuild.py
@ -1355,6 +1355,95 @@ class CParser:
|
||||
token = self.token()
|
||||
return token
|
||||
|
||||
def parseVirEnumDecl(self, token):
|
||||
if token[0] != "name":
|
||||
self.error("parsing VIR_ENUM_DECL: expecting name", token)
|
||||
|
||||
token = self.token()
|
||||
|
||||
if token[0] != "sep":
|
||||
self.error("parsing VIR_ENUM_DECL: expecting ')'", token)
|
||||
|
||||
if token[1] != ')':
|
||||
self.error("parsing VIR_ENUM_DECL: expecting ')'", token)
|
||||
|
||||
token = self.token()
|
||||
if token[0] == "sep" and token[1] == ';':
|
||||
token = self.token()
|
||||
|
||||
return token
|
||||
|
||||
def parseVirEnumImpl(self, token):
|
||||
# First the type name
|
||||
if token[0] != "name":
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting name", token)
|
||||
|
||||
token = self.token()
|
||||
|
||||
if token[0] != "sep":
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting ','", token)
|
||||
|
||||
if token[1] != ',':
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting ','", token)
|
||||
token = self.token()
|
||||
|
||||
# Now the sentinel name
|
||||
if token[0] != "name":
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting name", token)
|
||||
|
||||
token = self.token()
|
||||
|
||||
if token[0] != "sep":
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting ','", token)
|
||||
|
||||
if token[1] != ',':
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting ','", token)
|
||||
|
||||
token = self.token()
|
||||
|
||||
# Now a list of strings (optional comments)
|
||||
while token is not None:
|
||||
isGettext = False
|
||||
# First a string, optionally with N_(...)
|
||||
if token[0] == 'name':
|
||||
if token[1] != 'N_':
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting 'N_'", token)
|
||||
token = self.token()
|
||||
if token[0] != "sep" or token[1] != '(':
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting '('", token)
|
||||
token = self.token()
|
||||
isGettext = True
|
||||
|
||||
if token[0] != "string":
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting a string", token)
|
||||
token = self.token()
|
||||
elif token[0] == "string":
|
||||
token = self.token()
|
||||
else:
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting a string", token)
|
||||
|
||||
# Then a separator
|
||||
if token[0] == "sep":
|
||||
if isGettext and token[1] == ')':
|
||||
token = self.token()
|
||||
|
||||
if token[1] == ',':
|
||||
token = self.token()
|
||||
|
||||
if token[1] == ')':
|
||||
token = self.token()
|
||||
break
|
||||
|
||||
# Then an optional comment
|
||||
if token[0] == "comment":
|
||||
token = self.token()
|
||||
|
||||
|
||||
if token[0] == "sep" and token[1] == ';':
|
||||
token = self.token()
|
||||
|
||||
return token
|
||||
|
||||
#
|
||||
# Parse a C definition block, used for structs or unions it parse till
|
||||
# the balancing }
|
||||
@ -1502,6 +1591,29 @@ class CParser:
|
||||
not self.is_header, "enum",
|
||||
(enum[1], enum[2], enum_type))
|
||||
return token
|
||||
elif token[0] == "name" and token[1] == "VIR_ENUM_DECL":
|
||||
token = self.token()
|
||||
if token != None and token[0] == "sep" and token[1] == "(":
|
||||
token = self.token()
|
||||
token = self.parseVirEnumDecl(token)
|
||||
else:
|
||||
self.error("parsing VIR_ENUM_DECL: expecting '('", token)
|
||||
if token != None:
|
||||
self.lexer.push(token)
|
||||
token = ("name", "virenumdecl")
|
||||
return token
|
||||
|
||||
elif token[0] == "name" and token[1] == "VIR_ENUM_IMPL":
|
||||
token = self.token()
|
||||
if token != None and token[0] == "sep" and token[1] == "(":
|
||||
token = self.token()
|
||||
token = self.parseVirEnumImpl(token)
|
||||
else:
|
||||
self.error("parsing VIR_ENUM_IMPL: expecting '('", token)
|
||||
if token != None:
|
||||
self.lexer.push(token)
|
||||
token = ("name", "virenumimpl")
|
||||
return token
|
||||
|
||||
elif token[0] == "name":
|
||||
if self.type == "":
|
||||
@ -1649,6 +1761,7 @@ class CParser:
|
||||
"virDomainSetMemoryFlags" : (False, ("memory")),
|
||||
"virDomainBlockJobSetSpeed" : (False, ("bandwidth")),
|
||||
"virDomainBlockPull" : (False, ("bandwidth")),
|
||||
"virDomainBlockRebase" : (False, ("bandwidth")),
|
||||
"virDomainMigrateGetMaxSpeed" : (False, ("bandwidth")) }
|
||||
|
||||
def checkLongLegacyFunction(self, name, return_type, signature):
|
||||
@ -1848,6 +1961,11 @@ class docBuilder:
|
||||
self.index = {}
|
||||
self.basename = name
|
||||
|
||||
def warning(self, msg):
|
||||
global warnings
|
||||
warnings = warnings + 1
|
||||
print msg
|
||||
|
||||
def indexString(self, id, str):
|
||||
if str == None:
|
||||
return
|
||||
|
@ -219,6 +219,14 @@
|
||||
community. It uses libvirt for communication with all KVM and Xen
|
||||
virtual machines.
|
||||
</dd>
|
||||
|
||||
<dt><a href="http://snooze.inria.fr">Snooze</a></dt>
|
||||
<dd>
|
||||
Snooze is an open-source scalable, autonomic, and energy-efficient
|
||||
virtual machine (VM) management framework for private clouds. It
|
||||
integrates libvirt for VM monitoring, live migration, and life-cycle
|
||||
management.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name="libraries">Libraries</a></h2>
|
||||
@ -348,5 +356,16 @@
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name="mobile">Mobile applications</a></h2>
|
||||
|
||||
<dl>
|
||||
<dt><a href="https://market.android.com/details?id=vm.manager">VM Manager</a></dt>
|
||||
<dd>
|
||||
VM Manager is VM (libvirt) manager (over SSH) application. VM Manager
|
||||
is an application for libvirt VM / Domain management over SSH.
|
||||
Please keep in mind that this software is under heavy development.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1 >Access control</h1>
|
||||
<h1 >Authentication & access control</h1>
|
||||
<p>
|
||||
When connecting to libvirt, some connections may require client
|
||||
authentication before allowing use of the APIs. The set of possible
|
||||
@ -11,6 +11,122 @@
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<h2><a name="Auth_client_config">Client configuration</a></h2>
|
||||
|
||||
<p>
|
||||
When connecting to a remote hypervisor which requires authentication,
|
||||
most libvirt applications will prompt the user for the credentials. It is
|
||||
also possible to provide a client configuration file containing all the
|
||||
authentication credentials, avoiding any interaction. Libvirt will look
|
||||
for the authentication file using the following sequence:
|
||||
</p>
|
||||
<ol>
|
||||
<li>The file path specified by the $LIBVIRT_AUTH_FILE environment
|
||||
variable.</li>
|
||||
<li>The file path specified by the "authfile=/some/file" URI
|
||||
query parameter</li>
|
||||
<li>The file $XDG_CONFIG_DIR/libvirt/auth.conf</li>
|
||||
<li>The file /etc/libvirt/auth.conf</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
The auth configuration file uses the traditional <code>".ini"</code>
|
||||
style syntax. There are two types of groups that can be present in
|
||||
the config. First there are one or more <strong>credential</strong>
|
||||
sets, which provide the actual authentication credentials. The keys
|
||||
within the group may be:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><code>username</code>: the user login name to act as. This
|
||||
is relevant for ESX, Xen, HyperV and SSH, but probably not
|
||||
the one you want to libvirtd with SASL.</li>
|
||||
<li><code>authname</code>: the name to authorize as. This is
|
||||
what is commonly required for libvirtd with SASL.</li>
|
||||
<li><code>password</code>: the secret password</li>
|
||||
<li><code>realm</code>: the domain realm for SASL, mostly
|
||||
unused</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Each set of credentials has a name, which is part of the group
|
||||
entry name. Overall the syntax is
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
[credentials-$NAME]
|
||||
credname1=value1
|
||||
credname2=value2</pre>
|
||||
|
||||
<p>
|
||||
For example, to define two sets of credentials used for production
|
||||
and test machines, using libvirtd, and a further ESX server for dev:
|
||||
</p>
|
||||
<pre>
|
||||
[credentials-test]
|
||||
authname=fred
|
||||
password=123456
|
||||
|
||||
[credentials-prod]
|
||||
authname=bar
|
||||
password=letmein
|
||||
|
||||
[credentials-dev]
|
||||
username=joe
|
||||
password=hello</pre>
|
||||
|
||||
<p>
|
||||
The second set of groups provide mappings of credentials to
|
||||
specific machine services. The config file group names compromise
|
||||
the service type and host:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
[auth-$SERVICE-$HOSTNAME]
|
||||
credentials=$CREDENTIALS</pre>
|
||||
|
||||
<p>
|
||||
For example, following the previous example, here is how to
|
||||
list some machines
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
[auth-libvirt-test1.example.com]
|
||||
credentials=test
|
||||
|
||||
[auth-libvirt-test2.example.com]
|
||||
credentials=test
|
||||
|
||||
[auth-libvirt-demo3.example.com]
|
||||
credentials=test
|
||||
|
||||
[auth-libvirt-prod1.example.com]
|
||||
credentials=prod
|
||||
|
||||
[auth-esx-dev1.example.com]
|
||||
credentials=dev</pre>
|
||||
|
||||
<p>
|
||||
The following service types are known to libvirt
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li><code>libvirt</code> - used for connections to a libvirtd
|
||||
server, which is configured with SASL auth</li>
|
||||
<li><code>ssh</code> - used for connections to a Phyp server
|
||||
over SSH</li>
|
||||
<li><code>esx</code> - used for connections to an ESX or
|
||||
VirtualCenter server</li>
|
||||
<li><code>xen</code> - used for connections to a Xen Enterprise
|
||||
sever using XenAPI</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
Applications using libvirt are free to use this same configuration
|
||||
file for storing other credentials. For example, it can be used
|
||||
to storage VNC or SPICE login credentials
|
||||
</p>
|
||||
|
||||
<h2><a name="ACL_server_config">Server configuration</a></h2>
|
||||
<p>
|
||||
The libvirt daemon allows the administrator to choose the authentication
|
||||
|
@ -9,22 +9,47 @@
|
||||
<h2><a name="bugzilla">Bug Tracking</a></h2>
|
||||
|
||||
<p>
|
||||
The <a href="http://bugzilla.redhat.com">Red Hat Bugzilla Server</a>
|
||||
should be used to report bugs and request features in libvirt.
|
||||
Before submitting a ticket, check the existing tickets to see if
|
||||
the bug/feature is already tracked.
|
||||
If you are using libvirt binaries from a Linux distribution
|
||||
check below for distribution specific bug reporting policies
|
||||
first.
|
||||
</p>
|
||||
|
||||
<h2><a name="general">General libvirt bug reports</a></h2>
|
||||
|
||||
<p>
|
||||
If you are using official libvirt binaries from a Linux distribution
|
||||
check below for distribution specific bug reporting policies first.
|
||||
The <a href="http://bugzilla.redhat.com">Red Hat Bugzilla Server</a>
|
||||
should be used to report bugs and request features in libvirt.
|
||||
Before submitting a ticket, check the existing tickets to see if
|
||||
the bug/feature is already tracked.
|
||||
|
||||
For general libvirt bug reports, from self-built releases, GIT snapshots
|
||||
and any other non-distribution supported builds, enter tickets under
|
||||
the <code>Virtualization Tools</code> product and the <code>libvirt</code>
|
||||
component.
|
||||
</p>
|
||||
<p>
|
||||
It's always a good idea to file bug reports, as the process of
|
||||
filing the report always makes it easier to describe the
|
||||
problem, and the bug number provides a quick way of referring to
|
||||
the problem. However, not everybody in the community pays
|
||||
attention to bugzilla, so after you file a bug, asking questions
|
||||
and submitting patches on <a href="contact.html">the libvirt
|
||||
mailing lists</a> will increase your bug's visibility and
|
||||
encourage people to think about your problem. Don't hesitate to
|
||||
ask questions on the list, as others may know of existing
|
||||
solutions or be interested in collaborating with you on finding
|
||||
a solution. Patches are always appreciated, and it's likely
|
||||
that someone else has the same problem you do!
|
||||
</p>
|
||||
<p>
|
||||
If you decide to write code, though, before you begin please
|
||||
read the <a href="hacking.html">contributor guidelines</a>,
|
||||
especially the first point: "Discuss any large changes on the
|
||||
mailing list first. Post patches early and listen to feedback."
|
||||
Few development experiences are more discouraging than spending
|
||||
a bunch of time writing a patch only to have someone point out a
|
||||
better approach on list.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Virtualization%20Tools">View libvirt tickets</a></li>
|
||||
@ -34,26 +59,37 @@
|
||||
<h2><a name="distribution">Linux Distribution specific bug reports</a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
If you are using official binaries from a <strong>Fedora distribution</strong>, enter
|
||||
tickets against the <code>Fedora</code> product and the <code>libvirt</code>
|
||||
component.
|
||||
If you are using binaries from <strong>Fedora</strong>, enter
|
||||
tickets against the <code>Fedora</code> product and
|
||||
the <code>libvirt</code> component.
|
||||
<ul>
|
||||
<li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Fedora">View Fedora libvirt tickets</a></li>
|
||||
<li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&component=libvirt">New Fedora libvirt ticket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
If you are using official binaries from <strong>Red Hat Enterprise Linux distribution</strong>,
|
||||
tickets against the <code>Red Hat Enterprise Linux 5</code> product and
|
||||
the <code>libvirt</code> component.
|
||||
<ul>
|
||||
<li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Red%20Hat%20Enterprise%20Linux%205">View Red Hat Enterprise Linux libvirt tickets</a></li>
|
||||
<li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%205&component=libvirt">New Red Hat Enterprise Linux libvirt ticket</a></li>
|
||||
</ul>
|
||||
<p>
|
||||
If you are using binaries from <strong>Red Hat Enterprise
|
||||
Linux</strong>, enter tickets against the Red Hat Enterprise
|
||||
Linux product that you're using (e.g., Red Hat Enterprise
|
||||
Linux 6) and the <code>libvirt</code> component. Red Hat
|
||||
bugzilla has <a href="http://bugzilla.redhat.com">additional guidance</a> about getting support if
|
||||
you are a Red Hat customer.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
If you are using official binaries from another Linux distribution first
|
||||
follow their own bug reporting guidelines.
|
||||
<p>
|
||||
If you are using binaries from another Linux distribution
|
||||
first follow their own bug reporting guidelines.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
Finally, if you are a contributor to another Linux
|
||||
distribution and would like to have your procedure for
|
||||
filing bugs mentioned here, please mail the libvirt
|
||||
development list.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -81,18 +117,18 @@
|
||||
If the bug leads to a tool linked to libvirt crash, then the best
|
||||
is to provide a backtrace along with the scenario used to get the
|
||||
crash, the simplest is to run the program under gdb, reproduce the
|
||||
steps leading to the crash and then issue a gdb "bt" command to
|
||||
steps leading to the crash and then issue a gdb "bt -a" command to
|
||||
get the stack trace, attach it to the bug. Note that for the
|
||||
data to be really useful libvirt debug informations must be present
|
||||
for example by installing libvirt debuginfo package on Fedora or
|
||||
Red Hat Enterprise Linux (with debuginfo-install libvirt) prior
|
||||
to running gdb.</p>
|
||||
<p>
|
||||
It may also happen that the libvirt daemon itself crashes or get stuck,
|
||||
It may also happen that the libvirt daemon itself crashes or gets stuck,
|
||||
in the first case run it (as root) under gdb, and reproduce the sequence
|
||||
leading to the crash, similary to a normal program provide the
|
||||
leading to the crash, similarly to a normal program provide the
|
||||
"bt" backtrace information to where gdb will have stopped.<br/>
|
||||
But if libvirtd get stuck, for example seems to stop processing
|
||||
But if libvirtd gets stuck, for example seems to stop processing
|
||||
commands, try to attach to the faulty daemon and issue a gdb command
|
||||
"thread apply all bt" to show all the threads backtraces, as in:</p>
|
||||
<pre> # ps -o etime,pid `pgrep libvirt`
|
||||
@ -106,10 +142,5 @@
|
||||
(gdb)
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If requesting a new feature attach any available patch to the ticket
|
||||
and also email the patch to the libvirt mailing list for discussion
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -62,14 +62,57 @@
|
||||
<p>
|
||||
The libvirt build process uses GNU autotools, so after obtaining a
|
||||
checkout it is necessary to generate the configure script and Makefile.in
|
||||
templates using the <code>autogen.sh</code> command, passing the extra
|
||||
arguments as for configure. As an example, to do a complete build and
|
||||
install it into your home directory run:
|
||||
templates using the <code>autogen.sh</code> command. By default when
|
||||
the <code>configure</code> script is run from within a GIT checkout, it
|
||||
will turn on -Werror for builds. This can be disabled with --disable-werror,
|
||||
but this is not recommended. To build & install libvirt to your home
|
||||
directory the following commands can be run:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ ./autogen.sh --prefix=$HOME/usr --enable-compile-warnings=error
|
||||
$ ./autogen.sh --prefix=$HOME/usr
|
||||
$ make
|
||||
$ <b>sudo</b> make install</pre>
|
||||
|
||||
<p>
|
||||
Be aware though, that binaries built with a custom prefix will not
|
||||
interoperate with OS vendor provided binaries, since the UNIX socket
|
||||
paths will all be different. To produce a build that is compatible
|
||||
with normal OS vendor prefixes, use
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ ./autogen.sh --system
|
||||
$ make
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
When doing this for day-to-day development purposes, it is recommended
|
||||
not to install over the OS vendor provided binaries. Instead simply
|
||||
run libvirt directly from the source tree. For example to run
|
||||
a privileged libvirtd instance
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ su -
|
||||
# service libvirtd stop (or systemctl stop libvirtd.service)
|
||||
# /home/to/your/checkout/daemon/libvirtd
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
It is also possible to run virsh directly from the source tree
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ ./tools/virsh ....
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
A normal configuration of libvirt will build hypervisor drivers
|
||||
as loadable modules. When running from a non-installed source
|
||||
tree, libvirtd will attempt to find the modules from the same
|
||||
source tree. If this is not possible though, you can explicitly
|
||||
set <code>LIBVIRT_DRIVER_DIR=/path/to/source/tree/src/.libs</code>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
4
docs/devhelp/.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
libvirt.devhelp
|
||||
*.html
|
@ -31,7 +31,7 @@
|
||||
<li><strong><a href="drvhyperv.html">Microsoft Hyper-V</a></strong></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="stroage">Storage drivers</a></h2>
|
||||
<h2><a name="storage">Storage drivers</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><strong><a href="storage.html#StorageBackendDir">Directory backend</a></strong></li>
|
||||
@ -42,6 +42,8 @@
|
||||
<li><strong><a href="storage.html#StorageBackendISCSI">iSCSI backend</a></strong></li>
|
||||
<li><strong><a href="storage.html#StorageBackendSCSI">SCSI backend</a></strong></li>
|
||||
<li><strong><a href="storage.html#StorageBackendMultipath">Multipath backend</a></strong></li>
|
||||
<li><strong><a href="storage.html#StorageBackendRBD">RBD (RADOS Block Device) backend</a></strong></li>
|
||||
<li><strong><a href="storage.html#StorageBackendSheepdog">Sheepdog backend</a></strong></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -35,7 +35,7 @@ mount them use:
|
||||
<p>
|
||||
NB, the blkio controller in some kernels will not allow creation of nested
|
||||
sub-directories which will prevent correct operation of the libvirt LXC
|
||||
driver. On such kernels, it may be neccessary to unmount the blkio controller.
|
||||
driver. On such kernels, it may be necessary to unmount the blkio controller.
|
||||
</p>
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ openvz+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
script must be created manually by the host OS administrator. The
|
||||
simplest way is to just download the latest version of this script
|
||||
from a newer OpenVZ release, or upstream source repository. Then
|
||||
a generic configuration file <code>/etc/vz/vznetctl.conf</code>
|
||||
a generic configuration file <code>/etc/vz/vznet.conf</code>
|
||||
must be created containing
|
||||
</p>
|
||||
|
||||
|
67
docs/drvparallels.html.in
Normal file
@ -0,0 +1,67 @@
|
||||
<html><body>
|
||||
<h1>Parallels Cloud Server driver</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
The libvirt Parallels driver can manage Parallels Cloud Server starting from version 6.0.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="project">Project Links</a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
The <a href="http://www.parallels.com/products/server/baremetal/sp/">Parallels Cloud Server</a> Virtualization Solution.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a name="uri">Connections to the Parallels Cloud Server driver</a></h2>
|
||||
<p>
|
||||
The libvirt Parallels driver is a single-instance privileged driver, with a driver name of 'parallels'. Some example connection URIs for the libvirt driver are:
|
||||
</p>
|
||||
<pre>
|
||||
parallels:///system (local access)
|
||||
parallels+unix:///system (local access)
|
||||
parallels://example.com/system (remote access, TLS/x509)
|
||||
parallels+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
parallels+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2><a name="example">Example guest domain XML configuration</a></h2>
|
||||
|
||||
<p>
|
||||
Parallels driver require at least one hard disk for new domains
|
||||
at this time. It is used for defining directory, where VM should
|
||||
be created.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<domain type='parallels'>
|
||||
<name>demo</name>
|
||||
<uuid>54cdecad-4492-4e31-a209-33cc21d64057</uuid>
|
||||
<description>some description</description>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>2</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64'>hvm</type>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>destroy</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/storage/vol1'/>
|
||||
<target dev='hda'/>
|
||||
</disk>
|
||||
<video>
|
||||
<model type='vga' vram='33554432' heads='1'>
|
||||
<acceleration accel3d='no' accel2d='no'/>
|
||||
</model>
|
||||
</video>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
</pre>
|
||||
|
||||
</body></html>
|
@ -54,7 +54,7 @@
|
||||
The libvirt QEMU driver is a multi-instance driver, providing a single
|
||||
system wide privileged driver (the "system" instance), and per-user
|
||||
unprivileged drivers (the "session" instance). The URI driver protocol
|
||||
is "qemu". Some example conection URIs for the libvirt driver are:
|
||||
is "qemu". Some example connection URIs for the libvirt driver are:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@ -432,9 +432,16 @@ mount -t cgroup none /dev/cgroup -o devices
|
||||
<h3><a name="xmlimport">Converting from QEMU args to domain XML</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh domxml-from-native</code> provides a way to convert an
|
||||
existing set of QEMU args into a guest description using libvirt Domain XML
|
||||
that can then be used by libvirt.
|
||||
The <code>virsh domxml-from-native</code> provides a way to
|
||||
convert an existing set of QEMU args into a guest description
|
||||
using libvirt Domain XML that can then be used by libvirt.
|
||||
Please note that this command is intended to be used to convert
|
||||
existing qemu guests previously started from the command line to
|
||||
be managed through libvirt. It should not be used a method of
|
||||
creating new guests from scratch. New guests should be created
|
||||
using an application calling the libvirt APIs (see
|
||||
the <a href="apps.html">libvirt applications page</a> for some
|
||||
examples) or by manually crafting XML to pass to virsh.
|
||||
</p>
|
||||
|
||||
<pre>$ cat > demo.args <<EOF
|
||||
@ -469,7 +476,7 @@ $ virsh domxml-from-native qemu-argv demo.args
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
<p>NB, don't include the literral \ in the args, put everything on one line</p>
|
||||
<p>NB, don't include the literal \ in the args, put everything on one line</p>
|
||||
|
||||
<h3><a name="xmlexport">Converting from domain XML to QEMU args</a></h3>
|
||||
|
||||
@ -544,7 +551,7 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
||||
(<span class="since">Since 0.8.3</span>). In order to use the
|
||||
XML additions, it is necessary to issue an XML namespace request
|
||||
(the special <code>xmlns:<i>name</i></code> attribute) that
|
||||
pulls in <code>http://libirt.org/schemas/domain/qemu/1.0</code>;
|
||||
pulls in <code>http://libvirt.org/schemas/domain/qemu/1.0</code>;
|
||||
typically, the namespace is given the name
|
||||
of <code>qemu</code>. With the namespace in place, it is then
|
||||
possible to add an element <code><qemu:commandline></code>
|
||||
@ -564,7 +571,7 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
||||
</dl>
|
||||
|
||||
<p>Example:</p><pre>
|
||||
<domain type='qemu' xmlns:qemu='http://libirt.org/schemas/domain/qemu/1.0'>
|
||||
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
||||
<name>QEmu-fedora-i686</name>
|
||||
<memory>219200</memory>
|
||||
<os>
|
||||
|
@ -8,7 +8,7 @@
|
||||
The libvirt Test driver is a per-process fake hypervisor driver,
|
||||
with a driver name of 'test'. The driver maintains all its state
|
||||
in memory. It can start with a pre-configured default config, or
|
||||
be given a path to a alternate config. Some example conection URIs
|
||||
be given a path to an alternate config. Some example connection URIs
|
||||
for the libvirt driver are:
|
||||
</p>
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
|
||||
<p>
|
||||
The libvirt Xen driver is a single-instance privileged driver,
|
||||
with a driver name of 'xen'. Some example conection URIs for
|
||||
with a driver name of 'xen'. Some example connection URIs for
|
||||
the libvirt driver are:
|
||||
</p>
|
||||
|
||||
|
@ -15,8 +15,14 @@
|
||||
|
||||
<p>
|
||||
The root element required for all virtual networks is
|
||||
named <code>network</code> and has no attributes.
|
||||
The network XML format is available <span class="since">since 0.3.0</span>
|
||||
named <code>network</code> and has no configurable attributes
|
||||
(although <span class="since">since 0.10.0</span> there is one
|
||||
optional read-only attribute - when examining the live
|
||||
configuration of a network, the
|
||||
attribute <code>connections</code>, if present, specifies the
|
||||
number of guest interfaces currently connected via this
|
||||
network). The network XML format is
|
||||
available <span class="since">since 0.3.0</span>
|
||||
</p>
|
||||
|
||||
<h3><a name="elementsMetadata">General metadata</a></h3>
|
||||
@ -147,10 +153,17 @@
|
||||
This network describes either 1) an existing host bridge
|
||||
that was configured outside of libvirt (if
|
||||
a <code><bridge name='xyz'/></code> element has been
|
||||
specified), or 2) an interface or group of interfaces to
|
||||
be used for a "direct" connection via macvtap using
|
||||
macvtap's "bridge" mode (if the forward element has one or
|
||||
more <code><interface></code> subelements)
|
||||
specified, <span class="since">Since 0.9.4</span>), 2) an
|
||||
existing Open vSwitch bridge that was configured outside of
|
||||
libvirt (if both a <code><bridge name='xyz'/></code>
|
||||
element <b>and</b> a <code><virtualport
|
||||
type='openvswitch'/></code> have been
|
||||
specified <span class="since">Since 0.10.0</span>) 3) an
|
||||
interface or group of interfaces to be used for a "direct"
|
||||
connection via macvtap using macvtap's "bridge" mode (if
|
||||
the forward element has one or
|
||||
more <code><interface></code>
|
||||
subelements, <span class="since">Since 0.9.4</span>)
|
||||
(see <a href="formatdomain.html#elementsNICSDirect">Direct
|
||||
attachment to physical interface</a> for descriptions of
|
||||
the various macvtap modes). libvirt doesn't attempt to
|
||||
@ -210,6 +223,42 @@
|
||||
(usually either a domain start, or a hotplug interface
|
||||
attach to a domain).<span class="since">Since 0.9.4</span>
|
||||
</dd>
|
||||
<dt><code>hostdev</code></dt>
|
||||
<dd>
|
||||
This network facilitates PCI Passthrough of a network
|
||||
device. A network device is chosen from the interface
|
||||
pool and directly assigned to the guest using generic
|
||||
device passthrough, after first optionally setting the
|
||||
device's MAC address and vlan tag to the configured value,
|
||||
and optionally associating the device with an 802.1Qbh
|
||||
capable switch using a <code><virtualport></code>
|
||||
element. Note that - due to limitations in standard
|
||||
single-port PCI ethernet card driver design - only SR-IOV
|
||||
(Single Root I/O Virtualization) virtual function (VF)
|
||||
devices can be assigned in this manner; to assign a
|
||||
standard single-port PCI or PCIe ethernet card to a guest,
|
||||
use the traditional <code>< hostdev></code> device
|
||||
definition. <span class="since"> Since 0.10.0</span>
|
||||
|
||||
<p>Note that this "intelligent passthrough" of network
|
||||
devices is very similar to the functionality of a
|
||||
standard <code>< hostdev></code> device, the
|
||||
difference being that this method allows specifying a MAC
|
||||
address, vlan tag, and <code><virtualport ></code>
|
||||
for the passed-through device. If these capabilities are
|
||||
not required, if you have a standard single-port PCI,
|
||||
PCIe, or USB network card that doesn't support SR-IOV (and
|
||||
hence would anyway lose the configured MAC address during
|
||||
reset after being assigned to the guest domain), or if you
|
||||
are using a version of libvirt older than 0.10.0, you
|
||||
should use a standard
|
||||
<code><hostdev></code> device definition in the
|
||||
domain's configuration to assign the device to the guest
|
||||
instead of defining an <code><interface
|
||||
type='network'></code> pointing to a network
|
||||
with <code><forward mode='hostdev'/></code>.
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
As mentioned above, a <code><forward></code> element can
|
||||
have multiple <code><interface></code> subelements, each
|
||||
@ -226,7 +275,31 @@
|
||||
</forward>
|
||||
...
|
||||
</pre>
|
||||
When a guest interface is being constructed, libvirt will pick
|
||||
<p>
|
||||
<span class="since">since 0.10.0</span>,
|
||||
<code><interface></code> also has an optional read-only
|
||||
attribute - when examining the live configuration of a
|
||||
network, the attribute <code>connections</code>, if present,
|
||||
specifies the number of guest interfaces currently connected
|
||||
via this physical interface.
|
||||
</p>
|
||||
<p>
|
||||
Additionally, <span class="since">since 0.9.10</span>, libvirt
|
||||
allows a shorthand for specifying all virtual interfaces
|
||||
associated with a single physical function, by using
|
||||
the <code><pf></code> subelement to call out the
|
||||
corresponding physical interface associated with multiple
|
||||
virtual interfaces:
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<forward mode='passthrough'>
|
||||
<pf dev='eth0'/>
|
||||
</forward>
|
||||
...
|
||||
</pre>
|
||||
|
||||
<p>When a guest interface is being constructed, libvirt will pick
|
||||
an interface from this list to use for the connection. In
|
||||
modes where physical interfaces can be shared by multiple
|
||||
guest interfaces, libvirt will choose the interface that
|
||||
@ -234,7 +307,40 @@
|
||||
that do not allow sharing of the physical device (in
|
||||
particular, 'passthrough' mode, and 'private' mode when using
|
||||
802.1Qbh), libvirt will choose an unused physical interface
|
||||
or, if it can't find an unused interface, fail the operation.
|
||||
or, if it can't find an unused interface, fail the operation.</p>
|
||||
|
||||
<p>
|
||||
<span class="since">since 0.10.0</span> When using forward
|
||||
mode 'hostdev', the interface pool is specified with a list
|
||||
of <code><address></code> elements, each of which has
|
||||
<code>< type></code> (must always be <code>'pci'</code>,
|
||||
<code><domain></code>, <code><bus></code>,
|
||||
<code><slot></code>, and <code><function></code>
|
||||
attributes.
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<forward mode='hostdev' managed='yes'>
|
||||
<address type='pci' domain='0' bus='4' slot='0' function='1'/>
|
||||
<address type='pci' domain='0' bus='4' slot='0' function='2'/>
|
||||
<address type='pci' domain='0' bus='4' slot='0' function='3'/>
|
||||
</forward>
|
||||
...
|
||||
</pre>
|
||||
|
||||
Alternatively the interface pool can also be defined using a
|
||||
single physical function <code><pf></code> subelement to
|
||||
call out the corresponding physical interface associated with
|
||||
multiple virtual interfaces (similar to passthrough mode):
|
||||
|
||||
<pre>
|
||||
...
|
||||
<forward mode='hostdev' managed='yes'>
|
||||
<pf dev='eth0'/>
|
||||
</forward>
|
||||
...
|
||||
</pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h5><a name="elementQoS">Quality of service</a></h5>
|
||||
@ -269,6 +375,56 @@
|
||||
<span class="since">Since 0.9.4</span>
|
||||
</p>
|
||||
|
||||
<h5><a name="elementVlanTag">Setting VLAN tag (on supported network types only)</a></h5>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<devices>
|
||||
<interface type='bridge'>
|
||||
<b><vlan trunk='yes'></b>
|
||||
<b><tag id='42'/></b>
|
||||
<b><tag id='47'/></b>
|
||||
<b></vlan></b>
|
||||
<source bridge='ovsbr0'/>
|
||||
<virtualport type='openvswitch'>
|
||||
<parameters interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
|
||||
</virtualport>
|
||||
</interface>
|
||||
<devices>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
If (and only if) the network type supports vlan tagging
|
||||
transparent to the guest, an optional <code><vlan></code>
|
||||
element can specify one or more vlan tags to apply to the
|
||||
traffic of all guests using this
|
||||
network <span class="since">Since 0.10.0</span>. (openvswitch
|
||||
and type='hostdev' SR-IOV networks do support transparent vlan
|
||||
tagging of guest traffic; everything else, including standard
|
||||
linux bridges and libvirt's own virtual networks, <b>do not</b>
|
||||
support it. 802.1Qbh (vn-link) and 802.1Qbg (VEPA) switches
|
||||
provide their own way (outside of libvirt) to tag guest traffic
|
||||
onto specific vlans.) As expected, the <code>tag</code>
|
||||
attribute specifies which vlan tag to use. If a network has more
|
||||
than one <code><vlan></code> element defined, it is
|
||||
assumed that the user wants to do VLAN trunking using all the
|
||||
specified tags. In the case that vlan trunking with a single tag
|
||||
is desired, the optional attribute <code>trunk='yes'</code> can
|
||||
be added to the vlan element.
|
||||
</p>
|
||||
<p>
|
||||
<code><vlan></code> elements can also be specified in
|
||||
a <code><portgroup></code> element, as well as directly in
|
||||
a domain's <code><interface></code> element. In the case
|
||||
that a vlan tag is specified in multiple locations, the setting
|
||||
in <code><interface></code> takes precedence, followed by
|
||||
the setting in the <code><portgroup></code> selected by
|
||||
the interface config. The <code><vlan></code>
|
||||
in <code><network></code> will be selected only if none is
|
||||
given in <code><portgroup></code>
|
||||
or <code><interface></code>.
|
||||
</p>
|
||||
|
||||
<h5><a name="elementsPortgroup">Portgroups</a></h5>
|
||||
|
||||
<pre>
|
||||
@ -323,9 +479,15 @@
|
||||
default portgroup will be used. If no portgroup is given in the
|
||||
interface definition, and there is no default portgroup, then
|
||||
none will be used. Any <code><bandwidth></code>
|
||||
or <code><virtualport></code> specified directly in the
|
||||
domain XML will take precedence over any setting in the chosen
|
||||
portgroup.
|
||||
|
||||
specified directly in the domain XML will take precedence over
|
||||
any setting in the chosen portgroup. if
|
||||
a <code><virtualport></code> is specified in the portgroup
|
||||
(and/or directly in the network definition), the multiple
|
||||
virtualports will be merged, and any parameter that is specified
|
||||
in more than one virtualport, and is not identical, will be
|
||||
considered an error, and will prevent the interface from
|
||||
starting.
|
||||
</p>
|
||||
|
||||
<h3><a name="elementsAddress">Addressing</a></h3>
|
||||
@ -349,6 +511,7 @@
|
||||
<host ip='192.168.122.2'>
|
||||
<hostname>myhost</hostname>
|
||||
<hostname>myhostalias</hostname>
|
||||
</host>
|
||||
</dns>
|
||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
|
@ -143,7 +143,7 @@
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><code>scsi</code></dt>
|
||||
<dd>Desribes a SCSI device. Sub-elements include:
|
||||
<dd>Describes a SCSI device. Sub-elements include:
|
||||
<dl>
|
||||
<dt><code>host</code></dt>
|
||||
<dd>The SCSI host containing the device.</dd>
|
||||
@ -184,7 +184,7 @@
|
||||
available.</dd>
|
||||
<dt><code>capability</code></dt>
|
||||
<dd>If present, an additional capability is listed via
|
||||
the attribute <code>type</code>. Current capabilites
|
||||
the attribute <code>type</code>. Current capabilities
|
||||
include "hotpluggable" and "removable", with the
|
||||
latter implying the following
|
||||
sub-elements: <code>media_available</code> (0 or
|
||||
|
@ -308,6 +308,180 @@
|
||||
</rule>
|
||||
...
|
||||
</pre>
|
||||
<p>
|
||||
<span class="since">Since 0.9.10</span> it is possible to access
|
||||
individual elements of a variable holding a list of elements.
|
||||
A filtering rule like the following accesses the 2nd element
|
||||
of the variable DSTPORTS.
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<rule action='accept' direction='in' priority='500'>
|
||||
<udp dstportstart='$DSTPORTS[1]'/>
|
||||
</rule>
|
||||
...
|
||||
</pre>
|
||||
<p>
|
||||
<span class="since">Since 0.9.10</span> it is possible to create
|
||||
filtering rules that instantiate all combinations of rules from
|
||||
different lists using the notation of
|
||||
<code>$VARIABLE[@<iterator ID>]</code>.
|
||||
The following rule allows a virtual machine to
|
||||
receive traffic on a set of ports, which are specified in DSTPORTS,
|
||||
from the set of source IP address specified in SRCIPADDRESSES.
|
||||
The rule generates all combinations of elements of the variable
|
||||
DSTPORT with those of SRCIPADDRESSES by using two independent
|
||||
iterators to access their elements.
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<rule action='accept' direction='in' priority='500'>
|
||||
<ip srcipaddr='$SRCIPADDRESSES[@1]' dstportstart='$DSTPORTS[@2]'/>
|
||||
</rule>
|
||||
...
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
In an example we assign concrete values to SRCIPADDRESSES and DSTPORTS
|
||||
</p>
|
||||
<pre>
|
||||
SRCIPADDRESSES = [ 10.0.0.1, 11.1.2.3 ]
|
||||
DSTPORTS = [ 80, 8080 ]
|
||||
</pre>
|
||||
<p>
|
||||
Accessing the variables using $SRCIPADDRESSES[@1] and $DSTPORTS[@2] would
|
||||
then result in all combinations of addresses and ports being created:
|
||||
</p>
|
||||
<pre>
|
||||
10.0.0.1, 80
|
||||
10.0.0.1, 8080
|
||||
11.1.2.3, 80
|
||||
11.1.2.3, 8080
|
||||
</pre>
|
||||
<p>
|
||||
Accessing the same variables using a single iterator, for example by using
|
||||
the notation $SRCIPADDRESSES[@1] and $DSTPORTS[@1], would result in
|
||||
parallel access to both lists and result in the following combinations:
|
||||
</p>
|
||||
<pre>
|
||||
10.0.0.1, 80
|
||||
11.1.2.3, 8080
|
||||
</pre>
|
||||
<p>
|
||||
Further, the notation of $VARIABLE is short-hand for $VARIABLE[@0]. The
|
||||
former notation always assumes the iterator with Id '0'.
|
||||
<p>
|
||||
|
||||
<h3><a name="nwfelemsRulesAdvIPAddrDetection">Automatic IP address detection</a></h3>
|
||||
<p>
|
||||
The detection of IP addresses used on a virtual machine's interface
|
||||
is automatically activated if the variable <code>IP</code> is referenced
|
||||
but no value has been assigned to it.
|
||||
<span class="since">Since 0.9.13</span>
|
||||
the variable <code>CTRL_IP_LEARNING</code> can be used to specify
|
||||
the IP address learning method to use. Valid values are <code>any</code>,
|
||||
<code>dhcp</code>, or <code>none</code>.
|
||||
<br/><br/>
|
||||
The value <code>any</code> means that libvirt may use any packet to
|
||||
determine the address in use by a virtual machine, which is the default
|
||||
behavior if the variable <code>CTRL_IP_LEARNING</code> is not set. This method
|
||||
will only detect a single IP address on an interface.
|
||||
Once a VM's IP address has been detected, its IP network traffic
|
||||
will be locked to that address, if for example IP address spoofing
|
||||
is prevented by one of its filters. In that case the user of the VM
|
||||
will not be able to change the IP address on the interface inside
|
||||
the VM, which would be considered IP address spoofing.
|
||||
When a VM is migrated to another host or resumed after a suspend operation,
|
||||
the first packet sent by the VM will again determine the IP address it can
|
||||
use on a particular interface.
|
||||
<br/><br>
|
||||
A value of <code>dhcp</code> specifies that libvirt should only honor DHCP
|
||||
server-assigned addresses with valid leases. This method supports the detection
|
||||
and usage of multiple IP address per interface.
|
||||
When a VM is resumed after a suspend operation, still valid IP address leases
|
||||
are applied to its filters. Otherwise the VM is expected to again use DHCP to obtain new
|
||||
IP addresses. The migration of a VM to another physical host requires that
|
||||
the VM again runs the DHCP protocol.
|
||||
<br/><br/>
|
||||
Use of <code>CTRL_IP_LEARNING=dhcp</code> (DHCP snooping) provides additional
|
||||
anti-spoofing security, especially when combined with a filter allowing
|
||||
only trusted DHCP servers to assign addresses. To enable this, set the
|
||||
variable <code>DHCPSERVER</code> to the IP address of a valid DHCP server
|
||||
and provide filters that use this variable to filter incoming DHCP responses.
|
||||
<br/><br/>
|
||||
When DHCP snooping is enabled and the DHCP lease expires,
|
||||
the VM will no longer be able to use the IP address until it acquires a
|
||||
new, valid lease from a DHCP server. If the VM is migrated, it must get
|
||||
a new valid DHCP lease to use an IP address (e.g., by
|
||||
bringing the VM interface down and up again).
|
||||
<br/><br/>
|
||||
Note that automatic DHCP detection listens to the DHCP traffic
|
||||
the VM exchanges with the DHCP server of the infrastructure. To avoid
|
||||
denial-of-service attacks on libvirt, the evaluation of those packets
|
||||
is rate-limited, meaning that a VM sending an excessive number of DHCP
|
||||
packets per second on an interface will not have all of those packets
|
||||
evaluated and thus filters may not get adapted. Normal DHCP client
|
||||
behavior is assumed to send a low number of DHCP packets per second.
|
||||
Further, it is important to setup appropriate filters on all VMs in
|
||||
the infrastructure to avoid them being able to send DHCP
|
||||
packets. Therefore VMs must either be prevented from sending UDP and TCP
|
||||
traffic from port 67 to port 68 or the <code>DHCPSERVER</code>
|
||||
variable should be used on all VMs to restrict DHCP server messages to
|
||||
only be allowed to originate from trusted DHCP servers. At the same
|
||||
time anti-spoofing prevention must be enabled on all VMs in the subnet.
|
||||
<br/><br/>
|
||||
If <code>CTRL_IP_LEARNING</code> is set to <code>none</code>, libvirt does not do
|
||||
IP address learning and referencing <code>IP</code> without assigning it an
|
||||
explicit value is an error.
|
||||
<br/><br/>
|
||||
The following XML provides an example for the activation of IP address learning
|
||||
using the DHCP snooping method:
|
||||
</p>
|
||||
<pre>
|
||||
<interface type='bridge'>
|
||||
<source bridge='virbr0'/>
|
||||
<filterref filter='clean-traffic'>
|
||||
<parameter name='CTRL_IP_LEARNING' value='dhcp'/>
|
||||
</filterref>
|
||||
</interface>
|
||||
</pre>
|
||||
|
||||
<h3><a name="nwfelemsReservedVars">Reserved Variables</a></h3>
|
||||
<p>
|
||||
The following table lists reserved variables in use by libvirt.
|
||||
</p>
|
||||
<table class="top_table">
|
||||
<tr>
|
||||
<th> Variable Name </th>
|
||||
<th> Semantics </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> MAC </td>
|
||||
<td> The MAC address of the interface </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> IP </td>
|
||||
<td> The list of IP addresses in use by an interface </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> IPV6 </td>
|
||||
<td> Not currently implemented:
|
||||
the list of IPV6 addresses in use by an interface </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> DHCPSERVER </td>
|
||||
<td> The list of IP addresses of trusted DHCP servers</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> DHCPSERVERV6 </td>
|
||||
<td> Not currently implemented:
|
||||
The list of IPv6 addresses of trusted DHCP servers</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> CTRL_IP_LEARNING </td>
|
||||
<td> The choice of the IP address detection mode </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a name="nwfelems">Element and attribute overview</a></h2>
|
||||
|
||||
@ -431,7 +605,7 @@
|
||||
</ul>
|
||||
<p>
|
||||
The above example indicates that the traffic of type <code>ip</code>
|
||||
will be asscociated with the chain 'ipv4' and the rule will have
|
||||
will be associated with the chain 'ipv4' and the rule will have
|
||||
priority 500. If for example another filter is referenced whose
|
||||
traffic of type <code>ip</code> is also associated with the chain
|
||||
'ipv4' then that filter's rules will be ordered relative to the priority
|
||||
@ -458,7 +632,7 @@
|
||||
<ul>
|
||||
<li>UINT8 : 8 bit integer; range 0-255</li>
|
||||
<li>UINT16: 16 bit integer; range 0-65535</li>
|
||||
<li>MAC_ADDR: MAC adrress in dotted decimal format, i.e., 00:11:22:33:44:55</li>
|
||||
<li>MAC_ADDR: MAC address in dotted decimal format, i.e., 00:11:22:33:44:55</li>
|
||||
<li>MAC_MASK: MAC address mask in MAC address format, i.e., FF:FF:FF:FC:00:00</li>
|
||||
<li>IP_ADDR: IP address in dotted decimal format, i.e., 10.1.2.3</li>
|
||||
<li>IP_MASK: IP address mask in either dotted decimal format (255.255.248.0) or CIDR mask (0-32)</li>
|
||||
@ -466,6 +640,11 @@
|
||||
<li>IPV6_MASK: IPv6 mask in numbers format (FFFF:FFFF:FC00::) or CIDR mask (0-128)</li>
|
||||
<li>STRING: A string</li>
|
||||
<li>BOOLEAN: 'true', 'yes', '1' or 'false', 'no', '0'</li>
|
||||
<li>IPSETFLAGS: The source and destination flags of the ipset described
|
||||
by up to 6 'src' or 'dst' elements selecting features from either
|
||||
the source or destination part of the packet header; example:
|
||||
src,src,dst. The number of 'selectors' to provide here depends
|
||||
on the type of ipset that is referenced.</li>
|
||||
</ul>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@ -631,7 +810,7 @@
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>UINT8</td>
|
||||
<td>Bridge Protcol Data Unit (BPDU) type</td>
|
||||
<td>Bridge Protocol Data Unit (BPDU) type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>flags</td>
|
||||
@ -1107,6 +1286,16 @@
|
||||
<td>STRING</td>
|
||||
<td>TCP-only: format of mask/flags with mask and flags each being a comma separated list of SYN,ACK,URG,PSH,FIN,RST or NONE or ALL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@ -1207,6 +1396,16 @@
|
||||
<td>STRING</td>
|
||||
<td>comma separated list of NEW,ESTABLISHED,RELATED,INVALID or NONE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@ -1296,6 +1495,16 @@
|
||||
<td>STRING</td>
|
||||
<td>comma separated list of NEW,ESTABLISHED,RELATED,INVALID or NONE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@ -1397,6 +1606,16 @@
|
||||
<td>STRING</td>
|
||||
<td>TCP-only: format of mask/flags with mask and flags each being a comma separated list of SYN,ACK,URG,PSH,FIN,RST or NONE or ALL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@ -1483,6 +1702,16 @@
|
||||
<td>STRING</td>
|
||||
<td>comma separated list of NEW,ESTABLISHED,RELATED,INVALID or NONE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@ -1557,6 +1786,16 @@
|
||||
<td>STRING</td>
|
||||
<td>comma separated list of NEW,ESTABLISHED,RELATED,INVALID or NONE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@ -1567,6 +1806,7 @@
|
||||
The following sections discuss advanced filter configuration
|
||||
topics.
|
||||
</p>
|
||||
|
||||
<h4><a name="nwfelemsRulesAdvTracking">Connection tracking</a></h4>
|
||||
<p>
|
||||
The network filtering subsystem (on Linux) makes use of the connection
|
||||
@ -1671,7 +1911,7 @@
|
||||
unresponsive due to its traffic being dropped.
|
||||
Therefore, the limit of connections should be rather high so that
|
||||
fluctuations in new TCP connections don't cause odd
|
||||
traffic behavior in relaton to idle connections.
|
||||
traffic behavior in relation to idle connections.
|
||||
</p>
|
||||
|
||||
<h2><a name="nwfcli">Command line tools</a></h2>
|
||||
@ -1813,7 +2053,7 @@
|
||||
tree that instantiates iptables or ip6tables rules, a rule to let
|
||||
the UDP packet pass will also be necessary to be provided for those
|
||||
filtering layers. This can be
|
||||
achieved with a rule containing an approriate <code>udp</code> or
|
||||
achieved with a rule containing an appropriate <code>udp</code> or
|
||||
<code>udp-ipv6</code> traffic filtering node.
|
||||
</p>
|
||||
|
||||
@ -2013,7 +2253,7 @@
|
||||
</pre>
|
||||
<p>
|
||||
Before trying out a filter using the <code>RELATED</code> state,
|
||||
you have to make sure that the approriate connection tracking module
|
||||
you have to make sure that the appropriate connection tracking module
|
||||
has been loaded into the host's kernel. Depending on the version of the
|
||||
kernel, you must run either one of the following two commands before
|
||||
the ftp connection with the VM is established.
|
||||
@ -2099,36 +2339,6 @@
|
||||
filtering subsystem.
|
||||
</p>
|
||||
|
||||
<h3><a name="nwflimitsIP">IP Address Detection</a></h3>
|
||||
<p>
|
||||
In case a network filter references the variable
|
||||
<i>IP</i> and no variable was defined in any higher layer
|
||||
references to the filter, IP address detection will automatically
|
||||
be started when the filter is to be instantiated (VM start, interface
|
||||
hotplug event). Only IPv4
|
||||
addresses can be detected and only a single IP address
|
||||
legitimately in use by a VM on a single interface will be detected.
|
||||
In case a VM was to use multiple IP address on a single interface
|
||||
(IP aliasing),
|
||||
the IP addresses would have to be provided explicitly either
|
||||
in the network filter itself or as variables used in attributes'
|
||||
values. These
|
||||
variables must then be defined in a higher level reference to the filter
|
||||
and each assigned the value of the IP address that the VM is expected
|
||||
to be using.
|
||||
Different IP addresses in use by multiple interfaces of a VM
|
||||
(one IP address each) will be independently detected.
|
||||
<br/><br/>
|
||||
Once a VM's IP address has been detected, its IP network traffic
|
||||
may be locked to that address, if for example IP address spoofing
|
||||
is prevented by one of its filters. In that case the user of the VM
|
||||
will not be able to change the IP address on the interface inside
|
||||
the VM, which would be considered IP address spoofing.
|
||||
<br/><br/>
|
||||
In case a VM is resumed after suspension or migrated, IP address
|
||||
detection will be restarted.
|
||||
</p>
|
||||
|
||||
<h3><a name="nwflimitsmigr">VM Migration</a></h3>
|
||||
<p>
|
||||
VM migration is only supported if the whole filter tree
|
||||
|
@ -141,6 +141,11 @@
|
||||
<mode>0744</mode>
|
||||
<label>virt_image_t</label>
|
||||
</permissions>
|
||||
<timestamps>
|
||||
<atime>1341933637.273190990</atime>
|
||||
<mtime>1341930622.047245868</mtime>
|
||||
<ctime>1341930622.047245868</ctime>
|
||||
</timestamps>
|
||||
<encryption type='...'>
|
||||
...
|
||||
</encryption>
|
||||
@ -172,6 +177,19 @@
|
||||
contains the MAC (eg SELinux) label string.
|
||||
<span class="since">Since 0.4.1</span>
|
||||
</dd>
|
||||
<dt><code>timestamps</code></dt>
|
||||
<dd>Provides timing information about the volume. Up to four
|
||||
sub-elements are present,
|
||||
where <code>atime</code>, <code>btime</code>, <code>ctime</code>
|
||||
and <code>mtime</code> hold the access, birth, change and
|
||||
modification time of the volume, where known. The used time
|
||||
format is <seconds>.<nanoseconds> since the
|
||||
beginning of the epoch (1 Jan 1970). If nanosecond resolution
|
||||
is 0 or otherwise unsupported by the host OS or filesystem,
|
||||
then the nanoseconds part is omitted. This is a readonly
|
||||
attribute and is ignored when creating a volume.
|
||||
<span class="since">Since 0.10.0</span>
|
||||
</dd>
|
||||
<dt><code>encryption</code></dt>
|
||||
<dd>If present, specifies how the volume is encrypted. See
|
||||
the <a href="formatstorageencryption.html">Storage Encryption</a> page
|
||||
@ -234,11 +252,24 @@
|
||||
to sparsely allocate a volume. It does not have to honour requests
|
||||
for sparse allocation though.<br/>
|
||||
<br/>
|
||||
By default this is specified in bytes, but an optional
|
||||
By default this is specified in bytes, but an optional attribute
|
||||
<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>
|
||||
Values can be: 'B' or 'bytes' for bytes, 'KB' (kilobytes,
|
||||
10<sup>3</sup> or 1000 bytes), 'K' or 'KiB' (kibibytes,
|
||||
2<sup>10</sup> or 1024 bytes), 'MB' (megabytes, 10<sup>6</sup>
|
||||
or 1,000,000 bytes), 'M' or 'MiB' (mebibytes, 2<sup>20</sup>
|
||||
or 1,048,576 bytes), 'GB' (gigabytes, 10<sup>9</sup> or
|
||||
1,000,000,000 bytes), 'G' or 'GiB' (gibibytes, 2<sup>30</sup>
|
||||
or 1,073,741,824 bytes), 'TB' (terabytes, 10<sup>12</sup> or
|
||||
1,000,000,000,000 bytes), 'T' or 'TiB' (tebibytes,
|
||||
2<sup>40</sup> or 1,099,511,627,776 bytes), 'PB' (petabytes,
|
||||
10<sup>15</sup> or 1,000,000,000,000,000 bytes), 'P' or 'PiB'
|
||||
(pebibytes, 2<sup>50</sup> or 1,125,899,906,842,624 bytes),
|
||||
'EB' (exabytes, 10<sup>18</sup> or 1,000,000,000,000,000,000
|
||||
bytes), or 'E' or 'EiB' (exbibytes, 2<sup>60</sup> or
|
||||
1,152,921,504,606,846,976 bytes). <span class="since">Since
|
||||
0.4.1, multi-character <code>unit</code> since
|
||||
0.9.11</span></dd>
|
||||
<dt><code>capacity</code></dt>
|
||||
<dd>Providing the logical capacity for the volume. This value is
|
||||
in bytes by default, but a <code>unit</code> attribute can be
|
||||
|
@ -20,10 +20,49 @@
|
||||
<pre>
|
||||
git diff > libvirt-myfeature.patch
|
||||
</pre>
|
||||
<p>However, the usual workflow of libvirt developer is:</p>
|
||||
<pre>
|
||||
git checkout master
|
||||
git pull
|
||||
git checkout -t origin -b workbranch
|
||||
Hack, committing any changes along the way
|
||||
</pre>
|
||||
<p>Then, when you want to post your patches:</p>
|
||||
<pre>
|
||||
git pull --rebase
|
||||
(fix any conflicts)
|
||||
git send-email --cover-letter --no-chain-reply-to --annotate --to=libvir-list@redhat.com master
|
||||
</pre>
|
||||
<p>For a single patch you can omit <code>--cover-letter</code>, but
|
||||
series of a two or more patches needs a cover letter. If you get tired
|
||||
of typing <code>--to=libvir-list@redhat.com</code> designation you can
|
||||
set it in git config:</p>
|
||||
<pre>
|
||||
git config sendemail.to libvir-list@redhat.com
|
||||
</pre>
|
||||
<p>Please follow this as close as you can, especially the rebase and
|
||||
git send-email part, as it makes life easier for other developers to
|
||||
review your patch set. One should avoid sending patches as attachments,
|
||||
but rather send them in email body along with commit message. If a
|
||||
developer is sending another version of the patch (e.g. to address
|
||||
review comments), he is advised to note differences to previous
|
||||
versions after the <code>---</code> line in the patch so that it helps
|
||||
reviewers but doesn't become part of git history. Moreover, such patch
|
||||
needs to be prefixed correctly with
|
||||
<code>--subject-prefix=PATCHv2</code> appended to <code>git
|
||||
send-email</code> (substitute <code>v2</code> with the correct
|
||||
version if needed though).</p>
|
||||
</li>
|
||||
<li>Split large changes into a series of smaller patches, self-contained
|
||||
if possible, with an explanation of each patch and an explanation of how
|
||||
the sequence of patches fits together.</li>
|
||||
|
||||
<li><p>Split large changes into a series of smaller patches,
|
||||
self-contained if possible, with an explanation of each patch and an
|
||||
explanation of how the sequence of patches fits together. Moreover,
|
||||
please keep in mind that it's required to be able to compile cleanly
|
||||
after each patch. A feature does not have to work until the end of a
|
||||
series, as long as intermediate patches don't cause test-suite
|
||||
failures.</p>
|
||||
</li>
|
||||
|
||||
<li>Make sure your patches apply against libvirt GIT. Developers
|
||||
only follow GIT and don't care much about released versions.</li>
|
||||
<li><p>Run the automated tests on your code before submitting any changes.
|
||||
|
@ -101,7 +101,7 @@
|
||||
<h5><a name="qemu">/etc/libvirt/hooks/qemu</a></h5>
|
||||
<ul>
|
||||
<li>Before a QEMU guest is started, the qemu hook script is
|
||||
called in two locations; if either location fails, the guest
|
||||
called in three locations; if any location fails, the guest
|
||||
is not started. The first location, <span class="since">since
|
||||
0.9.0</span>, is before libvirt performs any resource
|
||||
labeling, and the hook can allocate resources not managed by
|
||||
@ -110,7 +110,11 @@
|
||||
The second location, available <span class="since">Since
|
||||
0.8.0</span>, occurs after libvirt has finished labeling
|
||||
all resources, but has not yet started the guest, called as:<br/>
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre></li>
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre>
|
||||
The third location, <span class="since">0.9.13</span>,
|
||||
occurs after the QEMU process has successfully started up:<br/>
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name started begin -</pre>
|
||||
</li>
|
||||
<li>When a QEMU guest is stopped, the qemu hook script is called
|
||||
in two locations, to match the startup.
|
||||
First, <span class="since">since 0.8.0</span>, the hook is
|
||||
@ -120,15 +124,61 @@
|
||||
called again, <span class="since">since 0.9.0</span>, to allow
|
||||
any additional resource cleanup:<br/>
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name release end -</pre></li>
|
||||
<li><span class="since">Since 0.9.11</span>, the qemu hook script
|
||||
is also called at the beginning of incoming migration. It is called
|
||||
as: <pre>/etc/libvirt/hooks/qemu guest_name migrate begin -</pre>
|
||||
with domain XML sent to standard input of the script. In this case,
|
||||
the script acts as a filter and is supposed to modify the domain
|
||||
XML and print it out on its standard output. Empty output is
|
||||
identical to copying the input XML without changing it. In case the
|
||||
script returns failure or the output XML is not valid, incoming
|
||||
migration will be canceled. This hook may be used, e.g., to change
|
||||
location of disk images for incoming domains.</li>
|
||||
<li><span class="since">Since 0.9.13</span>, the qemu hook script
|
||||
is also called when the libvirtd daemon restarts and reconnects
|
||||
to previously running QEMU processes. If the script fails, the
|
||||
existing QEMU process will be killed off. It is called as:
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name reconnect begin -</pre>
|
||||
</li>
|
||||
<li><span class="since">Since 0.9.13</span>, the qemu hook script
|
||||
is also called when the QEMU driver is told to attach to an
|
||||
externally launched QEMU process. It is called as:
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name attach begin -</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h5><a name="lxc">/etc/libvirt/hooks/lxc</a></h5>
|
||||
<ul>
|
||||
<li>When an LXC guest is started, the lxc hook script is called as:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name start begin -</pre></li>
|
||||
<li>Before a LXC guest is started, the lxc hook script is
|
||||
called in three locations; if any location fails, the guest
|
||||
is not started. The first location, <span class="since">since
|
||||
0.9.13</span>, is before libvirt performs any resource
|
||||
labeling, and the hook can allocate resources not managed by
|
||||
libvirt such as DRBD or missing bridges. This is called as:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name prepare begin -</pre>
|
||||
The second location, available <span class="since">Since
|
||||
0.8.0</span>, occurs after libvirt has finished labeling
|
||||
all resources, but has not yet started the guest, called as:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name start begin -</pre>
|
||||
The third location, <span class="since">0.9.13</span>,
|
||||
occurs after the LXC process has successfully started up:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name started begin -</pre>
|
||||
</li>
|
||||
<li>When a LXC guest is stopped, the lxc hook script is called
|
||||
as:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name stopped end -</pre></li>
|
||||
in two locations, to match the startup.
|
||||
First, <span class="since">since 0.8.0</span>, the hook is
|
||||
called before libvirt restores any labels:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name stopped end -</pre>
|
||||
Then, after libvirt has released all resources, the hook is
|
||||
called again, <span class="since">since 0.9.0</span>, to allow
|
||||
any additional resource cleanup:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name release end -</pre></li>
|
||||
<li><span class="since">Since 0.9.13</span>, the lxc hook script
|
||||
is also called when the libvirtd daemon restarts and reconnects
|
||||
to previously running LXC processes. If the script fails, the
|
||||
existing LXC process will be killed off. It is called as:
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name reconnect begin -</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<br/>
|
||||
|
||||
@ -161,19 +211,20 @@
|
||||
source and destination hosts:</p>
|
||||
<ol>
|
||||
<li>At the beginning of the migration, the <i>qemu</i> hook script on
|
||||
the <b>destination</b> host is executed with the "start"
|
||||
operation.<br/><br/></li>
|
||||
<li>If this hook script returns indicating success (error code 0), the
|
||||
migration continues. Any other return code indicates failure, and
|
||||
the migration is aborted.<br/><br/></li>
|
||||
<li>The QEMU guest is then migrated to the destination host.<br/>
|
||||
<br/></li>
|
||||
the <b>destination</b> host is executed with the "migrate"
|
||||
operation.</li>
|
||||
<li>Before QEMU process is spawned, the two operations ("prepare" and
|
||||
"start") called for domain start are executed on
|
||||
<b>destination</b> host.</li>
|
||||
<li>If both of these hook script executions exit successfully (exit
|
||||
status 0), the migration continues. Any other exit code indicates
|
||||
failure, and the migration is aborted.</li>
|
||||
<li>The QEMU guest is then migrated to the destination host.</li>
|
||||
<li>Unless an error occurs during the migration process, the <i>qemu</i>
|
||||
hook script on the <b>source</b> host is then executed with the "stopped"
|
||||
operation, to indicate it is no longer running on this
|
||||
host.<br/><br/>
|
||||
Regardless of the return code from this hook script, the migration
|
||||
is not aborted as it has already been performed.</li>
|
||||
hook script on the <b>source</b> host is then executed with the
|
||||
"stopped" and "release" operations to indicate it is no longer
|
||||
running on this host. Regardless of the return codes, the
|
||||
migration is not aborted as it has already been performed.</li>
|
||||
</ol>
|
||||
<br/>
|
||||
|
||||
|
1
docs/html/.gitignore
vendored
@ -1 +0,0 @@
|
||||
*.html
|
@ -373,7 +373,10 @@
|
||||
allocation of collected information (however, on an
|
||||
out-of-memory condition, the buffer may still be NULL). The
|
||||
caller is responsible for freeing registered buffers, since the
|
||||
buffers are designed to persist beyond virCommandFree.
|
||||
buffers are designed to persist beyond virCommandFree. It
|
||||
is possible to pass the same pointer to both
|
||||
virCommandSetOutputBuffer and virCommandSetErrorBuffer, in which
|
||||
case the child process interleaves output into a single string.
|
||||
</p>
|
||||
|
||||
<h3><a name="directory">Setting working directory</a></h3>
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 9.3 KiB |
BIN
docs/libvirtLogo404.png
Normal file
After Width: | Height: | Size: 32 KiB |
@ -76,7 +76,7 @@
|
||||
<p>
|
||||
The sanlock daemon must be started on every single host
|
||||
that will be running virtual machines. So repeat these
|
||||
steps as neccessary.
|
||||
steps as necessary.
|
||||
</p>
|
||||
|
||||
<h2><a name="sanlockplugin">libvirt sanlock plugin configuration</a></h2>
|
||||
@ -165,7 +165,7 @@
|
||||
<p>
|
||||
If all went well, libvirtd will have talked to sanlock
|
||||
and created the basic lockspace. This can be checked
|
||||
by looking for existance of the following file
|
||||
by looking for existence of the following file
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
|
@ -114,11 +114,16 @@
|
||||
</h3>
|
||||
<p>The syntax for filters and outputs is the same for both types of
|
||||
variables.</p>
|
||||
<p>The format for a filter is:</p>
|
||||
<pre>x:name</pre>
|
||||
<p>where <code>name</code> is a match string e.g. <code>remote</code> or
|
||||
<code>qemu</code> and the x is the minimal level where matching messages
|
||||
should be logged:</p>
|
||||
<p>The format for a filter is one of:</p>
|
||||
<pre>
|
||||
x:name (log message only)
|
||||
x:+name (log message + stack trace)</pre>
|
||||
<p>where <code>name</code> is a string which is matched against source
|
||||
file name, e.g., <code>remote</code>, <code>qemu</code>, or
|
||||
<code>util/json</code>, the optional <code>+</code> prefix tells libvirt
|
||||
to log stack trace for each message matching <code>name</code>, and
|
||||
<code>x</code> is the minimal level where matching messages should
|
||||
be logged:</p>
|
||||
<ul>
|
||||
<li>1: DEBUG</li>
|
||||
<li>2: INFO</li>
|
||||
@ -170,8 +175,8 @@ export LIBVIRT_LOG_OUTPUTS="1:file:virsh.log"</pre>
|
||||
put the correct breakpoints when running under a debugger.</p>
|
||||
<p>To activate full debug of the libvirt entry points, utility
|
||||
functions and the QEmu/KVM driver, set:</p>
|
||||
<pre>log_filters=1:libvirt 1:util 1:qemu
|
||||
log_output=1:file:/var/log/libvirt/libvirtd.log</pre>
|
||||
<pre>log_filters="1:libvirt 1:util 1:qemu"
|
||||
log_outputs="1:file:/var/log/libvirt/libvirtd.log"</pre>
|
||||
<p>in libvirtd.conf and restart the daemon will allow to
|
||||
gather a copious amount of debugging traces for the operations done
|
||||
in those areas.</p>
|
||||
|
@ -25,7 +25,7 @@
|
||||
on the hypervisor in question, but will typically have the lowest computational costs
|
||||
by minimising the number of data copies involved. The native data transports will also
|
||||
require extra hypervisor-specific network configuration steps by the administrator when
|
||||
deploying a host. For some hypervisors, it might be neccessary to open up a large range
|
||||
deploying a host. For some hypervisors, it might be necessary to open up a large range
|
||||
of ports on the firewall to allow multiple concurrent migration operations.
|
||||
</p>
|
||||
|
||||
@ -87,7 +87,13 @@
|
||||
daemon controls the entire migration process itself, by directly
|
||||
connecting the destination host libvirtd. If the client application crashes,
|
||||
or otherwise loses its connection to libvirtd, the migration process
|
||||
will continue uninterrupted until completion.
|
||||
will continue uninterrupted until completion. Note that the
|
||||
source libvirtd uses its own credentials (typically root) to
|
||||
connect to the destination, rather than the credentials used
|
||||
by the client to connect to the source; if these differ, it is
|
||||
common to run into a situation where a client can connect to the
|
||||
destination directly but the source cannot make the connection to
|
||||
set up the peer-to-peer migration.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@ -139,7 +145,9 @@
|
||||
connection to the source host, where the virtual guest is
|
||||
currently running. The second URI is that of the libvirt
|
||||
connection to the destination host, where the virtual guest
|
||||
will be moved to. The third URI is a hypervisor specific
|
||||
will be moved to (and in peer-to-peer migrations, this is from
|
||||
the perspective of the source, not the client). The third URI is
|
||||
a hypervisor specific
|
||||
URI used to control how the guest will be migrated. With
|
||||
any managed migration flow, the first and second URIs are
|
||||
compulsory, while the third URI is optional. With the
|
||||
@ -533,7 +541,10 @@
|
||||
destination libvirtd server will automatically determine
|
||||
the native hypervisor URI for migration, based off the
|
||||
primary hostname. There is no scope for forcing an alternative
|
||||
network interface for the native migration data with this method.
|
||||
network interface for the native migration data with this
|
||||
method. The destination URI must be reachable using the source
|
||||
libvirtd credentials (which are not necessarily the same as the
|
||||
credentials of the client in connecting to the source).
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@ -571,7 +582,10 @@
|
||||
in case it is not accessible using the same address that
|
||||
the client uses to connect to the destination, or a different
|
||||
encryption/auth scheme is required. The native hypervisor URI
|
||||
format is not used at all.
|
||||
format is not used at all. The destination URI must be
|
||||
reachable using the source libvirtd credentials (which are not
|
||||
necessarily the same as the credentials of the client in
|
||||
connecting to the source).
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
|
1922
docs/news.html.in
8
docs/pending.html.in
Normal file
@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>Pending patches needing review</h1>
|
||||
<p> A list of pending patches needing review upstream is available
|
||||
on <a href="http://libvirt.org/pending.html">the project pending
|
||||
patches page</a>.</p>
|
||||
</body>
|
||||
</html>
|
@ -20,7 +20,7 @@ lower case, for example the C functions:</p>
|
||||
</p>
|
||||
<p>become</p>
|
||||
<p>
|
||||
<code>virConn::numOfDomains(self)</code>
|
||||
<code>virConnect::numOfDomains(self)</code>
|
||||
</p>
|
||||
<p>
|
||||
<code>virDomain::setMaxMemory(self, memory)</code>
|
||||
|
@ -61,5 +61,23 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Blogs and Podcasts</h2>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://twit.tv/show/floss-weekly/213">FLOSS Weekly
|
||||
podcast on the topic of libvirt</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://berrange.com/topics/libvirt/">Daniel
|
||||
Berrange's blog on useful libvirt development tips</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://planet.virt-tools.org/index.html">Virt Tools
|
||||
Blog Planet: blog aggregation of several virt-related
|
||||
feeds</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -136,8 +136,14 @@ Remote libvirt supports a range of transports:
|
||||
<dd> Unencrypted TCP/IP socket. Not recommended for production
|
||||
use, this is normally disabled, but an administrator can enable
|
||||
it for testing or use over a trusted network.
|
||||
The standard port is 16509.
|
||||
</dd>
|
||||
The standard port is 16509. </dd>
|
||||
<dt> libssh2 </dt>
|
||||
<dd> Transport over the SSH protocol using
|
||||
<a href="http://libssh2.org/" title="libssh2 homepage">libssh2</a> instead
|
||||
of the OpenSSH binary. This transport uses the libvirt authentication callback for
|
||||
all ssh authentication calls and therefore supports keyboard-interactive authentication
|
||||
even with graphical management applications. As with the classic ssh transport
|
||||
netcat is required on the remote side.</dd>
|
||||
</dl>
|
||||
<p>
|
||||
The default transport, if no other is specified, is <code>tls</code>.
|
||||
@ -182,6 +188,9 @@ Connect to a libvirtd daemon offering unencrypted TCP/IP connections
|
||||
on localhost port 5000 and use the test driver with default
|
||||
settings.
|
||||
</li>
|
||||
<li><code>qemu+libssh2://user@host/system?known_hosts=/home/user/.ssh/known_hosts</code><br/> —
|
||||
Connect to a remote host using a ssh connection with the libssh2 driver
|
||||
and use a different known_hosts file.</li>
|
||||
</ul>
|
||||
<h4>
|
||||
<a name="Remote_URI_parameters">Extra parameters</a>
|
||||
@ -237,7 +246,7 @@ Note that parameter values must be
|
||||
<td>
|
||||
<code>socket</code>
|
||||
</td>
|
||||
<td> unix, ssh </td>
|
||||
<td> unix, ssh, libssh2 </td>
|
||||
<td>
|
||||
The path to the Unix domain socket, which overrides the
|
||||
compiled-in default. For ssh transport, this is passed to
|
||||
@ -252,7 +261,7 @@ Note that parameter values must be
|
||||
<td>
|
||||
<code>netcat</code>
|
||||
</td>
|
||||
<td> ssh </td>
|
||||
<td> ssh, libssh2 </td>
|
||||
<td>
|
||||
The name of the netcat command on the remote machine.
|
||||
The default is <code>nc</code>. For ssh transport, libvirt
|
||||
@ -277,7 +286,7 @@ Note that parameter values must be
|
||||
<td>
|
||||
<code>keyfile</code>
|
||||
</td>
|
||||
<td> ssh </td>
|
||||
<td> ssh, libssh2 </td>
|
||||
<td>
|
||||
The name of the private key file to use to authentication to the remote
|
||||
machine. If this option is not used the default keys are used.
|
||||
@ -341,6 +350,39 @@ Note that parameter values must be
|
||||
<td colspan="2"/>
|
||||
<td> Example: <code>pkipath=/tmp/pki/client</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>known_hosts</code>
|
||||
</td>
|
||||
<td> libssh2 </td>
|
||||
<td>
|
||||
Path to the known_hosts file to verify the host key agains. LibSSH2
|
||||
supports OpenSSH-style known_hosts files, although it does not support
|
||||
all key types, so using files created by the OpenSSH binary may result
|
||||
into truncating the known_hosts file. It's recommended to use the default
|
||||
known_hosts file is located in libvirt's client local configuration
|
||||
directory e.g.: ~/.config/libvirt/known_hosts. Note: Use absolute paths.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"/>
|
||||
<td> Example: <code>known_hosts=/root/.ssh/known_hosts</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>sshauth</code>
|
||||
</td>
|
||||
<td> libssh2 </td>
|
||||
<td>
|
||||
A comma separated list of authentication methods to use. Default (is
|
||||
"agent,privkey,keyboard-interactive". The order of the methods is perserved.
|
||||
Some methods may require additional parameters.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"/>
|
||||
<td> Example: <code>sshauth=privkey,agent</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>
|
||||
<a name="Remote_certificates">Generating TLS certificates</a>
|
||||
@ -738,7 +780,7 @@ Blank lines and comments beginning with <code>#</code> are ignored.
|
||||
</tr>
|
||||
<tr>
|
||||
<td> mdns_adv <i>[0|1]</i> </td>
|
||||
<td> 1 (advertise with mDNS) </td>
|
||||
<td> 0 (advertise with mDNS) </td>
|
||||
<td>
|
||||
If set to 1 then the virtualization service will be advertised over
|
||||
mDNS to hosts on the local LAN segment.
|
||||
|
@ -8,6 +8,11 @@
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name='unsignedLong'>
|
||||
<data type='unsignedLong'>
|
||||
<param name='pattern'>[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="positiveInteger">
|
||||
<data type="positiveInteger">
|
||||
@ -49,10 +54,50 @@
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="pciaddress">
|
||||
<optional>
|
||||
<attribute name="domain">
|
||||
<ref name="pciDomain"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="bus">
|
||||
<ref name="pciBus"/>
|
||||
</attribute>
|
||||
<attribute name="slot">
|
||||
<ref name="pciSlot"/>
|
||||
</attribute>
|
||||
<attribute name="function">
|
||||
<ref name="pciFunc"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="multifunction">
|
||||
<choice>
|
||||
<value>on</value>
|
||||
<value>off</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<!-- a 6 byte MAC address in ASCII-hex format, eg "12:34:56:78:9A:BC" -->
|
||||
<!-- The lowest bit of the 1st byte is the "multicast" bit. a -->
|
||||
<!-- uniMacAddr requires that bit to be 0, and a multiMacAddr -->
|
||||
<!-- requires it to be 1. Plain macAddr will accept either. -->
|
||||
<!-- Currently there is no use of multiMacAddr in libvirt, it -->
|
||||
<!-- is included here for documentation/comparison purposes. -->
|
||||
<define name="uniMacAddr">
|
||||
<data type="string">
|
||||
<param name="pattern">[a-fA-F0-9][02468aAcCeE](:[a-fA-F0-9]{2}){5}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="multiMacAddr">
|
||||
<data type="string">
|
||||
<param name="pattern">[a-fA-F0-9][13579bBdDfF](:[a-fA-F0-9]{2}){5}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="macAddr">
|
||||
<data type="string">
|
||||
<param name="pattern">([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}</param>
|
||||
<param name="pattern">[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
@ -123,7 +168,7 @@
|
||||
|
||||
<define name="absFilePath">
|
||||
<data type="string">
|
||||
<param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%]+</param>
|
||||
<param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%,]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
@ -133,4 +178,39 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='unit'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>([bB]([yY][tT][eE][sS]?)?)|([kKmMgGtTpPeE]([iI]?[bB])?)</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name='scaledInteger'>
|
||||
<optional>
|
||||
<attribute name='unit'>
|
||||
<ref name='unit'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<ref name='unsignedLong'/>
|
||||
</define>
|
||||
|
||||
<define name="pciDomain">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="pciBus">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="pciSlot">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="pciFunc">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-7]</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
</grammar>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!-- A Relax NG schema for the libvirt capabilities XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
<include href='basictypes.rng'/>
|
||||
<start>
|
||||
<ref name='capabilities'/>
|
||||
</start>
|
||||
@ -43,20 +44,22 @@
|
||||
<optional>
|
||||
<ref name='topology'/>
|
||||
</optional>
|
||||
<optional>
|
||||
<zeroOrMore>
|
||||
<ref name='secmodel'/>
|
||||
</optional>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='secmodel'>
|
||||
<element name='secmodel'>
|
||||
<interleave>
|
||||
<element name='model'>
|
||||
<text/>
|
||||
</element>
|
||||
<element name='doi'>
|
||||
<text/>
|
||||
</element>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@ -157,7 +160,7 @@
|
||||
<element name='topology'>
|
||||
<element name='cells'>
|
||||
<attribute name='num'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
<oneOrMore>
|
||||
<ref name='cell'/>
|
||||
@ -169,13 +172,13 @@
|
||||
<define name='cell'>
|
||||
<element name='cell'>
|
||||
<attribute name='id'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
|
||||
<optional>
|
||||
<element name='cpus'>
|
||||
<attribute name='num'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
<oneOrMore>
|
||||
<ref name='cpu'/>
|
||||
@ -188,7 +191,7 @@
|
||||
<define name='cpu'>
|
||||
<element name='cpu'>
|
||||
<attribute name='id'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
</element>
|
||||
</define>
|
||||
@ -238,13 +241,13 @@
|
||||
|
||||
<define name='emulator'>
|
||||
<element name='emulator'>
|
||||
<ref name='path'/>
|
||||
<ref name='absFilePath'/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='loader'>
|
||||
<element name='loader'>
|
||||
<ref name='path'/>
|
||||
<ref name='absFilePath'/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@ -295,6 +298,7 @@
|
||||
|
||||
<define name='features'>
|
||||
<element name='features'>
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name='pae'>
|
||||
<empty/>
|
||||
@ -332,6 +336,7 @@
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@ -367,39 +372,9 @@
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
|
||||
<define name='positiveInteger'>
|
||||
<data type='positiveInteger'>
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='uint'>
|
||||
<data type='unsignedInt'>
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='path'>
|
||||
<data type='string'>
|
||||
<param name="pattern">/[a-zA-Z0-9_\+\-/%]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='featureName'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<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>
|
||||
</grammar>
|
||||
|
@ -183,12 +183,12 @@
|
||||
<choice>
|
||||
<element name="miimon">
|
||||
<!-- miimon frequency in ms -->
|
||||
<attribute name="freq"><ref name="uint"/></attribute>
|
||||
<attribute name="freq"><ref name="unsignedInt"/></attribute>
|
||||
<optional>
|
||||
<attribute name="downdelay"><ref name="uint"/></attribute>
|
||||
<attribute name="downdelay"><ref name="unsignedInt"/></attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="updelay"><ref name="uint"/></attribute>
|
||||
<attribute name="updelay"><ref name="unsignedInt"/></attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<!-- use_carrier -->
|
||||
@ -203,7 +203,7 @@
|
||||
</optional>
|
||||
</element>
|
||||
<element name="arpmon">
|
||||
<attribute name="interval"><ref name="uint"/></attribute>
|
||||
<attribute name="interval"><ref name="unsignedInt"/></attribute>
|
||||
<attribute name="target"><ref name="ipv4Addr"/></attribute>
|
||||
<optional>
|
||||
<attribute name="validate">
|
||||
@ -252,7 +252,7 @@
|
||||
<define name="mtu">
|
||||
<optional>
|
||||
<element name="mtu">
|
||||
<attribute name="size"><ref name="uint"/></attribute>
|
||||
<attribute name="size"><ref name="unsignedInt"/></attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -407,12 +407,6 @@
|
||||
|
||||
<!-- Type library -->
|
||||
|
||||
<define name='uint'>
|
||||
<data type='unsignedInt'>
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="timeval">
|
||||
<data type="double">
|
||||
<param name="minInclusive">0</param>
|
||||
|
@ -12,6 +12,11 @@
|
||||
<define name="network">
|
||||
|
||||
<element name="network">
|
||||
<optional>
|
||||
<attribute name="connections">
|
||||
<data type="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
|
||||
<!-- The name of the network, used to refer to it through the API
|
||||
@ -57,7 +62,7 @@
|
||||
<!-- <mac> element -->
|
||||
<optional>
|
||||
<element name="mac">
|
||||
<attribute name="address"><ref name="macAddr"/></attribute>
|
||||
<attribute name="address"><ref name="uniMacAddr"/></attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
@ -82,16 +87,59 @@
|
||||
<value>passthrough</value>
|
||||
<value>private</value>
|
||||
<value>vepa</value>
|
||||
<value>hostdev</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<attribute name="managed">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
<choice>
|
||||
<group>
|
||||
<zeroOrMore>
|
||||
<element name='interface'>
|
||||
<attribute name='dev'>
|
||||
<ref name='deviceName'/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="connections">
|
||||
<data type="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</group>
|
||||
<group>
|
||||
<zeroOrMore>
|
||||
<element name='address'>
|
||||
<attribute name='type'>
|
||||
<value>pci</value>
|
||||
</attribute>
|
||||
<ref name="pciaddress"/>
|
||||
<optional>
|
||||
<attribute name="connections">
|
||||
<data type="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</group>
|
||||
</choice>
|
||||
<optional>
|
||||
<element name='pf'>
|
||||
<attribute name='dev'>
|
||||
<ref name='deviceName'/>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
@ -114,9 +162,17 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
<optional>
|
||||
<ref name="virtualPortProfile"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="bandwidth"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="vlan"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
|
||||
@ -163,6 +219,9 @@
|
||||
<optional>
|
||||
<ref name="bandwidth"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="vlan"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="link">
|
||||
<attribute name="state">
|
||||
@ -209,7 +268,7 @@
|
||||
</zeroOrMore>
|
||||
<zeroOrMore>
|
||||
<element name="host">
|
||||
<attribute name="mac"><ref name="macAddr"/></attribute>
|
||||
<attribute name="mac"><ref name="uniMacAddr"/></attribute>
|
||||
<attribute name="name"><text/></attribute>
|
||||
<attribute name="ip"><ref name="ipv4Addr"/></attribute>
|
||||
</element>
|
||||
|
@ -15,22 +15,30 @@
|
||||
<attribute name="type">
|
||||
<value>802.1Qbg</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="parameters">
|
||||
<optional>
|
||||
<attribute name="managerid">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="typeid">
|
||||
<ref name="uint24range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="typeidversion">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="instanceid">
|
||||
<ref name="UUID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</group>
|
||||
<group>
|
||||
@ -38,11 +46,75 @@
|
||||
<attribute name="type">
|
||||
<value>802.1Qbh</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="parameters">
|
||||
<optional>
|
||||
<attribute name="profileid">
|
||||
<ref name="virtualPortProfileID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</group>
|
||||
<group>
|
||||
<element name="virtualport">
|
||||
<attribute name="type">
|
||||
<value>openvswitch</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="parameters">
|
||||
<optional>
|
||||
<attribute name="profileid">
|
||||
<ref name="virtualPortProfileID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="interfaceid">
|
||||
<ref name="UUID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</group>
|
||||
<group>
|
||||
<!-- use this when no type attribute is present -->
|
||||
<element name="virtualport">
|
||||
<optional>
|
||||
<element name="parameters">
|
||||
<optional>
|
||||
<attribute name="managerid">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="typeid">
|
||||
<ref name="uint24range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="typeidversion">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="instanceid">
|
||||
<ref name="UUID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="profileid">
|
||||
<ref name="virtualPortProfileID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="interfaceid">
|
||||
<ref name="UUID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</group>
|
||||
</choice>
|
||||
@ -112,4 +184,24 @@
|
||||
<param name="pattern">(ipv4)|(ipv6)</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="vlan">
|
||||
<element name="vlan">
|
||||
<optional>
|
||||
<attribute name="trunk">
|
||||
<value>yes</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<oneOrMore>
|
||||
<element name="tag">
|
||||
<attribute name="id">
|
||||
<data type="unsignedInt">
|
||||
<param name="maxInclusive">4095</param>
|
||||
</data>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
</define>
|
||||
</grammar>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!-- A Relax NG schema for the libvirt node device XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
<include href='basictypes.rng'/>
|
||||
<start>
|
||||
<ref name='device'/>
|
||||
</start>
|
||||
@ -14,6 +15,12 @@
|
||||
<element name="parent"><text/></element>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name="driver">
|
||||
<element name="name"><text/></element>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<zeroOrMore>
|
||||
<ref name="capability"/>
|
||||
</zeroOrMore>
|
||||
@ -56,7 +63,7 @@
|
||||
</optional>
|
||||
|
||||
<element name='uuid'>
|
||||
<ref name='uuid'/>
|
||||
<ref name='UUID'/>
|
||||
</element>
|
||||
</element>
|
||||
|
||||
@ -80,16 +87,16 @@
|
||||
</attribute>
|
||||
|
||||
<element name='domain'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='bus'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='slot'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='function'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
|
||||
<element name='product'>
|
||||
@ -114,6 +121,28 @@
|
||||
</choice>
|
||||
</element>
|
||||
|
||||
<optional>
|
||||
<element name='capability'>
|
||||
<attribute name='type'>
|
||||
<value>phys_function</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name='address'/>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name='capability'>
|
||||
<attribute name='type'>
|
||||
<value>virt_functions</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name='address'/>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
</define>
|
||||
|
||||
<define name='capusbdev'>
|
||||
@ -122,10 +151,10 @@
|
||||
</attribute>
|
||||
|
||||
<element name='bus'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='device'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
|
||||
<element name='product'>
|
||||
@ -157,16 +186,16 @@
|
||||
</attribute>
|
||||
|
||||
<element name='number'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='class'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='subclass'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='protocol'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
|
||||
<optional>
|
||||
@ -252,7 +281,7 @@
|
||||
</attribute>
|
||||
|
||||
<element name='host'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
|
||||
<optional>
|
||||
@ -273,16 +302,16 @@
|
||||
</attribute>
|
||||
|
||||
<element name='host'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='bus'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='target'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<element name='lun'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
|
||||
<element name='type'>
|
||||
@ -352,7 +381,7 @@
|
||||
</element>
|
||||
|
||||
<element name='media_size'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='media_label'>
|
||||
@ -364,25 +393,17 @@
|
||||
|
||||
<define name='capstoragefixed'>
|
||||
<element name='size'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<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='uint'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
<define name='address'>
|
||||
<element name='address'>
|
||||
<attribute name='domain'><ref name='hexuint'/></attribute>
|
||||
<attribute name='bus'><ref name='hexuint'/></attribute>
|
||||
<attribute name='slot'><ref name='hexuint'/></attribute>
|
||||
<attribute name='function'><ref name='hexuint'/></attribute>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='hexuint'>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?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">
|
||||
<include href='basictypes.rng'/>
|
||||
<start>
|
||||
<ref name="filter"/>
|
||||
</start>
|
||||
@ -484,6 +485,14 @@
|
||||
<ref name="stateflags-type"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="ipset">
|
||||
<ref name="ipset-name-type"/>
|
||||
</attribute>
|
||||
<attribute name="ipsetflags">
|
||||
<ref name="ipset-flags-type"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
@ -799,24 +808,15 @@
|
||||
|
||||
<!-- ################ type library ################ -->
|
||||
|
||||
<define name="UUID">
|
||||
<choice>
|
||||
<define name="variable-name-type">
|
||||
<data type="string">
|
||||
<param name="pattern">[a-fA-F0-9]{32}</param>
|
||||
<param name="pattern">$[a-zA-Z0-9_]+(\[[ ]*[@]?[0-9]+[ ]*\])?</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>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">([a-fA-F0-9]{1,2}:){5}[a-fA-F0-9]{1,2}</param>
|
||||
@ -826,10 +826,7 @@
|
||||
|
||||
<define name="addrIP">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9]</param>
|
||||
@ -839,10 +836,7 @@
|
||||
|
||||
<define name="addrIPv6">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<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>
|
||||
@ -852,10 +846,7 @@
|
||||
|
||||
<define name="addrMask">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
@ -870,10 +861,7 @@
|
||||
|
||||
<define name="addrMaskv6">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
@ -892,10 +880,7 @@
|
||||
<param name="pattern">0x([0-3][0-9a-fA-F]|[0-9a-fA-F])</param>
|
||||
</data>
|
||||
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
@ -906,10 +891,7 @@
|
||||
|
||||
<define name="mac-protocolid">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">0x([6-9a-fA-F][0-9a-fA-F]{2}|[0-9a-fA-F]{4})</param>
|
||||
@ -932,10 +914,7 @@
|
||||
|
||||
<define name="vlan-vlanid">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">0x([0-9a-fA-F]{1,3})</param>
|
||||
@ -948,30 +927,9 @@
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="uint8range">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">0x[0-9a-fA-F]{1,2}</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>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">0x[0-9a-fA-F]{1,4}</param>
|
||||
@ -986,10 +944,7 @@
|
||||
|
||||
<define name="uint32range">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">0x[0-9a-fA-F]{1,8}</param>
|
||||
@ -1015,10 +970,7 @@
|
||||
|
||||
<define name="arpOpcodeType">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
@ -1034,10 +986,7 @@
|
||||
|
||||
<define name="ipProtocolType">
|
||||
<choice>
|
||||
<!-- variable -->
|
||||
<data type="string">
|
||||
<param name="pattern">$[a-zA-Z0-9_]+</param>
|
||||
</data>
|
||||
<ref name="variable-name-type"/>
|
||||
|
||||
<data type="string">
|
||||
<param name="pattern">0x[0-9a-fA-F]{1,2}</param>
|
||||
@ -1119,4 +1068,19 @@
|
||||
<param name="pattern">((SYN|ACK|URG|PSH|FIN|RST)(,(SYN|ACK|URG|PSH|FIN|RST))*|ALL|NONE)/((SYN|ACK|URG|PSH|FIN|RST)(,(SYN|ACK|URG|PSH|FIN|RST))*|ALL|NONE)</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='ipset-name-type'>
|
||||
<choice>
|
||||
<ref name="variable-name-type"/>
|
||||
<data type="string">
|
||||
<param name="pattern">[a-zA-Z0-9_\.:\-\+ ]{1,31}</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name='ipset-flags-type'>
|
||||
<data type="string">
|
||||
<param name="pattern">(src|dst)(,(src|dst)){0,5}</param>
|
||||
</data>
|
||||
</define>
|
||||
</grammar>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<!-- A Relax NG schema for the libvirt storage pool XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
<include href='basictypes.rng'/>
|
||||
<start>
|
||||
<ref name='pool'/>
|
||||
</start>
|
||||
@ -18,6 +19,8 @@
|
||||
<ref name='pooliscsi'/>
|
||||
<ref name='poolscsi'/>
|
||||
<ref name='poolmpath'/>
|
||||
<ref name='poolrbd'/>
|
||||
<ref name='poolsheepdog'/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@ -104,6 +107,24 @@
|
||||
<ref name='target'/>
|
||||
</define>
|
||||
|
||||
<define name='poolrbd'>
|
||||
<attribute name='type'>
|
||||
<value>rbd</value>
|
||||
</attribute>
|
||||
<ref name='commonmetadata'/>
|
||||
<ref name='sizing'/>
|
||||
<ref name='sourcerbd'/>
|
||||
</define>
|
||||
|
||||
<define name='poolsheepdog'>
|
||||
<attribute name='type'>
|
||||
<value>sheepdog</value>
|
||||
</attribute>
|
||||
<ref name='commonmetadata'/>
|
||||
<ref name='sizing'/>
|
||||
<ref name='sourcesheepdog'/>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfovendor'>
|
||||
<optional>
|
||||
<element name='vendor'>
|
||||
@ -127,7 +148,7 @@
|
||||
</element>
|
||||
<optional>
|
||||
<element name='uuid'>
|
||||
<ref name='uuid'/>
|
||||
<ref name='UUID'/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -135,17 +156,17 @@
|
||||
<define name='sizing'>
|
||||
<optional>
|
||||
<element name='capacity'>
|
||||
<ref name='uint'/>
|
||||
<ref name='scaledInteger'/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='allocation'>
|
||||
<ref name='uint'/>
|
||||
<ref name='scaledInteger'/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='available'>
|
||||
<ref name='uint'/>
|
||||
<ref name='scaledInteger'/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -154,13 +175,19 @@
|
||||
<optional>
|
||||
<element name='permissions'>
|
||||
<element name='mode'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedInt'/>
|
||||
</element>
|
||||
<element name='owner'>
|
||||
<ref name='uint'/>
|
||||
<choice>
|
||||
<ref name='unsignedInt'/>
|
||||
<value>-1</value>
|
||||
</choice>
|
||||
</element>
|
||||
<element name='group'>
|
||||
<ref name='uint'/>
|
||||
<choice>
|
||||
<ref name='unsignedInt'/>
|
||||
<value>-1</value>
|
||||
</choice>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='label'>
|
||||
@ -175,7 +202,7 @@
|
||||
<element name='target'>
|
||||
<optional>
|
||||
<element name='path'>
|
||||
<ref name='path'/>
|
||||
<ref name='absFilePath'/>
|
||||
</element>
|
||||
</optional>
|
||||
<ref name='permissions'/>
|
||||
@ -183,6 +210,7 @@
|
||||
</define>
|
||||
|
||||
<define name='sourceinfohost'>
|
||||
<oneOrMore>
|
||||
<element name='host'>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
@ -194,13 +222,14 @@
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfodev'>
|
||||
<element name='device'>
|
||||
<attribute name='path'>
|
||||
<choice>
|
||||
<ref name='path'/>
|
||||
<ref name='absFilePath'/>
|
||||
<ref name='name'/>
|
||||
</choice>
|
||||
</attribute>
|
||||
@ -226,10 +255,10 @@
|
||||
<oneOrMore>
|
||||
<element name='freeExtent'>
|
||||
<attribute name='start'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</attribute>
|
||||
<attribute name='end'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</attribute>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
@ -238,7 +267,7 @@
|
||||
<define name='sourceinfodir'>
|
||||
<element name='dir'>
|
||||
<attribute name='path'>
|
||||
<ref name='path'/>
|
||||
<ref name='absFilePath'/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
@ -264,14 +293,38 @@
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>chap</value>
|
||||
<value>ceph</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<choice>
|
||||
<attribute name='login'>
|
||||
<text/>
|
||||
</attribute>
|
||||
<attribute name='username'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</choice>
|
||||
<optional>
|
||||
<attribute name='passwd'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='sourceinfoauthsecret'/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfoauthsecret'>
|
||||
<element name='secret'>
|
||||
<choice>
|
||||
<attribute name='uuid'>
|
||||
<text/>
|
||||
</attribute>
|
||||
<attribute name='usage'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@ -449,33 +502,28 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourcerbd'>
|
||||
<element name='source'>
|
||||
<ref name='sourceinfoname'/>
|
||||
<ref name='sourceinfohost'/>
|
||||
<optional>
|
||||
<ref name='sourceinfoauth'/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourcesheepdog'>
|
||||
<element name='source'>
|
||||
<ref name='sourceinfohost'/>
|
||||
<ref name='sourceinfoname'/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='name'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[a-zA-Z0-9_\+\-]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<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='uint'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='path'>
|
||||
<data type='string'>
|
||||
<param name="pattern">/[a-zA-Z0-9_\+\-/%]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="PortNumber">
|
||||
<data type="short">
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- A Relax NG schema for the libvirt storage volume XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
<include href='basictypes.rng'/>
|
||||
<start>
|
||||
<ref name='vol'/>
|
||||
</start>
|
||||
@ -30,17 +32,12 @@
|
||||
<define name='sizing'>
|
||||
<optional>
|
||||
<element name='capacity'>
|
||||
<optional>
|
||||
<attribute name='unit'>
|
||||
<ref name='unit'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<ref name='uint'/>
|
||||
<ref name='scaledInteger'/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='allocation'>
|
||||
<ref name='uint'/>
|
||||
<ref name='scaledInteger'/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
@ -49,13 +46,13 @@
|
||||
<optional>
|
||||
<element name='permissions'>
|
||||
<element name='mode'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedInt'/>
|
||||
</element>
|
||||
<element name='owner'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedInt'/>
|
||||
</element>
|
||||
<element name='group'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedInt'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='label'>
|
||||
@ -66,15 +63,51 @@
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name='timestamps'>
|
||||
<optional>
|
||||
<element name='timestamps'>
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name='atime'>
|
||||
<ref name='timestamp'/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='btime'>
|
||||
<ref name='timestamp'/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='ctime'>
|
||||
<ref name='timestamp'/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='mtime'>
|
||||
<ref name='timestamp'/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name='timestamp'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[0-9]+(\.[0-9]{0,9})?</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='target'>
|
||||
<element name='target'>
|
||||
<optional>
|
||||
<element name='path'>
|
||||
<ref name='path'/>
|
||||
<data type='anyURI'/>
|
||||
</element>
|
||||
</optional>
|
||||
<ref name='format'/>
|
||||
<ref name='permissions'/>
|
||||
<ref name='timestamps'/>
|
||||
<optional>
|
||||
<ref name='encryption'/>
|
||||
</optional>
|
||||
@ -84,7 +117,7 @@
|
||||
<define name='backingStore'>
|
||||
<element name='backingStore'>
|
||||
<element name='path'>
|
||||
<ref name='path'/>
|
||||
<ref name='absFilePath'/>
|
||||
</element>
|
||||
<ref name='format'/>
|
||||
<ref name='permissions'/>
|
||||
@ -103,7 +136,7 @@
|
||||
<define name='sourcedev'>
|
||||
<element name='device'>
|
||||
<attribute name='path'>
|
||||
<ref name='path'/>
|
||||
<ref name='absFilePath'/>
|
||||
</attribute>
|
||||
<choice>
|
||||
<empty/>
|
||||
@ -116,10 +149,10 @@
|
||||
<oneOrMore>
|
||||
<element name='extent'>
|
||||
<attribute name='start'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</attribute>
|
||||
<attribute name='end'>
|
||||
<ref name='uint'/>
|
||||
<ref name='unsignedLong'/>
|
||||
</attribute>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
@ -147,6 +180,7 @@
|
||||
|
||||
<define name='formatfile'>
|
||||
<choice>
|
||||
<value>unknown</value>
|
||||
<value>raw</value>
|
||||
<value>dir</value>
|
||||
<value>bochs</value>
|
||||
@ -156,6 +190,7 @@
|
||||
<value>iso</value>
|
||||
<value>qcow</value>
|
||||
<value>qcow2</value>
|
||||
<value>qed</value>
|
||||
<value>vmdk</value>
|
||||
<value>vpc</value>
|
||||
</choice>
|
||||
@ -180,33 +215,4 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='uint'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='path'>
|
||||
<data type='string'>
|
||||
<param name="pattern">/[a-zA-Z0-9_\+\-\./%]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='unit'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[kKmMgGtTpPyYzZ]</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<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>
|
||||
|
||||
</grammar>
|
||||
|
@ -1,49 +1,28 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
This file is autogenerated from the PHP output
|
||||
Do not edit this file. Changes will be lost.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
||||
<title>Search the documentation on Libvir.org</title>
|
||||
<meta name="description" content="libvirt, virtualization, virtualization API" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="headerLogo"></div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="content">
|
||||
<?php
|
||||
$query = $_GET['query'];
|
||||
// We handle only the first argument so far
|
||||
$query = ltrim ($query);
|
||||
if (! $query) {
|
||||
echo "<h1 align='center'>Search the documentation on Libvir.org</h1>";
|
||||
}
|
||||
|
||||
$scope = $_GET['scope'];
|
||||
if ($scope == NULL)
|
||||
$scope = "any";
|
||||
$scope = ltrim ($scope);
|
||||
if ($scope == "")
|
||||
$scope = "any";
|
||||
|
||||
?>
|
||||
<p> The search service indexes the libvirt APIs and documentation as well as the libvir-list@redhat.com mailing-list archives. To use it simply provide a set of keywords:</p>
|
||||
|
||||
<form action="<?php echo $_SERVER['PHP_SELF'], "?query=", rawurlencode($query) ?>"
|
||||
enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="50" value="<?php echo $query?>"/>
|
||||
<select name="scope">
|
||||
<option value="any">Search All</option>
|
||||
<option value="API" <?php if ($scope == 'API') print "selected='selected'"?>>Only the APIs</option>
|
||||
<option value="DOCS" <?php if ($scope == 'DOCS') print "selected"?>>Only the Documentation</option>
|
||||
<option value="LISTS" <?php if ($scope == 'LISTS') print "selected"?>>Only the lists archives</option>
|
||||
<option value="DOCS" <?php if ($scope == 'DOCS') print "selected='selected'"?>>Only the Documentation</option>
|
||||
<option value="LISTS" <?php if ($scope == 'LISTS') print "selected='selected'"?>>Only the lists archives</option>
|
||||
</select>
|
||||
<input name="submit" type="submit" value="Search ..."/>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
function logQueryWord($word) {
|
||||
$result = mysql_query ("SELECT ID,Count FROM Queries WHERE Value='$word'");
|
||||
@ -243,62 +222,3 @@
|
||||
}
|
||||
}
|
||||
?>
|
||||
<img src="libvirtLogo.png" alt="libvirt Logo" />
|
||||
</div>
|
||||
<div id="menu">
|
||||
<ul class="l0"><li>
|
||||
<span class="active">Home</span>
|
||||
</li><li>
|
||||
<a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
|
||||
</li><li>
|
||||
<a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
|
||||
</li><li>
|
||||
<a title="Information for users, administrators and developers" class="inactive" href="docs.html">Documentation</a>
|
||||
</li><li>
|
||||
<a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
|
||||
</li><li>
|
||||
<a title="Frequently asked questions" class="inactive" href="http://wiki.libvirt.org/page/FAQ">FAQ</a>
|
||||
</li><li>
|
||||
<a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
|
||||
</li><li>
|
||||
<a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
|
||||
</li><li>
|
||||
<a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
|
||||
</li><li>
|
||||
<a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
|
||||
</li></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<div id="projects">
|
||||
<dl id="p1"><dt>
|
||||
<a href="http://augeas.net/">Augeas</a>
|
||||
</dt><dd>
|
||||
<span>A configuration editing tool and API</span>
|
||||
</dd><dt>
|
||||
<a href="http://libvirt.org/">libvirt</a>
|
||||
</dt><dd>
|
||||
<span>The open source virtualization API</span>
|
||||
</dd></dl>
|
||||
<dl id="p2"><dt>
|
||||
<a href="http://cobbler.et.redhat.com/">Cobbler</a>
|
||||
</dt><dd>
|
||||
<span>OS provisioning and profile management</span>
|
||||
</dd><dt>
|
||||
<a href="http://ovirt.org/">oVirt</a>
|
||||
</dt><dd>
|
||||
<span>Virtualization management across the data center</span>
|
||||
</dd></dl>
|
||||
<dl id="p3"><dt>
|
||||
<a href="http://freeipa.org/">FreeIPA</a>
|
||||
</dt><dd>
|
||||
<span>Identity, policy and audit management</span>
|
||||
</dd><dt>
|
||||
<a href="http://virt-manager.org/">Virtual Machine Manager</a>
|
||||
</dt><dd>
|
||||
<span>Virtualization management from the desktop</span>
|
||||
</dd></dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
17
docs/search.php.in
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Search the documentation on Libvirt.org</h1>
|
||||
|
||||
<p>
|
||||
The search service indexes the libvirt APIs and documentation as
|
||||
well as the libvir-list@redhat.com mailing-list archives. To use
|
||||
it simply provide a set of keywords:
|
||||
</p>
|
||||
|
||||
<a id="php_placeholder"/>
|
||||
|
||||
<img src="libvirtLogo.png" alt="libvirt Logo" />
|
||||
|
||||
</body>
|
||||
</html>
|
@ -14,7 +14,16 @@
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
|
||||
|
||||
<xsl:variable name="href_base" select="''"/>
|
||||
<xsl:variable name="href_base">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pagename = '404.html'">
|
||||
<xsl:value-of select="'/'"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="''"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="." mode="page">
|
||||
|
@ -11,6 +11,12 @@
|
||||
<li>
|
||||
<a href="news.html">News</a>
|
||||
<span>Details of new features and bugs fixed in each release</span>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://wiki.libvirt.org/page/Maintenance_Releases">Maintenance Releases</a>
|
||||
<span>Details about libvirt maintenance releases</span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://libvirt.org/git/?p=libvirt.git;a=log">Git log</a>
|
||||
@ -332,6 +338,10 @@
|
||||
<a href="todo.html">Todo list</a>
|
||||
<span>Main feature request list</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="pending.html">Pending patches</a>
|
||||
<span>Pending patches awaiting reviews and integration</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -3,8 +3,84 @@
|
||||
<body>
|
||||
<h1 >Storage Management</h1>
|
||||
<p>
|
||||
This page describes the backends for the storage management capabilities in
|
||||
libvirt.
|
||||
Libvirt provides storage management on the physical host through
|
||||
storage pools and volumes.
|
||||
</p>
|
||||
<p>
|
||||
A storage pool is a quantity of storage set aside by an
|
||||
administrator, often a dedicated storage administrator, for use
|
||||
by virtual machines. Storage pools are divided into storage
|
||||
volumes either by the storage administrator or the system
|
||||
administrator, and the volumes are assigned to VMs as block
|
||||
devices.
|
||||
</p>
|
||||
<p>
|
||||
For example, the storage administrator responsible for an NFS
|
||||
server creates a share to store virtual machines' data. The
|
||||
system administrator defines a pool on the virtualization host
|
||||
with the details of the share
|
||||
(e.g. nfs.example.com:/path/to/share should be mounted on
|
||||
/vm_data). When the pool is started, libvirt mounts the share
|
||||
on the specified directory, just as if the system administrator
|
||||
logged in and executed 'mount nfs.example.com:/path/to/share
|
||||
/vmdata'. If the pool is configured to autostart, libvirt
|
||||
ensures that the NFS share is mounted on the directory specified
|
||||
when libvirt is started.
|
||||
</p>
|
||||
<p>
|
||||
Once the pool is started, the files in the NFS share are
|
||||
reported as volumes, and the storage volumes' paths may be
|
||||
queried using the libvirt APIs. The volumes' paths can then be
|
||||
copied into the section of a VM's XML definition describing the
|
||||
source storage for the VM's block devices. In the case of NFS,
|
||||
an application using the libvirt APIs can create and delete
|
||||
volumes in the pool (files in the NFS share) up to the limit of
|
||||
the size of the pool (the storage capacity of the share). Not
|
||||
all pool types support creating and deleting volumes. Stopping
|
||||
the pool (somewhat unfortunately referred to by virsh and the
|
||||
API as "pool-destroy") undoes the start operation, in this case,
|
||||
unmounting the NFS share. The data on the share is not modified
|
||||
by the destroy operation, despite the name. See man virsh for
|
||||
more details.
|
||||
</p>
|
||||
<p>
|
||||
A second example is an iSCSI pool. A storage administrator
|
||||
provisions an iSCSI target to present a set of LUNs to the host
|
||||
running the VMs. When libvirt is configured to manage that
|
||||
iSCSI target as a pool, libvirt will ensure that the host logs
|
||||
into the iSCSI target and libvirt can then report the available
|
||||
LUNs as storage volumes. The volumes' paths can be queried and
|
||||
used in VM's XML definitions as in the NFS example. In this
|
||||
case, the LUNs are defined on the iSCSI server, and libvirt
|
||||
cannot create and delete volumes.
|
||||
</p>
|
||||
<p>
|
||||
Storage pools and volumes are not required for the proper
|
||||
operation of VMs. Pools and volumes provide a way for libvirt
|
||||
to ensure that a particular piece of storage will be available
|
||||
for a VM, but some administrators will prefer to manage their
|
||||
own storage and VMs will operate properly without any pools or
|
||||
volumes defined. On systems that do not use pools, system
|
||||
administrators must ensure the availability of the VMs' storage
|
||||
using whatever tools they prefer, for example, adding the NFS
|
||||
share to the host's fstab so that the share is mounted at boot
|
||||
time.
|
||||
</p>
|
||||
<p>
|
||||
If at this point the value of pools and volumes over traditional
|
||||
system administration tools is unclear, note that one of the
|
||||
features of libvirt is its remote protocol, so it's possible to
|
||||
manage all aspects of a virtual machine's lifecycle as well as
|
||||
the configuration of the resources required by the VM. These
|
||||
operations can be performed on a remote host entirely within the
|
||||
libvirt API. In other words, a management application using
|
||||
libvirt can enable a user to perform all the required tasks for
|
||||
configuring the host for a VM: allocating resources, running the
|
||||
VM, shutting it down and deallocating the resources, without
|
||||
requiring shell access or any other control channel.
|
||||
</p>
|
||||
<p>
|
||||
Libvirt supports the following storage pool types:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
@ -31,6 +107,12 @@ libvirt.
|
||||
<li>
|
||||
<a href="#StorageBackendMultipath">Multipath backend</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#StorageBackendRBD">RBD (RADOS Block Device) backend</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#StorageBackendSheepdog">Sheepdog backend</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="StorageBackendDir">Directory pool</a></h2>
|
||||
@ -415,6 +497,135 @@ libvirt.
|
||||
The Multipath volume pool does not use the volume format type element.
|
||||
</p>
|
||||
|
||||
<h2><a name="StorageBackendRBD">RBD pools</a></h2>
|
||||
<p>
|
||||
This storage driver provides a pool which contains all RBD
|
||||
images in a RADOS pool. RBD (RADOS Block Device) is part
|
||||
of the Ceph distributed storage project.<br/>
|
||||
This backend <i>only</i> supports Qemu with RBD support. Kernel RBD
|
||||
which exposes RBD devices as block devices in /dev is <i>not</i>
|
||||
supported. RBD images created with this storage backend
|
||||
can be accessed through kernel RBD if configured manually, but
|
||||
this backend does not provide mapping for these images.<br/>
|
||||
Images created with this backend can be attached to Qemu guests
|
||||
when Qemu is build with RBD support (Since Qemu 0.14.0). The
|
||||
backend supports cephx authentication for communication with the
|
||||
Ceph cluster. Storing the cephx authentication key is done with
|
||||
the libvirt secret mechanism. The UUID in the example pool input
|
||||
refers to the UUID of the stored secret.
|
||||
<span class="since">Since 0.9.13</span>
|
||||
</p>
|
||||
|
||||
<h3>Example pool input</h3>
|
||||
<pre>
|
||||
<pool type="rbd">
|
||||
<name>myrbdpool</name>
|
||||
<source>
|
||||
<name>rbdpool</name>
|
||||
<host name='1.2.3.4' port='6789'/>
|
||||
<host name='my.ceph.monitor' port='6789'/>
|
||||
<host name='third.ceph.monitor' port='6789'/>
|
||||
<auth username='admin' type='ceph'>
|
||||
<secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/>
|
||||
</auth>
|
||||
</source>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Example volume output</h3>
|
||||
<pre>
|
||||
<volume>
|
||||
<name>myvol</name>
|
||||
<key>rbd/myvol</key>
|
||||
<source>
|
||||
</source>
|
||||
<capacity unit='bytes'>53687091200</capacity>
|
||||
<allocation unit='bytes'>53687091200</allocation>
|
||||
<target>
|
||||
<path>rbd:rbd/myvol</path>
|
||||
<format type='unknown'/>
|
||||
<permissions>
|
||||
<mode>00</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</volume></pre>
|
||||
|
||||
<h3>Example disk attachement</h3>
|
||||
<p>RBD images can be attached to Qemu guests when Qemu is built
|
||||
with RBD support. Information about attaching a RBD image to a
|
||||
guest can be found
|
||||
at <a href="formatdomain.html#elementsDisks">format domain</a>
|
||||
page.</p>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
The RBD pool does not use the pool format type element.
|
||||
</p>
|
||||
|
||||
<h3>Valid volume format types</h3>
|
||||
<p>
|
||||
The RBD pool does not use the volume format type element.
|
||||
</p>
|
||||
|
||||
<h2><a name="StorageBackendSheepdog">Sheepdog pools</a></h2>
|
||||
<p>
|
||||
This provides a pool based on a Sheepdog Cluster.
|
||||
Sheepdog is a distributed storage system for QEMU/KVM.
|
||||
It provides highly available block level storage volumes that
|
||||
can be attached to QEMU/KVM virtual machines.
|
||||
|
||||
The cluster must already be formatted.
|
||||
|
||||
<span class="since">Since 0.9.13</span>
|
||||
</p>
|
||||
|
||||
<h3>Example pool input</h3>
|
||||
<pre>
|
||||
<pool type="sheepdog">
|
||||
<name>mysheeppool</name>
|
||||
<source>
|
||||
<name>mysheeppool</name>
|
||||
<host name='localhost' port='7000'/>
|
||||
</source>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Example volume output</h3>
|
||||
<pre>
|
||||
<volume>
|
||||
<name>myvol</name>
|
||||
<key>sheep/myvol</key>
|
||||
<source>
|
||||
</source>
|
||||
<capacity unit='bytes'>53687091200</capacity>
|
||||
<allocation unit='bytes'>53687091200</allocation>
|
||||
<target>
|
||||
<path>sheepdog:myvol</path>
|
||||
<format type='unknown'/>
|
||||
<permissions>
|
||||
<mode>00</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</volume></pre>
|
||||
|
||||
<h3>Example disk attachment</h3>
|
||||
<p>Sheepdog images can be attached to Qemu guests.
|
||||
Information about attaching a Sheepdog image to a
|
||||
guest can be found
|
||||
at the <a href="formatdomain.html#elementsDisks">format domain</a>
|
||||
page.</p>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
The Sheepdog pool does not use the pool format type element.
|
||||
</p>
|
||||
|
||||
<h3>Valid volume format types</h3>
|
||||
<p>
|
||||
The Sheepdog pool does not use the volume format type element.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -30,7 +30,7 @@ virConnectPtr conn = virConnectOpenReadOnly (<b>"test:///default"</b>);
|
||||
<p>
|
||||
To simplify life for administrators, it is possible to setup URI aliases in a
|
||||
libvirt client configuration file. The configuration file is <code>/etc/libvirt/libvirt.conf</code>
|
||||
for the root user, or <code>$HOME/.libvirt/libvirt.conf</code> for any unprivileged user.
|
||||
for the root user, or <code>$XDG_CONFIG_DIR/libvirt/libvirt.conf</code> for any unprivileged user.
|
||||
In this file, the following syntax can be used to setup aliases
|
||||
</p>
|
||||
|
||||
@ -52,6 +52,19 @@ uri_aliases = [
|
||||
set, no alias lookup will be attempted.
|
||||
</p>
|
||||
|
||||
<h2><a name="URI_default">Default URI choice</a></h2>
|
||||
|
||||
<p>
|
||||
If the URI passed to <code>virConnectOpen*</code> is NULL, then libvirt will use the following
|
||||
logic to determine what URI to use.
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li>The environment variable <code>LIBVIRT_DEFAULT_URI</code></li>
|
||||
<li>The client configuration file <code>uri_default</code> parameter</li>
|
||||
<li>Probe each hypervisor in turn until one that works is found</li>
|
||||
</ol>
|
||||
|
||||
<h2>
|
||||
<a name="URI_virsh">Specifying URIs to virsh, virt-manager and virt-install</a>
|
||||
</h2>
|
||||
@ -64,7 +77,8 @@ virsh <b>-c test:///default</b> list
|
||||
<p>
|
||||
If virsh finds the environment variable
|
||||
<code>VIRSH_DEFAULT_CONNECT_URI</code> set, it will try this URI by
|
||||
default.
|
||||
default. Use of this environment variable is, however, deprecated
|
||||
now that libvirt supports <code>LIBVIRT_DEFAULT_URI</code> itself.
|
||||
</p>
|
||||
<p>
|
||||
When using the interactive virsh shell, you can also use the
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Last Modified: Mon Apr 5 15:11:27 2010
|
||||
# Last Modified: Fri Mar 9 14:43:22 2012
|
||||
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/consoles>
|
||||
@ -108,3 +108,22 @@
|
||||
/bin/dash rmix,
|
||||
/bin/dd rmix,
|
||||
/bin/cat rmix,
|
||||
|
||||
/usr/libexec/qemu-bridge-helper Cx,
|
||||
# child profile for bridge helper process
|
||||
profile /usr/libexec/qemu-bridge-helper {
|
||||
#include <abstractions/base>
|
||||
|
||||
capability setuid,
|
||||
capability setgid,
|
||||
capability setpcap,
|
||||
capability net_admin,
|
||||
|
||||
network inet stream,
|
||||
|
||||
/dev/net/tun rw,
|
||||
/etc/qemu/** r,
|
||||
owner @{PROC}/*/status r,
|
||||
|
||||
/usr/libexec/qemu-bridge-helper rmix,
|
||||
}
|
||||
|
6
examples/domain-events/events-c/.gitignore
vendored
@ -1,6 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.exe
|
||||
.deps
|
||||
.libs
|
||||
event-test
|
@ -4,6 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <libvirt/libvirt.h>
|
||||
#include <libvirt/virterror.h>
|
||||
@ -15,6 +16,8 @@
|
||||
# define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
||||
#endif
|
||||
|
||||
int run = 1;
|
||||
|
||||
/* Prototypes */
|
||||
const char *eventToString(int event);
|
||||
int myEventAddHandleFunc (int fd, int event,
|
||||
@ -38,6 +41,31 @@ void usage(const char *pname);
|
||||
|
||||
/* Callback functions */
|
||||
|
||||
|
||||
static void connectClose(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
int reason,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
switch (reason) {
|
||||
case VIR_CONNECT_CLOSE_REASON_ERROR:
|
||||
fprintf(stderr, "Connection closed due to I/O error\n");
|
||||
break;
|
||||
case VIR_CONNECT_CLOSE_REASON_EOF:
|
||||
fprintf(stderr, "Connection closed due to end of file\n");
|
||||
break;
|
||||
case VIR_CONNECT_CLOSE_REASON_KEEPALIVE:
|
||||
fprintf(stderr, "Connection closed due to keepalive timeout\n");
|
||||
break;
|
||||
case VIR_CONNECT_CLOSE_REASON_CLIENT:
|
||||
fprintf(stderr, "Connection closed due to client request\n");
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Connection closed due to unknown reason\n");
|
||||
break;
|
||||
};
|
||||
run = 0;
|
||||
}
|
||||
|
||||
const char *eventToString(int event) {
|
||||
const char *ret = "";
|
||||
switch ((virDomainEventType) event) {
|
||||
@ -93,6 +121,9 @@ static const char *eventDetailToString(int event, int detail) {
|
||||
case VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT:
|
||||
ret = "Snapshot";
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_STARTED_WAKEUP:
|
||||
ret = "Event wakeup";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_SUSPENDED:
|
||||
@ -145,7 +176,7 @@ static const char *eventDetailToString(int event, int detail) {
|
||||
ret = "Migrated";
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_STOPPED_SAVED:
|
||||
ret = "Failed";
|
||||
ret = "Saved";
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_STOPPED_FAILED:
|
||||
ret = "Failed";
|
||||
@ -219,6 +250,17 @@ static int myDomainEventRTCChangeCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventBalloonChangeCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
unsigned long long actual,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) balloon change %" PRIuMAX "KB\n",
|
||||
__func__, virDomainGetName(dom), virDomainGetID(dom), (uintmax_t)actual);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventWatchdogCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int action,
|
||||
@ -313,6 +355,42 @@ static int myDomainEventDiskChangeCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *trayChangeReasonStrings[] = {
|
||||
"open",
|
||||
"close",
|
||||
};
|
||||
|
||||
static int myDomainEventTrayChangeCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
const char *devAlias,
|
||||
int reason,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) removable disk's tray change devAlias: %s reason: %s\n",
|
||||
__func__, virDomainGetName(dom), virDomainGetID(dom),
|
||||
devAlias, trayChangeReasonStrings[reason]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventPMWakeupCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int reason ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) system pmwakeup",
|
||||
__func__, virDomainGetName(dom), virDomainGetID(dom));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventPMSuspendCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int reason ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) system pmsuspend",
|
||||
__func__, virDomainGetName(dom), virDomainGetID(dom));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void myFreeFunc(void *opaque)
|
||||
{
|
||||
@ -329,7 +407,6 @@ void usage(const char *pname)
|
||||
printf("%s uri\n", pname);
|
||||
}
|
||||
|
||||
int run = 1;
|
||||
|
||||
static void stop(int sig)
|
||||
{
|
||||
@ -349,9 +426,13 @@ int main(int argc, char **argv)
|
||||
int callback7ret = -1;
|
||||
int callback8ret = -1;
|
||||
int callback9ret = -1;
|
||||
int callback10ret = -1;
|
||||
int callback11ret = -1;
|
||||
int callback12ret = -1;
|
||||
int callback13ret = -1;
|
||||
struct sigaction action_stop;
|
||||
|
||||
memset(&action_stop, 0, sizeof action_stop);
|
||||
memset(&action_stop, 0, sizeof(action_stop));
|
||||
|
||||
action_stop.sa_handler = stop;
|
||||
|
||||
@ -371,6 +452,9 @@ int main(int argc, char **argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
virConnectRegisterCloseCallback(dconn,
|
||||
connectClose, NULL, NULL);
|
||||
|
||||
sigaction(SIGTERM, &action_stop, NULL);
|
||||
sigaction(SIGINT, &action_stop, NULL);
|
||||
|
||||
@ -419,7 +503,26 @@ int main(int argc, char **argv)
|
||||
VIR_DOMAIN_EVENT_ID_DISK_CHANGE,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventDiskChangeCallback),
|
||||
strdup("disk change"), myFreeFunc);
|
||||
|
||||
callback10ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_TRAY_CHANGE,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventTrayChangeCallback),
|
||||
strdup("tray change"), myFreeFunc);
|
||||
callback11ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_PMWAKEUP,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventPMWakeupCallback),
|
||||
strdup("pmwakeup"), myFreeFunc);
|
||||
callback12ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_PMSUSPEND,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventPMSuspendCallback),
|
||||
strdup("pmsuspend"), myFreeFunc);
|
||||
callback13ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventBalloonChangeCallback),
|
||||
strdup("callback balloonchange"), myFreeFunc);
|
||||
if ((callback1ret != -1) &&
|
||||
(callback2ret != -1) &&
|
||||
(callback3ret != -1) &&
|
||||
@ -427,7 +530,11 @@ int main(int argc, char **argv)
|
||||
(callback5ret != -1) &&
|
||||
(callback6ret != -1) &&
|
||||
(callback7ret != -1) &&
|
||||
(callback9ret != -1)) {
|
||||
(callback9ret != -1) &&
|
||||
(callback10ret != -1) &&
|
||||
(callback11ret != -1) &&
|
||||
(callback12ret != -1) &&
|
||||
(callback13ret != -1)) {
|
||||
if (virConnectSetKeepAlive(dconn, 5, 3) < 0) {
|
||||
virErrorPtr err = virGetLastError();
|
||||
fprintf(stderr, "Failed to start keepalive protocol: %s\n",
|
||||
@ -435,7 +542,7 @@ int main(int argc, char **argv)
|
||||
run = 0;
|
||||
}
|
||||
|
||||
while (run && virConnectIsAlive(dconn) == 1) {
|
||||
while (run) {
|
||||
if (virEventRunDefaultImpl() < 0) {
|
||||
virErrorPtr err = virGetLastError();
|
||||
fprintf(stderr, "Failed to run event loop: %s\n",
|
||||
@ -452,6 +559,10 @@ int main(int argc, char **argv)
|
||||
virConnectDomainEventDeregisterAny(dconn, callback6ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback7ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback9ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback10ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback11ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback12ret);
|
||||
virConnectDomainEventDeregisterAny(dconn, callback13ret);
|
||||
if (callback8ret != -1)
|
||||
virConnectDomainEventDeregisterAny(dconn, callback8ret);
|
||||
}
|
||||
|
@ -178,6 +178,7 @@ class virEventLoopPure:
|
||||
def run_once(self):
|
||||
sleep = -1
|
||||
self.runningPoll = True
|
||||
try:
|
||||
next = self.next_timeout()
|
||||
debug("Next timeout due at %d" % next)
|
||||
if next > 0:
|
||||
@ -212,13 +213,17 @@ class virEventLoopPure:
|
||||
continue
|
||||
|
||||
want = t.get_last_fired() + interval
|
||||
# Deduct 20ms, since schedular timeslice
|
||||
# Deduct 20ms, since scheduler timeslice
|
||||
# means we could be ever so slightly early
|
||||
if now >= (want-20):
|
||||
debug("Dispatch timer %d now %s want %s" % (t.get_id(), str(now), str(want)))
|
||||
t.set_last_fired(now)
|
||||
t.dispatch()
|
||||
|
||||
except (os.error, select.error), e:
|
||||
if e.args[0] != errno.EINTR:
|
||||
raise
|
||||
finally:
|
||||
self.runningPoll = False
|
||||
|
||||
|
||||
@ -438,9 +443,9 @@ def detailToString(event, detail):
|
||||
eventStrings = (
|
||||
( "Added", "Updated" ),
|
||||
( "Removed" ),
|
||||
( "Booted", "Migrated", "Restored", "Snapshot" ),
|
||||
( "Paused", "Migrated", "IOError", "Watchdog" ),
|
||||
( "Unpaused", "Migrated"),
|
||||
( "Booted", "Migrated", "Restored", "Snapshot", "Wakeup" ),
|
||||
( "Paused", "Migrated", "IOError", "Watchdog", "Restored", "Snapshot" ),
|
||||
( "Unpaused", "Migrated", "Snapshot" ),
|
||||
( "Shutdown", "Destroyed", "Crashed", "Migrated", "Saved", "Failed", "Snapshot"),
|
||||
( "Finished" )
|
||||
)
|
||||
@ -474,6 +479,17 @@ def myDomainEventGraphicsCallback(conn, dom, phase, localAddr, remoteAddr, authS
|
||||
def myDomainEventDiskChangeCallback(conn, dom, oldSrcPath, newSrcPath, devAlias, reason, opaque):
|
||||
print "myDomainEventDiskChangeCallback: Domain %s(%s) disk change oldSrcPath: %s newSrcPath: %s devAlias: %s reason: %s" % (
|
||||
dom.name(), dom.ID(), oldSrcPath, newSrcPath, devAlias, reason)
|
||||
def myDomainEventTrayChangeCallback(conn, dom, devAlias, reason, opaque):
|
||||
print "myDomainEventTrayChangeCallback: Domain %s(%s) tray change devAlias: %s reason: %s" % (
|
||||
dom.name(), dom.ID(), devAlias, reason)
|
||||
def myDomainEventPMWakeupCallback(conn, dom, reason, opaque):
|
||||
print "myDomainEventPMWakeupCallback: Domain %s(%s) system pmwakeup" % (
|
||||
dom.name(), dom.ID())
|
||||
def myDomainEventPMSuspendCallback(conn, dom, reason, opaque):
|
||||
print "myDomainEventPMSuspendCallback: Domain %s(%s) system pmsuspend" % (
|
||||
dom.name(), dom.ID())
|
||||
def myDomainEventBalloonChangeCallback(conn, dom, utcoffset, actual):
|
||||
print "myDomainEventBalloonChangeCallback: Domain %s(%s) %d" % (dom.name(), dom.ID(), actual)
|
||||
def usage(out=sys.stderr):
|
||||
print >>out, "usage: "+os.path.basename(sys.argv[0])+" [-hdl] [uri]"
|
||||
print >>out, " uri will default to qemu:///system"
|
||||
@ -532,6 +548,10 @@ def main():
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_WATCHDOG, myDomainEventWatchdogCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_GRAPHICS, myDomainEventGraphicsCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_DISK_CHANGE, myDomainEventDiskChangeCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_TRAY_CHANGE, myDomainEventTrayChangeCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_PMWAKEUP, myDomainEventPMWakeupCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_PMSUSPEND, myDomainEventPMSuspendCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE, myDomainEventBalloonChangeCallback, None)
|
||||
|
||||
vc.setKeepAlive(5, 3)
|
||||
|
||||
|
5
examples/dominfo/.gitignore
vendored
@ -1,5 +0,0 @@
|
||||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
.libs
|
||||
info1
|