Re: Patching JSON tag without hardcoding library path (package firefox-pkcs11-loader)

2018-03-06 Thread Germano Massullo
Il 05/03/2018 12:10, Florian Weimer ha scritto:
> On 03/05/2018 11:43 AM, Germano Massullo wrote:
>> Il 05/03/2018 08:25, Florian Weimer ha scritto:
>>> On 03/04/2018 03:02 PM, Germano Massullo wrote:
 This tag is wrong and for example on x86_64 CPU architecture
 systems, it
 must be
 "path": "/usr/lib64/pkcs11/onepin-opensc-pkcs11.so"

 How could I patch this file without having to hardcode the /usr/lib64
 path?
>>>
>>> I'm not entirely sure what you mean, but if you install the library in
>>> /usr/lib or /usr/lib64 (say /usr/lib64/onepin-opensc-pkcs11.so), you
>>> can dlopen it using just its soname (onepin-opensc-pkcs11.so).
>>>
>> dlopen cannot be applied to my case
>
> How is the library loaded on a non-standard path, then?
>
> Thanks,
> Florian

Nikos, one of opensc maintainers replied to a my question about
onepin-opensc-pkcs11.so and LD path:

PKCS#11 modules in Fedora are not in LD path. The reason they are there
is that they are not generic libraries, but rather loadable modules.
Their location is "%{_libdir}/pkcs11"
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Patching JSON tag without hardcoding library path (package firefox-pkcs11-loader)

2018-03-05 Thread Florian Weimer

On 03/05/2018 11:43 AM, Germano Massullo wrote:

Il 05/03/2018 08:25, Florian Weimer ha scritto:

On 03/04/2018 03:02 PM, Germano Massullo wrote:

This tag is wrong and for example on x86_64 CPU architecture systems, it
must be
"path": "/usr/lib64/pkcs11/onepin-opensc-pkcs11.so"

How could I patch this file without having to hardcode the /usr/lib64
path?


I'm not entirely sure what you mean, but if you install the library in
/usr/lib or /usr/lib64 (say /usr/lib64/onepin-opensc-pkcs11.so), you
can dlopen it using just its soname (onepin-opensc-pkcs11.so).


dlopen cannot be applied to my case


How is the library loaded on a non-standard path, then?

Thanks,
Florian
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Patching JSON tag without hardcoding library path (package firefox-pkcs11-loader)

2018-03-05 Thread Germano Massullo
Il 05/03/2018 08:25, Florian Weimer ha scritto:
> On 03/04/2018 03:02 PM, Germano Massullo wrote:
>> This tag is wrong and for example on x86_64 CPU architecture systems, it
>> must be
>> "path": "/usr/lib64/pkcs11/onepin-opensc-pkcs11.so"
>>
>> How could I patch this file without having to hardcode the /usr/lib64
>> path?
>
> I'm not entirely sure what you mean, but if you install the library in
> /usr/lib or /usr/lib64 (say /usr/lib64/onepin-opensc-pkcs11.so), you
> can dlopen it using just its soname (onepin-opensc-pkcs11.so).
>
dlopen cannot be applied to my case
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Patching JSON tag without hardcoding library path (package firefox-pkcs11-loader)

2018-03-04 Thread Florian Weimer

On 03/04/2018 03:02 PM, Germano Massullo wrote:

This tag is wrong and for example on x86_64 CPU architecture systems, it
must be
"path": "/usr/lib64/pkcs11/onepin-opensc-pkcs11.so"

How could I patch this file without having to hardcode the /usr/lib64 path?


I'm not entirely sure what you mean, but if you install the library in 
/usr/lib or /usr/lib64 (say /usr/lib64/onepin-opensc-pkcs11.so), you can 
dlopen it using just its soname (onepin-opensc-pkcs11.so).

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Patching JSON tag without hardcoding library path (package firefox-pkcs11-loader)

2018-03-04 Thread Germano Massullo
Il 04/03/2018 16:57, Rex Dieter ha scritto:
> What's wrong with hard-coding?  (e.g. so it to be something like
> %{_libdir}/pkcs11/onepin-opensc-pkcs11.so
> )

The path
/usr/lib64/pkcs11/onepin-opensc-pkcs11.so
on a 32bit system would be
/usr/lib/pkcs11/onepin-opensc-pkcs11.so
then something like
%{_libdir}/pkcs11/onepin-opensc-pkcs11.so
would be much better

Il 04/03/2018 17:04, Fabio Valentini ha scritto:
> What about just using sed at the beginning of %build (or where
> appropriate) to replace the wrong location with the right one (where
> rpm obviously knows the right %{_libdir})?

It was an idea I was thinking about. As soon as possible I will make
some practise with sed
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Patching JSON tag without hardcoding library path (package firefox-pkcs11-loader)

2018-03-04 Thread Fabio Valentini
On Mar 4, 2018 16:59, "Rex Dieter"  wrote:

Germano Massullo wrote:

> Package
> https://src.fedoraproject.org/rpms/firefox-pkcs11-loader
> (upstream) https://github.com/open-eid/firefox-pkcs11-loader
>
> contains file
> https://github.com/open-eid/firefox-pkcs11-loader/blob/
master/onepinopenscpkcs11.json
> that has the tag
> "path": "onepin-opensc-pkcs11.so"
>
> This tag is wrong and for example on x86_64 CPU architecture systems, it
> must be
> "path": "/usr/lib64/pkcs11/onepin-opensc-pkcs11.so"
>
> How could I patch this file without having to hardcode the /usr/lib64
> path?

What's wrong with hard-coding?  (e.g. so it to be something like
%{_libdir}/pkcs11/onepin-opensc-pkcs11.so
)

-- Rex


What about just using sed at the beginning of %build (or where appropriate)
to replace the wrong location with the right one (where rpm obviously knows
the right %{_libdir})?

Fabio

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Patching JSON tag without hardcoding library path (package firefox-pkcs11-loader)

2018-03-04 Thread Rex Dieter
Germano Massullo wrote:

> Package
> https://src.fedoraproject.org/rpms/firefox-pkcs11-loader
> (upstream) https://github.com/open-eid/firefox-pkcs11-loader
> 
> contains file
> https://github.com/open-eid/firefox-pkcs11-loader/blob/master/onepinopenscpkcs11.json
> that has the tag
> "path": "onepin-opensc-pkcs11.so"
> 
> This tag is wrong and for example on x86_64 CPU architecture systems, it
> must be
> "path": "/usr/lib64/pkcs11/onepin-opensc-pkcs11.so"
> 
> How could I patch this file without having to hardcode the /usr/lib64
> path?

What's wrong with hard-coding?  (e.g. so it to be something like
%{_libdir}/pkcs11/onepin-opensc-pkcs11.so
)

-- Rex
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Patching JSON tag without hardcoding library path (package firefox-pkcs11-loader)

2018-03-04 Thread Germano Massullo
Package
https://src.fedoraproject.org/rpms/firefox-pkcs11-loader
(upstream) https://github.com/open-eid/firefox-pkcs11-loader

contains file
https://github.com/open-eid/firefox-pkcs11-loader/blob/master/onepinopenscpkcs11.json
that has the tag
"path": "onepin-opensc-pkcs11.so"

This tag is wrong and for example on x86_64 CPU architecture systems, it
must be
"path": "/usr/lib64/pkcs11/onepin-opensc-pkcs11.so"

How could I patch this file without having to hardcode the /usr/lib64 path?

Thank you
Best regards
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org