Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update install path for yubihsm_pkcs11.so #169

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
cmake --build build -- --jobs=2
test -e ./build/src/yubihsm-shell
test -e ./build/lib/libyubihsm.$LIBEXT
test -e ./build/pkcs11/yubihsm_pkcs11.$LIBEXT
test -e ./build/lib/yubihsm_pkcs11.$LIBEXT
test -e ./build/yhwrap/yubihsm-wrap
- name: Test
if: ${{ matrix.test }}
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
LIBEXT: ${{ matrix.libext }}
OS: ${{ matrix.os }}
run: |
export YUBIHSM_PKCS11_MODULE="`pwd`/build/pkcs11/yubihsm_pkcs11.$LIBEXT"
export YUBIHSM_PKCS11_MODULE="`pwd`/build/lib/yubihsm_pkcs11.$LIBEXT"
pushd /tmp/python-pkcs11tester
echo "connector=$DEFAULT_CONNECTOR_URL" >yubihsm_pkcs11.conf
if [ "$OS" = "macos-latest" ]; then
Expand All @@ -126,7 +126,7 @@ jobs:
OS: ${{ matrix.os }}
run: |
if [ "$OS" != "ubuntu-18.04" ]; then
export YUBIHSM_PKCS11_MODULE="`pwd`/build/pkcs11/yubihsm_pkcs11.$LIBEXT"
export YUBIHSM_PKCS11_MODULE="`pwd`/build/lib/yubihsm_pkcs11.$LIBEXT"
echo "connector=$DEFAULT_CONNECTOR_URL" >yubihsm_pkcs11.conf
export YUBIHSM_PKCS11_CONF=`pwd`/yubihsm_pkcs11.conf
pushd /tmp/yubihsm_sunpkcs11_tests
Expand Down
1 change: 0 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ DEB_BUILD_OPTIONS=noddebs
override_dh_install:
chrpath -d $(CURDIR)/debian/tmp/usr/bin/*
chrpath -d $(CURDIR)/debian/tmp/usr/lib/*.so*
chrpath -d $(CURDIR)/debian/tmp/usr/lib/pkcs11/*.so*
dh_install --fail-missing

override_dh_auto_configure:
Expand Down
2 changes: 1 addition & 1 deletion debian/yubihsm-pkcs11.install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#! /usr/bin/dh-exec

usr/lib/pkcs11/*.so /usr/lib/${DEB_HOST_MULTIARCH}/pkcs11
usr/lib/yubihsm_pkcs11.so /usr/lib/${DEB_HOST_MULTIARCH}/pkcs11
6 changes: 3 additions & 3 deletions pkcs11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ endif(WIN32)

install(
TARGETS yubihsm_pkcs11
ARCHIVE DESTINATION "${YUBIHSM_INSTALL_LIB_DIR}/pkcs11"
LIBRARY DESTINATION "${YUBIHSM_INSTALL_LIB_DIR}/pkcs11"
RUNTIME DESTINATION "${YUBIHSM_INSTALL_BIN_DIR}/pkcs11")
ARCHIVE DESTINATION "${YUBIHSM_INSTALL_LIB_DIR}"
LIBRARY DESTINATION "${YUBIHSM_INSTALL_LIB_DIR}"
RUNTIME DESTINATION "${YUBIHSM_INSTALL_BIN_DIR}")
install(FILES pkcs11.h DESTINATION "${YUBIHSM_INSTALL_INC_DIR}/pkcs11")
install(FILES pkcs11y.h DESTINATION "${YUBIHSM_INSTALL_INC_DIR}/pkcs11")

Expand Down
5 changes: 2 additions & 3 deletions resources/release/linux/yubihsm-shell.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ make install
chrpath -r %{_libdir} %{buildroot}/%{_bindir}/yubihsm-shell
chrpath -r %{_libdir} %{buildroot}/%{_bindir}/yubihsm-wrap
chrpath -r %{_libdir} %{buildroot}/%{_bindir}/yubihsm-auth
chrpath -r %{_libdir} %{buildroot}/%{_libdir}/pkcs11/yubihsm_pkcs11.so
chrpath -r %{_libdir} %{buildroot}/%{_libdir}/yubihsm_pkcs11.so
mkdir -p %{buildroot}/%{_prefix}/share/licenses/%{name}
install -m 0644 ../LICENSE %{buildroot}/%{_prefix}/share/licenses/%{name}

Expand All @@ -58,8 +58,7 @@ install -m 0644 ../LICENSE %{buildroot}/%{_prefix}/share/licenses/%{name}
%{_libdir}/libyubihsm_usb.so.2.*
%{_libdir}/libykhsmauth.so.2
%{_libdir}/libykhsmauth.so.2.*
%dir %{_libdir}/pkcs11
%{_libdir}/pkcs11/yubihsm_pkcs11.so
%{_libdir}/yubihsm_pkcs11.so
%files -n %{_yubihsm}-devel
%{_libdir}/libyubihsm.so
%{_libdir}/libyubihsm_http.so
Expand Down
2 changes: 1 addition & 1 deletion resources/release/macos/make_release_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ install_name_tool -change "$BREW_LIB/libusb/lib/libusb-1.0.0.dylib" "@loader_pa
install_name_tool -change "$BREW_LIB/libusb/lib/libusb-1.0.0.dylib" "@loader_path/../lib/libusb-1.0.0.dylib" "$OUTPUT/lib/libyubihsm_usb.$VERSION.dylib"
install_name_tool -change "$BREW_LIB/libusb/lib/libusb-1.0.0.dylib" "@loader_path/../lib/libusb-1.0.0.dylib" "$OUTPUT/lib/libyubihsm_usb.$SO_VERSION.dylib"

install_name_tool -change "$BREW_LIB/[email protected]/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/pkcs11/yubihsm_pkcs11.dylib"
install_name_tool -change "$BREW_LIB/[email protected]/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/yubihsm_pkcs11.dylib"

install_name_tool -change "$BREW_LIB/[email protected]/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/bin/yubihsm-shell"
install_name_tool -change "$BREW_LIB/[email protected]/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/bin/yubihsm-wrap"
Expand Down
4 changes: 2 additions & 2 deletions resources/release/win/sign_release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rem Sign x64 components
%SIGNCMD% yubihsm-shell-x64\bin\libyubihsm.dll
%SIGNCMD% yubihsm-shell-x64\bin\libyubihsm_http.dll
%SIGNCMD% yubihsm-shell-x64\bin\libyubihsm_usb.dll
%SIGNCMD% yubihsm-shell-x64\bin\pkcs11\yubihsm_pkcs11.dll
%SIGNCMD% yubihsm-shell-x64\bin\yubihsm_pkcs11.dll
%SIGNCMD% yubihsm-shell-x64\bin\ykhsmauth.dll
%SIGNCMD% /d "YubiHSM Authenication" yubihsm-shell-x64\bin\yubihsm-auth.exe
%SIGNCMD% /d "YubiHSM Shell" yubihsm-shell-x64\bin\yubihsm-shell.exe
Expand All @@ -18,7 +18,7 @@ rem Sign x86 components
%SIGNCMD% yubihsm-shell-x86\bin\libyubihsm.dll
%SIGNCMD% yubihsm-shell-x86\bin\libyubihsm_http.dll
%SIGNCMD% yubihsm-shell-x86\bin\libyubihsm_usb.dll
%SIGNCMD% yubihsm-shell-x86\bin\pkcs11\yubihsm_pkcs11.dll
%SIGNCMD% yubihsm-shell-x86\bin\yubihsm_pkcs11.dll
%SIGNCMD% yubihsm-shell-x86\bin\ykhsmauth.dll
%SIGNCMD% /d "YubiHSM Authenication" yubihsm-shell-x86\bin\yubihsm-auth.exe
%SIGNCMD% /d "YubiHSM Shell" yubihsm-shell-x86\bin\yubihsm-shell.exe
Expand Down