Skip to contentSkip to conversation

openssl: always install openssl.cnf

PATCH New Floris Bos 3 participants 5 messages May 25, 2015 – Jul 11, 2015

lore
Share & tools
lore

Floris Bos

author
#0 lore raw

PATCH 1/1 openssl: always install openssl.cnf

Install openssl.cnf even when the OpenSSL binary is not selected, because other packages that use the OpenSSL library may use it as well.

E.g. PHP's methods to programmatically create private keys and certificates depend on it.
See: http://php.net/manual/en/function.openssl-pkey-new.php

---
 package/openssl/openssl.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/openssl/openssl.mk +6 -0
index f90c811..9cbf42d 100644
@@ -19,7 +19,13 @@ define OPENSSL_DISABLE_APPS
 	$(SED) '/^build_apps/! s/build_apps//' $(@D)/Makefile.org
 	$(SED) '/^DIRS=/ s/apps//' $(@D)/Makefile.org
 endef
+# Do always install openssl.cnf as other packages may depend on it
+define OPENSSL_INSTALL_CNF
+	$(INSTALL) -m 0644 $(@D)/apps/openssl.cnf \
+		$(TARGET_DIR)/etc/ssl/openssl.cnf
+endef
 OPENSSL_PRE_CONFIGURE_HOOKS += OPENSSL_DISABLE_APPS
+OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_INSTALL_CNF
 endif
 
 ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
Signature · 1 line
2.1.4
author
#1 lore raw

PATCH 1/1 postgresql: init script: wait till server has started

Adds "-w" option to init script to wait till the database server has fully started and accepts connections before continuing.

Prevents other applications that depend on PostgreSQL from failing to start, if the database server is not ready yet. Times out after 60 seconds by default.

---
 package/postgresql/S50postgresql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/postgresql/S50postgresql +1 -1
index 86a8d83..a895bcf 100644
@@ -13,7 +13,7 @@ fi
 
 start() {
 	echo -n "Starting postgresql: "
-	su - postgres -c '/usr/bin/pg_ctl start -D /var/lib/pgsql -l logfile'
+	su - postgres -c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql -l logfile'
 	echo "OK"
 }
 stop() {
Signature · 1 line
2.1.4
#2 lore raw

PATCH 1/1 postgresql: init script: wait till server has started

Floris, All,

On 2015-05-25 19:20 +0200, Floris Bos spake thusly:

Quoted 8 lines

Adds "-w" option to init script to wait till the database server has fully started and accepts connections before continuing.

Prevents other applications that depend on PostgreSQL from failing to start, if the database server is not ready yet. Times out after 60 seconds by default.

Regards,
Yann E. MORIN.

Quoted 24 lines
---
 package/postgresql/S50postgresql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/postgresql/S50postgresql +1 -1
index 86a8d83..a895bcf 100644
@@ -13,7 +13,7 @@ fi
 
 start() {
 	echo -n "Starting postgresql: "
-	su - postgres -c '/usr/bin/pg_ctl start -D /var/lib/pgsql -l logfile'
+	su - postgres -c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql -l logfile'
 	echo "OK"
 }
 stop() {
Signature · 6 lines
2.1.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 postgresql: init script: wait till server has started

In reply to Floris Bos

Dear Floris Bos,

Quoted 11 lines · Floris Bos

Adds "-w" option to init script to wait till the database server has fully started and accepts connections before continuing.

Prevents other applications that depend on PostgreSQL from failing to start, if the database server is not ready yet. Times out after 60 seconds by default.

---
 package/postgresql/S50postgresql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 openssl: always install openssl.cnf

In reply to Floris Bos

Dear Floris Bos,

Quoted 4 lines · Floris Bos

Install openssl.cnf even when the OpenSSL binary is not selected, because other packages that use the OpenSSL library may use it as well.

Quoted 8 lines

E.g. PHP's methods to programmatically create private keys and certificates depend on it.
See: http://php.net/manual/en/function.openssl-pkey-new.php

---
 package/openssl/openssl.mk | 6 ++++++
 1 file changed, 6 insertions(+)

I've marked this patch as Superseded, because since commit
http://git.buildroot.net/buildroot/commit/package/openssl?id=a7bc0b96233900a4f36cbb333c12ad64b03f8db9,
the openssl.conf file is always installed.

Let me know if that doesn't work for you.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com