Browse Source

initial package creation

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 2 years ago
commit
e8f9643813
  1. 26
      SOURCES/graphviz-2.42.2-coverity-scan-fixes.patch
  2. 22
      SOURCES/graphviz-2.42.2-dotty-menu-fix.patch
  3. 40
      SOURCES/graphviz-2.44.0-CVE-2020-18032.patch
  4. 15
      SOURCES/graphviz-2.44.0-gvpack-neato-static.patch
  5. 127
      SOURCES/graphviz-2.44.0-man-fix.patch
  6. 1397
      SPECS/graphviz.spec

26
SOURCES/graphviz-2.42.2-coverity-scan-fixes.patch

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
diff --git a/cmd/lefty/dot2l/dotlex.c b/cmd/lefty/dot2l/dotlex.c
index cf738c0..65e17e2 100644
--- a/cmd/lefty/dot2l/dotlex.c
+++ b/cmd/lefty/dot2l/dotlex.c
@@ -252,7 +252,7 @@ static char *scan_token (char *p) {
char *q;
q = lexbuf;
- if (p == '\0')
+ if (!p || *p == '\0')
return NULL;
while (isalnum (*p) || (*p == '_') || (!isascii (*p)))
*q++ = *p++;
diff --git a/cmd/tools/gvgen.c b/cmd/tools/gvgen.c
index c2b166d..c9a51e9 100644
--- a/cmd/tools/gvgen.c
+++ b/cmd/tools/gvgen.c
@@ -453,6 +453,8 @@ closeOpen (void)
fprintf(opts.outfile, "}\ngraph {\n");
}
+extern void makeTetrix(int depth, edgefn ef);
+
int main(int argc, char *argv[])
{
GraphType graphType;

22
SOURCES/graphviz-2.42.2-dotty-menu-fix.patch

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
diff --git a/cmd/dotty/dotty_ui.lefty b/cmd/dotty/dotty_ui.lefty
index 6fdec8f..270c0c8 100644
--- a/cmd/dotty/dotty_ui.lefty
+++ b/cmd/dotty/dotty_ui.lefty
@@ -351,7 +351,7 @@ dotty.protovt.normal.uifuncs = [
else
gt.insertedge (gt, data.pobj, null, data.obj, null, null, 1);
};
- 'rightdown' = function (data) {
+ 'rightup' = function (data) {
local vt, gt, menu, i;
vt = dotty.views[data.widget];
@@ -456,7 +456,7 @@ dotty.protovt.birdseye.uifuncs = [
'middledown' = dotty.protovt.normal.uifuncs.middledown;
'middlemove' = dotty.protovt.normal.uifuncs.middlemove;
'middleup' = dotty.protovt.normal.uifuncs.middleup;
- 'rightdown' = dotty.protovt.normal.uifuncs.rightdown;
+ 'rightup' = dotty.protovt.normal.uifuncs.rightup;
'keyup' = dotty.protovt.normal.uifuncs.keyup;
'redraw' = dotty.protovt.normal.uifuncs.redraw;
'closeview' = dotty.protovt.normal.uifuncs.closeview;

40
SOURCES/graphviz-2.44.0-CVE-2020-18032.patch

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
From 784411ca3655c80da0f6025ab20634b2a6ff696b Mon Sep 17 00:00:00 2001
From: Matthew Fernandez <matthew.fernandez@gmail.com>
Date: Sat, 25 Jul 2020 19:31:01 -0700
Subject: [PATCH] fix: out-of-bounds write on invalid label

When the label for a node cannot be parsed (due to it being malformed), it falls
back on the symbol name of the node itself. I.e. the default label the node
would have had if it had no label attribute at all. However, this is applied by
dynamically altering the node's label to "\N", a shortcut for the symbol name of
the node. All of this is fine, however if the hand written label itself is
shorter than the literal string "\N", not enough memory would have been
allocated to write "\N" into the label text.

Here we account for the possibility of error during label parsing, and assume
that the label text may need to be overwritten with "\N" after the fact. Fixes
issue #1700.
---
lib/common/shapes.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/common/shapes.c b/lib/common/shapes.c
index 0a0635fc3..9dca9ba6e 100644
--- a/lib/common/shapes.c
+++ b/lib/common/shapes.c
@@ -3546,9 +3546,10 @@ static void record_init(node_t * n)
reclblp = ND_label(n)->text;
len = strlen(reclblp);
/* For some forgotten reason, an empty label is parsed into a space, so
- * we need at least two bytes in textbuf.
+ * we need at least two bytes in textbuf, as well as accounting for the
+ * error path involving "\\N" below.
*/
- len = MAX(len, 1);
+ len = MAX(MAX(len, 1), (int)strlen("\\N"));
textbuf = N_NEW(len + 1, char);
if (!(info = parse_reclbl(n, flip, TRUE, textbuf))) {
agerr(AGERR, "bad label format %s\n", ND_label(n)->text);
--
GitLab

15
SOURCES/graphviz-2.44.0-gvpack-neato-static.patch

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
diff --git a/cmd/tools/Makefile.am b/cmd/tools/Makefile.am
index 9c0e9ff..29687d2 100644
--- a/cmd/tools/Makefile.am
+++ b/cmd/tools/Makefile.am
@@ -162,7 +162,9 @@ gvpack_LDADD = \
$(top_builddir)/lib/ingraphs/libingraphs_C.la \
$(top_builddir)/lib/cgraph/libcgraph.la \
$(top_builddir)/lib/cdt/libcdt.la \
- $(top_builddir)/plugin/neato_layout/libgvplugin_neato_layout.la
+ $(top_builddir)/plugin/neato_layout/libgvplugin_neato_layout_C.la \
+ $(top_builddir)/lib/pathplan/libpathplan_C.la \
+ $(EXPAT_LIBS) $(Z_LIBS) $(GTS_LIBS) $(SOCKET_LIBS) $(IPSEPCOLA_LIBS) $(MATH_LIBS)
if ENABLE_STATIC
gvpack_static_SOURCES = gvpack.c

127
SOURCES/graphviz-2.44.0-man-fix.patch

@ -0,0 +1,127 @@ @@ -0,0 +1,127 @@
diff --git a/cmd/dot/dot.1 b/cmd/dot/dot.1
index 986b262..e9c56f2 100644
--- a/cmd/dot/dot.1
+++ b/cmd/dot/dot.1
@@ -352,7 +352,7 @@ in the layout.
layout the graph.
.PP
\fBstart=\fIval\fR. Adjusts the random initial placement of nodes
-with no specified position. If \fIval\fP is is an integer,
+with no specified position. If \fIval\fP is an integer,
it is used as the seed for the random number generator.
If \fIval\fP is not an integer, a random system\(hygenerated integer,
such as the process ID or current time, is used as the seed.
@@ -635,6 +635,22 @@ As usual, edge layout is guided by the \fBsplines\fR attribute.
.PP
\fB\-y\fR invert y coordinate in output.
.PP
+\fB\-o\fIfile\fR write output to \fIfile\fP.
+.PP
+\fB\-x\fP reduce graph.
+.PP
+\fB\-Lg\fP don't use grid.
+.PP
+\fB\-LO\fP use old attractive force.
+.PP
+\fB\-Ln\fIi\fR set number of iterations to \fIi\fP.
+.PP
+\fB\-LU\fIi\fR set unscaled factor to \fIi\fP.
+.PP
+\fB\-LC\fIv\fR set overlap expansion factor to \fIv\fP.
+.PP
+\fB\-LT\fR[*]\fIv\fR set temperature (temperature factor) to \fIv\fP.
+.PP
\fB\-V\fP (version) prints version information and exits.
.PP
\fB\-?\fP prints the usage and exits.
diff --git a/cmd/dot/osage.1 b/cmd/dot/osage.1
index 0efbf90..5eded8b 100644
--- a/cmd/dot/osage.1
+++ b/cmd/dot/osage.1
@@ -404,6 +404,22 @@ If \fB\-l\fP is given by itself, the standard library is omitted.
.PP
\fB\-O\fP automatically generate output filenames based on the input filename and the \-T format.
.PP
+\fB\-o\fIfile\fR write output to \fIfile\fP.
+.PP
+\fB\-x\fP reduce graph.
+.PP
+\fB\-Lg\fP don't use grid.
+.PP
+\fB\-LO\fP use old attractive force.
+.PP
+\fB\-Ln\fIi\fR set number of iterations to \fIi\fP.
+.PP
+\fB\-LU\fIi\fR set unscaled factor to \fIi\fP.
+.PP
+\fB\-LC\fIv\fR set overlap expansion factor to \fIv\fP.
+.PP
+\fB\-LT\fR[*]\fIv\fR set temperature (temperature factor) to \fIv\fP.
+.PP
\fB\-v\fP (verbose) prints various information useful for debugging.
.PP
\fB\-V\fP (version) prints version information and exits.
diff --git a/cmd/dot/patchwork.1 b/cmd/dot/patchwork.1
index 7fe68fb..852f516 100644
--- a/cmd/dot/patchwork.1
+++ b/cmd/dot/patchwork.1
@@ -398,6 +398,22 @@ If \fB\-l\fP is given by itself, the standard library is omitted.
.PP
\fB\-O\fP automatically generate output filenames based on the input filename and the \-T format.
.PP
+\fB\-o\fIfile\fR write output to \fIfile\fP.
+.PP
+\fB\-x\fP reduce graph.
+.PP
+\fB\-Lg\fP don't use grid.
+.PP
+\fB\-LO\fP use old attractive force.
+.PP
+\fB\-Ln\fIi\fR set number of iterations to \fIi\fP.
+.PP
+\fB\-LU\fIi\fR set unscaled factor to \fIi\fP.
+.PP
+\fB\-LC\fIv\fR set overlap expansion factor to \fIv\fP.
+.PP
+\fB\-LT\fR[*]\fIv\fR set temperature (temperature factor) to \fIv\fP.
+.PP
\fB\-v\fP (verbose) prints various information useful for debugging.
.PP
\fB\-V\fP (version) prints version information and exits.
diff --git a/cmd/gvmap/cluster.1 b/cmd/gvmap/cluster.1
index 15b0332..188dcd6 100644
--- a/cmd/gvmap/cluster.1
+++ b/cmd/gvmap/cluster.1
@@ -51,6 +51,9 @@ Specifies that output should go into the file \fIoutfile\fP. By default,
.TP
.BI \-v
Verbose mode.
+.TP
+.BI \-?
+Prints the usage and exits.
.SH EXAMPLES
.PP
Applying
diff --git a/cmd/tools/unflatten.1 b/cmd/tools/unflatten.1
index 7857cf0..089496f 100644
--- a/cmd/tools/unflatten.1
+++ b/cmd/tools/unflatten.1
@@ -3,7 +3,7 @@
unflatten \- adjust directed graphs to improve layout aspect ratio
.SH SYNOPSIS
.B unflatten
-[\fB\-f\fR]
+[\fB\-f?\fR]
[\fB\-l\fIlen\fR]
[\fB\-c\fIlen\fR
] [
@@ -41,6 +41,9 @@ Form disconnected nodes into chains of up to \fIlen\fP nodes.
.BI \-o " outfile"
causes the output to be written to the specified file; by default,
output is written to \fBstdout\fP.
+.TP
+.BI \-?
+Prints the usage and exits.
.SH OPERANDS
The following operand is supported:
.TP 8

1397
SPECS/graphviz.spec

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save