<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>60509</bug_id>
          
          <creation_ts>2026-09-12 17:23:37 +0300</creation_ts>
          <short_desc>Отключить опцию самообновления mysqltuner</short_desc>
          <delta_ts>2026-09-12 20:29:21 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>mysqltuner</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Makeenkov">amakeenk</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>amakeenk</cc>
    
    <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>298270</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2026-09-12 17:23:37 +0300</bug_when>
    <thetext>В пакете mysqltuner доступны опции самообновления из апстрима:
--checkversion и --updateversion. Для установленной из rpm утилиты
самообновление недопустимо: оно перезаписывает файлы, принадлежащие
пакету, кодом из master-ветки GitHub мимо репозитория.

Проверено на mysqltuner-2.9.2-alt1:

1. --checkversion обращается к
   https://raw.githubusercontent.com/jmrenouard/MySQLTuner-perl/master/
   и сообщает о наличии новой версии. Сам по себе безвреден, но
   бессмыслен для пакетной установки.

2. --updateversion при наличии новой версии апстрима скачивает
   mysqltuner.pl, basic_passwords.txt и vulnerabilities.csv и через
   curl перезаписывает файлы прямо в каталоге установки:
   /usr/bin/mysqltuner и /usr/share/mysqltuner/.

Воспроизведение (2.9.2-alt1):
1. Временно изменить строку версии в /usr/bin/mysqltuner
   (our $tunerversion = &quot;2.9.2&quot; -&gt; &quot;2.9.1&quot;);
2. Выполнить: mysqltuner --updateversion
   -&gt; &quot;Successfully updated MySQLTuner script&quot;
3. rpm -V mysqltuner -&gt; ..5....T.  /usr/bin/mysqltuner
   (содержимое файла пакета изменено).

На 1.7.2-alt1 (p11) --updateversion скачивает файлы апстрима в текущий
каталог (через wget), файл пакета не трогает — но также оставляет мусор
и вводит пользователя в заблуждение.

Ожидаемый результат: для сборки в rpm опции самообновления отключены
или удалены (например, патчем в спеке: заглушить update_tuner_version/
compare_tuner_version или вывести предупреждение, что обновление
выполняется через apt).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>298271</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2026-09-12 17:41:46 +0300</bug_when>
    <thetext>Уточнение по 2.9.2-alt1 после повторной контролируемой проверки: /usr/bin/mysqltuner НЕ перезаписывается. Описание в исходном репорте было неточным (флаг изменения в rpm -V давала собственная правка файла при подготовке эксперимента).

Фактическое поведение --updateversion в 2.9.2-alt1 (при наличии новой версии на апстриме):
- mysqltuner.pl скачивается в /usr/bin/mysqltuner.pl (curl-ветка пишет в dirname(__FILE__));
- basic_passwords.txt и vulnerabilities.csv скачиваются в текущий каталог;
- выводится &quot;Successfully updated MySQLTuner script&quot;, хотя установленный /usr/bin/mysqltuner не обновляется.

Итог для пакетной установки: опция вводит в заблуждение (сообщает об успешном обновлении, которого не произошло) и оставляет не принадлежащие пакету файлы в /usr/bin и CWD. Предложение прежнее: отключить/удалить опции --checkversion и --updateversion в спеке.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>298310</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2026-09-12 20:29:21 +0300</bug_when>
    <thetext>mysqltuner-2.9.2-alt2 -&gt; sisyphus:

Sat Sep 12 2026 Anton Farygin &lt;rider@altlinux&gt; 2.9.2-alt2
- Added Requires: perl-JSON so --json/--prettyjson work (closes: #60507)
- Disabled --checkversion/--updateversion for packaged install (closes: #60509)
- Named mountpoint (not usage percent) in disk-space recommendation
- Skipped virtual filesystems by mount prefix only
- Detected hypervisor flag when it was last on the CPU flags line
- Kept --noprocess enabled instead of clearing it
- Honoured --noprocess when measuring other process memory
- Treated query_cache_type 0/OFF as disabled and ON as all requests
- Packaged LICENSE, installed with /usr/bin/perl shebang</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>