Bug 1462642

Summary: groff: .UR and .MT -man commands produce syntactically incorrect mail addresses
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: groffAssignee: Nikola Forró <nforro>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: jchaloup, nforro
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1462452 Environment:
Last Closed: 2020-05-26 18:01:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Florian Weimer 2017-06-19 06:53:40 UTC
+++ This bug was initially created as a clone of Bug #1462452 +++

Description of problem:
/usr/share/man/man1/fallocate.1.gz uses constructs like 

.UR user@host
name

that are supposed to generate "name <user@host>".

If the locale encoding is not US-ASCII, man will tell groff to generate UTF-8 output (see bug 1462448). Then groff will use UTF-8 sequences e2 9f a8 (MATHEMATICAL LEFT ANGLE BRACKET) and e2 9f a9 (MATHEMATICAL RIGHT ANGLE BRACKET) around user@host. man then runs iconv to transliterate those utf-8 sequences to the locale charset. However, this fails, since iconv does not know that e2 9f a8 can be transliterated to "<" and e2 9f a9 to ">".

Version-Release number of selected component (if applicable):
glibc-2.24-6.fc25.i686

How reproducible:
always

Steps to Reproduce:
1. LANG=en_US man fallocate | iconv -f latin1

Actual results:
AUTHORS
       Eric Sandeen ?sandeen?
       Karel Zak ?kzak?

SEE ALSO
       fallocate(2), posix_fallocate(3), truncate(1)

AVAILABILITY
       The  fallocate  command is part of the util-linux package and is avail-
       able from Linux  Kernel  Archive  ?ftp://ftp.kernel.org/pub/linux/utils
       /util-linux/?.


Expected results:
AUTHORS
       Eric Sandeen <sandeen>
       Karel Zak <kzak>

SEE ALSO
       fallocate(2), posix_fallocate(3), truncate(1)

AVAILABILITY
       The  fallocate  command is part of the util-linux package and is avail-
       able from Linux  Kernel  Archive  <ftp://ftp.kernel.org/pub/linux/utils
       /util-linux/>.


Additional info:
bug 1462448 proposes changes to man that prevent this problem in latin1 and IBM-1047, but transliteration will still be necessary for other charsets and those should be supported too.

--- Additional comment from Carlos O'Donell on 2017-06-19 03:56:31 CEST ---

The language and locale neutral transliterations don't have any entries for the mathematical angle brackets. We need a mapping to be added.

diff --git a/localedata/locales/translit_neutral b/localedata/locales/translit_neutral
index e3639c0..d094630 100644
--- a/localedata/locales/translit_neutral
+++ b/localedata/locales/translit_neutral
@@ -743,6 +743,10 @@ include "translit_wide";""
 <U263A> "<U003A><U0029>"
 % BLACK SMILING FACE
 <U263B> "<U003A><U0029>"
+% MATHEMATICAL LEFT ANGLE BRACKET
+<U27E8> <U003C>
+% MATHEMATICAL RIGHT ANGLE BRACKET
+<U27E9> <U003E>
 % MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET⟫
 <U27EB> "<U003E><U003E>"
 % MATHEMATICAL LEFT DOUBLE ANGLE BRACKET
---

Something like this needs to go upstream first.

--- Additional comment from Florian Weimer on 2017-06-19 08:52:06 CEST ---

The .UR macro behavior is very questionable anyway because it means that you cannot cut-and-paste an email address into a mail client, which requires ASCII angle brackets.  This is even a problem if the terminal is UTF-8, and the glibc transliteration change would not fix this.  The .MT command produces such misformatted addresses, too.

Comment 1 Jan Kurik 2017-08-15 07:29:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 2 Florian Weimer 2018-05-03 08:38:09 UTC
Still present in rawhide.

Comment 3 Jan Kurik 2018-08-14 10:19:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 4 Ben Cotton 2019-10-31 20:52:10 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2019-11-27 19:04:41 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Ben Cotton 2020-04-30 20:38:28 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Ben Cotton 2020-05-26 18:01:01 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.