epsonscan2
maintainer tecnotercio
· 25 votes
· scanned 2026-08-18 00:03:42.021799
LOW
View on AUR ↗
Why flagged
The package downloads source code and prebuilt plugin components from Epson's official download domain; while the host is not a common forge, it is plausibly the vendor's legitimate infrastructure, and the content consists of buildable source and necessary binary plugins for hardware support, with no obfuscated or executable payloads run during install.
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 downloads source code and prebuilt plugin components from Epson's official download domain; while the host is not a common forge, it is plausibly the vendor's legitimate infrastructure, and the content consists of buildable source and necessary binary plugins for hardware support, with no obfuscated or executable payloads run during install.
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:17
source=('https://download-center.epson.com/f/module/b35a1723-196e-44d9-b272-6cfd3e0e6349/epsonscan2-6.7.91.1-1.src.tar.gz'
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: Tércio Martins <echo dGVyY2lvd2VuZGVsQGdtYWlsLmNvbQo= | base64 -d>
2
3
_epsonscan2_non_free_plugin_version='1.0.0.6'
4
5
pkgname=epsonscan2
6
pkgver=6.7.91.1
7
_pkgver="$pkgver-1"
8
pkgrel=3
9
arch=('armv7h' 'x86_64')
10
pkgdesc="Epson scanner management utility"
11
url="https://download-center.epson.com/"
12
license=('GPL-3.0-or-later' 'LicenseRef-EULA')
13
depends=('libjpeg-turbo' 'libpng' 'libtiff' 'libusb' 'qt5-base' 'sane' 'zlib')
14
makedepends=('bbe' 'boost' 'cmake' 'qt5-singlecoreapplication' 'rapidjson')
15
conflicts=('epsonscan2-non-free-plugin')
16
options=('!buildflags')
17
source=('https://download-center.epson.com/f/module/b35a1723-196e-44d9-b272-6cfd3e0e6349/epsonscan2-6.7.91.1-1.src.tar.gz'
18
'0002-Fix-crash.patch'
19
'0003-Use-XDG-open-to-open-the-directory.patch'
20
'0005-Fix-folder-creation-crash.patch'
21
'0006-Fix-crash-no-serial-number.patch'
22
'0007-Detect-scanners-that-need-firmware.patch')
23
source_armv7h=('https://download-center.epson.com/f/module/da0de85f-55b8-449a-b761-0a9e2553da8a/epsonscan2-bundle-6.7.90.0.armv7l.deb.tar.gz')
24
source_x86_64=('https://download-center.epson.com/f/module/ee3a3a45-95aa-4c80-b14d-ad4cff5f7428/epsonscan2-bundle-6.7.90.0.x86_64.deb.tar.gz')
25
b2sums=('f13e3e80b57d98d534598827b1bb53c720dafbf0b667a2e1917da1c9b00cf382b1235a4d9f3af0bc764f4943a42f75a4a9705f525b87d8d2b50bcefbb7199d58'
26
'c763f16b2fac22b7ac0093228142a516222dc044533b7b320087f87b0fcad1f614ea93210f544f093f3e07c89220ab097901628a4d5dc57213bae505c4bebd58'
27
'e398e821704599be0b6ba9192c32411f92650f2e455b088718ba4b643562c21bc02044df30affe2b7ea99069cd0c1c59902e586e9de7e1bb9b3e0ae013c9e30d'
28
'5e2af573e616a6afaeb4b9035e54f5a0e05684f194a5fac52eb9ced619fdc156a62ab22bcf62af14a058f74d80a6606abf5e056ea720109c013624802d4b62e5'
29
'282a18ad086446f290d795141d63235e67416cea894945d2c65dac7ffa36b3288ef920ef627df349f06e5f482b16e8fa6dbd0064db4b701437a01b913bd8a3fb'
30
'5a3416356913438cfe901195198b0c00167d69f726ef2913e2dc209151d4c1b736c2a608e8b556bc201acc320548a56263f2782fdb79249c46e490ef756c2700')
31
b2sums_armv7h=('aeeffb7194b9d9ce2326ff351722c07d06530d106abf3cc4e00cb17c39508882d10b14524e996240dbb923fce459cd881b386cc67789328fe96c928068e71277')
32
b2sums_x86_64=('39e130cfb9c1207a4374136e5aa07fc409138c3a0e3db06bdb0363cfb4b0221b2975e7fdcdd80a29f4cebb03d1ddf4da96f6218a07e00b7bbf9838b8686cece1')
33
34
DLAGENTS=("https::/usr/bin/curl -A 'Mozilla' -fLC - --retry 3 --retry-delay 3 -o %o %u")
35
36
prepare() {
37
sed -i 's|/lib/udev|${CMAKE_INSTALL_PREFIX}/lib/udev|' \
38
"$srcdir/$pkgname-$_pkgver/CMakeLists.txt"
39
40
sed -i '1 i #include "zlib.h"' \
41
"$srcdir/$pkgname-$_pkgver/src/CommonUtility/DbgLog.cpp"
42
43
sed -i '/zlib/d' \
44
"$srcdir/$pkgname-$_pkgver/src/Controller/CMakeLists.txt"
45
46
# Stability improvements from Flatpak maintainers
47
# https://github.com/flathub/net.epson.epsonscan2
48
for file in 0002-Fix-crash \
49
0003-Use-XDG-open-to-open-the-directory \
50
0005-Fix-folder-creation-crash
51
do
52
patch --directory="$srcdir/$pkgname-$_pkgver" --forward --binary \
53
--strip=1 --input="$srcdir/$file.patch"
54
done
55
56
# Fix a bug when detecting a scanner that does not report its serial number
57
# https://github.com/duck7000/aur_epsonscan2/blob/main/0005-Fix-crash-no-serial-number.patch
58
for file in 0006-Fix-crash-no-serial-number \
59
0007-Detect-scanners-that-need-firmware
60
do
61
patch --directory="$srcdir/$pkgname-$_pkgver" --forward --binary \
62
--strip=1 --input="$srcdir/$file.patch"
63
done
64
65
# Remove Boost setting in CMake config that crashes the package build
66
find "$srcdir/$pkgname-$_pkgver" -type f -name CMakeLists.txt \
67
-exec sed -i '/BOOST_NO_CXX11_RVALUE_REFERENCES/d' {} \;
68
69
for file in Standalone/lastusedsettings.cpp \
70
Standalone/defaultsettings.cpp \
71
CommonUtility/ESCommonTypedef.h \
72
Controller/Src/KeysValues/Key.hpp \
73
Controller/Src/KeysValues/KeyMgr.hpp
74
do
75
sed -i '/BOOST_NO_CXX11_RVALUE_REFERENCES/d' \
76
"$srcdir/$pkgname-$_pkgver/src/$file"
77
done
78
79
# Remove support for older versions of CMake in the configuration scripts
80
# (needed to build the package)
81
for dir in . \
82
src \
83
src/Standalone \
84
src/ScanSDK \
85
src/ScanSDK/Src/SDK/SCANSDKsample_C++ \
86
src/DetectAlert
87
do
88
sed -Ei '/cmake_minimum_required/ s/2\.([0-9]+|\.)+/4.0/' \
89
"$srcdir/$pkgname-$_pkgver/$dir/CMakeLists.txt"
90
done
91
92
# Fix compilation failure caused by GCC 15
93
sed -i '/SET.*FLAGS/ s/")/ -Wno-template-body")/' \
94
"$srcdir/$pkgname-$_pkgver/src/ES2Command/Linux/CMakeLists.txt"
95
96
# Change directory references from "/usr/libexec" to "/usr/lib" in the source code
97
for file in Controller/Src/Scanner/Engine.cpp \
98
Controller/Src/Filter/GetOrientation.cpp
99
do
100
sed -i 's/libexec/lib/' \
101
"$srcdir/$pkgname-$_pkgver/src/$file"
102
done
103
104
# Disable building in debug mode
105
for file in CMakeLists.txt \
106
src/ES2Emulator/test/CMakeLists.txt \
107
src/ES2Emulator/Linux/CMakeLists.txt \
108
src/Controller/Test/CMakeLists.txt
109
do
110
sed -i '/CMAKE_BUILD_TYPE Debug/ s/^/#/' \
111
"$srcdir/$pkgname-$_pkgver/$file"
112
done
113
114
# Remove references to the source code in executables
115
sed -i "/add_subdir/ i add_compile_options(\"-fmacro-prefix-map=$(echo $srcdir)=.\")" \
116
"$srcdir/$pkgname-$_pkgver/CMakeLists.txt"
117
118
# Prepare plugin files
119
cd "$srcdir"/epsonscan2-bundle*/plugins
120
ar x epsonscan2-non-free-plugin*.deb
121
tar -xJf data.tar.xz -C "$srcdir"
122
123
# The “es2intif” program looks for libraries in the default Debian directory:
124
# /usr/lib/x86_64-linux-gnu/epsonscan2/
125
# This command updates to the path used in this package:
126
# /usr/lib/epsonscan2/
127
cd "$srcdir"/usr/lib/*/epsonscan2/non-free-exec
128
case $CARCH in
129
armv7h)
130
bbe -e "s|arm-linux-gnueabihf/epsonscan2/|epsonscan2/\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00|" es2intif > es2intif.alt
131
;;
132
x86_64)
133
bbe -e "s|x86_64-linux-gnu/epsonscan2/|epsonscan2/\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00|" es2intif > es2intif.alt
134
;;
135
esac
136
mv es2intif.alt es2intif
137
chmod +x es2intif
138
}
139
140
build() {
141
cmake $pkgname-$_pkgver \
142
-B build \
143
-DCMAKE_BUILD_TYPE=Release \
144
-DCMAKE_INSTALL_PREFIX=/usr \
145
-DEPSON_OCR_INSTALL_PATH="/usr/share/epsonscan2-ocr" \
146
-DQT_VERSION_MAJOR=5
147
148
cmake --build build
149
}
150
151
package() {
152
DESTDIR="$pkgdir" cmake --install build
153
154
install -Dm644 "$srcdir/$pkgname-$_pkgver/desktop/rpm/i686/$pkgname.desktop" \
155
"$pkgdir/usr/share/applications/$pkgname.desktop"
156
157
install -d $pkgdir/usr/lib/sane ; cd $pkgdir/usr/lib/sane
158
ln -s ../$pkgname/libsane-epsonscan2.so libsane-epsonscan2.so
159
ln -s ../$pkgname/libsane-epsonscan2.so libsane-epsonscan2.so.1
160
ln -s ../$pkgname/libsane-epsonscan2.so libsane-epsonscan2.so.1.0.0
161
162
# Package plugin files
163
install -d "$pkgdir/usr/lib/"
164
cd "$srcdir/usr"
165
cp -lr lib/*/epsonscan2* "$pkgdir/usr/lib" && rm -r lib/*/epsonscan2*
166
mv libexec/epsonscan2-ocr/ocr-engine-getrotate "$pkgdir/usr/lib/epsonscan2-ocr"
167
cp -lr share "$pkgdir/usr" && rm -r share
168
install -Dm644 "$pkgdir/usr/share/doc/$pkgname-non-free-plugin-${_epsonscan2_non_free_plugin_version}-1/copyright" \
169
"$pkgdir/usr/share/licenses/$pkgname/copyright_epsonscan2-non-free-plugin"
170
install -Dm644 "$pkgdir/usr/share/doc/$pkgname-non-free-plugin-${_epsonscan2_non_free_plugin_version}-1/COPYING.EPSON" \
171
"$pkgdir/usr/share/licenses/$pkgname/EULA_epsonscan2-non-free-plugin"
172
}
173
Changes since previous scan
--- PKGBUILD @ 2026-06-19 19:07+++ PKGBUILD @ 2026-08-18 00:03@@ -5,7 +5,7 @@ pkgname=epsonscan2 pkgver=6.7.91.1 _pkgver="$pkgver-1"-pkgrel=2+pkgrel=3 arch=('armv7h' 'x86_64') pkgdesc="Epson scanner management utility" url="https://download-center.epson.com/"@@ -101,6 +101,20 @@ "$srcdir/$pkgname-$_pkgver/src/$file" done + # Disable building in debug mode+ for file in CMakeLists.txt \+ src/ES2Emulator/test/CMakeLists.txt \+ src/ES2Emulator/Linux/CMakeLists.txt \+ src/Controller/Test/CMakeLists.txt+ do+ sed -i '/CMAKE_BUILD_TYPE Debug/ s/^/#/' \+ "$srcdir/$pkgname-$_pkgver/$file"+ done++ # Remove references to the source code in executables+ sed -i "/add_subdir/ i add_compile_options(\"-fmacro-prefix-map=$(echo $srcdir)=.\")" \+ "$srcdir/$pkgname-$_pkgver/CMakeLists.txt"+ # Prepare plugin files cd "$srcdir"/epsonscan2-bundle*/plugins ar x epsonscan2-non-free-plugin*.debScan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-18 00:03:42 | LOW | 2 |
| 2026-08-17 00:18:29 | LOW | 2 |
| 2026-08-16 00:03:42 | LOW | 2 |
| 2026-08-15 23:31:34 | MEDIUM | 1 |
| 2026-06-19 19:07:35 | CLEAN | 2 |
| 2026-06-18 18:04:49 | CLEAN | 2 |
| 2026-06-18 16:11:54 | MEDIUM | 1 |