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

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

    <bug>
          <bug_id>32233</bug_id>
          
          <creation_ts>2016-06-29 19:21:40 +0300</creation_ts>
          <short_desc>.spec: it&apos;s better not to redefine %_libdir for build (and check for 64 differently)</short_desc>
          <delta_ts>2016-06-29 19:21:40 +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>java-1.5.0-gcj</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Dmitry V. Levin">ldv</assigned_to>
          <cc>glebfm</cc>
    
    <cc>sbolshakov</cc>
    
    <cc>viy</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>157509</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2016-06-29 19:21:40 +0300</bug_when>
    <thetext>+++ This bug was initially created as a clone of Bug #32231 +++

С переназначением %_libdir тоже хорошо бы что-то сделать (потому что
сборочные &quot;инструменты&quot;/&quot;реквизиты&quot; будут искаться ведь тоже не там! И та простыня ошибок была вызвана чем-то вроде этой причины):

# python support for aot-compile
%{!?python_sitelib: %define python_sitelib %(%{__python} -c &quot;from distutils.sysconfig import get_python_lib; print get_python_lib()&quot;)}

# hard-code libdir on 64-bit architectures to make the 64-bit JDK
# simply be another alternative
%ifarch ppc64 s390x x86_64 sparc64
%define syslibdir        %{_prefix}/lib64
%define _libdir          %{_prefix}/lib
%else
%define syslibdir        %{_libdir}
%endif

%if %{enable_plugin}
%define plugindir       %{_libdir}/mozilla/plugins
%endif

%files aot-compile
%_bindir/aot-compile*
/usr/lib/python*/site-packages/*

Т.е. высталять новое значение как параметр сборки явно в %build, %install, %files? (Для питона есть %python_sitelibdir_noarch.)

(Тут ещё возникает неожиданное несоответствие между %_lib и %_libdir -- обычно одно в конце другого, а здесь:

	export RPM_LIB=&quot;lib64&quot;
	export RPM_LIBDIR=&quot;/usr/lib&quot;
	export RPM_DATADIR=&quot;/usr/share&quot;

).

* * *

Хорошо бы подумать, как проверку 64ёх переписать на более осмысленную без явного списка архитектур -- вроде: %if &quot;%_lib&quot; != &quot;lib&quot; (сработает и на x32, где не 64):

# hard-code libdir on 64-bit architectures to make the 64-bit JDK
# simply be another alternative
%ifarch ppc64 s390x x86_64 sparc64
%define syslibdir        %{_prefix}/lib64
%define _libdir          %{_prefix}/lib
%else
%define syslibdir        %{_libdir}
%endif

(Можно ещё ExclusiveArch прописать при необходимости.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>