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

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

    <bug>
          <bug_id>39115</bug_id>
          
          <creation_ts>2020-10-23 00:28:22 +0300</creation_ts>
          <short_desc>a2chkconfig выполняется при операции с любым пакетом: невозможно использовать a2enmod/a2dismod</short_desc>
          <delta_ts>2020-11-03 15:59:19 +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-mod_php7</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.altlinux.org/show_bug.cgi?id=11333</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vitaly Lipatov">lav</reporter>
          <assigned_to name="Anton Farygin">rider</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>193456</commentid>
    <comment_count>0</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2020-10-23 00:28:22 +0300</bug_when>
    <thetext>Столкнулся с нелепой ситуацией, когда выключенные с помощью a2dismod модули включаются обратно после установки/удаления _любого_ пакета.

Это связано с
# cat /etc/httpd2/conf/extra-start.d/000-default.conf 
httpd-default=yes
httpd-mpm=yes
httpd-multilang-errordoc=yes
httpd-languages=yes
httpd-icons=yes
httpd-autoindex=yes
httpd-mime=yes

настройки из которого применяются командой a2chkconfig.

На Сизифе в hasher после установки apache2-mod_php7 проблема отлично воспроизводится:
apache2-mod_php7-7.4.11-alt1.2.x86_64
В p9 тоже:
apache2-mod_php7-7.3.23-alt1.x86_64

Зачем-то 10 лет назад запуск a2chkconfig вписан в /usr/lib/rpm/apache2-mod_php7.filetrigger:

apache2-mod_php7.spec:
06f8b942        (Sergey Kurakin 2010-02-11 19:41:35 +0300       91)cat &gt; %buildroot/%_rpmlibdir/%name.filetrigger &lt;&lt; EOF
06f8b942        (Sergey Kurakin 2010-02-11 19:41:35 +0300       92)#!/bin/sh
06f8b942        (Sergey Kurakin 2010-02-11 19:41:35 +0300       93)%apache2_sbindir/a2chkconfig &gt;/dev/null


И он выполняется при _каждой_ установке/удалении любого пакета!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193457</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2020-10-23 00:37:50 +0300</bug_when>
    <thetext>Поведение, при которой a2enmod/a2dismod бессмысленно использовать, описано в
man 8 a2chkconfig:
WARNING
       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 a2chkconfig. 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 utitlity.

Это чем-то похоже на некоторые пакеты, в который спек собирается из частей запуском специального скрипта.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193462</commentid>
    <comment_count>2</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2020-10-23 08:49:19 +0300</bug_when>
    <thetext>Да, это наследие предыдущего ментейнера, я не откажусь от помощи в переработке пакета apache так, что бы им было удобнее пользоваться.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193620</commentid>
    <comment_count>3</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2020-10-29 19:27:06 +0300</bug_when>
    <thetext>убрал из apache2-mod_php7 a2chkconfig. Но состояние модулей всё равно сбрасывается на дефолт, на этот раз из-за файлтриггера в самом apache2, который в случае установки каких-то модулей сразу запускает a2chkconfig.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193742</commentid>
    <comment_count>4</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2020-11-03 15:59:19 +0300</bug_when>
    <thetext>Исправлено в 7.4.12-alt1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>