diff options
author | Ambroz Bizjak <ambrop7@gmail.com> | 2018-02-18 14:42:04 +0100 |
---|---|---|
committer | Ambroz Bizjak <ambrop7@gmail.com> | 2018-02-18 14:46:01 +0100 |
commit | 965ddac92fe59b4ed3d39d214732c239b8186019 (patch) | |
tree | 2da137fcf414901dcaf5dbf711feb28dfd79a4d0 | |
parent | 327a84749ed48a20736fdf20b9dd4f5723b01912 (diff) | |
download | nixlib-965ddac92fe59b4ed3d39d214732c239b8186019.tar nixlib-965ddac92fe59b4ed3d39d214732c239b8186019.tar.gz nixlib-965ddac92fe59b4ed3d39d214732c239b8186019.tar.bz2 nixlib-965ddac92fe59b4ed3d39d214732c239b8186019.tar.lz nixlib-965ddac92fe59b4ed3d39d214732c239b8186019.tar.xz nixlib-965ddac92fe59b4ed3d39d214732c239b8186019.tar.zst nixlib-965ddac92fe59b4ed3d39d214732c239b8186019.zip |
cups: Add patch for bug where CUPS fails to save files to disk
Upstream report: https://github.com/apple/cups/issues/5118 In addition to not saving files, this results in spam messages in the log once per second (Expiring subscriptions...) which is what led me to discover this bug. The patch was made by hand because the patch from the commit does not apply.
-rw-r--r-- | pkgs/misc/cups/cups-clean-dirty.patch | 13 | ||||
-rw-r--r-- | pkgs/misc/cups/default.nix | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/misc/cups/cups-clean-dirty.patch b/pkgs/misc/cups/cups-clean-dirty.patch new file mode 100644 index 000000000000..0bdc8198e8fb --- /dev/null +++ b/pkgs/misc/cups/cups-clean-dirty.patch @@ -0,0 +1,13 @@ +diff --git a/scheduler/main.c b/scheduler/main.c +index 8925c8373..acf031684 100644 +--- a/scheduler/main.c ++++ b/scheduler/main.c +@@ -893,7 +893,7 @@ main(int argc, /* I - Number of command-line args */ + * Write dirty config/state files... + */ + +- if (DirtyCleanTime && current_time >= DirtyCleanTime && cupsArrayCount(Clients) == 0) ++ if (DirtyCleanTime && current_time >= DirtyCleanTime) + cupsdCleanDirty(); + + #ifdef __APPLE__ diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index db344b32d218..39d3a53a048b 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/cups-systemd-socket.patch?h=packages/cups"; sha256 = "1ddgdlg9s0l2ph6l8lx1m1lx6k50gyxqi3qiwr44ppq1rxs80ny5"; }) + ./cups-clean-dirty.patch ]; nativeBuildInputs = [ pkgconfig removeReferencesTo ]; |