diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-support/ruli')
4 files changed, 215 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch b/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch new file mode 100644 index 000000000..f8eb3ae67 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch @@ -0,0 +1,33 @@ +From 40848547abf592c8d29b85ef1346001514944435 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 17 Jun 2017 10:14:20 -0700 +Subject: [PATCH] Fix build with format string checks + +Fixes +| ruli_addr.c:418:5: error: format not a string literal and no format arguments [-Werror=format-security] +| return fprintf(out, inet_ntoa(addr->ipv4)); +| ^~~~~~ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/ruli_addr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ruli_addr.c b/src/ruli_addr.c +index 00d5d0d..f1eabae 100644 +--- a/src/ruli_addr.c ++++ b/src/ruli_addr.c +@@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli_addr *addr, int family) + { + switch (family) { + case PF_INET: +- return fprintf(out, inet_ntoa(addr->ipv4)); ++ return fprintf(out, "%s", inet_ntoa(addr->ipv4)); + + case PF_INET6: + return ruli_inet6_print(out, &addr->ipv6); +-- +2.13.1 + diff --git a/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch b/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch new file mode 100644 index 000000000..9044415ff --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch @@ -0,0 +1,35 @@ +From d3fb471f53712e710fb5777b1b0851c46b7be64c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 25 Jun 2017 01:23:03 -0700 +Subject: [PATCH] src/ruli_addr.c: Add missing format string + +fixes + +| ruli_addr.c: In function 'ruli_in_snprint': +| ruli_addr.c:491:5: error: format not a string literal and no format arguments [-Werror=format-security] +| return snprintf(buf, size, inet_ntoa(addr->ipv4)); +| ^~~~~~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/ruli_addr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ruli_addr.c b/src/ruli_addr.c +index f1eabae..5f1fd4f 100644 +--- a/src/ruli_addr.c ++++ b/src/ruli_addr.c +@@ -488,7 +488,7 @@ int ruli_in_snprint(char *buf, size_t size, const _ruli_addr *addr, int family) + { + switch (family) { + case PF_INET: +- return snprintf(buf, size, inet_ntoa(addr->ipv4)); ++ return snprintf(buf, size, "%s", inet_ntoa(addr->ipv4)); + + case PF_INET6: + return ruli_inet6_snprint(buf, size, &addr->ipv6); +-- +2.13.1 + diff --git a/meta-openembedded/meta-networking/recipes-support/ruli/files/Makefile.patch b/meta-openembedded/meta-networking/recipes-support/ruli/files/Makefile.patch new file mode 100644 index 000000000..60789a3d5 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ruli/files/Makefile.patch @@ -0,0 +1,122 @@ +diff -Naur patch.org/ruli-0.36/Makefile patch.new/ruli-0.36/Makefile +--- ruli-0.36/Makefile 2015-09-10 15:14:13.952262350 -0400 ++++ ruli-0.36/Makefile 2015-09-10 15:14:38.628261620 -0400 +@@ -7,17 +7,17 @@ + .PHONY: default + default: + $(MAKE) -C src +- $(MAKE) -C sample ++# $(MAKE) -C sample + + .PHONY: clean + clean: + $(MAKE) -C src clean +- $(MAKE) -C sample clean ++# $(MAKE) -C sample clean + + .PHONY: install + install: + $(MAKE) -C src install +- $(MAKE) -C sample install ++# $(MAKE) -C sample install + + .PHONY: dpkg + dpkg: + +===================================================================== + +diff -Naur patch.org/git/src/Makefile patch.new/git/src/Makefile +--- ruli-0.36/src/Makefile 2005-06-13 12:34:53.000000000 -0400 ++++ ruli-0.36/src/Makefile 2015-09-11 09:46:06.290287347 -0400 +@@ -18,9 +18,9 @@ + # + # Debian packaging likes this: OOP_BASE_DIR = /usr + # +-OOP_BASE_DIR = /usr/local/oop +-OOP_INCLUDE_DIR = $(OOP_BASE_DIR)/include +-OOP_LIB_DIR = $(OOP_BASE_DIR)/lib ++#OOP_BASE_DIR = /usr/local/oop ++OOP_INCLUDE_DIR = ${PKG_CONFIG_SYSROOT_DIR}/$(includedir)/ ++#OOP_LIB_DIR = $(OOP_BASE_DIR)/lib + + # + # INSTALL_BASE_DIR indicates where RULI +@@ -30,11 +30,11 @@ + # + # Debian packaging likes this: INSTALL_BASE_DIR = $(DESTDIR)/usr + # +-INSTALL_BASE_DIR = ../install/ruli +-INSTALL_INCLUDE_DIR = $(INSTALL_BASE_DIR)/include +-INSTALL_LIB_DIR = $(INSTALL_BASE_DIR)/lib +-INSTALL_MAN_DIR = $(INSTALL_BASE_DIR)/share/man +-INSTALL_MAN3_DIR = $(INSTALL_MAN_DIR)/man3 ++#INSTALL_BASE_DIR = ../install/ruli ++#INSTALL_INCLUDE_DIR = $(INSTALL_BASE_DIR)/include ++#INSTALL_LIB_DIR = $(INSTALL_BASE_DIR)/lib ++#INSTALL_MAN_DIR = $(INSTALL_BASE_DIR)/share/man ++#INSTALL_MAN3_DIR = $(INSTALL_MAN_DIR)/man3 + + # SunOS, Linux + PLATFORM=$(shell uname) +@@ -45,7 +45,7 @@ + + WARN = -pedantic -ansi -Wshadow -Wpointer-arith -Wcast-qual \ + -Wcast-align -Wwrite-strings -Wredundant-decls +-CC = gcc ++#CC = gcc + + # gcc-specific options (not valid for g++) + ifeq ($(CC),gcc) +@@ -58,7 +58,7 @@ + FLAGS = $(DEBUG) -O2 -pipe -Wall -g -shared -D_REENTRANT \ + $(DEFINE_SOLARIS) -I. -I$(OOP_INCLUDE_DIR) + SOFT_CFLAGS = $(WARN) $(FLAGS) +-CFLAGS = $(WARN) -Werror $(FLAGS) ++CFLAGS = $(WARN) $(FLAGS) + LIBOBJ = ruli_isaac.o ruli_mem.o ruli_rand.o ruli_util.o ruli_list.o \ + ruli_addr.o ruli_sock.o ruli_txt.o ruli_msg.o ruli_fsm.o \ + ruli_res.o ruli_parse.o ruli_host.o ruli_srv.o ruli_conf.o \ +@@ -66,7 +66,7 @@ + ruli_getaddrinfo.o + SHAREDOBJ = $(LIBOBJ:%.o=%.os) + SONAME = libruli.so.4 +-LDFLAGS = -L$(OOP_LIB_DIR) ++#LDFLAGS = -L$(OOP_LIB_DIR) + + COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(CFLAGS) -c + SHARED_COMPILE = $(CC) $(ARCH) $(CPPFLAGS) $(SHARED) $(CFLAGS) -o $@ -c +@@ -89,19 +89,19 @@ + strip: ruli + strip $(SONAME) libruli.a + +-.PHONY: install +-install: ruli +- mkdir -p $(INSTALL_LIB_DIR) $(INSTALL_INCLUDE_DIR) $(INSTALL_MAN3_DIR) +- cp $(SONAME) libruli.a $(INSTALL_LIB_DIR) +- cp *.h $(INSTALL_INCLUDE_DIR) +- cp ../doc/man/*.3 $(INSTALL_MAN3_DIR) +- cd $(INSTALL_LIB_DIR) && ln -s $(SONAME) libruli.so +- @echo +- @echo "REMINDER:" +- @echo "Add $(INSTALL_LIB_DIR) to your dynamic loader path:" +- @echo "# echo $(INSTALL_LIB_DIR) >> /etc/ld.so.conf" +- @echo "# ldconfig" +- @echo ++#.PHONY: install ++#install: ruli ++# mkdir -p $(INSTALL_LIB_DIR) $(INSTALL_INCLUDE_DIR) $(INSTALL_MAN3_DIR) ++# cp $(SONAME) libruli.a $(INSTALL_LIB_DIR) ++# cp *.h $(INSTALL_INCLUDE_DIR) ++# cp ../doc/man/*.3 $(INSTALL_MAN3_DIR) ++# cd $(INSTALL_LIB_DIR) && ln -s $(SONAME) libruli.so ++# @echo ++# @echo "REMINDER:" ++# @echo "Add $(INSTALL_LIB_DIR) to your dynamic loader path:" ++# @echo "# echo $(INSTALL_LIB_DIR) >> /etc/ld.so.conf" ++# @echo "# ldconfig" ++# @echo + + .PHONY: ruli + ruli: $(SONAME) libruli.a + + diff --git a/meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb b/meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb new file mode 100644 index 000000000..885796d2a --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ruli/ruli_0.36.bb @@ -0,0 +1,25 @@ +SUMMARY = "RULI stands for Resolver User Layer Interface It's a library built on top of an asynchronous DNS stub resolver" + +HOMEPAGE = "http://www.nongnu.org/ruli/" + +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +DEPENDS = "liboop" + +SRC_URI = "http://download.savannah.gnu.org/releases/ruli/ruli_${PV}.orig.tar.gz \ + file://Makefile.patch \ + file://0001-Fix-build-with-format-string-checks.patch \ + file://0001-src-ruli_addr.c-Add-missing-format-string.patch \ + " + +SRC_URI[md5sum] = "e73fbfdeadddb68a703a70cea5271468" +SRC_URI[sha256sum] = "11d32def5b514748fbd9ea8c88049ae99e1bb358efc74eb91a4d268a3999dbfa" + +do_install1() { + install -d ${D}${includedir}/ruli + install -d ${D}${libdir} + install -m 0644 ${S}/src/ruli*.h ${D}${includedir}/ruli + install -m 0644 ${S}/src/libruli.so ${D}${libdir} + install -m 0644 ${S}/src/libruli.so.4 ${D}${libdir} +} |