ns3

LOW
maintainer SpacingBat3 9 votes scanned 2026-10-17 00:21:55.226236
View on AUR
Why flagged

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

Low AI review downgraded a static finding 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)
Medium source=() URL on a non-standard host 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
1# Maintainer: SpacingBat3 <spacingbat3+aur@gmail.com>
2# Contributor: Kuan-Yen Chou <kychou2 at illinois dot edu>
3# Contributor: Yunhui Fu <yhfudev@gmail.com>
4
5# === PACKAGE METADATA ===
6
7pkgbase=ns3
8pkgname=(
9 # Fully functional components
10 ns3
11 ns3-examples{,-src} # FIXME: distribute this??? Any cons?
12 # python-ns3 #FIXME: There's a lot of effort to be done to have Python bindings working.
13 # ns3-docs #FIXME: Doxygen output is damn large!
14 # ---
15 # You may optionally enable the WIP components at build time,
16 # PKGBUILD will handle the rest:
17 $_NS3_ENABLE_WIP
18 #^e.g. _NS3_ENABLE_WIP="ns3-docs" makepkg ...
19)
20pkgver=3.49
21pkgrel=1
22pkgdesc='Discrete-event network simulator for Internet systems'
23arch=('x86_64')
24url='https://www.nsnam.org/'
25license=('GPL-2.0-only')
26# Those are also needed on compile time,
27# `makepkg -s` needs this at toplevel else
28# only AUR helpers might work.
29depends=(
30 ### Optional (most likely needed after/during compiling, allow more features)
31 # 1. Database support
32 sqlite3
33 # 2. GNU Scientific Library
34 gsl
35 # 3. XML config store
36 libxml2
37 # 4. GTK configuration store
38 gtk3
39 # 5. Openflow
40 openflow boost-libs
41 # 6. Brite
42 brite
43 # 7. Click
44 click-ns3
45 # 8. DPDK
46 dpdk
47 # 9. Netmap emulation FdNetDevice
48 # netmap # NEEDS AUR PACKAGE FIX FOR CUSTOM KERNELS!
49)
50makedepends=(
51 ### Required, according to docs
52 python gcc cmake ninja git
53 ### Additional components
54 # Openflow (devel) [FIXME!]
55 boost
56 # Eigen (vector math lib, header-only)
57 'eigen>=5' 'eigen<6'
58 # Sphinx documentation
59 # TODO!
60)
61conflicts=()
62source=(
63 "https://www.nsnam.org/releases/ns-${pkgver}.tar.bz2"
64 0001-fix-newer-dpdk-versions.patch
65 0002-disable-python-tests.patch
66)
67
68sha256sums=('81c9eb0839d2b527e9cc01db7eb0a521d8fc6a520ebb23d17f3a5c96e47b4d68'
69 '9f519502828ffb403948d2601eb36e807e92d21793e985f63c90150de62626e5'
70 '24d9c5dad607c2334669374ab5242e11bef85bc0f90bd17868601c7f23c9f2be')
71sha512sums=('d18a44d0acc570ff1d3ef99632ff5493d2b204eb9e0c3ba20059cdea772ac36f0808c00a95e04327541f374902297de14acd5bb7cddabaf42348f3348485c7c6'
72 '91d0f73f65053384c23f3c59d38bd8a988ba5ada97b62919b50e74daccb89cbc32bb32b7b1f84bb5426158325353fac306a5edcdce0690359fdaa82b0421679a'
73 '74158c80b159d1587d51dddffcc6f24689985d4afe5574e3edb7691e5bb892bb160a3b717ce2352293c92c0359c799a4e4da4e0bba6c227ffa9bc534a2199a2c')
74b2sums=('99b2491b97a683fa4fe3033d25c566888af3d8d5416ee3c00d25c54cb3df554a15e424fd5964b0200481d8e6f12209702d2ffb016aa024f5a845cf8afacdf6b4'
75 '83fbc3bb43094ee08bee4741c8d343de8a3b84a1b3f151d311586b3d3adf3b35142ca6295c7d15901514cafc891a51432e1a5188bef6491465984f587d531edc'
76 'd8a7efeff13bbf1884502ae5e469f47be3c72a7f22a13e70c381aa02ccc94d4f41961ede107bba87a68b9144ba5f20818a40d6a20908344fad818c296a034fd3')
77
78# Installation prefix
79# leaving there for possible /opt
80# packaging on-demand if needed.
81#
82# This might get useful if isolation
83# will be mandatory, eg. to avoid conflicts
84# with Arch packages / software.
85_pkgprefix="/usr"
86
87# === DYNAMIC METADATA ===
88
89# Package enablements
90# This is so it is possible to control components
91# to be built via pkgname() array.
92_has_docs=false
93_has_python=false
94for _searchpkg in "${pkgname[@]}"; do
95 if [ "$_searchpkg" == "ns3-docs" ]; then
96 _has_docs=true
97 fi;
98 if [ "$_searchpkg" == "python-ns3" ]; then
99 _has_python=true
100 fi;
101 if $_has_python && $_has_docs; then break; fi
102done;
103
104# Additional dependencies on alternative configurations
105if $_has_python; then
106 # Bindings requirements
107 makedepends+=(python-cppyy)
108else
109 # Enable MPI feature as it does
110 # conflict with Python bindings
111 depends+=(libmpi.so)
112fi
113
114
115# === PACKAGE HELPERS ===
116
117_pver() {
118 python --version | awk '{print $2}' | sed 's/.[^.]*$//'
119}
120
121_pver_next() {
122 _pver | sed "s/\.[^.]*$/\.$(($(python --version | awk '{print $2}' | sed 's/^[^.]*\.\([^.]*\)\.[^.]*$/\1/')+1))/"
123}
124
125# This is taken from mesa package
126_pick() {
127 local p="$1" f d; shift
128 for f; do
129 d="$srcdir/$p/${f#$pkgdir/}"
130 mkdir -p "$(dirname "$d")"
131 mv -v "$f" "$d"
132 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
133 done
134}
135
136# === PACKAGING FLOW DEFINITION ===
137
138prepare() {
139 cd "${srcdir}/ns-${pkgver}"
140 for patch in "${source[@]}"; do if [ "${patch##*.}" == "patch" ]; then
141 patch -Np1 -i "$srcdir/$patch"
142 fi; done
143}
144
145build() {
146 cd "${srcdir}/ns-${pkgver}"
147 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
148 local ns3_options=(
149 ### GENERAL ###
150 --build-profile=default
151 --enable-build-version
152 #--enable-monolib
153 # ^FIXME: I need to check why it didn't
154 # install or if it causes problems.
155 ### INTEGRATIONS ###
156 --enable-dpdk
157 --enable-eigen
158 --enable-gsl
159 --enable-gtk
160 --enable-logs
161 ### ADDITIONAL COMPONENTS ###
162 --enable-examples
163 --enable-tests
164 # Prefix for packaged software
165 --prefix="$_pkgprefix"
166 ### COMPONENT DIRS ###
167 --with-click="$_pkgprefix"
168 --with-openflow="$_pkgprefix"
169 )
170 local cmake_options=(
171 ### ADDITIONAL PATH DEFINITIONS ###
172 # libexec is lib/[package] per guidelines
173 -DCMAKE_INSTALL_LIBEXECDIR="lib/$pkgname/"
174 ### INTEGRATIONS INTO ARCHLINUX ###
175 # Allows for linker overrides (via /etc/makepkg.conf)
176 # Otherwise (=ON), this enforces MOLD when installed.
177 -DNS3_FAST_LINKERS=OFF
178 )
179 # OPTION 1: Python bindings build (FIXME!)
180 if $_has_python; then
181 ns3_options+=(--enable-python-bindings --disable-mpi)
182 cmake_options+=(-DNS3_BINDINGS_INSTALL_DIR="$site_packages")
183 # OPTION 2: MPI build
184 else
185 ns3_options+=(--enable-mpi)
186 fi
187 ./ns3 configure "${ns3_options[@]}" -- "${cmake_options[@]}"
188 ./ns3 build
189 # Generate docs (if enabled)
190 if $_has_docs; then
191 ./ns3 docs doxygen-no-build
192 break
193 fi
194}
195
196check() {
197 cd "${srcdir}/ns-${pkgver}"
198 # FIXME: Working Python tests (depends on working bindings)
199 #env \
200 # PYTHONPATH="$PYTHONPATH${$PYTHONPATH:+:}${srcdir}/ns-${pkgver}/build/bindings/python" \
201 ./test.py \
202 --verbose-failed \
203 --no-build \
204 --duration \
205 --multiple
206}
207
208package_ns3() {
209 optdepends=(
210 # PCAP readers
211 {tcpdump,wireshark-{cli,qt}}': PCAP file reader'
212 # Virtual machines
213 {lxc,iproute2,iptables}': virtual machines in network'
214 # Recommend Python bindings
215 'python-ns3: Python bindings (broken)'
216 # Recommend Network animator
217 'netanim: Animator for XML simulation data'
218 )
219 cd "${srcdir}/ns-${pkgver}"
220 DESTDIR="$pkgdir" ./ns3 install
221 cd "$pkgdir"
222
223 # Python bindings
224 if $_has_python; then
225 _pick python usr/lib/python$(_pver)
226 fi
227}
228
229# === ADDITIONAL COMPONENTS ===
230
231package_ns3-examples() {
232 pkgdesc+=" (prebuilt example applications)"
233 depends=("ns3=$pkgver")
234 optdepends=('ns3-examples-src: See source code for examples')
235 cd "${srcdir}/ns-${pkgver}/build"
236 install -dm755 "$pkgdir"/usr/lib/ns3
237 mv -Tv examples "$pkgdir"/usr/lib/ns3/examples
238}
239
240package_ns3-examples-src() {
241 pkgdesc+=" (prebuilt example sources)"
242 depends=()
243 optdepends=('ns3-examples: Run prebuilt examples')
244 cd "${srcdir}/ns-${pkgver}"
245 install -dm755 "$pkgdir"/usr/src/ns3
246 mv -Tv examples "$pkgdir"/usr/src/ns3/examples
247}
248
249# [FIXME]: srcdir references in navbar
250package_ns3-docs() {
251 pkgdesc+=" (Doxygen documentation)"
252 depends=("ns3=$pkgver")
253 makedepends=(doxygen graphviz imagemagick dia)
254
255 cd "${srcdir}/ns-${pkgver}"
256 install -dm755 "$pkgdir/usr/share/doc/$pkgbase"
257 # HTML Doxygen docs
258 mv -Tv doc/html "$pkgdir/usr/share/doc/$pkgbase/html"
259 # FIXME: optimize docs so they don't take like 1GB of disk space
260}
261
262package_python-ns3() {
263 pkgdesc+=" (Python bindings)"
264 depends=("ns3=$pkgver" python-cppyy)
265 # PyViz visualizer
266 depends+=(python-cairo python-pygraphviz ipython)
267 # Note: `root` package is not enough to satisfy deps
268 # (libcppyy is missing)
269 conflicts=(root)
270 # Try to lock to python version due to bindings
271 [ -n "$pkgdir" ] && depends+=("python>=$(_pver).0" "python<$(_pver_next).0")
272 mv python/* "$pkgdir"
273}
274
275# vim: set ts=4 sw=4 et :
276

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)SeverityRules
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

Report a package

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

0 / 4000
Your suggestion