From 8deb22ddbc49727d58943c3178e1a99cb1971c22 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 9 Apr 2024 15:31:56 +0200 Subject: [PATCH] Bump version and prepare release 0.2.0 Signed-off-by: Philippe Ombredanne --- AUTHORS.rst | 4 +- CHANGELOG.rst | 8 ++++ NOTICE | 2 +- README.rst | 81 +++++++++++++++++++++++++++++++----- azure-pipelines.yml | 14 +++---- setup.cfg | 14 +++---- src/go_inspector/__init__.py | 3 +- 7 files changed, 96 insertions(+), 30 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 51a19cc..8b106ca 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,3 +1,5 @@ The following organizations or individuals have contributed to this repo: -- +- Tushar Goel @TG1999 +- Philippe Ombredanne @pombredanne +- nexB Inc. diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ffe0364..1952b1f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,3 +7,11 @@ v0.1.0 (8th April 2024) - Add goresym support in go-inspector. + + +v0.2.0 (9th April 2024) +------------------------ + +- Add missing ABOUT file and license for goresym. +- Bump to version GoReSym 2.7.2 +- Add support for dependencies and build info diff --git a/NOTICE b/NOTICE index 65936b2..686740f 100644 --- a/NOTICE +++ b/NOTICE @@ -1,6 +1,6 @@ # # Copyright (c) nexB Inc. and others. -# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: Apache-2.0 AND MIT AND BSD-3-Clause WITH LicenRef-scancode-google-patent-license-golang # # Visit https://aboutcode.org and https://github.com/nexB/ for support and download. # ScanCode is a trademark of nexB Inc. diff --git a/README.rst b/README.rst index 79aeec2..c5ef98d 100644 --- a/README.rst +++ b/README.rst @@ -1,16 +1,75 @@ -Go-Inspector +go-inspector ================================ -- To enable the GoReSym plugin, first you need to install goresym from https://github.com/mandiant/GoReSym/releases/download/v2.6.4/GoReSym.zip -- Unzip the GoReSym.zip, extract goresym for linux and add it in src/go_inspector/bin. -- then change it to executable ```chmod u+x src/go_inspector/bin/GoReSym_lin``` -- Install requirements and dependencies using ```make dev``` -- Use ```scancode --json-pp - --go-symbol --verbose``` to get debug symbols. +go-inspector is a utility to extract dependencies and symbols from Go binaries. +It is desigend to work as a ScanCode Toolkit plugin. +To install and use: -How to generate test binaries -============================ +- Run ``pip install go-inspector`` +- Use with ``scancode --json-pp - --go-symbol --verbose `` -- Run `go tool dist list` to get all possible pairs of OSes and arches to compile the binary. -- Then use a OS/arch pair like this ``GOOS= GOARCH= go build -o ./tests/data/app_exe ./tests/data/main.go`` - to get compiled binary. +The JSON output will contain various dependencies and symbols found in Go binaries if any. + + +- License: Apache-2.0 AND MIT AND BSD-3-Clause WITH LicenRef-scancode-google-patent-license-golang +- Copyright (c) nexB Inc., Mandiant, The Go Authors, Elliot Chance and others +- Homepage: https://github.com/nexB/go-inspector/ + +See the src/go_inspector/bin for detailed license and credits for bundled third-party packages. + + +Development +---------------- + +- Install requirements and dependencies using ``make dev`` +- Then ``source venv/bin/activate`` + +Testing: + +- To run tests: ``pytest -vvs`` +- To regen test fixtures: ``SCANCODE_REGEN_TEST_FIXTURES=yes pytest -vvs`` +- To update the bundled GoReSym, see src/bin/update.sh + + +How to re-generate test binaries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These are compiled (and committed) from code in tests/data/basic : + +- Run ``go tool dist list`` to get all possible pairs of OSes and arches to compile the binary. +- Then build a OS/arch pair like this to get compiled binaries: + ``GOOS= GOARCH= go build -o ./tests/data/basic/app__exe ./tests/data/main.go`` +- Make a copy and run strip of the Linux executable as "app_lin_exe_stripped" + + +Funding and sponsoring +--------------------------- + +This project is funded in part through: + +- NGI0 Entrust https://nlnet.nl/entrust, a fund established by NLnet with + financial support from the European Commission's Next Generation Internet https://ngi.eu program. + Learn more at the NLnet project page https://nlnet.nl/purl2all. + + |nlnet| and |ngi0entrust| + +- Support from nexB Inc. |nexb| + +- Generous support from users like you! + + +.. |nlnet| image:: https://nlnet.nl/logo/banner.png + :target: https://nlnet.nl + :width: 20% + :alt: NLnet foundation logo + +.. |ngi0entrust| image:: https://nlnet.nl/image/logos/NGI0_tag.svg + :target: https://nlnet.nl/entrust + :width: 20% + :alt: NGI Zero Logo + +.. |nexb| image:: https://nexb.com/wp-content/uploads/2022/04/nexB.svg + :target: https://nexb.com + :width: 20% + :alt: nexB logo diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 18e4250..aff16c3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,7 +11,7 @@ jobs: parameters: job_name: ubuntu20_cpython image_name: ubuntu-20.04 - python_versions: ['3.8', '3.9', '3.10', '3.11'] + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -19,7 +19,7 @@ jobs: parameters: job_name: ubuntu22_cpython image_name: ubuntu-22.04 - python_versions: ['3.8', '3.9', '3.10', '3.11'] + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -27,7 +27,7 @@ jobs: # parameters: # job_name: macos11_cpython # image_name: macOS-11 - # python_versions: ['3.8', '3.9', '3.10', '3.11'] + # python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] # test_suites: # all: venv/bin/pytest -n 2 -vvs @@ -35,7 +35,7 @@ jobs: # parameters: # job_name: macos12_cpython # image_name: macOS-12 - # python_versions: ['3.8', '3.9', '3.10', '3.11'] + # python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] # test_suites: # all: venv/bin/pytest -n 2 -vvs @@ -43,7 +43,7 @@ jobs: # parameters: # job_name: macos13_cpython # image_name: macOS-13 - # python_versions: ['3.8', '3.9', '3.10', '3.11'] + # python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] # test_suites: # all: venv/bin/pytest -n 2 -vvs @@ -51,7 +51,7 @@ jobs: # parameters: # job_name: win2019_cpython # image_name: windows-2019 - # python_versions: ['3.8', '3.9', '3.10', '3.11'] + # python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] # test_suites: # all: venv\Scripts\pytest -n 2 -vvs @@ -59,6 +59,6 @@ jobs: # parameters: # job_name: win2022_cpython # image_name: windows-2022 - # python_versions: ['3.8', '3.9', '3.10', '3.11'] + # python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] # test_suites: # all: venv\Scripts\pytest -n 2 -vvs diff --git a/setup.cfg b/setup.cfg index 2545ddf..445b9bb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,12 +1,12 @@ [metadata] -name = skeleton -license = Apache-2.0 +name = go-inspector +license = Apache-2.0 AND MIT AND BSD-3-Clause WITH LicenRef-scancode-google-patent-license-golang # description must be on ONE line https://github.com/pypa/setuptools/issues/1390 -description = skeleton +description = go-inspector is a scancode plugin to extract symbols and dependencies found in Go binaries. long_description = file:README.rst long_description_content_type = text/x-rst -url = https://github.com/nexB/skeleton +url = https://github.com/nexB/go-inspector author = nexB. Inc. and others author_email = info@aboutcode.org @@ -38,14 +38,13 @@ zip_safe = false setup_requires = setuptools_scm[toml] >= 4 -python_requires = >=3.7 +python_requires = >=3.8 install_requires = + commoncode plugincode scancode-toolkit typecode - commoncode - importlib-metadata [options.entry_points] @@ -74,4 +73,3 @@ docs = sphinx-autobuild sphinx-rtd-dark-mode>=1.3.0 sphinx-copybutton - diff --git a/src/go_inspector/__init__.py b/src/go_inspector/__init__.py index 36e61c6..d3ec452 100644 --- a/src/go_inspector/__init__.py +++ b/src/go_inspector/__init__.py @@ -1,2 +1 @@ - -__version__ = "0.1.0" +__version__ = "0.2.0"