forked from mirrors/nixpkgs
Merge pull request #5428 from bdimcheff/fix-cups-filter-bash
Fix compiled-in /bin/bash in foomatic filters
This commit is contained in:
commit
1980e6225d
|
@ -1,5 +1,5 @@
|
|||
{ stdenv, fetchurl, pkgconfig, cups, poppler, fontconfig
|
||||
, libjpeg, libpng, perl, ijs, qpdf, dbus }:
|
||||
, libjpeg, libpng, perl, ijs, qpdf, dbus, substituteAll, bash }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cups-filters-${version}";
|
||||
|
@ -34,6 +34,13 @@ stdenv.mkDerivation rec {
|
|||
substituteInPlace filter/gstoraster.c --replace execve execvpe
|
||||
'';
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./longer-shell-path.patch;
|
||||
bash = "${bash}/bin/bash";
|
||||
})
|
||||
];
|
||||
|
||||
postInstall =
|
||||
''
|
||||
for i in $out/lib/cups/filter/{pstopdf,texttops,imagetops}; do
|
||||
|
|
13
pkgs/misc/cups/longer-shell-path.patch
Normal file
13
pkgs/misc/cups/longer-shell-path.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/filter/foomatic-rip/foomaticrip.c b/filter/foomatic-rip/foomaticrip.c
|
||||
index 1c019aa..431d2f9 100644
|
||||
--- a/filter/foomatic-rip/foomaticrip.c
|
||||
+++ b/filter/foomatic-rip/foomaticrip.c
|
||||
@@ -174,7 +174,7 @@ char cupsfilterpath[PATH_MAX] = "/usr/local/lib/cups/filter:"
|
||||
"/opt/cups/filter:"
|
||||
"/usr/lib/cups/filter";
|
||||
|
||||
-char modern_shell[64] = "/bin/bash";
|
||||
+char modern_shell[128] = "@bash@";
|
||||
|
||||
void config_set_option(const char *key, const char *value)
|
||||
{
|
Loading…
Reference in a new issue