brother-mfc-j880dw

maintainer duczen · 1 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The package downloads source and binary blobs from Brother's official download domain (download.brother.com), which is a legitimate vendor host; the build process compiles only the CUPS configuration tool from source and installs prebuilt drivers, which is standard for proprietary printer drivers on Linux.

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 source and binary blobs from Brother's official download domain (download.brother.com), which is a legitimate vendor host; the build process compiles only the CUPS configuration tool from source and installs prebuilt drivers, which is standard for proprietary printer drivers on Linux.

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/dlf102036/${_brotherlnd}lpr-${pkgver}-${pkgrel}.i386.rpm"

PKGBUILD

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

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