[Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres".

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Mar 7 08:29:08 UTC 2016


Hello,

On Mon, 7 Mar 2016 06:51:42 +0200, Baruch Siach wrote:

> On Sun, Mar 06, 2016 at 10:29:09PM +0200, Alan Yaniger wrote:
> > Without setting the owner of /var/lib/pgsql to the user "postgres", 
> > the postgres server fails to start on boot.
> > 
> > Signed-off-by: Alan Yaniger <alan at tkos.co.il>
> > ---
> >  package/postgresql/postgresql.mk | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
> > index 444c1b1..5906ce9 100644
> > --- a/package/postgresql/postgresql.mk
> > +++ b/package/postgresql/postgresql.mk
> > @@ -17,6 +17,10 @@ POSTGRESQL_CONF_ENV = ac_cv_type_struct_sockaddr_in6=yes \
> >  POSTGRESQL_AUTORECONF = YES
> >  POSTGRESQL_CONF_OPTS = --disable-rpath
> >  
> > +define POSTGRESQL_PERMISSIONS
> > +	/var/lib/pgsql d 755 postgres postgres - - - - -
> > +endef
> 
> A better place for this IMO would be near POSTGRESQL_USERS below.

Well, there is already a POSTGRESQL_USERS:

define POSTGRESQL_USERS
        postgres -1 postgres -1 * /var/lib/pgsql /bin/sh - PostgreSQL Server
endef

And this should already create /var/lib/pgsql, owned by the
postgres:postgres user.

Best regards,

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


More information about the buildroot mailing list