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

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

    <bug>
          <bug_id>47883</bug_id>
          
          <creation_ts>2023-10-08 19:09:30 +0300</creation_ts>
          <short_desc>Переменная PGMETHOD в /etc/init.d/postgresql для условия по умолчанию не задана</short_desc>
          <delta_ts>2023-10-09 10:25:07 +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>postgresql13</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>47838</dup_id>
          
          <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="Evgeny Shesteperov">alimektor</reporter>
          <assigned_to name="Alexei Takaseev">taf</assigned_to>
          <cc>at</cc>
    
    <cc>cas</cc>
    
    <cc>crux</cc>
    
    <cc>ender</cc>
    
    <cc>grenka</cc>
    
    <cc>lav</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>qa_viy</cc>
    
    <cc>shaba</cc>
    
    <cc>taf</cc>
    
    <cc>viy</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>234511</commentid>
    <comment_count>0</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2023-10-08 19:09:30 +0300</bug_when>
    <thetext>Версия

-   postgresql13-server-13.12-alt3

Шаги воспроизведения

    # apt-get install -y postgresql13-server
    # sed -i &quot;/PGMETHOD/d&quot; /etc/sysconfig/postgresql
    # /etc/init.d/postgresql initdb

Ожидаемый результат: инициализация БД

Фактический результат: ошибка, потому что подставляется пустая
переменная $PGMETHOD

    Creating default database:
    initdb: ошибка: нераспознанный метод проверки подлинности &quot;-W&quot; для подключений &quot;local&quot;

Откладка

    # apt-get install -y postgresql13-server
    # grep &apos;PGMETHOD&apos; /etc/init.d/postgresql
        if [ -z &quot;PGMETHOD&quot; ]
            PGMETHOD=&quot;scram-sha-256&quot;
        su -s /bin/sh -l postgres -c &quot;initdb  --pgdata=\&quot;$PGDATA\&quot; --locale=\&quot;$PGLOCALE\&quot; -A $PGMETHOD -W&quot;

или более наглядно:

    # apt-get install -y postgresql13-server
    # bash -x /etc/init.d/postgresql initdb
    . . . . .
    + &apos;[&apos; -z PGMETHOD &apos;]&apos;
    . . . . .

Должно быть:

    - if [ -z &quot;PGMETHOD&quot; ]
    + if [ -z &quot;${PGMETHOD}&quot; ]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234531</commentid>
    <comment_count>1</comment_count>
    <who name="Alexei Takaseev">taf</who>
    <bug_when>2023-10-09 10:25:07 +0300</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 47838 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>