diff mbox series

[8/8] package/opkg: add sha256sum support

Message ID 20231023092501.481436-8-adam.duskett@amarulasolutions.com
State Accepted
Headers show
Series [1/8] package/opkg: bump version to 0.6.2 | expand

Commit Message

Adam Duskett Oct. 23, 2023, 9:25 a.m. UTC
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
 package/opkg/Config.in | 5 +++++
 package/opkg/opkg.mk   | 6 ++++++
 2 files changed, 11 insertions(+)

Comments

Yann E. MORIN Oct. 23, 2023, 5:26 p.m. UTC | #1
Adam, All,

On 2023-10-23 11:25 +0200, Adam Duskett spake thusly:
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
>  package/opkg/Config.in | 5 +++++
>  package/opkg/opkg.mk   | 6 ++++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/package/opkg/Config.in b/package/opkg/Config.in
> index adf39ca145..0104f48623 100644
> --- a/package/opkg/Config.in
> +++ b/package/opkg/Config.in
> @@ -36,6 +36,11 @@ config BR2_PACKAGE_OPKG_GPG_SIGN
>  	  Enable opkg package signature checking support using
>  	  gnupg/libgpgme.
>  
> +config BR2_PACKAGE_OPKG_SHA256
> +	bool "sha256sum check support"
> +	help
> +	  Enable sha256sum check

There is no reason to make that conditional: the code size increase is
minor, sha1 adn md5 are broken so sha256 is the smallest hash still not
broken, and it has no depenency; so I made it unconditional.

Applied to master, thanks.

Regards,
Yann E. MORIN.

>  comment "compression support"
>  
>  config BR2_PACKAGE_OPKG_BZIP2
> diff --git a/package/opkg/opkg.mk b/package/opkg/opkg.mk
> index 730aa4cfe7..ce0b74f549 100644
> --- a/package/opkg/opkg.mk
> +++ b/package/opkg/opkg.mk
> @@ -38,6 +38,12 @@ else
>  OPKG_CONF_OPTS += --disable-gpg
>  endif
>  
> +ifeq ($(BR2_PACKAGE_OPKG_SHA256),y)
> +OPKG_CONF_OPTS += --enable-sha256
> +else
> +OPKG_CONF_OPTS += --disable-sha256
> +endif
> +
>  ifeq ($(BR2_PACKAGE_OPKG_BZIP2),y)
>  OPKG_DEPENDENCIES += bzip2
>  OPKG_CONF_OPTS += --enable-bzip2
> -- 
> 2.41.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/opkg/Config.in b/package/opkg/Config.in
index adf39ca145..0104f48623 100644
--- a/package/opkg/Config.in
+++ b/package/opkg/Config.in
@@ -36,6 +36,11 @@  config BR2_PACKAGE_OPKG_GPG_SIGN
 	  Enable opkg package signature checking support using
 	  gnupg/libgpgme.
 
+config BR2_PACKAGE_OPKG_SHA256
+	bool "sha256sum check support"
+	help
+	  Enable sha256sum check
+
 comment "compression support"
 
 config BR2_PACKAGE_OPKG_BZIP2
diff --git a/package/opkg/opkg.mk b/package/opkg/opkg.mk
index 730aa4cfe7..ce0b74f549 100644
--- a/package/opkg/opkg.mk
+++ b/package/opkg/opkg.mk
@@ -38,6 +38,12 @@  else
 OPKG_CONF_OPTS += --disable-gpg
 endif
 
+ifeq ($(BR2_PACKAGE_OPKG_SHA256),y)
+OPKG_CONF_OPTS += --enable-sha256
+else
+OPKG_CONF_OPTS += --disable-sha256
+endif
+
 ifeq ($(BR2_PACKAGE_OPKG_BZIP2),y)
 OPKG_DEPENDENCIES += bzip2
 OPKG_CONF_OPTS += --enable-bzip2