Thread: [pgsql-pkg-debian] Missing Postgis.control

[pgsql-pkg-debian] Missing Postgis.control

From
Ryan Taylor
Date:
OS: Ubuntu xenial
Postgres Version: 9.6
Postgis Version: 2.3

Using these instructions (http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS23UbuntuPGSQL96Apt), I tried to install Postgis on the postgres database. When I get down to "Create Extension Postgis", postgres is telling me that it cannot find the "postgis.control" file. I searched the directory and it wasn't located anywhere on the server. I even looked for "postgis.sql" and "spatial_ref_sys.sql" on the server and couldn't find those.  

Is there a problem with the package "postgresql-9.6-postgis-2.3" because it seems to be missing the "postgis.control" and other postgis files?

Thank you for your time,

Ryan Taylor

Re: [pgsql-pkg-debian] Missing Postgis.control

From
Christoph Berg
Date:
Re: Ryan Taylor 2017-06-15 <CAAn=9DDCxkRRLRM+Laxbx5071eRVVAnMA=mHTbeWv1P=Y+Fmkw@mail.gmail.com>
> Using these instructions (
> http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS23UbuntuPGSQL96Apt), I
> tried to install Postgis on the postgres database. When I get down to
> "Create Extension Postgis", postgres is telling me that it cannot find the
> "postgis.control" file. I searched the directory and it wasn't located
> anywhere on the server. I even looked for "postgis.sql" and
> "spatial_ref_sys.sql" on the server and couldn't find those.
>
> Is there a problem with the package "postgresql-9.6-postgis-2.3" because it
> seems to be missing the "postgis.control" and other postgis files?

Hi,

the postgis.control file is contained in postgresql-9.6-postgis-2.3-scripts.

The package description isn't really clear about this - Markus, is
this intended?

Christoph


Re: [pgsql-pkg-debian] Missing Postgis.control

From
Ryan Taylor
Date:
I thought the "postgis scripts" package was for updating the server's postgis version? 


"This package contains SQL scripts to upgrade from earlier PostGIS versions for PostgreSQL 9.6 as well as Perl utility scripts."

The control and sql files needed are in this package though ... something seems off / weird?


Thank you for your time,

Ryan Taylor



On Jun 15, 2017 4:15 AM, "Christoph Berg" <myon@debian.org> wrote:
Re: Ryan Taylor 2017-06-15 <CAAn=9DDCxkRRLRM+Laxbx5071eRVVAnMA=mHTbeWv1P=Y+Fmkw@mail.gmail.com>
> Using these instructions (
> http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS23UbuntuPGSQL96Apt), I
> tried to install Postgis on the postgres database. When I get down to
> "Create Extension Postgis", postgres is telling me that it cannot find the
> "postgis.control" file. I searched the directory and it wasn't located
> anywhere on the server. I even looked for "postgis.sql" and
> "spatial_ref_sys.sql" on the server and couldn't find those.
>
> Is there a problem with the package "postgresql-9.6-postgis-2.3" because it
> seems to be missing the "postgis.control" and other postgis files?

Hi,

the postgis.control file is contained in postgresql-9.6-postgis-2.3-scripts.

The package description isn't really clear about this - Markus, is
this intended?

Christoph

Re: [pgsql-pkg-debian] Missing Postgis.control

From
Markus Wanner
Date:
On 06/15/2017 05:43 PM, Ryan Taylor wrote:
> I thought the "postgis scripts" package was for updating the server's
> postgis version?

Correct, it's not strictly needed after CREATE EXTENSION, but the
extension keeps working without it.

While the *-scripts packages conflict against each other, the extension
packages (postgresql-X.Y-postgis-M.N) do not, allowing users to upgrade
without breaking existing installations.

> "This package contains SQL scripts to upgrade from earlier PostGIS
> versions for PostgreSQL 9.6 as well as Perl utility scripts."

As this hasn't quite clarified it, can you maybe provide a better
description?

Kind Regards

Markus Wanner


Attachment

Re: [pgsql-pkg-debian] Missing Postgis.control

From
Christoph Berg
Date:
Re: Markus Wanner 2017-06-15 <ec5beb31-d396-4b2c-6cf8-ae9a7a5a41fc@bluegap.ch>
> > I thought the "postgis scripts" package was for updating the server's
> > postgis version?
>
> Correct, it's not strictly needed after CREATE EXTENSION, but the
> extension keeps working without it.
>
> While the *-scripts packages conflict against each other, the extension
> packages (postgresql-X.Y-postgis-M.N) do not, allowing users to upgrade
> without breaking existing installations.

Ah right, I remembered that part, but not that *-scripts do conflict.

> > "This package contains SQL scripts to upgrade from earlier PostGIS
> > versions for PostgreSQL 9.6 as well as Perl utility scripts."
>
> As this hasn't quite clarified it, can you maybe provide a better
> description?

It doesn't say that it is needed for the initial installation as well.


From UX viewpoint, it would be nice if "apt-get install
postgresql-9.6-postgis-2.3" just worked. My idea would be:

Package: postgresql-9.6-postgis-2.3
Depends: postgresql-9.6-postgis-scripts

This means that each postgis N.N version can ship a new version of
-scripts which would then overwrite the older versions. Provided that
the *.sql files for older postgis versions are still shipped in newer
releases, users could even install older postgis extensions by using
the correct CREATE EXTENSION ... VERSION command. Unfortunately that's
not the case [1].

[1] https://packages.debian.org/sid/all/postgresql-9.6-postgis-2.3-scripts/filelist

Or maybe all scripts packages should have Replaces: instead of
Conflicts:. (Though that doesn't scale I think)

Hrm. I'll try discussing that with the colleagues here, maybe they
have an idea.

Christoph


Re: [pgsql-pkg-debian] Missing Postgis.control

From
Markus Wanner
Date:
On 06/16/2017 10:31 AM, Christoph Berg wrote:
> It doesn't say that it is needed for the initial installation as well.

Correct, that should be included in the (long) description.

> From UX viewpoint, it would be nice if "apt-get install
> postgresql-9.6-postgis-2.3" just worked.

It does. At least as long as you don't disable installation of
recommended packages *and* don't another version of the scripts
installed, already.

Actually, even just installing `postgis` does the trick, then.

>  My idea would be:
>
> Package: postgresql-9.6-postgis-2.3
> Depends: postgresql-9.6-postgis-scripts

IIRC that's what we had before, but reverted forth and back to versioned
scripts packages...

> ... users could even install older postgis extensions by using
> the correct CREATE EXTENSION ... VERSION command.

Does that work for older versions when postgis.control is from the most
current one? IIRC that's the only file that really requires the -scripts
packages to conflict.

> Hrm. I'll try discussing that with the colleagues here, maybe they
> have an idea.

Thanks.

Kind Regards

Markus


Re: [pgsql-pkg-debian] Missing Postgis.control

From
Peter Eisentraut
Date:
On 6/15/17 14:40, Markus Wanner wrote:
> On 06/15/2017 05:43 PM, Ryan Taylor wrote:
>> I thought the "postgis scripts" package was for updating the server's
>> postgis version?
> Correct, it's not strictly needed after CREATE EXTENSION, but the
> extension keeps working without it.

Hmm, this is true but might be confusing in the long run.

> While the *-scripts packages conflict against each other, the extension
> packages (postgresql-X.Y-postgis-M.N) do not, allowing users to upgrade
> without breaking existing installations.

I don't understand this.  Upgrade postgresql or upgrade postgis?

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: [pgsql-pkg-debian] Missing Postgis.control

From
Markus Wanner
Date:
On 06/18/2017 12:24 AM, Peter Eisentraut wrote:
> On 6/15/17 14:40, Markus Wanner wrote:
>> On 06/15/2017 05:43 PM, Ryan Taylor wrote:
>>> I thought the "postgis scripts" package was for updating the server's
>>> postgis version?
>> Correct, it's not strictly needed after CREATE EXTENSION, but the
>> extension keeps working without it.
>
> Hmm, this is true but might be confusing in the long run.

What would be less confusing?

I think it's similar enough to how Debian handles library upgrades.

>> While the *-scripts packages conflict against each other, the extension
>> packages (postgresql-X.Y-postgis-M.N) do not, allowing users to upgrade
>> without breaking existing installations.
>
> I don't understand this.  Upgrade postgresql or upgrade postgis?

postgis

Use case: you installed postgis-2.2, created the extension, set it up to
be used in a database, and later do an 'apt-get dist-upgrade', giving
you postgis-2.3. Your database will continue to work (with the
postgis-2.2 version).

Upgrading PostgreSQL is an entirely different story.

Regards

Markus


Re: [pgsql-pkg-debian] Missing Postgis.control

From
Christoph Berg
Date:
Re: Markus Wanner 2017-06-16 <eb34b0f5-1b73-e8c4-dbac-ef29c8e0c24c@bluegap.ch>
> On 06/16/2017 10:31 AM, Christoph Berg wrote:
> > It doesn't say that it is needed for the initial installation as well.
> 
> Correct, that should be included in the (long) description.

I just pushed some fixes that should clarify the roles of
postgresql-9.6-postgis-2.4 and postgresql-9.6-postgis-2.4-scripts.

> > From UX viewpoint, it would be nice if "apt-get install
> > postgresql-9.6-postgis-2.3" just worked.
> 
> It does. At least as long as you don't disable installation of
> recommended packages *and* don't another version of the scripts
> installed, already.
> 
> Actually, even just installing `postgis` does the trick, then.

Right, except everyone I know disables installation of recommends...

> >  My idea would be:
> > 
> > Package: postgresql-9.6-postgis-2.3
> > Depends: postgresql-9.6-postgis-scripts
> 
> IIRC that's what we had before, but reverted forth and back to versioned
> scripts packages...

I wrapped my brain for some time about that, and came to the
conclusion that Depends: doesn't really work, short of introducing
other ugly hacks. The package description now clearly mentions that
the -scripts package is needed, so we should be good now.

> > ... users could even install older postgis extensions by using
> > the correct CREATE EXTENSION ... VERSION command.
> 
> Does that work for older versions when postgis.control is from the most
> current one? IIRC that's the only file that really requires the -scripts
> packages to conflict.

The control files should be the same, except for one line that has the
default version to create, which isn't used if an explicit version is
given.

Christoph


-- 
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian