summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2020-02-15 20:58:27 -0800
committerPatrick McLean <chutzpah@gentoo.org>2020-02-15 21:04:28 -0800
commita8134142c199931d74b905328e4de4531df70a64 (patch)
tree7c11b77c8053a93e468c1332ca827e61fd19557c /dev-libs
parentdev-libs/libcbor: New package (diff)
downloadgentoo-a8134142c199931d74b905328e4de4531df70a64.tar.gz
gentoo-a8134142c199931d74b905328e4de4531df70a64.tar.bz2
gentoo-a8134142c199931d74b905328e4de4531df70a64.zip
dev-libs/libfido2: New package
Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libfido2/Manifest1
-rw-r--r--dev-libs/libfido2/files/libfido2-1.3.0-cmakelists.patch38
-rw-r--r--dev-libs/libfido2/files/libfido2-1.3.0-remove-openssh-middleware.patch45
-rw-r--r--dev-libs/libfido2/libfido2-1.3.0.ebuild38
-rw-r--r--dev-libs/libfido2/metadata.xml8
5 files changed, 130 insertions, 0 deletions
diff --git a/dev-libs/libfido2/Manifest b/dev-libs/libfido2/Manifest
new file mode 100644
index 000000000000..153536416738
--- /dev/null
+++ b/dev-libs/libfido2/Manifest
@@ -0,0 +1 @@
+DIST libfido2-1.3.0.tar.gz 1516842 BLAKE2B 18a0036127a9f643ef7ca917dab909bfa344caecdfdef3f1f0881bd7c84b73ea8273a57a2daccc95cc448d7777c389a8f573f663895abd78c48b3340a45f7764 SHA512 9cfb872b898fb6659e0c5e377b5f80738c22dadc4768be02b8cb5e4f4932cb4edde360cd84aac78eb3e3a57d3bc10b4147740a4830d16adcdefe7c48fa460d36
diff --git a/dev-libs/libfido2/files/libfido2-1.3.0-cmakelists.patch b/dev-libs/libfido2/files/libfido2-1.3.0-cmakelists.patch
new file mode 100644
index 000000000000..a5a4b721ed0d
--- /dev/null
+++ b/dev-libs/libfido2/files/libfido2-1.3.0-cmakelists.patch
@@ -0,0 +1,38 @@
+diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
+index 71bc502..ac424d2 100644
+--- a/man/CMakeLists.txt
++++ b/man/CMakeLists.txt
+@@ -2,11 +2,12 @@
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
+
++include(GNUInstallDirs)
++
+ find_program(MANDOC_PATH mandoc)
+ message(STATUS "MANDOC_PATH: ${MANDOC_PATH}")
+
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+- find_program(GZIP_PATH gzip)
+ message(STATUS "GZIP_PATH: ${GZIP_PATH}")
+ endif()
+
+@@ -301,16 +302,16 @@ elseif(NOT MSVC)
+ foreach(f ${MAN_SOURCES})
+ if (${f} MATCHES ".1$")
+ install(FILES ${CMAKE_BINARY_DIR}/man/${f}
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/man/man1")
++ DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
+ elseif(${f} MATCHES ".3$")
+ install(FILES ${CMAKE_BINARY_DIR}/man/${f}
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/man/man3")
++ DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
+ endif()
+ endforeach()
+ foreach(i RANGE 0 ${MAN_ALIAS_MAX} 2)
+ math(EXPR j "${i} + 1")
+ list(GET MAN_ALIAS ${j} DST)
+ install(FILES ${CMAKE_BINARY_DIR}/man/${DST}.3
+- DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man3)
++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
+ endforeach()
+ endif()
diff --git a/dev-libs/libfido2/files/libfido2-1.3.0-remove-openssh-middleware.patch b/dev-libs/libfido2/files/libfido2-1.3.0-remove-openssh-middleware.patch
new file mode 100644
index 000000000000..7dec27b861f9
--- /dev/null
+++ b/dev-libs/libfido2/files/libfido2-1.3.0-remove-openssh-middleware.patch
@@ -0,0 +1,45 @@
+diff --git a/README.adoc b/README.adoc
+index 8693417..023f2e9 100644
+--- a/README.adoc
++++ b/README.adoc
+@@ -71,18 +71,3 @@ KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \
+ On Windows 1903 and newer versions, access to FIDO devices has been restricted
+ to applications using the operating system's native API. Use of *libfido2*
+ is still possible in privileged applications.
+-
+-=== OpenSSH Integration
+-
+-*libfido2* includes middleware allowing https://www.openssh.com[OpenSSH] to
+-talk to U2F/FIDO2 devices. Note that server support is required for
+-authentication. In a nutshell:
+-
+-==== Key Generation
+-
+- $ ssh-keygen -t [ecdsa-sk|ed25519-sk] -w /path/to/libsk-libfido2.so
+-
+-==== Authentication
+-
+- $ ssh-agent -P /path/to/libsk-libfido2.so
+- $ ssh-add -S /path/to/libsk-libfido2.so
+diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
+index 5f27e88..c44d1df 100644
+--- a/tools/CMakeLists.txt
++++ b/tools/CMakeLists.txt
+@@ -49,17 +49,9 @@ add_executable(fido2-token
+ ${COMPAT_SOURCES}
+ )
+
+-add_library(sk-libfido2 MODULE sk-libfido2.c)
+-set_target_properties(sk-libfido2 PROPERTIES
+- COMPILE_FLAGS "-DSK_STANDALONE -DWITH_OPENSSL"
+- OUTPUT_NAME sk-libfido2
+-)
+-
+ target_link_libraries(fido2-cred ${CRYPTO_LIBRARIES} fido2_shared)
+ target_link_libraries(fido2-assert ${CRYPTO_LIBRARIES} fido2_shared)
+ target_link_libraries(fido2-token ${CRYPTO_LIBRARIES} fido2_shared)
+-target_link_libraries(sk-libfido2 ${CRYPTO_LIBRARIES} fido2_shared)
+
+ install(TARGETS fido2-cred fido2-assert fido2-token
+ DESTINATION ${CMAKE_INSTALL_BINDIR})
+-install(TARGETS sk-libfido2 DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/dev-libs/libfido2/libfido2-1.3.0.ebuild b/dev-libs/libfido2/libfido2-1.3.0.ebuild
new file mode 100644
index 000000000000..5c54a13fba26
--- /dev/null
+++ b/dev-libs/libfido2/libfido2-1.3.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+DESCRIPTION="Provides library functionality for FIDO 2.0"
+HOMEPAGE="https://github.com/Yubico/libfido2"
+SRC_URI="https://github.com/Yubico/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0/1"
+KEYWORDS="~amd64 ~x86"
+IUSE="libressl +static-libs"
+
+DEPEND="
+ dev-libs/libcbor:=
+ virtual/libudev:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/libfido2-1.3.0-cmakelists.patch"
+
+ # from upstream git, no longer needed with openssh-8.2
+ "${FILESDIR}/libfido2-1.3.0-remove-openssh-middleware.patch"
+)
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use static-libs; then
+ rm -f "${D}/$(get_libdir)"/*.a || die
+ fi
+}
diff --git a/dev-libs/libfido2/metadata.xml b/dev-libs/libfido2/metadata.xml
new file mode 100644
index 000000000000..4eb20a048df2
--- /dev/null
+++ b/dev-libs/libfido2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+</pkgmetadata>