summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch95
-rw-r--r--meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb1
2 files changed, 96 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch
new file mode 100644
index 000000000..bf232ac27
--- /dev/null
+++ b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch
@@ -0,0 +1,95 @@
1From bb693db0e1d1d693e8ca31fcbc4f46d1674eeca1 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 13 Sep 2018 14:20:57 +0800
4Subject: [PATCH] makeinit.sh: fix parallel build issue
5
6While building plugins, each <plugin>.c requires a <plugin>_init.c,
7and the <plugin>_init.c is dynamically generated by makeinit.sh.
8
9But the makeinit.sh generates all *_init.c (13 mechanism plugins,
103 auxprop plugins) at one time, if there are multiple plugins,
11there will be multiple makeinit.sh invoking.
12
13It caused a parallel issue, the *_init.c files will be generated
14repeatedly.
15
16It occasionally generate dapdb_init.c incorrectly
17[snip plugins/ldapdb_init.c]
18SASL_CANONUSER_PLUG_INIT( ldapdb )
19SASL_CANONUSER_PLUG_INIT( ldapdb )
20SASL_CANONUSER_PLUG_INIT( ldapdb )
21[snip plugins/ldapdb_init.c]
22
23Let makeinit.sh generate the expected <plugin>_init.c which
24is exactly required by <plugin>.c.
25
26Upstream-Status: Submitted [https://github.com/cyrusimap/cyrus-sasl/pull/532]
27
28Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
29---
30 plugins/Makefile.am | 2 +-
31 plugins/makeinit.sh | 19 ++++++++++++++-----
32 2 files changed, 15 insertions(+), 6 deletions(-)
33
34diff --git a/plugins/Makefile.am b/plugins/Makefile.am
35index 929f6a4..81e7f0b 100644
36--- a/plugins/Makefile.am
37+++ b/plugins/Makefile.am
38@@ -149,4 +149,4 @@ passdss_init.c sasldb_init.c sql_init.c ldapdb_init.c
39 CLEANFILES=$(init_src)
40
41 ${init_src}: $(srcdir)/makeinit.sh
42- $(SHELL) $(srcdir)/makeinit.sh
43+ $(SHELL) $(srcdir)/makeinit.sh $@
44diff --git a/plugins/makeinit.sh b/plugins/makeinit.sh
45index cc65f7d..3131877 100644
46--- a/plugins/makeinit.sh
47+++ b/plugins/makeinit.sh
48@@ -1,7 +1,9 @@
49+plugin_init="$1"
50 # mechanism plugins
51 for mech in anonymous crammd5 digestmd5 scram gssapiv2 kerberos4 login ntlm otp passdss plain srp gs2; do
52+ if [ ${plugin_init} = "${mech}_init.c" ];then
53
54-echo "
55+ echo "
56 #include <config.h>
57
58 #include <string.h>
59@@ -43,13 +45,16 @@ BOOL APIENTRY DllMain( HANDLE hModule,
60
61 SASL_CLIENT_PLUG_INIT( $mech )
62 SASL_SERVER_PLUG_INIT( $mech )
63-" > ${mech}_init.c
64+" > ${mech}_init.c
65+ echo "generating $1"
66+ fi # End of `if [ ${plugin_init} = "${mech}_init.c" ];then'
67 done
68
69 # auxprop plugins
70 for auxprop in sasldb sql ldapdb; do
71+ if [ ${plugin_init} = "${auxprop}_init.c" ];then
72
73-echo "
74+ echo "
75 #include <config.h>
76
77 #include <string.h>
78@@ -86,8 +91,12 @@ BOOL APIENTRY DllMain( HANDLE hModule,
79 #endif
80
81 SASL_AUXPROP_PLUG_INIT( $auxprop )
82-" > ${auxprop}_init.c
83+" > ${auxprop}_init.c
84+ echo "generating $1"
85+ fi # End of `if [ ${plugin_init} = "${auxprop}_init.c" ];then'
86 done
87
88 # ldapdb is also a canon_user plugin
89-echo "SASL_CANONUSER_PLUG_INIT( ldapdb )" >> ldapdb_init.c
90+if [ ${plugin_init} = "ldapdb_init.c" ];then
91+ echo "SASL_CANONUSER_PLUG_INIT( ldapdb )" >> ldapdb_init.c
92+fi
93--
942.7.4
95
diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb
index 573f8224d..594e55da1 100644
--- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb
+++ b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb
@@ -15,6 +15,7 @@ SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https \
15 file://saslauthd.conf \ 15 file://saslauthd.conf \
16 file://0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch \ 16 file://0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch \
17 file://0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch \ 17 file://0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch \
18 file://0001-makeinit.sh-fix-parallel-build-issue.patch \
18 " 19 "
19 20
20UPSTREAM_CHECK_URI = "https://github.com/cyrusimap/cyrus-sasl/archives" 21UPSTREAM_CHECK_URI = "https://github.com/cyrusimap/cyrus-sasl/archives"