diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2009-09-21 10:40:39 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2009-09-21 10:40:39 +0000 |
commit | d7848b460e102f35dee85615c9447dc171d63156 (patch) | |
tree | 5c1c68588cfd6404f8a8c56da878f3da6629cd42 /app-crypt/tpm-emulator | |
parent | Version bump (diff) | |
download | historical-d7848b460e102f35dee85615c9447dc171d63156.tar.gz historical-d7848b460e102f35dee85615c9447dc171d63156.tar.bz2 historical-d7848b460e102f35dee85615c9447dc171d63156.zip |
Version bump, per bug #252446. Thanks to Andreas Niederl <rico32@gmx.net> for fixing bugs 249290, 241956, 264073. Ebuild also cleaned up to use upstream build system more.
Package-Manager: portage-2.2_rc40/cvs/Linux x86_64
Diffstat (limited to 'app-crypt/tpm-emulator')
-rw-r--r-- | app-crypt/tpm-emulator/ChangeLog | 12 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/Manifest | 9 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/files/tpm-emulator-0.5.1-parallel-make.patch | 65 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/files/tpm-emulator.confd-0.5.1 | 2 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/files/tpm-emulator.initd-0.5.1 | 60 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/files/tpm-emulator.udev | 2 | ||||
-rw-r--r-- | app-crypt/tpm-emulator/tpm-emulator-0.5.1.ebuild | 81 |
7 files changed, 227 insertions, 4 deletions
diff --git a/app-crypt/tpm-emulator/ChangeLog b/app-crypt/tpm-emulator/ChangeLog index 981c583aec7e..05263cded27c 100644 --- a/app-crypt/tpm-emulator/ChangeLog +++ b/app-crypt/tpm-emulator/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for app-crypt/tpm-emulator # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/ChangeLog,v 1.10 2009/05/10 23:07:30 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/ChangeLog,v 1.11 2009/09/21 10:40:39 robbat2 Exp $ + +*tpm-emulator-0.5.1 (21 Sep 2009) + + 21 Sep 2009; Robin H. Johnson <robbat2@gentoo.org> + +files/tpm-emulator.confd-0.5.1, +files/tpm-emulator.initd-0.5.1, + +tpm-emulator-0.5.1.ebuild, +files/tpm-emulator-0.5.1-parallel-make.patch, + files/tpm-emulator.udev: + Version bump, per bug #252446. Thanks to Andreas Niederl <rico32@gmx.net> + for fixing bugs 249290, 241956, 264073. Ebuild also cleaned up to use + upstream build system more. 10 May 2009; Robin H. Johnson <robbat2@gentoo.org> tpm-emulator-0.5.ebuild: diff --git a/app-crypt/tpm-emulator/Manifest b/app-crypt/tpm-emulator/Manifest index 02270d0dfc90..350ffab522d7 100644 --- a/app-crypt/tpm-emulator/Manifest +++ b/app-crypt/tpm-emulator/Manifest @@ -1,6 +1,11 @@ +AUX tpm-emulator-0.5.1-parallel-make.patch 1910 RMD160 2d4b1f982e8a6ccccbd70ba2daf07b741b5c7f9e SHA1 c66020ec71c26637796cb8435963557cdacd6bc0 SHA256 2af0336f84a5e9f38413fef5cebea825b8e57423f0a080a59598d8c1e1929789 +AUX tpm-emulator.confd-0.5.1 34 RMD160 7ad76da904d93e76d964144d9478fe0005fd4180 SHA1 695b1314b1709eacf713e7374b3c93892928d054 SHA256 3af4a1b3f83919225c4a66f3de3159bed4e8eec4d55e9da848018c5ea66541ee AUX tpm-emulator.initd 1098 RMD160 fce139ea424d354493388337953f83307177e662 SHA1 931cfcb246f965fc5d0bea36986c26e2e662fa06 SHA256 006cbc727471aa46e6b39783a32456c3a43cb1adf25a54ddf0e9b9c9ab92c10c -AUX tpm-emulator.udev 67 RMD160 d6edf7ece9deef9d26e5adcb881996a9e9266d42 SHA1 8a7e98d62f5bebd4b11167ebc5b170f5ecf38299 SHA256 155c16901e87673317fec00be3e9a9ebee9eef6fe53eda9cf6e03fcfd60a72e2 +AUX tpm-emulator.initd-0.5.1 1307 RMD160 2b08d7e6cd3f0a644dde3aab4d5caa9e8fbdb28b SHA1 bbef23e51600e41e829374002eeb12b4a783fc0c SHA256 28d874aa0cebd914201aaca40062e924c919ee60ef94070196b1c132f7bc7ebb +AUX tpm-emulator.udev 68 RMD160 db903b903b3cf57bbf8dd7966410635edaee8814 SHA1 40537f10fc8efacde160d4bdec98522af7f95328 SHA256 b19ebed090177546d76eacbdd52ab68f32c3a3c46598e437b3fd5780efa9c164 +DIST tpm_emulator-0.5.1.tar.gz 146565 RMD160 04a11243f8f1b0312258f02478e3b829f4132138 SHA1 446a28a580612f27ba286de2ddc65a5178d73bf7 SHA256 b83f9fe00d77c9d88bcce0dfbd26e9b29992846fa8f995bdfff7bce88a98906c DIST tpm_emulator-0.5.tar.gz 267193 RMD160 a4b8d3524fef16993afa291a724d27c798f90733 SHA1 f8d1da3d5305b0d69e106d58708c643ec890f426 SHA256 b6d88a601d47cfb98d00f5fc8abe3aeadd8e205781d5fd745cf7cd47d158fade +EBUILD tpm-emulator-0.5.1.ebuild 2282 RMD160 70e68db66672c7098ab432cc39f14f0f8430553b SHA1 a5fb7d6fea01ce2dfb2b41d8b0436d2011254c6d SHA256 0bfc92b17b98eaf0bd4c5690a6307186722a099c2a4facee595e6633c2a9f57b EBUILD tpm-emulator-0.5.ebuild 1598 RMD160 fb0a2d5ac942a99586ee7e7d71f9d6f2047c345d SHA1 2edfca8106c716314f381f6cb86336f58f325a0a SHA256 2430afeb50bd826905e501781d48cf9d7760d29fc9c41fd632a0ce08a811d41e -MISC ChangeLog 1677 RMD160 0381e6535c7e941093497bdefe73b9f843c24782 SHA1 6647a381860726c9b1a4802cf13a2ac2aa07c454 SHA256 5a7e4e1b2c4f42845801c2a4681dbbae6f2138902058c91dc61b6b8c00bc2dcb +MISC ChangeLog 2116 RMD160 553eb6401ec34360aabf4cf2f31c53a8fcde319b SHA1 11927487ebb3c76383196693597c87536e950145 SHA256 0c9fda0486e6945d7a4bfa6fccf034029a93ddaa4c911cacca2e3a9c95712058 MISC metadata.xml 251 RMD160 9c13ff790c7419d4e0d2d370036b7f4e4594ea4f SHA1 563aa19984b291a6cade6d6487dbf4a2a17e6874 SHA256 1739a4e8833a2a5b9501182eb830cbd3e26014ccef5e9ae1b4d7a0686c665c1b diff --git a/app-crypt/tpm-emulator/files/tpm-emulator-0.5.1-parallel-make.patch b/app-crypt/tpm-emulator/files/tpm-emulator-0.5.1-parallel-make.patch new file mode 100644 index 000000000000..0a82a7159e0b --- /dev/null +++ b/app-crypt/tpm-emulator/files/tpm-emulator-0.5.1-parallel-make.patch @@ -0,0 +1,65 @@ +commit b3d254296c1d3dbc6058f294041481af8972a661 +Author: Andreas Niederl <rico32@gmx.net> +Date: Sun Aug 30 16:52:57 2009 +0200 + + fix version target in Makefile + +diff --git a/Makefile b/Makefile +index 9260014..de54e52 100644 +--- a/Makefile ++++ b/Makefile +@@ -12,33 +12,35 @@ VERSION_SUFFIX := .1 + + SUBDIRS := tpmd tpmd_dev tddl + +-all: version all-recursive ++all: all-recursive + +-version: +- @echo "#ifndef _TPM_VERSION_H_" > tpm/tpm_version.h +- @echo "#define _TPM_VERSION_H_" >> tpm/tpm_version.h +- @echo "#define VERSION_MAJOR $(VERSION_MAJOR)" >> tpm/tpm_version.h +- @echo "#define VERSION_MINOR $(VERSION_MINOR)" >> tpm/tpm_version.h +- @echo "#define VERSION_BUILD $(VERSION_BUILD)" >> tpm/tpm_version.h +- @echo "#endif /* _TPM_VERSION_H_ */" >> tpm/tpm_version.h ++version := tpm/tpm_version.h ++ ++$(version): ++ @echo "#ifndef _TPM_VERSION_H_" > $@ ++ @echo "#define _TPM_VERSION_H_" >> $@ ++ @echo "#define VERSION_MAJOR $(VERSION_MAJOR)" >> $@ ++ @echo "#define VERSION_MINOR $(VERSION_MINOR)" >> $@ ++ @echo "#define VERSION_BUILD $(VERSION_BUILD)" >> $@ ++ @echo "#endif /* _TPM_VERSION_H_ */" >> $@ + + clean: clean-recursive +- rm -f tpm/tpm_version.h ++ rm -f $(version) + + install: install-recursive + +-all-recursive clean-recursive install-recursive: ++all-recursive clean-recursive install-recursive: $(version) + @target=`echo $@ | sed s/-recursive//`; \ + for subdir in $(SUBDIRS); do \ + echo "Making $$target in $$subdir"; \ + $(MAKE) -C $$subdir $$target || exit -1; \ + done + +-user: version ++user: $(version) + @$(MAKE) -C tpmd all || exit -1 + @$(MAKE) -C tddl all || exit -1 + +-modules: version ++modules: $(version) + @$(MAKE) -C tpmd_dev all || exit -1 + + user_install: user +@@ -62,5 +64,5 @@ dist: $(DISTSRC) + tar -chzf $(DISTDIR).tar.gz $(DISTDIR) + @rm -rf $(DISTDIR) + +-.PHONY: all version clean install dist ++.PHONY: all clean install dist + diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.confd-0.5.1 b/app-crypt/tpm-emulator/files/tpm-emulator.confd-0.5.1 new file mode 100644 index 000000000000..da24e57840b9 --- /dev/null +++ b/app-crypt/tpm-emulator/files/tpm-emulator.confd-0.5.1 @@ -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 new file mode 100644 index 000000000000..c0652f2fcd63 --- /dev/null +++ b/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.5.1 @@ -0,0 +1,60 @@ +#!/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-0.5.1,v 1.1 2009/09/21 10:40:39 robbat2 Exp $ + +opts="save clear deactivated" + +STARTUP_MODE="${STARTUP_MODE:-'save'}" + +LOGFILE=/var/log/tpm/tpm-emulator.log + + +depend() { + use logger + after coldplug +} + +checkconfig() { + lsmod | grep -q "^tpmd_dev\b" \ + || modprobe tpmd_dev &>/dev/null \ + || eerror "Failed to load module tpmd_dev, assuming you have it built-in to kernel."; + + 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 \ + --background --stdout $LOGFILE --stderr $LOGFILE \ + --exec /usr/sbin/tpmd -- -f ${DEBUG:+-d} $STARTUP_MODE + sleep 1 + chmod g+w /var/run/tpm/tpmd_socket:0 + 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 index 01a481f45cba..ca053b9d36d3 100644 --- a/app-crypt/tpm-emulator/files/tpm-emulator.udev +++ b/app-crypt/tpm-emulator/files/tpm-emulator.udev @@ -1 +1 @@ -KERNEL=="tpm", NAME="%k", SYMLINK="tpm0", GROUP="tss", MODE="0660" +KERNEL=="tpm", NAME="%k", SYMLINK+="tpm0", GROUP="tss", MODE="0660" diff --git a/app-crypt/tpm-emulator/tpm-emulator-0.5.1.ebuild b/app-crypt/tpm-emulator/tpm-emulator-0.5.1.ebuild new file mode 100644 index 000000000000..03f9ece4c725 --- /dev/null +++ b/app-crypt/tpm-emulator/tpm-emulator-0.5.1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2009 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.1.ebuild,v 1.1 2009/09/21 10:40:39 robbat2 Exp $ + +EAPI=2 +inherit toolchain-funcs linux-mod eutils + +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="modules" +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() { + use modules && linux-mod_pkg_setup + MODULE_NAMES="tpmd_dev(crypt::${S}/tpmd_dev)" + BUILD_TARGETS="all" + BUILD_PARAMS="CC=$(tc-getCC)" + enewuser tss -1 -1 /var/lib/tpm tss +} + +src_prepare() { + 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 tpmd_dev/tpmd_dev.c + + # use kernel object directory found by linux-info getversion() (bug 241956) + sed -i 's#/lib/modules/\$(KERNEL_RELEASE)/build#'"${KV_OUT_DIR}#" tpmd_dev/Makefile + + # reorder -lgmp so --as-needed works (bug 264073) + sed -i 's/LDFLAGS/LDLIBS/' tpmd/Makefile + + # fix parallel make + epatch "${FILESDIR}"/${P}-parallel-make.patch +} + +src_compile() { + emake user || die "Failed to build userspace" + if use modules; then + linux-mod_src_compile || die "Failed to build kernelspace" + fi +} + +src_install() { + if [ -x /usr/bin/scanelf -a -f tpm_emulator.ko ]; 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 + + use modules && linux-mod_src_install + dodoc README + + emake user_install DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)" \ + || die "Failed to install userspace" + + newinitd "${FILESDIR}"/${PN}.initd-0.5.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd-0.5.1 ${PN} + + insinto /etc/udev/rules.d + newins "${FILESDIR}"/${PN}.udev 60-${PN}.rules + + keepdir /var/run/tpm + fowners tss /var/run/tpm + + keepdir /var/log/tpm + fowners tss:tss /var/log/tpm +} |