Skip to contentSkip to conversation

postgresql: Allow successful run of postgresql-setup

PATCH Superseded Otavio Salvador 3 participants 3 messages Nov 23, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 postgresql: Allow successful run of postgresql-setup

The postgresql-setup utility log-in on postgres user to create the database, however, the shell set to the user is bash and it wasn't being installed as runtime dependency.

---

 meta-oe/recipes-dbs/postgresql/postgresql.inc | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-dbs/postgresql/postgresql.inc +1 -0
index 3bf71f02e..5fc823898 100644
@@ -231,6 +231,7 @@ FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \
        if 'pam' == d.getVar('enable_pam') \
        else ''} \
 "
+RDEPENDS_${PN} += "bash"
 
 FILES_${PN}-client = "${bindir}/clusterdb \
     ${bindir}/createdb \
Signature · 1 line
2.19.1
#1 lore raw
Quoted 15 lines · Otavio Salvador

The postgresql-setup utility log-in on postgres user to create the database, however, the shell set to the user is bash and it wasn't being installed as runtime dependency.

---

  meta-oe/recipes-dbs/postgresql/postgresql.inc | 1 +
  1 file changed, 1 insertion(+)
meta-oe/recipes-dbs/postgresql/postgresql.inc +0 -0
index 3bf71f02e..5fc823898 100644

meta-oe/recipes-dbs/postgresql/postgresql.inc FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \ · line 234

Quoted 4 lines
meta-oe/recipes-dbs/postgresql/postgresql.inc +1 -0
@@ -231,6 +231,7 @@ FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \
         if 'pam' == d.getVar('enable_pam') \
         else ''} \
  "
+RDEPENDS_${PN} += "bash"

Is bash needed or would busybox' ash be enough? If so, then changing USERADD_PARAM_${PN} to use /bin/sh instead would be leaner.

// Martin

Quoted 4 lines
meta-oe/recipes-dbs/postgresql/postgresql.inc +0 -0
  FILES_${PN}-client = "${bindir}/clusterdb \
      ${bindir}/createdb \
 
Signature · 10 lines
Kind regards,
Martin Hundebøll
Embedded Linux Consultant

+45 61 65 54 61
[email protected]

Geanix IVS
https://geanix.com
DK39600706
#2 lore raw
Quoted 4 lines · Martin Hundebøll
Quoted 4 lines
meta-oe/recipes-dbs/postgresql/postgresql.inc +0 -0
index 3bf71f02e..5fc823898 100644
Quoted 8 lines

meta-oe/recipes-dbs/postgresql/postgresql.inc FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \ · line 234

Quoted 5 lines
meta-oe/recipes-dbs/postgresql/postgresql.inc +1 -0
@@ -231,6 +231,7 @@ FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \
         if 'pam' == d.getVar('enable_pam') \
         else ''} \
  "
+RDEPENDS_${PN} += "bash"

Is bash needed or would busybox' ash be enough? If so, then changing USERADD_PARAM_${PN} to use /bin/sh instead would be leaner.

I will prepare a v2 doing it.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750