Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/printing: fix CUPS `SetEnv` directive placement #59076

Merged
merged 1 commit into from May 30, 2019

Conversation

@Yarny0
Copy link
Contributor

commented Apr 6, 2019

With CUPS v2.3b5, the configuration directive SetEnv
moved from cupsd.conf to cups-files.conf. See also
apple/cups@d47f6ae .

We have to follow up as SetEnv is now ignored in cupsd.conf.
Without this, executables called by cups
can't find other executables they depend on,
like gs or perl.

Motivation for this change

Executables called by CUPS can't find their fellow executables. Here is an example problem:

Apr 06 16:50:45 nixosc cupsd[1861]: sh: gs: command not found
[ ... ]
Apr 06 16:50:45 nixosc cupsd[1861]: PID 2268 (/nix/store/5rnrjs5340dp1njgla68b7ajyc2r95vs-cups-progs/lib/cups/filter/foomatic-rip) stopped with status 3.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This commit should also go into release-19.03 (but not in release-18.09 which uses an older CUPS release). Should I open a separate pull request for this?

nixos/printing: fix CUPS `SetEnv` directive placement
With CUPS v2.3b5, the configuration directive `SetEnv`
moved from `cupsd.conf` to `cups-files.conf`.  See also
apple/cups@d47f6ae .

We have to follow up as `SetEnv` is now ignored in `cupsd.conf`.
Without this, executables called by cups
can't find other executables they depend on,
like `gs` or `perl`.
@Yarny0

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2019

As the CUPS module has no maintainers, I'm hereby CCing those who touched the module recently.
CC @florianjacob @jfrankenau @bgamari

@nixos-discourse

This comment has been minimized.

Copy link

commented May 30, 2019

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/6

@matthewbauer matthewbauer merged commit 38fdc9f into NixOS:master May 30, 2019

10 checks passed

grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@matthewbauer

This comment has been minimized.

Copy link
Member

commented May 30, 2019

Backporting to 19.03 is also a good idea I think

@matthewbauer

This comment has been minimized.

Copy link
Member

commented May 30, 2019

We are still on cups 2.2 though right?

@matthewbauer

This comment has been minimized.

Copy link
Member

commented May 30, 2019

nevermind, that patch was included in 2.2 as well:

apple/cups@97cb566

Thanks for tracking this down! I will backport it to 19.03

@matthewbauer

This comment has been minimized.

Copy link
Member

commented May 30, 2019

cherry-picked in 55df3fe

@Yarny0 Yarny0 deleted the Yarny0:cups-path-fix branch Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.