[postgis-devel] Documentation on make check
Bruce Rindahl
bruce.rindahl at gmail.com
Tue Dec 18 08:08:47 PST 2018
In several tests, I found the user running make check has to have rights to
create the database postgis_reg or it fails immediately. If the user can
create a database but is not a superuser it fails with:
make -C core check
.
.
.
psql: FATAL: permission denied to set parameter "lc_messages"
Creating database 'postgis_reg'
createdb: could not connect to database template1: FATAL: permission
denied to set parameter "lc_messages"
psql: FATAL: database "postgis_reg" does not exist
Loading PostGIS into 'postgis_reg'
failed (Error encountered loading
/home/pi/postgis-3.0.0dev/regress/00-regress-install/share/contrib/postgis/postgis.sql:
/tmp/pgis_reg/regress_log)
Makefile:212: recipe for target 'check' failed
make[2]: *** [check] Error 1
make[2]: Leaving directory '/home/pi/postgis-3.0.0dev/regress/core'
Makefile:28: recipe for target 'check' failed
make[1]: *** [check] Error 2
make[1]: Leaving directory '/home/pi/postgis-3.0.0dev/regress'
GNUmakefile:20: recipe for target 'check' failed
make: *** [check] Error 1
Only a superuser can parameter "lc_messages" so that is where it dies.
I agree on the face of it I cannot take over the rights of a user foo. You
only thing I can think of is somewhere in the script a command like
sudo su $PGUSER
is run. That I have the rights to do with the user running make check.
Thanks
Bruce
On Tue, Dec 18, 2018, 7:38 AM Greg Troxel <gdt at lexort.com wrote:
> Bruce Rindahl <bruce.rindahl at gmail.com> writes:
>
> > Doing some full compilation and checking on raspberry pi. While running
> > make check, realized this has to be run as a postgresql superuser.
> Suggest
> > adding to documentation it be run as:
> > PGUSER=foo make check
> > where foo is a superuser.
>
> Agreed on explaining that the user running make check needs to be able
> to do postgresql operations. I guess it's an interesting question on
> whether that user needs to be a pgsql superuser, as that sort of
> indicates that postgis needs privs that perhaps it shouldn't.
>
> I don't follow how
>
> PGUSER=foo make check
>
> would work, unless you are assuming that you are running as root. A
> normal user should not be able to obtain another user's permissions just
> by asking.
>
> I typically do postgis packaging/testing on a machine that does not have
> a production database, and run builds/tests as a non-root user that is a
> pgsql su.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20181218/40ef8748/attachment.html>
More information about the postgis-devel
mailing list