-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Currently, the gpg_install_all.sh script is capable of installing prerequisite packages:
The problem is that following piece of code has been written specifically for CentOS. No other distributions are supported:
Even worse, these four items aren't enough in case of clean CentOS installation (e.g. from Docker image)—PinEntry requires some additional package in order to show password dialog (ncurses-devel is a frequent choice).
Finally, the detect_platform() function is partly buggy—it requires the presence of /etc/os-release file, and prints error when it's missing (e.g. on OS X), but that does not stop the build:
Of course these issues can be fixed, however IMHO the prerequisites installer is too tightly bound to target system, and should be removed from this script. I can think of two better solutions:
- Extract prerequisites installer to a separate script, e.g.
install_gpg_prerequisites.sh. - Do not provide any prerequisites installer, and cede this responsibility to user (required software should be listed in README then).
@dewyatt @ronaldtse WDYT? I am leaning towards option 2.
Also, if you want some easy install on CentOS Docker images, a Dockerfile can be added to this repository. Actually, I wrote it already: https://github.com/riboseinc/gpg-build-scripts/blob/bbbb4321526611987858a30ea04c30ebf1ca7730/Dockerfile. Though it requires some review, I'm not proficient with Docker.