ns3
The source URL is from the project's official domain (nsnam.org), which is a legitimate and expected host for the ns-3 simulator; downloading the source tarball from there is standard practice and not inherently risky.
Triggered rules
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The source URL is from the project's official domain (nsnam.org), which is a legitimate and expected host for the ns-3 simulator; downloading the source tarball from there is standard practice and not inherently risky.
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:63
"https://www.nsnam.org/releases/ns-${pkgver}.tar.bz2"
PKGBUILD
1 offending line(s) highlighted# Maintainer: SpacingBat3 <spacingbat3+aur@gmail.com>
# Contributor: Kuan-Yen Chou <kychou2 at illinois dot edu>
# Contributor: Yunhui Fu <yhfudev@gmail.com>
# === PACKAGE METADATA ===
pkgbase=ns3
pkgname=(
# Fully functional components
ns3
ns3-examples{,-src} # FIXME: distribute this??? Any cons?
# python-ns3 #FIXME: There's a lot of effort to be done to have Python bindings working.
# ns3-docs #FIXME: Doxygen output is damn large!
# ---
# You may optionally enable the WIP components at build time,
# PKGBUILD will handle the rest:
$_NS3_ENABLE_WIP
#^e.g. _NS3_ENABLE_WIP="ns3-docs" makepkg ...
)
pkgver=3.49
pkgrel=1
pkgdesc='Discrete-event network simulator for Internet systems'
arch=('x86_64')
url='https://www.nsnam.org/'
license=('GPL-2.0-only')
# Those are also needed on compile time,
# `makepkg -s` needs this at toplevel else
# only AUR helpers might work.
depends=(
### Optional (most likely needed after/during compiling, allow more features)
# 1. Database support
sqlite3
# 2. GNU Scientific Library
gsl
# 3. XML config store
libxml2
# 4. GTK configuration store
gtk3
# 5. Openflow
openflow boost-libs
# 6. Brite
brite
# 7. Click
click-ns3
# 8. DPDK
dpdk
# 9. Netmap emulation FdNetDevice
# netmap # NEEDS AUR PACKAGE FIX FOR CUSTOM KERNELS!
)
makedepends=(
### Required, according to docs
python gcc cmake ninja git
### Additional components
# Openflow (devel) [FIXME!]
boost
# Eigen (vector math lib, header-only)
'eigen>=5' 'eigen<6'
# Sphinx documentation
# TODO!
)
conflicts=()
source=(
"https://www.nsnam.org/releases/ns-${pkgver}.tar.bz2"
0001-fix-newer-dpdk-versions.patch
0002-disable-python-tests.patch
)
sha256sums=('81c9eb0839d2b527e9cc01db7eb0a521d8fc6a520ebb23d17f3a5c96e47b4d68'
'9f519502828ffb403948d2601eb36e807e92d21793e985f63c90150de62626e5'
'24d9c5dad607c2334669374ab5242e11bef85bc0f90bd17868601c7f23c9f2be')
sha512sums=('d18a44d0acc570ff1d3ef99632ff5493d2b204eb9e0c3ba20059cdea772ac36f0808c00a95e04327541f374902297de14acd5bb7cddabaf42348f3348485c7c6'
'91d0f73f65053384c23f3c59d38bd8a988ba5ada97b62919b50e74daccb89cbc32bb32b7b1f84bb5426158325353fac306a5edcdce0690359fdaa82b0421679a'
'74158c80b159d1587d51dddffcc6f24689985d4afe5574e3edb7691e5bb892bb160a3b717ce2352293c92c0359c799a4e4da4e0bba6c227ffa9bc534a2199a2c')
b2sums=('99b2491b97a683fa4fe3033d25c566888af3d8d5416ee3c00d25c54cb3df554a15e424fd5964b0200481d8e6f12209702d2ffb016aa024f5a845cf8afacdf6b4'
'83fbc3bb43094ee08bee4741c8d343de8a3b84a1b3f151d311586b3d3adf3b35142ca6295c7d15901514cafc891a51432e1a5188bef6491465984f587d531edc'
'd8a7efeff13bbf1884502ae5e469f47be3c72a7f22a13e70c381aa02ccc94d4f41961ede107bba87a68b9144ba5f20818a40d6a20908344fad818c296a034fd3')
# Installation prefix
# leaving there for possible /opt
# packaging on-demand if needed.
#
# This might get useful if isolation
# will be mandatory, eg. to avoid conflicts
# with Arch packages / software.
_pkgprefix="/usr"
# === DYNAMIC METADATA ===
# Package enablements
# This is so it is possible to control components
# to be built via pkgname() array.
_has_docs=false
_has_python=false
for _searchpkg in "${pkgname[@]}"; do
if [ "$_searchpkg" == "ns3-docs" ]; then
_has_docs=true
fi;
if [ "$_searchpkg" == "python-ns3" ]; then
_has_python=true
fi;
if $_has_python && $_has_docs; then break; fi
done;
# Additional dependencies on alternative configurations
if $_has_python; then
# Bindings requirements
makedepends+=(python-cppyy)
else
# Enable MPI feature as it does
# conflict with Python bindings
depends+=(libmpi.so)
fi
# === PACKAGE HELPERS ===
_pver() {
python --version | awk '{print $2}' | sed 's/.[^.]*$//'
}
_pver_next() {
_pver | sed "s/\.[^.]*$/\.$(($(python --version | awk '{print $2}' | sed 's/^[^.]*\.\([^.]*\)\.[^.]*$/\1/')+1))/"
}
# This is taken from mesa package
_pick() {
local p="$1" f d; shift
for f; do
d="$srcdir/$p/${f#$pkgdir/}"
mkdir -p "$(dirname "$d")"
mv -v "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
# === PACKAGING FLOW DEFINITION ===
prepare() {
cd "${srcdir}/ns-${pkgver}"
for patch in "${source[@]}"; do if [ "${patch##*.}" == "patch" ]; then
patch -Np1 -i "$srcdir/$patch"
fi; done
}
build() {
cd "${srcdir}/ns-${pkgver}"
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
local ns3_options=(
### GENERAL ###
--build-profile=default
--enable-build-version
#--enable-monolib
# ^FIXME: I need to check why it didn't
# install or if it causes problems.
### INTEGRATIONS ###
--enable-dpdk
--enable-eigen
--enable-gsl
--enable-gtk
--enable-logs
### ADDITIONAL COMPONENTS ###
--enable-examples
--enable-tests
# Prefix for packaged software
--prefix="$_pkgprefix"
### COMPONENT DIRS ###
--with-click="$_pkgprefix"
--with-openflow="$_pkgprefix"
)
local cmake_options=(
### ADDITIONAL PATH DEFINITIONS ###
# libexec is lib/[package] per guidelines
-DCMAKE_INSTALL_LIBEXECDIR="lib/$pkgname/"
### INTEGRATIONS INTO ARCHLINUX ###
# Allows for linker overrides (via /etc/makepkg.conf)
# Otherwise (=ON), this enforces MOLD when installed.
-DNS3_FAST_LINKERS=OFF
)
# OPTION 1: Python bindings build (FIXME!)
if $_has_python; then
ns3_options+=(--enable-python-bindings --disable-mpi)
cmake_options+=(-DNS3_BINDINGS_INSTALL_DIR="$site_packages")
# OPTION 2: MPI build
else
ns3_options+=(--enable-mpi)
fi
./ns3 configure "${ns3_options[@]}" -- "${cmake_options[@]}"
./ns3 build
# Generate docs (if enabled)
if $_has_docs; then
./ns3 docs doxygen-no-build
break
fi
}
check() {
cd "${srcdir}/ns-${pkgver}"
# FIXME: Working Python tests (depends on working bindings)
#env \
# PYTHONPATH="$PYTHONPATH${$PYTHONPATH:+:}${srcdir}/ns-${pkgver}/build/bindings/python" \
./test.py \
--verbose-failed \
--no-build \
--duration \
--multiple
}
package_ns3() {
optdepends=(
# PCAP readers
{tcpdump,wireshark-{cli,qt}}': PCAP file reader'
# Virtual machines
{lxc,iproute2,iptables}': virtual machines in network'
# Recommend Python bindings
'python-ns3: Python bindings (broken)'
# Recommend Network animator
'netanim: Animator for XML simulation data'
)
cd "${srcdir}/ns-${pkgver}"
DESTDIR="$pkgdir" ./ns3 install
cd "$pkgdir"
# Python bindings
if $_has_python; then
_pick python usr/lib/python$(_pver)
fi
}
# === ADDITIONAL COMPONENTS ===
package_ns3-examples() {
pkgdesc+=" (prebuilt example applications)"
depends=("ns3=$pkgver")
optdepends=('ns3-examples-src: See source code for examples')
cd "${srcdir}/ns-${pkgver}/build"
install -dm755 "$pkgdir"/usr/lib/ns3
mv -Tv examples "$pkgdir"/usr/lib/ns3/examples
}
package_ns3-examples-src() {
pkgdesc+=" (prebuilt example sources)"
depends=()
optdepends=('ns3-examples: Run prebuilt examples')
cd "${srcdir}/ns-${pkgver}"
install -dm755 "$pkgdir"/usr/src/ns3
mv -Tv examples "$pkgdir"/usr/src/ns3/examples
}
# [FIXME]: srcdir references in navbar
package_ns3-docs() {
pkgdesc+=" (Doxygen documentation)"
depends=("ns3=$pkgver")
makedepends=(doxygen graphviz imagemagick dia)
cd "${srcdir}/ns-${pkgver}"
install -dm755 "$pkgdir/usr/share/doc/$pkgbase"
# HTML Doxygen docs
mv -Tv doc/html "$pkgdir/usr/share/doc/$pkgbase/html"
# FIXME: optimize docs so they don't take like 1GB of disk space
}
package_python-ns3() {
pkgdesc+=" (Python bindings)"
depends=("ns3=$pkgver" python-cppyy)
# PyViz visualizer
depends+=(python-cairo python-pygraphviz ipython)
# Note: `root` package is not enough to satisfy deps
# (libcppyy is missing)
conflicts=(root)
# Try to lock to python version due to bindings
[ -n "$pkgdir" ] && depends+=("python>=$(_pver).0" "python<$(_pver_next).0")
mv python/* "$pkgdir"
}
# vim: set ts=4 sw=4 et :
Changes since previous scan
--- PKGBUILD @ 2026-07-14 00:09+++ PKGBUILD @ 2026-10-17 00:21@@ -17,7 +17,7 @@ $_NS3_ENABLE_WIP #^e.g. _NS3_ENABLE_WIP="ns3-docs" makepkg ... )-pkgver=3.48+pkgver=3.49 pkgrel=1 pkgdesc='Discrete-event network simulator for Internet systems' arch=('x86_64')@@ -53,8 +53,8 @@ ### Additional components # Openflow (devel) [FIXME!] boost- # Eigen3 (vector math lib, header-only)- eigen3+ # Eigen (vector math lib, header-only)+ 'eigen>=5' 'eigen<6' # Sphinx documentation # TODO! )@@ -65,13 +65,13 @@ 0002-disable-python-tests.patch ) -sha256sums=('5700ceecef2c9bc862502914b2237fe798d4c7ae07652247050e300e49407c4d'+sha256sums=('81c9eb0839d2b527e9cc01db7eb0a521d8fc6a520ebb23d17f3a5c96e47b4d68' '9f519502828ffb403948d2601eb36e807e92d21793e985f63c90150de62626e5' '24d9c5dad607c2334669374ab5242e11bef85bc0f90bd17868601c7f23c9f2be')-sha512sums=('42c697671e7ff4bca3d809e6b12b1c14b8ab71611068bba5a91e00d45240e6b0d9fc48b96d17fe93fa4e3d047f9dbcadc9cfca545c547fd18eba9e27ac6adcc0'+sha512sums=('d18a44d0acc570ff1d3ef99632ff5493d2b204eb9e0c3ba20059cdea772ac36f0808c00a95e04327541f374902297de14acd5bb7cddabaf42348f3348485c7c6' '91d0f73f65053384c23f3c59d38bd8a988ba5ada97b62919b50e74daccb89cbc32bb32b7b1f84bb5426158325353fac306a5edcdce0690359fdaa82b0421679a' '74158c80b159d1587d51dddffcc6f24689985d4afe5574e3edb7691e5bb892bb160a3b717ce2352293c92c0359c799a4e4da4e0bba6c227ffa9bc534a2199a2c')-b2sums=('5bcce8090e09782c56351ee7b6a67014be774f1db43bfb08f642e3c8fdb0568d8c42ced6eae16d294cec842b9123113c029c3570d21ab7e75de05dc8879f74d2'+b2sums=('99b2491b97a683fa4fe3033d25c566888af3d8d5416ee3c00d25c54cb3df554a15e424fd5964b0200481d8e6f12209702d2ffb016aa024f5a845cf8afacdf6b4' '83fbc3bb43094ee08bee4741c8d343de8a3b84a1b3f151d311586b3d3adf3b35142ca6295c7d15901514cafc891a51432e1a5188bef6491465984f587d531edc' 'd8a7efeff13bbf1884502ae5e469f47be3c72a7f22a13e70c381aa02ccc94d4f41961ede107bba87a68b9144ba5f20818a40d6a20908344fad818c296a034fd3') Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-17 00:21:55 | Low | 2 |
| 2026-10-16 00:12:47 | Low | 2 |
| 2026-10-15 00:28:05 | Low | 2 |
| 2026-10-14 00:06:47 | Low | 2 |
| 2026-10-13 00:23:45 | Low | 2 |
| 2026-10-12 11:13:20 | Medium | 1 |
| 2026-07-14 00:09:48 | Clean | 2 |
| 2026-07-13 05:40:50 | Medium | 1 |
| 2026-06-19 23:51:18 | Clean | 2 |
| 2026-06-19 19:07:35 | Medium | 2 |
| 2026-06-18 16:11:54 | Medium | 1 |