homebrew-core/Formula/john.rb
Jack Nagel 7c648d9732 Shore up a number of shell quoting issues
When interpolating in strings passed to Formula#system, it should be
done in such a way that if any interpolated variables contain spaces,
they are either (a) passed as part of a list or (b) protected by quotes
if they are part of a long string (which is subject to shell expansion).
Otherwise, they will be split on the space when expanded by the shell
and passed as multiple arguments to whatever process is being executed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-15 14:03:11 -05:00

41 lines
887 B
Ruby

require 'formula'
class John < Formula
homepage 'http://www.openwall.com/john/'
url 'http://www.openwall.com/john/g/john-1.7.9.tar.bz2'
md5 '45f54fc59386ecd67daaef9f19781d93'
fails_with :llvm do
build 2334
end
def patches; DATA; end
def install
ENV.deparallelize
arch = Hardware.is_64_bit? ? '64' : 'sse2'
cd 'src' do
system "make", "clean", "macosx-x86-#{arch}"
end
rm 'README'
# using mv over bin.install due to problem moving sym links
mv 'run', bin
chmod_R 0755, bin
end
end
__END__
--- a/src/john.c 2010-01-01 22:58:55.000000000 -0500
+++ b/src/john.c 2010-01-01 22:59:11.000000000 -0500
@@ -290,7 +290,7 @@ static void john_init(char *name, int ar
cfg_init(CFG_PRIVATE_ALT_NAME, 1);
#endif
cfg_init(CFG_FULL_NAME, 1);
- cfg_init(CFG_ALT_NAME, 0);
+ cfg_init(CFG_ALT_NAME, 1);
}
status_init(NULL, 1);