* [Buildroot] [PATCH v2 1/3] postgresql: add replacement pg_config
@ 2014-08-13 13:57 Floris Bos
2014-08-13 13:57 ` [Buildroot] [PATCH v2 2/3] postgresql: remove devfiles from target Floris Bos
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Floris Bos @ 2014-08-13 13:57 UTC (permalink / raw)
To: buildroot
Normally pg_config is a native application compiled for the
target architecture. Since we cannot execute those on the
host system, provide a simple shell script as replacement.
Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
package/postgresql/pg_config | 19 +++++++++++++++++++
package/postgresql/postgresql.mk | 8 ++++++++
2 files changed, 27 insertions(+)
create mode 100644 package/postgresql/pg_config
diff --git a/package/postgresql/pg_config b/package/postgresql/pg_config
new file mode 100644
index 0000000..85c0e63
--- /dev/null
+++ b/package/postgresql/pg_config
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+#
+# Minimal pg_config implementation as replacement for the native pg_config application
+# Only implements --includedir and --libdir
+#
+
+prefix=/usr
+
+case "$1" in
+ --includedir)
+ echo "$prefix/include"
+ ;;
+ --libdir)
+ echo "$prefix/lib"
+ ;;
+ *)
+ echo "Usage: $0 {--includedir|--libdir}"
+esac
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index 6941e55..dd2e678 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -11,6 +11,7 @@ POSTGRESQL_LICENSE = PostgreSQL
POSTGRESQL_LICENSE_FILES = COPYRIGHT
POSTGRESQL_INSTALL_STAGING = YES
+POSTGRESQL_CONFIG_SCRIPTS = pg_config
ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
POSTGRESQL_CONF_OPT += --disable-thread-safety
@@ -55,6 +56,13 @@ endef
POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP
+define POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG
+ $(INSTALL) -m 0755 -D package/postgresql/pg_config \
+ $(STAGING_DIR)/usr/bin/pg_config
+endef
+
+POSTGRESQL_POST_INSTALL_STAGING_HOOKS += POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG
+
define POSTGRESQL_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/postgresql/S50postgresql \
$(TARGET_DIR)/etc/init.d/S50postgresql
--
1.8.3.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 2/3] postgresql: remove devfiles from target
2014-08-13 13:57 [Buildroot] [PATCH v2 1/3] postgresql: add replacement pg_config Floris Bos
@ 2014-08-13 13:57 ` Floris Bos
2014-08-17 19:17 ` Thomas Petazzoni
2014-08-13 13:57 ` [Buildroot] [PATCH v2 3/3] php: add pdo_pgsql extension Floris Bos
2014-08-17 19:20 ` [Buildroot] [PATCH v2 1/3] postgresql: add replacement pg_config Thomas Petazzoni
2 siblings, 1 reply; 8+ messages in thread
From: Floris Bos @ 2014-08-13 13:57 UTC (permalink / raw)
To: buildroot
Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
package/postgresql/postgresql.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index dd2e678..19f9163 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -52,6 +52,7 @@ endef
define POSTGRESQL_INSTALL_TARGET_FIXUP
$(INSTALL) -dm 0700 $(TARGET_DIR)/var/lib/pgsql
+ $(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 v2 3/3] php: add pdo_pgsql extension
2014-08-13 13:57 [Buildroot] [PATCH v2 1/3] postgresql: add replacement pg_config Floris Bos
2014-08-13 13:57 ` [Buildroot] [PATCH v2 2/3] postgresql: remove devfiles from target Floris Bos
@ 2014-08-13 13:57 ` Floris Bos
2014-08-17 19:21 ` Thomas Petazzoni
2014-08-17 19:20 ` [Buildroot] [PATCH v2 1/3] postgresql: add replacement pg_config Thomas Petazzoni
2 siblings, 1 reply; 8+ messages in thread
From: Floris Bos @ 2014-08-13 13:57 UTC (permalink / raw)
To: buildroot
Adds support for the PDO PostgreSQL extension to the PHP package.
Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
package/php/Config.ext | 10 ++++++++++
package/php/php.mk | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/package/php/Config.ext b/package/php/Config.ext
index 078be8d..f0719bb 100644
--- a/package/php/Config.ext
+++ b/package/php/Config.ext
@@ -135,6 +135,16 @@ comment "MySQL drivers need a toolchain w/ C++"
depends on BR2_USE_MMU
depends on !BR2_INSTALL_LIBSTDCPP
+config BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL
+ bool "PostgreSQL"
+ depends on BR2_TOOLCHAIN_USES_GLIBC
+ select BR2_PACKAGE_POSTGRESQL
+ help
+ PDO driver for PostgreSQL
+
+comment "PostgreSQL needs an (e)glibc toolchain"
+ depends on !BR2_TOOLCHAIN_USES_GLIBC
+
config BR2_PACKAGE_PHP_EXT_PDO_SQLITE
bool "SQLite3"
select BR2_PACKAGE_SQLITE
diff --git a/package/php/php.mk b/package/php/php.mk
index de7d668..d0418ad 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -162,6 +162,10 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y)
PHP_CONF_OPT += --with-pdo-mysql=$(STAGING_DIR)/usr
PHP_DEPENDENCIES += mysql
endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL),y)
+ PHP_CONF_OPT += --with-pdo-pgsql=$(STAGING_DIR)/usr
+ PHP_DEPENDENCIES += postgresql
+endif
endif
### Use external PCRE if it's available
--
1.8.3.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 2/3] postgresql: remove devfiles from target
2014-08-13 13:57 ` [Buildroot] [PATCH v2 2/3] postgresql: remove devfiles from target Floris Bos
@ 2014-08-17 19:17 ` Thomas Petazzoni
2014-08-17 19:57 ` Floris Bos
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2014-08-17 19:17 UTC (permalink / raw)
To: buildroot
Dear Floris Bos,
On Wed, 13 Aug 2014 15:57:10 +0200, Floris Bos wrote:
> Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
> ---
> package/postgresql/postgresql.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
> index dd2e678..19f9163 100644
> --- a/package/postgresql/postgresql.mk
> +++ b/package/postgresql/postgresql.mk
> @@ -52,6 +52,7 @@ endef
>
> define POSTGRESQL_INSTALL_TARGET_FIXUP
> $(INSTALL) -dm 0700 $(TARGET_DIR)/var/lib/pgsql
> + $(RM) -rf $(TARGET_DIR)/usr/lib/postgresql/pgxs
> endef
>
> POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP
I've applied the patch, thanks. However, I'm not sure to understand
why you're not removing 'pg_config' from the target.
Thanks,
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 v2 1/3] postgresql: add replacement pg_config
2014-08-13 13:57 [Buildroot] [PATCH v2 1/3] postgresql: add replacement pg_config Floris Bos
2014-08-13 13:57 ` [Buildroot] [PATCH v2 2/3] postgresql: remove devfiles from target Floris Bos
2014-08-13 13:57 ` [Buildroot] [PATCH v2 3/3] php: add pdo_pgsql extension Floris Bos
@ 2014-08-17 19:20 ` Thomas Petazzoni
2014-08-17 19:22 ` Thomas Petazzoni
2 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2014-08-17 19:20 UTC (permalink / raw)
To: buildroot
Dear Floris Bos,
On Wed, 13 Aug 2014 15:57:09 +0200, Floris Bos wrote:
> Normally pg_config is a native application compiled for the
> target architecture. Since we cannot execute those on the
> host system, provide a simple shell script as replacement.
>
> Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
> ---
> package/postgresql/pg_config | 19 +++++++++++++++++++
> package/postgresql/postgresql.mk | 8 ++++++++
> 2 files changed, 27 insertions(+)
> create mode 100644 package/postgresql/pg_config
Applied, thanks.
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 v2 3/3] php: add pdo_pgsql extension
2014-08-13 13:57 ` [Buildroot] [PATCH v2 3/3] php: add pdo_pgsql extension Floris Bos
@ 2014-08-17 19:21 ` Thomas Petazzoni
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2014-08-17 19:21 UTC (permalink / raw)
To: buildroot
Dear Floris Bos,
On Wed, 13 Aug 2014 15:57:11 +0200, Floris Bos wrote:
> Adds support for the PDO PostgreSQL extension to the PHP package.
>
> Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
> ---
> package/php/Config.ext | 10 ++++++++++
> package/php/php.mk | 4 ++++
> 2 files changed, 14 insertions(+)
Applied to next, with a minor change.
> +comment "PostgreSQL needs an (e)glibc toolchain"
> + depends on !BR2_TOOLCHAIN_USES_GLIBC
I've changed this to "PostgreSQL driver needs..."
Thanks,
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 v2 1/3] postgresql: add replacement pg_config
2014-08-17 19:20 ` [Buildroot] [PATCH v2 1/3] postgresql: add replacement pg_config Thomas Petazzoni
@ 2014-08-17 19:22 ` Thomas Petazzoni
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2014-08-17 19:22 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 17 Aug 2014 21:20:38 +0200, Thomas Petazzoni wrote:
> Dear Floris Bos,
>
> On Wed, 13 Aug 2014 15:57:09 +0200, Floris Bos wrote:
> > Normally pg_config is a native application compiled for the
> > target architecture. Since we cannot execute those on the
> > host system, provide a simple shell script as replacement.
> >
> > Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
> > ---
> > package/postgresql/pg_config | 19 +++++++++++++++++++
> > package/postgresql/postgresql.mk | 8 ++++++++
> > 2 files changed, 27 insertions(+)
> > create mode 100644 package/postgresql/pg_config
>
> Applied, thanks.
Sorry forgot to mention this: I applied this to the next branch, not
the master branch.
Thanks,
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 v2 2/3] postgresql: remove devfiles from target
2014-08-17 19:17 ` Thomas Petazzoni
@ 2014-08-17 19:57 ` Floris Bos
0 siblings, 0 replies; 8+ messages in thread
From: Floris Bos @ 2014-08-17 19:57 UTC (permalink / raw)
To: buildroot
On 08/17/2014 09:17 PM, Thomas Petazzoni wrote:
> On Wed, 13 Aug 2014 15:57:10 +0200, Floris Bos wrote:
>> Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
>> ---
>> package/postgresql/postgresql.mk | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
>> index dd2e678..19f9163 100644
>> --- a/package/postgresql/postgresql.mk
>> +++ b/package/postgresql/postgresql.mk
>> @@ -52,6 +52,7 @@ endef
>>
>> define POSTGRESQL_INSTALL_TARGET_FIXUP
>> $(INSTALL) -dm 0700 $(TARGET_DIR)/var/lib/pgsql
>> + $(RM) -rf $(TARGET_DIR)/usr/lib/postgresql/pgxs
>> endef
>>
>> POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP
> I've applied the patch, thanks. However, I'm not sure to understand
> why you're not removing 'pg_config' from the target.
Thomas DS mentioned that having "POSTGRESQL_CONFIG_SCRIPTS = pg_config"
also causes automatic removal from the target
And have that in the first patch of the patch series that adds the fake
pg_config file.
Yours sincerely,
Floris Bos
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-08-17 19:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-13 13:57 [Buildroot] [PATCH v2 1/3] postgresql: add replacement pg_config Floris Bos
2014-08-13 13:57 ` [Buildroot] [PATCH v2 2/3] postgresql: remove devfiles from target Floris Bos
2014-08-17 19:17 ` Thomas Petazzoni
2014-08-17 19:57 ` Floris Bos
2014-08-13 13:57 ` [Buildroot] [PATCH v2 3/3] php: add pdo_pgsql extension Floris Bos
2014-08-17 19:21 ` Thomas Petazzoni
2014-08-17 19:20 ` [Buildroot] [PATCH v2 1/3] postgresql: add replacement pg_config Thomas Petazzoni
2014-08-17 19:22 ` Thomas Petazzoni
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.