Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 813507

Summary: net-print/cups USE=minimal flag request or separate library-only ebuild
Product: Gentoo Linux Reporter: Tomasz Golinski <tomaszg>
Component: Current packagesAssignee: Printing Team <printing>
Status: RESOLVED FIXED    
Severity: normal CC: eschwartz93, jon, matthew
Priority: Normal Keywords: NeedPatch, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/31784
Whiteboard:
Package list:
Runtime testing required: ---

Description Tomasz Golinski 2021-09-17 23:20:12 UTC
Hi,

There are several packages in portage which depend on net-print/cups, but all they really need is libcups.so.2. The ones I think about are binary packages, some for example ship libcef.so which is precompiled with cups dependency. They usually don't do any printing, so there's no harm done when the whole cups subsystem is not functioning - they only need a lib (maybe even stub would do) to run.

Two examples I noticed are media-sound/spotify and net-im/signal-desktop-bin (see https://bugs.gentoo.org/642008). It can possibly affect also things like www-client/google-chrome, but it has print features. There is a lot of things in portage which depend on cups, but probably don't use them, but I didn't check them.

Cups has a lot of dependencies, including filters, pdf stuff like poppler and so on. As a workaround, it is possible to emerge cups --nodeps (it builds fine), but portage is not happy with such tricks and it would mean adding a lot stuff to packages.provided. USE=minimal flag would be helpful in case of systems which don't need it all. Alternatively a separate ebuild providing only libcups.so could be added.

Reproducible: Always

Steps to Reproduce:
1. emerge spotify

Actual Results:  
You get cups with all its dependencies.
Comment 1 Jon Janzen 2023-07-07 00:43:10 UTC
I took a slightly different path: there are now USE flags for libpaper and cups-filters, which seems to work for me locally.

PR: https://github.com/gentoo/gentoo/pull/31784
Comment 2 Larry the Git Cow gentoo-dev 2023-12-18 03:35:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/data/gentoo-news.git/commit/?id=5f4b2f96819a82f3713e78bb72438eeda80ce8f2

commit 5f4b2f96819a82f3713e78bb72438eeda80ce8f2
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2023-12-04 06:09:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-18 03:35:32 +0000

    2023-12-17-cups-filters.en.txt: add news item
    
    Bug: https://bugs.gentoo.org/914586
    Bug: https://bugs.gentoo.org/813507
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../2023-12-17-cups-filters.en.txt                 | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
Comment 3 Larry the Git Cow gentoo-dev 2023-12-18 03:54:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c409cdc5e5e455341cb30783fb6101349d98c6a6

commit c409cdc5e5e455341cb30783fb6101349d98c6a6
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2023-11-12 16:34:13 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-18 03:53:23 +0000

    net-print/cups: drop cyclic dependency on cups-filters
    
    It is a PDEPEND which forces installing both, and makes building a
    modular cups-filters more challenging.
    
    Additionally, many "users" of cups may not actually want cups-filters at
    all.
    
    - A primary reason is because cups provides libcups, which other
      packages need as an RDEPEND in order to support USE=cups while not
      having any expectation of using a printing stack (at least, yet).
    
    - Even more fun, sometimes users have -bin packages where upstream has
      built the binaries against libcups on the assumption that users who
      want cups support will automatically get it and users who don't want
      cups support "just" need the debian libcups2 split binary package.
      This isn't really solvable without providing a minimal libcups-only
      experience.
    
    Rely instead on a metapackage for the full cups experience.
    
    Bug: https://bugs.gentoo.org/222601
    Bug: https://bugs.gentoo.org/914586
    Closes: https://bugs.gentoo.org/813507
    Closes: https://github.com/gentoo/gentoo/pull/31784
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 net-print/cups/cups-2.4.7-r2.ebuild | 313 ++++++++++++++++++++++++++++++++++++
 1 file changed, 313 insertions(+)