ansible-docs-git

maintainer dmrz · 1 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The package builds Ansible documentation using a Python venv and pip to install required dependencies from a pinned requirements.txt; this is a normal and safe practice for building documentation, even though the dependencies are not provided by Arch/AUR.

Triggered rules

LOW AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package builds Ansible documentation using a Python venv and pip to install required dependencies from a pinned requirements.txt; this is a normal and safe practice for building documentation, even though the dependencies are not provided by Arch/AUR.

1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM pip install of an external package pip_install_external

`pip install <package>` fetches an unpinned package from PyPI at build time, outside source=() and makepkg's checksums.

  • PKGBUILD:119 pip install wheel

PKGBUILD

1 offending line(s) highlighted
1# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
2# Contributor: moormaster < user on aur.archlinux.org >
3# Contributor: juliosueiras <juliosueiras [at] gmail [dot] com>
4# Contributor: dmrz < user on aur.archlinux.org >
5
6_reponame='ansible'
7pkgname="${_reponame}-docs-git"
8pkgdesc='HTML documentation of Ansible'
9pkgver=2.11.0b4.r1446.g95df5cb740c
10pkgrel=1
11epoch=1
12arch=('any')
13url="https://github.com/${_reponame}/${_reponame}"
14license=('GPL3')
15
16makedepends=(
17 'git'
18 'python'
19)
20
21# # Not using repo or AUR packages because the needed versions can change rapidly
22# # or be too new or too old compared to the versions provided there.
23# makedepends+=(
24# 'python-aiofiles'
25# 'python-aiohttp'
26# 'python-aiosignal'
27# 'python-async-timeout'
28# 'python-attrs'
29# 'python-babel'
30# 'python-certifi'
31# 'python-charset-normalizer'
32# 'python-click'
33# 'python-frozenlist'
34# 'python-imagesize'
35# 'python-markupsafe'
36# 'python-multidict'
37# 'python-packaging'
38# 'python-pydantic'
39# 'python-pygments'
40# 'python-pyparsing'
41# 'python-pytz'
42# 'python-requests'
43# 'python-semantic-version'
44# 'python-sh'
45# 'python-snowballstemmer'
46# 'python-sphinx'
47# 'python-sphinx_rtd_theme'
48# 'python-sphinxcontrib-applehelp'
49# 'python-sphinxcontrib-devhelp'
50# 'python-sphinxcontrib-htmlhelp'
51# 'python-sphinxcontrib-jsmath'
52# 'python-sphinxcontrib-qthelp'
53# 'python-sphinxcontrib-serializinghtml'
54# 'python-straight.plugin'
55# 'python-typing_extensions'
56# 'python-urllib3'
57# 'python-wheel'
58# 'python-yaml'
59# 'python-yarl'
60# )
61# # makedepends+=('rstcheck') # Repo version too new, also buggy (lacks mandatory depends 'types-docutils')
62#
63# # The following "hidden" makedepends are not in Arch repos as of this commit,
64# # so I'm adding them here as a reference.
65# _makedepends_nonrepo=(
66# 'python-alabaster'
67# 'python-ansible-pygments'
68# 'python-antsibull-core'
69# 'python-antsibull-docs'
70# 'python-asyncio-pool'
71# 'python-jinja2'
72# 'python-perky'
73# 'python-sphinx-ansible-theme'
74# 'python-sphinx-notfound-page'
75# 'python-sphinx-intl'
76# 'python-twiggy'
77# )
78# # Exposing the missing or AUR-only makedepends as optdepends. If they are present at
79# # build-time, they will be used instead of letting pip download them from PyPI.
80# optdepends=(
81# "${_makedepends_nonrepo[@]/%/: use this installed package during (the next) build}"
82# )
83
84provides=("${pkgname%-git}=${pkgver}")
85options=('!strip')
86source=("git+${url}.git")
87b2sums=('SKIP')
88_py_venv_dir=("venv-${pkgname%-git}")
89
90pkgver() {
91 cd "${_reponame}"
92
93 # Generate git tag based version. Count only proper (v)#.#* [#=number] tags.
94 local _gitversion=$(git describe --long --tags --match '[v0-9][0-9.][0-9.]*' | sed -e 's|^v||' | tr '[:upper:]' '[:lower:]')
95
96 # Format git-based version for pkgver
97 # Expected format: e.g. 2.11.0b4.r1444.g3fa377387e0
98 echo "${_gitversion}" | sed \
99 -e 's|^\([0-9][0-9.]*\)-\([a-zA-Z]\+\)|\1\2|' \
100 -e 's|\([0-9]\+-g\)|r\1|' \
101 -e 's|-|.|g'
102}
103
104prepare() {
105 cd "${_reponame}"
106
107 echo "Setting up Python venv dir: ${srcdir}/${_py_venv_dir}"
108 echo '# We need this because Arch and AUR are missing a lot of needed makedepends.'
109 # Disabled venv option: --system-site-packages, because Arch/AUR packages likely mismatch
110 # too much compared to the versions needed by build's actual requirements.
111 python -m 'venv' \
112 --upgrade-deps \
113 "${srcdir}/${_py_venv_dir}"
114
115 echo "Activating Python venv in dir: ${srcdir}/${_py_venv_dir}"
116 source "${srcdir}/${_py_venv_dir}/bin/activate"
117
118 echo "Installing Python modules missing from root to venv dir \"${_py_venv_dir}\"..."
119 pip install wheel # this needs to be installed first
120 pip install \
121 --compile \
122 --require-virtualenv \
123 --upgrade \
124 --upgrade-strategy eager \
125 --requirement 'docs/docsite/requirements.txt' \
126 'types-docutils' # seems it is not declared but needed
127
128 echo "Deactivating Python venv in dir: ${srcdir}/${_py_venv_dir}"
129 deactivate
130}
131
132build() {
133 cd "${_reponame}"
134
135 echo "Activating Python venv in dir: ${srcdir}/${_py_venv_dir}"
136 source "${srcdir}/${_py_venv_dir}/bin/activate"
137
138 local templates="${srcdir}/tmp"
139 echo "Creating template stubs in ${templates}"
140 mkdir -p ${templates}
141 touch "${templates}/version_chooser.html"
142
143 echo "Building ${pkgname%-git} from source..."
144 local cleanup_flags="\
145 -D templates_path=${templates}\
146 -D html_context.version=${pkgver}\
147 -D html_theme_options.display_version=1\
148 -D html_theme_options.show_rtd_ethical_ads=0\
149 -D html_theme_options.hubspot_id=''\
150 -D html_theme_options.topbar_links=0\
151 -D html_theme_options.satellite_tracking=0\
152 -D html_theme_options.swift_id=''\
153 -D html_theme_options.tag_manager_id=''\
154 "
155 make -C 'docs/docsite' 'all' O="${cleanup_flags}" CPUS=1
156
157 echo "Deactivating Python venv in dir: ${srcdir}/${_py_venv_dir}"
158 deactivate
159}
160
161package() {
162 install -dm 755 "${pkgdir}/usr/share/doc/${pkgname}/html"
163 cp --recursive --dereference --target-directory="${pkgdir}/usr/share/doc/${pkgname}" "${srcdir}/${_reponame}/docs/docsite/_build/html"
164}
165

Scan history

Scanned at (UTC)SeverityRules
2026-08-03 00:08:14 LOW 2
2026-08-02 00:16:08 LOW 2
2026-08-01 00:11:18 LOW 2
2026-07-31 00:14:10 LOW 2
2026-07-30 00:17:23 LOW 2
2026-07-29 00:25:53 LOW 2
2026-07-28 00:07:28 LOW 2
2026-07-27 00:24:32 LOW 2
2026-07-26 00:07:32 LOW 2
2026-07-25 00:13:44 LOW 2
2026-07-24 00:02:28 LOW 2
2026-07-23 00:14:47 LOW 2
2026-07-22 00:29:32 LOW 2
2026-07-21 00:24:15 LOW 2
2026-07-20 00:19:49 LOW 2
2026-07-19 00:17:08 LOW 2
2026-07-18 00:14:48 LOW 2
2026-07-17 00:06:16 LOW 2
2026-07-16 00:05:41 LOW 2
2026-07-15 00:09:25 LOW 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion