package/python-pefile: new host package
PATCH v4 1/6 package/python-pefile: new host package
--- package/python-pefile/python-pefile.hash | 5 +++++ package/python-pefile/python-pefile.mk | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 package/python-pefile/python-pefile.hash create mode 100644 package/python-pefile/python-pefile.mk
package/python-pefile/python-pefile.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pefile/json +md5 fa0eba7c91f4e696771ddbfacdca25e4 pefile-2023.2.7.tar.gz +sha256 82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc pefile-2023.2.7.tar.gz +# Locally computed sha256 checksums +sha256 bfd4b5e4f8a99c961fd6f94d708e38396cc146bfe8fbc5d2a86e63aa29fb4208 LICENSE
package/python-pefile/python-pefile.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-pefile +# +################################################################################ + +PYTHON_PEFILE_VERSION = 2023.2.7 +PYTHON_PEFILE_SOURCE = pefile-$(PYTHON_PEFILE_VERSION).tar.gz +PYTHON_PEFILE_SITE = https://files.pythonhosted.org/packages/78/c5/3b3c62223f72e2360737fd2a57c30e5b2adecd85e70276879609a7403334 +PYTHON_PEFILE_SETUP_TYPE = setuptools +PYTHON_PEFILE_LICENSE = MIT +PYTHON_PEFILE_LICENSE_FILES = LICENSE + +$(eval $(host-python-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 2/6 package/python-cbor2: enable host build
This will be required for the upcoming python-uswid package.
Disable c extensions for host package to speed up build.
--- package/python-cbor2/python-cbor2.mk | 3 +++ 1 file changed, 3 insertions(+)
package/python-cbor2/python-cbor2.mk +3 -0
@@ -12,5 +12,8 @@ PYTHON_CBOR2_LICENSE = MIT PYTHON_CBOR2_LICENSE_FILES = LICENSE.txt PYTHON_CBOR2_DEPENDENCIES = host-python-setuptools-scm PYTHON_CBOR2_ENV = CBOR2_BUILD_C_EXTENSION=1 +HOST_PYTHON_CBOR2_DEPENDENCIES = host-python-setuptools-scm +HOST_PYTHON_CBOR2_ENV = CBOR2_BUILD_C_EXTENSION=0 $(eval $(python-package)) +$(eval $(host-python-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 3/6 package/python3: add option to support lzma/xz in host-python
In reply to James HilliardThis will be needed by the upcoming host-python-uswid package.
--- package/python3/Config.in.host | 5 +++++ package/python3/python3.mk | 6 ++++++ 2 files changed, 11 insertions(+)
package/python3/Config.in.host +5 -0
@@ -12,6 +12,11 @@ config BR2_PACKAGE_HOST_PYTHON3_BZIP2 help bz2 module for host Python3. +config BR2_PACKAGE_HOST_PYTHON3_XZ + bool "xz" + help + xz (a.k.a lzma) module for host Python3 + config BR2_PACKAGE_HOST_PYTHON3_CURSES bool "curses" help
package/python3/python3.mk +6 -0
@@ -57,6 +57,12 @@ else HOST_PYTHON3_CONF_ENV += py_cv_module__bz2=n/a endif +ifeq ($(BR2_PACKAGE_HOST_PYTHON3_XZ),y) +HOST_PYTHON3_DEPENDENCIES += host-xz +else +HOST_PYTHON3_CONF_ENV += py_cv_module__lzma=n/a +endif + ifeq ($(BR2_PACKAGE_HOST_PYTHON3_CURSES),y) HOST_PYTHON3_DEPENDENCIES += host-ncurses else
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 4/6 package/python-uswid: new host package
In reply to James Hilliard---
Changes v3 -> v4:
- add host python3 xz dependency
--- package/Config.in.host | 1 + package/python-uswid/Config.in.host | 8 ++++++++ package/python-uswid/python-uswid.hash | 5 +++++ package/python-uswid/python-uswid.mk | 18 ++++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 package/python-uswid/Config.in.host create mode 100644 package/python-uswid/python-uswid.hash create mode 100644 package/python-uswid/python-uswid.mk
package/Config.in.host +1 -0
@@ -89,6 +89,7 @@ menu "Host utilities" source "package/python-lxml/Config.in.host" source "package/python-pyyaml/Config.in.host" source "package/python-six/Config.in.host" + source "package/python-uswid/Config.in.host" source "package/python-xlrd/Config.in.host" source "package/python3/Config.in.host" source "package/qemu/Config.in.host"
package/python-uswid/Config.in.host new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_PYTHON_USWID + bool "host python-uswid" + select BR2_PACKAGE_HOST_PYTHON3 + select BR2_PACKAGE_HOST_PYTHON3_XZ + help + A tiny tool for embedding CoSWID tags in EFI binaries. + + https://github.com/hughsie/python-uswid
package/python-uswid/python-uswid.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/uswid/json +md5 e43ff6d49ddcda0c95338d3271694b91 uswid-0.5.0.tar.gz +sha256 bdcd7ee5afac1da60ee688c357aa12f5f8d74bc28012446b10e2b4a9cf52fc6d uswid-0.5.0.tar.gz +# Locally computed sha256 checksums +sha256 98bc07f3fb70d05b01ff740e8191b9f29c080159f01588991fbd872c611236f9 LICENSE
package/python-uswid/python-uswid.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# python-uswid +# +################################################################################ + +PYTHON_USWID_VERSION = 0.5.0 +PYTHON_USWID_SOURCE = uswid-$(PYTHON_USWID_VERSION).tar.gz +PYTHON_USWID_SITE = https://files.pythonhosted.org/packages/dc/bf/05291df12037befeacda2083c798e98691043978e07ca4a00b4eb94aeb61 +PYTHON_USWID_SETUP_TYPE = setuptools +PYTHON_USWID_LICENSE = BSD-2-Clause-Patent +PYTHON_USWID_LICENSE_FILES = LICENSE +HOST_PYTHON_USWID_DEPENDENCIES = \ + host-python-cbor2 \ + host-python-lxml \ + host-python-pefile + +$(eval $(host-python-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 5/6 package/fwupd-efi: new package
In reply to James HilliardBackport some patches fixing the python shebang and allowing one to disable the use of genpeimg since we use host-python-pefile.
---
Changes v3 -> v4:
- select BR2_PACKAGE_HOST_PYTHON_USWID
Changes v2 -> v3:
- add python shebang fix
- disable genpeimg binary usage
- set objcopy path
- add host-python-pefile host-python-uswid deps
Changes v1 -> v2:
- use gitlab for efi_sbat_distro_url
--- DEVELOPERS | 1 + package/Config.in | 1 + ...disabling-the-use-of-genpeimg-binary.patch | 41 ++++++++ ...-shebang-paths-and-add-python-option.patch | 95 +++++++++++++++++++ package/fwupd-efi/Config.in | 9 ++ package/fwupd-efi/fwupd-efi.hash | 3 + package/fwupd-efi/fwupd-efi.mk | 28 ++++++ 7 files changed, 178 insertions(+) create mode 100644 package/fwupd-efi/0001-Allow-enabling-disabling-the-use-of-genpeimg-binary.patch create mode 100644 package/fwupd-efi/0002-Fix-python3-shebang-paths-and-add-python-option.patch create mode 100644 package/fwupd-efi/Config.in create mode 100644 package/fwupd-efi/fwupd-efi.hash create mode 100644 package/fwupd-efi/fwupd-efi.mk
DEVELOPERS +1 -0
@@ -1489,6 +1489,7 @@ F: package/apcupsd/ F: package/bpftool/ F: package/cloudflared/ F: package/exfatprogs/ +F: package/fwupd-efi/ F: package/fxdiv/ F: package/gensio/ F: package/lua-std-debug/
package/Config.in +1 -0
@@ -520,6 +520,7 @@ endmenu source "package/fmtools/Config.in" source "package/freeipmi/Config.in" source "package/freescale-imx/Config.in" + source "package/fwupd-efi/Config.in" source "package/fxload/Config.in" source "package/gcnano-binaries/Config.in" source "package/gpm/Config.in"
package/fwupd-efi/0001-Allow-enabling-disabling-the-use-of-genpeimg-binary.patch new file +41 -0
41 lines not on this page · raw message
package/fwupd-efi/0002-Fix-python3-shebang-paths-and-add-python-option.patch new file +95 -0
95 lines not on this page · raw message
package/fwupd-efi/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_FWUPD_EFI + bool "fwupd-efi" + depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS + select BR2_PACKAGE_GNU_EFI + select BR2_PACKAGE_HOST_PYTHON_USWID + help + EFI Application used by uefi-capsule plugin in fwupd. + + https://github.com/fwupd/fwupd-efi
package/fwupd-efi/fwupd-efi.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 afd0805a2ad081a7caff2ef5bc004ce3a0147b538015e8eca966341716b1260e fwupd-efi-1.6.tar.xz +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING
package/fwupd-efi/fwupd-efi.mk new file +28 -0
@@ -0,0 +1,28 @@ +################################################################################ +# +# fwupd-efi +# +################################################################################ + +FWUPD_EFI_VERSION = 1.6 +FWUPD_EFI_SITE = https://github.com/fwupd/fwupd-efi/releases/download/$(FWUPD_EFI_VERSION) +FWUPD_EFI_SOURCE = fwupd-efi-$(FWUPD_EFI_VERSION).tar.xz +FWUPD_EFI_LICENSE = LGPL-2.1+ +FWUPD_EFI_LICENSE_FILES = COPYING +FWUPD_EFI_INSTALL_STAGING = YES +FWUPD_EFI_DEPENDENCIES = host-python-pefile host-python-uswid gnu-efi +FWUPD_EFI_CONF_OPTS = \ + -Defi-libdir=$(STAGING_DIR)/usr/lib \ + -Defi-ldsdir=$(STAGING_DIR)/usr/lib \ + -Defi-includedir=$(STAGING_DIR)/usr/include/efi \ + -Defi_sbat_fwupd_generation=1 \ + -Defi_sbat_distro_id=buildroot \ + -Defi_sbat_distro_summary=Buildroot \ + -Defi_sbat_distro_pkgname=fwupd-efi \ + -Defi_sbat_distro_version=fwupd-efi-$(FWUPD_EFI_VERSION) \ + -Defi_sbat_distro_url=https://gitlab.com/buildroot.org/buildroot/-/tree/master/package/fwupd-efi \ + -Dgenpeimg=disabled \ + -Dpython="$(HOST_DIR)/bin/python3" +FWUPD_EFI_MESON_EXTRA_BINARIES = objcopy='$(TARGET_OBJCOPY)' + +$(eval $(meson-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 6/6 package/fwupd: new package
In reply to James Hilliard---
Changes v3 -> v4:
- add patch removing udevdir requirement
Changes v2 -> v3:
- set udevdir so that we don't need to depend on udev
- add missing host-python-jinja2 build dependency
- only set -Doffline=enabled when systemd is enabled
--- DEVELOPERS | 1 + package/Config.in | 1 + ...devdir-when-gudev-support-is-enabled.patch | 35 +++ package/fwupd/Config.in | 19 ++ package/fwupd/fwupd.hash | 3 + package/fwupd/fwupd.mk | 208 ++++++++++++++++++ 6 files changed, 267 insertions(+) create mode 100644 package/fwupd/0001-Only-require-udevdir-when-gudev-support-is-enabled.patch create mode 100644 package/fwupd/Config.in create mode 100644 package/fwupd/fwupd.hash create mode 100644 package/fwupd/fwupd.mk
DEVELOPERS +1 -0
@@ -1489,6 +1489,7 @@ F: package/apcupsd/ F: package/bpftool/ F: package/cloudflared/ F: package/exfatprogs/ +F: package/fwupd/ F: package/fwupd-efi/ F: package/fxdiv/ F: package/gensio/
package/Config.in +1 -0
@@ -520,6 +520,7 @@ endmenu source "package/fmtools/Config.in" source "package/freeipmi/Config.in" source "package/freescale-imx/Config.in" + source "package/fwupd/Config.in" source "package/fwupd-efi/Config.in" source "package/fxload/Config.in" source "package/gcnano-binaries/Config.in"
package/fwupd/0001-Only-require-udevdir-when-gudev-support-is-enabled.patch new file +35 -0
@@ -0,0 +1,35 @@ +From a784ef9b904778b511a6284f46d983906939de6c Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 18 Jul 2024 09:44:15 -0600 +Subject: [PATCH] Only require udevdir when gudev support is enabled + +Signed-off-by: James Hilliard <[email protected]> +Upstream: https://github.com/fwupd/fwupd/commit/a784ef9b904778b511a6284f46d983906939de6c +--- + meson.build | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/meson.build b/meson.build +index 22282d73e..f49d08d29 100644 +--- a/meson.build ++++ b/meson.build +@@ -273,10 +273,12 @@ if build_daemon + if not polkit.found() + warning('Polkit is disabled, the daemon will allow ALL client actions') + endif +- udevdir = get_option('udevdir') +- if udevdir == '' and host_machine.system() == 'linux' +- udev = dependency('udev') +- udevdir = udev.get_variable(pkgconfig: 'udevdir') ++ if gudev.found() ++ udevdir = get_option('udevdir') ++ if udevdir == '' and host_machine.system() == 'linux' ++ udev = dependency('udev') ++ udevdir = udev.get_variable(pkgconfig: 'udevdir') ++ endif + endif + endif + libm = cc.find_library('m', required: false) +-- +2.34.1 +
package/fwupd/Config.in new file +19 -0
@@ -0,0 +1,19 @@ +config BR2_PACKAGE_FWUPD + bool "fwupd" + depends on !BR2_STATIC_LIBS # libxmlb + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBJCAT + select BR2_PACKAGE_LIBXMLB + select BR2_PACKAGE_ZLIB + help + Fwupd is a simple daemon to allow session software + to update device firmware on your local machine. + + https://fwupd.org/ + +comment "fwupd needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/fwupd/fwupd.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 b86a2d7fe1b6cc0ac4f75f3351a78cb3c225880c9e20b932fa078ef472e9fcb2 fwupd-1.9.20.tar.xz +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING
package/fwupd/fwupd.mk new file +208 -0
208 lines not on this page · raw message
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 7 lines · On Fri, 19 Jul 2024 00:32:30 -0600 James Hilliard <[email protected]>…
Signed-off-by James Hilliard <[email protected]>--- package/python-pefile/python-pefile.hash | 5 +++++ package/python-pefile/python-pefile.mk | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 package/python-pefile/python-pefile.hash create mode 100644 package/python-pefile/python-pefile.mk
Thanks a lot, series applied!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot