aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gdbm
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>2011-01-13 22:32:15 +0000
committerKhem Raj <raj.khem@gmail.com>2011-01-15 15:45:56 -0800
commit72576de5f3aec65970e75f2116516e33239b8d9f (patch)
tree362206844b17a4f665bc4baff5dc4d22db41ea62 /recipes/gdbm
parent9086784ba8e85b92bdf65355d9de58dc29a71958 (diff)
downloadopenembedded-72576de5f3aec65970e75f2116516e33239b8d9f.tar.gz
gdbm: use full qualified permissions for chmod operations
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> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/gdbm')
-rw-r--r--recipes/gdbm/gdbm-1.8.3/chmod.patch23
-rw-r--r--recipes/gdbm/gdbm_1.8.3.bb3
2 files changed, 25 insertions, 1 deletions
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 0000000000..11c65d96b9
--- /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 9c91ae9012..24c541a584 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