mathematica-light

maintainer JP-Ellis · 8 votes · scanned 2026-08-03 00:08:14.047287
MEDIUM
View on AUR ↗
Why flagged The package downloads a prebuilt installer script from a non-whitelisted but official domain (account.wolfram.com), which is then executed; while the source is official and checksummed, the dynamic signature retrieval involves an untrusted host download not listed in source=(), raising supply-chain concerns if that endpoint were compromised.

Triggered rules

MEDIUM External download from an untrusted host, not in source=() external_download_not_in_source

curl/wget fetches a URL on a non-allowlisted host that is not part of source=(), so it is not checksum-verified by makepkg.

  • PKGBUILD:55 curl -fsSL https://www.wolfram.com/download-center/ \
MEDIUM AI review llm_review

An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is MEDIUM (confidence 90%): The package downloads a prebuilt installer script from a non-whitelisted but official domain (account.wolfram.com), which is then executed; while the source is official and checksummed, the dynamic signature retrieval involves an untrusted host download not listed in source=(), raising supply-chain concerns if that endpoint were compromised.

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Joshua Ellis <josh@jpellis.me>
2# Contributor: "marmis" Tiago de Paula <tiagodepalves@gmail.com>
3# Contributor: Anish Tondwalkar <anish@tjhsst.edu>
4# Contributor: Ghost91 <m_graeb11@cs.uni-kl.de>
5# Contributor: Michael Pusterhofer <pusterhofer at student dot tugraz dot at>
6# Contributor: Raphael Scholer <rscholer@gmx.de>
7# Contributor: kjslag <kjslag at gmail dot com>
8# Contributor: teratomata <teratomat@gmail.com>
9# Contributor: Maxim Mikityanskiy <maxtram95@gmail.com>
10
11pkgname=mathematica-light
12pkgdesc='Computational software for mathematics, with online-only documentation'
13pkgver=15.0.1
14IFS=. read -r _major _minor _patch <<< "${pkgver}"
15_minor=${_minor:-0}
16pkgrel=1
17url='http://www.wolfram.com/mathematica/'
18arch=(x86_64)
19license=('LicenseRef-Wolfram-Mathematica-License-Agreement') # https://www.wolfram.com/legal/agreements/wolfram-mathematica/
20makedepends=('curl' 'inetutils')
21depends=(
22 'alsa-lib'
23 'bash'
24 'fontconfig'
25 'freetype2'
26 'glibc'
27 'hicolor-icon-theme'
28 'libquadmath'
29 'libstdc++'
30 'libx11'
31 'libxkbcommon'
32 'nss'
33 'qt6-base'
34 'zstd'
35)
36optdepends=(
37 'qt6-wayland: full Wayland support'
38 'openssl-1.1: MQTTLink and Kerberos integration'
39 'libxinerama: required by FFmpegTools'
40 'ffmpeg4.4: alternative FFmpegTools backend'
41 'libxtst: X11 backend for Java AWT libraries'
42 'ttf-dejavu: correct fonts for Greek characters and inline TeX'
43 'libcups: printer support'
44)
45provides=('mathematica')
46conflicts=('mathematica')
47_source_url='https://account.wolfram.com/dl/WolframApp'
48# Source URL has a dynamic signature parameter that allows downloads without logging in. You can
49# skip fetching this value if you already have the installer by setting SKIP_DYNAMIC_SIGNATURE=1.
50# Signatures are updated hourly, so we hide them by default in .SCRINFO and the AUR page.
51if [[ ${SKIP_DYNAMIC_SIGNATURE:-${PRINTSRCINFO}} != 1 ]]; then
52 # shellcheck disable=
53 _dynamic_signature=$(
54 set -o pipefail
55 curl -fsSL https://www.wolfram.com/download-center/ \
56 | grep -oP "\bhref=\"${_source_url/./\.}\?[^\"]+\K&signature=[a-zA-Z0-9]+(?=\"|&)" \
57 | uniq
58 )
59fi
60source=("Wolfram_${pkgver}_LIN.sh::${_source_url}?version=${_major}.${_minor}${_patch/#?/.&}&platform=Linux&downloadManager=false&includesDocumentation=false${_dynamic_signature}"
61 'wolfram-remove-xdg-scripts.patch')
62sha256sums=('ecde452688f481318dc18dd0fbc8491998becdee88451327c2eea72c4bf7705e'
63 '1ea85d8df27e875e8073832ff3a25c7594eeacc7d83add6b8fa8c4462e38a5fe')
64## Symbol searching and stripping takes a long time, so they are disabled by default.
65## Also, `debug` won't be of too much help here, since this is a binary distribution.
66## Here's a quick comparison on my machine:
67## | Build options | Build time | Package Size (Zstd) | Uncompressed Size |
68## | :-------------- | ---------: | ------------------: | ----------------: |
69## | (!strip !debug) | 58.30 s | 2977 MiB | 8754 MiB |
70## | (!strip debug) | 167.46 s | 2977 MiB | 8754 MiB |
71## | (strip !debug) | 414.44 s | 2740 MiB | 7811 MiB |
72options=(!strip !debug)
73
74## To build this package you might need to place the mathematica-installer into
75## your startdir If you don't own the installer you can download a trial version
76## at http://www.wolfram.com/mathematica/trial
77
78## Here you can change the installation directory. The default is '/opt/Mathematica'.
79_installdir='/opt/Mathematica'
80
81prepare() {
82 local available_space
83 available_space="$(df --output=avail -BG .)"
84 available_space="$(tail -n 1 <<< "${available_space}")"
85
86 if [[ ${available_space/%G/} -lt 16 ]]; then
87 warning "Mathematica (Light) takes around 11 GiB of space with 'makepkg'."
88 warning 'Building in a tmpfs (e.g. /tmp when mounted into RAM) may not work.'
89 fi
90
91 if [[ ${PWD} =~ [[:space:]] ]]; then
92 error "ERROR: The Mathematica installer doesn't support directory names with spaces."
93 warning "Current build directory: ${PWD}"
94 exit 1
95 fi
96
97 msg2 'Extracting Mathematica installer...'
98 bash "Wolfram_${pkgver}_LIN.sh" --keep --target bundle -- -noexec
99
100 patch -t -d bundle/ -Np1 < wolfram-remove-xdg-scripts.patch
101}
102
103package() {
104 local installdir
105 installdir="$(realpath -m "${pkgdir}/${_installdir}")"
106
107 msg2 'Running Mathematica installer'
108 # https://reference.wolfram.com/language/tutorial/InstallingWolfram.html#650929293
109 bash bundle/Unix/Installer/WolframInstaller \
110 -execdir="${pkgdir}/usr/bin" \
111 -targetdir="${installdir}" \
112 -auto
113 rm bundle/Unix/Installer/WolframInstaller
114
115 cd "${installdir}"
116 if [[ -s InstallErrors ]]; then
117 warning 'Review installation errors:'
118 cat InstallErrors
119 fi
120 rm -vf InstallErrors
121
122 msg2 'Setting up WolframScript'
123 # shellcheck disable=SC2312
124 ar -p SystemFiles/Installation/wolframscript_*_amd64.deb \
125 -O data.tar.xz | tar -xvJ -C "${pkgdir}" ./usr/share/
126
127 msg2 'Copying menu and MIME type information'
128
129 install -vD -t "${pkgdir}/usr/share/applications/" \
130 -m644 "SystemFiles/Installation/com.wolfram.Wolfram.${_major}.${_minor}.desktop"
131 install -vD -t "${pkgdir}/usr/share/desktop-directories/" \
132 -m644 SystemFiles/Installation/wolfram-wolfram.directory
133 install -vD -t "${pkgdir}/usr/share/mime/packages/" \
134 -m644 SystemFiles/Installation/*.xml
135 rm -vr SystemFiles/Installation/
136
137 _fix_desktop_file "${pkgdir}/usr/share/applications/com.wolfram.Wolfram.${_major}.${_minor}.desktop"
138 _fix_desktop_file "${pkgdir}/usr/share/desktop-directories/wolfram-wolfram.directory"
139
140 msg2 'Copying icons'
141
142 # Read MIME types from XML declarations: <mime-type ... type="...">
143 local -a mimetypes
144 mapfile -t mimetypes < <(
145 # shellcheck disable=SC2312
146 sed -nE '/<mime-type\b/,/>/ s/.*\btype="([^"]+)".*/\1/ p' \
147 "${pkgdir}/usr/share/mime/packages/"*.xml
148 )
149
150 local i mimetype icon
151 for i in 32 64 128; do
152 install -vD -m644 "SystemFiles/FrontEnd/SystemResources/X/App-${i}.png" \
153 -T "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/wolfram-wolfram-${_major}.${_minor}.png"
154
155 for mimetype in "${mimetypes[@]}"; do
156 icon="SystemFiles/FrontEnd/SystemResources/X/$(basename "${mimetype}")-${i}.png"
157 if [[ -f ${icon} ]]; then
158 install -vD -m644 "${icon}" \
159 -T "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/${mimetype//\//-}.png"
160 else
161 printf 'Missing icon: %s\n' "${icon}"
162 fi
163 done
164 done
165
166 msg2 'Copying man pages'
167 install -vD -t "${pkgdir}/usr/share/man/man1/" \
168 -m644 SystemFiles/SystemDocumentation/Unix/*.1
169
170 msg2 'Copying license'
171 install -vD -t "${pkgdir}/usr/share/licenses/${pkgname}/" \
172 -m644 LICENSE.txt
173
174 _fix_binary_symlinks # namcap rule: symlink
175 _fix_permissions # namcap rule: permissions
176}
177
178_fix_desktop_file() {
179 sed -i -E "
180 # Wolfram declares an invalid 'Version=2.0'. Most DEs just ignore it, but best to remove it.
181 /^Version=/ d
182 # encoding is outdated
183 /^Encoding=/ d
184 # executable path contains BUILDDIR
185 /^TryExec=/ s|=.*|=/usr/bin/WolframNB|
186 /^Exec=/ s|=.*|=/usr/bin/WolframNB --name com.wolfram.Wolfram.${_major}.${_minor} %F|
187 # optional sections for desktop entry: https://specifications.freedesktop.org/desktop-entry/latest/recognized-keys.html
188 /^Type=Application\$/,\$ {
189 /^Comment=/ a GenericName=Mathematical Software
190 \$ a Keywords=Wolfram;Mathematica;Symbolic;Computation;Programming;Simulation;Data Analysis;Visualization;Algebra;Calculus;Graphing;
191 \$ a Categories=Science;Math;ComputerScience;DataVisualization;NumericalAnalysis;ArtificialIntelligence;Physics;ParallelComputing;
192 }
193 # checked with desktop-file-validate
194 " "$1"
195}
196
197_fix_binary_symlinks() {
198 msg2 'Fixing symbolic links'
199
200 ln -v -ft Executables/ -sr SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript
201 ln -v -ft "${pkgdir}/usr/bin/" -sr \
202 Executables/math \
203 Executables/MathKernel \
204 Executables/wolfram \
205 Executables/wolframnb \
206 Executables/WolframKernel \
207 Executables/WolframNB \
208 SystemFiles/Kernel/Binaries/Linux-x86-64/ELProver \
209 SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript
210}
211
212_fix_permissions() {
213 msg2 'Fixing file permissions'
214 chmod -c go-w -R "${pkgdir}"
215}
216

Changes since previous scan

--- PKGBUILD @ 2026-07-31 00:14
+++ PKGBUILD @ 2026-08-03 00:08
@@ -23,9 +23,10 @@
'bash'
'fontconfig'
'freetype2'
- 'gcc-libs'
'glibc'
'hicolor-icon-theme'
+ 'libquadmath'
+ 'libstdc++'
'libx11'
'libxkbcommon'
'nss'

Scan history

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

Report a package

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

0 / 4000
Your suggestion