diff --git a/README.md b/README.md deleted file mode 100644 index 7342728d557c602f51c6d278bba9f3dd9faaf356..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -Anolis OS -======================================= -# 代码仓库说明 -## 分支说明 ->进行代码开发工作时,请注意选择当前版本对应的分支 -* aX分支为对应大版本的主分支,如a8分支对应当前最新版本 -* aX.Y分支为对应小版本的维护分支,如a8.2分支对应8.2版本 -## 开发流程 -1. 首先fork目标分支到自己的namespace -2. 在自己的fork分支上做出修改 -3. 向对应的仓库中提交merge request,源分支为fork分支 diff --git a/gen_version.py b/gen_version.py deleted file mode 100644 index 9a5ad3e59919b66aa0f570c6ab854139fd22a81b..0000000000000000000000000000000000000000 --- a/gen_version.py +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env python3 - -""" -Generate version - -Release version entry format : .. - -Stable release version output format : .. -Development release version output format: ..~dev. - -The patch version of a development release should be the same as the -next stable release patch number. The string "~dev." and the -committer date will be added. - -Example sequence: - -Entry version Entry collection Output -2.44.1 stable => 2.44.1 -2.44.2 development => 2.44.2~dev.20200704.1652 -2.44.2 stable => 2.44.2 -2.44.3 development => 2.44.3~dev.20200824.1337 -""" - -import argparse -import os -from pathlib import Path -import re -import subprocess -import sys -from typing import Tuple - -CHANGELOG = Path(__file__).parent / "CHANGELOG.md" -assert CHANGELOG.exists(), "CHANGELOG.md file missing" - -def get_version() -> Tuple[int, int, int, str]: - """ - Derive a Graphviz version from the changelog information. - - Returns a tuple of major version, minor version, patch version, - "stable"/"development". - """ - - # is this a development revision (as opposed to a stable release)? - is_development = False - - with open(CHANGELOG, encoding="utf-8") as f: - for line in f: - - # is this a version heading? - m = re.match(r"## \[(?P[^\]]*)\]", line) - if m is None: - continue - heading = m.group("heading") - - # is this the leading unreleased heading of a development version? - UNRELEASED_PREFIX = "Unreleased (" - if heading.startswith(UNRELEASED_PREFIX): - is_development = True - heading = heading[len(UNRELEASED_PREFIX):] - - # extract the version components - m = re.match(r"(?P\d+)\.(?P\d+)\.(?P\d+)", heading) - if m is None: - raise RuntimeError("non-version ## heading encountered before seeing a " - "version heading") - - major = int(m.group("major")) - minor = int(m.group("minor")) - patch = int(m.group("patch")) - break - - else: - # we read the whole changelog without finding a version - raise RuntimeError("no version found") - - if is_development: - coll = "development" - else: - coll = "stable" - - return major, minor, patch, coll - -graphviz_date_format = "%Y%m%d.%H%M" -changelog_date_format = "%a %b %e %Y" - -parser = argparse.ArgumentParser(description="Generate Graphviz version.") -parser.add_argument("--committer-date-changelog", - dest="date_format", - action="store_const", - const=changelog_date_format, - help="Print changelog formatted committer date in UTC instead of version" -) -parser.add_argument("--committer-date-graphviz", - dest="date_format", - action="store_const", - const=graphviz_date_format, - help="Print graphviz special formatted committer date in UTC " - "instead of version" -) -parser.add_argument("--major", - dest="component", - action="store_const", - const="major", - help="Print major version") -parser.add_argument("--minor", - dest="component", - action="store_const", - const="minor", - help="Print minor version") -parser.add_argument("--patch", - dest="component", - action="store_const", - const="patch", - help="Print patch version") -parser.add_argument("--definition", - action="store_true", - help="Print a C-style preprocessor #define") -parser.add_argument("--output", - type=argparse.FileType("wt", encoding="ascii"), - default=sys.stdout, - help="Path to write result to") - -args = parser.parse_args() - -date_format = args.date_format or graphviz_date_format - -major_version, minor_version, patch_version, collection = get_version() - -if collection == "development": - patch_version = f"{patch_version}~dev" -else: - patch_version = str(patch_version) - -if not patch_version.isnumeric() or args.date_format: - os.environ["TZ"] = "UTC" - try: - committer_date = subprocess.check_output( - [ - "git", - "log", - "-n", - "1", - "--format=%cd", - f"--date=format-local:{date_format}" - ], - cwd=os.path.abspath(os.path.dirname(__file__)), - universal_newlines=True, - ).strip() - except (subprocess.CalledProcessError, FileNotFoundError): - sys.stderr.write("Warning: build not started in a Git clone, or Git is not " - "installed: setting version date to 0.\n") - committer_date = "0" - -if not patch_version.isnumeric(): - # Non-numerical patch version; add committer date - patch_version += f".{committer_date}" - -if args.date_format: - if args.definition: - args.output.write(f'#define BUILDDATE "{committer_date}"\n') - else: - args.output.write(f"{committer_date}\n") -elif args.component == "major": - if args.definition: - args.output.write(f'#define VERSION_MAJOR "{major_version}"\n') - else: - args.output.write(f"{major_version}\n") -elif args.component == "minor": - if args.definition: - args.output.write(f'#define VERSION_MINOR "{minor_version}"\n') - else: - args.output.write(f"{minor_version}\n") -elif args.component == "patch": - if args.definition: - args.output.write(f'#define VERSION_PATCH "{patch_version}"\n') - else: - args.output.write(f"{patch_version}\n") -else: - if args.definition: - args.output.write(f'#define VERSION "{major_version}.{minor_version}.' - f'{patch_version}"\n') - else: - args.output.write(f"{major_version}.{minor_version}.{patch_version}\n") diff --git a/graphviz-9.0.0-doxygen-fix.patch b/graphviz-9.0.0-doxygen-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..03bffb4a78a76bd3cf202c431d0cd40f2636337b --- /dev/null +++ b/graphviz-9.0.0-doxygen-fix.patch @@ -0,0 +1,60 @@ +diff --git a/Doxyfile b/Doxyfile +index d9442cf..14c1015 100644 +--- a/Doxyfile ++++ b/Doxyfile +@@ -68,7 +68,7 @@ PROJECT_LOGO = + # entered, it will be relative to the location where doxygen was started. If + # left blank the current directory will be used. + +-OUTPUT_DIRECTORY = graphviz/public ++OUTPUT_DIRECTORY = ./public + + # If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 + # sub-directories (in 2 levels) under the output directory of each output format +@@ -911,11 +911,11 @@ WARN_LOGFILE = + # because doxygen builds directory dependency graphs only for root children, + # but not for root directory itself. + +-INPUT = graphviz/cmd \ +- graphviz/lib \ +- graphviz/dot.demo \ +- graphviz/plugin \ +- graphviz/tclpkg ++INPUT = ./cmd \ ++ ./lib \ ++ ./dot.demo \ ++ ./plugin \ ++ ./tclpkg + + # This tag can be used to specify the character encoding of the source files + # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +diff --git a/Doxyfile.in b/Doxyfile.in +index 050f623..a86c859 100644 +--- a/Doxyfile.in ++++ b/Doxyfile.in +@@ -68,7 +68,7 @@ PROJECT_LOGO = + # entered, it will be relative to the location where doxygen was started. If + # left blank the current directory will be used. + +-OUTPUT_DIRECTORY = graphviz/public ++OUTPUT_DIRECTORY = ./public + + # If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 + # sub-directories (in 2 levels) under the output directory of each output format +@@ -911,11 +911,11 @@ WARN_LOGFILE = + # because doxygen builds directory dependency graphs only for root children, + # but not for root directory itself. + +-INPUT = graphviz/cmd \ +- graphviz/lib \ +- graphviz/dot.demo \ +- graphviz/plugin \ +- graphviz/tclpkg ++INPUT = ./cmd \ ++ ./lib \ ++ ./dot.demo \ ++ ./plugin \ ++ ./tclpkg + + # This tag can be used to specify the character encoding of the source files + # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/graphviz-8.0.5.tar.xz b/graphviz-9.0.0.tar.xz similarity index 69% rename from graphviz-8.0.5.tar.xz rename to graphviz-9.0.0.tar.xz index c2506848874c388e164069250d7ad9c6966f179e..ad09336bc1e6b345fd9ef91c255839b9eef9dd08 100644 Binary files a/graphviz-8.0.5.tar.xz and b/graphviz-9.0.0.tar.xz differ diff --git a/graphviz.spec b/graphviz.spec index 7d8ad039d6ac73b1327273d02d9d6cf3246fd557..87b2a7d715a3b04dc8c4835b8810b33aaa54b94a 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -1,8 +1,10 @@ -%define anolis_release 3 +%define anolis_release 1 +%bcond_with ocaml %undefine _package_note_flags # temporal drop of PHP support due to https://gitlab.com/graphviz/graphviz/-/issues/2277 %bcond_with php %bcond_with guile +%bcond_with bootstrap %bcond_without gtk2 # Necessary conditionals @@ -26,6 +28,12 @@ %global JAVA 0 %endif +%if %{GTS} && %{with gtk2} +%global SMYRNA 1 +%else +%global SMYRNA 0 +%endif + %if %{with php} %global PHP 1 %else @@ -49,11 +57,11 @@ Name: graphviz Summary: Graph Visualization Tools -Version: 8.0.5 +Version: 9.0.0 Release: %{anolis_release}%{?dist} -License: EPL-1.0 +License: epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc URL: http://www.graphviz.org/ -Source0: https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/%{version}/%{name}-%{version}.tar.xz +Source0: https://gitlab.com/api/v4/projects/%{name}%2F%{name}/packages/generic/%{name}-releases/%{version}/%{name}-%{version}.tar.xz BuildRequires: gcc-g++ BuildRequires: zlib-devel BuildRequires: libpng-devel @@ -83,9 +91,10 @@ BuildRequires: libSM-devel BuildRequires: libXext-devel %if %{JAVA} BuildRequires: java-devel +BuildRequires: javapackages-tools %endif BuildRequires: cairo-devel >= 1.1.10 -BuildRequires: pkgconfig(pangocairo) >= 1.22.0 +BuildRequires: pango-devel BuildRequires: gmp-devel BuildRequires: lua-devel %if %{with gtk2} @@ -134,18 +143,21 @@ BuildRequires: libgs-devel BuildRequires: make BuildRequires: poppler-glib-devel BuildRequires: freeglut-devel +%if %{SMYRNA} BuildRequires: libglade2-devel BuildRequires: gtkglext-devel +%endif +%if %{without bootstrap} BuildRequires: doxygen +%endif %if %{GOLANG} BuildRequires: golang %endif -# ISO8859-1 fonts are required by lefty Requires: urw-base35-fonts -Requires: xorg-x11-fonts-ISO8859-1-100dpi Patch0: graphviz-4.0.0-gvpack-neato-static.patch -Patch1: add-loongarch64-support-for-graphviz.patch -Patch2: graphviz-fix-CVE-2023-46045.patch +Patch1: graphviz-9.0.0-doxygen-fix.patch +Patch2: add-loongarch64-support-for-graphviz.patch +Patch3: graphviz-fix-CVE-2023-46045.patch %if ! %{JAVA} Obsoletes: graphviz-java < %{version}-%{release} @@ -157,7 +169,7 @@ and edges, not as in barcharts). %package devel Summary: Development package for graphviz -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release}, pkgconfig Requires: %{name}-gd = %{version}-%{release} %description devel @@ -183,7 +195,7 @@ Buildarch: noarch %description doc Provides some additional PDF and HTML documentation for graphviz. -%if %{GTS} +%if %{SMYRNA} %package smyrna Summary: Graphviz interactive graph viewer @@ -194,8 +206,6 @@ Smyrna is a viewer for graphs in the DOT format. %package gd Summary: Graphviz plugin for renderers based on gd Requires: %{name} = %{version}-%{release} -Requires(post): %{_bindir}/dot -Requires(postun): %{_bindir}/dot %description gd Graphviz plugin for renderers based on gd. (Unless you absolutely have to use @@ -206,8 +216,6 @@ quality anti-aliased lines provided by the cairo+pango based renderer.) %package gtk2 Summary: Graphviz plugin for renderers based on gtk2 Requires: %{name} = %{version}-%{release} -Requires(post): %{_bindir}/dot -Requires(postun): %{_bindir}/dot %description gtk2 Graphviz plugin for renderers based on gtk2. @@ -256,7 +264,7 @@ Graphviz plugin for -Tswf (flash) renderer based on ming. %if %{OCAML} %package ocaml Summary: Ocaml extension for graphviz -Requires: %{name} = %{version}-%{release}, ocaml +Requires: %{name} = %{version}-%{release} %description ocaml Ocaml extension for graphviz. @@ -265,7 +273,6 @@ Ocaml extension for graphviz. %package perl Summary: Perl extension for graphviz Requires: %{name} = %{version}-%{release} -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description perl Perl extension for graphviz. @@ -343,8 +350,7 @@ autoreconf -fi %if %{JAVA} # Hack in the java includes we need -sed -i '/JavaVM.framework/!s/JAVA_INCLUDES=/JAVA_INCLUDES=\"_MY_JAVA_INCLUDES_\"/g' configure -sed -i 's|_MY_JAVA_INCLUDES_|-I%{java_home}/include/ -I%{java_home}/include/linux/|g' configure +sed -i 's|for try_java_include in|& %{java_home}/include/ %{java_home}/include/linux/|' configure %endif # Rewrite config_ruby.rb to work with Ruby 2.2 sed -i 's|expand(|expand(RbConfig::|' config/config_ruby.rb @@ -352,7 +358,7 @@ sed -i 's|sitearchdir|vendorarchdir|' config/config_ruby.rb # get the path to search for ruby/config.h to CPPFLAGS, so that configure can find it export CPPFLAGS=-I`ruby -e "puts File.join(RbConfig::CONFIG['includedir'], RbConfig::CONFIG['sitearch'])" || echo /dev/null` -%configure --with-x --disable-static --disable-rpath --without-included-ltdl \ +%configure --with-x --disable-static --disable-dependency-tracking \ %if ! %{JAVA} --enable-java=no \ %endif @@ -361,9 +367,18 @@ export CPPFLAGS=-I`ruby -e "puts File.join(RbConfig::CONFIG['includedir'], RbCon %if ! %{LASI} --without-lasi \ %endif +%if %{without gtk2} + --without-gtk \ + --without-gtkgl \ + --without-gtkglext \ + --without-glade \ +%endif %if ! %{GTS} --without-gts \ %endif +%if ! %{SMYRNA} + --without-smyrna \ +%endif %if ! %{SHARP} --disable-sharp \ %endif @@ -399,10 +414,15 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %make_build CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-strict-overflow %{?FFSTORE}" \ CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-strict-overflow %{?FFSTORE}" + +%if %{without bootstrap} make doxygen +%endif %install -%make_install docdir=%{_docdir}/%{name} +%make_install docdir=%{_docdir}/%{name} \ + pkgconfigdir=%{_libdir}/pkgconfig +find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' # Install README install -m0644 README %{buildroot}%{_docdir}/%{name} @@ -441,6 +461,10 @@ do done popd +# python 3 +install -pD tclpkg/gv/.libs/libgv_python3.so %{buildroot}%{python3_sitearch}/_gv.so +install -p tclpkg/gv/gv.py %{buildroot}%{python3_sitearch}/gv.py + # Ghost plugins config touch %{buildroot}%{_libdir}/graphviz/config%{pluginsver} @@ -470,45 +494,15 @@ php --no-php-ini \ # cd rtest # make rtest -%post -%{_bindir}/dot -c 2>/dev/null || : - -%if %{DEVIL} -# run "dot -c" to generate plugin config in %%{_libdir}/graphviz/config* -%post devil -%{_bindir}/dot -c 2>/dev/null || : - -%postun devil -%{_bindir}/dot -c 2>/dev/null || : -%endif - -# run "dot -c" to generate plugin config in %%{_libdir}/graphviz/config* -%post gd -%{_bindir}/dot -c 2>/dev/null || : - -%postun gd -%{_bindir}/dot -c 2>/dev/null || : - -%if %{with gtk2} -%post gtk2 +%transfiletriggerin -- %{_libdir}/graphviz %{_bindir}/dot -c 2>/dev/null || : -%postun gtk2 +%transfiletriggerpostun -- %{_libdir}/graphviz %{_bindir}/dot -c 2>/dev/null || : -%endif - -%if %{MING} -# run "dot -c" to generate plugin config in %%{_libdir}/graphviz/config* -%post ming -%{_bindir}/dot -c 2>/dev/null || : - -%postun ming -%{_bindir}/dot -c 2>/dev/null || : -%endif %files %doc %{_docdir}/%{name} -%if %{GTS} +%if %{SMYRNA} %exclude %{_bindir}/smyrna %exclude %{_mandir}/man1/smyrna.1* %endif @@ -532,8 +526,10 @@ php --no-php-ini \ %exclude %{_libdir}/graphviz/*/* %exclude %{_libdir}/graphviz/libgvplugin_gd.* +%if %{with gtk2} %exclude %{_libdir}/graphviz/libgvplugin_gtk.* %exclude %{_libdir}/graphviz/libgvplugin_gdk.* +%endif %if %{DEVIL} %exclude %{_libdir}/graphviz/libgvplugin_devil.* %endif @@ -545,9 +541,9 @@ php --no-php-ini \ %files devel %{_includedir}/graphviz %{_libdir}/*.so -%{_libdir}/%{name}/*.so +%{_libdir}/graphviz/*.so %{_libdir}/pkgconfig/*.pc -%{_mandir}/man3/*.3%{_extension} +%{_mandir}/man3/*.3.* %if %{DEVIL} %files devil @@ -559,7 +555,7 @@ php --no-php-ini \ %doc %{_docdir}/%{name}/*.pdf %doc %{_docdir}/%{name}/demo -%if %{GTS} +%if %{SMYRNA} %files smyrna %{_bindir}/smyrna %{_datadir}/%{name}/smyrna @@ -657,6 +653,9 @@ php --no-php-ini \ %endif %changelog +* Wed Feb 19 2025 wangzhe - 9.0.0-1 +- Refer to CentOS Stream graphviz-9.0.0-15 (tdawson@redhat.com) + * Fri Aug 02 2024 dash - 8.0.5-3 - fix CVE-2023-46045