Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package viddy for openSUSE:Factory checked in at 2026-06-15 19:46:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/viddy (Old) and /work/SRC/openSUSE:Factory/.viddy.new.1981 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "viddy" Mon Jun 15 19:46:09 2026 rev:4 rq:1359343 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/viddy/viddy.changes 2024-12-06 14:27:12.658577148 +0100 +++ /work/SRC/openSUSE:Factory/.viddy.new.1981/viddy.changes 2026-06-15 19:49:42.503178481 +0200 @@ -1,0 +2,10 @@ +Sun Jun 14 16:55:20 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 1.3.1: + * fix: satisfy clippy -D warnings + * fix: create backup with owner-only permissions + * docs: fix typos again + * feat: made interval step and min interval configurable + * feat: support for increasing and decreasing interval + +------------------------------------------------------------------- Old: ---- viddy-1.3.0.obscpio New: ---- viddy-1.3.1.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ viddy.spec ++++++ --- /var/tmp/diff_new_pack.pb7CSZ/_old 2026-06-15 19:49:44.919279798 +0200 +++ /var/tmp/diff_new_pack.pb7CSZ/_new 2026-06-15 19:49:44.919279798 +0200 @@ -1,7 +1,7 @@ # # spec file for package viddy # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # Copyright (c) 2023-2024, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: viddy -Version: 1.3.0 +Version: 1.3.1 Release: 0 Summary: A modern watch command License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.pb7CSZ/_old 2026-06-15 19:49:44.987282649 +0200 +++ /var/tmp/diff_new_pack.pb7CSZ/_new 2026-06-15 19:49:44.991282817 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/sachaos/viddy</param> <param name="versionformat">@PARENT_TAG@</param> <param name="scm">git</param> - <param name="revision">v1.3.0</param> + <param name="revision">v1.3.1</param> <param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param> <param name="changesgenerate">enable</param> </service> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.pb7CSZ/_old 2026-06-15 19:49:45.043284998 +0200 +++ /var/tmp/diff_new_pack.pb7CSZ/_new 2026-06-15 19:49:45.055285501 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/sachaos/viddy</param> - <param name="changesrevision">1b7493db1addff2dbbd61f7999efb12a78829de9</param></service></servicedata> + <param name="changesrevision">eee2ff2c104b16c242b3190ba2bc65bb031580dc</param></service></servicedata> (No newline at EOF) ++++++ vendor.tar.zst ++++++ /work/SRC/openSUSE:Factory/viddy/vendor.tar.zst /work/SRC/openSUSE:Factory/.viddy.new.1981/vendor.tar.zst differ: char 7, line 1 ++++++ viddy-1.3.0.obscpio -> viddy-1.3.1.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/.config/config.json5 new/viddy-1.3.1/.config/config.json5 --- old/viddy-1.3.0/.config/config.json5 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/.config/config.json5 2026-06-14 16:20:45.000000000 +0200 @@ -38,6 +38,8 @@ "</>": "EnterSearchMode", "<t>": "SwitchNoTitle", "<?>": "ShowHelp", + "<+>": "IncreaseInterval", + "<->": "DecreaseInterval", }, "Search": { "<Ctrl-d>": "Quit", // Another way to quit @@ -68,5 +70,9 @@ "search_highlight": "black on yellow", "readonly": "bold yellow" } + }, + "general": { + "min_interval_ms": 500, + "interval_step_ms": 500 } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/Cargo.lock new/viddy-1.3.1/Cargo.lock --- old/viddy-1.3.0/Cargo.lock 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/Cargo.lock 2026-06-14 16:20:45.000000000 +0200 @@ -3029,7 +3029,7 @@ [[package]] name = "viddy" -version = "1.3.0" +version = "1.3.1" dependencies = [ "ansi-parser", "ansi-to-tui", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/Cargo.toml new/viddy-1.3.1/Cargo.toml --- old/viddy-1.3.0/Cargo.toml 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/Cargo.toml 2026-06-14 16:20:45.000000000 +0200 @@ -1,7 +1,7 @@ [package] name = "viddy" license = "MIT" -version = "1.3.0" +version = "1.3.1" edition = "2021" description = "A modern watch command" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/action.rs new/viddy-1.3.1/src/action.rs --- old/viddy-1.3.0/src/action.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/action.rs 2026-06-14 16:20:45.000000000 +0200 @@ -80,4 +80,6 @@ UpdateLatestHistoryCount, ShowHelp, ExitHelp, + IncreaseInterval, + DecreaseInterval, } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/app.rs new/viddy-1.3.1/src/app.rs --- old/viddy-1.3.0/src/app.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/app.rs 2026-06-14 16:20:45.000000000 +0200 @@ -61,9 +61,7 @@ let store_runtime_config = store.get_runtime_config()?.unwrap_or_default(); RuntimeConfig { - interval: Duration::from_std(humantime::parse_duration( - &store_runtime_config.interval, - )?)?, + interval: Duration::milliseconds(store_runtime_config.interval as i64), command: store_runtime_config .command .split(' ') @@ -76,10 +74,12 @@ command: cli.command.clone(), }; - let interval = - humantime::format_duration(cli.interval.to_std().unwrap_or_default()).to_string(); + let interval = cli.interval.to_std().unwrap_or_default(); let command = cli.command.join(" "); - store.set_runtime_config(StoreRuntimeConfig { interval, command })?; + store.set_runtime_config(StoreRuntimeConfig { + interval: interval.as_millis() as u64, + command, + })?; runtime_config }; @@ -283,6 +283,29 @@ self.last_tick_key_events.drain(..); } Action::Quit => self.should_quit = true, + Action::IncreaseInterval => { + self.runtime_config.interval += + Duration::milliseconds(self.config.general.interval_step_ms); + + self.store.set_runtime_config(StoreRuntimeConfig { + interval: self.runtime_config.interval.num_milliseconds() as u64, + command: self.runtime_config.command.join(" "), + })?; + } + Action::DecreaseInterval => { + let min_interval = + Duration::milliseconds(self.config.general.min_interval_ms); + let step = Duration::milliseconds(self.config.general.interval_step_ms); + + let new_interval = (self.runtime_config.interval - step).max(min_interval); + + self.runtime_config.interval = new_interval; + + self.store.set_runtime_config(StoreRuntimeConfig { + interval: new_interval.num_milliseconds() as u64, + command: self.runtime_config.command.join(" "), + })?; + } Action::Suspend => self.should_suspend = true, Action::Resume => self.should_suspend = false, Action::Resize(w, h) => { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/components/help.rs new/viddy-1.3.1/src/components/help.rs --- old/viddy-1.3.0/src/components/help.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/components/help.rs 2026-06-14 16:20:45.000000000 +0200 @@ -27,7 +27,7 @@ keybindings: &HashMap<(Mode, String), Vec<Vec<KeyEvent>>>, mode: Mode, action: String, -) -> Vec<Span> { +) -> Vec<Span<'_>> { keybindings.get(&(mode, action.clone())).map_or_else( || vec![Span::from("None")], |keys_list| { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/components/home.rs new/viddy-1.3.1/src/components/home.rs --- old/viddy-1.3.0/src/components/home.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/components/home.rs 2026-06-14 16:20:45.000000000 +0200 @@ -123,6 +123,12 @@ Action::SetTimemachineMode(timemachine_mode) => { self.set_timemachine_mode(timemachine_mode) } + Action::IncreaseInterval => { + self.interval_component.increase_interval(); + } + Action::DecreaseInterval => { + self.interval_component.decrease_interval(); + } Action::SetNoTitle(is_no_title) => self.is_no_title = is_no_title, _ => {} } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/components/interval.rs new/viddy-1.3.1/src/components/interval.rs --- old/viddy-1.3.0/src/components/interval.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/components/interval.rs 2026-06-14 16:20:45.000000000 +0200 @@ -1,5 +1,6 @@ use std::{collections::HashMap, time::Duration}; +use chrono::Duration as ChronoDuration; use color_eyre::eyre::Result; use crossterm::event::{KeyCode, KeyEvent}; use ratatui::{prelude::*, widgets::*}; @@ -26,6 +27,18 @@ config: Config::new().unwrap(), } } + + pub fn increase_interval(&mut self) { + self.runtime_config.interval += + chrono::Duration::milliseconds(self.config.general.interval_step_ms); + } + + pub fn decrease_interval(&mut self) { + let min_interval = ChronoDuration::milliseconds(self.config.general.min_interval_ms); + let step = ChronoDuration::milliseconds(self.config.general.interval_step_ms); + let new_interval = (self.runtime_config.interval - step).max(min_interval); + self.runtime_config.interval = new_interval; + } } impl Component for Interval { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/components.rs new/viddy-1.3.1/src/components.rs --- old/viddy-1.3.0/src/components.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/components.rs 2026-06-14 16:20:45.000000000 +0200 @@ -21,7 +21,7 @@ pub mod status; /// `Component` is a trait that represents a visual and interactive element of the user interface. -/// Implementors of this trait can be registered with the main application loop and will be able to receive events, +/// Implementers of this trait can be registered with the main application loop and will be able to receive events, /// update state, and be rendered on the screen. pub trait Component { /// Register an action handler that can send actions for processing if necessary. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/config.rs new/viddy-1.3.1/src/config.rs --- old/viddy-1.3.0/src/config.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/config.rs 2026-06-14 16:20:45.000000000 +0200 @@ -46,6 +46,10 @@ pub skip_empty_diffs: Option<bool>, #[serde(default)] pub disable_mouse: Option<bool>, + #[serde(default)] + pub min_interval_ms: i64, + #[serde(default)] + pub interval_step_ms: i64, } impl From<OldGeneral> for General { @@ -56,6 +60,7 @@ shell_options: value.shell_options, skip_empty_diffs: value.skip_empty_diffs, disable_mouse: value.disable_mouse, + ..Default::default() } } } @@ -167,6 +172,12 @@ if self.general.disable_mouse.is_none() { self.general.disable_mouse = default_config.general.disable_mouse; } + if self.general.min_interval_ms == 0 { + self.general.min_interval_ms = default_config.general.min_interval_ms; + } + if self.general.interval_step_ms == 0 { + self.general.interval_step_ms = default_config.general.interval_step_ms; + } } pub fn get_style(&self, style: &str) -> Style { @@ -218,6 +229,8 @@ insert_keybinding(keymap.scroll_page_down, Action::ResultPageDown); insert_keybinding(keymap.scroll_top_of_page, Action::TopOfPage); insert_keybinding(keymap.scroll_bottom_of_page, Action::BottomOfPage); + insert_keybinding(keymap.increase_interval, Action::IncreaseInterval); + insert_keybinding(keymap.decrease_interval, Action::DecreaseInterval); keybindings.insert(Mode::All, all_keybindings); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/diff.rs new/viddy-1.3.1/src/diff.rs --- old/viddy-1.3.0/src/diff.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/diff.rs 2026-06-14 16:20:45.000000000 +0200 @@ -3,12 +3,12 @@ use crate::termtext::Text; -pub fn diff_and_mark(current: &str, pervious: &str, text: &mut Text) { +pub fn diff_and_mark(current: &str, previous: &str, text: &mut Text) { let style = anstyle::Style::new() .fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Black))) .bg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Green))); - let chunks = diff(pervious, current); + let chunks = diff(previous, current); let mut cursor = 0; for chunk in chunks.into_iter() { @@ -30,12 +30,12 @@ } } -pub fn diff_and_mark_delete(current: &str, pervious: &str, text: &mut Text) { +pub fn diff_and_mark_delete(current: &str, previous: &str, text: &mut Text) { let style = anstyle::Style::new() .fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Black))) .bg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Red))); - let chunks = diff(pervious, current); + let chunks = diff(previous, current); let mut cursor = 0; for chunk in chunks { @@ -66,13 +66,13 @@ #[test] fn test_diff_and_mark() { let current = "hello world!"; - let pervious = "hello world"; + let previous = "hello world"; let mut text = Text::new(current); let style = anstyle::Style::new() .fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Black))) .bg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Green))); - super::diff_and_mark(current, pervious, &mut text); + super::diff_and_mark(current, previous, &mut text); assert_eq!(text[10].style, Style::new()); assert_eq!(text[11].style, style); @@ -80,14 +80,14 @@ #[test] fn test_diff_and_mark_new_line() { - let pervious = "hello world"; + let previous = "hello world"; let current = "hello world\nnew world"; let mut text = Text::new(current); let style = anstyle::Style::new() .fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Black))) .bg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Green))); - super::diff_and_mark(current, pervious, &mut text); + super::diff_and_mark(current, previous, &mut text); assert_eq!(text[11].style, Style::new()); for i in 12..=14 { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/main.rs new/viddy-1.3.1/src/main.rs --- old/viddy-1.3.0/src/main.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/main.rs 2026-06-14 16:20:45.000000000 +0200 @@ -63,6 +63,16 @@ let mut app = App::new(args.clone(), store, false)?; app.run().await?; } else { + // Create the temporary directory with owner-only permissions so the + // backup (which may contain sensitive output) is not world-readable (#195). + #[cfg(unix)] + let tmp_dir = { + use std::os::unix::fs::PermissionsExt; + tempfile::Builder::new() + .permissions(std::fs::Permissions::from_mode(0o700)) + .tempdir()? + }; + #[cfg(not(unix))] let tmp_dir = tempfile::tempdir()?; let tmp_path = tmp_dir.into_path(); let file_path = tmp_path.join("backup.sqlite"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/old_config.rs new/viddy-1.3.1/src/old_config.rs --- old/viddy-1.3.0/src/old_config.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/old_config.rs 2026-06-14 16:20:45.000000000 +0200 @@ -41,6 +41,8 @@ pub scroll_page_down: Option<String>, pub scroll_bottom_of_page: Option<String>, pub scroll_top_of_page: Option<String>, + pub increase_interval: Option<String>, + pub decrease_interval: Option<String>, } #[derive(Debug, Serialize, Deserialize, Default)] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/runner.rs new/viddy-1.3.1/src/runner.rs --- old/viddy-1.3.0/src/runner.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/runner.rs 2026-06-14 16:20:45.000000000 +0200 @@ -86,7 +86,12 @@ eprintln!("Failed to send result: {:?}", e); } - tokio::time::sleep(runtime_config.interval.to_std().unwrap()).await; + let interval = store + .get_runtime_config()? + .map(|config| config.interval) + .unwrap_or(runtime_config.interval.num_milliseconds() as u64); + + tokio::time::sleep(std::time::Duration::from_millis(interval)).await; } } @@ -160,9 +165,19 @@ } let elapased = chrono::Local::now().signed_duration_since(start_time); - let sleep_time = runtime_config.interval.sub(elapased); - if let Ok(sleep_time) = sleep_time.to_std() { - tokio::time::sleep(sleep_time).await; + + let interval = store + .get_runtime_config()? + .map(|config| config.interval) + .unwrap_or(runtime_config.interval.num_milliseconds() as u64); + + let interval = std::time::Duration::from_millis(interval); + + if let Ok(elapsed_std) = elapased.to_std() { + if elapsed_std < interval { + let sleep_time = interval - elapsed_std; + tokio::time::sleep(sleep_time).await; + } } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/store/sqlite.rs new/viddy-1.3.1/src/store/sqlite.rs --- old/viddy-1.3.0/src/store/sqlite.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/store/sqlite.rs 2026-06-14 16:20:45.000000000 +0200 @@ -20,6 +20,19 @@ std::fs::remove_file(&path)?; } + // Pre-create the database file with owner-only permissions before SQLite + // opens it, otherwise the backup is created world-readable (#195). + #[cfg(unix)] + if init { + use std::os::unix::fs::OpenOptionsExt; + std::fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .mode(0o600) + .open(&path)?; + } + let conn = Connection::open_with_flags( path, rusqlite::OpenFlags::SQLITE_OPEN_READ_WRITE | rusqlite::OpenFlags::SQLITE_OPEN_CREATE, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/viddy-1.3.0/src/store.rs new/viddy-1.3.1/src/store.rs --- old/viddy-1.3.0/src/store.rs 2024-11-29 00:49:47.000000000 +0100 +++ new/viddy-1.3.1/src/store.rs 2026-06-14 16:20:45.000000000 +0200 @@ -34,6 +34,6 @@ #[derive(Debug, Clone, Default)] pub struct RuntimeConfig { - pub interval: String, + pub interval: u64, pub command: String, } ++++++ viddy.obsinfo ++++++ --- /var/tmp/diff_new_pack.pb7CSZ/_old 2026-06-15 19:49:45.687312004 +0200 +++ /var/tmp/diff_new_pack.pb7CSZ/_new 2026-06-15 19:49:45.699312508 +0200 @@ -1,5 +1,5 @@ name: viddy -version: 1.3.0 -mtime: 1732837787 -commit: 1b7493db1addff2dbbd61f7999efb12a78829de9 +version: 1.3.1 +mtime: 1781446845 +commit: eee2ff2c104b16c242b3190ba2bc65bb031580dc
