summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Barlow <randy@electronsweatshop.com>2021-09-18 13:54:38 -0400
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-09-18 15:08:02 -0700
commit02ab510ce592341df79855dfd04ec0b1e926fcc4 (patch)
tree60e13da7f3c84262c15b6525092e908ed570745c /sys-process/bottom
parentdev-qt/qtwebengine: Stabilize 5.15.2_p20210824-r1 amd64, #811441 (diff)
downloadgentoo-02ab510ce592341df79855dfd04ec0b1e926fcc4.tar.gz
gentoo-02ab510ce592341df79855dfd04ec0b1e926fcc4.tar.bz2
gentoo-02ab510ce592341df79855dfd04ec0b1e926fcc4.zip
sys-process/bottom: Update to 0.6.4
I have applied patches here to address two vulnerable dependencies[0] and a failing test[1]. This fixes RUSTSEC-2021-0003[2] and RUSTSEC-2021-0093[3]. [0] https://github.com/ClementTsang/bottom/pull/580 [1] https://github.com/ClementTsang/bottom/pull/582 [2] https://rustsec.org/advisories/RUSTSEC-2021-0003 [3] https://rustsec.org/advisories/RUSTSEC-2021-0093 Closes: https://github.com/gentoo/gentoo/pull/22328 Signed-off-by: Randy Barlow <randy@electronsweatshop.com> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sys-process/bottom')
-rw-r--r--sys-process/bottom/Manifest4
-rw-r--r--sys-process/bottom/bottom-0.6.4.ebuild225
-rw-r--r--sys-process/bottom/files/bottom-0.6.4-RUSTSEC-2021-0003.patch31
-rw-r--r--sys-process/bottom/files/bottom-0.6.4-RUSTSEC-2021-0093.patch31
-rw-r--r--sys-process/bottom/files/bottom-0.6.4-feature-gate-test_default_battery_movement.patch41
-rw-r--r--sys-process/bottom/metadata.xml3
6 files changed, 335 insertions, 0 deletions
diff --git a/sys-process/bottom/Manifest b/sys-process/bottom/Manifest
index 8140e03c3026..ed5d846e852c 100644
--- a/sys-process/bottom/Manifest
+++ b/sys-process/bottom/Manifest
@@ -20,6 +20,7 @@ DIST battery-0.7.8.crate 40344 BLAKE2B 588d36a7f3050e07ccbeada47a328a474dcd647ce
DIST bitflags-1.2.1.crate 16745 BLAKE2B 0fa6d3ce44aad7616d5cd02aad8c1d0b0fed4022650eb43067c4a72e6fc88da05442674fa51826e4858a47c9de233e1ba2229820af094197cd11bb416ceffb2b SHA512 ad89b3798845e23737a620bba581c2ff1ff3e15bac12555c765e201d2c0b90ecea0cdbc5b5b1a3fa9858c385e8e041f8226f5acfae5bbbe9925643fff2bf3f0b
DIST blocking-1.0.2.crate 18571 BLAKE2B 30e69dce433ba3c0d153275b5a56407237de93a50d7a3f9b97505b17899400f8cc8c3dede3f63fca26d5d49e88c3c9ee7ba91401061dedc41358efe24a9bf2b9 SHA512 f9048544161cb3098ec7362487c8df4ece972445dfc94196cc2cbe7faa2b6f3f3e5abe56310675c798636148b0b709d864fb94959d36976043886feb149adb66
DIST bottom-0.6.3.crate 7713733 BLAKE2B cf5fe1d6cbdd636810874a21cd28b0239356b50e91edc03edc30d763a5669f19de7ffbcc44bbb321d15bcc9e00d6d7b4c7a8224a4cfb95c031cb1776575fe56b SHA512 9e5bba4a755af4fbe0c09c1454db20a3e115204b955dd6384adfcc91f038ffa5573fc87b7b9c12d24234d6e3ac14732f1054e4b4c246414c8fd3aa66c1fbb66a
+DIST bottom-0.6.4.crate 7809199 BLAKE2B 4fbcb7fc1053e546a3e0aeb887bbf6c68f8058f527f37354475e2fbe3353cde39abd5c1d32bbd23ff24ef896f206821959e7f67a5c26b668ed3f0b4d80787be2 SHA512 aa96f4204435125c0fa64337b5a473932a0841c3b830579ec28aaac80e9e79e62bf1303557a31f5141b4bb95a610aac8b4dd559978168485902f6c822361706d
DIST bstr-0.2.15.crate 344206 BLAKE2B 3a4f24d2a039f7aeee3b6fcbfcc2fa72f1ef8a06ff8bc039af055739436655851565a57e5a4f86a7984b00ee7598c1fbdf26f3302929f91d7efb1327fd36eb57 SHA512 6e464ca1aec722a283759ff6978bab1769dfc8d61aa683f8e4c59bd69c7be2fe86c5470f4c54457871c6640e2d50b6b882747ec567098eb78e62f7cb07cb93a2
DIST byteorder-1.4.2.crate 22148 BLAKE2B 4fd246d80ec9e0abf41a0779668d8b383098206eacbf7e16ab94a4aac39858471742934df41e20084f976a738154a97f642bebe51cb871afb2a50ff2cbdbf943 SHA512 f6d2bdc3fb456b3f7a99358a987bb593be027b47b06b896938a30a88d36459ec4d28be166ff8fea9b1ea468d95ad387488cc6aa8f07d0723d6a2a7d43e3617e8
DIST cache-padded-1.1.1.crate 8798 BLAKE2B 3f2b16f0fefcc5acf692684329e38ff59492d4c299413d25e1634ab27a59512b7453cad28b26f34f2b66db3d3c0b4b26f41df042305b7db2b8ca79d36704e8a4 SHA512 72c36ef2f66a097cf2fcbc06b82fa3d5451ecf2de1ee1513fbeb34c6752436109f9e453bec3aab7e1f89723c24f7c230cf4bff6caa09855402c8f92c1ccf49b5
@@ -39,6 +40,7 @@ DIST core-foundation-sys-0.8.2.crate 17461 BLAKE2B bafa6f6af67f55b34c20e50093a54
DIST crc32fast-1.2.1.crate 38172 BLAKE2B 80801a345f4c5ed8a5fd335bbf672eac1733a1c2b333dc8a8e0254338148ce7b34402201a8d2d7434dd1b057f33d99d3a8f02610ea50b54115d80bb8da28b2b0 SHA512 4c04236bb15a5c63b712c62652777917e947823abb20a0d0b372c850ec1c8695faa414e8de73904f1f1a296d7b00a6206cde8da404cf4cdaa2e8408e64b62b5e
DIST crossbeam-channel-0.5.0.crate 86811 BLAKE2B 9af4384f2b74d202971f1967887cfd0e71ddba9a6456ffbdfc80bf192d527f61242239d2eb6a0d9dcbe47be22eb414736976e6b1840c021610d96a3bf03c3d18 SHA512 838b433d48b84f1fea020a1d1324e366e6cdae30ef07396140f195afc45b8f705de6347d949b68ce1ed0708fe533ffaa2cfdedc9d2e6288a7325c188ccde9aa2
DIST crossbeam-deque-0.8.0.crate 20756 BLAKE2B 6bb602547cb0ca65552a9b981502221f1d3570422d22c867f654ba677e5c95aa5f81ed0022a498d3408c3f69291e1805b49fcfbfaff0d9a6075b75be3bf926ea SHA512 4efa73dcb9ef40b841039d24ffaf9bd7c63f8c0233bba1e0728fd5558702b4ef0af117543834c527335e99384d3c80d56293e891c9d94440f51f454b1b90c399
+DIST crossbeam-deque-0.8.1.crate 20852 BLAKE2B 0e7a2616b82c5e501c0f74935adfea3ee09db5475408be83db8f1b6faab4cd5509de2e029bdf6df90435e474ef91f3fc8d482ce3a72966b2a3bec5967666bdc4 SHA512 44a4fe1d4ab7457e2b0950be787b76b15e1bb0b1c108d032381ce3fe99bf7bf76f3d1718085660083d813e2639e66fdd3635d9186e85a9eb7267063b117eaca4
DIST crossbeam-epoch-0.9.1.crate 39561 BLAKE2B dedbd19d8aba2c19b844a10323ab488f0dffd5a8ad041cd715a9b1d6d14da343c0c680f6756736501ae420846a5d19bf5aa7bc7142daa39fee901e97f28bb557 SHA512 63d03e71013f7ffbc7b7a8ec5fe478323e7cf679bd126f03980c5e0790b57f5c48ce0ddb5e9c7ece31bd7380a944c1a1d462a9a1bf0126f9851e549739d8afc4
DIST crossbeam-utils-0.8.1.crate 35914 BLAKE2B 8d8e7e2df01f061d3596127dd62c1d5316540fbdb34e6b88badff8968a408b2bdbd0f86a32531f4e276b6d40a89c4834cd8e9991288a0bb8cc27d99ba2f7b978 SHA512 c9f3a513fd139dab3c8091366cd6d378ef8a4d00eb43a6c26d107361fea470a5ab180950a1204c1a8881c2ed1106500327d598ccb09c79d0eba2db11299aa286
DIST crossterm-0.18.2.crate 108404 BLAKE2B ba276975b3440f4d976c4f66aca2f46f2b8cc4715610e4fc6d3e1de2c98570639b68e4464393fbcb575091e3e8bc3af2ce567775b31a1bb9532cd8a42ef8c15a SHA512 21673eb1efa4b353b48c4d2e4780505fb1deb5ab5767787acf5f7133ef45e83176ad8d020804052e6b283135e72e1fa623b8e37417f805102a39d98cd72a4f18
@@ -119,6 +121,7 @@ DIST predicates-tree-1.0.0.crate 6251 BLAKE2B 00da28f7de9a7abb386c6a4425d8a2285d
DIST proc-macro-hack-0.5.19.crate 15556 BLAKE2B 98c22fc3e5f5fa8b6f44d15de42b6ffcc82ba3f98a07ffa48bcbc5d3abcfca6af136c5d0d8c7f1ca34261ed8f8c9c17a394231f97a4c342c81aa7f8b9e74b203 SHA512 9e4cbec41056438287f5b23086264c86e2f0cdc193064006556736377b2954229de13a585149b9995002c9aee3334ee2a80ae4afdcc96cabe7ed2bf718476952
DIST proc-macro-nested-0.1.6.crate 6498 BLAKE2B 6225a30c1668ac20c3c9ded7633458ab7079bd126aae538762547b112012050e9aae22389e2a18cc14696212a092a9985bc72538d4ca4d37ca0faf34a68c3833 SHA512 ed89e9bfc30e8d7a9be742a02e8f269bcedcf511d9e1487866f198b4410a2802ab576171b844ed15fa2848689247afcd208016555442dc24fef7609400e9c38f
DIST proc-macro2-1.0.27.crate 38625 BLAKE2B a55e2404e3c7444c6da8aca6c0e7702b865ec56cfd2c20fec319e737fc83b00bbf505c15dadaa8740d5a6d07c089ed4854a173049b1be9872bba132ae7cbc8db SHA512 3227bcaa726e88bfdb1b4d1243a4eb216ad2394a7a3b4b258de342ac76a1ab1a39a07f28f3490e42e2c2034176bf0d84b1c1fcadba2444c0abcc5878b02f93a4
+DIST procfs-0.10.1.crate 99288 BLAKE2B 625739fcb8cb0be3b62ae33ebf0a60236ab5872c15420eda331565a82a59fa69d7881da70f047ea9359feab66aa827d6ab8bb01251ccb9615c2a4bebc315d57a SHA512 21803f9bcf9e2ddb19876eeaa1c4cd0d52b1e8ba88cb47c63054a34c8f59266f5221ba72eef6672c0db3fd968523051cf49477220a83e542e8c9ebdb3cee6628
DIST procfs-0.9.1.crate 95051 BLAKE2B 62ed9f2ade0af58f6cc765da0bbb8540e8a1325f7532dca522accdcfd9a6a3b1b05321770114baf7092f16d38a1f77eabd43d9cd42c8bfdfaacbc25387fe2ff3 SHA512 9946c82b85dcaa53b0f0d98e48fe764b1f196f850eef29ac8abd1f7732c3200fbcf40b616186da43eef7ad8acdb288f5350a0ff176ceb338135f3d2ce38cbbbb
DIST quote-1.0.7.crate 25170 BLAKE2B 9597c94ac365bb6e9d632738a88ece2da7818cb9f3fa0e755324e693eb513c76347032737025375a486319caad13c22ae13bcb257703eacdf2fdc755cbac0de2 SHA512 b7cb576c07419854f71072a88e4216f50d78196703d3d8a1068dfd0f2ccb1e417c3a865ec3be613b46e74e46654f64378f527800701f74d50352cb766a885953
DIST rayon-1.5.0.crate 158037 BLAKE2B 6cb7f696e9c04d3aa6c3bf9c95690c2e259267024ac9701da5cd85c7d39b900a7e9e423e5b7602e108587a34c2519642ce1456dfd82fb13328ed3aba7516b569 SHA512 be15cbc7ad0fadb55e5640c78aa2eeac282872be88c5402338caad0a7ea604d2b8477648dcf7e453e22fbcdfefa915aa4bdbfa75e3d4f7a993fd8d85ed68395a
@@ -137,6 +140,7 @@ DIST signal-hook-0.1.16.crate 27183 BLAKE2B e275b3516c8e4dfb5f61f8d85c255237e152
DIST signal-hook-registry-1.2.2.crate 18127 BLAKE2B a47342d3ad3539e69a0449d6a8e526d94b858f2ca7c0ce03c52c05d095ffbaa05b803c0c585cabfef498244c647584b102d98f2bbb2da072ea5abf2fbd315657 SHA512 1d595cd19fabbb687262a4892449011ea2f8edf2d295d7a37ab05b252116271ae9c9639c336a66be94ffc82b12bc6a2aca0db2b6f31a11bc7428b39c8ae1efbd
DIST slab-0.4.2.crate 10136 BLAKE2B e30cad459bbbb69c4b56a573c47f4188714e0da298d87015c35a86c9315dc2d4308f27d7758846069b0cf94c93f10c44b0f8895427cdf1c93ae20adbb21b5977 SHA512 f9fd70d0cc5180393cebbe87fe984de0c103db1c2c2648fb7a0ee22cdabf37a7338fd511538f00e9a5564365cce2879afe19bf77c435870197bd6cafef5d6661
DIST smallvec-1.5.1.crate 26270 BLAKE2B 6275cd8f3e107f19e6badfc357d860d6c4832c3063491e4ed552483f6b46cad52d4de914f59bd9afa001d8a62a93580d6927dc5927ce62aab67e14ba9894d4c4 SHA512 e9b2e4c00ae8fb3bee01337dcbed586e72e922fbfbb69e7c79f3a6c9933495c56b1834797ea2a08e42bcf9cfa9c0842c414c2fcd68817e2b0702b2908b033842
+DIST smallvec-1.6.1.crate 26444 BLAKE2B ca6c50a63acdd93a2131654d99e50545a6e2d08eb3e2bd57d4a8ee073d90c08195ee442745a8d62a68179ce7bb8e229b7ff8c6fcf46372a9844bc9280b7c85cb SHA512 9e6061c8211a4485ab54eb541adf40748e1fc3fdfab0849e38e5fd34fc6cc69ae78bd065b788692385a6b8157b031c2fe373900e13d3e56e94fc08d574edaaad
DIST smol-1.2.5.crate 43577 BLAKE2B 6392f08d9c4559c4f2a7fbac79b342cc58e7835a274b045490e43f325ae53e81ad20ec651a53e479f0ff920d8a4af79be431abf6f6b45789a79193b5b999c2a0 SHA512 68ebf8e943a2b12452f487d15520fdc49a102467ec9d7c25aee7c275f1207db48e78ef994c86da57562abcecce3c337ffa9fe8104f5c2a9c3a5c8cb8f9d319f5
DIST socket2-0.3.17.crate 49764 BLAKE2B 406e34641e72b6d639f1af8503e04dbc122b87f3401dcab7fe99ac65d89120e1f804ca3dfe505e659ef8c5d738ff572744d28bb7132cd2fe98f5429f634e1d4f SHA512 148c3d9e829dab8d99d28fc96981dbebf2889f94e73f428bc885a04aa6889ed9432cb458ad7fc7b489128e88efa091b6170a00813d78886a46479c841fb04534
DIST strsim-0.8.0.crate 9309 BLAKE2B 40a8be506c43ee1ffe006ddc7dee98c3d418bdd205d57b78f5d1e4c9312feb57e1eaf952e02d92d4e0932db240c6fba45beb06ea8c4fc6de1cf1faa8b6a3a939 SHA512 1d55a8d946cd55f5f37d06aea536549ded95739fa58c0f2da285a0041154c181f663682bdcac643aa198b3e762d694a04f058db985c62ebe22b5c16327ba6d34
diff --git a/sys-process/bottom/bottom-0.6.4.ebuild b/sys-process/bottom/bottom-0.6.4.ebuild
new file mode 100644
index 000000000000..12d74fde94f1
--- /dev/null
+++ b/sys-process/bottom/bottom-0.6.4.ebuild
@@ -0,0 +1,225 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+ addr2line-0.15.1
+ adler-0.2.3
+ aho-corasick-0.7.18
+ ansi_term-0.11.0
+ anyhow-1.0.40
+ assert_cmd-1.0.3
+ async-channel-1.5.1
+ async-executor-1.4.0
+ async-fs-1.5.0
+ async-io-1.3.1
+ async-lock-2.3.0
+ async-net-1.5.0
+ async-process-1.0.1
+ async-task-4.0.3
+ atomic-waker-1.0.0
+ atty-0.2.14
+ autocfg-1.0.1
+ backtrace-0.3.59
+ battery-0.7.8
+ bitflags-1.2.1
+ blocking-1.0.2
+ bottom-0.6.4
+ bstr-0.2.15
+ byteorder-1.4.2
+ cache-padded-1.1.1
+ cargo-husky-1.5.0
+ cassowary-0.3.0
+ cc-1.0.67
+ cfg-if-0.1.10
+ cfg-if-1.0.0
+ chrono-0.4.19
+ clap-2.33.3
+ concurrent-queue-1.2.2
+ const_fn-0.4.4
+ core-foundation-0.7.0
+ core-foundation-0.9.1
+ core-foundation-sys-0.7.0
+ core-foundation-sys-0.8.2
+ crc32fast-1.2.1
+ crossbeam-channel-0.5.0
+ crossbeam-deque-0.8.1
+ crossbeam-epoch-0.9.1
+ crossbeam-utils-0.8.1
+ crossterm-0.18.2
+ crossterm_winapi-0.6.2
+ ctrlc-3.1.9
+ difference-2.0.0
+ dirs-3.0.2
+ dirs-sys-0.3.6
+ doc-comment-0.3.3
+ either-1.6.1
+ event-listener-2.5.1
+ fastrand-1.4.0
+ fern-0.6.0
+ flate2-1.0.20
+ float-cmp-0.8.0
+ futures-0.3.14
+ futures-channel-0.3.14
+ futures-core-0.3.14
+ futures-executor-0.3.14
+ futures-io-0.3.14
+ futures-lite-1.11.2
+ futures-macro-0.3.14
+ futures-sink-0.3.14
+ futures-task-0.3.14
+ futures-timer-3.0.2
+ futures-util-0.3.14
+ fxhash-0.2.1
+ getrandom-0.2.3
+ gimli-0.24.0
+ glob-0.3.0
+ hashbrown-0.9.1
+ heim-0.1.0-rc.1
+ heim-common-0.1.0-rc.1
+ heim-cpu-0.1.0-rc.1
+ heim-disk-0.1.0-rc.1
+ heim-memory-0.1.0-rc.1
+ heim-net-0.1.0-rc.1
+ heim-runtime-0.1.0-rc.1
+ heim-sensors-0.1.0-rc.1
+ hermit-abi-0.1.17
+ hex-0.4.3
+ indexmap-1.6.2
+ instant-0.1.9
+ itertools-0.10.0
+ lazy_static-1.4.0
+ lazycell-1.3.0
+ libc-0.2.94
+ lock_api-0.4.2
+ log-0.4.14
+ macaddr-1.0.1
+ mach-0.3.2
+ memchr-2.4.0
+ memoffset-0.6.1
+ miniz_oxide-0.4.3
+ mio-0.7.6
+ miow-0.3.6
+ nb-connect-1.0.2
+ nix-0.19.1
+ nix-0.20.0
+ normalize-line-endings-0.3.0
+ ntapi-0.3.6
+ num-integer-0.1.44
+ num-rational-0.3.2
+ num-traits-0.2.14
+ num_cpus-1.13.0
+ object-0.24.0
+ once_cell-1.5.2
+ parking-2.0.0
+ parking_lot-0.11.1
+ parking_lot_core-0.8.1
+ pin-project-lite-0.1.11
+ pin-project-lite-0.2.4
+ pin-utils-0.1.0
+ polling-2.0.2
+ predicates-1.0.8
+ predicates-core-1.0.0
+ predicates-tree-1.0.0
+ proc-macro-hack-0.5.19
+ proc-macro-nested-0.1.6
+ proc-macro2-1.0.27
+ procfs-0.10.1
+ quote-1.0.7
+ rayon-1.5.0
+ rayon-core-1.9.0
+ redox_syscall-0.1.57
+ redox_syscall-0.2.8
+ redox_users-0.4.0
+ regex-1.5.4
+ regex-automata-0.1.9
+ regex-syntax-0.6.25
+ rustc-demangle-0.1.18
+ scopeguard-1.1.0
+ serde-1.0.125
+ serde_derive-1.0.125
+ signal-hook-0.1.16
+ signal-hook-registry-1.2.2
+ slab-0.4.2
+ smallvec-1.6.1
+ smol-1.2.5
+ socket2-0.3.17
+ strsim-0.8.0
+ syn-1.0.72
+ sysinfo-0.18.2
+ textwrap-0.11.0
+ thiserror-1.0.24
+ thiserror-impl-1.0.24
+ time-0.1.44
+ toml-0.5.8
+ treeline-0.1.0
+ tui-0.14.0
+ typed-builder-0.9.0
+ typenum-1.12.0
+ unicode-segmentation-1.7.1
+ unicode-width-0.1.8
+ unicode-xid-0.2.1
+ uom-0.30.0
+ vec-arena-1.0.0
+ vec_map-0.8.2
+ wait-timeout-0.2.0
+ waker-fn-1.1.0
+ wasi-0.10.0+wasi-snapshot-preview1
+ wepoll-sys-3.0.1
+ widestring-0.4.3
+ winapi-0.3.9
+ winapi-i686-pc-windows-gnu-0.4.0
+ winapi-x86_64-pc-windows-gnu-0.4.0
+"
+
+inherit bash-completion-r1 cargo
+
+DESCRIPTION="A graphical process/system monitor with a customizable interface"
+HOMEPAGE="https://github.com/ClementTsang/bottom"
+SRC_URI="$(cargo_crate_uris)"
+
+LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-2 MIT MPL-2.0 Unlicense ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64"
+IUSE="+battery"
+
+PATCHES=(
+ # See https://github.com/ClementTsang/bottom/pull/580
+ "${FILESDIR}"/${PN}-0.6.4-RUSTSEC-2021-0003.patch
+ # See https://github.com/ClementTsang/bottom/pull/580
+ "${FILESDIR}"/${PN}-0.6.4-RUSTSEC-2021-0093.patch
+ # See https://github.com/ClementTsang/bottom/pull/582
+ "${FILESDIR}"/${PN}-0.6.4-feature-gate-test_default_battery_movement.patch
+)
+# Rust packages ignore CFLAGS and LDFLAGS so let's silence the QA warnings
+QA_FLAGS_IGNORED="usr/bin/btm"
+
+src_configure() {
+ myfeatures=(
+ $(usev battery)
+ )
+
+ # https://github.com/ClementTsang/bottom/blob/bacaca5548c2b23d261ef961ee6584b609529567/Cargo.toml#L63
+ # fern and log features are for debugging only, so disable default features
+ cargo_src_configure $(usev !debug --no-default-features)
+}
+
+src_install() {
+ cargo_src_install
+
+ # Find generated shell completion files. btm.bash can be present in multiple dirs if we build
+ # additional features, so grab the first match only.
+ local BUILD_DIR="$(dirname $(find target -name btm.bash -print -quit))"
+
+ newbashcomp "${BUILD_DIR}"/btm.bash btm
+
+ insinto /usr/share/fish/vendor_completions.d
+ doins "${BUILD_DIR}"/btm.fish
+
+ insinto /usr/share/zsh/site-functions
+ doins "${BUILD_DIR}"/_btm
+
+ local DOCS=( CHANGELOG.md README.md )
+ einstalldocs
+}
diff --git a/sys-process/bottom/files/bottom-0.6.4-RUSTSEC-2021-0003.patch b/sys-process/bottom/files/bottom-0.6.4-RUSTSEC-2021-0003.patch
new file mode 100644
index 000000000000..a68f48fd1c06
--- /dev/null
+++ b/sys-process/bottom/files/bottom-0.6.4-RUSTSEC-2021-0003.patch
@@ -0,0 +1,31 @@
+From 72e97a2eafa50d85209018005fbc1ff4774ef524 Mon Sep 17 00:00:00 2001
+From: Randy Barlow <randy@electronsweatshop.com>
+Date: Sat, 18 Sep 2021 11:53:44 -0400
+Subject: [PATCH 1/2] RUSTSEC-2021-0003: Update smallvec
+
+https://rustsec.org/advisories/RUSTSEC-2021-0003
+
+Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
+---
+ Cargo.lock | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 3bf6062..db1bd16 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -1359,9 +1359,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
+
+ [[package]]
+ name = "smallvec"
+-version = "1.5.1"
++version = "1.6.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "ae524f056d7d770e174287294f562e95044c68e88dec909a00d2094805db9d75"
++checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
+
+ [[package]]
+ name = "smol"
+--
+2.31.1
+
diff --git a/sys-process/bottom/files/bottom-0.6.4-RUSTSEC-2021-0093.patch b/sys-process/bottom/files/bottom-0.6.4-RUSTSEC-2021-0093.patch
new file mode 100644
index 000000000000..34f96e118485
--- /dev/null
+++ b/sys-process/bottom/files/bottom-0.6.4-RUSTSEC-2021-0093.patch
@@ -0,0 +1,31 @@
+From 7600519682103b86cd43ccddac3bde715ccf217b Mon Sep 17 00:00:00 2001
+From: Randy Barlow <randy@electronsweatshop.com>
+Date: Sat, 18 Sep 2021 11:53:04 -0400
+Subject: [PATCH 1/3] RUSTSEC-2021-0093: Update crossbeam-deque
+
+https://rustsec.org/advisories/RUSTSEC-2021-0093
+
+Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
+---
+ Cargo.lock | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Cargo.lock b/Cargo.lock
+index 38df74e..3bf6062 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -418,9 +418,9 @@ dependencies = [
+
+ [[package]]
+ name = "crossbeam-deque"
+-version = "0.8.0"
++version = "0.8.1"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
++checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e"
+ dependencies = [
+ "cfg-if 1.0.0",
+ "crossbeam-epoch",
+--
+2.31.1
+
diff --git a/sys-process/bottom/files/bottom-0.6.4-feature-gate-test_default_battery_movement.patch b/sys-process/bottom/files/bottom-0.6.4-feature-gate-test_default_battery_movement.patch
new file mode 100644
index 000000000000..374ec7181026
--- /dev/null
+++ b/sys-process/bottom/files/bottom-0.6.4-feature-gate-test_default_battery_movement.patch
@@ -0,0 +1,41 @@
+From 9acfacb5a5f6feccc3007371876c0b4fce6b3cde Mon Sep 17 00:00:00 2001
+From: Randy Barlow <randy@electronsweatshop.com>
+Date: Sat, 18 Sep 2021 13:26:20 -0400
+Subject: [PATCH] Feature gate test_default_battery_movement
+
+test_default_battery_movement() is now feature gated on the
+battery feature.
+
+fixes #581
+
+Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
+---
+ tests/layout_management_tests.rs | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tests/layout_management_tests.rs b/tests/layout_management_tests.rs
+index 4b4f7a9..3c341d0 100644
+--- a/tests/layout_management_tests.rs
++++ b/tests/layout_management_tests.rs
+@@ -1,7 +1,9 @@
+ //! Mocks layout management, so we can check if we broke anything.
+
+ use bottom::app::layout_manager::{BottomLayout, BottomWidgetType};
+-use bottom::constants::{DEFAULT_BATTERY_LAYOUT, DEFAULT_LAYOUT, DEFAULT_WIDGET_ID};
++#[cfg(feature = "battery")]
++use bottom::constants::DEFAULT_BATTERY_LAYOUT;
++use bottom::constants::{DEFAULT_LAYOUT, DEFAULT_WIDGET_ID};
+ use bottom::options::{layout_options::Row, Config};
+ use bottom::utils::error;
+
+@@ -126,6 +128,7 @@ fn test_default_movement() {
+ );
+ }
+
++#[cfg(feature = "battery")]
+ #[test]
+ /// Tests battery movement in the default setup.
+ fn test_default_battery_movement() {
+--
+2.31.1
+
diff --git a/sys-process/bottom/metadata.xml b/sys-process/bottom/metadata.xml
index a5d763762acc..cc41a7f280aa 100644
--- a/sys-process/bottom/metadata.xml
+++ b/sys-process/bottom/metadata.xml
@@ -16,4 +16,7 @@
<upstream>
<remote-id type="github">ClementTsang/bottom</remote-id>
</upstream>
+ <use>
+ <flag name='battery'>Include support for laptop battery information.</flag>
+ </use>
</pkgmetadata>