Skip to content

Commit 6445730

Browse files
authored
Merge pull request #9 from nexB/release-020
Prepare Release 0.2.0
2 parents 085d7ae + 8deb22d commit 6445730

39 files changed

+2009
-812
lines changed

AUTHORS.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
The following organizations or individuals have contributed to this repo:
22

3-
-
3+
- Tushar Goel @TG1999
4+
- Philippe Ombredanne @pombredanne
5+
- nexB Inc.

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@ v0.1.0 (8th April 2024)
77

88
- Add goresym support in go-inspector.
99

10+
11+
12+
v0.2.0 (9th April 2024)
13+
------------------------
14+
15+
- Add missing ABOUT file and license for goresym.
16+
- Bump to version GoReSym 2.7.2
17+
- Add support for dependencies and build info

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
3+
# SPDX-License-Identifier: Apache-2.0 AND MIT AND BSD-3-Clause WITH LicenRef-scancode-google-patent-license-golang
44
#
55
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
66
# ScanCode is a trademark of nexB Inc.

README.rst

Lines changed: 70 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,75 @@
1-
Go-Inspector
1+
go-inspector
22
================================
33

4-
- To enable the GoReSym plugin, first you need to install goresym from https://github.com/mandiant/GoReSym/releases/download/v2.6.4/GoReSym.zip
5-
- Unzip the GoReSym.zip, extract goresym for linux and add it in src/go_inspector/bin.
6-
- then change it to executable ```chmod u+x src/go_inspector/bin/GoReSym_lin```
7-
- Install requirements and dependencies using ```make dev```
8-
- Use ```scancode --json-pp - --go-symbol <PATH> --verbose``` to get debug symbols.
4+
go-inspector is a utility to extract dependencies and symbols from Go binaries.
5+
It is desigend to work as a ScanCode Toolkit plugin.
96

7+
To install and use:
108

11-
How to generate test binaries
12-
============================
9+
- Run ``pip install go-inspector``
10+
- Use with ``scancode --json-pp - --go-symbol --verbose <PATH to a tree or file with Go binaries>``
1311

14-
- Run `go tool dist list` to get all possible pairs of OSes and arches to compile the binary.
15-
- Then use a OS/arch pair like this ``GOOS=<OS> GOARCH=<arch> go build -o ./tests/data/app_exe ./tests/data/main.go``
16-
to get compiled binary.
12+
The JSON output will contain various dependencies and symbols found in Go binaries if any.
13+
14+
15+
- License: Apache-2.0 AND MIT AND BSD-3-Clause WITH LicenRef-scancode-google-patent-license-golang
16+
- Copyright (c) nexB Inc., Mandiant, The Go Authors, Elliot Chance and others
17+
- Homepage: https://github.com/nexB/go-inspector/
18+
19+
See the src/go_inspector/bin for detailed license and credits for bundled third-party packages.
20+
21+
22+
Development
23+
----------------
24+
25+
- Install requirements and dependencies using ``make dev``
26+
- Then ``source venv/bin/activate``
27+
28+
Testing:
29+
30+
- To run tests: ``pytest -vvs``
31+
- To regen test fixtures: ``SCANCODE_REGEN_TEST_FIXTURES=yes pytest -vvs``
32+
- To update the bundled GoReSym, see src/bin/update.sh
33+
34+
35+
How to re-generate test binaries
36+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37+
38+
These are compiled (and committed) from code in tests/data/basic :
39+
40+
- Run ``go tool dist list`` to get all possible pairs of OSes and arches to compile the binary.
41+
- Then build a OS/arch pair like this to get compiled binaries:
42+
``GOOS=<OS> GOARCH=<arch> go build -o ./tests/data/basic/app_<OS>_exe ./tests/data/main.go``
43+
- Make a copy and run strip of the Linux executable as "app_lin_exe_stripped"
44+
45+
46+
Funding and sponsoring
47+
---------------------------
48+
49+
This project is funded in part through:
50+
51+
- NGI0 Entrust https://nlnet.nl/entrust, a fund established by NLnet with
52+
financial support from the European Commission's Next Generation Internet https://ngi.eu program.
53+
Learn more at the NLnet project page https://nlnet.nl/purl2all.
54+
55+
|nlnet| and |ngi0entrust|
56+
57+
- Support from nexB Inc. |nexb|
58+
59+
- Generous support from users like you!
60+
61+
62+
.. |nlnet| image:: https://nlnet.nl/logo/banner.png
63+
:target: https://nlnet.nl
64+
:width: 20%
65+
:alt: NLnet foundation logo
66+
67+
.. |ngi0entrust| image:: https://nlnet.nl/image/logos/NGI0_tag.svg
68+
:target: https://nlnet.nl/entrust
69+
:width: 20%
70+
:alt: NGI Zero Logo
71+
72+
.. |nexb| image:: https://nexb.com/wp-content/uploads/2022/04/nexB.svg
73+
:target: https://nexb.com
74+
:width: 20%
75+
:alt: nexB logo

azure-pipelines.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,54 @@ jobs:
1111
parameters:
1212
job_name: ubuntu20_cpython
1313
image_name: ubuntu-20.04
14-
python_versions: ['3.8', '3.9', '3.10', '3.11']
14+
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
1515
test_suites:
1616
all: venv/bin/pytest -n 2 -vvs
1717

1818
- template: etc/ci/azure-posix.yml
1919
parameters:
2020
job_name: ubuntu22_cpython
2121
image_name: ubuntu-22.04
22-
python_versions: ['3.8', '3.9', '3.10', '3.11']
22+
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
2323
test_suites:
2424
all: venv/bin/pytest -n 2 -vvs
2525

2626
# - template: etc/ci/azure-posix.yml
2727
# parameters:
2828
# job_name: macos11_cpython
2929
# image_name: macOS-11
30-
# python_versions: ['3.8', '3.9', '3.10', '3.11']
30+
# python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
3131
# test_suites:
3232
# all: venv/bin/pytest -n 2 -vvs
3333

3434
# - template: etc/ci/azure-posix.yml
3535
# parameters:
3636
# job_name: macos12_cpython
3737
# image_name: macOS-12
38-
# python_versions: ['3.8', '3.9', '3.10', '3.11']
38+
# python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
3939
# test_suites:
4040
# all: venv/bin/pytest -n 2 -vvs
4141

4242
# - template: etc/ci/azure-posix.yml
4343
# parameters:
4444
# job_name: macos13_cpython
4545
# image_name: macOS-13
46-
# python_versions: ['3.8', '3.9', '3.10', '3.11']
46+
# python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
4747
# test_suites:
4848
# all: venv/bin/pytest -n 2 -vvs
4949

5050
# - template: etc/ci/azure-win.yml
5151
# parameters:
5252
# job_name: win2019_cpython
5353
# image_name: windows-2019
54-
# python_versions: ['3.8', '3.9', '3.10', '3.11']
54+
# python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
5555
# test_suites:
5656
# all: venv\Scripts\pytest -n 2 -vvs
5757

5858
# - template: etc/ci/azure-win.yml
5959
# parameters:
6060
# job_name: win2022_cpython
6161
# image_name: windows-2022
62-
# python_versions: ['3.8', '3.9', '3.10', '3.11']
62+
# python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
6363
# test_suites:
6464
# all: venv\Scripts\pytest -n 2 -vvs

setup.cfg

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[metadata]
2-
name = skeleton
3-
license = Apache-2.0
2+
name = go-inspector
3+
license = Apache-2.0 AND MIT AND BSD-3-Clause WITH LicenRef-scancode-google-patent-license-golang
44

55
# description must be on ONE line https://github.com/pypa/setuptools/issues/1390
6-
description = skeleton
6+
description = go-inspector is a scancode plugin to extract symbols and dependencies found in Go binaries.
77
long_description = file:README.rst
88
long_description_content_type = text/x-rst
9-
url = https://github.com/nexB/skeleton
9+
url = https://github.com/nexB/go-inspector
1010

1111
author = nexB. Inc. and others
1212
author_email = [email protected]
@@ -38,14 +38,13 @@ zip_safe = false
3838

3939
setup_requires = setuptools_scm[toml] >= 4
4040

41-
python_requires = >=3.7
41+
python_requires = >=3.8
4242

4343
install_requires =
44+
commoncode
4445
plugincode
4546
scancode-toolkit
4647
typecode
47-
commoncode
48-
importlib-metadata
4948

5049
[options.entry_points]
5150

@@ -74,4 +73,3 @@ docs =
7473
sphinx-autobuild
7574
sphinx-rtd-dark-mode>=1.3.0
7675
sphinx-copybutton
77-

src/go_inspector/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
2-
__version__ = "0.1.0"
1+
__version__ = "0.2.0"

src/go_inspector/bin/GoReSym.zip.sums

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24c50fc10f169d36814b43da006bb5cd313baa04fcf94af99c730ef56eee62fe GoReSym.zip

src/go_inspector/bin/GoReSym_lin

469 KB
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
about_resource: GoReSym_lin
2+
name: goresym
3+
version: 2.7.2
4+
download_url: https://github.com/mandiant/GoReSym/releases/download/v2.7.2/GoReSym.zip
5+
package_url: pkg:github/mandiant/[email protected]?download_url=https://github.com/mandiant/GoReSym/releases/download/v2.7.2/GoReSym.zip
6+
copyright: Copyright (c) 2022 MANDIANT
7+
checksum_sha1: d1a3252a3a174c8baacbe16b8d060b3affc9d05b
8+
checksum_sha256: 24c50fc10f169d36814b43da006bb5cd313baa04fcf94af99c730ef56eee62fe
9+
license_expression: mit
10+
license_text_file: GoReSym_lin.LICENSE

0 commit comments

Comments
 (0)