librewolf-allow-dark

LOW
maintainer Mecso 7 votes scanned 2026-08-31 00:19:57.373659
View on AUR
Why flagged

The source is a tarball from librewolf.dev, which is plausibly the project's own domain; building from project-owned source, even on a non-whitelisted host, is normal for AUR packages and not inherently dangerous.

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 is a tarball from librewolf.dev, which is plausibly the project's own domain; building from project-owned source, even on a non-whitelisted host, is normal for AUR packages and not inherently dangerous.

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:100 https://librewolf.dev/api/packages/librewolf/generic/librewolf-source/$_pkgver/librewolf-$_pkgver.source.tar.gz{,.sig}

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: mecso2
2
3pkgname=librewolf-allow-dark
4_pkgname=librewolf
5provides=(librewolf)
6conflicts=(librewolf)
7# The pkgver should always ends with a trailing ".0" for "round" release, so "155.0_1" should instead be "155.0.0_1" for instance
8# Otherwise, we will face version comparison issues: "warning: librewolf: local (154.0_2-1) is newer than extra-testing (154.0.1_2-1)"
9# We therefore "re-compute" the pkgver to match the actual upstream version scheme in the custom _pkgver variable, see README.md for more details
10pkgver=154.0.1_2
11# Extract the first part of the pkgver, this represents the Firefox release this LibreWolf release is based on
12_firefoxver="${pkgver%_*}"
13# Remove any trailing ".0" to match the real Firefox version, as "round" Firefox releases actually doesn't contain it,
14# (despite what https://www.firefox.com/en-US/releases/ is showing)
15# For "155.0.0" this will result in "155.0", for "155.0.1" it won't change anything
16_realfirefoxver="${_firefoxver%.0}"
17# Extract the second part of the pkgver, this represents the Librewolf release
18_librewolfver="${pkgver#*_}"
19# Combine the "re-computed" pkgver (which actually matches the upstream version scheme) into a custom _pkgver variable
20_pkgver="${_realfirefoxver}-${_librewolfver}"
21pkgrel=1
22pkgdesc="Librewolf with the privacy.override_rfp_for_color_scheme about:config option added, which (if enabled) let's you change the color scheme even if rfp is turned on"
23url="https://librewolf.net/"
24arch=(x86_64 aarch64)
25license=(MPL-2.0)
26
27depends=(
28 alsa-lib
29 at-spi2-core
30 bash
31 cairo
32 dbus
33 ffmpeg
34 fontconfig
35 freetype2
36 gdk-pixbuf2
37 glib2
38 glibc
39 gtk3
40 hicolor-icon-theme
41 libgcc
42 libpulse
43 libstdc++
44 libx11
45 libxcb
46 libxcomposite
47 libxdamage
48 libxext
49 libxfixes
50 libxrandr
51 libxss
52 libxt
53 mime-types
54 nspr
55 nss
56 pango
57 ttf-font
58)
59makedepends=(
60 cbindgen
61 clang
62 diffutils
63 git
64 imake
65 jack
66 jq
67 lld
68 llvm
69 mesa
70 nasm
71 nodejs
72 onnxruntime
73 python
74 rust
75 unzip
76 wasi-compiler-rt
77 wasi-libc
78 wasi-libc++
79 wasi-libc++abi
80 xorg-server-xvfb
81 yasm
82 zip
83)
84optdepends=(
85 'hunspell-dictionary: Spell checking'
86 'libnotify: Notification integration'
87 'networkmanager: Location detection via available WiFi networks'
88 'speech-dispatcher: Text-to-Speech'
89 'xdg-desktop-portal: Screensharing with Wayland'
90)
91
92options=(
93 !debug
94 !emptydirs
95 !lto
96 !makeflags
97)
98
99source=(
100 https://librewolf.dev/api/packages/librewolf/generic/librewolf-source/$_pkgver/librewolf-$_pkgver.source.tar.gz{,.sig}
101 $_pkgname.desktop
102 allow_dark.patch
103)
104
105sha256sums=('87f8f3eb9766cf25a1f3e8231a7304d3977a90d21fe269702074b9d5acc8df29'
106 'SKIP'
107 '3d6ac59ae9d5ba4c9fe15f95c1338fa68214dec6119f8432336403e3be50f8ae'
108 '16841807098201ea8577ed391f24282a761bd265cfd3f959da920f241a11e8fe')
109
110validpgpkeys=('662E3CDD6FE329002D0CA5BB40339DD82B12EF16') # https://rpm.librewolf.net/pubkey.gpg
111
112
113prepare() {
114 mkdir -p mozbuild
115 cd librewolf-$_pkgver
116
117 local src
118 for src in "${source[@]}"; do
119 src="${src%%::*}"
120 src="${src##*/}"
121 src="${src%.zst}"
122 [[ $src = *.patch ]] || continue
123 echo "Applying patch $src..."
124 patch -Np1 < "../$src"
125 done
126
127 mv mozconfig ../mozconfig
128
129 cat >>../mozconfig <<END
130mk_add_options MOZ_OBJDIR=${PWD@Q}/obj
131
132ac_add_options --prefix=/usr
133ac_add_options --enable-release
134ac_add_options --enable-hardening
135ac_add_options --enable-optimize
136ac_add_options --enable-rust-simd
137ac_add_options --enable-linker=lld
138ac_add_options --disable-install-strip
139ac_add_options --disable-bootstrap
140ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
141
142# Branding
143ac_add_options --with-app-name=${_pkgname}
144export MOZ_APP_REMOTINGNAME=${_pkgname}
145
146# Language packs
147ac_add_options --with-l10n-base=$PWD/lw/l10n
148
149# System libraries
150ac_add_options --with-system-nspr
151ac_add_options --with-system-nss
152
153# Features
154# keep alsa option in here until merged upstream
155ac_add_options --enable-alsa
156ac_add_options --enable-jack
157ac_add_options --enable-pulseaudio
158ac_add_options --disable-updater
159END
160
161 # reduce chance of builds failung during linking due to running out of memory
162 export LDFLAGS+=" -Wl,--no-keep-memory"
163
164 # upstream Arch fixes
165
166}
167
168pkgver() {
169 # Ensure the pkgver is properly formatted to avoid eventual version comparison issues
170 # See README.md for more details
171 echo "$pkgver" | sed -E 's/^([0-9]+\.[0-9]+)_/\1.0_/'
172}
173
174build() {
175 cd librewolf-$_pkgver
176
177 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=pip
178 export MOZBUILD_STATE_PATH="$srcdir/mozbuild"
179 export MOZ_BUILD_DATE="$(date -u${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH} +%Y%m%d%H%M%S)"
180 export MOZ_NOSPAM=1
181
182 # malloc_usable_size is used in various parts of the codebase
183 CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
184 CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
185
186 # Breaks compilation since https://bugzilla.mozilla.org/show_bug.cgi?id=1896066
187 CFLAGS="${CFLAGS/-fexceptions/}"
188 CXXFLAGS="${CXXFLAGS/-fexceptions/}"
189
190 # LTO needs more open files
191 ulimit -n 4096
192
193 # temporarily disable ublock-origin, interferes with profiling
194 cp "lw/policies.json" "$srcdir/policies.json"
195 jq 'del(.policies.Extensions.Install)' "$srcdir/policies.json" > "lw/policies.json"
196
197 # Do 3-tier PGO
198 echo "Building instrumented browser..."
199 cat >.mozconfig ../mozconfig - <<END
200ac_add_options --enable-profile-generate=cross
201END
202 ./mach build --priority normal
203
204 echo "Profiling instrumented browser..."
205 ./mach package
206 LLVM_PROFDATA=llvm-profdata JARLOG_FILE="$PWD/jarlog" \
207 dbus-run-session \
208 xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \
209 ./mach python build/pgo/profileserver.py
210
211 stat -c "Profile data found (%s bytes)" merged.profdata
212 test -s merged.profdata
213
214 stat -c "Jar log found (%s bytes)" jarlog
215 test -s jarlog
216
217 echo "Removing instrumented browser..."
218 ./mach clobber objdir
219
220 # reenable ublock-origin
221 cp "$srcdir/policies.json" "lw/policies.json"
222
223 echo "Building optimized browser..."
224 cat >.mozconfig ../mozconfig - <<END
225ac_add_options --enable-lto=cross
226ac_add_options --enable-profile-use=cross
227ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata
228ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog
229END
230 ./mach build --priority normal
231
232 # Re-package built sources including language packs
233 xargs ./mach package-multi-locale --locales < browser/locales/shipped-locales
234}
235
236package() {
237 cd librewolf-$_pkgver
238
239 # The `install` target doesn't install the language packs generated with the `package-multi-locale` target
240 # We are therefore "manually" copying the packaged browser to the relevant directory in `$pkgdir` instead
241 #DESTDIR="$pkgdir" ./mach install
242 local appdir="$pkgdir/usr/lib/$_pkgname"
243 install -dvm755 "$appdir/"
244 cp -a obj/dist/librewolf/. "$appdir/"
245 touch "$appdir/is-packaged-app"
246
247 install -Dvm644 /dev/stdin "$appdir/browser/defaults/preferences/vendor.js" <<END
248// Use system-provided dictionaries
249pref("spellchecker.dictionary_path", "/usr/share/hunspell");
250
251// Don't disable extensions in the application directory
252// done in librewolf.cfg
253// pref("extensions.autoDisableScopes", 11);
254END
255
256 install -Dvm644 /dev/stdin "$appdir/distribution/distribution.ini" <<END
257[Global]
258id=io.gitlab.${_pkgname}-community
259version=1.0
260about=LibreWolf
261
262[Preferences]
263app.distributor="LibreWolf Community"
264app.distributor.channel=$_pkgname
265app.partner.librewolf=$_pkgname
266END
267
268 # Install desktop icons and metadata
269 local i theme=librewolf
270 for i in 16 32 48 64 128 256; do
271 install -Dvm644 browser/branding/$theme/default$i.png \
272 "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$_pkgname.png"
273 done
274 install -Dvm644 browser/branding/$theme/content/about-logo.png \
275 "$pkgdir/usr/share/icons/hicolor/192x192/apps/$_pkgname.png"
276 install -Dvm644 browser/branding/$theme/content/about-logo@2x.png \
277 "$pkgdir/usr/share/icons/hicolor/384x384/apps/$_pkgname.png"
278
279 # Librewolf is missing an svg logo
280 install -Dvm644 browser/branding/${theme}/default16.png \
281 "$pkgdir/usr/share/icons/hicolor/symbolic/apps/$_pkgname-symbolic.png"
282
283 # Install desktop file
284 install -Dvm644 ../$_pkgname.desktop "$pkgdir/usr/share/applications/$_pkgname.desktop"
285
286 # Install a wrapper to avoid confusion about binary path
287 install -Dvm755 /dev/stdin "$pkgdir/usr/bin/$_pkgname" <<END
288#!/bin/sh
289exec /usr/lib/$_pkgname/librewolf "\$@"
290END
291
292 # Replace duplicate binary with wrapper
293 # https://bugzilla.mozilla.org/show_bug.cgi?id=658850
294 ln -srfv "$pkgdir/usr/bin/$_pkgname" "$appdir/librewolf-bin"
295
296 # Use system certificates
297 if [[ -e $appdir/libnss3.so ]]; then
298 ln -sfv ../libnssckbi.so -t "$appdir"
299 fi
300}
301
302# vim: ts=2 sw=2 et:
303

Changes since previous scan

--- PKGBUILD @ 2026-08-12 15:24
+++ PKGBUILD @ 2026-08-31 00:19
@@ -1,19 +1,23 @@
# Maintainer: mecso2
-# run pgo build or not; with X(vfb) or wayland
-: ${_build_profiled:=true}
-: ${_build_profiled_xvfb:=true}
-
pkgname=librewolf-allow-dark
+_pkgname=librewolf
provides=(librewolf)
conflicts=(librewolf)
-__pkgname=librewolf
-_pkgname=LibreWolf
-epoch=1
-pkgver=153.0.1_1
-_fixedfirefoxver="${pkgver%_*}" # Version of Firefox this LibreWolf version is based on, but the Firefox patch number is always included
+# The pkgver should always ends with a trailing ".0" for "round" release, so "155.0_1" should instead be "155.0.0_1" for instance
+# Otherwise, we will face version comparison issues: "warning: librewolf: local (154.0_2-1) is newer than extra-testing (154.0.1_2-1)"
+# We therefore "re-compute" the pkgver to match the actual upstream version scheme in the custom _pkgver variable, see README.md for more details
+pkgver=154.0.1_2
+# Extract the first part of the pkgver, this represents the Firefox release this LibreWolf release is based on
+_firefoxver="${pkgver%_*}"
+# Remove any trailing ".0" to match the real Firefox version, as "round" Firefox releases actually doesn't contain it,
+# (despite what https://www.firefox.com/en-US/releases/ is showing)
+# For "155.0.0" this will result in "155.0", for "155.0.1" it won't change anything
+_realfirefoxver="${_firefoxver%.0}"
+# Extract the second part of the pkgver, this represents the Librewolf release
_librewolfver="${pkgver#*_}"
-_firefoxver="${_fixedfirefoxver%.0}" # Removes ".0" from the end. For "136.0.0" this will result in "136.0" but for "136.0.1" won't do anything.
+# Combine the "re-computed" pkgver (which actually matches the upstream version scheme) into a custom _pkgver variable
+_pkgver="${_realfirefoxver}-${_librewolfver}"
pkgrel=1
pkgdesc="Librewolf with the privacy.override_rfp_for_color_scheme about:config option added, which (if enabled) let's you change the color scheme even if rfp is turned on"
url="https://librewolf.net/"
@@ -21,11 +25,11 @@
license=(MPL-2.0)
depends=(
- dbus
alsa-lib
at-spi2-core
bash
cairo
+ dbus
ffmpeg
fontconfig
freetype2
@@ -34,7 +38,9 @@
glibc
gtk3
hicolor-icon-theme
+ libgcc
libpulse
+ libstdc++
libx11
libxcb
libxcomposite
@@ -51,13 +57,11 @@
ttf-font
)
makedepends=(
- binutils
cbindgen
clang
diffutils
git
imake
- inetutils
jack
jq
lld
@@ -65,18 +69,18 @@
mesa
nasm
nodejs
- pciutils
+ onnxruntime
python
- python-setuptools
rust
unzip
wasi-compiler-rt
+ wasi-libc
wasi-libc++
wasi-libc++abi
- wasi-libc
+ xorg-server-xvfb
yasm
zip
- ) # pciutils: only to avoid some PGO warning(?)
+)
optdepends=(
'hunspell-dictionary: Spell checking'
'libnotify: Notification integration'
@@ -85,21 +89,6 @@
'xdg-desktop-portal: Screensharing with Wayland'
)
-if [[ "${_build_profiled}" == "true" ]]; then
- if [[ "${_build_profiled_xvfb}" == "true" ]]; then
- makedepends+=(
- xorg-server-xvfb
- )
- else
- makedepends+=(
- weston
- wlheadless-run # aur/xwayland-run-git
- )
- fi
-fi
-
-backup=('usr/lib/librewolf/librewolf.cfg'
- 'usr/lib/librewolf/distribution/policies.json')
options=(
!debug
!emptydirs
@@ -108,44 +97,53 @@
)
source=(
- https://codeberg.org/api/packages/librewolf/generic/librewolf-source/$_firefoxver-$_librewolfver/librewolf-$_firefoxver-$_librewolfver.source.tar.gz{,.sig}
- $__pkgname.desktop
- "default192x192.png"
+ https://librewolf.dev/api/packages/librewolf/generic/librewolf-source/$_pkgver/librewolf-$_pkgver.source.tar.gz{,.sig}
+ $_pkgname.desktop
allow_dark.patch
)
-sha256sums=('4c0c110b08b71375db967ebab583ad03d9d659fe1f4a42e14f9f4dbbf8e04c9d'
- 'SKIP'
+sha256sums=('87f8f3eb9766cf25a1f3e8231a7304d3977a90d21fe269702074b9d5acc8df29'
+ 'SKIP'
'3d6ac59ae9d5ba4c9fe15f95c1338fa68214dec6119f8432336403e3be50f8ae'
- '959c94c68cab8d5a8cff185ddf4dca92e84c18dccc6dc7c8fe11c78549cdc2f1'
- '716da9615afbb3f30b88df1b25e91cfa61a16bba8c847b1ad87f9345c1d3cc80')
+ '16841807098201ea8577ed391f24282a761bd265cfd3f959da920f241a11e8fe')
+
validpgpkeys=('662E3CDD6FE329002D0CA5BB40339DD82B12EF16') # https://rpm.librewolf.net/pubkey.gpg
+
prepare() {
mkdir -p mozbuild
- cd librewolf-$_firefoxver-$_librewolfver
-
- patch -p1 -i ../allow_dark.patch
+ cd librewolf-$_pkgver
+
+ local src
+ for src in "${source[@]}"; do
+ src="${src%%::*}"
+ src="${src##*/}"
+ src="${src%.zst}"
+ [[ $src = *.patch ]] || continue
+ echo "Applying patch $src..."
+ patch -Np1 < "../$src"
+ done
mv mozconfig ../mozconfig
cat >>../mozconfig <<END
-
+mk_add_options MOZ_OBJDIR=${PWD@Q}/obj
+
+ac_add_options --prefix=/usr
+ac_add_options --enable-release
+ac_add_options --enable-hardening
+ac_add_options --enable-optimize
+ac_add_options --enable-rust-simd
ac_add_options --enable-linker=lld
-
-ac_add_options --prefix=/usr
-
+ac_add_options --disable-install-strip
ac_add_options --disable-bootstrap
-
-export CC='clang'
-export CXX='clang++'
+ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
# Branding
-ac_add_options --with-app-name=${__pkgname}
-
-export MOZ_APP_REMOTINGNAME=${__pkgname}
-
-# Langauge packs
+ac_add_options --with-app-name=${_pkgname}
+export MOZ_APP_REMOTINGNAME=${_pkgname}
+
+# Language packs
ac_add_options --with-l10n-base=$PWD/lw/l10n
# System libraries
@@ -157,41 +155,8 @@
ac_add_options --enable-alsa
ac_add_options --enable-jack
ac_add_options --enable-pulseaudio
-
-# wasi
-ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
-
-# options for ci / weaker build systems
-# mk_add_options MOZ_MAKE_FLAGS="-j4"
-# ac_add_options --enable-linker=gold
-
-# optimizations
-ac_add_options OPT_LEVEL="2"
-ac_add_options RUSTC_OPT_LEVEL="2"
-END
-
-if [[ "${CARCH}" == "aarch64" ]]; then
- cat >>../mozconfig <<END
-# TODO: re-evaluate (is used by ALARM, but why?)
-ac_add_options --enable-optimize="-g0 -O2"
-
-ac_add_options --enable-lto
-END
-
- export MOZ_DEBUG_FLAGS=" "
- export CFLAGS+=" -g0"
- export CXXFLAGS+=" -g0"
- export RUSTFLAGS="-Cdebuginfo=0"
-
-else
-
- cat >>../mozconfig <<END
-# Arch upstream has it in their PKGBUILD, ALARM does not for aarch64:
-ac_add_options --disable-elf-hack
-
-ac_add_options --enable-lto=cross
-END
-fi
+ac_add_options --disable-updater
+END
# reduce chance of builds failung during linking due to running out of memory
export LDFLAGS+=" -Wl,--no-keep-memory"
@@ -200,9 +165,14 @@
}
+pkgver() {
+ # Ensure the pkgver is properly formatted to avoid eventual version comparison issues
+ # See README.md for more details
+ echo "$pkgver" | sed -E 's/^([0-9]+\.[0-9]+)_/\1.0_/'
+}
build() {
- cd librewolf-$_firefoxver-$_librewolfver
+ cd librewolf-$_pkgver
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=pip
export MOZBUILD_STATE_PATH="$srcdir/mozbuild"
@@ -217,114 +187,64 @@
CFLAGS="${CFLAGS/-fexceptions/}"
CXXFLAGS="${CXXFLAGS/-fexceptions/}"
- # LTO/PGO needs more open files
+ # LTO needs more open files
ulimit -n 4096
+ # temporarily disable ublock-origin, interferes with profiling
+ cp "lw/policies.json" "$srcdir/policies.json"
+ jq 'del(.policies.Extensions.Install)' "$srcdir/policies.json" > "lw/policies.json"
+
# Do 3-tier PGO
-
-
- if [[ "${_build_profiled}" == "true" ]]; then
- if [[ "${CARCH}" == "aarch64" ]]; then
-
- cat >.mozconfig ../mozconfig - <<END
-ac_add_options --enable-profile-generate
-export MOZ_ENABLE_FULL_SYMBOLS=1
-END
-
- else
-
- cat >.mozconfig ../mozconfig - <<END
+ echo "Building instrumented browser..."
+ cat >.mozconfig ../mozconfig - <<END
ac_add_options --enable-profile-generate=cross
-export MOZ_ENABLE_FULL_SYMBOLS=1
-END
-
- fi
-
- # temporarily disable ublock-origin, interferes with profiling
- cp "lw/policies.json" "$srcdir/policies.json"
- jq 'del(.policies.Extensions.Install)' "$srcdir/policies.json" > "lw/policies.json"
-
- echo "Building instrumented browser..."
-
- ./mach build --priority normal
-
- echo "Profiling instrumented browser..."
-
- ./mach package
-
- local _headless_env=(
- LIBGL_ALWAYS_SOFTWARE=true \
- LLVM_PROFDATA=llvm-profdata \
- JARLOG_FILE="$PWD/jarlog" \
- dbus-run-session
- )
-
- if [[ "${_build_profiled_xvfb}" == "true" ]]; then
- local _headless_run=(
- xvfb-run
- -s "-screen 0 1920x1080x24 -nolisten local"
- )
- else
- local _headless_run=(
- wlheadless-run
- -c weston --width=1920 --height=1080
- )
- fi
-
- env "${_headless_env[@]}" "${_headless_run[@]}" -- ./mach python build/pgo/profileserver.py
-
- echo "Removing instrumented browser..."
- ./mach clobber objdir
-
- echo "Building optimized browser..."
-
- if [[ -s merged.profdata ]]; then
- stat -c "Profile data found (%s bytes)" merged.profdata
-
- if [[ "${CARCH}" == "x86_64" ]]; then
- cat >.mozconfig ../mozconfig - <<END
-ac_add_options --enable-profile-use
-END
- else
- cat >.mozconfig ../mozconfig - <<END
+END
+ ./mach build --priority normal
+
+ echo "Profiling instrumented browser..."
+ ./mach package
+ LLVM_PROFDATA=llvm-profdata JARLOG_FILE="$PWD/jarlog" \
+ dbus-run-session \
+ xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \
+ ./mach python build/pgo/profileserver.py
+
+ stat -c "Profile data found (%s bytes)" merged.profdata
+ test -s merged.profdata
+
+ stat -c "Jar log found (%s bytes)" jarlog
+ test -s jarlog
+
+ echo "Removing instrumented browser..."
+ ./mach clobber objdir
+
+ # reenable ublock-origin
+ cp "$srcdir/policies.json" "lw/policies.json"
+
+ echo "Building optimized browser..."
+ cat >.mozconfig ../mozconfig - <<END
+ac_add_options --enable-lto=cross
ac_add_options --enable-profile-use=cross
-END
- fi
-
- cat >> .mozconfig - << END
ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata
-END
- else
- echo "Profile data not found."
- fi
-
- if [[ -s jarlog ]]; then
- stat -c "Jar log found (%s bytes)" jarlog
- cat >> .mozconfig - << END
ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog
END
- else
- echo "Jar log not found."
- fi
-
- # reenable ublock-origin
- cp "$srcdir/policies.json" "lw/policies.json"
-
- else
- cat >.mozconfig ../mozconfig
- fi
-
./mach build --priority normal
+
+ # Re-package built sources including language packs
+ xargs ./mach package-multi-locale --locales < browser/locales/shipped-locales
}
package() {
- cd librewolf-$_firefoxver-$_librewolfver
- DESTDIR="$pkgdir" ./mach install
-
-
- local vendorjs="$pkgdir/usr/lib/$__pkgname/browser/defaults/preferences/vendor.js"
-
- install -Dvm644 /dev/stdin "$vendorjs" <<END
+ cd librewolf-$_pkgver
+
+ # The `install` target doesn't install the language packs generated with the `package-multi-locale` target
+ # We are therefore "manually" copying the packaged browser to the relevant directory in `$pkgdir` instead
+ #DESTDIR="$pkgdir" ./mach install
+ local appdir="$pkgdir/usr/lib/$_pkgname"
+ install -dvm755 "$appdir/"
+ cp -a obj/dist/librewolf/. "$appdir/"
+ touch "$appdir/is-packaged-app"
+
+ install -Dvm644 /dev/stdin "$appdir/browser/defaults/preferences/vendor.js" <<END
// Use system-provided dictionaries
pref("spellchecker.dictionary_path", "/usr/share/hunspell");
@@ -333,49 +253,51 @@
// pref("extensions.autoDisableScopes", 11);
END
- local distini="$pkgdir/usr/lib/$__pkgname/distribution/distribution.ini"
- install -Dvm644 /dev/stdin "$distini" <<END
-
+ install -Dvm644 /dev/stdin "$appdir/distribution/distribution.ini" <<END
[Global]
-id=io.gitlab.${__pkgname}-community
+id=io.gitlab.${_pkgname}-community
version=1.0
about=LibreWolf
[Preferences]
app.distributor="LibreWolf Community"
-app.distributor.channel=$__pkgname
-app.partner.librewolf=$__pkgname
-END
-
- for i in 16 32 48 64 128; do
- install -Dvm644 browser/branding/${__pkgname}/default$i.png \
- "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$__pkgname.png"
+app.distributor.channel=$_pkgname
+app.partner.librewolf=$_pkgname
+END
+
+ # Install desktop icons and metadata
+ local i theme=librewolf
+ for i in 16 32 48 64 128 256; do
+ install -Dvm644 browser/branding/$theme/default$i.png \
+ "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$_pkgname.png"
done
- # install -Dvm644 browser/branding/librewolf/content/about-logo.png \
- # "$pkgdir/usr/share/icons/hicolor/192x192/apps/$__pkgname.png"
- install -Dvm644 ${srcdir}/default192x192.png \
- "$pkgdir/usr/share/icons/hicolor/192x192/apps/$__pkgname.png"
-
- # arch upstream provides a separate svg for this. we don't have that, so let's re-use 16.png
- install -Dvm644 browser/branding/${__pkgname}/default16.png \
- "$pkgdir/usr/share/icons/hicolor/symbolic/apps/$__pkgname-symbolic.png"
-
- install -Dvm644 ../$__pkgname.desktop \
- "$pkgdir/usr/share/applications/$__pkgname.desktop"
+ install -Dvm644 browser/branding/$theme/content/about-logo.png \
+ "$pkgdir/usr/share/icons/hicolor/192x192/apps/$_pkgname.png"
+ install -Dvm644 browser/branding/$theme/content/about-logo@2x.png \
+ "$pkgdir/usr/share/icons/hicolor/384x384/apps/$_pkgname.png"
+
+ # Librewolf is missing an svg logo
+ install -Dvm644 browser/branding/${theme}/default16.png \
+ "$pkgdir/usr/share/icons/hicolor/symbolic/apps/$_pkgname-symbolic.png"
+
+ # Install desktop file
+ install -Dvm644 ../$_pkgname.desktop "$pkgdir/usr/share/applications/$_pkgname.desktop"
# Install a wrapper to avoid confusion about binary path
- install -Dvm755 /dev/stdin "$pkgdir/usr/bin/$__pkgname" <<END
+ install -Dvm755 /dev/stdin "$pkgdir/usr/bin/$_pkgname" <<END
#!/bin/sh
-exec /usr/lib/$__pkgname/librewolf "\$@"
+exec /usr/lib/$_pkgname/librewolf "\$@"
END
# Replace duplicate binary with wrapper
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
- ln -srfv "$pkgdir/usr/bin/$__pkgname" "$pkgdir/usr/lib/$__pkgname/librewolf-bin"
+ ln -srfv "$pkgdir/usr/bin/$_pkgname" "$appdir/librewolf-bin"
+
# Use system certificates
- local nssckbi="$pkgdir/usr/lib/$__pkgname/libnssckbi.so"
- if [[ -e $nssckbi ]]; then
- ln -srfv "$pkgdir/usr/lib/libnssckbi.so" "$nssckbi"
+ if [[ -e $appdir/libnss3.so ]]; then
+ ln -sfv ../libnssckbi.so -t "$appdir"
fi
}
+# vim: ts=2 sw=2 et:
+

Scan history

Scanned at (UTC)SeverityRules
2026-08-31 00:19:57 Low 2
2026-08-30 23:44:22 Medium 1
2026-08-12 15:24:23 Clean 0
2026-06-27 16:30:12 Clean 0
2026-06-18 16:11:54 Clean 0

Report a package

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

0 / 4000
Your suggestion