[elbe-devel] [PATCH 09/11] elbexml: Also save sha256 sums in fullpkgslist

Holger Dengler dengler at linutronix.de
Mon Mar 14 15:20:06 CET 2022


On 14.03.22 14:48, Torben Hohn wrote:
> Since buster, sha256 checksums in package indices are mandatory
> and md5 sums are only optional.
> On security.debian.org md5 sums are already dropped for bullseye.
> This breaks the fullpackagelist validation.
> 
> Prepare to validate sha256 sums and save the sha256 sums into the
> fullpkgslist.
> 
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>

Reviewed-by: Holger Dengler <dengler at linutronix.de>

> ---
>  elbepack/elbexml.py | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
> index 50be33346..d3f8fef91 100644
> --- a/elbepack/elbexml.py
> +++ b/elbepack/elbexml.py
> @@ -399,11 +399,15 @@ class ElbeXML:
>          pak.et.tail = '\n'
>          if aptpkg.installed_version is not None:
>              pak.et.set('version', aptpkg.installed_version)
> -            pak.et.set('md5', aptpkg.installed_md5)
> +            if aptpkg.installed_md5:
> +                pak.et.set('md5', aptpkg.installed_md5)
> +            pak.et.set('sha256', aptpkg.installed_sha256)
>              pak.et.set('prio', aptpkg.installed_prio)
>          else:
>              pak.et.set('version', aptpkg.candidate_version)
> -            pak.et.set('md5', aptpkg.candidate_md5)
> +            if aptpkg.candidate_md5:
> +                pak.et.set('md5', aptpkg.candidate_md5)
> +            pak.et.set('sha256', aptpkg.candidate_sha256)
>              pak.et.set('prio', aptpkg.candidate_prio)
>  
>          if aptpkg.is_auto_installed:

-- 
Mit freundlichen Grüßen/Kind regards,
Holger Dengler
--
Holger Dengler
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 14; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz (Informations on data privacy):
https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH
Firmensitz (Registered Office): Uhldingen-Mühlhofen
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 806
Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20220314/5f6cf78d/attachment.sig>


More information about the elbe-devel mailing list