Prepare August 2023 Release 2 (#5983)
This commit is contained in:
Родитель
8f715de851
Коммит
f3158c7a91
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -2202,6 +2202,7 @@
|
||||||
"livepatch-5.15.116.1-2.cm2",
|
"livepatch-5.15.116.1-2.cm2",
|
||||||
"livepatch-5.15.122.1-2.cm2",
|
"livepatch-5.15.122.1-2.cm2",
|
||||||
"livepatch-5.15.125.1-1.cm2",
|
"livepatch-5.15.125.1-1.cm2",
|
||||||
|
"livepatch-5.15.125.1-2.cm2",
|
||||||
"livepatch-5.15.94.1-1.cm2",
|
"livepatch-5.15.94.1-1.cm2",
|
||||||
"livepatch-5.15.94.1-1.cm2-signed",
|
"livepatch-5.15.94.1-1.cm2-signed",
|
||||||
"livepatch-5.15.95.1-1.cm2",
|
"livepatch-5.15.95.1-1.cm2",
|
||||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"Signatures": {
|
||||||
|
"config-5.15.125.1-2.cm2": "31675ad04227508329fa2ab00ea1ab43758262421992c0d6ca779ceb411c0a69",
|
||||||
|
"kernel-5.15.125.1.tar.gz": "f97197bae4b4b10bbb917e406175e9b52330f35b32f0e748586eb622708759e7",
|
||||||
|
"mariner-5.15.125.1-2.cm2.pem": "5ef124b0924cb1047c111a0ecff1ae11e6ad7cac8d1d9b40f98f99334121f0b0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,196 @@
|
||||||
|
%define kernel_version_release 5.15.125.1-2.cm2
|
||||||
|
%define kernel_version %(echo %{kernel_version_release} | grep -oP "^[^-]+")
|
||||||
|
%define kernel_release %(echo %{kernel_version_release} | grep -oP "(?<=-).+")
|
||||||
|
|
||||||
|
%define builds_module %([[ -n "$(echo "%{patches}" | grep -oP "CVE-\\d+-\\d+(?=\\.patch)")" ]] && echo 1 || echo 0)
|
||||||
|
|
||||||
|
%define kpatch_logs_file /root/.kpatch/build.log
|
||||||
|
|
||||||
|
# Kpatch module names allow only alphanumeric characters and '_'.
|
||||||
|
%define livepatch_name %(value="%{name}-%{version}-%{release}"; echo "${value//[^a-zA-Z0-9_]/_}")
|
||||||
|
%define livepatch_install_dir %{_libdir}/livepatching/%{kernel_version_release}
|
||||||
|
%define livepatch_module_name %{livepatch_name}.ko
|
||||||
|
%define livepatch_module_path %{livepatch_install_dir}/%{livepatch_module_name}
|
||||||
|
|
||||||
|
%define patch_applicable_for_kernel [[ -f "%{livepatch_module_path}" && "$(uname -r)" == "%{kernel_version_release}" ]]
|
||||||
|
%define patch_installed kpatch list | grep -qP "%{livepatch_name}.*%{kernel_version_release}"
|
||||||
|
%define patch_loaded kpatch list | grep -qP "%{livepatch_name}.*enabled"
|
||||||
|
|
||||||
|
# Install patch if the RUNNING kernel matches.
|
||||||
|
# No-op for initial (empty) livepatch.
|
||||||
|
%define install_if_should \
|
||||||
|
if %{patch_applicable_for_kernel} && ! %{patch_installed} \
|
||||||
|
then \
|
||||||
|
kpatch install %{livepatch_module_path} \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load patch, if the RUNNING kernel matches.
|
||||||
|
# No-op for initial (empty) livepatch.
|
||||||
|
%define load_if_should \
|
||||||
|
if %{patch_applicable_for_kernel} && ! %{patch_loaded} \
|
||||||
|
then \
|
||||||
|
kpatch load %{livepatch_module_path} \
|
||||||
|
fi
|
||||||
|
|
||||||
|
%define uninstall_if_should \
|
||||||
|
if %{patch_installed} \
|
||||||
|
then \
|
||||||
|
kpatch uninstall %{livepatch_name} \
|
||||||
|
fi
|
||||||
|
|
||||||
|
%define unload_if_should \
|
||||||
|
if %{patch_loaded} \
|
||||||
|
then \
|
||||||
|
kpatch unload %{livepatch_name} \
|
||||||
|
fi
|
||||||
|
|
||||||
|
%define patches_description \
|
||||||
|
%(
|
||||||
|
echo "Patches list ('*' - fixed, '!' - unfixable through livepatching, kernel update required):"
|
||||||
|
for patch in %{patches}
|
||||||
|
do
|
||||||
|
patch_file=$(basename "$patch")
|
||||||
|
|
||||||
|
cve_number="${patch_file%.*}"
|
||||||
|
patch_suffix="${patch_file#*.}"
|
||||||
|
|
||||||
|
if [ "$patch_suffix" = "patch" ]
|
||||||
|
then
|
||||||
|
echo "*$cve_number"
|
||||||
|
else
|
||||||
|
echo "\!$cve_number: $(cat "$patch")"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
Summary: Set of livepatches for kernel %{kernel_version_release}
|
||||||
|
Name: livepatch-%{kernel_version_release}
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 1%{?dist}
|
||||||
|
License: MIT
|
||||||
|
Vendor: Microsoft Corporation
|
||||||
|
Distribution: Mariner
|
||||||
|
Group: System Environment/Base
|
||||||
|
URL: https://github.com/microsoft/CBL-Mariner
|
||||||
|
Source0: https://github.com/microsoft/CBL-Mariner-Linux-Kernel/archive/rolling-lts/mariner-2/%{kernel_version}.tar.gz#/kernel-%{kernel_version}.tar.gz
|
||||||
|
Source1: config-%{kernel_version_release}
|
||||||
|
Source2: mariner-%{kernel_version_release}.pem
|
||||||
|
|
||||||
|
ExclusiveArch: x86_64
|
||||||
|
|
||||||
|
Provides: livepatch = %{kernel_version_release}
|
||||||
|
|
||||||
|
# Must be kept below the "Patch" tags to correctly evaluate %%builds_module.
|
||||||
|
%if %{builds_module}
|
||||||
|
BuildRequires: audit-devel
|
||||||
|
BuildRequires: bash
|
||||||
|
BuildRequires: bc
|
||||||
|
BuildRequires: binutils
|
||||||
|
BuildRequires: bison
|
||||||
|
BuildRequires: diffutils
|
||||||
|
BuildRequires: dwarves
|
||||||
|
BuildRequires: elfutils-libelf-devel
|
||||||
|
BuildRequires: flex
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: glib-devel
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: kbd
|
||||||
|
BuildRequires: kernel-debuginfo = %{kernel_version_release}
|
||||||
|
BuildRequires: kernel-headers = %{kernel_version_release}
|
||||||
|
BuildRequires: kmod-devel
|
||||||
|
BuildRequires: kpatch-build
|
||||||
|
BuildRequires: libdnet-devel
|
||||||
|
BuildRequires: libmspack-devel
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: openssl
|
||||||
|
BuildRequires: openssl-devel
|
||||||
|
BuildRequires: pam-devel
|
||||||
|
BuildRequires: procps-ng-devel
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: rpm-build
|
||||||
|
|
||||||
|
Requires: coreutils
|
||||||
|
Requires: livepatching-filesystem
|
||||||
|
|
||||||
|
Requires(post): coreutils
|
||||||
|
Requires(post): kpatch
|
||||||
|
|
||||||
|
Requires(preun): kpatch
|
||||||
|
|
||||||
|
%description
|
||||||
|
A set of kernel livepatches addressing CVEs present in Mariner's
|
||||||
|
%{kernel_version_release} kernel.
|
||||||
|
%{patches_description}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n CBL-Mariner-Linux-Kernel-rolling-lts-mariner-2-%{kernel_version}
|
||||||
|
|
||||||
|
cp %{SOURCE1} .config
|
||||||
|
cp %{SOURCE2} certs/mariner.pem
|
||||||
|
|
||||||
|
sed -i 's#CONFIG_SYSTEM_TRUSTED_KEYS=""#CONFIG_SYSTEM_TRUSTED_KEYS="certs/mariner.pem"#' .config
|
||||||
|
sed -i 's/CONFIG_LOCALVERSION=""/CONFIG_LOCALVERSION="-%{kernel_release}"/' .config
|
||||||
|
|
||||||
|
%build
|
||||||
|
# Building cumulative patch.
|
||||||
|
all_patches_file=all.patch
|
||||||
|
for patch in %{patches}
|
||||||
|
do
|
||||||
|
[[ "$patch" == *.patch ]] && cat "$patch" >> $all_patches_file
|
||||||
|
done
|
||||||
|
|
||||||
|
if ! kpatch-build -ddd \
|
||||||
|
--sourcedir . \
|
||||||
|
--vmlinux %{_libdir}/debug/lib/modules/%{kernel_version_release}/vmlinux \
|
||||||
|
--name %{livepatch_name} \
|
||||||
|
$all_patches_file
|
||||||
|
then
|
||||||
|
echo "ERROR: failed to build livepatch module. Logs from '%{kpatch_logs_file}':" >&2
|
||||||
|
cat "%{kpatch_logs_file}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -dm 755 %{buildroot}%{livepatch_install_dir}
|
||||||
|
install -m 744 %{livepatch_module_name} %{buildroot}%{livepatch_module_path}
|
||||||
|
|
||||||
|
%post
|
||||||
|
%load_if_should
|
||||||
|
%install_if_should
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%uninstall_if_should
|
||||||
|
%unload_if_should
|
||||||
|
|
||||||
|
# Re-enable patch on rollbacks to supported kernel.
|
||||||
|
%triggerin -- kernel = %{kernel_version_release}
|
||||||
|
%load_if_should
|
||||||
|
%install_if_should
|
||||||
|
|
||||||
|
# Prevent the patch from being loaded after a reboot to a different kernel.
|
||||||
|
# Previous kernel is still running, do NOT unload the livepatch.
|
||||||
|
%triggerin -- kernel > %{kernel_version_release}, kernel < %{kernel_version_release}
|
||||||
|
%uninstall_if_should
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{livepatch_install_dir}
|
||||||
|
%{livepatch_module_path}
|
||||||
|
|
||||||
|
# else builds_module
|
||||||
|
%else
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
%description
|
||||||
|
Empty package enabling subscription to future kernel livepatches
|
||||||
|
addressing CVEs present in Mariner's %{kernel_version_release} kernel.
|
||||||
|
|
||||||
|
%files
|
||||||
|
|
||||||
|
# endif builds_module
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 10 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.0.0-1
|
||||||
|
- Original version for CBL-Mariner.
|
||||||
|
- License verified.
|
|
@ -0,0 +1,29 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFBjCCA+6gAwIBAgITMwAABO5/lN6NQyelHwABAAAE7jANBgkqhkiG9w0B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WMBQGA1UEBRMNNDYwODk3KzQ2ODU5NzAf
|
||||||
|
BgNVHSMEGDAWgBS/ZaKrb3WjTkWWVwXPOYf0wBUcHDBcBgNVHR8EVTBTMFGgT6BN
|
||||||
|
hktodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNyb3NvZnQl
|
||||||
|
MjBUZXN0aW5nJTIwUENBJTIwMjAxMCgxKS5jcmwwaQYIKwYBBQUHAQEEXTBbMFkG
|
||||||
|
CCsGAQUFBzAChk1odHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NlcnRz
|
||||||
|
L01pY3Jvc29mdCUyMFRlc3RpbmclMjBQQ0ElMjAyMDEwKDEpLmNydDAMBgNVHRMB
|
||||||
|
Af8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCybuv6kmhT2y97FOLRljLCLvQlBL/E
|
||||||
|
dxKPDYNFhHCKIUd550yUoUW8XIxSYa+Dmx/1+NYS4Nxql7ecuR4g9+4i0DOmNjYO
|
||||||
|
NY8epPspIpjUd9OAiKNKJSs2303i2TQojXQcZVeTO89bK3pX+spoACGuEVEuWSdL
|
||||||
|
q+oPDYZwNTKyobj9wHYO6WXJfcdLPlYZghDjR/WNO5bzvzpi2nn/c4OYvMihLNq0
|
||||||
|
5uNO0IB/zquyAaCKbi15v/PqYos1BsT+Yft4zf8ry17yFVBIqJMa2An6Gex7SNWj
|
||||||
|
jj1S7uBga3oZcTHvR8xv3fmbwfQMIrZRmZrq8xkySxQV7xea0sE7X/pJ
|
||||||
|
-----END CERTIFICATE-----
|
|
@ -1,7 +1,7 @@
|
||||||
Summary: CBL-Mariner release files
|
Summary: CBL-Mariner release files
|
||||||
Name: mariner-release
|
Name: mariner-release
|
||||||
Version: 2.0
|
Version: 2.0
|
||||||
Release: 47%{?dist}
|
Release: 48%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Vendor: Microsoft Corporation
|
Vendor: Microsoft Corporation
|
||||||
Distribution: Mariner
|
Distribution: Mariner
|
||||||
|
@ -62,6 +62,9 @@ EOF
|
||||||
%config(noreplace) %{_sysconfdir}/issue.net
|
%config(noreplace) %{_sysconfdir}/issue.net
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 10 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 2.0-48
|
||||||
|
- Bump release for August 2023 Release 2
|
||||||
|
|
||||||
* Thu Aug 10 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 2.0-47
|
* Thu Aug 10 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 2.0-47
|
||||||
- Bump release for August 2023 Update 2
|
- Bump release for August 2023 Update 2
|
||||||
|
|
||||||
|
|
|
@ -12046,6 +12046,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"component": {
|
||||||
|
"type": "other",
|
||||||
|
"other": {
|
||||||
|
"name": "livepatch-5.15.125.1-2.cm2",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"downloadUrl": "https://github.com/microsoft/CBL-Mariner-Linux-Kernel/archive/rolling-lts/mariner-2/5.15.125.1.tar.gz"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"component": {
|
"component": {
|
||||||
"type": "other",
|
"type": "other",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче