brother-mfc-j5910dw

maintainer blob42 · 3 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The package downloads Brother's official driver source and binaries from brother.com, which is the vendor's legitimate domain; the non-whitelisted host is part of Brother's official download infrastructure, and the build process compiles only the CUPS wrapper from source while using prebuilt but vendor-provided LPR binaries, which is standard for proprietary printer drivers.

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 Brother's official driver source and binaries from brother.com, which is the vendor's legitimate domain; the non-whitelisted host is part of Brother's official download infrastructure, and the build process compiles only the CUPS wrapper from source while using prebuilt but vendor-provided LPR binaries, which is standard for proprietary printer drivers.

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:45 "http://download.brother.com/welcome/dlf006597/${_brotherlnd}lpr-${pkgver}-${_brpkgrel}.i386.rpm"

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Chakib Benziane chakib.benz+aur aATt gmail dott com
2# Category: system
3
4# The cups binary is 64 bit. Until Brother releases source for the 32 bit lpr
5# binary blobs, 64 bit users must enable multilib.
6
7# This has not been tested with non cups lprng.
8
9# NOTE 1: Remember to add user to lp group using
10# gpasswd -a USER lp
11# NOTE 2: Remember to logout after adding groups
12# NOTE 3: Set each printer default Media Size to Letter with
13# lpadmin -p BR5910 -o media=Letter
14
15set -u
16_brotheru='MFC-J5910DW'
17_brotherl="${_brotheru,,}" # mfc-0000dw
18_brotherlnd="${_brotherl//-/}" # mfc0000dw
19_brotherund="${_brotheru//-/}" # MFC0000DW
20pkgname="brother-${_brotherl}"
21pkgver='3.0.0'
22_brpkgrel='1'
23pkgrel='1'
24pkgdesc="LPR and CUPS driver for the Brother ${_brotheru} printer"
25arch=('i686' 'x86_64')
26url='http://solutions.brother.com/linux/en_us/'
27license=('custom:Brother Industries')
28depends=('cups' 'ghostscript' 'psutils' 'a2ps' 'sed' 'grep')
29depends_x86_64=('lib32-glibc')
30# We look at the scripts and find these programs from which we decide on the depends above.
31# gs: lpr rendering
32# pdf2ps: cups rendering
33# a2ps: rendering ascii text files
34# (not) pstops: pdf resizing
35# psnup: printing n-up pages
36# sed grep awk
37# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670055
38# Printing a text file fails when Liberation is the only TrueType font available
39optdepends=('ttf-dejavu: printing text files from lpr'
40 'brscan4: Scanner support')
41#install="${pkgname}.install"
42# The cups wrapper uses the lpr driver.
43_brsource="${_brotherlnd}_cupswrapper_GPL_source_${pkgver}-${_brpkgrel}"
44source=(
45 "http://download.brother.com/welcome/dlf006597/${_brotherlnd}lpr-${pkgver}-${_brpkgrel}.i386.rpm"
46 "http://download.brother.com/welcome/dlf006599/${_brotherlnd}cupswrapper-${pkgver}-${_brpkgrel}.i386.rpm"
47 "http://download.brother.com/welcome/dlf006810/${_brsource}.tar.gz"
48 'cupswrapper-license.txt'
49 'lpr-license.txt'
50)
51sha256sums=('7e029e2b6545105968c91456d8d1ccc7b3c5eaa2ecfb3deb0ebf8b61f250bb8e'
52 '4741d32f5a3c60d00688ae45aedebddc3491b9ef52d4dfee429f6fa98c8e2c0f'
53 '0f592b90f19f7cf79b730c09402014c9269fcfe46968a03b413d5f2300a9b69e'
54 '2c6aa6a641332e5c87e971ac2a8beae13b059747bdba331bbd515914770d72d9'
55 '9d85a8aafdaac8fac80e04234ad2acf5642bbf0b91ee582d2a89519a55f6dd67')
56
57build() {
58 set -u
59 # Do not Install in '/usr/local'. Does not apply to all Brother models.
60 # This may modify binary blobs which only
61 # works when the old and new strings are exactly the same length.
62 if [ -d "${srcdir}/usr/local/Brother" ]; then
63 install -dm755 "${srcdir}/usr/share"
64 mv "${srcdir}/usr/local/Brother/" "${srcdir}/usr/share/brother"
65 rm -rf "${srcdir}/usr/local"
66 sed -i -e 's:/usr/local/Brother:/usr/share/brother:g' $(grep -lr '/usr/local/Brother' ./)
67 fi
68
69 # setup cups-directories
70 install -dm755 "${srcdir}/usr/lib/cups/filter"
71 install -dm755 "${srcdir}/usr/share/cups/model"
72 #install -dm755 "${srcdir}/usr/share/ppd" # For cups we don't need the ppd file here.
73
74 # Get the dirs and the name of the wrapper. Either in /opt or /usr.
75 # This is set up to adapt or crash. Unlike false, ${} shows the line number.
76 cd "${srcdir}/opt" 2>/dev/null || cd "${srcdir}/usr"
77 local _rcfile="$(find "`pwd`" -type f -ipath "*inf/br${_brotherund}rc")"
78 test -f "${_rcfile}" || echo "${}"
79 local _bindir="$(find "`pwd`" -type d -name 'cupswrapper')"
80 test -d "${_bindir}" || echo "${}" # die if blank or invalid before we rm something we don't want to
81 local _binname="$(find "${_bindir}/" -type 'f' -name 'brcupscon*' -print -quit)"
82 test -x "${_binname}" || echo "${}"
83 rm -f "${_bindir}"/* # We download the cups driver only to throw it all away. All I want is the dir and bin name without hunting for it in the installer.
84 local _basedir="${srcdir}/${_brsource}"
85 test -d "${_basedir}" || echo "${}"
86 cd "${_basedir}/cupswrapper" 2>/dev/null || cd "${_basedir}/scripts" 2>/dev/null || cd "${_basedir}"
87 local _wrapdir="$(pwd)"
88 cd "${_wrapdir}"
89 local _wrapper_source="$(echo cupswrapper${_brotherund}*)"
90 if ! test -f "${_wrapper_source}"; then
91 _wrapper_source="$(echo cupswrapper*)"
92 test -f "${_wrapper_source}" || echo "${}"
93 fi
94 cd "${_basedir}"/brcups*
95 local _makedir="$(pwd)"
96 if cd "${_basedir}/PPD" 2>/dev/null || cd "${_basedir}/ppd" 2>/dev/null; then
97 local _ppddir="$(pwd)"
98 fi
99
100 # Source is available for the cups binary, not the lpr binaries so we can't
101 # get away from multilib. Any usage of /opt is hardcoded into some binaries
102 # for which we can't find an equal length replacement so we can't easily get
103 # rid of that either.
104 cd "${_makedir}"
105 if [ -s 'Makefile' ]; then
106 make -s
107 cp -p 'brcupsconfig' "${_binname}"
108 else
109 # Not sure why it's called brcupsconfig3 some places and brcupsconfig4 in others.
110 # The version in their binary matches the version in the source so it looks good to me.
111 # gcc options are pulled from other Brother makefiles.
112 gcc -pipe -Wall -W -O2 -s -o "${_binname}" 'brcupsconfig.c'
113 fi
114
115 cd "${_bindir}"
116 if [ ! -z "${_ppddir:-}" ]; then
117 # Use the ppd supplied in the source
118 cp -p "${_ppddir}"/*.ppd "${_bindir}/"
119 chmod 644 "${_bindir}"/*.ppd
120 fi
121
122 # Some Brother installers create files here
123 mkdir -p "${srcdir}/var/tmp"
124
125 # Fix any sbin reference in the lpr driver. The cups driver uses bin.
126 #sed -i -e 's:/sbin/:/bin/:g' $(find "${srcdir}/usr" -type f -name 'psconvert2')
127
128 # Fix page shifted off center that affects some printers
129 # Letter prints off center shifted down and right with PaperType=A4
130 # I can only test printing A4 on Letter paper. A4 appears to print correctly with PaperType=Letter
131 sed -i -e 's:^\(PaperType\)=.\+$:\1=Letter:g' "${_rcfile}"
132
133 # Modify the installer so we can finish the install here in PKGBUILD.
134 cp -p "${_wrapdir}/${_wrapper_source}" "${_bindir}/"
135 #cp -p "${_wrapper_source}" "${_wrapper_source}.Arch" # debug: diff compare with Total Commander
136 sed -i -e '# Install to _srcdir. Some folders may not apply to this model.' \
137 -e 's:/usr:${_srcdir}&:g' \
138 -e 's:/opt:${_srcdir}&:g' \
139 -e 's:/var:${_srcdir}&:g' \
140 -e "# Stop the Install script after the files are generated. cups doesn't require a reload to see the printer driver." \
141 -e 's:^if \[ -e /etc/init:exit 0 #Arch Linux Compatible\n&:g' \
142 "${_wrapper_source}"
143 grep -lq "#Arch Linux Compatible" "${_wrapper_source}" || echo "${}"
144 test -f "${_wrapper_source}.Arch" && echo "${}" # Halt for debugging
145 # Generate PPD and wrapper. Use sh -x to debug
146 # Possible bug: copying to /usr/share/ppd is disabled.
147 export _srcdir="${srcdir}"
148 sh -e "${_wrapper_source}" -i
149 unset _srcdir
150
151 rm -rf "${srcdir}/var"
152
153 # Remove srcdir from the generated wrapper file.
154 # No paths in the generated ppd.
155 sed -i -e '# Remove the ${_srcdir} variety' \
156 -e 's:${_srcdir}::' \
157 -e '# Remove the /home/... variety' \
158 -e "s:${srcdir}::" "${srcdir}/usr/lib/cups/filter"/*lpdwrapper*
159
160 # We did everything in the installer so we can get rid of it.
161 rm -f "${_wrapper_source}"
162 set +u
163}
164
165package() {
166 set -u
167 local _dir
168 # /var/spool is not used anywhere in this package. Maybe it's needed for non cups lprng.
169 for _dir in 'usr' 'opt'; do # 'var'
170 if [ -d "${srcdir}/${_dir}" ]; then
171 cp -pR "${srcdir}/${_dir}" "${pkgdir}"
172 fi
173 done
174
175 # /etc/printcap is managed by cups. This eliminates any need for a printcap helper.
176 rm -f "`find "${pkgdir}" -type f -name 'setupPrintcap*'`"
177
178 # Ensure we got a ppd and a filter for CUPS
179 test "$(find "${pkgdir}/usr/share/cups/model" -type f -name '*.ppd')"
180 test "$(find "${pkgdir}/usr/lib/cups/filter/" -type f)"
181
182 # Ensure there are no forbidden paths
183 ! grep -alqr "/sbin" "${pkgdir}" || echo "${}"
184 ! grep -alqr "/usr/tmp" "${pkgdir}" || echo "${}"
185
186 install -Dm644 'cupswrapper-license.txt' "${pkgdir}/usr/share/licenses/${pkgname}/cupswrapper-licence.txt"
187 install -Dm644 'lpr-license.txt' "${pkgdir}/usr/share/licenses/${pkgname}/lpr-licence.txt"
188 set +u
189}
190set +u
191

Scan history

Scanned at (UTC)SeverityRules
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

Report a package

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

0 / 4000
Your suggestion