public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-crypt/johntheripper-jumbo/, app-crypt/johntheripper-jumbo/files/
@ 2018-12-18 21:40 Rick Farina
  0 siblings, 0 replies; 3+ messages in thread
From: Rick Farina @ 2018-12-18 21:40 UTC (permalink / raw
  To: gentoo-commits

commit:     1abd827624bea952700371febd5442ce2c8ebdd1
Author:     Rick Farina <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 18 21:32:27 2018 +0000
Commit:     Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Tue Dec 18 21:40:25 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1abd8276

app-crypt/johntheripper-jumbo: split jtr and jumbo

jumbo "patch" has taken on a life of it's own and is now vastly too
different than  jtr to keep a sane unified ebuild

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>

 app-crypt/johntheripper-jumbo/Manifest             |   1 +
 .../johntheripper-jumbo/files/1.8.0-gcc5.patch     |  63 +++++++++++
 .../johntheripper-jumbo-1.8.0.ebuild               | 126 +++++++++++++++++++++
 .../johntheripper-jumbo-9999.ebuild                | 123 ++++++++++++++++++++
 app-crypt/johntheripper-jumbo/metadata.xml         |  19 ++++
 5 files changed, 332 insertions(+)

diff --git a/app-crypt/johntheripper-jumbo/Manifest b/app-crypt/johntheripper-jumbo/Manifest
new file mode 100644
index 00000000000..1cbbf2f69a9
--- /dev/null
+++ b/app-crypt/johntheripper-jumbo/Manifest
@@ -0,0 +1 @@
+DIST JohnTheRipper-1.8.0-jumbo-1.tar.gz 32533148 BLAKE2B 15929fa25314438619899582b209bee6902b1e53dc2df39ed6a686820665fd4d8e56d26b3f0082d05dc6be2f54add3526570d936c0a929641e33e6dcfb7a13b5 SHA512 8b7fad7a6330b5ff1afc306218ba698aaa27776b566f82c2e76102d5ceb10aeafa69d71fa6fff67c81996ea2c6a04384bab4696ed192306c6d074873562e7089

diff --git a/app-crypt/johntheripper-jumbo/files/1.8.0-gcc5.patch b/app-crypt/johntheripper-jumbo/files/1.8.0-gcc5.patch
new file mode 100644
index 00000000000..f2a7984955a
--- /dev/null
+++ b/app-crypt/johntheripper-jumbo/files/1.8.0-gcc5.patch
@@ -0,0 +1,63 @@
+From e2e868db3e153b3f959e119a51703d4afb99c624 Mon Sep 17 00:00:00 2001
+From: magnum <john.magnum@hushmail.com>
+Date: Wed, 13 May 2015 12:05:00 +0200
+Subject: [PATCH] Add another solution to #1093. This make it possible to build
+ using gcc 5 without --std=gnu89 (although I kept the latter for now). See
+ also #1250.
+
+---
+ src/DES_bs_b.c |  3 +++
+ src/MD5_std.c  | 12 ++++++++++++
+ 2 files changed, 15 insertions(+)
+
+diff --git a/src/DES_bs_b.c b/src/DES_bs_b.c
+index 306b4e4..18c9235 100644
+--- a/src/DES_bs_b.c
++++ b/src/DES_bs_b.c
+@@ -1272,6 +1272,9 @@ static MAYBE_INLINE void DES_bs_finalize_keys(void)
+ #endif
+ 
+ #if DES_bs_mt
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE void DES_bs_set_salt_for_thread(int t, unsigned int salt)
+ #else
+ void DES_bs_set_salt(ARCH_WORD salt)
+diff --git a/src/MD5_std.c b/src/MD5_std.c
+index 6bdcd35..1eec9b4 100644
+--- a/src/MD5_std.c
++++ b/src/MD5_std.c
+@@ -496,9 +496,15 @@ extern void MD5_body(MD5_word x[15], MD5_word out[4]);
+ #if MD5_std_mt
+ #define MD5_body(x, out) \
+ 	MD5_body_for_thread(t, x, out)
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
+ 	MD5_word x[15], MD5_word out[4])
+ #else
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
+ #endif
+ {
+@@ -595,10 +601,16 @@ MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
+ #if MD5_std_mt
+ #define MD5_body(x0, x1, out0, out1) \
+ 	MD5_body_for_thread(t, x0, x1, out0, out1)
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
+ 	MD5_word x0[15], MD5_word x1[15],
+ 	MD5_word out0[4], MD5_word out1[4])
+ #else
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE_BODY void MD5_body(MD5_word x0[15], MD5_word x1[15],
+ 	MD5_word out0[4], MD5_word out1[4])
+ #endif

diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.8.0.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.8.0.ebuild
new file mode 100644
index 00000000000..6e8d04dc6d4
--- /dev/null
+++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.8.0.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs pax-utils
+
+DESCRIPTION="fast password cracker"
+HOMEPAGE="http://www.openwall.com/john/"
+
+MY_PN="JohnTheRipper"
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git"
+	inherit git-r3
+	KEYWORDS=""
+else
+	JUMBO="jumbo-1"
+	MY_PV="${PV}-${JUMBO}"
+	MY_P="${MY_PN}-${MY_PV}"
+	SRC_URI="https://github.com/magnumripper/${MY_PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+#removed rexgen and commoncrypto
+IUSE="custom-cflags kerberos mpi opencl openmp pcap"
+
+DEPEND=">=dev-libs/openssl-1.0.1:0
+	mpi? ( virtual/mpi )
+	opencl? ( virtual/opencl )
+	kerberos? ( virtual/krb5 )
+	pcap? ( net-libs/libpcap )
+	dev-libs/gmp:*
+	sys-libs/zlib
+	app-arch/bzip2"
+
+RDEPEND="${DEPEND}
+		!app-crypt/johntheripper"
+
+pkg_setup() {
+	if use openmp && [[ ${MERGE_TYPE} != binary ]]; then
+		tc-has-openmp || die "Please switch to an openmp compatible compiler"
+	fi
+}
+
+src_prepare() {
+	eapply "${FILESDIR}/${PV}-gcc5.patch"
+	sed -i 's#/usr/share/john#/etc/john#' src/params.h || die
+	default
+}
+
+src_configure() {
+	cd src || die
+
+	use custom-cflags || strip-flags
+
+	# John ignores CPPFLAGS, use CFLAGS instead
+	append-cflags -DJOHN_SYSTEMWIDE=1
+
+	econf \
+		--disable-native-macro \
+		--disable-native-tests \
+		--without-commoncrypto \
+		--disable-rexgen \
+		--with-openssl \
+		$(use_enable mpi) \
+		$(use_enable opencl) \
+		$(use_enable openmp) \
+		$(use_enable pcap)
+}
+
+src_compile() {
+	emake -C src
+}
+
+src_test() {
+	pax-mark -mr run/john
+	#if use opencl; then
+		#gpu tests fail in portage, so run cpu only tests
+	#	./run/john --device=cpu --test=0 --verbosity=2 || die
+	#else
+		#weak tests
+	#	./run/john --test=0 --verbosity=2 || die
+		#strong tests
+		#./run/john --test=1 --verbosity=2 || die
+	#fi
+	ewarn "When built systemwide, john can't run tests without reading files in /etc."
+	ewarn "Don't bother opening a bug for this unless you include a patch to fix it"
+}
+
+src_install() {
+	# executables
+	dosbin run/john
+	newsbin run/mailer john-mailer
+
+	pax-mark -mr "${ED}usr/sbin/john"
+
+	# 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
+
+	if use opencl; then
+		insinto /usr/share/john/kernels
+		doins run/kernels/*
+	fi
+
+	# config files
+	insinto /etc/john
+	doins run/*.chr run/password.lst
+	doins run/*.conf
+	doins -r run/kernels
+
+	# documentation
+	dodoc doc/*
+}

diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild
new file mode 100644
index 00000000000..1e72fa5104c
--- /dev/null
+++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs pax-utils
+
+DESCRIPTION="fast password cracker"
+HOMEPAGE="http://www.openwall.com/john/"
+
+MY_PN="JohnTheRipper"
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git"
+	inherit git-r3
+	KEYWORDS=""
+else
+	JUMBO="jumbo-1"
+	MY_PV="${PV}-${JUMBO}"
+	MY_P="${MY_PN}-${MY_PV}"
+	SRC_URI="https://github.com/magnumripper/${MY_PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+#removed rexgen and commoncrypto
+IUSE="custom-cflags kerberos mpi opencl openmp pcap"
+
+DEPEND=">=dev-libs/openssl-1.0.1:0
+	mpi? ( virtual/mpi )
+	opencl? ( virtual/opencl )
+	kerberos? ( virtual/krb5 )
+	pcap? ( net-libs/libpcap )
+	dev-libs/gmp:*
+	sys-libs/zlib
+	app-arch/bzip2"
+
+RDEPEND="${DEPEND}
+		!app-crypt/johntheripper"
+
+pkg_setup() {
+	if use openmp && [[ ${MERGE_TYPE} != binary ]]; then
+		tc-has-openmp || die "Please switch to an openmp compatible compiler"
+	fi
+}
+
+src_prepare() {
+	sed -i 's#$prefix/share/john#/etc/john#' src/configure || die
+	default
+}
+
+src_configure() {
+	cd src || die
+
+	use custom-cflags || strip-flags
+
+	econf \
+		--disable-native-march \
+		--disable-native-tests \
+		--without-commoncrypto \
+		--disable-rexgen \
+		--with-openssl \
+		--with-systemwide \
+		$(use_enable mpi) \
+		$(use_enable opencl) \
+		$(use_enable openmp) \
+		$(use_enable pcap)
+}
+
+src_compile() {
+	emake -C src
+}
+
+src_test() {
+	pax-mark -mr run/john
+	#if use opencl; then
+		#gpu tests fail in portage, so run cpu only tests
+	#	./run/john --device=cpu --test=0 --verbosity=2 || die
+	#else
+		#weak tests
+	#	./run/john --test=0 --verbosity=2 || die
+		#strong tests
+		#./run/john --test=1 --verbosity=2 || die
+	#fi
+	ewarn "When built systemwide, john can't run tests without reading files in /etc."
+	ewarn "Don't bother opening a bug for this unless you include a patch to fix it"
+}
+
+src_install() {
+	# executables
+	dosbin run/john
+	newsbin run/mailer john-mailer
+
+	pax-mark -mr "${ED}usr/sbin/john"
+
+	# 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
+
+	if use opencl; then
+		insinto /usr/share/john/kernels
+		doins run/kernels/*
+	fi
+
+	# config files
+	insinto /etc/john
+	doins run/*.chr run/password.lst
+	doins run/*.conf
+	doins -r run/rules run/kernels run/ztex
+
+	# documentation
+	dodoc doc/*
+}

diff --git a/app-crypt/johntheripper-jumbo/metadata.xml b/app-crypt/johntheripper-jumbo/metadata.xml
new file mode 100644
index 00000000000..6eefb4340ea
--- /dev/null
+++ b/app-crypt/johntheripper-jumbo/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>zerochaos@gentoo.org</email>
+		<name>Rick Farina</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>crypto@gentoo.org</email>
+		<name>Crypto</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">magnumripper/JohnTheRipper</remote-id>
+	</upstream>
+	<use>
+		<flag name="opencl">Build with opencl/GPU cracking support</flag>
+		<flag name="pcap">Build with pcap support</flag>
+	</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/johntheripper-jumbo/, app-crypt/johntheripper-jumbo/files/
@ 2021-09-22 22:25 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2021-09-22 22:25 UTC (permalink / raw
  To: gentoo-commits

commit:     3f0a0993461657039f3a44f37f6e67490e09d4c6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 22 22:22:32 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep 22 22:24:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f0a0993

app-crypt/johntheripper-jumbo: add 1.9.0_p20210920-r1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-crypt/johntheripper-jumbo/Manifest             |   1 +
 .../johntheripper-jumbo-1.9.0-fix-bashism.patch    |  24 ++++
 .../johntheripper-jumbo-1.9.0_p20210920.ebuild     | 143 +++++++++++++++++++++
 3 files changed, 168 insertions(+)

diff --git a/app-crypt/johntheripper-jumbo/Manifest b/app-crypt/johntheripper-jumbo/Manifest
index cf2f85e511b..40c0211c679 100644
--- a/app-crypt/johntheripper-jumbo/Manifest
+++ b/app-crypt/johntheripper-jumbo/Manifest
@@ -1 +1,2 @@
 DIST john-1.9.0-jumbo-1.tar.xz 33638768 BLAKE2B 2fd6813e234308408d42581705ee8b25f9217a3dfb43f05483156f7bb67d0ce0d6de9c3ce8c2e4a17bb99bb377119dae2897bc08c800e7bc80bc6cf245400df6 SHA512 c5cb5dc739ee4c666f8479cdf10511fddc391b590c59f90c060d3ccd8449b794ac7b831a6d1f7553883892499e709a66578cfa4d62caef9b7e0a831eb827e808
+DIST johntheripper-jumbo-1.9.0_p20210920.tar.gz 47758128 BLAKE2B e85255dc218c43e6358f76eac1e79af01d437a7a1fcddd608a390734fdc4070cbf949b8abc080b82decf4a1f5e32d2baa6d2a09d385a31913d8e988c8732e85e SHA512 5121434ad275921fe6288c51fd9dfd36ed3162387e70e8089bbc266d4a17ea461b72ce26b2004acfb62d95a9ee2d570ef3b3f00c1d031abd8cff2f20c3ab480a

diff --git a/app-crypt/johntheripper-jumbo/files/johntheripper-jumbo-1.9.0-fix-bashism.patch b/app-crypt/johntheripper-jumbo/files/johntheripper-jumbo-1.9.0-fix-bashism.patch
new file mode 100644
index 00000000000..a0a18158ce7
--- /dev/null
+++ b/app-crypt/johntheripper-jumbo/files/johntheripper-jumbo-1.9.0-fix-bashism.patch
@@ -0,0 +1,24 @@
+https://patch-diff.githubusercontent.com/raw/openwall/john/pull/4822.patch
+
+From dd9501341808fe19b9c5cd4f8f04edfc5f377077 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 22 Sep 2021 19:34:38 +0100
+Subject: [PATCH] configure.ac: avoid bashism in pkg-config check
+
+== is a Bashism and configure scripts need to work
+with a POSIX shell, so let's change to = (like in
+the other condition).
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/src/configure.ac
++++ b/src/configure.ac
+@@ -347,7 +347,7 @@ AS_IF([test -z "$STRIP"], [AC_CHECK_TOOL([STRIP], [strip])])
+ dnl Check if we have this at all
+ PKG_PROG_PKG_CONFIG
+ AC_MSG_CHECKING([if pkg-config will be used])
+-if test "x$PKG_CONFIG" = x || test "x$enable_pkg_config" == xno ; then
++if test "x$PKG_CONFIG" = x || test "x$enable_pkg_config" = xno ; then
+   JTR_MSG_RESULT_FAILIF_FORCED([xno], [x$enable_pkg_config], [pkg-config is NOT available])
+   PKG_CONFIG=no
+ else
+

diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20210920.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20210920.ebuild
new file mode 100644
index 00000000000..df228200cfd
--- /dev/null
+++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20210920.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic toolchain-funcs pax-utils
+
+DESCRIPTION="Fast password cracker"
+HOMEPAGE="http://www.openwall.com/john/"
+
+MY_PN="JohnTheRipper"
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git"
+	inherit git-r3
+else
+	JUMBO="jumbo-1.1"
+	MY_PV="${PV}-${JUMBO}"
+	MY_P="john-${MY_PV}"
+	HASH_COMMIT="43c7f8850736d4ec68bf0a022ae9fb34c274a01d"
+
+	SRC_URI="https://github.com/openwall/john/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/john-${HASH_COMMIT}"
+
+	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="custom-cflags kerberos mpi opencl openmp pcap"
+
+DEPEND=">=dev-libs/openssl-1.0.1:=
+	virtual/libcrypt:=
+	mpi? ( virtual/mpi )
+	opencl? ( virtual/opencl )
+	kerberos? ( virtual/krb5 )
+	pcap? ( net-libs/libpcap )
+	dev-libs/gmp:=
+	sys-libs/zlib
+	app-arch/bzip2"
+RDEPEND="${DEPEND}
+	!app-crypt/johntheripper"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.9.0-fix-bashism.patch
+)
+
+pkg_setup() {
+	if use openmp && [[ ${MERGE_TYPE} != binary ]]; then
+		tc-has-openmp || die "Please switch to an OpenMP compatible compiler"
+	fi
+}
+
+src_prepare() {
+	default
+
+	cd src || die
+	eautoreconf
+
+	sed -i 's#$prefix/share/john#/etc/john#' configure || die
+}
+
+src_configure() {
+	cd src || die
+
+	use custom-cflags || strip-flags
+
+	econf \
+		--enable-pkg-config \
+		--disable-native-march \
+		--disable-native-tests \
+		--disable-rexgen \
+		--with-openssl \
+		--with-systemwide \
+		$(use_enable mpi) \
+		$(use_enable opencl) \
+		$(use_enable openmp) \
+		$(use_enable pcap)
+}
+
+src_compile() {
+	emake -C src
+}
+
+src_test() {
+	pax-mark -mr run/john
+	#if use opencl; then
+		#gpu tests fail in portage, so run cpu only tests
+	#	./run/john --device=cpu --test=0 --verbosity=2 || die
+	#else
+		#weak tests
+	#	./run/john --test=0 --verbosity=2 || die
+		#strong tests
+		#./run/john --test=1 --verbosity=2 || die
+	#fi
+	ewarn "When built systemwide, john can't run tests without reading files in /etc."
+	ewarn "Don't bother opening a bug for this unless you include a patch to fix it"
+}
+
+src_install() {
+	# Executables
+	dosbin run/john
+	newsbin run/mailer john-mailer
+
+	pax-mark -mr "${ED}/usr/sbin/john"
+
+	# grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3
+	local s
+	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
+
+	# Scripts
+	exeinto /usr/share/john
+	doexe run/*.pl
+	doexe run/*.py
+	cd run || die
+
+	local s
+	for s in *.pl *.py; do
+		dosym ../share/john/${s} /usr/bin/${s}
+	done
+	cd .. || die
+
+	if use opencl; then
+		insinto /etc/john
+		doins -r run/opencl
+	fi
+
+	# Config files
+	insinto /etc/john
+	doins run/*.chr run/password.lst
+	doins run/*.conf
+	doins -r run/rules run/ztex
+
+	# dDocumentation
+	rm -f doc/README || die
+	dodoc -r README.md doc/*
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/johntheripper-jumbo/, app-crypt/johntheripper-jumbo/files/
@ 2021-12-03  6:21 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2021-12-03  6:21 UTC (permalink / raw
  To: gentoo-commits

commit:     4b20afa3bda32ad2d4350472ebc7c1e3891abd98
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  3 06:18:55 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec  3 06:21:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b20afa3

app-crypt/johntheripper-jumbo: add 1.9.0_p20211129; sync live

- Respect $STRINGS
- Avoid Bashisms
- Modernise ebuild a bit
- Add missing runtime dependencies for Perl scripts
- Sync live

Closes: https://bugs.gentoo.org/763828
Closes: https://bugs.gentoo.org/729432
Closes: https://bugs.gentoo.org/777369
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-crypt/johntheripper-jumbo/Manifest             |   1 +
 ...eripper-jumbo-1.9.0_p20211129-fix-bashism.patch | 111 +++++++++++++++++++++
 ... => johntheripper-jumbo-1.9.0_p20211129.ebuild} |  84 +++++++++++-----
 .../johntheripper-jumbo-9999.ebuild                |  78 ++++++++++-----
 4 files changed, 223 insertions(+), 51 deletions(-)

diff --git a/app-crypt/johntheripper-jumbo/Manifest b/app-crypt/johntheripper-jumbo/Manifest
index 40c0211c6790..6012316eb241 100644
--- a/app-crypt/johntheripper-jumbo/Manifest
+++ b/app-crypt/johntheripper-jumbo/Manifest
@@ -1,2 +1,3 @@
 DIST john-1.9.0-jumbo-1.tar.xz 33638768 BLAKE2B 2fd6813e234308408d42581705ee8b25f9217a3dfb43f05483156f7bb67d0ce0d6de9c3ce8c2e4a17bb99bb377119dae2897bc08c800e7bc80bc6cf245400df6 SHA512 c5cb5dc739ee4c666f8479cdf10511fddc391b590c59f90c060d3ccd8449b794ac7b831a6d1f7553883892499e709a66578cfa4d62caef9b7e0a831eb827e808
 DIST johntheripper-jumbo-1.9.0_p20210920.tar.gz 47758128 BLAKE2B e85255dc218c43e6358f76eac1e79af01d437a7a1fcddd608a390734fdc4070cbf949b8abc080b82decf4a1f5e32d2baa6d2a09d385a31913d8e988c8732e85e SHA512 5121434ad275921fe6288c51fd9dfd36ed3162387e70e8089bbc266d4a17ea461b72ce26b2004acfb62d95a9ee2d570ef3b3f00c1d031abd8cff2f20c3ab480a
+DIST johntheripper-jumbo-1.9.0_p20211129.tar.gz 47758087 BLAKE2B de57218151fbc3bed79322d065ef73deb99b73fb1ce55924197793a320600cc1189dabae43fe5848014c2e72dcb7e1c2a91f2aaba64bd8c7314ded37e23a34c9 SHA512 f8fc6bf102d900bb32c5714bd595a71f67f73a1f0a237d9f851b2f250046307bf1177f3782023cd1bbcc55f9d54fd7b4946e09c7dc1fd908ba6a6bad90b233d6

diff --git a/app-crypt/johntheripper-jumbo/files/johntheripper-jumbo-1.9.0_p20211129-fix-bashism.patch b/app-crypt/johntheripper-jumbo/files/johntheripper-jumbo-1.9.0_p20211129-fix-bashism.patch
new file mode 100644
index 000000000000..2306bb018f36
--- /dev/null
+++ b/app-crypt/johntheripper-jumbo/files/johntheripper-jumbo-1.9.0_p20211129-fix-bashism.patch
@@ -0,0 +1,111 @@
+https://github.com/openwall/john/pull/4908
+https://bugs.gentoo.org/763828
+
+From 7a843229dff28cf0851fe3130c74b38dfaf38411 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 3 Dec 2021 03:40:00 +0000
+Subject: [PATCH 1/2] configure: check for 'strings' and respect $STRINGS
+ variable
+
+It's possible to want a ${CHOST}-prefixed copy of strings,
+so add a check for 'strings' in configure.ac and respect
+$STRINGS within jtr_asm_magic.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ src/configure.ac        |  1 +
+ src/m4/jtr_asm_magic.m4 |  2 +-
+ 3 files changed, 98 insertions(+), 2 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index 53b6a62592..98b28be202 100644
+--- a/src/configure.ac
++++ b/src/configure.ac
+@@ -346,6 +346,7 @@ AS_IF([test -z "$AS"], [AS="$CC"])
+ AS_IF([test -z "$LD"], [LD="$CC"])
+ AS_IF([test -z "$AR"], [AC_CHECK_TOOL([AR], [ar])])
+ AS_IF([test -z "$STRIP"], [AC_CHECK_TOOL([STRIP], [strip])])
++AS_IF([test -z "$STRINGS"], [AC_CHECK_TOOL([STRINGS], [strings])])
+ 
+ dnl Check if we have this at all
+ PKG_PROG_PKG_CONFIG
+diff --git a/src/m4/jtr_asm_magic.m4 b/src/m4/jtr_asm_magic.m4
+index 469a944589..162736d855 100644
+--- a/src/m4/jtr_asm_magic.m4
++++ b/src/m4/jtr_asm_magic.m4
+@@ -19,7 +19,7 @@ EXTRA_AS_FLAGS=
+ AC_MSG_CHECKING([for extra ASFLAGS])
+ CC="$CC_BACKUP"
+ CFLAGS="$CFLAGS -O0"
+-AS_IF([echo "int long_ident;" > conftest.c && ${CC} -c conftest.c && strings - conftest.${OBJEXT} | ${GREP} _long_ident > conftest.out],
++AS_IF([echo "int long_ident;" > conftest.c && ${CC} -c conftest.c && ${STRINGS} - conftest.${OBJEXT} | ${GREP} _long_ident > conftest.out],
+       [JTR_LIST_ADD(EXTRA_AS_FLAGS, [-DUNDERSCORES])])
+ 
+ AC_LINK_IFELSE([AC_LANG_SOURCE(
+
+From 8c43ed0c2f7fdb793978d90306d6f6a118122e39 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 3 Dec 2021 03:46:44 +0000
+Subject: [PATCH 2/2] configure: fix bashisms
+
+'==' isn't recognised by POSIX-compliant shells, so let's use = too.
+
+No functional change.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ src/configure.ac             |  8 ++++----
+ src/m4/jtr_utility_macros.m4 |  4 ++--
+ 3 files changed, 12 insertions(+), 12 deletions(-)
+
+--- a/src/configure.ac
++++ b/src/configure.ac
+@@ -339,7 +339,7 @@ AC_CACHE_SAVE
+ AC_PATH_PROG([SORT], [sort])
+ AC_PATH_PROG([FIND], [find])
+ AC_PATH_PROG([PERL], [perl])
+-if test "x$PERL" == x ; then
++if test "x$PERL" = x ; then
+   AC_MSG_FAILURE([No perl executable found])
+ fi
+ AS_IF([test -z "$AS"], [AS="$CC"])
+@@ -370,7 +370,7 @@ dnl to succeeed.
+ dnl
+ if ( test -e ../run/john.pot ) ; then
+ AC_MSG_CHECKING([if potcheck.pl succeeds])
+-if test "x$PERL" == x ; then
++if test "x$PERL" = x ; then
+    AC_MSG_RESULT([no Perl (unable to check)])
+ else
+    $PERL ../run/potcheck.pl -validate < ../run/john.pot
+@@ -677,10 +677,10 @@ if test "x$enable_rexgen" != xno ; then
+         AC_MSG_RESULT([TOO old. Rexgen not usable!]))]
+     )]
+   )
+-  if test "x$using_rexgen" == "xyes" ; then
++  if test "x$using_rexgen" = "xyes" ; then
+     AC_DEFINE(HAVE_LIBREXGEN,1,[Define to 1 if you have the `rexgen' library (-lrexgen).])
+   else
+-    if test "x$enable_rexgen" == "xyes" ; then
++    if test "x$enable_rexgen" = "xyes" ; then
+       AC_MSG_FAILURE([rexgen not installed, or unusable version])
+     fi
+   fi
+diff --git a/src/m4/jtr_utility_macros.m4 b/src/m4/jtr_utility_macros.m4
+index 33501eeb71..6b5c58e2b7 100644
+--- a/src/m4/jtr_utility_macros.m4
++++ b/src/m4/jtr_utility_macros.m4
+@@ -189,11 +189,11 @@ dnl will be xno, xyes, xauto, etc.  forced_fail_msg is a message that
+ dnl will be output, and the script will abort, IF forced is xyes which
+ dnl means the user used --enable-foobar
+ AC_DEFUN([JTR_MSG_RESULT_FAILIF_FORCED], [
+-  if test "$1" == xyes; then
++  if test "$1" = xyes; then
+     AC_MSG_RESULT([yes])
+   else
+     AC_MSG_RESULT([no])
+-    if test "$2" == xyes; then
++    if test "$2" = xyes; then
+       AC_MSG_FAILURE([$3])
+     fi
+   fi

diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20211129.ebuild
similarity index 58%
copy from app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild
copy to app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20211129.ebuild
index 826ff08b2f51..f6903d38ff10 100644
--- a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild
+++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20211129.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit flag-o-matic toolchain-funcs pax-utils
+inherit autotools flag-o-matic toolchain-funcs pax-utils
 
 DESCRIPTION="Fast password cracker"
 HOMEPAGE="http://www.openwall.com/john/"
@@ -14,20 +14,22 @@ if [[ ${PV} == "9999" ]] ; then
 	EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git"
 	inherit git-r3
 else
-	JUMBO="jumbo-1"
+	JUMBO="jumbo-1.1"
 	MY_PV="${PV}-${JUMBO}"
-	MY_P="${MY_PN}-${MY_PV}"
-	SRC_URI="https://github.com/magnumripper/${MY_PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
-	S="${WORKDIR}/${MY_P}"
+	MY_P="john-${MY_PV}"
+	HASH_COMMIT="5d0c85f16f96ca7b6dd06640e95a5801081d6e20"
+
+	SRC_URI="https://github.com/openwall/john/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/john-${HASH_COMMIT}"
+
+	KEYWORDS="~alpha ~amd64 ~hppa ~mips ~sparc ~amd64-linux ~x86-linux ~ppc-macos"
 fi
 
 LICENSE="GPL-2"
 SLOT="0"
-#removed rexgen and commoncrypto
 IUSE="custom-cflags kerberos mpi opencl openmp pcap"
 
-DEPEND=">=dev-libs/openssl-1.0.1:0=
+DEPEND=">=dev-libs/openssl-1.0.1:=
 	virtual/libcrypt:=
 	mpi? ( virtual/mpi )
 	opencl? ( virtual/opencl )
@@ -36,19 +38,34 @@ DEPEND=">=dev-libs/openssl-1.0.1:0=
 	dev-libs/gmp:=
 	sys-libs/zlib
 	app-arch/bzip2"
-
+# Missing (unpackaged):
+# - Digest::Haval256
+# - Digest::x
+# See bug #777369.
 RDEPEND="${DEPEND}
-		!app-crypt/johntheripper"
+	dev-perl/Digest-MD2
+	virtual/perl-Digest-MD5
+	dev-perl/Digest-SHA3
+	dev-perl/Digest-GOST
+	!app-crypt/johntheripper"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-bashism.patch
+)
 
 pkg_setup() {
 	if use openmp && [[ ${MERGE_TYPE} != binary ]]; then
-		tc-has-openmp || die "Please switch to an openmp compatible compiler"
+		tc-has-openmp || die "Please switch to an OpenMP compatible compiler"
 	fi
 }
 
 src_prepare() {
-	sed -i 's#$prefix/share/john#/etc/john#' src/configure || die
 	default
+
+	cd src || die
+	eautoreconf
+
+	sed -i 's#$prefix/share/john#/etc/john#' configure || die
 }
 
 src_configure() {
@@ -57,9 +74,9 @@ src_configure() {
 	use custom-cflags || strip-flags
 
 	econf \
+		--enable-pkg-config \
 		--disable-native-march \
 		--disable-native-tests \
-		--without-commoncrypto \
 		--disable-rexgen \
 		--with-openssl \
 		--with-systemwide \
@@ -70,54 +87,69 @@ src_configure() {
 }
 
 src_compile() {
-	emake -C src
+	# Uses default LD=$(CC) but if the user's set LD, it'll call it
+	# bug #729432.
+	emake LD=$(tc-getCC) -C src
 }
 
 src_test() {
 	pax-mark -mr run/john
+
 	#if use opencl; then
-		#gpu tests fail in portage, so run cpu only tests
+		# GPU tests fail in portage, so run cpu only tests
 	#	./run/john --device=cpu --test=0 --verbosity=2 || die
 	#else
-		#weak tests
-	#	./run/john --test=0 --verbosity=2 || die
-		#strong tests
+		# Weak tests
+		#./run/john --test=0 --verbosity=2 || die
+		# Strong tests
 		#./run/john --test=1 --verbosity=2 || die
 	#fi
+
 	ewarn "When built systemwide, john can't run tests without reading files in /etc."
 	ewarn "Don't bother opening a bug for this unless you include a patch to fix it"
 }
 
 src_install() {
-	# executables
+	# Executables
 	dosbin run/john
 	newsbin run/mailer john-mailer
 
 	pax-mark -mr "${ED}/usr/sbin/john"
 
 	# grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3
+	local s
 	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
+		dosym john /usr/sbin/${s}
 	done
 
-	insinto /usr/share/john
-	doins run/*.py
+	# Scripts
+	exeinto /usr/share/john
+	doexe run/*.pl
+	doexe run/*.py
+	cd run || die
+
+	local s
+	for s in *.pl *.py; do
+		dosym ../share/john/${s} /usr/bin/${s}
+	done
+	cd .. || die
 
 	if use opencl; then
 		insinto /etc/john
-		doins -r run/kernels
+		doins -r run/opencl
 	fi
 
-	# config files
+	# Config files
 	insinto /etc/john
 	doins run/*.chr run/password.lst
 	doins run/*.conf
 	doins -r run/rules run/ztex
 
-	# documentation
-	dodoc -r doc/*
+	# Documentation
+	rm -f doc/README || die
+	dodoc -r README.md doc/*
 }

diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild
index 826ff08b2f51..d1fbfc6ec025 100644
--- a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild
+++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit flag-o-matic toolchain-funcs pax-utils
+inherit autotools flag-o-matic toolchain-funcs pax-utils
 
 DESCRIPTION="Fast password cracker"
 HOMEPAGE="http://www.openwall.com/john/"
@@ -14,20 +14,22 @@ if [[ ${PV} == "9999" ]] ; then
 	EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git"
 	inherit git-r3
 else
-	JUMBO="jumbo-1"
+	JUMBO="jumbo-1.1"
 	MY_PV="${PV}-${JUMBO}"
-	MY_P="${MY_PN}-${MY_PV}"
-	SRC_URI="https://github.com/magnumripper/${MY_PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+	MY_P="john-${MY_PV}"
+	HASH_COMMIT="5d0c85f16f96ca7b6dd06640e95a5801081d6e20"
+
+	SRC_URI="https://github.com/openwall/john/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/john-${HASH_COMMIT}"
+
 	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
-	S="${WORKDIR}/${MY_P}"
 fi
 
 LICENSE="GPL-2"
 SLOT="0"
-#removed rexgen and commoncrypto
 IUSE="custom-cflags kerberos mpi opencl openmp pcap"
 
-DEPEND=">=dev-libs/openssl-1.0.1:0=
+DEPEND=">=dev-libs/openssl-1.0.1:=
 	virtual/libcrypt:=
 	mpi? ( virtual/mpi )
 	opencl? ( virtual/opencl )
@@ -36,19 +38,30 @@ DEPEND=">=dev-libs/openssl-1.0.1:0=
 	dev-libs/gmp:=
 	sys-libs/zlib
 	app-arch/bzip2"
-
+# Missing (unpackaged):
+# - Digest::Haval256
+# - Digest::x
+# See bug #777369.
 RDEPEND="${DEPEND}
-		!app-crypt/johntheripper"
+	dev-perl/Digest-MD2
+	virtual/perl-Digest-MD5
+	dev-perl/Digest-SHA3
+	dev-perl/Digest-GOST
+	!app-crypt/johntheripper"
 
 pkg_setup() {
 	if use openmp && [[ ${MERGE_TYPE} != binary ]]; then
-		tc-has-openmp || die "Please switch to an openmp compatible compiler"
+		tc-has-openmp || die "Please switch to an OpenMP compatible compiler"
 	fi
 }
 
 src_prepare() {
-	sed -i 's#$prefix/share/john#/etc/john#' src/configure || die
 	default
+
+	cd src || die
+	eautoreconf
+
+	sed -i 's#$prefix/share/john#/etc/john#' configure || die
 }
 
 src_configure() {
@@ -57,9 +70,9 @@ src_configure() {
 	use custom-cflags || strip-flags
 
 	econf \
+		--enable-pkg-config \
 		--disable-native-march \
 		--disable-native-tests \
-		--without-commoncrypto \
 		--disable-rexgen \
 		--with-openssl \
 		--with-systemwide \
@@ -70,54 +83,69 @@ src_configure() {
 }
 
 src_compile() {
-	emake -C src
+	# Uses default LD=$(CC) but if the user's set LD, it'll call it
+	# bug #729432.
+	emake LD=$(tc-getCC) -C src
 }
 
 src_test() {
 	pax-mark -mr run/john
+
 	#if use opencl; then
-		#gpu tests fail in portage, so run cpu only tests
+		# GPU tests fail in portage, so run cpu only tests
 	#	./run/john --device=cpu --test=0 --verbosity=2 || die
 	#else
-		#weak tests
-	#	./run/john --test=0 --verbosity=2 || die
-		#strong tests
+		# Weak tests
+		#./run/john --test=0 --verbosity=2 || die
+		# Strong tests
 		#./run/john --test=1 --verbosity=2 || die
 	#fi
+
 	ewarn "When built systemwide, john can't run tests without reading files in /etc."
 	ewarn "Don't bother opening a bug for this unless you include a patch to fix it"
 }
 
 src_install() {
-	# executables
+	# Executables
 	dosbin run/john
 	newsbin run/mailer john-mailer
 
 	pax-mark -mr "${ED}/usr/sbin/john"
 
 	# grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3
+	local s
 	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
+		dosym john /usr/sbin/${s}
 	done
 
-	insinto /usr/share/john
-	doins run/*.py
+	# Scripts
+	exeinto /usr/share/john
+	doexe run/*.pl
+	doexe run/*.py
+	cd run || die
+
+	local s
+	for s in *.pl *.py; do
+		dosym ../share/john/${s} /usr/bin/${s}
+	done
+	cd .. || die
 
 	if use opencl; then
 		insinto /etc/john
-		doins -r run/kernels
+		doins -r run/opencl
 	fi
 
-	# config files
+	# Config files
 	insinto /etc/john
 	doins run/*.chr run/password.lst
 	doins run/*.conf
 	doins -r run/rules run/ztex
 
-	# documentation
-	dodoc -r doc/*
+	# Documentation
+	rm -f doc/README || die
+	dodoc -r README.md doc/*
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-03  6:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-03  6:21 [gentoo-commits] repo/gentoo:master commit in: app-crypt/johntheripper-jumbo/, app-crypt/johntheripper-jumbo/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-09-22 22:25 Sam James
2018-12-18 21:40 Rick Farina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox