diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
commit | 4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch) | |
tree | 356496503d52354aa6d9f2d36126302fed5f3a73 /net-wireless/rtl_433 | |
parent | fcc5224904648a8e6eb528d7603154160a20022f (diff) |
gentoo resync : 20.03.2022
Diffstat (limited to 'net-wireless/rtl_433')
-rw-r--r-- | net-wireless/rtl_433/Manifest | 8 | ||||
-rw-r--r-- | net-wireless/rtl_433/files/rtl_433-21.12-CVE.patch | 55 | ||||
-rw-r--r-- | net-wireless/rtl_433/files/rtl_433-21.12-test-visibility.patch | 155 | ||||
-rw-r--r-- | net-wireless/rtl_433/rtl_433-21.12.ebuild (renamed from net-wireless/rtl_433/rtl_433-21.05.ebuild) | 28 | ||||
-rw-r--r-- | net-wireless/rtl_433/rtl_433-9999.ebuild | 18 |
5 files changed, 241 insertions, 23 deletions
diff --git a/net-wireless/rtl_433/Manifest b/net-wireless/rtl_433/Manifest index 7579efd8d9d9..08add9e0f5e6 100644 --- a/net-wireless/rtl_433/Manifest +++ b/net-wireless/rtl_433/Manifest @@ -1,4 +1,6 @@ -DIST rtl_433-21.05.tar.gz 841774 BLAKE2B 4a3c060c85233a85e951eff5fb210cc4ec5529a6cc868782fdbf7b3dad7372dcd7d428776c539d25105b9cfdf5f260bc031bbd5435eb2658e73b8b275f2040ee SHA512 fe0a26b14df97c679968536b5b3dfe41e5f8c6e0af00265461b4e1bf6312dd71cc1b1ccf2f5f78bc4d67b5f2effb17a88b743dc38db4a0a73f9f5b756868dba4 -EBUILD rtl_433-21.05.ebuild 1066 BLAKE2B bd8342dc5d380b8d053c7f384cf9f48a9c0fdd963adb7850ca92791dc5b8302b6f62955e421ca5e7bc836ea9ff5c2a4a6d7da4ed5f999e48dd0a8582097ed6c5 SHA512 e87ca04c5c5cc37484b38927d21523c99b435a7cf3724dada0aaf43af7a31b57e8765178d195b700cee013cca5faf1b61286f8367c72dc88f018faed10e23b81 -EBUILD rtl_433-9999.ebuild 1066 BLAKE2B bd8342dc5d380b8d053c7f384cf9f48a9c0fdd963adb7850ca92791dc5b8302b6f62955e421ca5e7bc836ea9ff5c2a4a6d7da4ed5f999e48dd0a8582097ed6c5 SHA512 e87ca04c5c5cc37484b38927d21523c99b435a7cf3724dada0aaf43af7a31b57e8765178d195b700cee013cca5faf1b61286f8367c72dc88f018faed10e23b81 +AUX rtl_433-21.12-CVE.patch 2373 BLAKE2B 3856b4ca58eadf32cfc023e7544ad98133a49f358474a60d5e44d9551d0ae3ddc8d5acbba53a350d4bd06719f495fcd3e2e8e35223330ad60f4a4bbc6c6126fd SHA512 26e1fff504c3fa52dc13ccaeb9d5865829fb462363b4a042f6245fdce843aa0f8517463fd05b305a550e298859d56e3a8045937b5de3719d543260f2ea0a8c48 +AUX rtl_433-21.12-test-visibility.patch 6747 BLAKE2B 4f03eb9df44e6a789437190c8c09d63c0f51a5345efea14765314af68c704908d30764d26c0f43b1bfc4145b1f224b6ac5b1476d04c85b217c502e0714b7f0bb SHA512 ba7a3f2d8b4fd057c595ca62c01be53bed37f6c408314f06e02d634ef1e6f465920127622f8ae3c94cbefbc677c25ba69873b0f12229ae48ec7caf37933b166a +DIST rtl_433-21.12.tar.gz 954628 BLAKE2B 7622cba1ff8d9ed46bcd9d7298b2278437aba3dca65985f27d44d20d3b79082cff04172d4593af07379928d42d5e422ff2857ada427156b16f1ba24a7bca57ed SHA512 8183887c1e09e94bee10b70190555d7fa0fa6675bba6130f78ab111b77428fef90696bc15a8e5abb07ae5ae3e492641a40acd6087d5bc413db5f2944878f03a3 +EBUILD rtl_433-21.12.ebuild 985 BLAKE2B c3d05b45d22794d166f12dd1c08d3cd0a0658aa5875513177dd29932d76968b3482ca033a485dc6616981e94a2135fe5aadf704cedcce33c1ef9313f3ed15446 SHA512 0cb2e08414889dbef5e0b93c52ac3030158f8f489393f0c611e0e74f82a5d3d2ad6d9208a699c6b00bc772e8a690ae28ff2bd5cb704515c22531b6ab9b97306a +EBUILD rtl_433-9999.ebuild 1071 BLAKE2B 89f4eb8d9b04fb618c0d9ce54c5358b9752b7606f06181a29a2616bc03ca9b987bdaa97614927e759f22a6f44de087bcc8af634f86d543310b4dd8741b2cbd3e SHA512 322465165d02b311d3a97f80459fdf00722c6fa9844a11d0a81a21b77e08a1ec337cb1cc55ec1446107ce7117fbf48f7a9dbc4a9978fff86d2276be7bbb5ce0c MISC metadata.xml 484 BLAKE2B 2cdc645038b7fbc5b1af469b4c2d36e9e36b4cb463f17cdb7d6df6cba5ae4f6672396c6fce29e4ba71529a5ffc72c781f1873a7898e81eae466c075010545c8a SHA512 2258949f4ace0afb3a3b4e44222e02919d7bcb5dc376bc4052b834fbe09dc9f6319479e61c80db66c7465de9c32a635de3d68edb19b9f7cedababf00950be76b diff --git a/net-wireless/rtl_433/files/rtl_433-21.12-CVE.patch b/net-wireless/rtl_433/files/rtl_433-21.12-CVE.patch new file mode 100644 index 000000000000..1ce26c468e87 --- /dev/null +++ b/net-wireless/rtl_433/files/rtl_433-21.12-CVE.patch @@ -0,0 +1,55 @@ +From 2dad7b9fc67a1d0bfbe520fbd821678b8f8cc7a8 Mon Sep 17 00:00:00 2001 +From: "Christian W. Zuckschwerdt" <christian@zuckschwerdt.org> +Date: Mon, 24 Jan 2022 15:53:20 +0100 +Subject: [PATCH] minor: Fix overflow in Clipsal-CMR113 and Somfy-IOHC reported + by aug5t7 + +--- + src/devices/cmr113.c | 4 ++-- + src/devices/somfy_iohc.c | 9 +++++---- + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/src/devices/cmr113.c b/src/devices/cmr113.c +index c85dfac56..19ec5d421 100644 +--- a/src/devices/cmr113.c ++++ b/src/devices/cmr113.c +@@ -42,8 +42,8 @@ Kudos to Jon Oxer for decoding this stream and putting it here: + + */ + +-#define COMPARE_BITS 83 +-#define COMPARE_BYTES (COMPARE_BITS/8) ++#define COMPARE_BITS 83 ++#define COMPARE_BYTES ((COMPARE_BITS + 7) / 8) + + static int cmr113_decode(r_device *decoder, bitbuffer_t *bitbuffer) + { +diff --git a/src/devices/somfy_iohc.c b/src/devices/somfy_iohc.c +index 906cae53e..2c88067b5 100644 +--- a/src/devices/somfy_iohc.c ++++ b/src/devices/somfy_iohc.c +@@ -100,11 +100,12 @@ static int somfy_iohc_decode(r_device *decoder, bitbuffer_t *bitbuffer) + if (bitbuffer->num_rows != 1) + return DECODE_ABORT_EARLY; + +- int offset = bitbuffer_search(bitbuffer, 0, 0, preamble_pattern, 24) + 24; +- if (offset >= bitbuffer->bits_per_row[0] - 19 * 10) ++ unsigned offset = bitbuffer_search(bitbuffer, 0, 0, preamble_pattern, 24) + 24; ++ if (offset + 19 * 10 >= bitbuffer->bits_per_row[0]) + return DECODE_ABORT_EARLY; + +- int num_bits = bitbuffer->bits_per_row[0] - offset; ++ unsigned num_bits = bitbuffer->bits_per_row[0] - offset; ++ num_bits = MIN(num_bits, sizeof (b) * 8); + + int len = extract_bytes_uart(bitbuffer->bb[0], offset, num_bits, b); + if (len < 19) +@@ -120,7 +121,7 @@ static int somfy_iohc_decode(r_device *decoder, bitbuffer_t *bitbuffer) + // calculate and verify checksum + if (crc16lsb(b, len, 0x8408, 0x0000) != 0) // unreflected poly 0x1021 + return DECODE_FAIL_MIC; +- bitrow_printf(b, len * 8, "%s: offset %d, num_bits %d, len %d, msg_len %d\n", __func__, offset, num_bits, len, msg_len); ++ bitrow_printf(b, len * 8, "%s: offset %u, num_bits %u, len %d, msg_len %d\n", __func__, offset, num_bits, len, msg_len); + + int msg_type = (b[0]); + int dst_id = ((unsigned)b[4] << 24) | (b[3] << 16) | (b[2] << 8) | (b[1]); // assume Little-Endian diff --git a/net-wireless/rtl_433/files/rtl_433-21.12-test-visibility.patch b/net-wireless/rtl_433/files/rtl_433-21.12-test-visibility.patch new file mode 100644 index 000000000000..01626361f5cc --- /dev/null +++ b/net-wireless/rtl_433/files/rtl_433-21.12-test-visibility.patch @@ -0,0 +1,155 @@ +From eda74c17dba1cfed7bcbb0654251cb0cd4e1f4b2 Mon Sep 17 00:00:00 2001 +From: "Christian W. Zuckschwerdt" <christian@zuckschwerdt.org> +Date: Thu, 17 Mar 2022 08:55:49 +0100 +Subject: [PATCH] minor: Add visibility to dynamic lib exports (closes #2010) + +Co-authored-by: "Rick Farina (Zero_Chaos)" <zerochaos@gentoo.org> +--- + include/data.h | 58 ++++++++++++++++++++++++++++---------------- + src/CMakeLists.txt | 2 +- + tests/CMakeLists.txt | 2 +- + 3 files changed, 39 insertions(+), 23 deletions(-) + +diff --git a/include/data.h b/include/data.h +index 34fe79525..e892c7fa2 100644 +--- a/include/data.h ++++ b/include/data.h +@@ -21,6 +21,22 @@ + #ifndef INCLUDE_DATA_H_ + #define INCLUDE_DATA_H_ + ++#if defined _WIN32 || defined __CYGWIN__ ++ #ifdef data_EXPORTS ++ #define R_API __stdcall __declspec(dllexport) // Note: actually gcc seems to also supports this syntax. ++ #else ++ #define R_API __stdcall __declspec(dllimport) // Note: actually gcc seems to also supports this syntax. ++ #endif ++ #define R_API_CALLCONV __stdcall ++#else ++ #if __GNUC__ >= 4 ++ #define R_API __attribute__((visibility ("default"))) ++ #else ++ #define R_API ++ #endif ++ #define R_API_CALLCONV ++#endif ++ + #include <stddef.h> + + typedef enum { +@@ -87,19 +103,19 @@ typedef struct data { + + @return A constructed data_t* object or NULL if there was a memory allocation error. + */ +-data_t *data_make(const char *key, const char *pretty_key, ...); ++R_API data_t *data_make(const char *key, const char *pretty_key, ...); + + /** Adds to a structured data object, by appending data. + + @see data_make() + */ +-data_t *data_append(data_t *first, const char *key, const char *pretty_key, ...); ++R_API data_t *data_append(data_t *first, const char *key, const char *pretty_key, ...); + + /** Adds to a structured data object, by prepending data. + + @see data_make() + */ +-data_t *data_prepend(data_t *first, const char *key, const char *pretty_key, ...); ++R_API data_t *data_prepend(data_t *first, const char *key, const char *pretty_key, ...); + + /** Constructs an array from given data of the given uniform type. + +@@ -110,28 +126,28 @@ data_t *data_prepend(data_t *first, const char *key, const char *pretty_key, ... + @return The constructed data array object, typically placed inside a data_t or NULL + if there was a memory allocation error. + */ +-data_array_t *data_array(int num_values, data_type_t type, void *ptr); ++R_API data_array_t *data_array(int num_values, data_type_t type, void *ptr); + + /** Releases a data array. */ +-void data_array_free(data_array_t *array); ++R_API void data_array_free(data_array_t *array); + + /** Retain a structure object, returns the structure object passed in. */ +-data_t *data_retain(data_t *data); ++R_API data_t *data_retain(data_t *data); + + /** Releases a structure object if retain is zero, decrement retain otherwise. */ +-void data_free(data_t *data); ++R_API void data_free(data_t *data); + + struct data_output; + + typedef struct data_output { +- void (*print_data)(struct data_output *output, data_t *data, char const *format); +- void (*print_array)(struct data_output *output, data_array_t *data, char const *format); +- void (*print_string)(struct data_output *output, const char *data, char const *format); +- void (*print_double)(struct data_output *output, double data, char const *format); +- void (*print_int)(struct data_output *output, int data, char const *format); +- void (*output_start)(struct data_output *output, char const *const *fields, int num_fields); +- void (*output_flush)(struct data_output *output); +- void (*output_free)(struct data_output *output); ++ void (R_API_CALLCONV *print_data)(struct data_output *output, data_t *data, char const *format); ++ void (R_API_CALLCONV *print_array)(struct data_output *output, data_array_t *data, char const *format); ++ void (R_API_CALLCONV *print_string)(struct data_output *output, const char *data, char const *format); ++ void (R_API_CALLCONV *print_double)(struct data_output *output, double data, char const *format); ++ void (R_API_CALLCONV *print_int)(struct data_output *output, int data, char const *format); ++ void (R_API_CALLCONV *output_start)(struct data_output *output, char const *const *fields, int num_fields); ++ void (R_API_CALLCONV *output_flush)(struct data_output *output); ++ void (R_API_CALLCONV *output_free)(struct data_output *output); + } data_output_t; + + /** Setup known field keys and start output, used by CSV only. +@@ -141,19 +157,19 @@ typedef struct data_output { + strings not. The list may contain duplicates and they are eliminated. + @param num_fields number of fields + */ +-void data_output_start(struct data_output *output, char const *const *fields, int num_fields); ++R_API void data_output_start(struct data_output *output, char const *const *fields, int num_fields); + + /** Prints a structured data object, flushes the output if applicable. */ +-void data_output_print(struct data_output *output, data_t *data); ++R_API void data_output_print(struct data_output *output, data_t *data); + +-void data_output_free(struct data_output *output); ++R_API void data_output_free(struct data_output *output); + + /* data output helpers */ + +-void print_value(data_output_t *output, data_type_t type, data_value_t value, char const *format); ++R_API void print_value(data_output_t *output, data_type_t type, data_value_t value, char const *format); + +-void print_array_value(data_output_t *output, data_array_t *array, char const *format, int idx); ++R_API void print_array_value(data_output_t *output, data_array_t *array, char const *format, int idx); + +-size_t data_print_jsons(data_t *data, char *dst, size_t len); ++R_API size_t data_print_jsons(data_t *data, char *dst, size_t len); + + #endif // INCLUDE_DATA_H_ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b050dd597..443393e67 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -253,7 +253,7 @@ if(MSVC) + target_sources(rtl_433 PRIVATE getopt/getopt.c) + endif() + +-add_library(data data.c abuf.c term_ctl.c) ++add_library(data data.c abuf.c) + target_link_libraries(data ${NET_LIBRARIES}) + + target_link_libraries(rtl_433 +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index aaae3d498..9a3a14302 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,7 +1,7 @@ + ######################################################################## + # Compile test cases + ######################################################################## +-add_executable(data-test data-test.c ../src/output_file.c) ++add_executable(data-test data-test.c ../src/output_file.c ../src/term_ctl.c) + + target_link_libraries(data-test data) + diff --git a/net-wireless/rtl_433/rtl_433-21.05.ebuild b/net-wireless/rtl_433/rtl_433-21.12.ebuild index 5aa379a4bcba..7e127adedfde 100644 --- a/net-wireless/rtl_433/rtl_433-21.05.ebuild +++ b/net-wireless/rtl_433/rtl_433-21.12.ebuild @@ -1,10 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -#this doesn't work in eapi 7, even with emake or cmake.eclass -EAPI=6 +EAPI=8 -inherit cmake-utils +inherit cmake DESCRIPTION="Decode OOK modulated signals" HOMEPAGE="https://github.com/merbanan/rtl_433" @@ -12,31 +11,36 @@ if [[ ${PV} == "9999" ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/merbanan/rtl_433" else - COMMIT="105342a33271bac6837d06aa86c23eec9e9ecb6a" - SRC_URI="https://github.com/merbanan/rtl_433/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" - S="${WORKDIR}/${PN}-${COMMIT}" - #SRC_URI="https://github.com/merbanan/rtl_433/archive/${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI="https://github.com/merbanan/rtl_433/archive/${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~x86" fi LICENSE="GPL-2" SLOT="0" -IUSE="+rtlsdr soapysdr" +IUSE="+rtlsdr soapysdr test" DEPEND="rtlsdr? ( net-wireless/rtl-sdr:= virtual/libusb:1 ) - soapysdr? ( net-wireless/soapysdr:= )" + soapysdr? ( net-wireless/soapysdr:= ) + dev-libs/openssl:=" RDEPEND="${DEPEND}" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}/${P}-CVE.patch" + "${FILESDIR}/${P}-test-visibility.patch" +) src_configure() { mycmakeargs=( -DENABLE_RTLSDR="$(usex rtlsdr)" -DENABLE_SOAPYSDR="$(usex soapysdr)" + -DBUILD_TESTING="$(usex test)" ) - cmake-utils_src_configure + cmake_src_configure } src_install() { - cmake-utils_src_install + cmake_src_install mv "${ED}/usr/etc" "${ED}/" || die } diff --git a/net-wireless/rtl_433/rtl_433-9999.ebuild b/net-wireless/rtl_433/rtl_433-9999.ebuild index 5aa379a4bcba..74f846b96d6d 100644 --- a/net-wireless/rtl_433/rtl_433-9999.ebuild +++ b/net-wireless/rtl_433/rtl_433-9999.ebuild @@ -1,10 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -#this doesn't work in eapi 7, even with emake or cmake.eclass -EAPI=6 +EAPI=8 -inherit cmake-utils +inherit cmake DESCRIPTION="Decode OOK modulated signals" HOMEPAGE="https://github.com/merbanan/rtl_433" @@ -21,22 +20,25 @@ fi LICENSE="GPL-2" SLOT="0" -IUSE="+rtlsdr soapysdr" +IUSE="+rtlsdr soapysdr test" DEPEND="rtlsdr? ( net-wireless/rtl-sdr:= virtual/libusb:1 ) - soapysdr? ( net-wireless/soapysdr:= )" + soapysdr? ( net-wireless/soapysdr:= ) + dev-libs/openssl:=" RDEPEND="${DEPEND}" +RESTRICT="!test? ( test )" src_configure() { mycmakeargs=( -DENABLE_RTLSDR="$(usex rtlsdr)" -DENABLE_SOAPYSDR="$(usex soapysdr)" + -DBUILD_TESTING="$(usex test)" ) - cmake-utils_src_configure + cmake_src_configure } src_install() { - cmake-utils_src_install + cmake_src_install mv "${ED}/usr/etc" "${ED}/" || die } |