Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#985238: glewlwyd fails to install during dbconfig-common when using postgres

44 views
Skip to first unread message

Florian Küpper

unread,
Mar 14, 2021, 6:20:03 PM3/14/21
to

Package: glewlwyd
Version: 2.5.2-

Postgres-client Version: 13.2-1

root@auth:~# dpkg -l|grep postgresql-clien*
ii  postgresql-client             13+225 all          front-end programs
for PostgreSQL (supported version)
ii  postgresql-client-13          13.2-1 amd64        front-end programs
for PostgreSQL 13
ii  postgresql-client-common      225 all          manager for multiple
PostgreSQL client versions
root@auth:~#

When instaling glewlwyd on postresql on a fresh bullseye vm , I get an
error from dbconfig-common.

root@auth:~# apt-get -y install glewlwyd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  rnbyc
The following NEW packages will be installed:
  glewlwyd
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/474 kB of archives.
After this operation, 1,696 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package glewlwyd.
(Reading database ... 37317 files and directories currently installed.)
Preparing to unpack .../glewlwyd_2.5.2-1_amd64.deb ...
Unpacking glewlwyd (2.5.2-1) ...
Setting up glewlwyd (2.5.2-1) ...
Created symlink
/etc/systemd/system/multi-user.target.wants/glewlwyd.service →
/lib/systemd/system/glewlwyd.service.
Add user glewlwyd
dbconfig-common: writing config to /etc/dbconfig-common/glewlwyd.conf

Creating config file /etc/dbconfig-common/glewlwyd.conf with new version

Creating config file /etc/glewlwyd/glewlwyd-db.conf with new version
creating postgres user glewlwyd:  success.
verifying creation of user: success.
creating database glewlwyd: success.
verifying database glewlwyd exists: success.
dbconfig-common: flushing administrative password
/usr/lib/postgresql/13/bin/psql: invalid option -- 'u'
Try "psql --help" for more information.
dpkg: error processing package glewlwyd (--configure):
 installed glewlwyd package post-installation script subprocess
returned error exit status 1
Processing triggers for man-db (2.9.4-2) ...
Errors were encountered while processing:
 glewlwyd
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@auth:~#


I have stopped trying to force it, since I would like to have automatic
db mirgrations on upgrade.

I can report that installing with mariadb-server works :

...

...

Creating config file /etc/dbconfig-common/glewlwyd.conf with new version

Creating config file /etc/glewlwyd/glewlwyd-db.conf with new version
checking privileges on database glewlwyd for glewlwyd@localhost: user
creation needed.
granting access to database glewlwyd for glewlwyd@localhost: success.
verifying access for glewlwyd@localhost: success.
creating database glewlwyd: success.
verifying database glewlwyd exists: success.
dbconfig-common: flushing administrative password
Start Glewlwyd service
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-9) ...
root@auth:~#

Florian Küpper

unread,
Mar 15, 2021, 6:40:03 PM3/15/21
to

The error psql emits is triggered by glewlwyd.postinst feeding it mysql
command line options.

With that fixed , I see the following error:

....

/   CREATE INDEX
   CREATE TABLE
   INSERT 0 1
   INSERT 0 1
   INSERT 0 1
   INSERT 0 1
   INSERT 0 1
   INSERT 0 1
   ERROR:  function gen_salt(unknown) does not exist
   LINE 1: ...ser WHERE gu_username='admin'), crypt('password',
gen_salt('...
                                                             ^
   HINT:  No function matches the given name and argument types. You
might need to add explicit type casts.
   INSERT 0 1
   INSERT 0 1
I   NSERT 0 1
   INSERT 0 1
   Start Glewlwyd service
   Setting up glewlwyd-dbgsym (2.5.2-1) ...
   Processing triggers for man-db (2.9.4-2) ...
   root@msg:/tmp/glewlwyd#
/

I found out that the pgcrypo extension needs to e enabled.

These two changes are attached as pgConfig.diff , which where generated
with quilt (debian/patches).


The last hurdle, I hope is this one:

Note: I could build the package with dpkg-buildpackage -uc -us
-rfakeroot.  It installed but failed to start.

   root@msg:/tmp/glewlwyd# tail /var/log/daemon.log
   Mar 15 19:49:11 msg systemd[1]: Started Glewlwyd OAuth2
authentication provider (Debian package).
   Mar 15 19:49:11 msg glewlwyd[17604]: Error - database type unknown
   Mar 15 19:49:11 msg glewlwyd[17604]: Error parsing config file


in /etc/glewlwyd/glewlwyd-db.conf the value says:

type = "pgsql"

but glewlwyd needs it to be

type = "postgre"

See also attached glewlwyd-db.diff file, which is simply a before/after
diff of that file on the system after installation.


With that changed , glewlwyd starts and I can login as admin with the
default password.

So far it is beyond me how change the templating of dbconfig-common to
reflect that and since this my first attempt at filing a bug report I am
awaiting Your feedback.


pgConfig.diff
glewlwyd-db.diff
0 new messages