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>
49 - System: dependencies required for docs build;
50 - Python: python dependencies for a native distro Sphinx install;
51 - PDF: dependencies needed by PDF builds.
82 - missing: missing dependencies list, containing a distro-independent
84 - missing_pkg: ancillary dict containing missing dependencies in
86 - need: total number of needed dependencies. Never cleaned.
87 - optional: total number of optional dependencies. Never cleaned.
88 - pdf: Is PDF support enabled?
163 agnostic package name to distro-specific one.
179 self.optional -= 1
319 tools/docs/documentation-file-ref-check
325 # distros (Oracle) didn't have perl - nor even an option to install
326 # before installing oraclelinux-release-el9 package.
337 self.run(["perl", f"-M{prog}", "-e", "1"], check=True)
352 self.run([self.python_cmd, "-c", f"import {module}"], check=True)
362 self.run(["rpm", "-q", prog], check=True)
372 self.run(["pacman", "-Q", prog], check=True)
409 Gets the binary filename for sphinx-build.
414 fname = "sphinx-build"
418 fname = "sphinx-build-3"
427 Gets sphinx-build version.
431 # The sphinx-build tool has a bug: internally, it tries to set
441 result = self.run([cmd, "--version"], env=env,
449 match = re.match(r"^sphinx-build\s+([\d\.]+)(?:\+(?:/[\da-f]+)|b\d+)?\s*$", line)
462 with open(conf, "r", encoding="utf-8") as f:
503 with open(filename, "r", encoding="utf-8") as f:
517 Several modern distros now have /etc/os-release, which usually have
524 result = self.run(["lsb_release", "-d"], capture_output=True, text=True)
528 "/etc/system-release",
529 "/etc/redhat-release",
530 "/etc/lsb-release",
531 "/etc/gentoo-release",
544 with open("/etc/os-release", "r", encoding="utf-8") as f:
569 - Check for missing system packages;
570 - Check for missing Python modules;
571 - Check for missing LaTeX packages needed by PDF generation;
572 - Propose Sphinx install via Python Virtual environment;
573 - Propose Sphinx install via distro-specific package install.
578 # List of required texlive packages on Fedora and OpenSuse
580 "amsfonts.sty": "texlive-amsfonts",
581 "amsmath.sty": "texlive-amsmath",
582 "amssymb.sty": "texlive-amsfonts",
583 "amsthm.sty": "texlive-amscls",
584 "anyfontsize.sty": "texlive-anyfontsize",
585 "atbegshi.sty": "texlive-oberdiek",
586 "bm.sty": "texlive-tools",
587 "capt-of.sty": "texlive-capt-of",
588 "cmap.sty": "texlive-cmap",
589 "ctexhook.sty": "texlive-ctex",
590 "ecrm1000.tfm": "texlive-ec",
591 "eqparbox.sty": "texlive-eqparbox",
592 "eu1enc.def": "texlive-euenc",
593 "fancybox.sty": "texlive-fancybox",
594 "fancyvrb.sty": "texlive-fancyvrb",
595 "float.sty": "texlive-float",
596 "fncychap.sty": "texlive-fncychap",
597 "footnote.sty": "texlive-mdwtools",
598 "framed.sty": "texlive-framed",
599 "luatex85.sty": "texlive-luatex85",
600 "multirow.sty": "texlive-multirow",
601 "needspace.sty": "texlive-needspace",
602 "palatino.sty": "texlive-psnfss",
603 "parskip.sty": "texlive-parskip",
604 "polyglossia.sty": "texlive-polyglossia",
605 "tabulary.sty": "texlive-tabulary",
606 "threeparttable.sty": "texlive-threeparttable",
607 "titlesec.sty": "texlive-titlesec",
608 "ucs.sty": "texlive-ucs",
609 "upquote.sty": "texlive-upquote",
610 "wrapfig.sty": "texlive-wrapfig",
643 The actual distro-specific programs are mapped via progs argument.
667 # Distro-specific hints methods
672 Provide package installation hints for Debian-based distros.
675 "Pod::Usage": "perl-modules",
678 "ensurepip": "python3-venv",
679 "python-sphinx": "python3-sphinx",
680 "rsvg-convert": "librsvg2-bin",
682 "xelatex": "texlive-xetex",
683 "yaml": "python3-yaml",
688 "fonts-dejavu": [
691 "fonts-noto-cjk": [
692 "/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc",
693 "/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc",
694 "/usr/share/fonts/opentype/noto/NotoSerifCJK-Regular.ttc",
696 "tex-gyre": [
697 "/usr/share/texmf/tex/latex/tex-gyre/tgtermes.sty"
699 "texlive-fonts-recommended": [
700 "/usr/share/texlive/texmf-dist/fonts/tfm/adobe/zapfding/pzdr.tfm",
702 "texlive-lang-chinese": [
703 "/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty",
715 … "\thttps://askubuntu.com/questions/1158894/imagemagick-still-broken-using-with-usr-bin-convert"
717 return self.get_install_progs(progs, "apt-get install")
721 Provide package installation hints for RedHat-based distros
722 (Fedora, RHEL and RHEL-based variants).
725 "Pod::Usage": "perl-Pod-Usage",
728 "python-sphinx": "python3-sphinx",
729 "rsvg-convert": "librsvg2-tools",
730 "virtualenv": "python3-virtualenv",
731 "xelatex": "texlive-xetex-bin",
732 "yaml": "python3-pyyaml",
736 "dejavu-sans-fonts",
737 "dejavu-sans-mono-fonts",
738 "dejavu-serif-fonts",
739 "texlive-collection-fontsrecommended",
740 "texlive-collection-latex",
741 "texlive-xecjk",
744 fedora = False
747 match = re.search(r"(release|Linux)\s+(\d+)", self.system_release)
752 print("Couldn't identify release number")
755 elif re.search("Fedora", self.system_release):
756 # Fedora 38 and upper use this CJK font
758 noto_sans_redhat = "google-noto-sans-cjk-fonts"
759 fedora = True
763 # at least up to version 9 (and Fedora < 38), that's the CJK font
764 noto_sans_redhat = "google-noto-sans-cjk-ttc-fonts"
766 progs["virtualenv"] = "python-virtualenv"
777 progs["yaml"] = "python39-pyyaml"
781 # There's no python39-sphinx package. Only pip is supported
786 "Note: RHEL-based distros typically require extra repositories.\n" \
788 "\tsudo dnf install -y epel-release\n" \
789 "\tsudo dnf config-manager --set-enabled crb\n" \
792 "\tsudo dnf repoquery --available --info <pkgs>\n" \
793 … "\tsudo dnf config-manager --set-enabled '*' # enable all - probably not what you want"
797 "/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
798 "/usr/share/fonts/google-noto-sans-cjk-fonts/NotoSansCJK-Regular.ttc",
807 # There's no texlive-ctex on RHEL 8 repositories. This will
809 if not fedora and rel == 8:
810 self.deps.del_package("texlive-ctex")
816 Provide package installation hints for openSUSE-based distros
820 "Pod::Usage": "perl-Pod-Usage",
823 "python-sphinx": "python3-sphinx",
824 "virtualenv": "python3-virtualenv",
825 "xelatex": "texlive-xetex-bin texlive-dejavu",
826 "yaml": "python3-pyyaml",
830 "texlive-babel-english",
831 "texlive-caption",
832 "texlive-colortbl",
833 "texlive-courier",
834 "texlive-dvips",
835 "texlive-helvetic",
836 "texlive-makeindex",
837 "texlive-metafont",
838 "texlive-metapost",
839 "texlive-palatino",
840 "texlive-preview",
841 "texlive-times",
842 "texlive-zapfchan",
843 "texlive-zapfding",
846 progs["latexmk"] = "texlive-latexmk-bin"
861 "python-sphinx": "python311-Sphinx python311-Sphinx-latex",
862 "virtualenv": "python311-virtualenv",
863 "yaml": "python311-PyYAML",
869 "python-sphinx": "python313-Sphinx python313-Sphinx-latex",
870 "virtualenv": "python313-virtualenv",
871 "yaml": "python313-PyYAML",
884 return self.get_install_progs(progs, "zypper install --no-recommends")
891 "Pod::Usage": "perl-Pod-Usage",
894 "python-sphinx": "python3-sphinx",
895 "rsvg-convert": "librsvg2",
896 "virtualenv": "python3-virtualenv",
898 "yaml": "python3-yaml",
902 "texlive-fontsextra",
903 "texlive-fonts-asian",
904 "fonts-ttf-dejavu",
909 noto_sans = "noto-sans-cjk-fonts"
911 "texlive-collection-basic",
912 "texlive-collection-langcjk",
913 "texlive-collection-fontsextra",
914 "texlive-collection-fontsrecommended"
919 progs["yaml"] = "python-pyyaml"
920 progs["python-virtualenv"] = "python-virtualenv"
921 progs["python-sphinx"] = "python-sphinx"
924 self.check_program("python-virtualenv", DepManager.PYTHON_MANDATORY)
927 # to 4.3, python-virtualenv package is broken: it is missing
929 # python3 -m venv --without-pip ~/sphinx_latest, but running
942 noto_sans = "google-noto-sans-cjk-ttc-fonts"
944 progs["latexmk"] = "texlive-collection-basic"
948 "/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
949 "/usr/share/fonts/TTF/NotoSans-Regular.ttf",
964 "latexmk": "texlive-core",
965 "rsvg-convert": "extra/librsvg",
966 "virtualenv": "python-virtualenv",
967 "xelatex": "texlive-xetex",
968 "yaml": "python-yaml",
972 "texlive-basic",
973 "texlive-binextra",
974 "texlive-core",
975 "texlive-fontsrecommended",
976 "texlive-langchinese",
977 "texlive-langcjk",
978 "texlive-latexextra",
979 "ttf-dejavu",
986 self.check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"],
987 "noto-fonts-cjk",
991 return self.get_install_progs(progs, "pacman -S")
998 "dev-texlive/texlive-fontsrecommended",
999 "dev-texlive/texlive-latexextra",
1000 "dev-texlive/texlive-xetex",
1001 "media-fonts/dejavu",
1005 "convert": "media-gfx/imagemagick",
1006 "dot": "media-gfx/graphviz",
1007 "rsvg-convert": "gnome-base/librsvg",
1008 "virtualenv": "dev-python/virtualenv",
1010 "yaml": "dev-python/pyyaml",
1011 "python-sphinx": "dev-python/sphinx",
1016 "media-fonts/dejavu": [
1019 "media-fonts/noto-cjk": [
1020 "/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf",
1021 "/usr/share/fonts/noto-cjk/NotoSerifCJK-Regular.ttc",
1035 # =media-gfx/graphviz-12.2.1-r1 X pdf -python_single_target_python3_13 qt6 svg
1036 …# =media-gfx/graphviz-12.2.1-r1 X pdf python_single_target_python3_12 -python_single_target_pyt…
1037 # =media-gfx/graphviz-12.2.1-r1 X pdf qt6 svg
1038 # =media-gfx/graphviz-12.2.1-r1 X pdf -python_single_target_python3_10 qt6 svg
1039 …# =media-gfx/graphviz-12.2.1-r1 X pdf -python_single_target_python3_10 python_single_target_pyt…
1040 # =media-fonts/noto-cjk-20190416 X
1041 # =app-text/texlive-core-2024-r1 X cjk -xetex
1042 # =app-text/texlive-core-2024-r1 X -xetex
1043 # =app-text/texlive-core-2024-r1 -xetex
1044 # =dev-libs/zziplib-0.13.79-r1 sdl
1051 "graphviz": "media-gfx/graphviz",
1052 "imagemagick": "media-gfx/imagemagick",
1053 "media-libs": "media-libs/harfbuzz icu",
1054 "media-fonts": "media-fonts/noto-cjk",
1055 "texlive": "app-text/texlive-core xetex",
1056 "zziblib": "dev-libs/zziplib sdl",
1079 cmd = ["grep", "-l", "-E", rf"^{name}\b" ] + files
1093 if arg.startswith("-"):
1106 extra_cmds += (f"sudo su -c 'echo \"{portage}\" > {use_base}/{fname}'\n")
1110 "emerge --ask --changed-use --binpkg-respect-use=y",
1115 OS-specific hints logic. Seeks for a hinter. If found, use it to
1116 provide package-manager specific install commands.
1118 Otherwise, outputs install instructions for the meta-packages.
1126 re.compile("Fedora"): self.give_redhat_hints,
1150 # If the OS is detected, use per-OS hint logic
1156 # Fall-back to generic hint code for other distros
1159 progs = {"sphinx-build": "sphinx"}
1183 Give a hint about how to activate an already-existing virtual
1184 environment containing sphinx-build.
1196 activates += glob(f"{cwd}/{p}[0-9]*/bin/activate")
1214 sphinx_cmd = f.replace("activate", "sphinx-build")
1224 "\trm -rf {venv_dir}\n\n")
1242 # Avoid running sphinx-builds from venv if cur_version is good
1247 # Get the highest version from sphinx_*/bin/sphinx-build and the
1283 Recommend installing Sphinx as a distro-specific package.
1298 self.deps.add_package("python-sphinx", DepManager.PYTHON_MANDATORY)
1315 - minimal supported version;
1316 - minimal PDF version;
1317 - recommended version.
1327 "Please upgrade it and re-run.\n")
1338 # sphinx-build is present and its version is >= $min_version
1404 print(f"\tpip install -r {self.requirement_file}")
1411 " Please note that Sphinx currentlys produce false-positive\n" \
1414 "\thttps://github.com/sphinx-doc/sphinx/pull/8313")
1449 virtualenv_cmd = f"{self.python_cmd} -m venv"
1465 self.check_program("rsvg-convert", DepManager.PDF_MANDATORY)
1468 # Do distro-specific checks and output distro-install commands
1484 # Check if sphinx-build is called sphinx-build-3
1486 sphinx_path = self.which("sphinx-build-3")
1488 print(f"\tsudo ln -sf {sphinx_path} /usr/bin/sphinx-build\n")
1513 "--no-virtualenv",
1520 "--no-pdf",
1527 "--version-check",