diff options
5 files changed, 169 insertions, 135 deletions
diff --git a/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch b/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch index f8eb3ae67..8ca26b51b 100644 --- a/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch +++ b/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch | |||
@@ -15,11 +15,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
15 | src/ruli_addr.c | 2 +- | 15 | src/ruli_addr.c | 2 +- |
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | 16 | 1 file changed, 1 insertion(+), 1 deletion(-) |
17 | 17 | ||
18 | diff --git a/src/ruli_addr.c b/src/ruli_addr.c | ||
19 | index 00d5d0d..f1eabae 100644 | ||
20 | --- a/src/ruli_addr.c | 18 | --- a/src/ruli_addr.c |
21 | +++ b/src/ruli_addr.c | 19 | +++ b/src/ruli_addr.c |
22 | @@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli_addr *addr, int family) | 20 | @@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli |
23 | { | 21 | { |
24 | switch (family) { | 22 | switch (family) { |
25 | case PF_INET: | 23 | case PF_INET: |
@@ -28,6 +26,25 @@ index 00d5d0d..f1eabae 100644 | |||
28 | 26 | ||
29 | case PF_INET6: | 27 | case PF_INET6: |
30 | return ruli_inet6_print(out, &addr->ipv6); | 28 | return ruli_inet6_print(out, &addr->ipv6); |
31 | -- | 29 | --- a/sample/getaddrinfo.c |
32 | 2.13.1 | 30 | +++ b/sample/getaddrinfo.c |
33 | 31 | @@ -174,7 +174,7 @@ static void solve(const char *fullname) | |
32 | |||
33 | for (ai = ai_res; ai; ai = ai->ai_next) { | ||
34 | |||
35 | - printf(fullname); | ||
36 | + printf("%s", fullname); | ||
37 | |||
38 | switch (ai->ai_family) { | ||
39 | case PF_INET: | ||
40 | --- a/sample/ruli-getaddrinfo.c | ||
41 | +++ b/sample/ruli-getaddrinfo.c | ||
42 | @@ -176,7 +176,7 @@ static void solve(const char *fullname) | ||
43 | |||
44 | for (ai = ai_res; ai; ai = ai->ai_next) { | ||
45 | |||
46 | - printf(fullname); | ||
47 | + printf("%s", fullname); | ||
48 | |||
49 | switch (ai->ai_family) { | ||
50 | case PF_INET: | ||
diff --git a/meta-networking/recipes-support/ruli/files/0001-Make-space-for-flags-from-environment.patch b/meta-networking/recipes-support/ruli/files/0001-Make-space-for-flags-from-environment.patch new file mode 100644 index 000000000..c3ca07a39 --- /dev/null +++ b/meta-networking/recipes-support/ruli/files/0001-Make-space-for-flags-from-environment.patch | |||
@@ -0,0 +1,95 @@ | |||
1 | From bb19a2c7e5b3142d70d3e13c2d8a92a63f2b840a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 20 Nov 2019 22:12:52 -0800 | ||
4 | Subject: [PATCH] Make space for flags from environment | ||
5 | |||
6 | Add force option to ln cmd, so do_install can be rerun in same directory | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | sample/Makefile | 20 ++++++++++---------- | ||
12 | src/Makefile | 8 ++++---- | ||
13 | 2 files changed, 14 insertions(+), 14 deletions(-) | ||
14 | |||
15 | diff --git a/sample/Makefile b/sample/Makefile | ||
16 | index 15cafd9..d83641f 100644 | ||
17 | --- a/sample/Makefile | ||
18 | +++ b/sample/Makefile | ||
19 | @@ -35,9 +35,9 @@ ifeq ($(PLATFORM),SunOS) | ||
20 | SOLARIS_LIBS = -lresolv -lnsl -lsocket | ||
21 | endif | ||
22 | |||
23 | -CC = gcc | ||
24 | -CFLAGS = -O2 -pipe -Wall -g -I../src -I$(OOP_INCLUDE_DIR) | ||
25 | -LDFLAGS = -L../src -L$(OOP_LIB_DIR) $(SOLARIS_LDFLAGS) | ||
26 | +CC ?= gcc | ||
27 | +CFLAGS += -O2 -pipe -Wall -g -I../src -I$(OOP_INCLUDE_DIR) | ||
28 | +LDFLAGS += -L../src -L$(OOP_LIB_DIR) $(SOLARIS_LDFLAGS) | ||
29 | UNRULI_LINK = $(CC) $(ARCH) $(LDFLAGS) -o $@ $^ $(SOLARIS_LIBS) | ||
30 | LINK = $(UNRULI_LINK) -lruli -loop | ||
31 | |||
32 | @@ -65,13 +65,13 @@ install: $(TARGETS) | ||
33 | mkdir -p $(INSTALL_BIN_DIR) $(INSTALL_MAN1_DIR) | ||
34 | cp $(TARGETS) $(INSTALL_BIN_DIR) | ||
35 | cp ../doc/man/*.1 $(INSTALL_MAN1_DIR) | ||
36 | - cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 smtpsearch.1 | ||
37 | - cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 httpsearch.1 | ||
38 | - cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 sync_srvsearch.1 | ||
39 | - cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 sync_smtpsearch.1 | ||
40 | - cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 sync_httpsearch.1 | ||
41 | - cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 ruli-getaddrinfo.1 | ||
42 | - cd $(INSTALL_MAN_DIR)/man1 && ln -s srvsearch.1 getaddrinfo.1 | ||
43 | + cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 smtpsearch.1 | ||
44 | + cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 httpsearch.1 | ||
45 | + cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 sync_srvsearch.1 | ||
46 | + cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 sync_smtpsearch.1 | ||
47 | + cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 sync_httpsearch.1 | ||
48 | + cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 ruli-getaddrinfo.1 | ||
49 | + cd $(INSTALL_MAN_DIR)/man1 && ln -sf srvsearch.1 getaddrinfo.1 | ||
50 | |||
51 | %.o: %.c | ||
52 | $(CC) $(ARCH) $(CPPFLAGS) $(CFLAGS) -c $< | ||
53 | diff --git a/src/Makefile b/src/Makefile | ||
54 | index 9b56b5e..39a5ea1 100644 | ||
55 | --- a/src/Makefile | ||
56 | +++ b/src/Makefile | ||
57 | @@ -45,7 +45,7 @@ endif | ||
58 | |||
59 | WARN = -pedantic -ansi -Wshadow -Wpointer-arith -Wcast-qual \ | ||
60 | -Wcast-align -Wwrite-strings -Wredundant-decls | ||
61 | -CC = gcc | ||
62 | +CC ?= gcc | ||
63 | |||
64 | # gcc-specific options (not valid for g++) | ||
65 | ifeq ($(CC),gcc) | ||
66 | @@ -58,7 +58,7 @@ SHARED = -fPIC | ||
67 | FLAGS = $(DEBUG) -O2 -pipe -Wall -g -shared -D_REENTRANT \ | ||
68 | $(DEFINE_SOLARIS) -I. -I$(OOP_INCLUDE_DIR) | ||
69 | SOFT_CFLAGS = $(WARN) $(FLAGS) | ||
70 | -CFLAGS = $(WARN) -Werror $(FLAGS) | ||
71 | +CFLAGS += $(WARN) -Werror $(FLAGS) | ||
72 | LIBOBJ = ruli_isaac.o ruli_mem.o ruli_rand.o ruli_util.o ruli_list.o \ | ||
73 | ruli_addr.o ruli_sock.o ruli_txt.o ruli_msg.o ruli_fsm.o \ | ||
74 | ruli_res.o ruli_parse.o ruli_host.o ruli_srv.o ruli_conf.o \ | ||
75 | @@ -66,7 +66,7 @@ LIBOBJ = ruli_isaac.o ruli_mem.o ruli_rand.o ruli_util.o ruli_list.o \ | ||
76 | ruli_getaddrinfo.o | ||
77 | SHAREDOBJ = $(LIBOBJ:%.o=%.os) | ||
78 | SONAME = libruli.so.4 | ||
79 | -LDFLAGS = -L$(OOP_LIB_DIR) | ||
80 | +LDFLAGS += -L$(OOP_LIB_DIR) | ||
81 | |||
82 | COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(CFLAGS) -c | ||
83 | SHARED_COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(SHARED) $(CFLAGS) -o $@ -c | ||
84 | @@ -95,7 +95,7 @@ install: ruli | ||
85 | cp $(SONAME) libruli.a $(INSTALL_LIB_DIR) | ||
86 | cp *.h $(INSTALL_INCLUDE_DIR) | ||
87 | cp ../doc/man/*.3 $(INSTALL_MAN3_DIR) | ||
88 | - cd $(INSTALL_LIB_DIR) && ln -s $(SONAME) libruli.so | ||
89 | + cd $(INSTALL_LIB_DIR) && ln -sf $(SONAME) libruli.so | ||
90 | @echo | ||
91 | @echo "REMINDER:" | ||
92 | @echo "Add $(INSTALL_LIB_DIR) to your dynamic loader path:" | ||
93 | -- | ||
94 | 2.24.0 | ||
95 | |||
diff --git a/meta-networking/recipes-support/ruli/files/0001-ruli_srv-Mark-prev_addr_list_size-as-unused.patch b/meta-networking/recipes-support/ruli/files/0001-ruli_srv-Mark-prev_addr_list_size-as-unused.patch new file mode 100644 index 000000000..213006a67 --- /dev/null +++ b/meta-networking/recipes-support/ruli/files/0001-ruli_srv-Mark-prev_addr_list_size-as-unused.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 895ae26e36c4498677ad0b2695a6e5af05548a29 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 20 Nov 2019 22:02:43 -0800 | ||
4 | Subject: [PATCH] ruli_srv: Mark prev_addr_list_size as unused | ||
5 | |||
6 | This ensures that compiler does not trip on building it | ||
7 | |||
8 | ruli_srv.c:157:20: error: variable 'prev_addr_list_size' set but not used [-Werror=unused-but-set-variable] | ||
9 | | int prev_addr_list_size; | ||
10 | | ^~~~~~~~~~~~~~~~~~~ | ||
11 | cc1: all warnings being treated as errors | ||
12 | |||
13 | Upstream-Status: Inappropriate [Workaround] | ||
14 | |||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | src/ruli_srv.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/src/ruli_srv.c b/src/ruli_srv.c | ||
21 | index 45c70c7..ff82349 100644 | ||
22 | --- a/src/ruli_srv.c | ||
23 | +++ b/src/ruli_srv.c | ||
24 | @@ -154,7 +154,7 @@ static void *on_walk_answer(ruli_host_t *host_qry, void *qry_arg) | ||
25 | walk_t *walk_qry = (walk_t *) qry_arg; | ||
26 | ruli_srv_t *srv_qry = walk_qry->srv_query; | ||
27 | ruli_srv_entry_t *srv_entry; | ||
28 | - int prev_addr_list_size; | ||
29 | + __attribute__((unused)) int prev_addr_list_size; | ||
30 | |||
31 | assert(ruli_host_answer_code(host_qry) != RULI_SRV_CODE_VOID); | ||
32 | |||
33 | -- | ||
34 | 2.24.0 | ||
35 | |||
diff --git a/meta-networking/recipes-support/ruli/files/Makefile.patch b/meta-networking/recipes-support/ruli/files/Makefile.patch deleted file mode 100644 index 60789a3d5..000000000 --- a/meta-networking/recipes-support/ruli/files/Makefile.patch +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | diff -Naur patch.org/ruli-0.36/Makefile patch.new/ruli-0.36/Makefile | ||
2 | --- ruli-0.36/Makefile 2015-09-10 15:14:13.952262350 -0400 | ||
3 | +++ ruli-0.36/Makefile 2015-09-10 15:14:38.628261620 -0400 | ||
4 | @@ -7,17 +7,17 @@ | ||
5 | .PHONY: default | ||
6 | default: | ||
7 | $(MAKE) -C src | ||
8 | - $(MAKE) -C sample | ||
9 | +# $(MAKE) -C sample | ||
10 | |||
11 | .PHONY: clean | ||
12 | clean: | ||
13 | $(MAKE) -C src clean | ||
14 | - $(MAKE) -C sample clean | ||
15 | +# $(MAKE) -C sample clean | ||
16 | |||
17 | .PHONY: install | ||
18 | install: | ||
19 | $(MAKE) -C src install | ||
20 | - $(MAKE) -C sample install | ||
21 | +# $(MAKE) -C sample install | ||
22 | |||
23 | .PHONY: dpkg | ||
24 | dpkg: | ||
25 | |||
26 | ===================================================================== | ||
27 | |||
28 | diff -Naur patch.org/git/src/Makefile patch.new/git/src/Makefile | ||
29 | --- ruli-0.36/src/Makefile 2005-06-13 12:34:53.000000000 -0400 | ||
30 | +++ ruli-0.36/src/Makefile 2015-09-11 09:46:06.290287347 -0400 | ||
31 | @@ -18,9 +18,9 @@ | ||
32 | # | ||
33 | # Debian packaging likes this: OOP_BASE_DIR = /usr | ||
34 | # | ||
35 | -OOP_BASE_DIR = /usr/local/oop | ||
36 | -OOP_INCLUDE_DIR = $(OOP_BASE_DIR)/include | ||
37 | -OOP_LIB_DIR = $(OOP_BASE_DIR)/lib | ||
38 | +#OOP_BASE_DIR = /usr/local/oop | ||
39 | +OOP_INCLUDE_DIR = ${PKG_CONFIG_SYSROOT_DIR}/$(includedir)/ | ||
40 | +#OOP_LIB_DIR = $(OOP_BASE_DIR)/lib | ||
41 | |||
42 | # | ||
43 | # INSTALL_BASE_DIR indicates where RULI | ||
44 | @@ -30,11 +30,11 @@ | ||
45 | # | ||
46 | # Debian packaging likes this: INSTALL_BASE_DIR = $(DESTDIR)/usr | ||
47 | # | ||
48 | -INSTALL_BASE_DIR = ../install/ruli | ||
49 | -INSTALL_INCLUDE_DIR = $(INSTALL_BASE_DIR)/include | ||
50 | -INSTALL_LIB_DIR = $(INSTALL_BASE_DIR)/lib | ||
51 | -INSTALL_MAN_DIR = $(INSTALL_BASE_DIR)/share/man | ||
52 | -INSTALL_MAN3_DIR = $(INSTALL_MAN_DIR)/man3 | ||
53 | +#INSTALL_BASE_DIR = ../install/ruli | ||
54 | +#INSTALL_INCLUDE_DIR = $(INSTALL_BASE_DIR)/include | ||
55 | +#INSTALL_LIB_DIR = $(INSTALL_BASE_DIR)/lib | ||
56 | +#INSTALL_MAN_DIR = $(INSTALL_BASE_DIR)/share/man | ||
57 | +#INSTALL_MAN3_DIR = $(INSTALL_MAN_DIR)/man3 | ||
58 | |||
59 | # SunOS, Linux | ||
60 | PLATFORM=$(shell uname) | ||
61 | @@ -45,7 +45,7 @@ | ||
62 | |||
63 | WARN = -pedantic -ansi -Wshadow -Wpointer-arith -Wcast-qual \ | ||
64 | -Wcast-align -Wwrite-strings -Wredundant-decls | ||
65 | -CC = gcc | ||
66 | +#CC = gcc | ||
67 | |||
68 | # gcc-specific options (not valid for g++) | ||
69 | ifeq ($(CC),gcc) | ||
70 | @@ -58,7 +58,7 @@ | ||
71 | FLAGS = $(DEBUG) -O2 -pipe -Wall -g -shared -D_REENTRANT \ | ||
72 | $(DEFINE_SOLARIS) -I. -I$(OOP_INCLUDE_DIR) | ||
73 | SOFT_CFLAGS = $(WARN) $(FLAGS) | ||
74 | -CFLAGS = $(WARN) -Werror $(FLAGS) | ||
75 | +CFLAGS = $(WARN) $(FLAGS) | ||
76 | LIBOBJ = ruli_isaac.o ruli_mem.o ruli_rand.o ruli_util.o ruli_list.o \ | ||
77 | ruli_addr.o ruli_sock.o ruli_txt.o ruli_msg.o ruli_fsm.o \ | ||
78 | ruli_res.o ruli_parse.o ruli_host.o ruli_srv.o ruli_conf.o \ | ||
79 | @@ -66,7 +66,7 @@ | ||
80 | ruli_getaddrinfo.o | ||
81 | SHAREDOBJ = $(LIBOBJ:%.o=%.os) | ||
82 | SONAME = libruli.so.4 | ||
83 | -LDFLAGS = -L$(OOP_LIB_DIR) | ||
84 | +#LDFLAGS = -L$(OOP_LIB_DIR) | ||
85 | |||
86 | COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(CFLAGS) -c | ||
87 | SHARED_COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(SHARED) $(CFLAGS) -o $@ -c | ||
88 | @@ -89,19 +89,19 @@ | ||
89 | strip: ruli | ||
90 | strip $(SONAME) libruli.a | ||
91 | |||
92 | -.PHONY: install | ||
93 | -install: ruli | ||
94 | - mkdir -p $(INSTALL_LIB_DIR) $(INSTALL_INCLUDE_DIR) $(INSTALL_MAN3_DIR) | ||
95 | - cp $(SONAME) libruli.a $(INSTALL_LIB_DIR) | ||
96 | - cp *.h $(INSTALL_INCLUDE_DIR) | ||
97 | - cp ../doc/man/*.3 $(INSTALL_MAN3_DIR) | ||
98 | - cd $(INSTALL_LIB_DIR) && ln -s $(SONAME) libruli.so | ||
99 | - @echo | ||
100 | - @echo "REMINDER:" | ||
101 | - @echo "Add $(INSTALL_LIB_DIR) to your dynamic loader path:" | ||
102 | - @echo "# echo $(INSTALL_LIB_DIR) >> /etc/ld.so.conf" | ||
103 | - @echo "# ldconfig" | ||
104 | - @echo | ||
105 | +#.PHONY: install | ||
106 | +#install: ruli | ||
107 | +# mkdir -p $(INSTALL_LIB_DIR) $(INSTALL_INCLUDE_DIR) $(INSTALL_MAN3_DIR) | ||
108 | +# cp $(SONAME) libruli.a $(INSTALL_LIB_DIR) | ||
109 | +# cp *.h $(INSTALL_INCLUDE_DIR) | ||
110 | +# cp ../doc/man/*.3 $(INSTALL_MAN3_DIR) | ||
111 | +# cd $(INSTALL_LIB_DIR) && ln -s $(SONAME) libruli.so | ||
112 | +# @echo | ||
113 | +# @echo "REMINDER:" | ||
114 | +# @echo "Add $(INSTALL_LIB_DIR) to your dynamic loader path:" | ||
115 | +# @echo "# echo $(INSTALL_LIB_DIR) >> /etc/ld.so.conf" | ||
116 | +# @echo "# ldconfig" | ||
117 | +# @echo | ||
118 | |||
119 | .PHONY: ruli | ||
120 | ruli: $(SONAME) libruli.a | ||
121 | |||
122 | |||
diff --git a/meta-networking/recipes-support/ruli/ruli_0.36.bb b/meta-networking/recipes-support/ruli/ruli_0.36.bb index 885796d2a..b82a3d08e 100644 --- a/meta-networking/recipes-support/ruli/ruli_0.36.bb +++ b/meta-networking/recipes-support/ruli/ruli_0.36.bb | |||
@@ -8,18 +8,27 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | |||
8 | DEPENDS = "liboop" | 8 | DEPENDS = "liboop" |
9 | 9 | ||
10 | SRC_URI = "http://download.savannah.gnu.org/releases/ruli/ruli_${PV}.orig.tar.gz \ | 10 | SRC_URI = "http://download.savannah.gnu.org/releases/ruli/ruli_${PV}.orig.tar.gz \ |
11 | file://Makefile.patch \ | ||
12 | file://0001-Fix-build-with-format-string-checks.patch \ | 11 | file://0001-Fix-build-with-format-string-checks.patch \ |
13 | file://0001-src-ruli_addr.c-Add-missing-format-string.patch \ | 12 | file://0001-src-ruli_addr.c-Add-missing-format-string.patch \ |
13 | file://0001-ruli_srv-Mark-prev_addr_list_size-as-unused.patch \ | ||
14 | file://0001-Make-space-for-flags-from-environment.patch \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | SRC_URI[md5sum] = "e73fbfdeadddb68a703a70cea5271468" | 17 | SRC_URI[md5sum] = "e73fbfdeadddb68a703a70cea5271468" |
17 | SRC_URI[sha256sum] = "11d32def5b514748fbd9ea8c88049ae99e1bb358efc74eb91a4d268a3999dbfa" | 18 | SRC_URI[sha256sum] = "11d32def5b514748fbd9ea8c88049ae99e1bb358efc74eb91a4d268a3999dbfa" |
18 | 19 | ||
19 | do_install1() { | 20 | B = "${S}" |
20 | install -d ${D}${includedir}/ruli | 21 | |
21 | install -d ${D}${libdir} | 22 | EXTRA_OEMAKE = 'CC="${CC}" OOP_BASE_DIR="${STAGING_EXECPREFIXDIR}" INSTALL_BASE_DIR="${D}${exec_prefix}"' |
22 | install -m 0644 ${S}/src/ruli*.h ${D}${includedir}/ruli | 23 | |
23 | install -m 0644 ${S}/src/libruli.so ${D}${libdir} | 24 | do_configure() { |
24 | install -m 0644 ${S}/src/libruli.so.4 ${D}${libdir} | 25 | touch configure-stamp |
26 | } | ||
27 | |||
28 | do_install() { | ||
29 | oe_runmake install | ||
25 | } | 30 | } |
31 | |||
32 | PACKAGES =+ "${PN}-bin" | ||
33 | |||
34 | FILES_${PN} =+ "${bindir}" | ||