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

Bug 609570

Summary: net-print/cups-filters unneeded dependencies on app-text/poppler
Product: Gentoo Linux Reporter: Ostashevskyi Viktor <ostash>
Component: Current packagesAssignee: Printing Team <printing>
Status: UNCONFIRMED ---    
Severity: normal CC: chewi, pacho
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Ostashevskyi Viktor 2017-02-16 20:37:44 UTC
Currently ebuild contains following dependency line:

>=app-text/poppler-0.32:=[cxx,jpeg?,lcms,tiff?,utils,xpdf-headers(+)]

However, jpeg and tiff use flag on cups-filter doesn't require app-text/poppler to be built with them.

cups-filters can use libjpeg and tiff for adding support for this image types in its imagetoraster and imagetopdf filters. These filters don't use poppler, they generate pdf directly by generating text PDF commands and embed images in raw format in PDF.

app-text/poppler supports JPEG compression in PDF documents even without jpeg use flag, in such case it uses its internal implementation. tiff use flag in app-text/poppler is used by pdfimages utility for extracting images from PDF file into tiff file.
Comment 1 James Le Cuirot gentoo-dev 2017-09-22 19:55:56 UTC
cups-filter can build without poppler as there is a --disable-poppler option and I tried it. However, I was then unable to print, at least with hpijs. Maybe other drivers would work.

Perhaps you weren't suggesting that poppler can be disabled entirely and were merely referring to the jpeg and tiff flags. Please clarify.
Comment 2 Ostashevskyi Viktor 2017-09-25 09:36:14 UTC
(In reply to James Le Cuirot from comment #1)
> cups-filter can build without poppler as there is a --disable-poppler option
> and I tried it. However, I was then unable to print, at least with hpijs.
> Maybe other drivers would work.
> 
> Perhaps you weren't suggesting that poppler can be disabled entirely and
> were merely referring to the jpeg and tiff flags. Please clarify.

You're absolutely right, I was talking that poppler is pulled with unneeded use-flags.
Comment 3 Andreas Sturmlechner gentoo-dev 2017-12-20 22:53:08 UTC
(In reply to Ostashevskyi Viktor from comment #0)
> app-text/poppler supports JPEG compression in PDF documents even without
> jpeg use flag, in such case it uses its internal implementation.
That at least is not the case. poppler's internal implementation is completely disabled for good reason - it is abandoned for years and a security liability.
Comment 4 Ostashevskyi Viktor 2017-12-21 10:52:31 UTC
(In reply to Andreas Sturmlechner from comment #3)
> (In reply to Ostashevskyi Viktor from comment #0)
> > app-text/poppler supports JPEG compression in PDF documents even without
> > jpeg use flag, in such case it uses its internal implementation.
> That at least is not the case. poppler's internal implementation is
> completely disabled for good reason - it is abandoned for years and a
> security liability.

But, it should be decided via poppler USE-flags. Why should cups-filter require poppler[jpeg]?

Moreover, if poppler internal JPEG implementation is broken and shouldn't be used, then we should remove jpeg flag from poppler completely and make poppler always require virtual/jpeg.
Comment 5 Andreas Sturmlechner gentoo-dev 2018-03-18 15:24:52 UTC
(In reply to Ostashevskyi Viktor from comment #4)
> Moreover, if poppler internal JPEG implementation is broken and shouldn't be
> used, then we should remove jpeg flag from poppler completely and make
> poppler always require virtual/jpeg.
Do you suppose to take away the freedom of Gentoo users to build poppler completely without jpeg support, however stupid that may be? ;)
Comment 6 Ostashevskyi Viktor 2018-03-18 18:41:51 UTC
(In reply to Andreas Sturmlechner from comment #5)
> (In reply to Ostashevskyi Viktor from comment #4)
> > Moreover, if poppler internal JPEG implementation is broken and shouldn't be
> > used, then we should remove jpeg flag from poppler completely and make
> > poppler always require virtual/jpeg.
> Do you suppose to take away the freedom of Gentoo users to build poppler
> completely without jpeg support, however stupid that may be? ;)

No, not in any way. I'm just saying that cups-filter[jpeg] doesn't require poppler[jpeg] (same for tiff).
Comment 7 Ostashevskyi Viktor 2018-03-18 18:43:59 UTC
(In reply to Andreas Sturmlechner from comment #5)
> (In reply to Ostashevskyi Viktor from comment #4)
> > Moreover, if poppler internal JPEG implementation is broken and shouldn't be
> > used, then we should remove jpeg flag from poppler completely and make
> > poppler always require virtual/jpeg.
> Do you suppose to take away the freedom of Gentoo users to build poppler
> completely without jpeg support, however stupid that may be? ;)

And if we talk about poppler alone and we know that internal JPEG support is broken, than poppler[-jpeg] shouldn't enable any JPEG support, and poppler[jpeg] should pull virtual/jpeg.
Comment 8 Ostashevskyi Viktor 2019-03-20 13:16:11 UTC
Any updates?
Comment 9 Arfrever Frehtes Taifersar Arahesis 2019-10-01 00:07:49 UTC
Beside discussion about USE flags, := in this dependency on app-text/poppler is unnecessary.
Subslot of app-text/poppler (as described in metadata.xml) reflects ABI of only libpoppler.so, not other libraries.
net-print/cups-filters uses only libpoppler-cpp.so:

$ scanelf -qyF "%F: %n" $(qlist net-print/cups-filters | sort) | grep -i poppler
/usr/libexec/cups/filter/pdftoraster: libcups.so.2,liblcms2.so.2,libpoppler-cpp.so.0,libcupsfilters.so.1,libstdc++.so.6,libgcc_s.so.1,libc.so.6
Comment 10 Ostashevskyi Viktor 2019-10-04 17:41:20 UTC
More the 2.5 years passed...
Comment 11 Ostashevskyi Viktor 2021-08-22 20:34:01 UTC
2 more years passed :)
Comment 12 Larry the Git Cow gentoo-dev 2021-10-28 08:35:29 UTC
The bug has been referenced in the following commit(s):

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

commit 98dbb3a6950134916429ed27553e5c1e854bf813
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2021-10-28 08:35:18 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2021-10-28 08:35:25 +0000

    net-print/cups-filters: Fix /run path and poppler subslot dep
    
    Closes: https://bugs.gentoo.org/685300
    Bug: https://bugs.gentoo.org/609570
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 .../cups-filters/cups-filters-1.28.10-r1.ebuild    | 149 +++++++++++++++++++++
 .../cups-filters/files/cups-browsed.init.d-r2      |   9 ++
 2 files changed, 158 insertions(+)
Comment 13 Pacho Ramos gentoo-dev 2021-10-28 08:36:33 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #9)
> Beside discussion about USE flags, := in this dependency on app-text/poppler
> is unnecessary.
> Subslot of app-text/poppler (as described in metadata.xml) reflects ABI of
> only libpoppler.so, not other libraries.
> net-print/cups-filters uses only libpoppler-cpp.so:
> 
> $ scanelf -qyF "%F: %n" $(qlist net-print/cups-filters | sort) | grep -i
> poppler
> /usr/libexec/cups/filter/pdftoraster:
> libcups.so.2,liblcms2.so.2,libpoppler-cpp.so.0,libcupsfilters.so.1,libstdc++.
> so.6,libgcc_s.so.1,libc.so.6

Fixed

for the other issue, it seems it would be WONTFIX per Andreas comments
Comment 14 Ostashevskyi Viktor 2021-10-28 14:48:14 UTC
> for the other issue, it seems it would be WONTFIX per Andreas comments

Why?