The default values in ipapaltform/base/paths.py are:
ipapaltform/base/paths.py
LIBSOFTHSM2_SO = "/usr/lib/pkcs11/libsofthsm2.so" LIBSOFTHSM2_SO_64 = "/usr/lib64/pkcs11/libsofthsm2.so"
But softhsm2 defaults to %{_libdir}/softhsm/libsofthsm2.so, %{_libdir}/pkcs11/libsofthsm2.so is a symlink, see https://src.fedoraproject.org/rpms/softhsm/blob/master/f/softhsm.spec#_75
%{_libdir}/softhsm/libsofthsm2.so
%{_libdir}/pkcs11/libsofthsm2.so
Ubuntu and Debian use the same location: https://packages.ubuntu.com/search?searchon=contents&keywords=libsofthsm2.so&mode=exactfilename&suite=disco&arch=any
As softhsm 1.x is obsolete nowadays, I think it's worth migrating to the new location by default.
But here a problem is that in Fedora it is %{_libdir}/softhsm/libsofthsm.so, while in my build of softhsm-2.5.0 with default options (see the bellow) it is %{_libdir}/softhsm/libsofthsm2.so
%{_libdir}/softhsm/libsofthsm.so
So, maybe it is easier to default to an old location as a more universal one.
%build %cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DENABLE_GOST:BOOL=OFF \ -DDISABLE_VISIBILITY:BOOL=ON \ -DDISABLE_NON_PAGED_MEMORY:BOOL=ON \ -DBUILD_TESTS:BOOL=ON \ -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" \ -DCMAKE_CXX_FLAGS=-g
Upd. In Fedora library path is changed to non-default %_libdir/pkcs11, new %_libdir/softhsm/*.so is a symlinks to ../pkcs11/*.so.
%_libdir/pkcs11
%_libdir/softhsm/*.so
On Red Hat systems /usr/lib64/pkcs11/libsofthsm2.so and /usr/lib/pkcs11/libsofthsm2.so are the paths to the actual shared libraries. They are not symlinks. The ipaplatform module has an additional check to use the 32 or 64bit library based on the current platform.
/usr/lib64/pkcs11/libsofthsm2.so
/usr/lib/pkcs11/libsofthsm2.so
ipaplatform
The Debian platform definition sets LIBSOFTHSM2_SO = "/usr/lib/softhsm/libsofthsm2.so".
LIBSOFTHSM2_SO = "/usr/lib/softhsm/libsofthsm2.so"
The current approach works. Is there any need to change it?
Well, probably there is not))
Metadata Update from @mikhailnov: - Issue close_status updated to: invalid - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.