diff --git a/recipes-ccsp/hal/files/hal-voice-asterisk.service b/recipes-ccsp/hal/files/hal-voice-asterisk.service new file mode 100644 index 00000000..d0299516 --- /dev/null +++ b/recipes-ccsp/hal/files/hal-voice-asterisk.service @@ -0,0 +1,9 @@ +[Unit] +Description=Voice HAL for Asterisk systemd service. +Before=RdkTelcoVoiceManager.service +[Service] +Type=simple +ExecStart=/usr/bin/hal-voice-asterisk +ExecStop=/bin/sh -c ' echo "Voice HAL Asterisk service stopped" ' +[Install] +WantedBy=multi-user.target diff --git a/recipes-ccsp/hal/hal-voice-asterisk_git.bb b/recipes-ccsp/hal/hal-voice-asterisk_git.bb new file mode 100644 index 00000000..a51d44fc --- /dev/null +++ b/recipes-ccsp/hal/hal-voice-asterisk_git.bb @@ -0,0 +1,33 @@ +SUMMARY = "Voice HAL for Asterisk IP PBX" +SECTION = "net" +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e" + +PV = "1.0.0+git${SRCPV}" + +SRCREV = "${AUTOREV}" + +SRC_URI = "git://github.com/rdkcentral/hal-voice-asterisk.git;branch=main;protocol=https \ + file://hal-voice-asterisk.service \ +" + +DEPENDS += "json-c json-hal-lib" +RDEPENDS:${PN} += "asterisk" + +S = "${WORKDIR}/git" + +inherit autotools systemd + +do_install:append () { + install -d ${D}${systemd_unitdir}/system + install -D -m 0644 ${WORKDIR}/hal-voice-asterisk.service ${D}${systemd_unitdir}/system/hal-voice-asterisk.service +} + +SYSTEMD_SERVICE:${PN} += "hal-voice-asterisk.service" +SYSTEMD_AUTO_ENABLE = "enable" + +FILES:${PN} += " \ + /usr/bin/* \ + ${systemd_unitdir}/system/hal-voice-asterisk.service \ +" diff --git a/recipes-common/lighttpd/lighttpd-1.4.74/bind_lighttpd-1.4.74.patch b/recipes-common/lighttpd/lighttpd-1.4.74/bind_lighttpd-1.4.74.patch new file mode 100644 index 00000000..0ed0b0b1 --- /dev/null +++ b/recipes-common/lighttpd/lighttpd-1.4.74/bind_lighttpd-1.4.74.patch @@ -0,0 +1,65 @@ +Upstream-Status: Pending +Index: lighttpd-1.4.74/src/network.c +=================================================================== +--- lighttpd-1.4.74.orig/src/network.c ++++ lighttpd-1.4.74/src/network.c +@@ -556,11 +556,13 @@ static int network_server_init(server *s + + #ifdef HAVE_IPV6 + if (set_v6only) { ++#ifndef SO_BINDTODEVICE + int val = (set_v6only > 0); + if (-1 == setsockopt(srv_socket->fd, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof(val))) { + log_serror(srv->errh, __FILE__, __LINE__, "setsockopt(IPV6_V6ONLY)"); + return -1; + } ++#endif + } + #endif + } +Index: lighttpd-1.4.74/src/sock_addr.c +=================================================================== +--- lighttpd-1.4.74.orig/src/sock_addr.c ++++ lighttpd-1.4.74/src/sock_addr.c +@@ -494,6 +494,9 @@ int sock_addr_from_str_hints(sock_addr * + hints.ai_protocol = IPPROTO_TCP; + + if (0 != (rc = getaddrinfo(str, NULL, &hints, &res))) { ++ #ifdef SO_BINDTODEVICE ++ saddr->ipv6.sin6_addr = in6addr_any; ++ #else + hints.ai_family = AF_INET; + if ( + #if defined(__GLIBC__) && defined(EAI_ADDRFAMILY) +@@ -513,10 +516,12 @@ int sock_addr_from_str_hints(sock_addr * + "getaddrinfo failed: %s '%s'", gai_strerror(rc), str); + + return 0; ++ #endif + } +- ++ #ifndef SO_BINDTODEVICE + memcpy(saddr, res->ai_addr, res->ai_addrlen); + freeaddrinfo(res); ++ #endif + } + saddr->ipv6.sin6_port = htons(port); + *len = sizeof(struct sockaddr_in6); +@@ -532,6 +537,9 @@ int sock_addr_from_str_hints(sock_addr * + saddr->ipv4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + } + else { ++#ifdef SO_BINDTODEVICE ++ saddr->ipv4.sin_addr.s_addr = htonl(INADDR_ANY); ++#else + #ifdef HAVE_INET_PTON + /*(reuse HAVE_INET_PTON for presence of getaddrinfo())*/ + struct addrinfo hints, *res; +@@ -572,6 +580,7 @@ int sock_addr_from_str_hints(sock_addr * + memcpy(&saddr->ipv4.sin_addr.s_addr, + he->h_addr_list[0], he->h_length); + #endif ++#endif + } + saddr->ipv4.sin_port = htons(port); + *len = sizeof(struct sockaddr_in); diff --git a/recipes-common/lighttpd/lighttpd_1.4.74.bbappend b/recipes-common/lighttpd/lighttpd_1.4.74.bbappend index 1faae841..fd5d9341 100644 --- a/recipes-common/lighttpd/lighttpd_1.4.74.bbappend +++ b/recipes-common/lighttpd/lighttpd_1.4.74.bbappend @@ -1,2 +1,13 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/lighttpd-1.4.74:" + +SRC_URI:append = " file://bind_lighttpd-1.4.74.patch" + +SYSTEMD_SERVICE:${PN}:broadband = "" + RDEPENDS:${PN}:remove = "lighttpd-module-fastcgi" RDEPENDS:${PN}:remove = "lighttpd-module-alias" +RDEPENDS:${PN} += " \ + lighttpd-module-cgi \ + lighttpd-module-openssl \ + " +FILES:${PN} += "${systemd_system_unitdir}/lighttpd.service"