Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
From a4e468a2a0afa80df174831c2f422184820bb0fa Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Thu, 6 Jan 2022 23:15:00 +0100
Subject: [PATCH] mozilla/certdata2pem.py: make cryptography module optional
The Python cryptography module is only used to verify if trusted
certificates have expired, but this is only a warning. For some build
systems and distributions, providing Python cryptography is costly,
especially since it's now partly written in Rust.
As the check is only a warning, it's anyway going to be overlooked by
most people. This commit changes the check to be optional: if the
cryptography Python module is there, we perform the check, otherwise
the check is skipped.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Steve: refreshed to apply on ca-certificates version 20230311]
Signed-off-by: Steve Hay <me@stevenhay.com>
---
mozilla/certdata2pem.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/mozilla/certdata2pem.py b/mozilla/certdata2pem.py
index 4df86a2..3a6d7dc 100644
--- a/mozilla/certdata2pem.py
+++ b/mozilla/certdata2pem.py
@@ -28,8 +28,6 @@ import sys
import textwrap
import io
-from cryptography import x509
-
objects = []
@@ -122,11 +120,16 @@ for obj in objects:
if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]:
continue
- cert = x509.load_der_x509_certificate(bytes(obj['CKA_VALUE']))
- if cert.not_valid_after < datetime.datetime.utcnow():
- print('!'*74)
- print('Trusted but expired certificate found: %s' % obj['CKA_LABEL'])
- print('!'*74)
+ try:
+ from cryptography import x509
+
+ cert = x509.load_der_x509_certificate(bytes(obj['CKA_VALUE']))
+ if cert.not_valid_after < datetime.datetime.utcnow():
+ print('!'*74)
+ print('Trusted but expired certificate found: %s' % obj['CKA_LABEL'])
+ print('!'*74)
+ except ImportError:
+ pass
bname = obj['CKA_LABEL'][1:-1].replace('/', '_')\
.replace(' ', '_')\
--
2.30.2

View File

@@ -0,0 +1,12 @@
config BR2_PACKAGE_CA_CERTIFICATES
bool "CA Certificates"
help
This package includes PEM files of CA certificates to allow
SSL-based applications to check for the authenticity of SSL
connections.
It includes, among others, certificate authorities used by the
Debian infrastructure and those shipped with Mozilla's
browsers.
https://salsa.debian.org/debian/ca-certificates

View File

@@ -0,0 +1,12 @@
config BR2_PACKAGE_HOST_CA_CERTIFICATES
bool "Host CA Certificates"
help
This package includes PEM files of CA certificates to allow
SSL-based applications to check for the authenticity of SSL
connections on the host.
It includes, among others, certificate authorities used by the
Debian infrastructure and those shipped with Mozilla's
browsers.
https://salsa.debian.org/debian/ca-certificates

View File

@@ -0,0 +1,4 @@
# hashes from: $(CA_CERTIFICATES_SITE)/ca-certificates_$(CA_CERTIFICATES_VERSION).dsc :
sha256 2fa2b00d4360f0d14ec51640ae8aea9e563956b95ea786e3c3c01c4eead42b56 ca-certificates_20260223.tar.xz
# Locally computed
sha256 e85e1bcad3a915dc7e6f41412bc5bdeba275cadd817896ea0451f2140a93967c debian/copyright

View File

@@ -0,0 +1,76 @@
################################################################################
#
# ca-certificates
#
################################################################################
CA_CERTIFICATES_VERSION = 20260223
CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.xz
CA_CERTIFICATES_SITE = https://snapshot.debian.org/archive/debian/20260223T202245Z/pool/main/c/ca-certificates
CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python3
HOST_CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python3
CA_CERTIFICATES_LICENSE = GPL-2.0+ (script), MPL-2.0 (data)
CA_CERTIFICATES_LICENSE_FILES = debian/copyright
define CA_CERTIFICATES_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean all
endef
define CA_CERTIFICATES_INSTALL_TARGET_CMDS
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/ca-certificates
$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/ssl/certs
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
rm -f $(TARGET_DIR)/usr/sbin/update-ca-certificates
endef
define CA_CERTIFICATES_GEN_BUNDLE
# Remove any existing certificates under /etc/ssl/certs
rm -f $(TARGET_DIR)/etc/ssl/certs/*
# Create symlinks to certificates under /etc/ssl/certs
# and generate the bundle
cd $(TARGET_DIR) ;\
for i in `find usr/share/ca-certificates -name "*.crt" | LC_COLLATE=C sort` ; do \
ln -sf ../../../$$i etc/ssl/certs/`basename $${i} .crt`.pem ;\
cat $$i ;\
done >$(BUILD_DIR)/ca-certificates.crt
# Create symlinks to the certificates by their hash values
$(HOST_DIR)/bin/c_rehash $(TARGET_DIR)/etc/ssl/certs
# Install the certificates bundle
$(INSTALL) -D -m 644 $(BUILD_DIR)/ca-certificates.crt \
$(TARGET_DIR)/etc/ssl/certs/ca-certificates.crt
endef
CA_CERTIFICATES_TARGET_FINALIZE_HOOKS += CA_CERTIFICATES_GEN_BUNDLE
define HOST_CA_CERTIFICATES_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) clean all
endef
define HOST_CA_CERTIFICATES_INSTALL_CMDS
$(INSTALL) -d -m 0755 $(HOST_DIR)/share/ca-certificates
$(INSTALL) -d -m 0755 $(HOST_DIR)/etc/ssl/certs
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(HOST_DIR)
rm -f $(HOST_DIR)/sbin/update-ca-certificates
# Remove any existing certificates under /etc/ssl/certs
rm -f $(HOST_DIR)/etc/ssl/certs/*
# Create symlinks to certificates under /etc/ssl/certs
# and generate the bundle
cd $(HOST_DIR) ;\
for i in `find share/ca-certificates -name "*.crt" | LC_COLLATE=C sort` ; do \
ln -sf ../../../$$i etc/ssl/certs/`basename $${i} .crt`.pem ;\
cat $$i ;\
done >$(BUILD_DIR)/ca-certificates.crt
# Create symlinks to the certificates by their hash values
$(HOST_DIR)/bin/c_rehash $(HOST_DIR)/etc/ssl/certs
# Install the certificates bundle
$(INSTALL) -D -m 644 $(BUILD_DIR)/ca-certificates.crt \
$(HOST_DIR)/etc/ssl/certs/ca-certificates.crt
endef
$(eval $(generic-package))
$(eval $(host-generic-package))