Bug 207938 - print/cups-filters: incorrect SHELL set, foomatic-rip tries to invoke "/bin/bash"
Summary: print/cups-filters: incorrect SHELL set, foomatic-rip tries to invoke "/bin/b...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-12 23:20 UTC by russo
Modified: 2016-03-17 17:17 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (cyberbotx)


Attachments
Patch to add "--with-shell=/usr/local/bin/bash" to configure args (426 bytes, patch)
2016-03-12 23:21 UTC, russo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description russo 2016-03-12 23:20:36 UTC
Since the update to cups-filter 1.8.2, my printer (which requires foo2zjs) stopped working.

On investigation I found that cups was trying to invoke the /usr/local/bin/foo2zjs-wrapper by running "/bin/bash foo2zjs-wrapper [args]"

Configure is apparently defaulting to /bin/bash as the "modern shell" to use.

This can be overridden by the --with-shell= option.

The attached patch made that error go away.
Comment 1 russo 2016-03-12 23:21:34 UTC
Created attachment 168066 [details]
Patch to add "--with-shell=/usr/local/bin/bash" to configure args

Naturally, for correct operation, bash will have to be made a required dependency.
Comment 2 Tijl Coosemans freebsd_committer freebsd_triage 2016-03-14 15:20:52 UTC
Fixed in ports r411031.
Comment 3 russo 2016-03-17 14:50:55 UTC
Are you certain that using "/bin/sh" is good enough to satisfy the "Modern shell" requirements of the cups-filter scripts?  They were specifying bash because they use scripts that may use constructs not supported by the Bourne shell.  From the foomatic-rip man page:

       preferred_shell: [<path>/]<executable>
                 Sets    the   preferred   shell   to   use   when   executing
                 FoomaticRIPCommandLine and friends.  Several  PPD  files  use
                 shell  constructs that require a more modern shell like bash,
                 zsh, or ksh.

That was why my kludge used /usr/local/bin/bash.

My own printer does not require bash, because the script it uses specifies #!/bin/sh anyway, but other users might have this issue.
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2016-03-17 17:17:51 UTC
I can't be 100% sure, but our sh supports some of the commonly used bash extensions so it should be fine.