Rebase to include the SBAT metadata section to allow fixing BootHole
This commit is contained in:
parent
30210d6fcf
commit
9bc86795c9
1
.gitignore
vendored
1
.gitignore
vendored
@ -74,3 +74,4 @@
|
||||
/fwupd-1.5.3.tar.xz
|
||||
/fwupd-1.5.4.tar.xz
|
||||
/fwupd-1.5.5.tar.xz
|
||||
/fwupd-1.5.9.tar.xz
|
||||
|
@ -6,21 +6,30 @@ Date: Fri Apr 9 15:20:13 2021 +0100
|
||||
|
||||
This allows us to drop a build-time dep.
|
||||
|
||||
diff --git a/po/make-images b/po/make-images
|
||||
index b1097bc2..c3cad9e7 100755
|
||||
--- a/po/make-images
|
||||
+++ b/po/make-images
|
||||
@@ -18,7 +18,6 @@ import gi
|
||||
gi.require_version('Pango', '1.0')
|
||||
gi.require_version('PangoCairo', '1.0')
|
||||
diff --git a/plugins/uefi-capsule/make-images.py b/plugins/uefi-capsule/make-images.py
|
||||
index f1b00b8d..1d15bcf3 100755
|
||||
--- a/plugins/uefi-capsule/make-images.py
|
||||
+++ b/plugins/uefi-capsule/make-images.py
|
||||
@@ -16,6 +16,8 @@ import argparse
|
||||
import tarfile
|
||||
import math
|
||||
import io
|
||||
+import struct
|
||||
+
|
||||
from typing import Dict, Optional, Any
|
||||
|
||||
import cairo
|
||||
@@ -24,7 +26,6 @@ import gi
|
||||
gi.require_version("Pango", "1.0")
|
||||
gi.require_version("PangoCairo", "1.0")
|
||||
from gi.repository import Pango, PangoCairo
|
||||
-from PIL import Image
|
||||
|
||||
def usage(return_code):
|
||||
""" print usage and exit with the supplied return code """
|
||||
@@ -29,6 +28,32 @@ def usage(return_code):
|
||||
out.write("usage: make-images <label text> <mo file directory> <LINGUAS> <installdir>")
|
||||
sys.exit(return_code)
|
||||
|
||||
def languages(podir: str):
|
||||
@@ -60,6 +61,33 @@ class PotFile:
|
||||
continue
|
||||
|
||||
|
||||
+def _cairo_surface_write_to_bmp(img: cairo.ImageSurface) -> bytes:
|
||||
+
|
||||
@ -48,23 +57,39 @@ index b1097bc2..c3cad9e7 100755
|
||||
+ + data
|
||||
+ )
|
||||
+
|
||||
class Rasterizer:
|
||||
""" Rasterize some text """
|
||||
+
|
||||
def main(args) -> int:
|
||||
|
||||
@@ -140,11 +165,8 @@ class Rasterizer:
|
||||
os.mkdir(d, 0o755)
|
||||
d = os.path.split(filename)[0]
|
||||
make_dir(d)
|
||||
- img.write_to_png(filename)
|
||||
- pimg = Image.open(filename)
|
||||
- img = pimg.copy()
|
||||
- del pimg
|
||||
- img.save(filename)
|
||||
+ with open(filename, "wb") as f:
|
||||
+ f.write(_cairo_surface_write_to_bmp(img))
|
||||
# open output archive
|
||||
@@ -164,20 +192,14 @@ def main(args) -> int:
|
||||
fs.foreach(do_write, None)
|
||||
img.flush()
|
||||
|
||||
for lang in self.languages:
|
||||
#print("lang:\"%s\" string:\"%s\"" % (lang, string))
|
||||
- # write PNG
|
||||
- with io.BytesIO() as io_png:
|
||||
- img.write_to_png(io_png)
|
||||
- io_png.seek(0)
|
||||
-
|
||||
- # convert to BMP and add to archive
|
||||
- with io.BytesIO() as io_bmp:
|
||||
- pimg = Image.open(io_png)
|
||||
- pimg.save(io_bmp, format="BMP")
|
||||
- filename = "fwupd-{}-{}-{}.bmp".format(lang, width, height)
|
||||
- tarinfo = tarfile.TarInfo(filename)
|
||||
- tarinfo.size = io_bmp.tell()
|
||||
- io_bmp.seek(0)
|
||||
- tar.addfile(tarinfo, fileobj=io_bmp)
|
||||
+ # convert to BMP and add to archive
|
||||
+ with io.BytesIO() as io_bmp:
|
||||
+ io_bmp.write(_cairo_surface_write_to_bmp(img))
|
||||
+ filename = "fwupd-{}-{}-{}.bmp".format(lang, width, height)
|
||||
+ tarinfo = tarfile.TarInfo(filename)
|
||||
+ tarinfo.size = io_bmp.tell()
|
||||
+ io_bmp.seek(0)
|
||||
+ tar.addfile(tarinfo, fileobj=io_bmp)
|
||||
|
||||
# success
|
||||
return 0
|
||||
diff --git a/po/test-deps b/po/test-deps
|
||||
index f5276daa..27b4055b 100755
|
||||
--- a/po/test-deps
|
||||
|
39
fwupd.spec
39
fwupd.spec
@ -43,8 +43,8 @@
|
||||
|
||||
Summary: Firmware update daemon
|
||||
Name: fwupd
|
||||
Version: 1.5.5
|
||||
Release: 4%{?dist}
|
||||
Version: 1.5.9
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/fwupd/fwupd
|
||||
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
|
||||
@ -179,7 +179,6 @@ can be flashed using flashrom. It is probably not required on servers.
|
||||
|
||||
%meson \
|
||||
-Dgtkdoc=true \
|
||||
-Dsupported_build=true \
|
||||
%if 0%{?enable_tests}
|
||||
-Dtests=true \
|
||||
%else
|
||||
@ -204,18 +203,23 @@ can be flashed using flashrom. It is probably not required on servers.
|
||||
%if 0%{?have_uefi}
|
||||
-Dplugin_uefi_capsule=true \
|
||||
-Dplugin_uefi_pk=true \
|
||||
-Dtpm=true \
|
||||
-Defi_sbat_distro_id="rhel" \
|
||||
-Defi_sbat_distro_summary="Red Hat Enterprise Linux" \
|
||||
-Defi_sbat_distro_pkgname="%{name}" \
|
||||
-Defi_sbat_distro_version="%{version}" \
|
||||
-Defi_sbat_distro_url="mail:secalert@redhat.com" \
|
||||
-Dplugin_tpm=true \
|
||||
%else
|
||||
-Dplugin_uefi_capsule=false \
|
||||
-Dplugin_uefi_pk=false \
|
||||
-Dtpm=false \
|
||||
-Dplugin_tpm=false \
|
||||
%endif
|
||||
%if 0%{?have_dell}
|
||||
-Dplugin_dell=true \
|
||||
-Dplugin_synaptics=true \
|
||||
-Dplugin_synaptics_mst=true \
|
||||
%else
|
||||
-Dplugin_dell=false \
|
||||
-Dplugin_synaptics=false \
|
||||
-Dplugin_synaptics_mst=false \
|
||||
%endif
|
||||
%if 0%{?have_modem_manager}
|
||||
-Dplugin_modem_manager=true \
|
||||
@ -223,6 +227,7 @@ can be flashed using flashrom. It is probably not required on servers.
|
||||
-Dplugin_modem_manager=false \
|
||||
%endif
|
||||
-Dman=true \
|
||||
-Dbluez=false \
|
||||
-Dsupported_build=true
|
||||
|
||||
%meson_build
|
||||
@ -261,8 +266,10 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/fwupd
|
||||
%systemd_post fwupd.service
|
||||
|
||||
# change vendor-installed remotes to use the default keyring type
|
||||
for fn in /etc/fwupd/remotes.d/*.conf;
|
||||
do sed -i 's/Keyring=gpg/#Keyring=pkcs/g' "$fn";
|
||||
for fn in /etc/fwupd/remotes.d/*.conf; do
|
||||
if grep -q "Keyring=gpg" "$fn"; then
|
||||
sed -i 's/Keyring=gpg/#Keyring=pkcs/g' "$fn";
|
||||
fi
|
||||
done
|
||||
|
||||
%preun
|
||||
@ -371,9 +378,7 @@ done
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_bcm57xx.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_ccgx.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_colorhug.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_coreboot.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_cros_ec.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_csr.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_cpu.so
|
||||
%if 0%{?have_dell}
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_dell.so
|
||||
@ -381,6 +386,7 @@ done
|
||||
%endif
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_dell_dock.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_dfu.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_dfu_csr.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_ebitdo.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_elantp.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_emmc.so
|
||||
@ -415,6 +421,7 @@ done
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_synaptics_cxaudio.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_synaptics_prometheus.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_synaptics_rmi.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_system76_launch.so
|
||||
%if 0%{?enable_dummy}
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_test.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_invalid.so
|
||||
@ -438,9 +445,6 @@ done
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_wacom_usb.so
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_goodixmoc.so
|
||||
%ghost %{_localstatedir}/lib/fwupd/gnupg
|
||||
%if 0%{?have_uefi}
|
||||
%{_datadir}/locale/*/LC_IMAGES/fwupd*
|
||||
%endif
|
||||
|
||||
%if 0%{?have_modem_manager}
|
||||
%files plugin-modem-manager
|
||||
@ -450,6 +454,9 @@ done
|
||||
%files plugin-flashrom
|
||||
%{_libdir}/fwupd-plugins-3/libfu_plugin_flashrom.so
|
||||
%endif
|
||||
%if 0%{?have_uefi}
|
||||
%{_datadir}/fwupd/uefi-capsule-ux.tar.xz
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%{_datadir}/gir-1.0/Fwupd-2.0.gir
|
||||
@ -474,6 +481,10 @@ done
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Apr 19 2021 Richard Hughes <richard@hughsie.com> 1.5.9-1
|
||||
- Rebase to include the SBAT metadata section to allow fixing BootHole
|
||||
- Resolves: rhbz#1951030
|
||||
|
||||
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.5-4
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (fwupd-1.5.5.tar.xz) = 82965428d215f67736ce800cad6711ecc86a042772f4b05da9364c8a37bcc6101efc5c115ff7509c50118e9de2d2269c44ec3765795a36d5d5c1b1e779d9e70c
|
||||
SHA512 (fwupd-1.5.9.tar.xz) = 1d22bb9759bb0fa6a9030c83b3372ffd02f812c34e4d60f83cbacf5793d68dd846b353a3f127eccfb8f2cdcd329ba09320465cd2f0fe422dea13738e5b0b47ed
|
||||
|
Loading…
Reference in New Issue
Block a user