We recently setup a server running CentOS 7 and wanted to install Ceph; however, Ceph depends on redhat-lsb-core which draws in a boatload of additional packages we didn’t want to install (CUPS and X11 being the most heavyweight).
A little investigation showed that CUPS is the chosen provider for /bin/lp and /bin/lpr and that’s where everything balloons.
So, is there a nice way to avoid this? Not that we could see, so we came up with “fake-lpr”. It’s a simple package says it provides both /bin/lp and /bin/lpr (it doesn’t install anything!); which is sufficient to install redhat-lsb-core without CUPS and X11. Needless to say, we won’t be able to print with this package, but hey, these are Ceph-cluster servers and the likelihood of needing to print is tantamount to never 🙂
- Start by installing the requisites:
yum install rpm-build
- Fetch the fake-lpr.spec file from our GitHub repo
- Build the package:
rpmbuild -ba fake-lpr.spec
… or just download the prebuilt fake-lpr-1.0-1.noarch.rpm file from our GitHub repo and install it with:
sudo rpm -ivh fake-lpr-1.0-1.noarch.rpm