#1150202 debusine-server postinst fails if postgres is not installed

#1150202#5
Date:
2026-10-06 21:14:09 UTC
From:
To:
Heyya debusine folks,

debusine-server declares postgres as recommends. I installed as no
recommends (i'd like to have debusine use a remote postgres instance -- having
a local psql is not required here), and fully expected it to fail on startup,
but it wound up failing on postinst instead.

```
Setting up debusine-server (0.16.0) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
debconf: unable to initialize frontend: Teletype
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Noninteractive
dbconfig-common: writing config to /etc/dbconfig-common/debusine-server.conf
Creating config file /etc/dbconfig-common/debusine-server.conf with new version
Creating config file /etc/debusine/server/db_postgresql.py with new version
chown: invalid user: 'postgres'
unable to connect to postgresql server.
error encountered creating user:
runuser: user postgres does not exist or the user entry does not contain all the required fields
dbconfig-common: debusine-server configure: aborted.
dbconfig-common: flushing administrative password
dpkg: error processing package debusine-server (--configure):
  old debusine-server package postinst maintainer script subprocess failed with exit status 1
Errors were encountered while processing:
  debusine-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
```

Reproducer:

```
$ doas apt install -y --no-install-recommends debusine-server
```

It'd be great if this could be made a supported configuration

Thanks for making Debian better!
   paultag

#1150202#10
Date:
2026-10-06 22:06:40 UTC
From:
To:
I think the chown comes from dbconfig-common.  Isn't the problem here
that you're using the noninteractive frontend and don't have appropriate
preseeding for dbconfig-common's questions?  Off the top of my head I'm
not sure exactly what the preseeding would need to be, but it probably
involves at least debusine-server/remote/host.  I'd start by installing
debusine-server in a throwaway test environment with an interactive
debconf frontend and see what questions you need to answer to get it to
select a remote database.

#1150202#15
Date:
2026-10-07 01:09:38 UTC
From:
To:
Yes, definitely.

Yeah, that was where I wound up before filing this bug report -- I filed
it because I couldn't think of another situation where no recommends
results in a package being /uninstallable/ (rather than merely broken)
with the package defaults.

That being said, i'm also totally sympathetic to no-recommends and
noninteractive being DOA -- I would not reopen this bug if you think
that's the case and closed it :)

   paultag

#1150202#20
Date:
2026-10-07 01:31:22 UTC
From:
To:
For my use-case I was fine configuring things by hand via external
configuration management tooling

```
$ debconf-set-selections <<EOF
debusine-server debusine-server/dbconfig-install    boolean false
EOF
```

preseeding this does indeed render the package installable with no-recs

   paultag