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

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

    <bug>
          <bug_id>31993</bug_id>
          
          <creation_ts>2016-04-18 23:16:20 +0300</creation_ts>
          <short_desc>Нет зависимости wine ot libpng15</short_desc>
          <delta_ts>2023-01-22 22:12:59 +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>wine</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>38856</dependson>
          <blocked>40797</blocked>
    
    <blocked>31991</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrey Cherepanov">cas</reporter>
          <assigned_to name="Vitaly Lipatov">lav</assigned_to>
          <cc>lav</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>156157</commentid>
    <comment_count>0</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2016-04-18 23:16:20 +0300</bug_when>
    <thetext>+++ Данная ошибка создана размножением ошибки 31991 +++

Установил i586-wine
Когда запускаю &quot;wine cmd&quot;, вижу ошибки:

err:wincodecs:PngEncoder_CreateInstance Failed writing PNG because unable to find libpng15.so.15
fixme:ole:CoCreateInstanceEx no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder

После установки пакета i586-libpng15 ошибки прекратились.

(Если б не понадобилось проверить одну мелочь, так бы и не заметил. Ошибки видны только в консоли и только с 32-битным wine в 64-битном Linux, потому что пакет libpng15 устанавливается вместе с, наверное, любым desktop manager)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>165077</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2017-08-06 22:25:57 +0300</bug_when>
    <thetext>Была такая проблема. В Сизифе исправлена в wine-vanilla-2.14 (Requires уже libpng16), но я не уверен, что это повлияет на 32-битую версию.

В wine-2.14 также будет добавлено.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170741</commentid>
    <comment_count>2</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2018-04-28 13:15:17 +0300</bug_when>
    <thetext> $ apt-cache depends libwine-vanilla | grep libpng
  Требует: libpng16

при этом пакет после arepo не имеет зависимостей:
 $ apt-cache depends i586-libwine-vanilla
&lt;i586-libwine-vanilla&gt;

Что тут можно сделать?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170749</commentid>
    <comment_count>3</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2018-04-28 13:54:20 +0300</bug_when>
    <thetext>(В ответ на комментарий №2)
&gt;  $ apt-cache depends libwine-vanilla | grep libpng
&gt;   Требует: libpng16
&gt; 
&gt; при этом пакет после arepo не имеет зависимостей:
&gt;  $ apt-cache depends i586-libwine-vanilla
&gt; &lt;i586-libwine-vanilla&gt;
&gt; 
&gt; Что тут можно сделать?
Для этого есть трюк: симлинк на системную библиотеку под 32-битной сборкой.
После этого в arepo форируется ссылка на arepную библиотеку. Для примеры: skype-preinstall.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192336</commentid>
    <comment_count>4</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2020-09-09 19:49:51 +0300</bug_when>
    <thetext>На данный момент зависимости не теряются:
 $ rpm -q --requires i586-libwine
i586-libpng16

Но для обеспечения идентичности пакетов i586-*wine и оригинальных 32-битных *wine я бы перешёл на преобразование в путь к библиотеке.

Насколько я понимаю, создание ссылки, которая при упаковке породит зависимость на файл, на который она ссылается, ничем не отличается от добавления зависимости на файл.

План такой:
Название библиотеки, указываемое при линковке превращать в зависимость на файл, который будет реально линковаться при запуске.

То есть
# png -&gt; /usr/lib/libpng16.so.16
а не /usr/lib/libpng16.so.16.37.0


Пример кода:

get_linking_lib()
{

    # get full path to lib.so
    local ll=%_libdir/lib$1.so
    test -f &quot;$ll&quot; || return 1

    # real lib file (WHY it links not to linked file??)
    local ee=$(readlink -e $ll)
    test -f &quot;$ee&quot; || return 1

    # get third file (not last, not just .so) in a hope there are only one file
    local ee1=${ee/.so*/.so}
    test -f &quot;$ee1&quot; || return 1
    local ee2=$(ls -1 $ee1.* | grep -v &quot;^$ee&quot;)

    # if there are no third file, just return one
    if [ &quot;$ee&quot; = &quot;$ee2&quot; ] ; then
        echo &quot;$ee&quot;
        test -f &quot;$ee&quot;
    else
        echo &quot;$ee2&quot;
        test -f &quot;$ee2&quot;
    fi
}

L=$(get_linking_lib png) || exit
ln -s $L %buildroot%_libdir/%name/$(basename $L)

%files
%_libdir/%name/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>220456</commentid>
    <comment_count>5</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2023-01-22 22:12:59 +0300</bug_when>
    <thetext>Начиная с wine 7.5 используется встроенный libpng, внешняя зависимость больше не нужна.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>