* [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres".
@ 2016-03-06 20:29 Alan Yaniger
2016-03-06 20:29 ` Alan Yaniger
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Alan Yaniger @ 2016-03-06 20:29 UTC (permalink / raw)
To: buildroot
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@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
+
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
# PostgreSQL does not build against uClibc with locales
# enabled, due to an uClibc bug, see
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres". 2016-03-06 20:29 [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Alan Yaniger @ 2016-03-06 20:29 ` Alan Yaniger 2016-03-06 20:29 ` [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example Alan Yaniger ` (2 subsequent siblings) 3 siblings, 0 replies; 10+ messages in thread From: Alan Yaniger @ 2016-03-06 20:29 UTC (permalink / raw) To: buildroot Without this change, the postgres server fails to start on boot. Signed-off-by: Alan Yaniger <alan@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 + ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) # PostgreSQL does not build against uClibc with locales # enabled, due to an uClibc bug, see -- 1.9.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example. 2016-03-06 20:29 [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Alan Yaniger 2016-03-06 20:29 ` Alan Yaniger @ 2016-03-06 20:29 ` Alan Yaniger 2016-05-23 20:44 ` Peter Korsgaard 2016-03-06 20:29 ` [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example. In the makedev syntax documentation, one of the examples lacks the "mode" value Alan Yaniger 2016-03-07 4:51 ` [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Baruch Siach 3 siblings, 1 reply; 10+ messages in thread From: Alan Yaniger @ 2016-03-06 20:29 UTC (permalink / raw) To: buildroot In the makedev syntax documentation, one of the examples lacks the "mode" value. This patch fixes that example. Signed-off-by: Alan Yaniger <alan@tkos.co.il> --- docs/manual/makedev-syntax.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manual/makedev-syntax.txt b/docs/manual/makedev-syntax.txt index 0bbc16e..e4dffc9 100644 --- a/docs/manual/makedev-syntax.txt +++ b/docs/manual/makedev-syntax.txt @@ -44,7 +44,7 @@ this syntax, you will need to write: ---- /usr/bin/foo f 755 0 0 - - - - - /usr/bin/bar f 755 root root - - - - - -/data/buz f buz-user buz-group - - - - - +/data/buz f 644 buz-user buz-group - - - - - ---- Alternatively, if you want to change owner/permission of a directory -- 1.9.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example. 2016-03-06 20:29 ` [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example Alan Yaniger @ 2016-05-23 20:44 ` Peter Korsgaard 0 siblings, 0 replies; 10+ messages in thread From: Peter Korsgaard @ 2016-05-23 20:44 UTC (permalink / raw) To: buildroot >>>>> "Alan" == Alan Yaniger <alan@tkos.co.il> writes: > In the makedev syntax documentation, one of the examples lacks the "mode" value. > This patch fixes that example. > Signed-off-by: Alan Yaniger <alan@tkos.co.il> Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example. In the makedev syntax documentation, one of the examples lacks the "mode" value. 2016-03-06 20:29 [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Alan Yaniger 2016-03-06 20:29 ` Alan Yaniger 2016-03-06 20:29 ` [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example Alan Yaniger @ 2016-03-06 20:29 ` Alan Yaniger 2016-03-07 4:51 ` [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Baruch Siach 3 siblings, 0 replies; 10+ messages in thread From: Alan Yaniger @ 2016-03-06 20:29 UTC (permalink / raw) To: buildroot Signed-off-by: Alan Yaniger <alan@tkos.co.il> --- docs/manual/makedev-syntax.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manual/makedev-syntax.txt b/docs/manual/makedev-syntax.txt index 0bbc16e..e4dffc9 100644 --- a/docs/manual/makedev-syntax.txt +++ b/docs/manual/makedev-syntax.txt @@ -44,7 +44,7 @@ this syntax, you will need to write: ---- /usr/bin/foo f 755 0 0 - - - - - /usr/bin/bar f 755 root root - - - - - -/data/buz f buz-user buz-group - - - - - +/data/buz f 644 buz-user buz-group - - - - - ---- Alternatively, if you want to change owner/permission of a directory -- 1.9.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres". 2016-03-06 20:29 [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Alan Yaniger ` (2 preceding siblings ...) 2016-03-06 20:29 ` [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example. In the makedev syntax documentation, one of the examples lacks the "mode" value Alan Yaniger @ 2016-03-07 4:51 ` Baruch Siach 2016-03-07 5:40 ` Baruch Siach 2016-03-07 8:29 ` Thomas Petazzoni 3 siblings, 2 replies; 10+ messages in thread From: Baruch Siach @ 2016-03-07 4:51 UTC (permalink / raw) To: buildroot Hi Alan, 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@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. Thanks, baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il - ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres". 2016-03-07 4:51 ` [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Baruch Siach @ 2016-03-07 5:40 ` Baruch Siach 2016-03-07 8:29 ` Thomas Petazzoni 1 sibling, 0 replies; 10+ messages in thread From: Baruch Siach @ 2016-03-07 5:40 UTC (permalink / raw) To: buildroot Hi Alan, On Mon, Mar 07, 2016 at 06:51:42AM +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@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. One more comment that I forgot: patch subject line should not end with a full stop. I believe that the maintainer applying these patches can fix those minor issues while applying, so unless someone else finds bigger issues with these patches you do not need to resend. baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il - ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres". 2016-03-07 4:51 ` [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Baruch Siach 2016-03-07 5:40 ` Baruch Siach @ 2016-03-07 8:29 ` Thomas Petazzoni 2016-03-09 9:21 ` Alan Yaniger 1 sibling, 1 reply; 10+ messages in thread From: Thomas Petazzoni @ 2016-03-07 8:29 UTC (permalink / raw) To: buildroot 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@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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres". 2016-03-07 8:29 ` Thomas Petazzoni @ 2016-03-09 9:21 ` Alan Yaniger 2016-03-09 12:15 ` Thomas Petazzoni 0 siblings, 1 reply; 10+ messages in thread From: Alan Yaniger @ 2016-03-09 9:21 UTC (permalink / raw) To: buildroot Hi Thomas, I see what my error was. I installed the rootfs on my SSD by copying it from a partition on a USB-disk which I had mounted. Then I ran "cp" to copy from the mounted partition to the SSD, and I forgot to use the -p option to preserve attributes. When I installed after the "fix", I used "tar" to install, which preserved the ownership. I changed the state of the patch to "Rejected" in Patchwork. Alan On 07/03/16 09:29, Thomas Petazzoni wrote: > 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@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 -- Alan Yaniger Tk Open Systems, Ltd Telephone: 0546-841-481 Skype: alanyaniger http://tkos.co.il ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres". 2016-03-09 9:21 ` Alan Yaniger @ 2016-03-09 12:15 ` Thomas Petazzoni 0 siblings, 0 replies; 10+ messages in thread From: Thomas Petazzoni @ 2016-03-09 12:15 UTC (permalink / raw) To: buildroot Alan, On Wed, 9 Mar 2016 11:21:49 +0200, Alan Yaniger wrote: > I see what my error was. I installed the rootfs on my SSD by copying > it from a partition on a USB-disk which I had mounted. Then I ran "cp" > to copy from the mounted partition to the SSD, and I forgot to use the -p > option to preserve attributes. When I installed after the "fix", I used "tar" to > install, which preserved the ownership. OK. > I changed the state of the patch to "Rejected" in Patchwork. Thanks for following up and changing the state of your patch! Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-05-23 20:44 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-06 20:29 [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Alan Yaniger 2016-03-06 20:29 ` Alan Yaniger 2016-03-06 20:29 ` [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example Alan Yaniger 2016-05-23 20:44 ` Peter Korsgaard 2016-03-06 20:29 ` [Buildroot] [PATCH 2/2] docs: Fixed syntax error in makedev-syntax example. In the makedev syntax documentation, one of the examples lacks the "mode" value Alan Yaniger 2016-03-07 4:51 ` [Buildroot] [PATCH 1/2] Set PGROOT dir owner to be "postgres" Baruch Siach 2016-03-07 5:40 ` Baruch Siach 2016-03-07 8:29 ` Thomas Petazzoni 2016-03-09 9:21 ` Alan Yaniger 2016-03-09 12:15 ` 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.