summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-crypt/bestcrypt
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-crypt/bestcrypt')
-rw-r--r--app-crypt/bestcrypt/Manifest3
-rw-r--r--app-crypt/bestcrypt/bestcrypt-2.0.0.ebuild72
-rw-r--r--app-crypt/bestcrypt/bestcrypt-2.0.4.ebuild72
-rw-r--r--app-crypt/bestcrypt/bestcrypt-2.0.6.ebuild76
-rw-r--r--app-crypt/bestcrypt/files/bcrypt3104
-rw-r--r--app-crypt/bestcrypt/files/bestcrypt-2.0.0-build.patch59
-rw-r--r--app-crypt/bestcrypt/files/bestcrypt-2.0.4-build.patch108
-rw-r--r--app-crypt/bestcrypt/files/bestcrypt-2.0.6-build.patch341
-rw-r--r--app-crypt/bestcrypt/metadata.xml5
9 files changed, 840 insertions, 0 deletions
diff --git a/app-crypt/bestcrypt/Manifest b/app-crypt/bestcrypt/Manifest
new file mode 100644
index 000000000000..2a80a6db5aea
--- /dev/null
+++ b/app-crypt/bestcrypt/Manifest
@@ -0,0 +1,3 @@
+DIST BestCrypt-2.0-0.tar.gz 1999791 SHA256 53007d398d137426cb7e24a98d32a8227d5ad20bca623ba9a9ac125f34971df7 SHA512 ccd0b6d91947808cc5396355d3c1e62260b537cd7e4f236017e009a7ecc64c9a7fdf53a937538c9e02c1e303c0b962c9d5debbb37cd8b24ead34aaf33fb6b9e5 WHIRLPOOL 74e04c297664cb3080ec83d1c9791bca61ce72e065462ca0f7f77a69b0c5828814598f9778a6d4c9669f09c431ba365e8d00defa674f4f172fc90677815ff984
+DIST BestCrypt-2.0-4.tar.gz 2024711 SHA256 041b3c3766c921583b8e89a9437b7486653b68fc20517a11fca18468ff203335 SHA512 62d2c6204ad0cc0b0b081cfdae082ae0b54ed958a9bb5d81f4ff7c3b0882d64169d179ed8b421f19976eb76ea40b6da97b8ada798a0ea3360847c113f908d019 WHIRLPOOL b4dc6a0c39ce5e8ac41b9cd24a1ddb92718769c81cd2ce1c8ed6cf1fb1408c01b76f425fab9ca25808690fe7cae8df7d5d50a3efc2f4d9bc32374794f2cbf05b
+DIST BestCrypt-2.0.6.tar.gz 2060735 SHA256 e0286b7dfc662a480340845648a3afdcf9b2f2e38d9b327bc8adf7efa50fc4e0 SHA512 392fc8067099ae046b54ef695b49c9722a30e0a0c66953da51aa0881a306fe2a9e10e1bc6084b20e904a7830eb998c4f44da5813b9951c74e1cd3893689457d3 WHIRLPOOL d2c4e764f2e2b4b7f15c777ac3b84771e29a7a79cd4d6a8b19f6c3c7cd15c11f5a5ec6969d5194d655e9f90a08d7f2826d7e478ba333b5835bb8068fa89bf8d9
diff --git a/app-crypt/bestcrypt/bestcrypt-2.0.0.ebuild b/app-crypt/bestcrypt/bestcrypt-2.0.0.ebuild
new file mode 100644
index 000000000000..ad0824247af2
--- /dev/null
+++ b/app-crypt/bestcrypt/bestcrypt-2.0.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils linux-mod toolchain-funcs versionator
+
+MY_PN="bcrypt"
+MY_PV="$(replace_version_separator 2 -)"
+DESCRIPTION="commercially licensed transparent filesystem encryption"
+HOMEPAGE="http://www.jetico.com/"
+SRC_URI="http://www.jetico.com/linux/BestCrypt-${MY_PV}.tar.gz"
+
+LICENSE="bestcrypt"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+
+pkg_setup() {
+ CONFIG_CHECK="MODULES"
+ linux-mod_pkg_setup
+
+ MODULE_NAMES="bestcrypt(block::kernel/kmod)
+ bc_3des(crypto::kernel/kmod/crypto/algs/3des)
+ bc_bf128(crypto::kernel/kmod/crypto/algs/bf128)
+ bc_bf448(crypto::kernel/kmod/crypto/algs/bf448)
+ bc_blowfish(crypto::kernel/kmod/crypto/algs/blowfish)
+ bc_cast(crypto::kernel/kmod/crypto/algs/cast)
+ bc_des(crypto::kernel/kmod/crypto/algs/des)
+ bc_gost(crypto::kernel/kmod/crypto/algs/gost)
+ bc_idea(crypto::kernel/kmod/crypto/algs/idea)
+ bc_rijn(crypto::kernel/kmod/crypto/algs/rijn)"
+ BUILD_TARGETS="module"
+ BUILD_PARAMS=" \
+ KERNEL_DIR=\"${KV_DIR}\""
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-build.patch"
+}
+
+src_compile() {
+ MAKEOPTS="-j1" linux-mod_src_compile
+ MAKEOPTS="-j1" emake \
+ CFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ emake install PREFIX="${ED}" install
+
+ newinitd "${FILESDIR}/bcrypt3" bcrypt
+ sed -e '/\(bc_rc6\|bc_serpent\|bc_twofish\)/d' -i "${D}etc/init.d/bcrypt"
+ dodoc HIDDEN_PART README
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "The BestCrypt drivers are not free - Please purchace a license from "
+ ewarn "http://www.jetico.com/"
+ ewarn
+
+ linux-mod_pkg_postinst
+}
diff --git a/app-crypt/bestcrypt/bestcrypt-2.0.4.ebuild b/app-crypt/bestcrypt/bestcrypt-2.0.4.ebuild
new file mode 100644
index 000000000000..9ea8eb819602
--- /dev/null
+++ b/app-crypt/bestcrypt/bestcrypt-2.0.4.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils linux-mod toolchain-funcs versionator
+
+MY_PN="bcrypt"
+MY_PV="$(replace_version_separator 2 -)"
+DESCRIPTION="commercially licensed transparent filesystem encryption"
+HOMEPAGE="http://www.jetico.com/"
+SRC_URI="http://www.jetico.com/linux/BestCrypt-${MY_PV}.tar.gz"
+
+LICENSE="bestcrypt"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+
+pkg_setup() {
+ CONFIG_CHECK="MODULES"
+ linux-mod_pkg_setup
+
+ MODULE_NAMES="bestcrypt(block::kernel/kmod)
+ bc_3des(crypto::kernel/kmod/crypto/algs/3des)
+ bc_bf128(crypto::kernel/kmod/crypto/algs/bf128)
+ bc_bf448(crypto::kernel/kmod/crypto/algs/bf448)
+ bc_blowfish(crypto::kernel/kmod/crypto/algs/blowfish)
+ bc_cast(crypto::kernel/kmod/crypto/algs/cast)
+ bc_des(crypto::kernel/kmod/crypto/algs/des)
+ bc_gost(crypto::kernel/kmod/crypto/algs/gost)
+ bc_idea(crypto::kernel/kmod/crypto/algs/idea)
+ bc_rijn(crypto::kernel/kmod/crypto/algs/rijn)"
+ BUILD_TARGETS="module"
+ BUILD_PARAMS=" \
+ BC_KERNEL_DIR=\"${KERNEL_DIR}\""
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-build.patch"
+}
+
+src_compile() {
+ MAKEOPTS="-j1" linux-mod_src_compile
+ MAKEOPTS="-j1" emake \
+ CFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ emake install PREFIX="${ED}" install
+
+ newinitd "${FILESDIR}/bcrypt3" bcrypt
+ sed -e '/\(bc_rc6\|bc_serpent\|bc_twofish\)/d' -i "${D}etc/init.d/bcrypt"
+ dodoc HIDDEN_PART README
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "The BestCrypt drivers are not free - Please purchace a license from "
+ ewarn "http://www.jetico.com/"
+ ewarn
+
+ linux-mod_pkg_postinst
+}
diff --git a/app-crypt/bestcrypt/bestcrypt-2.0.6.ebuild b/app-crypt/bestcrypt/bestcrypt-2.0.6.ebuild
new file mode 100644
index 000000000000..7dfc7d64ac54
--- /dev/null
+++ b/app-crypt/bestcrypt/bestcrypt-2.0.6.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils linux-mod toolchain-funcs versionator
+
+MY_PN="BestCrypt"
+DESCRIPTION="commercially licensed transparent filesystem encryption"
+HOMEPAGE="http://www.jetico.com/"
+SRC_URI="http://www.jetico.com/linux/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="bestcrypt"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="virtual/linux-sources
+ app-shells/bash"
+RDEPEND=""
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+pkg_setup() {
+ CONFIG_CHECK="MODULES"
+ linux-mod_pkg_setup
+
+ MODULE_NAMES="bestcrypt(block::kernel/kmod)
+ bc_3des(crypto::kernel/kmod/crypto/algs/3des)
+ bc_bf128(crypto::kernel/kmod/crypto/algs/bf128)
+ bc_bf448(crypto::kernel/kmod/crypto/algs/bf448)
+ bc_blowfish(crypto::kernel/kmod/crypto/algs/blowfish)
+ bc_cast(crypto::kernel/kmod/crypto/algs/cast)
+ bc_des(crypto::kernel/kmod/crypto/algs/des)
+ bc_gost(crypto::kernel/kmod/crypto/algs/gost)
+ bc_idea(crypto::kernel/kmod/crypto/algs/idea)
+ bc_rijn(crypto::kernel/kmod/crypto/algs/rijn)"
+ BUILD_TARGETS="module"
+ BUILD_PARAMS=" \
+ BC_KERNEL_DIR=\"${KERNEL_DIR}\""
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-build.patch"
+}
+
+src_compile() {
+ MAKEOPTS="-j1" linux-mod_src_compile \
+ CXX="$(tc-getCXX)"
+ MAKEOPTS="-j1" emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ CFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ emake install PREFIX="${ED}" install
+
+ newinitd "${FILESDIR}/bcrypt3" bcrypt
+ sed -e '/\(bc_rc6\|bc_serpent\|bc_twofish\)/d' -i "${D}etc/init.d/bcrypt"
+ dodoc HIDDEN_PART README
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "The BestCrypt drivers are not free - Please purchace a license from "
+ ewarn "http://www.jetico.com/"
+ ewarn
+
+ linux-mod_pkg_postinst
+}
diff --git a/app-crypt/bestcrypt/files/bcrypt3 b/app-crypt/bestcrypt/files/bcrypt3
new file mode 100644
index 000000000000..8f6dd386237b
--- /dev/null
+++ b/app-crypt/bestcrypt/files/bcrypt3
@@ -0,0 +1,104 @@
+#!/sbin/runscript
+#
+# bestcrypt Encrypted File Systems.
+#
+# Version: 1.2
+#
+# Revision: $Id$
+#
+# Author: Jetico Inc. (support@jetico.com)
+#
+# Modified by Stefan Tittel (with thanks to steveb) to work around
+# the "xargs: environment too large for exec"-error occuring in
+# the gentoo 1.4 linux distribution.
+
+# chkconfig: 2345 85 98
+# description: BestCrypt init script
+
+
+# Source function library.
+#. /etc/rc.d/init.d/functions
+
+# See how we were called.
+
+KERNEL_VERSION=`uname -r|sed 's/\(.\..\).*/\1/'`
+
+start() {
+ ebegin "Initializing BestCrypt"
+ declare -i status=0
+ rm -rf /dev/bcrypt?* 2>/dev/null
+ if [ $KERNEL_VERSION = "2.2" ]; then
+ mknod -m 666 /dev/bcrypt0 b 7 128
+ mknod -m 666 /dev/bcrypt1 b 7 129
+ mknod -m 666 /dev/bcrypt2 b 7 130
+ mknod -m 666 /dev/bcrypt3 b 7 131
+ mknod -m 666 /dev/bcrypt4 b 7 132
+ mknod -m 666 /dev/bcrypt5 b 7 133
+ mknod -m 666 /dev/bcrypt6 b 7 134
+ mknod -m 666 /dev/bcrypt7 b 7 135
+ mknod -m 666 /dev/bcrypt8 b 7 136
+ mknod -m 666 /dev/bcrypt9 b 7 137
+ mknod -m 666 /dev/bcrypt10 b 7 138
+ mknod -m 666 /dev/bcrypt11 b 7 139
+ mknod -m 666 /dev/bcrypt12 b 7 140
+ mknod -m 666 /dev/bcrypt13 b 7 141
+ mknod -m 666 /dev/bcrypt14 b 7 142
+ mknod -m 666 /dev/bcrypt15 b 7 143
+ else
+ if [ ! -c /dev/.devfsd ] && [ ! -e /dev/.udev ];
+ then
+ mknod -m 666 /dev/bcrypt0 b 188 0
+ mknod -m 666 /dev/bcrypt1 b 188 1
+ mknod -m 666 /dev/bcrypt2 b 188 2
+ mknod -m 666 /dev/bcrypt3 b 188 3
+ mknod -m 666 /dev/bcrypt4 b 188 4
+ mknod -m 666 /dev/bcrypt5 b 188 5
+ mknod -m 666 /dev/bcrypt6 b 188 6
+ mknod -m 666 /dev/bcrypt7 b 188 7
+ mknod -m 666 /dev/bcrypt8 b 188 8
+ mknod -m 666 /dev/bcrypt9 b 188 9
+ mknod -m 666 /dev/bcrypt10 b 188 10
+ mknod -m 666 /dev/bcrypt11 b 188 11
+ mknod -m 666 /dev/bcrypt12 b 188 12
+ mknod -m 666 /dev/bcrypt13 b 188 13
+ mknod -m 666 /dev/bcrypt14 b 188 14
+ mknod -m 666 /dev/bcrypt15 b 188 15
+ fi
+ fi
+ modprobe bc || status=1
+ modprobe bc_blowfish || status=1
+ modprobe bc_des || status=1
+ modprobe bc_gost || status=1
+ modprobe bc_twofish || status=1
+ modprobe bc_bf448 || status=1
+ modprobe bc_bf128 || status=1
+ modprobe bc_3des || status=1
+ modprobe bc_idea || status=1
+ modprobe bc_rijn || status=1
+ modprobe bc_cast || status=1
+ modprobe bc_rc6 || status=1
+ modprobe bc_serpent || status=1
+ eend ${status}
+}
+
+stop() {
+ ebegin "Unmounting encrypted filesystems"
+
+# The original line causing the "xargs: environment too large for exec error".
+ # grep BestCrypt /etc/mtab |awk '{print $2}'|xargs -r -n 1 bctool umount
+
+# The line for which it work's fine now.
+ for i in $(grep BestCrypt /etc/mtab | awk '{print $2}') ; do bctool umount ${i} ; done
+
+ eend $?
+ ebegin "Shutting down BestCrypt modules"
+ for i in `lsmod |egrep "^bc_.*" |awk '{print $1}' `; do
+ rmmod $i
+ done
+ if [ ! -c /dev/.devfsd ] && [ ! -e /dev/.udev ];
+ then
+ rm -f /dev/bcrypt?* 2>/dev/null
+ fi
+ rmmod bc
+ eend $?
+}
diff --git a/app-crypt/bestcrypt/files/bestcrypt-2.0.0-build.patch b/app-crypt/bestcrypt/files/bestcrypt-2.0.0-build.patch
new file mode 100644
index 000000000000..876f30ba005d
--- /dev/null
+++ b/app-crypt/bestcrypt/files/bestcrypt-2.0.0-build.patch
@@ -0,0 +1,59 @@
+diff --git a/Makefile b/Makefile
+index 63baafb..995d48e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,8 @@ KGSHA_LIB = $(KGSHA_BUILD_DIR)/lib$(KGSHA_LIB_NAME).a
+ KGGHOST_LIB = $(KGGHOST_BUILD_DIR)/lib$(KGGHOST_LIB_NAME).a
+ SPACEMAP_LIB = $(SPACEMAP_BUILD_DIR)/lib$(SPACEMAP_LIB_NAME).a
+
+-BC_EXTRA_CFLAGS= -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
++BC_EXTRA_CFLAGS= $(CFLAGS) -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
++BC_EXTRA_LDFLAGS = $(LDFLAGS)
+
+ #
+ # commands
+@@ -86,7 +87,7 @@ BCTOOL_OBJS = container/linux/file.o \
+ src/bctool-rawlink.o
+
+ BCTOOL_CFLAGS = $(BC_EXTRA_CFLAGS) -DBC_LINUX -Wall -I. -Icertificate/
+-BCTOOL_LDFLAGS = -L$(TARGET_DIR) -l$(KERN_LIB_NAME) -l$(KGSHA_LIB_NAME) \
++BCTOOL_LDFLAGS = $(BC_EXTRA_LDFLAGS) -L$(TARGET_DIR) -l$(KERN_LIB_NAME) -l$(KGSHA_LIB_NAME) \
+ -l$(KGGHOST_LIB_NAME) -l$(CERT_LIB_NAME) -l$(SPACEMAP_LIB_NAME) \
+ -ludev -lpthread -l$(FS_LIB_NAME)
+
+@@ -101,7 +102,7 @@ $(shell mkdir -p $(TARGET_DIR)/kernel)
+ #
+
+ # default target builds console tool with modules
+-all: Makefile helpers module bctool-app
++all: Makefile helpers bctool-app
+ true
+
+ # GUI executable with helpers and console tool
+@@ -216,7 +217,7 @@ module-clean: force-look
+ #
+
+ # install for default target
+-install: module-install bctool-app-install helpers-install
++install: bctool-app-install helpers-install
+ true
+
+ # uninstall for default target
+@@ -224,6 +225,7 @@ uninstall: before-uninstall module-uninstall bctool-app-uninstall helpers-uninst
+ true
+
+ helpers-install:
++ install -o root -m 755 -d $(PREFIX)/sbin
+ install -o root -m 4755 -s $(TARGET_DIR)/bcmount_helper $(PREFIX)/sbin
+ install -o root -m 4755 -s $(TARGET_DIR)/bcumount_helper $(PREFIX)/sbin
+ install -o root -m 4755 -s $(TARGET_DIR)/bcrrpart_helper $(PREFIX)/sbin
+@@ -247,7 +249,9 @@ before-uninstall: force-look
+
+ # install for main executable only
+ bctool-app-install: force-look
++ install -o root -m 755 -d $(PREFIX)/usr/bin
+ install -o root -m 0755 -s build/bctool $(PREFIX)/usr/bin/
++ install -o root -m 755 -d $(PREFIX)/$(MAN_PATH)/man8
+ install -m 644 bctool.8 $(PREFIX)/$(MAN_PATH)/man8/
+
+ # uninstall for main executable only
diff --git a/app-crypt/bestcrypt/files/bestcrypt-2.0.4-build.patch b/app-crypt/bestcrypt/files/bestcrypt-2.0.4-build.patch
new file mode 100644
index 000000000000..8154833890ac
--- /dev/null
+++ b/app-crypt/bestcrypt/files/bestcrypt-2.0.4-build.patch
@@ -0,0 +1,108 @@
+From 38ef9fdb4b6690825fe3e54b6b44173e00316a94 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sun, 6 Jul 2014 21:28:11 +0300
+Subject: [PATCH 1/3] build: respect CFLAGS/LDFLAGS
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 17abf61..e89bb76 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,8 @@ KGSHA_LIB = $(KGSHA_BUILD_DIR)/lib$(KGSHA_LIB_NAME).a
+ KGGHOST_LIB = $(KGGHOST_BUILD_DIR)/lib$(KGGHOST_LIB_NAME).a
+ SPACEMAP_LIB = $(SPACEMAP_BUILD_DIR)/lib$(SPACEMAP_LIB_NAME).a
+
+-BC_EXTRA_CFLAGS= -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
++BC_EXTRA_CFLAGS= $(CFLAGS) -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
++BC_EXTRA_LDFLAGS = $(LDFLAGS)
+
+ #
+ # commands
+@@ -86,7 +87,7 @@ BCTOOL_OBJS = container/linux/file.o \
+ src/bctool-rawlink.o
+
+ BCTOOL_CFLAGS = $(BC_EXTRA_CFLAGS) -DBC_LINUX -Wall -I. -Icertificate/
+-BCTOOL_LDFLAGS = -L$(TARGET_DIR) -l$(KERN_LIB_NAME) -l$(KGSHA_LIB_NAME) \
++BCTOOL_LDFLAGS = $(BC_EXTRA_LDFLAGS) -L$(TARGET_DIR) -l$(KERN_LIB_NAME) -l$(KGSHA_LIB_NAME) \
+ -l$(KGGHOST_LIB_NAME) -l$(CERT_LIB_NAME) -l$(SPACEMAP_LIB_NAME) \
+ -ludev -lpthread -l$(FS_LIB_NAME)
+
+--
+1.8.5.5
+
+From 632ba530d94675c62213ec9f2bd9a37a411a6050 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sun, 6 Jul 2014 21:30:49 +0300
+Subject: [PATCH 2/3] build: create directories before put file + use install
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index e89bb76..3cd36fd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -238,6 +238,7 @@ uninstall: before-uninstall module-uninstall console-uninstall helpers-uninstall
+ true
+
+ helpers-install:
++ install -o root -m 0755 -d $(PREFIX)/sbin
+ install -o root -m 4755 -s $(TARGET_DIR)/bcmount_helper $(PREFIX)/sbin
+ install -o root -m 4755 -s $(TARGET_DIR)/bcumount_helper $(PREFIX)/sbin
+ install -o root -m 4755 -s $(TARGET_DIR)/bcrrpart_helper $(PREFIX)/sbin
+@@ -261,9 +262,9 @@ before-uninstall: force-look
+
+ # install for console only
+ console-install: force-look
+- mkdir -p $(PREFIX)/usr/bin
++ install -o root -m 0755 -d $(PREFIX)/usr/bin
+ install -o root -m 0755 -s build/bctool $(PREFIX)/usr/bin/
+- mkdir -p $(PREFIX)/$(MAN_PATH)/man8
++ install -o root -m 0755 -d $(PREFIX)/$(MAN_PATH)/man8
+ install -m 644 bctool.8 $(PREFIX)/$(MAN_PATH)/man8/
+
+ # uninstall for console only
+--
+1.8.5.5
+
+From 4bce59bd9bc5a201caf5f2ff3e2080e7e5a01733 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sun, 6 Jul 2014 21:34:21 +0300
+Subject: [PATCH 3/3] build: do not auto build/install module
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3cd36fd..a3fd59e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -98,7 +98,7 @@ TESTS_TARGET = $(TARGET_DIR)/tests/bctool-tests
+ #
+
+ # default target builds console tool with modules
+-all: Makefile helpers module console
++all: Makefile helpers console
+ true
+
+ rebuild: clean all
+@@ -226,7 +226,7 @@ module-clean: force-look
+ #
+
+ # install for default target
+-install: module-install console-install helpers-install
++install: console-install helpers-install
+ true
+
+ # used by RPM creation script
+--
+1.8.5.5
+
diff --git a/app-crypt/bestcrypt/files/bestcrypt-2.0.6-build.patch b/app-crypt/bestcrypt/files/bestcrypt-2.0.6-build.patch
new file mode 100644
index 000000000000..966053072d32
--- /dev/null
+++ b/app-crypt/bestcrypt/files/bestcrypt-2.0.6-build.patch
@@ -0,0 +1,341 @@
+From 4bce59bd9bc5a201caf5f2ff3e2080e7e5a01733 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sun, 6 Jul 2014 21:34:21 +0300
+Subject: [PATCH 3/3] build: do not auto build/install module
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3cd36fd..a3fd59e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -98,5 +98,5 @@ TESTS_TARGET = $(TARGET_DIR)/tests/bctool-tests
+
+ # default target builds console tool with modules
+-all: Makefile helpers module console
++all: Makefile helpers console
+ true
+
+@@ -226,5 +226,5 @@ module-clean: force-look
+
+ # install for default target
+-install: module-install console-install helpers-install
++install: console-install helpers-install
+ true
+
+--
+1.8.5.5
+
+From f7f71ec155385aea3dec495d46d07452943fe729 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 17 Mar 2015 21:05:22 +0200
+Subject: [PATCH] build: allow override programs
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile | 11 +++++++----
+ certificate/CertificateLib/Makefile | 4 +++-
+ disk/Makefile | 6 ++++--
+ fslib/Makefile | 16 +++++++++-------
+ kernel/Makefile | 5 +++--
+ keygens/kgghost/Makefile | 7 +++++--
+ keygens/kgsha/Makefile | 7 +++++--
+ mount/Makefile | 9 +++++----
+ spacemap/Makefile | 6 ++++--
+ tests/Makefile | 12 ++++++------
+ 10 files changed, 51 insertions(+), 32 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 6af2319..359d022 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,6 +56,9 @@ KGSHA_LIB = $(KGSHA_BUILD_DIR)/lib$(KGSHA_LIB_NAME).a
+ KGGHOST_LIB = $(KGGHOST_BUILD_DIR)/lib$(KGGHOST_LIB_NAME).a
+ SPACEMAP_LIB = $(SPACEMAP_BUILD_DIR)/lib$(SPACEMAP_LIB_NAME).a
+
++CC = gcc
++CXX = g++
++
+ BC_EXTRA_CFLAGS= $(CFLAGS) -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ BC_EXTRA_LDFLAGS = $(LDFLAGS)
+
+@@ -125,7 +128,7 @@ helpers: create-dirs
+ console: spacemap-lib certificate-lib fs-lib kernel-lib keygen-libs $(TARGET)
+ true
+ $(TARGET): $(BCTOOL_OBJS)
+- g++ $(BCTOOL_OBJS) $(BCTOOL_CFLAGS) $(BCTOOL_LDFLAGS) -o $(TARGET)
++ $(CXX) $(BCTOOL_OBJS) $(BCTOOL_CFLAGS) $(BCTOOL_LDFLAGS) -o $(TARGET)
+
+ # GUI executable only (w/o console and helpers)
+ panel: certificate-lib kernel-lib keygen-libs fs-lib
+@@ -339,10 +342,10 @@ module-uninstall:
+ bash ./scripts/remove_mods
+
+ %.o:%.cpp
+- g++ -c $(BCTOOL_CFLAGS) $< -o $@
++ $(CXX) -c $(BCTOOL_CFLAGS) $< -o $@
+
+ %.o:%.cc
+- g++ -c $(BCTOOL_CFLAGS) $< -o $@
++ $(CXX) -c $(BCTOOL_CFLAGS) $< -o $@
+
+ %.o:%.c
+- gcc -c $(BCTOOL_CFLAGS) $< -o $@
++ $(CC) -c $(BCTOOL_CFLAGS) $< -o $@
+diff --git a/certificate/CertificateLib/Makefile b/certificate/CertificateLib/Makefile
+index d28ccc7..810a30a 100644
+--- a/certificate/CertificateLib/Makefile
++++ b/certificate/CertificateLib/Makefile
+@@ -1,5 +1,7 @@
+
+-CP = cp
++CC = gcc
++CXX = g++
++AR = ar
+ CFLAGS += -Wall -fno-strict-aliasing -O3
+ #-Werror
+
+diff --git a/disk/Makefile b/disk/Makefile
+index e3915b0..1a9ff01 100644
+--- a/disk/Makefile
++++ b/disk/Makefile
+@@ -1,14 +1,16 @@
+ DISKMON_OBJS = disk.o diskmon.o
++
++CXX = g++
+ CFLAGS += -Wall -I. -I../ -p -gdwarf-2 #-DBC_DEBUG
+ LDFLAGS += -ludev
+
+ all:diskmon Makefile
+
+ diskmon:$(DISKMON_OBJS)
+- g++ $(DISKMON_OBJS) $(LDFLAGS) -o diskmon
++ $(CXX) $(DISKMON_OBJS) $(LDFLAGS) -o diskmon
+
+ %.o:%.cc
+- g++ $(CFLAGS) -c $< -o $@
++ $(CXX) $(CFLAGS) -c $< -o $@
+
+ clean:
+ rm -rf diskmon *.o
+diff --git a/fslib/Makefile b/fslib/Makefile
+index a6f96f4..bbe6cae 100644
+--- a/fslib/Makefile
++++ b/fslib/Makefile
+@@ -1,3 +1,5 @@
++CC = gcc
++AR = ar
+
+ FSLIB_CFLAGS = $(CFLAGS) -Wall -O0 -DFSLIB_DEBUG -g # -O3
+ FSLIB_CFLAGS += -I. -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 #-fvisibility=hidden
+@@ -15,25 +17,25 @@ FSLIB_TOOLS = file_hfs test_hfs test_info test_free_space diskinfo
+ all: Makefile $(FSLIB) $(FSLIB_TOOLS)
+
+ $(FSLIB): $(OBJS)
+- ar rcs $(FSLIB) $(OBJS)
++ $(AR) rcs $(FSLIB) $(OBJS)
+
+ test_hfs: $(FSLIB) test/test_hfs.o
+- gcc test/test_hfs.o $(OBJS) $(FSLIB_LDFLAGS) -o test_hfs
++ $(CC) test/test_hfs.o $(OBJS) $(FSLIB_LDFLAGS) -o test_hfs
+
+ file_hfs: $(FSLIB) test/file_hfs.o
+- gcc test/file_hfs.o $(OBJS) $(FSLIB_LDFLAGS) -o file_hfs
++ $(CC) test/file_hfs.o $(OBJS) $(FSLIB_LDFLAGS) -o file_hfs
+
+ test_info: $(FSLIB) test/test_info.o
+- gcc test/test_info.o $(OBJS) $(FSLIB_LDFLAGS) -o test_info
++ $(CC) test/test_info.o $(OBJS) $(FSLIB_LDFLAGS) -o test_info
+
+ test_free_space: $(FSLIB) test/test_free_space.o
+- gcc test/test_free_space.o $(FSLIB_CFLAGS) $(OBJS) $(FSLIB_LDFLAGS) -o test_free_space
++ $(CC) test/test_free_space.o $(FSLIB_CFLAGS) $(OBJS) $(FSLIB_LDFLAGS) -o test_free_space
+
+ diskinfo: $(FSLIB) test/diskinfo.o
+- gcc test/diskinfo.o $(OBJS) $(FSLIB_LDFLAGS) -g -o diskinfo
++ $(CC) test/diskinfo.o $(OBJS) $(FSLIB_LDFLAGS) -g -o diskinfo
+
+ .c.o:
+- gcc $(FSLIB_CFLAGS) -c $< -o $@
++ $(CC) $(FSLIB_CFLAGS) -c $< -o $@
+
+ clean:
+ rm -rf *~ *.o test/*.o $(OBJS) $(FSLIB) $(FSLIB_TOOLS)
+diff --git a/kernel/Makefile b/kernel/Makefile
+index 1a71617..4f9760d 100644
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -3,6 +3,7 @@ OBJECTS = $(SOURCES:.cc=.o)
+ TARGET_DIR = ./build/
+ TARGET = $(TARGET_DIR)/libbckernel.a
+ BC_CFLAGS = $(BC_EXTRA_CFLAGS) -fPIC -c -Wall -ludev -L../build/ -lspacemap -I../ -fvisibility=hidden #-fvisibility-inlines-hidden
++CXX = g++
+
+
+ ### Build ###
+@@ -21,12 +22,12 @@ module: create-dirs force_look
+
+ kernel-lib: create-dirs $(TARGET)
+ $(TARGET): $(OBJECTS)
+- ar rcs $(TARGET) $(OBJECTS)
++ $(AR) rcs $(TARGET) $(OBJECTS)
+
+ $(OBJECTS): Makefile $(SOURCES) BCKernel.h
+ set -e; \
+ for i in $(SOURCES); do \
+- g++ -c $(BC_CFLAGS) $$i -o $${i%.cc}.o; \
++ $(CXX) -c $(BC_CFLAGS) $$i -o $${i%.cc}.o; \
+ done
+
+ create-dirs: $(TARGET_DIR)
+diff --git a/keygens/kgghost/Makefile b/keygens/kgghost/Makefile
+index 8f6cc59..fe59ac7 100644
+--- a/keygens/kgghost/Makefile
++++ b/keygens/kgghost/Makefile
+@@ -5,10 +5,13 @@ KGGHOST_OBJS = hash.o pbe.o keyblock.o datablock.o kgghost.o
+ KGGHOST_CFLAGS = -Wall -p -ggdb -I. -I../../ -I../../certificate -DBC_LINUX
+ KGGHOST_CFLAGS += $(BC_EXTRA_CFLAGS)
+
++CXX = g++
++AR = ar
++
+ all: $(KGGHOST) Makefile
+
+ $(KGGHOST):$(KGGHOST_OBJS) $(CERTIFICATE_LIB)
+- ar rcs $(KGGHOST) $(KGGHOST_OBJS)
++ $(AR) rcs $(KGGHOST) $(KGGHOST_OBJS)
+
+ $(CERTIFICATE_LIB):
+ make -C ../../certificate/CertificateLib
+@@ -17,7 +20,7 @@ $(KERNEL_LIB):
+ make -C ../../kernel/build
+
+ %.o:%.cpp
+- g++ $(KGGHOST_CFLAGS) -c -o $@ $<
++ $(CXX) $(KGGHOST_CFLAGS) -c -o $@ $<
+
+ clean:
+ rm -f *.o *.ver *~ $(KGGHOST)
+diff --git a/keygens/kgsha/Makefile b/keygens/kgsha/Makefile
+index f1a89f9..57f55ca 100644
+--- a/keygens/kgsha/Makefile
++++ b/keygens/kgsha/Makefile
+@@ -10,10 +10,13 @@ KGSHA_OBJS = hash.o datablock.o kgsha.o
+ KGSHA_CFLAGS = -Wall -p -gdwarf-2 -I. -I../../ -I../../certificate -DBC_LINUX
+ KGSHA_CFLAGS += $(EXTRA_CFLAGS)
+
++CXX = g++
++AR = ar
++
+ all: $(KGSHA) $(KGSHA_OBJS) Makefile hidden_sector.h defs.h datablock.h
+
+ $(KGSHA): $(KGSHA_OBJS) $(CERTIFICATE_LIB) $(KERN_LIB)
+- ar rcs $(KGSHA) $(KGSHA_OBJS)
++ $(AR) rcs $(KGSHA) $(KGSHA_OBJS)
+
+ $(CERT_LIB):
+ make -C ../../certificate/CertificateLib
+@@ -22,7 +25,7 @@ $(KERN_LIB):
+ make -C ../../kernel/
+
+ %.o:%.cpp
+- g++ $(KGSHA_CFLAGS) -c -o $@ $<
++ $(CXX) $(KGSHA_CFLAGS) -c -o $@ $<
+
+ clean:
+ rm -f *.o *.ver *~ $(KGSHA)
+diff --git a/mount/Makefile b/mount/Makefile
+index 7a3d66b..0e60095 100644
+--- a/mount/Makefile
++++ b/mount/Makefile
+@@ -1,22 +1,23 @@
+
+ HELPERS = bcrrpart_helper bcmount_helper bcumount_helper
+
++CC = gcc
+ OBJS = common.o
+ CFLAGS += -Wall -O3
+
+ all: $(HELPERS) Makefile
+
+ bcrrpart_helper: $(OBJS) rrpart.o
+- gcc $(OBJS) rrpart.o $(LDFLAGS) -o bcrrpart_helper
++ $(CC) $(OBJS) rrpart.o $(LDFLAGS) -o bcrrpart_helper
+
+ bcmount_helper: $(OBJS) mount.o
+- gcc $(OBJS) mount.o $(LDFLAGS) -o bcmount_helper
++ $(CC) $(OBJS) mount.o $(LDFLAGS) -o bcmount_helper
+
+ bcumount_helper: $(OBJS) umount.o
+- gcc $(OBJS) umount.o $(LDFLAGS) -o bcumount_helper
++ $(CC) $(OBJS) umount.o $(LDFLAGS) -o bcumount_helper
+
+ %.o:%.c
+- gcc $(CFLAGS) -c -o $@ $<
++ $(CC) $(CFLAGS) -c -o $@ $<
+
+ clean:
+ rm -f *.o *.ver *~ $(HELPERS)
+diff --git a/spacemap/Makefile b/spacemap/Makefile
+index 6dff240..7dd2ad9 100644
+--- a/spacemap/Makefile
++++ b/spacemap/Makefile
+@@ -5,17 +5,19 @@ LIB_NAME = spacemap
+ STATIC_TARGET = lib$(LIB_NAME).a
+ OBJECT_CFLAGS = -fPIC -g -c -Wall -ludev -fvisibility=hidden #-fvisibility-inlines-hidden
+
++CXX = g++
++AR = ar
+
+ all: static
+ true
+
+ static: $(OBJECTS)
+- ar rcs $(STATIC_TARGET) $(OBJECTS)
++ $(AR) rcs $(STATIC_TARGET) $(OBJECTS)
+
+ $(OBJECTS): $(SOURCES)
+ set -e; \
+ for i in $(SOURCES); do \
+- g++ $(OBJECT_CFLAGS) $$i -o $${i%.c}.o; \
++ $(CXX) $(OBJECT_CFLAGS) $$i -o $${i%.c}.o; \
+ done
+
+ clean:
+diff --git a/tests/Makefile b/tests/Makefile
+index c6d78f0..419020b 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -2,8 +2,8 @@ TESTS_PWD = ../build/tests/
+ TESTS_TARGET = $(TESTS_PWD)/bctool-tests
+ TESTS_SOURCES = tests-main.c ../container/cipher.cc ../keygens/kgsha/datablock.cpp ../keygens/kgsha/hash.cpp ../container/linux/file.cpp
+ TESTS_CFLAGS = -I../ -I../certificate/ -L../build/ -L../build/kernel/ -DBC_LINUX -ludev -g
+-CP = gcc
+-CPP = g++
++CC = gcc
++CXX = g++
+ CERT_LIB_NAME = certificate
+ KERN_LIB_NAME = bckernel
+ SPACEMAP_LIB_NAME = spacemap
+@@ -15,11 +15,11 @@ all: $(TESTS_TARGET)
+ cp insert-modules.sh remove-modules.sh bcmod-loaded.sh $(TESTS_PWD)
+
+ $(TESTS_TARGET): $(TESTS_SOURCES) Makefile
+- $(CPP) -o $(TESTS_TARGET) $(TESTS_CFLAGS) $(TESTS_SOURCES) -l$(CERT_LIB_NAME) -l$(KERN_LIB_NAME) -l$(SPACEMAP_LIB_NAME) -lcunit -ludev
++ $(CXX) -o $(TESTS_TARGET) $(TESTS_CFLAGS) $(TESTS_SOURCES) -l$(CERT_LIB_NAME) -l$(KERN_LIB_NAME) -l$(SPACEMAP_LIB_NAME) -lcunit -ludev
+ cp kernel/print-struct-size.c $(TESTS_PWD)
+- $(CP) -o $(TESTS_PWD)test-data-generator kernel/test-data-generator.c $(TESTS_CFLAGS) -l$(KERN_LIB_NAME) -l$(SPACEMAP_LIB_NAME)
+- $(CPP) -o $(TESTS_PWD)kgsha-key-generator kgsha/kgsha-data-generator.cpp ../keygens/kgsha/datablock.cpp ../keygens/kgsha/hash.cpp ../container/cipher.cc $(TESTS_CFLAGS) -l$(KERN_LIB_NAME) -l$(CERT_LIB_NAME) -l$(SPACEMAP_LIB_NAME)
+- $(CP) -o $(TESTS_PWD)/bcdevchecker bcdevchecker.c
++ $(CC) -o $(TESTS_PWD)test-data-generator kernel/test-data-generator.c $(TESTS_CFLAGS) -l$(KERN_LIB_NAME) -l$(SPACEMAP_LIB_NAME)
++ $(CXX) -o $(TESTS_PWD)kgsha-key-generator kgsha/kgsha-data-generator.cpp ../keygens/kgsha/datablock.cpp ../keygens/kgsha/hash.cpp ../container/cipher.cc $(TESTS_CFLAGS) -l$(KERN_LIB_NAME) -l$(CERT_LIB_NAME) -l$(SPACEMAP_LIB_NAME)
++ $(CC) -o $(TESTS_PWD)/bcdevchecker bcdevchecker.c
+
+ clean:
+ rm -rf $(TESTS_PWD)
+--
+2.0.5
+
diff --git a/app-crypt/bestcrypt/metadata.xml b/app-crypt/bestcrypt/metadata.xml
new file mode 100644
index 000000000000..d68fe974c15a
--- /dev/null
+++ b/app-crypt/bestcrypt/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>crypto</herd>
+</pkgmetadata>