diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-08-07 12:37:21 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-08-07 12:37:21 +0100 |
commit | b8c7370a682e4e29cda623222d17a790c01c3642 (patch) | |
tree | f6caa14689bd00a5760eadaa381ff41e50ef3c1b /app-shells/bash | |
parent | 8a4997a7e2d1e36c089d4d76935b5a902d98d3d0 (diff) |
gentoo auto-resync : 07:08:2024 - 12:37:20
Diffstat (limited to 'app-shells/bash')
-rw-r--r-- | app-shells/bash/Manifest | 18 | ||||
-rw-r--r-- | app-shells/bash/bash-5.2_p32.ebuild | 402 | ||||
-rw-r--r-- | app-shells/bash/bash-5.3_alpha_p20240726.ebuild | 411 | ||||
-rw-r--r-- | app-shells/bash/bash-5.3_alpha_p20240730.ebuild | 411 | ||||
-rw-r--r-- | app-shells/bash/files/bash-5.2_p32-memory-leaks.patch | 130 |
5 files changed, 1372 insertions, 0 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest index d80b8efeebab..ff39f9325578 100644 --- a/app-shells/bash/Manifest +++ b/app-shells/bash/Manifest @@ -5,6 +5,7 @@ AUX bash-5.2_p15-random-ub.patch 451 BLAKE2B adab09c3f2ce3697e3659e0126612015571 AUX bash-5.2_p21-configure-strtold.patch 910 BLAKE2B 83ec6ff756543ee44c18902f2d30dd662a84237b9594a7e0cfc21a1c16fce49e37cf67729b3a17d59cc978cb6675e04457e3b6b0909d94cb234a1dde96f7c9ea SHA512 d8f0487db08dc7ba3f42075067556757142b13f739ca765d851e51ce09d11d4cce02ad016b724e70dd418d9bb37166c4c4ebb98e874cd89920661470486d252e AUX bash-5.2_p21-wpointer-to-int.patch 512 BLAKE2B 0c7f5eb5b697abf15c1d17888a973e44d0ead1f095778b41841a6a1937a5b9e7ce5fa6a05e4404504990b0a244fdecfc12ce7c33ee7d67b4c837435e9bfe2b57 SHA512 61bc7f96a1f3f782f0502c660f7578f4c97b3aae244c95ce3810815fcf9c81734cd19599dc9c8b0707d4f2bbb50497ef85c02e66fdd360d49befe0fed0ca4985 AUX bash-5.2_p26-memory-leaks.patch 4357 BLAKE2B 1b9f08054b28fa0e73b7b3d4da2674efd75b3ce11392a078d5072ba8e466f4a9c504892f9a1f2f62e4dc39b22050e68d42bcbae8ebe537df699d0c884c89a0b9 SHA512 ad30a74b7f4ecf5f7446867baf9b177fb1036e384b61a2ed73b121b17b7f686f9bdf9295c5c251b11d165f80e6110a2768257a2460c7e93abe78a5f763b972e8 +AUX bash-5.2_p32-memory-leaks.patch 4293 BLAKE2B 80d035f494b59f2774a905dd68375b00b43c7ac296be35a87a1c830946c26d65d8bc54e82aca75e63b8d2c0c64109b8a331a92dca80ed5f32d8cbcda99f87f48 SHA512 5ae73c1bd1330b6dee1982630ff2b8fb26c788337ad2f46ff78f972134b2555eb502c0610738a9fde31f424966af1e60b473a337a437b76e12e1f841a90f4845 AUX bash_logout 205 BLAKE2B b8c0266c3d1e31a714304a2b3b33389f042ae5bd497379f9b15ce31d47d1e3da73ba6536023953b00efe27b687e2ff45d94e3f01a13acc824dc12e31552c5b94 SHA512 7234250c03fc920996a381f9daef9e2d8ab1e1a29acdebed6669d8e0fe1c872a7fa343adf7d9ddc81225b0cd9eb223ba7ad1ff42448aff057fc6d6baa8f04a7d AUX bashrc 3494 BLAKE2B e9379c18fca85666cd347d1d8cf5c9859c5865ad7a3ded1ac5724bad6117924231e89dcc21f1a80931591e9a39c1acc3f7be8b2afe38986ea34b3b8fc12f5814 SHA512 a8fa416ab9265055e778fad3e4190ab5f57da0823c12d60a915bb77ba701fe93df8d16e041dd5747ed9db899a2516451b803db648aed0f85f0abb6d98c9414b8 AUX bashrc-r1 894 BLAKE2B ffaebc59c403b815df246342564e7d871f0c5eda437f7d63cef42ed2041912bd61722cab3034342fcb0336b48d9a14ada74052e52f02774695fc3e968c6feaae SHA512 82972cd0feede88c679fe8690da4884e8efa3decfc3bb72404fbd1129364f0092d2edfb1c6cc1f5adf783a6deca64a82c670a8b034ac0c3f85742a67306aa36b @@ -46,6 +47,8 @@ DIST bash-5.3_alpha_p20240628-5e28a1813ce7d08628c8df584ea36515091c6d9b.tar.xz 85 DIST bash-5.3_alpha_p20240706-a91b8b077300b0a2a7daefe02f0363f9116e00d5.tar.xz 8525768 BLAKE2B 07b1b92b15bbd1c4bd01e3c2fbdf65d7dab14976442a2c4ea751c0d6e729d937886495af5402cd4669e84f68e952f3e79a375c649bbda1b4cc948172e3ea2948 SHA512 dfd19e6a4786ff066cb7e13ae328fbc909847fd7f987b59d9c646ab0bbf5abdc8c570bbc75810fe9eb6c9171acb3256b4e3278f565a1f526d9ce030fd423c0f8 DIST bash-5.3_alpha_p20240711-d3e86e66ce857a8dc02e3116fd98b6e5b34d6364.tar.xz 8532476 BLAKE2B bae60589e733f29f4dab827c1c68899f4770c4cb2ca58af19e10bb833820644d336ada480be60b4dabb82441ae68f64494074387057d8b56efe8d5b9befd2a13 SHA512 ef677d2641607b75a000bef4b6eb9b359553ae6c3f930285989b97c036bfd1f7ecfa9240af1873af11dda42d1eca68da9c4b7567876e0bca878e8469dde0d0af DIST bash-5.3_alpha_p20240718-6c703092759ace29263ea96374e18412c59acc7f.tar.xz 8535120 BLAKE2B 7dd47829ca71689c138af9acd2657cee732f43abc82506ad76e65eb038e39acd31e208e985714460d76fbfb354517c3597fd85d459969541af950382ae7796c9 SHA512 41e07ed4fa90f8b645faf6c26766048fa51a3e3bd420dc875898fc9a1d674c05fe35f12b1c4d6ac6e6374736e6052e17e235a94c205c4bda80183f8065035182 +DIST bash-5.3_alpha_p20240726-d5ef283cbdd08217efdc55974a6a8a2c52a7562f.tar.xz 8534860 BLAKE2B 93ced89c621522554bb3f8c2e23ab2a6d8500beedb023064006cbd5777719195c2dbaabe6a04d737cb33d940c8a40ad2b3cdbce43b18e2b074d0d050dac77559 SHA512 d651cf0da9ed62d2e54ac526ef55a2a8eba274b430b627fc9e146bbc1d936363cf248388439dac485b653f6bfedcb21269c4b5f4662646080ecfe07390572450 +DIST bash-5.3_alpha_p20240730-e45ec6f76bea49cf8df306ac45022306831ed086.tar.xz 8535992 BLAKE2B 3f05f740987d3119f5e3c6bee1521a66c634737f9cf30fb911d1f03351e6c946a5c3de45fbdf817854613e23165ccf329b0c332639b593060dde33b53eae0e3d SHA512 2d1d6302ea60f1bec1d67d9f5f237573219080dea35ea29dd2cc3df4a8f41a2f89845ca3775e7044a1751fdb0b18db2ab4bc05cbd8679b745205868d048fbcc9 DIST bash205b-001 1132 BLAKE2B 0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6 SHA512 5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071 DIST bash205b-002 755 BLAKE2B 6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d SHA512 46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883 DIST bash205b-003 2356 BLAKE2B b7887d00d92fd298cd07a15e1c73b516dabd22ecd74c97091636dd97a0cd55024ed698e5cc924c4311d994dd326b1ad074bea35e7650cf9cf4e25c60d2713fa7 SHA512 74528ca5d165b812d299f1c69b47757bd677c0b22ce4217e155cd641708b02364a93c6709fb57b546b376b36da74429a61493921c7c199563da40ddcf1c1f399 @@ -448,6 +451,18 @@ DIST bash52-025 1454 BLAKE2B 5d18e00cc44710f078037f25c61741a078bb0fc906d6d5555e5 DIST bash52-025.sig 95 BLAKE2B aff63f1a0a753b632f0d2ce4cf8f4117689469150d41dd0e0d7f76fca973d52fb16f3957b12709826e50705f921fe141108b1046de05d17b40216ed5d4a00893 SHA512 079888adce1cb8583b547d67005f179614f1c42756de20acdb9e24763dec145a421c68e7ceb48d42b853ae7fcb07e051cc1ca56f9dfd337c9a1b001618df2828 DIST bash52-026 1372 BLAKE2B ebe3bc47dadf5d689258c5ccf9883838d3383dc43bec68d2a6767b6348cf1515a98ec9e445c3110e8eb0d87e742c20a0d4ddb70649ec94217f55aad7d18552af SHA512 571993da2b8067ef5b7b705aee65dd414ee70b216ffbcb9fab7c08807b87a72465594c3f1576c795ae86bf951911cdde70ad1037e851b88ee379c4237ccff6fe DIST bash52-026.sig 95 BLAKE2B 175df0703ee5374094d41761ebc2827d34cb97328ea8e486cc9e5c946e482a7d0a16a7ac45e11296500cff8ac4c013e60b07d34abf8b3478527a80f742fbe85e SHA512 6db725ffcf429e04551b2fde329067696b20bef9418b57cff56a62f31c262d0b800061284469eb9f809ca49516516735213dc05defab52ff864ac3b214336559 +DIST bash52-027 1881 BLAKE2B b76ce03456e064f17db00e9026aa53656a063c195faa02c7d51da8d173f7525fe5411bf526f19ee9e717ee1ec957de7e73f5af851a68d5cb554f2c4492ab3844 SHA512 644ef1ea0ce002913b443cfc74d1376b3b8d1c7c976c88cfcec663313563ea905af3aa7ab7236e0ee8336195b01cfc7f2a5a738c5f787a637be92cda937f571e +DIST bash52-027.sig 95 BLAKE2B 7120dc764120e108fbafd80dcd5010aea2f79f7508fda375740f7601c5e7508f2c830673101fe528a79cb4a7a5718ebd5dcf5e7ae81943008b128b10bb57ab8b SHA512 ad76bc672e53c62a8554a2889d420294f7dde0a996cb3058ca8a3a4108b53d35ed56dbcd0601f1984b3ae26dfe5eb6d99c9d46ebe78f0947b82502bef2419152 +DIST bash52-028 1571 BLAKE2B 58fdeecf6dd685103c7dc0e7c200cae65206e5fb3360d798b9cec05fc935ebae139bdf142f6018c9837d1780eb7c5cecff0a945369c14fa575e6801c46a15a31 SHA512 0e59ee230c2f9394814578e56270efa93e5ed8ed2fbf0c0777fdfad4d3f01f560923a80792998789c901068d88371f984f539fdebbec726759eeb7966d324328 +DIST bash52-028.sig 95 BLAKE2B 62d4663cfb25b470635321815e0860434c2edb35b220450d0123fc0bee2d80f29af060c34c765a48d75b49030f17d50852a1540be28fc615ebdd3f32391fe4d1 SHA512 e3e37ac8e6a29688c4c9dd318fc767331eec39bf947670060ebd42fd8262aad400152dc02d1d459f00170e6b788cf95d4a0a6dd62a2eae4af5bc67ebc80ece5d +DIST bash52-029 3619 BLAKE2B 01ddb0acc5b6067e729320692284d61735ace62eeede81a74b7628fe6899da61d921a11bd0d22d0e6f2e241e7b0cb64591654a34a33916739e35e23d5cc6f5bd SHA512 b0b134347fbe0916b9c0fc60a9dbc6b6ebc7439bd5a12d0cda29a0012cbbcc16414392597764c24b8ca716ce727bce7da7fae39acc3cdba9506efb01014a43ae +DIST bash52-029.sig 95 BLAKE2B 49c408e8da095c130868b3fab7afb85408307a10d9154dda818e014cec2ec973e1fc2a96dcd7a1769d1581e3c1d758d172bfa066d7b1ea6fdbb80e062d24ef64 SHA512 11aeca6b46a5cdf518b26a59a972e956455cb4d15aedd968ad36f8100bfc38448f89fe7a72dbecfa8da9fe556a194dda9bb34f1d16c2408b92b0e594f163f262 +DIST bash52-030 4111 BLAKE2B d0cf114642393eb2e2d060eac339674c8ce10af4d54bbcee0f450854d27373ede9dd159caf6d05fc69429ad357d666b47f6781ef590287f33a535b2c26d8754d SHA512 515902fd567dfbbca3d4f6d98a7f2f5a9d1ad323d829f9b90839de4807592708dea3d52f67cb868617278f9c8c6bb299ab3310d898be344d63e824043f17fe2d +DIST bash52-030.sig 95 BLAKE2B b8edc295a6646721ce7be79ebac2331a36c0b84ca9f5a6b6e8c2da0674f1279debaf941bbbddd56e2b868afc60a92a34fd312e049fc8524ba1e88ca5cb952acc SHA512 2592d5b7f62a23dd16153691053e462342ae33f347349348de98487c52d2e73ab0d46216505925bc887bceb069bcb5c1c5ce7ce803e62eec7ef0458dbaf1fb69 +DIST bash52-031 1159 BLAKE2B dac378115906e21fc754267c42e129e2374c9b63f879d1717d79930589618d4d8d17821b2f529d1851db7567d3efdfb0410c18e6869047e3d87443b29d507289 SHA512 08f3e3cb6a6554ea6d1b1f5cbcd156cb75f9c0c5350801b67352a1c2ffec0d02d90c0947736fd52de304e549a1b919ea0ff42e23a8cf63a721a351ea1732bea5 +DIST bash52-031.sig 95 BLAKE2B 50e5c0b3afb0ffc8b1863bde645316d7c7c49e8b396041ca1dcf269c50b532aaccf0c3fb5a5e64036ece9054d8ccf78f7e829ecf0fbdcf8531ba57230b129f1c SHA512 f656d8fbbe79450fbf193e5c2aebc85cfc425703495f2925aa774d5c0e742ebf523c191264673c6dd76fa6071c39d5155698687475eb634cd6553e86266f91a5 +DIST bash52-032 1529 BLAKE2B 55aab849da0fcc69ab3516d9d7ff2858b5f15cbeaddf66282f43f272b52d646c2c41c2ceef632a2ae8f13c25d92e85f49fbc6de989ed4f6ac4bb7bea7fc59a5d SHA512 9eb277d2d92b9ec49f70582e52305bc45b425b189ba2a15c51c537e07ccf9cb894c1ca44fa399b04297fe51027aff7f169f41efe2d60895ca55c421c0778ef32 +DIST bash52-032.sig 95 BLAKE2B 23a5cd003c957932d0c0192b63a5e8e7366bf939c3f54ff91b444e3729607c88677fdf4a5b435e47da4a64624b10d8696e4e950fac8fbb6932bb4c64506d1f9f SHA512 d3b08c3d0efee81a8507b530405a886259438bfc4c2ab984dbe80d30177775aacf6448a2673f0bd274fe46c938a8b8d46844d3794374bafce63f7c1d8bf4efe1 EBUILD bash-2.05b_p13.ebuild 5496 BLAKE2B 355c92076e71a0ffea6d56e9b0442a3ad4cbe521a9ad4b7ddd0cd860d6216af213fe1d2dcccc7cc1a4dac0f4399c68982368af2f8562c2f89d8b13d5f1487fbb SHA512 7b8c2b1a9c24ea63e6d6bdd1884c8aeca0b56d948dc40a200164caba4ab26a6aae314fa65bfdc39cb6a57581489b19da5e89f43c5e0af6451fddee0d83078491 EBUILD bash-3.0_p22.ebuild 5634 BLAKE2B 215938129431cdb7a048657c1c9c99c8232553c628c52f5acd0fffeb70e5b1bdf451684a9d1566eccbf5187f3f122fe17557a373553117bdd455d83ea80b8f2e SHA512 845d18879c0ee01101cbd8e39f96dcbcb7e56618adb047fef580992809b5bba60e9b385342f7d9ce2e03a0a0331db2ea7f4c461abddbefd4b15a3ddcfa1498c1 EBUILD bash-3.1_p23.ebuild 5311 BLAKE2B 120209e4a9281ce650abd7491850551836ab171f0a6b7dd37cda10d8be92a3ccdde4037597353dcdcdcbf40cf58b366c44ec2c6e7a4750758d5b197be54303ad SHA512 98bc564fb37b41fc577b1869101edccd8984552ae2dd465d80f306304cf2dc73328a2620c2882b4b028685c2f40307094c2886a61d29c033ff93129b2c3fa30b @@ -462,10 +477,13 @@ EBUILD bash-5.1_p16-r13.ebuild 10298 BLAKE2B b3b7bc3a466859b81e86b2201de8cdb4860 EBUILD bash-5.1_p16-r6.ebuild 8999 BLAKE2B e9208661767c61fbd9b06a61111db58908897bdb2d722b7ccbe5d79cd6d2e2543b6c1c89688e62f51ecdb36f107e74727dc6985396a20d8db8682c9036a6db7d SHA512 3fa9c420bbbc154569eb2a9ebb96681b4f10bb6cdbec43608d171f1d9c46a169d7f6cf8b3f419ff395ebe5dee852fa8c46ccd74c10ee9f0f10a6a281da679f5d EBUILD bash-5.2_p26-r6.ebuild 11693 BLAKE2B 7c95bd57481d0cc1c1765b1369178367e1fda1fea39da0e4bec48cd17a2feb21718551bc6b8750807c2f74d885e07eb337a3f11e4d9775dd4eba95191aa3ce51 SHA512 df4385c766d6db4183db901f363389c5ac6dbff09e131743db2439942b2fb43440b2a50e77233b5980509d02139eabd91a9083746cfd268eaf42a205ffdc9c30 EBUILD bash-5.2_p26-r8.ebuild 11730 BLAKE2B b685acc438968eedcdaf86a50a615e0aaf018c305a6e5efcc3e616c2c7fc4712e7d5378238b1db5b3f3fa929e01089a463c22e6a50086ae0407cf820e872f6e6 SHA512 505ba70c35ff4d0ee67143b0519175abaa4e20b9b16d417bac5666a5402364d452328ab5f83c9533074f63c68dfe7837af937f3e5222c2ddd237f0121f42c34a +EBUILD bash-5.2_p32.ebuild 11730 BLAKE2B f67b34c5c0ddcb80a06a60a96a20a74870d407d86fa7db14dbbe2996ee3d648309a1d58cf45b4fb0a4d80c50553f5de70eed12e417e59332e1d833dcfd3a22a1 SHA512 ea82beb82eaf10ad4fce14940f94a899f5618ad76291f71333c2d82bdc825a4ed8b348e241f2c0231d3b1c2e95d5d6280c30f24426d07a2f791576c4337a643a EBUILD bash-5.3_alpha-r5.ebuild 11566 BLAKE2B ab99c9907fce433ca5f21140c311b693ecdf4e2bb5356e16d3dc13c986f6f32284f7121b07a17340fdf2890ac8108e6c3dab0bcb3446f66447f741fd5e50c342 SHA512 8706a6346161c7a3159593f9bfcae1bb16c08f22bff648b6580f33708246f3eee2f7f3cd97eca8fd315b7b8f7daf22fcd4b7814e536a9c34d211738cccd36918 EBUILD bash-5.3_alpha_p20240628.ebuild 12157 BLAKE2B 4cdfe02bed8e0528b56f9b9e238422b62c5667506757ba2164e4cdca94cc5bd62836219640f279251b8687bf894d62a814835f8f0f1c782df1259e4cc5c13b56 SHA512 5d7a18371e2b3bbbad4c735b90ec5f31b1e4199dc62784f4e1432a837740214acf390ebaf902c10efc92010a2d892c70fd355e3e6dfa5f5429acd19640e47e44 EBUILD bash-5.3_alpha_p20240706.ebuild 12157 BLAKE2B fa964f0f6d25b023e1196ca29895b696e3f12817b01d9c7eb35000496cd5e0be9722bc87d683ac214734f8ddada63af7aa4bad8b9b1ad27629859791d9969459 SHA512 8aa53852ef9b240daf0607a4bc98383c21709f9a417d4a2c17412a51ee8b8665a10c1d8a033bda30611a5e7baf1c1f176e1e4b4162e207ab21071155c694b118 EBUILD bash-5.3_alpha_p20240711.ebuild 12157 BLAKE2B c6956c25a2f6f12bc2f8e44fcd1f9a33012d7bdebf01e300cbafe098ade1e3125b95398f7fce13d693cc1531679461f102caf61f46e6da48837c4f89b0bdd923 SHA512 198efbc06a32d8a275d83801cb5a142be1259f7420802ff0c0ed0c658b130f9e04dfbb4e277fec3a0b9112574ffa1a6f8203f7f58458a0aab57b8b85664c2e76 EBUILD bash-5.3_alpha_p20240718.ebuild 12157 BLAKE2B 0ca4e04bf456833e5b29243de0a9ef5e1ca9129d7199eac872fb5c0c1ebf7c08a2e9318d1c649490e8d0881a292e083f6965716bb607e5a178333c0e632a31b5 SHA512 0a47646a05e22a9afb7decac5003ac86e121c45ac429ac4558714cbe7e7f546a9ad3283095f349ce148af369a7293d8442b76381a20c53c59e69807e364053c8 +EBUILD bash-5.3_alpha_p20240726.ebuild 12157 BLAKE2B 5cf585f79437532ac4b5c3fa69b5a465229ef6c710013d807837baea4f8f0a1709b6626483820dc811210e38c817957fd7c267a5a4de2ccadd68d583c73ed423 SHA512 258346d9cdf1f7f23d62459f699149f1fae005be81ffd8f02df2a011ef47179f980c69a10d3e5e6f43dd99f6f1b283586e76b1f31cefe9d5d02c24a681a8b98a +EBUILD bash-5.3_alpha_p20240730.ebuild 12157 BLAKE2B 201660517a3e1002971d30c3a02dfe67e3fa97981d4b68dbc07ea57fdb4bea6234e8ca028cb16c9740c03ccaaf7854ad0b9e7ec26ab1c7695f791a02ea7e9dd9 SHA512 3e6f00dba4352344a9b281fb58d99874cb052cf2fdef0da52fbd6f6a03ea58b8028330cf25e1748de28d67a04a2a81fe7340c0534088950ec029046da8d89438 EBUILD bash-9999.ebuild 12157 BLAKE2B c6956c25a2f6f12bc2f8e44fcd1f9a33012d7bdebf01e300cbafe098ade1e3125b95398f7fce13d693cc1531679461f102caf61f46e6da48837c4f89b0bdd923 SHA512 198efbc06a32d8a275d83801cb5a142be1259f7420802ff0c0ed0c658b130f9e04dfbb4e277fec3a0b9112574ffa1a6f8203f7f58458a0aab57b8b85664c2e76 MISC metadata.xml 1009 BLAKE2B f71587b0a6d05b907f82b26be93b071290d91dc8f612f7b008a05eaa94d45be2ef8c1d992b7ac886648a9dcf964c30e8d9a7aff90d44835beb452e0d635b9533 SHA512 8aa1cb4c3206a76d10181394a91c315967fd9d3b359194f430f075fdd5a0b4b32149eec36b85412ef7e84b55e7b01955c75486b2df82b392a5acb3df8229a88d diff --git a/app-shells/bash/bash-5.2_p32.ebuild b/app-shells/bash/bash-5.2_p32.ebuild new file mode 100644 index 000000000000..c279cf9bca3d --- /dev/null +++ b/app-shells/bash/bash-5.2_p32.ebuild @@ -0,0 +1,402 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc +inherit flag-o-matic toolchain-funcs prefix verify-sig + +# Uncomment if we have a patchset. +#GENTOO_PATCH_DEV="sam" +#GENTOO_PATCH_VER="${PV}" + +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} +MY_P=${PN}-${MY_PV} +MY_PATCHES=() + +# Determine the patchlevel. See ftp://ftp.gnu.org/gnu/bash/bash-5.2-patches/. +case ${PV} in + *_p*) + PLEVEL=${PV##*_p} + ;; + 9999|*_alpha*|*_beta*|*_rc*) + # Set a negative patchlevel to indicate that it's a pre-release. + PLEVEL=-1 + ;; + *) + PLEVEL=0 +esac + +# The version of readline this bash normally ships with. Note that we only use +# the bundled copy of readline for pre-releases. +READLINE_VER="8.2_p1" + +DESCRIPTION="The standard GNU Bourne again shell" +HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" + EGIT_BRANCH=devel + inherit git-r3 +else + my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" ) + + # bash-5.1 -> bash51 + my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.} + + for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do + printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}" + my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" ) + MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" ) + done + + SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )" + + unset -v my_urls my_p my_patch_idx my_patch_ver +fi + +if [[ ${GENTOO_PATCH_VER} ]]; then + SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz" +fi + +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-3+" +SLOT="0" +if (( PLEVEL >= 0 )); then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi +IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline" + +DEPEND=" + >=sys-libs/ncurses-5.2-r2:= + nls? ( virtual/libintl ) +" +if (( PLEVEL >= 0 )); then + DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )" +fi +RDEPEND=" + ${DEPEND} +" +# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011). +BDEPEND=" + pgo? ( dev-util/gperf ) + verify-sig? ( sec-keys/openpgp-keys-chetramey ) +" + +# EAPI 8 tries to append it but it doesn't exist here. +QA_CONFIGURE_OPTIONS="--disable-static" + +PATCHES=( + #"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/ + + # Patches to or from Chet, posted to the bug-bash mailing list. + "${FILESDIR}/${PN}-5.0-syslog-history-extern.patch" + "${FILESDIR}/${PN}-5.2_p15-random-ub.patch" + "${FILESDIR}/${PN}-5.2_p15-configure-clang16.patch" + "${FILESDIR}/${PN}-5.2_p21-wpointer-to-int.patch" + "${FILESDIR}/${PN}-5.2_p21-configure-strtold.patch" + "${FILESDIR}/${PN}-5.2_p32-memory-leaks.patch" +) + +pkg_setup() { + # bug #7332 + if is-flag -malign-double; then + eerror "Detected bad CFLAGS '-malign-double'. Do not use this" + eerror "as it breaks LFS (struct stat64) on x86." + die "remove -malign-double from your CFLAGS mr ricer" + fi + + if use bashlogger; then + ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." + ewarn "This will log ALL output you enter into the shell, you have been warned." + fi +} + +src_unpack() { + local patch + + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig} + + for patch in "${MY_PATCHES[@]}"; do + verify-sig_verify_detached "${patch}"{,.sig} + done + fi + + unpack "${MY_P}.tar.gz" + + if [[ ${GENTOO_PATCH_VER} ]]; then + unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz" + fi + fi +} + +src_prepare() { + # Include official patches. + (( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}" + + # Clean out local libs so we know we use system ones w/releases. The + # touch utility is invoked for the benefit of config.status. + if (( PLEVEL >= 0 )); then + rm -rf lib/{readline,termcap}/* \ + && touch lib/{readline,termcap}/Makefile.in \ + && sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \ + || die + fi + + # Prefixify hardcoded path names. No-op for non-prefix. + hprefixify pathnames.h.in + + # Avoid regenerating docs after patches, bug #407985. + sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \ + && touch -r . doc/* \ + || die + + # Sometimes hangs (more noticeable w/ pgo), bug #907403. + rm tests/run-jobs || die + + eapply -p0 "${PATCHES[@]}" + eapply_user +} + +src_configure() { + local -a myconf + + # Upstream only test with Bison and require GNUisms like YYEOF and + # YYERRCODE. The former at least may be in POSIX soon: + # https://www.austingroupbugs.net/view.php?id=1269. + # configure warns on use of non-Bison but doesn't abort. The result + # may misbehave at runtime. + unset -v YACC + + myconf=( + --disable-profiling + + # Force linking with system curses ... the bundled termcap lib + # sucks bad compared to ncurses. For the most part, ncurses + # is here because readline needs it. But bash itself calls + # ncurses in one or two small places :(. + --with-curses + + $(use_enable mem-scramble) + $(use_enable net net-redirections) + $(use_enable readline) + $(use_enable readline bang-history) + $(use_enable readline history) + $(use_with afs) + $(use_with mem-scramble bash-malloc) + ) + + # For descriptions of these, see config-top.h. + # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 + append-cppflags \ + -DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \ + -DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \ + -DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \ + -DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \ + -DNON_INTERACTIVE_LOGIN_SHELLS \ + -DSSH_SOURCE_BASHRC \ + $(use bashlogger && echo -DSYSLOG_HISTORY) + + use nls || myconf+=( --disable-nls ) + + if (( PLEVEL >= 0 )); then + # Historically, we always used the builtin readline, but since + # our handling of SONAME upgrades has gotten much more stable + # in the PM (and the readline ebuild itself preserves the old + # libs during upgrades), linking against the system copy should + # be safe. + # Exact cached version here doesn't really matter as long as it + # is at least what's in the DEPEND up above. + export ac_cv_rl_version=${READLINE_VER%%_*} + + # Use system readline only with released versions. + myconf+=( --with-installed-readline=. ) + fi + + if use plugins; then + append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash" + else + # Disable the plugins logic by hand since bash doesn't provide + # a way of doing it. + export ac_cv_func_dl{close,open,sym}=no \ + ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no + + sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die + fi + + # bug #444070 + tc-export AR + + econf "${myconf[@]}" +} + +src_compile() { + local -a pgo_generate_flags pgo_use_flags + local flag + + # -fprofile-partial-training because upstream notes the test suite isn't + # super comprehensive. + # https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo + if use pgo; then + pgo_generate_flags=( + -fprofile-update=atomic + -fprofile-dir="${T}"/pgo + -fprofile-generate="${T}"/pgo + ) + pgo_use_flags=( + -fprofile-use="${T}"/pgo + -fprofile-dir="${T}"/pgo + ) + if flag=$(test-flags-CC -fprofile-partial-training); then + pgo_generate_flags+=( "${flag}" ) + pgo_use_flags+=( "${flag}" ) + fi + fi + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others + + # Build Bash and run its tests to generate profiles. + if (( ${#pgo_generate_flags[@]} )); then + # Used in test suite. + unset -v A + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check + + if tc-is-clang; then + llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die + fi + + # Rebuild Bash using the profiling data we just generated. + emake clean + emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others + fi +} + +src_test() { + # Used in test suite. + unset -v A + + default +} + +src_install() { + local d f + + default + + my_prefixify() { + while read -r; do + if [[ $REPLY == *$1* ]]; then + REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"} + fi + printf '%s\n' "${REPLY}" || ! break + done < "$2" || die + } + + dodir /bin + mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die + dosym bash /bin/rbash + + insinto /etc/bash + doins "${FILESDIR}"/bash_logout + my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc + + insinto /etc/bash/bashrc.d + my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash + newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r1.bash 10-gentoo-title.bash + if [[ ! ${EPREFIX} ]]; then + doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash + fi + + insinto /etc/skel + for f in bash{_logout,_profile,rc}; do + newins "${FILESDIR}/dot-${f}" ".${f}" + done + + if use plugins; then + exeinto "/usr/$(get_libdir)/bash" + set -- examples/loadables/*.o + doexe "${@%.o}" + + insinto /usr/include/bash-plugins + doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} + fi + + if use examples; then + for d in examples/{functions,misc,scripts,startup-files}; do + exeinto "/usr/share/doc/${PF}/${d}" + docinto "${d}" + for f in "${d}"/*; do + if [[ ${f##*/} != @(PERMISSION|*README) ]]; then + doexe "${f}" + else + dodoc "${f}" + fi + done + done + fi + + # Install bash_builtins.1 and rbash.1. + emake -C doc DESTDIR="${D}" install_builtins + sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die + doman "${T}"/rbash.1 + + newdoc CWRU/changelog ChangeLog + dosym bash.info /usr/share/info/bashref.info +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then + mkdir -p -- "${EROOT}"/etc/bash \ + && mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \ + || die + fi +} + +pkg_postinst() { + local old_ver + + # If /bin/sh does not exist, provide it. + if [[ ! -e ${EROOT}/bin/sh ]]; then + ln -sf -- bash "${EROOT}"/bin/sh || die + fi + + read -r old_ver <<<"${REPLACING_VERSIONS}" + if [[ ! $old_ver ]]; then + : + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + return + fi + + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, it may contain a command to set +the terminal's window title. Those who were already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash set the window title in the case +that the terminal is controlled by sshd(8), unless screen is launched on the +remote side or the terminal reliably supports saving and restoring the title +(as alacritty, foot and tmux do). Those wanting for the title to be set +regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d +drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF +} diff --git a/app-shells/bash/bash-5.3_alpha_p20240726.ebuild b/app-shells/bash/bash-5.3_alpha_p20240726.ebuild new file mode 100644 index 000000000000..25fcce4c5a89 --- /dev/null +++ b/app-shells/bash/bash-5.3_alpha_p20240726.ebuild @@ -0,0 +1,411 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc +inherit flag-o-matic toolchain-funcs prefix verify-sig + +# Uncomment if we have a patchset. +#GENTOO_PATCH_DEV="sam" +#GENTOO_PATCH_VER="${PV}" + +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} +MY_P=${PN}-${MY_PV} +MY_PATCHES=() + +# Determine the patchlevel. +case ${PV} in + 9999|*_alpha*|*_beta*|*_rc*) + # Set a negative patchlevel to indicate that it's a pre-release. + PLEVEL=-1 + ;; + *_p*) + PLEVEL=${PV##*_p} + ;; + *) + PLEVEL=0 +esac + +# The version of readline this bash normally ships with. Note that we only use +# the bundled copy of readline for pre-releases. +READLINE_VER="8.3_alpha" + +DESCRIPTION="The standard GNU Bourne again shell" +HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" + EGIT_BRANCH=devel + inherit git-r3 +elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + # It can be useful to have snapshots in the pre-release period once + # the first alpha is out, as various bugs get reported and fixed from + # the alpha, and the next pre-release is usually quite far away. + # + # i.e. if it's worth packaging the alpha, it's worth packaging a followup. + BASH_COMMIT="d5ef283cbdd08217efdc55974a6a8a2c52a7562f" + SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.xz -> ${P}-${BASH_COMMIT}.tar.xz" + S=${WORKDIR}/${PN}-${BASH_COMMIT} +else + my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" ) + + # bash-5.1 -> bash51 + my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.} + + for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do + printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}" + my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" ) + MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" ) + done + + SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )" + S=${WORKDIR}/${MY_P} + + unset -v my_urls my_p my_patch_idx my_patch_ver +fi + +if [[ ${GENTOO_PATCH_VER} ]]; then + SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz" +fi + +LICENSE="GPL-3+" +SLOT="0" +if (( PLEVEL >= 0 )); then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi +IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline" + +DEPEND=" + >=sys-libs/ncurses-5.2-r2:= + nls? ( virtual/libintl ) +" +if (( PLEVEL >= 0 )); then + DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )" +fi +RDEPEND=" + ${DEPEND} +" +# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011). +BDEPEND=" + pgo? ( dev-util/gperf ) + verify-sig? ( sec-keys/openpgp-keys-chetramey ) +" + +# EAPI 8 tries to append it but it doesn't exist here. +QA_CONFIGURE_OPTIONS="--disable-static" + +PATCHES=( + #"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/ + + # Patches to or from Chet, posted to the bug-bash mailing list. + "${FILESDIR}/${PN}-5.0-syslog-history-extern.patch" +) + +pkg_setup() { + # bug #7332 + if is-flag -malign-double; then + eerror "Detected bad CFLAGS '-malign-double'. Do not use this" + eerror "as it breaks LFS (struct stat64) on x86." + die "remove -malign-double from your CFLAGS mr ricer" + fi + + if use bashlogger; then + ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." + ewarn "This will log ALL output you enter into the shell, you have been warned." + fi +} + +src_unpack() { + local patch + + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + default + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig} + + for patch in "${MY_PATCHES[@]}"; do + verify-sig_verify_detached "${patch}"{,.sig} + done + fi + + unpack "${MY_P}.tar.gz" + + if [[ ${GENTOO_PATCH_VER} ]]; then + unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz" + fi + fi +} + +src_prepare() { + # Include official patches. + (( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}" + + # Clean out local libs so we know we use system ones w/releases. The + # touch utility is invoked for the benefit of config.status. + if (( PLEVEL >= 0 )); then + rm -rf lib/{readline,termcap}/* \ + && touch lib/{readline,termcap}/Makefile.in \ + && sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \ + || die + fi + + # Prefixify hardcoded path names. No-op for non-prefix. + hprefixify pathnames.h.in + + # Avoid regenerating docs after patches, bug #407985. + sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \ + && touch -r . doc/* \ + || die + + # Sometimes hangs (more noticeable w/ pgo), bug #907403. + rm tests/run-jobs || die + + eapply -p0 "${PATCHES[@]}" + eapply_user +} + +src_configure() { + local -a myconf + + # Upstream only test with Bison and require GNUisms like YYEOF and + # YYERRCODE. The former at least may be in POSIX soon: + # https://www.austingroupbugs.net/view.php?id=1269. + # configure warns on use of non-Bison but doesn't abort. The result + # may misbehave at runtime. + unset -v YACC + + # wcsnwidth(), substring() issues with -Wlto-type-mismatch, reported + # upstream to Chet by email. + filter-lto + + myconf=( + --disable-profiling + + # Force linking with system curses ... the bundled termcap lib + # sucks bad compared to ncurses. For the most part, ncurses + # is here because readline needs it. But bash itself calls + # ncurses in one or two small places :(. + --with-curses + + $(use_enable mem-scramble) + $(use_enable net net-redirections) + $(use_enable readline) + $(use_enable readline bang-history) + $(use_enable readline history) + $(use_with afs) + $(use_with mem-scramble bash-malloc) + ) + + # For descriptions of these, see config-top.h. + # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 + append-cppflags \ + -DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \ + -DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \ + -DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \ + -DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \ + -DNON_INTERACTIVE_LOGIN_SHELLS \ + -DSSH_SOURCE_BASHRC \ + $(use bashlogger && echo -DSYSLOG_HISTORY) + + use nls || myconf+=( --disable-nls ) + + if (( PLEVEL >= 0 )); then + # Historically, we always used the builtin readline, but since + # our handling of SONAME upgrades has gotten much more stable + # in the PM (and the readline ebuild itself preserves the old + # libs during upgrades), linking against the system copy should + # be safe. + # Exact cached version here doesn't really matter as long as it + # is at least what's in the DEPEND up above. + export ac_cv_rl_version=${READLINE_VER%%_*} + + # Use system readline only with released versions. + myconf+=( --with-installed-readline=. ) + fi + + if use plugins; then + append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash" + else + # Disable the plugins logic by hand since bash doesn't provide + # a way of doing it. + export ac_cv_func_dl{close,open,sym}=no \ + ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no + + sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die + fi + + # bug #444070 + tc-export AR + + econf "${myconf[@]}" +} + +src_compile() { + local -a pgo_generate_flags pgo_use_flags + local flag + + # -fprofile-partial-training because upstream notes the test suite isn't + # super comprehensive. + # https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo + if use pgo; then + pgo_generate_flags=( + -fprofile-update=atomic + -fprofile-dir="${T}"/pgo + -fprofile-generate="${T}"/pgo + ) + pgo_use_flags=( + -fprofile-use="${T}"/pgo + -fprofile-dir="${T}"/pgo + ) + if flag=$(test-flags-CC -fprofile-partial-training); then + pgo_generate_flags+=( "${flag}" ) + pgo_use_flags+=( "${flag}" ) + fi + fi + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others + + # Build Bash and run its tests to generate profiles. + if (( ${#pgo_generate_flags[@]} )); then + # Used in test suite. + unset -v A + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check + + if tc-is-clang; then + llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die + fi + + # Rebuild Bash using the profiling data we just generated. + emake clean + emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others + fi +} + +src_test() { + # Used in test suite. + unset -v A + + default +} + +src_install() { + local d f + + default + + my_prefixify() { + while read -r; do + if [[ $REPLY == *$1* ]]; then + REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"} + fi + printf '%s\n' "${REPLY}" || ! break + done < "$2" || die + } + + dodir /bin + mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die + dosym bash /bin/rbash + + insinto /etc/bash + doins "${FILESDIR}"/bash_logout + my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc + + insinto /etc/bash/bashrc.d + my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash + newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r1.bash 10-gentoo-title.bash + if [[ ! ${EPREFIX} ]]; then + doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash + fi + + insinto /etc/skel + for f in bash{_logout,_profile,rc}; do + newins "${FILESDIR}/dot-${f}" ".${f}" + done + + if use plugins; then + exeinto "/usr/$(get_libdir)/bash" + set -- examples/loadables/*.o + doexe "${@%.o}" + + insinto /usr/include/bash-plugins + doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} + fi + + if use examples; then + for d in examples/{functions,misc,scripts,startup-files}; do + exeinto "/usr/share/doc/${PF}/${d}" + docinto "${d}" + for f in "${d}"/*; do + if [[ ${f##*/} != @(PERMISSION|*README) ]]; then + doexe "${f}" + else + dodoc "${f}" + fi + done + done + fi + + # Install bash_builtins.1 and rbash.1. + emake -C doc DESTDIR="${D}" install_builtins + sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die + doman "${T}"/rbash.1 + + newdoc CWRU/changelog ChangeLog + dosym bash.info /usr/share/info/bashref.info +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then + mkdir -p -- "${EROOT}"/etc/bash \ + && mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \ + || die + fi +} + +pkg_postinst() { + local old_ver + + # If /bin/sh does not exist, provide it. + if [[ ! -e ${EROOT}/bin/sh ]]; then + ln -sf -- bash "${EROOT}"/bin/sh || die + fi + + read -r old_ver <<<"${REPLACING_VERSIONS}" + if [[ ! $old_ver ]]; then + : + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + return + fi + + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, it may contain a command to set +the terminal's window title. Those who were already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash set the window title in the case +that the terminal is controlled by sshd(8), unless screen is launched on the +remote side or the terminal reliably supports saving and restoring the title +(as alacritty, foot and tmux do). Those wanting for the title to be set +regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d +drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF +} diff --git a/app-shells/bash/bash-5.3_alpha_p20240730.ebuild b/app-shells/bash/bash-5.3_alpha_p20240730.ebuild new file mode 100644 index 000000000000..99ac03b99361 --- /dev/null +++ b/app-shells/bash/bash-5.3_alpha_p20240730.ebuild @@ -0,0 +1,411 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc +inherit flag-o-matic toolchain-funcs prefix verify-sig + +# Uncomment if we have a patchset. +#GENTOO_PATCH_DEV="sam" +#GENTOO_PATCH_VER="${PV}" + +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} +MY_P=${PN}-${MY_PV} +MY_PATCHES=() + +# Determine the patchlevel. +case ${PV} in + 9999|*_alpha*|*_beta*|*_rc*) + # Set a negative patchlevel to indicate that it's a pre-release. + PLEVEL=-1 + ;; + *_p*) + PLEVEL=${PV##*_p} + ;; + *) + PLEVEL=0 +esac + +# The version of readline this bash normally ships with. Note that we only use +# the bundled copy of readline for pre-releases. +READLINE_VER="8.3_alpha" + +DESCRIPTION="The standard GNU Bourne again shell" +HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" + EGIT_BRANCH=devel + inherit git-r3 +elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + # It can be useful to have snapshots in the pre-release period once + # the first alpha is out, as various bugs get reported and fixed from + # the alpha, and the next pre-release is usually quite far away. + # + # i.e. if it's worth packaging the alpha, it's worth packaging a followup. + BASH_COMMIT="e45ec6f76bea49cf8df306ac45022306831ed086" + SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.xz -> ${P}-${BASH_COMMIT}.tar.xz" + S=${WORKDIR}/${PN}-${BASH_COMMIT} +else + my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" ) + + # bash-5.1 -> bash51 + my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.} + + for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do + printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}" + my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" ) + MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" ) + done + + SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )" + S=${WORKDIR}/${MY_P} + + unset -v my_urls my_p my_patch_idx my_patch_ver +fi + +if [[ ${GENTOO_PATCH_VER} ]]; then + SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz" +fi + +LICENSE="GPL-3+" +SLOT="0" +if (( PLEVEL >= 0 )); then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi +IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline" + +DEPEND=" + >=sys-libs/ncurses-5.2-r2:= + nls? ( virtual/libintl ) +" +if (( PLEVEL >= 0 )); then + DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )" +fi +RDEPEND=" + ${DEPEND} +" +# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011). +BDEPEND=" + pgo? ( dev-util/gperf ) + verify-sig? ( sec-keys/openpgp-keys-chetramey ) +" + +# EAPI 8 tries to append it but it doesn't exist here. +QA_CONFIGURE_OPTIONS="--disable-static" + +PATCHES=( + #"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/ + + # Patches to or from Chet, posted to the bug-bash mailing list. + "${FILESDIR}/${PN}-5.0-syslog-history-extern.patch" +) + +pkg_setup() { + # bug #7332 + if is-flag -malign-double; then + eerror "Detected bad CFLAGS '-malign-double'. Do not use this" + eerror "as it breaks LFS (struct stat64) on x86." + die "remove -malign-double from your CFLAGS mr ricer" + fi + + if use bashlogger; then + ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." + ewarn "This will log ALL output you enter into the shell, you have been warned." + fi +} + +src_unpack() { + local patch + + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + default + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig} + + for patch in "${MY_PATCHES[@]}"; do + verify-sig_verify_detached "${patch}"{,.sig} + done + fi + + unpack "${MY_P}.tar.gz" + + if [[ ${GENTOO_PATCH_VER} ]]; then + unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz" + fi + fi +} + +src_prepare() { + # Include official patches. + (( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}" + + # Clean out local libs so we know we use system ones w/releases. The + # touch utility is invoked for the benefit of config.status. + if (( PLEVEL >= 0 )); then + rm -rf lib/{readline,termcap}/* \ + && touch lib/{readline,termcap}/Makefile.in \ + && sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \ + || die + fi + + # Prefixify hardcoded path names. No-op for non-prefix. + hprefixify pathnames.h.in + + # Avoid regenerating docs after patches, bug #407985. + sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \ + && touch -r . doc/* \ + || die + + # Sometimes hangs (more noticeable w/ pgo), bug #907403. + rm tests/run-jobs || die + + eapply -p0 "${PATCHES[@]}" + eapply_user +} + +src_configure() { + local -a myconf + + # Upstream only test with Bison and require GNUisms like YYEOF and + # YYERRCODE. The former at least may be in POSIX soon: + # https://www.austingroupbugs.net/view.php?id=1269. + # configure warns on use of non-Bison but doesn't abort. The result + # may misbehave at runtime. + unset -v YACC + + # wcsnwidth(), substring() issues with -Wlto-type-mismatch, reported + # upstream to Chet by email. + filter-lto + + myconf=( + --disable-profiling + + # Force linking with system curses ... the bundled termcap lib + # sucks bad compared to ncurses. For the most part, ncurses + # is here because readline needs it. But bash itself calls + # ncurses in one or two small places :(. + --with-curses + + $(use_enable mem-scramble) + $(use_enable net net-redirections) + $(use_enable readline) + $(use_enable readline bang-history) + $(use_enable readline history) + $(use_with afs) + $(use_with mem-scramble bash-malloc) + ) + + # For descriptions of these, see config-top.h. + # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 + append-cppflags \ + -DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \ + -DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \ + -DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \ + -DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \ + -DNON_INTERACTIVE_LOGIN_SHELLS \ + -DSSH_SOURCE_BASHRC \ + $(use bashlogger && echo -DSYSLOG_HISTORY) + + use nls || myconf+=( --disable-nls ) + + if (( PLEVEL >= 0 )); then + # Historically, we always used the builtin readline, but since + # our handling of SONAME upgrades has gotten much more stable + # in the PM (and the readline ebuild itself preserves the old + # libs during upgrades), linking against the system copy should + # be safe. + # Exact cached version here doesn't really matter as long as it + # is at least what's in the DEPEND up above. + export ac_cv_rl_version=${READLINE_VER%%_*} + + # Use system readline only with released versions. + myconf+=( --with-installed-readline=. ) + fi + + if use plugins; then + append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash" + else + # Disable the plugins logic by hand since bash doesn't provide + # a way of doing it. + export ac_cv_func_dl{close,open,sym}=no \ + ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no + + sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die + fi + + # bug #444070 + tc-export AR + + econf "${myconf[@]}" +} + +src_compile() { + local -a pgo_generate_flags pgo_use_flags + local flag + + # -fprofile-partial-training because upstream notes the test suite isn't + # super comprehensive. + # https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo + if use pgo; then + pgo_generate_flags=( + -fprofile-update=atomic + -fprofile-dir="${T}"/pgo + -fprofile-generate="${T}"/pgo + ) + pgo_use_flags=( + -fprofile-use="${T}"/pgo + -fprofile-dir="${T}"/pgo + ) + if flag=$(test-flags-CC -fprofile-partial-training); then + pgo_generate_flags+=( "${flag}" ) + pgo_use_flags+=( "${flag}" ) + fi + fi + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others + + # Build Bash and run its tests to generate profiles. + if (( ${#pgo_generate_flags[@]} )); then + # Used in test suite. + unset -v A + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check + + if tc-is-clang; then + llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die + fi + + # Rebuild Bash using the profiling data we just generated. + emake clean + emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others + fi +} + +src_test() { + # Used in test suite. + unset -v A + + default +} + +src_install() { + local d f + + default + + my_prefixify() { + while read -r; do + if [[ $REPLY == *$1* ]]; then + REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"} + fi + printf '%s\n' "${REPLY}" || ! break + done < "$2" || die + } + + dodir /bin + mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die + dosym bash /bin/rbash + + insinto /etc/bash + doins "${FILESDIR}"/bash_logout + my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc + + insinto /etc/bash/bashrc.d + my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash + newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r1.bash 10-gentoo-title.bash + if [[ ! ${EPREFIX} ]]; then + doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash + fi + + insinto /etc/skel + for f in bash{_logout,_profile,rc}; do + newins "${FILESDIR}/dot-${f}" ".${f}" + done + + if use plugins; then + exeinto "/usr/$(get_libdir)/bash" + set -- examples/loadables/*.o + doexe "${@%.o}" + + insinto /usr/include/bash-plugins + doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} + fi + + if use examples; then + for d in examples/{functions,misc,scripts,startup-files}; do + exeinto "/usr/share/doc/${PF}/${d}" + docinto "${d}" + for f in "${d}"/*; do + if [[ ${f##*/} != @(PERMISSION|*README) ]]; then + doexe "${f}" + else + dodoc "${f}" + fi + done + done + fi + + # Install bash_builtins.1 and rbash.1. + emake -C doc DESTDIR="${D}" install_builtins + sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die + doman "${T}"/rbash.1 + + newdoc CWRU/changelog ChangeLog + dosym bash.info /usr/share/info/bashref.info +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then + mkdir -p -- "${EROOT}"/etc/bash \ + && mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \ + || die + fi +} + +pkg_postinst() { + local old_ver + + # If /bin/sh does not exist, provide it. + if [[ ! -e ${EROOT}/bin/sh ]]; then + ln -sf -- bash "${EROOT}"/bin/sh || die + fi + + read -r old_ver <<<"${REPLACING_VERSIONS}" + if [[ ! $old_ver ]]; then + : + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + return + fi + + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, it may contain a command to set +the terminal's window title. Those who were already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash set the window title in the case +that the terminal is controlled by sshd(8), unless screen is launched on the +remote side or the terminal reliably supports saving and restoring the title +(as alacritty, foot and tmux do). Those wanting for the title to be set +regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d +drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF +} diff --git a/app-shells/bash/files/bash-5.2_p32-memory-leaks.patch b/app-shells/bash/files/bash-5.2_p32-memory-leaks.patch new file mode 100644 index 000000000000..0c60e70d3cb5 --- /dev/null +++ b/app-shells/bash/files/bash-5.2_p32-memory-leaks.patch @@ -0,0 +1,130 @@ +[Compared to bash-5.2_p26-memory-leaks.patch, this drops a hunk for +builtins/evalstring.c as the open_redir_file issue is fixed in patch 31 +upstream for bash-5.2] + +https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00036.html +https://lists.gnu.org/archive/html/bug-bash/2024-01/txtm8yNNPR9RQ.txt + +For evalstring.c: +* https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00011.html +* https://git.savannah.gnu.org/cgit/bash.git/diff/builtins/evalstring.c?h=devel&id=81f7b44564cd1510788035cea7c59631865a7db2&dt=1#n766 + +From 711ab85262884f2b91f09eceb9aefd0e2426ce67 Mon Sep 17 00:00:00 2001 +From: Grisha Levit <grishalevit@gmail.com> +Date: Sat, 3 Jun 2023 16:51:26 -0400 +Subject: [PATCH] various leaks + +Found mostly by normal usage running a no-bash-malloc build with clang's +LeakSanitizer enabled. So far seems to provide very accurate results. + +* arrayfunc.c +- quote_compound_array_word: make sure to free VALUE +- bind_assoc_var_internal: if assigning to a dynamic variable, make sure + to free the key (usually assoc_insert would do it) + +* bashline.c +- bash_command_name_stat_hook: free original *NAME if we are going to + change what it points to (what the callers seem to expect) + +* builtins/evalstring.c +- parse_and_execute: make sure to dispose of the parsed command + resulting from a failed function import attempt + +* examples/loadables/stat.c +- loadstat: bind_assoc_variable does not free its VALUE argument so make + sure to do it + +* subst.c +- param_expand: free temp1 value for codepaths that don't do it +--- + arrayfunc.c | 6 +++++- + bashline.c | 1 + + builtins/evalstring.c | 4 ++++ + examples/loadables/stat.c | 1 + + subst.c | 2 ++ + 5 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/arrayfunc.c b/arrayfunc.c +index 2c05d15b..8ba64084 100644 +--- arrayfunc.c ++++ arrayfunc.c +@@ -208,7 +208,10 @@ bind_assoc_var_internal (entry, hash, key, value, flags) + newval = make_array_variable_value (entry, 0, key, value, flags); + + if (entry->assign_func) +- (*entry->assign_func) (entry, newval, 0, key); ++ { ++ (*entry->assign_func) (entry, newval, 0, key); ++ FREE (key); ++ } + else + assoc_insert (hash, key, newval); + +@@ -985,6 +988,7 @@ quote_compound_array_word (w, type) + if (t != w+ind) + free (t); + strcpy (nword + i, value); ++ free (value); + + return nword; + } +diff --git a/bashline.c b/bashline.c +index c85b05b6..bd7548cc 100644 +--- bashline.c ++++ bashline.c +@@ -1928,6 +1928,7 @@ bash_command_name_stat_hook (name) + result = search_for_command (cname, 0); + if (result) + { ++ FREE (*name); + *name = result; + return 1; + } +diff --git a/builtins/evalstring.c b/builtins/evalstring.c +index df3dd68e..20c6a4a7 100644 +--- builtins/evalstring.c ++++ builtins/evalstring.c +@@ -461,6 +461,8 @@ parse_and_execute (string, from_file, flags) + should_jump_to_top_level = 0; + last_result = last_command_exit_value = EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); ++ dispose_command(command); ++ global_command = (COMMAND *)NULL; + reset_parser (); + break; + } + +diff --git a/examples/loadables/stat.c b/examples/loadables/stat.c +index 1e60e7b6..ed5c9764 100644 +--- examples/loadables/stat.c ++++ examples/loadables/stat.c +@@ -349,6 +349,7 @@ loadstat (vname, var, fname, flags, fmt, sp) + key = savestring (arraysubs[i]); + value = statval (i, fname, flags, fmt, sp); + v = bind_assoc_variable (var, vname, key, value, ASS_FORCE); ++ free (value); + } + return 0; + } +diff --git a/subst.c b/subst.c +index 1ac6eb2d..ff0602da 100644 +--- subst.c ++++ subst.c +@@ -10727,6 +10727,7 @@ comsub: + { + chk_atstar (temp, quoted, pflags, quoted_dollar_at_p, contains_dollar_at); + tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, 0); ++ free (temp1); + if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) + return (tdesc); + ret = tdesc; +@@ -10739,6 +10740,7 @@ comsub: + { + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: invalid variable name for name reference"), temp); ++ free (temp1); + return (&expand_wdesc_error); /* XXX */ + } + else +-- +2.43.0 |