diff options
author | 2005-06-15 09:53:25 +0000 | |
---|---|---|
committer | 2005-06-15 09:53:25 +0000 | |
commit | 9e6dc706b3af82ee4b173b89769da30dd0088ae2 (patch) | |
tree | a46dc25b68769927a9c700e3c75745e3801a436a /sys-fs/cryptsetup-luks | |
parent | Repoman made me do this (diff) | |
download | historical-9e6dc706b3af82ee4b173b89769da30dd0088ae2.tar.gz historical-9e6dc706b3af82ee4b173b89769da30dd0088ae2.tar.bz2 historical-9e6dc706b3af82ee4b173b89769da30dd0088ae2.zip |
Added einfo. Hacked type=luks support into dm-crypt.start. Expanded cryptfs configuration examples.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'sys-fs/cryptsetup-luks')
-rw-r--r-- | sys-fs/cryptsetup-luks/ChangeLog | 9 | ||||
-rw-r--r-- | sys-fs/cryptsetup-luks/Manifest | 10 | ||||
-rw-r--r-- | sys-fs/cryptsetup-luks/cryptsetup-luks-1.0-r1.ebuild | 79 | ||||
-rw-r--r-- | sys-fs/cryptsetup-luks/files/cryptfs.confd | 15 | ||||
-rw-r--r-- | sys-fs/cryptsetup-luks/files/digest-cryptsetup-luks-1.0-r1 | 1 | ||||
-rw-r--r-- | sys-fs/cryptsetup-luks/files/dm-crypt-start.sh | 20 |
6 files changed, 118 insertions, 16 deletions
diff --git a/sys-fs/cryptsetup-luks/ChangeLog b/sys-fs/cryptsetup-luks/ChangeLog index 3f257e4c6c5c..d88a4ff36479 100644 --- a/sys-fs/cryptsetup-luks/ChangeLog +++ b/sys-fs/cryptsetup-luks/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-fs/cryptsetup-luks # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup-luks/ChangeLog,v 1.2 2005/06/01 23:39:59 strerror Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup-luks/ChangeLog,v 1.3 2005/06/15 09:53:25 strerror Exp $ + +*cryptsetup-luks-1.0-r1 (15 Jun 2005) + + 15 Jun 2005; Benjamin Smee <strerror@gentoo.org> files/cryptfs.confd, + files/dm-crypt-start.sh, +cryptsetup-luks-1.0-r1.ebuild: + Added einfo. Hacked type=luks support into dm-crypt.start. Expanded cryptfs + configuration examples. 02 Jun 2005; Benjamin Smee <strerror@gentoo.org> +files/cryptfs.confd, cryptsetup-luks-1.0.ebuild: diff --git a/sys-fs/cryptsetup-luks/Manifest b/sys-fs/cryptsetup-luks/Manifest index bcf42dd36f8e..90828e7af422 100644 --- a/sys-fs/cryptsetup-luks/Manifest +++ b/sys-fs/cryptsetup-luks/Manifest @@ -1,7 +1,9 @@ -MD5 6c788beeca78bd11e5cd6e759e52fadc metadata.xml 228 +MD5 98bb7f3d3ee9620d226013378d1563e8 cryptsetup-luks-1.0-r1.ebuild 2124 +MD5 f1ceccf8e7137b925e20425f16d43587 ChangeLog 867 MD5 3caa86ef66126cc858551801beb4b6d0 cryptsetup-luks-1.0.ebuild 2004 -MD5 ea935d5e5f86b0f0878fc83426af1682 ChangeLog 592 -MD5 8370f3be193a25f18b189ca1e3232bb5 files/dm-crypt-start.sh 3944 +MD5 6c788beeca78bd11e5cd6e759e52fadc metadata.xml 228 +MD5 c653a0b4ace27569ccc659b7cb43b4a9 files/dm-crypt-start.sh 4306 +MD5 3d641cdcf17eb64a7985996d0f477246 files/cryptfs.confd 1441 MD5 f254479b9a12868d43ab10e4658fab51 files/digest-cryptsetup-luks-1.0 72 MD5 a3bb6598f67c8922ccb6576ff256ced0 files/dm-crypt-stop.sh 1297 -MD5 054e1d2a5ecf3c8f4b58cc5f7486d721 files/cryptfs.confd 1344 +MD5 f254479b9a12868d43ab10e4658fab51 files/digest-cryptsetup-luks-1.0-r1 72 diff --git a/sys-fs/cryptsetup-luks/cryptsetup-luks-1.0-r1.ebuild b/sys-fs/cryptsetup-luks/cryptsetup-luks-1.0-r1.ebuild new file mode 100644 index 000000000000..440e98499c0f --- /dev/null +++ b/sys-fs/cryptsetup-luks/cryptsetup-luks-1.0-r1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup-luks/cryptsetup-luks-1.0-r1.ebuild,v 1.1 2005/06/15 09:53:25 strerror Exp $ + +inherit linux-info eutils multilib flag-o-matic + +DESCRIPTION="Tool to setup encrypted devices with dm-crypt" +HOMEPAGE="http://clemens.endorphin.org/LUKS/" +SRC_URI="http://luks.endorphin.org/source/${PN}-${PV}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" + +DEPEND=">=sys-fs/device-mapper-1.00.07-r1 + >=dev-libs/libgcrypt-1.1.42 + >=dev-libs/libgpg-error-1.0-r1 + !sys-fs/cryptsetup" + +IUSE="static" + +dm-crypt_check() { + ebegin "Checking for dm-crypt support" + linux_chkconfig_present DM_CRYPT + eend $? + + if [[ $? -ne 0 ]] ; then + ewarn "cryptsetup requires dm-crypt support!" + ewarn "Please enable dm-crypt support in your kernel config, found at:" + ewarn "(for 2.6 kernels)" + ewarn + ewarn " Device Drivers" + ewarn " Multi-Device Support" + ewarn " Device mapper support" + ewarn " [*] Crypt Target Support" + ewarn + ewarn "and recompile your kernel if you want this package to work with this kernel" + epause 5 + fi +} + +pkg_setup() { + linux-info_pkg_setup + dm-crypt_check; +} + +src_compile() { + cd ${S} + + if use static ; then + append-ldflags -static + econf --sbindir=/bin --enable-static --disable-nls || die + else + ewarn "If you need cryptsetup for an initrd or initramfs then you" + ewarn "should emerge cryptsetup-luks with USE="static"" + epause 5 + econf --sbindir=/bin --disable-static --disable-nls || die + + sed -i \ + -e "s|-lgcrypt|/usr/$(get_libdir)/libgcrypt.a|" \ + -e "s|-lgpg-error|/usr/$(get_libdir)/libgpg-error.a|" \ + Makefile src/Makefile + sed -i -e "s|-lpopt|/usr/$(get_libdir)/libpopt.a|" src/Makefile + fi + + emake || die +} + +src_install() { + make DESTDIR="${D}" install || die "install failed" + insinto /lib/rcscripts/addons + newconfd ${FILESDIR}/cryptfs.confd cryptfs + doins "${FILESDIR}"/dm-crypt-{start,stop}.sh +} + +pkg_postinst() { + einfo "Please see the example for configuring a LUKS mountpoint" + einfo "in /etc/conf.d/cryptfs" +} diff --git a/sys-fs/cryptsetup-luks/files/cryptfs.confd b/sys-fs/cryptsetup-luks/files/cryptfs.confd index ca2399ce40f7..f5ff36044397 100644 --- a/sys-fs/cryptsetup-luks/files/cryptfs.confd +++ b/sys-fs/cryptsetup-luks/files/cryptfs.confd @@ -1,5 +1,5 @@ # /etc/conf.d/cryptfs -# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup-luks/files/cryptfs.confd,v 1.1 2005/06/01 23:39:59 strerror Exp $ +# $Header: # Note regarding the syntax of this file. This file is *almost* bash, # but each line is evaluated separately. Separate swaps/mounts can be @@ -16,14 +16,21 @@ # If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom # If no makefs is given then mkswap will be assumed #swap=crypt-swap -#source='/dev/main/swap' +#source='/dev/mapper/swap' # Mounts # If no options are given, they will default to: -c aes -h sha1 # No mkfs is run unless you specify a makefs option +# NOTE: if you are using cryptsetup-luks and want to use its features +# then you must add a type=luks line otherwise it will be treated like +# the original cryptsetup + +# dm-crypt example + #mount=crypt-tmp -#source='/dev/main/tmp' -#options='-d /dev/urandom' +#source='/dev/mapper/tmp' +#type=luks +#options='-d /root/keyfile' #pre_mount='/sbin/mkreiserfs -f -f ${dev}' #post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}' diff --git a/sys-fs/cryptsetup-luks/files/digest-cryptsetup-luks-1.0-r1 b/sys-fs/cryptsetup-luks/files/digest-cryptsetup-luks-1.0-r1 new file mode 100644 index 000000000000..0f344f4e1954 --- /dev/null +++ b/sys-fs/cryptsetup-luks/files/digest-cryptsetup-luks-1.0-r1 @@ -0,0 +1 @@ +MD5 62c4bff081e470fb2c9a0f2cb890e613 cryptsetup-luks-1.0.tar.bz2 282675 diff --git a/sys-fs/cryptsetup-luks/files/dm-crypt-start.sh b/sys-fs/cryptsetup-luks/files/dm-crypt-start.sh index c735fc795bc5..3d22c95d0def 100644 --- a/sys-fs/cryptsetup-luks/files/dm-crypt-start.sh +++ b/sys-fs/cryptsetup-luks/files/dm-crypt-start.sh @@ -1,7 +1,7 @@ # /lib/rcscripts/addons/dm-crypt-start.sh # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup-luks/files/dm-crypt-start.sh,v 1.1 2005/06/01 23:10:17 strerror Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup-luks/files/dm-crypt-start.sh,v 1.2 2005/06/15 09:53:25 strerror Exp $ # Setup mappings for an individual mount/swap # @@ -34,11 +34,17 @@ dm-crypt-execute-checkfs() { splash svc_input_begin checkfs ebegin "dm-crypt map ${target}" - if [[ -z ${key} ]] ; then + if [[ -z ${key} ]] && [[ -z ${type} ]] ; then /bin/cryptsetup ${options} create ${target} ${source} >/dev/console </dev/console ret=$? eend ${ret} "failure running cryptsetup" - else + elif [[ -n ${type} ]] ; then + einfo "/bin/cryptsetup ${options} luksOpen ${source} ${target}" + /bin/cryptsetup ${options} luksOpen ${source} ${target} >/dev/console </dev/console + #/bin/cryptsetup ${options} luksOpen ${source} ${target} + ret=$? + eend ${ret} "failure running cryptsetup-luks" + elif [[ -n ${key} ]] ; then if type -p gpg >/dev/null ; then ret=1 while [[ ${ret} -gt 0 ]] ; do @@ -52,7 +58,7 @@ dm-crypt-execute-checkfs() { done eend ${ret} else - einfo "You have to install app-crypt/gpg first" + einfo "You have to install app-crypt/gnupg first" fi fi splash svc_input_end checkfs @@ -101,7 +107,7 @@ dm-crypt-execute-localmount() { } local cryptfs_status=0 -local gpg_options key loop_file mount mountline options pre_mount post_mount source swap +local gpg_options key loop_file mount mountline options pre_mount post_mount source swap type if [[ -f /etc/conf.d/cryptfs ]] && [[ -x /bin/cryptsetup ]] ; then ebegin "Setting up dm-crypt mappings" @@ -117,10 +123,10 @@ if [[ -f /etc/conf.d/cryptfs ]] && [[ -x /bin/cryptsetup ]] ; then dm-crypt-execute-${myservice} # Prepare for the next mount/swap by resetting variables - unset gpg_options key loop_file mount options pre_mount post_mount source swap + unset gpg_options key loop_file mount options pre_mount post_mount source swap type ;; - gpg_options=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*) + gpg_options=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*|type=*) if [[ -z ${mount} && -z ${swap} ]] ; then ewarn "Ignoring setting outside mount/swap section: ${mountline}" continue |