diff options
-rw-r--r-- | meta-oe/recipes-devtools/luaposix/luaposix/0001-fix-avoid-race-condition-between-test-and-mkdir.patch | 75 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb | 21 |
2 files changed, 96 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/luaposix/luaposix/0001-fix-avoid-race-condition-between-test-and-mkdir.patch b/meta-oe/recipes-devtools/luaposix/luaposix/0001-fix-avoid-race-condition-between-test-and-mkdir.patch new file mode 100644 index 000000000..d8a9e3d2b --- /dev/null +++ b/meta-oe/recipes-devtools/luaposix/luaposix/0001-fix-avoid-race-condition-between-test-and-mkdir.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From 4dfca036c96071bd2a2c80ff84719c6d37858373 Mon Sep 17 00:00:00 2001 | ||
2 | From: Haseeb Ashraf <Haseeb_Ashraf@mentor.com> | ||
3 | Date: Fri, 17 Apr 2020 14:36:50 +0500 | ||
4 | Subject: [PATCH 1/1] fix: avoid race condition between test and mkdir | ||
5 | |||
6 | when building in parallel the race condition, when the directory | ||
7 | is tested for existence and it is created, can break the build | ||
8 | |||
9 | Signed-off-by: Haseeb Ashraf <Haseeb_Ashraf@mentor.com> | ||
10 | --- | ||
11 | Makefile.in | 6 +++--- | ||
12 | build-aux/rockspecs.mk | 2 +- | ||
13 | local.mk | 2 +- | ||
14 | 3 files changed, 5 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/Makefile.in b/Makefile.in | ||
17 | index 9b51ef3..4722525 100644 | ||
18 | --- a/Makefile.in | ||
19 | +++ b/Makefile.in | ||
20 | @@ -1637,7 +1637,7 @@ distclean-tags: | ||
21 | |||
22 | distdir: $(DISTFILES) | ||
23 | $(am__remove_distdir) | ||
24 | - test -d "$(distdir)" || mkdir "$(distdir)" | ||
25 | + $(MKDIR_P) "$(distdir)" | ||
26 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
27 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
28 | list='$(DISTFILES)'; \ | ||
29 | @@ -1975,7 +1975,7 @@ clean-local: | ||
30 | rm -f $(posix_submodules) | ||
31 | |||
32 | $(allhtml): $(EXTRA_ext_posix_posix_la_SOURCES) $(ext_posix_posix_la_SOURCES) | ||
33 | - test -d $(builddir)/doc || mkdir $(builddir)/doc | ||
34 | + $(MKDIR_P) $(builddir)/doc | ||
35 | @HAVE_LDOC_TRUE@ $(LDOC) -c build-aux/config.ld -d $(abs_srcdir)/doc . | ||
36 | @HAVE_LDOC_FALSE@ $(MKDIR_P) doc | ||
37 | @HAVE_LDOC_FALSE@ touch doc/index.html doc/ldoc.css | ||
38 | @@ -1983,7 +1983,7 @@ $(allhtml): $(EXTRA_ext_posix_posix_la_SOURCES) $(ext_posix_posix_la_SOURCES) | ||
39 | doc: $(allhtml) | ||
40 | |||
41 | $(luarocks_config): Makefile.am | ||
42 | - @test -d build-aux || mkdir build-aux | ||
43 | + @$(MKDIR_P) build-aux | ||
44 | $(AM_V_GEN){ \ | ||
45 | $(set_LUA_BINDIR); \ | ||
46 | echo 'rocks_trees = { "$(abs_srcdir)/luarocks" }'; \ | ||
47 | diff --git a/build-aux/rockspecs.mk b/build-aux/rockspecs.mk | ||
48 | index ebd1dbf..c8fbdbc 100644 | ||
49 | --- a/build-aux/rockspecs.mk | ||
50 | +++ b/build-aux/rockspecs.mk | ||
51 | @@ -62,7 +62,7 @@ LUA_INCDIR = `cd $$LUA_BINDIR/../include && pwd` | ||
52 | LUA_LIBDIR = `cd $$LUA_BINDIR/../lib && pwd` | ||
53 | |||
54 | $(luarocks_config): Makefile.am | ||
55 | - @test -d build-aux || mkdir build-aux | ||
56 | + @$(MKDIR_P) build-aux | ||
57 | $(AM_V_GEN){ \ | ||
58 | $(set_LUA_BINDIR); \ | ||
59 | echo 'rocks_trees = { "$(abs_srcdir)/luarocks" }'; \ | ||
60 | diff --git a/local.mk b/local.mk | ||
61 | index d391ef7..80b22ce 100644 | ||
62 | --- a/local.mk | ||
63 | +++ b/local.mk | ||
64 | @@ -255,7 +255,7 @@ dist_examples_DATA += \ | ||
65 | allhtml = $(dist_doc_DATA) $(dist_examples_DATA) $(dist_modules_DATA) $(dist_classes_DATA) | ||
66 | |||
67 | $(allhtml): $(EXTRA_ext_posix_posix_la_SOURCES) $(ext_posix_posix_la_SOURCES) | ||
68 | - test -d $(builddir)/doc || mkdir $(builddir)/doc | ||
69 | + $(MKDIR_P) $(builddir)/doc | ||
70 | if HAVE_LDOC | ||
71 | $(LDOC) -c build-aux/config.ld -d $(abs_srcdir)/doc . | ||
72 | else | ||
73 | -- | ||
74 | 2.17.1 | ||
75 | |||
diff --git a/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb b/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb new file mode 100644 index 000000000..1bee9fe0b --- /dev/null +++ b/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "luaposix is a POSIX binding for Lua." | ||
2 | LICENSE = "MIT" | ||
3 | HOMEPAGE = "https://github.com/luaposix/luaposix" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=7dd2aad04bb7ca212e69127ba8d58f9f" | ||
5 | |||
6 | DEPENDS += "lua-native lua" | ||
7 | |||
8 | SRC_URI = "git://github.com/luaposix/luaposix.git;branch=release \ | ||
9 | file://0001-fix-avoid-race-condition-between-test-and-mkdir.patch \ | ||
10 | " | ||
11 | SRCREV = "8e4902ed81c922ed8f76a7ed85be1eaa3fd7e66d" | ||
12 | S = "${WORKDIR}/git" | ||
13 | LUA_VERSION = "5.3" | ||
14 | |||
15 | inherit autotools pkgconfig | ||
16 | |||
17 | do_install() { | ||
18 | oe_runmake 'DESTDIR=${D}' 'luadir=${datadir}/lua/${LUA_VERSION}' 'luaexecdir=${libdir}/lua/${LUA_VERSION}' install | ||
19 | } | ||
20 | |||
21 | FILES_${PN} = "${datadir}/lua/${LUA_VERSION} ${libdir}/lua/${LUA_VERSION}" | ||