Skip to content

The purpose of prerequisites installer in "install all" #21

@skalee

Description

@skalee

Currently, the gpg_install_all.sh script is capable of installing prerequisite packages:

https://github.com/riboseinc/gpg-build-scripts/blob/f0051bb9390f33a1ea96dec1546bd9171b6e63fc/install_gpg_all.sh#L40-L42

The problem is that following piece of code has been written specifically for CentOS. No other distributions are supported:

https://github.com/riboseinc/gpg-build-scripts/blob/f0051bb9390f33a1ea96dec1546bd9171b6e63fc/install_gpg_all.sh#L81-L86

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:

https://github.com/riboseinc/gpg-build-scripts/blob/f0051bb9390f33a1ea96dec1546bd9171b6e63fc/install_gpg_all.sh#L44-L48

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:

  1. Extract prerequisites installer to a separate script, e.g. install_gpg_prerequisites.sh.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions