<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>205147</bug_id>
          
          <creation_ts>2008-01-10 08:17 0000</creation_ts>
          <short_desc>sys-apps/man-1.6f COMPRESS support breaks with app-arch/lzma</short_desc>
          <delta_ts>2009-01-08 02:01:31 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>2007.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>astralstorm@gen2.org</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>cuciferus@gmail.com</cc>
    
    <cc>dany_it@yahoo.com</cc>
    
    <cc>darkside@gentoo.org</cc>
    
    <cc>gengor@gentoo.org</cc>
    
    <cc>jakub@gentoo.org</cc>
    
    <cc>jer@gentoo.org</cc>
    
    <cc>kerframil@gmail.com</cc>
    
    <cc>luke-jr+gentoobugs@utopios.org</cc>
    
    <cc>pacho@condmat1.ciencias.uniovi.es</cc>
    
    <cc>tomas.creemers@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>astralstorm@gen2.org</who>
            <bug_when>2008-01-10 08:17:22 0000</bug_when>
            <thetext>sys-apps/man-1.6f has broken COMPRESS option in its man.conf
It is also missing app-arch/lzma dependency.
Another missing option is .lzma decompression.

Correct COMPRESS line would be:
COMPRESS /usr/bin/lzma e -si -so
(see caveat below)

Decompression should be:
.lzma /usr/bin/lzma d -so

Caveat:
Fixing COMPRESS line uncovers a bug in man - any space in COMPRESS command flags it as unsafe. (I worked it around using a script)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>astralstorm@gen2.org</who>
            <bug_when>2008-01-10 08:28:35 0000</bug_when>
            <thetext>Only happens if you have app-arch/lzma installed at the time of the installation.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-01-10 08:47:12 0000</bug_when>
            <thetext>app-arch/lzma is not supported.  use app-arch/lzma-utils if you want proper decompression support.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>astralstorm@gen2.org</who>
            <bug_when>2008-01-10 08:54:35 0000</bug_when>
            <thetext>If it&apos;s not supported (and breaks man), it should be masked.
Please mask app-arch/lzma then.

Also, please fix .lzma decompression line.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-01-10 09:03:44 0000</bug_when>
            <thetext>(In reply to comment #2)
&gt; app-arch/lzma is not supported.  use app-arch/lzma-utils if you want proper
&gt; decompression support.

vapier, you missed the point. sys-apps/man *default* to (misconfigure) lzma when you compile it w/ lzma installed. automagic, broken. 

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-01-10 09:06:53 0000</bug_when>
            <thetext>what i meant is that it isnt supported by man

the lzma line is not broken if you use lzma-utils, thus there is nothing to fix

no, i didnt miss the point ... man will add compression lines if binaries exist on your system ... the only thing that changes is the config line.  whether i always force the .lzma line to &quot;-d -c&quot; or let the man configure script check for it the end result is the same: do not use lzma compression with man and the lzma package</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-01-10 09:11:02 0000</bug_when>
            <thetext>vapier, this is plain broken automagic junk. You should get exact same package no matter what you have installed on your system, unless there&apos;s a USE flag to alter the default configuration. To reproduce and break your man out of the box:

1/ emerge app-arch/lzma
2/ emerge sys-apps/man
3/ read /etc/man.conf

If you are refusing to fix this in sys-apps/man, then make it block app-arch/lzma.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-01-10 09:22:42 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; the lzma line is not broken if you use lzma-utils, thus there is nothing to fix

Plus it&apos;s broken w/ lzma-utils as well

1/ emerge app-arch/lzma-utils
2/ emerge/upgrade sys-apps/man - it now defaults to lzma compression
3/ unmerge/depclean or whatnot app-arch/lzma-utils because you don&apos;t need it any more
4/ you have broken your man without any way whatsoever to detect why it happened

Unless man always defaults to stuff that&apos;s guaranteed to exist on every system our there (.gz/.bz2) it can&apos;t be automagic.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-01-10 09:24:15 0000</bug_when>
            <thetext>i was thinking of the trailing suffix definitions for decompression bindings, not that COMPRESS is used for cat/cache maintenance

ive added a blocker against app-arch/lzma</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-01-10 09:45:54 0000</bug_when>
            <thetext>Well thanks, however as noted in Comment #7, lzma is not a sane preferred default for this... Oneliner patch attached, making the blocker unneeded as well.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-01-10 09:46:22 0000</bug_when>
            <thetext>Created an attachment (id=140597)
man-1.6-bzip2-default-compress.patch

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-01-10 09:50:22 0000</bug_when>
            <thetext>that argument is inaccurate.  it applies to every compression in man, not just lzma-utils.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-01-10 09:56:23 0000</bug_when>
            <thetext>(In reply to comment #11)
&gt; that argument is inaccurate.  it applies to every compression in man, not just
&gt; lzma-utils.

Well, unless you want to add a bunch of use flags for every compression supported minus gz/bz2 instead of a trivial oneliner (that defaults to bzip2 which is *guaranteed* to exist on every Gentoo system and so man will always default to it), I don&apos;t see what you are after here. The current blocker doesn&apos;t fix the problem mentioned in Comment #7.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-01-15 07:09:28 0000</bug_when>
            <thetext>*** Bug 205903 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kerframil@gmail.com</who>
            <bug_when>2008-02-06 12:17:27 0000</bug_when>
            <thetext>I would concur that, if a compression method is employable by man via a package that isn&apos;t provided by `emerge system` - and we _want_ to support said method - then it perhaps ought to be subject to a USE flag to avoid the problem described in comment 7.

That man is deciding during the build process which compression method it will use as a default is problematic. For man to decide to use lzma of its own accord thus makes lzma-utils a functional dependency beyond the knowledge of the package manager. On the other hand, the user can edit /etc/man.conf at any time (also beyond the knowledge of the package manager) but I think it&apos;s reasonable to assume that most users would not bother editing man.conf. I sure as heck don&apos;t.

There can be no question that lzma is good at what it does. However, the main argument against using it is that the overheads during compression are significantly greater than bzip2, both in terms of CPU and memory useage. On the other hand, the memory requirements of lzma during decompression are similar to bzip2 and it&apos;s apparently faster at decompression.

All in all, I think bzip2 should be a static default and I support the patch attached to this bug.

Let&apos;s look at this in practical terms. If the user wants to switch to lzma (or any other compression method) then they can still do so, and they will know what they&apos;re doing. After all, they _chose_ to edit man.conf and they should be _aware_ of the requirements entailed by their changes.

On the other hand, users who couldn&apos;t care less which compression method that man uses but want to employ lzma for other reasons (including myself) might well be surprised to encounter the problem that&apos;s the topic of bug 205903. We can&apos;t expect all users to be so judicious that they are going to scrutinise the new man.conf so closely as to notice 7zma sneaking in as a default compression method. I consider myself to be an advanced user and could easily envisage this catching me off guard. In fact, it&apos;s a bit of a pain - I actively don&apos;t want lzma as a compression method in man but want to continue to have lzma-utils installed on my system. Thus, I will need to remember to ignore that particular change upon each occasion that man is emerged in the future.

So, please, let&apos;s just make bzip2 a default and let users who want to customise man.conf do so of their own accord.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-25 09:05:04 0000</bug_when>
            <thetext>Well, reopen. With coreutils not DEPENDing (but not RDEPENDing) on lzma-utils, everyone will be affected by this. Please make something that is *guaranteed* to exist on every system out there a default compressions, lzma-utils is not one of those.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wwong@princeton.edu</who>
            <bug_when>2008-03-23 22:04:04 0000</bug_when>
            <thetext>In addition to app-arch/lzma, it also breaks with the lzma implementation in app-arch/p7zip (which provides /usr/bin/lzma). I am not an expert, just a user, but I think perhaps the same treatment for app-arch/lzma should apply to app-arch/p7zip if the lzma COMPRESS support is to be used. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>luke-jr+gentoobugs@utopios.org</who>
            <bug_when>2008-05-17 14:41:32 0000</bug_when>
            <thetext>I&apos;ve just been hit with this too. IMO, USE=lzma makes the most sense.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-11-02 12:32:12 0000</bug_when>
            <thetext>*** Bug 245036 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>darkside@gentoo.org</who>
            <bug_when>2008-12-07 22:21:28 0000</bug_when>
            <thetext>(In reply to comment #15)
&gt; Well, reopen. With coreutils not DEPENDing (but not RDEPENDing) on lzma-utils,
&gt; everyone will be affected by this. Please make something that is *guaranteed*
&gt; to exist on every system out there a default compressions, lzma-utils is not
&gt; one of those.
&gt; 

@base-system: 
The ability to view man pages is broken on binary hosts unless we can get something to rdepend on lzma-utils. In this case, I build in a chroot and that has lzma-utils installed because other packages DEPEND on it then man generates a man.conf that uses /usr/bin/lzma. lzma-utils does not get installed on the install host using emerge -K. Please consider adding lzma-utils to RDEPEND (the most proper, IMO) or maybe it is time to add lzma-utils to the system set? </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>darkside@gentoo.org</who>
            <bug_when>2008-12-27 06:26:57 0000</bug_when>
            <thetext>Created an attachment (id=176484)
compress patch

if COMPRESS is set in the env as an abs path, then man will use that to do the compression.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>darkside@gentoo.org</who>
            <bug_when>2008-12-27 06:28:57 0000</bug_when>
            <thetext>Created an attachment (id=176485)
man-1.6f-r2.ebuild.diff 

If USE=lzma is set then COMPRESS is set to /usr/bin/lzma. Initial testing seems to work as desired.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>darkside@gentoo.org</who>
            <bug_when>2009-01-08 02:01:31 0000</bug_when>
            <thetext>Cardoe reviewed my attached patches and approved. The new USE flag &apos;lzma&apos; is now on 1.6f-r3. Please contact me if there are any issues. 

Also sent patch to email on the HOMEPAGE.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>140597</attachid>
            <date>2008-01-10 09:46 0000</date>
            <desc>man-1.6-bzip2-default-compress.patch</desc>
            <filename>man-1.6-bzip2-default-compress.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGNvbmZpZ3VyZS5vcmlnCTIwMDgtMDEtMTAgMTA6MzU6MzIuMDAwMDAwMDAwICswMTAwCisr
KyBjb25maWd1cmUJMjAwOC0wMS0xMCAxMDozNzo0NS4wMDAwMDAwMDAgKzAxMDAKQEAgLTEwMTMs
NyArMTAxMyw3IEBACiAgIHRoZW4KICAgICBET19DT01QUkVTU0lPTj10cnVlCiAgICAgY29tcHJl
c3M9Ci0gICAgZm9yIGkgaW4gbHptYSBiemlwMiBnemlwIGJ6aXAgdHppcCBwYWNrIGNvbXByZXNz
IGZyZWV6ZSB5YWJiYQorICAgIGZvciBpIGluIGJ6aXAyIGd6aXAgYnppcCBsem1hIHR6aXAgcGFj
ayBjb21wcmVzcyBmcmVlemUgeWFiYmEKICAgICBkbwogICAgICAgZXZhbCBGJGk9bWlzc2luZwog
ICAgICAgZm9yIGogaW4gJERFRlBBVEgK
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>176484</attachid>
            <date>2008-12-27 06:26 0000</date>
            <desc>compress patch</desc>
            <filename>man-1.6f-compress.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGNvbmZpZ3VyZS5vcmlnCTIwMDgtMTItMjYgMjM6NTk6NDAuNzc5MDQyOTA2IC0wNjAwCisr
KyBjb25maWd1cmUJMjAwOC0xMi0yNyAwMDoxMzoxNS4yNjUyNTYyMTUgLTA2MDAKQEAgLTEwMTIs
MjAgKzEwMTIsMjUgQEAKICAgaWYgdGVzdCAiJGFucyIgPSAidHJ1ZSIKICAgdGhlbgogICAgIERP
X0NPTVBSRVNTSU9OPXRydWUKLSAgICBjb21wcmVzcz0KLSAgICBmb3IgaSBpbiBsem1hIGJ6aXAy
IGd6aXAgYnppcCB0emlwIHBhY2sgY29tcHJlc3MgZnJlZXplIHlhYmJhCi0gICAgZG8KLSAgICAg
IGV2YWwgRiRpPW1pc3NpbmcKLSAgICAgIGZvciBqIGluICRERUZQQVRICi0gICAgICBkbwotICAg
ICAgICBpZiB0ZXN0IC1mICRqLyRpCi0gICAgICAgIHRoZW4KLQkgIGV2YWwgRiRpPSRqLyRpCi0J
ICBpZiBbIHgkY29tcHJlc3MgPSB4IF07IHRoZW4gY29tcHJlc3M9JGovJGk7IGZpCi0JICBicmVh
awotICAgICAgICBmaQotICAgICAgZG9uZQotICAgIGRvbmUKKwlpZiBbIHgkQ09NUFJFU1MgIT0g
eCBdOyB0aGVuCisJCWNvbXByZXNzPSRDT01QUkVTUworCQllY2hvICRjb21wcmVzcworCWVsc2UK
KwkgICAgY29tcHJlc3M9CisJICAgIGZvciBpIGluIGx6bWEgYnppcDIgZ3ppcCBiemlwIHR6aXAg
cGFjayBjb21wcmVzcyBmcmVlemUgeWFiYmEKKwkgICAgZG8KKwkgICAgICBldmFsIEYkaT1taXNz
aW5nCisJICAgICAgZm9yIGogaW4gJERFRlBBVEgKKwkgICAgICBkbworCSAgICAgICAgaWYgdGVz
dCAtZiAkai8kaQorCSAgICAgICAgdGhlbgorCQkgIGV2YWwgRiRpPSRqLyRpCisJCSAgaWYgWyB4
JGNvbXByZXNzID0geCBdOyB0aGVuIGNvbXByZXNzPSRqLyRpOyBmaQorCQkgIGJyZWFrCisJICAg
ICAgICBmaQorCSAgICAgIGRvbmUKKwkgICAgZG9uZQorCWZpCiAKICAgICBpZiBbIHgkZGVmYXVs
dCA9IHggXTsgdGhlbgogICAgICAgZWNobyAiIgo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>176485</attachid>
            <date>2008-12-27 06:28 0000</date>
            <desc>man-1.6f-r2.ebuild.diff </desc>
            <filename>man-1.6f-r2.ebuild.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IG1hbi0xLjZmLXIyLmVidWlsZAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvdmFyL2N2c3Jv
b3QvZ2VudG9vLXg4Ni9zeXMtYXBwcy9tYW4vbWFuLTEuNmYtcjIuZWJ1aWxkLHYKcmV0cmlldmlu
ZyByZXZpc2lvbiAxLjgKZGlmZiAtdSAtcjEuOCBtYW4tMS42Zi1yMi5lYnVpbGQKLS0tIG1hbi0x
LjZmLXIyLmVidWlsZAkyIE9jdCAyMDA4IDE2OjUyOjIxIC0wMDAwCTEuOAorKysgbWFuLTEuNmYt
cjIuZWJ1aWxkCTI3IERlYyAyMDA4IDA2OjI4OjM0IC0wMDAwCkBAIC0xMSwxMiArMTEsMTMgQEAK
IExJQ0VOU0U9IkdQTC0yIgogU0xPVD0iMCIKIEtFWVdPUkRTPSJhbHBoYSBhbWQ2NCBhcm0gaHBw
YSBpYTY0IG02OGsgfm1pcHMgcHBjIHBwYzY0IHMzOTAgc2ggc3BhcmMgfnNwYXJjLWZic2QgeDg2
IH54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