* [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target
@ 2014-08-09 17:34 Floris Bos
2014-08-10 7:01 ` Thomas De Schampheleire
0 siblings, 1 reply; 8+ messages in thread
From: Floris Bos @ 2014-08-09 17:34 UTC (permalink / raw)
To: buildroot
Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
package/postgresql/postgresql.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index 0fecbc7..6d71b9c 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -51,6 +51,8 @@ endef
define POSTGRESQL_INSTALL_TARGET_FIXUP
$(INSTALL) -dm 0700 $(TARGET_DIR)/var/lib/pgsql
+ rm -f $(TARGET_DIR)/usr/bin/pg_config
+ rm -rf $(TARGET_DIR)/usr/lib/postgresql/pgxs
endef
POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP
--
1.8.3.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target
2014-08-09 17:34 [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target Floris Bos
@ 2014-08-10 7:01 ` Thomas De Schampheleire
2014-08-10 10:55 ` Floris Bos
0 siblings, 1 reply; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-08-10 7:01 UTC (permalink / raw)
To: buildroot
Floris Bos <bos@je-eigen-domein.nl> schreef:
>Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
>---
> package/postgresql/postgresql.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
>index 0fecbc7..6d71b9c 100644
>--- a/package/postgresql/postgresql.mk
>+++ b/package/postgresql/postgresql.mk
>@@ -51,6 +51,8 @@ endef
>
> define POSTGRESQL_INSTALL_TARGET_FIXUP
> $(INSTALL) -dm 0700 $(TARGET_DIR)/var/lib/pgsql
>+ rm -f $(TARGET_DIR)/usr/bin/pg_config
>+ rm -rf $(TARGET_DIR)/usr/lib/postgresql/pgxs
> endef
Not entirely sure here, but isn't the better approach for pg_config to add it to POSTGRESQL_CONFIG_SCRIPTS? This will ensure the file is fixed up for staging usr, and removed from target automatically.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target
2014-08-10 7:01 ` Thomas De Schampheleire
@ 2014-08-10 10:55 ` Floris Bos
2014-08-10 12:54 ` Thomas De Schampheleire
0 siblings, 1 reply; 8+ messages in thread
From: Floris Bos @ 2014-08-10 10:55 UTC (permalink / raw)
To: buildroot
On 08/10/2014 09:01 AM, Thomas De Schampheleire wrote:
> define POSTGRESQL_INSTALL_TARGET_FIXUP
> $(INSTALL) -dm 0700 $(TARGET_DIR)/var/lib/pgsql
> + rm -f $(TARGET_DIR)/usr/bin/pg_config
> + rm -rf $(TARGET_DIR)/usr/lib/postgresql/pgxs
> endef
> Not entirely sure here, but isn't the better approach for pg_config to add it to POSTGRESQL_CONFIG_SCRIPTS? This will ensure the file is fixed up for staging usr, and removed from target automatically.
>
Note that pg_config is an ELF executable compiled for the target
architecture, and not a text script that can be easily fixed up.
Yours sincerely,
Floris Bos
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target
2014-08-10 10:55 ` Floris Bos
@ 2014-08-10 12:54 ` Thomas De Schampheleire
2014-08-12 16:50 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-08-10 12:54 UTC (permalink / raw)
To: buildroot
Hi Floris,
On Sun, Aug 10, 2014 at 12:55 PM, Floris Bos <bos@je-eigen-domein.nl> wrote:
> On 08/10/2014 09:01 AM, Thomas De Schampheleire wrote:
>>
>> define POSTGRESQL_INSTALL_TARGET_FIXUP
>> $(INSTALL) -dm 0700 $(TARGET_DIR)/var/lib/pgsql
>> + rm -f $(TARGET_DIR)/usr/bin/pg_config
>> + rm -rf $(TARGET_DIR)/usr/lib/postgresql/pgxs
>> endef
>> Not entirely sure here, but isn't the better approach for pg_config to add
>> it to POSTGRESQL_CONFIG_SCRIPTS? This will ensure the file is fixed up for
>> staging usr, and removed from target automatically.
>>
>
> Note that pg_config is an ELF executable compiled for the target
> architecture, and not a text script that can be easily fixed up.
Ok, in this case adding it to POSTGRESQL_CONFIG_SCRIPTS may not be the
best idea.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target
2014-08-10 12:54 ` Thomas De Schampheleire
@ 2014-08-12 16:50 ` Thomas Petazzoni
2014-08-12 17:39 ` Floris Bos
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2014-08-12 16:50 UTC (permalink / raw)
To: buildroot
Dear Thomas De Schampheleire,
On Sun, 10 Aug 2014 14:54:51 +0200, Thomas De Schampheleire wrote:
> >> Not entirely sure here, but isn't the better approach for pg_config to add
> >> it to POSTGRESQL_CONFIG_SCRIPTS? This will ensure the file is fixed up for
> >> staging usr, and removed from target automatically.
> >>
> >
> > Note that pg_config is an ELF executable compiled for the target
> > architecture, and not a text script that can be easily fixed up.
>
> Ok, in this case adding it to POSTGRESQL_CONFIG_SCRIPTS may not be the
> best idea.
More precisely: it will simply not work. The <pkg>_CONFIG_SCRIPTS
mechanism assumes that the <pkg>-config files are shell scripts, in a
certain format. With an ELF executable compiled for the target:
1/ There's no way the <pkg>_CONFIG_SCRIPTS mechanism can work
2/ There's no real point in keeping this file on the build machine,
because it's an executable built for the target.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target
2014-08-12 16:50 ` Thomas Petazzoni
@ 2014-08-12 17:39 ` Floris Bos
2014-08-13 7:26 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: Floris Bos @ 2014-08-12 17:39 UTC (permalink / raw)
To: buildroot
Hi,
On 08/12/2014 06:50 PM, Thomas Petazzoni wrote:
> On Sun, 10 Aug 2014 14:54:51 +0200, Thomas De Schampheleire wrote:
>
>>>> Not entirely sure here, but isn't the better approach for pg_config to add
>>>> it to POSTGRESQL_CONFIG_SCRIPTS? This will ensure the file is fixed up for
>>>> staging usr, and removed from target automatically.
>>>>
>>> Note that pg_config is an ELF executable compiled for the target
>>> architecture, and not a text script that can be easily fixed up.
>> Ok, in this case adding it to POSTGRESQL_CONFIG_SCRIPTS may not be the
>> best idea.
> More precisely: it will simply not work. The <pkg>_CONFIG_SCRIPTS
> mechanism assumes that the <pkg>-config files are shell scripts, in a
> certain format. With an ELF executable compiled for the target:
>
> 1/ There's no way the <pkg>_CONFIG_SCRIPTS mechanism can work
>
> 2/ There's no real point in keeping this file on the build machine,
> because it's an executable built for the target.
Do wonder if we shouldn't provide a simple replacement script for
pg_config, e.g. just implementing "--includedir" and "--libdir"
Might be less work than patching configure scripts that want to call
pg_config.
Yours sincerely,
Floris Bos
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target
2014-08-12 17:39 ` Floris Bos
@ 2014-08-13 7:26 ` Thomas Petazzoni
2014-08-13 10:53 ` Floris Bos
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2014-08-13 7:26 UTC (permalink / raw)
To: buildroot
Dear Floris Bos,
On Tue, 12 Aug 2014 19:39:20 +0200, Floris Bos wrote:
> > More precisely: it will simply not work. The <pkg>_CONFIG_SCRIPTS
> > mechanism assumes that the <pkg>-config files are shell scripts, in a
> > certain format. With an ELF executable compiled for the target:
> >
> > 1/ There's no way the <pkg>_CONFIG_SCRIPTS mechanism can work
> >
> > 2/ There's no real point in keeping this file on the build machine,
> > because it's an executable built for the target.
>
> Do wonder if we shouldn't provide a simple replacement script for
> pg_config, e.g. just implementing "--includedir" and "--libdir"
> Might be less work than patching configure scripts that want to call
> pg_config.
Yes, that's certainly an option. If there are many packages relying on
pg_config, it's going to be easier to provide a fake pg_config rather
than patching all those packages (such as PHP). Maybe even this
approach could be submitted for upstream inclusion in Postgresql?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target
2014-08-13 7:26 ` Thomas Petazzoni
@ 2014-08-13 10:53 ` Floris Bos
0 siblings, 0 replies; 8+ messages in thread
From: Floris Bos @ 2014-08-13 10:53 UTC (permalink / raw)
To: buildroot
On 08/13/2014 09:26 AM, Thomas Petazzoni wrote:
> On Tue, 12 Aug 2014 19:39:20 +0200, Floris Bos wrote:
>
>>> More precisely: it will simply not work. The <pkg>_CONFIG_SCRIPTS
>>> mechanism assumes that the <pkg>-config files are shell scripts, in a
>>> certain format. With an ELF executable compiled for the target:
>>>
>>> 1/ There's no way the <pkg>_CONFIG_SCRIPTS mechanism can work
>>>
>>> 2/ There's no real point in keeping this file on the build machine,
>>> because it's an executable built for the target.
>> Do wonder if we shouldn't provide a simple replacement script for
>> pg_config, e.g. just implementing "--includedir" and "--libdir"
>> Might be less work than patching configure scripts that want to call
>> pg_config.
> Yes, that's certainly an option. If there are many packages relying on
> pg_config, it's going to be easier to provide a fake pg_config rather
> than patching all those packages (such as PHP). Maybe even this
> approach could be submitted for upstream inclusion in Postgresql?
Convincing upstream to go back to a shell based pg_config might be
difficult.
They actually had that at some point, but replaced it with the current
application, because they needed a solution that also works on Windows
(natively, without using Mingw/cygwin)
--
Yours sincerely,
Floris Bos
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-08-13 10:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-09 17:34 [Buildroot] [PATCH 1/1] postgresql: remove devfiles from target Floris Bos
2014-08-10 7:01 ` Thomas De Schampheleire
2014-08-10 10:55 ` Floris Bos
2014-08-10 12:54 ` Thomas De Schampheleire
2014-08-12 16:50 ` Thomas Petazzoni
2014-08-12 17:39 ` Floris Bos
2014-08-13 7:26 ` Thomas Petazzoni
2014-08-13 10:53 ` Floris Bos
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.