bluez-switch2

LOW
maintainer novakpetya 0 votes scanned 2026-09-03 11:53:08.798154
View on AUR
Why flagged

The package builds BlueZ from official source with a patch for Switch 2 controller support; the low severity is due to unverified sources (SKIP'd checksums) and few recent votes, but it does not execute untrusted binaries or exfiltrate data.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Low AI review llm_review

An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is LOW (confidence 95%): The package builds BlueZ from official source with a patch for Switch 2 controller support; the low severity is due to unverified sources (SKIP'd checksums) and few recent votes, but it does not execute untrusted binaries or exfiltrate data.

PKGBUILD

1# Maintainer: novakpetya
2
3pkgname=bluez-switch2
4_bluezver=5.87
5_switch2ver=0.1.0
6pkgver="${_bluezver}.switch2.${_switch2ver}"
7pkgrel=1
8pkgdesc="Bluetooth LE transport support for Nintendo Switch 2 Joy-Con controllers on Linux"
9arch=('x86_64')
10url="https://github.com/novakpetya/bluez-switch2"
11license=('GPL-2.0-only')
12
13install=bluez-switch2.install
14
15depends=(
16 'alsa-lib'
17 'dbus'
18 'glib2'
19 'glibc'
20 'systemd-libs'
21)
22
23makedepends=(
24 'alsa-lib'
25 'cups'
26 'dbus'
27 'ell'
28 'git'
29 'json-c'
30 'libical'
31 'python-docutils'
32 'python-pygments'
33 'readline'
34 'systemd'
35)
36
37provides=(
38 "bluez=${_bluezver}"
39)
40
41conflicts=(
42 'bluez'
43)
44
45backup=(
46 'etc/bluetooth/main.conf'
47 'etc/bluetooth/input.conf'
48 'etc/bluetooth/network.conf'
49)
50
51options=('!debug')
52
53source=(
54 "bluez::git+https://github.com/bluez/bluez.git#tag=${_bluezver}"
55 "bluez-switch2::git+https://github.com/novakpetya/bluez-switch2.git#tag=v${_switch2ver}"
56)
57sha256sums=('SKIP' 'SKIP')
58
59prepare() {
60 cd "$srcdir/bluez"
61
62 install -Dm644 \
63 "$srcdir/bluez-switch2/switch2.c" \
64 plugins/switch2.c
65
66 if ! grep -q '^builtin_modules += switch2$' Makefile.plugins; then
67 printf '\n# Nintendo Joy-Con 2 BLE transport\nbuiltin_modules += switch2\nbuiltin_sources += plugins/switch2.c\n' \
68 >> Makefile.plugins
69 fi
70
71 ./bootstrap
72}
73
74build() {
75 cd "$srcdir/bluez"
76
77 ./configure \
78 --prefix=/usr \
79 --mandir=/usr/share/man \
80 --sysconfdir=/etc \
81 --localstatedir=/var \
82 --libexecdir=/usr/lib \
83 --with-dbusconfdir=/usr/share \
84 --with-dbussystembusdir=/usr/share/dbus-1/system-services \
85 --with-systemdsystemunitdir=/usr/lib/systemd/system \
86 --enable-library \
87 --enable-tools \
88 --enable-deprecated
89
90 make
91}
92
93check() {
94 cd "$srcdir/bluez"
95
96 grep -q 'switch2' src/builtin.h || {
97 echo "error: switch2 is missing from BlueZ builtin plugin table"
98 return 1
99 }
100
101 strings src/bluetoothd | grep -q 'switch2:' || {
102 echo "error: switch2 is missing from bluetoothd"
103 return 1
104 }
105}
106
107package() {
108 cd "$srcdir/bluez"
109
110 rm -rf "$srcdir/stage"
111 make DESTDIR="$srcdir/stage" install
112
113 # Match Arch's normal `bluez` daemon package file split.
114
115 install -Dm755 \
116 "$srcdir/stage/usr/lib/bluetooth/bluetoothd" \
117 "$pkgdir/usr/lib/bluetooth/bluetoothd"
118
119 install -Dm644 \
120 "$srcdir/stage/etc/bluetooth/main.conf" \
121 "$pkgdir/etc/bluetooth/main.conf"
122 install -Dm644 \
123 "$srcdir/stage/etc/bluetooth/input.conf" \
124 "$pkgdir/etc/bluetooth/input.conf"
125 install -Dm644 \
126 "$srcdir/stage/etc/bluetooth/network.conf" \
127 "$pkgdir/etc/bluetooth/network.conf"
128
129 install -Dm644 \
130 "$srcdir/stage/usr/lib/systemd/system/bluetooth.service" \
131 "$pkgdir/usr/lib/systemd/system/bluetooth.service"
132 install -Dm644 \
133 "$srcdir/stage/usr/share/dbus-1/system-services/org.bluez.service" \
134 "$pkgdir/usr/share/dbus-1/system-services/org.bluez.service"
135 install -Dm644 \
136 "$srcdir/stage/usr/share/dbus-1/system.d/bluetooth.conf" \
137 "$pkgdir/usr/share/dbus-1/system.d/bluetooth.conf"
138
139 install -Dm644 \
140 "$srcdir/stage/usr/share/man/man8/bluetoothd.8" \
141 "$pkgdir/usr/share/man/man8/bluetoothd.8"
142
143 install -dm755 "$pkgdir/usr/lib/modprobe.d"
144 printf '%s\n' 'options btusb reset=1' \
145 > "$pkgdir/usr/lib/modprobe.d/bluetooth-usb.conf"
146
147 install -dm755 "$pkgdir/usr/lib/modules-load.d"
148 printf '%s\n' 'crypto_user' \
149 > "$pkgdir/usr/lib/modules-load.d/bluez.conf"
150
151 install -dm755 "$pkgdir/usr/share/doc/bluez/dbus-apis"
152
153 local doc
154 for doc in \
155 errors.txt \
156 intel-variants.txt \
157 mesh-api.txt \
158 pics-opp.txt \
159 pixit-opp.txt \
160 pts-opp.txt \
161 settings-storage.txt \
162 supported-features.txt \
163 test-coverage.txt
164 do
165 if [[ -f "doc/$doc" ]]; then
166 install -m644 "doc/$doc" \
167 "$pkgdir/usr/share/doc/bluez/dbus-apis/$doc"
168 fi
169 done
170}
171

Scan history

Scanned at (UTC)SeverityRules
2026-09-03 11:53:08 Low 2

Report a package

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

0 / 4000
Your suggestion