Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
91eff38c3f
!48 [sync] PR-44: Modify loongarch64 and sw_64 support tcl subpackage
From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2024-12-13 09:02:55 +00:00
yangchenguang
c2399e2b77 Modify loongarch64 and sw_64 support tcl subpackage
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
(cherry picked from commit a5c61b04b48fee90f510c44c9d483ae03621d496)
2024-09-04 09:52:23 +08:00
openeuler-ci-bot
ac8adcc61b
!41 [sync] PR-36: Fix CVE-2023-46045
From: @openeuler-sync-bot 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2024-02-04 01:19:05 +00:00
starlet-dx
f569415c61 Fix CVE-2023-46045
(cherry picked from commit df0ac3d8c4b02d312d0858525a9bcdd91a901834)
2024-02-02 17:10:37 +08:00
openeuler-ci-bot
c9172a9bb6
!29 [sync] PR-28: add loongarch support
From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-12-01 01:59:49 +00:00
Jingyun Hua
b509dd7b4e add loongarch support
Signed-off-by: Jingyun Hua <huajingyun@loongson.cn>
(cherry picked from commit 14836134920bc568d832a73a19a69b7f71b1ea74)
2022-11-30 14:09:51 +08:00
openeuler-ci-bot
cc9c7b897b
!24 delete redundant Provides and Obsoletes:
Merge pull request !24 from 吴超超/openEuler-22.03-LTS-Next
2022-01-08 11:53:52 +00:00
19909236985
98b864b071 1 2022-01-08 18:29:37 +08:00
openeuler-ci-bot
644f7d63e6 !20 update version to 2.48.0
Merge pull request !20 from 吴超超/openEuler-22.03-LTS-Next
2021-12-22 03:33:57 +00:00
19909236985
486db79548 1 2021-12-17 17:14:24 +08:00
6 changed files with 180 additions and 72 deletions

50
CVE-2023-46045.patch Normal file
View File

@ -0,0 +1,50 @@
From 4becebe422e167358f4e57679d845932cc9f3a8a Mon Sep 17 00:00:00 2001
From: starlet-dx <15929766099@163.com>
Date: Fri, 2 Feb 2024 10:24:35 +0800
Subject: [PATCH 1/1] Merge branch 'smattr/gitlab-2441' into 'main'
gvc: detect plugin installation failure and display an error
Closes #2441
Origin:
https://gitlab.com/graphviz/graphviz/-/commit/361f274ca901c3c476697a6404662d95f4dd43cb
https://gitlab.com/graphviz/graphviz/-/commit/3f31704cafd7da3e86bb2861accf5e90c973e62a
https://gitlab.com/graphviz/graphviz/-/commit/a95f977f5d809915ec4b14836d2b5b7f5e74881e
---
lib/gvc/gvconfig.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c
index 06c3326..9d3f6fc 100644
--- a/lib/gvc/gvconfig.c
+++ b/lib/gvc/gvconfig.c
@@ -165,9 +165,8 @@ static char *token(int *nest, char **tokens)
static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s)
{
- char *path, *name, *api;
+ char *path, *name;
const char *type;
- api_t gv_api;
int quality, rc;
int nest = 0;
gvplugin_package_t *package;
@@ -181,8 +180,12 @@ static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s)
name = "x";
package = gvplugin_package_record(gvc, path, name);
do {
- api = token(&nest, &s);
- gv_api = gvplugin_api(api);
+ const char *api = token(&nest, &s);
+ const api_t gv_api = gvplugin_api(api);
+ if (gv_api == (api_t)-1) {
+ agerr(AGERR, "config error: %s %s not found\n", path, api);
+ return 0;
+ }
do {
if (nest == 2) {
type = token(&nest, &s);
--
2.33.0

View File

@ -0,0 +1,26 @@
From 4d020e8f8926661d0487690b98d5aac5a24fec8e Mon Sep 17 00:00:00 2001
From: yangchenguang <yangchenguang@kylinsec.com.cn>
Date: Mon, 26 Feb 2024 16:35:25 +0800
Subject: [PATCH] add loongarch64 support graphviz
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 8f8bedc..99ce969 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,7 @@ if test -z "$LIBPOSTFIX"; then
case "${host_os}" in
*linux* )
case "${host_cpu}" in
- aarch64 | powerpc64 | powerpc64le | s390x | x86_64 | sparc64 | mips64* | riscv64 | e2k )
+ aarch64 | powerpc64 | powerpc64le | s390x | x86_64 | sparc64 | mips64* | riscv64 | e2k | loongarch64 )
LIBPOSTFIX="64"
INTGOSIZE=64
;;
--
2.39.1

View File

@ -1,40 +0,0 @@
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

View File

@ -0,0 +1,15 @@
diff --git a/cmd/tools/Makefile.am b/cmd/tools/Makefile.am
index 4978fea..9fbe2e2 100644
--- a/cmd/tools/Makefile.am
+++ b/cmd/tools/Makefile.am
@@ -249,7 +249,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)
# add a non-existent C++ source to force the C++ compiler to be used for
# linking, so the C++ standard library is included for our C++ dependencies

View File

@ -6,28 +6,39 @@
%global ini_name 40-%{name}.ini
%endif
%global pluginsver 6
%global php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
%ifarch loongarch64 sw_64
%global OCAML 0
%else
%global OCAML 1
%endif
Name: graphviz
Version: 2.44.1
Version: 2.48.0
Release: 6
Summary: Graph Visualization Tools
License: EPL
License: EPL-1.0
URL: http://www.graphviz.org/
Source0: https://gitlab.com/graphviz/graphviz/-/archive/%{version}/graphviz-%{version}.tar.gz
Patch6000: backport-CVE-2020-18032.patch
Patch1000: add-loongarch64-support-graphviz.patch
Patch6000: backport-graphviz-2.48.0-gvpack-neato-static.patch
# https://gitlab.com/graphviz/graphviz/-/commit/5d09f70d7f6b81eb891749895c2e6b81365ac234
Patch6001: CVE-2023-46045.patch
BuildRequires: gcc-g++
BuildRequires: ksh bison m4 flex ruby automake perl-Carp autoconf libtool qpdf ocaml urw-base35-fonts, perl-ExtUtils-Embed, perl-generators, librsvg2-devel swig >= 1.3.33
BuildRequires: ksh bison m4 flex ruby automake perl-Carp autoconf libtool qpdf urw-base35-fonts, perl-ExtUtils-Embed, perl-generators, librsvg2-devel swig >= 1.3.33
BuildRequires: zlib-devel libpng-devel libjpeg-devel expat-devel tk-devel fontconfig-devel libtool-ltdl-devel ruby-devel guile-devel freetype-devel >= 2 tcl-devel >= 8.3
BuildRequires: python3-devel libXaw-devel libSM-devel libXext-devel java-devel pango-devel gmp-devel lua-devel gtk2-devel cairo-devel >= 1.1.10
BuildRequires: ghostscript libgs-devel gd-devel perl-devel
BuildRequires: ghostscript libgs-devel gd-devel perl-devel chrpath
%if %{OCAML}
BuildRequires: ocaml
%endif
%if %{with php}
BuildRequires: php-devel
@ -37,10 +48,6 @@ Requires: urw-base35-fonts xorg-x11-fonts-ISO8859-1-100dpi guile glibc
Requires(post): glibc
Requires(postun): glibc
Provides: %{name}-gd %{name}-graphs %{name}-guile
Obsoletes: %{name}-gd %{name}-graphs %{name}-guile
%description
Graphviz is open source graph visualization software. Graph visualization is a way of representing structural
information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics,
@ -60,6 +67,29 @@ Summary: Documentation files for graphviz
%description docs
The docs package contains documentation files.
%package gd
Summary: Graphviz plugin for renderers based on gd
Requires: %{name} = %{version}-%{release}
Requires(post): %{_bindir}/dot /sbin/ldconfig
Requires(postun): %{_bindir}/dot /sbin/ldconfig
%description gd
Graphviz plugin for renderers based on gd. (Unless you absolutely have to use
GIF, you are recommended to use the PNG format instead because of the better
quality anti-aliased lines provided by the cairo+pango based renderer.)
%package graphs
Summary: Demo graphs for graphviz
%description graphs
Some demo graphs for graphviz.
%package guile
Summary: Guile extension for graphviz
Requires: %{name} = %{version}-%{release} guile
%description guile
Guile extension for graphviz.
%package java
Summary: Java extension for graphviz
@ -75,13 +105,14 @@ Requires: %{name} = %{version}-%{release} lua
%description lua
Lua extension for graphviz.
%if %{OCAML}
%package ocaml
Summary: Ocaml extension for graphviz
Requires: %{name} = %{version}-%{release} ocaml
%description ocaml
Ocaml extension for graphviz.
%endif
%package perl
Summary: Perl extension for graphviz
@ -93,18 +124,15 @@ Perl extension for graphviz.
%package ruby
Summary: Ruby extension for graphviz
Requires: %{name} = %{version}-%{release} ruby
%description ruby
Ruby extension for graphviz.
%package tcl
Summary: Tcl extension & tools for graphviz
Requires: %{name} = %{version}-%{release} tcl >= 8.3 tk
%description tcl
Various tcl packages (extensions) for the graphviz tools.
%if %{with php}
%package php
Summary: PHP extension for graphviz
@ -117,13 +145,11 @@ PHP extension for graphviz.
%package python3
Summary: Python 3 extension for graphviz
Requires: %{name} = %{version}-%{release}
Provides: python3dist(gv) = %{version} python%{python3_version}dist(gv) = %{version}
Provides: python3dist(gv) = %{version} %{python3_version}dist(gv) = %{version}
%description python3
Python 3 extension for graphviz.
%prep
%autosetup -n graphviz-%{version} -p1
@ -141,15 +167,22 @@ export CPPFLAGS=-I`ruby -e "puts File.join(RbConfig::CONFIG['includedir'], RbCon
--without-mylibgd --with-ipsepcola --with-pangocairo \
--with-gdk-pixbuf --with-visio --disable-silent-rules \
--without-lasi --without-gts --disable-sharp --without-ming \
%if !%{OCAML}
--disable-ocaml \
%endif
--disable-r --without-devil --without-qt
# drop rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-strict-overflow %{?FFSTORE}" \
CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-strict-overflow %{?FFSTORE}" \
PYTHON_INCLUDES=`python3-config --includes` PYTHON_LIBS=`python3-config --libs` \
PYTHON_INSTALL_DIR=%{python3_sitearch} PYTHON=%{__python3}
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} \
docdir=%{buildroot}%{_docdir}/%{name} \
pkgconfigdir=%{_libdir}/pkgconfig \
@ -167,7 +200,6 @@ extension=gv.so
__EOF__
%endif
find $RPM_BUILD_ROOT%{_datadir}/%{name}/demo -type f -exec chmod a-x {} ';'
chmod -x $RPM_BUILD_ROOT%{_datadir}/%{name}/lefty/*
@ -180,6 +212,9 @@ popd
rm -rf $RPM_BUILD_ROOT%{_libdir}/graphviz/python
chrpath -d $RPM_BUILD_ROOT%{_bindir}/gvpack
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "%{_libdir}/graphviz" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
touch $RPM_BUILD_ROOT%{_libdir}/graphviz/config%{pluginsver}
%check
@ -193,46 +228,41 @@ php --no-php-ini --define extension_dir=$RPM_BUILD_ROOT%{_libdir}/graphviz/php/
%preun
%post
/sbin/ldconfig
%{_bindir}/dot -c
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc README
%{_bindir}/*
%dir %{_libdir}/graphviz
%{_libdir}/*.so.*
%{_libdir}/graphviz/*.so.*
%{_libdir}/graphviz/guile/
%dir %{_datadir}/graphviz
%{_datadir}/graphviz/
%ghost %{_libdir}/graphviz/config%{pluginsver}
%exclude %{_bindir}/dot_builtins
%config(noreplace) /etc/ld.so.conf.d/*
%if %{with php}
%files php
%config(noreplace) %{_sysconfdir}/php.d/%{ini_name}
%config(noreplace)
%{_sysconfdir}/php.d/%{ini_name}
%{_libdir}/graphviz/php/
%{php_extdir}/gv.so
%{_datadir}/php*/*
%endif
%exclude %{_libdir}/graphviz/*/*
%exclude %{_libdir}/graphviz/libgvplugin_gd.*
%files devel
%{_includedir}/graphviz
%{_libdir}/*.so
%{_libdir}/graphviz/*.so
%{_libdir}/pkgconfig/*.pc
%files docs
%defattr(644,root,root)
%doc %{_datadir}/%{name}/doc
@ -240,6 +270,15 @@ php --no-php-ini --define extension_dir=$RPM_BUILD_ROOT%{_libdir}/graphviz/php/
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_mandir}/man7/*
%files gd
%{_libdir}/graphviz/libgvplugin_gd.so.*
%files graphs
%dir %{_datadir}/graphviz
%{_datadir}/graphviz/graphs
%files guile
%{_libdir}/graphviz/guile/
%files java
%{_libdir}/graphviz/java/
@ -248,8 +287,10 @@ php --no-php-ini --define extension_dir=$RPM_BUILD_ROOT%{_libdir}/graphviz/php/
%{_libdir}/graphviz/lua/
%{_libdir}/lua*/*
%if %{OCAML}
%files ocaml
%{_libdir}/graphviz/ocaml/
%endif
%files perl
%{_libdir}/graphviz/perl/
@ -267,9 +308,25 @@ php --no-php-ini --define extension_dir=$RPM_BUILD_ROOT%{_libdir}/graphviz/php/
%{_libdir}/graphviz/tcl/
%{_libdir}/tcl*/*
%changelog
* Mon Feb 26 2024 yangchenguang <yangchenguang@kylinsec.com.cn> - 2.48.0-6
- Modify loongarch64 and sw_64 support tcl subpackage
* Fri Feb 02 2024 yaoxin <yao_xin001@hoperun.com> - 2.48.0-5
- Fix CVE-2023-46045
* Wed Jul 19 2023 haomimi <haomimi@uniontech.com> - 2.48.0-4
- add sw_64 support
* Mon Nov 21 2022 huajingyun <huajingyun@loongson.cn> - 2.48.0-3
- add loongarch support
* Sat Jan 8 2022 wuchaochao <wuchaochao4@huawei.com> - 2.48.0-2
- delete redundant Provides and Obsoletes
* Wed Dec 15 2021 wuchaochao <wuchaochao4@huawei.com> - 2.48.0-1
- update version to 2.48.0
* Mon Sep 06 2021 wangkerong <wangkerong@huawei.com> -2.44.1-6
- remove groff buildrequires