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

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

    <bug>
          <bug_id>44044</bug_id>
          
          <creation_ts>2022-10-15 15:04:33 +0300</creation_ts>
          <short_desc>Отключённый a2dismod модуль отключается даже после a2enmod</short_desc>
          <delta_ts>2022-11-14 18: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>apache2-base</component>
          <version>unstable</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</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="Vitaly Chikunov">vt</reporter>
          <assigned_to name="Egor Ignatov">egori</assigned_to>
          <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>215983</commentid>
    <comment_count>0</comment_count>
    <who name="Vitaly Chikunov">vt</who>
    <bug_when>2022-10-15 15:04:33 +0300</bug_when>
    <thetext>Утилита a2dismod отключает произвольный модуль удаляя симлинк из mods-enabled и прописывая &apos;=no&apos; в mods-start.d/*.conf.

Утилита a2enmod включает модуль прописывая симлинк в mods-enabled, но забывая прописать &apos;=yes&apos; в соответствующий mods-start.d конфиг.

В результате при любом апдейте пакета apache2-base (запустится a2chkconfig м) включённый таким образом модуль ошибочно снова отключится - так как в mods-start.d/*.conf для него останется прописанное a2dismod &apos;=no&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>215984</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Chikunov">vt</who>
    <bug_when>2022-10-15 15:33:39 +0300</bug_when>
    <thetext>ps. К слову сказать UI/UX этих утилит имеет серьезный недостаток -- название &quot;a2chkconfig&quot; отсылает к известной системной утилите chkconfig, но a2chkconfig работает совершенно иначе. При этом идея, чтоб a2chkconfig работал как chkconfig была бы хорошей, жаль что она не реализована.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>215985</commentid>
    <comment_count>2</comment_count>
    <who name="Vitaly Chikunov">vt</who>
    <bug_when>2022-10-15 15:53:30 +0300</bug_when>
    <thetext>pps. Да и еще одна проблема UI/UX -- конфигурация распределена в разных точках -- для 1 конфиграционного действия нужно и ставить симлинк в mods-available (это то чего пользователь ожидает), и редактировать конфиг в mods-start.d (это то чего пользователь не ожидает не проштудировав документацию и исходный код) -- иначе конфигурация в некоторых случаях может переключиться при апдейте пакета.

В этом случае снова схема с a la chkconfig была бы понятным решением. Симлинки устанавливается пакетом (согласно вендор пресету) при первом инсталле в систему, а дальше управление идет только меняя симлинки.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>216009</commentid>
    <comment_count>3</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2022-10-16 18:55:07 +0300</bug_when>
    <thetext>Егор, посмотри пожалуйста.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>217261</commentid>
    <comment_count>4</comment_count>
    <who name="Egor Ignatov">egori</who>
    <bug_when>2022-11-11 21:40:41 +0300</bug_when>
    <thetext>(In reply to Vitaly Chikunov from comment #0)
&gt; Утилита a2dismod отключает произвольный модуль удаляя симлинк из
&gt; mods-enabled и прописывая &apos;=no&apos; в mods-start.d/*.conf.
&gt; 
&gt; Утилита a2enmod включает модуль прописывая симлинк в mods-enabled, но
&gt; забывая прописать &apos;=yes&apos; в соответствующий mods-start.d конфиг.
&gt; 
&gt; В результате при любом апдейте пакета apache2-base (запустится a2chkconfig
&gt; м) включённый таким образом модуль ошибочно снова отключится - так как в
&gt; mods-start.d/*.conf для него останется прописанное a2dismod &apos;=no&apos;.

Да, это я добавил, чтобы a2dismod выключал модуль еще и в mods-start.d/*.conf. А вот про a2enmod забыл.

Вообще в мане к a2chkconfig написано следующее:
&quot;
       If  you&apos;ve  enable  or  disable  the  part  of  configuration  with  utilites
       a2en*/a2dis*  and  forgot  to  add  corresponding line to config in directory
       conf/*-start.d the configuration will be rewriting after next  run  a2chkcon‐
       fig.  You  have  to  know  that  utility a2chkconfig will automatic while you
       upgrade apache2 or install  something apache2 corresponding (modules or  smth
       else).

       The  right  way  to  enable or disable the part of configuration is to modify
       line in corresponding file in conf/*-start.d/ and then run a2chkconfig utitl‐
       ity.
&quot;

Честно говоря, не знаю зачем так сделано и думаю было бы правильно сейчас исправить a2enmod, чтобы он тоже правил mods-start.d/*.conf, и переписать man.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>217346</commentid>
    <comment_count>5</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2022-11-14 18:29:21 +0300</bug_when>
    <thetext>apache2-1:2.4.54-alt3 -&gt; sisyphus:

 Mon Nov 14 2022 Egor Ignatov &lt;egori@altlinux&gt; 1:2.4.54-alt3
 - a2enmod: enable mod also in mods-start.d (closes: #44044)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>