unreal-engine

LOW
maintainer alexbelm48 75 votes scanned 2026-09-17 00:27:14.276658
View on AUR
Why flagged

The package builds Unreal Engine from the official GitHub repository and downloads a toolchain from Epic's CDN; the flagged non-standard host is Epic's own cdn.unrealengine.com, and the privileged install is a standard AUR pattern for setting up group permissions and desktop integration, not malicious activity.

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 package builds Unreal Engine from the official GitHub repository and downloads a toolchain from Epic's CDN; the flagged non-standard host is Epic's own cdn.unrealengine.com, and the privileged install is a standard AUR pattern for setting up group permissions and desktop integration, not malicious activity.

2 higher static findings 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:34 source=("${UE_SDK_VERSION}.tar.gz::https://cdn.unrealengine.com/Toolchain_Linux/${UE_SDK_VERSION}.tar.gz"
Medium Privileged / out-of-pacman install (sudoers, setuid, or self-update) privileged_install

The package grants elevated privileges or installs an update path outside pacman: a /etc/sudoers.d rule (often passwordless), a setuid/setgid binary, or a self-update script/service that can fetch and run future code with no checksum verification. The initial install may be verified, but the ongoing privilege + update surface is a real supply-chain / privilege-escalation risk.

  • PKGBUILD:526 find "${pkgdir}/${UE_INSTALL_DIR}" -type d -exec chmod g+s {} +

PKGBUILD

2 offending line(s) highlighted
1# Old Maintainer: Dylan Ferris <dylan@psilly.com>
2# Old Maintainer: Michael Lojkovic <mikelojkovic@gmail.com>
3# Old Maintainer: Shatur95 <genaloner@gmail.com>
4# Old Maintainer: slx
5# Old Co-Maintainer: Neko-san <nekoNexus at protonmail dot ch>
6# Maintainer: Alexis Belmonte <alexbelm48@gmail.com>
7
8# The source is about 200 MiB, with an extra ~11 GiB of dependencies downloaded in Setup.sh, and may take several hours to compile.
9# If you want additional options, there are switches below.
10pkgname=unreal-engine
11pkgver=5.8.2
12pkgrel=1
13## Check unreal-engine/Engine/Config/Linux/Linux_SDK.json (MainVersion value) for what the below should be set to
14UE_SDK_VERSION="native-linux-v26_clang-20.1.8-rockylinux8"
15pkgdesc='A 3D game engine by Epic Games which can be used non-commercially for free.'
16arch=('x86_64' 'x86_64_v2' 'x86_64_v3' 'x86_64_v4' 'aarch64')
17url=https://www.unrealengine.com/
18makedepends=('git' 'openssh' 'sed' 'grep' 'glibc' 'wget' 'rsync')
19depends=('sdl3' 'python' 'dotnet-runtime' 'dotnet-sdk' 'vulkan-icd-loader' 'lld' 'xdg-user-dirs' 'dos2unix' 'openssl' 'steam' 'coreutils' 'findutils')
20optdepends=('polly: for potentially increased performance'
21 'qt5-base: qmake build system for projects'
22 'cmake: build system for projects'
23 'qtcreator: IDE for projects'
24 'codelite: IDE for projects'
25 'kdevelop: IDE for projects'
26 'clion: IDE for projects'
27 'rider: IDE for projects'
28 'code: IDE for projects'
29 'pacman-contrib: for the paccache cleaning hook'
30 'fake-ms-fonts: Font support for "demo/free/sample/example/tutorial" projects'
31 'ttf-ms-fonts: Font support for "demo/free/sample/example/tutorial" projects')
32license=('custom:UnrealEngine' 'GPL3')
33install="${pkgname}.install"
34source=("${UE_SDK_VERSION}.tar.gz::https://cdn.unrealengine.com/Toolchain_Linux/${UE_SDK_VERSION}.tar.gz"
35 'unreal-engine.sh'
36 'com.unrealengine.UE5Editor.desktop'
37 '0001-override-shared-target-build.patch'
38 '0002-adapt-android-setup-script.patch'
39 '0003-disable-lumen-surface-cache-feedback-on-linux.patch'
40 'unreal-engine-5-pacman-cache.hook'
41 'ue5editor.svg')
42sha256sums=('6eef42679b744cdcb50276f2d7cff0a51f7ddd632960e06bfbc3f6b9508ef615'
43 '55a8ad79c2e502bc5919249b9d1804ad405795b36630ab2f23aeb99dd218e5f4'
44 'aa09746f9db93713f470ef19390a89b279fd5a335835ad95eab6cdaafa1b9e99'
45 '1cedb43efc103c384705e4e18746fed24c60c52a445e89f1acfd0f2992f5291d'
46 '3da3f449c6b42d49874d8507be476b1178509be099df6f5d58683802d7e05dd2'
47 'db60ce742e6d236a0a9f79b7a8b59496fa2bf003332b244f4a177d81391f83b2'
48 '9386160a91594abeeaf4fe02fea562e7a4ead4c6f9a258c2a37b2e5f10e7deca'
49 'b00c398b63f15084c46f3963f62a45284ecd8dae9ba6f38a2c4af370bbfdab8d')
50# Not sure if compiling Unreal with LTO is legal? Lot's of different proprietary software goes into Unreal
51options=('!strip' 'staticlibs') # Package is smaller with "strip" but it takes a long time and generates many warnings
52
53# Default engine installation directory. Can be useful if you do not have a lot of space on the default storage drive
54# DON'T put a "/" at the start of the path
55## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
56if [[ "${UE_INSTALL_DIR}" == "" ]]; then
57 export UE_INSTALL_DIR="opt/${pkgname}"
58fi
59
60# Change this to true if you have a modern system and don't mind the extra packaging time (and size) to avoid compiling shaders on UE startup later; set to false by default for those with less robust systems
61## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
62if [[ "${UE_WITH_DDC}" != "true" && "${UE_WITH_DDC}" != "false" ]]; then
63 export UE_WITH_DDC=true
64fi
65
66# Enable Win64 toolchain/components in BuildGraph for cross-compilation targets
67## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
68if [[ "${UE_WITH_WIN64}" != "true" && "${UE_WITH_WIN64}" != "false" ]]; then
69 export UE_WITH_WIN64=true
70fi
71
72# Keep full debug info in produced binaries
73## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
74if [[ "${UE_WITH_FULL_DEBUG_INFO}" != "true" && "${UE_WITH_FULL_DEBUG_INFO}" != "false" ]]; then
75 export UE_WITH_FULL_DEBUG_INFO=false
76fi
77
78# BuildGraph platform toggles
79
80_ue_arch="$(uname -m)"
81
82## Set these as environment variables in /etc/makepkg.conf if you want predefined behavior
83if [[ "${UE_WITH_LINUX}" != "true" && "${UE_WITH_LINUX}" != "false" ]]; then
84 if [[ "${_ue_arch}" =~ ^x86_64 ]]; then
85 export UE_WITH_LINUX=true
86 else
87 export UE_WITH_LINUX=false
88 fi
89fi
90
91if [[ "${UE_WITH_LINUX_ARM}" != "true" && "${UE_WITH_LINUX_ARM}" != "false" ]]; then
92 if [[ "${_ue_arch}" =~ ^aarch64 ]]; then
93 export UE_WITH_LINUX_ARM=true
94 else
95 export UE_WITH_LINUX_ARM=false
96 fi
97fi
98
99if [[ "${UE_WITH_MAC}" != "true" && "${UE_WITH_MAC}" != "false" ]]; then
100 export UE_WITH_MAC=false
101fi
102
103if [[ "${UE_WITH_ANDROID}" != "true" && "${UE_WITH_ANDROID}" != "false" ]]; then
104 export UE_WITH_ANDROID=false
105fi
106
107if [[ "${UE_WITH_IOS}" != "true" && "${UE_WITH_IOS}" != "false" ]]; then
108 export UE_WITH_IOS=false
109fi
110
111if [[ "${UE_WITH_TVOS}" != "true" && "${UE_WITH_TVOS}" != "false" ]]; then
112 export UE_WITH_TVOS=false
113fi
114
115# BuildGraph game configurations string (semicolon-separated)
116## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
117if [[ -z "${UE_GAME_CONFIGURATIONS}" ]]; then
118 export UE_GAME_CONFIGURATIONS="Development;Shipping"
119fi
120
121# Change this if you want an alternative non-default logo for UE5's desktop icon; the default logo is enabled by default
122## Set this as an environment variable in /etc/makepkg.conf if you want predefined behavior
123if [[ "${UE_USE_DEFAULT_LOGO_AT_INSTALL}" != "1" && "${UE_USE_DEFAULT_LOGO_AT_INSTALL}" != "0" ]]; then
124 export UE_USE_DEFAULT_LOGO_AT_INSTALL=1
125fi
126
127
128## This is for detecting your CPU architecture automatically; set to false if you want to enforce your own makepkg.conf file
129## Disabled by default as a compromise for those bothered by having it force-enabled
130
131## Note: the resulting package will still be named containing "x86_64" unless the build was done with an "official" Arch distro for that architecture (like Arch ARM - [don't exactly advise using Arch ARM though])
132## or if you manage to trick your Arch installation to accept other architecture extensions by fiddling with the $CARCH variable and /etc/pacman.conf - this method has flaws, namely due to a bug:
133## it doesn't work with "makechrootpkg" - though, this PKGBUILD doesn't work in with this method anyway because of Github SSH Agent nonsense -- if this changes in the future, let us know
134
135# Valid values are false / disabled / default, auto, and native
136
137# UE_ARCH_AUTO=""
138
139if [[ -n "$(command -v tr)" ]]; then
140 # shellcheck disable=SC2006
141 UE_ARCH_AUTO="$(echo "${UE_ARCH_AUTO}" | tr '[:upper:]' '[:lower:]')"
142fi
143
144case "${UE_ARCH_AUTO}" in
145 "auto"|"true"|"enable"|"enabled"|"1"|"native"|"false"|"disable"|"disabled"|"2")
146 :
147 ;;
148
149 *)
150 UE_ARCH_AUTO=false
151 ;;
152esac
153
154if [[ ${CFLAGS} =~ -O([0-9]+) ]]; then
155 _ue_opt_level="-O${BASH_REMATCH[1]}"
156else
157 _ue_opt_level="-O3"
158fi
159
160_ue_polly_path="$(find /usr/lib /usr/lib64 -name 'LLVMPolly.so' -print -quit 2>/dev/null)"
161
162if [[ -n "${_ue_polly_path}" ]]; then
163 export CFLAGS="${CFLAGS} -fplugin=LLVMPolly.so -mllvm=-polly -mllvm=-polly-ast-use-context -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-invariant-load-hoisting -mllvm=-polly-run-inliner -mllvm=-polly-run-dce"
164fi
165
166_ue_common_cflags="${_ue_opt_level} -pipe -fno-plt -fstack-clash-protection -fstack-protector-strong -fcf-protection -Wl,-z,relro,-z,now -Wformat -Werror=format-security -fPIC -fPIE -Wp,-D_FORTIFY_SOURCE=2"
167_ue_common_ldflags="-pie -Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
168
169_ue_is_arch_auto_enabled() {
170 case "$1" in
171 auto|true|enable|enabled|1) return 0 ;;
172 *) return 1 ;;
173 esac
174}
175
176_ue_set_arch_flags() {
177 local _ue_march="$1"
178 local _ue_tune="$2"
179
180 export CFLAGS="${CFLAGS} -march=${_ue_march} ${_ue_tune} ${_ue_common_cflags}"
181 export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
182 export LDFLAGS="${_ue_common_ldflags}"
183}
184
185_ue_detect_x86_64_march() {
186 local _ue_ldso="/lib/ld-linux-x86-64.so.2"
187 local _ue_ld_help
188
189 _ue_ld_help="$("${_ue_ldso}" --help 2>/dev/null || true)"
190
191 if grep -qw "x86-64-v4 (supported" <<< "${_ue_ld_help}"; then
192 echo "x86-64-v4"
193 elif grep -qw "x86-64-v3 (supported" <<< "${_ue_ld_help}"; then
194 echo "x86-64-v3"
195 elif grep -qw "x86-64-v2 (supported" <<< "${_ue_ld_help}"; then
196 echo "x86-64-v2"
197 elif grep -Ewq "x86_64.*supported" <<< "${_ue_ld_help}"; then
198 echo "x86-64"
199 else
200 echo ""
201 fi
202}
203
204_ue_map_build_arch() {
205 local _ue_source_arch="$1"
206
207 case "${_ue_source_arch}" in
208 x86_64) echo "x64" ;;
209 aarch64) echo "arm64" ;;
210 *) echo "" ;;
211 esac
212}
213
214_ue_build_arch="$(_ue_map_build_arch "${_ue_arch}")"
215
216if _ue_is_arch_auto_enabled "${UE_ARCH_AUTO}"; then
217 if [[ "${_ue_arch}" == "x86_64" ]]; then
218 _ue_detected_march="$(_ue_detect_x86_64_march)"
219
220 if [[ -n "${_ue_detected_march}" ]]; then
221 _ue_set_arch_flags "${_ue_detected_march}" ""
222 else
223 msg "Could not detect a supported x86_64 micro-architecture level. Exiting."
224 return 1
225 fi
226 elif [[ "${_ue_arch}" == "aarch64" ]]; then
227 _ue_set_arch_flags "aarch64" ""
228 else
229 msg "Architecture '${_ue_arch}' is not supported! Exiting."
230 return 1
231 fi
232elif [[ "${UE_ARCH_AUTO}" == "native" ]]; then
233 _ue_set_arch_flags "native" "-mtune=native"
234fi
235
236case "${UE_ARCH_AUTO}" in
237 "auto"|"true"|"enable"|"enabled"|"native"|"1")
238 :
239 ;;
240
241 *)
242 if [[ -n "${_ue_polly_path}" ]]; then
243 ## Make sure that if polly is installed and the auto-flags above are not used, to add the polly flags to CXXFLAGS for consistency with having them set as CFLAGS
244 CXXFLAGS="${CXXFLAGS} -fplugin=LLVMPolly.so -mllvm=-polly -mllvm=-polly-ast-use-context -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-invariant-load-hoisting -mllvm=-polly-run-inliner -mllvm=-polly-run-dce"
245 fi
246 ;;
247esac
248
249# Causes a SEGV during derived data cache build if not set
250export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
251
252# The Roslyn compiler server coordinates its startup through named mutexes, which .NET backs with
253# lock files under ${TMPDIR}/.dotnet/shm on Linux.
254#
255# Concurrent MSBuild nodes racing on those files intermittently make ReleaseMutex throw, surfacing
256# as
257#
258# MSB3883: Unexpected exception: ReleaseMutex failed. WaitOne Id: <n> Release Id: <n>
259#
260# on whichever C# projects happened to compile at that moment.
261#
262# Compiling in-process sidesteps the server entirely; the engine builds few enough C# assemblies
263# for the lost process reuse not to matter. MSBuild reads this as a global property, so it also
264# covers the compilations BuildGraph and UAT spawn.
265export UseSharedCompilation=false
266
267# Leftover reuse nodes outlive makepkg and carry stale state into the next build
268export MSBUILDDISABLENODEREUSE=1
269
270prepare() {
271 if [[ "${UE_WITH_ANDROID}" == "yes" ]]; then
272 if ! pacman -Q android-studio >/dev/null 2>&1; then
273 error "You need to install Android Studio with its cmdline-tools package first before compiling Unreal Engine with Android export support"
274 elif [[ ! -d "/opt/android-studio/cmdline-tools/latest/bin" ]]; then
275 error "You installed Android Studio, but you haven't installed the cmdline-tools SDK package yet. Please install it first and try again."
276 fi
277 fi
278
279 # Check access to the repository
280 if ! git ls-remote git@github.com:EpicGames/UnrealEngine &>/dev/null; then
281 error 'You must register at unrealengine.com and link your github account to access this private repo. See the wiki for more info: https://wiki.archlinux.org/index.php/Unreal_Engine_4'
282 exit 1
283 fi
284
285 local _ue_install_path="/${UE_INSTALL_DIR#/}"
286 local _ue_arch_detail=""
287 local _ue_use_system_clang="no"
288 local _ue_ddc_text="no"
289 local _ue_debug_text="no"
290 local _ue_default_logo_text="yes"
291 local _ue_target_platforms=()
292 local _ue_platforms_csv="none"
293
294 [[ "${UE_USE_SYSTEM_CLANG}" == "true" ]] && _ue_use_system_clang="yes"
295 [[ "${UE_WITH_DDC}" == "true" ]] && _ue_ddc_text="yes"
296 [[ "${UE_WITH_FULL_DEBUG_INFO}" == "true" ]] && _ue_debug_text="yes"
297 [[ "${UE_USE_DEFAULT_LOGO_AT_INSTALL}" == "0" ]] && _ue_default_logo_text="no"
298
299 [[ "${UE_WITH_WIN64}" == "true" ]] && _ue_target_platforms+=("Windows")
300 [[ "${UE_WITH_LINUX}" == "true" ]] && _ue_target_platforms+=("Linux")
301 [[ "${UE_WITH_LINUX_ARM}" == "true" ]] && _ue_target_platforms+=("Linux (ARM)")
302 [[ "${UE_WITH_MAC}" == "true" ]] && _ue_target_platforms+=("macOS")
303 [[ "${UE_WITH_TVOS}" == "true" ]] && _ue_target_platforms+=("tvOS")
304 [[ "${UE_WITH_ANDROID}" == "true" ]] && _ue_target_platforms+=("Android")
305 [[ "${UE_WITH_IOS}" == "true" ]] && _ue_target_platforms+=("iOS")
306
307 if (( ${#_ue_target_platforms[@]} > 0 )); then
308 local IFS=";"
309 _ue_platforms_csv="${_ue_target_platforms[*]}"
310 fi
311
312 msg ''
313 msg "Unreal Engine ${pkgver} build options summary:"
314 msg ''
315 msg "- End package installation path: ${_ue_install_path}"
316 msg "- Integrate prebuilt shader cache: ${_ue_ddc_text}"
317 msg ''
318 msg "- Target platforms supported for export: ${_ue_platforms_csv}"
319 msg "- Game configurations: ${UE_GAME_CONFIGURATIONS}"
320 msg "- Include full debug info: ${_ue_debug_text}"
321 msg "- Use default logo at install: ${_ue_default_logo_text}"
322 msg ''
323
324 # Download Unreal Engine source or update if the folder exists
325 if [[ ! -d "${pkgname}" ]]
326 then
327 git clone --depth=1 --branch=${pkgver}-release git@github.com:EpicGames/UnrealEngine "${pkgname}"
328 cd "${pkgname}" || return
329 else
330 cd "${pkgname}" || return
331
332 current_cloned_ver="$(git describe --tags --always)"
333 if [[ "${current_cloned_ver}" != "${pkgver}-release" ]]; then
334 cd ..
335 rm -rf "${pkgname}"
336 git clone --depth=1 --branch=${pkgver}-release git@github.com:EpicGames/UnrealEngine "${pkgname}"
337 cd "${pkgname}" || return
338 else
339 rm -f .git/index.lock
340 git fetch --depth=1 origin tag ${pkgver}-release
341 git reset --hard ${pkgver}-release
342 fi
343 fi
344
345 for patch_file in ../*.patch; do
346 msg "Applying ${patch_file}"
347
348 if ! patch -p1 -i "${patch_file}"; then
349 msg "Some or all of the patch at ${patch_file} failed to apply. Will still try to build."
350 fi
351 done
352
353 # Qt Creator source code access
354 if [[ ! -d Engine/Plugins/Developer/QtCreatorSourceCodeAccess ]]
355 then
356 # https://github.com/fire-archive/QtCreatorSourceCodeAccess - See for usage
357 git -C Engine/Plugins/Developer clone --depth=1 https://github.com/fire-archive/QtCreatorSourceCodeAccess
358 fi
359
360 # For some reason, despite this file explicitly asking not to be removed, it was removed from the UE5 source; it has to be re-added or the build will fail
361 if [[ ! -f ${pkgname}/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies ]]
362 then
363 mkdir -p "${srcdir}/${pkgname}/Engine/Source/ThirdParty/Linux/"
364 touch "${srcdir}/${pkgname}/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies"
365 sed -i "1c\This file must have no extension so that GitDeps considers it a binary dependency - it will only be pulled by the Setup script if Linux is enabled. Please do not remove this file." "${srcdir}/${pkgname}/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies"
366 fi
367
368 # Ensure UVS registration is non-interactive during package builds.
369 if [[ -f Setup.sh ]]; then
370 sed -i 's#UnrealVersionSelector-Linux-Shipping -register > /dev/null &#UnrealVersionSelector-Linux-Shipping -register -unattended > /dev/null \&#' Setup.sh
371 fi
372
373 mkdir -p "${srcdir}/git-deps"
374 ./Setup.sh --cache="${srcdir}/git-deps"
375 cd "${srcdir}/${pkgname}/Engine/Build/BatchFiles/Linux/" || return
376
377 ## This should just be working, but somehow isn't: https://aur.archlinux.org/packages/unreal-engine#comment-986166
378 #./Engine/Build/BatchFiles/Linux/SetupToolchain.sh
379 ## So, we're doing this instead:
380 mkdir -p "${srcdir}/${pkgname}/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/"
381 tar -xvf "${srcdir}/${UE_SDK_VERSION}.tar.gz" -C "${srcdir}/${pkgname}/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/"
382
383 "${srcdir}"/"${pkgname}"/Engine/Build/BatchFiles/Linux/BuildThirdParty.sh
384 "${srcdir}"/"${pkgname}"/Engine/Build/BatchFiles/Linux/SetupDotnet.sh
385 "${srcdir}"/"${pkgname}"/Engine/Build/BatchFiles/Linux/FixDependencyFiles.sh
386
387 if [[ "${UE_WITH_ANDROID}" == "yes" ]]; then
388 "${srcdir}"/"${pkgname}"/Engine/Extras/Android/SetupAndroid.sh
389 fi
390}
391
392build() {
393 cd "${pkgname}" || return
394
395 # Rebuild UBT from patched source so the pre-built dll is replaced before BuildGraph runs.
396 # RunUBT.sh skips the rebuild when InstalledBuild.txt exists, so we must do it explicitly here.
397 dotnet build "Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj" \
398 -c Development \
399 -o "Engine/Binaries/DotNET/UnrealBuildTool" \
400 --no-self-contained \
401 -p:GenerateDocumentationFile=false
402
403 if [[ $? -ne 0 ]]; then
404 msg 'Error: Failed to rebuild UnrealBuildTool.'
405 exit $?
406 fi
407
408 "Engine/Build/BatchFiles/RunUAT.sh" BuildGraph \
409 -target="Make Installed Build Linux" \
410 -script=Engine/Build/InstalledEngineBuild.xml \
411 -nosign \
412 -set:WithDDC="${UE_WITH_DDC}" \
413 -set:WithLinux="${UE_WITH_LINUX}" \
414 -set:WithLinuxArm64="${UE_WITH_LINUX_ARM}" \
415 -set:WithWin64="${UE_WITH_WIN64}" \
416 -set:WithMac="${UE_WITH_MAC}" \
417 -set:WithAndroid="${UE_WITH_ANDROID}" \
418 -set:WithIOS="${UE_WITH_IOS}" \
419 -set:WithTVOS="${UE_WITH_TVOS}" \
420 -set:GameConfigurations="${UE_GAME_CONFIGURATIONS}" \
421 -set:WithFullDebugInfo="${UE_WITH_FULL_DEBUG_INFO}"
422
423 if [[ $? -ne 0 ]]; then
424 msg "Error: Build failed; try searching the output for suspicious messages." >&2
425 return;
426 fi
427}
428
429package() {
430 # Desktop entry
431 if [[ ! -f com.unrealengine.UE5Editor.desktop && -f com.unrealengine.UE4Editor.desktop ]]; then
432 cp com.unrealengine.UE4Editor.desktop com.unrealengine.UE5Editor.desktop
433 fi
434
435 sed -i "7c\Exec=/usr/bin/unreal-engine %U" com.unrealengine.UE5Editor.desktop
436 sed -i "14c\Path=/usr/bin/" com.unrealengine.UE5Editor.desktop
437 install -Dm644 com.unrealengine.UE5Editor.desktop "${pkgdir}/usr/share/applications/com.unrealengine.UE5Editor.desktop"
438 chmod +x "${pkgdir}/usr/share/applications/com.unrealengine.UE5Editor.desktop"
439
440 ## Install a pacman hook to keep old builds from compounding cache by tens of GBs - 2 builds alone can reach at least 30 GBs in pacman's cache; having one only takes up about 15 GBs
441 install -Dm775 unreal-engine-5-pacman-cache.hook "${pkgdir}/etc/pacman.d/hooks/unreal-engine-5-pacman-cache.hook"
442
443 install -dm755 "${pkgdir}/usr/bin"
444 install -dm755 "${pkgdir}/usr/share/pixmaps/"
445 install -dm755 "${pkgdir}/usr/share/applications/"
446
447 # Icon for Desktop entry
448 if [[ "${UE_USE_DEFAULT_LOGO_AT_INSTALL}" == "1" ]]; then
449 install -Dm644 ue5editor.svg "${pkgdir}/usr/share/pixmaps/ue5editor.svg"
450 else
451 mv ue5editor.svg ue5editor.svg.bak
452 wget --output-document "ue5editor.svg" "https://raw.githubusercontent.com/EliverLara/candy-icons/master/apps/scalable/ue4editor.svg"
453 install -Dm644 ue5editor.svg "${pkgdir}/usr/share/pixmaps/ue5editor.svg"
454 wget --output-document "LICENSE" "https://raw.githubusercontent.com/EliverLara/candy-icons/master/LICENSE"
455 mkdir -p "${pkgdir}/usr/share/UnrealEngine/EliverLara-candy-icons/"
456 install -Dm644 LICENSE "${pkgdir}/usr/share/UnrealEngine/EliverLara-candy-icons/"
457 rm ue5editor.svg
458 rm LICENSE
459 mv ue5editor.svg.bak ue5editor.svg
460 fi
461
462 # License
463 install -Dm644 "${srcdir}/${pkgname}/LICENSE.md" "${pkgdir}/usr/share/licenses/UnrealEngine/LICENSE.md"
464
465 # Engine
466 install -dm755 "${pkgdir}/${UE_INSTALL_DIR}/Engine"
467
468 # Copy LocalBuilds to pkg...
469 rsync -a "${srcdir}/${pkgname}/LocalBuilds/Engine/Linux/" "${pkgdir}/${UE_INSTALL_DIR}/"
470 if [[ -f "${srcdir}/${pkgname}/LocalBuilds/Engine/Linux/Engine/Binaries/Linux/UnrealEditor" ]]; then
471 # Can never be too careful with recursive rm...
472 rm -r "${srcdir}/${pkgname}/LocalBuilds"
473 fi
474
475 # BuildGraph's FinalizeInstalledBuild stages this file, carrying the identifier the engine registers
476 # itself under in ~/.config/Epic/UnrealEngine/Install.ini and that the editor stamps into every project
477 # it creates as "EngineAssociation". Its absence makes UBT fall back to a unique build environment and
478 # refuse to build projects against the engine.
479 if [[ ! -f "${pkgdir}/${UE_INSTALL_DIR}/Engine/Build/InstalledBuild.txt" ]]; then
480 error "BuildGraph did not stage Engine/Build/InstalledBuild.txt; the engine would not register as installed."
481 exit 1
482 fi
483
484 # Copy the rest of it to pkg... Should we be overwriting LocalBuilds?
485 rsync -a --exclude='Intermediate/' "${srcdir}/${pkgname}/" "${pkgdir}/${UE_INSTALL_DIR}/"
486
487 # The BuildGraph staging copies the unpatched UBT DLL from CsTools into LocalBuilds,
488 # which then overwrites our patched build. Re-stamp both locations with the patched DLL.
489 local _ubtsrcdir="${srcdir}/${pkgname}/Engine/Source/Programs/UnrealBuildTool"
490 local _ubtpkgdir="${pkgdir}/${pkgname}/${UE_INSTALL_DIR}/Engine/Binaries/DotNET/UnrealBuildTool"
491
492 if [[ -x "$(find "${pkgdir}/${UE_INSTALL_DIR}" -type f -iname 'xbuild')" ]]; then
493 find "${pkgdir}/${UE_INSTALL_DIR}" -type f -iname 'xbuild' -exec chmod +x "{}" \;
494 fi
495
496 if [[ -x "$(find "${pkgdir}/${UE_INSTALL_DIR}" -type f -iname 'mcs')" ]]; then
497 find "${pkgdir}/${UE_INSTALL_DIR}" -type f -iname 'mcs' -exec chmod +x "{}" \;
498 fi
499
500 ## Do this, in case the path doesn't exist for some reason
501 mkdir -p "${pkgdir}/${UE_INSTALL_DIR}/Engine/Binaries/Android/"
502
503 # Launch script to initialize missing user folders for Unreal Engine
504 install -Dm755 "${srcdir}/unreal-engine.sh" "${pkgdir}/usr/bin/unreal-engine"
505 chmod +x "${pkgdir}/usr/bin/unreal-engine"
506 ln -s "${pkgdir}/usr/bin/unreal-engine" "${pkgdir}/usr/bin/ue5"
507 ln -s "${pkgdir}/usr/bin/unreal-engine" "${pkgdir}/usr/bin/UE5"
508 ln -s "${pkgdir}/usr/bin/unreal-engine" "${pkgdir}/usr/bin/unreal-engine-5"
509 chmod 755 "${pkgdir}/usr/bin/ue5" "${pkgdir}/usr/bin/UE5" "${pkgdir}/usr/bin/unreal-engine-5"
510
511 # Configuring the launch script to detect when it has been run for the first time
512 # Note: Requires that there isn't already a UE5 desktop entry in "${HOME}/local/share/applications/" - delete yours if you have one there before installing this
513 DesktopFileChecksum=$(sha256sum "${pkgdir}/usr/share/applications/com.unrealengine.UE5Editor.desktop" | cut -f 1 -d ' ')
514 sed -i "s|ChecksumPlaceholder|${DesktopFileChecksum}|" "${pkgdir}/usr/bin/unreal-engine"
515 sed -i "s|InstalledLocationPlaceholder|/${UE_INSTALL_DIR}/Engine/Binaries|" "${pkgdir}/usr/bin/unreal-engine"
516
517 # Ship the resolved install prefix so the .install scriptlet can locate the tree
518 # even when a custom UE_INSTALL_DIR was used at build time.
519 printf '/%s\n' "${UE_INSTALL_DIR#/}" \
520 | install -Dm644 /dev/stdin "${pkgdir}/usr/share/${pkgname}/install-prefix"
521
522 # Bake group-writability into the package so members of the 'unreal' group can
523 # write engine build/runtime artifacts without a manual chown. The group OWNER
524 # is set at install time by the scriptlet, since a -r group's GID is unknown here.
525 chmod -R g+w "${pkgdir}/${UE_INSTALL_DIR}"
526 find "${pkgdir}/${UE_INSTALL_DIR}" -type d -exec chmod g+s {} +
527}
528

Changes since previous scan

--- PKGBUILD @ 2026-09-12 00:25
+++ PKGBUILD @ 2026-09-17 00:27
@@ -8,7 +8,7 @@
# The source is about 200 MiB, with an extra ~11 GiB of dependencies downloaded in Setup.sh, and may take several hours to compile.
# If you want additional options, there are switches below.
pkgname=unreal-engine
-pkgver=5.8.0
+pkgver=5.8.2
pkgrel=1
## Check unreal-engine/Engine/Config/Linux/Linux_SDK.json (MainVersion value) for what the below should be set to
UE_SDK_VERSION="native-linux-v26_clang-20.1.8-rockylinux8"
@@ -249,6 +249,24 @@
# Causes a SEGV during derived data cache build if not set
export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
+# The Roslyn compiler server coordinates its startup through named mutexes, which .NET backs with
+# lock files under ${TMPDIR}/.dotnet/shm on Linux.
+#
+# Concurrent MSBuild nodes racing on those files intermittently make ReleaseMutex throw, surfacing
+# as
+#
+# MSB3883: Unexpected exception: ReleaseMutex failed. WaitOne Id: <n> Release Id: <n>
+#
+# on whichever C# projects happened to compile at that moment.
+#
+# Compiling in-process sidesteps the server entirely; the engine builds few enough C# assemblies
+# for the lost process reuse not to matter. MSBuild reads this as a global property, so it also
+# covers the compilations BuildGraph and UAT spawn.
+export UseSharedCompilation=false
+
+# Leftover reuse nodes outlive makepkg and carry stale state into the next build
+export MSBUILDDISABLENODEREUSE=1
+
prepare() {
if [[ "${UE_WITH_ANDROID}" == "yes" ]]; then
if ! pacman -Q android-studio >/dev/null 2>&1; then
@@ -454,9 +472,14 @@
rm -r "${srcdir}/${pkgname}/LocalBuilds"
fi
- # Ensure InstalledBuild.txt is present so UBT treats this as an installed engine,
- # preventing the "unique build environment" error when building projects.
- printf '%s' "${pkgver}" | install -Dm644 /dev/stdin "${pkgdir}/${UE_INSTALL_DIR}/Engine/Build/InstalledBuild.txt"
+ # BuildGraph's FinalizeInstalledBuild stages this file, carrying the identifier the engine registers
+ # itself under in ~/.config/Epic/UnrealEngine/Install.ini and that the editor stamps into every project
+ # it creates as "EngineAssociation". Its absence makes UBT fall back to a unique build environment and
+ # refuse to build projects against the engine.
+ if [[ ! -f "${pkgdir}/${UE_INSTALL_DIR}/Engine/Build/InstalledBuild.txt" ]]; then
+ error "BuildGraph did not stage Engine/Build/InstalledBuild.txt; the engine would not register as installed."
+ exit 1
+ fi
# Copy the rest of it to pkg... Should we be overwriting LocalBuilds?
rsync -a --exclude='Intermediate/' "${srcdir}/${pkgname}/" "${pkgdir}/${UE_INSTALL_DIR}/"
@@ -478,7 +501,7 @@
mkdir -p "${pkgdir}/${UE_INSTALL_DIR}/Engine/Binaries/Android/"
# Launch script to initialize missing user folders for Unreal Engine
- install -Dm755 ../unreal-engine.sh "${pkgdir}/usr/bin/unreal-engine"
+ install -Dm755 "${srcdir}/unreal-engine.sh" "${pkgdir}/usr/bin/unreal-engine"
chmod +x "${pkgdir}/usr/bin/unreal-engine"
ln -s "${pkgdir}/usr/bin/unreal-engine" "${pkgdir}/usr/bin/ue5"
ln -s "${pkgdir}/usr/bin/unreal-engine" "${pkgdir}/usr/bin/UE5"

Scan history

Scanned at (UTC)SeverityRules
2026-09-17 00:27:14 Low 3
2026-09-16 00:03:17 Low 3
2026-09-15 00:25:31 Low 3
2026-09-14 00:27:57 Low 3
2026-09-13 00:19:54 Low 3
2026-09-12 23:12:46 Medium 2
2026-09-12 00:25:17 Low 3
2026-09-11 00:19:22 Low 3
2026-09-10 00:22:44 Low 3
2026-09-09 00:04:09 Low 3
2026-09-08 00:18:08 Low 3
2026-09-07 00:30:15 Low 3
2026-09-06 00:17:06 Low 3
2026-09-05 00:16:27 Low 3
2026-09-04 00:03:13 Low 3
2026-09-03 00:15:47 Low 3
2026-09-02 00:02:31 Low 3
2026-09-01 00:11:19 Low 3
2026-08-31 00:19:57 Low 3
2026-08-30 00:04:14 Low 3

Report a package

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

0 / 4000
Your suggestion