Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bottom for openSUSE:Factory checked in at 2026-07-22 19:02:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bottom (Old) and /work/SRC/openSUSE:Factory/.bottom.new.24530 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bottom" Wed Jul 22 19:02:39 2026 rev:38 rq:1367029 version:0.14.6 Changes: -------- --- /work/SRC/openSUSE:Factory/bottom/bottom.changes 2026-07-20 10:00:55.423327817 +0200 +++ /work/SRC/openSUSE:Factory/.bottom.new.24530/bottom.changes 2026-07-22 19:02:42.504117236 +0200 @@ -1,0 +2,9 @@ +Tue Jul 21 07:12:14 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 0.14.6: + * remove rfind optimization for linux process stat parsing. + * bug: fix incorrect bound length for comm parentheses searching. + * bug: fix incorrect header text being used for the process + widget. + +------------------------------------------------------------------- Old: ---- bottom-0.14.5.obscpio New: ---- bottom-0.14.6.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bottom.spec ++++++ --- /var/tmp/diff_new_pack.FRTiZn/_old 2026-07-22 19:02:45.076205206 +0200 +++ /var/tmp/diff_new_pack.FRTiZn/_new 2026-07-22 19:02:45.080205343 +0200 @@ -18,7 +18,7 @@ Name: bottom -Version: 0.14.5 +Version: 0.14.6 Release: 0 Summary: Yet another graphical process/system monitor License: Apache-2.0 AND MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.FRTiZn/_old 2026-07-22 19:02:45.144207532 +0200 +++ /var/tmp/diff_new_pack.FRTiZn/_new 2026-07-22 19:02:45.152207806 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/ClementTsang/bottom.git</param> <param name="versionformat">@PARENT_TAG@</param> <param name="scm">git</param> - <param name="revision">0.14.5</param> + <param name="revision">0.14.6</param> <param name="match-tag">*</param> <param name="versionrewrite-pattern">(\d+\.\d+\.\d+)</param> <param name="versionrewrite-replacement">\1</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.FRTiZn/_old 2026-07-22 19:02:45.180208763 +0200 +++ /var/tmp/diff_new_pack.FRTiZn/_new 2026-07-22 19:02:45.184208900 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/ClementTsang/bottom.git</param> - <param name="changesrevision">4023340c2b124b8960523181788e105d5b6a0ffe</param></service></servicedata> + <param name="changesrevision">75f19806f94769f0c48041394bb8cab2e1d5fac1</param></service></servicedata> (No newline at EOF) ++++++ bottom-0.14.5.obscpio -> bottom-0.14.6.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottom-0.14.5/.github/ISSUE_TEMPLATE/bug_report.yml new/bottom-0.14.6/.github/ISSUE_TEMPLATE/bug_report.yml --- old/bottom-0.14.5/.github/ISSUE_TEMPLATE/bug_report.yml 2026-07-18 09:40:23.000000000 +0200 +++ new/bottom-0.14.6/.github/ISSUE_TEMPLATE/bug_report.yml 2026-07-20 06:11:54.000000000 +0200 @@ -98,7 +98,7 @@ see if [the latest version](https://github.com/ClementTsang/bottom/releases/latest) solves the issue first. - placeholder: 0.14.5 + placeholder: 0.14.6 - type: textarea id: install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottom-0.14.5/CHANGELOG.md new/bottom-0.14.6/CHANGELOG.md --- old/bottom-0.14.5/CHANGELOG.md 2026-07-18 09:40:23.000000000 +0200 +++ new/bottom-0.14.6/CHANGELOG.md 2026-07-20 06:11:54.000000000 +0200 @@ -20,6 +20,13 @@ --- +## 0.14.6 - 2026-07-20 + +### Bug Fixes + +- [#2162](https://github.com/ClementTsang/bottom/pull/2162): Fix incorrect column headers missing shortcut hints in the processes widget. +- [#2163](https://github.com/ClementTsang/bottom/pull/2163): Fix incorrect bound length for comm parentheses searching. + ## 0.14.5 - 2026-07-18 ### Bug Fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottom-0.14.5/Cargo.lock new/bottom-0.14.6/Cargo.lock --- old/bottom-0.14.5/Cargo.lock 2026-07-18 09:40:23.000000000 +0200 +++ new/bottom-0.14.6/Cargo.lock 2026-07-20 06:11:54.000000000 +0200 @@ -132,7 +132,7 @@ [[package]] name = "bottom" -version = "0.14.5" +version = "0.14.6" dependencies = [ "anyhow", "assert_cmd", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottom-0.14.5/Cargo.toml new/bottom-0.14.6/Cargo.toml --- old/bottom-0.14.5/Cargo.toml 2026-07-18 09:40:23.000000000 +0200 +++ new/bottom-0.14.6/Cargo.toml 2026-07-20 06:11:54.000000000 +0200 @@ -1,6 +1,6 @@ [package] name = "bottom" -version = "0.14.5" +version = "0.14.6" repository = "https://github.com/ClementTsang/bottom" license = "MIT" description = "A customizable cross-platform graphical process/system monitor for the terminal. Supports Linux, macOS, and Windows." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottom-0.14.5/README.md new/bottom-0.14.6/README.md --- old/bottom-0.14.5/README.md 2026-07-18 09:40:23.000000000 +0200 +++ new/bottom-0.14.6/README.md 2026-07-20 06:11:54.000000000 +0200 @@ -166,8 +166,8 @@ rustup update stable # Option 1 - Download an archive from releases and install -curl -LO https://github.com/ClementTsang/bottom/archive/0.14.5.tar.gz -tar -xzvf 0.14.5.tar.gz +curl -LO https://github.com/ClementTsang/bottom/archive/0.14.6.tar.gz +tar -xzvf 0.14.6.tar.gz cargo install --path . --locked # Option 2 - Manually clone the repo and install @@ -219,20 +219,20 @@ ```bash # x86-64 -curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.5/bottom_0.14.5-1_amd64.deb -sudo dpkg -i bottom_0.14.5-1_amd64.deb +curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.6/bottom_0.14.6-1_amd64.deb +sudo dpkg -i bottom_0.14.6-1_amd64.deb # ARM64 -curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.5/bottom_0.14.5-1_arm64.deb -sudo dpkg -i bottom_0.14.5-1_arm64.deb +curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.6/bottom_0.14.6-1_arm64.deb +sudo dpkg -i bottom_0.14.6-1_arm64.deb # ARM -curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.5/bottom_0.14.5-1_armhf.deb -sudo dpkg -i bottom_0.14.5-1_armhf.deb +curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.6/bottom_0.14.6-1_armhf.deb +sudo dpkg -i bottom_0.14.6-1_armhf.deb # musl-based -curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.5/bottom-musl_0.14.5-1_amd64.deb -sudo dpkg -i bottom-musl_0.14.5-1_amd64.deb +curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.6/bottom-musl_0.14.6-1_amd64.deb +sudo dpkg -i bottom-musl_0.14.6-1_amd64.deb ``` ### Exherbo Linux @@ -274,8 +274,8 @@ For example: ```bash -curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.5/bottom-0.14.5-1.x86_64.rpm -sudo dnf install ./bottom-0.14.5-1.x86_64.rpm +curl -LO https://github.com/ClementTsang/bottom/releases/download/0.14.6/bottom-0.14.6-1.x86_64.rpm +sudo dnf install ./bottom-0.14.6-1.x86_64.rpm ``` ### Gentoo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottom-0.14.5/src/canvas/components/data_table/column.rs new/bottom-0.14.6/src/canvas/components/data_table/column.rs --- old/bottom-0.14.5/src/canvas/components/data_table/column.rs 2026-07-18 09:40:23.000000000 +0200 +++ new/bottom-0.14.6/src/canvas/components/data_table/column.rs 2026-07-20 06:11:54.000000000 +0200 @@ -120,7 +120,7 @@ } fn header(&self) -> Cow<'static, str> { - self.inner.text() + self.inner.header() } } @@ -259,3 +259,31 @@ calculated_widths } } + +#[cfg(test)] +mod test { + use super::*; + + struct TestInnerColumn; + + impl ColumnHeader for TestInnerColumn { + fn text(&self) -> Cow<'static, str> { + "text".into() + } + + fn header(&self) -> Cow<'static, str> { + "header(h)".into() + } + } + + /// Ensure that the [`DataTableColumn`] implementation for [`Column`] calls the right method. + /// Yes, this is a somewhat meaningless test but it may catch a regression if this happens again in the future + /// during a refactor. + /// + /// See <https://github.com/ClementTsang/bottom/issues/2159> for details of the issue. + #[test] + fn column_header_impl_uses_right_function() { + let column = Column::new(TestInnerColumn); + assert_eq!(column.header(), TestInnerColumn.header()); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottom-0.14.5/src/collection/processes/linux/process.rs new/bottom-0.14.6/src/collection/processes/linux/process.rs --- old/bottom-0.14.5/src/collection/processes/linux/process.rs 2026-07-18 09:40:23.000000000 +0200 +++ new/bottom-0.14.6/src/collection/processes/linux/process.rs 2026-07-20 06:11:54.000000000 +0200 @@ -90,22 +90,21 @@ let start_paren = line .find('(') .ok_or_else(|| anyhow!("start paren missing"))?; - // So, we _could_ parse the entire line from the end with rfind, but this is kinda inefficient, since we - // know the comm field is in the start. But, we know that he comm field is never more than 16 bytes + - // the start/end bracket characters, for a total of 18 bytes max. So we can bound our search! So starting - // from start_paren, just add 18 and rfind! + + // So, we _could_ try and be smart and only parse a limited slice of the string - however, + // there appears to be no ABI guarantees of comm length anymore, so we just take the hit and do an rsplit + // over the full string. // - // Source: https://man.archlinux.org/man/proc_pid_stat.5.en - const TASK_COMM_LEN: usize = 16; - let end_paren = line[start_paren..start_paren + TASK_COMM_LEN + 2] - .rfind(')') - .ok_or_else(|| anyhow!("end paren missing"))? - + start_paren; - - ( - line[start_paren + 1..end_paren].to_string(), - &line[end_paren + 2..], - ) + // Sources/discussion: + // - https://man.archlinux.org/man/proc_pid_stat.5.en + // - https://stackoverflow.com/questions/23534263/what-is-the-maximum-allowed-limit-on-the-length-of-a-process-name#comment138697304_23534499 + // - https://elixir.bootlin.com/linux/v7.1.3/source/fs/proc/array.c#L100 + // - https://github.com/ClementTsang/bottom/pull/2163#issuecomment-5017857303 + let (comm, rest) = line[start_paren + 1..] + .rsplit_once(") ") + .ok_or_else(|| anyhow!("stat string is malformed"))?; + + (comm.to_string(), rest) }; let mut rest = rest.split(' '); @@ -400,3 +399,65 @@ Vec::new() } + +#[cfg(test)] +mod tests { + use std::io::{Seek, Write}; + + use super::*; + + fn stat_from_name(name: &str) -> anyhow::Result<Stat> { + // Kinda garbage data but it should be fine. + let stat = format!( + "0 ({name}) R 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" + ); + + stat_file(&stat) + } + + fn stat_file(stat: &str) -> anyhow::Result<Stat> { + let mut file = tempfile::tempfile().unwrap(); + file.write_all(stat.as_bytes()).unwrap(); + file.rewind().unwrap(); + + Stat::from_file(file, &mut String::new()) + } + + #[test] + fn parse_short_comm() { + let stat = stat_from_name("kworker/u16:2").unwrap(); + assert_eq!(stat.comm, "kworker/u16:2"); + } + + #[test] + fn parse_long_comm() { + let stat = stat_from_name("kworker/u16:2-events_unbound").unwrap(); + assert_eq!(stat.comm, "kworker/u16:2-events_unbound"); + } + + #[test] + fn parse_64_char_comm() { + let comm = "a".repeat(64); + let stat = stat_from_name(comm.as_str()).unwrap(); + assert_eq!(stat.comm, comm); + } + + #[test] + fn parse_double_paren_comm() { + let stat = stat_from_name("(sd-pam)").unwrap(); + assert_eq!(stat.comm, "(sd-pam)"); + } + + #[test] + fn parse_comm_with_space() { + let stat = stat_from_name("a test").unwrap(); + assert_eq!(stat.comm, "a test"); + } + + #[test] + fn parse_invalid_stat() { + assert!(stat_file("1 (blah").is_err(), "missing end paren"); + assert!(stat_file("1 (blah)").is_err(), "too short"); + assert!(stat_file("1 )(").is_err(), "wrong order"); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bottom-0.14.5/tools/schema_gen/Cargo.lock new/bottom-0.14.6/tools/schema_gen/Cargo.lock --- old/bottom-0.14.5/tools/schema_gen/Cargo.lock 2026-07-18 09:40:23.000000000 +0200 +++ new/bottom-0.14.6/tools/schema_gen/Cargo.lock 2026-07-20 06:11:54.000000000 +0200 @@ -111,7 +111,7 @@ [[package]] name = "bottom" -version = "0.14.4" +version = "0.14.6" dependencies = [ "anyhow", "clap", @@ -1578,9 +1578,9 @@ [[package]] name = "timeless" -version = "0.0.14-alpha" +version = "0.0.15-alpha" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04121e3f47427f2604066a4c4af25102e6c5794b167f6dee85958898ebf7f131" +checksum = "a2be119240e5a387a47d456fb20aed535bbfe6db82ed698212a79b2cd30382c8" [[package]] name = "toml_datetime" ++++++ bottom.obsinfo ++++++ --- /var/tmp/diff_new_pack.FRTiZn/_old 2026-07-22 19:02:45.836231201 +0200 +++ /var/tmp/diff_new_pack.FRTiZn/_new 2026-07-22 19:02:45.840231337 +0200 @@ -1,5 +1,5 @@ name: bottom -version: 0.14.5 -mtime: 1784360423 -commit: 4023340c2b124b8960523181788e105d5b6a0ffe +version: 0.14.6 +mtime: 1784520714 +commit: 75f19806f94769f0c48041394bb8cab2e1d5fac1 ++++++ vendor.tar.zst ++++++ /work/SRC/openSUSE:Factory/bottom/vendor.tar.zst /work/SRC/openSUSE:Factory/.bottom.new.24530/vendor.tar.zst differ: char 7, line 1
