From b14f0e5810153a5d062b5eb82a9c244b3375cffc Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 7 Aug 2020 12:02:34 +0200 Subject: [PATCH 01/53] package/feh: update hash of license file In commit 8d8caaf0c295e60fadc0dc14039376bfecb379fa ("package/feh: bump version to 3.4.1"), feh was bumped from 3.4 to 3.4.1. However, the hash of the license file was not updated, even though the COPYING file had seen a copyright year update: -Copyright (C) 2010-2018 Daniel Friesel. +Copyright (C) 2010-2020 Daniel Friesel. Let's update the license file hash to fix legal-info. Fixes: http://autobuild.buildroot.net/results/991fb57bc99c2f44a00c846688f1b3e017b87724/ Signed-off-by: Thomas Petazzoni --- package/feh/feh.hash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/feh/feh.hash b/package/feh/feh.hash index eea32dbca5..20916af640 100644 --- a/package/feh/feh.hash +++ b/package/feh/feh.hash @@ -1,3 +1,3 @@ # Locally calculated after checking pgp signature sha256 782463034ab0135bc8438515191f986db23a79d502154d23a7c07a7574907b7b feh-3.4.1.tar.bz2 -sha256 a289176a74d8e5d071456df5d4ee629aeb86f8eeeb6570076fe126f182c6b91d COPYING +sha256 2c3a31327dc3cc3331aa6e759d378e4f66d0ece7174a0d5aa137f3cba4bf0509 COPYING From 35b014ab8b787e0e44b503fe945b2627dbe41f09 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 7 Aug 2020 12:09:01 +0200 Subject: [PATCH 02/53] package/tftpd: fix build with gcc 10.x Take a patch from Fedora to fix the build of tftpd with gcc 10.x. Fixes: http://autobuild.buildroot.net/results/750ddefd2c31872fd44e9ae70d87048d8512849d/ Signed-off-by: Thomas Petazzoni --- ...tern-qualifier-to-fix-gcc-10.x-build.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/tftpd/0001-Use-extern-qualifier-to-fix-gcc-10.x-build.patch diff --git a/package/tftpd/0001-Use-extern-qualifier-to-fix-gcc-10.x-build.patch b/package/tftpd/0001-Use-extern-qualifier-to-fix-gcc-10.x-build.patch new file mode 100644 index 0000000000..c964555347 --- /dev/null +++ b/package/tftpd/0001-Use-extern-qualifier-to-fix-gcc-10.x-build.patch @@ -0,0 +1,29 @@ +From 6f994166d8571961a08479736ae86c5baa2bb47f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 7 Aug 2020 12:07:45 +0200 +Subject: [PATCH] Use "extern" qualifier to fix gcc 10.x build + +Patch from +https://src.fedoraproject.org/rpms/tftp/raw/master/f/tftp-hpa-5.2-gcc10.patch. + +Signed-off-by: Thomas Petazzoni +--- + tftp/tftp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tftp/tftp.c b/tftp/tftp.c +index d15da22..d067f96 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.26.2 + From a68fb15dc61bb845e38ad8f4ef48249458701bb3 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 7 Aug 2020 12:11:38 +0200 Subject: [PATCH 03/53] package/libabseil-cpp: needs dynamic library support The libabseil-cpp build needs , so let's add a !BR2_STATIC_LIBS dependency. The only package which is selecting libabseil-cpp, grpc, already had this dependency anyway. Fixes: http://autobuild.buildroot.net/results/2d796dd4cc43388da235b83f53778d902f477799/ Signed-off-by: Thomas Petazzoni --- package/grpc/Config.in | 2 +- package/libabseil-cpp/Config.in | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package/grpc/Config.in b/package/grpc/Config.in index 45299888ea..43ccddbdaf 100644 --- a/package/grpc/Config.in +++ b/package/grpc/Config.in @@ -4,7 +4,7 @@ config BR2_PACKAGE_GRPC depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf - depends on !BR2_STATIC_LIBS # protobuf + depends on !BR2_STATIC_LIBS # protobuf, libabseil-cpp depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC select BR2_PACKAGE_C_ARES select BR2_PACKAGE_LIBABSEIL_CPP diff --git a/package/libabseil-cpp/Config.in b/package/libabseil-cpp/Config.in index 38cb66d49f..7b1ca37917 100644 --- a/package/libabseil-cpp/Config.in +++ b/package/libabseil-cpp/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_LIBABSEIL_CPP bool "libabseil-cpp" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # uses dlfcn.h help Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil @@ -11,5 +12,6 @@ config BR2_PACKAGE_LIBABSEIL_CPP https://github.com/abseil/abseil-cpp -comment "libabseil-cpp needs a toolchain w/ C++, threads" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS +comment "libabseil-cpp needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS From af148ef4f01aaa4f8b1ac47f5e46514394bc79aa Mon Sep 17 00:00:00 2001 From: Michael Nosthoff Date: Fri, 7 Aug 2020 10:58:12 +0200 Subject: [PATCH 04/53] package/boost: fixup Optimization flag in boost build When building with Boost Build the CXXFLAGS are extended depending on the optimization level set. When not defined explicitly the optimization level depends on the . For release it's 'speed' and for debug it's set to 'off' These flags overwrite the -O flag passed in with TARGET_CXXFLAGS as it is appended when calling g++. This commit sets the Optimization flags generated by Boost Build to the value of TARGET_OPTIMIZATION no matter what level is used. As Boost Build offers no nice way to alter those values the gcc toolchain file is altered directly. Signed-off-by: Michael Nosthoff Signed-off-by: Yann E. MORIN --- package/boost/boost.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boost/boost.mk b/package/boost/boost.mk index ef638fc9df..323802488d 100644 --- a/package/boost/boost.mk +++ b/package/boost/boost.mk @@ -134,6 +134,7 @@ define BOOST_CONFIGURE_CMDS (cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS)) echo "using gcc : `$(TARGET_CC) -dumpversion` : $(TARGET_CXX) : \"$(BOOST_TARGET_CXXFLAGS)\" \"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam echo "" >> $(@D)/user-config.jam + sed -i "s/: -O.* ;/: $(TARGET_OPTIMIZATION) ;/" $(@D)/tools/build/src/tools/gcc.jam endef define BOOST_BUILD_CMDS From 7667418d970a4eca2d082f1de9f70aa5a93e9e1c Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Fri, 7 Aug 2020 19:11:00 +0200 Subject: [PATCH 05/53] package/apache: security bump version to 2.4.46 Changelog: http://archive.apache.org/dist/httpd/CHANGES_2.4.46 Release notes: https://downloads.apache.org/httpd/Announcement2.4.html Fixes CVE-2020-9490, CVE-2020-11984 & CVE-2020-11993: https://httpd.apache.org/security/vulnerabilities_24.html Added sha512 hash provided by upstream. Signed-off-by: Bernd Kuhls [yann.morin.1998@free.fr: - don't add md5 and sha1 hashes - single comment above hashes ] Signed-off-by: Yann E. MORIN --- package/apache/apache.hash | 5 +++-- package/apache/apache.mk | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package/apache/apache.hash b/package/apache/apache.hash index 7b0e4ad8e7..bd3f6ac7ba 100644 --- a/package/apache/apache.hash +++ b/package/apache/apache.hash @@ -1,4 +1,5 @@ -# From http://archive.apache.org/dist/httpd/httpd-2.4.43.tar.bz2.sha256 -sha256 a497652ab3fc81318cdc2a203090a999150d86461acff97c1065dc910fe10f43 httpd-2.4.43.tar.bz2 +# From http://archive.apache.org/dist/httpd/httpd-2.4.46.tar.bz2.{sha256,sha512} +sha256 740eddf6e1c641992b22359cabc66e6325868c3c5e2e3f98faf349b61ecf41ea httpd-2.4.46.tar.bz2 +sha512 5936784bb662e9d8a4f7fe38b70c043b468114d931cd10ea831bfe74461ea5856b64f88f42c567ab791fc8907640a99884ba4b6a600f86d661781812735b6f13 httpd-2.4.46.tar.bz2 # Locally computed sha256 47b8c2b6c3309282a99d4a3001575c790fead690cc14734628c4667d2bbffc43 LICENSE diff --git a/package/apache/apache.mk b/package/apache/apache.mk index 068f36e325..203d637fbb 100644 --- a/package/apache/apache.mk +++ b/package/apache/apache.mk @@ -4,7 +4,7 @@ # ################################################################################ -APACHE_VERSION = 2.4.43 +APACHE_VERSION = 2.4.46 APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2 APACHE_SITE = http://archive.apache.org/dist/httpd APACHE_LICENSE = Apache-2.0 From 4c8bb2f87a9e7a48ffe554ec644b37d31dc5825b Mon Sep 17 00:00:00 2001 From: Michael Fischer Date: Fri, 7 Aug 2020 14:58:52 +0200 Subject: [PATCH 06/53] package/smstools3: fix build with gcc 10.x 0001-fix-build-with-gcc-10.x.patch: Add patch to fix build with gcc 10.x Fetch from: https://salsa.debian.org/debian-mobcom-team/smstools/-/blob/57a358a9eebbe2ca5639cc526f7027944ed95ea1/debian/patches/gcc10.patch Signed-off-by: Michael Fischer Signed-off-by: Yann E. MORIN --- .../0002-fix-build-with-gcc-10.x.patch | 753 ++++++++++++++++++ 1 file changed, 753 insertions(+) create mode 100644 package/smstools3/0002-fix-build-with-gcc-10.x.patch diff --git a/package/smstools3/0002-fix-build-with-gcc-10.x.patch b/package/smstools3/0002-fix-build-with-gcc-10.x.patch new file mode 100644 index 0000000000..3242c14066 --- /dev/null +++ b/package/smstools3/0002-fix-build-with-gcc-10.x.patch @@ -0,0 +1,753 @@ +Description: fix of FTBFS with gcc10 +Author: Thorsten Alteholz + +Fetch from: + +Signed-off-by: Michael Fischer + +Index: smstools/src/smsd_cfg.h +=================================================================== +--- smstools.orig/src/smsd_cfg.h 2020-08-05 19:02:50.536596441 +0000 ++++ smstools/src/smsd_cfg.h 2020-08-05 19:33:22.915005150 +0000 +@@ -126,17 +126,17 @@ + #define ALPHABET_UNKNOWN 4 + #define ALPHABET_DEFAULT 0 + +-char process_title[32]; // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks. +-int process_id; // -1 for main task, all modems have numbers starting with 0. ++extern char process_title[32]; // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks. ++extern int process_id; // -1 for main task, all modems have numbers starting with 0. + // This is the same as device, can be used like devices[process_id] if IS_MODEM_PROCESS. + +-time_t process_start_time; ++extern time_t process_start_time; + +-int modem_handle; // Handle for modem. ++extern int modem_handle; // Handle for modem. + +-int put_command_timeouts; +-unsigned long long put_command_sent; // 3.1.16beta. +-char tmpdir[PATH_MAX]; // 3.1.16beta. ++extern int put_command_timeouts; ++extern unsigned long long put_command_sent; // 3.1.16beta. ++extern char tmpdir[PATH_MAX]; // 3.1.16beta. + + typedef struct + { +@@ -284,204 +284,204 @@ + + // NOTE for regular run intervals: effective value is at least delaytime. + +-char configfile[PATH_MAX]; // Path to config file +-char d_spool[PATH_MAX]; // Spool directory +-char d_failed[PATH_MAX]; // Failed spool directory +-char d_failed_copy[PATH_MAX]; // 3.1.17. +-char d_incoming[PATH_MAX]; // Incoming spool directory +-char d_incoming_copy[PATH_MAX]; // 3.1.16beta2. +-char d_report[PATH_MAX]; // Incoming report spool directory +-char d_report_copy[PATH_MAX]; // 3.1.17. +-char d_phonecalls[PATH_MAX]; // Incoming phonecalls data directory +-char d_saved[PATH_MAX]; // Directory for smsd's internal use, concatenation storage files etc. +-char d_sent[PATH_MAX]; // Sent spool directory +-char d_sent_copy[PATH_MAX]; // 3.1.17. +-char d_checked[PATH_MAX]; // Spool directory for checked messages (only used when no provider queues used) +-char eventhandler[PATH_MAX]; // Global event handler program or script +-char alarmhandler[PATH_MAX]; // Global alarm handler program or script +-char checkhandler[PATH_MAX]; // Handler that checks if the sms file is valid. +-int alarmlevel; // Alarm Level (9=highest). Verbosity of alarm handler. +-char logfile[PATH_MAX]; // Name or Handle of Log File +-int loglevel; // Log Level (9=highest). Verbosity of log file. +-_queue queues[NUMBER_OF_MODEMS]; // Queues +-_device devices[NUMBER_OF_MODEMS]; // Modem devices +-int delaytime; // sleep-time after workless +-int delaytime_mainprocess; // sleep-time after workless, main process. If -1, delaytime is used. +-int blocktime; // sleep-time after multiple errors +-int blockafter; // Block modem after n errors +-int errorsleeptime; // sleep-time after each error +-int autosplit; // Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH +-int receive_before_send; // if 1 smsd tries to receive one message before sending +-int store_received_pdu; // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all +-int store_sent_pdu; // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all +-int validity_period; // Validity period for messages. +-int decode_unicode_text; // 1 if unicode text is decoded internally. +-int internal_combine; // 1 if multipart message is combined internally. +-int internal_combine_binary; // 1 if multipart binary message is combined internally. Defaults to internal_combine. +-int keep_filename; // 0 if unique filename is created to each directory when a message file is moved. +-int store_original_filename; // 1 if an original filename is saved to message file when it's moved from +- // outgoing directory to spooler. Works together with keep_filename. +-int date_filename; // 1 or 2 if YYYYMMDD is included to the filename of incoming message. +-char regular_run[PATH_MAX]; // Script/program which is run regularly. +-int regular_run_interval; // Number of seconds between running a regular_run script/progdam. +-char admin_to[SIZE_TO]; // Destination number for administrative messages. +-int filename_preview; // Number of chars of message text to concatenate to filename. +-int incoming_utf8; // 1 if incoming files are saved using UTF-8 character set. +-int outgoing_utf8; // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM. +-int log_charconv; // 1 if character set conversion is logged. +-int log_single_lines; // 1 if linefeeds are removed from the modem response to be logged. +-int executable_check; // 0 if eventhandler and other executables are NOT checked during the startup checking. +-int keep_messages; // For testing purposes: messages are not deleted and smsd stops after first run. +-char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages. +-int ic_purge_hours; // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes +-int ic_purge_minutes; // and if there is message parts older than defined, they are handled or deleted. +-int ic_purge_read; // 1 = message parts are stored as single messages. 0 = parts are just deleted. +-int ic_purge_interval; // +-char shell[PATH_MAX]; // Shell used to run eventhandler, defaults to /bin/sh +-char adminmessage_device[32]; // Name of device used to send administrative messages of mainspooler. +-int smart_logging; // 1 = if loglevel is less than 7, degug log is written is there has been any errors. +-int status_signal_quality; // 1 = signal quality is written to status file. +-int status_include_counters; // 1 = succeeded, failed and received counters are included in the status line. +-int status_include_uptime; // 3.1.16beta: 1 = include started & uptime line in the status file. +-int hangup_incoming_call; // 1 = if detected unexpected input contains RING and we want to end call. +-int max_continuous_sending; // Defines when sending is breaked to do check/do other tasks. Time in minutes. +-int voicecall_hangup_ath; // If ATH is used instead of AT+CHUP. ++extern char configfile[PATH_MAX]; // Path to config file ++extern char d_spool[PATH_MAX]; // Spool directory ++extern char d_failed[PATH_MAX]; // Failed spool directory ++extern char d_failed_copy[PATH_MAX]; // 3.1.17. ++extern char d_incoming[PATH_MAX]; // Incoming spool directory ++extern char d_incoming_copy[PATH_MAX]; // 3.1.16beta2. ++extern char d_report[PATH_MAX]; // Incoming report spool directory ++extern char d_report_copy[PATH_MAX]; // 3.1.17. ++extern char d_phonecalls[PATH_MAX]; // Incoming phonecalls data directory ++extern char d_saved[PATH_MAX]; // Directory for smsd's internal use, concatenation storage files etc. ++extern char d_sent[PATH_MAX]; // Sent spool directory ++extern char d_sent_copy[PATH_MAX]; // 3.1.17. ++extern char d_checked[PATH_MAX]; // Spool directory for checked messages (only used when no provider queues used) ++extern char eventhandler[PATH_MAX]; // Global event handler program or script ++extern char alarmhandler[PATH_MAX]; // Global alarm handler program or script ++extern char checkhandler[PATH_MAX]; // Handler that checks if the sms file is valid. ++extern int alarmlevel; // Alarm Level (9=highest). Verbosity of alarm handler. ++extern char logfile[PATH_MAX]; // Name or Handle of Log File ++extern int loglevel; // Log Level (9=highest). Verbosity of log file. ++extern _queue queues[NUMBER_OF_MODEMS]; // Queues ++extern _device devices[NUMBER_OF_MODEMS]; // Modem devices ++extern int delaytime; // sleep-time after workless ++extern int delaytime_mainprocess; // sleep-time after workless, main process. If -1, delaytime is used. ++extern int blocktime; // sleep-time after multiple errors ++extern int blockafter; // Block modem after n errors ++extern int errorsleeptime; // sleep-time after each error ++extern int autosplit; // Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH ++extern int receive_before_send; // if 1 smsd tries to receive one message before sending ++extern int store_received_pdu; // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all ++extern int store_sent_pdu; // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all ++extern int validity_period; // Validity period for messages. ++extern int decode_unicode_text; // 1 if unicode text is decoded internally. ++extern int internal_combine; // 1 if multipart message is combined internally. ++extern int internal_combine_binary; // 1 if multipart binary message is combined internally. Defaults to internal_combine. ++extern int keep_filename; // 0 if unique filename is created to each directory when a message file is moved. ++extern int store_original_filename; // 1 if an original filename is saved to message file when it's moved from ++// outgoing directory to spooler. Works together with keep_filename. ++extern int date_filename; // 1 or 2 if YYYYMMDD is included to the filename of incoming message. ++extern char regular_run[PATH_MAX]; // Script/program which is run regularly. ++extern int regular_run_interval; // Number of seconds between running a regular_run script/progdam. ++extern char admin_to[SIZE_TO]; // Destination number for administrative messages. ++extern int filename_preview; // Number of chars of message text to concatenate to filename. ++extern int incoming_utf8; // 1 if incoming files are saved using UTF-8 character set. ++extern int outgoing_utf8; // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM. ++extern int log_charconv; // 1 if character set conversion is logged. ++extern int log_single_lines; // 1 if linefeeds are removed from the modem response to be logged. ++extern int executable_check; // 0 if eventhandler and other executables are NOT checked during the startup checking. ++extern int keep_messages; // For testing purposes: messages are not deleted and smsd stops after first run. ++extern char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages. ++extern int ic_purge_hours; // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes ++extern int ic_purge_minutes; // and if there is message parts older than defined, they are handled or deleted. ++extern int ic_purge_read; // 1 = message parts are stored as single messages. 0 = parts are just deleted. ++extern int ic_purge_interval; // ++extern char shell[PATH_MAX]; // Shell used to run eventhandler, defaults to /bin/sh ++extern char adminmessage_device[32]; // Name of device used to send administrative messages of mainspooler. ++extern int smart_logging; // 1 = if loglevel is less than 7, degug log is written is there has been any errors. ++extern int status_signal_quality; // 1 = signal quality is written to status file. ++extern int status_include_counters; // 1 = succeeded, failed and received counters are included in the status line. ++extern int status_include_uptime; // 3.1.16beta: 1 = include started & uptime line in the status file. ++extern int hangup_incoming_call; // 1 = if detected unexpected input contains RING and we want to end call. ++extern int max_continuous_sending; // Defines when sending is breaked to do check/do other tasks. Time in minutes. ++extern int voicecall_hangup_ath; // If ATH is used instead of AT+CHUP. + + // 3.1.5: +-int trust_outgoing; // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling. ++extern int trust_outgoing; // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling. + + // 3.1.5: +-int ignore_outgoing_priority; // 1 = Priority: high header is not checked. Speeds up spooling. ++extern int ignore_outgoing_priority; // 1 = Priority: high header is not checked. Speeds up spooling. + + // 3.1.7: +-int ignore_exec_output; // 1 = stdout and stderr of eventhandlers is _not_ checked. ++extern int ignore_exec_output; // 1 = stdout and stderr of eventhandlers is _not_ checked. + + // 3.1.7: +-mode_t conf_umask; // File mode creation mask for smsd and modem processes. ++extern mode_t conf_umask; // File mode creation mask for smsd and modem processes. + + // 3.1.7: +-int trim_text; // 1 = trailing whitespaces are removed from text: ++extern int trim_text; // 1 = trailing whitespaces are removed from text: + + // 3.1.7: +-int use_linux_ps_trick; // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc. ++extern int use_linux_ps_trick; // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc. + + // 3.1.7: +-int log_unmodified; ++extern int log_unmodified; + + // 3.1.7: +-char suspend_filename[PATH_MAX]; ++extern char suspend_filename[PATH_MAX]; + + // 3.1.9: +-int spool_directory_order; ++extern int spool_directory_order; + + // 3.1.9: 1 if read_from_modem is logged. +-int log_read_from_modem; ++extern int log_read_from_modem; + + // 3.1.16beta2: log_read_timing for performance tuning. +-int log_read_timing; ++extern int log_read_timing; + + // 3.1.16beta: +-int log_response_time; ++extern int log_response_time; + + // 3.1.16beta2: +-int default_alphabet; ++extern int default_alphabet; + + // 3.1.17: Child process for the mainprocess: +-char mainprocess_child[PATH_MAX]; +-char mainprocess_child_args[PATH_MAX]; ++extern char mainprocess_child[PATH_MAX]; ++extern char mainprocess_child_args[PATH_MAX]; + + // 3.1.17: Notifier for the mainprocess: +-int mainprocess_notifier; ++extern int mainprocess_notifier; + + // 3.1.17: If *_copy was made, evenhandler can use it instead of original file: +-int eventhandler_use_copy; ++extern int eventhandler_use_copy; + + // 3.1.17: This defines how long to sleep while looping: +-int sleeptime_mainprocess; ++extern int sleeptime_mainprocess; + + // 3.1.17: Defines how often PID is checked to detect if another smsd is running: +-int check_pid_interval; ++extern int check_pid_interval; + + // 3.1.18: start script/program for mainprocess: +-char mainprocess_start[PATH_MAX]; +-char mainprocess_start_args[PATH_MAX]; ++extern char mainprocess_start[PATH_MAX]; ++extern char mainprocess_start_args[PATH_MAX]; + +-int message_count; // Counter for sent messages. Multipart message is one message. ++extern int message_count; // Counter for sent messages. Multipart message is one message. + +-volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received. +-volatile sig_atomic_t terminate; // To terminate when SIGTERM is received. ++extern volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received. ++extern volatile sig_atomic_t terminate; // To terminate when SIGTERM is received. + +-char username[65]; // user and group name which are used to run. +-char groupname[65]; // (max length is just a guess) ++extern char username[65]; // user and group name which are used to run. ++extern char groupname[65]; // (max length is just a guess) + +-char infofile[PATH_MAX]; // Hepler file for stopping the smsd smoothly. +-char pidfile[PATH_MAX]; // File where a process id is stored. ++extern char infofile[PATH_MAX]; // Hepler file for stopping the smsd smoothly. ++extern char pidfile[PATH_MAX]; // File where a process id is stored. + + // Command line arguments: +-char arg_username[65]; +-char arg_groupname[65]; +-char arg_infofile[PATH_MAX]; +-char arg_pidfile[PATH_MAX]; +-char arg_logfile[PATH_MAX]; +-int arg_terminal; ++extern char arg_username[65]; ++extern char arg_groupname[65]; ++extern char arg_infofile[PATH_MAX]; ++extern char arg_pidfile[PATH_MAX]; ++extern char arg_logfile[PATH_MAX]; ++extern int arg_terminal; + // 3.1.7: +-char arg_7bit_packed[512]; +-int do_encode_decode_arg_7bit_packed; ++extern char arg_7bit_packed[512]; ++extern int do_encode_decode_arg_7bit_packed; + +-int terminal; // 1 if smsd is communicating with terminal. +-pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes. +-char run_info[PATH_MAX]; // Information about external script/program execution. ++extern int terminal; // 1 if smsd is communicating with terminal. ++extern pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes. ++extern char run_info[PATH_MAX]; // Information about external script/program execution. + +-char communicate[32]; // Device name for terminal communication mode. ++extern char communicate[32]; // Device name for terminal communication mode. + +-char international_prefixes[PATH_MAX +1]; +-char national_prefixes[PATH_MAX +1]; ++extern char international_prefixes[PATH_MAX +1]; ++extern char national_prefixes[PATH_MAX +1]; + + // Storage for startup errors: +-char *startup_err_str; +-int startup_err_count; ++extern char *startup_err_str; ++extern int startup_err_count; + + // Storage for PDU's: +-char *incoming_pdu_store; +-char *outgoing_pdu_store; +-char *routed_pdu_store; ++extern char *incoming_pdu_store; ++extern char *outgoing_pdu_store; ++extern char *routed_pdu_store; + + // Storage for getfile errors: +-char *getfile_err_store; ++extern char *getfile_err_store; + + // Text buffer for error messages: +-char tb[SIZE_TB]; ++extern char tb[SIZE_TB]; + + // Buffer for SIM memory checking: +-char *check_memory_buffer; +-size_t check_memory_buffer_size; ++extern char *check_memory_buffer; ++extern size_t check_memory_buffer_size; + +-int os_cygwin; // 1 if we are on Cygwin. ++extern int os_cygwin; // 1 if we are on Cygwin. + +-char language_file[PATH_MAX]; // File name of translated headers. +-char yes_chars[SIZE_HEADER]; // Characters which mean "yes" in the yesno() question. +-char no_chars[SIZE_HEADER]; // See details inside read_translation() function. +-char yes_word[SIZE_HEADER]; // "yes" printed as an output. +-char no_word[SIZE_HEADER]; // "no" +-char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports). +-char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps +-char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename +-int translate_incoming; // 0 if incoming message headers are NOT transtaled. ++extern char language_file[PATH_MAX]; // File name of translated headers. ++extern char yes_chars[SIZE_HEADER]; // Characters which mean "yes" in the yesno() question. ++extern char no_chars[SIZE_HEADER]; // See details inside read_translation() function. ++extern char yes_word[SIZE_HEADER]; // "yes" printed as an output. ++extern char no_word[SIZE_HEADER]; // "no" ++extern char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports). ++extern char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps ++extern char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename ++extern int translate_incoming; // 0 if incoming message headers are NOT transtaled. + + // 3.1.14: +-int logtime_us; +-int logtime_ms; ++extern int logtime_us; ++extern int logtime_ms; + + // 3.1.14: +-int shell_test; ++extern int shell_test; + + // Next two are for debugging purposes: +-int enable_smsd_debug; +-char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file. ++extern int enable_smsd_debug; ++extern char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file. + + // 3.1.20: Alt keys in communication mode: + #define COMMUNICATE_A_KEY_COUNT 10 +-char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256]; ++extern char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256]; + + /* initialize all variable with default values */ + +Index: smstools/src/smsd_cfg.c +=================================================================== +--- smstools.orig/src/smsd_cfg.c 2020-07-27 19:00:41.616207603 +0000 ++++ smstools/src/smsd_cfg.c 2020-08-05 19:17:41.595712888 +0000 +@@ -38,6 +38,221 @@ + #include "modeminit.h" + #include "charshift.h" + ++ ++/* global variables */ ++char process_title[32]; // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks. ++int process_id; // -1 for main task, all modems have numbers starting with 0. ++ // This is the same as device, can be used like devices[process_id] if IS_MODEM_PROCESS. ++ ++time_t process_start_time; ++ ++int modem_handle; // Handle for modem. ++ ++int put_command_timeouts; ++unsigned long long put_command_sent; // 3.1.16beta. ++char tmpdir[PATH_MAX]; // 3.1.16beta. ++ ++// NOTE for regular run intervals: effective value is at least delaytime. ++ ++char configfile[PATH_MAX]; // Path to config file ++char d_spool[PATH_MAX]; // Spool directory ++char d_failed[PATH_MAX]; // Failed spool directory ++char d_failed_copy[PATH_MAX]; // 3.1.17. ++char d_incoming[PATH_MAX]; // Incoming spool directory ++char d_incoming_copy[PATH_MAX]; // 3.1.16beta2. ++char d_report[PATH_MAX]; // Incoming report spool directory ++char d_report_copy[PATH_MAX]; // 3.1.17. ++char d_phonecalls[PATH_MAX]; // Incoming phonecalls data directory ++char d_saved[PATH_MAX]; // Directory for smsd's internal use, concatenation storage files etc. ++char d_sent[PATH_MAX]; // Sent spool directory ++char d_sent_copy[PATH_MAX]; // 3.1.17. ++char d_checked[PATH_MAX]; // Spool directory for checked messages (only used when no provider queues used) ++char eventhandler[PATH_MAX]; // Global event handler program or script ++char alarmhandler[PATH_MAX]; // Global alarm handler program or script ++char checkhandler[PATH_MAX]; // Handler that checks if the sms file is valid. ++int alarmlevel; // Alarm Level (9=highest). Verbosity of alarm handler. ++char logfile[PATH_MAX]; // Name or Handle of Log File ++int loglevel; // Log Level (9=highest). Verbosity of log file. ++_queue queues[NUMBER_OF_MODEMS]; // Queues ++_device devices[NUMBER_OF_MODEMS]; // Modem devices ++int delaytime; // sleep-time after workless ++int delaytime_mainprocess; // sleep-time after workless, main process. If -1, delaytime is used. ++int blocktime; // sleep-time after multiple errors ++int blockafter; // Block modem after n errors ++int errorsleeptime; // sleep-time after each error ++int autosplit; // Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH ++int receive_before_send; // if 1 smsd tries to receive one message before sending ++int store_received_pdu; // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all ++int store_sent_pdu; // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all ++int validity_period; // Validity period for messages. ++int decode_unicode_text; // 1 if unicode text is decoded internally. ++int internal_combine; // 1 if multipart message is combined internally. ++int internal_combine_binary; // 1 if multipart binary message is combined internally. Defaults to internal_combine. ++int keep_filename; // 0 if unique filename is created to each directory when a message file is moved. ++int store_original_filename; // 1 if an original filename is saved to message file when it's moved from ++ // outgoing directory to spooler. Works together with keep_filename. ++int date_filename; // 1 or 2 if YYYYMMDD is included to the filename of incoming message. ++char regular_run[PATH_MAX]; // Script/program which is run regularly. ++int regular_run_interval; // Number of seconds between running a regular_run script/progdam. ++char admin_to[SIZE_TO]; // Destination number for administrative messages. ++int filename_preview; // Number of chars of message text to concatenate to filename. ++int incoming_utf8; // 1 if incoming files are saved using UTF-8 character set. ++int outgoing_utf8; // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM. ++int log_charconv; // 1 if character set conversion is logged. ++int log_single_lines; // 1 if linefeeds are removed from the modem response to be logged. ++int executable_check; // 0 if eventhandler and other executables are NOT checked during the startup checking. ++int keep_messages; // For testing purposes: messages are not deleted and smsd stops after first run. ++char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages. ++int ic_purge_hours; // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes ++int ic_purge_minutes; // and if there is message parts older than defined, they are handled or deleted. ++int ic_purge_read; // 1 = message parts are stored as single messages. 0 = parts are just deleted. ++int ic_purge_interval; // ++char shell[PATH_MAX]; // Shell used to run eventhandler, defaults to /bin/sh ++char adminmessage_device[32]; // Name of device used to send administrative messages of mainspooler. ++int smart_logging; // 1 = if loglevel is less than 7, degug log is written is there has been any errors. ++int status_signal_quality; // 1 = signal quality is written to status file. ++int status_include_counters; // 1 = succeeded, failed and received counters are included in the status line. ++int status_include_uptime; // 3.1.16beta: 1 = include started & uptime line in the status file. ++int hangup_incoming_call; // 1 = if detected unexpected input contains RING and we want to end call. ++int max_continuous_sending; // Defines when sending is breaked to do check/do other tasks. Time in minutes. ++int voicecall_hangup_ath; // If ATH is used instead of AT+CHUP. ++ ++// 3.1.5: ++int trust_outgoing; // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling. ++ ++// 3.1.5: ++int ignore_outgoing_priority; // 1 = Priority: high header is not checked. Speeds up spooling. ++ ++// 3.1.7: ++int ignore_exec_output; // 1 = stdout and stderr of eventhandlers is _not_ checked. ++ ++// 3.1.7: ++mode_t conf_umask; // File mode creation mask for smsd and modem processes. ++ ++// 3.1.7: ++int trim_text; // 1 = trailing whitespaces are removed from text: ++ ++// 3.1.7: ++int use_linux_ps_trick; // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc. ++ ++// 3.1.7: ++int log_unmodified; ++ ++// 3.1.7: ++char suspend_filename[PATH_MAX]; ++ ++// 3.1.9: ++int spool_directory_order; ++ ++// 3.1.9: 1 if read_from_modem is logged. ++int log_read_from_modem; ++ ++// 3.1.16beta2: log_read_timing for performance tuning. ++int log_read_timing; ++ ++// 3.1.16beta: ++int log_response_time; ++ ++// 3.1.16beta2: ++int default_alphabet; ++ ++// 3.1.17: Child process for the mainprocess: ++char mainprocess_child[PATH_MAX]; ++char mainprocess_child_args[PATH_MAX]; ++ ++// 3.1.17: Notifier for the mainprocess: ++int mainprocess_notifier; ++ ++// 3.1.17: If *_copy was made, evenhandler can use it instead of original file: ++int eventhandler_use_copy; ++ ++// 3.1.17: This defines how long to sleep while looping: ++int sleeptime_mainprocess; ++ ++// 3.1.17: Defines how often PID is checked to detect if another smsd is running: ++int check_pid_interval; ++ ++// 3.1.18: start script/program for mainprocess: ++char mainprocess_start[PATH_MAX]; ++char mainprocess_start_args[PATH_MAX]; ++ ++int message_count; // Counter for sent messages. Multipart message is one message. ++ ++volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received. ++volatile sig_atomic_t terminate; // To terminate when SIGTERM is received. ++ ++char username[65]; // user and group name which are used to run. ++char groupname[65]; // (max length is just a guess) ++ ++char infofile[PATH_MAX]; // Hepler file for stopping the smsd smoothly. ++char pidfile[PATH_MAX]; // File where a process id is stored. ++ ++// Command line arguments: ++char arg_username[65]; ++char arg_groupname[65]; ++char arg_infofile[PATH_MAX]; ++char arg_pidfile[PATH_MAX]; ++char arg_logfile[PATH_MAX]; ++int arg_terminal; ++// 3.1.7: ++char arg_7bit_packed[512]; ++int do_encode_decode_arg_7bit_packed; ++ ++int terminal; // 1 if smsd is communicating with terminal. ++pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes. ++char run_info[PATH_MAX]; // Information about external script/program execution. ++ ++char communicate[32]; // Device name for terminal communication mode. ++ ++char international_prefixes[PATH_MAX +1]; ++char national_prefixes[PATH_MAX +1]; ++ ++// Storage for startup errors: ++char *startup_err_str; ++int startup_err_count; ++ ++// Storage for PDU's: ++char *incoming_pdu_store; ++char *outgoing_pdu_store; ++char *routed_pdu_store; ++ ++// Storage for getfile errors: ++char *getfile_err_store; ++ ++// Text buffer for error messages: ++char tb[SIZE_TB]; ++ ++// Buffer for SIM memory checking: ++char *check_memory_buffer; ++size_t check_memory_buffer_size; ++ ++int os_cygwin; // 1 if we are on Cygwin. ++ ++char language_file[PATH_MAX]; // File name of translated headers. ++char yes_chars[SIZE_HEADER]; // Characters which mean "yes" in the yesno() question. ++char no_chars[SIZE_HEADER]; // See details inside read_translation() function. ++char yes_word[SIZE_HEADER]; // "yes" printed as an output. ++char no_word[SIZE_HEADER]; // "no" ++char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports). ++char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps ++char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename ++int translate_incoming; // 0 if incoming message headers are NOT transtaled. ++ ++// 3.1.14: ++int logtime_us; ++int logtime_ms; ++ ++// 3.1.14: ++int shell_test; ++ ++// Next two are for debugging purposes: ++int enable_smsd_debug; ++char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file. ++ ++// 3.1.20: Alt keys in communication mode: ++#define COMMUNICATE_A_KEY_COUNT 10 ++char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256]; ++ + char *msg_dir = "%s directory %s cannot be opened."; + char *msg_file = "%s directory %s is not writable."; + char *msg_not_executable = "is not executable for smsd."; +Index: smstools/src/logging.c +=================================================================== +--- smstools.orig/src/logging.c 2020-07-27 19:00:41.612207583 +0000 ++++ smstools/src/logging.c 2020-08-05 19:27:38.373800111 +0000 +@@ -25,6 +25,16 @@ + #include "smsd_cfg.h" + #include "stats.h" + ++ ++// 3.1.16beta2: Moved logch() and prch() from charset.c to logging.c: ++char logch_buffer[8192]; ++ ++char prch(char ch); ++ ++// 3.1.16beta: changed type: ++//int trouble_logging_started; ++time_t trouble_logging_started; ++ + int Filehandle = -1; + int Level; + int SavedLevel; +Index: smstools/src/logging.h +=================================================================== +--- smstools.orig/src/logging.h 2020-07-27 19:00:41.612207583 +0000 ++++ smstools/src/logging.h 2020-08-05 19:27:52.077848035 +0000 +@@ -18,7 +18,7 @@ + #include + + // 3.1.16beta2: Moved logch() and prch() from charset.c to logging.c: +-char logch_buffer[8192]; ++extern char logch_buffer[8192]; + + #ifdef __GNUC__ + void logch(char* format, ...) __attribute__ ((format(printf, 1, 2))); +@@ -26,11 +26,11 @@ + void logch(char* format, ...); + #endif + +-char prch(char ch); ++extern char prch(char ch); + + // 3.1.16beta: changed type: + //int trouble_logging_started; +-time_t trouble_logging_started; ++extern time_t trouble_logging_started; + + int change_loglevel(int new_level); + void restore_loglevel(); +Index: smstools/src/stats.c +=================================================================== +--- smstools.orig/src/stats.c 2020-07-27 19:00:41.616207603 +0000 ++++ smstools/src/stats.c 2020-08-05 19:28:58.094078936 +0000 +@@ -29,6 +29,20 @@ + #include + #endif + ++ ++_stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!) ++int rejected_counter; // Statistic counter, rejected SM, number does not fit into any queue ++time_t start_time; // Start time of smsd, allows statistic functions ++int printstatus; // if 1 smsd outputs status on stdout ++time_t last_stats; // time when the last stats file was created ++char d_stats[PATH_MAX]; // path to statistic files ++int stats_interval; // time between statistic files in seconds. ++int stats_no_zeroes; // Suppress files that contain only zeroes ++int status_interval; // time between updating status file in seconds ++ ++char *shared_buffer; ++ ++ + char newstatus[NUMBER_OF_MODEMS +1] = {0}; + char oldstatus[NUMBER_OF_MODEMS +1] = {0}; + +Index: smstools/src/stats.h +=================================================================== +--- smstools.orig/src/stats.h 2020-07-27 19:00:41.616207603 +0000 ++++ smstools/src/stats.h 2020-08-05 19:29:14.750137182 +0000 +@@ -33,17 +33,17 @@ + int ber; + } _stats; + +-_stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!) +-int rejected_counter; // Statistic counter, rejected SM, number does not fit into any queue +-time_t start_time; // Start time of smsd, allows statistic functions +-int printstatus; // if 1 smsd outputs status on stdout +-time_t last_stats; // time when the last stats file was created +-char d_stats[PATH_MAX]; // path to statistic files +-int stats_interval; // time between statistic files in seconds. +-int stats_no_zeroes; // Suppress files that contain only zeroes +-int status_interval; // time between updating status file in seconds ++extern _stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!) ++extern int rejected_counter; // Statistic counter, rejected SM, number does not fit into any queue ++extern time_t start_time; // Start time of smsd, allows statistic functions ++extern int printstatus; // if 1 smsd outputs status on stdout ++extern time_t last_stats; // time when the last stats file was created ++extern char d_stats[PATH_MAX]; // path to statistic files ++extern int stats_interval; // time between statistic files in seconds. ++extern int stats_no_zeroes; // Suppress files that contain only zeroes ++extern int status_interval; // time between updating status file in seconds + +-char *shared_buffer; ++extern char *shared_buffer; + + /* Creates shared memory variables for statistic data */ + +Index: smstools/src/blacklist.c +=================================================================== +--- smstools.orig/src/blacklist.c 2020-07-27 19:00:41.612207583 +0000 ++++ smstools/src/blacklist.c 2020-08-05 19:34:13.903183463 +0000 +@@ -23,6 +23,8 @@ + #include "alarm.h" + #include "smsd_cfg.h" + ++char blacklist[256]; // Filename of the black-list ++ + int inblacklist(char* msisdn) + { + FILE* file; +Index: smstools/src/blacklist.h +=================================================================== +--- smstools.orig/src/blacklist.h 2020-07-27 19:00:41.612207583 +0000 ++++ smstools/src/blacklist.h 2020-08-05 19:34:04.903151994 +0000 +@@ -15,7 +15,7 @@ + #ifndef BLACK_H + #define BLACK_H + +-char blacklist[256]; // Filename of the black-list ++extern char blacklist[256]; // Filename of the black-list + + int inblacklist(char* msisdn); + +Index: smstools/src/whitelist.c +=================================================================== +--- smstools.orig/src/whitelist.c 2020-07-27 19:00:41.616207603 +0000 ++++ smstools/src/whitelist.c 2020-08-05 19:39:23.436266057 +0000 +@@ -23,6 +23,8 @@ + #include "alarm.h" + #include "smsd_cfg.h" + ++char whitelist[256]; // Filename of the white-list ++ + /* Used with >= 3.1x */ + int inwhitelist_q(char* msisdn, char *queuename) + { +Index: smstools/src/whitelist.h +=================================================================== +--- smstools.orig/src/whitelist.h 2020-07-27 19:00:41.616207603 +0000 ++++ smstools/src/whitelist.h 2020-08-05 19:34:29.959239624 +0000 +@@ -15,7 +15,7 @@ + #ifndef WHITE_H + #define WHITE_H + +-char whitelist[256]; // Filename of the white-list ++extern char whitelist[256]; // Filename of the white-list + + /* Used with >= 3.1x */ + int inwhitelist_q(char* msisdn, char *queuename); From 2dbf9fd2accc8681c24ef4cd174c368d68b0e06e Mon Sep 17 00:00:00 2001 From: Michael Fischer Date: Fri, 7 Aug 2020 13:37:00 +0200 Subject: [PATCH 07/53] package/python-rpi-gpio: fix build with gcc 10.x 0001-fix-build-with-gcc-10.x.patch: Add patch to fix build with gcc 10.x Signed-off-by: Michael Fischer Signed-off-by: Yann E. MORIN --- .../0001-fix-build-with-gcc-10.x.patch | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch diff --git a/package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch b/package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch new file mode 100644 index 0000000000..7c7b772894 --- /dev/null +++ b/package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch @@ -0,0 +1,117 @@ +Description: This patch fixes the "multiple definition of" errors with gcc10 + +Signed-off-by: Michael Fischer + +diff -purN python-rpi-gpio.org/source/common.h python-rpi-gpio/source/common.h +--- python-rpi-gpio.org/source/common.h 2019-07-21 14:41:22.000000000 +0200 ++++ python-rpi-gpio/source/common.h 2020-08-07 09:31:33.948575964 +0200 +@@ -30,14 +30,14 @@ SOFTWARE. + #define I2C 42 + #define PWM 43 + +-int gpio_mode; +-const int pin_to_gpio_rev1[41]; +-const int pin_to_gpio_rev2[41]; +-const int pin_to_gpio_rev3[41]; +-const int (*pin_to_gpio)[41]; +-int gpio_direction[54]; +-rpi_info rpiinfo; +-int setup_error; +-int module_setup; ++extern int gpio_mode; ++extern const int pin_to_gpio_rev1[41]; ++extern const int pin_to_gpio_rev2[41]; ++extern const int pin_to_gpio_rev3[41]; ++extern const int (*pin_to_gpio)[41]; ++extern int gpio_direction[54]; ++extern rpi_info rpiinfo; ++extern int setup_error; ++extern int module_setup; + int check_gpio_priv(void); + int get_gpio_number(int channel, unsigned int *gpio); +diff -purN python-rpi-gpio.org/source/constants.h python-rpi-gpio/source/constants.h +--- python-rpi-gpio.org/source/constants.h 2019-07-21 14:41:22.000000000 +0200 ++++ python-rpi-gpio/source/constants.h 2020-08-07 09:32:15.522196618 +0200 +@@ -23,22 +23,22 @@ SOFTWARE. + #define PY_PUD_CONST_OFFSET 20 + #define PY_EVENT_CONST_OFFSET 30 + +-PyObject *high; +-PyObject *low; +-PyObject *input; +-PyObject *output; +-PyObject *pwm; +-PyObject *serial; +-PyObject *i2c; +-PyObject *spi; +-PyObject *unknown; +-PyObject *board; +-PyObject *bcm; +-PyObject *pud_off; +-PyObject *pud_up; +-PyObject *pud_down; +-PyObject *rising_edge; +-PyObject *falling_edge; +-PyObject *both_edge; ++extern PyObject *high; ++extern PyObject *low; ++extern PyObject *input; ++extern PyObject *output; ++extern PyObject *pwm; ++extern PyObject *serial; ++extern PyObject *i2c; ++extern PyObject *spi; ++extern PyObject *unknown; ++extern PyObject *board; ++extern PyObject *bcm; ++extern PyObject *pud_off; ++extern PyObject *pud_up; ++extern PyObject *pud_down; ++extern PyObject *rising_edge; ++extern PyObject *falling_edge; ++extern PyObject *both_edge; + + void define_constants(PyObject *module); +diff -purN python-rpi-gpio.org/source/event_gpio.c python-rpi-gpio/source/event_gpio.c +--- python-rpi-gpio.org/source/event_gpio.c 2019-07-21 14:41:22.000000000 +0200 ++++ python-rpi-gpio/source/event_gpio.c 2020-08-07 09:42:05.564483136 +0200 +@@ -57,7 +57,7 @@ struct callback + }; + struct callback *callbacks = NULL; + +-pthread_t threads; ++static pthread_t threads; + int event_occurred[54] = { 0 }; + int thread_running = 0; + int epfd_thread = -1; +diff -purN python-rpi-gpio.org/source/py_pwm.h python-rpi-gpio/source/py_pwm.h +--- python-rpi-gpio.org/source/py_pwm.h 2019-07-21 14:41:22.000000000 +0200 ++++ python-rpi-gpio/source/py_pwm.h 2020-08-07 09:38:49.445646807 +0200 +@@ -20,5 +20,5 @@ OUT OF OR IN CONNECTION WITH THE SOFTWAR + SOFTWARE. + */ + +-PyTypeObject PWMType; ++extern PyTypeObject PWMType; + PyTypeObject *PWM_init_PWMType(void); +diff -purN python-rpi-gpio.org/source/soft_pwm.c python-rpi-gpio/source/soft_pwm.c +--- python-rpi-gpio.org/source/soft_pwm.c 2019-07-21 14:41:22.000000000 +0200 ++++ python-rpi-gpio/source/soft_pwm.c 2020-08-07 09:42:40.753160437 +0200 +@@ -25,7 +25,7 @@ SOFTWARE. + #include + #include "c_gpio.h" + #include "soft_pwm.h" +-pthread_t threads; ++static pthread_t threads; + + struct pwm + { +diff -purN python-rpi-gpio.org/source/soft_pwm.h python-rpi-gpio/source/soft_pwm.h +--- python-rpi-gpio.org/source/soft_pwm.h 2019-07-21 14:41:22.000000000 +0200 ++++ python-rpi-gpio/source/soft_pwm.h 2020-08-07 09:39:25.916811352 +0200 +@@ -26,4 +26,4 @@ void pwm_set_duty_cycle(unsigned int gpi + void pwm_set_frequency(unsigned int gpio, float freq); + void pwm_start(unsigned int gpio); + void pwm_stop(unsigned int gpio); +-int pwm_exists(unsigned int gpio); ++extern int pwm_exists(unsigned int gpio); From 5d8811eb87b0a3b352817a72928586af8aad2892 Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Fri, 7 Aug 2020 11:20:01 +0200 Subject: [PATCH 08/53] package/f2fs-tools: fsck should use correct returncodes fsck.f2fs does not implement the returncodes from the fsck interface. This is particularly bad if systemd is used with a root f2fs partition, as it will interpret the rc as order to reboot. for thread & pending upstream fix see: https://sourceforge.net/p/linux-f2fs/mailman/message/37079401/ Signed-off-by: Norbert Lange Signed-off-by: Yann E. MORIN --- .../0002-fsck.f2fs-correct-return-value.patch | 195 ++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 package/f2fs-tools/0002-fsck.f2fs-correct-return-value.patch diff --git a/package/f2fs-tools/0002-fsck.f2fs-correct-return-value.patch b/package/f2fs-tools/0002-fsck.f2fs-correct-return-value.patch new file mode 100644 index 0000000000..b420e27a0e --- /dev/null +++ b/package/f2fs-tools/0002-fsck.f2fs-correct-return-value.patch @@ -0,0 +1,195 @@ +From eee12fe5e2e6c5f71bc7cbe25a608b730fd5362e Mon Sep 17 00:00:00 2001 +From: Chao Yu +Date: Fri, 7 Aug 2020 10:02:31 +0800 +Subject: [PATCH] fsck.f2fs: correct return value +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +As Norbert Lange reported: + +" +$ fsck.f2fs -a /dev/mmcblk0p5; echo $? +Info: Fix the reported corruption. +Info: Mounted device! +Info: Check FS only on RO mounted device +Error: Failed to open the device! +255 +" + +Michael Laß reminds: + +" +I think the return value is exactly the problem here. See fsck(8) ( +https://linux.die.net/man/8/fsck) which specifies the return values. +Systemd looks at these and decides how to proceed: + +https://github.com/systemd/systemd/blob/a859abf062cef1511e4879c4ee39c6036ebeaec8/src/fsck/fsck.c#L407 + +That means, if fsck.f2fs returns 255, then +the FSCK_SYSTEM_SHOULD_REBOOT bit is set and systemd will reboot. +" + +So the problem here is fsck.f2fs didn't return correct value to userspace +apps, result in later unexpected behavior of rebooting, let's fix this. + +Reported-by: Norbert Lange +Reported-by: Michael Laß +Signed-off-by: Chao Yu +Signed-off-by: Norbert Lange +--- + fsck/fsck.h | 11 +++++++++++ + fsck/main.c | 45 +++++++++++++++++++++++++++++++-------------- + 2 files changed, 42 insertions(+), 14 deletions(-) + +diff --git a/fsck/fsck.h b/fsck/fsck.h +index ccf4a39..c8aeb06 100644 +--- a/fsck/fsck.h ++++ b/fsck/fsck.h +@@ -13,6 +13,17 @@ + + #include "f2fs.h" + ++enum { ++ FSCK_SUCCESS = 0, ++ FSCK_ERROR_CORRECTED = 1 << 0, ++ FSCK_SYSTEM_SHOULD_REBOOT = 1 << 1, ++ FSCK_ERRORS_LEFT_UNCORRECTED = 1 << 2, ++ FSCK_OPERATIONAL_ERROR = 1 << 3, ++ FSCK_USAGE_OR_SYNTAX_ERROR = 1 << 4, ++ FSCK_USER_CANCELLED = 1 << 5, ++ FSCK_SHARED_LIB_ERROR = 1 << 7, ++}; ++ + struct quota_ctx; + + #define FSCK_UNMATCHED_EXTENT 0x00000001 +diff --git a/fsck/main.c b/fsck/main.c +index 8c62a14..b0f2ec3 100644 +--- a/fsck/main.c ++++ b/fsck/main.c +@@ -591,7 +591,7 @@ void f2fs_parse_options(int argc, char *argv[]) + error_out(prog); + } + +-static void do_fsck(struct f2fs_sb_info *sbi) ++static int do_fsck(struct f2fs_sb_info *sbi) + { + struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi); + u32 flag = le32_to_cpu(ckpt->ckpt_flags); +@@ -614,7 +614,7 @@ static void do_fsck(struct f2fs_sb_info *sbi) + } else { + MSG(0, "[FSCK] F2FS metadata [Ok..]"); + fsck_free(sbi); +- return; ++ return FSCK_SUCCESS; + } + + if (!c.ro) +@@ -646,7 +646,7 @@ static void do_fsck(struct f2fs_sb_info *sbi) + ret = quota_init_context(sbi); + if (ret) { + ASSERT_MSG("quota_init_context failure: %d", ret); +- return; ++ return FSCK_OPERATIONAL_ERROR; + } + } + fsck_chk_orphan_node(sbi); +@@ -654,8 +654,14 @@ static void do_fsck(struct f2fs_sb_info *sbi) + F2FS_FT_DIR, TYPE_INODE, &blk_cnt, NULL); + fsck_chk_quota_files(sbi); + +- fsck_verify(sbi); ++ ret = fsck_verify(sbi); + fsck_free(sbi); ++ ++ if (!c.bug_on) ++ return FSCK_SUCCESS; ++ if (!ret) ++ return FSCK_ERROR_CORRECTED; ++ return FSCK_ERRORS_LEFT_UNCORRECTED; + } + + static void do_dump(struct f2fs_sb_info *sbi) +@@ -763,7 +769,7 @@ static int do_sload(struct f2fs_sb_info *sbi) + int main(int argc, char **argv) + { + struct f2fs_sb_info *sbi; +- int ret = 0; ++ int ret = 0, ret2; + clock_t start = clock(); + + f2fs_init_configuration(); +@@ -771,10 +777,15 @@ int main(int argc, char **argv) + f2fs_parse_options(argc, argv); + + if (c.func != DUMP && f2fs_devs_are_umounted() < 0) { +- if (errno == EBUSY) ++ if (errno == EBUSY) { ++ if (c.func == FSCK) ++ return FSCK_OPERATIONAL_ERROR; + return -1; ++ } + if (!c.ro || c.func == DEFRAG) { + MSG(0, "\tError: Not available on mounted device!\n"); ++ if (c.func == FSCK) ++ return FSCK_OPERATIONAL_ERROR; + return -1; + } + +@@ -789,8 +800,11 @@ int main(int argc, char **argv) + } + + /* Get device */ +- if (f2fs_get_device_info() < 0) ++ if (f2fs_get_device_info() < 0) { ++ if (c.func == FSCK) ++ return FSCK_OPERATIONAL_ERROR; + return -1; ++ } + + fsck_again: + memset(&gfsck, 0, sizeof(gfsck)); +@@ -808,7 +822,7 @@ fsck_again: + + switch (c.func) { + case FSCK: +- do_fsck(sbi); ++ ret = do_fsck(sbi); + break; + #ifdef WITH_DUMP + case DUMP: +@@ -856,8 +870,8 @@ fsck_again: + char ans[255] = {0}; + retry: + printf("Do you want to fix this partition? [Y/N] "); +- ret = scanf("%s", ans); +- ASSERT(ret >= 0); ++ ret2 = scanf("%s", ans); ++ ASSERT(ret2 >= 0); + if (!strcasecmp(ans, "y")) + c.fix_on = 1; + else if (!strcasecmp(ans, "n")) +@@ -869,12 +883,15 @@ retry: + goto fsck_again; + } + } +- ret = f2fs_finalize_device(); +- if (ret < 0) +- return ret; ++ ret2 = f2fs_finalize_device(); ++ if (ret2) { ++ if (c.func == FSCK) ++ return FSCK_OPERATIONAL_ERROR; ++ return ret2; ++ } + + printf("\nDone: %lf secs\n", (clock() - start) / (double)CLOCKS_PER_SEC); +- return 0; ++ return ret; + + out_err: + if (sbi->ckpt) +-- +2.27.0 + From caa9aac9054972a115484bafcb176952c1c6543d Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Sat, 8 Aug 2020 11:42:30 +0200 Subject: [PATCH 09/53] package/efl: avoid optimization flags added by meson Efl's meson build system add some optimization flags related to cpu architecture [1]. In the context of Buildroot, such optimization flags are already provided by the toolchain wrapper. For ppc, efl's meson expect the altivec support is available but this is not the case for ppc e500 cpus. Disable native-arch-optimization option to avoid such issue. [1] https://git.enlightenment.org/core/efl.git/tree/meson.build?h=v1.24.3#n165 Fixes: http://autobuild.buildroot.net/results/dd2586be32c25d93eebfaa743c1f7d36915bb0d7 Signed-off-by: Romain Naour Signed-off-by: Yann E. MORIN --- package/efl/efl.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/efl/efl.mk b/package/efl/efl.mk index 6dc38b1626..b8c4a506ad 100644 --- a/package/efl/efl.mk +++ b/package/efl/efl.mk @@ -29,6 +29,7 @@ EFL_DEPENDENCIES = host-pkgconf host-efl host-luajit dbus freetype \ # elua=true: build elua for the target. # sdl=false: disable sdl2 support. # embedded-lz4=false: use liblz4 from lz4 package. +# native-arch-optimization=false: avoid optimization flags added by meson. # network-backend=none: disable connman networkmanager. EFL_CONF_OPTS = \ -Davahi=false \ @@ -39,6 +40,7 @@ EFL_CONF_OPTS = \ -Delua=true \ -Dembedded-lz4=false \ -Dlua-interpreter=luajit \ + -Dnative-arch-optimization=false \ -Dnetwork-backend=none \ -Dpixman=false \ -Dsdl=false \ From de47f7b494b795c4efe020e976af51b4b6b73dcb Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Fri, 7 Aug 2020 06:55:29 +0200 Subject: [PATCH 10/53] package/x11r7/xlib_libX11: bump version to 1.6.11 Reformatted license hash. Quoting release notes: https://lists.x.org/archives/xorg-announce/2020-August/003053.html "This release fixes a regression introduced by the security patches in 1.6.10. See https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/116 for details." Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- package/x11r7/xlib_libX11/xlib_libX11.hash | 9 +++++---- package/x11r7/xlib_libX11/xlib_libX11.mk | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package/x11r7/xlib_libX11/xlib_libX11.hash b/package/x11r7/xlib_libX11/xlib_libX11.hash index d383615457..b77f98dfb1 100644 --- a/package/x11r7/xlib_libX11/xlib_libX11.hash +++ b/package/x11r7/xlib_libX11/xlib_libX11.hash @@ -1,5 +1,6 @@ -# From https://lists.x.org/archives/xorg-announce/2020-July/003052.html -sha256 af48626989b8515c994777896bd7b7ba2bd5b1ef4e1efaee0a55d8852bbe6226 libX11-1.6.10.tar.bz2 -sha512 ad384d8896fbe587f7fd99b0d3cc56fac6e2facbab52fa99174200d06b19dd163a483c998acf3834b3a4a3aa4de0dbbe13919a1c80e6797afe467c7075b403ff libX11-1.6.10.tar.bz2 +# From https://lists.x.org/archives/xorg-announce/2020-August/003053.html +sha256 b1cc4b802058be7e3fb438ee2490f66fcc52ac3b2a14f47a22cbf77638e33606 libX11-1.6.11.tar.bz2 +sha512 2cb4e215c1e3ccb327e02586844f8c426068536a0f472a39f12191feace607f61a6a08586f03758248199678c2f6897a984b0f1222bc0d68fd2e02702f4ce0bf libX11-1.6.11.tar.bz2 + # Locally computed -sha256 2daec087a88e7c9b8082557cdeebad5bbb8155a4137472f0b22e269cd99d0c1e COPYING +sha256 2daec087a88e7c9b8082557cdeebad5bbb8155a4137472f0b22e269cd99d0c1e COPYING diff --git a/package/x11r7/xlib_libX11/xlib_libX11.mk b/package/x11r7/xlib_libX11/xlib_libX11.mk index bfc1c4166e..b0132efd31 100644 --- a/package/x11r7/xlib_libX11/xlib_libX11.mk +++ b/package/x11r7/xlib_libX11/xlib_libX11.mk @@ -4,7 +4,7 @@ # ################################################################################ -XLIB_LIBX11_VERSION = 1.6.10 +XLIB_LIBX11_VERSION = 1.6.11 XLIB_LIBX11_SOURCE = libX11-$(XLIB_LIBX11_VERSION).tar.bz2 XLIB_LIBX11_SITE = https://xorg.freedesktop.org/archive/individual/lib XLIB_LIBX11_LICENSE = MIT From f1c7d55458e337ab578a07dec257cdaa320ba9c5 Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Sat, 1 Aug 2020 00:15:13 +0200 Subject: [PATCH 11/53] package/libcamera: needs faligned-new Fixes: - http://autobuild.buildroot.net/results/2db7292e251ce81d31187c3a9eb36dbc9236bd07 ../src/libcamera/v4l2_videodevice.cpp: In member function 'int libcamera::V4L2VideoDevice::allocateBuffers(unsigned int, std::vector >*)': ../src/libcamera/v4l2_videodevice.cpp:1139:39: error: 'new' of type 'libcamera::V4L2BufferCache' with extended alignment 8 [-Werror=aligned-new=] 1139 | cache_ = new V4L2BufferCache(*buffers); | ^ ../src/libcamera/v4l2_videodevice.cpp:1139:39: note: uses 'void* operator new(std::size_t)', which does not have an alignment parameter ../src/libcamera/v4l2_videodevice.cpp:1139:39: note: use '-faligned-new' to enable C++17 over-aligned new support ../src/libcamera/v4l2_videodevice.cpp: In member function 'int libcamera::V4L2VideoDevice::importBuffers(unsigned int)': ../src/libcamera/v4l2_videodevice.cpp:1315:36: error: 'new' of type 'libcamera::V4L2BufferCache' with extended alignment 8 [-Werror=aligned-new=] 1315 | cache_ = new V4L2BufferCache(count); | ^ ../src/libcamera/v4l2_videodevice.cpp:1315:36: note: uses 'void* operator new(std::size_t)', which does not have an alignment parameter ../src/libcamera/v4l2_videodevice.cpp:1315:36: note: use '-faligned-new' to enable C++17 over-aligned new support Signed-off-by: Peter Seiderer Signed-off-by: Thomas Petazzoni --- package/libcamera/libcamera.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/libcamera/libcamera.mk b/package/libcamera/libcamera.mk index a39e9f1c3e..9739f715a1 100644 --- a/package/libcamera/libcamera.mk +++ b/package/libcamera/libcamera.mk @@ -36,6 +36,10 @@ LIBCAMERA_LICENSE_FILES = \ LICENSES/CC0-1.0.txt \ LICENSES/CC-BY-SA-4.0.txt +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_7),y) +LIBCAMERA_CXXFLAGS = -faligned-new +endif + ifeq ($(BR2_PACKAGE_LIBCAMERA_V4L2),y) LIBCAMERA_CONF_OPTS += -Dv4l2=true else From a8efd11e0c3622a1a70087f033b998725b3adb6c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 19:49:14 +0200 Subject: [PATCH 12/53] configs/microchip_sama5d27_wlsom1_ek_mmc_dev: use bluez5-utils instead of bluez-utils bluez-utils has been removed, so use bluez5-utils instead for the microchip_sama5d27-wlsom1_ek_mmc_dev configuration, to avoid a build failure due to legacy options being selected. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674934030 Signed-off-by: Thomas Petazzoni --- configs/microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig b/configs/microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig index 200b365353..031a533bc9 100644 --- a/configs/microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig +++ b/configs/microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig @@ -50,7 +50,7 @@ BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y BR2_PACKAGE_DTC=y BR2_PACKAGE_DTC_PROGRAMS=y BR2_PACKAGE_ARGP_STANDALONE=y -BR2_PACKAGE_BLUEZ_UTILS=y +BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BRIDGE_UTILS=y BR2_PACKAGE_CAN_UTILS=y BR2_PACKAGE_ETHTOOL=y From d1caf8b5018dc5a915b6670206ac39791906b430 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 19:51:31 +0200 Subject: [PATCH 13/53] configs/globalscale_espressobin: Linux needs host-openssl The kernel configuration used for the globalscale_espressobin defconfig needs host-openssl. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674933954 Signed-off-by: Thomas Petazzoni --- configs/globalscale_espressobin_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/globalscale_espressobin_defconfig b/configs/globalscale_espressobin_defconfig index c0b9f69559..50cfc6b530 100644 --- a/configs/globalscale_espressobin_defconfig +++ b/configs/globalscale_espressobin_defconfig @@ -14,6 +14,7 @@ BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/globalscale/espressobin/linux-extr BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc" BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y # Filesystem BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Marvell ESPRESSObin" From 6429b236d1327503a683c9fc7b77c6b985083fcf Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 19:57:35 +0200 Subject: [PATCH 14/53] configs/nitrogen6sx: Linux needs host-openssl The kernel configuration used for the nitrogen6x defconfig needs host-openssl. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674934095 Signed-off-by: Thomas Petazzoni --- configs/nitrogen6sx_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/nitrogen6sx_defconfig b/configs/nitrogen6sx_defconfig index f151d4dc08..d5bf87b086 100644 --- a/configs/nitrogen6sx_defconfig +++ b/configs/nitrogen6sx_defconfig @@ -40,3 +40,4 @@ BR2_LINUX_KERNEL_DEFCONFIG="boundary" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-nitrogen6sx imx6sx-nitrogen6sx-m4" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y From fbdef3e0a5415c6bd5d7b07ce8af9d1b42fdac8e Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 19:59:32 +0200 Subject: [PATCH 15/53] configs/nitrogen6x: Linux needs host-openssl The kernel configuration used for the nitrogen6x defconfig needs host-openssl. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674934098 Signed-off-by: Thomas Petazzoni --- configs/nitrogen6x_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/nitrogen6x_defconfig b/configs/nitrogen6x_defconfig index 9c24dadbc0..01d49bb09c 100644 --- a/configs/nitrogen6x_defconfig +++ b/configs/nitrogen6x_defconfig @@ -40,3 +40,4 @@ BR2_LINUX_KERNEL_DEFCONFIG="boundary" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-nit6xlite imx6dl-nitrogen6_vm imx6dl-nitrogen6x imx6q-nitrogen6x imx6dl-nitrogen6_som2 imx6q-nitrogen6_som2 imx6qp-nitrogen6_som2 imx6q-nitrogen6_max imx6qp-nitrogen6_max imx6q-sabrelite" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y From 2f0c58058208296dde6a2d719f4636640c962108 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 20:01:19 +0200 Subject: [PATCH 16/53] configs/nitrogen7: Linux needs host-openssl Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674934100 Signed-off-by: Thomas Petazzoni --- configs/nitrogen7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/nitrogen7_defconfig b/configs/nitrogen7_defconfig index 2a1ff2ecc1..4178ca9787 100644 --- a/configs/nitrogen7_defconfig +++ b/configs/nitrogen7_defconfig @@ -39,3 +39,4 @@ BR2_LINUX_KERNEL_DEFCONFIG="boundary" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-nitrogen7 imx7d-nitrogen7-m4" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y From 3026e48f14bae2c3823af4cb1350196168bd75f2 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 20:02:19 +0200 Subject: [PATCH 17/53] configs/nitrogen8m: Linux needs host-openssl Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674934102 Signed-off-by: Thomas Petazzoni --- configs/nitrogen8m_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/nitrogen8m_defconfig b/configs/nitrogen8m_defconfig index 54473203a5..6e104ce84c 100644 --- a/configs/nitrogen8m_defconfig +++ b/configs/nitrogen8m_defconfig @@ -54,3 +54,4 @@ BR2_LINUX_KERNEL_DEFCONFIG="boundary" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mq-nitrogen8m freescale/imx8mq-nitrogen8m-m4 freescale/imx8mq-nitrogen8m_som freescale/imx8mq-nitrogen8m_som-m4" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y From 59cbb6db870f0e241a1f95f2337b0a9951b676b2 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 20:03:03 +0200 Subject: [PATCH 18/53] configs/nitrogen8mm: Linux needs host-openssl Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674934107 Signed-off-by: Thomas Petazzoni --- configs/nitrogen8mm_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/nitrogen8mm_defconfig b/configs/nitrogen8mm_defconfig index b1ebb45438..2560b36c7b 100644 --- a/configs/nitrogen8mm_defconfig +++ b/configs/nitrogen8mm_defconfig @@ -54,3 +54,4 @@ BR2_LINUX_KERNEL_DEFCONFIG="boundary" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mm-nitrogen8mm freescale/imx8mm-nitrogen8mm-m4 freescale/imx8mm-nitrogen8mm_rev2 freescale/imx8mm-nitrogen8mm_rev2-m4 freescale/imx8mm-nitrogen8mm_som freescale/imx8mm-nitrogen8mm_som-m4" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y From a5d91c36d25ee77433bf16a55b3816c74502ab03 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 20:03:53 +0200 Subject: [PATCH 19/53] configs/nitrogen8mn: Linux needs host-openssl Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674934109 Signed-off-by: Thomas Petazzoni --- configs/nitrogen8mn_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/nitrogen8mn_defconfig b/configs/nitrogen8mn_defconfig index 3b441d723a..cb5cc24806 100644 --- a/configs/nitrogen8mn_defconfig +++ b/configs/nitrogen8mn_defconfig @@ -54,3 +54,4 @@ BR2_LINUX_KERNEL_DEFCONFIG="boundary" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mn-nitrogen8_nano freescale/imx8mn-nitrogen8mn freescale/imx8mn-nitrogen8mn_som" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y From 46ed4ac84740b1f377bc16ea335539ab480f22f5 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Fri, 7 Aug 2020 07:52:01 +0200 Subject: [PATCH 20/53] package/php: bump version to 7.4.9 Changelog of this bugfix release: https://www.php.net/ChangeLog-7.php#7.4.9 Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- package/php/php.hash | 2 +- package/php/php.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/php/php.hash b/package/php/php.hash index 47879eecca..d648d90c04 100644 --- a/package/php/php.hash +++ b/package/php/php.hash @@ -1,5 +1,5 @@ # From https://www.php.net/downloads.php -sha256 642843890b732e8af01cb661e823ae01472af1402f211c83009c9b3abd073245 php-7.4.8.tar.xz +sha256 23733f4a608ad1bebdcecf0138ebc5fd57cf20d6e0915f98a9444c3f747dc57b php-7.4.9.tar.xz # License file sha256 0967ad6cf4b7fe81d38709d7aaef3fecb3bd685be7eebb37b864aa34c991baa7 LICENSE diff --git a/package/php/php.mk b/package/php/php.mk index 1296c50c6d..6e0b5c6e8d 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -4,7 +4,7 @@ # ################################################################################ -PHP_VERSION = 7.4.8 +PHP_VERSION = 7.4.9 PHP_SITE = http://www.php.net/distributions PHP_SOURCE = php-$(PHP_VERSION).tar.xz PHP_INSTALL_STAGING = YES From aab7139c2524277d54780ebd467a5f4465bfa8c8 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 28 Jul 2020 11:26:56 +0200 Subject: [PATCH 21/53] package/python3-cython: new package The host-setools package needs to be built for the host-python3, even when the target Python is not necessarily Python 3.x. Since it depends on host-python-cython, we need a Python 3 variant of it, which this patch introduces. Signed-off-by: Fabrice Fontaine Tested-by: Adam Duskett Signed-off-by: Thomas Petazzoni --- package/python-cython/python-cython.mk | 1 + package/python3-cython/python3-cython.hash | 1 + package/python3-cython/python3-cython.mk | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 120000 package/python3-cython/python3-cython.hash create mode 100644 package/python3-cython/python3-cython.mk diff --git a/package/python-cython/python-cython.mk b/package/python-cython/python-cython.mk index 308b01e5b2..c8dcf382ff 100644 --- a/package/python-cython/python-cython.mk +++ b/package/python-cython/python-cython.mk @@ -4,6 +4,7 @@ # ################################################################################ +# Please keep in sync with package/python3-cython/python3-cython.mk PYTHON_CYTHON_VERSION = 0.29.21 PYTHON_CYTHON_SOURCE = Cython-$(PYTHON_CYTHON_VERSION).tar.gz PYTHON_CYTHON_SITE = https://files.pythonhosted.org/packages/6c/9f/f501ba9d178aeb1f5bf7da1ad5619b207c90ac235d9859961c11829d0160 diff --git a/package/python3-cython/python3-cython.hash b/package/python3-cython/python3-cython.hash new file mode 120000 index 0000000000..70dde64105 --- /dev/null +++ b/package/python3-cython/python3-cython.hash @@ -0,0 +1 @@ +../python-cython/python-cython.hash \ No newline at end of file diff --git a/package/python3-cython/python3-cython.mk b/package/python3-cython/python3-cython.mk new file mode 100644 index 0000000000..6e3bd1422a --- /dev/null +++ b/package/python3-cython/python3-cython.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# python3-cython +# +################################################################################ + +# Please keep in sync with package/python-cython/python-cython.mk +PYTHON3_CYTHON_VERSION = 0.29.21 +PYTHON3_CYTHON_SOURCE = Cython-$(PYTHON3_CYTHON_VERSION).tar.gz +PYTHON3_CYTHON_SITE = https://files.pythonhosted.org/packages/6c/9f/f501ba9d178aeb1f5bf7da1ad5619b207c90ac235d9859961c11829d0160 +PYTHON3_CYTHON_SETUP_TYPE = setuptools +PYTHON3_CYTHON_LICENSE = Apache-2.0 +PYTHON3_CYTHON_LICENSE_FILES = COPYING.txt LICENSE.txt +HOST_PYTHON3_CYTHON_NEEDS_HOST_PYTHON = python3 + +$(eval $(host-python-package)) From c19526ebc8d12180640c531b1e18a563d63921ec Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 28 Jul 2020 11:26:57 +0200 Subject: [PATCH 22/53] package/setools: install for host-python3 setools needs python3 since version 4.2.0 and https://github.com/SELinuxProject/setools/commit/e292a77c52ed882707c8d165e77914837367313f However today in Buildroot, when no target python is selected, or when BR2_PACKAGE_PYTHON=y, all host python modules are installed for host-python, i.e Python 2. But this module won't install in Python 2, so let's force its host variant to be installed with Python 3 on the host. Of course, for that to work, its dependency must also be built for host-python3, so we change it to the newly introduced host-python3-cython package. Fixes: - http://autobuild.buildroot.org/results/c2febcea5fbd8a21709721524ae9e9b5fc0896f9 Signed-off-by: Fabrice Fontaine Tested-by: Adam Duskett Signed-off-by: Thomas Petazzoni --- package/setools/Config.in | 2 +- package/setools/setools.mk | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/setools/Config.in b/package/setools/Config.in index b26029a162..3ab7f55948 100644 --- a/package/setools/Config.in +++ b/package/setools/Config.in @@ -4,7 +4,7 @@ config BR2_PACKAGE_SETOOLS depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_USE_WCHAR depends on BR2_USE_MMU - depends on BR2_PACKAGE_PYTHON3 # python-networkx + depends on BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_NETWORKX # runtime select BR2_PACKAGE_PYTHON_SETUPTOOLS select BR2_PACKAGE_LIBSELINUX diff --git a/package/setools/setools.mk b/package/setools/setools.mk index 24da3613c4..c1a3a909cb 100644 --- a/package/setools/setools.mk +++ b/package/setools/setools.mk @@ -11,7 +11,8 @@ SETOOLS_INSTALL_STAGING = YES SETOOLS_LICENSE = GPL-2.0+, LGPL-2.1+ SETOOLS_LICENSE_FILES = COPYING COPYING.GPL COPYING.LGPL SETOOLS_SETUP_TYPE = setuptools -HOST_SETOOLS_DEPENDENCIES = host-python-cython host-libselinux host-libsepol host-python-networkx +HOST_SETOOLS_DEPENDENCIES = host-python3-cython host-libselinux host-libsepol host-python-networkx +HOST_SETOOLS_NEEDS_HOST_PYTHON = python3 define SETOOLS_FIX_SETUP # By default, setup.py will look for libsepol.a in the host machines From af0357140c6b2addc12a05dccb7397de78e39edd Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Tue, 28 Jul 2020 15:21:38 +0200 Subject: [PATCH 23/53] package/luabitop: depends on lua 5.1 In preparation for the introduction of Lua 5.4, clarify the dependency of luabitop: it only makes sense when used with Lua 5.1. Also update the comment to no longer mention Lua 5.2, since we don't support Lua 5.2 in Buildroot anymore. Note that as explained in https://luajit.org/extensions.html, LuaJit already implements luabitop functions, so luabitop is really for Lua 5.1 only, not for all Lua interpreters that implemented the 5.1 ABI. Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni --- package/luabitop/Config.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/luabitop/Config.in b/package/luabitop/Config.in index a819fe8ae7..656b1c7391 100644 --- a/package/luabitop/Config.in +++ b/package/luabitop/Config.in @@ -1,11 +1,11 @@ config BR2_PACKAGE_LUABITOP bool "luabitop" - depends on !BR2_PACKAGE_LUA_5_3 + depends on BR2_PACKAGE_LUA_5_1 help Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers. http://bitop.luajit.org -comment "luabitop needs a Lua 5.1/5.2 interpreter" - depends on BR2_PACKAGE_LUA_5_3 +comment "luabitop needs Lua 5.1" + depends on !BR2_PACKAGE_LUA_5_1 From 8bd7239ca32f20102aad19dbb3ca647182edbf92 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Tue, 28 Jul 2020 08:21:40 +0200 Subject: [PATCH 24/53] package/prosody: luabitop is only needed with Lua 5.1 The luabitop package is only available with Lua 5.1. LuaJIT, Lua 5.3 or more recent versions of Lua have this functionality built-in. Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni --- package/prosody/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/prosody/Config.in b/package/prosody/Config.in index 4b7ea94256..bb3a5025fa 100644 --- a/package/prosody/Config.in +++ b/package/prosody/Config.in @@ -3,7 +3,7 @@ config BR2_PACKAGE_PROSODY depends on BR2_USE_MMU # fork depends on BR2_PACKAGE_HAS_LUAINTERPRETER depends on !BR2_STATIC_LIBS # luaexpat, luasec, luasocket, luafilesystem - select BR2_PACKAGE_LUABITOP if !BR2_PACKAGE_LUAJIT # runtime + select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA_5_1 # runtime select BR2_PACKAGE_LUAEXPAT # runtime select BR2_PACKAGE_LUASEC # runtime select BR2_PACKAGE_LUASOCKET # runtime From 4d1bac8dbeb21c1cfd5b0ef05db25d60d39aa0eb Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 25 Jul 2020 23:45:45 +0200 Subject: [PATCH 25/53] package/minizip: fix build with gcc 4.8 Fixes: - http://autobuild.buildroot.org/results/b8baff4b86923d29163ce5cc9e391904d81fc90c Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- .../0002-mz.h-fix-build-with-gcc-4.8.patch | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 package/minizip/0002-mz.h-fix-build-with-gcc-4.8.patch diff --git a/package/minizip/0002-mz.h-fix-build-with-gcc-4.8.patch b/package/minizip/0002-mz.h-fix-build-with-gcc-4.8.patch new file mode 100644 index 0000000000..f9d28a3c75 --- /dev/null +++ b/package/minizip/0002-mz.h-fix-build-with-gcc-4.8.patch @@ -0,0 +1,60 @@ +From d38254c2cfdfa2baceef9e4fa553b74ed2e0247e Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 25 Jul 2020 14:36:11 +0200 +Subject: [PATCH] mz.h: fix build with gcc 4.8 + +gcc 4.8 does not support __has_include directive as a result the build +will fail on: + +/home/naourr/work/instance-1/output-1/build/minizip-2.10.0/mz.h:162:44: error: missing binary operator before token "(" + (defined(__has_include) && __has_include()) + ^ + +Fix it by appling: +https://gcc.gnu.org/onlinedocs/gcc-10.1.0/cpp/_005f_005fhas_005finclude.html + +Fix #510 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/nmoinvaz/minizip/pull/515] +--- + mz.h | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/mz.h b/mz.h +index 4d3732b..83662e0 100644 +--- a/mz.h ++++ b/mz.h +@@ -158,9 +158,12 @@ + #include /* memset, strncpy, strlen */ + #include + +-#if defined(HAVE_STDINT_H) || \ +- (defined(__has_include) && __has_include()) ++#if defined(HAVE_STDINT_H) + # include ++#elif defined(__has_include) ++# if __has_include() ++# include ++# endif + #endif + + #ifndef __INT8_TYPE__ +@@ -188,9 +191,12 @@ typedef unsigned int uint32_t; + typedef unsigned long long uint64_t; + #endif + +-#if defined(HAVE_INTTYPES_H) || \ +- (defined(__has_include) && __has_include()) ++#if defined(HAVE_INTTYPES_H) + # include ++#elif defined(__has_include) ++# if __has_include() ++# include ++# endif + #endif + + #ifndef PRId8 +-- +2.27.0 + From bd78244174d42e7970b28044326c3f438da841cb Mon Sep 17 00:00:00 2001 From: Dick Olsson Date: Wed, 22 Jul 2020 07:11:26 +0000 Subject: [PATCH 26/53] package/python3-pycryptodomex: new package This package will ensure that pycryptodomex is built for Python 3. Comments in both python-pycryptodome and python3-pycryptodomex are added to ensure they stay in sync. Signed-off-by: Dick Olsson Signed-off-by: Thomas Petazzoni --- .../python-pycryptodomex.mk | 1 + .../python3-pycryptodomex.hash | 1 + .../python3-pycryptodomex.mk | 20 +++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 120000 package/python3-pycryptodomex/python3-pycryptodomex.hash create mode 100644 package/python3-pycryptodomex/python3-pycryptodomex.mk diff --git a/package/python-pycryptodomex/python-pycryptodomex.mk b/package/python-pycryptodomex/python-pycryptodomex.mk index 7f93d93131..5123acb8ec 100644 --- a/package/python-pycryptodomex/python-pycryptodomex.mk +++ b/package/python-pycryptodomex/python-pycryptodomex.mk @@ -4,6 +4,7 @@ # ################################################################################ +# Please keep in sync with package/python3-pycryptodomex/python3-pycryptodomex.mk PYTHON_PYCRYPTODOMEX_VERSION = 3.9.8 PYTHON_PYCRYPTODOMEX_SOURCE = pycryptodomex-$(PYTHON_PYCRYPTODOMEX_VERSION).tar.gz PYTHON_PYCRYPTODOMEX_SITE = https://files.pythonhosted.org/packages/f5/79/9d9206688385d1e7a5ff925e7aab1d685636256e34a409037aa7adbbe611 diff --git a/package/python3-pycryptodomex/python3-pycryptodomex.hash b/package/python3-pycryptodomex/python3-pycryptodomex.hash new file mode 120000 index 0000000000..0c6761d8a4 --- /dev/null +++ b/package/python3-pycryptodomex/python3-pycryptodomex.hash @@ -0,0 +1 @@ +../python-pycryptodomex/python-pycryptodomex.hash \ No newline at end of file diff --git a/package/python3-pycryptodomex/python3-pycryptodomex.mk b/package/python3-pycryptodomex/python3-pycryptodomex.mk new file mode 100644 index 0000000000..92ac248d51 --- /dev/null +++ b/package/python3-pycryptodomex/python3-pycryptodomex.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# python3-pycryptodomex +# +################################################################################ + +# Please keep in sync with package/python-pycryptodomex/python-pycryptodomex.mk +PYTHON3_PYCRYPTODOMEX_VERSION = 3.9.8 +PYTHON3_PYCRYPTODOMEX_SOURCE = pycryptodomex-$(PYTHON3_PYCRYPTODOMEX_VERSION).tar.gz +PYTHON3_PYCRYPTODOMEX_SITE = https://files.pythonhosted.org/packages/f5/79/9d9206688385d1e7a5ff925e7aab1d685636256e34a409037aa7adbbe611 +PYTHON3_PYCRYPTODOMEX_SETUP_TYPE = setuptools +PYTHON3_PYCRYPTODOMEX_LICENSE = \ + BSD-2-Clause, \ + Public Domain (pycrypto original code), \ + OCB patent license (OCB mode) +PYTHON3_PYCRYPTODOMEX_LICENSE_FILES = LICENSE.rst Doc/LEGAL/COPYRIGHT.pycrypto +HOST_PYTHON3_PYCRYPTODOMEX_DL_SUBDIR = python-pycryptodomex +HOST_PYTHON3_PYCRYPTODOMEX_NEEDS_HOST_PYTHON = python3 + +$(eval $(host-python-package)) From 0d61dde6747dcd21e11a494db86c5cc30e90205f Mon Sep 17 00:00:00 2001 From: Dick Olsson Date: Wed, 22 Jul 2020 07:11:41 +0000 Subject: [PATCH 27/53] boot/optee-os: depend on host-python3 Recent versions of OP-TEE depend on Python 3. Currently, OP-TEE is building with the Python interpreter provided by the user. This patch includes an upstream patch that makes the interpreter configurable, and makes use of this configuration with host-python3. Signed-off-by: Dick Olsson Signed-off-by: Thomas Petazzoni --- ...e-ta-Configurable-Python-interpreter.patch | 249 ++++++++++++++++++ boot/optee-os/optee-os.mk | 5 +- 2 files changed, 252 insertions(+), 2 deletions(-) create mode 100644 boot/optee-os/0003-mk-core-ta-Configurable-Python-interpreter.patch diff --git a/boot/optee-os/0003-mk-core-ta-Configurable-Python-interpreter.patch b/boot/optee-os/0003-mk-core-ta-Configurable-Python-interpreter.patch new file mode 100644 index 0000000000..911a09b986 --- /dev/null +++ b/boot/optee-os/0003-mk-core-ta-Configurable-Python-interpreter.patch @@ -0,0 +1,249 @@ +From 49c7d2557d92993a1e09e50c961b9d4f7ab1091b Mon Sep 17 00:00:00 2001 +From: Dick Olsson +Date: Wed, 22 Jul 2020 08:49:12 +0200 +Subject: [PATCH] mk: core: ta: Configurable Python interpreter + +Build systems that manage multiple different python interpreters need +explicit control over which version of the interpreter to use. +This patch enables one to override the default interpreter with the path +to a specific one. + +Signed-off-by: Dick Olsson +Reviewed-by: Jens Wiklander +Reviewed-by: Jerome Forissier +--- + core/arch/arm/arm.mk | 2 ++ + core/arch/arm/kernel/link.mk | 22 +++++++++++----------- + core/sub.mk | 10 +++++----- + mk/config.mk | 6 ++++++ + mk/lib.mk | 2 +- + ta/arch/arm/link.mk | 2 +- + ta/arch/arm/link_shlib.mk | 2 +- + ta/ta.mk | 2 +- + 8 files changed, 28 insertions(+), 20 deletions(-) + +diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk +index 5c9f16ef..878035c5 100644 +--- a/core/arch/arm/arm.mk ++++ b/core/arch/arm/arm.mk +@@ -245,6 +245,7 @@ ta-mk-file-export-add-ta_arm32 += CROSS_COMPILE32 ?= $$(CROSS_COMPILE)_nl_ + ta-mk-file-export-add-ta_arm32 += CROSS_COMPILE_ta_arm32 ?= $$(CROSS_COMPILE32)_nl_ + ta-mk-file-export-add-ta_arm32 += COMPILER ?= gcc_nl_ + ta-mk-file-export-add-ta_arm32 += COMPILER_ta_arm32 ?= $$(COMPILER)_nl_ ++ta-mk-file-export-add-ta_arm32 += PYTHON3 ?= python3_nl_ + endif + + ifneq ($(filter ta_arm64,$(ta-targets)),) +@@ -275,6 +276,7 @@ ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE64 ?= $$(CROSS_COMPILE)_nl_ + ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE_ta_arm64 ?= $$(CROSS_COMPILE64)_nl_ + ta-mk-file-export-add-ta_arm64 += COMPILER ?= gcc_nl_ + ta-mk-file-export-add-ta_arm64 += COMPILER_ta_arm64 ?= $$(COMPILER)_nl_ ++ta-mk-file-export-add-ta_arm64 += PYTHON3 ?= python3_nl_ + endif + + # Set cross compiler prefix for each TA target +diff --git a/core/arch/arm/kernel/link.mk b/core/arch/arm/kernel/link.mk +index 1b89b895..69375ad6 100644 +--- a/core/arch/arm/kernel/link.mk ++++ b/core/arch/arm/kernel/link.mk +@@ -62,13 +62,13 @@ cleanfiles += $(link-out-dir)/text_unpaged.ld.S + $(link-out-dir)/text_unpaged.ld.S: $(link-out-dir)/unpaged.o + @$(cmd-echo-silent) ' GEN $@' + $(q)$(READELFcore) -S -W $< | \ +- ./scripts/gen_ld_sects.py .text. > $@ ++ $(PYTHON3) ./scripts/gen_ld_sects.py .text. > $@ + + cleanfiles += $(link-out-dir)/rodata_unpaged.ld.S + $(link-out-dir)/rodata_unpaged.ld.S: $(link-out-dir)/unpaged.o + @$(cmd-echo-silent) ' GEN $@' + $(q)$(READELFcore) -S -W $< | \ +- ./scripts/gen_ld_sects.py .rodata. > $@ ++ $(PYTHON3) ./scripts/gen_ld_sects.py .rodata. > $@ + + + cleanfiles += $(link-out-dir)/init_entries.txt +@@ -92,12 +92,12 @@ cleanfiles += $(link-out-dir)/text_init.ld.S + $(link-out-dir)/text_init.ld.S: $(link-out-dir)/init.o + @$(cmd-echo-silent) ' GEN $@' + $(q)$(READELFcore) -S -W $< | \ +- ./scripts/gen_ld_sects.py .text. > $@ ++ $(PYTHON3) ./scripts/gen_ld_sects.py .text. > $@ + + cleanfiles += $(link-out-dir)/rodata_init.ld.S + $(link-out-dir)/rodata_init.ld.S: $(link-out-dir)/init.o + @$(cmd-echo-silent) ' GEN $@' +- $(q)$(READELFcore) -S -W $< | ./scripts/gen_ld_sects.py .rodata. > $@ ++ $(q)$(READELFcore) -S -W $< | $(PYTHON3) ./scripts/gen_ld_sects.py .rodata. > $@ + + -include $(link-script-dep) + +@@ -176,39 +176,39 @@ cleanfiles += $(link-out-dir)/tee-pager.bin + $(link-out-dir)/tee-pager.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py + @echo Warning: $@ is deprecated + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_tee_pager_bin $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_tee_pager_bin $@ + + cleanfiles += $(link-out-dir)/tee-pageable.bin + $(link-out-dir)/tee-pageable.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py + @echo Warning: $@ is deprecated + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_tee_pageable_bin $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_tee_pageable_bin $@ + + all: $(link-out-dir)/tee.bin + cleanfiles += $(link-out-dir)/tee.bin + $(link-out-dir)/tee.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_tee_bin $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_tee_bin $@ + + all: $(link-out-dir)/tee-header_v2.bin + cleanfiles += $(link-out-dir)/tee-header_v2.bin + $(link-out-dir)/tee-header_v2.bin: $(link-out-dir)/tee.elf \ + scripts/gen_tee_bin.py + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_header_v2 $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_header_v2 $@ + + all: $(link-out-dir)/tee-pager_v2.bin + cleanfiles += $(link-out-dir)/tee-pager_v2.bin + $(link-out-dir)/tee-pager_v2.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_pager_v2 $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_pager_v2 $@ + + all: $(link-out-dir)/tee-pageable_v2.bin + cleanfiles += $(link-out-dir)/tee-pageable_v2.bin + $(link-out-dir)/tee-pageable_v2.bin: $(link-out-dir)/tee.elf \ + scripts/gen_tee_bin.py + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_pageable_v2 $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_pageable_v2 $@ + + all: $(link-out-dir)/tee.symb_sizes + cleanfiles += $(link-out-dir)/tee.symb_sizes +@@ -222,5 +222,5 @@ mem_usage: $(link-out-dir)/tee.mem_usage + + $(link-out-dir)/tee.mem_usage: $(link-out-dir)/tee.elf + @$(cmd-echo-silent) ' GEN $@' +- $(q)./scripts/mem_usage.py $< > $@ ++ $(q)$(PYTHON3) ./scripts/mem_usage.py $< > $@ + endif +diff --git a/core/sub.mk b/core/sub.mk +index 03cc6bc7..0959c9a9 100644 +--- a/core/sub.mk ++++ b/core/sub.mk +@@ -9,13 +9,13 @@ ifeq ($(CFG_WITH_USER_TA),y) + gensrcs-y += ta_pub_key + produce-ta_pub_key = ta_pub_key.c + depends-ta_pub_key = $(TA_SIGN_KEY) scripts/pem_to_pub_c.py +-recipe-ta_pub_key = scripts/pem_to_pub_c.py --prefix ta_pub_key \ ++recipe-ta_pub_key = $(PYTHON3) scripts/pem_to_pub_c.py --prefix ta_pub_key \ + --key $(TA_SIGN_KEY) --out $(sub-dir-out)/ta_pub_key.c + + gensrcs-y += ldelf + produce-ldelf = ldelf_hex.c + depends-ldelf = scripts/gen_ldelf_hex.py $(out-dir)/ldelf/ldelf.elf +-recipe-ldelf = scripts/gen_ldelf_hex.py --input $(out-dir)/ldelf/ldelf.elf \ ++recipe-ldelf = $(PYTHON3) scripts/gen_ldelf_hex.py --input $(out-dir)/ldelf/ldelf.elf \ + --output $(sub-dir-out)/ldelf_hex.c + endif + +@@ -25,7 +25,7 @@ early-ta-$1-uuid := $(firstword $(subst ., ,$(notdir $1))) + gensrcs-y += early-ta-$1 + produce-early-ta-$1 = early_ta_$$(early-ta-$1-uuid).c + depends-early-ta-$1 = $1 scripts/ta_bin_to_c.py +-recipe-early-ta-$1 = scripts/ta_bin_to_c.py --compress --ta $1 \ ++recipe-early-ta-$1 = $(PYTHON3) scripts/ta_bin_to_c.py --compress --ta $1 \ + --out $(sub-dir-out)/early_ta_$$(early-ta-$1-uuid).c + endef + $(foreach f, $(EARLY_TA_PATHS), $(eval $(call process_early_ta,$(f)))) +@@ -40,7 +40,7 @@ core-embed-fdt-c = $(out-dir)/$(arch-dir)/dts/$(CFG_EMBED_DTB_SOURCE_FILE:.dts=. + gensrcs-y += embedded_secure_dtb + produce-embedded_secure_dtb = arch/$(ARCH)/dts/$(CFG_EMBED_DTB_SOURCE_FILE:.dts=.c) + depends-embedded_secure_dtb = $(core-embed-fdt-dtb) scripts/bin_to_c.py +-recipe-embedded_secure_dtb = scripts/bin_to_c.py \ ++recipe-embedded_secure_dtb = $(PYTHON3) scripts/bin_to_c.py \ + --bin $(core-embed-fdt-dtb) \ + --vname embedded_secure_dtb \ + --out $(core-embed-fdt-c) +@@ -58,7 +58,7 @@ $(conf-mk-xz-base64): $(conf-mk-file) + gensrcs-y += conf_str + produce-conf_str = conf.mk.xz.base64.c + depends-conf_str = $(conf-mk-xz-base64) +-recipe-conf_str = scripts/bin_to_c.py --text --bin $(conf-mk-xz-base64) \ ++recipe-conf_str = $(PYTHON3) scripts/bin_to_c.py --text --bin $(conf-mk-xz-base64) \ + --out $(sub-dir-out)/conf.mk.xz.base64.c \ + --vname conf_str + endif +diff --git a/mk/config.mk b/mk/config.mk +index 70732c4d..1fe65576 100644 +--- a/mk/config.mk ++++ b/mk/config.mk +@@ -32,6 +32,12 @@ endif + # Supported values: undefined, 1, 2 and 3. 3 gives more warnings. + WARNS ?= 3 + ++# Path to the Python interpreter used by the build system. ++# This variable is set to the default python3 interpreter in the user's ++# path. But build environments that require more explicit control can ++# set the path to a specific interpreter through this variable. ++PYTHON3 ?= python3 ++ + # Define DEBUG=1 to compile without optimization (forces -O0) + # DEBUG=1 + +diff --git a/mk/lib.mk b/mk/lib.mk +index 6e890893..3bd422d6 100644 +--- a/mk/lib.mk ++++ b/mk/lib.mk +@@ -72,7 +72,7 @@ $(lib-shlibstrippedfile): $(lib-shlibfile) + + $(lib-shlibtafile): $(lib-shlibstrippedfile) $(TA_SIGN_KEY) + @$(cmd-echo-silent) ' SIGN $$@' +- $$(q)$$(SIGN) --key $(TA_SIGN_KEY) --uuid $(libuuid) --in $$< --out $$@ ++ $$(q)$$(PYTHON3) $$(SIGN) --key $(TA_SIGN_KEY) --uuid $(libuuid) --in $$< --out $$@ + + $(lib-libuuidln): $(lib-shlibfile) + @$(cmd-echo-silent) ' LN $$@' +diff --git a/ta/arch/arm/link.mk b/ta/arch/arm/link.mk +index db7d0b9a..b95c0cba 100644 +--- a/ta/arch/arm/link.mk ++++ b/ta/arch/arm/link.mk +@@ -2,7 +2,7 @@ link-script$(sm) = $(ta-dev-kit-dir$(sm))/src/ta.ld.S + link-script-pp$(sm) = $(link-out-dir$(sm))/ta.lds + link-script-dep$(sm) = $(link-out-dir$(sm))/.ta.ld.d + +-SIGN_ENC ?= $(ta-dev-kit-dir$(sm))/scripts/sign_encrypt.py ++SIGN_ENC ?= $(PYTHON3) $(ta-dev-kit-dir$(sm))/scripts/sign_encrypt.py + TA_SIGN_KEY ?= $(ta-dev-kit-dir$(sm))/keys/default_ta.pem + + ifeq ($(CFG_ENCRYPT_TA),y) +diff --git a/ta/arch/arm/link_shlib.mk b/ta/arch/arm/link_shlib.mk +index ed81e59a..cc177ef0 100644 +--- a/ta/arch/arm/link_shlib.mk ++++ b/ta/arch/arm/link_shlib.mk +@@ -47,5 +47,5 @@ $(link-out-dir)/$(shlibuuid).elf: $(link-out-dir)/$(shlibname).so + $(link-out-dir)/$(shlibuuid).ta: $(link-out-dir)/$(shlibname).stripped.so \ + $(TA_SIGN_KEY) + @$(cmd-echo-silent) ' SIGN $@' +- $(q)$(SIGN) --key $(TA_SIGN_KEY) --uuid $(shlibuuid) \ ++ $(q)$(PYTHON3) $(SIGN) --key $(TA_SIGN_KEY) --uuid $(shlibuuid) \ + --in $< --out $@ +diff --git a/ta/ta.mk b/ta/ta.mk +index 918880f4..59ed87f7 100644 +--- a/ta/ta.mk ++++ b/ta/ta.mk +@@ -67,7 +67,7 @@ $$(arm32-user-sysregs-out)/$$(arm32-user-sysregs-$(1)-h): \ + $(1) scripts/arm32_sysreg.py + @$(cmd-echo-silent) ' GEN $$@' + $(q)mkdir -p $$(dir $$@) +- $(q)scripts/arm32_sysreg.py --guard __$$(arm32-user-sysregs-$(1)-h) \ ++ $(q)$(PYTHON3) scripts/arm32_sysreg.py --guard __$$(arm32-user-sysregs-$(1)-h) \ + < $$< > $$@ + + endef #process-arm32-user-sysreg +-- +2.20.1 + diff --git a/boot/optee-os/optee-os.mk b/boot/optee-os/optee-os.mk index c6d1bbd48a..03ce08ffb2 100644 --- a/boot/optee-os/optee-os.mk +++ b/boot/optee-os/optee-os.mk @@ -21,7 +21,7 @@ else OPTEE_OS_SITE = $(call github,OP-TEE,optee_os,$(OPTEE_OS_VERSION)) endif -OPTEE_OS_DEPENDENCIES = host-openssl host-python-pycryptodomex host-python-pyelftools +OPTEE_OS_DEPENDENCIES = host-openssl host-python3 host-python3-pycryptodomex host-python3-pyelftools # On 64bit targets, OP-TEE OS can be built in 32bit mode, or # can be built in 64bit mode and support 32bit and 64bit @@ -32,7 +32,8 @@ OPTEE_OS_MAKE_OPTS = \ CROSS_COMPILE="$(TARGET_CROSS)" \ CROSS_COMPILE_core="$(TARGET_CROSS)" \ CROSS_COMPILE_ta_arm64="$(TARGET_CROSS)" \ - CROSS_COMPILE_ta_arm32="$(TARGET_CROSS)" + CROSS_COMPILE_ta_arm32="$(TARGET_CROSS)" \ + PYTHON3="$(HOST_DIR)/bin/python3" ifeq ($(BR2_aarch64),y) OPTEE_OS_MAKE_OPTS += \ From 4af9a7487f18914b32af2f9384b8a104e62b096a Mon Sep 17 00:00:00 2001 From: Dick Olsson Date: Wed, 22 Jul 2020 07:11:54 +0000 Subject: [PATCH 28/53] configs/qemu_arm_vexpress_tz_defconfig: bump ATF version, cleanup config Bump to a later version of ATF and cleanup the Python configuration. Previously this configuration had to work around Python 3 issues with OP-TEE. Now this relies on OP-TEE properly building itself with host-python3. Signed-off-by: Dick Olsson Signed-off-by: Thomas Petazzoni --- configs/qemu_arm_vexpress_tz_defconfig | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/configs/qemu_arm_vexpress_tz_defconfig b/configs/qemu_arm_vexpress_tz_defconfig index 37244cc969..7ded044016 100644 --- a/configs/qemu_arm_vexpress_tz_defconfig +++ b/configs/qemu_arm_vexpress_tz_defconfig @@ -27,7 +27,7 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca15_a7" # TF-A for booting OP-TEE secure and uboot/linux non secure BR2_TARGET_ARM_TRUSTED_FIRMWARE=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y -BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.0" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.2" BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="qemu" BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y @@ -40,13 +40,6 @@ BR2_PACKAGE_OPTEE_BENCHMARK=y BR2_PACKAGE_OPTEE_EXAMPLES=y BR2_PACKAGE_OPTEE_TEST=y -# OP-TEE components needs host-python3 interpreter and its modules -BR2_PACKAGE_HOST_PYTHON3=y -# Select python3 on the target to make sure Buildroot builds host-python using -# python3 and builds all host-python modules for python3. -BR2_TOOLCHAIN_BUILDROOT_WCHAR=y -BR2_PACKAGE_PYTHON3=y - # U-boot for booting the dear Linux kernel BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y From a05cda7f5cbe98da4f4bbfbbcb821839b396e57f Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 25 Jul 2020 19:12:41 +0200 Subject: [PATCH 29/53] package/libfuse3: define fuse_session_loop_mt as a macro on uclibc This will fix a build failure with fuse-overlayfs Fixes: - http://autobuild.buildroot.org/results/7186515526ee60488dac3bf9c4580ffd13a0ceac Signed-off-by: Fabrice Fontaine [yann.morin.1998@free.fr: actually backport upstream commit] Signed-off-by: Yann E. MORIN --- ...op_mt-as-a-macro-on-uclibc-and-MacOS.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/libfuse3/0001-Define-fuse_session_loop_mt-as-a-macro-on-uclibc-and-MacOS.patch diff --git a/package/libfuse3/0001-Define-fuse_session_loop_mt-as-a-macro-on-uclibc-and-MacOS.patch b/package/libfuse3/0001-Define-fuse_session_loop_mt-as-a-macro-on-uclibc-and-MacOS.patch new file mode 100644 index 0000000000..bd9181ac1d --- /dev/null +++ b/package/libfuse3/0001-Define-fuse_session_loop_mt-as-a-macro-on-uclibc-and-MacOS.patch @@ -0,0 +1,52 @@ +From 7b3e3899157566875280a8b860eb5ad5c73eadc1 Mon Sep 17 00:00:00 2001 +From: asafkahlon <35964924+asafkahlon@users.noreply.github.com> +Date: Sun, 9 Aug 2020 14:37:26 +0300 +Subject: [PATCH] Define fuse_session_loop_mt as a macro on uclibc and MacOS + (#532) + +On uclibc and MacOS we don't use versioned symbols. Hence, +there's no definition for fuse_session_loop_mt on those cases +and the linker won't be able to resolve calls to fuse_session_loop_mt() + +Signed-off-by: Asaf Kahlon +[Retrieved from: https://github.com/libfuse/libfuse/pull/532] +Signed-off-by: Fabrice Fontaine +[yann.morin.1998@free.fr: update to use upstream commit] +Signed-off-by: Yann E. MORIN +--- + include/fuse_lowlevel.h | 5 +++++ + lib/fuse_versionscript | 1 + + 2 files changed, 6 insertions(+) + +diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h +index e2b4617..f2ef622 100644 +--- a/include/fuse_lowlevel.h ++++ b/include/fuse_lowlevel.h +@@ -1982,7 +1982,12 @@ int fuse_session_loop(struct fuse_session *se); + int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd); + #define fuse_session_loop_mt(se, clone_fd) fuse_session_loop_mt_31(se, clone_fd) + #else ++#if (!defined(__UCLIBC__) && !defined(__APPLE__)) + int fuse_session_loop_mt(struct fuse_session *se, struct fuse_loop_config *config); ++#else ++int fuse_session_loop_mt_32(struct fuse_session *se, struct fuse_loop_config *config); ++#define fuse_session_loop_mt(se, config) fuse_session_loop_mt_32(se, config) ++#endif + #endif + + /** +diff --git a/lib/fuse_versionscript b/lib/fuse_versionscript +index 235abf4..a06f768 100644 +--- a/lib/fuse_versionscript ++++ b/lib/fuse_versionscript +@@ -146,6 +146,7 @@ FUSE_3.2 { + global: + fuse_session_loop_mt; + fuse_session_loop_mt_31; ++ fuse_session_loop_mt_32; + fuse_loop_mt; + fuse_loop_mt_31; + } FUSE_3.1; +-- +2.20.1 + From f1455b56ebe721dfea562a4bb159d848f93db679 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 17:39:43 +0200 Subject: [PATCH 30/53] package/libabseil-cpp: fix build on RISC-V 32-bits This commit backports an upstream patch that fixes the build on RISC-V 32-bits. Fixes: http://autobuild.buildroot.net/results/c6c2c99bdba8c840d52fe0464d26aca169ea1d90/ Signed-off-by: Thomas Petazzoni Signed-off-by: Yann E. MORIN --- .../0003-Fix-build-on-riscv32-675.patch | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 package/libabseil-cpp/0003-Fix-build-on-riscv32-675.patch diff --git a/package/libabseil-cpp/0003-Fix-build-on-riscv32-675.patch b/package/libabseil-cpp/0003-Fix-build-on-riscv32-675.patch new file mode 100644 index 0000000000..0077c5fe9b --- /dev/null +++ b/package/libabseil-cpp/0003-Fix-build-on-riscv32-675.patch @@ -0,0 +1,77 @@ +From 3f347c46272886a099852a4cd303ecf37a054de8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 18 May 2020 10:23:50 -0700 +Subject: [PATCH] Fix build on riscv32 (#675) + +[Backport from upstream commit 3f347c46272886a099852a4cd303ecf37a054de8] +Signed-off-by: Thomas Petazzoni +--- + absl/base/internal/direct_mmap.h | 5 +++++ + absl/base/internal/spinlock_linux.inc | 8 ++++++++ + absl/synchronization/internal/waiter.cc | 8 ++++++++ + 3 files changed, 21 insertions(+) + +diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h +index 5618867..16accf0 100644 +--- a/absl/base/internal/direct_mmap.h ++++ b/absl/base/internal/direct_mmap.h +@@ -61,6 +61,10 @@ extern "C" void* __mmap2(void*, size_t, int, int, int, size_t); + #endif + #endif // __BIONIC__ + ++#if defined(__NR_mmap2) && !defined(SYS_mmap2) ++#define SYS_mmap2 __NR_mmap2 ++#endif ++ + namespace absl { + ABSL_NAMESPACE_BEGIN + namespace base_internal { +@@ -72,6 +76,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, + #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \ + (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \ + (defined(__PPC__) && !defined(__PPC64__)) || \ ++ (defined(__riscv) && __riscv_xlen == 32) || \ + (defined(__s390__) && !defined(__s390x__)) + // On these architectures, implement mmap with mmap2. + static int pagesize = 0; +diff --git a/absl/base/internal/spinlock_linux.inc b/absl/base/internal/spinlock_linux.inc +index 323edd6..e31c6ed 100644 +--- a/absl/base/internal/spinlock_linux.inc ++++ b/absl/base/internal/spinlock_linux.inc +@@ -46,6 +46,14 @@ static_assert(sizeof(std::atomic) == sizeof(int), + #endif + #endif + ++#if defined(__NR_futex_time64) && !defined(SYS_futex_time64) ++#define SYS_futex_time64 __NR_futex_time64 ++#endif ++ ++#if defined(SYS_futex_time64) && !defined(SYS_futex) ++#define SYS_futex SYS_futex_time64 ++#endif ++ + extern "C" { + + ABSL_ATTRIBUTE_WEAK void AbslInternalSpinLockDelay( +diff --git a/absl/synchronization/internal/waiter.cc b/absl/synchronization/internal/waiter.cc +index 2949f5a..b6150b9 100644 +--- a/absl/synchronization/internal/waiter.cc ++++ b/absl/synchronization/internal/waiter.cc +@@ -86,6 +86,14 @@ static void MaybeBecomeIdle() { + #endif + #endif + ++#if defined(__NR_futex_time64) && !defined(SYS_futex_time64) ++#define SYS_futex_time64 __NR_futex_time64 ++#endif ++ ++#if defined(SYS_futex_time64) && !defined(SYS_futex) ++#define SYS_futex SYS_futex_time64 ++#endif ++ + class Futex { + public: + static int WaitUntil(std::atomic *v, int32_t val, +-- +2.26.2 + From ae0557403a3a4cbf5354f0ab1784a08623382e5e Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 17:39:44 +0200 Subject: [PATCH 31/53] package/libabseil-cpp: add BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS The libabseil-cpp package fails to build on a number of CPU architectures in our autobuilders. On most CPU architectures, the first issue looked like this: libabseil-cpp-20200225/absl/base/internal/direct_mmap.h: In function 'void* absl::lts_2020_02_25::base_internal::DirectMmap(void*, size_t, int, int, int, off64_t)': libabseil-cpp-20200225/absl/base/internal/direct_mmap.h:121:39: error: static assertion failed: Platform is not 64-bit 121 | static_assert(sizeof(unsigned long) == 8, "Platform is not 64-bit"); | ~~~~~~~~~~~~~~~~~~~~~~^~~~ libabseil-cpp-20200225/absl/base/internal/direct_mmap.h:123:15: error: 'SYS_mmap' was not declared in this scope; did you mean 'SYS_mmap2'? 123 | syscall(SYS_mmap, start, length, prot, flags, fd, offset)); | ^~~~~~~~ | SYS_mmap2 Indeed, on 32-bit architectures, libabseil-cpp has some special code to use the mmap2() system call, and it white-lists the supported architectures. It is therefore trivial to add support for more architectures. However, once this is fixed, another issue arises: absl/debugging/internal/examine_stack.cc uses the ucontext data structures, which are not provided by uClibc-ng on all CPU architectures, and even the code of libabseil-cpp does not exist for all CPU architectures. So, this commit solves that by simply making libabseil-cpp available on architectures/C libraries where it is supported: it needs ucontext support in the toolchain + a CPU architecture where absl/debugging/internal/examine_stack.cc has the appropriate logic. This new dependency is propagated to the reverse dependencies of libabseil-cpp. With this commit, libabseil-cpp passes a test-pkg -a test (so all external toolchains used by the autobuilders): andes-nds32 [ 1/45]: SKIPPED arm-aarch64 [ 2/45]: OK br-aarch64-glibc [ 3/45]: OK br-arcle-hs38 [ 4/45]: SKIPPED br-arm-basic [ 5/45]: SKIPPED br-arm-cortex-a9-glibc [ 6/45]: OK br-arm-cortex-a9-musl [ 7/45]: OK br-arm-cortex-m4-full [ 8/45]: SKIPPED br-arm-full [ 9/45]: OK br-arm-full-nothread [10/45]: SKIPPED br-arm-full-static [11/45]: SKIPPED br-i386-pentium4-full [12/45]: OK br-i386-pentium-mmx-musl [13/45]: OK br-m68k-5208-full [14/45]: SKIPPED br-m68k-68040-full [15/45]: SKIPPED br-microblazeel-full [16/45]: SKIPPED br-mips32r6-el-hf-glibc [17/45]: OK br-mips64-n64-full [18/45]: OK br-mips64r6-el-hf-glibc [19/45]: OK br-mipsel-o32-full [20/45]: OK br-nios2-glibc [21/45]: SKIPPED br-openrisc-uclibc [22/45]: SKIPPED br-powerpc-603e-basic-cpp [23/45]: SKIPPED br-powerpc64le-power8-glibc [24/45]: OK br-powerpc64-power7-glibc [25/45]: OK br-powerpc-e500mc-full [26/45]: SKIPPED br-riscv32 [27/45]: OK br-riscv64 [28/45]: OK br-riscv64-musl [29/45]: OK br-sh4-full [30/45]: SKIPPED br-sparc64-glibc [31/45]: SKIPPED br-sparc-uclibc [32/45]: SKIPPED br-x86-64-core2-full [33/45]: OK br-x86-64-musl [34/45]: OK br-xtensa-full [35/45]: SKIPPED linaro-aarch64-be [36/45]: OK linaro-aarch64 [37/45]: OK linaro-arm [38/45]: OK sourcery-arm-armv4t [39/45]: OK sourcery-arm [40/45]: OK sourcery-arm-thumb2 [41/45]: OK sourcery-mips64 [42/45]: OK sourcery-mips [43/45]: OK sourcery-nios2 [44/45]: SKIPPED sourcery-x86-64 [45/45]: OK 45 builds, 18 skipped, 0 build failed, 0 legal-info failed Fixes: http://autobuild.buildroot.net/results/ead663b4b67b0b57ed003a46db3182d95cc01bc0/ (and many similar build failures) Signed-off-by: Thomas Petazzoni Signed-off-by: Yann E. MORIN --- package/collectd/Config.in | 2 ++ package/grpc/Config.in | 2 ++ package/libabseil-cpp/Config.in | 15 +++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/package/collectd/Config.in b/package/collectd/Config.in index 276ad17329..cd5d876e80 100644 --- a/package/collectd/Config.in +++ b/package/collectd/Config.in @@ -572,6 +572,7 @@ config BR2_PACKAGE_COLLECTD_GRPC depends on BR2_INSTALL_LIBSTDCPP # grpc -> protobuf depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # grpc -> protobuf depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # grpc -> protobuf + depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc select BR2_PACKAGE_GRPC help Send/receive values using the gRPC protocol. @@ -580,6 +581,7 @@ comment "grpc needs a toolchain w/ C++, gcc >= 4.8" depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS + depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc config BR2_PACKAGE_COLLECTD_MQTT bool "mqtt" diff --git a/package/grpc/Config.in b/package/grpc/Config.in index 43ccddbdaf..a2da3f4c53 100644 --- a/package/grpc/Config.in +++ b/package/grpc/Config.in @@ -6,6 +6,7 @@ config BR2_PACKAGE_GRPC depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf depends on !BR2_STATIC_LIBS # protobuf, libabseil-cpp depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS select BR2_PACKAGE_C_ARES select BR2_PACKAGE_LIBABSEIL_CPP select BR2_PACKAGE_OPENSSL @@ -18,6 +19,7 @@ config BR2_PACKAGE_GRPC http://github.com/grpc/grpc comment "grpc needs a toolchain w/ C++, threads, dynamic library, gcc >= 4.8" + depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 diff --git a/package/libabseil-cpp/Config.in b/package/libabseil-cpp/Config.in index 7b1ca37917..5e20a82856 100644 --- a/package/libabseil-cpp/Config.in +++ b/package/libabseil-cpp/Config.in @@ -1,8 +1,22 @@ +# see absl/debugging/internal/examine_stack.cc for the list of +# architectures that are supported, and for which ucontext is used. +config BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS + bool + depends on BR2_TOOLCHAIN_HAS_UCONTEXT + default y if BR2_aarch64 || BR2_aarch64_be + default y if BR2_arm || BR2_armeb + default y if BR2_i386 + default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + default y if BR2_riscv + default y if BR2_x86_64 + config BR2_PACKAGE_LIBABSEIL_CPP bool "libabseil-cpp" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS depends on !BR2_STATIC_LIBS # uses dlfcn.h + depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS help Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil @@ -13,5 +27,6 @@ config BR2_PACKAGE_LIBABSEIL_CPP https://github.com/abseil/abseil-cpp comment "libabseil-cpp needs a toolchain w/ C++, threads, dynamic library" + depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ BR2_STATIC_LIBS From 9e3397cfab7d4a3de163804ed3a55d04ea96a16f Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 9 Aug 2020 22:14:24 +0200 Subject: [PATCH 32/53] support/testing/tests/boot/test_atf: DTC needed for ATF Vexpress test Since the bump of ATF to 2.2 for the ATF Vexpress test case in commit fc3d6a3ed0f5f1ceda7ab64b8b2bee88abd29373 ("support/testing/tests/boot/test_atf: update U-Boot/ATF use in TestATFVexpress"), DTC is now needed otherwise the build fails with: make[2]: dtc: Command not found Makefile:873: recipe for target 'build/juno/release/fdts/juno_tb_fw_config.dtb' failed Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674934470 Signed-off-by: Thomas Petazzoni --- support/testing/tests/boot/test_atf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/support/testing/tests/boot/test_atf.py b/support/testing/tests/boot/test_atf.py index 678c13de5b..08a0b7af2a 100644 --- a/support/testing/tests/boot/test_atf.py +++ b/support/testing/tests/boot/test_atf.py @@ -14,6 +14,7 @@ class TestATFVexpress(infra.basetest.BRTest): BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="juno" BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y + BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="vexpress_aemv8a_juno" BR2_TARGET_UBOOT_CUSTOM_VERSION=y From 32c8fa8522cff21d0845bb1c2199fc1e958a527e Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 10 Aug 2020 16:45:39 +0200 Subject: [PATCH 33/53] package/libabseil-cpp: make check-package happy The "depends on" must be after the "default" properties. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/677751258 Signed-off-by: Thomas Petazzoni --- package/libabseil-cpp/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/libabseil-cpp/Config.in b/package/libabseil-cpp/Config.in index 5e20a82856..8018e7b264 100644 --- a/package/libabseil-cpp/Config.in +++ b/package/libabseil-cpp/Config.in @@ -2,7 +2,6 @@ # architectures that are supported, and for which ucontext is used. config BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS bool - depends on BR2_TOOLCHAIN_HAS_UCONTEXT default y if BR2_aarch64 || BR2_aarch64_be default y if BR2_arm || BR2_armeb default y if BR2_i386 @@ -10,6 +9,7 @@ config BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le default y if BR2_riscv default y if BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_UCONTEXT config BR2_PACKAGE_LIBABSEIL_CPP bool "libabseil-cpp" From 68093f477828863977381989023f7401e2fdeed3 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 20:08:23 +0200 Subject: [PATCH 34/53] support/scripts/pkg-stats: use aiohttp for latest version retrieval This commit reworks the code that retrieves the latest upstream version of each package from release-monitoring.org using the aiohttp module. This makes the implementation much more elegant, and avoids the problematic multiprocessing Pool which is causing issues in some situations. Since we're now using some async functionality, the script is Python 3.x only, so the shebang is changed to make this clear. Suggested-by: Titouan Christophe Signed-off-by: Thomas Petazzoni --- support/scripts/pkg-stats | 154 +++++++++++++++++++++----------------- 1 file changed, 84 insertions(+), 70 deletions(-) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index ec4d538758..3423c44815 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) 2009 by Thomas Petazzoni # @@ -16,7 +16,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +import aiohttp import argparse +import asyncio import datetime import fnmatch import os @@ -26,13 +28,10 @@ import subprocess import requests # URL checking import json import ijson -import certifi import distutils.version import time import gzip import sys -from urllib3 import HTTPSConnectionPool -from urllib3.exceptions import HTTPError from multiprocessing import Pool sys.path.append('utils/') @@ -54,10 +53,6 @@ CVE_AFFECTS = 1 CVE_DOESNT_AFFECT = 2 CVE_UNKNOWN = 3 -# Used to make multiple requests to the same host. It is global -# because it's used by sub-processes. -http_pool = None - class Defconfig: def __init__(self, name, path): @@ -526,54 +521,88 @@ def check_package_urls(packages): pool.terminate() -def release_monitoring_get_latest_version_by_distro(pool, name): - try: - req = pool.request('GET', "/api/project/Buildroot/%s" % name) - except HTTPError: - return (RM_API_STATUS_ERROR, None, None) +def check_package_latest_version_set_status(pkg, status, version, identifier): + pkg.latest_version = { + "status": status, + "version": version, + "id": identifier, + } - if req.status != 200: - return (RM_API_STATUS_NOT_FOUND, None, None) + if pkg.latest_version['status'] == RM_API_STATUS_ERROR: + pkg.status['version'] = ('warning', "Release Monitoring API error") + elif pkg.latest_version['status'] == RM_API_STATUS_NOT_FOUND: + pkg.status['version'] = ('warning', "Package not found on Release Monitoring") - data = json.loads(req.data) - - if 'version' in data: - return (RM_API_STATUS_FOUND_BY_DISTRO, data['version'], data['id']) + if pkg.latest_version['version'] is None: + pkg.status['version'] = ('warning', "No upstream version available on Release Monitoring") + elif pkg.latest_version['version'] != pkg.current_version: + pkg.status['version'] = ('error', "The newer version {} is available upstream".format(pkg.latest_version['version'])) else: - return (RM_API_STATUS_FOUND_BY_DISTRO, None, data['id']) + pkg.status['version'] = ('ok', 'up-to-date') -def release_monitoring_get_latest_version_by_guess(pool, name): +async def check_package_get_latest_version_by_distro(session, pkg, retry=True): + url = "https://release-monitoring.org//api/project/Buildroot/%s" % pkg.name try: - req = pool.request('GET', "/api/projects/?pattern=%s" % name) - except HTTPError: - return (RM_API_STATUS_ERROR, None, None) + async with session.get(url) as resp: + if resp.status != 200: + return False - if req.status != 200: - return (RM_API_STATUS_NOT_FOUND, None, None) + data = await resp.json() + version = data['version'] if 'version' in data else None + check_package_latest_version_set_status(pkg, + RM_API_STATUS_FOUND_BY_DISTRO, + version, + data['id']) + return True - data = json.loads(req.data) - - projects = data['projects'] - projects.sort(key=lambda x: x['id']) - - for p in projects: - if p['name'] == name and 'version' in p: - return (RM_API_STATUS_FOUND_BY_PATTERN, p['version'], p['id']) - - return (RM_API_STATUS_NOT_FOUND, None, None) + except (aiohttp.ClientError, asyncio.TimeoutError): + if retry: + return await check_package_get_latest_version_by_distro(session, pkg, retry=False) + else: + return False -def check_package_latest_version_worker(name): - """Wrapper to try both by name then by guess""" - print(name) - res = release_monitoring_get_latest_version_by_distro(http_pool, name) - if res[0] == RM_API_STATUS_NOT_FOUND: - res = release_monitoring_get_latest_version_by_guess(http_pool, name) - return res +async def check_package_get_latest_version_by_guess(session, pkg, retry=True): + url = "https://release-monitoring.org/api/projects/?pattern=%s" % pkg.name + try: + async with session.get(url) as resp: + if resp.status != 200: + return False + + data = await resp.json() + # filter projects that have the right name and a version defined + projects = [p for p in data['projects'] if p['name'] == pkg.name and 'version' in p] + projects.sort(key=lambda x: x['id']) + + if len(projects) > 0: + check_package_latest_version_set_status(pkg, + RM_API_STATUS_FOUND_BY_DISTRO, + projects[0]['version'], + projects[0]['id']) + return True + + except (aiohttp.ClientError, asyncio.TimeoutError): + if retry: + return await check_package_get_latest_version_by_guess(session, pkg, retry=False) + else: + return False -def check_package_latest_version(packages): +async def check_package_latest_version_get(session, pkg): + + if await check_package_get_latest_version_by_distro(session, pkg): + return + + if await check_package_get_latest_version_by_guess(session, pkg): + return + + check_package_latest_version_set_status(pkg, + RM_API_STATUS_NOT_FOUND, + None, None) + + +async def check_package_latest_version(packages): """ Fills in the .latest_version field of all Package objects @@ -587,33 +616,17 @@ def check_package_latest_version(packages): - id: string containing the id of the project corresponding to this package, as known by release-monitoring.org """ - global http_pool - http_pool = HTTPSConnectionPool('release-monitoring.org', port=443, - cert_reqs='CERT_REQUIRED', ca_certs=certifi.where(), - timeout=30) - worker_pool = Pool(processes=64) - results = worker_pool.map(check_package_latest_version_worker, (pkg.name for pkg in packages)) - for pkg, r in zip(packages, results): - pkg.latest_version = dict(zip(['status', 'version', 'id'], r)) - if not pkg.has_valid_infra: - pkg.status['version'] = ("na", "no valid package infra") - continue + for pkg in [p for p in packages if not p.has_valid_infra]: + pkg.status['version'] = ("na", "no valid package infra") - if pkg.latest_version['status'] == RM_API_STATUS_ERROR: - pkg.status['version'] = ('warning', "Release Monitoring API error") - elif pkg.latest_version['status'] == RM_API_STATUS_NOT_FOUND: - pkg.status['version'] = ('warning', "Package not found on Release Monitoring") - - if pkg.latest_version['version'] is None: - pkg.status['version'] = ('warning', "No upstream version available on Release Monitoring") - elif pkg.latest_version['version'] != pkg.current_version: - pkg.status['version'] = ('error', "The newer version {} is available upstream".format(pkg.latest_version['version'])) - else: - pkg.status['version'] = ('ok', 'up-to-date') - - worker_pool.terminate() - del http_pool + tasks = [] + connector = aiohttp.TCPConnector(limit_per_host=5) + async with aiohttp.ClientSession(connector=connector, trust_env=True) as sess: + packages = [p for p in packages if p.has_valid_infra] + for pkg in packages: + tasks.append(check_package_latest_version_get(sess, pkg)) + await asyncio.wait(tasks) def check_package_cves(nvd_path, packages): @@ -1057,7 +1070,8 @@ def __main__(): print("Checking URL status") check_package_urls(packages) print("Getting latest versions ...") - check_package_latest_version(packages) + loop = asyncio.get_event_loop() + loop.run_until_complete(check_package_latest_version(packages)) if args.nvd_path: print("Checking packages CVEs") check_package_cves(args.nvd_path, {p.name: p for p in packages}) From 5c3221ac20c1bc374a44a727d0f552041a4a7247 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 20:08:24 +0200 Subject: [PATCH 35/53] support/scripts/pkg-stats: use aiohttp for upstream URL checking This commit reworks the code that checks if the upstream URL of each package (specified by its Config.in file) using the aiohttp module. This makes the implementation much more elegant, and avoids the problematic multiprocessing Pool which is causing issues in some situations. Suggested-by: Titouan Christophe Signed-off-by: Thomas Petazzoni --- support/scripts/pkg-stats | 46 +++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index 3423c44815..70e7fa7a0c 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -25,14 +25,13 @@ import os from collections import defaultdict import re import subprocess -import requests # URL checking +import requests # NVD database download import json import ijson import distutils.version import time import gzip import sys -from multiprocessing import Pool sys.path.append('utils/') from getdeveloperlib import parse_developers # noqa: E402 @@ -499,26 +498,30 @@ def package_init_make_info(): Package.all_ignored_cves[pkgvar] = value.split() -def check_url_status_worker(url, url_status): - if url_status[0] == 'ok': - try: - url_status_code = requests.head(url, timeout=30).status_code - if url_status_code >= 400: - return ("error", "invalid {}".format(url_status_code)) - except requests.exceptions.RequestException: - return ("error", "invalid (err)") - return ("ok", "valid") - return url_status +async def check_url_status(session, pkg, retry=True): + try: + async with session.get(pkg.url) as resp: + if resp.status >= 400: + pkg.status['url'] = ("error", "invalid {}".format(resp.status)) + return + except (aiohttp.ClientError, asyncio.TimeoutError): + if retry: + return await check_url_status(session, pkg, retry=False) + else: + pkg.status['url'] = ("error", "invalid (err)") + return + + pkg.status['url'] = ("ok", "valid") -def check_package_urls(packages): - pool = Pool(processes=64) - for pkg in packages: - pkg.url_worker = pool.apply_async(check_url_status_worker, (pkg.url, pkg.status['url'])) - for pkg in packages: - pkg.status['url'] = pkg.url_worker.get(timeout=3600) - del pkg.url_worker - pool.terminate() +async def check_package_urls(packages): + tasks = [] + connector = aiohttp.TCPConnector(limit_per_host=5) + async with aiohttp.ClientSession(connector=connector, trust_env=True) as sess: + packages = [p for p in packages if p.status['url'][0] == 'ok'] + for pkg in packages: + tasks.append(check_url_status(sess, pkg)) + await asyncio.wait(tasks) def check_package_latest_version_set_status(pkg, status, version, identifier): @@ -1068,7 +1071,8 @@ def __main__(): pkg.set_url() pkg.set_developers(developers) print("Checking URL status") - check_package_urls(packages) + loop = asyncio.get_event_loop() + loop.run_until_complete(check_package_urls(packages)) print("Getting latest versions ...") loop = asyncio.get_event_loop() loop.run_until_complete(check_package_latest_version(packages)) From 5fea2e39974410fcff51a775ff2a2335cb55c870 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Aug 2020 20:08:25 +0200 Subject: [PATCH 36/53] support/scripts/pkg-stats: show progress of upstream URL and latest version This commit slightly improves the output of pkg-stats by showing the progress of the upstream URL checks and latest version retrieval, on a package basis: Checking URL status [0001/0062] curlpp [0002/0062] cmocka [0003/0062] snappy [0004/0062] nload [...] [0060/0062] librtas [0061/0062] libsilk [0062/0062] jhead Getting latest versions ... [0001/0064] libglob [0002/0064] perl-http-daemon [0003/0064] shadowsocks-libev [...] [0061/0064] lua-flu [0062/0064] python-aiohttp-security [0063/0064] ljlinenoise [0064/0064] matchbox-lib Note that the above sample was run on 64 packages. Only 62 packages appear for the URL status check, because packages that do not have any URL in their Config.in file, or don't have any Config.in file at all, are not checked and therefore not accounted. Signed-off-by: Thomas Petazzoni --- support/scripts/pkg-stats | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index 70e7fa7a0c..303af2f588 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -498,20 +498,31 @@ def package_init_make_info(): Package.all_ignored_cves[pkgvar] = value.split() -async def check_url_status(session, pkg, retry=True): +check_url_count = 0 + + +async def check_url_status(session, pkg, npkgs, retry=True): + global check_url_count + try: async with session.get(pkg.url) as resp: if resp.status >= 400: pkg.status['url'] = ("error", "invalid {}".format(resp.status)) + check_url_count += 1 + print("[%04d/%04d] %s" % (check_url_count, npkgs, pkg.name)) return except (aiohttp.ClientError, asyncio.TimeoutError): if retry: - return await check_url_status(session, pkg, retry=False) + return await check_url_status(session, pkg, npkgs, retry=False) else: pkg.status['url'] = ("error", "invalid (err)") + check_url_count += 1 + print("[%04d/%04d] %s" % (check_url_count, npkgs, pkg.name)) return pkg.status['url'] = ("ok", "valid") + check_url_count += 1 + print("[%04d/%04d] %s" % (check_url_count, npkgs, pkg.name)) async def check_package_urls(packages): @@ -520,7 +531,7 @@ async def check_package_urls(packages): async with aiohttp.ClientSession(connector=connector, trust_env=True) as sess: packages = [p for p in packages if p.status['url'][0] == 'ok'] for pkg in packages: - tasks.append(check_url_status(sess, pkg)) + tasks.append(check_url_status(sess, pkg, len(packages))) await asyncio.wait(tasks) @@ -592,17 +603,27 @@ async def check_package_get_latest_version_by_guess(session, pkg, retry=True): return False -async def check_package_latest_version_get(session, pkg): +check_latest_count = 0 + + +async def check_package_latest_version_get(session, pkg, npkgs): + global check_latest_count if await check_package_get_latest_version_by_distro(session, pkg): + check_latest_count += 1 + print("[%04d/%04d] %s" % (check_latest_count, npkgs, pkg.name)) return if await check_package_get_latest_version_by_guess(session, pkg): + check_latest_count += 1 + print("[%04d/%04d] %s" % (check_latest_count, npkgs, pkg.name)) return check_package_latest_version_set_status(pkg, RM_API_STATUS_NOT_FOUND, None, None) + check_latest_count += 1 + print("[%04d/%04d] %s" % (check_latest_count, npkgs, pkg.name)) async def check_package_latest_version(packages): @@ -628,7 +649,7 @@ async def check_package_latest_version(packages): async with aiohttp.ClientSession(connector=connector, trust_env=True) as sess: packages = [p for p in packages if p.has_valid_infra] for pkg in packages: - tasks.append(check_package_latest_version_get(sess, pkg)) + tasks.append(check_package_latest_version_get(sess, pkg, len(packages))) await asyncio.wait(tasks) From 70e6762aa0204fed687eab068157a79a0ec7aad9 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 11 Aug 2020 17:10:24 +0200 Subject: [PATCH 37/53] package/mtd: crypto support needs headers >= 4.12 crypto support includes since version 2.1.2 and https://github.com/sigma-star/mtd-utils/commit/a739b59efe7996e3bdcbe8b17743dc05ac7c110a However, linux/hash_info.h is only exported since kernel 4.12: https://github.com/torvalds/linux/commit/fcc8487d477a3452a1d0ccbdd4c5e0e1e3cb8bed Fixes: - http://autobuild.buildroot.org/results/dbaeed9e9e2af191166808d2d6d6d3c2e5051c2c Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/mtd/mtd.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk index 8220a5ace8..1186fa52d5 100644 --- a/package/mtd/mtd.mk +++ b/package/mtd/mtd.mk @@ -21,7 +21,8 @@ endif ifeq ($(BR2_PACKAGE_MTD_UBIFS_UTILS),y) MTD_DEPENDENCIES += util-linux zlib lzo host-pkgconf MTD_CONF_OPTS += --with-ubifs -ifeq ($(BR2_PACKAGE_OPENSSL),y) +# crypto needs linux/hash_info.h +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12)$(BR2_PACKAGE_OPENSSL),yy) MTD_DEPENDENCIES += openssl MTD_CONF_OPTS += --with-crypto else From 1005ad6756ef82acaf365449b99130ca085c7be4 Mon Sep 17 00:00:00 2001 From: Asaf Kahlon Date: Mon, 10 Aug 2020 07:18:40 +0300 Subject: [PATCH 38/53] package/libfuse3: bump to version 3.9.4 Drop patch (already in version). The commit list between 3.9.2 and 3.9.4 is just made of fixes: db9b4fa148e6c22c0d4b4c567fa65d1cd5368152 Released 3.9.4 50cbca799c1f9b010fabaa0dd4a387f29d140873 fuse_send_data_iov(): correctly calculate total buffer size. 7b3e3899157566875280a8b860eb5ad5c73eadc1 Define fuse_session_loop_mt as a macro on uclibc and MacOS (#532) c5e8684b5a2f3400af6d7a3edcaeb3ce8ffc51b5 Fixed typo in command to compile program (#536) e8a9e84672dcaa892d4708c163f768dc177b6d4c Doc fixes (#537) d1deae6968c49d83334e874c33abfe15824c4548 Fix FreeBSD CI (#539) 48450411647ca0818821af7b05b819ceff92ae7c Fix: crash on failure to set locale (#529) 9e1c2a4959c16c0b50090dd822389ad9acb08111 fuse_lowlevel: Move assert for se before dereferencing it with se->debug (#530) 7471156354002c6547aa6c3a4f39a3262f435ba4 Fixed minor print alignment issue in iconv_help(), replacing tab with space (#519) 9fa4dc1661f085d4e89a54d75acc3347d52f33fa Fix the typo "filed" -> "field" in fuse manpage (#524) 717c8b8b3ed815f14e5607a995d0113446e3fb0b README: Correct the directory name from 'examples' to 'example' (#526) 032db1ab298d62c4d0c5be1f9fb2df299aec2346 docs: Replace `mesonconf` with `meson configure` (#528) 06342ca60ed822b856990915f127d8beddc0d1f6 libfuse: Assign NULL to "old" to avoid free it twice (#522) 5021d6a0a100d4987be126e87b7ee5fbfc17bbdc Typo fixed. (#520) Signed-off-by: Asaf Kahlon Signed-off-by: Thomas Petazzoni --- ...op_mt-as-a-macro-on-uclibc-and-MacOS.patch | 52 ------------------- package/libfuse3/libfuse3.hash | 2 +- package/libfuse3/libfuse3.mk | 2 +- 3 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 package/libfuse3/0001-Define-fuse_session_loop_mt-as-a-macro-on-uclibc-and-MacOS.patch diff --git a/package/libfuse3/0001-Define-fuse_session_loop_mt-as-a-macro-on-uclibc-and-MacOS.patch b/package/libfuse3/0001-Define-fuse_session_loop_mt-as-a-macro-on-uclibc-and-MacOS.patch deleted file mode 100644 index bd9181ac1d..0000000000 --- a/package/libfuse3/0001-Define-fuse_session_loop_mt-as-a-macro-on-uclibc-and-MacOS.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 7b3e3899157566875280a8b860eb5ad5c73eadc1 Mon Sep 17 00:00:00 2001 -From: asafkahlon <35964924+asafkahlon@users.noreply.github.com> -Date: Sun, 9 Aug 2020 14:37:26 +0300 -Subject: [PATCH] Define fuse_session_loop_mt as a macro on uclibc and MacOS - (#532) - -On uclibc and MacOS we don't use versioned symbols. Hence, -there's no definition for fuse_session_loop_mt on those cases -and the linker won't be able to resolve calls to fuse_session_loop_mt() - -Signed-off-by: Asaf Kahlon -[Retrieved from: https://github.com/libfuse/libfuse/pull/532] -Signed-off-by: Fabrice Fontaine -[yann.morin.1998@free.fr: update to use upstream commit] -Signed-off-by: Yann E. MORIN ---- - include/fuse_lowlevel.h | 5 +++++ - lib/fuse_versionscript | 1 + - 2 files changed, 6 insertions(+) - -diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h -index e2b4617..f2ef622 100644 ---- a/include/fuse_lowlevel.h -+++ b/include/fuse_lowlevel.h -@@ -1982,7 +1982,12 @@ int fuse_session_loop(struct fuse_session *se); - int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd); - #define fuse_session_loop_mt(se, clone_fd) fuse_session_loop_mt_31(se, clone_fd) - #else -+#if (!defined(__UCLIBC__) && !defined(__APPLE__)) - int fuse_session_loop_mt(struct fuse_session *se, struct fuse_loop_config *config); -+#else -+int fuse_session_loop_mt_32(struct fuse_session *se, struct fuse_loop_config *config); -+#define fuse_session_loop_mt(se, config) fuse_session_loop_mt_32(se, config) -+#endif - #endif - - /** -diff --git a/lib/fuse_versionscript b/lib/fuse_versionscript -index 235abf4..a06f768 100644 ---- a/lib/fuse_versionscript -+++ b/lib/fuse_versionscript -@@ -146,6 +146,7 @@ FUSE_3.2 { - global: - fuse_session_loop_mt; - fuse_session_loop_mt_31; -+ fuse_session_loop_mt_32; - fuse_loop_mt; - fuse_loop_mt_31; - } FUSE_3.1; --- -2.20.1 - diff --git a/package/libfuse3/libfuse3.hash b/package/libfuse3/libfuse3.hash index c7f371368a..8fd37ff47a 100644 --- a/package/libfuse3/libfuse3.hash +++ b/package/libfuse3/libfuse3.hash @@ -1,3 +1,3 @@ # Locally calculated sha256 checksums -sha256 b4409255cbda6f6975ca330f5b04cb335b823a95ddd8c812c3d224ec53478fc0 libfuse3-3.9.2.tar.gz +sha256 9e076ae757a09cac9ce1beb50b3361ae83a831e5abc0f1bf5cdf771cd1320338 libfuse3-3.9.4.tar.gz sha256 b8832d9caaa075bbbd2aef24efa09f8b7ab66a832812d88c602da0c7b4397fad LICENSE diff --git a/package/libfuse3/libfuse3.mk b/package/libfuse3/libfuse3.mk index 1e959640e2..6e679fe5a8 100644 --- a/package/libfuse3/libfuse3.mk +++ b/package/libfuse3/libfuse3.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBFUSE3_VERSION = 3.9.2 +LIBFUSE3_VERSION = 3.9.4 LIBFUSE3_SITE = $(call github,libfuse,libfuse,fuse-$(LIBFUSE3_VERSION)) LIBFUSE3_LICENSE = LGPL-2.1 LIBFUSE3_LICENSE_FILES = LICENSE From b37cfcbf9f74b1eac5a1f958ad33ed7489ea530d Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Mon, 10 Aug 2020 10:27:11 +0200 Subject: [PATCH 39/53] package/python3-decorator: use PYTHON3_DECORATOR_VERSION Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/python3-decorator/python3-decorator.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python3-decorator/python3-decorator.mk b/package/python3-decorator/python3-decorator.mk index d809bb5b9b..c14f10fbf4 100644 --- a/package/python3-decorator/python3-decorator.mk +++ b/package/python3-decorator/python3-decorator.mk @@ -7,7 +7,7 @@ # Please keep in sync with package/python-decorator/python-decorator.mk PYTHON3_DECORATOR_VERSION = 4.4.1 PYTHON3_DECORATOR_SITE = https://files.pythonhosted.org/packages/dc/c3/9d378af09f5737cfd524b844cd2fbb0d2263a35c11d712043daab290144d -PYTHON3_DECORATOR_SOURCE = decorator-$(PYTHON_DECORATOR_VERSION).tar.gz +PYTHON3_DECORATOR_SOURCE = decorator-$(PYTHON3_DECORATOR_VERSION).tar.gz PYTHON3_DECORATOR_LICENSE = BSD-2-Clause PYTHON3_DECORATOR_LICENSE_FILES = LICENSE.txt PYTHON3_DECORATOR_SETUP_TYPE = setuptools From 8a46f3237a5f3c7cc59130b05b9afd4290a047fb Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Mon, 10 Aug 2020 08:41:09 +0200 Subject: [PATCH 40/53] package/x11r7/xserver_xorg-server: add security fix for CVE-2020-14347 Release notes: https://lists.x.org/archives/xorg-announce/2020-July/003051.html Signed-off-by: Bernd Kuhls [Thomas: add IGNORE_CVES entry.] Signed-off-by: Thomas Petazzoni --- .../1.20.8/0007-fix-for-ZDI-11426.patch | 36 +++++++++++++++++++ .../xserver_xorg-server.mk | 5 +++ 2 files changed, 41 insertions(+) create mode 100644 package/x11r7/xserver_xorg-server/1.20.8/0007-fix-for-ZDI-11426.patch diff --git a/package/x11r7/xserver_xorg-server/1.20.8/0007-fix-for-ZDI-11426.patch b/package/x11r7/xserver_xorg-server/1.20.8/0007-fix-for-ZDI-11426.patch new file mode 100644 index 0000000000..ce623b24cb --- /dev/null +++ b/package/x11r7/xserver_xorg-server/1.20.8/0007-fix-for-ZDI-11426.patch @@ -0,0 +1,36 @@ +From aac28e162e5108510065ad4c323affd6deffd816 Mon Sep 17 00:00:00 2001 +From: Matthieu Herrb +Date: Sat, 25 Jul 2020 19:33:50 +0200 +Subject: [PATCH] fix for ZDI-11426 + +Avoid leaking un-initalized memory to clients by zeroing the +whole pixmap on initial allocation. + +This vulnerability was discovered by: +Jan-Niklas Sohn working with Trend Micro Zero Day Initiative + +Signed-off-by: Matthieu Herrb +Reviewed-by: Alan Coopersmith +Signed-off-by: Bernd Kuhls +[downloaded from upstream commit + https://gitlab.freedesktop.org/xorg/xserver/-/commit/aac28e162e5108510065ad4c323affd6deffd816] +--- + dix/pixmap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dix/pixmap.c b/dix/pixmap.c +index 1186d7dbbf..5a0146bbb6 100644 +--- a/dix/pixmap.c ++++ b/dix/pixmap.c +@@ -116,7 +116,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize) + if (pScreen->totalPixmapSize > ((size_t) - 1) - pixDataSize) + return NullPixmap; + +- pPixmap = malloc(pScreen->totalPixmapSize + pixDataSize); ++ pPixmap = calloc(1, pScreen->totalPixmapSize + pixDataSize); + if (!pPixmap) + return NullPixmap; + +-- +GitLab + diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk index 8ccc04224d..bab20b5c97 100644 --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk @@ -38,6 +38,11 @@ XSERVER_XORG_SERVER_DEPENDENCIES = \ mcookie \ host-pkgconf +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_20),y) +# 1.20.8/0007-fix-for-ZDI-11426.patch +XSERVER_XORG_SERVER_IGNORE_CVES += CVE-2020-14347 +endif + # We force -O2 regardless of the optimization level chosen by the # user, as the X.org server is known to trigger some compiler bugs at # -Os on several architectures. From 15e3da3feddb0628f23523109c67412d58c3a3d0 Mon Sep 17 00:00:00 2001 From: Maxim Kochetkov Date: Mon, 10 Aug 2020 07:57:56 +0300 Subject: [PATCH 41/53] package/htop: add patch for fixing build with gcc 10 Signed-off-by: Maxim Kochetkov Signed-off-by: Thomas Petazzoni --- ...ve-complation-issues-with-fno-common.patch | 173 ++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 package/htop/0002-Resolve-complation-issues-with-fno-common.patch diff --git a/package/htop/0002-Resolve-complation-issues-with-fno-common.patch b/package/htop/0002-Resolve-complation-issues-with-fno-common.patch new file mode 100644 index 0000000000..097a8df7ea --- /dev/null +++ b/package/htop/0002-Resolve-complation-issues-with-fno-common.patch @@ -0,0 +1,173 @@ +From dfd9279f87791e36a5212726781c31fbe7110361 Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Fri, 10 Jul 2020 10:35:32 +1000 +Subject: [PATCH] Resolve complation issues with -fno-common (default from + gcc-10) + +Extends the MakeHeader script to auto-generate correct "extern" +function declarations in some cases that it currently does not. + +Related to https://github.com/hishamhm/htop/pull/981 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/hishamhm/htop/commit/dfd9279f87791e36a5212726781c31fbe7110361.patch +--- + CRT.c | 4 ++-- + CRT.h | 28 ++++++++++++++-------------- + linux/LinuxProcess.c | 3 ++- + linux/LinuxProcess.h | 19 ++++++++++--------- + scripts/MakeHeader.py | 4 +++- + 5 files changed, 31 insertions(+), 27 deletions(-) + +diff --git a/CRT.c b/CRT.c +index ca9a10dd..088cd1a4 100644 +--- a/CRT.c ++++ b/CRT.c +@@ -131,9 +131,9 @@ typedef enum ColorElements_ { + LAST_COLORELEMENT + } ColorElements; + +-void CRT_fatalError(const char* note) __attribute__ ((noreturn)); ++extern void CRT_fatalError(const char* note) __attribute__ ((noreturn)); + +-void CRT_handleSIGSEGV(int sgn); ++extern void CRT_handleSIGSEGV(int sgn); + + #define KEY_ALT(x) (KEY_F(64 - 26) + (x - 'A')) + +diff --git a/CRT.h b/CRT.h +index 933fe068..bc3fb8b7 100644 +--- a/CRT.h ++++ b/CRT.h +@@ -119,9 +119,9 @@ typedef enum ColorElements_ { + LAST_COLORELEMENT + } ColorElements; + +-void CRT_fatalError(const char* note) __attribute__ ((noreturn)); ++extern void CRT_fatalError(const char* note) __attribute__ ((noreturn)); + +-void CRT_handleSIGSEGV(int sgn); ++extern void CRT_handleSIGSEGV(int sgn); + + #define KEY_ALT(x) (KEY_F(64 - 26) + (x - 'A')) + +@@ -140,7 +140,7 @@ extern const char **CRT_treeStr; + + extern int CRT_delay; + +-int* CRT_colors; ++extern int* CRT_colors; + + extern int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT]; + +@@ -150,21 +150,21 @@ extern int CRT_scrollHAmount; + + extern int CRT_scrollWheelVAmount; + +-char* CRT_termType; ++extern char* CRT_termType; + + // TODO move color scheme to Settings, perhaps? + + extern int CRT_colorScheme; + +-void *backtraceArray[128]; ++extern void *backtraceArray[128]; + + #if HAVE_SETUID_ENABLED + + #define DIE(msg) do { CRT_done(); fprintf(stderr, msg); exit(1); } while(0) + +-void CRT_dropPrivileges(); ++extern void CRT_dropPrivileges(); + +-void CRT_restorePrivileges(); ++extern void CRT_restorePrivileges(); + + #else + +@@ -179,18 +179,18 @@ void CRT_restorePrivileges(); + + // TODO: pass an instance of Settings instead. + +-void CRT_init(int delay, int colorScheme); ++extern void CRT_init(int delay, int colorScheme); + +-void CRT_done(); ++extern void CRT_done(); + +-void CRT_fatalError(const char* note); ++extern void CRT_fatalError(const char* note); + +-int CRT_readKey(); ++extern int CRT_readKey(); + +-void CRT_disableDelay(); ++extern void CRT_disableDelay(); + +-void CRT_enableDelay(); ++extern void CRT_enableDelay(); + +-void CRT_setColors(int colorScheme); ++extern void CRT_setColors(int colorScheme); + + #endif + +diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h +index 6ce3037d..586aa717 100644 +--- a/linux/LinuxProcess.h ++++ b/linux/LinuxProcess.h +@@ -152,9 +153,9 @@ extern ProcessPidColumn Process_pidColumns[]; + + extern ProcessClass LinuxProcess_class; + +-LinuxProcess* LinuxProcess_new(Settings* settings); ++extern LinuxProcess* LinuxProcess_new(Settings* settings); + +-void Process_delete(Object* cast); ++extern void Process_delete(Object* cast); + + /* + [1] Note that before kernel 2.6.26 a process that has not asked for +@@ -166,19 +167,19 @@ extern io_priority; + */ + #define LinuxProcess_effectiveIOPriority(p_) (IOPriority_class(p_->ioPriority) == IOPRIO_CLASS_NONE ? IOPriority_tuple(IOPRIO_CLASS_BE, (p_->super.nice + 20) / 5) : p_->ioPriority) + +-IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this); ++extern IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this); + +-bool LinuxProcess_setIOPriority(LinuxProcess* this, IOPriority ioprio); ++extern bool LinuxProcess_setIOPriority(LinuxProcess* this, IOPriority ioprio); + + #ifdef HAVE_DELAYACCT +-void LinuxProcess_printDelay(float delay_percent, char* buffer, int n); ++extern void LinuxProcess_printDelay(float delay_percent, char* buffer, int n); + #endif + +-void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field); ++extern void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field); + +-long LinuxProcess_compare(const void* v1, const void* v2); ++extern long LinuxProcess_compare(const void* v1, const void* v2); + +-bool Process_isThread(Process* this); ++extern bool Process_isThread(Process* this); + + + #endif +diff --git a/scripts/MakeHeader.py b/scripts/MakeHeader.py +index 349531b8..3ef34b88 100755 +--- a/scripts/MakeHeader.py ++++ b/scripts/MakeHeader.py +@@ -54,8 +54,10 @@ + elif line.startswith("typedef struct"): + state = SKIP + elif line[-1] == "{": +- out.write( line[:-2].replace("inline", "extern") + ";\n" ) ++ out.write("extern " + line[:-2].replace("inline ", "") + ";\n") + state = SKIP ++ elif line[-1] == ";": ++ out.write("extern " + line + "\n") + else: + out.write( line + "\n") + is_blank = False From 4ea2c8e90805b007560d8b039dff4e3e2275fc55 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 11 Aug 2020 23:36:44 +0200 Subject: [PATCH 42/53] package/librtlsdr: fix version fetching when code is extracted from tarball librtlsdr currently fails to build on the autobuilders, as it fails for out of tree builds. Indeed, there is some CMake logic in librtlsdr that determines the version using Git. This works fine when librtlsdr is fetched from Git of course. But in the context of Buildroot, librtlsdr is extracted from a tarball. For an in-tree build, the "git describe" invocation goes all the way up to the Buildroot .git/ metadata, and uses that as the librtlsdr version (it's of course wrong, but the build works). In an out-of-tree build, there is no parent directory with .git/ metadata, so Git fails, the VERSION variable is empty and later CMake aborts the build because of that. We fix that by adjusting the version retrieving logic to only use Git if a .git/ metadata folder is found at the root of the librtlsdr source tree. The patch has been submitted upstream. Fixes: http://autobuild.buildroot.net/results/ea52be1da8ed03272db06679d5a0a441ffe6ea0c/ Signed-off-by: Thomas Petazzoni Signed-off-by: Yann E. MORIN --- ...rsion.cmake-don-t-use-Git-version-if.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 package/librtlsdr/0002-cmake-Modules-Version.cmake-don-t-use-Git-version-if.patch diff --git a/package/librtlsdr/0002-cmake-Modules-Version.cmake-don-t-use-Git-version-if.patch b/package/librtlsdr/0002-cmake-Modules-Version.cmake-don-t-use-Git-version-if.patch new file mode 100644 index 0000000000..9c808edd41 --- /dev/null +++ b/package/librtlsdr/0002-cmake-Modules-Version.cmake-don-t-use-Git-version-if.patch @@ -0,0 +1,47 @@ +From feb5d9c6b7bcec788f9b01781c205e31fff260e7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 11 Aug 2020 23:07:08 +0200 +Subject: [PATCH] cmake/Modules/Version.cmake: don't use Git version if not in + a Git repo + +If the librtlsdr code comes from a tarball, it doesn't have any .git/ +metadata, and therefore even if Git (as a tool) is found, the logic in +cmake/Modules/Version.cmake fails finding a version through Git: + +-- Extracting version information from git describe... +fatal: Not a git repository (or any of the parent directories): .git + +As a consequence, the VERSION variable is empty, which later causes +cmake to bail out with: + +CMake Error at /home/test/autobuild/run/instance-1/output-1/host/share/cmake-3.15/Modules/WriteBasicConfigVersionFile.cmake:43 (message): + No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE() +Call Stack (most recent call first): + /home/test/autobuild/run/instance-1/output-1/host/share/cmake-3.15/Modules/CMakePackageConfigHelpers.cmake:225 (write_basic_config_version_file) + CMakeLists.txt:173 (write_basic_package_version_file) + +To avoid this, we only use Git to determine the version if the cmake +project top-level source directory has a .git/ folder. + +Upstream: https://github.com/librtlsdr/librtlsdr/pull/75 +Signed-off-by: Thomas Petazzoni +--- + cmake/Modules/Version.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/Modules/Version.cmake b/cmake/Modules/Version.cmake +index 2d4e76d..6f67fa4 100644 +--- a/cmake/Modules/Version.cmake ++++ b/cmake/Modules/Version.cmake +@@ -32,7 +32,7 @@ set(PATCH_VERSION ${VERSION_INFO_PATCH_VERSION}) + ######################################################################## + find_package(Git QUIET) + +-if(GIT_FOUND) ++if(GIT_FOUND AND EXISTS ${CMAKE_SOURCE_DIR}/.git) + message(STATUS "Extracting version information from git describe...") + execute_process( + COMMAND ${GIT_EXECUTABLE} describe --always --abbrev=4 --long +-- +2.26.2 + From 72df067afedff0318e61523c982f0c39df94adde Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 11 Aug 2020 23:42:48 +0200 Subject: [PATCH 43/53] DEVELOPERS: add Gwenhael Goavec-Merou for librtlsdr Even though librtlsdr was initially introduced by Jason Pruitt in 2014, and Jason is still listed in the DEVELOPERS file for this package, in recent times it's mainly Gwenhael who has been taking of this package. Let's reflect that in the DEVELOPERS file so that Gwenhael gets notified when there are librtlsdr issues. Cc: Jason Pruitt Cc: Gwenhael Goavec-Merou Signed-off-by: Thomas Petazzoni Signed-off-by: Yann E. MORIN --- DEVELOPERS | 1 + 1 file changed, 1 insertion(+) diff --git a/DEVELOPERS b/DEVELOPERS index ee840dbb8b..42fa5a4956 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1087,6 +1087,7 @@ N: Gwenhael Goavec-Merou F: package/gnuradio/ F: package/gqrx/ F: package/gr-osmosdr/ +F: package/librtlsdr/ F: package/libusbgx/ F: package/matio/ F: package/python-cheetah/ From 36b8aad8b16208ac6ae0a7a2e2d4ac71359261c5 Mon Sep 17 00:00:00 2001 From: Titouan Christophe Date: Sun, 9 Aug 2020 11:35:38 +0200 Subject: [PATCH 44/53] package/librtlsdr: bump to more recent upstream master version Since 948666dfde1e0a5d149442f80facc162a83016ad, librtlsdr in Buildroot is no longer built from an official release, but from a commit on the master branch. However, the commit that was referenced has a broken pkgconfig file templating, such that other packages using `pkgconfig --libs librtlsdr` as part of their build process (such as dump1090) could not be built anymore: Before 948666dfde1e0a5d149442f80facc162a83016ad: $ cat staging/usr/lib/pkgconfig/librtlsdr.pc prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: RTL-SDR Library Description: C Utility Library Version: 0.6.0 Cflags: -I${includedir}/ Libs: -L${libdir} -lrtlsdr -lusb-1.0 Libs.private: On 948666dfde1e0a5d149442f80facc162a83016ad: $ cat staging/usr/lib/pkgconfig/librtlsdr.pc prefix= exec_prefix= libdir= includedir= Name: RTL-SDR Library Description: C Utility Library Version: 7082 Cflags: -I${includedir}/ Libs: -L${libdir} -lrtlsdr Libs.private: -lusb-1.0 In the meantime, upstream released a bugfix for that ([1]), so we bump to that commit as well, and update the only patch for shared libs accordingly, because upstream also added a new tool called `rtl_biast` in the meantime. Finaly, we update the hash file to the two-spaces convention. Fixes: http://autobuild.buildroot.net/results/b4c/b4cdcb59cc61c51c024197a64865ad4b60023d0c/ [1]: https://github.com/steve-m/librtlsdr/commit/ed0317e6a58c098874ac58b769cf2e609c18d9a5 Signed-off-by: Titouan Christophe Tested-by: Heiko Thiery Tested-by: Gwenhael Goavec-Merou Signed-off-by: Thomas Petazzoni --- .../0001-disable_shared_library_target_in_build.patch | 9 +++++---- package/librtlsdr/librtlsdr.hash | 4 ++-- package/librtlsdr/librtlsdr.mk | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package/librtlsdr/0001-disable_shared_library_target_in_build.patch b/package/librtlsdr/0001-disable_shared_library_target_in_build.patch index 376aa23344..2fb63465de 100644 --- a/package/librtlsdr/0001-disable_shared_library_target_in_build.patch +++ b/package/librtlsdr/0001-disable_shared_library_target_in_build.patch @@ -1,4 +1,4 @@ -From c8878472bf84c656979ea1d07e7ed55b0aa2c939 Mon Sep 17 00:00:00 2001 +From 9a1c2587d4ef18e2026811deabd024eb7577d9ce Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Fri, 15 May 2020 16:14:48 +0200 Subject: [PATCH] disable shared library target in build @@ -19,12 +19,13 @@ will be install. Signed-off-by: Yuvaraj Patil Signed-off-by: Fabrice Fontaine Signed-off-by: Gwenhael Goavec-Merou +Signed-off-by: Titouan Christophe --- src/CMakeLists.txt | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 33faee7..d82fc87 100644 +index de93044..13b7b1a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,6 +18,8 @@ @@ -121,9 +122,9 @@ index 33faee7..d82fc87 100644 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # .so/.dylib file ) +endif() - install(TARGETS rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power + install(TARGETS rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast DESTINATION ${CMAKE_INSTALL_BINDIR} ) -- -2.26.2 +2.25.3 diff --git a/package/librtlsdr/librtlsdr.hash b/package/librtlsdr/librtlsdr.hash index 920a755033..e4b0871db3 100644 --- a/package/librtlsdr/librtlsdr.hash +++ b/package/librtlsdr/librtlsdr.hash @@ -1,4 +1,4 @@ # Locally calculated -sha256 78c20031287017d057941640dcf05cb7666cfedcfad1b4a1186ed00cabfabc2f librtlsdr-d794155ba65796a76cd0a436f9709f4601509320.tar.gz +sha256 f09ff5ba2fa1780071321ba22885b9d1a16ac9d4b944a97e39b6921960439301 librtlsdr-ed0317e6a58c098874ac58b769cf2e609c18d9a5.tar.gz # License file, locally calculated -sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING +sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING diff --git a/package/librtlsdr/librtlsdr.mk b/package/librtlsdr/librtlsdr.mk index 16f2632789..47586bdfb2 100644 --- a/package/librtlsdr/librtlsdr.mk +++ b/package/librtlsdr/librtlsdr.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBRTLSDR_VERSION = d794155ba65796a76cd0a436f9709f4601509320 +LIBRTLSDR_VERSION = ed0317e6a58c098874ac58b769cf2e609c18d9a5 LIBRTLSDR_SITE = $(call github,steve-m,librtlsdr,$(LIBRTLSDR_VERSION)) LIBRTLSDR_LICENSE = GPL-2.0+ LIBRTLSDR_LICENSE_FILES = COPYING From e580fad559417df48f7e3123a58205947a09b656 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 11 Aug 2020 12:44:29 -0300 Subject: [PATCH 45/53] configs/ci20: use upstream Linux and U-Boot The vendor kernel we are currently selecting no longer builds, and fails with a ton of: from include/linux/list.h:8, from include/linux/module.h:9, from arch/mips/jz4740/prom.c:16: include/linux/log2.h:22:1: error: ignoring attribute 'noreturn' because it conflicts with attribute 'const' [-Werror=a ttributes] 22 | int ____ilog2_NaN(void); | ^~~ We can't afford to fix that, so let's just move to upstream kernel and bootloader. It doesn't make much sense to keep using an unsupported kernel and bootloader at this point. This means we will be missing some of the features supported by the vendor (such as HDMI support), but it is what it is. Linux v5.7 and v5.4 have been tested to boot fine, the latter is picked for the defconfig as it is an LTS version. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674933782 Reported-by: Thomas Petazzoni Signed-off-by: Ezequiel Garcia Signed-off-by: Thomas Petazzoni --- configs/ci20_defconfig | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/configs/ci20_defconfig b/configs/ci20_defconfig index 8f2604b07c..076f21bdfe 100644 --- a/configs/ci20_defconfig +++ b/configs/ci20_defconfig @@ -2,9 +2,8 @@ BR2_mipsel=y BR2_mips_xburst=y # BR2_MIPS_SOFT_FLOAT is not set - -# Linux headers same as kernel, a 3.18 series -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +BR2_KERNEL_HEADERS_AS_KERNEL=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # system BR2_TARGET_GENERIC_GETTY_PORT="ttyS4" @@ -15,19 +14,17 @@ BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ci20/genimage.cfg" # kernel BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,MIPS,CI20_linux,7dff33297116643485ca37141d804eddd793e834)/linux-7dff33297116643485ca37141d804eddd793e834.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_DEFCONFIG="ci20" BR2_LINUX_KERNEL_INSTALL_TARGET=y # u-boot BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY=y -BR2_TARGET_UBOOT_BOARDNAME="ci20_mmc" -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/MIPS/CI20_u-boot" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="dd3c1b95dac7d10b2ca5806f65e5c1050d7dd0fa" -BR2_TARGET_UBOOT_PATCH="board/ci20/patches/uboot" +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="ci20_mmc" BR2_TARGET_UBOOT_FORMAT_IMG=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin" From 1353f14556eab3b6b0232f25466acd8c394ea3e1 Mon Sep 17 00:00:00 2001 From: Michael Durrant Date: Mon, 10 Aug 2020 10:58:17 -0400 Subject: [PATCH 46/53] configs/arcturus_ucls1012a: bump kernel to 4.14.140 and u-boot version to 2019.10 Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/674933582 Signed-off-by: Michael Durrant Signed-off-by: Oleksandr G Zhadan Signed-off-by: Thomas Petazzoni --- board/arcturus/aarch64-ucls1012a/post-build.sh | 5 +++++ configs/arcturus_ucls1012a_defconfig | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 board/arcturus/aarch64-ucls1012a/post-build.sh diff --git a/board/arcturus/aarch64-ucls1012a/post-build.sh b/board/arcturus/aarch64-ucls1012a/post-build.sh new file mode 100755 index 0000000000..f8ba78095f --- /dev/null +++ b/board/arcturus/aarch64-ucls1012a/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +mkdir -p ${TARGET_DIR}/lib/firmware +cp -f ${BUILD_DIR}/linux-custom/firmware/ppfe/* ${TARGET_DIR}/lib/firmware/ +cp -f ${BUILD_DIR}/linux-custom/br2-ucls1012a.its ${BINARIES_DIR}/ diff --git a/configs/arcturus_ucls1012a_defconfig b/configs/arcturus_ucls1012a_defconfig index fceaed0db7..fd33ebf1f6 100644 --- a/configs/arcturus_ucls1012a_defconfig +++ b/configs/arcturus_ucls1012a_defconfig @@ -1,20 +1,21 @@ # Architecture BR2_aarch64=y -# Linux headers same as kernel, a 4.1 series -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y # System settings BR2_TARGET_GENERIC_HOSTNAME="ucls1012a" BR2_TARGET_GENERIC_ISSUE="Welcome to uCLS1012A-SOM" BR2_SYSTEM_DHCP="eth0" BR2_ROOTFS_OVERLAY="board/arcturus/aarch64-ucls1012a/rootfs_overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/arcturus/aarch64-ucls1012a/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/arcturus/aarch64-ucls1012a/post-image.sh" # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-kernel,v0.2.1935)/linux-v0.2.1935.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-kernel,v.20.31)/linux-v.20.31.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="ucls1012a" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="arcturus/arc-ucls1012a" @@ -27,7 +28,7 @@ BR2_TARGET_ROOTFS_CPIO_GZIP=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_TARBALL=y -BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-uboot,v0.2.1935)/uboot-v0.2.1935.tar.gz" +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-uboot,v.20.31)/uboot-v.20.31.tar.gz" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="UCLS1012A_QSPI128" # Tools From 60dc3d5fe8367848801c06151e55ffff7c30253d Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 11 Aug 2020 11:49:20 +0200 Subject: [PATCH 47/53] package/fping: bump to version 5.0 This bump will fix a build failure with gcc 10 thanks to https://github.com/schweikert/fping/commit/0ed73181eb54e3f2dc744271c0329620972a85ab Also update indentation in hash file (two spaces) Fixes: - http://autobuild.buildroot.org/results/f5c8e546200594e2367444e93e31aa615bd73796 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/fping/fping.hash | 4 ++-- package/fping/fping.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/fping/fping.hash b/package/fping/fping.hash index 0aa0330b5a..0b2233f379 100644 --- a/package/fping/fping.hash +++ b/package/fping/fping.hash @@ -1,5 +1,5 @@ # Locally calculated -sha256 7d339674b6a95aae1d8ad487ff5056fd95b474c3650938268f6a905c3771b64a fping-4.2.tar.gz +sha256 ed38c0b9b64686a05d1b3bc1d66066114a492e04e44eef1821d43b1263cd57b8 fping-5.0.tar.gz # Hash for license file -sha256 6051b27e4b4a648f7bc8b329024da53a6e95ce88fcf0ccc259c371a74b741757 COPYING +sha256 6051b27e4b4a648f7bc8b329024da53a6e95ce88fcf0ccc259c371a74b741757 COPYING diff --git a/package/fping/fping.mk b/package/fping/fping.mk index 5d3ad59e56..24aca32367 100644 --- a/package/fping/fping.mk +++ b/package/fping/fping.mk @@ -4,7 +4,7 @@ # ################################################################################ -FPING_VERSION = 4.2 +FPING_VERSION = 5.0 FPING_SITE = http://fping.org/dist FPING_LICENSE = BSD-like FPING_LICENSE_FILES = COPYING From d4559143324412903ed5dd73a5de20cb4d280397 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 11 Aug 2020 12:12:13 +0200 Subject: [PATCH 48/53] package/gdk-pixbuf: security bump to version 2.36.12 - Fix CVE-2017-6312: Integer overflow in io-ico.c in gdk-pixbuf allows context-dependent attackers to cause a denial of service (segmentation fault and application crash) via a crafted image entry offset in an ICO file, which triggers an out-of-bounds read, related to compiler optimizations. - Fix CVE-2017-6313: Integer underflow in the load_resources function in io-icns.c in gdk-pixbuf allows context-dependent attackers to cause a denial of service (out-of-bounds read and program crash) via a crafted image entry size in an ICO file. - Fix CVE-2017-6314: The make_available_at_least function in io-tiff.c in gdk-pixbuf allows context-dependent attackers to cause a denial of service (infinite loop) via a large TIFF file. Also update indentation in hash file (two spaces) Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/gdk-pixbuf/gdk-pixbuf.hash | 6 +++--- package/gdk-pixbuf/gdk-pixbuf.mk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/gdk-pixbuf/gdk-pixbuf.hash b/package/gdk-pixbuf/gdk-pixbuf.hash index 9cb947f195..8fa178b55c 100644 --- a/package/gdk-pixbuf/gdk-pixbuf.hash +++ b/package/gdk-pixbuf/gdk-pixbuf.hash @@ -1,4 +1,4 @@ -# From http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.36/gdk-pixbuf-2.36.10.sha256sum -sha256 f8f6fa896b89475c73b6e9e8d2a2b062fc359c4b4ccb8e96470d6ab5da949ace gdk-pixbuf-2.36.10.tar.xz +# From http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.36/gdk-pixbuf-2.36.12.sha256sum +sha256 fff85cf48223ab60e3c3c8318e2087131b590fd6f1737e42cb3759a3b427a334 gdk-pixbuf-2.36.12.tar.xz # Locally calculated -sha256 d245807f90032872d1438d741ed21e2490e1175dc8aa3afa5ddb6c8e529b58e5 COPYING +sha256 d245807f90032872d1438d741ed21e2490e1175dc8aa3afa5ddb6c8e529b58e5 COPYING diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk index b7937a48e9..0266e04978 100644 --- a/package/gdk-pixbuf/gdk-pixbuf.mk +++ b/package/gdk-pixbuf/gdk-pixbuf.mk @@ -5,7 +5,7 @@ ################################################################################ GDK_PIXBUF_VERSION_MAJOR = 2.36 -GDK_PIXBUF_VERSION = $(GDK_PIXBUF_VERSION_MAJOR).10 +GDK_PIXBUF_VERSION = $(GDK_PIXBUF_VERSION_MAJOR).12 GDK_PIXBUF_SOURCE = gdk-pixbuf-$(GDK_PIXBUF_VERSION).tar.xz GDK_PIXBUF_SITE = http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$(GDK_PIXBUF_VERSION_MAJOR) GDK_PIXBUF_LICENSE = LGPL-2.0+ From cf8d7fe24a2c045af096dcce280dc90299a1a9bb Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 11 Aug 2020 10:25:16 +0200 Subject: [PATCH 49/53] package/atest: fix build with gcc 10 Fixes: - http://autobuild.buildroot.org/results/887c466b3703449239eedaf86f3f4dd2a2dc8afe Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- .../0001-seq.h-fix-build-with-gcc-10.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/atest/0001-seq.h-fix-build-with-gcc-10.patch diff --git a/package/atest/0001-seq.h-fix-build-with-gcc-10.patch b/package/atest/0001-seq.h-fix-build-with-gcc-10.patch new file mode 100644 index 0000000000..c0ae042b01 --- /dev/null +++ b/package/atest/0001-seq.h-fix-build-with-gcc-10.patch @@ -0,0 +1,40 @@ +From fb374e0775fd9772a2cd7b99a5c21f96f7fe2a9a Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Mon, 10 Aug 2020 12:12:07 +0200 +Subject: [PATCH] seq.h: fix build with gcc 10 + +Rename state structure to avoid the following build failure with gcc +10.0: + +/bin/bash ./libtool --tag=CC --mode=link /home/test/autobuild/run/instance-0/output-1/host/bin/arm-buildroot-linux-gnueabihf-gcc -include config.h -Wall -Wno-sign-compare -Wno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o atest atest.o seq.o alsa.o capture.o playback.o loopback_delay.o -L/home/test/autobuild/run/instance-0/output-1/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib -lasound -lev +libtool: link: /home/test/autobuild/run/instance-0/output-1/host/bin/arm-buildroot-linux-gnueabihf-gcc -include config.h -Wall -Wno-sign-compare -Wno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o atest atest.o seq.o alsa.o capture.o playback.o loopback_delay.o -L/home/test/autobuild/run/instance-0/output-1/host/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib /home/test/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libasound.so -ldl -lpthread -lrt /home/test/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libev.so -lm -Wl,-rpath -Wl,/home/test/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib -Wl,-rpath -Wl,/home/test/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib +/home/test/autobuild/run/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: seq.o:(.bss+0x8): multiple definition of `state'; atest.o:(.bss+0xbc): first defined here +/home/test/autobuild/run/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: capture.o:(.bss+0x0): multiple definition of `state'; atest.o:(.bss+0xbc): first defined here +/home/test/autobuild/run/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: playback.o:(.bss+0x0): multiple definition of `state'; atest.o:(.bss+0xbc): first defined here +/home/test/autobuild/run/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: loopback_delay.o:(.bss+0x0): multiple definition of `state'; atest.o:(.bss+0xbc): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/887c466b3703449239eedaf86f3f4dd2a2dc8afe + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/amouiche/atest/pull/3] +--- + seq.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/seq.h b/seq.h +index 0fa1a95..b7ba8d1 100644 +--- a/seq.h ++++ b/seq.h +@@ -30,7 +30,7 @@ enum seq_stat_e { + NULL_FRAME = 0, + INVALID_FRAME, + VALID_FRAME, +-} state; ++}; + + + struct seq_info { +-- +2.27.0 + From b1f03aef306eb596b8061be20b4baa1a018bd890 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 11 Aug 2020 10:42:07 +0200 Subject: [PATCH 50/53] package/aircrack-ng: fix build with gcc 10 Fixes: - http://autobuild.buildroot.org/results/98ab591a88e06a985b0a7aac5abbf665289134b4 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- .../0001-Expand-packed-definition.patch | 26 +++++++ .../0002-Fix-duplicated-symbols.patch | 74 +++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 package/aircrack-ng/0001-Expand-packed-definition.patch create mode 100644 package/aircrack-ng/0002-Fix-duplicated-symbols.patch diff --git a/package/aircrack-ng/0001-Expand-packed-definition.patch b/package/aircrack-ng/0001-Expand-packed-definition.patch new file mode 100644 index 0000000000..f0c033a1aa --- /dev/null +++ b/package/aircrack-ng/0001-Expand-packed-definition.patch @@ -0,0 +1,26 @@ +From d4496006ac1e0c99908108b998ae39afb0658733 Mon Sep 17 00:00:00 2001 +From: Joseph Benden +Date: Tue, 7 Jul 2020 11:42:40 -0700 +Subject: [PATCH] Expand __packed definition. + +Signed-off-by: Joseph Benden +[Retrieved from: +https://github.com/aircrack-ng/aircrack-ng/commit/d4496006ac1e0c99908108b998ae39afb0658733] +Signed-off-by: Fabrice Fontaine +--- + lib/radiotap/radiotap.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/radiotap/radiotap.h b/lib/radiotap/radiotap.h +index 57f784b8d..bb5a41dfc 100644 +--- a/lib/radiotap/radiotap.h ++++ b/lib/radiotap/radiotap.h +@@ -56,7 +56,7 @@ struct ieee80211_radiotap_header { + * @it_present: (first) present word + */ + uint32_t it_present; +-} __packed; ++} __attribute__((__packed__)); + + /* version is always 0 */ + #define PKTHDR_RADIOTAP_VERSION 0 diff --git a/package/aircrack-ng/0002-Fix-duplicated-symbols.patch b/package/aircrack-ng/0002-Fix-duplicated-symbols.patch new file mode 100644 index 0000000000..f181580808 --- /dev/null +++ b/package/aircrack-ng/0002-Fix-duplicated-symbols.patch @@ -0,0 +1,74 @@ +From f6f1396807607f5649d20631db517cfca3a1f5c4 Mon Sep 17 00:00:00 2001 +From: Joseph Benden +Date: Tue, 7 Jul 2020 11:44:40 -0700 +Subject: [PATCH] Fix duplicated symbols. + +Signed-off-by: Joseph Benden +[Retrieved from: +https://github.com/aircrack-ng/aircrack-ng/commit/f6f1396807607f5649d20631db517cfca3a1f5c4] +Signed-off-by: Fabrice Fontaine +--- + src/airodump-ng/airodump-ng.c | 2 -- + src/airventriloquist-ng/airventriloquist-ng.c | 6 +++--- + src/tkiptun-ng/tkiptun-ng.c | 4 ++-- + 3 files changed, 5 insertions(+), 7 deletions(-) + +diff --git a/src/airodump-ng/airodump-ng.c b/src/airodump-ng/airodump-ng.c +index 3ae6994dd..e72bc88e2 100644 +--- a/src/airodump-ng/airodump-ng.c ++++ b/src/airodump-ng/airodump-ng.c +@@ -92,8 +92,6 @@ + #include "radiotap/radiotap_iter.h" + + struct devices dev; +-uint8_t h80211[4096] __attribute__((aligned(16))); +-uint8_t tmpbuf[4096] __attribute__((aligned(16))); + + static const unsigned char llcnull[] = {0, 0, 0, 0}; + +diff --git a/src/airventriloquist-ng/airventriloquist-ng.c b/src/airventriloquist-ng/airventriloquist-ng.c +index ac6b7647e..267d95540 100644 +--- a/src/airventriloquist-ng/airventriloquist-ng.c ++++ b/src/airventriloquist-ng/airventriloquist-ng.c +@@ -173,7 +173,7 @@ static struct local_options + } lopt; + + struct devices dev; +-struct wif *_wi_in, *_wi_out; ++extern struct wif *_wi_in, *_wi_out; + + struct ARP_req + { +@@ -195,8 +195,8 @@ struct APt + }; + + unsigned long nb_pkt_sent; +-u_int8_t h80211[4096]; +-static u_int8_t tmpbuf[4096]; ++extern u_int8_t h80211[4096]; ++extern u_int8_t tmpbuf[4096]; + + static int tcp_test(const char * ip_str, const short port) + { +diff --git a/src/tkiptun-ng/tkiptun-ng.c b/src/tkiptun-ng/tkiptun-ng.c +index dc67f5d58..43db0bc23 100644 +--- a/src/tkiptun-ng/tkiptun-ng.c ++++ b/src/tkiptun-ng/tkiptun-ng.c +@@ -267,7 +267,7 @@ static struct local_options + + // unused, but needed for link + struct devices dev; +-struct wif *_wi_in, *_wi_out; ++extern struct wif *_wi_in, *_wi_out; + + struct ARP_req + { +@@ -289,7 +289,7 @@ struct APt + }; + + unsigned long nb_pkt_sent; +-unsigned char h80211[4096]; ++extern unsigned char h80211[4096]; + static unsigned char srcbuf[4096]; + static char strbuf[512]; + static int alarmed; From 8e44a8a132ba908b22a11a09a7704d4ecddbc98a Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 12 Aug 2020 00:19:58 +0200 Subject: [PATCH 51/53] package/python3-mako: use PYTHON3_MAKO_VERSION Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/python3-mako/python3-mako.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python3-mako/python3-mako.mk b/package/python3-mako/python3-mako.mk index 7b135c110c..0296c68fc6 100644 --- a/package/python3-mako/python3-mako.mk +++ b/package/python3-mako/python3-mako.mk @@ -7,7 +7,7 @@ # Please keep in sync with # package/python-mako/python-mako.mk PYTHON3_MAKO_VERSION = 1.1.2 -PYTHON3_MAKO_SOURCE = Mako-$(PYTHON_MAKO_VERSION).tar.gz +PYTHON3_MAKO_SOURCE = Mako-$(PYTHON3_MAKO_VERSION).tar.gz PYTHON3_MAKO_SITE = https://files.pythonhosted.org/packages/42/64/fc7c506d14d8b6ed363e7798ffec2dfe4ba21e14dda4cfab99f4430cba3a PYTHON3_MAKO_SETUP_TYPE = setuptools PYTHON3_MAKO_LICENSE = MIT From d7e6a935c0ceee63b50b891cb1a01fa34e88e663 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 12 Aug 2020 00:19:59 +0200 Subject: [PATCH 52/53] package/python3-pyelftools: use PYTHON3_PYELFTOOLS_VERSION Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/python3-pyelftools/python3-pyelftools.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python3-pyelftools/python3-pyelftools.mk b/package/python3-pyelftools/python3-pyelftools.mk index ea79aef66d..be49ca2bcf 100644 --- a/package/python3-pyelftools/python3-pyelftools.mk +++ b/package/python3-pyelftools/python3-pyelftools.mk @@ -6,7 +6,7 @@ # Please keep in sync with package/python-pyelftools/python-pyelftools.mk PYTHON3_PYELFTOOLS_VERSION = 0.25 -PYTHON3_PYELFTOOLS_SOURCE = pyelftools-$(PYTHON_PYELFTOOLS_VERSION).tar.gz +PYTHON3_PYELFTOOLS_SOURCE = pyelftools-$(PYTHON3_PYELFTOOLS_VERSION).tar.gz PYTHON3_PYELFTOOLS_SITE = https://files.pythonhosted.org/packages/fa/9a/0674cb1725196568bdbca98304f2efb17368b57af1a4bb3fc772c026f474 PYTHON3_PYELFTOOLS_LICENSE = Public domain PYTHON3_PYELFTOOLS_LICENSE_FILES = LICENSE From d1d89d37c02e3d8224fb6f812e87fef5612a771a Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 12 Aug 2020 00:37:40 +0200 Subject: [PATCH 53/53] package/iputils: drop wrong linux-headers dependency Commit 9ffcd9279e5505535a73cf1200b3a86fd425cf32 wrongly added a linux-headers dependency when switching to meson. Remove it as headers are always provided by the toolchain. Signed-off-by: Fabrice Fontaine Acked-by: Petr Vorel Signed-off-by: Thomas Petazzoni --- package/iputils/iputils.mk | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/package/iputils/iputils.mk b/package/iputils/iputils.mk index 0d260891e2..d09bc58b34 100644 --- a/package/iputils/iputils.mk +++ b/package/iputils/iputils.mk @@ -40,13 +40,8 @@ IPUTILS_DEPENDENCIES += libgcrypt else ifeq ($(BR2_PACKAGE_OPENSSL),y) IPUTILS_CONF_OPTS += -DUSE_CRYPTO=openssl IPUTILS_DEPENDENCIES += openssl -else ifeq ($(BR2_PACKAGE_LINUX_HEADERS),y) -IPUTILS_CONF_OPTS += -DUSE_CRYPTO=kernel -IPUTILS_DEPENDENCIES += linux-headers else -IPUTILS_CONF_OPTS += -DUSE_CRYPTO=none -# BUILD_NINFOD=true and USE_CRYPTO=none cannot be combined -IPUTILS_NINFOD = n +IPUTILS_CONF_OPTS += -DUSE_CRYPTO=kernel endif ifeq ($(BR2_PACKAGE_SYSTEMD),y)