petsc
The source is a tarball from the official project's own domain (anl.gov), which hosts the legitimate PETSc releases; building from this source is standard practice and not inherently risky despite the non-whitelisted host.
Triggered rules
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 source is a tarball from the official project's own domain (anl.gov), which hosts the legitimate PETSc releases; building from this source is standard practice and not inherently risky despite the non-whitelisted host.
1 higher static finding superseded - not the current verdict (shown for transparency)
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:30
source=(http://web.cels.anl.gov/projects/petsc/download/release-snapshots/${pkgname}-${pkgver}.tar.gz
PKGBUILD
1 offending line(s) highlighted# Maintainer: Martin Diehl <aur@martin-diehl.net>
# Contributor: Andreas Bilke <abilke at cosy dot sbg dot ac dot at>
# Contributor: Myles English <myles at rockhead dot biz>
# Contributor: Lucas H. Gabrielli <heitzmann at gmail dot com>
pkgver=3.25.3
pkgrel=1
pkgname=petsc
pkgdesc="Portable, extensible toolkit for scientific computation"
arch=('i686' 'x86_64')
url="https://petsc.org"
license=('BSD-2-Clause')
options=(staticlibs)
depends=('openmpi' 'lapack' 'bison' 'fftw-openmpi' 'gsl' 'hdf5-openmpi' 'hwloc' 'libjpeg-turbo' 'libyaml'
'pastix' 'scotch' 'suitesparse' 'superlu' 'superlu_dist' 'zfp' 'zlib'
'python-numpy' 'python-mpi4py')
makedepends=('gcc' 'gcc-fortran' 'cmake' 'cython' 'python-setuptools')
provides=('petsc4py')
optdepends=(
'hypre: support for HYPRE'
'kokkos: support Kokkos'
'metis: support for METIS'
'mumps: support for MUMPS'
'parmetis: support for ParMETIS'
'scalapack: support for ScaLAPACK'
'triangle: support for Triangle'
'zoltan: support for zoltan'
)
install=petsc.install
source=(http://web.cels.anl.gov/projects/petsc/download/release-snapshots/${pkgname}-${pkgver}.tar.gz
test_optdepends.sh
setuptools.patch)
sha512sums=('8232e6d2d8c393a2e85d8739f3aaebc655fbf8a6ae68fc0b0cd576697ccd1c6b187b62124af1fe44c9ad6f3aeb31cba656f107f53659b4e7a8b4c01eacef78cc'
'4dc58de1393c2920de6ca08dcab71af0b13d21391d6b46f4a48aab122f087a3f4e4deae7b72b15fde5c7d344bcf12f5b766ff7c0ba4d816b074f94091a00cb97'
'3b89914d70a9788d8a0ecc059283320beabd96c163302f0d3c89405afac9969d282462e1372830025f74509c925c2b9b5a80a81e62a9e48fc7dcb8adbf18fe23')
PETSC_ARCH=linux-c-opt
_install_dir=/opt/petsc/${PETSC_ARCH}
build() {
cd ${pkgname}-${pkgver}
export PETSC_DIR=${PWD}
export PETSC_ARCH=${PETSC_ARCH}
CONFOPTS="--with-shared-libraries=1 \
--with-petsc4py=1 \
--with-mpi-ftn-module=mpi_f08 \
--with-cmake=0 \
--with-debugging=0 \
--with-mpi-dir=/usr \
--with-fftw=1 \
--with-gsl=1 \
--with-hdf5=1 --with-hdf5-fortran-bindings=1 \
--with-hwloc=1 \
--with-libjpeg=1 \
--with-pastix=1 \
--with-ptscotch=1 --with-bison=1 --with-ptscotch-lib=[libesmumps.so,libptscotch.so,libptscotcherr.so,libscotch.so,libscotcherr.so] --with-ptscotch-include=/usr/include/scotch \
--with-suitesparse=1 \
--with-superlu-lib=-lsuperlu --with-superlu-include=/usr/include/superlu \
--with-superlu_dist-lib=-lsuperlu_dist --with-superlu_dist-include=/usr/include/superlu_dist \
--with-yaml=1 \
--with-zfp=1 \
$(sh ${srcdir}/test_optdepends.sh)"
echo './configure' ${CONFOPTS}
echo 'CFLAGS='${CFLAGS}
echo 'CXXFLAGS='${CXXFLAGS}
echo 'FFLAGS='${FFLAGS}
echo 'LDFLAGS='${LDFLAGS}
echo 'MAKEFLAGS='${MAKEFLAGS}
./configure --prefix=${_install_dir} ${CONFOPTS} \
"CFLAGS=$CFLAGS" \
"CXXFLAGS=$CXXFLAGS" \
"FFLAGS=$FFLAGS" \
"LDFLAGS=$LDFLAGS -lstdc++" \
"MAKEFLAGS=$MAKEFLAGS"
make all
}
package() {
cd ${pkgname}-${pkgver}
export PETSC_DIR=${PWD}
export PETSC_ARCH=${PETSC_ARCH}
make DESTDIR=${pkgdir} install
install -Dm 644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
mkdir -p ${pkgdir}/etc/profile.d
echo export PETSC_DIR=${_install_dir} > ${pkgdir}/etc/profile.d/petsc.sh
echo export PYTHONPATH=${_install_dir}/lib:'${PYTHONPATH}' >> ${pkgdir}/etc/profile.d/petsc.sh
chmod 644 ${pkgdir}/etc/profile.d/petsc.sh
# show where the shared libraries are
install -dm 755 ${pkgdir}/etc/ld.so.conf.d/
echo ${_install_dir}/lib > ${pkgdir}/etc/ld.so.conf.d/petsc.conf
# install pkgconfig settings
install -Dm 644 ${PETSC_ARCH}/lib/pkgconfig/PETSc.pc ${pkgdir}/usr/share/pkgconfig/PETSc.pc
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-17 00:27:14 | Low | 2 |
| 2026-09-16 00:03:17 | Low | 2 |
| 2026-09-15 00:25:31 | Low | 2 |
| 2026-09-14 00:27:57 | Low | 2 |
| 2026-09-13 00:19:54 | Low | 2 |
| 2026-09-12 00:25:17 | Low | 2 |
| 2026-09-11 00:19:22 | Low | 2 |
| 2026-09-10 00:22:44 | Low | 2 |
| 2026-09-09 00:04:09 | Low | 2 |
| 2026-09-08 00:18:08 | Low | 2 |
| 2026-09-07 00:30:15 | Low | 2 |
| 2026-09-06 00:17:06 | Low | 2 |
| 2026-09-05 00:16:27 | Low | 2 |
| 2026-09-04 00:03:13 | Low | 2 |
| 2026-09-03 00:15:47 | Low | 2 |
| 2026-09-02 00:02:31 | Low | 2 |
| 2026-09-01 00:11:19 | Low | 2 |
| 2026-08-31 00:19:57 | Low | 2 |
| 2026-08-30 00:04:14 | Low | 2 |
| 2026-08-29 00:29:17 | Low | 2 |