Loading environment variable from etc/environment.d (#14327)
Loading environment variable from etc/environment.d (#14327)

Loading environment variable from etc/environment.d

Load an external environment variable from '$GPHOME/etc/environment.d/'.
The name of the configuration must be '\d\d-\w*\.conf'. Adding
two numeric prefixes in front of the file name simplifies the
ordering.

For example:

```
etc/environment.d/
   - 00-overload-openssl.conf
   - 10-add-python-path-gpdb.conf
   - 90-add-rlib.conf
   - 90-load-pfx-path.conf
   - some_bad_file
```

The order of loading will be an ascending numerical order, in this case
it will be 00, 10 and then 90, the order between two 90's is undefined.
files without .conf suffix will not be loaded.

The format and file path are from systemd, which is already widely used
in most Linux systems.
https://www.freedesktop.org/software/systemd/man/environment.d.html

Use case:

Some extensions need an additional environment variable to boot up,
with environment.d, the extension can add the environment variable
without modifying greenplum_path.sh.
example: https://github.com/greenplum-db/pljava/blob/9a14421cfad80be06d8245a64a5766481e89c6df/gpdb/packaging/gppkg_spec.yml.in#L11-L19

Load pxf environment file automatically. pxf and gptext need an additional
PATH directory to store the executable files. with this environment file, the
component can add them self to greenplum_path.sh without modifying this file.
50wu/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,50wu/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb