Package: groff / 1.22.4-6

Metadata

Package Version Patches format
groff 1.22.4-6 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
bash scripts.patch | (download)

contrib/eqn2graph/eqn2graph.sh | 2 1 + 1 - 0 !
contrib/grap2graph/grap2graph.sh | 2 1 + 1 - 0 !
contrib/pic2graph/pic2graph.sh | 2 1 + 1 - 0 !
3 files changed, 3 insertions(+), 3 deletions(-)

 the *2graph scripts use $random, which is bash-specific

nroff ifs.patch | (download)

src/roff/nroff/nroff.sh | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 unset ifs at nroff startup

It's questionable whether we should forward this; as noted in the bug
trail, there's a decent argument that this is a dash bug.

Bug-Debian: https://bugs.debian.org/541621
doc gfdl.patch | (download)

contrib/hdtbl/groff_hdtbl.7.man | 3 3 + 0 - 0 !
contrib/pdfmark/pdfroff.1.man | 3 3 + 0 - 0 !
man/ditroff.7.man | 3 3 + 0 - 0 !
man/groff.7.man | 3 3 + 0 - 0 !
man/groff_diff.7.man | 3 3 + 0 - 0 !
man/groff_out.5.man | 3 3 + 0 - 0 !
man/groff_tmac.5.man | 3 3 + 0 - 0 !
man/roff.7.man | 3 3 + 0 - 0 !
src/roff/groff/groff.1.man | 3 3 + 0 - 0 !
src/roff/troff/troff.1.man | 3 3 + 0 - 0 !
tmac/groff_trace.7.man | 3 3 + 0 - 0 !
11 files changed, 33 insertions(+)

 add gfdl references to manual pages licensed under gfdl

Bug-Debian: https://bugs.debian.org/292229
doc gzipped.patch | (download)

contrib/pdfmark/pdfroff.1.man | 2 1 + 1 - 0 !
src/preproc/pic/pic.1.man | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 2 deletions(-)

 adjust documentation references to account for compression

Bug-Debian: https://bugs.debian.org/498356
extratmacdirs.patch | (download)

Makefile.am | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 allow adding a version-independent directory to the macro path

This allows us to put /usr/share/groff/tmac at the end of groff's macro
path in Debian.

This uses GNU-make-specific code, so it may not be forwardable in its
current state.  A more upstreamable approach might be to add a --with-*
option to configure.

papersize config.patch | (download)

font/devdvi/devdvi.am | 4 2 + 2 - 0 !
font/devlbp/devlbp.am | 4 2 + 2 - 0 !
font/devlj4/devlj4.am | 4 2 + 2 - 0 !
font/devps/devps.am | 4 2 + 2 - 0 !
4 files changed, 8 insertions(+), 8 deletions(-)

 use /etc/papersize in preference to configure-time selection

load desc failure.patch | (download)

src/roff/groff/groff.cpp | 12 10 + 2 - 0 !
1 file changed, 10 insertions(+), 2 deletions(-)

 display more helpful output when failing to load a device

If the device is known to be one of the devices in the groff binary package
rather than groff-base, refer the user to that.

mmse note.patch | (download)

contrib/mm/groff_mm.7.man | 1 1 + 0 - 0 !
contrib/mm/mmroff.1.man | 3 2 + 1 - 0 !
man/groff_tmac.5.man | 3 2 + 1 - 0 !
src/roff/groff/groff.1.man | 3 2 + 1 - 0 !
4 files changed, 7 insertions(+), 3 deletions(-)

 note that groff_mmse(7) is only available in swedish locales

Bug-Debian: https://bugs.debian.org/710431
display utc times.patch | (download)

src/devices/grohtml/post-html.cpp | 4 2 + 2 - 0 !
src/devices/gropdf/gropdf.pl | 4 2 + 2 - 0 !
src/devices/grops/ps.cpp | 2 1 + 1 - 0 !
src/roff/troff/input.cpp | 2 1 + 1 - 0 !
4 files changed, 6 insertions(+), 6 deletions(-)

 always use utc times for display

Using localtime is problematic for reproducible builds.  For now, always
use UTC times (gmtime etc.) for display.  (Note that this changes the
semantics of \n[hours] etc., so may need further work.)

sort perl hash keys.patch | (download)

src/devices/gropdf/gropdf.pl | 8 4 + 4 - 0 !
src/utils/afmtodit/afmtodit.pl | 12 6 + 6 - 0 !
2 files changed, 10 insertions(+), 10 deletions(-)

 sort perl hash keys

avoid perl diamond.patch | (download)

contrib/glilypond/glilypond.pl | 128 68 + 60 - 0 !
contrib/gperl/gperl.pl | 188 99 + 89 - 0 !
contrib/gpinyin/gpinyin.pl | 88 49 + 39 - 0 !
src/devices/gropdf/gropdf.pl | 99 54 + 45 - 0 !
tmac/hyphenex.pl | 86 48 + 38 - 0 !
5 files changed, 318 insertions(+), 271 deletions(-)

 avoid perl's unsafe "<>" operator

The "<>" operator is implemented using the two-argument form of "open",
which interprets magic such as pipe characters, allowing execution of
arbitrary commands which is unlikely to be expected.  Perl >= 5.22 has a
"<<>>" operator which avoids this, but also forbids the use of "-" to
mean the standard input, which is a facility that the affected groff
programs document.

ARGV::readonly would probably also fix this, but I fundamentally dislike
the approach of escaping data in preparation for a language facility to
unescape it, especially when the required escaping is as non-obvious as
it is here.  (For the same reason, I prefer to use subprocess invocation
facilities that allow passing the argument list as a list rather than as
a string to be interpreted by the shell.)  So I've abandoned this
dubious convenience and changed the affected programs to iterate over
command-line arguments manually using the three-argument form of open.

This change involves an extra level of indentation, so it's a little
awkward to review.  It consists of changing this form:

  while (<>) {  # or foreach, which is similar but less efficient
    ...
  }

... into this:

  unshift @ARGV, '-' unless @ARGV;
  foreach my $filename (@ARGV) {
    my $input;
    if ($filename eq '-') {
      $input = \*STDIN;
    } elsif (not open $input, '<', $filename) {
      warn $!;
      next;
    }
    while (<$input>) {
      ...
    }
  }

Local variations: glilypond doesn't need the initial unshift since
that's already handled in contrib/glilypond/args.pl; gropdf declares
mdoc Lk arguments.patch | (download)

tmac/doc.tmac-u | 7 4 + 3 - 0 !
1 file changed, 4 insertions(+), 3 deletions(-)

 correctly handle groff_mdoc(7) .lk arguments starting with a dot.

* tmac/doc.tmac-u: Each argument to the .Lk macro is printed
  on its own roff input line.  If it happens to start with a dot
  or apostroph, it was misinterpreted as a request or macro.
  Force it to be treated as text by adding "\&" in front of it.

Bug reported by Jason McIntyre <jmc at OpenBSD>.

bsd updates.patch | (download)

tmac/doc-common-u | 122 122 + 0 - 0 !
tmac/groff_mdoc.7.man | 38 25 + 13 - 0 !
2 files changed, 147 insertions(+), 13 deletions(-)

 update netbsd, openbsd, freebsd, darwin, and dragonfly version
 strings.

* tmac/doc-common-u: Update.
* tmac/groff_mdoc.7.man: Synchronize.

Based on a patch from Guillem Jover <guillem@debian.org>
via Colin Watson <cjwatson@debian.org>, tweaked by me.
Fixes: https://bugs.debian.org/867123

document sgr.patch | (download)

src/devices/grotty/grotty.1.man | 28 28 + 0 - 0 !
1 file changed, 28 insertions(+)

 document debian-specific man/mdoc sgr defaults

Bug-Debian: https://bugs.debian.org/963490