summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2012-12-23 01:25:26 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2012-12-23 01:25:26 +0000
commit0f99fe0b40c6a30da7f57b33983295c00ab72019 (patch)
tree820ab2a59678f9d06970adced0f8919f98d7c07f /app-crypt/tpm-emulator
parentfix python dep (diff)
downloadgentoo-2-0f99fe0b40c6a30da7f57b33983295c00ab72019.tar.gz
gentoo-2-0f99fe0b40c6a30da7f57b33983295c00ab72019.tar.bz2
gentoo-2-0f99fe0b40c6a30da7f57b33983295c00ab72019.zip
Version bump, per bug#371551
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-crypt/tpm-emulator')
-rw-r--r--app-crypt/tpm-emulator/ChangeLog10
-rw-r--r--app-crypt/tpm-emulator/files/tpm-emulator.confd-0.7.42
-rw-r--r--app-crypt/tpm-emulator/files/tpm-emulator.initd-0.5.14
-rwxr-xr-xapp-crypt/tpm-emulator/files/tpm-emulator.initd-0.7.459
-rw-r--r--app-crypt/tpm-emulator/tpm-emulator-0.7.4.ebuild72
5 files changed, 143 insertions, 4 deletions
diff --git a/app-crypt/tpm-emulator/ChangeLog b/app-crypt/tpm-emulator/ChangeLog
index ba7f9ce940ca..5fd1c2325b76 100644
--- a/app-crypt/tpm-emulator/ChangeLog
+++ b/app-crypt/tpm-emulator/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-crypt/tpm-emulator
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/ChangeLog,v 1.17 2012/12/11 15:44:01 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/ChangeLog,v 1.18 2012/12/23 01:25:26 alonbl Exp $
+
+*tpm-emulator-0.7.4 (23 Dec 2012)
+
+ 23 Dec 2012; Alon Bar-Lev <alonbl@gentoo.org> +files/tpm-emulator.confd-0.7.4,
+ +files/tpm-emulator.initd-0.7.4, +tpm-emulator-0.7.4.ebuild,
+ files/tpm-emulator.initd-0.5.1:
+ Version bump, per bug#371551
11 Dec 2012; Ian Stakenvicius <axs@gentoo.org> tpm-emulator-0.5.1-r1.ebuild:
use udev.eclass to handle rules installation (a cleaner method than the
@@ -81,4 +88,3 @@
+files/tpm-emulator-0.2a-inline.patch, +metadata.xml,
+tpm-emulator-0.2a.ebuild:
initial import
-
diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.confd-0.7.4 b/app-crypt/tpm-emulator/files/tpm-emulator.confd-0.7.4
new file mode 100644
index 000000000000..da24e57840b9
--- /dev/null
+++ b/app-crypt/tpm-emulator/files/tpm-emulator.confd-0.7.4
@@ -0,0 +1,2 @@
+STARTUP_MODE="save"
+#DEBUG="true"
diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.5.1 b/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.5.1
index c0652f2fcd63..1e93950b59ae 100644
--- a/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.5.1
+++ b/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.5.1
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.5.1,v 1.1 2009/09/21 10:40:39 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.5.1,v 1.2 2012/12/23 01:25:26 alonbl Exp $
opts="save clear deactivated"
diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.7.4 b/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.7.4
new file mode 100755
index 000000000000..16e4c370162f
--- /dev/null
+++ b/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.7.4
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.7.4,v 1.1 2012/12/23 01:25:26 alonbl Exp $
+
+STARTUP_MODE='save';
+
+extra_started_commands="clear save deactivated"
+command="/usr/bin/tpmd"
+command_args="-o tss -g tss"
+
+depend() {
+ use logger
+ after coldplug
+}
+
+checkconfig() {
+ lsmod | grep -q "^tpmd_dev\b" \
+ || modprobe tpmd_dev &>/dev/null \
+ || eerror "Failed to load module tpmd_dev";
+
+ if [ ! -c /dev/tpm ] && [ ! -c /dev/tpm0 ] ; then
+ eerror "No TPM device found!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ ebegin "Starting tpm-emulator daemon with mode '$STARTUP_MODE' (tpmd)"
+ checkconfig || eend $?
+ start-stop-daemon --start --exec "${command}" -- ${command_args} $STARTUP_MODE > /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tpm-emulator daemon (tpmd)"
+ start-stop-daemon --stop --exec "${command}" -- ${command_args} > /dev/null
+ eend $?
+}
+
+clear() {
+ STARTUP_MODE='clear';
+ stop
+ start
+}
+
+save() {
+ STARTUP_MODE='save';
+ stop
+ start
+}
+
+deactivated() {
+ STARTUP_MODE='deactivated';
+ stop
+ start
+}
+
diff --git a/app-crypt/tpm-emulator/tpm-emulator-0.7.4.ebuild b/app-crypt/tpm-emulator/tpm-emulator-0.7.4.ebuild
new file mode 100644
index 000000000000..20fdb23c2449
--- /dev/null
+++ b/app-crypt/tpm-emulator/tpm-emulator-0.7.4.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/tpm-emulator-0.7.4.ebuild,v 1.1 2012/12/23 01:25:26 alonbl Exp $
+
+EAPI=2
+inherit user linux-mod cmake-utils udev
+
+MY_P=${P/-/_}
+DESCRIPTION="Emulator driver for tpm"
+HOMEPAGE="https://developer.berlios.de/projects/tpm-emulator"
+SRC_URI="mirror://berlios/tpm-emulator/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="ssl modules"
+RDEPEND="ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ !ssl? ( dev-libs/gmp )"
+
+S=${WORKDIR}/${P/-/_}
+
+pkg_setup() {
+ enewuser tss -1 -1 /var/lib/tpm tss
+ if use modules; then
+ CONFIG_CHECK="MODULES"
+ linux-mod_pkg_setup
+ BUILD_TARGETS="all"
+ BUILD_PARAMS="KERNEL_BUILD=${KERNEL_DIR}"
+ fi
+}
+
+src_prepare() {
+ # do not build and install the kernel module
+ sed -i 's/COMMAND ${tpmd_dev_BUILD_CMD}//' tpmd_dev/CMakeLists.txt || die
+ sed -i 's/install(CODE.*//' tpmd_dev/CMakeLists.txt || die
+}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_use ssl OPENSSL)
+ )
+ cmake-utils_src_configure
+
+ # only here we have BUILD_DIR
+ MODULE_NAMES="tpmd_dev(misc:${BUILD_DIR}/tpmd_dev/linux)"
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use modules && linux-mod_src_compile
+ emake -C ${BUILD_DIR}/tpmd_dev/linux tpmd_dev.rules
+}
+
+src_install() {
+ cmake-utils_src_install
+ use modules && linux-mod_src_install
+
+ dodoc README
+
+ udev_newrules "${BUILD_DIR}/tpmd_dev/linux/tpmd_dev.rules" 60-tpmd_dev.rules
+
+ newinitd "${FILESDIR}"/${PN}.initd-0.7.4 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd-0.7.4 ${PN}
+
+ keepdir /var/run/tpm
+ fowners tss /var/run/tpm
+
+ keepdir /var/log/tpm
+ fowners tss:tss /var/log/tpm
+}