diff options
Diffstat (limited to 'meta-networking/recipes-daemons')
181 files changed, 3344 insertions, 3577 deletions
diff --git a/meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch b/meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch deleted file mode 100644 index cfa8a7325f..0000000000 --- a/meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 543e67919f5cacf309ac88ab091331e41af4224b Mon Sep 17 00:00:00 2001 -From: Peter Seiderer <ps.report@gmx.net> -Date: Thu, 16 Apr 2015 22:41:57 +0200 -Subject: [PATCH] argz.h: fix musl compile (add missing defines) - -Upstream-Status: Pending - -Add __THROW, __BEGIN_DECLS, __END_DECLS and __attribute_pure__ defines. - -Signed-off-by: Peter Seiderer <ps.report@gmx.net> -Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> ---- - argz.h | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/argz.h b/argz.h -index 582be55..bdf9f62 100644 ---- a/argz.h -+++ b/argz.h -@@ -48,6 +48,22 @@ - # define __const const - #endif - -+#ifndef __THROW -+# define __THROW -+#endif -+ -+#ifndef __BEGIN_DECLS -+# define __BEGIN_DECLS -+#endif -+ -+#ifndef __END_DECLS -+# define __END_DECLS -+#endif -+ -+#ifndef __attribute_pure__ -+# define __attribute_pure__ -+#endif -+ - #ifndef __error_t_defined - typedef int error_t; - #endif --- -2.1.4 - diff --git a/meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch b/meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch deleted file mode 100644 index 093054ce80..0000000000 --- a/meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 77e399899d9d7297d23c321811b628febdf0fd92 Mon Sep 17 00:00:00 2001 -From: Peter Seiderer <ps.report@gmx.net> -Date: Thu, 16 Apr 2015 22:43:49 +0200 -Subject: [PATCH] tftp.h/tftpd.h: fix musl compile (missing include) - -Upstream-Status: Pending - -Add sys/types.h include for u_char typedef. - -Signed-off-by: Peter Seiderer <ps.report@gmx.net> -Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> ---- - tftp.h | 1 + - tftpd.h | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/tftp.h b/tftp.h -index 12bd6aa..32a3f63 100644 ---- a/tftp.h -+++ b/tftp.h -@@ -19,6 +19,7 @@ - - #include <sys/time.h> - #include <sys/times.h> -+#include <sys/types.h> - #include "tftp_def.h" - #include "config.h" - -diff --git a/tftpd.h b/tftpd.h -index 945065e..60d3a49 100644 ---- a/tftpd.h -+++ b/tftpd.h -@@ -20,6 +20,7 @@ - #include <pthread.h> - #include <arpa/tftp.h> - #include <arpa/inet.h> -+#include <sys/types.h> - #include "tftp_io.h" - - /* --- -2.1.4 - diff --git a/meta-networking/recipes-daemons/atftp/files/atftpd.init b/meta-networking/recipes-daemons/atftp/atftp/atftpd.init index 161d97aca7..161d97aca7 100644 --- a/meta-networking/recipes-daemons/atftp/files/atftpd.init +++ b/meta-networking/recipes-daemons/atftp/atftp/atftpd.init diff --git a/meta-networking/recipes-daemons/atftp/atftp_0.8.0.bb b/meta-networking/recipes-daemons/atftp/atftp_0.8.0.bb new file mode 100644 index 0000000000..41b7cf0878 --- /dev/null +++ b/meta-networking/recipes-daemons/atftp/atftp_0.8.0.bb @@ -0,0 +1,56 @@ +SUMMARY = "Advanced TFTP server and client" +SECTION = "net" +HOMEPAGE = "http://packages.debian.org/atftp" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f65159f73e603f89d6867d43191900e5" + +SRCREV = "d5c27eb7a9695d83569767e27ef69674173db39a" + +SRC_URI = "git://git.code.sf.net/p/atftp/code;branch=master;protocol=https \ + file://atftpd.init \ + file://atftpd.service \ +" + +S = "${WORKDIR}/git" + +inherit autotools update-rc.d systemd + +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre" +PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" +PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline" + +INITSCRIPT_PACKAGES = "${PN}d" +INITSCRIPT_NAME:${PN}d = "atftpd" +INITSCRIPT_PARAMS:${PN}d = "defaults 80" + + +EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'" + +do_install:append() { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd + + install -d ${D}/srv/tftp + + rm ${D}${sbindir}/in.tftpd + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/atftpd.service ${D}${systemd_unitdir}/system +} + +PACKAGES =+ "${PN}d" + +FILES:${PN} = "${bindir}/*" + +FILES:${PN}d = "${sbindir}/* \ + ${sysconfdir} \ + /srv/tftp \ + ${systemd_unitdir}/system/atftpd.service \ +" + +SYSTEMD_PACKAGES = "${PN}d" +SYSTEMD_SERVICE:${PN}d = "atftpd.service" +RPROVIDES:${PN}d += "${PN}d-systemd" +RREPLACES:${PN}d += "${PN}d-systemd" +RCONFLICTS:${PN}d += "${PN}d-systemd" diff --git a/meta-networking/recipes-daemons/atftp/atftp_git.bb b/meta-networking/recipes-daemons/atftp/atftp_git.bb deleted file mode 100644 index a9949d59ae..0000000000 --- a/meta-networking/recipes-daemons/atftp/atftp_git.bb +++ /dev/null @@ -1,64 +0,0 @@ -SUMMARY = "Advanced TFTP server and client" -SECTION = "net" -HOMEPAGE = "http://packages.debian.org/atftp" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" -PV = "0.7.1+git${SRCPV}" -PR = "r3" - -SRCREV = "be3291a18c069ae23a124ffdc56d64a5ff0bbec7" - -SRC_URI = "git://git.code.sf.net/p/atftp/code \ - file://atftpd-0.7_circumvent_tftp_size_restrictions.patch \ - file://atftpd-0.7_unprotected_assignments_crash.patch \ - file://atftpd.init \ - file://atftpd.service \ - file://atftp-0.7-sorcerers_apprentice.patch \ -" -SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \ - file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \ - " - -S = "${WORKDIR}/git" - -inherit autotools update-rc.d systemd - -PACKAGECONFIG ??= "tcp-wrappers" -PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre" -PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" -PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline" - -INITSCRIPT_PACKAGES = "${PN}d" -INITSCRIPT_NAME_${PN}d = "atftpd" -INITSCRIPT_PARAMS_${PN}d = "defaults 80" - - -EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'" - -do_install_append() { - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd - - install -d ${D}/srv/tftp - - rm ${D}${sbindir}/in.tftpd - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system -} - -PACKAGES =+ "${PN}d" - -FILES_${PN} = "${bindir}/*" - -FILES_${PN}d = "${sbindir}/* \ - ${sysconfdir} \ - /srv/tftp \ - ${systemd_unitdir}/system/atftpd.service \ -" - -SYSTEMD_PACKAGES = "${PN}d" -SYSTEMD_SERVICE_${PN}d = "atftpd.service" -RPROVIDES_${PN}d += "${PN}d-systemd" -RREPLACES_${PN}d += "${PN}d-systemd" -RCONFLICTS_${PN}d += "${PN}d-systemd" diff --git a/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch b/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch deleted file mode 100644 index fc64291cd3..0000000000 --- a/meta-networking/recipes-daemons/atftp/files/atftp-0.7-sorcerers_apprentice.patch +++ /dev/null @@ -1,94 +0,0 @@ -atftp exhibits the well known "Sorcerer's Apprentice Syndrome"(SAS) problem. -According to RFC 1350, the fix to SAS is quite simple: further copies of the -acknowledgment for a particular data block would be ignored. - -Patch originally from OpenSUSE: -https://build.opensuse.org/package/view_file?file=atftp-0.7-sorcerers_apprentice.patch&package=atftp.539&project=openSUSE%3A12.1%3AUpdate&rev=84569792975e00573d7df597d2a6e895 - -Upstream-Status: Pending - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> -Index: atftp-0.7/tftp_file.c -=================================================================== ---- atftp-0.7.orig/tftp_file.c 2011-11-22 15:12:53.792744083 +0100 -+++ atftp-0.7/tftp_file.c 2011-11-22 15:13:51.706421893 +0100 -@@ -605,6 +605,7 @@ - int timeout_state = state; /* what state should we go on when timeout */ - int result; - long block_number = 0; -+ long last_requested_block = -1; - long last_block = -1; - int data_size; /* size of data received */ - int sockfd = data->sockfd; /* just to simplify calls */ -@@ -765,6 +766,17 @@ - connected = 1; - } - block_number = ntohs(tftphdr->th_block); -+ -+ if (last_requested_block >= block_number) -+ { -+ if (data->trace) -+ fprintf(stderr, "received duplicated ACK <block: %ld >= %ld>\n", -+ last_requested_block, block_number); -+ break; -+ } -+ else -+ last_requested_block = block_number; -+ - if (data->trace) - fprintf(stderr, "received ACK <block: %ld>\n", - block_number); -Index: atftp-0.7/tftpd_file.c -=================================================================== ---- atftp-0.7.orig/tftpd_file.c 2011-11-22 15:12:53.793744112 +0100 -+++ atftp-0.7/tftpd_file.c 2011-11-22 15:15:04.617534260 +0100 -@@ -403,6 +403,7 @@ - int timeout_state = state; - int result; - long block_number = 0; -+ long last_requested_block = -1; - long last_block = -1; - int block_loops = 0; - int data_size; -@@ -859,6 +860,32 @@ - { - logger(LOG_DEBUG, "received ACK <block: %d>", block_number); - } -+ -+ /* check whether the block request isn't already fulfilled */ -+ -+ /* multicast, block numbers could contain gaps */ -+ if (multicast) { -+ if (last_requested_block >= block_number) -+ { -+ if (data->trace) -+ logger(LOG_DEBUG, "received duplicated ACK <block: %d >= %d>", last_requested_block, block_number); -+ break; -+ } -+ else -+ last_requested_block = block_number; -+ /* unicast, blocks should be requested one after another */ -+ } else { -+ if (last_requested_block + 1 != block_number && last_requested_block != -1) -+ { -+ if (data->trace) -+ logger(LOG_DEBUG, "received out of order ACK <block: %d != %d>", last_requested_block + 1, block_number); -+ break; -+ } -+ else -+ last_requested_block = block_number; -+ } -+ -+ - if (ntohs(tftphdr->th_block) == 65535) - { - block_loops++; -@@ -958,6 +985,8 @@ - /* nedd to send an oack to that client */ - state = S_SEND_OACK; - fseek(fp, 0, SEEK_SET); -+ /* reset the last block received counter */ -+ last_requested_block = -1; - } - else - { diff --git a/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch b/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch deleted file mode 100644 index 280b570b22..0000000000 --- a/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_circumvent_tftp_size_restrictions.patch +++ /dev/null @@ -1,163 +0,0 @@ -Fate #303031: Circumvent TFTP size restrictions in atftpd -The size of a single image file that can be transferred with TFTP is limited to -2^(2*8) *BLOCKSIZE (as per RFC 1350 there are only two bytes for the block -counter). This is problematic for one of our customers who needs to transfer -100+ MB Windows images using a TFTP client (NT bootloader) which has a -hardwared BLOCKSIZE setting of 1432). - -block rollover -http://www.compuphase.com/tftp.htm - -Patch originally from OpenSUSE: -https://build.opensuse.org/package/show?package=atftp&project=openSUSE%3A12.2 - -Upstream-Status: Pending - -Index: git/tftp_def.h -=================================================================== ---- git.orig/tftp_def.h 2012-11-19 16:28:50.221027144 -0800 -+++ git/tftp_def.h 2012-11-20 17:40:54.391206979 -0800 -@@ -32,6 +32,7 @@ - #define TIMEOUT 5 /* Client timeout */ - #define S_TIMEOUT 5 /* Server timout. */ - #define NB_OF_RETRY 5 -+#define MAXBLOCKS 1000000 /* maximum number of blocks in a download */ - - /* definition to use tftp_options structure */ - #define OPT_FILENAME 0 -Index: git/tftp_file.c -=================================================================== ---- git.orig/tftp_file.c 2012-11-19 16:28:50.221027144 -0800 -+++ git/tftp_file.c 2012-11-19 16:28:51.201027167 -0800 -@@ -622,8 +622,8 @@ - int state = S_SEND_REQ; /* current state in the state machine */ - int timeout_state = state; /* what state should we go on when timeout */ - int result; -- int block_number = 0; -- int last_block = -1; -+ long block_number = 0; -+ long last_block = -1; - int data_size; /* size of data received */ - int sockfd = data->sockfd; /* just to simplify calls */ - struct sockaddr_storage sa; /* a copy of data.sa_peer */ -@@ -637,8 +637,8 @@ - int convert = 0; /* if true, do netascii convertion */ - char string[MAXLEN]; - -- int prev_block_number = 0; /* needed to support netascii convertion */ -- int prev_file_pos = 0; -+ long prev_block_number = 0; /* needed to support netascii convertion */ -+ long prev_file_pos = 0; - int temp = 0; - - data->file_size = 0; -@@ -745,7 +745,7 @@ - data_size, data->data_buffer); - data->file_size += data_size; - if (data->trace) -- fprintf(stderr, "sent DATA <block: %d, size: %d>\n", -+ fprintf(stderr, "sent DATA <block: %ld, size: %d>\n", - block_number + 1, data_size - 4); - state = S_WAIT_PACKET; - break; -@@ -785,7 +785,7 @@ - } - block_number = ntohs(tftphdr->th_block); - if (data->trace) -- fprintf(stderr, "received ACK <block: %d>\n", -+ fprintf(stderr, "received ACK <block: %ld>\n", - block_number); - if ((last_block != -1) && (block_number > last_block)) - { -Index: git/tftp_io.c -=================================================================== ---- git.orig/tftp_io.c 2012-11-19 16:28:50.221027144 -0800 -+++ git/tftp_io.c 2012-11-19 16:28:51.201027167 -0800 -@@ -350,8 +350,8 @@ - /* - * Read from file and do netascii conversion if needed - */ --int tftp_file_read(FILE *fp, char *data_buffer, int data_buffer_size, int block_number, -- int convert, int *prev_block_number, int *prev_file_pos, int *temp) -+int tftp_file_read(FILE *fp, char *data_buffer, int data_buffer_size, long block_number, -+ int convert, long *prev_block_number, long *prev_file_pos, int *temp) - { - int i; - int c; -Index: git/tftp_io.h -=================================================================== ---- git.orig/tftp_io.h 2012-11-19 16:28:50.221027144 -0800 -+++ git/tftp_io.h 2012-11-19 16:28:51.201027167 -0800 -@@ -52,8 +52,8 @@ - int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_storage *sa, - struct sockaddr_storage *from, struct sockaddr_storage *to, - int timeout, int *size, char *data); --int tftp_file_read(FILE *fp, char *buffer, int buffer_size, int block_number, int convert, -- int *prev_block_number, int *prev_file_pos, int *temp); -+int tftp_file_read(FILE *fp, char *buffer, int buffer_size, long block_number, int convert, -+ long *prev_block_number, long *prev_file_pos, int *temp); - int tftp_file_write(FILE *fp, char *data_buffer, int data_buffer_size, int block_number, - int data_size, int convert, int *prev_block_number, int *temp); - #endif -Index: git/tftpd_file.c -=================================================================== ---- git.orig/tftpd_file.c 2012-11-19 16:28:50.225027144 -0800 -+++ git/tftpd_file.c 2012-11-19 16:28:51.201027167 -0800 -@@ -407,8 +407,9 @@ - int state = S_BEGIN; - int timeout_state = state; - int result; -- int block_number = 0; -- int last_block = -1; -+ long block_number = 0; -+ long last_block = -1; -+ int block_loops = 0; - int data_size; - struct sockaddr_storage *sa = &data->client_info->client; - struct sockaddr_storage from; -@@ -431,8 +432,8 @@ - struct client_info *client_old = NULL; - struct tftp_opt options[OPT_NUMBER]; - -- int prev_block_number = 0; /* needed to support netascii convertion */ -- int prev_file_pos = 0; -+ long prev_block_number = 0; /* needed to support netascii convertion */ -+ long prev_file_pos = 0; - int temp = 0; - - /* look for mode option */ -@@ -565,11 +566,12 @@ - logger(LOG_INFO, "blksize option -> %d", result); - } - -- /* Verify that the file can be sent in 2^16 block of BLKSIZE octets */ -- if ((file_stat.st_size / (data->data_buffer_size - 4)) > 65535) -+ /* Verify that the file can be sent in MAXBLOCKS blocks of BLKSIZE octets */ -+ if ((file_stat.st_size / (data->data_buffer_size - 4)) > MAXBLOCKS) - { - tftp_send_error(sockfd, sa, EUNDEF, data->data_buffer, data->data_buffer_size); -- logger(LOG_NOTICE, "Requested file to big, increase BLKSIZE"); -+ logger(LOG_NOTICE, "Requested file too big, increase BLKSIZE"); -+ logger(LOG_NOTICE, "Only %d blocks of %d bytes can be served.", MAXBLOCKS, data->data_buffer_size); - if (data->trace) - logger(LOG_DEBUG, "sent ERROR <code: %d, msg: %s>", EUNDEF, - tftp_errmsg[EUNDEF]); -@@ -880,10 +882,15 @@ - } - /* The ACK is from the current client */ - number_of_timeout = 0; -- block_number = ntohs(tftphdr->th_block); -+ block_number = (block_loops * 65536) + ntohs(tftphdr->th_block); - if (data->trace) -- logger(LOG_DEBUG, "received ACK <block: %d>", -- block_number); -+ { -+ logger(LOG_DEBUG, "received ACK <block: %d>", block_number); -+ } -+ if (ntohs(tftphdr->th_block) == 65535) -+ { -+ block_loops++; -+ }; - if ((last_block != -1) && (block_number > last_block)) - { - state = S_END; diff --git a/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch b/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch deleted file mode 100644 index 28fba6cf50..0000000000 --- a/meta-networking/recipes-daemons/atftp/files/atftpd-0.7_unprotected_assignments_crash.patch +++ /dev/null @@ -1,152 +0,0 @@ -Avoid assigning thread data outside of mutex lock - -Patch originally from OpenSUSE: -https://build.opensuse.org/package/show?package=atftp&project=openSUSE%3A12.2 - -Upstream-Status: Pending - -Index: git/tftpd_list.c -=================================================================== ---- git.orig/tftpd_list.c 2012-10-24 21:48:47.000000000 -0700 -+++ git/tftpd_list.c 2012-10-24 21:52:04.266205076 -0700 -@@ -49,11 +49,11 @@ - */ - int tftpd_list_add(struct thread_data *new) - { -- struct thread_data *current = thread_data; -+ struct thread_data *current; - int ret; - - pthread_mutex_lock(&thread_list_mutex); -- -+ current = thread_data; - number_of_thread++; - - ret = number_of_thread; -@@ -81,11 +81,13 @@ - */ - int tftpd_list_remove(struct thread_data *old) - { -- struct thread_data *current = thread_data; -+ struct thread_data *current; - int ret; - - pthread_mutex_lock(&thread_list_mutex); - -+ current = thread_data; -+ - number_of_thread--; - ret = number_of_thread; - -@@ -137,23 +139,26 @@ - struct thread_data *data, - struct client_info *client) - { -- struct thread_data *current = thread_data; /* head of the list */ -- struct tftp_opt *tftp_options = data->tftp_options; -+ struct thread_data *current; /* head of the list */ -+ struct tftp_opt *tftp_options; - struct client_info *tmp; - char options[MAXLEN]; - char string[MAXLEN]; - char *index; - int len; - -+ /* lock the whole list before walking it */ -+ pthread_mutex_lock(&thread_list_mutex); -+ - *thread = NULL; - -+ current = thread_data; -+ tftp_options = data->tftp_options; -+ - opt_request_to_string(tftp_options, options, MAXLEN); - index = strstr(options, "multicast"); - len = (int)index - (int)options; - -- /* lock the whole list before walking it */ -- pthread_mutex_lock(&thread_list_mutex); -- - while (current) - { - if (current != data) -@@ -214,9 +219,10 @@ - void tftpd_clientlist_remove(struct thread_data *thread, - struct client_info *client) - { -- struct client_info *tmp = thread->client_info; -+ struct client_info *tmp; - - pthread_mutex_lock(&thread->client_mutex); -+ tmp = thread->client_info; - while ((tmp->next != client) && (tmp->next != NULL)) - tmp = tmp->next; - if (tmp->next == NULL) -@@ -231,9 +237,11 @@ - void tftpd_clientlist_free(struct thread_data *thread) - { - struct client_info *tmp; -- struct client_info *head = thread->client_info; -+ struct client_info *head; - - pthread_mutex_lock(&thread->client_mutex); -+ head = thread->client_info; -+ - while (head) - { - tmp = head; -@@ -250,9 +258,10 @@ - struct client_info *client, - struct sockaddr_storage *sock) - { -- struct client_info *head = thread->client_info; -+ struct client_info *head; - - pthread_mutex_lock(&thread->client_mutex); -+ head = thread->client_info; - - if (client) - { -@@ -334,10 +343,10 @@ - - void tftpd_list_kill_threads(void) - { -- struct thread_data *current = thread_data; /* head of list */ -+ struct thread_data *current; /* head of list */ - - pthread_mutex_lock(&thread_list_mutex); -- -+ current = thread_data; - - while (current != NULL) - { -Index: git/tftpd_mcast.c -=================================================================== ---- git.orig/tftpd_mcast.c 2012-10-24 21:48:47.000000000 -0700 -+++ git/tftpd_mcast.c 2012-10-24 21:49:11.570201582 -0700 -@@ -51,9 +51,11 @@ - */ - int tftpd_mcast_get_tid(char **addr, short *port) - { -- struct tid *current = tid_list; -+ struct tid *current; - - pthread_mutex_lock(&mcast_tid_list); -+ current = tid_list; -+ - /* walk the list for a free tid */ - while (current != NULL) - { -@@ -74,9 +76,11 @@ - - int tftpd_mcast_free_tid(char *addr, short port) - { -- struct tid *current = tid_list; -+ struct tid *current; - - pthread_mutex_lock(&mcast_tid_list); -+ current = tid_list; -+ - while (current != NULL) - { - if ((current->used == 1) && (current->port == port) && diff --git a/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch b/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch new file mode 100644 index 0000000000..2a583466e3 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs/0001-Bug-fix-for-pid_t-not-found-on-musl.patch @@ -0,0 +1,30 @@ +From d0d5ac317dab11610a5fc91ca3e7f5ad72ce2236 Mon Sep 17 00:00:00 2001 +From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +Date: Tue, 29 Oct 2019 13:19:37 +0800 +Subject: [PATCH] Bug fix for pid_t not found on musl. + +When compiling version 5.1.6 on musl, the following error occurs: +log.h:49:8: error: unknown type name 'pid_t' + +Upstream-Status: Pending + +Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +--- + lib/defaults.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/defaults.c b/lib/defaults.c +index a6ea116..b3ecfa5 100644 +--- a/lib/defaults.c ++++ b/lib/defaults.c +@@ -21,6 +21,7 @@ + #include <string.h> + #include <sys/utsname.h> + #include <sys/stat.h> ++#include <sys/types.h> + #include <stdarg.h> + + #include "config.h" +-- +2.20.1 + diff --git a/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch b/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch index 075af5707b..6128f3d0ed 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch @@ -1,19 +1,22 @@ -From 933e065cf8aecfa0cce5f8f92abbed5baaaf3f77 Mon Sep 17 00:00:00 2001 +From 987c8f4a718cdd6b764592ba7510090a59623959 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 31 Mar 2017 19:10:57 -0700 -Subject: [PATCH 1/2] Define __SWORD_TYPE and _PATH_NSSWITCH_CONF +Subject: [PATCH] Define __SWORD_TYPE and _PATH_NSSWITCH_CONF if they are not defined as is in musl then define them here Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- +Upstream-Status: Pending + include/automount.h | 8 ++++++++ include/nsswitch.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/include/automount.h b/include/automount.h -index 219b07d..b12c22a 100644 +index cc336ad..8bdcf12 100644 --- a/include/automount.h +++ b/include/automount.h @@ -42,6 +42,14 @@ @@ -32,7 +35,7 @@ index 219b07d..b12c22a 100644 #ifndef HAVE_MOUNT #error Failed to locate mount(8)! diff --git a/include/nsswitch.h b/include/nsswitch.h -index 2b445a9..3db77b2 100644 +index d3e4027..7a0c38f 100644 --- a/include/nsswitch.h +++ b/include/nsswitch.h @@ -24,6 +24,9 @@ @@ -45,6 +48,3 @@ index 2b445a9..3db77b2 100644 #define NSSWITCH_FILE _PATH_NSSWITCH_CONF enum nsswitch_status { --- -2.12.1 - diff --git a/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-if-undefined.patch b/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-if-undefined.patch new file mode 100644 index 0000000000..f16ae5277e --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs/0001-Define-__SWORD_TYPE-if-undefined.patch @@ -0,0 +1,115 @@ +From 9fe90ab1e333b2e2bed370ff13ba552eb54c3aaf Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 17 Jul 2021 09:56:28 -0700 +Subject: [PATCH] Define __SWORD_TYPE if undefined + +These fixes are inspired when building autofs on musl + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + daemon/automount.c | 20 ++++++++++++++------ + include/hash.h | 5 +++++ + lib/log.c | 6 +++++- + 3 files changed, 24 insertions(+), 7 deletions(-) + +--- a/daemon/automount.c ++++ b/daemon/automount.c +@@ -1,7 +1,7 @@ + /* ----------------------------------------------------------------------- * + * + * automount.c - Linux automounter daemon +- * ++ * + * Copyright 1997 Transmeta Corporation - All Rights Reserved + * Copyright 1999-2000 Jeremy Fitzhardinge <jeremy@goop.org> + * Copyright 2001-2005 Ian Kent <raven@themaw.net> +@@ -11,7 +11,7 @@ + * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, + * USA; either version 2 of the License, or (at your option) any later + * version. +- * ++ * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@@ -40,6 +40,14 @@ + #include <systemd/sd-daemon.h> + #endif + ++#ifndef __SWORD_TYPE ++# if __WORDSIZE == 32 /* System word size */ ++# define __SWORD_TYPE int ++# else /* __WORDSIZE == 64 */ ++# define __SWORD_TYPE long int ++# endif ++#endif ++ + #include "automount.h" + #if defined(LIBXML2_WORKAROUND) || defined(TIRPC_WORKAROUND) + #include <dlfcn.h> +@@ -282,7 +290,7 @@ int rmdir_path(struct autofs_point *ap, + dev, buf, st.st_dev); + return -1; + } +- ++ + /* + * Last element of path may be a symbolic link; all others + * are directories (and the last directory element is +@@ -455,7 +463,7 @@ int count_mounts(struct autofs_point *ap + + counter.count = 0; + counter.dev = dev; +- ++ + if (walk_tree(path, counter_fn, 1, ap, &counter) == -1) + return -1; + +@@ -811,7 +819,7 @@ static char *automount_path_to_fifo(unsi + /* + * An automount path can be made up of subdirectories. So, to + * create the fifo name, we will just replace instances of '/' with +- * '-'. ++ * '-'. + */ + p = fifo_name + strlen(fifodir); + while (*p != '\0') { +@@ -1640,7 +1648,7 @@ static void return_start_status(void *ar + sc->done = 1; + + /* +- * Startup condition mutex must be locked during ++ * Startup condition mutex must be locked during + * the startup process. + */ + status = pthread_cond_signal(&sc->cond); +--- a/include/hash.h ++++ b/include/hash.h +@@ -5,6 +5,11 @@ + + #include <sys/types.h> + #include <stdint.h> ++#include <linux/stddef.h> ++ ++#ifndef __GLIBC__ ++#include <sys/reg.h> ++#endif + + /* + * The "GOLDEN_RATIO_PRIME" is used in ifs/btrfs/brtfs_inode.h and +--- a/lib/log.c ++++ b/lib/log.c +@@ -38,7 +38,11 @@ static char *prepare_attempt_prefix(cons + char buffer[ATTEMPT_ID_SIZE + 1]; + char *prefixed_msg = NULL; + +- attempt_id = pthread_getspecific(key_thread_attempt_id); ++ if (key_thread_attempt_id) { ++ attempt_id = pthread_getspecific(key_thread_attempt_id); ++ } else { ++ attempt_id = 0; ++ } + if (attempt_id) { + int len = sizeof(buffer) + 1 + strlen(msg) + 1; + diff --git a/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch b/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch new file mode 100644 index 0000000000..f18f237d98 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch @@ -0,0 +1,31 @@ +From d7a34bb388e33d16260b67275cdb58f9c877d324 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 27 Nov 2018 15:27:47 +0800 +Subject: [PATCH] From 6d24365f0828185fd1bb4d199209ca07eb95c41d Mon Sep 17 + 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 24 Aug 2018 + 06:24:36 +0000 Subject: [PATCH] Do not hardcode path for pkg.m4 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +update patch to version 5.1.6 +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +--- + configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index 07c2051..e85d718 100644 +--- a/configure.in ++++ b/configure.in +@@ -12,7 +12,7 @@ define([AC_CACHE_SAVE], )dnl + AC_INIT(.autofs-5.1.8) + + # for pkg-config macros +-m4_include([/usr/share/aclocal/pkg.m4]) ++m4_include([pkg.m4]) + + # + # autofs installs by default in /usr diff --git a/meta-networking/recipes-daemons/autofs/autofs/0001-autofs-5.1.8-add-autofs_strerror_r-helper-for-musl.patch b/meta-networking/recipes-daemons/autofs/autofs/0001-autofs-5.1.8-add-autofs_strerror_r-helper-for-musl.patch new file mode 100644 index 0000000000..caf0105118 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs/0001-autofs-5.1.8-add-autofs_strerror_r-helper-for-musl.patch @@ -0,0 +1,56 @@ +From 88f991b0ebb6fb8fcaad3d0eb8fb51a7439d053e Mon Sep 17 00:00:00 2001 +From: Fabian Groffen <grobian@gentoo.org> +Date: Wed, 2 Feb 2022 09:27:13 +0800 +Subject: [PATCH 1/2] autofs-5.1.8 - add autofs_strerror_r() helper for musl + +If using musl libc the XSI-compliant variant strerror_r() which returns +an integer instead of a pointer so add a helper function to handle this +case. + +Signed-off-by: Fabian Groffen <grobian@gentoo.org> +Signed-off-by: Ian Kent <raven@themaw.net> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + include/automount.h | 5 +++++ + lib/log.c | 10 ++++++++++ + 2 files changed, 15 insertions(+) + +diff --git a/include/automount.h b/include/automount.h +index 8cd8b3a..f759e59 100644 +--- a/include/automount.h ++++ b/include/automount.h +@@ -51,6 +51,11 @@ + # endif + #endif + ++#ifndef __GLIBC__ ++# define strerror_r(N,B,S) autofs_strerror_r(N,B,S) ++char *autofs_strerror_r(int errnum, char *buf, size_t buflen); /* GNU */ ++#endif ++ + /* We MUST have the paths to mount(8) and umount(8) */ + #ifndef HAVE_MOUNT + #error Failed to locate mount(8)! +diff --git a/lib/log.c b/lib/log.c +index 39b1e3b..b99fa39 100644 +--- a/lib/log.c ++++ b/lib/log.c +@@ -368,3 +368,13 @@ pid_t log_pidinfo(struct autofs_point *ap, pid_t pid, char *label) { + + return ppid; + } ++ ++#ifndef __GLIBC__ ++# undef strerror_r ++char *autofs_strerror_r(int errnum, char *buf, size_t buflen) { ++ int s = strerror_r(errnum, buf, buflen); ++ if (s) ++ return NULL; ++ return buf; ++} ++#endif +-- +2.37.3 + diff --git a/meta-networking/recipes-daemons/autofs/autofs/0001-include-libgen.h-for-basename.patch b/meta-networking/recipes-daemons/autofs/autofs/0001-include-libgen.h-for-basename.patch new file mode 100644 index 0000000000..4c8b4ef779 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs/0001-include-libgen.h-for-basename.patch @@ -0,0 +1,58 @@ +From 1651e7a35be8b3e2fa90ca57b073f6944664fa62 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 25 Mar 2024 12:04:03 -0700 +Subject: [PATCH] include libgen.h for basename + +basename prototype has been removed from string.h from latest musl [1] +compilers e.g. clang-18 flags the absense of prototype as error. therefore +include libgen.h for providing it. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + daemon/automount.c | 1 + + daemon/master.c | 1 + + modules/lookup_file.c | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/daemon/automount.c b/daemon/automount.c +index 3d9461d..61b3478 100644 +--- a/daemon/automount.c ++++ b/daemon/automount.c +@@ -21,6 +21,7 @@ + + #include <dirent.h> + #include <getopt.h> ++#include <libgen.h> + #include <signal.h> + #include <stdio.h> + #include <stdlib.h> +diff --git a/daemon/master.c b/daemon/master.c +index f99359c..3f56499 100644 +--- a/daemon/master.c ++++ b/daemon/master.c +@@ -21,6 +21,7 @@ + #include <string.h> + #include <memory.h> + #include <limits.h> ++#include <libgen.h> + #include <signal.h> + #include <sys/types.h> + #include <sys/stat.h> +diff --git a/modules/lookup_file.c b/modules/lookup_file.c +index 6afc558..82b1f28 100644 +--- a/modules/lookup_file.c ++++ b/modules/lookup_file.c +@@ -15,6 +15,7 @@ + + #include <stdio.h> + #include <malloc.h> ++#include <libgen.h> + #include <stdlib.h> + #include <string.h> + #include <time.h> +-- +2.44.0 + diff --git a/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch b/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch index 7ac1456748..8eec3014a0 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch @@ -1,4 +1,4 @@ -From e4ee00e08acd7c0912a3264ad32e4de861c7416f Mon Sep 17 00:00:00 2001 +From 745e355ac8b595a27e1fcca75bf01d3e244f4a5f Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 7 Sep 2017 22:22:31 -0700 Subject: [PATCH] modules/lookup_multi.c: Replace __S_IEXEC with S_IEXEC @@ -7,7 +7,10 @@ __S_IEXEC is internal to libc and may not be available on all libc e.g. musl Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- +Upstream-Status: Pending + modules/lookup_multi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -24,6 +27,3 @@ index 3ecda6d..cf109de 100644 type = src_prog; else type = src_file; --- -2.14.1 - diff --git a/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch b/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch index 6b6ba6d855..d67f6300c8 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/0002-Replace-__S_IEXEC-with-S_IEXEC.patch @@ -1,43 +1,55 @@ -From 8fd74ddb3369572c594b22b396346131af00faee Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 31 Mar 2017 19:12:10 -0700 -Subject: [PATCH 2/2] Replace __S_IEXEC with S_IEXEC +From 096e33743158e0e8c04d60d01cc66e2945d79777 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 27 Nov 2018 16:52:35 +0800 +Subject: [PATCH] From 557ca399f4b3a397f20bb147ec6dc4ab9732dd1e Mon Sep 17 + 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 31 Mar 2017 + 19:12:10 -0700 Subject: [PATCH] Replace __S_IEXEC with S_IEXEC S_IEXEC is portable Signed-off-by: Khem Raj <raj.khem@gmail.com> + +update patch to version 5.1.5 +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- - daemon/lookup.c | 4 ++-- +Upstream-Status: Pending + + daemon/lookup.c | 6 +++--- modules/lookup_multi.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) + 2 files changed, 4 insertions(+), 4 deletions(-) -diff --git a/daemon/lookup.c b/daemon/lookup.c -index 62071df..1bec97f 100644 --- a/daemon/lookup.c +++ b/daemon/lookup.c -@@ -400,7 +400,7 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source - if (!S_ISREG(st.st_mode)) +@@ -397,7 +397,7 @@ static int read_file_source_instance(str return NSS_STATUS_NOTFOUND; + } - if (st.st_mode & __S_IEXEC) + if (st.st_mode & S_IEXEC) type = src_prog; else type = src_file; -@@ -890,7 +890,7 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_ - if (!S_ISREG(st.st_mode)) +@@ -930,7 +930,7 @@ static int lookup_name_file_source_insta return NSS_STATUS_NOTFOUND; + } - if (st.st_mode & __S_IEXEC) + if (st.st_mode & S_IEXEC) type = src_prog; else type = src_file; -diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c -index 6ec8434..88d081f 100644 +@@ -1077,7 +1077,7 @@ static struct map_source *lookup_get_map + if (!S_ISREG(st.st_mode)) + return NULL; + +- if (st.st_mode & __S_IEXEC) ++ if (st.st_mode & S_IEXEC) + type = "program"; + else + type = "file"; --- a/modules/lookup_multi.c +++ b/modules/lookup_multi.c -@@ -104,7 +104,7 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch +@@ -247,7 +247,7 @@ static struct lookup_mod *nss_open_looku continue; } @@ -46,6 +58,3 @@ index 6ec8434..88d081f 100644 type = src_prog; else type = src_file; --- -2.12.1 - diff --git a/meta-networking/recipes-daemons/autofs/autofs/0002-autofs-5.1.8-handle-innetgr-not-present-in-musl.patch b/meta-networking/recipes-daemons/autofs/autofs/0002-autofs-5.1.8-handle-innetgr-not-present-in-musl.patch new file mode 100644 index 0000000000..9d0caae312 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs/0002-autofs-5.1.8-handle-innetgr-not-present-in-musl.patch @@ -0,0 +1,106 @@ +From 1c0b0b70a276280f431d72319109a0bbc0267970 Mon Sep 17 00:00:00 2001 +From: Fabian Groffen <grobian@gentoo.org> +Date: Wed, 2 Feb 2022 10:15:22 +0800 +Subject: [PATCH 2/2] autofs-5.1.8 - handle innetgr() not present in musl + +The function innetgr(3) may not be present in musl libc, add a check +for this. + +Originally contributed by Fabian, modified by me. + +Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/storage/autofs/autofs.git/commit/?id=f60e40af3c038b8955325a11b7294ad38c15c9e8] +Signed-off-by: Fabian Groffen <grobian@gentoo.org> +Signed-off-by: Ian Kent <raven@themaw.net> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure | 6 ++++++ + configure.in | 2 +- + include/config.h.in | 3 +++ + modules/parse_amd.c | 7 +++++++ + 4 files changed, 17 insertions(+), 1 deletion(-) + +--- a/configure.in ++++ b/configure.in +@@ -169,7 +169,7 @@ AF_CHECK_SSS_LIB(SSS_AUTOFS, libsss_auto + AC_SUBST(HAVE_SSS_AUTOFS) + AC_SUBST(sssldir) + +-AC_CHECK_FUNCS(pipe2) ++AC_CHECK_FUNCS(pipe2 innetgr) + + # + # Newer mounts have the -s (sloppy) option to ignore unknown options, +--- a/include/config.h.in ++++ b/include/config.h.in +@@ -30,6 +30,9 @@ + /* Define to 1 if you have the `getservbyname' function. */ + #undef HAVE_GETSERVBYNAME + ++/* Define to 1 if you have the `innetgr' function. */ ++#undef HAVE_INNETGR ++ + /* Define to 1 if you have the <inttypes.h> header file. */ + #undef HAVE_INTTYPES_H + +@@ -45,9 +48,6 @@ + /* Define if you have the Linux /proc filesystem. */ + #undef HAVE_LINUX_PROCFS + +-/* Define to 1 if you have the <memory.h> header file. */ +-#undef HAVE_MEMORY_H +- + /* define if you have MOUNT */ + #undef HAVE_MOUNT + +@@ -69,6 +69,9 @@ + /* Define to 1 if you have the <stdint.h> header file. */ + #undef HAVE_STDINT_H + ++/* Define to 1 if you have the <stdio.h> header file. */ ++#undef HAVE_STDIO_H ++ + /* Define to 1 if you have the <stdlib.h> header file. */ + #undef HAVE_STDLIB_H + +@@ -141,7 +144,9 @@ + /* define if you have YACC */ + #undef PATH_YACC + +-/* Define to 1 if you have the ANSI C header files. */ ++/* Define to 1 if all of the C90 standard headers exist (not just the ones ++ required in a freestanding environment). This macro is provided for ++ backward compatibility; new code need not use it. */ + #undef STDC_HEADERS + + /* Define to 1 to use the libtirpc tsd usage workaround */ +--- a/modules/parse_amd.c ++++ b/modules/parse_amd.c +@@ -424,6 +424,7 @@ static int sel_in_network(struct autofs_ + return ret; + } + ++#ifdef HAVE_INNETGR + static int sel_netgrp(struct autofs_point *ap, + struct selector *s, struct substvar *sv) + { +@@ -488,6 +489,7 @@ out: + + return ret; + } ++#endif + + static int eval_selector(struct autofs_point *ap, + struct amd_entry *this, struct substvar *sv) +@@ -627,7 +629,12 @@ static int eval_selector(struct autofs_p + switch (s->sel->selector) { + case SEL_NETGRP: + case SEL_NETGRPD: ++#ifndef HAVE_INNETGR ++ error(logopt, MODPREFIX ++ "netgroups not available, function innetgr(3) not available"); ++#else + ret = sel_netgrp(ap, s, sv); ++#endif + break; + + default: diff --git a/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch b/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch index fdb906b22b..4cfd8edf9f 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/add-the-needed-stdarg.h.patch @@ -1,14 +1,18 @@ -[PATCH] add the needed stdarg.h +From df5d45b2d7ad7e7b5f0542a816d08b0409a529a1 Mon Sep 17 00:00:00 2001 +From: Roy Li <rongqing.li@windriver.com> +Date: Tue, 19 Aug 2014 11:31:35 +0800 +Subject: [PATCH] [PATCH] add the needed stdarg.h -Upstream-status: Pending +Upstream-Status: Pending Signed-off-by: Roy Li <rongqing.li@windriver.com> + --- - lib/defaults.c | 1 + + lib/defaults.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/defaults.c b/lib/defaults.c -index 2b03ea2..5728e67 100644 +index 0e48a78..667f35d 100644 --- a/lib/defaults.c +++ b/lib/defaults.c @@ -16,6 +16,7 @@ @@ -19,6 +23,3 @@ index 2b03ea2..5728e67 100644 #include <ctype.h> #include <string.h> #include <sys/utsname.h> --- -1.7.10.4 - diff --git a/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch b/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch deleted file mode 100644 index af5be6a830..0000000000 --- a/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-do-not-check-for-modprobe.patch +++ /dev/null @@ -1,75 +0,0 @@ -Description: Loading autofs module is #ifdef'ed in the source, so - there is no need to check for /proc (which is only used - to load module) or modprobe. Both modprobe and /proc - are always in the fixed location so there's no need to - check for these to start with. - -Upstream-Status: Backport [1] -[1] http://www.spinics.net/lists/autofs/msg00139.html - -diff -urpN a/configure.in b/configure.in ---- a/configure.in 2013-01-15 11:30:22.000000000 +0800 -+++ b/configure.in 2013-01-15 11:31:45.000000000 +0800 -@@ -34,11 +34,6 @@ AC_MSG_CHECKING([for binaries in]) - AC_MSG_RESULT([$searchpath]) - - # --# Make sure we have "/proc" --# --AF_LINUX_PROCFS() -- --# - # Location of init.d directory? - # - AF_INIT_D() -@@ -142,7 +137,6 @@ AF_PATH_INCLUDE(UMOUNT, umount, /bin/umo - AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $searchpath) - AF_PATH_INCLUDE(E3FSCK, fsck.ext3 e3fsck, , $searchpath) - AF_PATH_INCLUDE(E4FSCK, fsck.ext4 e4fsck, , $searchpath) --AF_PATH_INCLUDE(MODPROBE, modprobe, , $searchpath) - - AF_CHECK_PROG(LEX, flex lex, , $searchpath) - AF_CHECK_PROG(YACC, bison, , $searchpath) -diff -urpN a/daemon/module.c b/daemon/module.c ---- a/daemon/module.c 2013-01-15 11:30:49.000000000 +0800 -+++ b/daemon/module.c 2013-01-15 11:32:00.000000000 +0800 -@@ -18,6 +18,8 @@ - #include <stdlib.h> - #include "automount.h" - -+#if 0 -+/* see comment in daemon/automount.c around load_autofs4_module() call */ - int load_autofs4_module(void) - { - FILE *fp; -@@ -52,6 +54,7 @@ int load_autofs4_module(void) - - return 1; - } -+#endif - - struct lookup_mod *open_lookup(const char *name, const char *err_prefix, - const char *mapfmt, int argc, const char *const *argv) -diff -urpN a/include/automount.h b/include/automount.h ---- a/include/automount.h 2013-01-15 11:31:10.000000000 +0800 -+++ b/include/automount.h 2013-01-15 11:32:06.000000000 +0800 -@@ -50,16 +50,11 @@ - #error Failed to locate umount(8)! - #endif - --#ifndef HAVE_MODPROBE --#error Failed to locate modprobe(8)! --#endif -- --#ifndef HAVE_LINUX_PROCFS --#error Failed to verify existence of procfs filesystem! --#endif -- -+#if 0 -+/* see comment in daemon/automount.c around load_autofs4_module() call */ - #define FS_MODULE_NAME "autofs4" - int load_autofs4_module(void); -+#endif - - /* The -s (sloppy) option to mount is good, if we have it... */ - diff --git a/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch b/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch index 09fea495df..8e06db6e4a 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-fix-lib-deps.patch @@ -1,4 +1,4 @@ -From 54a9bd28a307dd74df044d779ca85adcf36aa202 Mon Sep 17 00:00:00 2001 +From 080626108c9ab70e2489752ef2a14006d0564b0c Mon Sep 17 00:00:00 2001 From: Joe MacDonald <joe.macdonald@windriver.com> Date: Tue, 18 Jun 2013 10:05:21 -0400 Subject: [PATCH] Fix the dependency issue @@ -10,19 +10,17 @@ generated by rpcgen during buildtime Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> + --- - lib/Makefile | 1 + + lib/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Makefile b/lib/Makefile -index 5418009..bff4e1d 100644 +index 518b483..4798a4b 100644 --- a/lib/Makefile +++ b/lib/Makefile -@@ -75,3 +75,4 @@ install: all +@@ -81,3 +81,4 @@ install: all clean: rm -f $(LIB) $(RPCS) $(OBJS) $(YACCSRC) *.output *~ +$(OBJS): $(RPCS) --- -1.7.10.4 - diff --git a/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch b/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch deleted file mode 100644 index 3a878980a4..0000000000 --- a/meta-networking/recipes-daemons/autofs/autofs/autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch +++ /dev/null @@ -1,32 +0,0 @@ -Upstream-Status: Pending - -From 44bdce8c6ed9b30c1643e5981172a4f9025f013c Mon Sep 17 00:00:00 2001 -From: Andreas Oberritter <obi@opendreambox.org> -Date: Wed, 13 Mar 2013 16:17:08 +0100 -Subject: [PATCH] autofs-5.0.7: include linux/nfs.h directly in rpc_subs.h - -Fixes compile error with uclibc. Glibc's nfs/nfs.h contains -nothing but "#include linux/nfs.h". rpc_subs.h already includes -other linux/nfs*.h files directly. - -Signed-off-by: Andreas Oberritter <obi@opendreambox.org> ---- - include/rpc_subs.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/rpc_subs.h b/include/rpc_subs.h -index b6d59f9..a2d9648 100644 ---- a/include/rpc_subs.h -+++ b/include/rpc_subs.h -@@ -18,7 +18,7 @@ - - #include <rpc/rpc.h> - #include <rpc/pmap_prot.h> --#include <nfs/nfs.h> -+#include <linux/nfs.h> - #include <linux/nfs2.h> - #include <linux/nfs3.h> - --- -1.7.10.4 - diff --git a/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch b/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch deleted file mode 100644 index cbf2bf8047..0000000000 --- a/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch +++ /dev/null @@ -1,30 +0,0 @@ -Make configure compatible with -Wl,--as-needed following -https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failure_in_..2Fconfigure - -2016-07-05 Martin von Gagern - -Index: autofs-5.1.2/aclocal.m4 -=================================================================== ---- autofs-5.1.2.orig/aclocal.m4 -+++ autofs-5.1.2/aclocal.m4 -@@ -415,9 +415,9 @@ AC_DEFUN([AF_CHECK_LIBTIRPC], - [ - # save current flags - af_check_libtirpc_save_cflags="$CFLAGS" --af_check_libtirpc_save_ldflags="$LDFLAGS" -+af_check_libtirpc_save_libs="$LIBS" - CFLAGS="$CFLAGS -I=/usr/include/tirpc" --LDFLAGS="$LDFLAGS -ltirpc" -+LIBS="$LIBS -ltirpc" - - AC_TRY_LINK( - [ #include <rpc/rpc.h> ], -@@ -440,7 +440,7 @@ AC_CHECK_FUNCS([getrpcbyname getservbyna - - # restore flags - CFLAGS="$af_check_libtirpc_save_cflags" --LDFLAGS="$af_check_libtirpc_save_ldflags" -+LIBS="$af_check_libtirpc_save_libs" - ]) - - AC_DEFUN([AF_WITH_LIBTIRPC], diff --git a/meta-networking/recipes-daemons/autofs/autofs/cross.patch b/meta-networking/recipes-daemons/autofs/autofs/cross.patch index 8f1af625f0..2a4f4fd0dd 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/cross.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/cross.patch @@ -1,8 +1,19 @@ -Index: autofs-5.0.7/aclocal.m4 -=================================================================== ---- autofs-5.0.7.orig/aclocal.m4 2012-10-28 04:45:07.000000000 -0700 -+++ autofs-5.0.7/aclocal.m4 2012-10-28 10:47:53.263996910 -0700 -@@ -7,6 +7,8 @@ +From b9b44cd82caceeb638cc6a862b5bb90b93ad6c6a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 5 Jan 2013 19:53:10 -0800 + +--- +Upstream-Status: Pending + + aclocal.m4 | 2 ++ + configure.in | 8 ++++++-- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/aclocal.m4 b/aclocal.m4 +index 2115204..2a9a802 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -7,6 +7,8 @@ dnl -------------------------------------------------------------------------- AC_DEFUN(AF_PATH_INCLUDE, [AC_PATH_PROGS($1,$2,$3,$4) if test -n "$$1"; then @@ -11,11 +22,11 @@ Index: autofs-5.0.7/aclocal.m4 AC_DEFINE(HAVE_$1,1,[define if you have $1]) AC_DEFINE_UNQUOTED(PATH_$1, "$$1", [define if you have $1]) HAVE_$1=1 -Index: autofs-5.0.7/configure.in -=================================================================== ---- autofs-5.0.7.orig/configure.in 2012-10-28 04:45:06.000000000 -0700 -+++ autofs-5.0.7/configure.in 2012-10-28 10:50:07.580000628 -0700 -@@ -301,13 +301,15 @@ +diff --git a/configure.in b/configure.in +index 25d7c4e..44a1c8b 100644 +--- a/configure.in ++++ b/configure.in +@@ -324,13 +324,15 @@ AC_PROG_CC cat > pietest.c <<EOF int main(void) { return 0; } EOF @@ -33,7 +44,7 @@ Index: autofs-5.0.7/configure.in AC_MSG_RESULT([$gcc_supports_pie]) if test $gcc_supports_pie = yes ; then DAEMON_CFLAGS="-fPIE" -@@ -316,6 +318,8 @@ +@@ -339,6 +341,8 @@ fi rm -f pietest.c AC_SUBST(DAEMON_CFLAGS) AC_SUBST(DAEMON_LDFLAGS) diff --git a/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch b/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch index 9b641838fa..fd736296a5 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/fix-the-YACC-rule-to-fix-a-building-failure.patch @@ -1,4 +1,7 @@ -[PATCH] fix the YACC rule to fix a building failure +From 971d48a00ef82880c34e89778bf430a01360ebd5 Mon Sep 17 00:00:00 2001 +From: Roy Li <rongqing.li@windriver.com> +Date: Mon, 18 May 2015 16:28:36 +0800 +Subject: [PATCH] [PATCH] fix the YACC rule to fix a building failure Upstream-Statu: Pending @@ -14,26 +17,17 @@ This lead to a race when compile amd_tok.o, the header file maybe rewritten. |../Makefile.rules:64: recipe for target 'amd_tok.o' failed |---------------------- Signed-off-by: Roy Li <rongqing.li@windriver.com> + --- +Upstream-Status: Pending + lib/Makefile | 6 ++++-- modules/Makefile | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) -diff --git a/lib/Makefile b/lib/Makefile -index 4798a4b..c40cf86 100644 --- a/lib/Makefile +++ b/lib/Makefile -@@ -57,7 +57,8 @@ mount_xdr.o: mount_xdr.c - master_tok.c: master_tok.l - $(LEX) -o$@ -Pmaster_ $? - --master_parse.tab.c master_parse.tab.h: master_parse.y -+master_parse.tab.h: master_parse.tab.c -+master_parse.tab.c: master_parse.y - $(YACC) -v -d -p master_ -b master_parse $? - - master_tok.o: master_tok.c master_parse.tab.h -@@ -67,7 +68,8 @@ master_parse.tab.o: master_parse.tab.c master_parse.tab.h +@@ -53,7 +53,8 @@ mount_xdr.o: mount_xdr.c nss_tok.c: nss_tok.l $(LEX) -o$@ -Pnss_ $? @@ -43,8 +37,6 @@ index 4798a4b..c40cf86 100644 $(YACC) -v -d -p nss_ -b nss_parse $? nss_tok.o: nss_tok.c nss_parse.tab.h -diff --git a/modules/Makefile b/modules/Makefile -index 237b70b..71415d0 100644 --- a/modules/Makefile +++ b/modules/Makefile @@ -103,7 +103,8 @@ amd_tok.c: amd_tok.l @@ -57,6 +49,30 @@ index 237b70b..71415d0 100644 $(YACC) -v -d -p amd_ -b amd_parse $? amd_parse.tab.o: amd_parse.tab.c amd_parse.tab.h --- -1.9.1 - +--- a/daemon/Makefile ++++ b/daemon/Makefile +@@ -16,7 +16,7 @@ YACCSRC = master_tok.c master_parse.tab. + version := $(shell cat ../.version) + + CFLAGS += -rdynamic $(DAEMON_CFLAGS) -D_GNU_SOURCE -I../include +-CFLAGS += -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" ++CFLAGS += -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" + CFLAGS += -DAUTOFS_MAP_DIR=\"$(autofsmapdir)\" + CFLAGS += -DAUTOFS_CONF_DIR=\"$(autofsconfdir)\" + CFLAGS += -DAUTOFS_FIFO_DIR=\"$(autofsfifodir)\" +@@ -44,7 +44,8 @@ automount: $(OBJS) $(AUTOFS_LIB) + master_tok.c: master_tok.l + $(LEX) -o$@ -Pmaster_ $? + +-master_parse.tab.c master_parse.tab.h: master_parse.y ++master_parse.tab.h: master_parse.tab.c ++master_parse.tab.c: master_parse.y + $(YACC) -v -d -p master_ -b master_parse $? + + master_tok.o: master_tok.c master_parse.tab.h +@@ -57,5 +58,3 @@ clean: + install: all + install -d -m 755 $(INSTALLROOT)$(sbindir) + install -c automount -m 755 $(INSTALLROOT)$(sbindir) +- +- diff --git a/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch b/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch index 94750b257c..414325974d 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch @@ -1,6 +1,9 @@ -autofs: fails to compile with openldap disabled +From c500d9906f163bf716c872d37403b9de02ef0a86 Mon Sep 17 00:00:00 2001 +From: Amy Fong <amy.fong@windriver.com> +Date: Fri, 18 Jan 2013 12:13:32 -0500 +Subject: [PATCH] autofs: fails to compile with openldap disabled -As of 5.0.6, it appears that changes were introduced so that +As of 5.0.6, it appears that changes were introduced so that if you compile with openldap disabled and openldap headers are not available, then autofs fails to build. @@ -12,13 +15,13 @@ Signed-off-by: Amy Fong <amy.fong@windriver.com> 1 file changed, 4 insertions(+) --- - include/lookup_ldap.h | 4 ++++ + include/lookup_ldap.h | 4 ++++ 1 file changed, 4 insertions(+) -Index: autofs-5.1.2/include/lookup_ldap.h -=================================================================== ---- autofs-5.1.2.orig/include/lookup_ldap.h -+++ autofs-5.1.2/include/lookup_ldap.h +diff --git a/include/lookup_ldap.h b/include/lookup_ldap.h +index 3a7aba7..bfdb0b3 100644 +--- a/include/lookup_ldap.h ++++ b/include/lookup_ldap.h @@ -1,7 +1,9 @@ #ifndef LOOKUP_LDAP_H #define LOOKUP_LDAP_H diff --git a/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch b/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch index 634005bd27..1fc500319e 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/force-STRIP-to-emtpy.patch @@ -1,14 +1,20 @@ -[PATCH] force STRIP to emtpy +From 3cbee00fe5725b87abdae80cfa2ee735e4513ca6 Mon Sep 17 00:00:00 2001 +From: Roy Li <rongqing.li@windriver.com> +Date: Tue, 19 Aug 2014 11:31:35 +0800 +Subject: [PATCH] [PATCH] force STRIP to emtpy otherwise the generate file will be stripped Signed-off-by: Roy Li <rongqing.li@windriver.com> + --- - Makefile.rules | 2 +- +Upstream-Status: Pending + + Makefile.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.rules b/Makefile.rules -index 710a2c9..e4334db 100644 +index 709dd04..b1f7e50 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -31,7 +31,7 @@ LDFLAGS ?= -s @@ -20,6 +26,3 @@ index 710a2c9..e4334db 100644 else STRIP ?= strip --strip-debug endif --- -1.7.10.4 - diff --git a/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch b/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch deleted file mode 100644 index d68944b459..0000000000 --- a/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: autofs-5.0.7/aclocal.m4 -=================================================================== ---- autofs-5.0.7.orig/aclocal.m4 2012-10-28 13:17:45.504237027 -0700 -+++ autofs-5.0.7/aclocal.m4 2012-10-28 13:20:50.108242739 -0700 -@@ -403,7 +403,7 @@ - # save current flags - af_check_libtirpc_save_cflags="$CFLAGS" - af_check_libtirpc_save_ldflags="$LDFLAGS" --CFLAGS="$CFLAGS -I/usr/include/tirpc" -+CFLAGS="$CFLAGS -I=/usr/include/tirpc" - LDFLAGS="$LDFLAGS -ltirpc" - - AC_TRY_LINK( -Index: autofs-5.0.7/Makefile.rules -=================================================================== ---- autofs-5.0.7.orig/Makefile.rules 2012-10-28 13:17:45.308237022 -0700 -+++ autofs-5.0.7/Makefile.rules 2012-10-28 13:21:25.720242803 -0700 -@@ -48,7 +48,7 @@ - LIBS += -lpthread - - ifdef TIRPCLIB --CFLAGS += -I/usr/include/tirpc -+CFLAGS += -I=/usr/include/tirpc - LIBS += $(TIRPCLIB) - endif - diff --git a/meta-networking/recipes-daemons/autofs/autofs/mount_conflict.patch b/meta-networking/recipes-daemons/autofs/autofs/mount_conflict.patch new file mode 100644 index 0000000000..e2a94bf825 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs/mount_conflict.patch @@ -0,0 +1,30 @@ +Avoid conflicts between sys/mount.h and linux/mount.h + +linux/fs.h includes linux/mount.h and this include file is unused so +do not include it and avoid conflict too with glibc 2.36+ see [1] + +[1] https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/modules/parse_amd.c ++++ b/modules/parse_amd.c +@@ -27,7 +27,6 @@ + #include <sys/utsname.h> + #include <netinet/in.h> + #include <sys/mount.h> +-#include <linux/fs.h> + + #define MODULE_PARSE + #include "automount.h" +--- a/modules/parse_sun.c ++++ b/modules/parse_sun.c +@@ -30,7 +30,6 @@ + #include <sys/utsname.h> + #include <netinet/in.h> + #include <sys/mount.h> +-#include <linux/fs.h> + + #define MODULE_PARSE + #include "automount.h" diff --git a/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch b/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch index cf03635270..f91c307d34 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/no-bash.patch @@ -1,17 +1,28 @@ -Index: autofs-5.0.7/samples/auto.net -=================================================================== ---- autofs-5.0.7.orig/samples/auto.net 2012-07-24 23:05:26.000000000 -0700 -+++ autofs-5.0.7/samples/auto.net 2012-10-28 10:44:25.035991715 -0700 +From a3007d7ea930823926611081bb873ddd771325cb Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 5 Jan 2013 19:53:10 -0800 + +--- +Upstream-Status: Pending + + samples/auto.net | 2 +- + samples/auto.smb | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/samples/auto.net b/samples/auto.net +index 0384f61..61215f6 100755 +--- a/samples/auto.net ++++ b/samples/auto.net @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # This file must be executable to work! chmod 755! -Index: autofs-5.0.7/samples/auto.smb -=================================================================== ---- autofs-5.0.7.orig/samples/auto.smb 2012-07-24 23:05:26.000000000 -0700 -+++ autofs-5.0.7/samples/auto.smb 2012-10-28 10:44:25.035991715 -0700 +diff --git a/samples/auto.smb b/samples/auto.smb +index 6af5d85..d296b81 100755 +--- a/samples/auto.smb ++++ b/samples/auto.smb @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh diff --git a/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch b/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch index bf2c964a0e..be750ab897 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch @@ -1,19 +1,37 @@ +From 602f9ca83c2bdbf511bcb178fcb4b9fc54da955f Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 27 Nov 2018 15:20:46 +0800 +Subject: [PATCH] From e3ae56cf0bb4063c31295f45d04e3c504f4b6cc7 Mon Sep 17 + 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Mon, 24 Apr 2017 + 20:41:25 -0700 Subject: [PATCH] autofs: Upgrade to 5.1.2 release + Use pkg-config first to look for external libnsl which is now split out from glibc, if it does not exist then see if its provided by glibc itself. -Khem -Index: autofs-5.1.2/configure.in -=================================================================== ---- autofs-5.1.2.orig/configure.in -+++ autofs-5.1.2/configure.in -@@ -186,7 +186,7 @@ fi - # - # glibc/libc 6 new libraries - # --AC_CHECK_LIB(nsl, yp_match, LIBNSL="-lnsl") -+PKG_CHECK_MODULES([NSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL="-lnsl"],[LIBNSL=""])]) - AC_SUBST(LIBNSL) +Upstream-Status: Pending + +update patch to version 5.1.5 +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index 76ecb40..493b9f1 100644 +--- a/configure.in ++++ b/configure.in +@@ -238,7 +238,7 @@ AC_SUBST(LIBCLOCK_GETTIME) - AC_CHECK_LIB(resolv, res_query, LIBRESOLV="-lresolv") + PKG_CHECK_MODULES([NSL],[libnsl],, + [ +-AC_CHECK_LIB(nsl, yp_match, NSL_LIBS="-lnsl") ++PKG_CHECK_MODULES([NSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL="-lnsl"],[LIBNSL=""])]) + AC_SUBST(NSL_LIBS) + NSL_CFLAGS="" + ]) +-- +2.7.4 + diff --git a/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch b/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch index 282d6f0ad2..4183069bb1 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/remove-bashism.patch @@ -1,4 +1,4 @@ -From 79034f969bbd12215d65b4337dfd38a13d02d4ef Mon Sep 17 00:00:00 2001 +From cfacbb917f87b903b50132a5025f86b0cc522e9c Mon Sep 17 00:00:00 2001 From: Robert Yang <liezhi.yang@windriver.com> Date: Sat, 13 Sep 2014 20:19:28 -0700 Subject: [PATCH] autofs.init.in: remove bashism @@ -9,9 +9,10 @@ Upstream-Status: Pending Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> + --- - redhat/autofs.init.in | 12 ++++++------ - samples/rc.autofs.in | 10 +++++----- + redhat/autofs.init.in | 12 ++++++------ + samples/rc.autofs.in | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in @@ -115,6 +116,3 @@ index 487669f..e96cde1 100644 pid=`pidof $prog` if [ -z $pid ]; then echo $"$prog not running" --- -1.7.9.5 - diff --git a/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch b/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch index 93b76bd66e..41de373fd4 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/using-pkg-config-to-detect-libxml-2.0-and-krb5.patch @@ -1,39 +1,36 @@ -using pkg-config to detect libxml-2.0 and krb5 +From dd90a690f95569b999b8ac9ab57e834b3421dcbb Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 27 Nov 2018 15:19:07 +0800 +Subject: [PATCH] From dabcbdae38038a8e4ad2c4286112381c407c5ce7 Mon Sep 17 + 00:00:00 2001 From: Roy Li <rongqing.li@windriver.com> Date: Tue, 19 Aug 2014 + 11:31:35 +0800 Subject: [PATCH] using pkg-config to detect libxml-2.0 and + krb5 -Upstream-status: Pending +Upstream-Status: Pending Signed-off-by: Roy Li <rongqing.li@windriver.com> + +update patch to 5.1.5 +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- - configure.in | 16 ++++++++++++++-- - 2 files changed, 14 insertions(+), 2 deletions(-) + configure.in | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) -diff --git a/configure.in b/configure.in -index 392d122..a3028aa 100644 --- a/configure.in +++ b/configure.in -@@ -162,8 +162,20 @@ if test x$enable_sloppy_mount = xyes; then - fi - - # LDAP SASL auth needs libxml and Kerberos --AF_CHECK_LIBXML() +@@ -215,7 +215,14 @@ PKG_CHECK_MODULES([XML], [libxml-2.0], [ + AC_DEFINE(LIBXML2_WORKAROUND, 1, [Use libxml2 tsd usage workaround]) + ], [HAVE_LIBXML=0]) + -AF_CHECK_KRB5() -+PKG_CHECK_MODULES(XML, [libxml-2.0],HAVE_LIBXML=1,HAVE_LIBXML=0) -+AC_SUBST([HAVE_LIBXML]) -+XML_FLAGS=$XML_CFLAGS -+ -+PKG_CHECK_MODULES(KRB5, [krb5],HAVE_KRB5=1,HAVE_KRB5=0) -+AC_SUBST([HAVE_KRB5]) -+if test "x$HAVE_KRB5" = "x1"; then ++PKG_CHECK_MODULES(KRB5, [krb5], [ ++ HAVE_KRB5=1 + SAVE_CFLAGS=$CFLAGS + SAVE_LIBS=$LIBS + CFLAGS="$CFLAGS $KRB5_FLAGS" + LIBS="$LIBS $KRB5_LIBS" -+ + AC_CHECK_FUNCS([krb5_principal_get_realm]) -+fi - ++], [HAVE_KRB5=0]) + AC_SEARCH_LIBS([versionsort],[]) if test "$ac_cv_search_versionsort" = "no"; then --- -1.7.10.4 - diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb b/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb index 68c64fdb04..e3f9777380 100644 --- a/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb +++ b/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb @@ -1,7 +1,7 @@ SUMMARY = "Kernel based automounter for linux" SECTION = "utils" -LICENSE = "GPL-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=ee9324a6f564bb2376b63878ac396798" DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl libnsl2" @@ -10,11 +10,8 @@ CFLAGS += "-I${STAGING_INCDIR}/tirpc" inherit autotools-brokensep systemd update-rc.d pkgconfig SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ - file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \ file://no-bash.patch \ file://cross.patch \ - file://libtirpc.patch \ - file://autofs-5.0.7-do-not-check-for-modprobe.patch \ file://fix_disable_ldap.patch \ file://autofs-5.0.7-fix-lib-deps.patch \ file://add-the-needed-stdarg.h.patch \ @@ -24,12 +21,19 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ file://fix-the-YACC-rule-to-fix-a-building-failure.patch \ file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \ file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \ - file://autofs-5.1.2-libtirpc-as-need.patch \ file://pkgconfig-libnsl.patch \ file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \ + file://0001-Do-not-hardcode-path-for-pkg.m4.patch \ + file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \ + file://0001-Define-__SWORD_TYPE-if-undefined.patch \ + file://mount_conflict.patch \ + file://0001-autofs-5.1.8-add-autofs_strerror_r-helper-for-musl.patch \ + file://0002-autofs-5.1.8-handle-innetgr-not-present-in-musl.patch \ + file://0001-include-libgen.h-for-basename.patch \ " -SRC_URI[md5sum] = "28cf88f99eff553a8500659ba5d45a76" -SRC_URI[sha256sum] = "0d57e4138c2ec8058ca92164d035546f68ce4af93acb893369993d67c7056a10" +SRC_URI[sha256sum] = "0bd401c56f0eb1ca6251344c3a3d70bface3eccf9c67117cd184422c4cace30c" + +UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/" INITSCRIPT_NAME = "autofs" INITSCRIPT_PARAMS = "defaults" @@ -44,34 +48,54 @@ PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" EXTRA_OEMAKE = "DONTSTRIP=1" EXTRA_OECONF += "--disable-mount-locking \ --enable-ignore-busy --with-openldap=no \ + --with-confdir=${sysconfdir}/default \ + --with-fifodir=/run \ + --with-flagdir=/run \ --with-sasl=no --with-libtirpc \ + --with-mapdir=${sysconfdir} \ --with-path=${STAGING_BINDIR_NATIVE} \ + --with-fifodir=${localstatedir}/run \ + --with-flagdir=${localstatedir}/run \ " CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ ac_cv_path_RPCGEN=rpcgen \ + initdir=${INIT_D_DIR} \ + piddir=/run \ " -do_configure_prepend () { - sed -e "s:filagdir:flagdir:" -i ${S}/configure.in +do_configure:prepend () { if [ ! -e ${S}/acinclude.m4 ]; then cp ${S}/aclocal.m4 ${S}/acinclude.m4 fi + cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 . } -do_install_append () { +do_install:append () { + # samples have been removed from SUBDIRS from 5.1.5, need to install separately + oe_runmake 'DESTDIR=${D}' install_samples + if [ -d ${D}/run ]; then rmdir ${D}/run fi if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run fi + # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand. + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d -m 755 ${D}${INIT_D_DIR} + install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs + fi } SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" -INSANE_SKIP_${PN} = "dev-so" - -RPROVIDES_${PN} += "${PN}-systemd" -RREPLACES_${PN} += "${PN}-systemd" -RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "autofs.service" +# all the libraries are unversioned, so don't pack it on PN-dev +SOLIBS = ".so" +FILES_SOLIBSDEV = "" +# Some symlinks are created in plugins dir e.g. +# mount_nfs4.so -> mount_nfs.so +INSANE_SKIP:${PN} = "dev-so" +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "autofs.service" diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch deleted file mode 100644 index 3fa8431c34..0000000000 --- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch +++ /dev/null @@ -1,25 +0,0 @@ -Fix hardcoded libdir. - -Upstream-Status: Pending - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - plugins/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/plugins/Makefile.am b/plugins/Makefile.am -index b00915f..25262a1 100644 ---- a/plugins/Makefile.am -+++ b/plugins/Makefile.am -@@ -62,7 +62,7 @@ plugindir = @plugindir@ - - common_sources = plugin_common.c plugin_common.h - --sasldir = $(prefix)/lib/sasl2 -+sasldir = $(libdir)/sasl2 - sasl_LTLIBRARIES = @SASL_MECHS@ - EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \ - libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \ --- -1.7.4.1 - diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch deleted file mode 100644 index 6407721ae3..0000000000 --- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch +++ /dev/null @@ -1,46 +0,0 @@ -Avoid to call AC_TRY_RUN - -Upstream-Status: Inappropriate [configuration] - -Avoid to call AC_TRY_RUN to check if GSSAPI libraries support SPNEGO -on cross-compile environment by definition AC_ARG_ENABLE enable-spnego - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - cmulocal/sasl2.m4 | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/cmulocal/sasl2.m4 b/cmulocal/sasl2.m4 -index 3c2841a..a5ecf81 100644 ---- a/cmulocal/sasl2.m4 -+++ b/cmulocal/sasl2.m4 -@@ -281,6 +281,17 @@ if test "$gssapi" != no; then - - cmu_save_LIBS="$LIBS" - LIBS="$LIBS $GSSAPIBASE_LIBS" -+ AC_ARG_ENABLE([spnego], -+ [AC_HELP_STRING([--enable-spnego=<DIR>], -+ [enable SPNEGO support in GSSAPI libraries [no]])], -+ [spnego=$enableval], -+ [spnego=no]) -+ -+ if test "$spnego" = no; then -+ echo "no" -+ elif test "$spnego" = yes; then -+ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO]) -+ else - AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries]) - AC_TRY_RUN([ - #ifdef HAVE_GSSAPI_H -@@ -308,7 +319,7 @@ int main(void) - AC_MSG_RESULT(yes) ], - AC_MSG_RESULT(no)) - LIBS="$cmu_save_LIBS" -- -+ fi - else - AC_MSG_RESULT([disabled]) - fi --- -1.7.10.4 - diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff deleted file mode 100644 index 8eff5a8bdd..0000000000 --- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff +++ /dev/null @@ -1,14 +0,0 @@ -Author: Fabian Fagerholm <fabbe@debian.org> -Description: Fix linking with libsasldb.a when saslauthd is built with sasldb -support. ---- a/saslauthd/configure.in -+++ b/saslauthd/configure.in -@@ -77,7 +77,7 @@ if test "$authsasldb" != no; then - AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support]) - SASL_DB_PATH_CHECK() - SASL_DB_CHECK() -- SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al" -+ SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.a" - fi - - AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ], diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff deleted file mode 100644 index 2e5b1750d0..0000000000 --- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff +++ /dev/null @@ -1,27 +0,0 @@ -Author: Fabian Fagerholm <fabbe@debian.org> -Description: This patch makes sure the non-PIC version of libsasldb.a, which -is created out of non-PIC objects, is not going to overwrite the PIC version, -which is created out of PIC objects. The PIC version is placed in .libs, and -the non-PIC version in the current directory. This ensures that both non-PIC -and PIC versions are available in the correct locations. ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -78,7 +78,7 @@ endif - - libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS) - @echo adding static plugins and dependencies -- $(AR) cru .libs/$@ $(SASL_STATIC_OBJS) -+ $(AR) cru $@ $(SASL_STATIC_OBJS) - @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ - if test ! -f $$i; then continue; fi; . $$i; \ - for j in $$dependency_libs foo; do \ ---- a/sasldb/Makefile.am -+++ b/sasldb/Makefile.am -@@ -63,6 +63,6 @@ libsasldb_a_SOURCES = - EXTRA_libsasldb_a_SOURCES = - - libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC) -- $(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC) -+ $(AR) cru $@ $(SASL_DB_BACKEND_STATIC) - - diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch deleted file mode 100644 index ecbab845d0..0000000000 --- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 92d72789c811b0d55f624a8bac5ccc4412f5996e Mon Sep 17 00:00:00 2001 -From: Ken Murchison <murch@andrew.cmu.edu> -Date: Thu, 20 Dec 2012 18:14:50 -0500 -Subject: [PATCH] sasl.h: #include <stddef.h> for size_t on NetBSD - -This patch was imported from git://git.cyrusimap.org/cyrus-sasl -commit 67a188693796a14e3a76ac603104807fbbfddfc4 - -Upstream-Status: Backport - -Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> ---- - include/sasl.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/sasl.h b/include/sasl.h -index fef4d51..8b8a63f 100755 ---- a/include/sasl.h -+++ b/include/sasl.h -@@ -121,6 +121,8 @@ - #ifndef SASL_H - #define SASL_H 1 - -+#include <stddef.h> /* For size_t */ -+ - /* Keep in sync with win32/common.mak */ - #define SASL_VERSION_MAJOR 2 - #define SASL_VERSION_MINOR 1 --- -1.8.3.2 - diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf deleted file mode 100644 index a91a9d3340..0000000000 --- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf +++ /dev/null @@ -1,11 +0,0 @@ -# Directory in which to place saslauthd's listening socket, pid file, and so -# on. This directory must already exist. -SOCKETDIR=@LOCALSTATEDIR@/run/saslauthd - -# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list -# of which mechanism your installation was compiled with the ablity to use. -MECH=pam - -# Additional flags to pass to saslauthd on the command line. See saslauthd(8) -# for the list of accepted flags. -FLAGS= diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service deleted file mode 100644 index 96dbae3782..0000000000 --- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=SASL authentication daemon. -After=syslog.target - -[Service] -Type=forking -PIDFile=@LOCALSTATEDIR@/run/saslauthd/saslauthd.pid -EnvironmentFile=@SYSCONFDIR@/default/saslauthd -ExecStart=@SBINDIR@/saslauthd -m $SOCKETDIR -a $MECH $FLAGS - -[Install] -WantedBy=multi-user.target diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb deleted file mode 100644 index 64d1a76d6f..0000000000 --- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb +++ /dev/null @@ -1,96 +0,0 @@ -SUMMARY = "Generic client/server library for SASL authentication" -SECTION = "libs" -HOMEPAGE = "http://asg.web.cmu.edu/sasl/" -DEPENDS = "openssl db" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396" - -SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \ - file://avoid-to-call-AC_TRY_RUN.patch \ - file://Fix-hardcoded-libdir.patch \ - file://debian_patches_0009_sasldb_al.diff \ - file://debian_patches_0014_avoid_pic_overwrite.diff \ - file://sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch \ - file://saslauthd.service \ - file://saslauthd.conf \ -" - -inherit autotools-brokensep pkgconfig useradd systemd - -EXTRA_OECONF += "--with-dblib=berkeley \ - --with-bdb-libdir=${STAGING_LIBDIR} \ - --with-bdb-incdir=${STAGING_INCDIR} \ - --with-bdb=db-5.3 \ - --with-plugindir="${libdir}/sasl2" \ - andrew_cv_runpath_switch=none" - -PACKAGECONFIG ??= "ntlm \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 ldap pam', d)} \ -" -PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5," -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," -PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie," -PACKAGECONFIG[des] = "--with-des,--without-des,," -PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap," -PACKAGECONFIG[ntlm] = "--with-ntlm,--without-ntlm,," -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -CFLAGS += "-fPIC" - -do_configure_prepend () { - rm -f acinclude.m4 config/libtool.m4 - - # make it be able to work with db 5.0 version - local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c" - for sed_file in $sed_files; do - sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' $sed_file - done -} - -do_compile_prepend () { - cd include - ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} makemd5.c -o makemd5 - touch makemd5.o makemd5.lo makemd5 - cd .. -} - -do_install_append() { - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/saslauthd.service ${D}${systemd_unitdir}/system - - sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/saslauthd.service - sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/saslauthd.service - sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/saslauthd.service - - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /run/saslauthd/ - - - -" > ${D}${sysconfdir}/tmpfiles.d/saslauthd.conf - - install -d ${D}${sysconfdir}/default/ - install -m 0644 ${WORKDIR}/saslauthd.conf ${D}${sysconfdir}/default/saslauthd - sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/default/saslauthd - fi -} - -USERADD_PACKAGES = "${PN}-bin" -USERADD_PARAM_${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus" - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = "saslauthd.service" -SYSTEMD_AUTO_ENABLE = "disable" - -SRC_URI[md5sum] = "a7f4e5e559a0e37b3ffc438c9456e425" -SRC_URI[sha256sum] = "8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3" - -PACKAGES =+ "${PN}-bin" - -FILES_${PN} += "${libdir}/sasl2/*.so*" -FILES_${PN}-bin += "${bindir} \ - ${sysconfdir}/default/saslauthd \ - ${systemd_unitdir}/system/saslauthd.service \ - ${sysconfdir}/tmpfiles.d/saslauthd.conf" -FILES_${PN}-dev += "${libdir}/sasl2/*.la" -FILES_${PN}-dbg += "${libdir}/sasl2/.debug" -FILES_${PN}-staticdev += "${libdir}/sasl2/*.a" - -INSANE_SKIP_${PN} += "dev-so" diff --git a/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample deleted file mode 100644 index ec0584193d..0000000000 --- a/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.conf.sample +++ /dev/null @@ -1,21 +0,0 @@ -# options to dnrd - -# example: two default dns servers and dns servers for exampledomain.com. The -# latter are load balanced (-b) -# -# - -# DNRD_OPTS=" -# -s XXX.XXX.XX.XXX -# -s XXX.XXX.XX.XXX -# -b -# -s XXX.XXX.XX.XXX:exampledomain.com -# -s XXX.XXX.XX.XXX:exampledomain.com" - -# example: dnrd user -# - -# DNRD_USER="user" -# - - diff --git a/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init deleted file mode 100644 index 2fe583fcf9..0000000000 --- a/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.init +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# -# Startup script for dnrd -# -# Copyright 2008, Rakesh Pandit <rakesh.pandit@gmail.com> -# -# This source is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This source is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# chkconfig: - 85 15 -# description: dnrd is a proxying nameserver. It forwards DNS queries to the -# appropriate nameserver, but can also act as the primary nameserver for -# a subnet behind a firewall. It also has features such as caching DNS -# requests, support for DNS servers, cache poisoning prevention, TCP -# support, etc.. - -# processname: dnrd -# pidfile: /var/run/dnrd.pid -# config: /etc/dnrd/dnrd.conf - -# Provides: dnrd -# Required-Start: -# Should-Start: -# Required-Stop: -# Default-Stop: 0 1 2 6 -# Short-Description: Start dnrd daemon -# Description: Domain Name Relay Daemon -# END INIT INFO - -exe=/usr/sbin/dnrd -pfile=/etc/passwd - -# Source function library. -. /etc/init.d/functions - -# Source conf file -. /etc/dnrd/dnrd.conf - -[ -x $exe ] || exit 1 -[ -r "/etc/dnrd/dnrd.conf" ] || exit 1 -if [ $DNRD_USER ] -then - grep "^${LOGIN}:" $pfile >/dev/null 2>&1 - if [ $? -eq 0 ];then - echo "$DNRD_USER specified in /etc/dnrd/dnrd.conf does not exist!" - fi -else - echo "DNRD_USER not set at /etc/dnrd/dnrd.conf!" - exit 1 -fi - -case "$1" in - start) - echo -n "Starting dnrd: " - daemon dnrd $DNRD_OPTS -u $DNRD_USER - echo - touch /var/lock/subsys/dnrd - ;; - stop) - echo -n "Shutting down dnrd: " - killproc dnrd - echo - rm -f /var/lock/subsys/dnrd - rm -f /var/run/dnrd.pid - ;; - status) - status dnrd - ;; - restart) - $0 stop - $0 start - ;; - reload) - echo -n "Reloading dnrd: " - killproc dnrd -HUP - echo - ;; - *) - echo "Usage: $0 {start|stop|restart|reload|status}" - exit 1 -esac - -exit 0 diff --git a/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service b/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service deleted file mode 100644 index 9c9fa66394..0000000000 --- a/meta-networking/recipes-daemons/dnrd/dnrd/dnrd.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Domain Name Relay Daemon -After=network.target - -[Service] -Type=forking -PIDFile=/var/run/dnrd.pid -EnvironmentFile=/etc/dnrd/dnrd.conf -ExecStart=/usr/sbin/dnrd $DNRD_OPTS -u $DNRD_USER - -[Install] -WantedBy=multi-user.target diff --git a/meta-networking/recipes-daemons/igmpproxy/igmpproxy/0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch b/meta-networking/recipes-daemons/igmpproxy/igmpproxy/0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch deleted file mode 100644 index 82cdc36ac4..0000000000 --- a/meta-networking/recipes-daemons/igmpproxy/igmpproxy/0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a557651a08e21e3c7c7f5eca9f5405f86624903f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 14 Jul 2017 22:42:51 -0700 -Subject: [PATCH] src/igmpproxy.h: Include sys/types.h for u_short/u_init - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/igmpproxy.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/igmpproxy.h b/src/igmpproxy.h -index 4dabd1c..4454729 100644 ---- a/src/igmpproxy.h -+++ b/src/igmpproxy.h -@@ -46,6 +46,7 @@ - #include <stdbool.h> - - #include <sys/socket.h> -+#include <sys/types.h> - #include <sys/un.h> - #include <sys/time.h> - #include <sys/ioctl.h> --- -2.13.3 - diff --git a/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb b/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb deleted file mode 100644 index 5424dc455e..0000000000 --- a/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "simple dynamic multicast routing daemon that only uses IGMP signalling" -HOMEPAGE = "http://sourceforge.net/projects/igmpproxy/" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=1e995e2799bb0d27d63069b97f805420" - -SRC_URI = "http://sourceforge.net/projects/igmpproxy/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ - file://0001-src-igmpproxy.h-Include-sys-types.h-for-u_short-u_in.patch \ - " - -SRC_URI[md5sum] = "c56f41ec195bc1fe016369bf74efc5a1" -SRC_URI[sha256sum] = "ee18ff3d8c3ae3a29dccb7e5eedf332337330020168bd95a11cece8d7d7ee6ae" - -inherit autotools pkgconfig - -CFLAGS += "-D_GNU_SOURCE" diff --git a/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.3.bb b/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.3.bb new file mode 100644 index 0000000000..e8567ccebf --- /dev/null +++ b/meta-networking/recipes-daemons/igmpproxy/igmpproxy_0.3.bb @@ -0,0 +1,13 @@ +SUMMARY = "simple dynamic multicast routing daemon that only uses IGMP signalling" +HOMEPAGE = "http://sourceforge.net/projects/igmpproxy/" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=432040ff3a55670c1dec0c32b209ad69" + +SRC_URI = "https://github.com/pali/igmpproxy/releases/download/${PV}/${BP}.tar.gz" +SRC_URI[md5sum] = "5565874d9631103109a72452cecb5ce7" +SRC_URI[sha256sum] = "d1fc244cb2fbbf99f720bda3e841fe59ece9b6919073790b4b892739b1b844eb" + +UPSTREAM_CHECK_URI = "https://github.com/pali/${BPN}/releases" + +inherit autotools pkgconfig diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch index e967621259..5555d464c1 100644 --- a/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch +++ b/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch @@ -5,6 +5,8 @@ Subject: [PATCH 1/3] Respect flags from env Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + Makefile | 4 ++-- cli/Makefile | 2 +- pppd/Makefile | 2 +- diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch new file mode 100644 index 0000000000..0533616722 --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch @@ -0,0 +1,42 @@ +From 4788ce6ec602f6441970e1095572c4ff0e90c7c5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 17 Jan 2023 22:33:52 -0800 +Subject: [PATCH] Use unsigned int type for 1-bit integer bitfield + +In C++, signed integers are represented in two's complement. This also applies to signed bitfields. +A signed bitfield composed of one bit can therefore store a value in the range -1 to 0. +Assigning a value of 1 to such a bitfield should produce a warning since it is out of range of representable values. +Therefore fix this case by using unsigned int instead of signed int + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + usl/usl_signal.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/usl/usl_signal.c b/usl/usl_signal.c +index 45ddd94..8c1d4d0 100644 +--- a/usl/usl_signal.c ++++ b/usl/usl_signal.c +@@ -39,12 +39,12 @@ struct usl_notifier { + }; + + typedef struct { +- volatile int sighup:1; +- volatile int sigterm:1; +- volatile int sigchld:1; +- volatile int sigusr1:1; +- volatile int sigusr2:1; +- volatile int running:1; ++ volatile unsigned int sighup:1; ++ volatile unsigned int sigterm:1; ++ volatile unsigned int sigchld:1; ++ volatile unsigned int sigusr1:1; ++ volatile unsigned int sigusr2:1; ++ volatile unsigned int running:1; + sig_atomic_t waiting; + sigjmp_buf sigjmp; + } usl_signal_data_t; +-- +2.39.1 + diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-ippool-Port-to-ppp-2.5-APIs.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-ippool-Port-to-ppp-2.5-APIs.patch new file mode 100644 index 0000000000..59d7b1e847 --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/0001-ippool-Port-to-ppp-2.5-APIs.patch @@ -0,0 +1,60 @@ +From e1b93db6a13d955c6bab6358a7fa27fecb59479f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 11 May 2023 17:24:46 -0700 +Subject: [PATCH] ippool: Port to ppp 2.5 APIs + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + pppd/ippool.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/pppd/ippool.c b/pppd/ippool.c +index 88cb901..d4b5c97 100644 +--- a/pppd/ippool.c ++++ b/pppd/ippool.c +@@ -6,7 +6,7 @@ + #include <stdlib.h> + #include <errno.h> + #include "pppd.h" +-#include "pathnames.h" ++#include "options.h" + #include "fsm.h" /* Needed for lcp.h to include cleanly */ + #include "lcp.h" + #include "ccp.h" +@@ -23,7 +23,7 @@ + + #include "ippool_rpc.h" + +-const char pppd_version[] = VERSION; ++const char pppd_version[] = PPPD_VERSION; + + static char *ippool_pool_name = NULL; + static char *ippool_pool_name2 = NULL; +@@ -205,13 +205,13 @@ void plugin_init(void) + { + #if defined(__linux__) + extern int new_style_driver; /* From sys-linux.c */ +- if (!ppp_available() && !new_style_driver) ++ if (!ppp_check_kernel_support() && !new_style_driver) + fatal("Kernel doesn't support ppp_generic - " + "needed for Ippool"); + #else + fatal("No IP pool support on this OS"); + #endif +- add_options(ippool_options); ++ ppp_add_options(ippool_options); + + memset(&ippool_addr, 0, sizeof(ippool_addr)); + +@@ -219,6 +219,6 @@ void plugin_init(void) + ip_down_hook = ippool_release_ip; + + /* brute force, just in case ip_down_hook doesn't get called */ +- add_notifier(&exitnotify, ippool_cleanup, 0); ++ ppp_add_notify(NF_EXIT, ippool_cleanup, 0); + } + +-- +2.40.1 + diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch new file mode 100644 index 0000000000..a98c179290 --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch @@ -0,0 +1,72 @@ +From da67444994bde603c7ff1483a6803bdab24e1f14 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 29 Aug 2022 09:36:55 -0700 +Subject: [PATCH 1/2] pppd/ippool.c: Fix type casting issues between in_addr + and ippool_api_ip_addr + +Also remove unused variabled + +Upstream-Status: Inappropriate [No upstream] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + pppd/ippool.c | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +--- a/pppd/ippool.c ++++ b/pppd/ippool.c +@@ -16,6 +16,7 @@ + #include <sys/ioctl.h> + #include <sys/socket.h> + #include <netinet/in.h> ++#include <arpa/inet.h> + #include <signal.h> + + #include <linux/types.h> +@@ -24,7 +25,6 @@ + + const char pppd_version[] = VERSION; + +-static int ippool_fd = -1; + static char *ippool_pool_name = NULL; + static char *ippool_pool_name2 = NULL; + static char *ippool_server = "localhost"; +@@ -64,9 +64,9 @@ static int ippool_addr_alloc(CLIENT *cl, + } + + *addr = clnt_res.addr.s_addr; +- ++ struct in_addr temp_addr = {*addr}; + if (ippool_debug) { +- dbglog("Allocated address %s from pool %s", inet_ntoa(clnt_res.addr.s_addr), pool_name); ++ dbglog("Allocated address %s from pool %s", inet_ntoa(temp_addr), pool_name); + } + out: + return result; +@@ -85,14 +85,16 @@ static void ippool_addr_free(CLIENT *cl, + } + if (clnt_res < 0) { + if (ippool_debug) { ++ struct in_addr temp_addr = {free_addr.s_addr}; + warn("IP address %s free to pool %s failed: %s", +- inet_ntoa(free_addr), pool_name, strerror(-clnt_res)); ++ inet_ntoa(temp_addr), pool_name, strerror(-clnt_res)); + } + goto out; + } + + if (ippool_debug) { +- dbglog("Freed address %s to pool %s", inet_ntoa(free_addr), pool_name); ++ struct in_addr temp_addr = {free_addr.s_addr}; ++ dbglog("Freed address %s to pool %s", inet_ntoa(temp_addr), pool_name); + } + out: + return; +@@ -138,8 +140,6 @@ static void ippool_choose_ip(u_int32_t * + { + ipcp_options *wo = &ipcp_wantoptions[0]; + ipcp_options *go = &ipcp_gotoptions[0]; +- ipcp_options *ao = &ipcp_allowoptions[0]; +- ipcp_options *ho = &ipcp_hisoptions[0]; + CLIENT *cl; + int result = 0; + diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch index 7d3f9acb65..1b8de349cf 100644 --- a/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch +++ b/meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch @@ -10,6 +10,8 @@ usl_fd.c:284:10: error: comparison of unsigned expression < 0 is always false [- Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + usl/usl_fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch index 6fb7cc5c46..2c612e42fe 100644 --- a/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch +++ b/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch @@ -5,6 +5,8 @@ Subject: [PATCH] usl_timer: Check for return value of write() API Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + usl/usl_timer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch b/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch index 6e2bd523da..f21c68f0d1 100644 --- a/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch +++ b/meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch @@ -10,6 +10,8 @@ cli_lib.c:427:20: error: expression which evaluates to zero treated as a null po Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + cli/cli_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-networking/recipes-daemons/ippool/ippool/0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch b/meta-networking/recipes-daemons/ippool/ippool/0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch new file mode 100644 index 0000000000..b8fdedf0c8 --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch @@ -0,0 +1,22 @@ +From f9ea91771f0d3c984e7d5fe9e15962db1ee686ad Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 29 Aug 2022 09:39:16 -0700 +Subject: [PATCH 2/2] ippool_rpc_server.c: Add missing prototype for + ippool_api_rpc_check_request + +Upstream-Status: Inappropriate [no upstream] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + ippool_rpc_server.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/Makefile ++++ b/Makefile +@@ -123,6 +123,7 @@ $(IPPOOL_RPC_STEM)_server.c: $(IPPOOL_RP + -$(RM) $@ $@.tmp + rpcgen $(RPCGENFLAGS) -m -o $@.tmp $< + cat $@.tmp | sed -e 's/switch (rqstp->rq_proc) {/if (ippool_api_rpc_check_request(transp) < 0) return; switch (rqstp->rq_proc) {/' > $@ ++ sed -i '20i int ippool_api_rpc_check_request(SVCXPRT *xprt);' $@ + + $(IPPOOL_RPC_STEM)_client.c: $(IPPOOL_RPC_STEM).x + -$(RM) $@ diff --git a/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch b/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch index d80f7b4362..75bb825302 100644 --- a/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch +++ b/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch @@ -7,6 +7,8 @@ musl needs it Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch b/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch index 3854b1133c..f6a8d62b98 100644 --- a/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch +++ b/meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch @@ -10,6 +10,8 @@ error: taking the absolute value of unsigned type 'unsigned long' has no effect Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + cli/cli_lib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch b/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch index 3cd5259fa6..8c42ebe30b 100644 --- a/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch +++ b/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch @@ -5,6 +5,8 @@ Subject: [PATCH 3/3] musl fixes Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + cli/cli_readline.c | 7 +- ippool_api.c | 9 ++- net/ppp_defs.h | 194 +++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -12,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 4 files changed, 208 insertions(+), 6 deletions(-) create mode 100644 net/ppp_defs.h -diff --git a/cli/cli_readline.c b/cli/cli_readline.c -index 2812e6e..542935c 100644 ---- a/cli/cli_readline.c -+++ b/cli/cli_readline.c +Index: ippool-1.3/cli/cli_readline.c +=================================================================== +--- ippool-1.3.orig/cli/cli_readline.c ++++ ippool-1.3/cli/cli_readline.c @@ -17,13 +17,14 @@ * Boston, MA 02110-1301 USA * @@ -33,7 +35,7 @@ index 2812e6e..542935c 100644 #include <signal.h> #include <readline/readline.h> -@@ -630,7 +631,7 @@ static void cli_rl_uninstall_signal_handlers(void) +@@ -630,7 +631,7 @@ static void cli_rl_uninstall_signal_hand static int cli_rl_install_signal_handlers(void) { @@ -42,11 +44,11 @@ index 2812e6e..542935c 100644 rl_catch_signals = 0; rl_clear_signals(); -diff --git a/ippool_api.c b/ippool_api.c -index 2c10c47..d1127a9 100644 ---- a/ippool_api.c -+++ b/ippool_api.c -@@ -181,10 +181,13 @@ int ippool_api_rpc_check_request(SVCXPRT *xprt) +Index: ippool-1.3/ippool_api.c +=================================================================== +--- ippool-1.3.orig/ippool_api.c ++++ ippool-1.3/ippool_api.c +@@ -181,10 +181,13 @@ int ippool_api_rpc_check_request(SVCXPRT * non-loopback interface, reject the request. */ if ((!ippool_opt_remote_rpc) && @@ -63,210 +65,10 @@ index 2c10c47..d1127a9 100644 } svcerr_auth(xprt, AUTH_TOOWEAK); return -EPERM; -diff --git a/net/ppp_defs.h b/net/ppp_defs.h -new file mode 100644 -index 0000000..b06eda5 ---- /dev/null -+++ b/net/ppp_defs.h -@@ -0,0 +1,194 @@ -+/* $Id: ppp_defs.h,v 1.17 2002/12/06 09:49:15 paulus Exp $ */ -+ -+/* -+ * ppp_defs.h - PPP definitions. -+ * -+ * Copyright (c) 1984 Paul Mackerras. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * -+ * 3. The name(s) of the authors of this software must not be used to -+ * endorse or promote products derived from this software without -+ * prior written permission. -+ * -+ * 4. Redistributions of any form whatsoever must retain the following -+ * acknowledgment: -+ * "This product includes software developed by Paul Mackerras -+ * <paulus@samba.org>". -+ * -+ * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO -+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -+ * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN -+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#ifndef _PPP_DEFS_H_ -+#define _PPP_DEFS_H_ -+ -+/* -+ * The basic PPP frame. -+ */ -+#define PPP_HDRLEN 4 /* octets for standard ppp header */ -+#define PPP_FCSLEN 2 /* octets for FCS */ -+ -+/* -+ * Packet sizes -+ * -+ * Note - lcp shouldn't be allowed to negotiate stuff outside these -+ * limits. See lcp.h in the pppd directory. -+ * (XXX - these constants should simply be shared by lcp.c instead -+ * of living in lcp.h) -+ */ -+#define PPP_MTU 1500 /* Default MTU (size of Info field) */ -+#define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) -+#define PPP_MINMTU 64 -+#define PPP_MRU 1500 /* default MRU = max length of info field */ -+#define PPP_MAXMRU 65000 /* Largest MRU we allow */ -+#define PPP_MINMRU 128 -+ -+#define PPP_ADDRESS(p) (((u_char *)(p))[0]) -+#define PPP_CONTROL(p) (((u_char *)(p))[1]) -+#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3]) -+ -+/* -+ * Significant octet values. -+ */ -+#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */ -+#define PPP_UI 0x03 /* Unnumbered Information */ -+#define PPP_FLAG 0x7e /* Flag Sequence */ -+#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */ -+#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */ -+ -+/* -+ * Protocol field values. -+ */ -+#define PPP_IP 0x21 /* Internet Protocol */ -+#define PPP_AT 0x29 /* AppleTalk Protocol */ -+#define PPP_IPX 0x2b /* IPX protocol */ -+#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */ -+#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */ -+#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */ -+#define PPP_COMP 0xfd /* compressed packet */ -+#define PPP_IPCP 0x8021 /* IP Control Protocol */ -+#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */ -+#define PPP_IPXCP 0x802b /* IPX Control Protocol */ -+#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */ -+#define PPP_CCP 0x80fd /* Compression Control Protocol */ -+#define PPP_ECP 0x8053 /* Encryption Control Protocol */ -+#define PPP_LCP 0xc021 /* Link Control Protocol */ -+#define PPP_PAP 0xc023 /* Password Authentication Protocol */ -+#define PPP_LQR 0xc025 /* Link Quality Report protocol */ -+#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */ -+#define PPP_CBCP 0xc029 /* Callback Control Protocol */ -+#define PPP_EAP 0xc227 /* Extensible Authentication Protocol */ -+ -+/* -+ * Values for FCS calculations. -+ */ -+#define PPP_INITFCS 0xffff /* Initial FCS value */ -+#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */ -+#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff]) -+ -+/* -+ * A 32-bit unsigned integral type. -+ */ -+ -+#if !defined(__BIT_TYPES_DEFINED__) && !defined(_BITYPES) \ -+ && !defined(__FreeBSD__) && (NS_TARGET < 40) -+#ifdef UINT32_T -+typedef UINT32_T u_int32_t; -+#else -+typedef unsigned int u_int32_t; -+typedef unsigned short u_int16_t; -+#endif -+#endif -+ -+/* -+ * Extended asyncmap - allows any character to be escaped. -+ */ -+typedef u_int32_t ext_accm[8]; -+ -+/* -+ * What to do with network protocol (NP) packets. -+ */ -+enum NPmode { -+ NPMODE_PASS, /* pass the packet through */ -+ NPMODE_DROP, /* silently drop the packet */ -+ NPMODE_ERROR, /* return an error */ -+ NPMODE_QUEUE /* save it up for later. */ -+}; -+ -+/* -+ * Statistics. -+ */ -+struct pppstat { -+ unsigned int ppp_ibytes; /* bytes received */ -+ unsigned int ppp_ipackets; /* packets received */ -+ unsigned int ppp_ierrors; /* receive errors */ -+ unsigned int ppp_obytes; /* bytes sent */ -+ unsigned int ppp_opackets; /* packets sent */ -+ unsigned int ppp_oerrors; /* transmit errors */ -+}; -+ -+struct vjstat { -+ unsigned int vjs_packets; /* outbound packets */ -+ unsigned int vjs_compressed; /* outbound compressed packets */ -+ unsigned int vjs_searches; /* searches for connection state */ -+ unsigned int vjs_misses; /* times couldn't find conn. state */ -+ unsigned int vjs_uncompressedin; /* inbound uncompressed packets */ -+ unsigned int vjs_compressedin; /* inbound compressed packets */ -+ unsigned int vjs_errorin; /* inbound unknown type packets */ -+ unsigned int vjs_tossed; /* inbound packets tossed because of error */ -+}; -+ -+struct ppp_stats { -+ struct pppstat p; /* basic PPP statistics */ -+ struct vjstat vj; /* VJ header compression statistics */ -+}; -+ -+struct compstat { -+ unsigned int unc_bytes; /* total uncompressed bytes */ -+ unsigned int unc_packets; /* total uncompressed packets */ -+ unsigned int comp_bytes; /* compressed bytes */ -+ unsigned int comp_packets; /* compressed packets */ -+ unsigned int inc_bytes; /* incompressible bytes */ -+ unsigned int inc_packets; /* incompressible packets */ -+ unsigned int ratio; /* recent compression ratio << 8 */ -+}; -+ -+struct ppp_comp_stats { -+ struct compstat c; /* packet compression statistics */ -+ struct compstat d; /* packet decompression statistics */ -+}; -+ -+/* -+ * The following structure records the time in seconds since -+ * the last NP packet was sent or received. -+ */ -+struct ppp_idle { -+ time_t xmit_idle; /* time since last NP packet sent */ -+ time_t recv_idle; /* time since last NP packet received */ -+}; -+ -+#ifndef __P -+#ifdef __STDC__ -+#define __P(x) x -+#else -+#define __P(x) () -+#endif -+#endif -+ -+#endif /* _PPP_DEFS_H_ */ -diff --git a/usl/usl.h b/usl/usl.h -index cdc16db..88d2714 100644 ---- a/usl/usl.h -+++ b/usl/usl.h +Index: ippool-1.3/usl/usl.h +=================================================================== +--- ippool-1.3.orig/usl/usl.h ++++ ippool-1.3/usl/usl.h @@ -38,6 +38,10 @@ #include "usl_fsm.h" #include "usl_list.h" @@ -278,6 +80,3 @@ index cdc16db..88d2714 100644 #define USL_VERSION "0.6" #ifdef DEBUG --- -2.13.3 - diff --git a/meta-networking/recipes-daemons/ippool/ippool/ippool.service b/meta-networking/recipes-daemons/ippool/ippool/ippool.service index e5917fc141..f168e4ccb6 100644 --- a/meta-networking/recipes-daemons/ippool/ippool/ippool.service +++ b/meta-networking/recipes-daemons/ippool/ippool/ippool.service @@ -5,11 +5,10 @@ After=rpcbind.service [Service] Type=simple -# Start ippoold in the foreground! -ExecStart=@SBINDIR@/ippoold -f +# Start ippoold in the foreground! and enable RPC +ExecStart=@SBINDIR@/ippoold -R -f # Normal output will go to syslog, so suppress stdout. StandardOutput=null -StandardError=syslog # ExecStop is not needed. systemd will send SIGTERM # and ippoold will exit status 1. SuccessExitStatus=1 diff --git a/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch b/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch new file mode 100644 index 0000000000..01e1da8703 --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/strncpy-truncation.patch @@ -0,0 +1,39 @@ +Replace strncpy with memcpy + +since the length of data to +be copied has already been determined with strlen(). Replace strncpy() +with memcpy() to address the warning and optimize the code a little. + +| ippool_config.c:112:2: note: 'snprintf' output between 8 and 55 bytes into a destination of size 48 +| 112 | snprintf(prompt, sizeof(prompt), "ippool-%s", server_name); +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/cli/cli_readline.c ++++ b/cli/cli_readline.c +@@ -257,10 +257,15 @@ static void cli_rl_display_wrapped_text( + int pos; + int in_ws; + int i; ++ int bufsize = sizeof(text_buf)/sizeof(text_buf[0]); + + if (left_margin == 0) { + left_margin = 3; + } ++ if (left_margin > bufsize) { ++ left_margin = bufsize; ++ } ++ + if (right_margin == 0) { + right_margin = 78;; + } +@@ -271,7 +276,7 @@ static void cli_rl_display_wrapped_text( + /* First copy the text heading to the buffer and add a "-", accounting for + * the specified left margin. + */ +- strncpy(&text_buf[0], text1, left_margin - 3); ++ memcpy(&text_buf[0], text1, left_margin - 3); + for (pos = strlen(text1); pos < left_margin - 3; pos++) { + text_buf[pos] = ' '; + } diff --git a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb index 6e47483570..7947ffe457 100644 --- a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb +++ b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb @@ -9,7 +9,7 @@ addresses from ippoold. \ " HOMEPAGE = "http://www.openl2tp.org/" SECTION = "console/network" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ file://runtest.sh \ @@ -24,10 +24,13 @@ SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-$ file://0001-read-returns-ssize_t.patch \ file://0002-Mark-first-element-of-a-string-as-null.patch \ file://0003-cli-Mark-return-of-strtol-as-long-int.patch \ - " -SRC_URI_append_libc-musl = "\ file://0002-link-with-libtirpc.patch \ file://0003-musl-fixes.patch \ + file://strncpy-truncation.patch \ + file://0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch \ + file://0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch \ + file://0001-Use-unsigned-int-type-for-1-bit-integer-bitfield.patch \ + file://0001-ippool-Port-to-ppp-2.5-APIs.patch \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f" @@ -36,23 +39,19 @@ SRC_URI[sha256sum] = "d3eab7d6cad5da8ccc9d1e31d5303e27a39622c07bdb8fa3618eea3144 inherit systemd -DEPENDS = "readline ppp ncurses gzip-native" -DEPENDS_append_libc-musl = " libtirpc" -RDEPENDS_${PN} = "rpcbind" +DEPENDS = "readline ppp ncurses gzip-native rpcsvc-proto-native libtirpc" +RDEPENDS:${PN} = "rpcbind" EXTRA_OEMAKE = "CC='${CC}' AS='${AS}' LD='${LD}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'" EXTRA_OEMAKE += "PPPD_VERSION=${PPPD_VERSION} SYS_LIBDIR=${libdir}" # enable self tests EXTRA_OEMAKE += "IPPOOL_TEST=y" -CPPFLAGS += "${SELECTED_OPTIMIZATION}" -CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" - -SYSTEMD_SERVICE_${PN} = "ippool.service" -SYSTEMD_AUTO_ENABLE = "disable" +CPPFLAGS += "${SELECTED_OPTIMIZATION} -I${STAGING_INCDIR}/tirpc" +SYSTEMD_SERVICE:${PN} = "ippool.service" -do_compile_prepend() { +do_compile:prepend() { # fix the CFLAGS= and CPPFLAGS= in main Makefile, to have the extra CFLAGS in env sed -i -e "s/^CFLAGS=/CFLAGS+=/" ${S}/Makefile sed -i -e "s/^CPPFLAGS=/CPPFLAGS+=/" ${S}/Makefile @@ -66,14 +65,14 @@ do_install() { oe_runmake DESTDIR=${D} install install -D -m 0755 ${S}/debian/init.d ${D}${sysconfdir}/init.d/ippoold - install -D -m 0644 ${WORKDIR}/ippool.service ${D}${systemd_system_unitdir}/ippool.service + install -D -m 0644 ${UNPACKDIR}/ippool.service ${D}${systemd_system_unitdir}/ippool.service sed -i -e 's:@SBINDIR@:${sbindir}:g' ${D}${systemd_system_unitdir}/ippool.service # install self test install -d ${D}/opt/${BPN} install ${S}/test/all.tcl ${S}/test/ippool.test \ ${S}/test/test_procs.tcl ${D}/opt/${BPN} - install ${WORKDIR}/runtest.sh ${D}/opt/${BPN} + install ${UNPACKDIR}/runtest.sh ${D}/opt/${BPN} # fix the ../ippoolconfig in test_procs.tcl sed -i -e "s:../ippoolconfig:ippoolconfig:" \ ${D}/opt/${BPN}/test_procs.tcl @@ -82,12 +81,12 @@ do_install() { PACKAGES =+ "${PN}-test" -FILES_${PN} += "${libdir}/pppd/${PPPD_VERSION}/ippool.so" -FILES_${PN}-dbg += "${libdir}/pppd/${PPPD_VERSION}/.debug/ippool.so" -FILES_${PN}-test = "/opt/${BPN}" +FILES:${PN} += "${libdir}/pppd/${PPPD_VERSION}/ippool.so" +FILES:${PN}-dbg += "${libdir}/pppd/${PPPD_VERSION}/.debug/ippool.so" +FILES:${PN}-test = "/opt/${BPN}" # needs tcl to run tests -RDEPENDS_${PN}-test += "tcl ${BPN}" +RDEPENDS:${PN}-test += "tcl ${BPN}" PPPD_VERSION="${@get_ppp_version(d)}" @@ -99,7 +98,7 @@ def get_ppp_version(d): return None bb.debug(1, "pppd plugin dir %s" % pppd_plugin) - r = re.compile("\d*\.\d*\.\d*") + r = re.compile(r"\d*\.\d*\.\d*") for f in os.listdir(pppd_plugin): if os.path.isdir(os.path.join(pppd_plugin, f)): ma = r.match(f) diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Check-for-root-peer-user-for-iscsiuio-IPC.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Check-for-root-peer-user-for-iscsiuio-IPC.patch deleted file mode 100644 index 2fd5c08a1c..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Check-for-root-peer-user-for-iscsiuio-IPC.patch +++ /dev/null @@ -1,135 +0,0 @@ -From eb516ac5f9dddc80564f6becee08a0011e7aa58b Mon Sep 17 00:00:00 2001 -From: Lee Duncan <lduncan@suse.com> -Date: Fri, 15 Dec 2017 10:36:11 -0800 -Subject: [PATCH 1/7] Check for root peer user for iscsiuio IPC - -This fixes a possible vulnerability where a non-root -process could connect with iscsiuio. Fouund by Qualsys. - -CVE: CVE-2017-17840 - -Upstream-Status: Backport - -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> ---- - iscsiuio/src/unix/Makefile.am | 3 ++- - iscsiuio/src/unix/iscsid_ipc.c | 47 ++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 49 insertions(+), 1 deletion(-) - -diff --git a/iscsiuio/src/unix/Makefile.am b/iscsiuio/src/unix/Makefile.am -index 71d5463..a989ef0 100644 ---- a/iscsiuio/src/unix/Makefile.am -+++ b/iscsiuio/src/unix/Makefile.am -@@ -20,7 +20,8 @@ iscsiuio_SOURCES = build_date.c \ - nic_utils.c \ - packet.c \ - iscsid_ipc.c \ -- ping.c -+ ping.c \ -+ ${top_srcdir}/../utils/sysdeps/sysdeps.c - - iscsiuio_CFLAGS = $(AM_CFLAGS) \ - $(LIBNL_CFLAGS) \ -diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c -index a2a59a8..08e49e5 100644 ---- a/iscsiuio/src/unix/iscsid_ipc.c -+++ b/iscsiuio/src/unix/iscsid_ipc.c -@@ -37,6 +37,8 @@ - * - */ - -+#define _GNU_SOURCE -+ - #include <errno.h> - #include <pthread.h> - #include <signal.h> -@@ -47,6 +49,8 @@ - #include <sys/socket.h> - #include <sys/time.h> - #include <sys/un.h> -+#include <sys/types.h> -+#include <pwd.h> - - #define PFX "iscsi_ipc " - -@@ -61,6 +65,7 @@ - #include "iscsid_ipc.h" - #include "uip.h" - #include "uip_mgmt_ipc.h" -+#include "sysdeps.h" - - #include "logger.h" - #include "uip.h" -@@ -102,6 +107,7 @@ struct iface_rec_decode { - uint16_t mtu; - }; - -+#define PEERUSER_MAX 64 - - /****************************************************************************** - * iscsid_ipc Constants -@@ -1029,6 +1035,40 @@ static void iscsid_loop_close(void *arg) - LOG_INFO(PFX "iSCSI daemon socket closed"); - } - -+/* -+ * check that the peer user is privilidged -+ * -+ * return 1 if peer is ok else 0 -+ * -+ * XXX: this function is copied from iscsid_ipc.c and should be -+ * moved into a common library -+ */ -+static int -+mgmt_peeruser(int sock, char *user) -+{ -+ struct ucred peercred; -+ socklen_t so_len = sizeof(peercred); -+ struct passwd *pass; -+ -+ errno = 0; -+ if (getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &peercred, -+ &so_len) != 0 || so_len != sizeof(peercred)) { -+ /* We didn't get a valid credentials struct. */ -+ LOG_ERR(PFX "peeruser_unux: error receiving credentials: %m"); -+ return 0; -+ } -+ -+ pass = getpwuid(peercred.uid); -+ if (pass == NULL) { -+ LOG_ERR(PFX "peeruser_unix: unknown local user with uid %d", -+ (int) peercred.uid); -+ return 0; -+ } -+ -+ strlcpy(user, pass->pw_name, PEERUSER_MAX); -+ return 1; -+} -+ - /** - * iscsid_loop() - This is the function which will process the broadcast - * messages from iscsid -@@ -1038,6 +1078,7 @@ static void *iscsid_loop(void *arg) - { - int rc; - sigset_t set; -+ char user[PEERUSER_MAX]; - - pthread_cleanup_push(iscsid_loop_close, arg); - -@@ -1077,6 +1118,12 @@ static void *iscsid_loop(void *arg) - continue; - } - -+ if (!mgmt_peeruser(iscsid_opts.fd, user) || strncmp(user, "root", PEERUSER_MAX)) { -+ close(s2); -+ LOG_ERR(PFX "Access error: non-administrative connection rejected"); -+ break; -+ } -+ - process_iscsid_broadcast(s2); - close(s2); - } --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Makefile-Do-not-set-Werror.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Makefile-Do-not-set-Werror.patch new file mode 100644 index 0000000000..d720a1adb0 --- /dev/null +++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Makefile-Do-not-set-Werror.patch @@ -0,0 +1,31 @@ +From 6afdfbdf1ecf3e7e9158734a3994a57ea151d680 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 12 Aug 2020 12:00:29 -0700 +Subject: [PATCH] Makefile: Do not set -Werror + +clang finds more warnings which causes build to fail, disable treating +warning as errors + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + usr/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/Makefile b/usr/Makefile +index 84f33bc..9e7b839 100644 +--- a/usr/Makefile ++++ b/usr/Makefile +@@ -44,7 +44,7 @@ HOMEDIR ?= $(etcdir)/iscsi + PKG_CONFIG ?= /usr/bin/pkg-config + + CFLAGS ?= -O2 -g +-WARNFLAGS ?= -Wall -Wextra -Werror -Wstrict-prototypes -fno-common ++WARNFLAGS ?= -Wall -Wextra -Wstrict-prototypes -fno-common + CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \ + -I$(TOPDIR)/libopeniscsiusr \ + -DISCSI_VERSION_STR=\"$(ISCSI_VERSION_STR)\" +-- +2.34.1 + diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-iscsiuio-should-ignore-bogus-iscsid-broadcast-packet.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-iscsiuio-should-ignore-bogus-iscsid-broadcast-packet.patch deleted file mode 100644 index 1f5202ec02..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-iscsiuio-should-ignore-bogus-iscsid-broadcast-packet.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 035bb16845537351e1bccb16d38981754fd53129 Mon Sep 17 00:00:00 2001 -From: Lee Duncan <lduncan@suse.com> -Date: Fri, 15 Dec 2017 10:37:56 -0800 -Subject: [PATCH 2/7] iscsiuio should ignore bogus iscsid broadcast packets - -When iscsiuio is receiving broadcast packets from iscsid, -if the 'payload_len', carried in the packet, is too -large then ignore the packet and print a message. -Found by Qualsys. - -CVE: CVE-2017-17840 - -Upstream-Status: Backport - -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> ---- - iscsiuio/src/unix/iscsid_ipc.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c -index 08e49e5..dfdae63 100644 ---- a/iscsiuio/src/unix/iscsid_ipc.c -+++ b/iscsiuio/src/unix/iscsid_ipc.c -@@ -950,6 +950,12 @@ int process_iscsid_broadcast(int s2) - - cmd = data->header.command; - payload_len = data->header.payload_len; -+ if (payload_len > sizeof(data->u)) { -+ LOG_ERR(PFX "Data payload length too large (%d). Corrupt payload?", -+ payload_len); -+ rc = -EINVAL; -+ goto error; -+ } - - LOG_DEBUG(PFX "recv iscsid request: cmd: %d, payload_len: %d", - cmd, payload_len); --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-Ensure-all-fields-in-iscsiuio-IPC-response-are-set.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-Ensure-all-fields-in-iscsiuio-IPC-response-are-set.patch deleted file mode 100644 index 825083b741..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-Ensure-all-fields-in-iscsiuio-IPC-response-are-set.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 81d3106cf8f09c79fe20ad7d234d7e1dda27bddb Mon Sep 17 00:00:00 2001 -From: Lee Duncan <lduncan@suse.com> -Date: Fri, 15 Dec 2017 11:11:17 -0800 -Subject: [PATCH 3/7] Ensure all fields in iscsiuio IPC response are set - -Make sure all fields in the response strcuture are set, -or info from the stack can be leaked to our caller. -Found by Qualsys. - -CVE: CVE-2017-17840 - -Upstream-Status: Backport - -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> ---- - iscsiuio/src/unix/iscsid_ipc.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c -index dfdae63..61e96cc 100644 ---- a/iscsiuio/src/unix/iscsid_ipc.c -+++ b/iscsiuio/src/unix/iscsid_ipc.c -@@ -960,6 +960,8 @@ int process_iscsid_broadcast(int s2) - LOG_DEBUG(PFX "recv iscsid request: cmd: %d, payload_len: %d", - cmd, payload_len); - -+ memset(&rsp, 0, sizeof(rsp)); -+ - switch (cmd) { - case ISCSID_UIP_IPC_GET_IFACE: - size = fread(&data->u.iface_rec, payload_len, 1, fd); --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-Do-not-double-close-IPC-file-stream-to-iscsid.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-Do-not-double-close-IPC-file-stream-to-iscsid.patch deleted file mode 100644 index 274722c231..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-Do-not-double-close-IPC-file-stream-to-iscsid.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 8167e5ce99682f64918a20966ce393cd33ac67ef Mon Sep 17 00:00:00 2001 -From: Lee Duncan <lduncan@suse.com> -Date: Fri, 15 Dec 2017 11:13:29 -0800 -Subject: [PATCH 4/7] Do not double-close IPC file stream to iscsid - -A double-close of a file descriptor and its associated FILE stream -can be an issue in multi-threaded cases. Found by Qualsys. - -CVE: CVE-2017-17840 - -Upstream-Status: Backport - -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> ---- - iscsiuio/src/unix/iscsid_ipc.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c -index 61e96cc..bde8d66 100644 ---- a/iscsiuio/src/unix/iscsid_ipc.c -+++ b/iscsiuio/src/unix/iscsid_ipc.c -@@ -913,6 +913,9 @@ early_exit: - /** - * process_iscsid_broadcast() - This function is used to process the - * broadcast messages from iscsid -+ * -+ * s2 is an open file descriptor, which -+ * must not be left open upon return - */ - int process_iscsid_broadcast(int s2) - { -@@ -928,6 +931,7 @@ int process_iscsid_broadcast(int s2) - if (fd == NULL) { - LOG_ERR(PFX "Couldn't open file descriptor: %d(%s)", - errno, strerror(errno)); -+ close(s2); - return -EIO; - } - -@@ -1030,7 +1034,8 @@ int process_iscsid_broadcast(int s2) - } - - error: -- free(data); -+ if (data) -+ free(data); - fclose(fd); - - return rc; -@@ -1132,8 +1137,8 @@ static void *iscsid_loop(void *arg) - break; - } - -+ /* this closes the file descriptor s2 */ - process_iscsid_broadcast(s2); -- close(s2); - } - - pthread_cleanup_pop(0); --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0005-Ensure-strings-from-peer-are-copied-correctly.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0005-Ensure-strings-from-peer-are-copied-correctly.patch deleted file mode 100644 index b73b01120e..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0005-Ensure-strings-from-peer-are-copied-correctly.patch +++ /dev/null @@ -1,78 +0,0 @@ -From c9fc86a50459776d9a7abb609f6503c57d69e034 Mon Sep 17 00:00:00 2001 -From: Lee Duncan <lduncan@suse.com> -Date: Fri, 15 Dec 2017 11:15:26 -0800 -Subject: [PATCH 5/7] Ensure strings from peer are copied correctly. - -The method of using strlen() and strcpy()/strncpy() has -a couple of holes. Do not try to measure the length of -strings supplied from peer, and ensure copied strings are -NULL-terminated. Use the new strlcpy() instead. -Found by Qualsys. - -CVE: CVE-2017-17840 - -Upstream-Status: Backport - -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> ---- - iscsiuio/src/unix/iscsid_ipc.c | 24 ++++++------------------ - 1 file changed, 6 insertions(+), 18 deletions(-) - -diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c -index bde8d66..52ae8c6 100644 ---- a/iscsiuio/src/unix/iscsid_ipc.c -+++ b/iscsiuio/src/unix/iscsid_ipc.c -@@ -152,10 +152,7 @@ static int decode_cidr(char *in_ipaddr_str, struct iface_rec_decode *ird) - struct in_addr ia; - struct in6_addr ia6; - -- if (strlen(in_ipaddr_str) > NI_MAXHOST) -- strncpy(ipaddr_str, in_ipaddr_str, NI_MAXHOST); -- else -- strcpy(ipaddr_str, in_ipaddr_str); -+ strlcpy(ipaddr_str, in_ipaddr_str, NI_MAXHOST); - - /* Find the CIDR if any */ - tmp = strchr(ipaddr_str, '/'); -@@ -287,22 +284,16 @@ static int decode_iface(struct iface_rec_decode *ird, struct iface_rec *rec) - - /* For LL on, ignore the IPv6 addr in the iface */ - if (ird->linklocal_autocfg == IPV6_LL_AUTOCFG_OFF) { -- if (strlen(rec->ipv6_linklocal) > NI_MAXHOST) -- strncpy(ipaddr_str, rec->ipv6_linklocal, -- NI_MAXHOST); -- else -- strcpy(ipaddr_str, rec->ipv6_linklocal); -+ strlcpy(ipaddr_str, rec->ipv6_linklocal, -+ NI_MAXHOST); - inet_pton(AF_INET6, ipaddr_str, - &ird->ipv6_linklocal); - } - - /* For RTR on, ignore the IPv6 addr in the iface */ - if (ird->router_autocfg == IPV6_RTR_AUTOCFG_OFF) { -- if (strlen(rec->ipv6_router) > NI_MAXHOST) -- strncpy(ipaddr_str, rec->ipv6_router, -- NI_MAXHOST); -- else -- strcpy(ipaddr_str, rec->ipv6_router); -+ strlcpy(ipaddr_str, rec->ipv6_router, -+ NI_MAXHOST); - inet_pton(AF_INET6, ipaddr_str, - &ird->ipv6_router); - } -@@ -316,10 +307,7 @@ static int decode_iface(struct iface_rec_decode *ird, struct iface_rec *rec) - calculate_default_netmask( - ird->ipv4_addr.s_addr); - -- if (strlen(rec->gateway) > NI_MAXHOST) -- strncpy(ipaddr_str, rec->gateway, NI_MAXHOST); -- else -- strcpy(ipaddr_str, rec->gateway); -+ strlcpy(ipaddr_str, rec->gateway, NI_MAXHOST); - inet_pton(AF_INET, ipaddr_str, &ird->ipv4_gateway); - } - } else { --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0006-Skip-useless-strcopy-and-validate-CIDR-length.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0006-Skip-useless-strcopy-and-validate-CIDR-length.patch deleted file mode 100644 index 0fa24cd10d..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0006-Skip-useless-strcopy-and-validate-CIDR-length.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a6efed7601c890ac051ad1425582ec67dbd3f5ff Mon Sep 17 00:00:00 2001 -From: Lee Duncan <lduncan@suse.com> -Date: Fri, 15 Dec 2017 11:18:35 -0800 -Subject: [PATCH 6/7] Skip useless strcopy, and validate CIDR length - -Remove a useless strcpy() that copies a string onto itself, -and ensure the CIDR length "keepbits" is not negative. -Found by Qualsys. - -CVE: CVE-2017-17840 - -Upstream-Status: Backport - -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> ---- - iscsiuio/src/unix/iscsid_ipc.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c -index 52ae8c6..85742da 100644 ---- a/iscsiuio/src/unix/iscsid_ipc.c -+++ b/iscsiuio/src/unix/iscsid_ipc.c -@@ -148,7 +148,7 @@ static int decode_cidr(char *in_ipaddr_str, struct iface_rec_decode *ird) - char *tmp, *tok; - char ipaddr_str[NI_MAXHOST]; - char str[INET6_ADDRSTRLEN]; -- int keepbits = 0; -+ unsigned long keepbits = 0; - struct in_addr ia; - struct in6_addr ia6; - -@@ -161,8 +161,7 @@ static int decode_cidr(char *in_ipaddr_str, struct iface_rec_decode *ird) - tmp = ipaddr_str; - tok = strsep(&tmp, "/"); - LOG_INFO(PFX "in cidr: bitmask '%s' ip '%s'", tmp, tok); -- keepbits = atoi(tmp); -- strcpy(ipaddr_str, tok); -+ keepbits = strtoull(tmp, NULL, 10); - } - - /* Determine if the IP address passed from the iface file is --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0007-Check-iscsiuio-ping-data-length-for-validity.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0007-Check-iscsiuio-ping-data-length-for-validity.patch deleted file mode 100644 index c63c0a8d56..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0007-Check-iscsiuio-ping-data-length-for-validity.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 5df60ad8b22194391af34c1a7e54776b0372ffed Mon Sep 17 00:00:00 2001 -From: Lee Duncan <lduncan@suse.com> -Date: Fri, 15 Dec 2017 11:21:15 -0800 -Subject: [PATCH 7/7] Check iscsiuio ping data length for validity - -We do not trust that the received ping packet data length -is correct, so sanity check it. Found by Qualsys. - -CVE: CVE-2017-17840 - -Upstream-Status: Backport - -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> ---- - iscsiuio/src/unix/iscsid_ipc.c | 5 +++++ - iscsiuio/src/unix/packet.c | 2 +- - iscsiuio/src/unix/packet.h | 2 ++ - 3 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/iscsiuio/src/unix/iscsid_ipc.c b/iscsiuio/src/unix/iscsid_ipc.c -index 85742da..a2caacc 100644 ---- a/iscsiuio/src/unix/iscsid_ipc.c -+++ b/iscsiuio/src/unix/iscsid_ipc.c -@@ -333,6 +333,11 @@ static void *perform_ping(void *arg) - - data = (iscsid_uip_broadcast_t *)png_c->data; - datalen = data->u.ping_rec.datalen; -+ if ((datalen > STD_MTU_SIZE) || (datalen < 0)) { -+ LOG_ERR(PFX "Ping datalen invalid: %d", datalen); -+ rc = -EINVAL; -+ goto ping_done; -+ } - - memset(dst_addr, 0, sizeof(uip_ip6addr_t)); - if (nic_iface->protocol == AF_INET) { -diff --git a/iscsiuio/src/unix/packet.c b/iscsiuio/src/unix/packet.c -index ecea09b..3ce2c6b 100644 ---- a/iscsiuio/src/unix/packet.c -+++ b/iscsiuio/src/unix/packet.c -@@ -112,7 +112,7 @@ int alloc_free_queue(nic_t *nic, size_t num_of_packets) - for (i = 0; i < num_of_packets; i++) { - packet_t *pkt; - -- pkt = alloc_packet(1500, 1500); -+ pkt = alloc_packet(STD_MTU_SIZE, STD_MTU_SIZE); - if (pkt == NULL) { - goto done; - } -diff --git a/iscsiuio/src/unix/packet.h b/iscsiuio/src/unix/packet.h -index b63d688..19d1db9 100644 ---- a/iscsiuio/src/unix/packet.h -+++ b/iscsiuio/src/unix/packet.h -@@ -43,6 +43,8 @@ - - #include "nic.h" - -+#define STD_MTU_SIZE 1500 -+ - struct nic; - struct nic_interface; - --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-Do-not-clean-kernel-source.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-Do-not-clean-kernel-source.patch deleted file mode 100644 index 2c466119cd..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-Do-not-clean-kernel-source.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 4ebab8add4a549c16ab8b124137546c0a7b46a9b Mon Sep 17 00:00:00 2001 -From: Joe MacDonald <joe_macdonald@mentor.com> -Date: Tue, 15 Nov 2016 11:11:30 -0500 -Subject: [PATCH] Do not clean kernel source - -The default behaviour should not be to attempt to clean the kernel source -tree when building userspace. When not cross-compiling, however, this action is -harmless, but when attempting to build within the sysroot and since this package -is purely userspace, the clean step will fail. - -Removing the clean step eliminates an unnecessary dependency on the kernel build -infrastructure. - -Upstream-status: Inappropriate (embedded specific) - -Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> ---- - Makefile | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index c8cd00e..9576bba 100644 ---- a/Makefile -+++ b/Makefile -@@ -37,7 +37,7 @@ endif - - all: user - --user: iscsiuio/Makefile -+user: - $(MAKE) -C utils/sysdeps - $(MAKE) -C utils/fwparam_ibft - $(MAKE) -C usr -@@ -75,7 +75,6 @@ clean: - $(MAKE) -C utils/fwparam_ibft clean - $(MAKE) -C utils clean - $(MAKE) -C usr clean -- $(MAKE) -C kernel clean - [ ! -f iscsiuio/Makefile ] || $(MAKE) -C iscsiuio clean - [ ! -f iscsiuio/Makefile ] || $(MAKE) -C iscsiuio distclean - --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-fw_context-add-include-for-NI_MAXHOST-definiton.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-fw_context-add-include-for-NI_MAXHOST-definiton.patch deleted file mode 100644 index 37d695f49d..0000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-fw_context-add-include-for-NI_MAXHOST-definiton.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 79bea58a554205dd185509fbc4e76b5fc40f9038 Mon Sep 17 00:00:00 2001 -From: Joe MacDonald <joe_macdonald@mentor.com> -Date: Tue, 15 Nov 2016 12:36:45 -0500 -Subject: [PATCH] fw_context: add include for NI_MAXHOST definiton - -This appears to build successfully with gcc 4.x but fails on gcc 5+, though it's -not immediately clear why NI_MAXHOST isn't being defined from the include -chain. Currently engaging with the upstream devs to determine the best course -of action, but this is an adequate workaround. - -Upstream-status: Pending - -Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> ---- - include/fw_context.h | 4 + - 1 file changed, 1 insertion(+) - -diff --git a/include/fw_context.h b/include/fw_context.h -index 44053d8..0b05cea 100644 ---- a/include/fw_context.h -+++ b/include/fw_context.h -@@ -21,6 +21,10 @@ - #ifndef FWPARAM_CONTEXT_H_ - #define FWPARAM_CONTEXT_H_ - -+#include <sys/socket.h> -+#ifndef NI_MAXHOST -+#define NI_MAXHOST 1025 -+#endif - #include <netdb.h> - #include <net/if.h> - --- -2.1.4 - diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.8.bb index 6c4a867b52..0f9f34f1f2 100644 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb +++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.8.bb @@ -5,58 +5,45 @@ provides the server daemon for the iSCSI protocol, as well as the utility \ programs used to manage it. iSCSI is a protocol for distributed \ disk access using SCSI commands sent over Internet Protocol networks." HOMEPAGE = "http://www.open-iscsi.com/" -LICENSE = "GPLv2 & LGPLv2.1" +LICENSE = "GPL-2.0-only & LGPL-2.1-only" SECTION = "net" -DEPENDS = "openssl flex-native bison-native open-isns util-linux" - -LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" - -SRCREV ?= "8db9717e73d32d2c5131da4f9ad86dfd9065f74b" - -SRC_URI = "git://github.com/open-iscsi/open-iscsi \ - file://iscsi-initiator-utils-Do-not-clean-kernel-source.patch \ - file://iscsi-initiator-utils-fw_context-add-include-for-NI_MAXHOST-definiton.patch \ - file://initd.debian \ - file://99_iscsi-initiator-utils \ - file://iscsi-initiator \ - file://iscsi-initiator.service \ - file://iscsi-initiator-targets.service \ - file://set_initiatorname \ - file://0001-Check-for-root-peer-user-for-iscsiuio-IPC.patch \ - file://0002-iscsiuio-should-ignore-bogus-iscsid-broadcast-packet.patch \ - file://0003-Ensure-all-fields-in-iscsiuio-IPC-response-are-set.patch \ - file://0004-Do-not-double-close-IPC-file-stream-to-iscsid.patch \ - file://0005-Ensure-strings-from-peer-are-copied-correctly.patch \ - file://0006-Skip-useless-strcopy-and-validate-CIDR-length.patch \ - file://0007-Check-iscsiuio-ping-data-length-for-validity.patch \ -" - +DEPENDS = "openssl flex-native bison-native open-isns util-linux kmod" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRCREV = "543ba0f15d340b97f30782308cec424a6738fec3" + +SRC_URI = "git://github.com/open-iscsi/open-iscsi;branch=master;protocol=https \ + file://0001-Makefile-Do-not-set-Werror.patch \ + file://initd.debian \ + file://99_iscsi-initiator-utils \ + file://iscsi-initiator \ + file://iscsi-initiator.service \ + file://iscsi-initiator-targets.service \ + file://set_initiatorname \ + " S = "${WORKDIR}/git" -B = "${WORKDIR}/build" -inherit update-rc.d systemd autotools +inherit update-rc.d systemd autotools pkgconfig EXTRA_OECONF = " \ --target=${TARGET_SYS} \ --host=${BUILD_SYS} \ - --prefix=${prefix} \ - --libdir=${libdir} \ " +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '--without-systemd NO_SYSTEMD=1', d)}" + EXTRA_OEMAKE = ' \ - CC="${CC}" \ - AR="${AR}" \ - RANLIB="${RANLIB}" \ - CFLAGS="${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE -I. -I../include -I../../include -I../usr -I../../usr" \ - LDFLAGS="${LDFLAGS}" \ - LD="${LD}" \ OS="${TARGET_SYS}" \ TARGET="${TARGET_OS}" \ BASE="${prefix}" \ MANDIR="${mandir}" \ + OPTFLAGS="-DNO_SYSTEMD ${CFLAGS}" \ + PKG_CONFIG="${STAGING_BINDIR_NATIVE}/pkg-config" \ + SED=sed \ ' -TARGET_CC_ARCH += "${LDFLAGS}" do_configure () { cd ${S}/iscsiuio ; autoreconf --install; ./configure ${EXTRA_OECONF} @@ -81,15 +68,17 @@ do_install () { ${D}${localstatedir}/lib/iscsi/isns \ ${D}${localstatedir}/lib/iscsi/slp \ ${D}${localstatedir}/lib/iscsi/ifaces \ - ${D}/${mandir}/man8 + ${D}${libdir} \ + ${D}${mandir}/man8 install -p -m 755 ${S}/usr/iscsid ${S}/usr/iscsiadm \ ${S}/utils/iscsi-iname \ ${S}/usr/iscsistart ${D}/${sbindir} + cp -dR ${S}/libopeniscsiusr/libopeniscsiusr.so* ${D}${libdir} install -p -m 644 ${S}/doc/iscsiadm.8 ${S}/doc/iscsid.8 ${D}/${mandir}/man8 install -p -m 644 ${S}/etc/iscsid.conf ${D}${sysconfdir}/iscsi - install -p -m 755 ${WORKDIR}/initd.debian ${D}${sysconfdir}/init.d/iscsid + install -p -m 755 ${UNPACKDIR}/initd.debian ${D}${sysconfdir}/init.d/iscsid sed -i -e "s:= /sbin/iscsid:= ${sbindir}/iscsid:" ${D}${sysconfdir}/iscsi/iscsid.conf @@ -98,21 +87,21 @@ do_install () { echo "d /run/${BPN}/lock - - - -" \ > ${D}${sysconfdir}/tmpfiles.d/iscsi.conf install -d ${D}/etc/default/ - install -p -m 755 ${WORKDIR}/iscsi-initiator ${D}${sysconfdir}/default/ + install -p -m 755 ${UNPACKDIR}/iscsi-initiator ${D}${sysconfdir}/default/ install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/iscsi-initiator.service \ - ${WORKDIR}/iscsi-initiator-targets.service \ + install -m 0644 ${UNPACKDIR}/iscsi-initiator.service \ + ${UNPACKDIR}/iscsi-initiator-targets.service \ ${D}${systemd_unitdir}/system/ install -d ${D}${nonarch_libdir}/iscsi - install -m 0755 ${WORKDIR}/set_initiatorname ${D}${nonarch_libdir}/iscsi + install -m 0755 ${UNPACKDIR}/set_initiatorname ${D}${nonarch_libdir}/iscsi else install -d ${D}/etc/default/volatiles - install -m 0644 ${WORKDIR}/99_iscsi-initiator-utils ${D}/etc/default/volatiles + install -m 0644 ${UNPACKDIR}/99_iscsi-initiator-utils ${D}/etc/default/volatiles fi } -pkg_postinst_${PN}() { +pkg_postinst:${PN}() { if [ "x$D" = "x" ]; then if [ -e /etc/init.d/populate-volatile.sh ]; then /etc/init.d/populate-volatile.sh update @@ -126,4 +115,4 @@ SYSTEMD_SERVICE = " iscsi-initiator.service iscsi-initiator-targets.service " INITSCRIPT_NAME = "iscsid" INITSCRIPT_PARAMS = "start 30 1 2 3 4 5 . stop 70 0 1 2 3 4 5 6 ." -FILES_${PN} += "${nonarch_libdir}/iscsi" +FILES:${PN} += "${nonarch_libdir}/iscsi" diff --git a/meta-networking/recipes-daemons/keepalived/keepalived_1.3.5.bb b/meta-networking/recipes-daemons/keepalived/keepalived_2.2.8.bb index 5e7e6e49f5..85f4a6aa59 100644 --- a/meta-networking/recipes-daemons/keepalived/keepalived_1.3.5.bb +++ b/meta-networking/recipes-daemons/keepalived/keepalived_2.2.8.bb @@ -7,17 +7,17 @@ Server (IPVS) kernel module providing Layer4 loadbalancing \ " HOMEPAGE = "http://www.keepalived.org/" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz" - -SRC_URI[md5sum] = "9964d295ec9d34ed3408b57d28847b68" -SRC_URI[sha256sum] = "c0114d86ea4c896557beb0d9367819a423ffba772bc5d7c548dc455e6b3bd048" +SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz \ + " +SRC_URI[sha256sum] = "85882eb62974f395d4c631be990a41a839594a7e62fbfebcb5649a937a7a1bb6" +UPSTREAM_CHECK_URI = "https://github.com/acassen/keepalived/releases" DEPENDS = "libnfnetlink openssl" -inherit autotools pkgconfig systemd update-rc.d +inherit autotools pkgconfig systemd PACKAGECONFIG ??= "libnl snmp \ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ @@ -26,10 +26,11 @@ PACKAGECONFIG[libnl] = "--enable-libnl,--disable-libnl,libnl" PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" PACKAGECONFIG[systemd] = "--with-init=systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--with-init=SYSV,systemd" -EXTRA_OECONF = "--disable-libiptc" EXTRA_OEMAKE = "initdir=${sysconfdir}/init.d" -do_install_append() { +export EXTRA_CFLAGS = "${CFLAGS}" + +do_install:append() { if [ -f ${D}${sysconfdir}/init.d/${BPN} ]; then chmod 0755 ${D}${sysconfdir}/init.d/${BPN} sed -i 's#rc.d/##' ${D}${sysconfdir}/init.d/${BPN} @@ -40,10 +41,11 @@ do_install_append() { fi } -FILES_${PN} += "${datadir}/snmp/mibs/KEEPALIVED-MIB.txt" +PACKAGE_BEFORE_PN = "${PN}-samples" + +FILES:${PN} += "${datadir}/snmp/mibs/KEEPALIVED-MIB.txt" -INITSCRIPT_NAME = "keepalived" -INITSCRIPT_PARAMS = "remove" +FILES:${PN}-samples = "${sysconfdir}/keepalived/samples ${sysconfdir}/keepalived/keepalived.conf.sample" -SYSTEMD_SERVICE_${PN} = "keepalived.service" +SYSTEMD_SERVICE:${PN} = "keepalived.service" SYSTEMD_AUTO_ENABLE ?= "disable" diff --git a/meta-networking/recipes-daemons/lldpd/files/run-ptest b/meta-networking/recipes-daemons/lldpd/files/run-ptest new file mode 100755 index 0000000000..da686eb465 --- /dev/null +++ b/meta-networking/recipes-daemons/lldpd/files/run-ptest @@ -0,0 +1,16 @@ +#!/bin/sh + +num_fail=0 + +for test in tests/check* +do + ./"$test" \ + && echo "PASS: $test" \ + || { + echo "FAIL: $test" + num_fail=$(( ${num_fail} + 1)) + } + +done + +exit $num_fail diff --git a/meta-networking/recipes-daemons/lldpd/files/src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch b/meta-networking/recipes-daemons/lldpd/files/src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch deleted file mode 100644 index 4876e17945..0000000000 --- a/meta-networking/recipes-daemons/lldpd/files/src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f9f3e4dd31588cce5f655730da7b5c3f56a9bdc1 Mon Sep 17 00:00:00 2001 -From: Fabio Berton <fabio.berton@ossystems.com.br> -Date: Tue, 26 Sep 2017 09:19:51 -0300 -Subject: [PATCH] src/daemon/lldpd.service.in: Use fixed path for mkdir command -Organization: O.S. Systems Software LTDA. - -@mkdir_p@ is expanded to host tools path ../build/tmp/hosttools/mkdir that -doesn't exist on target. Remove @mkdir_p@ and use /bin/mkdir -p to -create /var/run/lldpd directory. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> ---- - src/daemon/lldpd.service.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/daemon/lldpd.service.in b/src/daemon/lldpd.service.in -index fdb7338..4291830 100644 ---- a/src/daemon/lldpd.service.in -+++ b/src/daemon/lldpd.service.in -@@ -9,7 +9,7 @@ Type=notify - NotifyAccess=main - EnvironmentFile=-/etc/default/lldpd - EnvironmentFile=-/etc/sysconfig/lldpd --ExecStartPre=@mkdir_p@ @PRIVSEP_CHROOT@ -+ExecStartPre=/bin/mkdir -p @PRIVSEP_CHROOT@ - ExecStart=@sbindir@/lldpd $DAEMON_ARGS $LLDPD_OPTIONS - Restart=on-failure - PrivateTmp=yes --- -2.14.2 diff --git a/meta-networking/recipes-daemons/lldpd/lldpd_0.9.8.bb b/meta-networking/recipes-daemons/lldpd/lldpd_1.0.18.bb index dbd84cf673..4deab153c4 100644 --- a/meta-networking/recipes-daemons/lldpd/lldpd_0.9.8.bb +++ b/meta-networking/recipes-daemons/lldpd/lldpd_1.0.18.bb @@ -6,20 +6,19 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/ISC;md5=f3b90e DEPENDS = "libbsd libevent" SRC_URI = "\ - http://media.luffy.cx/files/${BPN}/${BPN}-${PV}.tar.gz \ + http://media.luffy.cx/files/${BPN}/${BP}.tar.gz \ file://lldpd.init.d \ file://lldpd.default \ - file://src-daemon-lldpd.service.in-Use-fixed-path-for-mkdir.patch \ + file://run-ptest \ " -SRC_URI[md5sum] = "8809600492f6b73149eb19158e819c1f" -SRC_URI[sha256sum] = "9ee494e91bc33938575b2c09b26188c486ef8eac6e2155d250c189cc4e988c4f" +SRC_URI[sha256sum] = "4b320675d608901a4a0d4feff8f96bb846d4913d914b0cf75b7d0ae80490f2f7" -inherit autotools update-rc.d useradd systemd pkgconfig bash-completion +inherit autotools update-rc.d useradd systemd pkgconfig bash-completion github-releases ptest USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system -g lldpd --shell /bin/false lldpd" -GROUPADD_PARAM_${PN} = "--system lldpd" +USERADD_PARAM:${PN} = "--system -g lldpd --shell /bin/false lldpd" +GROUPADD_PARAM:${PN} = "--system lldpd" EXTRA_OECONF += "--without-embedded-libevent \ --disable-oldies \ @@ -46,20 +45,37 @@ PACKAGECONFIG[custom] = "--enable-custom,--disable-custom" INITSCRIPT_NAME = "lldpd" INITSCRIPT_PARAMS = "defaults" -SYSTEMD_SERVICE_${PN} = "lldpd.service" +SYSTEMD_SERVICE:${PN} = "lldpd.service" -do_install_append() { - install -Dm 0755 ${WORKDIR}/lldpd.init.d ${D}${sysconfdir}/init.d/lldpd - install -Dm 0644 ${WORKDIR}/lldpd.default ${D}${sysconfdir}/default/lldpd +do_install:append() { + install -Dm 0755 ${UNPACKDIR}/lldpd.init.d ${D}${sysconfdir}/init.d/lldpd + install -Dm 0644 ${UNPACKDIR}/lldpd.default ${D}${sysconfdir}/default/lldpd # Make an empty configuration file touch ${D}${sysconfdir}/lldpd.conf } PACKAGES =+ "${PN}-zsh-completion" -FILES_${PN} += "${libdir}/sysusers.d" -RDEPENDS_${PN} += "os-release" +FILES:${PN} += "${libdir}/sysusers.d" +RDEPENDS:${PN} += "os-release" -FILES_${PN}-zsh-completion += "${datadir}/zsh/" +FILES:${PN}-zsh-completion += "${datadir}/zsh/" # FIXME: zsh is broken in meta-oe so this cannot be enabled for now -#RDEPENDS_${PN}-zsh-completion += "zsh" +#RDEPENDS:${PN}-zsh-completion += "zsh" + +RDEPENDS:${PN}-ptest = "libcheck" +DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'libcheck', '', d)}" + +TESTDIR = "tests" +do_compile_ptest () { + # hack to remove the call to `make check-TESTS` + sed -i 's/$(MAKE) $(AM_MAKEFLAGS) check-TESTS//g' ${TESTDIR}/Makefile + oe_runmake check +} + +do_install_ptest () { + # install the tests + cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} + # remove the object files + rm ${D}${PTEST_PATH}/${TESTDIR}/*.o +} diff --git a/meta-networking/recipes-daemons/ncftp/ncftp/0001-Forward-port-defining-PREFIX_BINDIR-to-use-new-autoc.patch b/meta-networking/recipes-daemons/ncftp/ncftp/0001-Forward-port-defining-PREFIX_BINDIR-to-use-new-autoc.patch new file mode 100644 index 0000000000..efd1f345e6 --- /dev/null +++ b/meta-networking/recipes-daemons/ncftp/ncftp/0001-Forward-port-defining-PREFIX_BINDIR-to-use-new-autoc.patch @@ -0,0 +1,25 @@ +From 53ca110d53ca82f6c4224e4c29dbcf7dfe6914cd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 23 Aug 2022 00:25:06 -0700 +Subject: [PATCH] Forward port defining PREFIX_BINDIR to use new autoconf + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index c3ef568..a320c56 100644 +--- a/configure.in ++++ b/configure.in +@@ -44,7 +44,7 @@ wi_EXTRA_SYSV_SUNOS_DIRS dnl For better curses library on SunOS 4 + + dnl Try to use PATH rather than hardcode the installation path, if possible. + if test "${prefix-NONE}" != "NONE" && test "$prefix" != "/usr/local" && test "$prefix" != "/usr"; then +- AC_DEFINE_UNQUOTED(PREFIX_BINDIR, "$prefix/bin") ++ AC_DEFINE([PREFIX_BINDIR], [${prefix}/bin], [Install bindir]) + fi + + diff --git a/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch b/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch index 1c8146edaf..22e4f7837b 100644 --- a/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch +++ b/meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch @@ -16,13 +16,9 @@ Other solution would to fix sed.sh to ignore double definitions Upstream-Status: Pending Signed-of-by: Khem Raj <raj.khem@gmail.com> - - -Index: ncftp-3.2.6/configure -=================================================================== ---- ncftp-3.2.6.orig/configure -+++ ncftp-3.2.6/configure -@@ -7859,7 +7859,6 @@ chmod 755 "$wi_tmpdir/prpp.pl" +--- a/autoconf_local/aclocal.m4 ++++ b/autoconf_local/aclocal.m4 +@@ -4220,7 +4220,6 @@ changequote({{, }})dnl cat << 'EOF' > "$wi_tmpdir/unistd.c" #include <confdefs.h> diff --git a/meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb b/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb index 5f92f27fdf..de111cac05 100644 --- a/meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb +++ b/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb @@ -5,12 +5,12 @@ LICENSE = "ClArtistic" LIC_FILES_CHKSUM = "file://ncftp/cmds.c;beginline=3;endline=4;md5=9c2390809f71465aa7ff76e03dc14d91" DEPENDS = "ncurses" -SRC_URI = "ftp://ftp.ncftp.com/${BPN}/${BP}-src.tar.xz \ +SRC_URI = "https://www.ncftp.com/public_ftp/ncftp/${BP}-src.tar.xz \ file://ncftp-configure-use-BUILD_CC-for-ccdv.patch \ file://unistd.patch \ -" -SRC_URI[md5sum] = "42d0f896d69a4d603ec097546444245f" -SRC_URI[sha256sum] = "5f200687c05d0807690d9fb770327b226f02dd86155b49e750853fce4e31098d" + file://0001-Forward-port-defining-PREFIX_BINDIR-to-use-new-autoc.patch \ + " +SRC_URI[sha256sum] = "d41c5c4d6614a8eae2ed4e4d7ada6b6d3afcc9fb65a4ed9b8711344bef24f7e8" inherit autotools-brokensep pkgconfig @@ -19,17 +19,16 @@ CFLAGS += "-DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -Wall" PACKAGECONFIG ??= "" PACKAGECONFIG[ccdv] = "--enable-ccdv,--disable-ccdv,," -EXTRA_OECONF = "--disable-precomp" -TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}" +EXTRA_OECONF = "--disable-precomp --disable-universal ac_cv_path_TAR=tar" +ACLOCALEXTRAPATH:append = " -I ${S}/autoconf_local" -do_configure() { - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} - oe_runconf -} do_install () { install -d ${D}${bindir} ${D}${sysconfdir} ${D}${mandir} oe_runmake 'prefix=${D}${prefix}' 'BINDIR=${D}${bindir}' \ 'SYSCONFDIR=${D}${sysconfdir}' 'mandir=${D}${mandir}' \ install } + +# http://errors.yoctoproject.org/Errors/Details/766888/ +# ncftp/3.2.7/ncftp-3.2.7/config.h:358:28: error: passing argument 2 of 'select' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.2.4.bb b/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.2.4.bb new file mode 100644 index 0000000000..7f06e0ebf3 --- /dev/null +++ b/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.2.4.bb @@ -0,0 +1,31 @@ +SUMMARY = "Dispatcher service for systemd-networkd connection status changes" +DESCRIPTION = "This daemon is similar to NetworkManager-dispatcher, but is much \ +more limited in the types of events it supports due to the limited nature of \ +systemd-networkd(8)." + +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=84dcc94da3adb52b53ae4fa38fe49e5d" + +inherit features_check systemd + +RDEPENDS:${PN} = "python3-pygobject python3-dbus python3-json" +REQUIRED_DISTRO_FEATURES = "systemd gobject-introspection-data" + +SRCREV = "dfd26d72793914eb3da910ef8c71de6d7c8942a2" +SRC_URI = "git://gitlab.com/craftyguy/networkd-dispatcher;protocol=https;nobranch=1" + +S = "${WORKDIR}/git" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "networkd-dispatcher.service" +SYSTEMD_AUTO_ENABLE = "disable" + +# Nothing to build, just a python script to install +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -D -m 0755 ${S}/networkd-dispatcher ${D}${bindir}/networkd-dispatcher + install -D -m 0644 ${S}/networkd-dispatcher.service ${D}/${systemd_system_unitdir}/networkd-dispatcher.service + install -D -m 0644 ${S}/networkd-dispatcher.conf ${D}/${sysconfdir}/conf.d/networkd-dispatcher.conf +} diff --git a/meta-networking/recipes-daemons/openhpi/files/0001-Do-not-poke-at-build-host-s-etc-os-release.patch b/meta-networking/recipes-daemons/openhpi/files/0001-Do-not-poke-at-build-host-s-etc-os-release.patch new file mode 100644 index 0000000000..ab9b25fed0 --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/0001-Do-not-poke-at-build-host-s-etc-os-release.patch @@ -0,0 +1,27 @@ +From 2bc5c6367a7f70ca5bff177ec95bcad3b1c2b66b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 6 Sep 2018 18:15:10 -0700 +Subject: [PATCH] Do not poke at build host's /etc/os-release + +During cross compile we are interested in target distro and not host +distro therefore do not check for it. + +Upstream-Status: Inappropriate [Cross compile specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: openhpi-3.8.0/configure.ac +=================================================================== +--- openhpi-3.8.0.orig/configure.ac ++++ openhpi-3.8.0/configure.ac +@@ -194,7 +194,6 @@ AC_SUBST(JSON_C_LIB) + AC_SUBST(JSON_C_INCLUDE) + AC_CHECK_LIB([rabbitmq],[amqp_new_connection],[RABBITMQ_LIB=-lrabbitmq],[RABBITMQ_LIB=]) + AC_SUBST(RABBITMQ_LIB) +-AC_CHECK_FILE([/etc/os-release],[DISTRO=`grep "^ID=" /etc/os-release | awk -F"\"" '{ print $2 }'`]) + + AC_CHECK_HEADERS([amqp.h],[have_rabbitmq=yes],[have_rabbitmq=no]) + diff --git a/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch b/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch deleted file mode 100644 index 4f493f7b8f..0000000000 --- a/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 398c6db66c643ed6133cc2b028ab1e27a17c5295 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 1 May 2017 19:10:09 +0000 -Subject: [PATCH] Fix build failures with gcc7 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - plugins/ipmidirect/ipmi_mc_vendor.cpp | 2 +- - plugins/ipmidirect/ipmi_resource.cpp | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/plugins/ipmidirect/ipmi_mc_vendor.cpp b/plugins/ipmidirect/ipmi_mc_vendor.cpp -index 2c6c090..557771c 100644 ---- a/plugins/ipmidirect/ipmi_mc_vendor.cpp -+++ b/plugins/ipmidirect/ipmi_mc_vendor.cpp -@@ -322,7 +322,7 @@ cIpmiMcVendor::CreateResources( cIpmiDomain *domain, cIpmiMc *source_mc, cIpmiSd - if ( addr.m_channel != source_mc->GetChannel() ) - stdlog << "WARNING : SDR channel " << addr.m_channel << " NOT equal to MC channel " << source_mc->GetChannel() << "\n"; - -- if ( FindOrCreateResource( domain, source_mc, fru_id, sdr, sdrs ) == false ) { -+ if ( !FindOrCreateResource( domain, source_mc, fru_id, sdr, sdrs ) ) { - return false; - } - } -diff --git a/plugins/ipmidirect/ipmi_resource.cpp b/plugins/ipmidirect/ipmi_resource.cpp -index c438e74..2552673 100644 ---- a/plugins/ipmidirect/ipmi_resource.cpp -+++ b/plugins/ipmidirect/ipmi_resource.cpp -@@ -73,7 +73,7 @@ cIpmiResource::SendCommandReadLock( const cIpmiMsg &msg, cIpmiMsg &rsp, - - domain->ReadLock(); - -- if ( domain->VerifyResource( resource ) == false ) -+ if ( !domain->VerifyResource( resource ) ) - return SA_ERR_HPI_NOT_PRESENT; - - return rv; -@@ -91,7 +91,7 @@ cIpmiResource::SendCommandReadLock( cIpmiRdr *rdr, const cIpmiMsg &msg, cIpmiMsg - - domain->ReadLock(); - -- if ( domain->VerifyRdr( rdr ) == false ) -+ if ( !domain->VerifyRdr( rdr ) ) - return SA_ERR_HPI_NOT_PRESENT; - - return rv; --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/openhpi/files/0001-include-iostream-for-cout.patch b/meta-networking/recipes-daemons/openhpi/files/0001-include-iostream-for-cout.patch new file mode 100644 index 0000000000..c78ec28de7 --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/0001-include-iostream-for-cout.patch @@ -0,0 +1,41 @@ +From 8f47adc3b9085d589e62cb5eb560dd23a703036a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 8 Sep 2018 12:47:49 -0700 +Subject: [PATCH] include iostream for cout + +End cout with endl + +Fixes +plugins/dynamic_simulator/thread.cpp:241:3: error: 'cout' was not declared in this scope + cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined" + ^~~~ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + plugins/dynamic_simulator/thread.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/dynamic_simulator/thread.cpp b/plugins/dynamic_simulator/thread.cpp +index b971502..61eaf42 100644 +--- a/plugins/dynamic_simulator/thread.cpp ++++ b/plugins/dynamic_simulator/thread.cpp +@@ -26,7 +26,7 @@ + */ + + #include "thread.h" +-#include <stdio.h> ++#include <iostream> + #include <sys/time.h> + #include <errno.h> + +@@ -238,7 +238,7 @@ cThreadLock::cThreadLock() + pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); + pthread_mutex_init( &m_lock, &attr ); + pthread_mutexattr_destroy( &attr ); +- cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined" ++ std::cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined"<<std::endl; + } + #else + static pthread_mutex_t lock_tmpl = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; diff --git a/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch b/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch deleted file mode 100644 index 4d56f6535c..0000000000 --- a/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch +++ /dev/null @@ -1,31 +0,0 @@ -From be40b3f11460cf495bbbef45692e7763afda0c2b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 14 Sep 2017 17:56:31 -0700 -Subject: [PATCH] ipmidirect: Replace __STRING - -__STRING is not universally available e.g. -musl does not define it - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - plugins/ipmidirect/t/test.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/plugins/ipmidirect/t/test.h b/plugins/ipmidirect/t/test.h -index 8d71381..978d5ff 100644 ---- a/plugins/ipmidirect/t/test.h -+++ b/plugins/ipmidirect/t/test.h -@@ -22,7 +22,7 @@ TestFunction( const char *str, const char *file, int line, bool expr ) - } - - --#define Test(expr) TestFunction( __STRING(expr), __FILE__, __LINE__, expr ) -+#define Test(expr) TestFunction( #expr, __FILE__, __LINE__, expr ) - - - static int --- -2.14.1 - diff --git a/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch b/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch deleted file mode 100644 index 0f033ac855..0000000000 --- a/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch +++ /dev/null @@ -1,47 +0,0 @@ -From be665d9513cca7e8b64c79ae424cf44ac166b052 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 14 Sep 2017 17:07:58 -0700 -Subject: [PATCH] plugins: Check for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - before use - -musl does not define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP -so we can not assume that all Linux systems support PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP -its a glibc specific define so check for it being defined before using it - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - plugins/dynamic_simulator/thread.cpp | 2 +- - plugins/ipmidirect/thread.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/dynamic_simulator/thread.cpp b/plugins/dynamic_simulator/thread.cpp -index d663be0..9210fd7 100644 ---- a/plugins/dynamic_simulator/thread.cpp -+++ b/plugins/dynamic_simulator/thread.cpp -@@ -229,7 +229,7 @@ cThread::Exit( void *rv ) - /** - * Constructor - **/ --#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__) -+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - cThreadLock::cThreadLock() - { - pthread_mutexattr_t attr; -diff --git a/plugins/ipmidirect/thread.cpp b/plugins/ipmidirect/thread.cpp -index 5c52557..48e83fa 100644 ---- a/plugins/ipmidirect/thread.cpp -+++ b/plugins/ipmidirect/thread.cpp -@@ -167,7 +167,7 @@ cThread::Exit( void *rv ) - // cThreadLock - ////////////////////////////////////////////////// - --#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__) -+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - cThreadLock::cThreadLock() - { - pthread_mutexattr_t attr; --- -2.14.1 - diff --git a/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch b/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch new file mode 100644 index 0000000000..2cefd55be2 --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch @@ -0,0 +1,37 @@ +From b8bc6bfdb5e7fb5b46d3a830e04632939bee6b98 Mon Sep 17 00:00:00 2001 +From: Catalin Enache <catalin.enache@windriver.com> +Date: Fri, 9 Feb 2018 16:35:11 +0200 +Subject: [PATCH] saHpiSessionClose: close socket + +saHpiSessionClose leaks file descriptors + +Upstream issue: https://github.com/open-hpi/openhpi/issues/1918 + +Upstream-Status: Pending + +Signed-off-by: Catalin Enache <catalin.enache@windriver.com> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + baselib/session.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/baselib/session.cpp b/baselib/session.cpp +index c5edfc8..4ece1b7 100644 +--- a/baselib/session.cpp ++++ b/baselib/session.cpp +@@ -126,6 +126,12 @@ cSession::cSession() + + cSession::~cSession() + { ++ cClientStreamSock * sock; ++ gpointer ptr = wrap_g_static_private_get( &m_sockets ); ++ if ( ptr ) { ++ sock = reinterpret_cast<cClientStreamSock *>(ptr); ++ sock->Close(); ++ } + wrap_g_static_private_free( &m_sockets ); + } + +-- +2.10.2 + diff --git a/meta-networking/recipes-daemons/openhpi/files/c++11.patch b/meta-networking/recipes-daemons/openhpi/files/c++11.patch index 0549d59777..5eff86b4d5 100644 --- a/meta-networking/recipes-daemons/openhpi/files/c++11.patch +++ b/meta-networking/recipes-daemons/openhpi/files/c++11.patch @@ -1,11 +1,21 @@ -Index: openhpi-3.6.1/configure.ac -=================================================================== ---- openhpi-3.6.1.orig/configure.ac -+++ openhpi-3.6.1/configure.ac -@@ -44,6 +44,7 @@ AC_PROG_CPP - AC_PROG_INSTALL - AC_PROG_LN_S +From ed51168dfd6844deeaebf7d5f6c65898aafb6299 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 27 Aug 2017 12:12:04 -0700 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index c29a31f..f7fe0f7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -46,6 +46,7 @@ AC_PROG_LN_S AC_PROG_MAKE_SET + AC_PROG_AWK + AC_PROG_GREP +AX_CXX_COMPILE_STDCXX_11([noext],[mandatory]) enabled_non32bit="no" diff --git a/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch b/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch index 9b35a0cced..7958a07c67 100644 --- a/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch +++ b/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch @@ -1,3 +1,7 @@ +Support build with Clang + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> Index: openhpi-3.6.1/plugins/dynamic_simulator/new_sim.cpp =================================================================== --- openhpi-3.6.1.orig/plugins/dynamic_simulator/new_sim.cpp @@ -1273,16 +1277,3 @@ Index: openhpi-3.6.1/plugins/ipmidirect/ipmi.cpp static SaErrorT IpmiResetWatchdog(void *hnd, -Index: openhpi-3.6.1/plugins/ipmidirect/ipmi_auth.h -=================================================================== ---- openhpi-3.6.1.orig/plugins/ipmidirect/ipmi_auth.h -+++ openhpi-3.6.1/plugins/ipmidirect/ipmi_auth.h -@@ -32,7 +32,7 @@ class cIpmiAuthSg - { - public: - void *data; /* NULL to terminate. */ -- int len; -+ unsigned int len; - }; - - diff --git a/meta-networking/recipes-daemons/openhpi/files/cross_899198.patch b/meta-networking/recipes-daemons/openhpi/files/cross_899198.patch new file mode 100644 index 0000000000..3161140df9 --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/cross_899198.patch @@ -0,0 +1,98 @@ +From: Helmut Grohne <helmut@subdivi.de> +Subject: fix cross compilation + +The OH_SET_SIZES macro relies on the usual autoconf sizeof cache variables +during cross compilation, but it never ensure that they are initialized. + +pkg-config must be called with $ac_tool_prefix and PKG_PROG_PKG_CONFIG takes +care of that. Setting PKG_CONFIG_PATH breaks the pkg-config-cross-wrapper. +Don't do that. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: openhpi-3.8.0/acinclude.m4 +=================================================================== +--- openhpi-3.8.0.orig/acinclude.m4 ++++ openhpi-3.8.0/acinclude.m4 +@@ -22,30 +22,39 @@ AC_DEFUN([OH_SET_SIZES], + + if test "x$cross_compiling" != "xno"; then + if test "x$OH_SIZEOF_UCHAR" = x; then ++ AC_CHECK_SIZEOF([unsigned char]) + OH_SIZEOF_UCHAR=$ac_cv_sizeof_uchar + fi + if test "x$OH_SIZEOF_USHORT" = x; then ++ AC_CHECK_SIZEOF([unsigned short]) + OH_SIZEOF_USHORT=$ac_cv_sizeof_ushort + fi + if test "x$OH_SIZEOF_UINT" = x; then ++ AC_CHECK_SIZEOF([unsigned int]) + OH_SIZEOF_UINT=$ac_cv_sizeof_uint + fi + if test "x$OH_SIZEOF_CHAR" = x; then ++ AC_CHECK_SIZEOF([char]) + OH_SIZEOF_CHAR=$ac_cv_sizeof_char + fi + if test "x$OH_SIZEOF_SHORT" = x; then ++ AC_CHECK_SIZEOF([short]) + OH_SIZEOF_SHORT=$ac_cv_sizeof_short + fi + if test "x$OH_SIZEOF_INT" = x; then ++ AC_CHECK_SIZEOF([int]) + OH_SIZEOF_INT=$ac_cv_sizeof_int + fi + if test "x$OH_SIZEOF_LLONG" = x; then ++ AC_CHECK_SIZEOF([long long]) + OH_SIZEOF_LLONG=$ac_cv_sizeof_longlong + fi + if test "x$OH_SIZEOF_FLOAT" = x; then ++ AC_CHECK_SIZEOF([float]) + OH_SIZEOF_FLOAT=$ac_cv_sizeof_float + fi + if test "x$OH_SIZEOF_DOUBLE" = x; then ++ AC_CHECK_SIZEOF([double]) + OH_SIZEOF_DOUBLE=$ac_cv_sizeof_double + fi + else +Index: openhpi-3.8.0/configure.ac +=================================================================== +--- openhpi-3.8.0.orig/configure.ac ++++ openhpi-3.8.0/configure.ac +@@ -87,9 +87,9 @@ have_rtas_lib=no + + dnl Check for GLIB + +-AC_CHECK_PROG([found_pkg_config],[pkg-config],[yes]) ++PKG_PROG_PKG_CONFIG + +-if test "x$found_pkg_config" != "xyes"; then ++if test "x$PKG_CONFIG" = "x"; then + OH_CHECK_FAIL(pkg-config,pkg-config) + fi + PKG_CFG_SETPATH +@@ -105,7 +105,7 @@ GLIB=glib-2.0 + GTHREAD=gthread-2.0 + GMODULE=gmodule-2.0 + +-if pkg-config --atleast-version $GLIB_REQUIRED_VERSION $GLIB; then ++if $PKG_CONFIG --atleast-version $GLIB_REQUIRED_VERSION $GLIB; then + : + else + AC_MSG_ERROR([ +@@ -268,12 +268,12 @@ dnl + dnl We really need to make ipmi enablement be contigent on OpenIPMI + dnl + +-if PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --atleast-version 1.4.20 OpenIPMI; then ++if $PKG_CONFIG --atleast-version 1.4.20 OpenIPMI; then + have_openipmi=yes + AC_CHECK_LIB([OpenIPMI], [ipmi_smi_setup_con], [have_openipmi=yes]) +- OPENIPMI_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --cflags OpenIPMI` ++ OPENIPMI_CFLAGS=`$PKG_CONFIG --cflags OpenIPMI` + AC_SUBST(OPENIPMI_CFLAGS) +- OPENIPMI_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --libs OpenIPMI` ++ OPENIPMI_LIBS=`$PKG_CONFIG --libs OpenIPMI` + AC_SUBST(OPENIPMI_LIBS) + fi + diff --git a/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch b/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch index 4c545708fc..eabffa7d9c 100644 --- a/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch +++ b/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Fix sensor_factors_000.cpp:66:5: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing] diff --git a/meta-networking/recipes-daemons/openhpi/files/no-md2.patch b/meta-networking/recipes-daemons/openhpi/files/no-md2.patch new file mode 100644 index 0000000000..c4dd23e790 --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/no-md2.patch @@ -0,0 +1,37 @@ +Description: Fix FTBFS with OpenSSL 1.1 by honouring OPENSSL_NO_MD2 +Author: Adrian Bunk <bunk@debian.org> +Bug-Debian: https://bugs.debian.org/859543 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: openhpi-3.8.0/plugins/ipmidirect/ipmi_auth.cpp +=================================================================== +--- openhpi-3.8.0.orig/plugins/ipmidirect/ipmi_auth.cpp ++++ openhpi-3.8.0/plugins/ipmidirect/ipmi_auth.cpp +@@ -21,6 +21,7 @@ + #include "ipmi_auth.h" + #include <string.h> + #include <errno.h> ++#include <openssl/opensslconf.h> + + + cIpmiAuth * +@@ -32,7 +33,7 @@ IpmiAuthFactory( tIpmiAuthType type ) + return new cIpmiAuthNone; + + case eIpmiAuthTypeMd2: +-#ifdef HAVE_OPENSSL_MD2_H ++#if defined(HAVE_OPENSSL_MD2_H) && !defined(OPENSSL_NO_MD2) + return new cIpmiAuthMd2; + #else + break; +@@ -78,7 +79,7 @@ cIpmiAuthNone::Check( cIpmiAuthSg /*d*/[ + } + + +-#ifdef HAVE_OPENSSL_MD2_H ++#if defined(HAVE_OPENSSL_MD2_H) && !defined(OPENSSL_NO_MD2) + #include <openssl/md2.h> + + diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-3.6.1-ssl.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-3.6.1-ssl.patch new file mode 100644 index 0000000000..68f972fc51 --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-3.6.1-ssl.patch @@ -0,0 +1,20 @@ +Link with libssl + +fixed build with openssl-1.1.x + +Taken from Fedora +https://src.fedoraproject.org/rpms/openhpi/c/be77f5484b0206f8946a85b29424ea10bf863063 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending [Unknown] + +diff -up openhpi-3.6.1/ssl/Makefile.am.than openhpi-3.6.1/ssl/Makefile.am +--- openhpi-3.6.1/ssl/Makefile.am.than 2017-02-21 12:21:12.114814698 -0500 ++++ openhpi-3.6.1/ssl/Makefile.am 2017-02-21 12:22:44.576454262 -0500 +@@ -19,5 +19,5 @@ lib_LTLIBRARIES = libopenhpi_ssl.la + libopenhpi_ssl_la_SOURCES = oh_ssl.c oh_ssl.h + + libopenhpi_ssl_la_LDFLAGS = -version-info @HPI_LIB_VERSION@ +-libopenhpi_ssl_la_LIBADD = @CRYPTO_LIB@ ++libopenhpi_ssl_la_LIBADD = -lssl @CRYPTO_LIB@ + diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch new file mode 100644 index 0000000000..b2771c0c92 --- /dev/null +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch @@ -0,0 +1,35 @@ +From e0b2be7a1fce0fed63bac8c350b711b69edfe30e Mon Sep 17 00:00:00 2001 +From: "yanjun.zhu" <yanjun.zhu@windriver.com> +Date: Tue, 30 Apr 2019 10:04:58 +0800 +Subject: [PATCH] openhpid/safhpi.c: fix function saHpiSensorThresholdsSet + +In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if +TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not +SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will +be set even if TH.IsSupported == SAHPI_FALSE. + +Upstream-Status: Submitted +[https://github.com/open-hpi/openhpi/pull/2744/commits/77a78bb1ada56e55c5ba6d7a5987c214705bf035] + +Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + openhpid/safhpi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/openhpid/safhpi.c b/openhpid/safhpi.c +index 28a2632..61b7f03 100644 +--- a/openhpid/safhpi.c ++++ b/openhpid/safhpi.c +@@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholdsSet ( + oh_release_domain(d); /* Unlock domain */ + + OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv, +- ResourceId, SensorNum, SensorThresholds); ++ ResourceId, SensorNum, &tmp); + oh_release_handler(h); + + return rv; +-- +2.7.4 + diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch index 029b857bc1..97c515e00b 100644 --- a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch @@ -6,11 +6,11 @@ Upstream-Status: Pending Signed-of-by: Aws Ismail <aws.ismail@windriver.com> -diff --git a/configure.ac b/configure.ac -index f5a5b74..4a20154 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -605,11 +605,6 @@ AC_ARG_ENABLE([werror], +Index: openhpi-3.6.1/configure.ac +=================================================================== +--- openhpi-3.6.1.orig/configure.ac ++++ openhpi-3.6.1/configure.ac +@@ -656,11 +656,6 @@ AC_ARG_ENABLE([werror], fi], []) diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch deleted file mode 100644 index 205696e651..0000000000 --- a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix for saftest failures. - -Upstream-Status: Pending - -Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> - -diff -urpN a/openhpid/safhpi.c b/openhpid/safhpi.c ---- a/openhpid/safhpi.c -+++ b/openhpid/safhpi.c -@@ -1976,7 +1976,7 @@ SaErrorT SAHPI_API saHpiSensorThresholds - oh_release_domain(d); /* Unlock domain */ - - OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv, -- ResourceId, SensorNum, SensorThresholds); -+ ResourceId, SensorNum, &tmp); - oh_release_handler(h); - - return rv; -diff -urpN a/utils/sahpi_struct_utils.c b/utils/sahpi_struct_utils.c ---- a/utils/sahpi_struct_utils.c -+++ b/utils/sahpi_struct_utils.c -@@ -3855,6 +3855,9 @@ SaHpiBoolT oh_valid_textbuffer(SaHpiText - /* found a unpaired surrogate */ - return SAHPI_FALSE; - } -+ } else { -+ /*the first 2 bytes wrong*/ -+ return SAHPI_FALSE; - } - } - break; diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch deleted file mode 100644 index 7dac453189..0000000000 --- a/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit e9f9a73c9dba8dd59f3d6c3acd9988ec8361d55a -Author: Aws Ismail <aws.ismail@windriver.com> -Date: Mon Dec 17 16:23:45 2012 -0500 - - Correct dangling g_thread_exit in session.c - - hpi_shell's session.c has its progress_bar - thread created using pthread_create but - exited using g_thread_exit. Use pthread_exit - instead to avoid unpredictable GLIB thread - errors. - - Upstream-Status: Pending - - Signed-off-by: Aws Ismail <aws.ismail@windriver.com> - -diff --git a/hpi_shell/session.c b/hpi_shell/session.c -index 85c31bf..187da4c 100644 ---- a/hpi_shell/session.c -+++ b/hpi_shell/session.c -@@ -66,7 +66,7 @@ static void* progress_bar(void *unused) - if (i < (PROGRESS_BUF_SIZE - mes_len - 1)) i++; - t++; - }; -- g_thread_exit(0); -+ pthread_exit(0); - return (void *)1; - } - diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch index 6d3b6648a8..160eeede69 100644 --- a/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch @@ -1,4 +1,7 @@ -Fix libxml2 for cross-compiling +From afe545e77f9d841b7777d859e7e8108492fece96 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Wed, 26 Apr 2017 16:22:00 +0800 +Subject: [PATCH] Fix libxml2 for cross-compiling Use proper XML2_INCLUDE path when cross-compiling @@ -6,16 +9,20 @@ Upstream-Status: Pending Signed-of-by: Aws Ismail <aws.ismail@windriver.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/configure.ac b/configure.ac -index 30a792c..b5f5aad 100644 +index 6242cbf..4fb6b69 100644 --- a/configure.ac +++ b/configure.ac -@@ -175,7 +175,7 @@ AC_CHECK_HEADERS([openssl/md2.h openssl/md5.h openssl/bio.h openssl/ssl.h openss +@@ -179,7 +179,7 @@ AC_CHECK_HEADERS([openssl/md2.h openssl/md5.h openssl/bio.h openssl/ssl.h openss dnl xml is used for XML-based communication in ilo2_ribcl and oa_soap AC_CHECK_LIB([xml2],[xmlParseMemory],[XML2_LIB=-lxml2],[XML2_LIB=]) --AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="-I/usr/include/libxml2"],[XML2_INCLUDE]) -+AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="$XML2_INCLUDE"],[XML2_INCLUDE]) +-AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="-I/usr/include/libxml2"],[XML2_INCLUDE=]) ++AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="$XML2_INCLUDE"],[XML2_INCLUDE=]) AC_SUBST(XML2_LIB) AC_SUBST(XML2_INCLUDE) diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch index 95b0abc913..293c8d91f5 100644 --- a/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch @@ -13,36 +13,33 @@ Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> configure | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -diff --git a/acinclude.m4 b/acinclude.m4 -index 82c33f6..727e461 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 +Index: openhpi-3.8.0/acinclude.m4 +=================================================================== +--- openhpi-3.8.0.orig/acinclude.m4 ++++ openhpi-3.8.0/acinclude.m4 @@ -160,8 +160,8 @@ AC_DEFUN([OH_CHECK_NETSNMP], ], [ have_netsnmp=yes -- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/-O\S*//g'` +- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/ -O\S*//g'` - SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs` + SNMPFLAGS="" + SNMPLIBS="" AC_MSG_RESULT(yes) ], [AC_MSG_RESULT(no. No SNMP based plugins can be built!)]) -diff --git a/configure b/configure -index 00067bc..36b913c 100755 ---- a/configure -+++ b/configure -@@ -15949,8 +15949,8 @@ _ACEOF +Index: openhpi-3.8.0/configure +=================================================================== +--- openhpi-3.8.0.orig/configure ++++ openhpi-3.8.0/configure +@@ -16062,8 +16062,8 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_netsnmp=yes -- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/-O\S*//g'` +- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/ -O\S*//g'` - SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs` + SNMPFLAGS="" + SNMPLIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch index 51537ef128..472318b808 100644 --- a/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch @@ -1,4 +1,4 @@ -From 36fbaa27e7299f63c1324b0ad22b970e9365d6a7 Mon Sep 17 00:00:00 2001 +From 5e0ae172586f5aeb270a8f9b012dd3e36536a2a9 Mon Sep 17 00:00:00 2001 From: Jackie Huang <jackie.huang@windriver.com> Date: Wed, 24 Dec 2014 10:54:59 +0800 Subject: [PATCH] openhpi: use serial-tests config needed by ptest @@ -9,23 +9,21 @@ serial-tests is required to generate those targets. Upstream-Status: Inappropriate [default automake behavior incompatible with ptest] Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 4b51971..16136b3 100644 +index 89d8104..c29a31f 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ dnl various hacks by Sean Dague <http://dague.net/sean> 4/23/03 AC_PREREQ(2.57) - AC_INIT(openhpi, 3.5.0) + AC_INIT(openhpi, 3.8.0) AC_CONFIG_SRCDIR(openhpi.spec.in) -AM_INIT_AUTOMAKE([1.8]) +AM_INIT_AUTOMAKE([1.8 serial-tests]) AM_CONFIG_HEADER(config.h) AH_TOP([#ifndef __OPENHPI_CONFIG_H --- -1.7.1 - diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpid.service b/meta-networking/recipes-daemons/openhpi/files/openhpid.service index cd4168f8e5..816e44f822 100644 --- a/meta-networking/recipes-daemons/openhpi/files/openhpid.service +++ b/meta-networking/recipes-daemons/openhpi/files/openhpid.service @@ -4,7 +4,7 @@ After=syslog.target [Service] Type=forking -PIDFile=/var/run/openhpid.pid +PIDFile=/run/openhpid.pid ExecStart=@SBINDIR@/openhpid -c @SYSCONFDIR@/openhpi/openhpi.conf [Install] diff --git a/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb b/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb index ecf71d70f6..ac13d7a196 100644 --- a/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb +++ b/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb @@ -17,10 +17,11 @@ servers, Blade Center, and machines which export data via sysfs. \ HOMEPAGE = "http://openhpi.sourceforge.net/Home" SECTION = "net" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4" -DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs autoconf-archive-native" +DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs \ + autoconf-archive-native os-release" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://openhpi.init \ @@ -32,47 +33,52 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://openhpi-glib-cross-compile.patch \ file://openhpi-linkfix.patch \ file://openhpi-fix-host-gcc.patch \ - file://openhpi-hpi-shell-thread-fix.patch \ - file://openhpi-fix-testfail-errors.patch \ + file://openhpi-fix-function-saHpiSensorThresholds.patch \ file://openhpi-add-libnetsnmp-when-link.patch \ file://openhpi-invalide-session.patch \ file://openhpi-use-serial-tests-config-needed-by-ptest.patch \ file://openhpi-fix-alignment-issue.patch \ - file://0001-Fix-build-failures-with-gcc7.patch \ file://c++11.patch \ file://clang-c++11.patch \ file://fix-narrowing-warning.patch \ - file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \ - file://0001-ipmidirect-Replace-__STRING.patch \ + file://0001-session-close-socket.patch \ + file://openhpi-3.6.1-ssl.patch \ + file://0001-Do-not-poke-at-build-host-s-etc-os-release.patch \ + file://cross_899198.patch \ + file://no-md2.patch \ + file://0001-include-iostream-for-cout.patch \ " - -SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23" -SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc" +SRC_URI[md5sum] = "fffda3deea8a0d3671a72eea9d13a4df" +SRC_URI[sha256sum] = "c94332a29160dd75cb799c027e614690c00263b0fabed87417707bec04c38723" inherit autotools pkgconfig ptest update-rc.d systemd PACKAGES =+ "${PN}-libs" -FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so" +FILES:${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so" -INSANE_SKIP_${PN}-libs = "dev-so" -RDEPENDS_${PN} += "${PN}-libs" +INSANE_SKIP:${PN}-libs = "dev-so" +RDEPENDS:${PN} += "${PN}-libs" +RDEPENDS:${PN}-ptest += "packagegroup-core-buildessential" -PACKAGECONFIG ??= "libgcrypt non32bit" +PACKAGECONFIG ??= "libgcrypt non32bit snmp-bc" PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils," PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt," PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,," +PACKAGECONFIG[snmp-bc] = "--enable-snmp_bc,--disable-snmp_bc" + +export DISTRO -do_install_append () { +do_install:append () { install -m 0755 -d ${D}${sysconfdir}/${BPN} - install -m 0755 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf - install -m 0700 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf - install -m 0755 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data - install -m 0755 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data - install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid + install -m 0644 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf + install -m 0600 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf + install -m 0644 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data + install -m 0644 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data + install -m 0755 ${UNPACKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/openhpid.service ${D}${systemd_unitdir}/system sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \ ${D}${systemd_unitdir}/system/openhpid.service } @@ -80,6 +86,21 @@ do_install_append () { do_compile_ptest () { for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do dir=`dirname ${x}` + case $dir in + *cpp/t) ;; + *snmp_bc/t) if ${@bb.utils.contains('PACKAGECONFIG','snmp-bc','true','false',d)} + then + oe_runmake -C ${dir} buildtest-TESTS + fi + ;; + *) oe_runmake -C ${dir} buildtest-TESTS ;; + esac + done +} + +ack_do_compile_ptest () { + for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do + dir=`dirname ${x}` upper=`dirname ${dir}` if [ `basename ${upper}` != "cpp" ]; then oe_runmake -C ${dir} buildtest-TESTS @@ -100,6 +121,9 @@ do_install_ptest () { sed -i "s/^Makefile:/MM:/g" ${x}; done; + install -m 644 ${S}/openhpid/t/ohpi/openhpi.conf ${D}${PTEST_PATH}/openhpid/t/ohpi/ + sed -i "s:OPENHPI_CONF=[^ ]*:OPENHPI_CONF=./openhpi.conf:g" ${D}${PTEST_PATH}/openhpid/t/ohpi/Makefile + mkdir -p ${D}${PTEST_PATH}/plugins/watchdog/ cp -L ${D}/${libdir}/${BPN}/libwatchdog.so ${D}${PTEST_PATH}/plugins/watchdog/ cp -L ${D}/${libdir}/${BPN}/libsimulator.so ${D}${PTEST_PATH}/plugins/watchdog/ @@ -111,5 +135,5 @@ do_install_ptest () { INITSCRIPT_NAME = "openhpid" INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ." -SYSTEMD_SERVICE_${PN} = "openhpid.service" +SYSTEMD_SERVICE:${PN} = "openhpid.service" SYSTEMD_AUTO_ENABLE = "disable" diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-build-with-fno-common.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-build-with-fno-common.patch new file mode 100644 index 0000000000..b581c571bb --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-build-with-fno-common.patch @@ -0,0 +1,311 @@ +From 9a46462f08535e946d97fd40c79229a7ee8b7336 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 17 Aug 2020 00:00:00 -0700 +Subject: [PATCH] Fix build with -fno-common + +Mark the declarations with extern where needed in header files + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/ckpt/agent/cpa_cb.h | 2 +- + src/ckpt/ckptd/cpd_init.h | 2 +- + src/evt/agent/eda.h | 2 +- + src/evt/evtd/eds.h | 2 +- + src/evt/evtd/eds_amf.c | 2 ++ + src/evt/evtd/eds_amf.h | 2 +- + src/evt/evtd/eds_cb.h | 2 +- + src/imm/immd/immd.h | 2 +- + src/lck/lckd/gld_dl_api.h | 4 ++-- + src/lck/lcknd/glnd_cb.h | 4 ++-- + src/mds/mds_core.h | 34 +++++++++++++++++++--------------- + src/mds/mds_dt_tcp.c | 2 ++ + src/mds/mds_dt_tcp.h | 2 +- + src/mds/mds_main.c | 2 +- + src/msg/msgnd/mqnd_db.h | 2 +- + 15 files changed, 37 insertions(+), 29 deletions(-) + +diff --git a/src/ckpt/agent/cpa_cb.h b/src/ckpt/agent/cpa_cb.h +index ac48c6c..d633583 100644 +--- a/src/ckpt/agent/cpa_cb.h ++++ b/src/ckpt/agent/cpa_cb.h +@@ -119,7 +119,7 @@ typedef struct cpa_cb { + + } CPA_CB; + +-uint32_t gl_cpa_hdl; ++extern uint32_t gl_cpa_hdl; + + typedef struct cpa_prcess_evt_sync { + NCS_QELEM qelem; +diff --git a/src/ckpt/ckptd/cpd_init.h b/src/ckpt/ckptd/cpd_init.h +index 0c02642..cf3466b 100644 +--- a/src/ckpt/ckptd/cpd_init.h ++++ b/src/ckpt/ckptd/cpd_init.h +@@ -33,7 +33,7 @@ + #include <saAmf.h> + #include "cpd_cb.h" + +-uint32_t gl_cpd_cb_hdl; ++extern uint32_t gl_cpd_cb_hdl; + + /* Macro to get the component name for the component type */ + #define m_CPD_TASKNAME "CPD" +diff --git a/src/evt/agent/eda.h b/src/evt/agent/eda.h +index 4d1991c..138c910 100644 +--- a/src/evt/agent/eda.h ++++ b/src/evt/agent/eda.h +@@ -39,7 +39,7 @@ + #include "base/logtrace.h" + + /* EDA CB global handle declaration */ +-uint32_t gl_eda_hdl; ++extern uint32_t gl_eda_hdl; + + /* EDA Default MDS timeout value */ + #define EDA_MDS_DEF_TIMEOUT 100 +diff --git a/src/evt/evtd/eds.h b/src/evt/evtd/eds.h +index bc9c429..3545d77 100644 +--- a/src/evt/evtd/eds.h ++++ b/src/evt/evtd/eds.h +@@ -72,6 +72,6 @@ + #include "base/daemon.h" + + /* EDS CB global handle declaration */ +-uint32_t gl_eds_hdl; ++extern uint32_t gl_eds_hdl; + + #endif // EVT_EVTD_EDS_H_ +diff --git a/src/evt/evtd/eds_amf.c b/src/evt/evtd/eds_amf.c +index 97b71a5..adebf0c 100644 +--- a/src/evt/evtd/eds_amf.c ++++ b/src/evt/evtd/eds_amf.c +@@ -30,6 +30,8 @@ stuff. + #include "eds.h" + #include "eds_dl_api.h" + ++struct next_HAState nextStateInfo; ++ + /* HA AMF statemachine & State handler definitions */ + + /**************************************************************************** +diff --git a/src/evt/evtd/eds_amf.h b/src/evt/evtd/eds_amf.h +index e9aeaa6..f9803b4 100644 +--- a/src/evt/evtd/eds_amf.h ++++ b/src/evt/evtd/eds_amf.h +@@ -49,7 +49,7 @@ uint32_t eds_quiesced_state_handler(EDS_CB *cb, SaInvocationT invocation); + struct next_HAState { + uint8_t nextState1; + uint8_t nextState2; +-} nextStateInfo; /* AMF HA state can transit to a maximum of the two defined ++}; /* AMF HA state can transit to a maximum of the two defined + states */ + + #define VALIDATE_STATE(curr, next) \ +diff --git a/src/evt/evtd/eds_cb.h b/src/evt/evtd/eds_cb.h +index c127ead..19c48cd 100644 +--- a/src/evt/evtd/eds_cb.h ++++ b/src/evt/evtd/eds_cb.h +@@ -40,7 +40,7 @@ + #include "base/ncssysf_tmr.h" + + /* global variables */ +-uint32_t gl_eds_hdl; ++extern uint32_t gl_eds_hdl; + + struct eda_reg_list_tag; + +diff --git a/src/imm/immd/immd.h b/src/imm/immd/immd.h +index 7dc1da6..bab3945 100644 +--- a/src/imm/immd/immd.h ++++ b/src/imm/immd/immd.h +@@ -42,7 +42,7 @@ + #include "immd_sbedu.h" + #include "base/ncs_mda_pvt.h" + +-IMMD_CB *immd_cb; ++extern IMMD_CB *immd_cb; + + extern uint32_t initialize_for_assignment(IMMD_CB *cb, SaAmfHAStateT ha_state); + +diff --git a/src/lck/lckd/gld_dl_api.h b/src/lck/lckd/gld_dl_api.h +index 6476a71..3a67fd1 100644 +--- a/src/lck/lckd/gld_dl_api.h ++++ b/src/lck/lckd/gld_dl_api.h +@@ -33,7 +33,7 @@ + #include "base/ncsgl_defs.h" + #include "base/ncs_lib.h" + +-uint32_t gl_gld_hdl; +-uint32_t gld_lib_req(NCS_LIB_REQ_INFO *req_info); ++extern uint32_t gl_gld_hdl; ++extern uint32_t gld_lib_req(NCS_LIB_REQ_INFO *req_info); + + #endif // LCK_LCKD_GLD_DL_API_H_ +diff --git a/src/lck/lcknd/glnd_cb.h b/src/lck/lcknd/glnd_cb.h +index 3b82f60..77a1f88 100644 +--- a/src/lck/lcknd/glnd_cb.h ++++ b/src/lck/lcknd/glnd_cb.h +@@ -28,8 +28,8 @@ extern "C" { + #endif + + /* global variables */ +-uint32_t gl_glnd_hdl; +-NCSCONTEXT gl_glnd_task_hdl; ++extern uint32_t gl_glnd_hdl; ++extern NCSCONTEXT gl_glnd_task_hdl; + + /* macros for the global varibales */ + #define m_GLND_RETRIEVE_GLND_CB_HDL gl_glnd_hdl +diff --git a/src/mds/mds_core.h b/src/mds/mds_core.h +index dad62cd..ed69d3a 100644 +--- a/src/mds/mds_core.h ++++ b/src/mds/mds_core.h +@@ -26,6 +26,10 @@ + #ifndef MDS_MDS_CORE_H_ + #define MDS_MDS_CORE_H_ + ++#ifndef EXTERN ++#define EXTERN extern ++#endif ++ + #include <pthread.h> + #include "base/ncsgl_defs.h" + #include "mds/mds_papi.h" +@@ -600,65 +604,65 @@ extern "C" { + /* ******************************************** */ + + /* Initialization of MDTM Module */ +-uint32_t (*mds_mdtm_init)(NODE_ID node_id, uint32_t *mds_tipc_ref); ++EXTERN uint32_t (*mds_mdtm_init)(NODE_ID node_id, uint32_t *mds_tipc_ref); + + /* Destroying the MDTM Module*/ +-uint32_t (*mds_mdtm_destroy)(void); ++EXTERN uint32_t (*mds_mdtm_destroy)(void); + +-uint32_t (*mds_mdtm_send)(MDTM_SEND_REQ *req); ++EXTERN uint32_t (*mds_mdtm_send)(MDTM_SEND_REQ *req); + + /* SVC Install */ +-uint32_t (*mds_mdtm_svc_install)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, ++EXTERN uint32_t (*mds_mdtm_svc_install)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, + NCSMDS_SCOPE_TYPE install_scope, + V_DEST_RL role, MDS_VDEST_ID vdest_id, + NCS_VDEST_TYPE vdest_policy, + MDS_SVC_PVT_SUB_PART_VER mds_svc_pvt_ver); + + /* SVC Uninstall */ +-uint32_t (*mds_mdtm_svc_uninstall)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, ++EXTERN uint32_t (*mds_mdtm_svc_uninstall)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, + NCSMDS_SCOPE_TYPE install_scope, + V_DEST_RL role, MDS_VDEST_ID vdest_id, + NCS_VDEST_TYPE vdest_policy, + MDS_SVC_PVT_SUB_PART_VER mds_svc_pvt_ver); + + /* SVC Subscribe */ +-uint32_t (*mds_mdtm_svc_subscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, ++EXTERN uint32_t (*mds_mdtm_svc_subscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, + NCSMDS_SCOPE_TYPE subscribe_scope, + MDS_SVC_HDL local_svc_hdl, + MDS_SUBTN_REF_VAL *subtn_ref_val); + + /* added svc_hdl */ + /* SVC Unsubscribe */ +-uint32_t (*mds_mdtm_svc_unsubscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, ++EXTERN uint32_t (*mds_mdtm_svc_unsubscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, + NCSMDS_SCOPE_TYPE subscribe_scope, + MDS_SUBTN_REF_VAL subtn_ref_val); + + /* VDEST Install */ +-uint32_t (*mds_mdtm_vdest_install)(MDS_VDEST_ID vdest_id); ++EXTERN uint32_t (*mds_mdtm_vdest_install)(MDS_VDEST_ID vdest_id); + + /* VDEST Uninstall */ +-uint32_t (*mds_mdtm_vdest_uninstall)(MDS_VDEST_ID vdest_id); ++EXTERN uint32_t (*mds_mdtm_vdest_uninstall)(MDS_VDEST_ID vdest_id); + + /* VDEST Subscribe */ +-uint32_t (*mds_mdtm_vdest_subscribe)(MDS_VDEST_ID vdest_id, ++EXTERN uint32_t (*mds_mdtm_vdest_subscribe)(MDS_VDEST_ID vdest_id, + MDS_SUBTN_REF_VAL *subtn_ref_val); + + /* VDEST Unsubscribe */ +-uint32_t (*mds_mdtm_vdest_unsubscribe)(MDS_VDEST_ID vdest_id, ++EXTERN uint32_t (*mds_mdtm_vdest_unsubscribe)(MDS_VDEST_ID vdest_id, + MDS_SUBTN_REF_VAL subtn_ref_val); + + /* Tx Register (For incrementing the use count) */ +-uint32_t (*mds_mdtm_tx_hdl_register)(MDS_DEST adest); ++EXTERN uint32_t (*mds_mdtm_tx_hdl_register)(MDS_DEST adest); + + /* Tx Unregister (For decrementing the use count) */ +-uint32_t (*mds_mdtm_tx_hdl_unregister)(MDS_DEST adest); ++EXTERN uint32_t (*mds_mdtm_tx_hdl_unregister)(MDS_DEST adest); + + /* Node subscription */ +-uint32_t (*mds_mdtm_node_subscribe)(MDS_SVC_HDL svc_hdl, ++EXTERN uint32_t (*mds_mdtm_node_subscribe)(MDS_SVC_HDL svc_hdl, + MDS_SUBTN_REF_VAL *subtn_ref_val); + + /* Node unsubscription */ +-uint32_t (*mds_mdtm_node_unsubscribe)(MDS_SUBTN_REF_VAL subtn_ref_val); ++EXTERN uint32_t (*mds_mdtm_node_unsubscribe)(MDS_SUBTN_REF_VAL subtn_ref_val); + + #ifdef __cplusplus + } +diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c +index 4a37246..e73cef4 100644 +--- a/src/mds/mds_dt_tcp.c ++++ b/src/mds/mds_dt_tcp.c +@@ -70,6 +70,8 @@ NCS_PATRICIA_TREE mdtm_reassembly_list; + + /* Get the pid of the process */ + pid_t mdtm_pid; ++ ++MDTM_TCP_CB *tcp_cb; + + static void mds_mdtm_enc_init(MDS_MDTM_DTM_MSG *init, uint8_t *buff); + static uint32_t mdtm_create_rcv_task(void); +diff --git a/src/mds/mds_dt_tcp.h b/src/mds/mds_dt_tcp.h +index 1065464..350d534 100644 +--- a/src/mds/mds_dt_tcp.h ++++ b/src/mds/mds_dt_tcp.h +@@ -50,7 +50,7 @@ typedef struct mdtm_tcp_cb { + + } MDTM_TCP_CB; + +-MDTM_TCP_CB *tcp_cb; ++extern MDTM_TCP_CB *tcp_cb; + + typedef enum mds_mdtm_dtm_msg_types { + MDS_MDTM_DTM_PID_TYPE = 1, +diff --git a/src/mds/mds_main.c b/src/mds/mds_main.c +index 0bcb2f9..5671ed3 100644 +--- a/src/mds/mds_main.c ++++ b/src/mds/mds_main.c +@@ -20,7 +20,7 @@ + #endif + + #include "osaf/configmake.h" +- ++#define EXTERN + /***************************************************************************** + .............................................................................. + +diff --git a/src/msg/msgnd/mqnd_db.h b/src/msg/msgnd/mqnd_db.h +index b78024e..fee43e5 100644 +--- a/src/msg/msgnd/mqnd_db.h ++++ b/src/msg/msgnd/mqnd_db.h +@@ -33,7 +33,7 @@ + #include <saClm.h> + #include <saImmOi.h> + /* Decleration for global variable */ +-uint32_t gl_mqnd_cb_hdl; ++extern uint32_t gl_mqnd_cb_hdl; + + /* Macros for reading global database */ + #define m_MQND_STORE_HDL(hdl) (gl_mqnd_cb_hdl = (hdl)) +-- +2.28.0 + diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch new file mode 100644 index 0000000000..7e88c498ee --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch @@ -0,0 +1,31 @@ +From 90f81c1fb3e560cfc99ee7ab9a48a1736e3929cd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Nov 2020 13:22:31 -0800 +Subject: [PATCH] Use correct printf format for __fsblkcnt_t + +This depends on time_t size and on some 32bit architectures e.g. riscv32 +this would be a 64bit value + +Fixes +os_defs.c:920:40: error: format '%ld' expects argument of type 'long int', but argument 3 has type '__fsblkcnt_t' {aka 'long long unsigned int'} [-Werror=format=] + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/base/os_defs.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/src/base/os_defs.c ++++ b/src/base/os_defs.c +@@ -917,7 +917,11 @@ uint32_t ncs_os_posix_shm(NCS_OS_POSIX_S + ((statsvfs.f_bfree - 1) * statsvfs.f_frsize)) { + syslog( + LOG_ERR, ++#if (_FILE_OFFSET_BITS == 64 || __TIMESIZE == 64) && __WORDSIZE == 32 ++ "Insufficient shared memory (%lld) to write the data of size: %" PRId64 ++#else + "Insufficient shared memory (%ld) to write the data of size: %" PRId64 ++#endif + "\n", + (statsvfs.f_bfree * statsvfs.f_frsize), + req->info.write.i_write_size); diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch index 512e246c56..c5264e5e7a 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch @@ -1,18 +1,21 @@ -From ab00d6f5793b2d850f975bcb6d5d0aa6d7a9eaa4 Mon Sep 17 00:00:00 2001 +From c2668f7f2ea82a61115b7cae56ed081b41ff5153 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 22 Apr 2017 12:34:37 -0700 Subject: [PATCH] configure: Disable format-overflow if supported by gcc Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- - Makefile.am | 6 ++-- - configure.ac | 2 ++ - m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++ +Upstream-Status: Pending + + Makefile.am | 6 +-- + configure.ac | 2 + + m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 m4/ax_check_compile_flag.m4 diff --git a/Makefile.am b/Makefile.am -index d63fbbb..1012a2c 100644 +index b3d6553..5607fc2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,10 +52,10 @@ AM_CPPFLAGS = \ @@ -26,14 +29,14 @@ index d63fbbb..1012a2c 100644 -AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror +AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@ +AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@ - AM_LDFLAGS = @OSAF_HARDEN_FLAGS@ -Wl,--as-needed -ldl -lrt -pthread -rdynamic - ACLOCAL_AMFLAGS = -I m4 - OSAF_LIB_FLAGS = + + if ENABLE_GCOV + AM_CFLAGS += --coverage diff --git a/configure.ac b/configure.ac -index 02771c6..b76b0fe 100644 +index 5b86730..47d1002 100644 --- a/configure.ac +++ b/configure.ac -@@ -557,6 +557,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then +@@ -600,6 +600,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then fi AC_SUBST(OSAF_HARDEN_FLAGS) @@ -122,6 +125,3 @@ index 0000000..dcabb92 + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS --- -2.12.2 - diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch index 5756a027b4..daf06d38fb 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch @@ -1,4 +1,4 @@ -From 6248b717b4861d16b80235fd8e57d64e4f636428 Mon Sep 17 00:00:00 2001 +From 979b2b6a1aa574a26e8b736049c4207d568f60f3 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 13 Apr 2017 17:39:07 -0700 Subject: [PATCH] configure: Pass linker specific options with -Wl @@ -7,15 +7,18 @@ This helps make it pass the options to linker correctly and we can use non-gcc compilers Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- +Upstream-Status: Pending + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index df4fc58..02771c6 100644 +index 12a5d5c..5b86730 100644 --- a/configure.ac +++ b/configure.ac -@@ -553,7 +553,7 @@ if test -z "$OSAF_HARDEN_FLAGS"; then +@@ -596,7 +596,7 @@ if test -z "$OSAF_HARDEN_FLAGS"; then if echo "${CFLAGS} ${CXXFLAGS}" | grep -q -- -O0; then OSAF_HARDEN_FLAGS="" fi @@ -24,6 +27,3 @@ index df4fc58..02771c6 100644 fi AC_SUBST(OSAF_HARDEN_FLAGS) --- -2.12.2 - diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch new file mode 100644 index 0000000000..21abcf75b5 --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch @@ -0,0 +1,23 @@ +From 300fd3e27e71a91fc52d3f985ed4fde548852853 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 27 Sep 2019 12:50:11 -0700 +Subject: [PATCH] create_empty_library: Use CC variable intead of hardcoding + gcc + +This ensures that cross-compiles can succeed, otherwise we get wrong +architecture on these stub libraries + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + scripts/create_empty_library | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/create_empty_library ++++ b/scripts/create_empty_library +@@ -66,4 +66,4 @@ for s in $symbols; do + echo "SaAisErrorT $s() { return SA_AIS_ERR_UNAVAILABLE; }" >> "$tmpdir/lib.c" + done + rm -f "$1" +-gcc -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1" ++$CC -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1" $LDFLAGS diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch new file mode 100644 index 0000000000..f45874680d --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch @@ -0,0 +1,50 @@ +From ffc829603a2c50674c8e04de5221e43f80bfc1b2 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin <andrey.z@gmail.com> +Date: Mon, 27 Jan 2020 13:00:53 +0000 +Subject: [PATCH] immom_python: convert to python3 + +Convert immom_python to use python3, python2 is EOL and is not supported +by all distributions anymore. + +Upstream-Status: Pending + +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> +--- + samples/immsv/immom_python/immom.py | 2 +- + samples/immsv/immom_python/immomexamples.py | 2 +- + samples/immsv/immom_python/immomtest.py | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/samples/immsv/immom_python/immom.py b/samples/immsv/immom_python/immom.py +index 4f68625ed..f88197000 100755 +--- a/samples/immsv/immom_python/immom.py ++++ b/samples/immsv/immom_python/immom.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/python ++#!/usr/bin/env python3 + """ + immom -- An IMM Object Manager in Python + +diff --git a/samples/immsv/immom_python/immomexamples.py b/samples/immsv/immom_python/immomexamples.py +index 70c579265..bd693c25f 100755 +--- a/samples/immsv/immom_python/immomexamples.py ++++ b/samples/immsv/immom_python/immomexamples.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 + + import immom + +diff --git a/samples/immsv/immom_python/immomtest.py b/samples/immsv/immom_python/immomtest.py +index 4b98bea8c..ed2463ba9 100755 +--- a/samples/immsv/immom_python/immomtest.py ++++ b/samples/immsv/immom_python/immomtest.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import immom +-- +2.17.1 + diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch index 76c47c6584..99fab3b034 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch @@ -1,4 +1,4 @@ -From 508ea7c0d67243feb1684eaa83569cb687561d64 Mon Sep 17 00:00:00 2001 +From c21f77d592415f316138c05f581192a1f061e735 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 15 Sep 2017 10:09:03 -0700 Subject: [PATCH] immpbe_dump.cc: Use sys/wait.h instead of wait.h @@ -7,12 +7,15 @@ Fixes redirecting incorrect #include <wait.h> to <sys/wait.h> Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- +Upstream-Status: Pending + src/imm/common/immpbe_dump.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imm/common/immpbe_dump.cc b/src/imm/common/immpbe_dump.cc -index 100222f37..33e47ce3c 100644 +index e6b3cc5..3956028 100644 --- a/src/imm/common/immpbe_dump.cc +++ b/src/imm/common/immpbe_dump.cc @@ -26,12 +26,12 @@ @@ -27,8 +30,5 @@ index 100222f37..33e47ce3c 100644 #include <sys/stat.h> +#include <sys/wait.h> #include <libgen.h> - - #include <saAis.h> --- -2.14.1 - + #include <set> + #include <vector> diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-cstdint-for-uintXX_t-types.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-cstdint-for-uintXX_t-types.patch new file mode 100644 index 0000000000..e36d4e0cdc --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-cstdint-for-uintXX_t-types.patch @@ -0,0 +1,43 @@ +From 225891675b80beaa9d74ce56809e52c4451df72c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 25 Jan 2023 21:46:22 -0800 +Subject: [PATCH 1/2] include cstdint for uintXX_t types + +GCC-13 needs it [1] + +[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/imm/immnd/ImmModel.h | 1 + + src/osaf/consensus/consensus_env.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/imm/immnd/ImmModel.h b/src/imm/immnd/ImmModel.h +index 44da470..0660431 100644 +--- a/src/imm/immnd/ImmModel.h ++++ b/src/imm/immnd/ImmModel.h +@@ -22,6 +22,7 @@ + #include <saImmOm.h> + #include <cstdarg> + #include <sys/types.h> ++#include <cstdint> + #include <string> + #include <vector> + #include <map> +diff --git a/src/osaf/consensus/consensus_env.h b/src/osaf/consensus/consensus_env.h +index df4f93a..89ccf46 100644 +--- a/src/osaf/consensus/consensus_env.h ++++ b/src/osaf/consensus/consensus_env.h +@@ -15,6 +15,7 @@ + #ifndef OSAF_CONSENSUS_CONSENSUS_ENV_H_ + #define OSAF_CONSENSUS_CONSENSUS_ENV_H_ + ++#include <cstdint> + #include <string> + #include "base/mutex.h" + +-- +2.39.1 + diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-missing-array-header.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-missing-array-header.patch new file mode 100644 index 0000000000..e735d432a7 --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-missing-array-header.patch @@ -0,0 +1,32 @@ +From 6168d43ddd353b92ad8bcd5c49dc68f18caa8a00 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 12 Apr 2022 17:07:49 -0700 +Subject: [PATCH 1/2] include missing <array> header + +Fixes +src/osaf/consensus/key_value.cc:25:30: error: aggregate 'std::array<char, 128> buffer' has incomplete type and cannot be defined + 25 | std::array<char, buf_size> buffer; + | ^~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/osaf/consensus/key_value.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/osaf/consensus/key_value.cc b/src/osaf/consensus/key_value.cc +index 692dd3f..6e16cbf 100644 +--- a/src/osaf/consensus/key_value.cc ++++ b/src/osaf/consensus/key_value.cc +@@ -18,7 +18,7 @@ + #include "base/getenv.h" + #include "base/logtrace.h" + #include "osaf/consensus/consensus.h" +- ++#include <array> + int KeyValue::Execute(const std::string& command, std::string& output) { + TRACE_ENTER(); + constexpr size_t buf_size = 128; +-- +2.35.1 + diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch index 4a2a825f99..2521839c73 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch @@ -1,4 +1,4 @@ -From 6442b57a855e273aa5a3d93e8596783cea128073 Mon Sep 17 00:00:00 2001 +From 7fb393c66df33110fef0cbabac7d304f12eb82e4 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 15 Sep 2017 09:39:40 -0700 Subject: [PATCH] src: Add missing header limits.h for _POSIX_HOST_NAME_MAX @@ -7,7 +7,10 @@ Use _GNU_SOURCE instead of libc internal __USE_GNU Do not use the deprecated headers under include/sys Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- +Upstream-Status: Pending + src/base/os_defs.h | 5 +++-- src/mds/mds_dt_tcp.c | 1 - src/mds/mds_dt_tcp_disc.h | 2 +- @@ -18,7 +21,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 7 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/base/os_defs.h b/src/base/os_defs.h -index 50a9bf5fc..af6842863 100644 +index a570c43..3559b19 100644 --- a/src/base/os_defs.h +++ b/src/base/os_defs.h @@ -47,17 +47,18 @@ @@ -43,7 +46,7 @@ index 50a9bf5fc..af6842863 100644 #include <pthread.h> diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c -index 1407eb1ab..a87c22faa 100644 +index 1407eb1..a87c22f 100644 --- a/src/mds/mds_dt_tcp.c +++ b/src/mds/mds_dt_tcp.c @@ -27,7 +27,6 @@ @@ -55,7 +58,7 @@ index 1407eb1ab..a87c22faa 100644 #include <sys/types.h> #include <unistd.h> diff --git a/src/mds/mds_dt_tcp_disc.h b/src/mds/mds_dt_tcp_disc.h -index a6249d73e..574f52681 100644 +index a6249d7..574f526 100644 --- a/src/mds/mds_dt_tcp_disc.h +++ b/src/mds/mds_dt_tcp_disc.h @@ -24,7 +24,7 @@ @@ -68,7 +71,7 @@ index a6249d73e..574f52681 100644 /* mds_indentifire + mds_version + msg_type + scope_type + server_type + server_instance_lower + server_instance_upper + sub_ref_val + sub_ref_val + diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c -index 37745e7f0..9b3255567 100644 +index 7714175..a0ed3b6 100644 --- a/src/mds/mds_dt_tipc.c +++ b/src/mds/mds_dt_tipc.c @@ -35,7 +35,6 @@ @@ -80,7 +83,7 @@ index 37745e7f0..9b3255567 100644 #include <sys/types.h> #include <unistd.h> diff --git a/src/mds/mds_dt_tipc.h b/src/mds/mds_dt_tipc.h -index e73a11b09..401d208c2 100644 +index e73a11b..401d208 100644 --- a/src/mds/mds_dt_tipc.h +++ b/src/mds/mds_dt_tipc.h @@ -32,7 +32,7 @@ @@ -93,7 +96,7 @@ index e73a11b09..401d208c2 100644 #include <errno.h> #include <fcntl.h> diff --git a/src/mds/mds_dt_trans.c b/src/mds/mds_dt_trans.c -index 6f621e04e..5aacbd33e 100644 +index 6f621e0..5aacbd3 100644 --- a/src/mds/mds_dt_trans.c +++ b/src/mds/mds_dt_trans.c @@ -26,7 +26,6 @@ @@ -105,7 +108,7 @@ index 6f621e04e..5aacbd33e 100644 #define MDS_PROT_TCP 0xA0 diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc -index 84014b578..31b1ccc6c 100644 +index fd17c58..1120008 100644 --- a/src/ntf/ntfd/NtfLogger.cc +++ b/src/ntf/ntfd/NtfLogger.cc @@ -20,7 +20,7 @@ @@ -117,6 +120,3 @@ index 84014b578..31b1ccc6c 100644 #include "base/osaf_utility.h" #include <saAis.h> --- -2.14.1 - diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-Werror-enum-int-mismatch-with-gcc13.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-Werror-enum-int-mismatch-with-gcc13.patch new file mode 100644 index 0000000000..a6aa2c3d07 --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-Werror-enum-int-mismatch-with-gcc13.patch @@ -0,0 +1,61 @@ +From 5e5686de677c884d5d785254412ced3c9d2d1b08 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 25 Jan 2023 21:47:45 -0800 +Subject: [PATCH 2/2] Fix -Werror=enum-int-mismatch with gcc13 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/evt/agent/eda_hdl.h | 5 +++-- + src/evt/evtd/eds_mds.h | 3 +-- + src/smf/smfnd/smfnd.h | 8 ++++---- + 3 files changed, 8 insertions(+), 8 deletions(-) + +--- a/src/evt/agent/eda_hdl.h ++++ b/src/evt/agent/eda_hdl.h +@@ -31,6 +31,7 @@ + #define EVT_AGENT_EDA_HDL_H_ + + #include "evt/agent/eda.h" ++#include "ais/include/saAis.h" + + uint32_t eda_hdl_cbk_dispatch(EDA_CB *, EDA_CLIENT_HDL_REC *, SaDispatchFlagsT); + +@@ -68,11 +69,11 @@ EDA_CHANNEL_HDL_REC *eda_find_chan_hdl_r + + void eda_msg_destroy(EDSV_MSG *msg); + +-uint32_t eda_extract_pattern_from_event( ++SaAisErrorT eda_extract_pattern_from_event( + SaEvtEventPatternArrayT *from_pattern_array, + SaEvtEventPatternArrayT **to_pattern_array); + +-uint32_t eda_allocate_and_extract_pattern_from_event( ++SaAisErrorT eda_allocate_and_extract_pattern_from_event( + SaEvtEventPatternArrayT *from_pattern_array, + SaEvtEventPatternArrayT **to_pattern_array); + +--- a/src/evt/evtd/eds_mds.h ++++ b/src/evt/evtd/eds_mds.h +@@ -49,8 +49,7 @@ uint32_t eds_mds_msg_send(EDS_CB *cb, ED + MDS_SEND_PRIORITY_TYPE prio); + + uint32_t eds_mds_ack_send(EDS_CB *cb, EDSV_MSG *msg, MDS_DEST dest, +- SaTimeT timeout, MDS_SEND_PRIORITY_TYPE prio); +- ++ SaTimeT timeout, uint32_t prio); + uint32_t eds_dec_subscribe_msg(NCS_UBAID *uba, long msg_hdl, uint8_t ckpt_flag); + + uint32_t eds_dec_publish_msg(NCS_UBAID *uba, long msg_hdl, uint8_t ckpt_flag); +--- a/src/smf/smfnd/smfnd.h ++++ b/src/smf/smfnd/smfnd.h +@@ -76,7 +76,7 @@ extern "C" { + #endif + + /* smfnd_amf.c */ +-extern uint32_t smfnd_amf_init(smfnd_cb_t *cb); ++extern SaAisErrorT smfnd_amf_init(smfnd_cb_t *cb); + + /* smfnd_mds.c */ + extern uint32_t smfnd_mds_init(smfnd_cb_t *cb); diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0002-configure-Disable-selected-warnings.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0002-configure-Disable-selected-warnings.patch new file mode 100644 index 0000000000..a9953259ce --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0002-configure-Disable-selected-warnings.patch @@ -0,0 +1,28 @@ +From fe654d5340d18f04e4689ba19f843554909a0c00 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 12 Apr 2022 17:16:37 -0700 +Subject: [PATCH 2/2] configure: Disable selected warnings + +These warnings are emitted when compiling with gcc 11 and gcc 12 +Do not treat them as errors + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -601,7 +601,10 @@ if test -z "$OSAF_HARDEN_FLAGS"; then + fi + AC_SUBST(OSAF_HARDEN_FLAGS) + +-AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS=-Wno-error=format-overflow]) ++AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS='-Wno-error=format-overflow']) ++AX_CHECK_COMPILE_FLAG([-Wuse-after-free],[NOWARNINGS+=' -Wno-error=use-after-free']) ++AX_CHECK_COMPILE_FLAG([-Wstringop-truncation],[NOWARNINGS+=' -Wno-error=stringop-truncation']) ++AX_CHECK_COMPILE_FLAG([-Warray-bounds],[NOWARNINGS+=' -Wno-error=array-bounds']) + AC_SUBST(NOWARNINGS) + ############################################# + # List the output Makefiles diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.17.07.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.17.07.bb deleted file mode 100644 index 74483d7786..0000000000 --- a/meta-networking/recipes-daemons/opensaf/opensaf_5.17.07.bb +++ /dev/null @@ -1,67 +0,0 @@ -SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification" -DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \ -middleware consistent with Service Availability Forum (SA Forum) \ -specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \ -established by leading Communications and Enterprise Computing Companies to \ -facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \ -code base in commercial products. \ -The OpenSAF project was launched in mid 2007 and has been under development by \ -an informal group of supporters of the OpenSAF initiative. The OpenSAF \ -Foundation was founded on January 22nd 2008 with Emerson Network Power, \ -Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members." -HOMEPAGE = "http://www.opensaf.org" -SECTION = "admin" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7" - -DEPENDS = "libxml2 python" -TOOLCHAIN = "gcc" - -SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ - file://0001-configure-Pass-linker-specific-options-with-Wl.patch \ - file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \ - file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \ - file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \ -" -SRC_URI[md5sum] = "125bcd9aabd7412aedcbfbf73f4e6196" -SRC_URI[sha256sum] = "3fb2239bb2c9328c8b45368ff8d8de979ea286a27edc9871d218200e88bb91cc" - -inherit autotools useradd systemd pkgconfig - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "-f -r opensaf" -USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf" - -SYSTEMD_SERVICE_${PN} += "opensafd.service" -SYSTEMD_AUTO_ENABLE = "disable" - -PACKAGECONFIG[systemd] = ",,systemd" -PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi" - -PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" - -PKGLIBDIR="${libdir}" - -LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed" - -do_install_append() { - cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir} - rm -fr "${D}${localstatedir}/lock" - rm -fr "${D}${localstatedir}/run" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" - rmdir --ignore-fail-on-non-empty "${D}${datadir}/java" - if [ ! -d "${D}${sysconfdir}/init.d" ]; then - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/ - fi -} - -FILES_${PN} += "${systemd_unitdir}/system/*.service" -FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a" - -INSANE_SKIP_${PN} = "dev-so" - -RDEPENDS_${PN} += "bash python" - diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.22.01.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.22.01.bb new file mode 100644 index 0000000000..3dd950c720 --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.22.01.bb @@ -0,0 +1,99 @@ +SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification" +DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \ +middleware consistent with Service Availability Forum (SA Forum) \ +specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \ +established by leading Communications and Enterprise Computing Companies to \ +facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \ +code base in commercial products. \ +The OpenSAF project was launched in mid 2007 and has been under development by \ +an informal group of supporters of the OpenSAF initiative. The OpenSAF \ +Foundation was founded on January 22nd 2008 with Emerson Network Power, \ +Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members." +HOMEPAGE = "http://www.opensaf.org" +SECTION = "admin" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7" + +DEPENDS = "libxml2 python3" +TOOLCHAIN = "gcc" + +SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ + file://0001-configure-Pass-linker-specific-options-with-Wl.patch \ + file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \ + file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \ + file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \ + file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \ + file://0001-immom_python-convert-to-python3.patch \ + file://0001-Fix-build-with-fno-common.patch \ + file://0001-Use-correct-printf-format-for-__fsblkcnt_t.patch \ + file://0001-include-missing-array-header.patch \ + file://0002-configure-Disable-selected-warnings.patch \ + file://0001-include-cstdint-for-uintXX_t-types.patch \ + file://0002-Fix-Werror-enum-int-mismatch-with-gcc13.patch \ + " +SRC_URI[sha256sum] = "f008d53c83087ce2014c6089bc4ef08e14c1b4091298b943f4ceade1aa6bf61e" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/opensaf/files/releases" + +inherit autotools useradd systemd pkgconfig + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "-f -r opensaf" +USERADD_PARAM:${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf" + +SYSTEMD_SERVICE:${PN} += "opensafd.service" +SYSTEMD_AUTO_ENABLE = "disable" + +PACKAGECONFIG[systemd] = ",,systemd" +PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi" +PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi" + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" + +CPPFLAGS += "-Wno-error" +CXXFLAGS += "-Wno-error" +LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed" + +do_install:append() { + rm -fr "${D}${localstatedir}/lock" + rm -fr "${D}${localstatedir}/run" + rmdir "${D}${localstatedir}/log/${BPN}/saflog" + rmdir "${D}${localstatedir}/log/${BPN}" + rmdir "${D}${localstatedir}/log" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" + rmdir --ignore-fail-on-non-empty "${D}${datadir}/java" + + # Rename /etc/init.d/opensafd to /usr/lib/opensaf/opensafd-init as it is + # needed by opensafd.service, but /etc/init.d is removed by systemd.bbclass + # if sysvinit is not in DISTRO_FEATURES. + mv ${D}${sysconfdir}/init.d/opensafd ${D}${libdir}/${BPN}/opensafd-init + ln -srf ${D}${libdir}/${BPN}/opensafd-init ${D}${sysconfdir}/init.d/opensafd + [ ! -f ${D}${systemd_system_unitdir}/opensafd.service ] || + sed -ri -e "s|/etc/init.d/opensafd|${libdir}/${BPN}/opensafd-init|" ${D}${systemd_system_unitdir}/opensafd.service + + # Create /var/log/opensaf/saflog in runtime. + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then + install -d ${D}${nonarch_libdir}/tmpfiles.d + echo "d ${localstatedir}/log/${BPN}/saflog - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf + fi + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then + install -d ${D}${sysconfdir}/default/volatiles + echo "d root root 0755 ${localstatedir}/log/${BPN}/saflog none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} + fi +} + +FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service" +FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" +FILES:${PN}-dev += "${libdir}/libopensaf_core.so" +FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a" + +INSANE_SKIP:${PN} = "dev-so" + +RDEPENDS:${PN} += "bash python3-core" + +# http://errors.yoctoproject.org/Errors/Details/186970/ +COMPATIBLE_HOST:libc-musl = 'null' + +FILES_SOLIBSDEV = "" diff --git a/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch b/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch deleted file mode 100644 index 6b86e39259..0000000000 --- a/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 63619acf25151d4dade6d65732722ec4a710a5ac Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 15 Jul 2017 09:54:25 -0700 -Subject: [PATCH] Check for glibc before setting CANT_USE_SEND_RECV_MSG - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/util/sys_defs.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h -index f720e2a..7314c63 100644 ---- a/src/util/sys_defs.h -+++ b/src/util/sys_defs.h -@@ -813,7 +813,7 @@ extern int initgroups(const char *, int); - #define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1) - #endif - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) \ -- || (__GLIBC__ < 2) -+ || (defined(__GLIBC__) && (__GLIBC__ < 2)) - #define CANT_USE_SEND_RECV_MSG - #define DEF_SMTP_CACHE_DEMAND 0 - #else --- -2.13.3 - diff --git a/meta-networking/recipes-daemons/postfix/files/makedefs.patch b/meta-networking/recipes-daemons/postfix/files/0001-Fix-makedefs.patch index 98d5f7ed60..8c9c13b1c4 100644 --- a/meta-networking/recipes-daemons/postfix/files/makedefs.patch +++ b/meta-networking/recipes-daemons/postfix/files/0001-Fix-makedefs.patch @@ -1,8 +1,9 @@ -From 4f49e2ce420fb3c17415937530493158ef312733 Mon Sep 17 00:00:00 2001 +From 9000ee4d8bb5c5e0bcc588e9bec86eb56f4285e1 Mon Sep 17 00:00:00 2001 From: Li xin <lixin.fnst@cn.fujitsu.com> Date: Fri, 19 Jun 2015 16:45:54 +0900 -Subject: [PATCH] 1)remove RANLIB, SYSLIBS, AR and get them from env. +Subject: [PATCH] Fix makedefs +1)remove RANLIB, SYSLIBS, AR and get them from env. 2)reference sysroot when searching header files 3)include sysroot path instead of absolute include path for Linux2 and Linux3 systems. @@ -10,7 +11,7 @@ for Linux2 and Linux3 systems. native build, search host library path for nsl and resolv library which comes from libc -Upstreamstatus: Inappropriate [embedded specific] +Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Yao Zhao <yao.zhao@windriver.com> --- @@ -18,10 +19,10 @@ Signed-off-by: Yao Zhao <yao.zhao@windriver.com> 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/makedefs b/makedefs -index 8b84e47..893fb0d 100644 +index 3448c1e..78e0717 100644 --- a/makedefs +++ b/makedefs -@@ -170,9 +170,6 @@ echo "# pie=$pie" +@@ -197,9 +197,6 @@ echo "# pie=$pie" # Defaults for most sane systems @@ -31,7 +32,7 @@ index 8b84e47..893fb0d 100644 ARFL=rv # Ugly function to make our error message more visible among the -@@ -424,12 +421,12 @@ case "$SYSTEM.$RELEASE" in +@@ -492,12 +489,12 @@ case "$SYSTEM.$RELEASE" in case "$CCARGS" in *-DNO_DB*) ;; *-DHAS_DB*) ;; @@ -47,7 +48,7 @@ index 8b84e47..893fb0d 100644 else # No, we're not going to try db1 db2 db3 etc. # On a properly installed system, Postfix builds -@@ -438,12 +435,12 @@ case "$SYSTEM.$RELEASE" in +@@ -506,12 +503,12 @@ case "$SYSTEM.$RELEASE" in echo "Install the appropriate db*-devel package first." 1>&2 exit 1 fi @@ -62,7 +63,7 @@ index 8b84e47..893fb0d 100644 do test -e $lib/lib$name.a -o -e $lib/lib$name.so && { SYSLIBS="$SYSLIBS -l$name" -@@ -463,7 +460,7 @@ case "$SYSTEM.$RELEASE" in +@@ -531,7 +528,7 @@ case "$SYSTEM.$RELEASE" in if [ `expr "X$CCARGS" : "X.*-DNO_EPOLL"` -gt 0 ] then : @@ -71,7 +72,7 @@ index 8b84e47..893fb0d 100644 then echo CCARGS="$CCARGS -DNO_EPOLL" else -@@ -487,8 +484,6 @@ int main(int argc, char **argv) +@@ -555,8 +552,6 @@ int main(int argc, char **argv) } EOF ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1 @@ -80,7 +81,7 @@ index 8b84e47..893fb0d 100644 rm -f makedefs.test makedefs.test.[co] fi;; esac -@@ -504,12 +499,12 @@ EOF +@@ -572,12 +567,12 @@ EOF case "$CCARGS" in *-DNO_DB*) ;; *-DHAS_DB*) ;; @@ -96,7 +97,7 @@ index 8b84e47..893fb0d 100644 else # On a properly installed system, Postfix builds # by including <db.h> and by linking with -ldb -@@ -517,12 +512,12 @@ EOF +@@ -585,12 +580,12 @@ EOF echo "Install the appropriate db*-devel package first." 1>&2 exit 1 fi @@ -112,5 +113,5 @@ index 8b84e47..893fb0d 100644 test -e $lib/lib$name.a -o -e $lib/lib$name.so && { SYSLIBS="$SYSLIBS -l$name" -- -1.8.4.2 +2.17.1 diff --git a/meta-networking/recipes-daemons/postfix/files/install.patch b/meta-networking/recipes-daemons/postfix/files/0002-Change-fixed-postconf-to-a-variable-for-cross-compil.patch index d023680f3b..28199ccdd2 100644 --- a/meta-networking/recipes-daemons/postfix/files/install.patch +++ b/meta-networking/recipes-daemons/postfix/files/0002-Change-fixed-postconf-to-a-variable-for-cross-compil.patch @@ -1,20 +1,34 @@ -From 190650e1cd5700cd6950ead3fcb17ebcec192a2e Mon Sep 17 00:00:00 2001 +From cb69ffda0c2cbde6acdc8b01c8d5ff78d81a84fc Mon Sep 17 00:00:00 2001 From: Li xin <lixin.fnst@cn.fujitsu.com> Date: Fri, 19 Jun 2015 17:14:58 +0900 Subject: [PATCH] Change fixed postconf to a variable for cross-compiling -Upstreamstatus: Inappropriate [embedded specific] +Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Yao Zhao <yao.zhao@windriver.com> --- + Makefile.in | 2 +- postfix-install | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) + 2 files changed, 11 insertions(+), 9 deletions(-) +diff --git a/Makefile.in b/Makefile.in +index 65e7911..40295be 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -22,7 +22,7 @@ META = meta/main.cf.proto meta/master.cf.proto meta/postfix-files \ + EXPAND = sed -e "s;\$${LIB_PREFIX};$(LIB_PREFIX);" \ + -e "s;\$${LIB_SUFFIX};$(LIB_SUFFIX);" + SHLIB_DIR_OVERRIDE = \ +- $${shlib_directory:-`$(SHLIB_ENV) bin/postconf -dhx shlib_directory`} ++ $${shlib_directory:-`$(SHLIB_ENV) $(POSTCONF) -dhx shlib_directory`} + + default: update + diff --git a/postfix-install b/postfix-install -index 1662c3d..d11fa12 100644 +index e498cd3..8049f43 100644 --- a/postfix-install +++ b/postfix-install -@@ -226,8 +226,8 @@ test -z "$non_interactive" -a ! -t 0 && { +@@ -244,8 +244,8 @@ test -z "$non_interactive" -a ! -t 0 && { exit 1 } @@ -25,7 +39,7 @@ index 1662c3d..d11fa12 100644 exit 1 } -@@ -248,7 +248,7 @@ do +@@ -266,7 +266,7 @@ do case "$junk" in *MAIL_VERSION*) case "$mail_version" in @@ -34,7 +48,7 @@ index 1662c3d..d11fa12 100644 esac val=`echo "$junk" | sed 's/MAIL_VERSION$/'"$mail_version/g"` || exit 1 case "$val" in -@@ -434,7 +434,7 @@ template files main.cf.proto and master.cf.proto." +@@ -454,7 +454,7 @@ template files main.cf.proto and master.cf.proto." : ${install_root=/} : ${tempdir=`pwd`} @@ -43,7 +57,7 @@ index 1662c3d..d11fa12 100644 # Find out the location of installed configuration files. -@@ -500,7 +500,7 @@ test -f $CONFIG_DIRECTORY/main.cf && { +@@ -520,7 +520,7 @@ test -f $CONFIG_DIRECTORY/main.cf && { case "$junk" in "") eval unset $name;; esac @@ -52,7 +66,7 @@ index 1662c3d..d11fa12 100644 exit 1 done } -@@ -513,7 +513,7 @@ do +@@ -533,7 +533,7 @@ do case "$junk" in "") eval unset $name;; esac @@ -61,7 +75,7 @@ index 1662c3d..d11fa12 100644 done # Override settings manually. -@@ -639,6 +639,8 @@ README_DIRECTORY=$install_root$readme_directory +@@ -670,6 +670,8 @@ README_DIRECTORY=$install_root$readme_directory SHLIB_DIRECTORY=$install_root$shlib_directory META_DIRECTORY=$install_root$meta_directory @@ -70,16 +84,16 @@ index 1662c3d..d11fa12 100644 # Avoid repeated tests for existence of these; default permissions suffice. test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1 -@@ -810,7 +812,7 @@ IFS="$BACKUP_IFS" +@@ -841,7 +843,7 @@ IFS="$BACKUP_IFS" # the wrong place when Postfix is being upgraded. case "$mail_version" in -"") mail_version="`bin/postconf -dhx mail_version`" || exit 1 -+"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1 ++"") mail_version="`$POSTCONF -c $CONFIG_DIRECTORY -dhx mail_version`" || exit 1 esac # Undo MAIL_VERSION expansion at the end of a parameter value. If -@@ -830,7 +832,7 @@ do +@@ -861,7 +863,7 @@ do esac done @@ -89,5 +103,5 @@ index 1662c3d..d11fa12 100644 "data_directory = $data_directory" \ "command_directory = $command_directory" \ -- -1.8.4.2 +2.17.1 diff --git a/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch b/meta-networking/recipes-daemons/postfix/files/0003-makedefs-Use-native-compiler-to-build-makedefs.test.patch index 763a4a9b98..1545f21637 100644 --- a/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch +++ b/meta-networking/recipes-daemons/postfix/files/0003-makedefs-Use-native-compiler-to-build-makedefs.test.patch @@ -1,4 +1,4 @@ -From a0d0de10e4c5ab55bc2fa48798079e2876b1211d Mon Sep 17 00:00:00 2001 +From 995bddd9563b1aecca2369f2f9c675f88bdc0053 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 26 Aug 2017 10:29:37 -0700 Subject: [PATCH] makedefs: Use native compiler to build makedefs.test @@ -7,14 +7,16 @@ Its a binary used during build Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + makedefs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/makedefs b/makedefs -index 9fd4bc2..5ee7747 100644 +index 78e0717..3299eba 100644 --- a/makedefs +++ b/makedefs -@@ -526,7 +526,7 @@ int main(int argc, char **argv) +@@ -551,7 +551,7 @@ int main(int argc, char **argv) exit(0); } EOF @@ -23,7 +25,7 @@ index 9fd4bc2..5ee7747 100644 rm -f makedefs.test makedefs.test.[co] fi;; esac -@@ -762,7 +762,7 @@ int main(int argc, char **argv) +@@ -787,7 +787,7 @@ int main(int argc, char **argv) exit(0); } EOF @@ -32,7 +34,7 @@ index 9fd4bc2..5ee7747 100644 ./makedefs.test 2>/dev/null || CCARGS="$CCARGS -DNO_SIGSETJMP" rm -f makedefs.test makedefs.test.[co] -@@ -796,7 +796,7 @@ int main(int argc, char **argv) +@@ -823,7 +823,7 @@ int main(int argc, char **argv) &error) != 14); } EOF @@ -41,7 +43,7 @@ index 9fd4bc2..5ee7747 100644 $icu_ldflags >/dev/null 2>&1 if ./makedefs.test 2>/dev/null ; then CCARGS="$CCARGS $icu_cppflags" -@@ -911,7 +911,7 @@ int main(void) +@@ -938,7 +938,7 @@ int main(void) exit(ferror(stdout) ? 1 : 0); } EOF @@ -50,7 +52,7 @@ index 9fd4bc2..5ee7747 100644 ./makedefs.test || exit 1 rm -f makedefs.test makedefs.test.[co] } -@@ -1067,7 +1067,7 @@ int main(void) +@@ -1094,7 +1094,7 @@ int main(void) exit(ferror(stdout) ? 1 : 0); } EOF @@ -60,5 +62,5 @@ index 9fd4bc2..5ee7747 100644 rm -f makedefs.test makedefs.test.[co] eval ${parm_name}=\""\$parm_val"\" -- -2.14.1 +2.17.1 diff --git a/meta-networking/recipes-daemons/postfix/files/icu-config.patch b/meta-networking/recipes-daemons/postfix/files/0004-Fix-icu-config.patch index 9bd9c2f03e..a38e783309 100644 --- a/meta-networking/recipes-daemons/postfix/files/icu-config.patch +++ b/meta-networking/recipes-daemons/postfix/files/0004-Fix-icu-config.patch @@ -1,3 +1,8 @@ +From afef4a9391e6bb1a6c3e73d370f240577ed8b0dd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 16 Jan 2022 11:21:54 +0800 +Subject: [PATCH] Fix icu config + do not entertain cppflags from icu, this is because icu-config feeds the -I path without sysroot which caused native headers to be included and build is @@ -6,12 +11,17 @@ to the CCARGS which we loose nothing if its not entertained. Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + makedefs | 1 - + 1 file changed, 1 deletion(-) -Index: postfix-3.2.2/makedefs -=================================================================== ---- postfix-3.2.2.orig/makedefs -+++ postfix-3.2.2/makedefs -@@ -799,7 +799,6 @@ EOF +diff --git a/makedefs b/makedefs +index 3299eba..2a76f20 100644 +--- a/makedefs ++++ b/makedefs +@@ -826,7 +826,6 @@ EOF ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \ $icu_ldflags >/dev/null 2>&1 if ./makedefs.test 2>/dev/null ; then @@ -19,3 +29,6 @@ Index: postfix-3.2.2/makedefs SYSLIBS="$SYSLIBS $icu_ldflags" else CCARGS="$CCARGS -DNO_EAI" +-- +2.17.1 + diff --git a/meta-networking/recipes-daemons/postfix/files/0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch b/meta-networking/recipes-daemons/postfix/files/0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch new file mode 100644 index 0000000000..b425cf8432 --- /dev/null +++ b/meta-networking/recipes-daemons/postfix/files/0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch @@ -0,0 +1,58 @@ +From 545d4a79b50caa5698622c0c1905ae154197a16f Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Fri, 12 Oct 2018 12:38:02 +0800 +Subject: [PATCH] makedefs: add -lnsl and -lresolv to SYSLIBS by default + +We don't need to check libnsl.so and libresolv.so since the libnsl2 is +specified in DEPENDS and libresolv.so is from c libarary. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + makedefs | 22 ++-------------------- + 1 file changed, 2 insertions(+), 20 deletions(-) + +diff --git a/makedefs b/makedefs +index 2a76f20..9d5db9f 100644 +--- a/makedefs ++++ b/makedefs +@@ -506,16 +506,7 @@ case "$SYSTEM.$RELEASE" in + SYSLIBS="$SYSLIBS -ldb" + ;; + esac +- for name in nsl resolv $GDBM_LIBS +- do +- for lib in $BUILD_SYSROOT_NSL_PATH +- do +- test -e $lib/lib$name.a -o -e $lib/lib$name.so && { +- SYSLIBS="$SYSLIBS -l$name" +- break +- } +- done +- done ++ SYSLIBS="$SYSLIBS -lnsl -lresolv" + # Kernel 2.4 added IPv6 + case "$RELEASE" in + 2.[0-3].*) CCARGS="$CCARGS -DNO_IPV6";; +@@ -583,16 +574,7 @@ EOF + SYSLIBS="$SYSLIBS -ldb" + ;; + esac +- for name in nsl resolv +- do +- for lib in $BUILD_SYSROOT_NSL_PATH +- do +- test -e $lib/lib$name.a -o -e $lib/lib$name.so && { +- SYSLIBS="$SYSLIBS -l$name" +- break +- } +- done +- done ++ SYSLIBS="$SYSLIBS -lnsl -lresolv" + SYSLIBS="$SYSLIBS -ldl" + : ${SHLIB_SUFFIX=.so} + : ${SHLIB_CFLAGS=-fPIC} +-- +2.17.1 + diff --git a/meta-networking/recipes-daemons/postfix/files/aliasesdb b/meta-networking/recipes-daemons/postfix/files/aliasesdb index 855a64f705..855a64f705 100755..100644 --- a/meta-networking/recipes-daemons/postfix/files/aliasesdb +++ b/meta-networking/recipes-daemons/postfix/files/aliasesdb diff --git a/meta-networking/recipes-daemons/postfix/files/check_hostname.sh b/meta-networking/recipes-daemons/postfix/files/check_hostname.sh index 37a0dd088c..37a0dd088c 100755..100644 --- a/meta-networking/recipes-daemons/postfix/files/check_hostname.sh +++ b/meta-networking/recipes-daemons/postfix/files/check_hostname.sh diff --git a/meta-networking/recipes-daemons/postfix/files/main.cf b/meta-networking/recipes-daemons/postfix/files/main.cf index 2371ace6e4..22c57485d7 100644 --- a/meta-networking/recipes-daemons/postfix/files/main.cf +++ b/meta-networking/recipes-daemons/postfix/files/main.cf @@ -1,4 +1,4 @@ -compatibility_level = 2 +compatibility_level = 3.6 smtputf8_enable = no # Configure your domain and accounts @@ -33,7 +33,7 @@ queue_directory = /var/spool/postfix mail_spool_directory = /var/spool/mail readme_directory = no command_directory = /usr/sbin -daemon_directory = @LIBEXECDIR@ +daemon_directory = @LIBEXECDIR@/postfix mail_owner = postfix setgid_group = postdrop unknown_local_recipient_reject_code = 450 diff --git a/meta-networking/recipes-daemons/postfix/files/postfix b/meta-networking/recipes-daemons/postfix/files/postfix index 8c7a60175a..8c7a60175a 100755..100644 --- a/meta-networking/recipes-daemons/postfix/files/postfix +++ b/meta-networking/recipes-daemons/postfix/files/postfix diff --git a/meta-networking/recipes-daemons/postfix/files/postfix-install.patch b/meta-networking/recipes-daemons/postfix/files/postfix-install.patch deleted file mode 100644 index 45479bd52a..0000000000 --- a/meta-networking/recipes-daemons/postfix/files/postfix-install.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: postfix-3.2.2/postfix-install -=================================================================== ---- postfix-3.2.2.orig/postfix-install -+++ postfix-3.2.2/postfix-install -@@ -843,7 +843,7 @@ IFS="$BACKUP_IFS" - # the wrong place when Postfix is being upgraded. - - case "$mail_version" in --"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1 -+"") mail_version="`$POSTCONF -c $CONFIG_DIRECTORY -dhx mail_version`" || exit 1 - esac - - # Undo MAIL_VERSION expansion at the end of a parameter value. If -Index: postfix-3.2.2/Makefile.in -=================================================================== ---- postfix-3.2.2.orig/Makefile.in -+++ postfix-3.2.2/Makefile.in -@@ -20,7 +20,7 @@ META = meta/main.cf.proto meta/master.cf - EXPAND = sed -e "s;\$${LIB_PREFIX};$(LIB_PREFIX);" \ - -e "s;\$${LIB_SUFFIX};$(LIB_SUFFIX);" - SHLIB_DIR_OVERRIDE = \ -- $${shlib_directory:-`$(SHLIB_ENV) bin/postconf -dhx shlib_directory`} -+ $${shlib_directory:-`$(SHLIB_ENV) $(POSTCONF) -dhx shlib_directory`} - - default: update - diff --git a/meta-networking/recipes-daemons/postfix/files/postfix.service b/meta-networking/recipes-daemons/postfix/files/postfix.service index 3a9a0a1813..30d54a4405 100644 --- a/meta-networking/recipes-daemons/postfix/files/postfix.service +++ b/meta-networking/recipes-daemons/postfix/files/postfix.service @@ -7,7 +7,7 @@ Conflicts=sendmail.service exim.service Type=forking PIDFile=@LOCALSTATEDIR@/spool/postfix/pid/master.pid ExecStartPre=-@SBINDIR@/check_hostname.sh -ExecStartPre=-@LIBEXECDIR@/aliasesdb +ExecStartPre=-@LIBEXECDIR@/postfix/aliasesdb ExecStart=@SBINDIR@/postfix start ExecReload=@SBINDIR@/postfix reload ExecStop=@SBINDIR@/postfix stop diff --git a/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb b/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb deleted file mode 100644 index 89af406ac3..0000000000 --- a/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb +++ /dev/null @@ -1,9 +0,0 @@ -require postfix.inc - -SRC_URI += "file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \ - file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ - file://postfix-install.patch \ - file://icu-config.patch \ - " -SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0" -SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576" diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix_3.8.6.bb index e48fc39f2e..d48e9145f8 100644 --- a/meta-networking/recipes-daemons/postfix/postfix.inc +++ b/meta-networking/recipes-daemons/postfix/postfix_3.8.6.bb @@ -6,25 +6,31 @@ has a definite Sendmail-ish flavor, but the inside is completely different." HOMEPAGE= "http://www.postfix.org" SECTION = "mail" -DEPENDS = "db icu libpcre openssl postfix-native \ +DEPENDS = "db icu libpcre libnsl2 m4-native openssl postfix-native \ ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \ " -DEPENDS_class-native = "db-native icu-native openssl-native libpcre-native" - -LICENSE = "IPL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=64375f37431336ea1b1b3005fe3fa354" - -SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ - file://makedefs.patch \ - file://install.patch \ - file://main.cf \ - file://postfix \ - file://internal_recipient \ - file://postfix.service \ - file://aliasesdb \ - file://check_hostname.sh \ -" + +LICENSE = "IPL-1.0 | EPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b181651ad99a7dc4cc8c4ce2f491ed1a" + +SRC_URI = "http://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ + file://main.cf \ + file://postfix \ + file://internal_recipient \ + file://postfix.service \ + file://aliasesdb \ + file://check_hostname.sh \ + file://0001-Fix-makedefs.patch \ + file://0002-Change-fixed-postconf-to-a-variable-for-cross-compil.patch \ + file://0003-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ + file://0004-Fix-icu-config.patch \ + file://0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \ + " + +SRC_URI[sha256sum] = "4b6e17c826cc438cc3016a9c0a55ea7e77c6cbafba7dd57241d81b690b0e9774" + +UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.8(\.\d+)+).tar.gz" S = "${WORKDIR}/postfix-${PV}" @@ -32,16 +38,16 @@ CLEANBROKEN = "1" BBCLASSEXTEND = "native" -inherit update-rc.d useradd update-alternatives systemd +inherit pkgconfig update-rc.d useradd update-alternatives systemd lib_package INITSCRIPT_NAME = "postfix" INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ." -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = \ +USERADD_PACKAGES = "${PN}-bin" +USERADD_PARAM:${PN}-bin = \ "-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \ -d /var/spool/vmail -r -g vmail --shell /bin/false vmail \ " -GROUPADD_PARAM_${PN} = "--system postfix;--system postdrop;--system vmail" +GROUPADD_PARAM:${PN}-bin = "--system postfix;--system postdrop;--system vmail" export SYSLIBS = "${LDFLAGS}" @@ -57,10 +63,10 @@ export AUXLIBS-ldap = "\ ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', '-lldap -llber', '', d)}" # no native openldap -export CCARGS-ldap_class-native = "" -export AUXLIBS-ldap_class-native = "" +export CCARGS-ldap:class-native = "" +export AUXLIBS-ldap:class-native = "" -export CCARGS-nonis_libc-musl = "-DNO_NIS" +export CCARGS-nonis:libc-musl = "-DNO_NIS" export CCARGS-nonis = "" # SASL support -DUSE_LDAP_SASL -DUSE_SASL_AUTH @@ -69,15 +75,14 @@ export CCARGS-sasl = "\ ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${STAGING_INCDIR}/sasl', '', d)}" export AUXLIBS-sasl = "\ ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', '-lsasl2', '', d)}" -export CCARGS-sasl_class-native = "" -export AUXLIBS-sasl_class-native = "" +export CCARGS-sasl:class-native = "" +export AUXLIBS-sasl:class-native = "" # PCRE, TLS support default export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}" export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}" export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf" -export CCARGS-nonis_libc-musl = "-DNO_NIS" # OPT,DEBUG is aready in CFLAGS # ignore the OPTS="CC=$CC" in Makefile it will not use the CC=$CC $CCARGS EXTRA_OEMAKE += "OPT= DEBUG= OPTS= " @@ -99,38 +104,20 @@ do_compile () { "s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \ ${S}/Makefile.in export BUILD_SYSROOT="${STAGING_DIR_HOST}" - export BUILD_SYSROOT_NSL_PATH="${STAGING_BASELIBDIR} \ - ${STAGING_LIBDIR}" else # native build export BUILD_SYSROOT="${STAGING_DIR_NATIVE}" - - # ubuntu x86 host: /lib/x86_64-linux-gnu(64) /lib/i386-linux-gnu (32) - # on 64 bits, 32 libs in i386-linux-gnu - # let makedefs finds nsl and resolv libs, host CC will link - # the correct libraries - BUILD_SYSROOT_NSL_PATH="$(${CC} -print-search-dirs 2>/dev/null | \ - sed -n '/^libraries: =/s/libraries: =//p' | \ - sed -e 's/:/\n/g' | xargs -n1 readlink -f | \ - grep -v 'gcc\|/[0-9.]\+$' | sort -u)" - if [ -z "$BUILD_SYSROOT_NSL_PATH" ]; then - BUILD_SYSROOT_NSL_PATH="/usr/lib64 /lib64 \ - /lib/x86_64-linux-gnu \ - /usr/lib /lib \ - /lib/i386-linux-gnu" - fi - export BUILD_SYSROOT_NSL_PATH fi oe_runmake makefiles oe_runmake } -do_install_prepend_class-native() { +do_install:prepend:class-native() { export POSTCONF="bin/postconf" } -SYSTEMD_SERVICE_${PN} = "postfix.service" +SYSTEMD_SERVICE:${PN} = "postfix.service" do_install () { sh ./postfix-install 'install_root=${D}' \ @@ -146,24 +133,24 @@ do_install () { 'data_directory=${localstatedir}/lib/postfix' \ -non-interactive rm -rf ${D}${localstatedir}/spool/postfix - mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf + mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/${MLPREFIX}sample-main.cf install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/ install -d ${D}${sysconfdir}/init.d - install -m 644 ${WORKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf - sed -i 's#@LIBEXECDIR@#${libexecdir}/postfix#' ${D}${sysconfdir}/postfix/main.cf + install -m 644 ${UNPACKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf + sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf - install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/ + install -m 755 ${UNPACKDIR}/check_hostname.sh ${D}${sbindir}/ - install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix - install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient + install -m 755 ${UNPACKDIR}/postfix ${D}${sysconfdir}/init.d/postfix + install -m 644 ${UNPACKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system - sed -i -e 's#@LIBEXECDIR@#${libexecdir}/postfix#g' ${D}${systemd_unitdir}/system/postfix.service + install -m 0644 ${UNPACKDIR}/postfix.service ${D}${systemd_unitdir}/system + sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/postfix.service sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service - install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}/postfix + install -m 0755 ${UNPACKDIR}/aliasesdb ${D}${libexecdir}/postfix install -m 770 -d ${D}${localstatedir}/spool/postfix chown postfix:postfix ${D}${localstatedir}/spool/postfix @@ -207,52 +194,47 @@ do_install () { chown :postdrop ${D}${sbindir}/postdrop chmod g+s ${D}${sbindir}/postqueue chmod g+s ${D}${sbindir}/postdrop + + rm -rf ${D}/etc/postfix/makedefs.out } -do_install_append_class-native() { +do_install:append:class-native() { ln -sf ../sbin/sendmail.postfix ${D}${bindir}/newaliases ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq } -do_install_append_class-target() { - # Remove references to buildmachine paths in target makedefs.out - sed -i 's:-fdebug-prefix-map[^ ]*::g; s:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out - # Since we are building recipe postfix, newaliases and postmap come from our sysroot_native. - touch ${D}/etc/aliases - newaliases -C ${D}/etc/postfix/main.cf -oA${D}/etc/aliases - touch ${D}/etc/postfix/virtual_alias - postmap -c ${D}/etc/postfix ${D}/etc/postfix/virtual_alias - -} - -ALTERNATIVE_${PN} = "sendmail" +ALTERNATIVE:${PN}-bin = "sendmail mailq newaliases" +# /usr/lib/sendmial is required by LSB core test +ALTERNATIVE:${PN}-bin:linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail" +ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq" +ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases" ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix" ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" +ALTERNATIVE_TARGET[usr-lib-sendmail] = "${sbindir}/sendmail.postfix" +ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail" + ALTERNATIVE_PRIORITY = "120" -ALTERNATIVE_${PN}-doc += "mailq.1 newaliases.1 sendmail.1" +ALTERNATIVE:${PN}-doc += "mailq.1 newaliases.1 sendmail.1" ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1" ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1" ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1" -pkg_postinst_${PN} () { - if [ "x$D" = "x" ]; then - touch /etc/aliases - newaliases +pkg_postinst_ontarget:${PN}-cfg () { + touch /etc/aliases + newaliases - # generate virtual_alias, default is hash - touch /etc/postfix/virtual_alias - postmap /etc/postfix/virtual_alias - else - if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then - # /usr/lib/sendmail is required by LSB core test - [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/ - fi - fi + # generate virtual_alias, default is hash + touch /etc/postfix/virtual_alias + postmap /etc/postfix/virtual_alias } +PACKAGES =+ "${PN}-cfg" +RDEPENDS:${PN}-cfg:class-target += "${PN}-bin" +RDEPENDS:${PN}:class-target += "${PN}-cfg" # Exclude .debug directories from the main package -FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \ +FILES:${PN}-bin += "${localstatedir} ${bindir}/* ${sbindir}/* \ ${libexecdir}/* ${systemd_unitdir}/*" -CONFFILES_${PN} = "/etc/aliases /etc/postfix/virtual_alias*" -FILES_${PN}-dbg += "${libexecdir}/postfix/.debug" +FILES:${PN}-cfg = "${sysconfdir}" +FILES:${PN}-dbg += "${libexecdir}/postfix/.debug" +ALLOW_EMPTY:${PN} = "1" diff --git a/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch b/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch index 9816d4d22a..8126b3619a 100644 --- a/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch +++ b/meta-networking/recipes-daemons/proftpd/files/build_fixup.patch @@ -6,13 +6,13 @@ make, move-pidfile-to-var-run, move-runfile-to-var-run move pidfile to /var/run redefine PR_RUN_DIR as ${localstatedir}/run -Signed-off-By: Armin Kuster <akuster808@gmail.com> +Signed-off-by: Armin Kuster <akuster808@gmail.com> -Index: proftpd-1.3.6/Make.rules.in -=================================================================== ---- proftpd-1.3.6.orig/Make.rules.in -+++ proftpd-1.3.6/Make.rules.in +diff --git a/Make.rules.in b/Make.rules.in +index a5028ac..ccd7807 100644 +--- a/Make.rules.in ++++ b/Make.rules.in @@ -30,9 +30,9 @@ INSTALL=@INSTALL@ INSTALL_STRIP=@INSTALL_STRIP@ INSTALL_USER=@install_user@ @@ -26,11 +26,11 @@ Index: proftpd-1.3.6/Make.rules.in RM=rm -f SHELL=@CONFIG_SHELL@ -Index: proftpd-1.3.6/Makefile.in -=================================================================== ---- proftpd-1.3.6.orig/Makefile.in -+++ proftpd-1.3.6/Makefile.in -@@ -105,7 +105,6 @@ check: proftpd$(EXEEXT) +diff --git a/Makefile.in b/Makefile.in +index 9434cbd..13f2e16 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -123,7 +123,6 @@ check: proftpd$(EXEEXT) $(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(libdir)/proftpd $(DESTDIR)$(libexecdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8: @if [ ! -d $@ ]; then \ mkdir -p $@; \ @@ -38,20 +38,20 @@ Index: proftpd-1.3.6/Makefile.in chmod 0755 $@; \ fi -@@ -115,7 +114,6 @@ install-proftpd: proftpd $(DESTDIR)$(inc +@@ -133,7 +132,6 @@ install-proftpd: proftpd$(EXEEXT) $(DESTDIR)$(includedir) $(DESTDIR)$(localstate rm -f $(DESTDIR)$(sbindir)/in.proftpd ; \ fi - ln -s proftpd $(DESTDIR)$(sbindir)/in.proftpd + ln -s $(top_builddir)/proftpd $(DESTDIR)$(sbindir)/in.proftpd - -chown -h $(INSTALL_USER):$(INSTALL_GROUP) $(DESTDIR)$(sbindir)/in.proftpd install-libs: $(DESTDIR)$(libdir)/proftpd cd lib/ && $(MAKE) install -@@ -152,11 +150,11 @@ install-utils: $(DESTDIR)$(sbindir) $(DE - $(INSTALL_SBIN) ftpshut $(DESTDIR)$(sbindir)/ftpshut - $(INSTALL_BIN) ftptop $(DESTDIR)$(bindir)/ftptop - $(INSTALL_BIN) ftpwho $(DESTDIR)$(bindir)/ftpwho -- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 src/prxs $(DESTDIR)$(bindir)/prxs -+ $(INSTALL) -m 0755 src/prxs $(DESTDIR)$(bindir)/prxs +@@ -170,11 +168,11 @@ install-utils: $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir) + $(INSTALL_SBIN) $(top_builddir)/ftpshut $(DESTDIR)$(sbindir)/ftpshut + $(INSTALL_BIN) $(top_builddir)/ftptop $(DESTDIR)$(bindir)/ftptop + $(INSTALL_BIN) $(top_builddir)/ftpwho $(DESTDIR)$(bindir)/ftpwho +- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(top_builddir)/src/prxs $(DESTDIR)$(bindir)/prxs ++ $(INSTALL) -m 0755 $(top_builddir)/src/prxs $(DESTDIR)$(bindir)/prxs install-conf: $(DESTDIR)$(sysconfdir) if [ ! -f $(DESTDIR)$(sysconfdir)/proftpd.conf ] ; then \ @@ -60,11 +60,11 @@ Index: proftpd-1.3.6/Makefile.in $(top_srcdir)/sample-configurations/basic.conf \ $(DESTDIR)$(sysconfdir)/proftpd.conf ; \ fi -Index: proftpd-1.3.6/configure -=================================================================== ---- proftpd-1.3.6.orig/configure -+++ proftpd-1.3.6/configure -@@ -41777,7 +41777,7 @@ _ACEOF +diff --git a/configure b/configure +index 0a51670..69fa130 100755 +--- a/configure ++++ b/configure +@@ -25116,7 +25116,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF @@ -73,7 +73,7 @@ Index: proftpd-1.3.6/configure _ACEOF -@@ -41787,7 +41787,7 @@ _ACEOF +@@ -25126,7 +25126,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF @@ -82,11 +82,11 @@ Index: proftpd-1.3.6/configure _ACEOF -Index: proftpd-1.3.6/configure.in -=================================================================== ---- proftpd-1.3.6.orig/configure.in -+++ proftpd-1.3.6/configure.in -@@ -3833,8 +3833,8 @@ locale_dir="`eval echo ${locale_dir}`" +diff --git a/configure.in b/configure.in +index 50561de..93cad3f 100644 +--- a/configure.in ++++ b/configure.in +@@ -4059,8 +4059,8 @@ locale_dir="`eval echo ${locale_dir}`" AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`", [Define the locale directory]) AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`", [Define the run directory]) @@ -97,16 +97,3 @@ Index: proftpd-1.3.6/configure.in prefix="$pr_saved_prefix" exec_prefix="$pr_saved_exec_prefix" -Index: proftpd-1.3.6/lib/libcap/Makefile -=================================================================== ---- proftpd-1.3.6.orig/lib/libcap/Makefile -+++ proftpd-1.3.6/lib/libcap/Makefile -@@ -26,7 +26,7 @@ OBJS=$(addsuffix .o, $(FILES)) - all: $(LIBNAME) - - _makenames: _makenames.c cap_names.sed -- $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ -+ $(BUILD_CC) $(CFLAGS) $(LDFLAGS) $< -o $@ - - cap_names.h: _makenames - ./_makenames > cap_names.h diff --git a/meta-networking/recipes-daemons/proftpd/files/contrib.patch b/meta-networking/recipes-daemons/proftpd/files/contrib.patch index 7e2a8e3ce0..96c237d386 100644 --- a/meta-networking/recipes-daemons/proftpd/files/contrib.patch +++ b/meta-networking/recipes-daemons/proftpd/files/contrib.patch @@ -11,32 +11,29 @@ Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com> 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in -index 5b2e683..ee72fe1 100644 +index 9434cbd..8da7d1f 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -120,7 +120,7 @@ install-modules: $(DESTDIR)$(libexecdir) $(DESTDIR)$(sysconfdir) +@@ -163,7 +163,7 @@ install-modules: $(DESTDIR)$(libexecdir) $(DESTDIR)$(sysconfdir) test -z "$(SHARED_MODULE_OBJS)" -a -z "$(SHARED_MODULE_DIRS)" -a -z "$(STATIC_MODULE_DIRS)" || (cd modules/ && $(MAKE) install) install-utils: $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir) - cd contrib/ && $(MAKE) install-utils + cd contrib/ && $(MAKE) DESTDIR=${DESTDIR} install-utils - $(INSTALL_BIN) ftpcount $(DESTDIR)$(bindir)/ftpcount - $(INSTALL_BIN) ftpdctl $(DESTDIR)$(bindir)/ftpdctl - $(INSTALL_SBIN) ftpscrub $(DESTDIR)$(sbindir)/ftpscrub + $(INSTALL_BIN) $(top_builddir)/ftpcount $(DESTDIR)$(bindir)/ftpcount + $(INSTALL_BIN) $(top_builddir)/ftpdctl $(DESTDIR)$(bindir)/ftpdctl + $(INSTALL_SBIN) $(top_builddir)/ftpscrub $(DESTDIR)$(sbindir)/ftpscrub diff --git a/contrib/Makefile.in b/contrib/Makefile.in -index 5bcc038..51d248c 100644 +index d1a31af..65d2abc 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in -@@ -18,6 +18,6 @@ Makefile: Makefile.in ../config.status +@@ -17,6 +17,6 @@ Makefile: Makefile.in ../config.status cd ../ && ./config.status install-utils: -- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpasswd $(DESTDIR)$(bindir)/ftpasswd -- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpmail $(DESTDIR)$(bindir)/ftpmail -- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpquota $(DESTDIR)$(bindir)/ftpquota -+ $(INSTALL) -m 0755 ftpasswd $(DESTDIR)$(bindir)/ftpasswd -+ $(INSTALL) -m 0755 ftpmail $(DESTDIR)$(bindir)/ftpmail -+ $(INSTALL) -m 0755 ftpquota $(DESTDIR)$(bindir)/ftpquota --- -1.7.9.5 - +- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(srcdir)/ftpasswd $(DESTDIR)$(bindir)/ftpasswd +- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(srcdir)/ftpmail $(DESTDIR)$(bindir)/ftpmail +- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(srcdir)/ftpquota $(DESTDIR)$(bindir)/ftpquota ++ $(INSTALL) -m 0755 $(srcdir)/ftpasswd $(DESTDIR)$(bindir)/ftpasswd ++ $(INSTALL) -m 0755 $(srcdir)/ftpmail $(DESTDIR)$(bindir)/ftpmail ++ $(INSTALL) -m 0755 $(srcdir)/ftpquota $(DESTDIR)$(bindir)/ftpquota diff --git a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.7c.bb index 409947265d..aa8d5fabd6 100644 --- a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb +++ b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.7c.bb @@ -1,10 +1,13 @@ SUMMARY = "Secure and configurable FTP server" SECTION = "net" HOMEPAGE = "http://www.proftpd.org" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=fb0d1484d11915fa88a6a7702f1dc184" -SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \ +SRCREV = "75aa739805a6e05eeb31189934a3d324e7862962" +BRANCH = "1.3.7" + +SRC_URI = "git://github.com/proftpd/proftpd.git;branch=${BRANCH};protocol=https \ file://basic.conf.patch \ file://proftpd-basic.init \ file://default \ @@ -13,13 +16,16 @@ SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \ file://build_fixup.patch \ file://proftpd.service \ " -iSRC_URI[md5sum] = "13270911c42aac842435f18205546a1b" -SRC_URI[sha256sum] = "91ef74b143495d5ff97c4d4770c6804072a8c8eb1ad1ecc8cc541b40e152ecaf" -inherit autotools-brokensep useradd update-rc.d systemd +S = "${WORKDIR}/git" + +inherit autotools-brokensep useradd update-rc.d systemd multilib_script + +EXTRA_OECONF += "--enable-largefile" PACKAGECONFIG ??= "shadow \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ + static \ " PACKAGECONFIG[curses] = "--enable-curses --enable-ncurses, --disable-curses --disable-ncurses, ncurses" @@ -28,6 +34,7 @@ PACKAGECONFIG[pam] = "--enable-auth-pam, --disable-auth-pam, libpam, libpam" PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6" PACKAGECONFIG[shadow] = "--enable-shadow, --disable-shadow" PACKAGECONFIG[pcre] = "--enable-pcre, --disable-pcre, libpcre " +PACKAGECONFIG[static] = "--enable-static=yes, --enable-static=no" # enable POSIX.1e capabilities PACKAGECONFIG[cap] = "--enable-cap, --disable-cap, libcap, libcap" @@ -53,19 +60,16 @@ PACKAGECONFIG[nls] = "--enable-nls, --disable-nls" #add mod_dso to core modules PACKAGECONFIG[dso] = "--enable-dso, --disable-dso" -PACKAGECONFIG[largefile] = "--enable-largefile, --disable-largefile" #omit mod_auth_file from core modules PACKAGECONFIG[auth] = "--enable-auth-file, --disable-auth-file" - # proftpd uses libltdl which currently makes configuring using # autotools.bbclass a pain... do_configure () { install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} oe_runconf - cp ${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool ${S}/libtool } FTPUSER = "ftp" @@ -78,14 +82,14 @@ do_install () { sed -i '/ *User[ \t]*/s/ftp/${FTPUSER}/' ${D}${sysconfdir}/proftpd.conf sed -i '/ *Group[ \t]*/s/ftp/${FTPGROUP}/' ${D}${sysconfdir}/proftpd.conf install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd + install -m 0755 ${UNPACKDIR}/proftpd-basic.init ${D}${sysconfdir}/init.d/proftpd sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/proftpd sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/proftpd sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/proftpd sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/proftpd install -d ${D}${sysconfdir}/default - install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/proftpd + install -m 0755 ${UNPACKDIR}/default ${D}${sysconfdir}/default/proftpd # create the pub directory mkdir -p ${D}/home/${FTPUSER}/pub/ @@ -101,7 +105,7 @@ do_install () { fi install -d ${D}/${systemd_unitdir}/system - install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system + install -m 644 ${UNPACKDIR}/proftpd.service ${D}/${systemd_unitdir}/system sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ -e 's,@SYSCONFDIR@,${sysconfdir},g' \ -e 's,@SBINDIR@,${sbindir},g' \ @@ -109,7 +113,9 @@ do_install () { sed -e 's|--sysroot=${STAGING_DIR_HOST}||g' \ -e 's|${STAGING_DIR_NATIVE}||g' \ + -e 's|-ffile-prefix-map=[^ ]*||g' \ -e 's|-fdebug-prefix-map=[^ ]*||g' \ + -e 's|-fmacro-prefix-map=[^ ]*||g' \ -i ${D}/${bindir}/prxs # ftpmail perl script, which reads the proftpd log file and sends @@ -126,13 +132,15 @@ INITSCRIPT_NAME = "proftpd" INITSCRIPT_PARAM = "defaults 85 15" SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = "proftpd.service" +SYSTEMD_SERVICE:${PN} = "proftpd.service" USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}" -USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \ +GROUPADD_PARAM:${PN} = "--system ${FTPGROUP}" +USERADD_PARAM:${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \ --shell /bin/false ${FTPUSER}" -FILES_${PN} += "/home/${FTPUSER}" +MULTILIB_SCRIPTS = "${PN}:${bindir}/prxs" + +FILES:${PN} += "/home/${FTPUSER}" -RDEPENDS_${PN} += "perl" +RDEPENDS:${PN} += "perl" diff --git a/meta-networking/recipes-daemons/ptpd/ptpd/0001-ptpd-Solve-memory-leak-for-function-NTPDCrequest.patch b/meta-networking/recipes-daemons/ptpd/ptpd/0001-ptpd-Solve-memory-leak-for-function-NTPDCrequest.patch new file mode 100644 index 0000000000..b2caeba2ca --- /dev/null +++ b/meta-networking/recipes-daemons/ptpd/ptpd/0001-ptpd-Solve-memory-leak-for-function-NTPDCrequest.patch @@ -0,0 +1,40 @@ +From 3886219c5c1fdca114dd480b46ce211762e30742 Mon Sep 17 00:00:00 2001 +From: Li Zhou <li.zhou@windriver.com> +Date: Tue, 30 Jun 2020 13:50:11 +0800 +Subject: [PATCH] ptpd: Solve memory leak for function NTPDCrequest + +Solve the memory leak in function NTPDCrequest detected by valgrind tool. + +Memory leak log example: +==619== 21 bytes in 1 blocks are still reachable in loss record 1 of 3 +==619== at 0x4A09DB0: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) +==619== by 0x43512E: NTPDCrequest (ntpdcontrol.c:255) +==619== by 0x43512E: NTPDCquery.isra.1 (ntpdcontrol.c:683) +==619== by 0x4359EE: ntpdInControl (ntpdcontrol.c:807) +==619== by 0x4364F5: ntpServiceUpdate (timingdomain.c:622) +==619== by 0x436935: timingDomainUpdate (timingdomain.c:756) +==619== by 0x4334A7: protocol (protocol.c:263) +==619== by 0x402BAE: main (ptpd.c:131) + +Upstream-Status: Pending + +Signed-off-by: Li Zhou <li.zhou@windriver.com> +--- + src/dep/ntpengine/ntpdcontrol.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/dep/ntpengine/ntpdcontrol.c b/src/dep/ntpengine/ntpdcontrol.c +index bfe0b5e..b1973cb 100644 +--- a/src/dep/ntpengine/ntpdcontrol.c ++++ b/src/dep/ntpengine/ntpdcontrol.c +@@ -271,6 +271,7 @@ NTPDCrequest( + + if (!auth) { + qpkt.auth_seq = AUTH_SEQ(0, 0); ++ free(key); + return ntpSend(control, (Octet *)&qpkt, req_pkt_size); + } + +-- +1.9.1 + diff --git a/meta-networking/recipes-daemons/ptpd/ptpd/Fixed-100-CPU-using-issue-by-adding-minimum-POSIX-ti.patch b/meta-networking/recipes-daemons/ptpd/ptpd/Fixed-100-CPU-using-issue-by-adding-minimum-POSIX-ti.patch new file mode 100644 index 0000000000..91028d82bc --- /dev/null +++ b/meta-networking/recipes-daemons/ptpd/ptpd/Fixed-100-CPU-using-issue-by-adding-minimum-POSIX-ti.patch @@ -0,0 +1,67 @@ +From e00d3f52ccc6496a60992ac5a9d771b1d067eceb Mon Sep 17 00:00:00 2001 +From: Haiqing Bai <Haiqing.Bai@windriver.com> +Date: Thu, 22 Nov 2018 08:42:48 +0000 +Subject: [PATCH] Fixed 100% CPU using issue by adding minimum POSIX timer + interval + +Added minimum POSIX timer interval to prevent from timers firing +to quickly for the process to handle, resulting in 100% CPU and +endless signal queue. + +Upstream-Status: Backport [From commit 1f0baae98a7b23e85f2bfd8f5de64795421c270e: + - critical: added minimum POSIX timer interval to prevent from + timers firing to quickly for the process to handle, + resulting in 100% CPU and endless signal queue] + +Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> +--- + src/dep/eventtimer.h | 3 ++- + src/dep/eventtimer_itimer.c | 2 +- + src/dep/eventtimer_posix.c | 4 ++++ + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/dep/eventtimer.h b/src/dep/eventtimer.h +index 64e483a..0a21318 100644 +--- a/src/dep/eventtimer.h ++++ b/src/dep/eventtimer.h +@@ -30,7 +30,8 @@ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +-#define EVENTTIMER_MAX_DESC 20 ++#define EVENTTIMER_MAX_DESC 20 ++#define EVENTTIMER_MIN_INTERVAL_US 250 /* 4000/sec */ + + typedef struct EventTimer EventTimer; + +diff --git a/src/dep/eventtimer_itimer.c b/src/dep/eventtimer_itimer.c +index cf3c6db..3bb7ec6 100644 +--- a/src/dep/eventtimer_itimer.c ++++ b/src/dep/eventtimer_itimer.c +@@ -53,7 +53,7 @@ + + #include "../ptpd.h" + +-#define US_TIMER_INTERVAL (62500) ++#define US_TIMER_INTERVAL (31250) + + static volatile unsigned int elapsed; + +diff --git a/src/dep/eventtimer_posix.c b/src/dep/eventtimer_posix.c +index 637eef3..f4a702d 100644 +--- a/src/dep/eventtimer_posix.c ++++ b/src/dep/eventtimer_posix.c +@@ -100,6 +100,10 @@ eventTimerStart_posix(EventTimer *timer, double interval) + ts.tv_sec = interval; + ts.tv_nsec = (interval - ts.tv_sec) * 1E9; + ++ if(!ts.tv_sec && ts.tv_nsec < EVENTTIMER_MIN_INTERVAL_US * 1000) { ++ ts.tv_nsec = EVENTTIMER_MIN_INTERVAL_US * 1000; ++ } ++ + DBGV("Timer %s start requested at %d.%4d sec interval\n", timer->id, ts.tv_sec, ts.tv_nsec); + + its.it_interval = ts; +-- +2.11.0 + diff --git a/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch b/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch index e4578dda74..cb8c81385b 100644 --- a/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch +++ b/meta-networking/recipes-daemons/ptpd/ptpd/ptpd-use-pkgconfig.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ptpd: use pkgconfig Yocto uses pkg-config for libpcap, rather than pcap-config, so use that instead as the source for libs and cflags. -Upstream-status: Inappropriate [ embedded specific ] +Upstream-Status: Inappropriate [ embedded specific ] Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> --- diff --git a/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb b/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb index e136193205..f2c300855c 100644 --- a/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb +++ b/meta-networking/recipes-daemons/ptpd/ptpd_2.3.1.bb @@ -5,7 +5,7 @@ and PTP Version 2 implements IEEE-1588-2008. PTP was developed to provide very p time coordination of LAN connected computers." HOMEPAGE = "http://sourceforge.net/projects/ptpd" SECTION = "net" -LICENSE = "BSD" +LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://README;md5=0733e1b3788ab2ebbc63bf33a020da1d" DEPENDS = "libpcap" @@ -23,6 +23,8 @@ def get_sub(d): SRC_URI = "http://downloads.sourceforge.net/project/ptpd/ptpd/${@get_sub(d)}/ptpd-${PV}.tar.gz \ file://ptpd-use-pkgconfig.patch \ + file://Fixed-100-CPU-using-issue-by-adding-minimum-POSIX-ti.patch \ + file://0001-ptpd-Solve-memory-leak-for-function-NTPDCrequest.patch \ file://ptpd.service \ file://ptpd.conf \ " @@ -30,6 +32,8 @@ SRC_URI = "http://downloads.sourceforge.net/project/ptpd/ptpd/${@get_sub(d)}/ptp SRC_URI[md5sum] = "253bab7ab51d969616ea811be1f132f3" SRC_URI[sha256sum] = "0dbf54dd2c178bd9fe62481d2c37513ee36636d8bf137cfdad96891490cdbf93" +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/ptpd/files/releases" + S = "${WORKDIR}/ptpd-${PV}" EXTRA_OEMAKE = "" @@ -43,16 +47,16 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/ptpd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/ptpd.service ${D}${systemd_unitdir}/system sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/ptpd.service sed -i -e 's#@BINDIR@#${bindir}#g' ${D}${systemd_unitdir}/system/ptpd.service install -d ${D}${sysconfdir}/default/ - install -m 0644 ${WORKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd + install -m 0644 ${UNPACKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd fi } SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = "ptpd.service" +SYSTEMD_SERVICE:${PN} = "ptpd.service" SYSTEMD_AUTO_ENABLE = "disable" diff --git a/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch b/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch index 76523fb997..c213943d53 100644 --- a/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch +++ b/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch @@ -1,4 +1,4 @@ -From 1bafadf2502334a3e972ff667061469316d0d2ca Mon Sep 17 00:00:00 2001 +From a45e086661a3eed29193546c525998d7525ef6d9 Mon Sep 17 00:00:00 2001 From: Tudor Florea <tudor.florea@enea.com> Date: Tue, 4 Aug 2015 02:46:39 +0200 Subject: [PATCH] Remove hardcoded /usr/local includes from configure.ac @@ -7,33 +7,43 @@ Upstream-Status: Inappropriate [config] Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com> Signed-off-by: Tudor Florea <tudor.florea@enea.com> + +Update for 1.0.49. +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> + +Update for 1.0.51. +Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> --- - configure.ac | 12 ------------ - 1 file changed, 12 deletions(-) + configure.ac | 16 ---------------- + 1 file changed, 16 deletions(-) diff --git a/configure.ac b/configure.ac -index 6c78e8c..851d45d 100644 +index 62768c8..efaeee5 100644 --- a/configure.ac +++ b/configure.ac -@@ -100,18 +100,6 @@ AC_ARG_VAR(PYTHON,local path to the python interpreter) - python_possible_path="/usr/bin:/usr/local/bin:/bin:/opt/python/bin:/opt/python/usr/bin:/opt/python/usr/local/bin" - AC_PATH_PROG(PYTHON,python,/usr/bin/env python,$python_possible_path) +@@ -97,22 +97,6 @@ AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"]) + AX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS="$LDFLAGS -Wl,-z,now"]) + AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"]) --if test -d /usr/local/include; then -- CPPFLAGS="$CPPFLAGS -I/usr/local/include" --fi -- --if test -d /usr/kerberos/include; then -- CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" --fi -- --if test -d /usr/local/lib; then -- LDFLAGS="$LDFLAGS -L/usr/local/lib" +-if test "x$cross_compiling" != "xyes"; then +- for path in \ +- /usr/kerberos \ +- /usr/local /opt /usr/local/opt \ +- /opt/homebrew/opt/openssl@3 /usr/local/opt/openssl@3 \ +- /opt/homebrew/opt/openssl@1.1 /usr/local/opt/openssl@1.1 \ +- /usr/openssl /opt/openssl /usr/local/opt/openssl; do +- if test -d $path/include; then +- CPPFLAGS="$CPPFLAGS -I${path}/include" +- fi +- if test -d $path/lib; then +- LDFLAGS="$LDFLAGS -L${path}/lib" +- fi +- done -fi - CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2" dnl Checks for header files -- -1.9.1 +2.25.1 diff --git a/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch b/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch index 4cb33bc5c8..32d714f6f4 100644 --- a/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch +++ b/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd/nostrip.patch @@ -1,7 +1,8 @@ -From 0290bd6f4ceddff2c52dff833c9d31d24de7d0e1 Mon Sep 17 00:00:00 2001 +From 79fd22c0def26eba130db98e312bb00fec32ac0a Mon Sep 17 00:00:00 2001 From: Tudor Florea <tudor.florea@enea.com> Date: Tue, 4 Aug 2015 03:07:01 +0200 -Subject: [PATCH] Don't mess with CFLAGS and LDFLAGS when --with-minimal is specified +Subject: [PATCH] Don't mess with CFLAGS and LDFLAGS when --with-minimal is + specified We especially don't want stripping enabled. @@ -9,15 +10,16 @@ Upstream-Status: Inappropriate [config] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Tudor Florea <tudor.florea@enea.com> + --- configure.ac | 2 -- 1 file changed, 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 851d45d..dc410a1 100644 +index 695ce68..0f28b55 100644 --- a/configure.ac +++ b/configure.ac -@@ -423,8 +423,6 @@ AC_ARG_WITH(minimal, +@@ -414,8 +414,6 @@ AC_ARG_WITH(minimal, AC_DEFINE(NO_FTP_USERS) AC_DEFINE(WITHOUT_ASCII) AC_DEFINE(BORING_MODE) @@ -26,6 +28,3 @@ index 851d45d..dc410a1 100644 fi ]) AC_ARG_WITH(paranoidmsg, --- -1.9.1 - diff --git a/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb b/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.51.bb index c1f1504055..6f03f73db5 100644 --- a/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb +++ b/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.51.bb @@ -2,21 +2,18 @@ SUMMARY = "FTP Server with a strong focus on software security" DESCRIPTION = "Pure-FTPd is a free (BSD license), secure, production-quality and standard-conformant FTP server." HOMEPAGE = "http://www.pureftpd.org/project/pure-ftpd" SECTION = "net" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=90352fb2bfe17f4261687a0d6e09f489" - -DEPENDS = "libcap" +LICENSE = "0BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=194bc994ad6bbd4ff5a021082fe52156" +DEPENDS = "libcap virtual/crypt" SRC_URI = "http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-${PV}.tar.gz \ file://0001-Remove-hardcoded-usr-local-includes-from-configure.a.patch \ file://nostrip.patch \ " -SRC_URI[md5sum] = "4195af8f0e5ee2a798b1014071dae3a3" -SRC_URI[sha256sum] = "7be73a8e58b190a7054d2ae00c5e650cb9e091980420082d02ec3c3b68d8e7f9" +SRC_URI[sha256sum] = "4160f66b76615eea2397eac4ea3f0a146b7928207b79bc4cc2f99ad7b7bd9513" inherit autotools -EXTRA_OECONF = "--with-minimal" PACKAGECONFIG[libsodium] ="ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=yes, \ - ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=no, libsodium" + ac_cv_lib_sodium_crypto_pwhash_scryptsalsa208sha256_str=no, libsodium" diff --git a/meta-networking/recipes-daemons/radvd/files/0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch b/meta-networking/recipes-daemons/radvd/files/0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch new file mode 100644 index 0000000000..57338d4713 --- /dev/null +++ b/meta-networking/recipes-daemons/radvd/files/0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch @@ -0,0 +1,32 @@ +From 15f439c555289f900eb33111b010bf1266f97edb Mon Sep 17 00:00:00 2001 +From: Jonathan Davies <jpds@protonmail.com> +Date: Thu, 25 Nov 2021 15:29:18 +0000 +Subject: [PATCH] Reverts the include.h change in + 46883f8a1a02fe42040dd8e48aec0ed871545d4d + +Closes: #158 + +Upstream-Status: Backport [https://github.com/radvd-project/radvd/commit/06689f8c06f44c7e87f7ff1d814428f88375b53f] +Signed-off-by: Jonathan Davies <jpds@protonmail.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + includes.h | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/includes.h b/includes.h +index ef30b10..c528c86 100644 +--- a/includes.h ++++ b/includes.h +@@ -76,12 +76,7 @@ + #include <sys/sysctl.h> + #endif + +-#if !defined(__GLIBC__) && defined(linux) +-#include <linux/if.h> +-#define IF_NAMESIZE IFNAMSIZ +-#else + #include <net/if.h> +-#endif + + #ifdef HAVE_NET_IF_DL_H + #include <net/if_dl.h> diff --git a/meta-networking/recipes-daemons/radvd/files/radvd.conf b/meta-networking/recipes-daemons/radvd/files/radvd.conf new file mode 100644 index 0000000000..c006f86313 --- /dev/null +++ b/meta-networking/recipes-daemons/radvd/files/radvd.conf @@ -0,0 +1,18 @@ +# NOTE: there is no such thing as a working "by-default" configuration file. +# At least the prefix needs to be specified. Please consult the radvd.conf(5) +# man page and/or /usr/share/doc/radvd-*/radvd.conf.example for help. +# +# +#interface eth0 +#{ +# AdvSendAdvert on; +# MinRtrAdvInterval 30; +# MaxRtrAdvInterval 100; +# prefix 2001:db8:1:0::/64 +# { +# AdvOnLink on; +# AdvAutonomous on; +# AdvRouterAddr off; +# }; +# +#}; diff --git a/meta-networking/recipes-daemons/radvd/radvd_2.17.bb b/meta-networking/recipes-daemons/radvd/radvd_2.17.bb deleted file mode 100644 index 4baea01d07..0000000000 --- a/meta-networking/recipes-daemons/radvd/radvd_2.17.bb +++ /dev/null @@ -1,5 +0,0 @@ - -require radvd.inc - -SRC_URI[md5sum] = "64ee3fdb5544bcddef1c6cd80d77fa0a" -SRC_URI[sha256sum] = "53757e7f2164899e1145482f1ae91829600a6e2f6fec29cfb3b350a3bb45bd5d" diff --git a/meta-networking/recipes-daemons/radvd/radvd.inc b/meta-networking/recipes-daemons/radvd/radvd_2.19.bb index bff693ca97..a8a116cbe5 100644 --- a/meta-networking/recipes-daemons/radvd/radvd.inc +++ b/meta-networking/recipes-daemons/radvd/radvd_2.19.bb @@ -8,7 +8,7 @@ addresses and some other parameters. They also can \ choose a default router based on these advertisements." HOMEPAGE = "http://www.litech.org/radvd/" SECTION = "net" -DEPENDS = "flex-native libdaemon" +DEPENDS = "flex-native bison-native libdaemon " # License is BSD-Style (with advertising clause) but also has an additional 0th clause LICENSE = "radvd" @@ -18,49 +18,53 @@ SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \ file://radvd.init \ file://radvd.service \ file://volatiles.03_radvd \ - file://radvd.default" + file://radvd.default \ + file://radvd.conf \ + file://0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch \ + " +SRC_URI[sha256sum] = "c36470706fec3a9e6bed394ffea08acaff5dac647848d26b96bb9b9c65d58da0" -inherit autotools update-rc.d useradd pkgconfig systemd +inherit autotools useradd pkgconfig systemd -SYSTEMD_SERVICE_${PN} = "radvd.service" +SYSTEMD_SERVICE:${PN} = "radvd.service" SYSTEMD_AUTO_ENABLE = "disable" -do_install_append () { +do_install:append () { install -m 0755 -d ${D}${sysconfdir}/init.d \ ${D}${sysconfdir}/default/volatiles \ ${D}${docdir}/radvd # Install init script and volatiles - install -m 0755 ${WORKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd + install -m 0755 ${UNPACKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/radvd sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/radvd sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/radvd sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd - install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/volatiles.03_radvd + install -m 0644 ${UNPACKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/03_radvd # Install systemd service files install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/radvd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/radvd.service ${D}${systemd_unitdir}/system sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' \ -e 's#@SBINDIR@#${sbindir}#g' \ -e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service # Install default environment file - install -m 0644 ${WORKDIR}/radvd.default ${D}${sysconfdir}/default/radvd + install -m 0644 ${UNPACKDIR}/radvd.default ${D}${sysconfdir}/default/radvd # Documentation for i in radvd.conf.example README; do \ install -m 0644 ${S}/$i ${D}${docdir}/radvd; \ done -} -INITSCRIPT_NAME = "radvd" -INITSCRIPT_PARAMS = "defaults 20 80" + install -m 0644 ${UNPACKDIR}/radvd.conf ${D}${sysconfdir}/radvd.conf +} USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd" +GROUPADD_PARAM:${PN} = "--system nogroup" +USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup --shell /sbin/nologin radvd" -pkg_postinst_${PN} () { +pkg_postinst:${PN} () { if [ -z "$D" -a -x /etc/init.d/populate-volatile.sh ]; then /etc/init.d/populate-volatile.sh update fi diff --git a/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch b/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch deleted file mode 100644 index 48674c3c57..0000000000 --- a/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch +++ /dev/null @@ -1,48 +0,0 @@ -From f9150a0dc092ab2cbd47ee428436b747dce323a9 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 23 Apr 2017 10:28:28 -0700 -Subject: [PATCH] SquidNew: use noexcept instead of throw for C++11 compilers - -Fixes errors with gcc7 which is more pedantic about c++11 -conformance regarding deprecated features - -include/SquidNew.h:21:51: error: dynamic exception specifications are deprecated in C++11 -_SQUID_EXTERNNEW_ void *operator new[] (size_t size) throw (std::bad_alloc) - ^~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - include/SquidNew.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/include/SquidNew.h b/include/SquidNew.h -index 39fcee0..c960347 100644 ---- a/include/SquidNew.h -+++ b/include/SquidNew.h -@@ -18,19 +18,19 @@ - */ - #include <new> - --_SQUID_EXTERNNEW_ void *operator new(size_t size) throw (std::bad_alloc) -+_SQUID_EXTERNNEW_ void *operator new(size_t size) noexcept(false) - { - return xmalloc(size); - } --_SQUID_EXTERNNEW_ void operator delete (void *address) throw() -+_SQUID_EXTERNNEW_ void operator delete (void *address) noexcept(true) - { - xfree(address); - } --_SQUID_EXTERNNEW_ void *operator new[] (size_t size) throw (std::bad_alloc) -+_SQUID_EXTERNNEW_ void *operator new[] (size_t size) noexcept(false) - { - return xmalloc(size); - } --_SQUID_EXTERNNEW_ void operator delete[] (void *address) throw() -+_SQUID_EXTERNNEW_ void operator delete[] (void *address) noexcept(true) - { - xfree(address); - } --- -2.12.2 - diff --git a/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch deleted file mode 100644 index 0c0a3aad10..0000000000 --- a/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 14d469bc82c758116aef7d549abd49c131b4170f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 22 Apr 2017 11:54:57 -0700 -Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler - option - -If this option is supported by compiler then disable it ( gcc7+) -Fixes -client.c:834:23: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1010 [-Werror=format-truncation=] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - configure.ac | 3 +- - m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 76 insertions(+), 1 deletion(-) - create mode 100644 m4/ax_check_compile_flag.m4 - -Index: squid-3.5.26/configure.ac -=================================================================== ---- squid-3.5.26.orig/configure.ac -+++ squid-3.5.26/configure.ac -@@ -26,6 +26,7 @@ m4_include([acinclude/pkg.m4]) - m4_include([acinclude/lib-checks.m4]) - m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4]) - m4_include([acinclude/ax_cxx_0x_types.m4]) -+m4_include([acinclude/ax_check_compile_flag.m4]) - - HOSTCXX="$BUILD_CXX" - PRESET_CFLAGS="$CFLAGS" -@@ -44,6 +45,7 @@ AC_PROG_CXX - AC_LANG([C++]) - AC_CANONICAL_HOST - -+AX_CHECK_COMPILE_FLAG([-Werror=format-truncation],[CFLAGS="$CFLAGS -Wno-error=format-truncation" CXXFLAGS="$CXXFLAGS -Wno-error=format-truncation"]) - # Clang 3.2 on some CPUs requires -march-native to detect correctly. - # GCC 4.3+ can also produce faster executables when its used. - # But building inside a virtual machine environment has been found to -Index: squid-3.5.26/acinclude/ax_check_compile_flag.m4 -=================================================================== ---- /dev/null -+++ squid-3.5.26/acinclude/ax_check_compile_flag.m4 -@@ -0,0 +1,74 @@ -+# =========================================================================== -+# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -+# =========================================================================== -+# -+# SYNOPSIS -+# -+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -+# -+# DESCRIPTION -+# -+# Check whether the given FLAG works with the current language's compiler -+# or gives an error. (Warnings, however, are ignored) -+# -+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -+# success/failure. -+# -+# If EXTRA-FLAGS is defined, it is added to the current language's default -+# flags (e.g. CFLAGS) when the check is done. The check is thus made with -+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -+# force the compiler to issue an error when a bad flag is given. -+# -+# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -+# -+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -+# -+# LICENSE -+# -+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> -+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> -+# -+# This program is free software: you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by the -+# Free Software Foundation, either version 3 of the License, or (at your -+# option) any later version. -+# -+# This program is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -+# Public License for more details. -+# -+# You should have received a copy of the GNU General Public License along -+# with this program. If not, see <https://www.gnu.org/licenses/>. -+# -+# As a special exception, the respective Autoconf Macro's copyright owner -+# gives unlimited permission to copy, distribute and modify the configure -+# scripts that are the output of Autoconf when processing the Macro. You -+# need not follow the terms of the GNU General Public License when using -+# or distributing such scripts, even though portions of the text of the -+# Macro appear in them. The GNU General Public License (GPL) does govern -+# all other use of the material that constitutes the Autoconf Macro. -+# -+# This special exception to the GPL applies to versions of the Autoconf -+# Macro released by the Autoconf Archive. When you make and distribute a -+# modified version of the Autoconf Macro, you may extend this special -+# exception to the GPL to apply to your modified version as well. -+ -+#serial 5 -+ -+AC_DEFUN([AX_CHECK_COMPILE_FLAG], -+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ -+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS -+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" -+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], -+ [AS_VAR_SET(CACHEVAR,[yes])], -+ [AS_VAR_SET(CACHEVAR,[no])]) -+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -+AS_VAR_IF(CACHEVAR,yes, -+ [m4_default([$2], :)], -+ [m4_default([$3], :)]) -+AS_VAR_POPDEF([CACHEVAR])dnl -+])dnl AX_CHECK_COMPILE_FLAGS diff --git a/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch b/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch deleted file mode 100644 index 082a1114b6..0000000000 --- a/meta-networking/recipes-daemons/squid/files/0001-tools.cc-fixed-unused-result-warning.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a78f2f0feda8f92cb59afe8236bd90726908768f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 25 Jun 2017 00:59:24 -0700 -Subject: [PATCH] tools.cc: fixed unused-result warning - -fix -| ../../squid-3.5.26/src/tools.cc: In function 'void enter_suid()': -| ../../squid-3.5.26/src/tools.cc:616:11: error: ignoring return value of 'int setuid(__uid_t)', declared with attribute warn_unused_result [-Werror=unused-result] -| setuid(0); -| ~~~~~~^~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - src/tools.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/tools.cc b/src/tools.cc -index 8137a03..843e266 100644 ---- a/src/tools.cc -+++ b/src/tools.cc -@@ -612,8 +612,8 @@ enter_suid(void) - if (setresuid((uid_t)-1, 0, (uid_t)-1) < 0) - debugs (21, 3, "enter_suid: setresuid failed: " << xstrerror ()); - #else -- -- setuid(0); -+ if (setuid(0) < 0) -+ debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerror()); - #endif - #if HAVE_PRCTL && defined(PR_SET_DUMPABLE) - /* Set Linux DUMPABLE flag */ --- -2.13.1 - diff --git a/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch b/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch new file mode 100644 index 0000000000..ca1c16b83e --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch @@ -0,0 +1,70 @@ +From cd8bf8a4bf881f84c23a5fc1f48bb716efa51512 Mon Sep 17 00:00:00 2001 +From: Patrick Wicki <patrick.wicki@siemens.com> +Date: Wed, 22 Nov 2023 15:35:44 +0100 +Subject: [PATCH] squid: make squid-conf-tests run on target device + +* Fix paths to allow tests to run outside the original builddir +* Allow the tests to run on read-only root + * Don't overwrite tests with true on success + * Change logfile path to /var/log + +Upstream-Status: Inappropriate [cross compile specific] + +Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com> + +--- + test-suite/Makefile.am | 16 ++++++++-------- + test-suite/test-squid-conf.sh | 2 +- + 2 files changed, 9 insertions(+), 9 deletions(-) + +--- a/test-suite/Makefile.am ++++ b/test-suite/Makefile.am +@@ -21,7 +21,7 @@ LDADD = \ + EXTRA_PROGRAMS = mem_node_test splay + + EXTRA_DIST = \ +- $(srcdir)/squidconf/* \ ++ squidconf/* \ + test-functionality.sh \ + test-sources.sh \ + test-squid-conf.sh \ +@@ -134,21 +134,21 @@ VirtualDeleteOperator_SOURCES = \ + + installcheck-local: squid-conf-tests + +-squid-conf-tests: $(srcdir)/test-squid-conf.sh $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/* +- @failed=0; cfglist="$(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*.conf"; rm -f $@ || $(TRUE); \ ++squid-conf-tests: test-squid-conf.sh $(top_builddir)/src/squid.conf.default squidconf/* ++ @failed=0; cfglist="$(top_builddir)/src/squid.conf.default squidconf/*.conf"; rm -f $@ || $(TRUE); \ + for cfg in $$cfglist ; do \ +- $(srcdir)/test-squid-conf.sh $(top_builddir) $(sbindir) $$cfg || \ ++ ./test-squid-conf.sh $(top_builddir) $(sbindir) $$cfg || \ + { echo "FAIL: squid.conf test: $$cfg" | \ + sed s%$(top_builddir)/src/%% | \ +- sed s%$(srcdir)/squidconf/%% ; \ ++ sed s%squidconf/%% ; \ + failed=1; break; \ + }; \ + if test "$$failed" -eq 0; then \ + echo "PASS: squid.conf test: $$cfg" | \ + sed s%$(top_builddir)/src/%% | \ +- sed s%$(srcdir)/squidconf/%% ; \ ++ sed s%squidconf/%% ; \ + else break; fi; \ + done; \ +- if test "$$failed" -eq 0; then cp $(TRUE) $@ ; else exit 1; fi ++ exit "$$failed" + +-CLEANFILES += squid-conf-tests squid-stderr.log ++CLEANFILES += squid-conf-tests /var/log/squid-stderr.log +--- a/test-suite/test-squid-conf.sh ++++ b/test-suite/test-squid-conf.sh +@@ -111,7 +111,7 @@ then + done < $instructionsFile + fi + +-errorLog="squid-stderr.log" ++errorLog="/var/log/squid-stderr.log" + + $sbindir/squid -k parse -f $configFile 2> $errorLog + result=$? diff --git a/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch b/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch deleted file mode 100644 index 2304c5f1dd..0000000000 --- a/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0d5b337ff5ef7dd48f970f08bd95d6327917cfd1 Mon Sep 17 00:00:00 2001 -Message-Id: <0d5b337ff5ef7dd48f970f08bd95d6327917cfd1.1382375807.git.Jim.Somerville@windriver.com> -From: Jim Somerville <Jim.Somerville@windriver.com> -Date: Mon, 21 Oct 2013 12:50:44 -0400 -Subject: [PATCH 1/1] Fix flawed dynamic -ldb link test in configure - -The test uses dbopen, but just ignores the fact -that this function may not exist in the db version -used. This leads to the dynamic link test failing -and the configure script just making assumptions -about why and setting the need for -ldb incorrectly. - -Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> ---- - configure.ac | 12 ++++++++++-- - 1 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 962a748..42e6a93 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3051,8 +3051,16 @@ AC_CHECK_DECL(dbopen,,,[ - #include <db.h> - #endif]) - --dnl 1.85 --SQUID_CHECK_DBOPEN_NEEDS_LIBDB -+if test "x$ac_cv_have_decl_dbopen" = "xyes"; then -+ dnl 1.85 -+ SQUID_CHECK_DBOPEN_NEEDS_LIBDB -+else -+ # dbopen isn't there. So instead of running a compile/link test that -+ # uses it and is thus guaranteed to fail, we just assume that we will -+ # need to link in the db library, rather than fabricate some other -+ # dynamic compile/link test. -+ ac_cv_dbopen_libdb="yes" -+fi - if test "x$ac_cv_dbopen_libdb" = "xyes"; then - LIB_DB="-ldb" - fi --- -1.7.4.1 - diff --git a/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch b/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch index 4ca27444a4..18bc78e6be 100644 --- a/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch +++ b/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch @@ -1,29 +1,28 @@ -From 17e5a28667f667859c48bee25e575a072d39ee1b Mon Sep 17 00:00:00 2001 -Message-Id: <17e5a28667f667859c48bee25e575a072d39ee1b.1381956170.git.Jim.Somerville@windriver.com> +From c0be3192f608037682464bcb728e97f9d9b543aa Mon Sep 17 00:00:00 2001 From: Jim Somerville <Jim.Somerville@windriver.com> Date: Wed, 16 Oct 2013 16:41:03 -0400 -Subject: [PATCH 1/1] Set up for cross compilation +Subject: [PATCH] Set up for cross compilation + +Message-Id: <17e5a28667f667859c48bee25e575a072d39ee1b.1381956170.git.Jim.Somerville@windriver.com> Set the host compiler to BUILD_CXX so proper cross compilation can occur. Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> + --- - configure.ac | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) +Upstream-Status: Pending + + configure.ac | 1 + + 1 file changed, 1 insertion(+) -diff --git a/configure.ac b/configure.ac -index c2d3033..dda9ed9 100644 --- a/configure.ac +++ b/configure.ac -@@ -19,6 +19,7 @@ m4_include([acinclude/lib-checks.m4]) - m4_include([acinclude/ax_cxx_compile_stdcxx_0x.m4]) - m4_include([acinclude/ax_cxx_0x_types.m4]) +@@ -29,6 +29,7 @@ m4_include([acinclude/tdb.m4]) + m4_include([acinclude/lib-checks.m4]) + m4_include([acinclude/ax_cxx_compile_stdcxx.m4]) +HOSTCXX="$BUILD_CXX" PRESET_CFLAGS="$CFLAGS" PRESET_CXXFLAGS="$CXXFLAGS" PRESET_LDFLAGS="$LDFLAGS" --- -1.7.4.1 - diff --git a/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch b/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch index 7b6dcc820d..e0d002c68c 100644 --- a/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch +++ b/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch @@ -1,3 +1,6 @@ +From 050f8ab275a7a5f3d94045da6b15a2b63dfbeb3f Mon Sep 17 00:00:00 2001 +From: Jim Somerville <Jim.Somerville@windriver.com> +Date: Tue, 14 Oct 2014 02:56:08 -0400 Subject: [PATCH] Skip AC_RUN_IFELSE tests Upstream-Status: Inappropriate [cross compiling specific] @@ -7,16 +10,15 @@ environment. Choose sane defaults. Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- - acinclude/krb5.m4 | 10 +++++++++- - acinclude/lib-checks.m4 | 8 ++++++-- + acinclude/krb5.m4 | 10 +++++++++- + acinclude/lib-checks.m4 | 8 ++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) -diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 -index 946bea8..7a072a2 100644 --- a/acinclude/krb5.m4 +++ b/acinclude/krb5.m4 -@@ -82,7 +82,15 @@ main(void) +@@ -57,7 +57,15 @@ main(void) return 0; } @@ -31,34 +33,29 @@ index 946bea8..7a072a2 100644 + dnl Can't test in cross compiled env - so assume good + squid_cv_broken_heimdal_krb5_h=no ]) + SQUID_STATE_ROLLBACK(squid_krb5_heimdal_test) ]) - ]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H -diff --git a/acinclude/lib-checks.m4 b/acinclude/lib-checks.m4 -index 2bf98ee..50dba9b 100644 --- a/acinclude/lib-checks.m4 +++ b/acinclude/lib-checks.m4 -@@ -128,7 +128,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS],[ - AC_DEFINE(SQUID_SSLGETCERTIFICATE_BUGGY, 1) - AC_MSG_RESULT([yes]) +@@ -205,7 +205,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_ + [ + AC_MSG_RESULT([no]) ], - []) + [ + AC_MSG_RESULT([skipped - can't test in cross-compiled env]) + ]) - AC_MSG_CHECKING(whether the workaround for SSL_get_certificate works) - AC_RUN_IFELSE([ -@@ -154,7 +156,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS],[ - [ - AC_MSG_RESULT([no]) - ], --[]) -+[ -+ AC_MSG_RESULT([skipped - can't test in cross-compiled env]) -+]) + SQUID_STATE_ROLLBACK(check_const_SSL_METHOD) + ]) +@@ -347,7 +349,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_TXTDB],[ + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(SQUID_USE_SSLLHASH_HACK, 1) +- ],[]) ++ ],[ ++ AC_MSG_RESULT([skipped - can't test in cross-compiled env]) ++ ]) - SQUID_STATE_ROLLBACK(check_SSL_get_certificate) + SQUID_STATE_ROLLBACK(check_TXTDB) ]) --- -1.7.1 - diff --git a/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch b/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch deleted file mode 100644 index cc1ea78a55..0000000000 --- a/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch +++ /dev/null @@ -1,17 +0,0 @@ -../../squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc: In function 'void squidaio_init()': ../../squid-3.5.26/src/DiskIO/DiskThreads/DiskThreads.h:30:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] #define NUMTHREADS (Config.cacheSwap.n_configured*16) - - -Upstream-Status: Backport -Index: squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc -=================================================================== ---- squid-3.5.26.orig/src/DiskIO/DiskThreads/aiops.cc -+++ squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc -@@ -290,7 +290,7 @@ squidaio_init(void) - /* Create threads and get them to sit in their wait loop */ - squidaio_thread_pool = memPoolCreate("aio_thread", sizeof(squidaio_thread_t)); - -- assert(NUMTHREADS); -+ assert(NUMTHREADS != 0); - - for (i = 0; i < NUMTHREADS; ++i) { - threadp = (squidaio_thread_t *)squidaio_thread_pool->alloc(); diff --git a/meta-networking/recipes-daemons/squid/files/run-ptest b/meta-networking/recipes-daemons/squid/files/run-ptest index de79a293c5..8f8e28f92b 100644 --- a/meta-networking/recipes-daemons/squid/files/run-ptest +++ b/meta-networking/recipes-daemons/squid/files/run-ptest @@ -1,3 +1,4 @@ #!/bin/sh # +make -C test-suite -k squid-conf-tests make -C test-suite -k runtest-TESTS diff --git a/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch b/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch deleted file mode 100644 index fdcd174d3b..0000000000 --- a/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch +++ /dev/null @@ -1,33 +0,0 @@ -Set the SYSROOT for libxml2 header file to avoid host contamination. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Yue Tao <yue.tao@windriver.com> -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> - -diff --git a/configure.ac.old b/configure.ac -index 54eda73..874f48e 100644 ---- a/configure.ac.old -+++ b/configure.ac -@@ -964,15 +964,15 @@ if test "x$squid_opt_use_esi" = "xyes" -a "x$with_libxml2" != "xno" ; then - dnl Find the main header and include path... - AC_CACHE_CHECK([location of libxml2 include files], [ac_cv_libxml2_include], [ - AC_CHECK_HEADERS([libxml/parser.h], [], [ -- AC_MSG_NOTICE([Testing in /usr/include/libxml2]) -+ AC_MSG_NOTICE([Testing in $SYSROOT/usr/include/libxml2]) - SAVED_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS" -+ CPPFLAGS="-I$SYSROOT/usr/include/libxml2 $CPPFLAGS" - unset ac_cv_header_libxml_parser_h -- AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="-I/usr/include/libxml2"], [ -- AC_MSG_NOTICE([Testing in /usr/local/include/libxml2]) -- CPPFLAGS="-I/usr/local/include/libxml2 $SAVED_CPPFLAGS" -+ AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="-I$SYSROOT/usr/include/libxml2"], [ -+ AC_MSG_NOTICE([Testing in $SYSROOT/usr/local/include/libxml2]) -+ CPPFLAGS="-I$SYSROOT/usr/local/include/libxml2 $SAVED_CPPFLAGS" - unset ac_cv_header_libxml_parser_h -- AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="-I/usr/local/include/libxml2"], [ -+ AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="-I$SYSROOT/usr/local/include/libxml2"], [ - AC_MSG_NOTICE([Failed to find libxml2 header file libxml/parser.h]) - ]) - ]) diff --git a/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch b/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch deleted file mode 100644 index 312f44f8eb..0000000000 --- a/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 54a9c2ba60adc7ec2724786662fd398e7c03999f Mon Sep 17 00:00:00 2001 -From: Jackie Huang <jackie.huang@windriver.com> -Date: Thu, 25 Aug 2016 15:22:57 +0800 -Subject: [PATCH] squid: don't do squid-conf-tests at build time - -* squid-conf-tests is a test to run "squid -k parse -f" - to perse the config files, which should not be run - at build time since we are cross compiling, so remove - it but it will be added back for the runtime ptest. - -* Fix the directories of the conf files for squid-conf-tests - so that it can run on the target board. - -Upstream-Status: Inappropriate [cross compile specific] - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - test-suite/Makefile.am | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am -index d5468be..77fc480 100644 ---- a/test-suite/Makefile.am -+++ b/test-suite/Makefile.am -@@ -41,8 +41,7 @@ TESTS += debug \ - MemPoolTest\ - mem_node_test\ - mem_hdr_test\ -- $(ESI_TESTS) \ -- squid-conf-tests -+ $(ESI_TESTS) - - ## Sort by alpha - any build failures are significant. - check_PROGRAMS += debug \ -@@ -125,19 +124,19 @@ VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc $(DEBUG_SOURCE) - ##$(TARGLIB): $(LIBOBJS) - ## $(AR_R) $(TARGLIB) $(LIBOBJS) - --squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/* -+squid-conf-tests: $(sysconfdir)/squid.conf.default squidconf/* - @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \ - for cfg in $$cfglist ; do \ -- $(top_builddir)/src/squid -k parse -f $$cfg || \ -+ squid -k parse -f $$cfg || \ - { echo "FAIL: squid.conf test: $$cfg" | \ -- sed s%$(top_builddir)/src/%% | \ -- sed s%$(srcdir)/squidconf/%% ; \ -+ sed s%$(sysconfdir)/%% | \ -+ sed s%squidconf/%% ; \ - failed=1; break; \ - }; \ - if test "$$failed" -eq 0; then \ - echo "PASS: squid.conf test: $$cfg" | \ -- sed s%$(top_builddir)/src/%% | \ -- sed s%$(srcdir)/squidconf/%% ; \ -+ sed s%$(sysconfdir)/%% | \ -+ sed s%squidconf/%% ; \ - else break; fi; \ - done; \ - if test "$$failed" -eq 0; then cp $(TRUE) $@ ; fi --- -2.8.3 - diff --git a/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch b/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch index 01ec596223..5df006038b 100644 --- a/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch +++ b/meta-networking/recipes-daemons/squid/files/squid-use-serial-tests-config-needed-by-ptest.patch @@ -1,4 +1,4 @@ -From bd58d3672bc267824000f34a37561c7ab2bd571f Mon Sep 17 00:00:00 2001 +From 3d881c112bba765731d581194aae95651819b715 Mon Sep 17 00:00:00 2001 From: Jackie Huang <jackie.huang@windriver.com> Date: Tue, 19 Jul 2016 01:56:23 -0400 Subject: [PATCH] squid: use serial-tests config needed by ptest @@ -9,23 +9,19 @@ serial-tests is required to generate those targets. Upstream-Status: Inappropriate [default automake behavior incompatible with ptest] Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.ac b/configure.ac -index 05ad027..e324b93 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ AC_PREREQ(2.61) AC_CONFIG_HEADERS([include/autoconf.h]) AC_CONFIG_AUX_DIR(cfgaux) AC_CONFIG_SRCDIR([src/main.cc]) --AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects]) -+AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects serial-tests]) +-AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects dist-xz]) ++AM_INIT_AUTOMAKE([tar-ustar nostdinc subdir-objects dist-xz serial-tests]) AC_REVISION($Revision$)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE --- -2.8.1 - diff --git a/meta-networking/recipes-daemons/squid/files/squid.nm b/meta-networking/recipes-daemons/squid/files/squid.nm new file mode 100644 index 0000000000..b58ee11bdc --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/squid.nm @@ -0,0 +1,7 @@ +#!/bin/sh + +case "$2" in + up|down|vpn-up|vpn-down) + systemctl -q reload squid.service || : + ;; +esac diff --git a/meta-networking/recipes-daemons/squid/squid_3.5.26.bb b/meta-networking/recipes-daemons/squid/squid_3.5.26.bb deleted file mode 100644 index 3ee96abb7b..0000000000 --- a/meta-networking/recipes-daemons/squid/squid_3.5.26.bb +++ /dev/null @@ -1,114 +0,0 @@ -SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux" -DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \ -Squid offers a rich access control, authorization and logging environment to \ -develop web proxy and content serving applications. \ -Squid offers a rich set of traffic optimization options, most of which are \ -enabled by default for simpler installation and high performance. \ -" -HOMEPAGE = "http://www.squid-cache.org" -SECTION = "web" -LICENSE = "GPLv2+" - -MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" -MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${PV}.tar.bz2 \ - file://Set-up-for-cross-compilation.patch \ - file://Skip-AC_RUN_IFELSE-tests.patch \ - file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \ - file://squid-use-serial-tests-config-needed-by-ptest.patch \ - file://run-ptest \ - file://volatiles.03_squid \ - file://set_sysroot_patch.patch \ - file://squid-don-t-do-squid-conf-tests-at-build-time.patch \ - file://0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch \ - file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ - file://gcc7-fixes.patch \ - file://0001-tools.cc-fixed-unused-result-warning.patch \ - " - -SRC_URI_remove_toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" - -SRC_URI[md5sum] = "dc1830cd361e077814aa39bcc3691d8b" -SRC_URI[sha256sum] = "41d8845863dcd026c856508cd1599d417c8947ffd96e86e24085f9893cb8b8c2" - -LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \ - file://errors/COPYRIGHT;md5=8861130fae91400bcf99b66f133172b3 \ - " -DEPENDS = "libtool krb5 openldap db cyrus-sasl openssl expat libxml2" - -inherit autotools pkgconfig useradd ptest perlnative - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" - -PACKAGECONFIG ??= "${@bb.utils.contains('TARGET_ARCH', 'powerpc', 'noatomics', '', d)} \ - ${@bb.utils.contains('TARGET_ARCH', 'mips', 'noatomics', '', d)} \ - ${@bb.utils.contains('TARGET_ARCH', 'mipsel', 'noatomics', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ - " -PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" -PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,," -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -BASIC_AUTH = "DB SASL LDAP" - -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" - -EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}' \ - --sysconfdir=${sysconfdir}/${BPN} \ - --with-logdir=${localstatedir}/log/${BPN} \ - 'PERL=${USRBINPATH}/env perl'" - -export BUILDCXXFLAGS="${BUILD_CXXFLAGS}" - -TESTDIR = "test-suite" - -do_configure_prepend() { - export SYSROOT=$PKG_CONFIG_SYSROOT_DIR -} - -do_compile_ptest() { - oe_runmake -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} - cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} - - # do NOT need to rebuild Makefile itself - sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # Add squid-conf-tests for runtime tests - sed -e 's/^\(runtest-TESTS:\)/\1 squid-conf-tests/' \ - -e "s/\(list=' \$(TESTS)\)/\1 squid-conf-tests/" \ - -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # Ensure the path for command true is correct - sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile -} - -do_install_append() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - fi - - install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid - - rmdir "${D}${localstatedir}/run/${BPN}" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" - - rmdir "${D}${localstatedir}/log/${BPN}" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log" -} - -FILES_${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" -FILES_${PN}-dbg += "/usr/src/debug" -FILES_${PN}-doc += "${datadir}/*.txt" - -RDEPENDS_${PN} += "perl" -RDEPENDS_${PN}-ptest += "make" diff --git a/meta-networking/recipes-daemons/squid/squid_6.9.bb b/meta-networking/recipes-daemons/squid/squid_6.9.bb new file mode 100644 index 0000000000..f670a776eb --- /dev/null +++ b/meta-networking/recipes-daemons/squid/squid_6.9.bb @@ -0,0 +1,148 @@ +SUMMARY = "A fully-featured http proxy and web-cache daemon for Linux" +DESCRIPTION = "A fully-featured http proxy and web-cache daemon for Linux. \ +Squid offers a rich access control, authorization and logging environment to \ +develop web proxy and content serving applications. \ +Squid offers a rich set of traffic optimization options, most of which are \ +enabled by default for simpler installation and high performance. \ +" +HOMEPAGE = "http://www.squid-cache.org" +SECTION = "web" +LICENSE = "GPL-2.0-or-later" + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}" +MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.xz \ + file://Set-up-for-cross-compilation.patch \ + file://Skip-AC_RUN_IFELSE-tests.patch \ + file://squid-use-serial-tests-config-needed-by-ptest.patch \ + file://run-ptest \ + file://volatiles.03_squid \ + file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \ + file://squid.nm \ + " + +SRC_URI[sha256sum] = "1ad72d46e1cb556e9561214f0fb181adb87c7c47927ef69bc8acd68a03f61882" + +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://errors/COPYRIGHT;md5=d324bc1f9447d1d1588d75b22a678dc4 \ + " +DEPENDS = "libtool" + +inherit autotools pkgconfig useradd ptest perlnative systemd + +LDFLAGS:append:mipsarch = " -latomic" +LDFLAGS:append:powerpc = " -latomic" +LDFLAGS:append:riscv64 = " -latomic" +LDFLAGS:append:riscv32 = " -latomic" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" + +PACKAGECONFIG ??= "auth url-rewrite-helpers \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ +" + +PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking," +PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" +PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" +PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" +PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" + +PACKAGES =+ " \ + ${PN}-conf \ + ${PN}-networkmanager \ +" + +BASIC_AUTH = "DB SASL LDAP" + +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" + +EXTRA_OECONF += "--with-default-user=squid \ + --sysconfdir=${sysconfdir}/${BPN} \ + --with-logdir=${localstatedir}/log/${BPN} \ + 'PERL=${USRBINPATH}/env perl'" + +# Workaround a build failure when using a native compiler that need -std=c++17 +# with a cross-compiler that doesn't. +# Upstream issue closed as invalid : https://bugs.squid-cache.org/show_bug.cgi?id=5376 +BUILD_CXXFLAGS += "-std=c++17" + +export BUILDCXXFLAGS="${BUILD_CXXFLAGS}" + +TESTDIR = "test-suite" + +do_configure:prepend() { + export SYSROOT=$PKG_CONFIG_SYSROOT_DIR +} + +do_configure:append() { + sed -i -e 's|${WORKDIR}||g' ${B}/include/autoconf.h +} + +do_compile_ptest() { + oe_runmake -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} + cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} + + # Install default config + install -d ${D}${PTEST_PATH}/src + install -m 0644 ${B}/src/squid.conf.default ${D}${PTEST_PATH}/src + + # autoconf.h is needed during squid-conf-tests + install -d ${D}${PTEST_PATH}/include + install -m 0644 ${B}/include/autoconf.h ${D}${PTEST_PATH}/include + + # do NOT need to rebuild Makefile itself + sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + + # Ensure the path for command true is correct + sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile +} + +do_install:append() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + # Install service unit file + install -d ${D}/${systemd_unitdir}/system + install ${S}/tools/systemd/squid.service ${D}/${systemd_unitdir}/system + sed -i 's:/var/run/:/run/:g' ${D}/${systemd_unitdir}/system/squid.service + + # Configure tmpfiles.d + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + fi + + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${UNPACKDIR}/volatiles.03_squid ${D}${sysconfdir}/default/volatiles/03_squid + + rmdir "${D}${localstatedir}/run/${BPN}" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/run" + + rmdir "${D}${localstatedir}/log/${BPN}" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log" + + # Install NetworkManager dispatcher reload hooks + install -d ${D}${libdir}/NetworkManager/dispatcher.d + install -m 0755 ${UNPACKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid +} + +SYSTEMD_AUTO_ENABLE = "disable" +SYSTEMD_SERVICE:${PN} = "squid.service" + +FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" +FILES:${PN}-dbg += "/usr/src/debug" +FILES:${PN}-doc += "${datadir}/*.txt" +FILES:${PN}-conf += "${sysconfdir}/squid" +FILES:${PN}-networkmanager = "${libdir}/NetworkManager/dispatcher.d" + +RDEPENDS:${PN} += "perl ${PN}-conf" +RDEPENDS:${PN}-ptest += "perl make bash" diff --git a/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch b/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch index cead977e28..66c15b5f8b 100644 --- a/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch +++ b/meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch @@ -12,6 +12,8 @@ global symbols and work around Debian bug #519006 (Closes: #564052). Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> --- +Upstream-Status: Pending + tftpd/tftpd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Mark-toplevel-definition-as-external.patch b/meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Mark-toplevel-definition-as-external.patch new file mode 100644 index 0000000000..646757c783 --- /dev/null +++ b/meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Mark-toplevel-definition-as-external.patch @@ -0,0 +1,30 @@ +From 2a12174a5059e84d4ff6fad8f983a4d0f2127e73 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 12 Aug 2020 12:17:31 -0700 +Subject: [PATCH] tftp: Mark toplevel definition as external + +Fixes +multiple definition of `toplevel'; tftp.o:/usr/src/debug/tftp-hpa/5.2-r0/tftp-hpa-5.2/tftp/tftp.c:51: first defined here + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + tftp/tftp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tftp/tftp.c b/tftp/tftp.c +index 9d15022..109848c 100644 +--- a/tftp/tftp.c ++++ b/tftp/tftp.c +@@ -48,7 +48,7 @@ extern int maxtimeout; + #define PKTSIZE SEGSIZE+4 + char ackbuf[PKTSIZE]; + int timeout; +-sigjmp_buf toplevel; ++extern sigjmp_buf toplevel; + sigjmp_buf timeoutbuf; + + static void nak(int, const char *); +-- +2.28.0 + diff --git a/meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Remove-double-inclusion-of-signal.h.patch b/meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Remove-double-inclusion-of-signal.h.patch new file mode 100644 index 0000000000..84658d667b --- /dev/null +++ b/meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Remove-double-inclusion-of-signal.h.patch @@ -0,0 +1,39 @@ +From e9ed48d91642d384ce07cbb9bec788f07fc6354c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 6 Sep 2022 14:51:42 -0700 +Subject: [PATCH] tftp: Remove double inclusion of signal.h + +Undefine __USE_XOPEN2K8 so we can get bsd_signal definition from system +headers + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + config.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/config.h b/config.h +index 3ff2915..ae1a14b 100644 +--- a/config.h ++++ b/config.h +@@ -93,7 +93,6 @@ + #endif + + #include <errno.h> +-#include <signal.h> + + #ifdef HAVE_SYS_SOCKET_H + #include <sys/socket.h> +@@ -296,6 +295,9 @@ char *xstrdup(const char *); + + #ifndef HAVE_BSD_SIGNAL + void (*bsd_signal(int, void (*)(int))) (int); ++#else ++#undef __USE_XOPEN2K8 ++#include <signal.h> + #endif + #ifndef HAVE_DUP2 + int dup2(int, int); +-- +2.37.3 + diff --git a/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch b/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch index d01c20d385..e4acd099ab 100644 --- a/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch +++ b/meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch @@ -3,7 +3,7 @@ From: "Roy.Li" <rongqing.li@windriver.com> Date: Thu, 22 Aug 2013 08:56:09 +0800 Subject: [PATCH] tftp-hpa: add error check for disk filled up -Upstream-status: Pending [Sent to http://www.syslinux.org/archives/2013-August/020765.html] +Upstream-Status: Pending [Sent to http://www.syslinux.org/archives/2013-August/020765.html] Add error check when the write-buffer is finally flushed to the file, the caller can detect if the disk filled up (or had an i/o error) and diff --git a/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch b/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch index 452aa05f81..4f3dcd7767 100644 --- a/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch +++ b/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch @@ -1,6 +1,6 @@ [PATCH] fix the empty file writting -Upstream-Status: pending +Upstream-Status: Pending With the feature that checking the disk filled up, the return value of function write_behind was checked and used to detect diff --git a/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch b/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch index 3e220ec385..e994f28402 100644 --- a/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch +++ b/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch @@ -7,7 +7,7 @@ In ascii mode, if the CR and LF was separated into different transfer blocks, LF will be just dropped instead of replacing the previous CR. Add a checking on the first character to fix it. -Upstream-Status: pending +Upstream-Status: Pending Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com> --- diff --git a/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb b/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb index 132972b331..b5a2b9dae0 100644 --- a/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb +++ b/meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb @@ -28,6 +28,8 @@ SRC_URI = "http://kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-${PV}.t file://tftp-hpa-bug-fix-on-separated-CR-and-LF.patch \ file://fix-writing-emtpy-file.patch \ file://0001-__progname-is-provided-by-libc.patch \ + file://0001-tftp-Mark-toplevel-definition-as-external.patch \ + file://0001-tftp-Remove-double-inclusion-of-signal.h.patch \ file://tftpd-hpa.socket \ file://tftpd-hpa.service \ " @@ -56,36 +58,41 @@ do_install() { install -m 755 -d ${D}${localstatedir}/lib/tftpboot/ install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftpd-hpa + install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/tftpd-hpa sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/tftpd-hpa sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/tftpd-hpa install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa + install -m 0644 ${UNPACKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/tftpd-hpa.socket ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/tftpd-hpa.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/tftpd-hpa.socket ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/tftpd-hpa.service ${D}${systemd_unitdir}/system sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tftpd-hpa.service } -FILES_${PN} = "${bindir}" +FILES:${PN} = "${bindir}" PACKAGES += "tftp-hpa-server" -SUMMARY_tftp-hpa-server = "Server for the Trivial File Transfer Protocol" -FILES_tftp-hpa-server = "${sbindir} ${sysconfdir} ${localstatedir}" -CONFFILES_tftp-hpa-server = "${sysconfdir}/default/tftpd-hpa" +SUMMARY:tftp-hpa-server = "Server for the Trivial File Transfer Protocol" +FILES:tftp-hpa-server = "${sbindir} ${sysconfdir} ${localstatedir}" +CONFFILES:tftp-hpa-server = "${sysconfdir}/default/tftpd-hpa" INITSCRIPT_PACKAGES = "tftp-hpa-server" INITSCRIPT_NAME = "tftpd-hpa" INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ." -ALTERNATIVE_${PN} = "tftp" +ALTERNATIVE:${PN}-doc = "tftpd.8 tftp.1" +ALTERNATIVE_LINK_NAME[tftpd.8] = "${mandir}/man8/tftpd.8" +ALTERNATIVE_LINK_NAME[tftp.1] = "${mandir}/man1/tftp.1" + +ALTERNATIVE:${PN} = "tftp" ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa" -ALTERNATIVE_PRIORITY = "60" +ALTERNATIVE_PRIORITY = "100" + SYSTEMD_PACKAGES = "tftp-hpa-server" -SYSTEMD_SERVICE_tftp-hpa-server = "tftpd-hpa.socket tftpd-hpa.service" -SYSTEMD_AUTO_ENABLE_tftp-hpa-server = "enable" +SYSTEMD_SERVICE:tftp-hpa-server = "tftpd-hpa.socket tftpd-hpa.service" +SYSTEMD_AUTO_ENABLE:tftp-hpa-server = "enable" diff --git a/meta-networking/recipes-daemons/vblade/files/cross.patch b/meta-networking/recipes-daemons/vblade/files/cross.patch index d2eb156143..f3dc31c93d 100644 --- a/meta-networking/recipes-daemons/vblade/files/cross.patch +++ b/meta-networking/recipes-daemons/vblade/files/cross.patch @@ -8,8 +8,8 @@ diff -urN vblade-19.old//makefile vblade-19//makefile @@ -9,8 +9,6 @@ mandir = ${sharedir}/man - O=aoe.o bpf.o ${PLATFORM}.o ata.o --CFLAGS += -Wall -g -O2 + O=aoe.o bpf.o ${PLATFORM}.o ata.o dat.o +-CFLAGS += -Wall -g -O2 -fno-common -CC = gcc vblade: $O diff --git a/meta-networking/recipes-daemons/vblade/files/makefile-add-ldflags.patch b/meta-networking/recipes-daemons/vblade/files/makefile-add-ldflags.patch index a74452db69..71af47ac73 100644 --- a/meta-networking/recipes-daemons/vblade/files/makefile-add-ldflags.patch +++ b/meta-networking/recipes-daemons/vblade/files/makefile-add-ldflags.patch @@ -9,7 +9,7 @@ index 98008da..c328ba7 100644 --- a/makefile +++ b/makefile @@ -11,7 +11,7 @@ mandir = ${sharedir}/man - O=aoe.o bpf.o ${PLATFORM}.o ata.o + O=aoe.o bpf.o ${PLATFORM}.o ata.o dat.o vblade: $O - ${CC} -o vblade $O diff --git a/meta-networking/recipes-daemons/vblade/vblade_22.bb b/meta-networking/recipes-daemons/vblade/vblade_25.bb index d7b1dfaad3..7f20e927c6 100644 --- a/meta-networking/recipes-daemons/vblade/vblade_22.bb +++ b/meta-networking/recipes-daemons/vblade/vblade_25.bb @@ -1,10 +1,13 @@ SUMMARY = "Virtual EtherDrive blade AoE target" SECTION = "admin" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BP}.tar.gz \ +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/aoetools/files/vblade/" + +SRCREV = "5f1a0ba8b9815e3f08a3e2635a17f78bbf2a5b10" +SRC_URI = "git://github.com/OpenAoE/vblade;branch=master;protocol=https \ file://cross.patch \ file://makefile-add-ldflags.patch \ file://${BPN}.conf \ @@ -13,8 +16,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BP}.tar.gz \ file://volatiles.99_vblade \ " -SRC_URI[md5sum] = "510d98ba0f231284a5fbe2da11cb2d6e" -SRC_URI[sha256sum] = "a990378f273f10eb431e42954a871aed52714035bbab28c54cef600c458356bb" +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_URI = "https://github.com/OpenAoE/vblade/archive/" inherit autotools-brokensep update-rc.d systemd @@ -23,22 +27,22 @@ do_install() { install -D -m 0755 ${S}/vbladed ${D}/${sbindir}/vbladed install -D -m 0644 ${S}/vblade.8 ${D}/${mandir}/man8/vblade.8 - install -D -m 0644 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}.conf - install -D -m 0755 ${WORKDIR}/${BPN}.init ${D}/${sysconfdir}/init.d/${BPN} + install -D -m 0644 ${UNPACKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}.conf + install -D -m 0755 ${UNPACKDIR}/${BPN}.init ${D}/${sysconfdir}/init.d/${BPN} if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}/${sysconfdir}/default/volatiles - install -m 0755 ${WORKDIR}/volatiles.99_vblade ${D}/${sysconfdir}/default/volatiles/99_vblade + install -m 0755 ${UNPACKDIR}/volatiles.99_vblade ${D}/${sysconfdir}/default/volatiles/99_vblade fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}/${bindir} - install -m 0755 ${WORKDIR}/${BPN}.init ${D}/${bindir}/ + install -m 0755 ${UNPACKDIR}/${BPN}.init ${D}/${bindir}/ install -d ${D}${sysconfdir}/tmpfiles.d echo "d /var/run/${BPN} 0755 root root -" > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/vblade.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/vblade.service ${D}${systemd_system_unitdir} sed -e 's,@BINDIR@,${bindir},g' -i ${D}${systemd_system_unitdir}/*.service fi @@ -47,5 +51,5 @@ do_install() { INITSCRIPT_NAME = "vblade" INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ." -SYSTEMD_SERVICE_${PN} = "vblade.service" +SYSTEMD_SERVICE:${PN} = "vblade.service" SYSTEMD_AUTO_ENABLE = "disable" diff --git a/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch b/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch index 5f2860e846..b69de1d1c3 100644 --- a/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch +++ b/meta-networking/recipes-daemons/vsftpd/files/change-secure_chroot_dir.patch @@ -1,20 +1,25 @@ -vsftpd: change default value of secure_chroot_dir +From ce2be5d4967445828d5ae9d9462cfaa78ae03c73 Mon Sep 17 00:00:00 2001 +From: Ming Liu <ming.liu@windriver.com> +Date: Wed, 18 Sep 2013 09:44:20 +0800 +Subject: [PATCH] vsftpd: change default value of secure_chroot_dir Upstream-Status: Pending Change secure_chroot_dir pointing to a volatile directory. Signed-off-by: Ming Liu <ming.liu@windriver.com> + --- - INSTALL | 6 +++--- - tunables.c | 2 +- - vsftpd.conf.5 | 2 +- + INSTALL | 6 +++--- + tunables.c | 2 +- + vsftpd.conf.5 | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) -diff -urpN a/INSTALL b/INSTALL ---- a/INSTALL 2013-09-13 10:23:57.504972397 +0800 -+++ b/INSTALL 2013-09-13 10:25:25.664971779 +0800 -@@ -27,11 +27,11 @@ user in case it does not already exist. +diff --git a/INSTALL b/INSTALL +index 4f811aa..427122a 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -27,11 +27,11 @@ user in case it does not already exist. e.g.: [root@localhost root]# useradd nobody useradd: user nobody exists @@ -29,9 +34,10 @@ diff -urpN a/INSTALL b/INSTALL 2c) For anonymous FTP, you will need the user "ftp" to exist, and have a valid home directory (which is NOT owned or writable by the user "ftp"). -diff -urpN a/tunables.c b/tunables.c ---- a/tunables.c 2013-09-13 10:26:29.554972817 +0800 -+++ b/tunables.c 2013-09-13 10:27:18.104972210 +0800 +diff --git a/tunables.c b/tunables.c +index 284a10d..8c63c3f 100644 +--- a/tunables.c ++++ b/tunables.c @@ -254,7 +254,7 @@ tunables_load_defaults() /* -rw------- */ tunable_chown_upload_mode = 0600; @@ -41,10 +47,11 @@ diff -urpN a/tunables.c b/tunables.c install_str_setting("ftp", &tunable_ftp_username); install_str_setting("root", &tunable_chown_username); install_str_setting("/var/log/xferlog", &tunable_xferlog_file); -diff -urpN a/vsftpd.conf.5 b/vsftpd.conf.5 ---- a/vsftpd.conf.5 2013-09-13 10:09:33.774972462 +0800 -+++ b/vsftpd.conf.5 2013-09-13 10:10:41.914971989 +0800 -@@ -969,7 +969,7 @@ This option should be the name of a dire +diff --git a/vsftpd.conf.5 b/vsftpd.conf.5 +index fcc6022..e4ffdee 100644 +--- a/vsftpd.conf.5 ++++ b/vsftpd.conf.5 +@@ -969,7 +969,7 @@ This option should be the name of a directory which is empty. Also, the directory should not be writable by the ftp user. This directory is used as a secure chroot() jail at times vsftpd does not require filesystem access. diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch deleted file mode 100644 index 7accbbc241..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 37cc924363515c8c309944c455bcbba7ddcc8eda Mon Sep 17 00:00:00 2001 -From: Mingli Yu <Mingli.Yu@windriver.com> -Date: Tue, 6 Sep 2016 17:17:44 +0800 -Subject: [PATCH] vsftpd: allow sysinfo() in the seccomp sandbox - -Upstream-Status: Pending - -* Allow sysinfo() in the seccomp sandbox otherwise - comes below OOPS: priv_sock_get_cmd as the syscall - sysinfo() not allowed - -tnftp 192.168.1.1 -Connected to 192.168.1.1. -220 (vsFTPd 3.0.3) -Name (192.168.1.1:root): anonymous -331 Please specify the password. -Password: -230 Login successful. -Remote system type is UNIX. -Using binary mode to transfer files. -ftp> prompt -Interactive mode off. -ftp> mget small* -OOPS: priv_sock_get_cmd - -Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> ---- - seccompsandbox.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/seccompsandbox.c b/seccompsandbox.c -index 2c350a9..67d9ca5 100644 ---- a/seccompsandbox.c -+++ b/seccompsandbox.c -@@ -409,6 +409,7 @@ seccomp_sandbox_setup_postlogin(const struct vsf_session* p_sess) - allow_nr(__NR_getcwd); - allow_nr(__NR_chdir); - allow_nr(__NR_getdents); -+ allow_nr(__NR_sysinfo); - /* Misc */ - allow_nr(__NR_umask); - --- -2.8.1 - diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch deleted file mode 100644 index 9a10f722f4..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-libs.patch +++ /dev/null @@ -1,21 +0,0 @@ -Hardcode LIBS instead of using a script to determine available libs - -We want to avoid this dynamic detection so we have a deterministic -build. - -Upstream-Status: Inappropriate [config] - -Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> - -diff --git a/Makefile b/Makefile ---- a/Makefile -+++ b/Makefile -@@ -5,7 +5,7 @@ - #CFLAGS = -g - CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion - --LIBS = `./vsf_findlibs.sh` -+LIBS = -lssl -lcrypto -lnsl -lresolv - LINK = -Wl,-s - - OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch deleted file mode 100644 index fdcf3a02b6..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam-with-tcp_wrappers.patch +++ /dev/null @@ -1,17 +0,0 @@ -Disable PAM - -Upstream-Status: Inappropriate [config] - -Signed-off-by: Roy.Li <rongqing.li@windriver.com> -diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h ---- vsftpd-2.0.1_org/builddefs.h 2004-07-02 16:36:59.000000000 +0200 -+++ vsftpd-2.0.1_patch/builddefs.h 2004-07-21 09:34:49.044900488 +0200 -@@ -2,7 +2,7 @@ - #define VSF_BUILDDEFS_H - - #define VSF_BUILD_TCPWRAPPERS --#define VSF_BUILD_PAM -+#undef VSF_BUILD_PAM - #undef VSF_BUILD_SSL - - #endif /* VSF_BUILDDEFS_H */ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch index c3919e1174..6c68989d3b 100644 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch @@ -1,10 +1,13 @@ -From e55135c2a4ea7eae3cb1f4dccf69ca477ea095bf Mon Sep 17 00:00:00 2001 +From c5caf52b9ed79da8916ef5722efe6df61a856e2f Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 28 Mar 2017 20:09:12 -0700 Subject: [PATCH] sysdeputil.c: Fix with musl which does not have utmpx Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- +Upstream-Status: Pending + sysdeputil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) @@ -23,6 +26,3 @@ index 06f01f4..a8cff3b 100644 #define __USE_GNU #include <utmpx.h> --- -2.12.1 - diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/makefile-destdir.patch index 1980d09fd4..5ad5c14e7a 100644 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-destdir.patch +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/makefile-destdir.patch @@ -1,14 +1,22 @@ -Use DESTDIR within install to allow installing under a prefix +From bab3f62f1fd5b7c2ab197f4311ad191bf18816b9 Mon Sep 17 00:00:00 2001 +From: Paul Eggleton <paul.eggleton@linux.intel.com> +Date: Mon, 20 Feb 2012 13:51:49 +0000 +Subject: [PATCH] Use DESTDIR within install to allow installing under a prefix Upstream-Status: Pending Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> +--- + Makefile | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + diff --git a/Makefile b/Makefile +index c63ed1b..9e4f35f 100644 --- a/Makefile +++ b/Makefile -@@ -24,21 +24,21 @@ - $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS) +@@ -29,21 +29,21 @@ vsftpd: $(OBJS) + $(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS) install: - if [ -x /usr/local/sbin ]; then \ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/makefile-libs.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/makefile-libs.patch new file mode 100644 index 0000000000..d2e58a3254 --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/makefile-libs.patch @@ -0,0 +1,30 @@ +From 328799d0cd5c523ad7a814fefec16d8a84aa8010 Mon Sep 17 00:00:00 2001 +From: Paul Eggleton <paul.eggleton@linux.intel.com> +Date: Tue, 16 Apr 2013 10:53:55 +0000 +Subject: [PATCH] Hardcode LIBS instead of using a script to determine + available libs + +We want to avoid this dynamic detection so we have a deterministic +build. + +Upstream-Status: Inappropriate [config] + +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 9e4f35f..3a5535d 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,7 +8,7 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \ + -D_FORTIFY_SOURCE=2 \ + #-pedantic -Wconversion + +-LIBS = `./vsf_findlibs.sh` ++LIBS = -lssl -lcrypto -lnsl -lresolv + LINK = -Wl,-s + LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now + diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/makefile-strip.patch index fd3160037f..e596073887 100644 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/makefile-strip.patch +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/makefile-strip.patch @@ -1,10 +1,18 @@ -Disable stripping at link time +From 261874ea47973ea156141185082252fc92081906 Mon Sep 17 00:00:00 2001 +From: Paul Eggleton <paul.eggleton@linux.intel.com> +Date: Tue, 16 Apr 2013 10:53:55 +0000 +Subject: [PATCH] Disable stripping at link time Upstream-Status: Inappropriate [config] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + diff --git a/Makefile b/Makefile +index 3a5535d..e78019a 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/nopam-with-tcp_wrappers.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/nopam-with-tcp_wrappers.patch new file mode 100644 index 0000000000..a4387c132b --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/nopam-with-tcp_wrappers.patch @@ -0,0 +1,26 @@ +From 71628ddc91b6efb9b922a3fcf8cc18522f5387be Mon Sep 17 00:00:00 2001 +From: "Roy.Li" <rongqing.li@windriver.com> +Date: Mon, 20 Feb 2012 13:51:49 +0000 +Subject: [PATCH] Disable PAM + +Upstream-Status: Inappropriate [config] + +Signed-off-by: Roy.Li <rongqing.li@windriver.com> + +--- + builddefs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builddefs.h b/builddefs.h +index 0106d1a..f48a568 100644 +--- a/builddefs.h ++++ b/builddefs.h +@@ -2,7 +2,7 @@ + #define VSF_BUILDDEFS_H + + #define VSF_BUILD_TCPWRAPPERS +-#define VSF_BUILD_PAM ++#undef VSF_BUILD_PAM + #undef VSF_BUILD_SSL + + #endif /* VSF_BUILDDEFS_H */ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/nopam.patch index cf0d68e272..cf0d68e272 100644 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/nopam.patch +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/nopam.patch diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/vsftpd-2.1.0-filter.patch index 32f7e82183..590eb58579 100644 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-2.1.0-filter.patch +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/vsftpd-2.1.0-filter.patch @@ -1,4 +1,7 @@ -Fix the CVE-2015-1419 +From b756444854c5ab3b1284fd7113043fe8860e99ec Mon Sep 17 00:00:00 2001 +From: Roy Li <rongqing.li@windriver.com> +Date: Fri, 24 Apr 2015 09:36:48 +0800 +Subject: [PATCH] Fix the CVE-2015-1419 Upstream-Status: Pending @@ -9,10 +12,17 @@ ftp://195.220.108.108/linux/fedora/linux/development/rawhide/source/SRPMS/v/vsft Signed-off-by: Roy Li <rongqing.li@windriver.com> -diff -up vsftpd-2.1.0/ls.c.filter vsftpd-2.1.0/ls.c ---- vsftpd-2.1.0/ls.c.filter 2008-02-02 02:30:41.000000000 +0100 -+++ vsftpd-2.1.0/ls.c 2009-01-08 19:31:15.000000000 +0100 -@@ -239,9 +239,31 @@ vsf_filename_passes_filter(const struct +--- + ls.c | 26 ++++++++++++++++++++++++-- + str.c | 11 +++++++++++ + str.h | 1 + + 3 files changed, 36 insertions(+), 2 deletions(-) + +diff --git a/ls.c b/ls.c +index 7e1376d..e9302dd 100644 +--- a/ls.c ++++ b/ls.c +@@ -246,9 +246,31 @@ vsf_filename_passes_filter(const struct mystr* p_filename_str, int ret = 0; char last_token = 0; int must_match_at_current_pos = 1; @@ -46,10 +56,11 @@ diff -up vsftpd-2.1.0/ls.c.filter vsftpd-2.1.0/ls.c while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX) { static struct mystr s_match_needed_str; -diff -up vsftpd-2.1.0/str.c.filter vsftpd-2.1.0/str.c ---- vsftpd-2.1.0/str.c.filter 2008-12-17 06:54:16.000000000 +0100 -+++ vsftpd-2.1.0/str.c 2009-01-08 19:31:15.000000000 +0100 -@@ -680,3 +680,14 @@ str_replace_unprintable(struct mystr* p_ +diff --git a/str.c b/str.c +index 6596204..ba4b92a 100644 +--- a/str.c ++++ b/str.c +@@ -711,3 +711,14 @@ str_replace_unprintable(struct mystr* p_str, char new_char) } } @@ -64,10 +75,11 @@ diff -up vsftpd-2.1.0/str.c.filter vsftpd-2.1.0/str.c + if (str_isempty(d_str)) + str_copy (d_str, path); +} -diff -up vsftpd-2.1.0/str.h.filter vsftpd-2.1.0/str.h ---- vsftpd-2.1.0/str.h.filter 2008-12-17 06:53:23.000000000 +0100 -+++ vsftpd-2.1.0/str.h 2009-01-08 19:32:14.000000000 +0100 -@@ -100,6 +100,7 @@ void str_replace_unprintable(struct myst +diff --git a/str.h b/str.h +index ab0a9a4..3a21b50 100644 +--- a/str.h ++++ b/str.h +@@ -100,6 +100,7 @@ void str_replace_unprintable(struct mystr* p_str, char new_char); int str_atoi(const struct mystr* p_str); filesize_t str_a_to_filesize_t(const struct mystr* p_str); unsigned int str_octal_to_uint(const struct mystr* p_str); diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/vsftpd-tcp_wrappers-support.patch index 69745b3a10..c558aee0aa 100644 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/vsftpd-tcp_wrappers-support.patch +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.5/vsftpd-tcp_wrappers-support.patch @@ -1,11 +1,15 @@ -Enable tcp_wrapper. +From c026b0c0de4eebb189bc77b2d4c3b9528454ac04 Mon Sep 17 00:00:00 2001 +From: "Roy.Li" <rongqing.li@windriver.com> +Date: Fri, 19 Jul 2013 10:19:25 +0800 +Subject: [PATCH] Enable tcp_wrapper. Upstream-Status: Inappropriate [configuration] Signed-off-by: Roy.Li <rongqing.li@windriver.com> + --- - builddefs.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + builddefs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builddefs.h b/builddefs.h index e908352..0106d1a 100644 @@ -20,6 +24,3 @@ index e908352..0106d1a 100644 #define VSF_BUILD_PAM #undef VSF_BUILD_SSL --- -1.7.1 - diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.5.bb index 7a20356018..4a843bd800 100644 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.5.bb @@ -1,7 +1,7 @@ SUMMARY = "Very Secure FTP server" HOMEPAGE = "https://security.appspot.com/vsftpd.html" SECTION = "net" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271" DEPENDS = "libcap openssl" @@ -18,33 +18,34 @@ SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \ file://volatiles.99_vsftpd \ file://vsftpd.service \ file://vsftpd-2.1.0-filter.patch \ - file://0001-vsftpd-allow-sysinfo-in-the-seccomp-sandbox.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)} \ file://0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch \ " +UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/v/vsftpd/" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.orig\.tar" + LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \ file://COPYRIGHT;md5=04251b2eb0f298dae376d92454f6f72e \ file://LICENSE;md5=654df2042d44b8cac8a5654fc5be63eb" -SRC_URI[md5sum] = "da119d084bd3f98664636ea05b5bb398" -SRC_URI[sha256sum] = "9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7" +SRC_URI[sha256sum] = "26b602ae454b0ba6d99ef44a09b6b9e0dfa7f67228106736df1f278c70bc91d3" PACKAGECONFIG ??= "tcp-wrappers" PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers" DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-listfile', '', d)}" +RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-listfile', '', d)}" PAMLIB = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-L${STAGING_BASELIBDIR} -lpam', '', d)}" WRAPLIB = "${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', '-lwrap', '', d)}" NOPAM_SRC ="${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}" inherit update-rc.d useradd systemd -CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf" -LDFLAGS_append =" -lcrypt -lcap" - +CONFFILES:${PN} = "${sysconfdir}/vsftpd.conf" +LDFLAGS:append =" -lcrypt -lcap" +CFLAGS:append:libc-musl = " -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -include fcntl.h" EXTRA_OEMAKE = "-e MAKEFLAGS=" do_configure() { @@ -64,14 +65,14 @@ do_install() { install -d ${D}${mandir}/man5 oe_runmake 'DESTDIR=${D}' install install -d ${D}${sysconfdir} - install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf + install -m 600 ${UNPACKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf install -d ${D}${sysconfdir}/init.d/ - install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd + install -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/vsftpd install -d ${D}/${sysconfdir}/default/volatiles - install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd + install -m 644 ${UNPACKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd - install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/ - install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/ + install -m 600 ${UNPACKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/ + install -m 600 ${UNPACKDIR}/vsftpd.user_list ${D}${sysconfdir}/ if ! test -z "${PAMLIB}" ; then install -d ${D}${sysconfdir}/pam.d/ cp ${S}/RedHat/vsftpd.pam ${D}${sysconfdir}/pam.d/vsftpd @@ -86,22 +87,22 @@ do_install() { # Install systemd unit files install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/vsftpd.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/vsftpd.service ${D}${systemd_unitdir}/system sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/vsftpd.service } INITSCRIPT_PACKAGES = "${PN}" -INITSCRIPT_NAME_${PN} = "vsftpd" -INITSCRIPT_PARAMS_${PN} = "defaults 80" +INITSCRIPT_NAME:${PN} = "vsftpd" +INITSCRIPT_PARAMS:${PN} = "defaults 80" USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ftp --no-create-home -g ftp \ +USERADD_PARAM:${PN} = "--system --home-dir /var/lib/ftp --no-create-home -g ftp \ --shell /bin/false ftp " -GROUPADD_PARAM_${PN} = "-r ftp" +GROUPADD_PARAM:${PN} = "-r ftp" -SYSTEMD_SERVICE_${PN} = "vsftpd.service" +SYSTEMD_SERVICE:${PN} = "vsftpd.service" -pkg_postinst_${PN}() { +pkg_postinst:${PN}() { if [ -z "$D" ]; then if type systemd-tmpfiles >/dev/null; then systemd-tmpfiles --create |