Skip to content

Commit 46b0226

Browse files
committed
3.1.0rc1 release
- pypi setup.py files - minor bugfixes
1 parent a1479d8 commit 46b0226

File tree

13 files changed

+110
-96
lines changed

13 files changed

+110
-96
lines changed

grr/client/client_build.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
parser_build = subparsers.add_parser(
8282
"build", help="Build a client from source.")
8383

84+
parser_build.add_argument("--output", default=None,
85+
help="The path to write the output template.")
86+
8487
parser_repack = subparsers.add_parser(
8588
"repack", help="Repack a zip file into an installer (Only useful when "
8689
"signing).")
@@ -457,8 +460,13 @@ def main(_):
457460
signer = GetSigner(context)
458461

459462
if args.subparser_name == "build":
463+
template_path = None
464+
if flags.FLAGS.output:
465+
template_path = os.path.join(flags.FLAGS.output, config_lib.CONFIG.Get(
466+
"PyInstaller.template_filename", context=context))
467+
460468
builder_obj = GetBuilder(context)
461-
builder_obj.MakeExecutableTemplate()
469+
builder_obj.MakeExecutableTemplate(output_file=template_path)
462470
elif args.subparser_name == "repack":
463471
Repack(context, signer=signer)
464472
elif args.subparser_name == "deploy":
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env python
2+
"""This is the setup.py file for the GRR client.
3+
4+
This is just a meta-package which pulls in the minimal requirements to create a
5+
client.
6+
"""
7+
from setuptools import setup
8+
9+
setup(
10+
name="grr-response-client",
11+
version="3.1.0",
12+
description="The GRR Rapid Response client.",
13+
license="Apache License, Version 2.0",
14+
url="https://github.com/google/grr",
15+
entry_points={
16+
"console_scripts": [
17+
"grr_client = grr.lib.distro_entry:Client",
18+
"grr_client_build = grr.lib.distro_entry:ClientBuild",
19+
]
20+
},
21+
install_requires=[
22+
"grr-response-core",
23+
],
24+
)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env python
2+
"""This is the setup.py file for the GRR client.
3+
4+
This is just a meta-package which pulls in the minimal requirements to create a
5+
full grr server.
6+
"""
7+
from setuptools import setup
8+
9+
setup(
10+
name="grr-response-server",
11+
version="3.1.0",
12+
description="The GRR Rapid Response Server.",
13+
license="Apache License, Version 2.0",
14+
url="https://github.com/google/grr",
15+
entry_points={
16+
"console_scripts": [
17+
"grr_console = grr.lib.distro_entry:Console",
18+
"grr_config_updater = grr.lib.distro_entry:ConfigUpdater",
19+
"grr_front_end = grr.lib.distro_entry:GrrFrontEnd",
20+
"grr_server = grr.lib.distro_entry:GrrServer",
21+
"grr_end_to_end_tests = grr.lib.distro_entry:EndToEndTests",
22+
"grr_export = grr.lib.distro_entry:Export",
23+
"grr_worker = grr.lib.distro_entry:Worker",
24+
"grr_admin_ui = grr.lib.distro_entry:AdminUI",
25+
"grr_fuse = grr.lib.distro_entry:GRRFuse",
26+
]
27+
},
28+
install_requires=[
29+
"grr-response-core[Server,test]",
30+
"grr-response-client",
31+
],
32+
33+
extras_require={
34+
# This is an optional component. Install to get MySQL data
35+
# store support:
36+
# pip install grr-response[MySQLDataStore]
37+
"MySQLDataStore": [
38+
"MySQL-python==1.2.5"
39+
],
40+
}
41+
)
File renamed without changes.

grr/endtoend_tests/grep.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@
77
from grr.lib.rdfvalues import client as rdf_client
88

99

10-
class TestSearchFiles(base.AutomatedTest):
11-
"""Test SearchFileContent."""
12-
platforms = ["Linux"]
13-
flow = "SearchFileContent"
14-
test_output_path = "analysis/SearchFiles/testing"
15-
args = {"output": test_output_path,
16-
"paths": ["/bin/ls*"],
17-
"also_download": True}
18-
19-
def CheckFlow(self):
20-
results = aff4.FACTORY.Open(self.client_id.Add(self.test_output_path),
21-
token=self.token)
22-
self.assertGreater(len(results), 1)
23-
for result in results:
24-
self.assertTrue(result.pathspec.path.startswith("/bin/ls"))
25-
26-
2710
class TestSearchFilesGrep(base.AutomatedTest):
2811
"""Test SearchFileContent with grep."""
2912
platforms = ["Linux"]
@@ -37,7 +20,7 @@ class TestSearchFilesGrep(base.AutomatedTest):
3720
def CheckFlow(self):
3821
results = aff4.FACTORY.Open(self.client_id.Add(self.test_output_path),
3922
token=self.token)
40-
self.assertGreater(len(results), 1)
23+
self.assertGreaterEqual(len(results), 1)
4124
for result in results:
4225
self.assertTrue("ELF" in result.data)
4326
self.assertTrue("ls" in result.pathspec.path)

grr/gui/api_plugins/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class ApiGetPendingUserNotificationsResult(rdf_structs.RDFProtoStruct):
349349

350350
class ApiGetPendingUserNotificationsHandler(
351351
api_call_handler_base.ApiCallHandler):
352-
"""Returns the of pending notifications for the current user."""
352+
"""Returns pending notifications for the current user."""
353353

354354
category = CATEGORY
355355
args_type = ApiGetPendingUserNotificationsArgs

grr/gui/plugins/fileview_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def testRefreshDirectoryStartsFlow(self):
266266
# Go to the flow management screen.
267267
self.Click("css=a:contains('Manage launched flows')")
268268

269-
self.Click("css=grr-flows-list tr:visible:nth(1)")
269+
self.Click("css=grr-flows-list tr:contains('RecursiveListDirectory')")
270270
self.WaitUntilContains("RecursiveListDirectory", self.GetText,
271271
"css=#main_bottomPane")
272272
self.WaitUntilContains(

grr/lib/distro_entry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def GetDistroDefaults():
3030
return DISTRO_DEFAULTS["debian"]
3131
if distribution in ["red hat enterprise linux server", "centos linux"]:
3232
return DISTRO_DEFAULTS["redhat"]
33-
else:
34-
return {"flag_defaults": {}, "config_opts": {}}
33+
34+
return {"flag_defaults": {}, "config_opts": {}}
3535

3636

3737
def SetConfigOptions():

grr/lib/hunts/results.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ def DeleteNotifications(cls, record_ids, token=None):
8383
"""Delete hunt notifications."""
8484
with aff4.FACTORY.OpenWithLock(RESULT_NOTIFICATION_QUEUE,
8585
aff4_type="HuntResultQueue",
86+
lease_time=200,
87+
blocking=True,
88+
blocking_sleep_interval=15,
89+
blocking_lock_timeout=1200,
8690
token=token) as queue:
8791
queue.DeleteRecords(record_ids)
8892

setup.py

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,12 @@ def run(self):
6060

6161

6262
setup_args = dict(
63-
name="grr",
64-
version="0.3.1",
63+
name="grr-response-core",
64+
version="3.1.0pre1",
6565
description="GRR Rapid Response",
6666
license="Apache License, Version 2.0",
6767
url="https://github.com/google/grr",
6868
packages=find_packages(),
69-
entry_points={
70-
"console_scripts": [
71-
"grr_console = grr.lib.distro_entry:Console",
72-
"grr_config_updater = grr.lib.distro_entry:ConfigUpdater",
73-
"grr_front_end = grr.lib.distro_entry:GrrFrontEnd",
74-
"grr_server = grr.lib.distro_entry:GrrServer",
75-
"grr_end_to_end_tests = grr.lib.distro_entry:EndToEndTests",
76-
"grr_export = grr.lib.distro_entry:Export",
77-
"grr_client = grr.lib.distro_entry:Client",
78-
"grr_client_build = grr.lib.distro_entry:ClientBuild",
79-
"grr_worker = grr.lib.distro_entry:Worker",
80-
"grr_admin_ui = grr.lib.distro_entry:AdminUI",
81-
"grr_fuse = grr.lib.distro_entry:GRRFuse",
82-
]
83-
},
8469
zip_safe=False,
8570
include_package_data=True,
8671
ext_modules=[
@@ -94,17 +79,11 @@ def run(self):
9479
"install": Install,
9580
},
9681
install_requires=[
97-
"Django==1.8.3",
9882
"GRR-M2Crypto==0.22.6.post2",
9983
"PyYAML==3.11",
100-
"Werkzeug==0.11.3",
10184
"binplist==0.1.4",
102-
"google-api-python-client==1.4.2",
10385
"ipaddr==2.1.11",
10486
"ipython==4.1.1",
105-
"matplotlib==1.5.1",
106-
"mock==1.3.0",
107-
"mox==0.5.3",
10887
"pexpect==4.0.1",
10988
"portpicker==1.1.1",
11089
"psutil==4.0.0",
@@ -115,21 +94,32 @@ def run(self):
11594
"python-dateutil==2.4.2",
11695
"pytsk3==20160226",
11796
"pytz==2015.7",
118-
"selenium==2.50.1",
11997
"urllib3==1.14",
120-
"wsgiref==0.1.2",
121-
12298
"protobuf==2.6.1",
123-
"rekall-core>=1.5.0.post4",
12499
],
125100
extras_require={
126101
# This is an optional component. Install to get MySQL data
127102
# store support:
128-
# pip install grr[MySQLDataStore]
103+
# pip install grr-response[MySQLDataStore]
129104
"MySQLDataStore": [
130105
"MySQL-python==1.2.5"
131106
],
132107

108+
"test": [
109+
"mock==1.3.0",
110+
"mox==0.5.3",
111+
],
112+
113+
"Server": [
114+
"wsgiref==0.1.2",
115+
"Werkzeug==0.11.3",
116+
"Django==1.8.3",
117+
"matplotlib==1.5.1",
118+
"rekall-core>=1.5.0.post4",
119+
"selenium==2.50.1",
120+
"google-api-python-client==1.4.2",
121+
],
122+
133123
# The following requirements are needed in Windows.
134124
':sys_platform=="win32"': [
135125
"WMI==1.4.9",

0 commit comments

Comments
 (0)