All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gdbm: use full qualified permissions for chmod operations
@ 2011-01-13 14:32 Enrico Scholz
  2011-01-14  3:26 ` Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Enrico Scholz @ 2011-01-13 14:32 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Enrico Scholz, Enrico Scholz

From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>

An umask of 022 can cause 'chmod' to fail in a way like

| $ chmod -w X
| chmod: X: new permissions are r--rw-r--, not r--r--r--

It is better to specify 'a-w' because chmod is not affected by the
umask then and changes all permission bits.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 recipes/gdbm/gdbm-1.8.3/chmod.patch |   23 +++++++++++++++++++++++
 recipes/gdbm/gdbm_1.8.3.bb          |    3 ++-
 2 files changed, 25 insertions(+), 1 deletions(-)
 create mode 100644 recipes/gdbm/gdbm-1.8.3/chmod.patch

diff --git a/recipes/gdbm/gdbm-1.8.3/chmod.patch b/recipes/gdbm/gdbm-1.8.3/chmod.patch
new file mode 100644
index 0000000..11c65d9
--- /dev/null
+++ b/recipes/gdbm/gdbm-1.8.3/chmod.patch
@@ -0,0 +1,23 @@
+With an umask of 022 the build might fail with
+
+| chmod -w gdbm.h
+| chmod: gdbm.h: new permissions are r--rw----, not r--r-----
+| make: *** [gdbm.h] Error 1
+
+Index: gdbm-1.8.3/Makefile.in
+===================================================================
+--- gdbm-1.8.3.orig/Makefile.in
++++ gdbm-1.8.3/Makefile.in
+@@ -167,10 +167,10 @@ libgdbm_compat.la: $(C_LOBJS) gdbm.h
+ gdbm.h:	gdbm.proto gdbmerrno.h gdbm.proto2
+ 	rm -f gdbm.h
+ 	cp $(srcdir)/gdbm.proto gdbm.h
+-	chmod +w gdbm.h
++	chmod u+w gdbm.h
+ 	grep _ $(srcdir)/gdbmerrno.h >> gdbm.h
+ 	cat $(srcdir)/gdbm.proto2 >> gdbm.h
+-	chmod -w gdbm.h
++	chmod a-w gdbm.h
+ 
+ testgdbm: testgdbm.o libgdbm.la @LIBOBJS@
+ 	$(LIBTOOL) $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.la @LIBOBJS@
diff --git a/recipes/gdbm/gdbm_1.8.3.bb b/recipes/gdbm/gdbm_1.8.3.bb
index 9c91ae9..24c541a 100644
--- a/recipes/gdbm/gdbm_1.8.3.bb
+++ b/recipes/gdbm/gdbm_1.8.3.bb
@@ -8,7 +8,8 @@ PR = "r5"
 
 SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
 	   file://makefile.patch \
-           file://libtool-mode.patch"
+           file://libtool-mode.patch \
+           file://chmod.patch"
 
 inherit autotools
 
-- 
1.7.3.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gdbm: use full qualified permissions for chmod operations
  2011-01-13 14:32 [PATCH] gdbm: use full qualified permissions for chmod operations Enrico Scholz
@ 2011-01-14  3:26 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2011-01-14  3:26 UTC (permalink / raw)
  To: openembedded-devel

On 1/13/2011 6:32 AM, Enrico Scholz wrote:
> From: Enrico Scholz<enrico.scholz@informatik.tu-chemnitz.de>
>
> An umask of 022 can cause 'chmod' to fail in a way like
>
> | $ chmod -w X
> | chmod: X: new permissions are r--rw-r--, not r--r--r--
>
> It is better to specify 'a-w' because chmod is not affected by the
> umask then and changes all permission bits.
>
> Signed-off-by: Enrico Scholz<enrico.scholz@sigma-chemnitz.de>

Acked-by: Khem Raj <raj.khem@gmail.com>
> ---
>   recipes/gdbm/gdbm-1.8.3/chmod.patch |   23 +++++++++++++++++++++++
>   recipes/gdbm/gdbm_1.8.3.bb          |    3 ++-
>   2 files changed, 25 insertions(+), 1 deletions(-)
>   create mode 100644 recipes/gdbm/gdbm-1.8.3/chmod.patch
>
> diff --git a/recipes/gdbm/gdbm-1.8.3/chmod.patch b/recipes/gdbm/gdbm-1.8.3/chmod.patch
> new file mode 100644
> index 0000000..11c65d9
> --- /dev/null
> +++ b/recipes/gdbm/gdbm-1.8.3/chmod.patch
> @@ -0,0 +1,23 @@
> +With an umask of 022 the build might fail with
> +
> +| chmod -w gdbm.h
> +| chmod: gdbm.h: new permissions are r--rw----, not r--r-----
> +| make: *** [gdbm.h] Error 1
> +
> +Index: gdbm-1.8.3/Makefile.in
> +===================================================================
> +--- gdbm-1.8.3.orig/Makefile.in
> ++++ gdbm-1.8.3/Makefile.in
> +@@ -167,10 +167,10 @@ libgdbm_compat.la: $(C_LOBJS) gdbm.h
> + gdbm.h:	gdbm.proto gdbmerrno.h gdbm.proto2
> + 	rm -f gdbm.h
> + 	cp $(srcdir)/gdbm.proto gdbm.h
> +-	chmod +w gdbm.h
> ++	chmod u+w gdbm.h
> + 	grep _ $(srcdir)/gdbmerrno.h>>  gdbm.h
> + 	cat $(srcdir)/gdbm.proto2>>  gdbm.h
> +-	chmod -w gdbm.h
> ++	chmod a-w gdbm.h
> +
> + testgdbm: testgdbm.o libgdbm.la @LIBOBJS@
> + 	$(LIBTOOL) $(CC) $(LDFLAGS) -o testgdbm testgdbm.o libgdbm.la @LIBOBJS@
> diff --git a/recipes/gdbm/gdbm_1.8.3.bb b/recipes/gdbm/gdbm_1.8.3.bb
> index 9c91ae9..24c541a 100644
> --- a/recipes/gdbm/gdbm_1.8.3.bb
> +++ b/recipes/gdbm/gdbm_1.8.3.bb
> @@ -8,7 +8,8 @@ PR = "r5"
>
>   SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
>   	   file://makefile.patch \
> -           file://libtool-mode.patch"
> +           file://libtool-mode.patch \
> +           file://chmod.patch"
>
>   inherit autotools
>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-14  3:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 14:32 [PATCH] gdbm: use full qualified permissions for chmod operations Enrico Scholz
2011-01-14  3:26 ` Khem Raj

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.