diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-05-11 00:01:23 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-05-11 00:01:23 +0100 |
commit | c035b2b83f0e94c4b2e82184f00bcef874e6276b (patch) | |
tree | 8e1ab9b9e65cafbc237de0d455a13bb3c831de92 /app-emulation/libvirt | |
parent | 17e5f1ea4a2e1c5664f96480ca46348d008e8711 (diff) |
gentoo auto-resync : 11:05:2024 - 00:01:22
Diffstat (limited to 'app-emulation/libvirt')
-rw-r--r-- | app-emulation/libvirt/Manifest | 3 | ||||
-rw-r--r-- | app-emulation/libvirt/files/libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch | 84 | ||||
-rw-r--r-- | app-emulation/libvirt/libvirt-10.3.0-r1.ebuild (renamed from app-emulation/libvirt/libvirt-10.3.0.ebuild) | 1 |
3 files changed, 87 insertions, 1 deletions
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index 1ebf09efd493..8731d71bb84a 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -1,6 +1,7 @@ AUX README.gentoo-r3 2065 BLAKE2B f3677b916121126c431ba32e324bcc9f04b4dfeef1ee54517cae1118c67274592d890d6d919a48af6709e9220379797549277904a02fea740a69b1bf8f2397aa SHA512 77ede8a3e1a380b334595e65ae148acd2e52d594200253dc67d68dd256db5bf72ce7ce222d067c739ce53f84634421e74726f30c0ab7a1c76b86ccdc191c8a69 AUX libvirt-10.1.0-Fix-off-by-one-error-in-udevListInterfacesByStatus.patch 1665 BLAKE2B 25c162ca5d33c36e1b97185f3db8517e707a20d8ee2573dfd15f9540af1a2a1d39706ffbc1b6e55be0b7156ca0d146715c9f629add883ff0d89122dd7a9962e4 SHA512 dd5dc696412529a6d004ea03ef75c991fbe7c7be839467e9bf2e8a8b2119275b053b4549e9924907b146e841c4a81e8f1ee2744c7d275c5a4007d80b87e5b1af AUX libvirt-10.2.0-remote-check-for-negative-array-lengths-before-alloc.patch 9364 BLAKE2B 05ac0aaea8741102a34657b4910569ae5601364bdfd419743900823537f982348ba68cbac37fe10b21c2869531a35d68de8fbeb462c1f66aa0c3af4a97630405 SHA512 72a40984e6de167af8de9aedabdecf79c0f99bb5e7152b6521e87268bf1a1050b9d0d9acbb86c54810029dbde671a518ebd8a3f11590594a3226d818b89188f1 +AUX libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch 2935 BLAKE2B b3bb5f7f6c21b645f43c2de8c17fe821a12fcd656629bbb44d780f408c5e50f0ee00e0d6bd82a9aba68b4651b711b29170e6989c317bada28edf3aff36cf06ec SHA512 b3421b7972a226660e475616bfc23fffcba825516e14b5267e8410fd178031e848bd7a69128c04f1188c0b75de39e6155cd480649b87a21ab650c2874765ccc7 AUX libvirt-9.10.0-virxml-include-libxml-xmlsave.h-for-xmlIndentTreeOut.patch 1125 BLAKE2B d161698463c56b9fbb8b4c4a5ec1b7d65e87e088d68ea1a2cde316449c80d9ba2a4ad5883962eb3e4d31b0441917f6b02d4c781869083c47c8eeb432f6826e8b SHA512 d1dbcb9f6e1c66a38fa09af84248c8ac68d1f263f07b275e12ae3087a6fbd223eeefe20c7b241d02be9529c14bcf311d850d418bc8cecac4cb4e225d78800a41 AUX libvirt-9.4.0-do-not-use-sysconfig.patch 8195 BLAKE2B b731d57dc86fe725d3cbd47b6e691a414107d3594377bd1c73e19735368937a0983e407ec05700213d2ec5802e90f429fd5c7354cd03fb25d3acced952ab6f38 SHA512 2a2e08a6034ed37cafebde3b0fd27913d972d1e9f8816e10a9af951e99f10bd3b9bc7ada1ac50c5085e3fdd3d02301365d031eb6ce3b71102e4b3072d609f21b AUX libvirt-9.4.0-fix_paths_in_libvirt-guests_sh.patch 988 BLAKE2B 5936eafa5c300edad7ed368ec13063d31aea59e3daefeac59cf515ea44667f61aa63b0e2c2a5c88ace24c48cc132789cc5fa1a7c6c04c17e9ac61b114778e46d SHA512 5b80a5ec2898c1c821d0d49b9de67a256f82cb60879215ddde07c2a51f2e8a8b6893fec65617c27edec50cd51a362fb1fcdd21827e8de954f26879adcfa12418 @@ -28,7 +29,7 @@ DIST libvirt-9.9.0.tar.xz.asc 833 BLAKE2B 3de3674d33c595692e71eeb9c312de76e865d3 EBUILD libvirt-10.0.0-r2.ebuild 9651 BLAKE2B 97cf379807393cc939fd0dcd40f65bf2177b4957ba600382f5b3eeed1255fe2a3e640f147c923a597430a080cd936fae8977a2a6055c548b70206e429fdf58fb SHA512 beebff18fb91e4db4e30ab063fd02f8344b32d2fc7b645e77e0323250d76bbe6a941734eea60052ac8199e87ec91129f28141f6ecc7bdc8a9ecd45f90205c611 EBUILD libvirt-10.1.0-r1.ebuild 9567 BLAKE2B 541b3ab8320a9c076c409cac1573e0f005c8a0bb1e11c905474fba6cfdf1c14f75ef2a42dcf93a089df415160db11f3e508327232b6c69ee67dd9a04b656f6c7 SHA512 d32b4e414d697dcb6a5991fe39232f61b087c307806562de3ff93519aa2f1065ed6984ece1ec06030dd4beb9a5a858b1a0eee0f728d521fc3126f903235172fb EBUILD libvirt-10.2.0.ebuild 9480 BLAKE2B c78a4504eb025cad151dae29ab488c7bc870f982c81980f1c77ed2c47b2791791e8a98ed6a9334c65e2cdf846e426c6449dc108c7744d8e841b1fc076839fadf SHA512 3b12b6fd7ea290c44c97756cb58f5b8113c64d509507c7fe9f4335ab5709a18f283c47e529f40774c54d70dc848fdf26dc0cccf8cbcda495574ff8200a898e9c -EBUILD libvirt-10.3.0.ebuild 9480 BLAKE2B c78a4504eb025cad151dae29ab488c7bc870f982c81980f1c77ed2c47b2791791e8a98ed6a9334c65e2cdf846e426c6449dc108c7744d8e841b1fc076839fadf SHA512 3b12b6fd7ea290c44c97756cb58f5b8113c64d509507c7fe9f4335ab5709a18f283c47e529f40774c54d70dc848fdf26dc0cccf8cbcda495574ff8200a898e9c +EBUILD libvirt-10.3.0-r1.ebuild 9552 BLAKE2B 731af9f5634d1b8ef9bc9957b17070fcc8b61ff3273d4d65ed505d9462dd02b79425a19792ee0447bff3aaca351d108f06593c1d9ffd8029bcbcfe11f011febb SHA512 246868cdee09b964c452872149a5dc8106128285827f91876cccd75d457402ca17ff5d2b722ab2e257dede403ae80e277dbb31108a706ab44f5ef45a659cee4f EBUILD libvirt-9.8.0-r2.ebuild 9647 BLAKE2B e8118d9d46ac98ad406421fb37f428ccea980cbad40e66d765bb6711c4e75f390cf93560d9be5f0826db4ea52d251bef7f4f43b693fcc903c77add4180d52143 SHA512 17ec206969afb23d01ab0568776475d9d2ffba610382bfba5289825b3c9e4975d2239601ffaf1c48f9a15088779e90b42831c8e3c6cb0355add60f66570ed9d2 EBUILD libvirt-9.9.0-r2.ebuild 9701 BLAKE2B 9c9ad40d523b3c36cc37cf1beeca8014e528270484ec88f15984bdca00abde541c0ef4cd1677788af30dc1ee1a206168c9ca894c4e8abeb649170e4903b0ce0c SHA512 4236b7d848c2e01009837bdfefcd81fedd1e95ecae24829473afcbd364fcaf378858dc3fad8cf0a93c5f00dcc7e18ee71b160d26229e5fe9499c8e7b5b3dc3d5 EBUILD libvirt-9999.ebuild 9480 BLAKE2B c78a4504eb025cad151dae29ab488c7bc870f982c81980f1c77ed2c47b2791791e8a98ed6a9334c65e2cdf846e426c6449dc108c7744d8e841b1fc076839fadf SHA512 3b12b6fd7ea290c44c97756cb58f5b8113c64d509507c7fe9f4335ab5709a18f283c47e529f40774c54d70dc848fdf26dc0cccf8cbcda495574ff8200a898e9c diff --git a/app-emulation/libvirt/files/libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch b/app-emulation/libvirt/files/libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch new file mode 100644 index 000000000000..b151e3134e63 --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch @@ -0,0 +1,84 @@ +From cab1e71f0161fd24c5d6ff4c379d3a242ea8c2d9 Mon Sep 17 00:00:00 2001 +Message-ID: <cab1e71f0161fd24c5d6ff4c379d3a242ea8c2d9.1714995961.git.mprivozn@redhat.com> +From: Michal Privoznik <mprivozn@redhat.com> +Date: Sat, 4 May 2024 05:12:54 +0200 +Subject: [PATCH] vsh: Don't init history in cmdComplete() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Recent rework of virshtest uncovered a subtle bug that was +dormant in now vsh but before that even in monolithic virsh. + +In vsh.c there's this vshReadlineInit() function that's supposed +to initialize readline library, i.e. set those global rl_* +pointers. But it also initializes history library. Then, when +virsh/virt-admin quits, vshReadlineDeinit() is called which +writes history into a file (ensuring the parent directory +exists). So far no problem. + +Problem arises when cmdComplete() is called (from a bash +completer, for instance). It does not guard call to +vshReadlineInit() with check for interactive shell (and it should +not), but it sets ctl->historyfile which signals to +vshReadlineDeinit() the history should be written. + +Now, no real history is written, because nothing was entered on +the stdin, but the parent directory is created nevertheless. With +recent movement in virshtest.c this means some test cases might +create virsh history file which breaks our promise of not +touching user's data in test suite. + +Resolves: https://bugs.gentoo.org/931109 +Signed-off-by: Michal Privoznik <mprivozn@redhat.com> +Reviewed-by: Ján Tomko <jtomko@redhat.com> +--- + tools/vsh.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/tools/vsh.c b/tools/vsh.c +index 58855f63ba..e74045c24e 100644 +--- a/tools/vsh.c ++++ b/tools/vsh.c +@@ -2973,7 +2973,7 @@ vshReadlineInit(vshControl *ctl) + const char *quote_characters = "\"'"; + + /* initialize readline stuff only once */ +- if (ctl->historydir) ++ if (autoCompleteOpaque) + return 0; + + /* Opaque data for autocomplete callbacks. */ +@@ -2989,6 +2989,11 @@ vshReadlineInit(vshControl *ctl) + rl_completer_quote_characters = quote_characters; + rl_char_is_quoted_p = vshReadlineCharIsQuoted; + ++ /* Stuff below is needed only for interactive mode. */ ++ if (!ctl->imode) { ++ return 0; ++ } ++ + histsize_env = g_strdup_printf("%s_HISTSIZE", ctl->env_prefix); + + /* Limit the total size of the history buffer */ +@@ -3149,7 +3154,7 @@ vshInit(vshControl *ctl, const vshCmdGrp *groups) + cmdGroups = groups; + + if (vshInitDebug(ctl) < 0 || +- (ctl->imode && vshReadlineInit(ctl) < 0)) ++ vshReadlineInit(ctl) < 0) + return false; + + return true; +@@ -3168,7 +3173,7 @@ vshInitReload(vshControl *ctl) + + if (ctl->imode) + vshReadlineDeinit(ctl); +- if (ctl->imode && vshReadlineInit(ctl) < 0) ++ if (vshReadlineInit(ctl) < 0) + return false; + + return true; +-- +2.43.2 + diff --git a/app-emulation/libvirt/libvirt-10.3.0.ebuild b/app-emulation/libvirt/libvirt-10.3.0-r1.ebuild index f1c08714d713..5a6a2ae58357 100644 --- a/app-emulation/libvirt/libvirt-10.3.0.ebuild +++ b/app-emulation/libvirt/libvirt-10.3.0-r1.ebuild @@ -147,6 +147,7 @@ PATCHES=( "${FILESDIR}"/${PN}-9.4.0-fix_paths_in_libvirt-guests_sh.patch "${FILESDIR}"/${PN}-9.9.0-do-not-use-sysconfig.patch "${FILESDIR}"/${PN}-9.6.0-fix-paths-for-apparmor.patch + "${FILESDIR}"/${PN}-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch ) pkg_setup() { |