canon-pixma-mp240-complete
maintainer swyter
· 2 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The package downloads a Debian driver tarball from the Internet Archive, which is a non-standard host, but the source is a legitimate Canon driver archive and the checksums are verified; the content is not executed remotely and is used only for building the package.
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-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a Debian driver tarball from the Internet Archive, which is a non-standard host, but the source is a legitimate Canon driver archive and the checksums are verified; the content is not executed remotely and is used only for building the package.
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:39
source=('https://web.archive.org/web/20191204161011if_/https://files.canon-europe.com/files/soft31325/Software/MP240_debian_drivers.tar'
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: swyter <swyterzone+aur@gmail.com>
2
3
# Based on canon-pixma-mp237-complete by cidtux <cidtux@gmail.com>, which was
4
# modified from canon-pixma-mx520-complete by Jeremy Sands <cto@jeremysands.com>
5
6
# Only tested with x86_64 architecture
7
8
9
# the combination of sane and simple-scan is better than the built-in scan utility, disabled by default (scangearmp)
10
# switch to 1 to include it in the package
11
enable_scangear=0
12
13
pkgname=canon-pixma-mp240-complete
14
pkgver=3.0
15
pkgrel=3
16
pkgdesc="Complete standalone driver set (printing and scanning) for Canon Pixma MP240 series"
17
url='https://www.canon-europe.com/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MP_series/PIXMA_MP240.aspx'
18
arch=('i686' 'x86_64')
19
license=('custom')
20
if [ "${CARCH}" = 'x86_64' ]; then
21
depends=('lib32-libcups' 'lib32-popt' 'lib32-libpng12' 'lib32-libusb-compat' 'lib32-libtiff4' 'lib32-gtk2')
22
elif [ "${CARCH}" = 'i686' ]; then
23
depends=('libcups' 'popt' 'libpng12' 'libusb-compat' 'libtiff4' 'gtk2')
24
fi
25
26
if [ ${enable_scangear} = 1 ]; then
27
28
makedepends=('sed' 'libarchive')
29
30
if [ "${CARCH}" = 'x86_64' ]; then
31
depends+=('lib32-gimp')
32
elif [ "${CARCH}" = 'i686' ]; then
33
depends+=('gimp')
34
fi
35
fi
36
37
38
39
source=('https://web.archive.org/web/20191204161011if_/https://files.canon-europe.com/files/soft31325/Software/MP240_debian_drivers.tar'
40
'canon-pixma-mp240-complete.license'
41
'canon-pixma-mp240-complete-scangear.desktop'
42
'canon-pixma-mp240-complete-scangear-icon.svg')
43
44
md5sums=('22ab0e74e6917009d2eecf8c229091d7'
45
'da88f987611a24e5a7cc55f9aa551a7a'
46
'dceb78d5f33dd207bdce53ae8c90e38d'
47
'dff9e4454eaa608292732582cb25842f')
48
49
50
extract_deb()
51
{
52
bsdtar -xf $1 --include data.tar.gz
53
bsdtar -xf data.tar.gz
54
rm data.tar.gz
55
}
56
57
build()
58
{
59
cd ${srcdir}
60
61
# 1- unpack driver source files
62
63
mkdir printer scangear
64
65
tar -xf MP240_debian_printer.tar -C printer --wildcards '*.deb'
66
if [ ${enable_scangear} = 1 ]; then
67
tar -xf MP240_debian_scangear.tar -C scangear --wildcards '*.deb'
68
fi
69
70
# 2- extract the printer-related stuff from the debian package
71
72
cd printer
73
74
extract_deb cnijfilter-common_3.00-1_i386.deb
75
extract_deb cnijfilter-mp240series_3.00-1_i386.deb
76
77
rm *.deb
78
79
cd ..
80
81
# 3- extract the scanner-related stuff from the debian package
82
83
if [ ${enable_scangear} = 1 ]; then
84
cd scangear
85
86
extract_deb scangearmp-common_1.20-1_i386.deb
87
extract_deb scangearmp-mp240series_1.20-1_i386.deb
88
89
rm *.deb
90
91
cd ..
92
fi
93
94
95
# 4- remove the intermediate packages
96
rm -v *.tar
97
}
98
99
package()
100
{
101
cd ${pkgdir}
102
103
# 1- copy recursively both package roots into the pkg dir, merging them nicely
104
105
cp -r ${srcdir}/printer/* .
106
107
if [ ${enable_scangear} = 1 ]; then
108
cp -r ${srcdir}/scangear/* .
109
fi
110
111
rm -rf ${srcdir}/printer
112
rm -rf ${srcdir}/scangear
113
114
# 2- move ppd file to where cups expects it to be
115
116
install -vDm 644 "${pkgdir}/usr/share/ppd/canonmp240.ppd" "${pkgdir}/usr/share/cups/model/canonmp240.ppd"
117
118
rm -vrf ${pkgdir}/usr/share/ppd
119
120
# 3- symbolic links for all the versioned libs, `printuimp240` needs `libcnbpcnclui341.so` and `libcnbpcmcm341.so` to work
121
122
#mv ${pkgdir}/usr/lib ${pkgdir}/usr/lib32
123
ln -s /usr/lib/libcnbpcmcm341.so.7.03.1 ${pkgdir}/usr/lib/libcnbpcmcm341.so
124
ln -s /usr/lib/libcnbpcnclapi341.so.3.3.2 ${pkgdir}/usr/lib/libcnbpcnclapi341.so
125
ln -s /usr/lib/libcnbpcnclbjcmd341.so.3.3.0 ${pkgdir}/usr/lib/libcnbpcnclbjcmd341.so
126
ln -s /usr/lib/libcnbpcnclui341.so.3.4.0 ${pkgdir}/usr/lib/libcnbpcnclui341.so
127
ln -s /usr/lib/libcnbpess341.so.3.1.1 ${pkgdir}/usr/lib/libcnbpess341.so
128
ln -s /usr/lib/libcnbpo341.so.1.0.3 ${pkgdir}/usr/lib/libcnbpo341.so
129
130
# 4- fix udev rules for the scanner, they're optional, just needed for scangear
131
132
if [ ${enable_scangear} = 1 ]; then
133
sed -i -e "s/SYSFS/ATTR/g" "${pkgdir}/etc/udev/rules.d/80-canon_mfp.rules"
134
fi
135
136
# 5- install custom license file
137
138
install -vDm 644 "${srcdir}/${pkgname}.license" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
139
140
# 6- install entry in application menu, including icon
141
if [ ${enable_scangear} = 1 ]; then
142
install -vDm 644 "${srcdir}/${pkgname}-scangear.desktop" "${pkgdir}/usr/share/applications/${pkgname}-scangear.desktop"
143
install -vDm 644 "${srcdir}/${pkgname}-scangear-icon.svg" "${pkgdir}/usr/share/pixmaps/${pkgname}-scangear-icon.svg"
144
fi
145
146
# 7- append this to the ppd to add a grayscale-only option to the printer settings
147
148
cat <<'EOF' >> "${pkgdir}/usr/share/cups/model/canonmp240.ppd"
149
150
*OpenUI *CNGrayscale/Grayscale: Boolean
151
*DefaultCNGrayscale: True
152
*CNGrayscale True/Yes: True
153
*CNGrayscale False/No: False
154
*CloseUI: *CNGrayscale
155
EOF
156
}
157
158
159
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 00:24:32 | LOW | 2 |
| 2026-07-26 00:07:32 | LOW | 2 |
| 2026-07-25 00:13:44 | LOW | 2 |
| 2026-07-24 00:02:28 | LOW | 2 |
| 2026-07-23 00:14:47 | LOW | 2 |
| 2026-07-22 00:29:32 | LOW | 2 |
| 2026-07-21 00:24:15 | LOW | 2 |
| 2026-07-20 00:19:49 | LOW | 2 |
| 2026-07-19 00:17:08 | LOW | 2 |
| 2026-07-18 00:14:48 | LOW | 2 |
| 2026-07-17 00:06:16 | LOW | 2 |
| 2026-07-16 00:05:41 | LOW | 2 |
| 2026-07-15 00:09:25 | LOW | 2 |