summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDane Smith <smithdanea@gmail.com>2010-08-09 22:44:55 -0400
committerDane Smith <smithdanea@gmail.com>2010-08-09 22:44:55 -0400
commit768a7001bd196edcd9c1958dae3d9c13a8383906 (patch)
tree92bd4fc17b9ede095ca5de19cfe4cd82b5d9b514
parentAlready moved to main tree. (diff)
parentUpdated ebuild for cfs (diff)
downloadsmithdanea-768a7001bd196edcd9c1958dae3d9c13a8383906.tar.gz
smithdanea-768a7001bd196edcd9c1958dae3d9c13a8383906.tar.bz2
smithdanea-768a7001bd196edcd9c1958dae3d9c13a8383906.zip
Merge branch 'master' of ssh://172.18.0.100/home/code/git/smitdane/overlay
-rw-r--r--app-crypt/cfs/ChangeLog12
-rw-r--r--app-crypt/cfs/Manifest11
-rw-r--r--app-crypt/cfs/cfs-1.4.1.14.ebuild83
-rw-r--r--app-crypt/cfs/cfs-1.4.1.17.ebuild82
-rw-r--r--app-crypt/cfs/files/README.Gentoo47
-rw-r--r--app-crypt/cfs/files/cfsd.conf12
-rw-r--r--app-crypt/cfs/files/cfsd.init29
-rw-r--r--app-crypt/cfs/metadata.xml8
-rw-r--r--app-crypt/rainbowcrack/ChangeLog16
-rw-r--r--app-crypt/rainbowcrack/Manifest12
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2+gcc-4.3.patch67
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2-makefile.patch29
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2-openssl-1.patch51
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2-share.patch12
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2-types.patch10
-rw-r--r--app-crypt/rainbowcrack/metadata.xml18
-rw-r--r--app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild65
17 files changed, 564 insertions, 0 deletions
diff --git a/app-crypt/cfs/ChangeLog b/app-crypt/cfs/ChangeLog
new file mode 100644
index 0000000..71c0dfd
--- /dev/null
+++ b/app-crypt/cfs/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for app-crypt/cfs
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*cfs-1.4.1.17 (09 Aug 2010)
+*cfs-1.4.1.14 (09 Aug 2010)
+
+ 09 Aug 2010; Dane Smith (c1pher) <smithdanea@gmail.com>
+ +cfs-1.4.1.14.ebuild, +cfs-1.4.1.17.ebuild, +files/README.Gentoo,
+ +files/cfsd.conf, +files/cfsd.init, +metadata.xml:
+ Fixed both ebuilds to respect LDFLAGS wrt 331939.
+
diff --git a/app-crypt/cfs/Manifest b/app-crypt/cfs/Manifest
new file mode 100644
index 0000000..90c50f8
--- /dev/null
+++ b/app-crypt/cfs/Manifest
@@ -0,0 +1,11 @@
+AUX README.Gentoo 1584 RMD160 d1e5ed6ab7496e8cf67a768c6e4d284e6fa0d4d9 SHA1 3da888f5938d55ede9ccb866457fe1a7a2b4c1e3 SHA256 b8499aa748482950b72d1623519753b55ef1b3d01bb07cfa03c503df3482a733
+AUX cfsd.conf 341 RMD160 937c589da93c0ac762944958fac927f65aaddd4f SHA1 15632e7e695657913b0749946d77bfc8ca354f90 SHA256 d3839a8d9d551d38a9cc18f949a5fe8dd27f9daa36d83aa86e1ce5157f050c51
+AUX cfsd.init 671 RMD160 2cbdf921f424d010e592e9b80906fea576468228 SHA1 a9049b9b23272787269cfbdf1ecf2d88fe641916 SHA256 1344bbdb6ebca144bde0347f41328728cbc158ae0d2aedeeda617fac41edd8fa
+DIST cfs_1.4.1-14.diff.gz 17787 RMD160 6b26105f7fa7c34f40be4b6b881599b36bcefb35 SHA1 0edb8290903f77853747735f9aa13f48c4297fda SHA256 eefe6a9a4c7782c33eda14b93ab000eb7a5cc405a9af113284f93cdfd5564f7e
+DIST cfs_1.4.1-17.diff.gz 18581 RMD160 9fcd6c905f29de64e538c2fbc76c2894e57f14b6 SHA1 427924e1ab9cd92b2118b62164344922de19f13a SHA256 c0938cd88dd603b6ade9dc3cd3073dcd8e3a08e8a16685e62e383681a9506ade
+DIST cfs_1.4.1.orig.tar.gz 98376 RMD160 c78b17d920a4c2c3b9382da533a87ca7bea9d8d5 SHA1 ef3dcebcd21071cb04634ce0b3214e7967dde188 SHA256 86b52891c2cff4c80e4c3779337e690c54a6b8e132611269576c3d8d31ec4e74
+EBUILD cfs-1.4.1.14.ebuild 2322 RMD160 6dcd5a52a96f40a5685a3ce10a362fb7bc69ef64 SHA1 2e491bbbbdc16629cb78bf2eb500ab000ac4a490 SHA256 00ff2eabaac758c1f2695979affeb79a3469fbfdb51a83c6545722dbbf342de6
+EBUILD cfs-1.4.1.17.ebuild 2318 RMD160 8c898f8fec7f411848d72b6490e10459384279fe SHA1 896bb0960495b1ae8bfa6bd9267117765cbc4a3f SHA256 665bfea8febf83309e18f06f512d2ed6bc523f44c0ae33a83c2b144a04075527
+MISC ChangeLog 403 RMD160 215540cb95ad1bba926861bc97ef100547ab517f SHA1 e163d0c6d945723824ba20ff522e4909716a19ce SHA256 1d97bbea060cfb391b0a811b137dbc5a9093172a3608439e65262a8af1cc85ab
+MISC ChangeLog.new~ 353 RMD160 46d4ff32f2fadcd6c199283a995ab3f4085895a8 SHA1 5ddb3c9df01b524a496c05f1f317ea3d784a546c SHA256 cd69bce5cf30d0719e8847501a03cb163e8bbd7bc40bd7c96eba58ee4a88adc8
+MISC metadata.xml 233 RMD160 d81ec1a0582856aeac5ef3bfec5c80d9850216f6 SHA1 9b94f113e7f382076b1749c2a856e409c96cade3 SHA256 dce03f6cdd96135caf3c971a5ca4a8c916f44532fe8cfb6df88b7bdade407e8b
diff --git a/app-crypt/cfs/cfs-1.4.1.14.ebuild b/app-crypt/cfs/cfs-1.4.1.14.ebuild
new file mode 100644
index 0000000..70244c9
--- /dev/null
+++ b/app-crypt/cfs/cfs-1.4.1.14.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/cfs/cfs-1.4.1.14.ebuild,v 1.8 2008/12/17 00:15:51 halcy0n Exp $
+
+inherit eutils versionator
+
+MY_PV="$(get_version_component_range 1-3)"
+DEB_PV="$(get_version_component_range 4)"
+
+# This is a port of the Debian port of CFS which includes several
+# useful patches. Many thanks to the Debian developers.
+
+DESCRIPTION="Cryptographic Filesystem"
+HOMEPAGE="http://packages.debian.org/unstable/utils/cfs
+ http://www.crypto.com/software/"
+SRC_URI="mirror://debian/pool/main/c/cfs/cfs_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/c/cfs/cfs_${MY_PV}-${DEB_PV}.diff.gz"
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~x86 ~ppc"
+IUSE=""
+DEPEND="net-fs/nfs-utils"
+
+S=${WORKDIR}/${PN}-${MY_PV}.orig
+
+# Originally from the common-lisp-common.eclass:
+
+do-debian-credits() {
+ docinto debian
+ for i in copyright README.Debian changelog; do
+ # be silent, since all files are not always present
+ dodoc "${S}"/debian/${i} &>/dev/null || true
+ done
+ docinto .
+}
+
+cfsd-running() {
+ test -n "$(mount |grep '\(/var/cfs\|/var/lib/cfs/\.cfsfs\)')"
+}
+
+pkg_setup() {
+ if cfsd-running; then
+ eerror "It seems that the null directory or CFS root is currently in use."
+ eerror "You must shutdown CFS before merging this port or at least unmount"
+ eerror "the CFS root before using this port."
+ die "cfs is still running!"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ epatch cfs_${MY_PV}-${DEB_PV}.diff
+ cd "${S}"
+ sed -i 's/$(CC)/$(CC) $(LDFLAGS)/g' Makefile || die "sed failed"
+
+}
+
+src_compile() {
+ make cfs CC=$(tc-getCC) COPT="${CFLAGS} -DPROTOTYPES -g" || die "make failed!"
+}
+
+src_install() {
+ make install_cfs BINDIR="${D}"/usr/bin ETCDIR="${D}"/usr/sbin || \
+ die "make install failed!"
+ newconfd "${FILESDIR}"/cfsd.conf cfsd
+# exeinto /var/lib/cfs
+# doexe debian/cfs_*mount.sh
+ keepdir /var/run/cfs
+ keepdir /var/cfs
+ keepdir /var/lib/cfs/.cfsfs
+ chmod 0 "${D}"/var/lib/cfs/.cfsfs
+ doman *.[18]
+ newinitd "${FILESDIR}"/cfsd.init cfsd
+ do-debian-credits
+ dodoc LEVELS README* VERSION
+ dodoc "${FILESDIR}"/README.Gentoo
+}
+
+pkg_postinst() {
+ rm -f /var/lib/cfs/.cfsfs/.keep
+ einfo "Please read the Gentoo README in /usr/share/doc/${PF}/ for"
+ einfo "information on how to get started with CFS on Gentoo."
+}
diff --git a/app-crypt/cfs/cfs-1.4.1.17.ebuild b/app-crypt/cfs/cfs-1.4.1.17.ebuild
new file mode 100644
index 0000000..fab02d5
--- /dev/null
+++ b/app-crypt/cfs/cfs-1.4.1.17.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/cfs/cfs-1.4.1.17.ebuild,v 1.5 2008/12/17 00:15:51 halcy0n Exp $
+
+inherit eutils versionator
+
+MY_PV="$(get_version_component_range 1-3)"
+DEB_PV="$(get_version_component_range 4)"
+
+# This is a port of the Debian port of CFS which includes several
+# useful patches. Many thanks to the Debian developers.
+
+DESCRIPTION="Cryptographic Filesystem"
+HOMEPAGE="http://packages.debian.org/stable/utils/cfs
+ http://www.crypto.com/software/"
+SRC_URI="mirror://debian/pool/main/c/cfs/cfs_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/c/cfs/cfs_${MY_PV}-${DEB_PV}.diff.gz"
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~ppc x86"
+IUSE=""
+DEPEND="net-fs/nfs-utils"
+
+S=${WORKDIR}/${PN}-${MY_PV}.orig
+
+# Originally from the common-lisp-common.eclass:
+
+do-debian-credits() {
+ docinto debian
+ for i in copyright README.Debian changelog; do
+ # be silent, since all files are not always present
+ dodoc "${S}"/debian/${i} &>/dev/null || true
+ done
+ docinto .
+}
+
+cfsd-running() {
+ test -n "$(mount |grep '\(/var/cfs\|/var/lib/cfs/\.cfsfs\)')"
+}
+
+pkg_setup() {
+ if cfsd-running; then
+ eerror "It seems that the null directory or CFS root is currently in use."
+ eerror "You must shutdown CFS before merging this port or at least unmount"
+ eerror "the CFS root before using this port."
+ die "cfs is still running!"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ epatch cfs_${MY_PV}-${DEB_PV}.diff
+ cd "${S}"
+ sed -i 's/$(CC)/$(CC) $(LDFLAGS)/g' Makefile || die "sed failed"
+}
+
+src_compile() {
+ make cfs CC=$(tc-getCC) COPT="${CFLAGS} -DPROTOTYPES -g" || die "make failed!"
+}
+
+src_install() {
+ make install_cfs BINDIR="${D}"/usr/bin ETCDIR="${D}"/usr/sbin || \
+ die "make install failed!"
+ newconfd "${FILESDIR}"/cfsd.conf cfsd
+# exeinto /var/lib/cfs
+# doexe debian/cfs_*mount.sh
+ keepdir /var/run/cfs
+ keepdir /var/cfs
+ keepdir /var/lib/cfs/.cfsfs
+ chmod 0 "${D}"/var/lib/cfs/.cfsfs
+ doman *.[18]
+ newinitd "${FILESDIR}"/cfsd.init cfsd
+ do-debian-credits
+ dodoc LEVELS README* VERSION
+ dodoc "${FILESDIR}"/README.Gentoo
+}
+
+pkg_postinst() {
+ rm -f /var/lib/cfs/.cfsfs/.keep
+ einfo "Please read the Gentoo README in /usr/share/doc/${PF}/ for"
+ einfo "information on how to get started with CFS on Gentoo."
+}
diff --git a/app-crypt/cfs/files/README.Gentoo b/app-crypt/cfs/files/README.Gentoo
new file mode 100644
index 0000000..e757b45
--- /dev/null
+++ b/app-crypt/cfs/files/README.Gentoo
@@ -0,0 +1,47 @@
+-*- mode: outline -*-
+
+* Configuration on Gentoo
+
+Before starting CFS, you will need to setup NFS.
+
+Add an export line to your /etc/exports configuration. Such that an
+empty directory with no permissions is exported to localhost with
+read/write access. This directory is known as the "null export"
+directory. Portage has installed such a directory for you at
+/var/lib/cfs/.cfsfs, thus your /etc/exports line would look like this:
+
+ /var/lib/cfs/.cfsfs localhost(rw,sync)
+
+Add an entry to /etc/fstab which mounts the null export share to the
+"crypt root" mount point. By default, Portage has installed such a
+mount point for you at /var/cfs, thus your /etc/fstab entry will look
+like this:
+
+ localhost:/var/lib/cfs/.cfsfs /var/cfs nfs port=3049,intr,nfsvers=2 0 0
+
+At this point, you may restart NFS:
+
+ /etc/init.d/nfs restart
+ /etc/init.d/nfsmount restart
+
+Alternatively you can run the following commands:
+
+ exportfs -rv
+ mount -oport=3049,intr,nfsvers=2 localhost:/var/lib/cfs/.cfsfs /var/cfs
+
+Finally, start the CFS daemon:
+
+ /etc/init.d/cfs start
+
+* Differences between the Gentoo port and Debian port
+
+Differences in the Gentoo port include:
+
+ - No automatic manipulation of user configuration files such as
+ /etc/exports or /etc/fstab. It is the user's responsibility to
+ update those files.
+
+ - cfs_*mount.sh included in Debian are not used. The user must
+ manually add entries to /etc/fstab however the Gentoo RC system
+ will take care of automatically mounting/unmounting NFS and
+ starting CFS in the right order.
diff --git a/app-crypt/cfs/files/cfsd.conf b/app-crypt/cfs/files/cfsd.conf
new file mode 100644
index 0000000..82d78fa
--- /dev/null
+++ b/app-crypt/cfs/files/cfsd.conf
@@ -0,0 +1,12 @@
+# -*- mode: shell-script -*-
+
+# Configuration for the Cryptographic Filesystem (CFS)
+
+# Mount point for encrypted filesystems
+CRYPT_ROOT=/var/cfs
+
+# Se this if you don't want a symbolic link /crypt -> $CRYPT_ROOT.
+# NO_CRYPT_SYMLINK=true
+
+# An empty, permissionless directory that is used as the NFS export.
+NULL_EXPORT=/var/lib/cfs/.cfsfs
diff --git a/app-crypt/cfs/files/cfsd.init b/app-crypt/cfs/files/cfsd.init
new file mode 100644
index 0000000..a2d6277
--- /dev/null
+++ b/app-crypt/cfs/files/cfsd.init
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/cfs/files/cfsd.init,v 1.2 2004/09/28 00:18:13 swegener Exp $
+
+depend() {
+ need nfs
+ before nfsmount
+}
+
+start() {
+ ebegin "Starting cfsd"
+ NODAEMON=1 start-stop-daemon --start --pidfile /var/run/cfs.pid \
+ --make-pidfile --background --exec /usr/sbin/cfsd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cfsd"
+ start-stop-daemon --oknodo --stop --pidfile /var/run/cfs.pid \
+ && rm -f /var/run/cfs.pid
+ eend $?
+}
+
+# Local Variables:
+# mode: shell-script
+# indent-tabs-mode: t
+# tab-width: 4
+# End:
diff --git a/app-crypt/cfs/metadata.xml b/app-crypt/cfs/metadata.xml
new file mode 100644
index 0000000..73420b6
--- /dev/null
+++ b/app-crypt/cfs/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/app-crypt/rainbowcrack/ChangeLog b/app-crypt/rainbowcrack/ChangeLog
new file mode 100644
index 0000000..9f8f17d
--- /dev/null
+++ b/app-crypt/rainbowcrack/ChangeLog
@@ -0,0 +1,16 @@
+# ChangeLog for app-crypt/rainbowcrack
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*rainbowcrack-1.2-r1 (09 Aug 2010)
+
+ 09 Aug 2010; Dane Smith (c1pher) <smithdanea@gmail.com>
+ +rainbowcrack-1.2-r1.ebuild, +files/rainbowcrack-1.2+gcc-4.3.patch,
+ +files/rainbowcrack-1.2-makefile.patch,
+ +files/rainbowcrack-1.2-openssl-1.patch,
+ +files/rainbowcrack-1.2-share.patch, +files/rainbowcrack-1.2-types.patch,
+ +metadata.xml:
+ Updated ebuild for rainbowcrack. Address bug 331877.
+ Need to remove old ${P}-makefile.patch and replace with mine.
+ Need to remove old ${P}-asneeded.patch.
+
diff --git a/app-crypt/rainbowcrack/Manifest b/app-crypt/rainbowcrack/Manifest
new file mode 100644
index 0000000..1143690
--- /dev/null
+++ b/app-crypt/rainbowcrack/Manifest
@@ -0,0 +1,12 @@
+AUX rainbowcrack-1.2+gcc-4.3.patch 2614 RMD160 85f1a03f1a949d73a201dd5c8e950024092332be SHA1 9679029c5a8fe1a7e3ad51d8a8d1aaaab70ea173 SHA256 6746563b8c89e3e09d9e303f39c6d2f7dbe84c2c91422b7d0add3753a0c92fa0
+AUX rainbowcrack-1.2-makefile.patch 1431 RMD160 410dd8f1204116efeb6a6c778a9afad8bd93448b SHA1 e8309493e7332a7cc75c41db65b5e0998f92668f SHA256 4f387794d80528967c8e0e2e7495bd2c951501c77e7dc9aeebbe6ef063343a7e
+AUX rainbowcrack-1.2-openssl-1.patch 1409 RMD160 a5a31333358deb01360eeb58c8cda584598a25cf SHA1 71af69c1cb7a1758fefa147d7ea1b258865626cb SHA256 3eb3455f2908dae4e2d642cf175799d5fce3351adc449f448a41801d7cb275e9
+AUX rainbowcrack-1.2-share.patch 579 RMD160 5831f6872c8fa2affca87741ef03de8e05376e27 SHA1 2b38810045004c9732e93dcb30ddc13fb6e4aa26 SHA256 63d2da05ca27c79e758c87cef42c877a1bf57daa0ae81493b6693cfaf02574e8
+AUX rainbowcrack-1.2-types.patch 299 RMD160 bd0d5e48244c55741398da3b63241515c6e68730 SHA1 54535cd8fc91c6eae4275515bc6aa0010b67200d SHA256 56a99d1593c55484aefe253ed3014a2c3eaca9d62cb6fbc2a550171dc36f0ef2
+DIST rainbowcrack-1.2-src-algorithmpatch.zip 3029 RMD160 3293cfcf69677ca6812333dd97952f0e354ce96a SHA1 22697cc8bbeeded21a1863329a2666e9a6fb1268 SHA256 ccc646087692da1e02b1921f97d6c9d2784534153f4570b62de0f122c4c3b322
+DIST rainbowcrack-1.2-src.zip 44742 RMD160 51fdcf84ebfbe8ebb9e5bc6c3d4452f9d158eb79 SHA1 b077a654133cd108a3c619d66482e1796d56b0dc SHA256 238485eeede5140cfc66b88761ec976b7af8b5557ec5bd4eddbcd98830a34dac
+EBUILD rainbowcrack-1.2-r1.ebuild 1996 RMD160 f3d7663622e3920f59d0feedc4bb0b95df4cf5fc SHA1 2e7c991fc997880e25b02423aeacafbc976d87f3 SHA256 1156bd6790c4f1cd5ea99b547a0e3dc8d9304682aca2c7b91f8d988d7cf170ba
+MISC ChangeLog 627 RMD160 1e4f6624e5ae74b2480655d335ec857b41939d18 SHA1 ae949bd2b906659b6f77c09f03bb43101b228fb4 SHA256 d3f3e5496ff315c542656e41b322d1c1f41bdfdcb7d977c686400c66c2ceacba
+MISC ChangeLog.new~ 484 RMD160 72a9e10278d51dc262c757239c93a6512b26d565 SHA1 027d213417ec69d313dec31ed423d5ceb8935928 SHA256 c001148bea211c834c972931e1175e9808e2a7459e9f93c2a07695fb8419cadd
+MISC metadata.xml 988 RMD160 183293dd3ff7a2a9fa4e6d4bf96992a65373a3c6 SHA1 07dc36220f7b4bdd6f6ebbdff3c9c89f358f1de5 SHA256 3a19812834671dc4d343f678fe3c609acd169519d511d01eca82c56e9b0ba041
+MISC rainbowcrack-1.2-r1.ebuild~ 2011 RMD160 5a978dd235e0bc2af26d982e80f2e87b20952edc SHA1 9986d256b9b0fd440b096672d545e4d6b0c7507e SHA256 379578ba0b43843d6e30d27d97058ea30e0bc5a575589b49b6fa8923d80ebcc5
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2+gcc-4.3.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2+gcc-4.3.patch
new file mode 100644
index 0000000..cc3fb0c
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2+gcc-4.3.patch
@@ -0,0 +1,67 @@
+diff -aur rainbowcrack-1.2-src.old/src/ChainWalkContext.cpp rainbowcrack-1.2-src/src/ChainWalkContext.cpp
+--- rainbowcrack-1.2-src.old/src/ChainWalkContext.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/ChainWalkContext.cpp 2008-12-11 20:56:15.000000000 +0100
+@@ -10,6 +10,7 @@
+
+ #include "ChainWalkContext.h"
+
++#include <cstring>
+ #include <ctype.h>
+ #include <openssl/rand.h>
+ #ifdef _WIN32
+diff -aur rainbowcrack-1.2-src.old/src/ChainWalkSet.cpp rainbowcrack-1.2-src/src/ChainWalkSet.cpp
+--- rainbowcrack-1.2-src.old/src/ChainWalkSet.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/ChainWalkSet.cpp 2008-12-11 20:59:07.000000000 +0100
+@@ -8,6 +8,7 @@
+ #pragma warning(disable : 4786)
+ #endif
+
++#include <cstring>
+ #include "ChainWalkSet.h"
+
+ CChainWalkSet::CChainWalkSet()
+diff -aur rainbowcrack-1.2-src.old/src/RainbowCrack.cpp rainbowcrack-1.2-src/src/RainbowCrack.cpp
+--- rainbowcrack-1.2-src.old/src/RainbowCrack.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/RainbowCrack.cpp 2008-12-11 20:59:48.000000000 +0100
+@@ -18,6 +18,7 @@
+ #include <unistd.h>
+ #endif
+
++#include <cstring>
+ #include <openssl/md4.h>
+ #ifdef _WIN32
+ #pragma comment(lib, "libeay32.lib")
+diff -aur rainbowcrack-1.2-src.old/src/RainbowTableDump.cpp rainbowcrack-1.2-src/src/RainbowTableDump.cpp
+--- rainbowcrack-1.2-src.old/src/RainbowTableDump.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/RainbowTableDump.cpp 2008-12-11 20:57:57.000000000 +0100
+@@ -4,6 +4,7 @@
+ Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
+ */
+
++#include <algorithm>
+ #include "ChainWalkContext.h"
+
+ int main(int argc, char* argv[])
+diff -aur rainbowcrack-1.2-src.old/src/RainbowTableGenerate.cpp rainbowcrack-1.2-src/src/RainbowTableGenerate.cpp
+--- rainbowcrack-1.2-src.old/src/RainbowTableGenerate.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/RainbowTableGenerate.cpp 2008-12-11 20:57:29.000000000 +0100
+@@ -15,6 +15,8 @@
+ #endif
+ #include <time.h>
+
++#include <cstring>
++#include <algorithm>
+ #include "ChainWalkContext.h"
+
+ void Usage()
+diff -aur rainbowcrack-1.2-src.old/src/RainbowTableSort.cpp rainbowcrack-1.2-src/src/RainbowTableSort.cpp
+--- rainbowcrack-1.2-src.old/src/RainbowTableSort.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/RainbowTableSort.cpp 2008-12-11 20:58:43.000000000 +0100
+@@ -4,6 +4,7 @@
+ Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
+ */
+
++#include <cstdlib>
+ #include "Public.h"
+
+ #define ASSUMED_MIN_MEMORY 32 * 1024 * 1024
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2-makefile.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-makefile.patch
new file mode 100644
index 0000000..87e38fe
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-makefile.patch
@@ -0,0 +1,29 @@
+--- makefile.linux 2003-11-16 22:38:20.000000000 -0500
++++ Makefile 2010-08-09 13:10:59.000000000 -0400
+@@ -1,14 +1,18 @@
++OBJS = Public.o ChainWalkContext.o ChainWalkSet.o CrackEngine.o HashAlgorithm.o HashSet.o HashRoutine.o MemoryPool.o RainbowCrack.o RainbowTableDump.o RainbowTableGenerate.o RainbowTableSort.o
+
+ all: rtgen rtdump rtsort rcrack
+
+-rtgen:
+- g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp RainbowTableGenerate.cpp -lssl -O3 -o rtgen
++rtgen: $(OBJS)
++ $(CXX) -lssl -lcrypto $(LDFLAGS) Public.o ChainWalkContext.o HashAlgorithm.o HashRoutine.o RainbowTableGenerate.o -o rtgen
+
+-rtdump:
+- g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp RainbowTableDump.cpp -lssl -o rtdump
++rtdump: $(OBJS)
++ $(CXX) -lssl -lcrypto $(LDFLAGS) Public.o ChainWalkContext.o HashAlgorithm.o HashRoutine.o RainbowTableDump.o -o rtdump
+
+-rtsort:
+- g++ Public.cpp RainbowTableSort.cpp -o rtsort
++rtsort: $(OBJS)
++ $(CXX) $(LDFLAGS) Public.o RainbowTableSort.o -o rtsort
+
+-rcrack:
+- g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp HashSet.cpp MemoryPool.cpp ChainWalkSet.cpp CrackEngine.cpp RainbowCrack.cpp -lssl -O3 -o rcrack
++rcrack: $(OBJS)
++ $(CXX) -lssl -lcrypto $(LDFLAGS) Public.o ChainWalkContext.o HashAlgorithm.o HashRoutine.o HashSet.o MemoryPool.o ChainWalkSet.o CrackEngine.o RainbowCrack.o -o rcrack
++
++clean:
++ rm -f $(OBJS) rtgen rtdump rtsort rcrack
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2-openssl-1.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-openssl-1.patch
new file mode 100644
index 0000000..e694e45
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-openssl-1.patch
@@ -0,0 +1,51 @@
+http://bugs.gentoo.org/327373
+
+--- src/HashAlgorithm.cpp
++++ src/HashAlgorithm.cpp
+@@ -9,7 +9,9 @@
+ #include "Public.h"
+
+ #include <openssl/des.h>
++#ifndef no_md2_h
+ #include <openssl/md2.h>
++#endif
+ #include <openssl/md4.h>
+ #include <openssl/md5.h>
+ #include <openssl/sha.h>
+@@ -66,10 +68,12 @@
+ MD4(UnicodePlain, nPlainLen * 2, pHash);
+ }
+
++#ifndef no_md2_h
+ void HashMD2(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
+ {
+ MD2(pPlain, nPlainLen, pHash);
+ }
++#endif
+
+ void HashMD4(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
+ {
+--- src/HashAlgorithm.h
++++ src/HashAlgorithm.h
+@@ -10,7 +10,9 @@
+ void HashLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
+ void HashNTLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
+
++#ifndef no_md2_h
+ void HashMD2(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
++#endif
+ void HashMD4(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
+ void HashMD5(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
+
+--- src/HashRoutine.cpp
++++ src/HashRoutine.cpp
+@@ -19,7 +19,9 @@
+
+ AddHashRoutine("lm", HashLM, 8);
+ AddHashRoutine("ntlm", HashNTLM, 16);
++ #ifndef no_md2_h
+ AddHashRoutine("md2", HashMD2, 16);
++ #endif
+ AddHashRoutine("md4", HashMD4, 16);
+ AddHashRoutine("md5", HashMD5, 16);
+ AddHashRoutine("sha1", HashSHA1, 20);
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2-share.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-share.patch
new file mode 100644
index 0000000..2cf75ca
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-share.patch
@@ -0,0 +1,12 @@
+diff -urNp rainbowcrack-1.2-src.org/src/ChainWalkContext.cpp rainbowcrack-1.2-src/src/ChainWalkContext.cpp
+--- rainbowcrack-1.2-src.org/src/ChainWalkContext.cpp 2003-11-23 00:33:44.000000000 +0200
++++ rainbowcrack-1.2-src/src/ChainWalkContext.cpp 2006-11-01 21:05:13.000000000 +0200
+@@ -58,7 +58,7 @@ bool CChainWalkContext::LoadCharset(stri
+ }
+
+ vector<string> vLine;
+- if (ReadLinesFromFile("charset.txt", vLine))
++ if (ReadLinesFromFile("charset.txt", vLine) || ReadLinesFromFile("@@SHARE@@/charset.txt", vLine))
+ {
+ int i;
+ for (i = 0; i < vLine.size(); i++)
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2-types.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-types.patch
new file mode 100644
index 0000000..67f3e0a
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-types.patch
@@ -0,0 +1,10 @@
+--- ./rainbowcrack-1.2-src-orig/src/Public.h 2003-11-23 00:32:50.000000000 +1100
++++ ./rainbowcrack-1.2-src/src/Public.h 2008-06-21 00:27:18.000000000 +1000
+@@ -17,6 +17,7 @@
+ #ifdef _WIN32
+ #define uint64 unsigned __int64
+ #else
++#include <sys/types.h>
+ #define uint64 u_int64_t
+ #endif
+
diff --git a/app-crypt/rainbowcrack/metadata.xml b/app-crypt/rainbowcrack/metadata.xml
new file mode 100644
index 0000000..07d8930
--- /dev/null
+++ b/app-crypt/rainbowcrack/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>crypto</herd>
+<maintainer>
+ <email>dragonheart@gentoo.org</email>
+ <name>Daniel Black</name>
+</maintainer>
+<longdescription>
+RainbowCrack is a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
+ In short, the RainbowCrack tool is a password cracker. A traditional brute force cracker try all possible
+plaintexts one by one in cracking time. It is time consuming to break complex password in this way. The idea of
+time-memory trade-off is to do all cracking time computation in advance and store the result in files so called
+"rainbow table". It does take a long time to precompute the tables. But once the one time precomputation is
+finished, a time-memory trade-off cracker can be hundreds of times faster than a brute force cracker, with the
+help of precomputed tables.
+</longdescription>
+</pkgmetadata>
diff --git a/app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild b/app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild
new file mode 100644
index 0000000..75b47a3
--- /dev/null
+++ b/app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild,v 1.9 2010/07/11 06:58:44 ssuominen Exp $
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Hash cracker that precomputes plaintext - ciphertext pairs in advance"
+HOMEPAGE="http://project-rainbowcrack.com/"
+
+SRC_URI="http://project-rainbowcrack.com/${P}-src.zip
+ http://http://project-rainbowcrack.com/${P}-src-algorithmpatch.zip"
+
+LICENSE="as-is"
+SLOT="0"
+# contains ix86 ASM
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl"
+DEPEND="${RDEPEND} app-arch/unzip"
+
+MY_P=${P}-src
+S=${WORKDIR}/${MY_P}/src
+
+src_unpack() {
+ unpack ${A} || die "unpack failed"
+ cd "${S}"
+ mv "${WORKDIR}/${P}"-src-algorithmpatch/Hash* "${S}"
+ epatch "${FILESDIR}/${P}-makefile.patch" \
+ "${FILESDIR}/${P}-share.patch" \
+ "${FILESDIR}/${P}-types.patch" \
+ "${FILESDIR}/${P}+gcc-4.3.patch" \
+ "${FILESDIR}/${P}-openssl-1.patch"
+ sed -i "s#@@SHARE@@#/usr/share/${P}#g" ChainWalkContext.cpp || die
+}
+
+src_compile() {
+ # No ./configure script so we assume md2.h is missing if OpenSSL >= 1.0.0
+ has_version ">=dev-libs/openssl-1.0.0" && append-flags -Dno_md2_h
+ emake -f makefile.linux CXX=$(tc-getCXX) || die "make failed"
+}
+
+src_test() {
+ einfo "generating rainbow tables (password maps)"
+ ./rtgen sha1 loweralpha 7 7 0 1000 160 test
+ einfo "sorting tables"
+ ./rtsort *.rt
+ einfo "attempting crack of 7 character random sha1 lowercase passwords"
+ ./rcrack ./*.rt -l 'random_sha1_loweralpha#1-7.hash'
+ einfo "I haven't rigged this so it finds anything yet. Submissions welcome bugs.gentoo.org"
+}
+
+src_install() {
+ dobin rtgen rtdump rtsort rcrack || die "dobin failed"
+ insinto "/usr/share/${P}"
+ doins charset.txt
+
+ dodoc *.plain *.hash
+
+ newdoc "${WORKDIR}/${P}-src-algorithmpatch/readme.txt" algorithm_readme.txt
+
+ cd "${WORKDIR}/${MY_P}"
+ dodoc readme.txt readme_src.txt disclaimer.txt
+ dohtml -r doc/
+}