Package Details: semgrep-bin 0.111.1-1

Git Clone URL: https://aur.archlinux.org/semgrep-bin.git (read-only, click to copy)
Package Base: semgrep-bin
Description: Fast and syntax-aware semantic code pattern search for many languages: like grep but for code
Upstream URL: https://github.com/returntocorp/semgrep
Keywords: code grep
Licenses: LGPL2.1
Provides: semgrep
Submitter: aloxaf
Maintainer: aloxaf
Last Packager: aloxaf
Votes: 3
Popularity: 0.147233
First Submitted: 2020-05-23 02:08 (UTC)
Last Updated: 2022-09-04 08:26 (UTC)

Latest Comments

1 2 Next › Last »

0xdbe commented on 2022-09-27 11:56 (UTC)

File for 0.115.0: https://pastebin.com/zwv97SrC

bbrks commented on 2022-08-10 08:34 (UTC) (edited on 2022-08-10 09:02 (UTC) by bbrks)

Needs python-lsp-jsonrpc as a dependency as of 0.98.0

https://github.com/returntocorp/semgrep/pull/5378

$ semgrep --help
Traceback (most recent call last):
  File "/usr/bin/semgrep", line 33, in <module>
    sys.exit(load_entry_point('semgrep==0.104.0', 'console_scripts', 'semgrep')())
  File "/usr/bin/semgrep", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/semgrep/__main__.py", line 4, in <module>
    from semgrep.cli import cli
  File "/usr/lib/python3.10/site-packages/semgrep/cli.py", line 8, in <module>
    from semgrep.commands.lsp import lsp
  File "/usr/lib/python3.10/site-packages/semgrep/commands/lsp.py", line 8, in <module>
    from semgrep.lsp.server import run_server
  File "/usr/lib/python3.10/site-packages/semgrep/lsp/server.py", line 12, in <module>
    from pylsp_jsonrpc.dispatchers import MethodDispatcher
ModuleNotFoundError: No module named 'pylsp_jsonrpc'

0xdbe commented on 2021-11-18 11:44 (UTC)

I tried to update this package for Semgrep 0.73.0: https://pastebin.com/2iWxKPNA

But you have to install python-click-option-group from AUR (https://aur.archlinux.org/packages/python-click-option-group/)

Also, Semgrep uses wcmatch==8.2 and arch linux uses python-wcmatch-8.3-1

Workaround: use a virtualenv

Bujiraso commented on 2021-08-26 11:28 (UTC)

One more -- there's still something missing once it installs.

Seems 'peewee' was not installed and is necessary.

Traceback (most recent call last):
  File "/usr/bin/semgrep", line 33, in <module>
    sys.exit(load_entry_point('semgrep==0.62.0', 'console_scripts', 'semgrep')())
  File "/usr/bin/semgrep", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/semgrep/__main__.py", line 5, in <module>
    from semgrep.cli import cli
  File "/usr/lib/python3.9/site-packages/semgrep/cli.py", line 6, in <module>
    import semgrep.config_resolver
  File "/usr/lib/python3.9/site-packages/semgrep/config_resolver.py", line 24, in <module>
    from semgrep.error import InvalidRuleSchemaError
  File "/usr/lib/python3.9/site-packages/semgrep/error.py", line 19, in <module>
    from semgrep.util import with_color
  File "/usr/lib/python3.9/site-packages/semgrep/util.py", line 19, in <module>
    import pkg_resources
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'peewee~=3.14.4' distribution was not found and is required by semgrep

Bujiraso commented on 2021-08-26 11:26 (UTC)

This is failing to install for me. I'm getting conflicts on python-pyroute2 since the tests are now in .../python3.9/...

Is it possible to wildcard this so that version changes don't impact the install? I don't see a point to keeping any tests.

Changing "3.8" to an unquoted wildcard (*) fixes here.

invidian commented on 2021-08-18 14:29 (UTC)

It seems the following change must be done to update to latest version:

diff --git PKGBUILD PKGBUILD
index d88d665..299708d 100644
--- PKGBUILD
+++ PKGBUILD
@@ -2,24 +2,22 @@

 pkgname=semgrep-bin
 _name=semgrep
-pkgver=0.59.0
+pkgver=0.62.0
 pkgrel=1
 pkgdesc="Fast and syntax-aware semantic code pattern search for many languages: like grep but for code"
 arch=(x86_64)
 url=https://github.com/returntocorp/semgrep
 license=(LGPL2.1)
 makedepends=('python-setuptools' 'python-wheel')
-depends=('python' 'python-attrs' 'python-colorama' 'python-junit-xml' 'python-requests' 'python-ruamel-yaml' 'python-tqdm' 'python-packaging' 'python-jsonschema')
+depends=('python' 'python-attrs' 'python-colorama' 'python-junit-xml' 'python-requests' 'python-ruamel-yaml' 'python-tqdm' 'python-packaging' 'python-jsonschema' 'python-peewee' 'python-wcmatch')
 provides=('semgrep')
 options=('!strip')
 source=(
   "https://github.com/returntocorp/semgrep/releases/download/v${pkgver}/semgrep-v${pkgver}-ubuntu-16.04.tgz"
   "https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
 )
-sha256sums=(
-  'ace2ce52e314a7c0450dfd7c31c2fd38b36b47f5a99c34e54a36ac4131f7513b'
-  '2d2a3e913ec779f53f5cb6db2ec10e949ed5b44996d5b185aab9c5dc5e2e5d58'
-)
+sha256sums=('ea48f88f4a45c8e32e9f4eec3b5a8f07c011ec4f082ad96d4f8d87c109156839'
+            '5b04fde7fdc880b541200c071ad00d26192494448cea812899b89a32e31518db')
 # https://github.com/returntocorp/semgrep/releases/download/v${pkgver}/semgrep-v${pkgver}-ubuntu-16.04.tgz.sha256

 build() {

lmartinez-mirror commented on 2021-07-21 05:36 (UTC) (edited on 2021-07-21 05:36 (UTC) by lmartinez-mirror)

This should be reuploaded as semgrep since it builds from source.

0xdbe commented on 2021-04-27 12:20 (UTC)

@aloxaf

It's working with yay.

Many thanks.

aloxaf commented on 2021-04-27 10:05 (UTC)

@0xdbe

Fixed. Please try again with yay.

0xdbe commented on 2021-04-27 08:47 (UTC)

This package failed to build with yay (yay v10.2.1 - libalpm v12.0.2):

==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
Traceback (most recent call last):
  File "~/.cache/yay/semgrep-bin/src/semgrep-0.48.0/setup.py", line 85, in <module>
    src = find_executable(binary_env, binary_name)
  File "~/.cache/yay/semgrep-bin/src/semgrep-0.48.0/setup.py", line 73, in find_executable
    raise Exception(
Exception: Could not find 'semgrep-core' executable, tried 'SEMGREP_CORE_BIN' and system 'semgrep-core'
==> ERROR: A failure occurred in build().
    Aborting...