Solved unavailable package due licensing issue (epsonscan2-non-free-plugin)

Hi, I am a new user of FreeBSD 15.

Currently I migrate all my applications and workflows. Most is running (Linuxulator is a friend). But now I face a problem.

I am using my Epson ET-5850 as a network printer (CUPS). Now I want to use the scanner of the same device. I need the epsonscan2-non-free-plugin, which is required for the graphics/epsonscan2 scanner driver to access the scanner over network.

epsonscan2-non-free-plugin cannot be distributed as binary because of a licensing issue. Long story short: There is a port graphics/epsonscan2-non-free-plugin. But I am running a distribution sets based installation. The handbook warns:
... it is generally ill-advised to use the Ports Collection in conjunction with the binary packages provided via pkg to install software ...

My questions:
  1. How to get the epsonscan2-non-free-plugin installed avoiding a mix of ports and packages?
  2. If 1. this is not possible: How can I install the port in a save (for my package based system) way?
  3. As a third option which comes to my mind: I tried the Linux version of VueScan on FreeBSD (Linuxulator) and configured the IP in prefs, but got a message "no scanner found". Maybe someone successfully setup VueScan and can provide me with instructions on how to do it?

Any ideas on how I can use my scanner over the network are welcome.
 
the same section of the handbook also advises
If the Ports Collection and pkg must be used in conjunction, then be sure that the Ports Collection and pkg are on the same branch release of the ports tree.

this is how you accomplish #2 safely — match branches between your ports tree and your package repo.
 
How to get the epsonscan2-non-free-plugin installed avoiding a mix of ports and packages?
You can't (or you have to go 100% via ports).

As long as you install a package via ports that no other packages depend on, there is no problem. And that would be the case for you.

But: A port may today depend on newer packages than you can obtain via pkg (e.g. if you use quarterly, you are only in sync with the ports tree at the beginning of each quarter). In this case these packages will be updated too, and your updated packages have not been tested in combination with the rest. But this should not be the case for you either.

How can I install the port in a save (for my package based system) way?
First, ensure that your system is up to date:
pkg upgrade
The ports tree is available via git. If you don't have git installed, there are several packages with different levels of functionality available. One option would be this one:
pkg install git-tiny
Now get the ports tree:
git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/ports
If you use quarterly packages (default), you can also explicitly retrieve the ports tree that matches those packages:
git clone --depth 1 https://git.FreeBSD.org/ports.git -b 2025Q4 /usr/ports
I never did that, and f.e. since security updates are rolled back to quarterly that not in sync either… Anyway, the current ports tree should be fine in your case. To install a port, you have to change to its directory:
cd /usr/ports/graphics/epsonscan2-non-free-plugin/
The next step only makes sense if you mix packages and ports (and only because it's not as bad as often claimed this function exists): We fetch all package dependencies for a compiler run via packages:
make install-missing-packages
Now compile the port:
make
If that worked, we can install it:
make install
Clean up #1:
make clean
Clean up #2: We may now have packages that were only needed for the compiler run. These can be removed again:
pkg autoremove
Be careful: Read the output. If there is something you need, you should reinstall it afterwards. However, if you have been careful with the pkg tool so far, nothing can be accidentally uninstalled here: Explicitly installed packages are marked as such - these are not removed by a "autoremove".
I tried the Linux version of VueScan on FreeBSD
The only paid software here, and the only reason one server still doesn't run FreeBSD.
 
Thank you all for your help! I will go through jmos' instructions. But I still have one question:

If I update my system with freebsd-update (quarterly) and pkg update in the future, I may also need a newer port version of epsonscan2-non-free-plugin. What is the correct procedure here? Would this be save to proceed:

cd /usr/ports/graphics/epsonscan2-non-free-plugin/
make uninstall epsonscan2-non-free-plugin
cd
rm -R /usr/ports/*
cd /usr/ports
# start again
git clone --depth 1 https://git.FreeBSD.org/ports.git -b 2026Q1 /usr/ports
 
Before uninstall it is better to compile it. However update the ports tree or if you deleted it, install it again with git, the way jmos said. If you did not deleted it, update it:
Code:
cd /usr/ports
git pull
Follow the same instruction by jmos shown above up to make install (excluded), then if the build succeeded, in the directory of the port execute:
Code:
make deinstall
make reinstall
 
Hey, you are all awesome!

I followed your instructions and installed the port. I autoremoved the packages that were only needed for the compiler run. Now my scanner works over network with epsonscan2, skanlite and skanpage...

Thank you all for your help! 🙏
 
If I update my system with freebsd-update (quarterly) and pkg update in the future, I may also need a newer port version of epsonscan2-non-free-plugin. What is the correct procedure here?
[…]
cd /usr/ports/graphics/epsonscan2-non-free-plugin/
Doing anything with ports: First take sure that it is up to date. As long that's not the case there's nothing to do inside the ports tree.
make uninstall epsonscan2-non-free-plugin
Won't work. To uninstall via make the port name isn't needed - it uses the port of the actual directory. make deinstall is what you're trying to do here. But as make install installs the compiled port as a package, you could also execute pkg delete epsonscan2-non-free-plugin instead.
rm -R /usr/ports/*
You can update the ports tree instead of deleting and seting it up again… Here we go:
cd /usr/ports/
git pull
cd graphics/epsonscan2-non-free-plugin/
make install-missing-packages reinstall clean
pkg autoremove

Tip: It's hard to remember everything at the beginning. So you could create a small shell script to do this (or use a tool like deskutils/zim for your own documentation).

You should recompile the port at least after a major update. However, it also makes sense to do so when more extensive updates are pending (quarterly).

Side note: You can backup a package even as user: pkg create epsonscan2-non-free-plugin. So you could safely deinstall it via pkg, do your updates and install it afterwards again (pkg add /path/to/packagefile). That would be a clean solution that informs you: No other package wasn't updated because of a dependency of your package. And by executing pkg add … you would discover if it still matches to the updated rest - or has to be compiled again.
Code:
make deinstall
make reinstall
You don't need a make deinstall in front of a make reinstall - the point of "reinstall" is that you don't need to go through the two steps of deinstall & install ;) (Also make can do more than one step in one go, f.e. make config reinstall clean.)
 
Back
Top