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

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

    <bug>
          <bug_id>34023</bug_id>
          
          <creation_ts>2017-10-18 11:44:10 +0300</creation_ts>
          <short_desc>Не работает SLAPDURLLIST=&quot;&apos;ldapi:///&apos;&quot;</short_desc>
          <delta_ts>2017-10-27 18:37:18 +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>openldap-servers</component>
          <version>unstable</version>
          <rep_platform>all</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>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>10382</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Lenar Shakirov">snejok</reporter>
          <assigned_to name="Dmitry V. Levin">ldv</assigned_to>
          <cc>aas</cc>
    
    <cc>boyarsh</cc>
    
    <cc>imz</cc>
    
    <cc>klark.devel</cc>
    
    <cc>klark</cc>
    
    <cc>lav</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>rider</cc>
    
    <cc>shaba</cc>
    
    <cc>slev</cc>
    
    <cc>sotor</cc>
    
    <cc>vitty</cc>
    
    <cc>viy</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>166382</commentid>
    <comment_count>0</comment_count>
    <who name="Lenar Shakirov">snejok</who>
    <bug_when>2017-10-18 11:44:10 +0300</bug_when>
    <thetext>Не работает SLAPDURLLIST=&quot;&apos;ldapi:///&apos;&quot;

Причина: altbug#10382

...
socket(AF_UNIX, SOCK_STREAM, 0)         = 11
unlink(&quot;/var/lib/run/ldapi&quot;)            = -1 ENOENT (No such file or directory)
umask(000)                              = 022
bind(11, {sa_family=AF_UNIX, sun_path=&quot;/var/lib/run/ldapi&quot;}, 110) = -1 ENOENT (No such file or directory)
...

Временно собрал себе так:
$ sed &apos;s/_localstatedir/_sharedstatedir/g&apos; -i openldap.spec
$ head -n1 openldap.spec
%define _localstatedir /var

Пример правильного использования макросов _localstatedir и _sharedstatedir можно посмотреть у Fedora:

$ egrep &apos;(localstate|sharedstate)&apos; /tmp/fedora-openldap.spec

mkdir -p %{buildroot}%{_sharedstatedir}
mkdir -p %{buildroot}%{_localstatedir}
install -m 0700 -d %{buildroot}%{_sharedstatedir}/ldap
install -m 0755 -d %{buildroot}%{_localstatedir}/run/openldap
rm -f %{buildroot}%{_localstatedir}/openldap-data/DB_CONFIG.example
rmdir %{buildroot}%{_localstatedir}/openldap-data
        useradd -r -g ldap -u 55 -d %{_sharedstatedir}/ldap -s /sbin/nologin -c &quot;OpenLDAP server&quot; ldap
                touch %{_sharedstatedir}/ldap/rpm_upgrade_openldap &amp;&gt;/dev/null
if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_openldap ]; then
        rm -f %{_sharedstatedir}/ldap/rpm_upgrade_openldap
                touch %{_sharedstatedir}/ldap/rpm_upgrade_libdb
                rm -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb
if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb ]; then
        rm -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb
%dir %attr(0700,ldap,ldap) %{_sharedstatedir}/ldap
%dir %attr(-,ldap,ldap) %{_localstatedir}/run/openldap</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166384</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2017-10-18 12:51:26 +0300</bug_when>
    <thetext>Для того, чтобы привести макрос _localstatedir в соответствие федориному, достаточно дописать
BuildRequires: rpm-build-intro.

Но в спеке есть конструкции вида
%__mkdir_p -m750 %buildroot/%_localstatedir/ldap
они явно сломаются. Потому что run-то должен быть в /var/run, но ldap должен быть /var/lib/ldap.

И я бы заодно обсудил
%_rundir


А использование _sharedstatedir в приведённом примере выглядит очень неплохо.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166483</commentid>
    <comment_count>2</comment_count>
    <who name="Leonid Krivoshein">klark.devel</who>
    <bug_when>2017-10-23 18:09:05 +0300</bug_when>
    <thetext>А вот так работает:

/etc/sysconfig/ldap
SLAPDURLLIST=&quot;&apos;ldapi://%2fvar%2flib%2fldap%2fdev%2flog&apos;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166543</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2017-10-25 06:36:44 +0300</bug_when>
    <thetext>(In reply to comment #2)
&gt; А вот так работает:
&gt; 
&gt; /etc/sysconfig/ldap
&gt; SLAPDURLLIST=&quot;&apos;ldapi://%2fvar%2flib%2fldap%2fdev%2flog&apos;&quot;

Замечательный способ отстрелить себе логи.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166544</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2017-10-25 06:38:21 +0300</bug_when>
    <thetext>Можно тестировать исправленный пакет из http://git.altlinux.org/tasks/192208/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166555</commentid>
    <comment_count>5</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2017-10-25 08:48:48 +0300</bug_when>
    <thetext>Сергей, поставь пожалуйста задачу протестировать новую сборку openldap.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166618</commentid>
    <comment_count>6</comment_count>
    <who name="Antonov Alexander">aas</who>
    <bug_when>2017-10-27 10:47:51 +0300</bug_when>
    <thetext>Проверили на ALT домене. Всё работает.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166639</commentid>
    <comment_count>7</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2017-10-27 18:37:18 +0300</bug_when>
    <thetext>openldap-2.4.45-alt2 -&gt; sisyphus:

Tue Oct 24 2017 Dmitry V. Levin &lt;ldv@altlinux.org&gt; 2.4.45-alt2
- slapd:
  + dropped bogus chown from %pre script;
  + fixed ldapi:/// (closes: #34023).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>