diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2007-06-23 20:00:20 +0000 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2007-06-23 20:00:20 +0000 |
commit | 4eedb37ec98576e9dabf54e2657ba12d282c2853 (patch) | |
tree | bff5aed2a764fa68feafc399cde5b004d2b89b52 /app-crypt/tpm-emulator | |
parent | q8/q32: Improve descriptions. (diff) | |
download | gentoo-2-4eedb37ec98576e9dabf54e2657ba12d282c2853.tar.gz gentoo-2-4eedb37ec98576e9dabf54e2657ba12d282c2853.tar.bz2 gentoo-2-4eedb37ec98576e9dabf54e2657ba12d282c2853.zip |
Version bump, bug#171561
(Portage version: 2.1.3_rc4)
Diffstat (limited to 'app-crypt/tpm-emulator')
-rw-r--r-- | app-crypt/tpm-emulator/ChangeLog | 8 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/files/digest-tpm-emulator-0.5 | 3 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/files/tpm-emulator.initd | 54 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/files/tpm-emulator.udev | 1 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/tpm-emulator-0.5.ebuild | 59 |
5 files changed, 124 insertions, 1 deletions
diff --git a/app-crypt/tpm-emulator/ChangeLog b/app-crypt/tpm-emulator/ChangeLog index 44c05b39ae95..12d75a038a26 100644 --- a/app-crypt/tpm-emulator/ChangeLog +++ b/app-crypt/tpm-emulator/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-crypt/tpm-emulator # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/ChangeLog,v 1.6 2007/02/23 15:25:35 alonbl Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/ChangeLog,v 1.7 2007/06/23 20:00:20 alonbl Exp $ + +*tpm-emulator-0.5 (23 Jun 2007) + + 23 Jun 2007; Alon Bar-Lev <alonbl@gentoo.org> +files/tpm-emulator.initd, + +files/tpm-emulator.udev, +tpm-emulator-0.5.ebuild: + Version bump, bug#171561 23 Feb 2007; Alon Bar-Lev <alonbl@gentoo.org> -files/tpm-emulator-0.2a-inline.patch, -tpm-emulator-0.2a.ebuild, diff --git a/app-crypt/tpm-emulator/files/digest-tpm-emulator-0.5 b/app-crypt/tpm-emulator/files/digest-tpm-emulator-0.5 new file mode 100644 index 000000000000..a901d917201c --- /dev/null +++ b/app-crypt/tpm-emulator/files/digest-tpm-emulator-0.5 @@ -0,0 +1,3 @@ +MD5 c8b13bb190df4e8a9cdef6b4a32aa591 tpm_emulator-0.5.tar.gz 267193 +RMD160 a4b8d3524fef16993afa291a724d27c798f90733 tpm_emulator-0.5.tar.gz 267193 +SHA256 b6d88a601d47cfb98d00f5fc8abe3aeadd8e205781d5fd745cf7cd47d158fade tpm_emulator-0.5.tar.gz 267193 diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.initd b/app-crypt/tpm-emulator/files/tpm-emulator.initd new file mode 100644 index 000000000000..32a7577746d1 --- /dev/null +++ b/app-crypt/tpm-emulator/files/tpm-emulator.initd @@ -0,0 +1,54 @@ +#!/sbin/runscript +# Copyright 1999-2005 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,v 1.1 2007/06/23 20:00:20 alonbl Exp $ + +opts="save clear deactivated" + +STARTUP_MODE='save'; + + +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 --chuid tss --exec /usr/sbin/tpmd $STARTUP_MODE > /dev/null + eend $? +} + +save() { + STARTUP_MODE='save'; + svc_restart +} + +clear() { + STARTUP_MODE='clear'; + svc_restart +} + +deactivated() { + STARTUP_MODE='deactivated'; + svc_restart +} + +stop() { + ebegin "Stopping tpm-emulator daemon (tpmd)" + start-stop-daemon --stop --exec /usr/sbin/tpmd --user tss > /dev/null + eend $? +} diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.udev b/app-crypt/tpm-emulator/files/tpm-emulator.udev new file mode 100644 index 000000000000..01a481f45cba --- /dev/null +++ b/app-crypt/tpm-emulator/files/tpm-emulator.udev @@ -0,0 +1 @@ +KERNEL=="tpm", NAME="%k", SYMLINK="tpm0", GROUP="tss", MODE="0660" diff --git a/app-crypt/tpm-emulator/tpm-emulator-0.5.ebuild b/app-crypt/tpm-emulator/tpm-emulator-0.5.ebuild new file mode 100644 index 000000000000..daaad636e88a --- /dev/null +++ b/app-crypt/tpm-emulator/tpm-emulator-0.5.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2007 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.5.ebuild,v 1.1 2007/06/23 20:00:20 alonbl Exp $ + +inherit toolchain-funcs linux-mod eutils + +MY_P=${P/-/_} +DESCRIPTION="Emulator driver for tpm" +HOMEPAGE="https://developer.berlios.de/projects/tpm-emulator" + +SRC_URI="http://download.berlios.de/tpm-emulator/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" +DEPEND="dev-libs/gmp" +RDEPEND="" +S=${WORKDIR}/${P/-/_} + +#fixups at: +#https://developer.berlios.de/feature/index.php?func=detailfeature&feature_id=3304&group_id=2491 + +pkg_setup() { + linux-mod_pkg_setup + MODULE_NAMES="tpmd_dev(crypt::${S}/tpmd_dev)" + BUILD_TARGETS="all" + BUILD_PARAMS="CC=$(tc-getCC)" + enewuser tss +} + +src_unpack() { + unpack ${A} + cd "${S}" + sed -i 's/LDFLAGS :=/override LDFLAGS +=/g' tpmd/Makefile + sed -i 's#/var/tpm#/var/run/tpm#g' tpmd/tpmd.c tddl/tddl.c tpm_dev/linux_module.c +} + +src_install() { + if [ -x /usr/bin/scanelf ]; then + [ -z "$(/usr/bin/scanelf -qs __guard tpm_emulator.ko)" ] || \ + die 'cannot have gmp compiled with hardened flags' + [ -z "$(/usr/bin/scanelf -qs __stack_smash_handler tpm_emulator.ko)" ] || \ + die 'cannot have gmp compiled with hardened flags' + fi + + linux-mod_src_install + dodoc README + dosbin tpmd/tpmd + dolib.so tddl/libtddl.so + insinto /usr/include + doins tddl/tddl.h + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + insinto /etc/udev/rules.d + newins "${FILESDIR}/${PN}.udev" "60-${PN}.rules" + keepdir /var/run/tpm + fowners tss /var/run/tpm +} + |