[MDEV-22522] RPM packages have meaningless summary/description Created: 2020-05-10  Updated: 2021-11-24  Resolved: 2021-11-24

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform RedHat
Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.8.0, 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Bychko (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
Relates

 Description   

All MariaDB RPM packages (server, client, engines, etc.) have the same summary and description:

MariaDB: a very fast and robust SQL database server

which is not helpful at all, especially when it comes to not-so-obvious packages, like shared vs compat vs common or alike.

I am looking at 10.5 and didn't actually check that 10.1-10.4 have the same problem, but I suppose they do, so setting all of them as affected versions.



 Comments   
Comment by Alexey Bychko (Inactive) [ 2021-10-22 ]

CPACK_PACKAGE_DESCRIPTION_SUMMARY is used if no description is defined for package.
need to check debian descriptions and compare with rpm ones

Comment by Alexey Bychko (Inactive) [ 2021-10-23 ]

Summary seems corrected:

[abychko@vm-centos-7-x64 MariaDBEnterprise]$ for _pkg in *.rpm; do echo -ne "${_pkg}\t"; rpm -qpi ${_pkg} | grep Summary; done
MariaDB-backup-10.2.41-1.el7.x86_64.rpm	Summary     : Backup tool for MariaDB server
MariaDB-client-10.2.41-1.el7.x86_64.rpm	Summary     : MariaDB database client binaries
MariaDB-common-10.2.41-1.el7.x86_64.rpm	Summary     : MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
MariaDB-connect-engine-10.2.41-1.el7.x86_64.rpm	Summary     : Connect storage engine for MariaDB
MariaDB-cracklib-password-check-10.2.41-1.el7.x86_64.rpm	Summary     : CrackLib Password Validation Plugin for MariaDB
MariaDB-devel-10.2.41-1.el7.x86_64.rpm	Summary     : MariaDB database development files
MariaDB-gssapi-server-10.2.41-1.el7.x86_64.rpm	Summary     : GSSAPI authentication plugin for MariaDB server
MariaDB-oqgraph-engine-10.2.41-1.el7.x86_64.rpm	Summary     : OQGraph storage engine for MariaDB
MariaDB-rocksdb-engine-10.2.41-1.el7.x86_64.rpm	Summary     : RocksDB storage engine for MariaDB
MariaDB-server-10.2.41-1.el7.x86_64.rpm	Summary     : MariaDB database server binaries
MariaDB-shared-10.2.41-1.el7.x86_64.rpm	Summary     : MariaDB database client library
MariaDB-test-10.2.41-1.el7.x86_64.rpm	Summary     : MariaDB database regression test suite

Comment by Alexey Bychko (Inactive) [ 2021-10-24 ]

ralf.gebhardt@mariadb.com serg
please take a look at https://github.com/MariaDB/server/blob/bb-10.2-MDEV-22522/cmake/cpack_rpm_descriptions.cmake
default description for server packages is https://github.com/MariaDB/server/blob/22d7740ad83d828baca91e0b0e32f6f57d557b11/cmake/cpack_rpm.cmake#L53

maybe some descriptions should be corrected or rephrased

Comment by Alexey Bychko (Inactive) [ 2021-10-25 ]

seems done

Comment by Elena Stepanova [ 2021-10-25 ]

abychko,

There should be no parts related to columnstore and other packages which aren't in the version. You are going to push it into the source code, so it's version-specific, not universal.

Also please check which packages really exist in which version.

And why does it require a separate file?

Comment by Alexey Bychko (Inactive) [ 2021-10-25 ]

serg is it OK to have cpack_rpm.cmake for logic and new cpack_rpm_descriptions.cmake file for text data?
or it's better to merge them together?

Comment by Sergei Golubchik [ 2021-10-25 ]

cpack_rpm.cmake is mostly declarative, these's very little actual code logic there.

SET(CPACK_COMPONENT_SERVER_GROUP "server")
SET(CPACK_COMPONENT_MANPAGESSERVER_GROUP "server")
SET(CPACK_COMPONENT_INIFILES_GROUP "server")
...
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL})
...
SETA(CPACK_RPM_client_PACKAGE_OBSOLETES
  "mysql-client"
  "MySQL-client")
SETA(CPACK_RPM_client_PACKAGE_PROVIDES
  "MySQL-client"
  "mysql-client")
SETA(CPACK_RPM_client_PACKAGE_CONFLICTS
  "MariaDB-server < 10.6.0")
 
SETA(CPACK_RPM_common_PACKAGE_CONFLICTS
  "MariaDB-server < 10.6.1")

etc — those are all declarations. So I'd suggest to put more declarations in the same file, not in a new one.

Comment by Alexey Bychko (Inactive) [ 2021-10-26 ]

summary/description is added to cpack_rpm.cmake file.

Comment by Alexey Bychko (Inactive) [ 2021-10-26 ]

https://github.com/MariaDB/server/commit/71b290d77629c850116f3ee0b395e274e153fbc5
please review

Comment by Elena Stepanova [ 2021-10-26 ]

ralf.gebhardt@mariadb.com,

Shall we ask someone from the documentation team to check the wording?

Comment by Sergei Golubchik [ 2021-10-26 ]

I'd think RPM and DEB packages should have similar descriptions

Comment by Alexey Bychko (Inactive) [ 2021-10-26 ]

I gathered descriptions from debians

Comment by Elena Stepanova [ 2021-11-01 ]

Indeed, and DEBs also have a very generic description for general packages (like client, dev etc.), so for those one generic has changed to another.

old

MariaDB: a very fast and robust SQL database server
 
It is GPL v2 licensed, which means you can use the it free of charge under the
conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
 
MariaDB documentation can be found at https://mariadb.com/kb
MariaDB bug reports should be submitted through https://jira.mariadb.org

new

MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.

The former seems somewhat more informative (with the links to the KB and JIRA), so maybe it makes sense to keep it?

Summaries got better though, and for extra packages also descriptions.

However, one seems to have gotten lost.
Before the change, libmariadb3 ("shared" RPM package) had this for summary/description:

Summary     : LGPL MariaDB client library
Description :
 
This is LGPL MariaDB client library that can be used to connect to MySQL
or MariaDB.
 
This code is based on the LGPL libmysql client library from MySQL 3.23
and PHP's mysqlnd extension.
 
This product includes PHP software, freely available from
<http://www.php.net/software/>

And with the change, it is that generic

Summary     : MariaDB database client library
Description :
 
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.

Unless the former one was wrong, it seems to be more specific, so it would make sense to keep it.

Comment by Alexey Bychko (Inactive) [ 2021-11-05 ]

about libmariadb3 description:

  • do we really need to mention MySQL 3.23 and PHP's mysqlnd extension?
  • This product includes PHP software. is it true?
Comment by Alexey Bychko (Inactive) [ 2021-11-05 ]

updated according to elenst's comments

Comment by Elena Stepanova [ 2021-11-07 ]

Looks okay to me, except for one small thing.
You have added an empty line in the beginning of every description. E.g. where it was

Summary     : MariaDB: a very fast and robust SQL database server
Description :
MariaDB: a very fast and robust SQL database server
...

Now it is

Summary     : MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
Description :
 
MariaDB: a very fast and robust SQL database server
...

I've checked some random third-party packages and it's not done anywhere, so it's not standard. Better to remove it.
shared package already had the empty line before, but apparently it wasn't intentional, so it can be removed too, for uniformity.

After that okay to push to 10.2 from my side, but please remember to either merge it up yourself, adding whatever is needed for higher versions, or provide precise instructions for the future merge.

Comment by Alexey Bychko (Inactive) [ 2021-11-08 ]

fixed and rebased on latest 10.2

Comment by Alexey Bychko (Inactive) [ 2021-11-08 ]

pushed to 10.2

Comment by Elena Stepanova [ 2021-11-08 ]

please remember to either merge it up yourself, adding whatever is needed for higher versions, or provide precise instructions for the future merge.

And please set the fix versions accordingly.

Comment by Alexey Bychko (Inactive) [ 2021-11-15 ]

marko is merging the fixes from 10.2 to other versions. it's enough to merge to 10.2

Comment by Marko Mäkelä [ 2021-11-15 ]

I had already merged this change up to 10.8 a week ago.

Comment by Elena Stepanova [ 2021-11-15 ]

Except that this patch alone is not enough for higher versions which have more packages. Each version which has new packages needs to have an extra patch on top of the merge. The merger cannot possibly know it, but the committer should.

Comment by Alexey Bychko (Inactive) [ 2021-11-15 ]

elenst you're right.
need to add columnstore and s3 packages for 10.5+

Comment by Elena Stepanova [ 2021-11-15 ]

And providers in 10.7. Possibly something else

Comment by Alexey Bychko (Inactive) [ 2021-11-15 ]

could you please review 7b3e666ce81af7976db1a8dbbe14ca925865c79c ?

Comment by Sergei Golubchik [ 2021-11-15 ]

May be, consider this change:

--- a/cmake/Internal/CPack/CPackRPM.cmake
+++ b/cmake/Internal/CPack/CPackRPM.cmake
@@ -17,6 +17,12 @@ macro(restore WHAT)
   set(CPACK_RPM_PACKAGE_${WHAT} ${orig_CPACK_RPM_PACKAGE_${WHAT}})
 endmacro()
 
+foreach (WHAT SUMMARY DESCRIPTION)
+if(NOT CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${WHAT})
+  message(FATAL_ERROR "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${WHAT} is not defined")
+endif()
+endforeach()
+
 set_from_component(LICENSE)
 set_from_component(VENDOR)
--- a/cmake/cpack_rpm.cmake
+++ b/cmake/cpack_rpm.cmake
@@ -63,11 +63,17 @@ MariaDB bug reports should be submitted through https://jira.mariadb.org")
 
 # Packages with default description
 SET(CPACK_RPM_client_PACKAGE_SUMMARY "MariaDB database client binaries")
+SET(CPACK_RPM_client_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
...

Comment by Sergei Golubchik [ 2021-11-22 ]

normally, plugins should leave no traces outside of their own source directory.

As it's already pushed, let's keep 10.2-10.4 the way you've done it, but in 10.5, please, move all plugin-specific SET's to corresponding plugins' CMakeLists.txt.

Comment by Elena Stepanova [ 2021-11-22 ]

It was only pushed, not released, so we can still just as well move it in 10.2, why not?

Comment by Alexey Bychko (Inactive) [ 2021-11-22 ]

yes, it's possible to move descriptions off from cpack_rpm.cmake, except rocksdb:

[submodule "storage/rocksdb/rocksdb"]
	path = storage/rocksdb/rocksdb
	url = https://github.com/facebook/rocksdb.git

probably FB will not add such patch to code

Comment by Sergei Golubchik [ 2021-11-22 ]

rocksdb packaging is in storage/rocksdb/CMakeLists.txt, which isn't in a submodule
(same for columnstore)

Comment by Alexey Bychko (Inactive) [ 2021-11-22 ]

actually it's possible to do for rocks also. testing

Comment by Alexey Bychko (Inactive) [ 2021-11-22 ]

added a safeguard to cmake/Internal/CPack/CPackRPM.cmake
moved descriptions to different cmake files.

Comment by Alexey Bychko (Inactive) [ 2021-11-22 ]

please review 346cdd635ca019b77874a991ef6dfec7e0f114d9

Comment by Sergei Golubchik [ 2021-11-22 ]

Looks good, thanks!

Comment by Alexey Bychko (Inactive) [ 2021-11-23 ]

pushed as fe065f8d90b05c05ad9ca63a773a8f933b19e4eb to 10.2

Comment by Alexey Bychko (Inactive) [ 2021-11-23 ]

pushed bb-10.5-MDEV-22522 97d4d295a6231045e90294efd18a2e4404b1f0e7
pushed bb-10.7-MDEV-22522 32379188dfc2a5644f1f443638f2d1948c758101
please review

Comment by Sergei Golubchik [ 2021-11-24 ]

No, please, don't. Let's have your 10.2 commit fe065f8d90b05c05ad9ca63a773a8f933b19e4eb merged up from 10.2 to 10.5 and 10.7

Generated at Thu Feb 08 09:15:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.