RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/groff#b62f50be6625b8291520f9278ff364bd128eb174
This commit is contained in:
parent
4c102ec96c
commit
dad9cbe548
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/groff-*.tar.gz
|
@ -0,0 +1,30 @@
|
||||
From 2f311bd175e78f889df099d5fcd945f357d6f037 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Vcelak <jvcelak@redhat.com>
|
||||
Date: Tue, 1 Jan 2013 15:32:01 +0100
|
||||
Subject: [PATCH 1/4] missing groff-x11 info message when gxditview not found
|
||||
|
||||
Adds info message that 'groff-x11' package might be missing when
|
||||
executing 'groff -X' and 'gxditview' is not found.
|
||||
|
||||
Resolves: #530788
|
||||
Signed-off-by: Jan Vcelak <jvcelak@redhat.com>
|
||||
---
|
||||
src/roff/groff/pipeline.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/roff/groff/pipeline.c b/src/roff/groff/pipeline.c
|
||||
index 2e3236f..75268c2 100644
|
||||
--- a/src/roff/groff/pipeline.c
|
||||
+++ b/src/roff/groff/pipeline.c
|
||||
@@ -487,6 +487,8 @@ int run_pipeline(int ncommands, char ***commands, int no_pipe)
|
||||
execvp(commands[i][0], commands[i]);
|
||||
error("couldn't exec %1: %2",
|
||||
commands[i][0], strerror(errno), (char *)0);
|
||||
+ if (strcmp(commands[i][0], "gxditview") == 0)
|
||||
+ fprintf(stderr, "You might be missing 'groff-x11' package.\n");
|
||||
fflush(stderr); /* just in case error() doesn't */
|
||||
_exit(EXEC_FAILED_EXIT_STATUS);
|
||||
}
|
||||
--
|
||||
2.21.1
|
||||
|
43
0002-load-site-font-and-site-tmac-from-etc-groff.patch
Normal file
43
0002-load-site-font-and-site-tmac-from-etc-groff.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From f83e0b188bb7bf4f38536ff8d08c2ca7384ac161 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Vcelak <jvcelak@redhat.com>
|
||||
Date: Tue, 1 Jan 2013 15:33:45 +0100
|
||||
Subject: [PATCH 2/4] load site-font and site-tmac from /etc/groff
|
||||
|
||||
Move site-font and site-tmac configuration from /usr/share/groff to
|
||||
/etc/groff. That allows permanent custom changes. (Symlinking brought
|
||||
a lot of problems with RPM. This is safer and cleaner.)
|
||||
|
||||
Signed-off-by: Jan Vcelak <jvcelak@redhat.com>
|
||||
---
|
||||
Makefile.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 505e9c3..5331dd3 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -3573,7 +3573,7 @@ fontdir = $(datasubdir)/font
|
||||
oldfontdir = $(datasubdir)/oldfont
|
||||
|
||||
# `localfontdir' says where local fonts will be installed (as dev*/*).
|
||||
-localfontdir = $(dataprogramdir)/site-font
|
||||
+localfontdir = @sysconfdir@/groff/site-font
|
||||
|
||||
# `legacyfontdir' is for compatibility with non-GNU troff.
|
||||
legacyfontdir = /usr/lib/font
|
||||
@@ -3585,10 +3585,10 @@ fontpath = $(localfontdir)$(RT_SEP)$(fontdir)$(RT_SEP)$(legacyfontdir)
|
||||
tmacdir = $(datasubdir)/tmac
|
||||
|
||||
# `systemtmacdir' says where to install platform-dependent macros.
|
||||
-systemtmacdir = $(libprogramdir)/site-tmac
|
||||
+systemtmacdir = @sysconfdir@/groff/site-tmac
|
||||
|
||||
# `localtmacdir' says where local files will be installed.
|
||||
-localtmacdir = $(dataprogramdir)/site-tmac
|
||||
+localtmacdir = @sysconfdir@/groff/site-tmac
|
||||
|
||||
# appresdir
|
||||
# `appresdir' says where to install the application resource file for
|
||||
--
|
||||
2.21.1
|
||||
|
210
0003-various-security-fixes.patch
Normal file
210
0003-various-security-fixes.patch
Normal file
@ -0,0 +1,210 @@
|
||||
From f95bed4ad636f286ef9ff3f5b4330a10938fd064 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Vcelak <jvcelak@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 14:36:47 +0100
|
||||
Subject: [PATCH 3/4] various security fixes
|
||||
|
||||
CVE-2009-5044 (#709413)
|
||||
CVE-2009-5080 (#720058)
|
||||
CVE-2009-5081 (#720057)
|
||||
|
||||
Based on: http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/groff/groff-1.20.1-owl-tmp.diff?rev=1.2;content- type=text%2Fplain
|
||||
Resolves: #709415, #720060
|
||||
Signed-off-by: Jan Vcelak <jvcelak@redhat.com>
|
||||
---
|
||||
contrib/eqn2graph/eqn2graph.sh | 2 ++
|
||||
contrib/gdiffmk/tests/runtests.sh | 5 +++--
|
||||
contrib/grap2graph/grap2graph.sh | 2 ++
|
||||
contrib/groffer/main_subs.pl | 10 +++++-----
|
||||
contrib/groffer/roff2.pl | 2 +-
|
||||
contrib/pdfmark/pdfroff.1.man | 5 +++--
|
||||
contrib/pic2graph/pic2graph.sh | 2 ++
|
||||
doc/fixinfo.sh | 5 +++--
|
||||
doc/groff.texi | 6 +++---
|
||||
gendef.sh | 10 +++-------
|
||||
10 files changed, 27 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/contrib/eqn2graph/eqn2graph.sh b/contrib/eqn2graph/eqn2graph.sh
|
||||
index 3e9c374..4e4f11e 100644
|
||||
--- a/contrib/eqn2graph/eqn2graph.sh
|
||||
+++ b/contrib/eqn2graph/eqn2graph.sh
|
||||
@@ -74,6 +74,8 @@ then
|
||||
# but is supported by the stripped-down dash shell, for instance.
|
||||
tmp="$d/eqn2graph$$-${RANDOM:-$PPID}"
|
||||
(umask 077 && mkdir "$tmp") 2> /dev/null
|
||||
+
|
||||
+ tmp=
|
||||
fi
|
||||
|
||||
if ! test -d "$tmp"
|
||||
diff --git a/contrib/gdiffmk/tests/runtests.sh b/contrib/gdiffmk/tests/runtests.sh
|
||||
index 0f7c3b6..f8aa874 100755
|
||||
--- a/contrib/gdiffmk/tests/runtests.sh
|
||||
+++ b/contrib/gdiffmk/tests/runtests.sh
|
||||
@@ -63,8 +63,9 @@ TestResult () {
|
||||
fi
|
||||
}
|
||||
|
||||
-tmpfile=/tmp/$$
|
||||
-trap 'rm -f ${tmpfile}' 0 1 2 3 15
|
||||
+tmpfile="`mktemp -t gdiffmk-runtests.XXXXXXXXXX`" || exit
|
||||
+trap 'rm -f -- "$tmpfile"' EXIT
|
||||
+trap 'trap - EXIT; rm -f -- "$tmpfile"; exit 1' HUP INT QUIT TERM
|
||||
|
||||
# Run tests.
|
||||
|
||||
diff --git a/contrib/grap2graph/grap2graph.sh b/contrib/grap2graph/grap2graph.sh
|
||||
index 29df25b..94c436b 100644
|
||||
--- a/contrib/grap2graph/grap2graph.sh
|
||||
+++ b/contrib/grap2graph/grap2graph.sh
|
||||
@@ -76,6 +76,8 @@ then
|
||||
# but is supported by the stripped-down dash shell, for instance.
|
||||
tmp="$d/grap2graph$$-${RANDOM:-$PPID}"
|
||||
(umask 077 && mkdir "$tmp") 2> /dev/null
|
||||
+
|
||||
+ tmp=
|
||||
fi
|
||||
|
||||
if ! test -d "$tmp"
|
||||
diff --git a/contrib/groffer/main_subs.pl b/contrib/groffer/main_subs.pl
|
||||
index a40e356..c8c4e53 100644
|
||||
--- a/contrib/groffer/main_subs.pl
|
||||
+++ b/contrib/groffer/main_subs.pl
|
||||
@@ -1244,7 +1244,7 @@ sub main_temp {
|
||||
our $fh_stdin;
|
||||
our $tmp_cat;
|
||||
our $tmp_stdin;
|
||||
- my $template = 'groffer_' . "$$" . '_XXXX';
|
||||
+ my $template = 'groffer_' . "$$" . '_XXXXXXXXXX';
|
||||
foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, $ENV{'TEMP'},
|
||||
$ENV{'TEMPDIR'}, File::Spec->catfile($ENV{'HOME'}, 'tmp')) {
|
||||
if ($_ && -d $_ && -w $_) {
|
||||
@@ -1276,12 +1276,12 @@ sub main_temp {
|
||||
|
||||
# further argument: SUFFIX => '.sh'
|
||||
if ($Debug{'KEEP'}) {
|
||||
- ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', DIR => $tmpdir);
|
||||
- ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', DIR => $tmpdir);
|
||||
+ ($fh_cat, $tmp_cat) = tempfile(',cat_XXXXXXXXXX', DIR => $tmpdir);
|
||||
+ ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXXXXXXXX', DIR => $tmpdir);
|
||||
} else {
|
||||
- ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', UNLINK => 1,
|
||||
+ ($fh_cat, $tmp_cat) = tempfile(',cat_XXXXXXXXXX', UNLINK => 1,
|
||||
DIR => $tmpdir);
|
||||
- ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', UNLINK => 1,
|
||||
+ ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXXXXXXXX', UNLINK => 1,
|
||||
DIR => $tmpdir);
|
||||
}
|
||||
} # main_temp()
|
||||
diff --git a/contrib/groffer/roff2.pl b/contrib/groffer/roff2.pl
|
||||
index cf5c583..24af006 100755
|
||||
--- a/contrib/groffer/roff2.pl
|
||||
+++ b/contrib/groffer/roff2.pl
|
||||
@@ -123,7 +123,7 @@ if ($Has_Groffer) {
|
||||
last;
|
||||
}
|
||||
}
|
||||
- my $template = $Name . '_XXXX';
|
||||
+ my $template = $Name . '_XXXXXXXXXX';
|
||||
my ($fh, $stdin);
|
||||
if ($tempdir) {
|
||||
($fh, $stdin) = tempfile($template, UNLINK => 1, DIR => $tempdir) ||
|
||||
diff --git a/contrib/pdfmark/pdfroff.1.man b/contrib/pdfmark/pdfroff.1.man
|
||||
index 95d7807..aa6f079 100644
|
||||
--- a/contrib/pdfmark/pdfroff.1.man
|
||||
+++ b/contrib/pdfmark/pdfroff.1.man
|
||||
@@ -540,7 +540,7 @@ gs \-dBATCH \-dQUIET \-dNOPAUSE \-dSAFER \-sDEVICE=pdfwrite \e
|
||||
.I GROFF_TMPDIR
|
||||
Identifies the directory in which
|
||||
.B pdfroff
|
||||
-should create temporary files.
|
||||
+should create a subdirectory for its temporary files.
|
||||
.
|
||||
If
|
||||
.I \%GROFF_TMPDIR
|
||||
@@ -553,7 +553,8 @@ and
|
||||
.I TEMP
|
||||
are considered in turn, as possible temporary file repositories.
|
||||
If none of these are set, then temporary files are created
|
||||
-in the current directory.
|
||||
+in a subdirectory of
|
||||
+.BR /tmp .
|
||||
.
|
||||
.TP
|
||||
.I GROFF_GHOSTSCRIPT_INTERPRETER
|
||||
diff --git a/contrib/pic2graph/pic2graph.sh b/contrib/pic2graph/pic2graph.sh
|
||||
index b229914..2d6e77c 100644
|
||||
--- a/contrib/pic2graph/pic2graph.sh
|
||||
+++ b/contrib/pic2graph/pic2graph.sh
|
||||
@@ -89,6 +89,8 @@ then
|
||||
# but is supported by the stripped-down dash shell, for instance.
|
||||
tmp="$d/pic2graph$$-${RANDOM:-$PPID}"
|
||||
(umask 077 && mkdir "$tmp") 2> /dev/null
|
||||
+
|
||||
+ tmp=
|
||||
fi
|
||||
|
||||
if ! test -d "$tmp"
|
||||
diff --git a/doc/fixinfo.sh b/doc/fixinfo.sh
|
||||
index 47127f8..69bb74d 100644
|
||||
--- a/doc/fixinfo.sh
|
||||
+++ b/doc/fixinfo.sh
|
||||
@@ -24,8 +24,9 @@
|
||||
#
|
||||
# 09-2014: no more problem with texinfo 5.0 or higher
|
||||
#
|
||||
-t=${TMPDIR-.}/gro$$.tmp
|
||||
-
|
||||
+t="`mktemp -t groff-fixinfo.XXXXXXXXXX`" || exit
|
||||
+trap 'rm -f -- "$t"' EXIT
|
||||
+trap 'trap - EXIT; rm -f -- "$t"; exit 1' HUP INT QUIT TERM
|
||||
cat $1 | sed '
|
||||
1 {
|
||||
N
|
||||
diff --git a/doc/groff.texi b/doc/groff.texi
|
||||
index e7fe4aa..b4d01ed 100644
|
||||
--- a/doc/groff.texi
|
||||
+++ b/doc/groff.texi
|
||||
@@ -13857,9 +13857,9 @@ into a document:
|
||||
@pindex perl
|
||||
@Example
|
||||
.sy perl -e 'printf ".nr H %d\\n.nr M %d\\n.nr S %d\\n",\
|
||||
- (localtime(time))[2,1,0]' > /tmp/x\n[$$]
|
||||
-.so /tmp/x\n[$$]
|
||||
-.sy rm /tmp/x\n[$$]
|
||||
+ (localtime(time))[2,1,0]' > timefile\n[$$]
|
||||
+.so timefile\n[$$]
|
||||
+.sy rm timefile\n[$$]
|
||||
\nH:\nM:\nS
|
||||
@endExample
|
||||
|
||||
diff --git a/gendef.sh b/gendef.sh
|
||||
index be41dbe..4770bae 100644
|
||||
--- a/gendef.sh
|
||||
+++ b/gendef.sh
|
||||
@@ -33,11 +33,9 @@ do
|
||||
#define $def"
|
||||
done
|
||||
|
||||
-# Use $TMPDIR if defined. Default to cwd, for non-Unix systems
|
||||
-# which don't have /tmp on each drive (we are going to remove
|
||||
-# the file before we exit anyway). Put the PID in the basename,
|
||||
-# since the extension can only hold 3 characters on MS-DOS.
|
||||
-t=${TMPDIR-.}/gro$$.tmp
|
||||
+t="`mktemp -t groff-gendef.XXXXXXXXXX`" || exit
|
||||
+trap 'rm -f -- "$t"' EXIT
|
||||
+trap 'trap - EXIT; rm -f -- "$t"; exit 1' HUP INT QUIT TERM
|
||||
|
||||
sed -e 's/=/ /' >$t <<EOF
|
||||
$defs
|
||||
@@ -45,8 +43,6 @@ EOF
|
||||
|
||||
test -r $file && cmp -s $t $file || cp $t $file
|
||||
|
||||
-rm -f $t
|
||||
-
|
||||
exit 0
|
||||
|
||||
# eof
|
||||
--
|
||||
2.21.1
|
||||
|
59
0004-don-t-use-usr-bin-env-in-shebang.patch
Normal file
59
0004-don-t-use-usr-bin-env-in-shebang.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 6c997078a8f74429f58e4679b7630de7962e18b0 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Schiffer <pschiffe@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 14:49:57 +0100
|
||||
Subject: [PATCH 4/4] don't use /usr/bin/env in shebang
|
||||
|
||||
There might be an issue that the script is executed with unwanted version of
|
||||
<lang> if that language is provided by enabled dynamic software collection.
|
||||
|
||||
Resolves: #987069
|
||||
---
|
||||
contrib/chem/chem.pl | 2 +-
|
||||
contrib/groffer/groffer.pl | 2 +-
|
||||
contrib/groffer/roff2.pl | 2 +-
|
||||
src/roff/grog/grog.pl | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/contrib/chem/chem.pl b/contrib/chem/chem.pl
|
||||
index 883907b..57e0216 100755
|
||||
--- a/contrib/chem/chem.pl
|
||||
+++ b/contrib/chem/chem.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env perl
|
||||
+#! /usr/bin/perl
|
||||
|
||||
# chem - a groff preprocessor for producing chemical structure diagrams
|
||||
|
||||
diff --git a/contrib/groffer/groffer.pl b/contrib/groffer/groffer.pl
|
||||
index 697dacb..654f18e 100755
|
||||
--- a/contrib/groffer/groffer.pl
|
||||
+++ b/contrib/groffer/groffer.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env perl
|
||||
+#! /usr/bin/perl
|
||||
|
||||
# groffer - display groff files
|
||||
|
||||
diff --git a/contrib/groffer/roff2.pl b/contrib/groffer/roff2.pl
|
||||
index 24af006..35a560c 100755
|
||||
--- a/contrib/groffer/roff2.pl
|
||||
+++ b/contrib/groffer/roff2.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env perl
|
||||
+#! /usr/bin/perl
|
||||
|
||||
# roff2* - transform roff files into other formats
|
||||
|
||||
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
|
||||
index f7fb8e4..1d5c3d8 100644
|
||||
--- a/src/roff/grog/grog.pl
|
||||
+++ b/src/roff/grog/grog.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env perl
|
||||
+#! /usr/bin/perl
|
||||
# grog - guess options for groff command
|
||||
# Inspired by doctype script in Kernighan & Pike, Unix Programming
|
||||
# Environment, pp 306-8.
|
||||
--
|
||||
2.21.1
|
||||
|
28
0005-do-not-overwrite-docdir.patch
Normal file
28
0005-do-not-overwrite-docdir.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From ad194a6cadbb4718d238c85925ab8c646a3afdf7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
|
||||
Date: Fri, 6 Mar 2020 10:40:09 +0100
|
||||
Subject: [PATCH 5/5] do not overwrite docdir
|
||||
|
||||
---
|
||||
Makefile.in | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 5331dd3..21522e3 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -3378,9 +3378,8 @@ doc_dist_target_ok = @doc_dist_target_ok@
|
||||
# `infodir' says where to install info files.
|
||||
|
||||
# docdir
|
||||
-# `docdir' says where to install documentation files. The default
|
||||
-# location is ${datarootdir}/doc/${PACKAGE}, but we add the version
|
||||
-docdir = $(datarootdir)/doc/${PACKAGE}-$(SHORT_VERSION)
|
||||
+# `docdir' says where to install documentation files.
|
||||
+docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
g = @g@
|
||||
--
|
||||
2.21.1
|
||||
|
1076
groff.spec
Normal file
1076
groff.spec
Normal file
File diff suppressed because it is too large
Load Diff
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (groff-1.22.4.tar.gz) = 1c42d3cd71efaf067b5850945d9097fa1f0fadd5e2b6ba7446bd9d4f439fe1ad058e4ddb0d4e0f503682137dfc7c822944ce1e3e5cf981673f8ba197ea77126d
|
3
tests/README.md
Normal file
3
tests/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# groff
|
||||
|
||||
groff tests
|
1
tests/tests
Submodule
1
tests/tests
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 039213c51ff0e36f160f8a2161b9968f5673690e
|
15
tests/tests.yml
Normal file
15
tests/tests.yml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
# Tests that run in all contexts
|
||||
- hosts: localhost
|
||||
vars:
|
||||
use_beakerlib_libraries: false
|
||||
roles:
|
||||
- role: standard-test-rhts
|
||||
tags:
|
||||
- classic
|
||||
- container
|
||||
tests:
|
||||
- unicode-segfault
|
||||
required_packages:
|
||||
- findutils # beakerlib needs find command
|
||||
- gzip # required by unicode-segafault test
|
64
tests/unicode-segfault/Makefile
Normal file
64
tests/unicode-segfault/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/groff/Regression/bz176904-unicode-segfault
|
||||
# Description: Test whether groff can display Unicode characters correctly.
|
||||
# Author: Jakub Heger <jheger@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/CoreOS/groff/unicode-segfault
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE ls.1.gz
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Jakub Heger <jheger@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Test whether groff can display Unicode characters correctly." >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 5m" >> $(METADATA)
|
||||
@echo "RunFor: groff" >> $(METADATA)
|
||||
@echo "Requires: groff gzip" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 176904" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
6
tests/unicode-segfault/PURPOSE
Normal file
6
tests/unicode-segfault/PURPOSE
Normal file
@ -0,0 +1,6 @@
|
||||
This test whether groff can display Unicode characters correctly.
|
||||
|
||||
It pipes the content of a Japanese manpage through troff and grotty and checks
|
||||
if grotty does segfault in the process - see RH BZ#176904
|
||||
|
||||
It can be also used as a smoke test for groff.
|
BIN
tests/unicode-segfault/ls.1.gz
Normal file
BIN
tests/unicode-segfault/ls.1.gz
Normal file
Binary file not shown.
53
tests/unicode-segfault/runtest.sh
Executable file
53
tests/unicode-segfault/runtest.sh
Executable file
@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/groff/Regression/bz176904-unicode-segfault
|
||||
# Description: Test whether groff can display Unicode characters correctly.
|
||||
# Author: Jakub Heger <jheger@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2017 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/bin/rhts-environment.sh || exit 1
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="groff"
|
||||
|
||||
set -o pipefail
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "cp ./ls.1.gz $TmpDir" 0 "Copying man page to temp dir"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "zcat ./ls.1.gz | troff -Tutf8 -man | grotty 1>/dev/null" 0
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
Loading…
Reference in New Issue
Block a user