Skip to content

Commit

Permalink
Merge remote-tracking branch 'buildroot/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
j1nx committed Mar 1, 2024
2 parents 12cfc72 + 5f253e3 commit 2ce3fc8
Show file tree
Hide file tree
Showing 12 changed files with 95 additions and 25 deletions.
3 changes: 2 additions & 1 deletion package/ccache/ccache.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ HOST_CCACHE_CONF_OPTS += \
-UCMAKE_C_COMPILER_LAUNCHER \
-UCMAKE_CXX_COMPILER_LAUNCHER \
-DZSTD_FROM_INTERNET=OFF \
-DHIREDIS_FROM_INTERNET=OFF
-DHIREDIS_FROM_INTERNET=OFF \
-DENABLE_TESTING=OFF

# Patch host-ccache as follows:
# - Use BR_CACHE_DIR instead of CCACHE_DIR, because CCACHE_DIR
Expand Down
12 changes: 10 additions & 2 deletions package/erlang/erlang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,22 @@ ERLANG_CPE_ID_VENDOR = erlang
ERLANG_CPE_ID_PRODUCT = erlang\/otp
ERLANG_INSTALL_STAGING = YES

define ERLANG_FIX_AUTOCONF_VERSION
$(SED) "s/USE_AUTOCONF_VERSION=.*/USE_AUTOCONF_VERSION=$(AUTOCONF_VERSION)/" $(@D)/otp_build
endef

# Patched erts/aclocal.m4
define ERLANG_RUN_AUTOCONF
cd $(@D) && PATH=$(BR_PATH) ./otp_build update_configure --no-commit
endef
ERLANG_DEPENDENCIES += host-autoconf
ERLANG_PRE_CONFIGURE_HOOKS += ERLANG_RUN_AUTOCONF
ERLANG_PRE_CONFIGURE_HOOKS += \
ERLANG_FIX_AUTOCONF_VERSION \
ERLANG_RUN_AUTOCONF
HOST_ERLANG_DEPENDENCIES += host-autoconf
HOST_ERLANG_PRE_CONFIGURE_HOOKS += ERLANG_RUN_AUTOCONF
HOST_ERLANG_PRE_CONFIGURE_HOOKS += \
ERLANG_FIX_AUTOCONF_VERSION \
ERLANG_RUN_AUTOCONF

# Return the EIV (Erlang Interface Version, EI_VSN)
# $(1): base directory, i.e. either $(HOST_DIR) or $(STAGING_DIR)/usr
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From 33eb948240365434c845b618854403e82a229012 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 31 Jan 2024 21:04:37 +0100
Subject: [PATCH] libheif/plugins/encoder_jpeg.cc: fix libjpeg build

Fix the following libjpeg build failure raised since version 1.17.0 and
https://github.com/strukturag/libheif/commit/ebd13a20b8b7f1964939642b08b662ef7e483f39
because third argument of jpeg_mem_dest is defined as size_t* on libjpeg
instead of unsigned long* on jpeg-turbo:

/home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc: In function 'heif_error jpeg_encode_image(void*, const heif_image*, heif_image_input_class)':
/home/buildroot/autobuild/instance-3/output-1/build/libheif-1.17.5/libheif/plugins/encoder_jpeg.cc:366:37: error: invalid conversion from 'long unsigned int*' to 'size_t*' {aka 'unsigned int*'} [-fpermissive]
366 | jpeg_mem_dest(&cinfo, &outbuffer, &outlength);
| ^~~~~~~~~~
| |
| long unsigned int*

Fix #1008 and #1086

Fixes:
- http://autobuild.buildroot.org/results/8ca909564c8dabe28ad08c96ebbc04b25592e727

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Upstream: https://github.com/strukturag/libheif/pull/1120
---
libheif/plugins/encoder_jpeg.cc | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/libheif/plugins/encoder_jpeg.cc b/libheif/plugins/encoder_jpeg.cc
index d6c7854..21a5541 100644
--- a/libheif/plugins/encoder_jpeg.cc
+++ b/libheif/plugins/encoder_jpeg.cc
@@ -360,7 +360,11 @@ struct heif_error jpeg_encode_image(void* encoder_raw, const struct heif_image*
}

uint8_t* outbuffer = nullptr;
+#ifdef LIBJPEG_TURBO_VERSION
unsigned long outlength = 0;
+#else
+ size_t outlength = 0;
+#endif

jpeg_create_compress(&cinfo);
jpeg_mem_dest(&cinfo, &outbuffer, &outlength);
--
2.43.0

2 changes: 1 addition & 1 deletion package/micropython/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if BR2_PACKAGE_MICROPYTHON

config BR2_PACKAGE_MICROPYTHON_LIB
bool "micropython-lib"
select BR2_PACKAGE_PCRE # runtime
select BR2_PACKAGE_PCRE2 # runtime
help
Core Python libraries ported to MicroPython.

Expand Down
1 change: 0 additions & 1 deletion package/openssh/Config.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config BR2_PACKAGE_OPENSSH
bool "openssh"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_LINUX_PAM if BR2_PACKAGE_REFPOLICY_UPSTREAM_VERSION
select BR2_PACKAGE_OPENSSL
select BR2_PACKAGE_ZLIB
help
Expand Down
2 changes: 1 addition & 1 deletion package/poco/poco.hash
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Locally computed
sha256 71ef96c35fced367d6da74da294510ad2c912563f12cd716ab02b6ed10a733ef poco-1.12.4.tar.gz
sha256 c01221870aa9bccedf1de39890279699207848fe61a0cfb6aeec7c5942c4627f poco-1.13.2.tar.gz
sha256 c4b1e1e5f36d8331737231fefcc30f5714326aec7c387ad59a8115eb0ba7d6b5 LICENSE
2 changes: 1 addition & 1 deletion package/poco/poco.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

POCO_VERSION = 1.12.4
POCO_VERSION = 1.13.2
POCO_SITE = $(call github,pocoproject,poco,poco-$(POCO_VERSION)-release)
POCO_LICENSE = BSL-1.0
POCO_LICENSE_FILES = LICENSE
Expand Down
6 changes: 3 additions & 3 deletions package/python3/python3.hash
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# From https://www.python.org/downloads/release/python-3116/
md5 d0c5a1a31efe879723e51addf56dd206 Python-3.11.6.tar.xz
# From https://www.python.org/downloads/release/python-3118/
md5 b353b8433e560e1af2b130f56dfbd973 Python-3.11.8.tar.xz
# Locally computed
sha256 0fab78fa7f133f4f38210c6260d90d7c0d5c7198446419ce057ec7ac2e6f5f38 Python-3.11.6.tar.xz
sha256 9e06008c8901924395bc1da303eac567a729ae012baa182ab39269f650383bb3 Python-3.11.8.tar.xz
sha256 3b2f81fe21d181c499c59a256c8e1968455d6689d269aa85373bfb6af41da3bf LICENSE
2 changes: 1 addition & 1 deletion package/python3/python3.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
################################################################################

PYTHON3_VERSION_MAJOR = 3.11
PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).6
PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).8
PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz
PYTHON3_SITE = https://python.org/ftp/python/$(PYTHON3_VERSION)
PYTHON3_LICENSE = Python-2.0, others
Expand Down
8 changes: 8 additions & 0 deletions package/refpolicy/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ choice

config BR2_PACKAGE_REFPOLICY_UPSTREAM_VERSION
bool "Upstream version"
# Consider reworking the following when adding new entries:
# Upstream refpolicy for openssh expects linux-pam to be used
select BR2_PACKAGE_LINUX_PAM if BR2_PACKAGE_OPENSSH \
&& BR2_USE_MMU \
&& BR2_ENABLE_LOCALE \
&& BR2_USE_WCHAR \
&& !BR2_STATIC_LIBS \
&& BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
help
Use the refpolicy as provided by Buildroot.

Expand Down
29 changes: 18 additions & 11 deletions support/scripts/cve.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import os
import requests # URL checking
import distutils.version
import lzma
import time
import subprocess
import sys
import operator

Expand Down Expand Up @@ -117,6 +117,13 @@ def download_nvd_year(nvd_path, year):
open(path_metaf, "w").write(page_meta.text)
return path_jsonf_xz

@staticmethod
def sort_id(cve_ids):
def cve_key(cve_id):
year, id_ = cve_id.split('-')[1:]
return (int(year), int(id_))
return sorted(cve_ids, key=cve_key)

@classmethod
def read_nvd_dir(cls, nvd_dir):
"""
Expand All @@ -127,8 +134,7 @@ def read_nvd_dir(cls, nvd_dir):
for year in range(NVD_START_YEAR, datetime.datetime.now().year + 1):
filename = CVE.download_nvd_year(nvd_dir, year)
try:
uncompressed = subprocess.check_output(["xz", "-d", "-c", filename])
content = ijson.items(uncompressed, 'CVE_Items.item')
content = ijson.items(lzma.LZMAFile(filename), 'cve_items.item')
except: # noqa: E722
print("ERROR: cannot read %s. Please remove the file then rerun this script" % filename)
raise
Expand All @@ -155,11 +161,11 @@ def parse_node(self, node):
for parsed_node in self.parse_node(child):
yield parsed_node

for cpe in node.get('cpe_match', ()):
for cpe in node.get('cpeMatch', ()):
if not cpe['vulnerable']:
return
product = cpe_product(cpe['cpe23Uri'])
version = cpe_version(cpe['cpe23Uri'])
product = cpe_product(cpe['criteria'])
version = cpe_version(cpe['criteria'])
# ignore when product is '-', which means N/A
if product == '-':
return
Expand Down Expand Up @@ -191,22 +197,23 @@ def parse_node(self, node):
v_end = cpe['versionEndExcluding']

yield {
'id': cpe['cpe23Uri'],
'id': cpe['criteria'],
'v_start': v_start,
'op_start': op_start,
'v_end': v_end,
'op_end': op_end
}

def each_cpe(self):
for node in self.nvd_cve['configurations']['nodes']:
for cpe in self.parse_node(node):
yield cpe
for nodes in self.nvd_cve.get('configurations', []):
for node in nodes['nodes']:
for cpe in self.parse_node(node):
yield cpe

@property
def identifier(self):
"""The CVE unique identifier"""
return self.nvd_cve['cve']['CVE_data_meta']['ID']
return self.nvd_cve['id']

@property
def affected_products(self):
Expand Down
6 changes: 3 additions & 3 deletions support/scripts/pkg-stats
Original file line number Diff line number Diff line change
Expand Up @@ -1055,9 +1055,9 @@ def dump_html_pkg(f, pkg):
f.write(f' <div onclick="expandField(\'{data_field_id}\')" \
class="see-more centered cve_ignored">see all ({cve_total}) &#9662;</div>\n')
if pkg.is_status_error("cve"):
for cve in pkg.cves:
for cve in cvecheck.CVE.sort_id(pkg.cves):
f.write(f' <a href="https://security-tracker.debian.org/tracker/{cve}">{cve}</a><br/>\n')
for cve in pkg.unsure_cves:
for cve in cvecheck.CVE.sort_id(pkg.unsure_cves):
f.write(f' <a href="https://security-tracker.debian.org/tracker/{cve}">{cve} <i>(unsure)</i></a><br/>\n')
elif pkg.is_status_na("cve"):
f.write(f""" {pkg.status['cve'][1]}""")
Expand Down Expand Up @@ -1290,7 +1290,7 @@ def __main__():
package_list = set([v["name"] for v in show_info_js.values() if 'name' in v])
else:
package_list = None
date = datetime.datetime.utcnow()
date = datetime.datetime.now(datetime.timezone.utc)
commit = subprocess.check_output(['git', '-C', brpath,
'rev-parse',
'HEAD']).splitlines()[0].decode()
Expand Down

0 comments on commit 2ce3fc8

Please sign in to comment.