Lines Matching +full:fedora +full:- +full:release

2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2017-2025 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
55 - System: dependencies required for docs build;
56 - Python: python dependencies for a native distro Sphinx install;
57 - PDF: dependencies needed by PDF builds.
88 - missing: missing dependencies list, containing a distro-independent
90 - missing_pkg: ancillary dict containing missing dependencies in
92 - need: total number of needed dependencies. Never cleaned.
93 - optional: total number of optional dependencies. Never cleaned.
94 - pdf: Is PDF support enabled?
169 agnostic package name to distro-specific one.
185 self.optional -= 1
242 are out there newer python binaries, we can't rely on sys.release here.
245 result = SphinxDependencyChecker.run([cmd, "--version"],
266 "python3.[0-9]",
267 "python3.[0-9][0-9]",
283 for Sphinx build. If not, re-run with a newer version if found.
292 result = SphinxDependencyChecker.run(["docutils", "--version"],
409 scripts/documentation-file-ref-check
415 # distros (Oracle) didn't have perl - nor even an option to install
416 # before installing oraclelinux-release-el9 package.
427 self.run(["perl", f"-M{prog}", "-e", "1"], check=True)
442 self.run([self.python_cmd, "-c", f"import {module}"], check=True)
452 self.run(["rpm", "-q", prog], check=True)
462 self.run(["pacman", "-Q", prog], check=True)
499 Gets the binary filename for sphinx-build.
504 fname = "sphinx-build"
508 fname = "sphinx-build-3"
517 Gets sphinx-build version.
520 result = self.run([cmd, "--version"],
528 match = re.match(r"^sphinx-build\s+([\d\.]+)(?:\+(?:/[\da-f]+)|b\d+)?\s*$", line)
541 with open(conf, "r", encoding="utf-8") as f:
582 with open(filename, "r", encoding="utf-8") as f:
596 Several modern distros now have /etc/os-release, which usually have
603 result = self.run(["lsb_release", "-d"], capture_output=True, text=True)
607 "/etc/system-release",
608 "/etc/redhat-release",
609 "/etc/lsb-release",
610 "/etc/gentoo-release",
623 with open("/etc/os-release", "r", encoding="utf-8") as f:
648 - Check for missing system packages;
649 - Check for missing Python modules;
650 - Check for missing LaTeX packages needed by PDF generation;
651 - Propose Sphinx install via Python Virtual environment;
652 - Propose Sphinx install via distro-specific package install.
657 # List of required texlive packages on Fedora and OpenSuse
659 "amsfonts.sty": "texlive-amsfonts",
660 "amsmath.sty": "texlive-amsmath",
661 "amssymb.sty": "texlive-amsfonts",
662 "amsthm.sty": "texlive-amscls",
663 "anyfontsize.sty": "texlive-anyfontsize",
664 "atbegshi.sty": "texlive-oberdiek",
665 "bm.sty": "texlive-tools",
666 "capt-of.sty": "texlive-capt-of",
667 "cmap.sty": "texlive-cmap",
668 "ctexhook.sty": "texlive-ctex",
669 "ecrm1000.tfm": "texlive-ec",
670 "eqparbox.sty": "texlive-eqparbox",
671 "eu1enc.def": "texlive-euenc",
672 "fancybox.sty": "texlive-fancybox",
673 "fancyvrb.sty": "texlive-fancyvrb",
674 "float.sty": "texlive-float",
675 "fncychap.sty": "texlive-fncychap",
676 "footnote.sty": "texlive-mdwtools",
677 "framed.sty": "texlive-framed",
678 "luatex85.sty": "texlive-luatex85",
679 "multirow.sty": "texlive-multirow",
680 "needspace.sty": "texlive-needspace",
681 "palatino.sty": "texlive-psnfss",
682 "parskip.sty": "texlive-parskip",
683 "polyglossia.sty": "texlive-polyglossia",
684 "tabulary.sty": "texlive-tabulary",
685 "threeparttable.sty": "texlive-threeparttable",
686 "titlesec.sty": "texlive-titlesec",
687 "ucs.sty": "texlive-ucs",
688 "upquote.sty": "texlive-upquote",
689 "wrapfig.sty": "texlive-wrapfig",
722 The actual distro-specific programs are mapped via progs argument.
746 # Distro-specific hints methods
751 Provide package installation hints for Debian-based distros.
754 "Pod::Usage": "perl-modules",
757 "ensurepip": "python3-venv",
758 "python-sphinx": "python3-sphinx",
759 "rsvg-convert": "librsvg2-bin",
761 "xelatex": "texlive-xetex",
762 "yaml": "python3-yaml",
767 "fonts-dejavu": [
770 "fonts-noto-cjk": [
771 "/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc",
772 "/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc",
773 "/usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc",
775 "tex-gyre": [
776 "/usr/share/texmf/tex/latex/tex-gyre/tgtermes.sty"
778 "texlive-fonts-recommended": [
779 "/usr/share/texlive/texmf-dist/fonts/tfm/adobe/zapfding/pzdr.tfm",
781 "texlive-lang-chinese": [
782 "/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty",
794 "\thttps://askubuntu.com/questions/1158894/imagemagick-still-broken-using-with-usr-bin-convert"
796 return self.get_install_progs(progs, "apt-get install")
800 Provide package installation hints for RedHat-based distros
801 (Fedora, RHEL and RHEL-based variants).
804 "Pod::Usage": "perl-Pod-Usage",
807 "python-sphinx": "python3-sphinx",
808 "rsvg-convert": "librsvg2-tools",
809 "virtualenv": "python3-virtualenv",
810 "xelatex": "texlive-xetex-bin",
811 "yaml": "python3-pyyaml",
815 "dejavu-sans-fonts",
816 "dejavu-sans-mono-fonts",
817 "dejavu-serif-fonts",
818 "texlive-collection-fontsrecommended",
819 "texlive-collection-latex",
820 "texlive-xecjk",
823 fedora = False
826 match = re.search(r"(release|Linux)\s+(\d+)", self.system_release)
831 print("Couldn't identify release number")
834 elif re.search("Fedora", self.system_release):
835 # Fedora 38 and upper use this CJK font
837 noto_sans_redhat = "google-noto-sans-cjk-fonts"
838 fedora = True
842 # at least up to version 9 (and Fedora < 38), that's the CJK font
843 noto_sans_redhat = "google-noto-sans-cjk-ttc-fonts"
845 progs["virtualenv"] = "python-virtualenv"
856 progs["yaml"] = "python39-pyyaml"
860 # There's no python39-sphinx package. Only pip is supported
865 "Note: RHEL-based distros typically require extra repositories.\n" \
867 "\tsudo dnf install -y epel-release\n" \
868 "\tsudo dnf config-manager --set-enabled crb\n" \
871 "\tsudo dnf repoquery --available --info <pkgs>\n" \
872 "\tsudo dnf config-manager --set-enabled '*' # enable all - probably not what you want"
876 "/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
877 "/usr/share/fonts/google-noto-sans-cjk-fonts/NotoSansCJK-Regular.ttc",
886 # There's no texlive-ctex on RHEL 8 repositories. This will
888 if not fedora and rel == 8:
889 self.deps.del_package("texlive-ctex")
895 Provide package installation hints for openSUSE-based distros
899 "Pod::Usage": "perl-Pod-Usage",
902 "python-sphinx": "python3-sphinx",
903 "virtualenv": "python3-virtualenv",
904 "xelatex": "texlive-xetex-bin texlive-dejavu",
905 "yaml": "python3-pyyaml",
909 "texlive-babel-english",
910 "texlive-caption",
911 "texlive-colortbl",
912 "texlive-courier",
913 "texlive-dvips",
914 "texlive-helvetic",
915 "texlive-makeindex",
916 "texlive-metafont",
917 "texlive-metapost",
918 "texlive-palatino",
919 "texlive-preview",
920 "texlive-times",
921 "texlive-zapfchan",
922 "texlive-zapfding",
925 progs["latexmk"] = "texlive-latexmk-bin"
940 "python-sphinx": "python311-Sphinx python311-Sphinx-latex",
941 "virtualenv": "python311-virtualenv",
942 "yaml": "python311-PyYAML",
948 "python-sphinx": "python313-Sphinx python313-Sphinx-latex",
949 "virtualenv": "python313-virtualenv",
950 "yaml": "python313-PyYAML",
963 return self.get_install_progs(progs, "zypper install --no-recommends")
970 "Pod::Usage": "perl-Pod-Usage",
973 "python-sphinx": "python3-sphinx",
974 "rsvg-convert": "librsvg2",
975 "virtualenv": "python3-virtualenv",
977 "yaml": "python3-yaml",
981 "texlive-fontsextra",
982 "texlive-fonts-asian",
983 "fonts-ttf-dejavu",
988 noto_sans = "noto-sans-cjk-fonts"
990 "texlive-collection-basic",
991 "texlive-collection-langcjk",
992 "texlive-collection-fontsextra",
993 "texlive-collection-fontsrecommended"
998 progs["yaml"] = "python-pyyaml"
999 progs["python-virtualenv"] = "python-virtualenv"
1000 progs["python-sphinx"] = "python-sphinx"
1003 self.check_program("python-virtualenv", DepManager.PYTHON_MANDATORY)
1006 # to 4.3, python-virtualenv package is broken: it is missing
1008 # python3 -m venv --without-pip ~/sphinx_latest, but running
1021 noto_sans = "google-noto-sans-cjk-ttc-fonts"
1023 progs["latexmk"] = "texlive-collection-basic"
1027 "/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
1028 "/usr/share/fonts/TTF/NotoSans-Regular.ttf",
1043 "latexmk": "texlive-core",
1044 "rsvg-convert": "extra/librsvg",
1045 "virtualenv": "python-virtualenv",
1046 "xelatex": "texlive-xetex",
1047 "yaml": "python-yaml",
1051 "texlive-basic",
1052 "texlive-binextra",
1053 "texlive-core",
1054 "texlive-fontsrecommended",
1055 "texlive-langchinese",
1056 "texlive-langcjk",
1057 "texlive-latexextra",
1058 "ttf-dejavu",
1065 self.check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"],
1066 "noto-fonts-cjk",
1070 return self.get_install_progs(progs, "pacman -S")
1077 "dev-texlive/texlive-fontsrecommended",
1078 "dev-texlive/texlive-latexextra",
1079 "dev-texlive/texlive-xetex",
1080 "media-fonts/dejavu",
1084 "convert": "media-gfx/imagemagick",
1085 "dot": "media-gfx/graphviz",
1086 "rsvg-convert": "gnome-base/librsvg",
1087 "virtualenv": "dev-python/virtualenv",
1089 "yaml": "dev-python/pyyaml",
1090 "python-sphinx": "dev-python/sphinx",
1095 "media-fonts/dejavu": [
1098 "media-fonts/noto-cjk": [
1099 "/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf",
1100 "/usr/share/fonts/noto-cjk/NotoSerifCJK-Regular.ttc",
1114 # =media-gfx/graphviz-12.2.1-r1 X pdf -python_single_target_python3_13 qt6 svg
1115 # =media-gfx/graphviz-12.2.1-r1 X pdf python_single_target_python3_12 -python_single_target_python3_13 qt6 svg
1116 # =media-gfx/graphviz-12.2.1-r1 X pdf qt6 svg
1117 # =media-gfx/graphviz-12.2.1-r1 X pdf -python_single_target_python3_10 qt6 svg
1118 # =media-gfx/graphviz-12.2.1-r1 X pdf -python_single_target_python3_10 python_single_target_python3_12 -python_single_target_python3_13 qt6 svg
1119 # =media-fonts/noto-cjk-20190416 X
1120 # =app-text/texlive-core-2024-r1 X cjk -xetex
1121 # =app-text/texlive-core-2024-r1 X -xetex
1122 # =app-text/texlive-core-2024-r1 -xetex
1123 # =dev-libs/zziplib-0.13.79-r1 sdl
1130 "graphviz": "media-gfx/graphviz",
1131 "imagemagick": "media-gfx/imagemagick",
1132 "media-libs": "media-libs/harfbuzz icu",
1133 "media-fonts": "media-fonts/noto-cjk",
1134 "texlive": "app-text/texlive-core xetex",
1135 "zziblib": "dev-libs/zziplib sdl",
1158 cmd = ["grep", "-l", "-E", rf"^{name}\b" ] + files
1172 if arg.startswith("-"):
1185 extra_cmds += (f"sudo su -c 'echo \"{portage}\" > {use_base}/{fname}'\n")
1189 "emerge --ask --changed-use --binpkg-respect-use=y",
1194 OS-specific hints logic. Seeks for a hinter. If found, use it to
1195 provide package-manager specific install commands.
1197 Otherwise, outputs install instructions for the meta-packages.
1205 re.compile("Fedora"): self.give_redhat_hints,
1229 # If the OS is detected, use per-OS hint logic
1235 # Fall-back to generic hint code for other distros
1238 progs = {"sphinx-build": "sphinx"}
1262 Give a hint about how to activate an already-existing virtual
1263 environment containing sphinx-build.
1275 activates += glob(f"{cwd}/{p}[0-9]*/bin/activate")
1293 sphinx_cmd = f.replace("activate", "sphinx-build")
1303 "\trm -rf {venv_dir}\n\n")
1321 # Avoid running sphinx-builds from venv if cur_version is good
1326 # Get the highest version from sphinx_*/bin/sphinx-build and the
1362 Recommend installing Sphinx as a distro-specific package.
1377 self.deps.add_package("python-sphinx", DepManager.PYTHON_MANDATORY)
1394 - minimal supported version;
1395 - minimal PDF version;
1396 - recommended version.
1406 "Please upgrade it and re-run.\n")
1417 # sphinx-build is present and its version is >= $min_version
1483 print(f"\tpip install -r {self.requirement_file}")
1490 " Please note that Sphinx currentlys produce false-positive\n" \
1493 "\thttps://github.com/sphinx-doc/sphinx/pull/8313")
1528 virtualenv_cmd = f"{self.python_cmd} -m venv"
1544 self.check_program("rsvg-convert", DepManager.PDF_MANDATORY)
1547 # Do distro-specific checks and output distro-install commands
1563 # Check if sphinx-build is called sphinx-build-3
1565 sphinx_path = self.which("sphinx-build-3")
1567 print(f"\tsudo ln -sf {sphinx_path} /usr/bin/sphinx-build\n")
1592 "--no-virtualenv",
1599 "--no-pdf",
1606 "--version-check",