[MCOL-5595] Wrong metadata in CMAPI packages Created: 2023-10-20  Updated: 2023-11-21  Resolved: 2023-11-17

Status: Closed
Project: MariaDB ColumnStore
Component/s: installation
Affects Version/s: None
Fix Version/s: 23.10.1

Type: Bug Priority: Major
Reporter: Alan Mologorsky Assignee: Alan Mologorsky
Resolution: Fixed Votes: 0
Labels: cmapi, packaging

Sprint: 2023-11
Assigned for Testing: Kirill Perov Kirill Perov

 Description   

Sync Version metadata of CMAPI Packages with MCS packages.

Info from dbart below.
Even though the filenames for the package have a unique version string, the internal metadata has the version string for all of the cmapi deb packages set to just 23.10.0 .
Here's the full metadata from one of the cmapi packages:

release@buildbot-primary:~$ dpkg -I ./mariadb-columnstore-cmapi_10.6.15.10-23.10.0+maria~ubu2204_amd64.deb
 new Debian package, version 2.0.
 size 80201320 bytes: control archive=358563 bytes.
      35 bytes,     1 lines      conffiles            
     375 bytes,    12 lines      control              
 1466950 bytes, 13172 lines      md5sums              
     819 bytes,    16 lines   *  postinst             #!/usr/bin/env
     254 bytes,     9 lines   *  prerm                #!/usr/bin/env
 Architecture: amd64
 Depends: curl
 Description: MariaDB ColumnStore CMAPI: cluster management API and command line tool.
  MariaDB ColumnStore CMAPI: cluster management API and command line tool.
 Maintainer: MariaDB Corporation Ab
 Package: mariadb-columnstore-cmapi
 Priority: optional
 Replaces: mariadb-columnstore-cmapi
 Section: devel
 Version: 23.10.0
 Installed-Size: 332271

The lines the repository manager cares about (for this issue anyway) are Package:, Version:, and Architecture: and as long as the combination of those are unique, it doesn't have a problem with multiple cmapi 23.10.0 packages all living together in the repository. But because they're all the same as far as their internal metadata is concerned it throws an error when I try to import more than one of them. e.g. I can import the ubu2204_amd64 one, but I can't import the ubu2004_amd64 one because the repository manager thinks they are the same package based on the metadata, even though they actually are not.
In the mariadb-plugin-columnstore deb packages, the version number is unique to each distro_arch combination. Here's the first part of the metadata from the ubu2204_amd64 deb:

release@buildbot-primary:~$ dpkg -I mariadb-plugin-columnstore_10.6.15.10-23.10.0+maria~ubu2204_amd64.deb
 new Debian package, version 2.0.
 size 8826724 bytes: control archive=4507 bytes.
     178 bytes,     5 lines      conffiles            
     992 bytes,    16 lines      control              
    7658 bytes,   113 lines      md5sums              
      78 bytes,     8 lines   *  postinst             #!/bin/bash
     544 bytes,    24 lines   *  postrm               #!/bin/bash
     325 bytes,    11 lines   *  preinst              #!/bin/bash
      50 bytes,     8 lines   *  prerm                #!/bin/bash
      26 bytes,     1 lines      triggers             
 Package: mariadb-plugin-columnstore
 Source: mariadb-10.6
 Version: 1:10.6.15.10-23.10.0+maria~ubu2204
 Architecture: amd64
 <snip>

So because the Version: line is unique and includes the distro that it is for, I can import all of the various mariadb-plugin-columnstore deb packages into the repository without any issues.



 Comments   
Comment by Roman [ 2023-11-01 ]

Plz review.

Comment by Kirill Perov [ 2023-11-14 ]

alan.mologorsky
I have checked cmapi debs from nightly develop, they have distro names in Version string.
For rpms, distro names are in Release string. Is it enough?

Comment by Kirill Perov [ 2023-11-15 ]

Cmapi rpms have same distro names storing as engine rpms.

Testing finished ok.

Generated at Thu Feb 08 02:59:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.