Il 06/03/2018 17:42, Dennis Gilmore ha scritto:
El mar, 06-03-2018 a las 17:20 +0100, Germano Massullo escribió:
> Il 06/03/2018 16:35, Dennis Gilmore ha scritto:
>> El mar, 06-03-2018 a las 15:29 +0100, Germano Massullo escribió:
>>> During package firefox-pkcs11-loader build, the following two
>>> spec
>>> file
>>> lines
>>>
>>> %dir %_prefix/%{_lib}/mozilla/pkcs11-modules/
>>> %_prefix/%{_lib}/mozilla/pkcs11-modules/onepinopenscpkcs11.json
>>>
>>> and also this variant
>>>
>>> %dir %{_libdir}/mozilla/pkcs11-modules/
>>> %{_libdir}/mozilla/pkcs11-modules/onepinopenscpkcs11.json
>>>
>>> lead to errors
>>>
>>> Directory not found: /builddir/build/BUILDROOT/firefox-pkcs11-
>>> loader-
>>> 3.13.0-2.fc27.x86_64/usr/lib64/mozilla/pkcs11-modules
>>> File not found: /builddir/build/BUILDROOT/firefox-pkcs11-loader-
>>> 3.13.0-2.fc27.x86_64/usr/lib64/mozilla/pkcs11-
>>> modules/onepinopenscpkcs11.json
>> noarch only builds do not have %{_lib} or %{_libdir} defined
>>
> Thank you very much, I solved with
> %{cmake} . -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir}
>
> Could you please leave a feedback about the comment I am going to
> attach
> in the spec file?
>
> # in noarch builds, %%{_libdir} is not defined in cmake, so the
> default
> # installation would try installing for example
> # file onepinopenscpkcs11.json
> # into /usr/lib/mozilla/pkcs11-modules/onepinopenscpkcs11.json
> # even if the system architecture is 64bit. This will lead to errors
> because
> # the %%files entry
> # %{_libdir}/mozilla/pkcs11-modules/onepinopenscpkcs11.json
> # would be defined as
> # /usr/lib64/mozilla/pkcs11-modules/onepinopenscpkcs11.json
> # that is different from the previous one
so the content should always be in /usr/lib for a noarch build as it
has to work for cases where _lib is both lib64 and lib if the content
needs to be in /usr/lib64/mozilla/pkcs11-modules on systems with lib64
as the value for _lib then your content and package needs to be
archful. I am concerned that you are not going to get the outcome you
expect here.
Thank you Dennis. Therefore I think that rpmlint messages should be
improved about noarch packages.
I started working on %{_lib} / %{_libdir} on firefox-pkcs11-loader spec
file because originally there were %files entries like
%_prefix/lib/mozilla/pkcs11-modules/onepinopenscpkcs11.json
and rpmlint returned errors like
firefox-pkcs11-loader.src:43: E: hardcoded-library-path in
%_prefix/lib/mozilla/pkcs11-modules/
firefox-pkcs11-loader.src:44: E: hardcoded-library-path in
%_prefix/lib/mozilla/pkcs11-modules/onepinopenscpkcs11.json
So I started working to fix them....
Source:
https://taskotron.fedoraproject.org/artifacts/all/46067844-18bd-11e8-9d96...
https://bodhi.fedoraproject.org/updates/FEDORA-2018-4558f54f10