diff --git a/app-crypt/johntheripper/johntheripper-1.8.0-r1.ebuild b/app-crypt/johntheripper/johntheripper-1.8.0-r1.ebuild index 80d2d5a78..d95cd9695 100644 --- a/app-crypt/johntheripper/johntheripper-1.8.0-r1.ebuild +++ b/app-crypt/johntheripper/johntheripper-1.8.0-r1.ebuild @@ -1,49 +1,45 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI="5" +EAPI=7 inherit cuda flag-o-matic toolchain-funcs pax-utils -MY_PN="john" -MY_P="${MY_PN}-${PV}" - -JUMBO="jumbo-1" - DESCRIPTION="fast password cracker" HOMEPAGE="http://www.openwall.com/john/" -SRC_URI="minimal? ( http://www.openwall.com/john/j/${MY_P}.tar.gz ) - !minimal? ( http://www.openwall.com/john/j/${MY_P}-${JUMBO}.tar.gz )" + +MY_PN="JohnTheRipper" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git" + inherit git-r3 + KEYWORDS="" +else + JUMBO="jumbo-1" + SRC_URI="https://github.com/magnumripper/${MY_PN}/archive/${PV}.tar.gz -> ${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos" + S="${WORKDIR}/${MY_P}" +fi LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos" -IUSE="commoncrypto cuda custom-cflags kerberos -minimal mpi opencl openmp +openssl pcap rexgen wow" -REQUIRED_USE="openmp? ( !minimal ) - mpi? ( !minimal ) - cuda? ( !minimal ) - opencl? ( !minimal ) - ^^ ( openssl commoncrypto )" +#removed rexgen and commoncrypto +IUSE="cuda custom-cflags kerberos mpi opencl openmp pcap" -DEPEND="!minimal? ( >=dev-libs/openssl-1.0.1:0 ) +DEPEND=">=dev-libs/openssl-1.0.1:0 mpi? ( virtual/mpi ) cuda? ( x11-drivers/nvidia-drivers dev-util/nvidia-cuda-toolkit:= ) opencl? ( virtual/opencl ) kerberos? ( virtual/krb5 ) - wow? ( dev-libs/gmp:* ) pcap? ( net-libs/libpcap ) - dev-libs/gmp + dev-libs/gmp:* sys-libs/zlib app-arch/bzip2" -# commoncrypto? ( ) -# rexgen? ( ) RDEPEND="${DEPEND}" -S="${WORKDIR}" - pkg_setup() { if use openmp && [[ ${MERGE_TYPE} != binary ]]; then tc-has-openmp || die "Please switch to an openmp compatible compiler" @@ -52,104 +48,80 @@ pkg_setup() { src_prepare() { if use cuda; then - pushd "${MY_P}-${JUMBO}/src" >&/dev/null || die + pushd "src" >&/dev/null || die cuda_src_prepare popd fi - if use minimal; then - cd "${MY_P}" || die - else - cd "${MY_P}-${JUMBO}" || die - fi epatch ${FILESDIR}/${PV}-fix-32bit.patch epatch ${FILESDIR}/${PV}-gcc5.patch } src_configure() { - if use minimal; then - cd "${MY_P}/src" || die - else - cd "${MY_P}-${JUMBO}/src" || die - fi - + cd src || die use custom-cflags || strip-flags # John ignores CPPFLAGS, use CFLAGS instead append-cflags -DJOHN_SYSTEMWIDE=1 - append-cflags -DJOHN_SYSTEMWIDE_HOME="'\"${EPREFIX}/etc/john\"'" + append-cflags -DJOHN_SYSTEMWIDE_HOME=\"${EPREFIX}/etc/john\" # fix for building with newer nvidia stuff use cuda && append-ldflags -lstdc++ NVIDIA_CUDA="${EPREFIX}/opt/cuda/" econf \ --disable-native-macro \ --disable-native-tests \ + --without-commoncrypto \ + --with-openssl \ + --disable-rexgen \ $(use_enable cuda) \ $(use_enable mpi) \ $(use_enable opencl) \ $(use_enable openmp) \ - $(use_enable pcap) \ - $(use_enable rexgen) \ - $(use_with commoncrypto) \ - $(use_with openssl) + $(use_enable pcap) } src_compile() { - if use minimal; then - cd "${MY_P}" || die - else - cd "${MY_P}-${JUMBO}" || die - fi use custom-cflags || strip-flags # John ignores CPPFLAGS, use CFLAGS instead append-cflags -DJOHN_SYSTEMWIDE=1 - append-cflags -DJOHN_SYSTEMWIDE_HOME="'\"${EPREFIX}/etc/john\"'" + append-cflags -DJOHN_SYSTEMWIDE_HOME=\"${EPREFIX}/etc/john\" emake -C src } src_test() { - if use minimal; then - cd "${MY_P}" || die - else - cd "${MY_P}-${JUMBO}" || die - fi pax-mark -mr run/john if use opencl || use cuda; then ewarn "GPU tests fail, skipping all tests..." else - make -C src check + #weak tests + emake -C src check + #strong tests + #./run/john --test=1 --verbosity=2 || die fi } src_install() { - if use minimal; then - cd "${MY_P}" || die - else - cd "${MY_P}-${JUMBO}" || die - fi # executables dosbin run/john newsbin run/mailer john-mailer pax-mark -mr "${ED}usr/sbin/john" - if ! use minimal; then - # grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3 - for s in \ - unshadow unafs undrop unique ssh2john putty2john pfx2john keepass2john keyring2john \ - zip2john gpg2john rar2john racf2john keychain2john kwallet2john pwsafe2john dmg2john \ - hccap2john base64conv truecrypt_volume2john keystore2john - do - dosym john /usr/sbin/$s - done + # grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3 + for s in \ + unshadow unafs undrop unique ssh2john putty2john pfx2john keepass2john keyring2john \ + zip2john gpg2john rar2john racf2john keychain2john kwallet2john pwsafe2john dmg2john \ + hccap2john base64conv truecrypt_volume2john keystore2john + do + dosym john /usr/sbin/$s + done - insinto /usr/share/john - doins run/*.py + insinto /usr/share/john + doins run/*.py - if use opencl; then - insinto /usr/share/john/kernels - doins run/kernels/* - fi + if use opencl; then + insinto /usr/share/john/kernels + doins run/kernels/* fi # config files diff --git a/app-crypt/johntheripper/johntheripper-9999.ebuild b/app-crypt/johntheripper/johntheripper-9999.ebuild index 42c915d3d..ffcb9a864 100644 --- a/app-crypt/johntheripper/johntheripper-9999.ebuild +++ b/app-crypt/johntheripper/johntheripper-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 inherit flag-o-matic toolchain-funcs pax-utils @@ -16,18 +16,18 @@ if [[ ${PV} == "9999" ]] ; then inherit git-r3 KEYWORDS="" else + JUMBO="jumbo-1" SRC_URI="https://github.com/magnumripper/${MY_PN}/archive/${PV}.tar.gz -> ${MY_P}.tar.gz" - KEYWORDS="~amd64 ~x86" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos" S="${WORKDIR}/${MY_P}" fi LICENSE="GPL-2" SLOT="0" -KEYWORDS="" -IUSE="commoncrypto -cuda custom-cflags kerberos -minimal mpi opencl openmp +openssl pcap rexgen" -REQUIRED_USE="!minimal ^^ ( openssl commoncrypto ) !commoncrypto !cuda !rexgen" +#removed rexgen and commoncrypto +IUSE="cuda custom-cflags kerberos mpi opencl openmp pcap" -DEPEND="openssl? ( >=dev-libs/openssl-1.0.1:0 ) +DEPEND=">=dev-libs/openssl-1.0.1:0 mpi? ( virtual/mpi ) opencl? ( virtual/opencl ) kerberos? ( virtual/krb5 ) @@ -45,22 +45,22 @@ pkg_setup() { } src_configure() { - cd src + cd src || die use custom-cflags || strip-flags - append-cppflags -DJOHN_SYSTEMWIDE_HOME="'\"${EPREFIX}/etc/john\"'" + append-cppflags -DJOHN_SYSTEMWIDE_HOME=\"${EPREFIX}/etc/john\" econf \ + --disable-rexgen \ + --without-commoncrypto \ --disable-native-march \ --disable-native-tests \ + --with-openssl \ --with-systemwide \ $(use_enable mpi) \ $(use_enable opencl) \ $(use_enable openmp) \ - $(use_enable pcap) \ - $(use_enable rexgen) \ - $(use_with commoncrypto) \ - $(use_with openssl) + $(use_enable pcap) } src_compile() { @@ -69,7 +69,14 @@ src_compile() { src_test() { pax-mark -mr run/john - make -C src check + if use opencl || use cuda; then + ewarn "GPU tests fail, skipping all tests..." + else + #weak tests + emake -C src check + #strong tests + #./run/john --test=1 --verbosity=2 || die + fi } src_install() { diff --git a/scripts/pentoo-updater.sh b/scripts/pentoo-updater.sh index bf436c173..9b83bd52e 100755 --- a/scripts/pentoo-updater.sh +++ b/scripts/pentoo-updater.sh @@ -65,8 +65,10 @@ update_kernel() { arch=$(uname -m) if [ "${arch}" = "i686" ]; then ARCH="x86" + ARCHY="x86" elif [ "${arch}" = "x86_64" ]; then ARCH="amd64" + ARCHY="x86_64" else printf "Arch ${arch} isn't supported for automatic kernel updating, skipping...\n." return 1 @@ -115,7 +117,7 @@ update_kernel() { if [ "${currkern}" != "${bestkern}" ]; then printf "Currently running kernel ${currkern} is out of date.\n" if [ -x "/usr/src/linux-${bestkern}/vmlinux" ] && [ -r "/lib/modules/${bestkern}/modules.dep" ]; then - if [ -r /etc/kernels/kernel-config-${ARCH}-${bestkern} ] && ! diff -Naur /usr/src/linux/.config /etc/kernels/kernel-config-${ARCH}-${bestkern} > /dev/null 2>&1 && \ + if [ -r /etc/kernels/kernel-config-${ARCHY}-${bestkern} ] && ! diff -Naur /usr/src/linux/.config /etc/kernels/kernel-config-${ARCHY}-${bestkern} > /dev/null 2>&1 && \ [ ! -e /usr/src/linux/.pentoo-updater-running ]; then printf "Kernel ${bestkern} appears ready to go, please reboot when convenient.\n" return 1 @@ -125,7 +127,7 @@ update_kernel() { else printf "Updated kernel ${bestkern} available, building...\n" fi - elif [ -r /etc/kernels/kernel-config-${ARCH}-${bestkern} ] && diff -Naur /usr/src/linux/.config /etc/kernels/kernel-config-${ARCH}-${bestkern} > /dev/null 2>&1; then + elif [ -r /etc/kernels/kernel-config-${ARCHY}-${bestkern} ] && diff -Naur /usr/src/linux/.config /etc/kernels/kernel-config-${ARCHY}-${bestkern} > /dev/null 2>&1; then printf "No updated kernel or config found. No kernel changes needed.\n" return 0 else