Bug 25979 - rpm bug fix: fix detecting zstd magic
Summary: rpm bug fix: fix detecting zstd magic
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks: 25992
  Show dependency treegraph
 
Reported: 2019-12-28 07:54 CET by Thierry Vignaud
Modified: 2020-01-07 22:21 CET (History)
4 users (show)

See Also:
Source RPM: rpm-4.14.2.1-13.mga7
CVE:
Status comment:


Attachments

Description Thierry Vignaud 2019-12-28 07:54:39 CET
Advisory:
========================
This update fixes detecting zstd magic thus enabling to switch mga8 to use zstd compressed metadata

========================

Updated packages in core/updates_testing:
========================
lib64rpm8-4.14.2.1-13.mga7
lib64rpmbuild8-4.14.2.1-13.mga7
lib64rpm-devel-4.14.2.1-13.mga7
lib64rpmsign8-4.14.2.1-13.mga7
python2-rpm-4.14.2.1-13.mga7
python3-rpm-4.14.2.1-13.mga7
rpm-4.14.2.1-13.mga7
rpm-apidocs-4.14.2.1-13.mga7.noarch.rpm
rpm-build-4.14.2.1-13.mga7
rpm-cron-4.14.2.1-13.mga7.noarch.rpm
rpm-plugin-ima-4.14.2.1-13.mga7
rpm-plugin-prioreset-4.14.2.1-13.mga7
rpm-plugin-syslog-4.14.2.1-13.mga7
rpm-plugin-systemd-inhibit-4.14.2.1-13.mga7
rpm-sign-4.14.2.1-13.mga7
Thierry Vignaud 2019-12-30 03:34:33 CET

Blocks: (none) => 25992

Comment 1 PC LX 2019-12-30 13:27:11 CET
Installed and tested without issue.

Tests included listing/verifying/querying installed packages and installing/updating/uninstalling packages.

----------------
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Updates Testing")
  lib64rpm8                      4.14.2.1     13.mga7       x86_64  
  perl-URPM                      5.23         1.mga7        x86_64  
  python2-rpm                    4.14.2.1     13.mga7       x86_64  
  python3-rpm                    4.14.2.1     13.mga7       x86_64  
  rpm                            4.14.2.1     13.mga7       x86_64  
  rpm-plugin-ima                 4.14.2.1     13.mga7       x86_64  
  rpm-plugin-syslog              4.14.2.1     13.mga7       x86_64  
  rpm-plugin-systemd-inhibit     4.14.2.1     13.mga7       x86_64  
389KB of disk space will be freed.
996KB of packages will be retrieved.
Proceed with the installation of the 8 packages? (Y/n) 
----------------

$ uname -a
Linux marte 5.4.6-desktop-2.mga7 #1 SMP Mon Dec 23 12:05:27 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -qa | grep -i rpm.*4.14 | sort
lib64rpm8-4.14.2.1-13.mga7
lib64rpmbuild8-4.14.2.1-12.1.mga7
lib64rpmsign8-4.14.2.1-12.1.mga7
python2-rpm-4.14.2.1-13.mga7
python3-rpm-4.14.2.1-13.mga7
rpm-4.14.2.1-13.mga7
rpm-plugin-ima-4.14.2.1-13.mga7
rpm-plugin-syslog-4.14.2.1-13.mga7
rpm-plugin-systemd-inhibit-4.14.2.1-13.mga7

CC: (none) => mageia

Comment 2 Thomas Andrews 2019-12-30 22:33:57 CET
Thierry, is there a zstd-compressed rpm that we can use to test this specifically, or are PC LX's tests sufficient for now?

CC: (none) => andrewsfarm

Comment 3 Thierry Vignaud 2019-12-31 10:43:55 CET
Well any recent rpm from cauldron might be used (rpm -Uvh --test)
But honestly, rpm supported those already.
The bug only affected urpmi when reading zstd compressed metadata.

You can test that by altering /bin/genhdlist2 to use zstd instead of xz (simple change or see my patch 1 or 2 weeks ago)

Then create a dummy medium with an updated task-obsolete or null package (bumped rel should do it):

1) bump rel & rebuild task-obsolete
2) run genhdlist2 in that dir
3) try urpmi.addmedia TEST path_of_this_medium
   It should fail
4) update to new rpm + new perl-URPM (see depending bug #25992)
5) try again adding the medium
   It should now works
Comment 4 Thomas Andrews 2020-01-05 16:45:04 CET
Thank you for responding, Thierry. Unfortunately, while I have picked up a lot the last few years, even that simple procedure is beyond my meager capabilities.

I'm going to send this and Bug 25992 along on the basis of PC LX's clean installs and tests. It doesn't appear to break anything currently used, and if the zstd support has a problem I'm sure it will show up quickly as Cauldron develops, at which point any needed changes will be passed along.

Validating. Advisory in Comment 0.

CC: (none) => sysadmin-bugs
Whiteboard: (none) => MGA7-64-OK
Keywords: (none) => validated_update

Comment 5 Thomas Backlund 2020-01-05 23:25:46 CET
dropping validation for now...

does this actually fix anything ?

# rpm -q rpm
rpm-4.14.2.1-12.1.mga7
# rpm -qp --qf "%{NAME}-%{VERSION}-%{RELEASE}: %{PAYLOADCOMPRESSOR} %{PAYLOADFLAGS}\n" /home/tmb/x86_64/wireguard-tools-1.0.20200102-1.mga8.x86_64.rpm 
wireguard-tools-1.0.20200102-1.mga8: zstd 19

# LANG=C rpm -ivh /home/tmb/x86_64/wireguard-tools-1.0.20200102-1.mga8.x86_64.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...

So our current rpm already detects and installs zstd packed rpms

Keywords: validated_update => feedback
CC: (none) => tmb

Comment 6 Thomas Backlund 2020-01-05 23:46:08 CET
And answering myself....

it's needed for perl-URPM update to work, as without it we get:

urpmi wireguard-tools
invalid line <(�/�h=>
problem reading synthesis for media "test"
Comment 7 Thierry Vignaud 2020-01-06 23:22:14 CET
Hence the "enabling to switch mga8 to use zstd compressed metadata" in comment #0 :-)
Comment 8 Thomas Backlund 2020-01-07 21:43:38 CET
validating again after the metadata tests

Keywords: feedback => advisory, validated_update

Comment 9 Mageia Robot 2020-01-07 22:21:10 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2020-0009.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.