pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
py-zensical: add upstream patch for better NetBSD support
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Mon May 18 12:38:54 2026 +0200
Changeset: 24728bd22ddf55461ef3567d3077465443ee7bc1
Modified Files:
py-zensical/distinfo
Added Files:
py-zensical/patches/patch-crates_zensical_src_watcher.rs
Log Message:
py-zensical: add upstream patch for better NetBSD support
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=24728bd22ddf55461ef3567d3077465443ee7bc1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
py-zensical/distinfo | 1 +
.../patches/patch-crates_zensical_src_watcher.rs | 40 ++++++++++++++++++++++
2 files changed, 41 insertions(+)
diffs:
diff --git a/py-zensical/distinfo b/py-zensical/distinfo
index be567277dd..7a3fdca931 100644
--- a/py-zensical/distinfo
+++ b/py-zensical/distinfo
@@ -513,3 +513,4 @@ Size (zrx-store-0.0.10.crate) = 26856 bytes
BLAKE2s (zrx-stream-0.0.21.crate) = 3b603d1c1fd68c56a47fa9bc8742579ab86d3d0d92cce2e442380a190dfdc439
SHA512 (zrx-stream-0.0.21.crate) = 9dac8628623d547088dc9bdbbc9c5b3401153847b2de5dd3cdaeafe5c01cf4ffb0b19ce37a026da8898dc8b180c45802715eb9002297e16a6b961389f2364d00
Size (zrx-stream-0.0.21.crate) = 18427 bytes
+SHA1 (patch-crates_zensical_src_watcher.rs) = f19277cb8fc341e30f2aabd04c87c40be0783ea5
diff --git a/py-zensical/patches/patch-crates_zensical_src_watcher.rs b/py-zensical/patches/patch-crates_zensical_src_watcher.rs
new file mode 100644
index 0000000000..d60bc706b6
--- /dev/null
+++ b/py-zensical/patches/patch-crates_zensical_src_watcher.rs
@@ -0,0 +1,40 @@
+$NetBSD$
+
+https://github.com/zensical/zensical/pull/696
+
+--- crates/zensical/src/watcher.rs.orig 2006-07-24 01:21:28.000000000 +0000
++++ crates/zensical/src/watcher.rs
+@@ -28,6 +28,7 @@ use std::collections::BTreeSet;
+ use crossbeam::channel::Sender;
+ use mio::Waker;
+ use std::collections::BTreeSet;
++use std::ffi::OsStr;
+ use std::fs;
+ use std::path::{Path, PathBuf};
+ use std::sync::Arc;
+@@ -227,7 +228,24 @@ impl Watcher {
+ // Watch docs and template directories
+ agent.watch(&config.path)?;
+ for theme_dir in &config.theme_dirs {
+- agent.watch(theme_dir)?;
++ // Skip `.icons` directory. On NetBSD, inotify uses the kqueue
++ // backend which opens one file descriptor per file/directory,
++ // quickly reaching any file descriptor limit set on the system.
++ match fs::read_dir(theme_dir) {
++ Ok(entries) => {
++ for entry in entries.flatten() {
++ let path = entry.path();
++ if path.file_name() != Some(OsStr::new(".icons")) {
++ agent.watch(&path)?;
++ }
++ }
++ }
++ Err(_) => {
++ // Fall back to watching the whole theme directory if we
++ // cannot enumerate its contents for any reason.
++ agent.watch(theme_dir)?;
++ }
++ }
+ }
+
+ // Watch files used by extensions
Home |
Main Index |
Thread Index |
Old Index