Bug 1142909 - mariadb depended from python2 and this depence not specify in spec-file.
mariadb depended from python2 and this depence not specify in spec-file.
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other
All openSUSE Factory
: P5 - None : Major (vote)
: ---
Assigned To: Kristyna Streitova
E-mail List
Depends on:
  Show dependency treegraph
Reported: 2019-07-25 19:17 UTC by Илья Индиго
Modified: 2019-08-02 18:28 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Илья Индиго 2019-07-25 19:17:27 UTC
Python2 support expires after 5 months.
In openSUSE, there is an active rewriting or deletion of packages depending on "/usr/bin/python".
It is believed that all basic packages are free from this dependence, but this is not so.

mariadb is the base package, and it contains at least one script: "/usr/bin/myrocks_hotbackup" which is written in python2.

I learned about this script by chance, looking through rpmlint.

mariadb.x86_64: E: env-script-interpreter (Badness: 9) /usr/bin/myrocks_hotbackup /usr/bin/env python

But at the same time the package does not require python in the system!

When upgrading from 10.2 to 10.3, I did not update the tables with ROCKDB and I had to export, remove them from the database, physically delete the "/var/lib/mysql/#rocksdb" directory, restart mariadb and import the data again.
In this case, all previously specified actions were necessary.
Simple software "export -> delete -> import" did not solve the problem.

Perhaps the problem was caused by the fact that this script did not work.
This script needs to be rewritten in python3 or bash and check for other similar scripts.

And in the near future, you need to either add Require: python to the spec-file or replace the header of these scripts with "#!/Usr/bin/env python" with "#!/Usr/bin/python".
Comment 1 Kristyna Streitova 2019-08-02 17:04:31 UTC
The reason why myrocks_hotbackup needed python 2 was "import commands" that was removed [1] in MariaDB 10.3.13 so now it should be python 3 compatible [2].

I set a new mariadb option PYTHON_SHEBANG to "python 3" for TW so now the header should be ok as well.

Submitted via sr#720706. Closing as fixed.

[1] https://github.com/MariaDB/server/commit/7334f9717d107f8f12af1fb94d1bcfe7f724f0eb
[2] https://src.fedoraproject.org/rpms/mariadb/c/4f1f8bb5b67cc499d5a7c508ad0f8ea2337c0696?branch=master
Comment 2 Илья Индиго 2019-08-02 18:28:06 UTC
Thank you, Kristyna! :-)