brother-brscan4: update to 0.4.11
Testing the changes
- I tested the changes in this PR: briefly
Local build testing
- I built this PR locally for my native architecture,
x86_64-glibc
Along the way, I have also made the package template look closer
to brother-brscan5. That practically means:
- Adding symlink in /etc/opt/... to configuration files in /opt/...
- Handle udev rule
Also, I have updated the README.voidlinux (URL mentioned in there was
not valid anymore) AND added brscan_{c,g}netconfig files to the
package. Else, "brsaneconfig4" would complain when adding a new device.
moving the config file will break the package for users
moving the config file will break the package for users
Good catch! What about something like this as install hooks?
INSTALL:
case "${ACTION}" in
pre)
# Copy any existing config file that is not a symlink
for config in Brsane4.ini brsanenetdevice4.cfg models4/; do
if [ ! -L /etc/opt/brother/scanner/brscan4/${config} ]; then
cp -r /etc/opt/brother/scanner/brscan4/${config} /tmp/${config}.brscan.upgrade
fi
done
post)
# If there exists any config file that should be migrated, handle it
for config in Brsane4.ini brsanenetdevice4.cfg models4/; do
if [ -e /tmp/${config}.brscan.upgrade ]; then
mv /tmp/${config}.brscan.upgrade /opt/brother/scanner/brscan4/${config}
fi
done
If you agree, then I'll invest more time in it and test it.
I'm not convinced moving these files to /opt is the right thing to do. /etc is the dir for local admin configs
I'm not convinced moving these files to /opt is the right thing to do. /etc is the dir for local admin configs
Sure! I don't feel strong about it either way. I will undo the changes related to the config files and push again.
For the record, brother-brscan5 package does keep the config files in /opt.
@classabbyamp , I'm afraid the brsaneconfig4 -q, which queries the added entries:
# brsaneconfig4 -a name=mybrother model=DCP-L8410CDW ip=1.2.3.4
$ brsaneconfig4 -q
* DCP-L8410CDW [ 1.2.3.4] mybrother
only works under these conditions:
- The
brsaneconfig4binary must be in/opt/brother/scanner/brscan4/brsaneconfig4. Hence, we cannot install it withvbin. We can only create a symlink in/usr/bin/. - The configuration files must reside in
/opt/brother/scanner/brscanr/and their symlinks in/etc/opt/....
If any of the 2 above is violated, there will be no output:
# brsaneconfig4 -a name=mybrother model=DCP-L8410CDW ip=1.2.3.4
$ brsaneconfig4 -q
Ping!
Is there anything that I can do to make the review process easier?
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.