passbolt_api icon indicating copy to clipboard operation
passbolt_api copied to clipboard

Debian postinst maintainer script doesn't honor `passbolt/nginx-configuration`

Open maxtruxa opened this issue 3 years ago • 1 comments

Debian postinst maintainer script doesn't honor passbolt/nginx-configuration

  • Passbolt Version: 3.7.0
  • Platform and Target:
    • Operating system: Debian 11
    • PHP: n/a
    • Web server: n/a
    • Database server: n/a

What you did

Perform an unattended installation of the passbolt-ce-server package on Debian without nginx.

Note the line setting passbolt/nginx-configuration to false. MariaDB is already installed.

sudo debconf-set-selections <<EOS
passbolt-ce-server passbolt/mysql-configuration boolean true
passbolt-ce-server passbolt/mysql-passbolt-username string passbolt
passbolt-ce-server passbolt/mysql-passbolt-password password test1234
passbolt-ce-server passbolt/mysql-passbolt-password-repeat password test1234
passbolt-ce-server passbolt/mysql-passbolt-dbname string passbolt
passbolt-ce-server passbolt/nginx-configuration boolean false
passbolt-ce-server passbolt/nginx-configuration-three-choices select auto
passbolt-ce-server passbolt/nginx-configuration-two-choices select none
passbolt-ce-server passbolt/nginx-domain string passbolt.example.com
passbolt-ce-server passbolt/nginx-certificate-file string 
passbolt-ce-server passbolt/nginx-certificate-key-file string 
EOS
sudo DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends passbolt-ce-server

What happened

The installation fails at the postinst step.

# ... more output preceding this ...
Setting up passbolt-ce-server (3.7.0-1) ...
/var/lib/dpkg/info/passbolt-ce-server.postinst: line 217: certbot: command not found
dpkg: error processing package passbolt-ce-server (--configure):
 installed passbolt-ce-server package post-installation script subprocess returned error exit status 127

The failing line is here.

What you expected to happen

I expected the installation to succeed; without attempting to use nginx, certbot or anything else related to the web server.

Additional information

The hosting FAQ mentions passbolt/nginx-configuration, but that key is obviously not honored. Instead, the postinst script derives the value of nginx_values[configuration] from passbolt/nginx-configuration-three-choices/passbolt/nginx-configuration-two-choices.

One way to get around this (which I found by looking at the postinst script) is to set passbolt/nginx-configuration-three-choices and passbolt/nginx-configuration-two-choices to an empty string or an invalid value.

maxtruxa avatar Aug 08 '22 17:08 maxtruxa

Hi @maxtruxa

Thank you for this report. I understand your point but if you don't want any certbot nor nginx, why set passbolt/nginx-configuration-three-choices select to auto ?

auto will trigger the certbot thing.

If you set this parameter to none, you will be able to install passbolt silently without issue.

AnatomicJC avatar Aug 09 '22 08:08 AnatomicJC