Re: [pgagent] Instatallation destination?

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
Cc: Christoph Berg <myon(at)debian(dot)org>, pgAdmin support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: [pgagent] Instatallation destination?
Date: 2018-07-24 15:14:33
Message-ID: CA+OCxoxcVyLZXJ0TZu5MnOZuhjGtpEauwpV9syBk9OJwr==4Fg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi

On Mon, Jul 23, 2018 at 5:18 PM, Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
wrote:

> Hi Dave,
>
> Please find updated patch with the suggested changes. Now "pgagent.sql" is
> not required to moved to optional list.
> In my system, it shows below output.
>
> laptop206-pn-in:build neelpatel$ sudo make install
>
> Password:
>
> [ 11%] Built target run
>
> [100%] Built target pgagent
>
> Install the project...
>
> -- Install configuration: ""
>
> -- Installing: /usr/local/bin/pgagent
>
> -- Installing: /usr/local/share/pgagent/README
>
> -- Installing: /usr/local/share/pgagent/LICENSE
>
> -- Installing: /Library/PostgreSQL/9.4/share/
> postgresql/extension/pgagent--4.0.sql
>
> -- Installing: /Library/PostgreSQL/9.4/share/postgresql/extension/pgagent.
> control
>
> -- Installing: /Library/PostgreSQL/9.4/share/
> postgresql/extension/pgagent--3.4--4.0.sql
>
> -- Installing: /Library/PostgreSQL/9.4/share/
> postgresql/extension/pgagent--unpackaged--4.0.sql
>
> Do review it and let me know if i misunderstood.
>

Yeah, unfortunately I think you did.

My suggestion was that we adjust the layout based on whether or not there
is a "pgagent" or "pgAgent" directory in the --prefix directory (on *nix).
If there is, then we install like this (this example was configured with
--prefix=/usr/local/pgagent):

Install the project...

-- Install configuration: "Release"

-- Installing: /usr/local/pgagent/bin/pgagent

-- Installing: /usr/local/pgagent/share/pgagent.sql

-- Installing: /usr/local/pgagent/./README

-- Installing: /usr/local/pgagent/./LICENSE

-- Installing: /Library/PostgreSQL/11/share/postgresql/extension/pgagent--4
.0.sql

-- Installing: /Library/PostgreSQL/11/share/postgresql/extension/pgagent.co
ntrol

-- Up-to-date: /Library/PostgreSQL/11/share/postgresql/extension/pgagent.co
ntrol

-- Installing: /Library/PostgreSQL/11/share/postgresql/extension/pgagent--3
.4--4.0.sql

-- Installing: /Library/PostgreSQL/11/share/postgresql/extension/pgagent--u
npackaged--4.0.sql

If there is not (e.g. because installation is going into the main system
directories), then the installation should look like this (this example was
configured with --prefix=/usr/local):

Install the project...

-- Install configuration: "Release"

-- Installing: /usr/local/bin/pgagent

-- Installing: /usr/local/share/pgagent.sql

-- Installing: /usr/local/share/pgagent/README

-- Installing: /usr/local/share/pgagent/LICENSE

-- Installing: /Library/PostgreSQL/11/share/postgresql/extension/pgagent--4
.0.sql

-- Installing: /Library/PostgreSQL/11/share/postgresql/extension/pgagent.co
ntrol

-- Up-to-date: /Library/PostgreSQL/11/share/postgresql/extension/pgagent.co
ntrol

-- Installing: /Library/PostgreSQL/11/share/postgresql/extension/pgagent--3
.4--4.0.sql

-- Installing: /Library/PostgreSQL/11/share/postgresql/extension/pgagent--u
npackaged--4.0.sql

As for pgagent.sql - do we need to install that at all any more? I don't
think we do.

> Thanks,
> Neel Patel
>
> On Fri, Jul 20, 2018 at 2:42 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>> Hi
>>
>> On Fri, Jul 20, 2018 at 10:00 AM, Christoph Berg <myon(at)debian(dot)org> wrote:
>>
>>> Hi,
>>>
>>> in the Debian package I notice that CMakeLists.txt installs README and
>>> LICENSE to /usr (no subdirectory!), and pgagent.sql to /usr/share.
>>> The first is clearly wrong, and the second somewhat debatable. As
>>> pgagent.sql is not really required (extension support), I added this
>>> patch:
>>>
>>
>> Urgh, yeah.
>>
>>
>>>
>>> Don't install README and LICENSE which would otherwise end up in /usr,
>>> and don't install pgagent.sql to /usr/share.
>>>
>>> --- a/CMakeLists.txt
>>> +++ b/CMakeLists.txt
>>> @@ -144,11 +144,11 @@ IF (WIN32)
>>> INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION .)
>>> ELSE(WIN32)
>>> INSTALL(TARGETS pgagent DESTINATION bin)
>>> - INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION
>>> share)
>>> + #INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION
>>> share)
>>> ENDIF(WIN32)
>>>
>>> -INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION .)
>>> -INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION .)
>>> +#INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION .)
>>> +#INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION .)
>>>
>>> # Extension
>>> IF(PG_EXTENSION)
>>>
>>>
>>> What would be the proper fix?
>>>
>>
>> I suspect we need to do something similar to PostgreSQL which (iirc)
>> changes the layout slightly if the prefix includes "pgsql" or "postgresql".
>> The current behaviour looks reasonable in that case; e.g.
>>
>> Install the project...
>>
>> -- Install configuration: "Release"
>>
>> -- Installing: /usr/local/pgagent/bin/pgagent
>>
>> -- Installing: /usr/local/pgagent/share/pgagent.sql
>>
>> -- Installing: /usr/local/pgagent/./README
>>
>> -- Installing: /usr/local/pgagent/./LICENSE
>>
>> -- Installing: /Library/PostgreSQL/11/share/p
>> ostgresql/extension/pgagent--4.0.sql
>>
>> -- Installing: /Library/PostgreSQL/11/share/postgresql/extension/
>> pgagent.control
>>
>> -- Up-to-date: /Library/PostgreSQL/11/share/postgresql/extension/
>> pgagent.control
>>
>> -- Installing: /Library/PostgreSQL/11/share/p
>> ostgresql/extension/pgagent--3.4--4.0.sql
>>
>> -- Installing: /Library/PostgreSQL/11/share/p
>> ostgresql/extension/pgagent--unpackaged--4.0.sql
>>
>> However, if the prefix does not "pgagent" or "pgAgent", perhaps it should
>> look more like:
>>
>> Install the project...
>>
>> -- Install configuration: "Release"
>>
>> -- Installing: /usr/local/bin/pgagent
>>
>> -- Installing: /usr/local/share/pgagent.sql
>>
>> -- Installing: /usr/local/share/pgagent/README
>>
>> -- Installing: /usr/local/share/pgagent/LICENSE
>>
>> -- Installing: /Library/PostgreSQL/11/share/p
>> ostgresql/extension/pgagent--4.0.sql
>>
>> -- Installing: /Library/PostgreSQL/11/share/postgresql/extension/
>> pgagent.control
>>
>> -- Up-to-date: /Library/PostgreSQL/11/share/postgresql/extension/
>> pgagent.control
>>
>> -- Installing: /Library/PostgreSQL/11/share/p
>> ostgresql/extension/pgagent--3.4--4.0.sql
>>
>> -- Installing: /Library/PostgreSQL/11/share/p
>> ostgresql/extension/pgagent--unpackaged--4.0.sql
>>
>>
>> Does that look about right?
>>
>> Assuming so, can you implement please Neel?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Ze Victor Harry 2018-07-25 15:39:02 mvn package not installing/error
Previous Message Khushboo Vashi 2018-07-24 08:41:07 Re: PgAdmin returning 410 GONE when viewing SQL for partitions