diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-libs/opencryptoki | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-libs/opencryptoki')
| -rw-r--r-- | dev-libs/opencryptoki/Manifest | 1 | ||||
| -rw-r--r-- | dev-libs/opencryptoki/files/pkcsslotd.init.2 | 27 | ||||
| -rw-r--r-- | dev-libs/opencryptoki/metadata.xml | 12 | ||||
| -rw-r--r-- | dev-libs/opencryptoki/opencryptoki-3.6.1-r1.ebuild | 101 |
4 files changed, 141 insertions, 0 deletions
diff --git a/dev-libs/opencryptoki/Manifest b/dev-libs/opencryptoki/Manifest new file mode 100644 index 000000000000..fadade59bcd6 --- /dev/null +++ b/dev-libs/opencryptoki/Manifest @@ -0,0 +1 @@ +DIST opencryptoki-3.6.1.tgz 1068197 BLAKE2B 0e7d867bd21863f56471ac2c8664148e5a6988ffc30e71feaf960245a1908d676c1791f2b751de4bdd694096bf7360af3a8f79df895eef1b8f61391aba09aaad SHA512 1874fabba6d3da49596622c7f8142a37329df95f129cb08319bb3900a944dde1ae5ce9d845d400726f4bda4579c730012b9bfd6c69c6d5a16b1f75b28a0ba4af diff --git a/dev-libs/opencryptoki/files/pkcsslotd.init.2 b/dev-libs/opencryptoki/files/pkcsslotd.init.2 new file mode 100644 index 000000000000..44056b0e50b7 --- /dev/null +++ b/dev-libs/opencryptoki/files/pkcsslotd.init.2 @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need localmount + + # Optional services (see ebuild) + use tcsd +} + +start() { + # detect available tokens and set up + # /var/lib/opencryptoki/pk_config_data + ebegin "Preparing pkcs configuration" + /usr/sbin/pkcs11_startup + + ebegin "Starting pkcsslotd" + start-stop-daemon --start --exec /usr/sbin/pkcsslotd --pidfile /var/run/pkcsslotd.pid + eend $? "Check your logs to see why startup failed" +} + +stop() { + ebegin "Stopping pkcsslotd" + start-stop-daemon --stop --exec /usr/sbin/pkcsslotd --pidfile /var/run/pkcsslotd.pid + eend $? +} diff --git a/dev-libs/opencryptoki/metadata.xml b/dev-libs/opencryptoki/metadata.xml new file mode 100644 index 000000000000..c9e82879e939 --- /dev/null +++ b/dev-libs/opencryptoki/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <use> + <flag name="tpm">Enable support for Trusted Platform Module (TPM) using <pkg>app-crypt/trousers</pkg> + </flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:opencryptoki_project:opencryptoki</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/dev-libs/opencryptoki/opencryptoki-3.6.1-r1.ebuild b/dev-libs/opencryptoki/opencryptoki-3.6.1-r1.ebuild new file mode 100644 index 000000000000..5ab79025d6a4 --- /dev/null +++ b/dev-libs/opencryptoki/opencryptoki-3.6.1-r1.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic + +DESCRIPTION="PKCS#11 provider cryptographic hardware" +HOMEPAGE="https://sourceforge.net/projects/opencryptoki" +SRC_URI="https://downloads.sourceforge.net/opencryptoki/${PV}/${P}.tgz" +S="${WORKDIR}/${PN}" + +# Upstream is looking into relicensing it into CPL-1.0 entirely; the CCA +# token sources are under CPL-1.0 already. +LICENSE="CPL-0.5" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~s390 ~x86" +IUSE="debug +tpm" + +DEPEND=" + tpm? ( app-crypt/trousers ) + >=dev-libs/openssl-1.1.0:0= +" +RDEPEND=" + ${DEPEND} + acct-group/pkcs11 +" + +DOCS=( + README AUTHORS FAQ TODO + doc/openCryptoki-HOWTO.pdf +) + +# tests right now basically don't exist; the only available thing would +# test against an installed copy and would kill a running pcscd, all +# things that we're not interested to. +RESTRICT=test + +src_prepare() { + default + mv configure.in configure.ac || die + eautoreconf +} + +src_configure() { + # package uses ${localstatedir}/lib as the default path, so if we + # leave it to econf, it'll create /var/lib/lib. + + # Since upstream by default seem to enable any possible token, even + # when they don't seem to be used, we limit ourselves to the + # software emulation token (swtok) and if the user enabled the tpm + # USE flag, tpmtok. The rest of the tokens seem to be hardware- or + # software-dependent even when they build fine without their + # requirements, but until somebody asks for those, I'd rather not + # enable them. + + # We don't use --enable-debug because that tinkers with the CFLAGS + # and we don't want that. Instead we append -DDEBUG which enables + # debug information. + use debug && append-flags -DDEBUG + + econf \ + --localstatedir=/var \ + --enable-fast-install \ + --disable-debug \ + --enable-daemon \ + --enable-library \ + --disable-icatok \ + --enable-swtok \ + $(use_enable tpm tpmtok) \ + --disable-ccatok +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die + + # Install libopencryptoki in the standard directory for libraries. + mv "${ED}"/usr/$(get_libdir)/opencryptoki/libopencryptoki.so* "${ED}"/usr/$(get_libdir) || die + rm "${ED}"/usr/$(get_libdir)/pkcs11/libopencryptoki.so || die + dosym ../libopencryptoki.so /usr/$(get_libdir)/pkcs11/libopencryptoki.so + + # Remove compatibility symlinks as we _never_ required those and + # they seem unused even upstream. + find "${ED}" -name 'PKCS11_*' -delete || die + + # We replace their ld.so and init files (mostly designed for RedHat + # as far as I can tell) with our own replacements. + rm -rf "${ED}"/etc/ld.so.conf.d "${ED}"/etc/rc.d || die + + # make sure that we don't modify the init script if the USE flags + # are enabled for the needed services. + cp "${FILESDIR}"/pkcsslotd.init.2 "${T}"/pkcsslotd.init || die + use tpm || sed -i -e '/use tcsd/d' "${T}"/pkcsslotd.init + newinitd "${T}/pkcsslotd.init" pkcsslotd + + # We create /var dirs at runtime as needed, so don't bother installing + # our own. + rm -r "${ED}"/var/{lib,lock} || die +} |
