volatility 2.6
use new virtualenv feature Closes #8324. Signed-off-by: Tomasz Pajor <tomek@polishgeeks.com>
This commit is contained in:
parent
19086599b1
commit
f0af0fdbb7
1 changed files with 132 additions and 46 deletions
|
@ -1,8 +1,10 @@
|
|||
class Volatility < Formula
|
||||
include Language::Python::Virtualenv
|
||||
|
||||
desc "Advanced memory forensics framework"
|
||||
homepage "https://github.com/volatilityfoundation/volatility"
|
||||
url "http://downloads.volatilityfoundation.org/releases/2.5/volatility-2.5.zip"
|
||||
sha256 "b90dfd18b6a99e1b35ef0f92f28422cca03bea0b7b8ec411cfbc603e72aa594b"
|
||||
url "http://downloads.volatilityfoundation.org/releases/2.6/volatility-2.6.zip"
|
||||
sha256 "5b73050d72bf94870ffce22843f03d4b0b7764011dec29ef1a0a5b1b46cf9295"
|
||||
head "https://github.com/volatilityfoundation/volatility.git"
|
||||
|
||||
bottle do
|
||||
|
@ -17,75 +19,159 @@ class Volatility < Formula
|
|||
depends_on "jpeg"
|
||||
depends_on "freetype"
|
||||
|
||||
resource "yara-python" do
|
||||
url "https://github.com/plusvic/yara/archive/v3.4.0.tar.gz"
|
||||
sha256 "528571ff721364229f34f6d1ff0eedc3cd5a2a75bb94727dc6578c6efe3d618b"
|
||||
resource "distorm3" do
|
||||
url "https://files.pythonhosted.org/packages/28/f9/8ff25a8f3edb581b5bc0efbed6382dcca22e5e7eff39464346c629105739/distorm3-3.3.4.zip"
|
||||
sha256 "a4dddc2d3cf4fe3e1f8b35507e3c30b082f6e0b0ae46e71c4d6ed6f463eb09ae"
|
||||
end
|
||||
|
||||
resource "distorm3" do
|
||||
url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/distorm/distorm3.zip"
|
||||
sha256 "d311d232e108def8acac0d4f6514e7bc070e37d7aa123ab9a9a05b9322321582"
|
||||
resource "yara-python" do
|
||||
url "https://files.pythonhosted.org/packages/3e/6c/ec2453fd811ea2f8c157d196b4dd76eb3c229362918fdb661358bd3e8645/yara-python-3.5.0.tar.gz"
|
||||
sha256 "c743ef051127eacc903fd4bd63d552ecf00031b59a9a8e7d0d017063de24b69c"
|
||||
end
|
||||
|
||||
resource "pycrypto" do
|
||||
url "https://github.com/dlitz/pycrypto/archive/v2.6.1.tar.gz"
|
||||
sha256 "41542a5be24da239e0841cb66e9dd28b772e79684b78d0b8292118e5c0d4e184"
|
||||
url "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz"
|
||||
sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c"
|
||||
end
|
||||
|
||||
resource "pillow" do
|
||||
url "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.1.1.tar.gz"
|
||||
sha256 "486f4ccddee09429cb1c63ea56c02894aecf9d69acdcaf006c53835df2549fff"
|
||||
resource "Pillow" do
|
||||
url "https://files.pythonhosted.org/packages/46/4f/94f6165052774839b4a4af0c72071aa528d5dc8cb8bc6bb43e24a55c10cc/Pillow-3.4.2.tar.gz"
|
||||
sha256 "0ee9975c05602e755ff5000232e0335ba30d507f6261922a658ee11b1cec36d1"
|
||||
end
|
||||
|
||||
resource "openpyxl" do
|
||||
url "https://pypi.python.org/packages/source/o/openpyxl/openpyxl-2.3.3.tar.gz"
|
||||
sha256 "93d64157d8cab5c7040bc025f0a7a9ad3c05e2d3f11518329c3f1682f5f62ffe"
|
||||
url "https://files.pythonhosted.org/packages/dc/f2/c57f9f00f8ae5e1a73cb096dbf600433724f037ffcbd51c456f89da5efd9/openpyxl-2.4.1.tar.gz"
|
||||
sha256 "836e66578320e5871baa5a958c7acb7dcbc1b508989a675276b20ac2e1c08d82"
|
||||
end
|
||||
|
||||
resource "ipython" do
|
||||
url "https://pypi.python.org/packages/source/i/ipython/ipython-2.4.1.tar.gz"
|
||||
sha256 "6d350b5c2d3e925b0ff6167658812d720b891e476238d924504e2f7f483e9217"
|
||||
resource "et_xmlfile" do
|
||||
url "https://files.pythonhosted.org/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz"
|
||||
sha256 "614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b"
|
||||
end
|
||||
|
||||
resource "readline" do
|
||||
url "https://pypi.python.org/packages/source/r/readline/readline-6.2.4.1.tar.gz"
|
||||
sha256 "e00f86e03dfe52e7d1502cec5c64070b32621c85509c0081a4cfa6a0294bd107"
|
||||
resource "jdcal" do
|
||||
url "https://files.pythonhosted.org/packages/9b/fa/40beb2aa43a13f740dd5be367a10a03270043787833409c61b79e69f1dfd/jdcal-1.3.tar.gz"
|
||||
sha256 "b760160f8dc8cc51d17875c6b663fafe64be699e10ce34b6a95184b5aa0fdc9e"
|
||||
end
|
||||
|
||||
resource "ujson" do
|
||||
url "https://files.pythonhosted.org/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz"
|
||||
sha256 "f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86"
|
||||
end
|
||||
|
||||
resource "pytz" do
|
||||
url "https://pypi.python.org/packages/source/p/pytz/pytz-2015.7.tar.gz"
|
||||
sha256 "99266ef30a37e43932deec2b7ca73e83c8dbc3b9ff703ec73eca6b1dae6befea"
|
||||
url "https://files.pythonhosted.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2"
|
||||
sha256 "7016b2c4fa075c564b81c37a252a5fccf60d8964aa31b7f5eae59aeb594ae02b"
|
||||
end
|
||||
|
||||
resource "ipython" do
|
||||
url "https://files.pythonhosted.org/packages/89/63/a9292f7cd9d0090a0f995e1167f3f17d5889dcbc9a175261719c513b9848/ipython-5.1.0.tar.gz"
|
||||
sha256 "7ef4694e1345913182126b219aaa4a0047e191af414256da6772cf249571b961"
|
||||
end
|
||||
|
||||
resource "appnope" do
|
||||
url "https://files.pythonhosted.org/packages/26/34/0f3a5efac31f27fabce64645f8c609de9d925fe2915304d1a40f544cff0e/appnope-0.1.0.tar.gz"
|
||||
sha256 "8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71"
|
||||
end
|
||||
|
||||
resource "backports.shutil_get_terminal_size" do
|
||||
url "https://files.pythonhosted.org/packages/ec/9c/368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/backports.shutil_get_terminal_size-1.0.0.tar.gz"
|
||||
sha256 "713e7a8228ae80341c70586d1cc0a8caa5207346927e23d09dcbcaf18eadec80"
|
||||
end
|
||||
|
||||
resource "decorator" do
|
||||
url "https://files.pythonhosted.org/packages/13/8a/4eed41e338e8dcc13ca41c94b142d4d20c0de684ee5065523fee406ce76f/decorator-4.0.10.tar.gz"
|
||||
sha256 "9c6e98edcb33499881b86ede07d9968c81ab7c769e28e9af24075f0a5379f070"
|
||||
end
|
||||
|
||||
resource "enum34" do
|
||||
url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz"
|
||||
sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1"
|
||||
end
|
||||
|
||||
resource "ipython_genutils" do
|
||||
url "https://files.pythonhosted.org/packages/71/b7/a64c71578521606edbbce15151358598f3dfb72a3431763edc2baf19e71f/ipython_genutils-0.1.0.tar.gz"
|
||||
sha256 "3a0624a251a26463c9dfa0ffa635ec51c4265380980d9a50d65611c3c2bd82a6"
|
||||
end
|
||||
|
||||
resource "pathlib2" do
|
||||
url "https://files.pythonhosted.org/packages/c9/27/8448b10d8440c08efeff0794adf7d0ed27adb98372c70c7b38f3947d4749/pathlib2-2.1.0.tar.gz"
|
||||
sha256 "deb3a960c1d55868dfbcac98432358b92ba89d95029cddd4040db1f27405055c"
|
||||
end
|
||||
|
||||
resource "pexpect" do
|
||||
url "https://files.pythonhosted.org/packages/e8/13/d0b0599099d6cd23663043a2a0bb7c61e58c6ba359b2656e6fb000ef5b98/pexpect-4.2.1.tar.gz"
|
||||
sha256 "3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92"
|
||||
end
|
||||
|
||||
resource "pickleshare" do
|
||||
url "https://files.pythonhosted.org/packages/69/fe/dd137d84daa0fd13a709e448138e310d9ea93070620c9db5454e234af525/pickleshare-0.7.4.tar.gz"
|
||||
sha256 "84a9257227dfdd6fe1b4be1319096c20eb85ff1e82c7932f36efccfe1b09737b"
|
||||
end
|
||||
|
||||
resource "prompt_toolkit" do
|
||||
url "https://files.pythonhosted.org/packages/83/14/5ac258da6c530eca02852ee25c7a9ff3ca78287bb4c198d0d0055845d856/prompt_toolkit-1.0.9.tar.gz"
|
||||
sha256 "cd6523b36adc174cc10d54b1193eb626b4268609ff6ea92c15bcf1996609599c"
|
||||
end
|
||||
|
||||
resource "ptyprocess" do
|
||||
url "https://files.pythonhosted.org/packages/db/d7/b465161910f3d1cef593c5e002bff67e0384898f597f1a7fdc8db4c02bf6/ptyprocess-0.5.1.tar.gz"
|
||||
sha256 "0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6"
|
||||
end
|
||||
|
||||
resource "Pygments" do
|
||||
url "https://files.pythonhosted.org/packages/b8/67/ab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504/Pygments-2.1.3.tar.gz"
|
||||
sha256 "88e4c8a91b2af5962bfa5ea2447ec6dd357018e86e94c7d14bd8cacbc5b55d81"
|
||||
end
|
||||
|
||||
resource "simplegeneric" do
|
||||
url "https://files.pythonhosted.org/packages/3d/57/4d9c9e3ae9a255cd4e1106bb57e24056d3d0709fc01b2e3e345898e49d5b/simplegeneric-0.8.1.zip"
|
||||
sha256 "dc972e06094b9af5b855b3df4a646395e43d1c9d0d39ed345b7393560d0b9173"
|
||||
end
|
||||
|
||||
resource "six" do
|
||||
url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz"
|
||||
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
|
||||
end
|
||||
|
||||
resource "traitlets" do
|
||||
url "https://files.pythonhosted.org/packages/b1/d6/5b5aa6d5c474691909b91493da1e8972e309c9f01ecfe4aeafd272eb3234/traitlets-4.3.1.tar.gz"
|
||||
sha256 "ba8c94323ccbe8fd792e45d8efe8c95d3e0744cc8c085295b607552ab573724c"
|
||||
end
|
||||
|
||||
resource "wcwidth" do
|
||||
url "https://files.pythonhosted.org/packages/55/11/e4a2bb08bb450fdbd42cc709dd40de4ed2c472cf0ccb9e64af22279c5495/wcwidth-0.1.7.tar.gz"
|
||||
sha256 "3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e"
|
||||
end
|
||||
|
||||
def install
|
||||
ENV["PYTHONPATH"] = lib+"python2.7/site-packages"
|
||||
ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages"
|
||||
venv = virtualenv_create(libexec)
|
||||
|
||||
res = %w[distorm3 pycrypto openpyxl pytz ipython readline]
|
||||
resource("Pillow").stage do
|
||||
inreplace "setup.py" do |s|
|
||||
sdkprefix = MacOS::CLT.installed? ? "" : MacOS.sdk_path
|
||||
s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')"
|
||||
s.gsub! "JPEG_ROOT = None", "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')"
|
||||
s.gsub! "FREETYPE_ROOT = None", "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', '#{Formula["freetype"].opt_prefix}/include')"
|
||||
end
|
||||
|
||||
begin
|
||||
# avoid triggering "helpful" distutils code that doesn't recognize Xcode 7 .tbd stubs
|
||||
deleted = ENV.delete "SDKROOT"
|
||||
ENV.append "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" unless MacOS::CLT.installed?
|
||||
venv.pip_install Pathname.pwd
|
||||
ensure
|
||||
ENV["SDKROOT"] = deleted
|
||||
end
|
||||
end
|
||||
|
||||
res = resources.map(&:name).to_set - ["Pillow"]
|
||||
|
||||
res.each do |r|
|
||||
resource(r).stage do
|
||||
system "python", "setup.py", "build"
|
||||
system "python", "setup.py", "install", "--prefix=#{libexec}"
|
||||
end
|
||||
venv.pip_install resource(r)
|
||||
end
|
||||
|
||||
resource("pillow").stage do
|
||||
inreplace "setup.py", "'brew', '--prefix'", "'#{HOMEBREW_PREFIX}/bin/brew', '--prefix'"
|
||||
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
||||
end
|
||||
|
||||
resource("yara-python").stage do
|
||||
cd ("yara-python") do
|
||||
system "python", "setup.py", "build"
|
||||
system "python", "setup.py", "install", "--prefix=#{libexec}"
|
||||
end
|
||||
end
|
||||
|
||||
system "python", "setup.py", "install", "--prefix=#{prefix}",
|
||||
"--single-version-externally-managed", "--record=installed.txt"
|
||||
|
||||
bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
||||
venv.pip_install_and_link buildpath
|
||||
end
|
||||
|
||||
test do
|
||||
|
|
Loading…
Reference in a new issue