Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914232 - media-libs/tiff-4.6.0: Add USE flag for building unsupported tiff2pdf and tiff2ps tools
Summary: media-libs/tiff-4.6.0: Add USE flag for building unsupported tiff2pdf and tif...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Codec Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-15 14:02 UTC by Klaus Kusche
Modified: 2023-10-30 11:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2023-09-15 14:02:04 UTC
Version 4.6.0 of tiff has moved the tools tiff2pdf and tiff2ps 
to the "unsupported" subdirectory, no longer builds them by default, 
and recommends not packaging them by default.
Both tools were built and installed by default in earlier versions of tiff.

Could a USE flag be added to the ebuild which sets "--enable-tools-unsupported"
in the configure step to optionally build tiff2pdf and tiff2ps?

I urgently need these two tools and found no equivalent substitute for them.
Comment 1 Ionen Wolkens gentoo-dev 2023-09-16 00:15:23 UTC
Have you tried if `convert image.tiff output.ps` (or .pdf) does what you want?

Would need USE="tiff postscript" to be enabled on media-gfx/imagemagick.

Afaik most(all?) of these tools are redundant with what imagemagick or graphicsmagick can do and there should be little reason to support unsupported tools that could have security issues or be removed entirely anytime, not that I've had a close look.
Comment 2 Klaus Kusche 2023-09-16 07:40:22 UTC
Yes, I've tried imagemagick convert. But it is by far inferior:

* With zip compression, convert produces PDF files whose file size is 
several times larger than the tiff2pdf output. This is a showstopper here.
And there is no option to tune Zip compression.

* For multi-page batch scans, tiff2pdf is faster by orders of magnitude.

Example: 8 page high-res monochrome text tiff: 0.064 sec versus 1.713 sec,
537486 versus 1444042 bytes pdf file size.

* The most common options are much easier and shorter for tiff2pdf than for convert. Examples:

- Compression: "-z" versus "-compress Zip"

- Set paper size and scale the image to fill it: "-p A4 -F" in tiff2pdf,
  "-repage a4" plus some more obscure options in convert.

* tiff2pdf has options to set the author, title, keywords, date etc. in the pdf.
There are no such options in imagemagick convert.

imagemagick convert is excellent for some very special corner cases,
but for 99 % of the daily pdf conversions, tiff2pdf does a much better job
(= more compact output & faster) and is much easier to use. 
In fact, even for the special cases, I first use convert to preprocess the tiff
(generating a more suitable tiff) and then use tiff2pdf (not convert)
to generate the pdf from the preprocessed tiff.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-16 07:42:09 UTC
I can add a flag to restore them, but upstream are very clear that they're planning on yanking these entirely. They're fed up of getting CVEs for them.

So this is going to be a temporary hack, not a fix at all. I'd strongly recommend you file bugs with IM/GM to request whatever features you need from them.
Comment 4 Larry the Git Cow gentoo-dev 2023-10-30 11:29:16 UTC
The bug has been referenced in the following commit(s):

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

commit 4fb424072d242bac2604349cbe8a244d4b6c9cb8
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-30 11:28:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-30 11:28:41 +0000

    net-misc/hylafaxplus: depend on <tiff-4.6 for removed tools
    
    See https://sourceforge.net/p/hylafax/mailman/message/38259441/.
    
    Bug: https://bugs.gentoo.org/914232
    Closes: https://bugs.gentoo.org/914566
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{hylafaxplus-7.0.6-r3.ebuild => hylafaxplus-7.0.6-r4.ebuild}       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)