Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619942 - app-text/html2text: uses doman on compressed file
Summary: app-text/html2text: uses doman on compressed file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jaroslav Rakhmatoullin
URL:
Whiteboard:
Keywords:
Depends on: 667382
Blocks: doman-compressed
  Show dependency tree
 
Reported: 2017-05-28 09:12 UTC by Michał Górny
Modified: 2020-02-23 14:38 UTC (History)
2 users (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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-05-28 09:12:55 UTC
The package uses doman/newman on a compressed file which is invalid per PMS:

    doman html2text.1.gz html2textrc.5.gz
Comment 1 Jaroslav Rakhmatoullin 2017-06-02 08:14:26 UTC
Thanks. I willh have to read the relevant parts of the package manager spec first.
Comment 2 Jaroslav Rakhmatoullin 2017-06-21 07:19:25 UTC
These files are already compressed in the upstream tarball.It seems unnecessary to decompress the man pages if doman supports compressed files.

It this going to change in the future?

The doman helper detects if it is compressed;


    31		# These will be automatically decompressed by ecompressdir.
    32		if has ${suffix} Z gz bz2 ; then
    33			realname=${x%.*}
    34			suffix=${realname##*.}
    35		fi

This spec says nothing against compressed files:

https://dev.gentoo.org/~ulm/pms/head/pms.html

Which PMS are you referring to?

Should the script simply decompress the files before doman?
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-06-23 09:21:55 UTC
(In reply to Jaroslav Rakhmatoullin from comment #2)
> These files are already compressed in the upstream tarball.It seems
> unnecessary to decompress the man pages if doman supports compressed files.
> 
> It this going to change in the future?

Yes. This is supported only in Portage, and it is going to be banned because people keep using the 'it works in Portage' argument and breaking portability.

> The doman helper detects if it is compressed;
> 
> 
>     31		# These will be automatically decompressed by ecompressdir.
>     32		if has ${suffix} Z gz bz2 ; then
>     33			realname=${x%.*}
>     34			suffix=${realname##*.}
>     35		fi
> 
> This spec says nothing against compressed files:
> 
> https://dev.gentoo.org/~ulm/pms/head/pms.html
> 
> Which PMS are you referring to?

It doesn't say anything about files being encrypted with AES256-CBC-SHA256 using password "bazinga", and encoded in base64 twice either. Nevertheless, even if Portage explicitly accounted for that, would you consider it a good idea to use it?

PMS is not some kind of law where you are supposed to look for loopholes. It is a technical specification. If something is not specified, it is undefined. If it is undefined, you can not rely on it for portability.

> Should the script simply decompress the files before doman?

Yes.
Comment 4 Greg Turner 2019-12-26 22:28:19 UTC
(In reply to Michał Górny from comment #3)
> It doesn't say anything about files being encrypted with AES256-CBC-SHA256
> using password "bazinga", and encoded in base64 twice either. Nevertheless,
> even if Portage explicitly accounted for that, would you consider it a good
> idea to use it?

still, something to consider for EAPI 8!
Comment 5 Fabian Groffen gentoo-dev 2020-02-23 14:38:14 UTC
the only version of this package in the tree decompresses the manpages before calling doman.