# coccinelle を Homebrew, apk, apt, dnf, MacPorts, Nix, zypper でインストール

coccinelle のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:coccinelle
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install coccinelle
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install coccinelle
```

  証拠: MacPorts ports tree: devel/coccinelle/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add coccinelle
```

  証拠: Alpine Linux edge package indexes: coccinelle from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install coccinelle
```

  証拠: Debian stable package indexes: coccinelle from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install coccinelle
```

  証拠: Fedora Rawhide package metadata: coccinelle from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#coccinelle
```

  証拠: nixpkgs package indexes: coccinelle from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- zypper (92%):

```sh
sudo zypper install coccinelle
```

  証拠: openSUSE Tumbleweed package metadata: coccinelle from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## パッケージ情報

- **パッケージキー:** brew:coccinelle
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/coccinelle>
- **バージョン:** 1.3.1
- **ソース概要:** Program matching and transformation engine for C code
- **ホームページ:** <https://coccinelle.gitlabpages.inria.fr/website/>
- **リポジトリ:** <https://gitlab.inria.fr/coccinelle/coccinelle>
- **上流ドキュメント:** <https://coccinelle.gitlabpages.inria.fr/website>
- **ライセンス:** GPL-2.0-only
- **ソースアーカイブ:** <https://coccinelle.gitlabpages.inria.fr/website/distrib/coccinelle-1.3.1.tar.gz>
- **生成日時:** 2026-07-08T18:08:21+00:00

## 実行可能ファイル

- spatch (cli)
- spgen (cli)
- spatch (エイリアス)
- spgen (エイリアス)

## ビルド依存関係

- autoconf
- automake
- menhir
- ocaml
- ocaml-findlib

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-07-08
- マネージャ版: 1.3.1
- ローカルデータ: OK
- 上流リポジトリ: https://coccinelle.gitlabpages.inria.fr/website/
- 情報: No package-manager update timestamp was available.
- 情報: Release/tag comparison is only available for GitHub repositories.
## プロジェクトの歴史と使われ方

Coccinelle is a program matching and transformation engine for C code, centered on SmPL, the Semantic Patch Language. In package-manager culture it is best known as the `spatch` tool used for large C tree transformations, especially in Linux kernel development.

### プロジェクトの歴史

The official INRIA site describes Coccinelle as a tool originally targeted at collateral evolutions in Linux: source-code updates required when library APIs change. It broadened from that origin into finding and fixing bugs in systems code.

The project has long had a research and systems-programming identity. The official site links papers, workshops, Linux impact pages, and SmPL grammar documentation, while the current GitLab project is hosted under INRIA.

### 採用の歴史

Coccinelle's strongest adoption signal is Linux itself. The upstream Linux documentation has a dedicated Coccinelle page, describes the `make coccicheck` target, and says the semantic patches in the kernel require Coccinelle 1.0.0-rc11 or newer.

The Linux documentation also lists distribution availability through Debian, Fedora, Ubuntu, OpenSUSE, Arch Linux, Gentoo, NetBSD, and FreeBSD, while the input adds Homebrew, MacPorts, Nix, apk, dnf, and zypper.

### 使われ方

The main executable is `spatch`. Users write semantic patches in SmPL and run them over a file, directory, or source tree to report matches or propose transformations.

In the Linux kernel workflow, `make coccicheck MODE=report` reports matches and `MODE=patch` proposes fixes. The kernel script wires Coccinelle into the build tree through `scripts/coccicheck` and `scripts/coccinelle`.

Coccinelle supports `.cocciconfig` files in the user's home directory, the current directory, and the directory passed with `--dir`, letting users set preferred `spatch` options.

### パッケージ好きにとっての重要性

Coccinelle is one of the more historically interesting developer-tool packages because it turns program transformation research into a packaged Unix CLI used by real infrastructure projects.

For package maintainers, it is a cross-distribution systems-code tool with an OCaml heritage, a Linux-kernel integration point, and a command (`spatch`) whose usefulness depends on both the executable and a corpus of semantic patches.

### タイムライン

- 2005: Official site HTML carries an early creation marker.
- 2009: Official site lists the first Coccinelle Users Day.
- 2010: Linux kernel Coccinelle documentation and coccicheck script carry 2010 copyright notices.
- 2010: Official site links Coccinelle at the 2010 kernel summit.
- 2020: Current INRIA GitLab project created.
- 2021: SmPL grammar documentation lists version 1.1.0 and date June 21, 2021.

### Related projects

- Linux kernel `coccicheck` is the most visible related integration.
- SmPL is the project-specific semantic patch language.
- The Rust-for-Linux Coccinelle-for-Rust work is linked from the official site as a related direction.

### ソース

- <https://coccinelle.gitlabpages.inria.fr/website/>
- <https://coccinelle.gitlabpages.inria.fr/website/docs/index.html>
- <https://coccinelle.gitlabpages.inria.fr/website/docs/main_grammar015.html>
- <https://coccinelle.gitlabpages.inria.fr/website/impact_linux.html>
- <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/dev-tools/coccinelle.rst>
- <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/coccicheck>


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.cocciconfig, ./.cocciconfig, <dir passed with --dir>/.cocciconfig
## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** coccinelle
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 他のパッケージマネージャ記録

- Debian apt - coccinelle - 1.3.0.deb-1+b2: normalized package name match | Debian stable package indexes: coccinelle from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | semantic patching tool for C | http://coccinelle.lip6.fr
- Nix - coccinelle: normalized package name match | nixpkgs package indexes: coccinelle from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - coccinelle - 1.1.1.deb-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: coccinelle from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | semantic patching tool for C | http://coccinelle.lip6.fr
- Ubuntu apt - coccinelle-doc - 1.1.1.deb-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: coccinelle-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | documentation for coccinelle | http://coccinelle.lip6.fr
- apk - coccinelle - 1.1.1-r2: normalized package name match | Alpine Linux edge package indexes: coccinelle from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | provides the spatch matching and transformation engine implementing semantic patch language | https://coccinelle.gitlabpages.inria.fr/website/
- apk - coccinelle-bash-completion - 1.1.1-r2: normalized package name match | Alpine Linux edge package indexes: coccinelle-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Bash completions for coccinelle | https://coccinelle.gitlabpages.inria.fr/website/
- apk - coccinelle-doc - 1.1.1-r2: normalized package name match | Alpine Linux edge package indexes: coccinelle-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | provides the spatch matching and transformation engine implementing semantic patch language (documentation) | https://coccinelle.gitlabpages.inria.fr/website/
- dnf - coccinelle - 1.3.1-7.fc45: normalized package name match | Fedora Rawhide package metadata: coccinelle from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Semantic patching for Linux (spatch) | https://coccinelle.lip6.fr/
- dnf - coccinelle-bash-completion - 1.3.1-7.fc45: normalized package name match | Fedora Rawhide package metadata: coccinelle-bash-completion from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Bash tab-completion for coccinelle | https://coccinelle.lip6.fr/
- dnf - coccinelle-doc - 1.3.1-7.fc45: normalized package name match | Fedora Rawhide package metadata: coccinelle-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Documentation for coccinelle | https://coccinelle.lip6.fr/
- dnf - coccinelle-examples - 1.3.1-7.fc45: normalized package name match | Fedora Rawhide package metadata: coccinelle-examples from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Examples for coccinelle | https://coccinelle.lip6.fr/
- zypper - coccinelle - 1.3.1-2.3: normalized package name match | openSUSE Tumbleweed package metadata: coccinelle from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Semantic patch utility | http://coccinelle.lip6.fr/
- MacPorts - coccinelle: normalized package name match | MacPorts ports tree: devel/coccinelle/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 関連リンク

- [Terminal utility packages](https://www.automicvault.com/ja/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/ja/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/ja/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/ja/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [autoconf](https://www.automicvault.com/ja/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/ja/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [menhir](https://www.automicvault.com/ja/pkg/brew/menhir/) - Build dependency declared by Homebrew.
- [ocaml](https://www.automicvault.com/ja/pkg/brew/ocaml/) - Build dependency declared by Homebrew.
- [darklua](https://www.automicvault.com/ja/pkg/brew/darklua/) - Shares av.db curated category or tags: cli, code-transformation, developer-tools.
- [cbmc](https://www.automicvault.com/ja/pkg/brew/cbmc/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [ccheck](https://www.automicvault.com/ja/pkg/brew/ccheck/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [cflow](https://www.automicvault.com/ja/pkg/brew/cflow/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [comby](https://www.automicvault.com/ja/pkg/brew/comby/) - Shares av.db curated category or tags: cli, code-transformation, developer-tools.
- [cppcheck](https://www.automicvault.com/ja/pkg/brew/cppcheck/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [deheader](https://www.automicvault.com/ja/pkg/brew/deheader/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [gnu-complexity](https://www.automicvault.com/ja/pkg/brew/gnu-complexity/) - Shares av.db curated category or tags: c, cli, developer-tools, static-analysis.
- [sparse](https://www.automicvault.com/ja/pkg/brew/sparse/) - Local package facts share a topical domain. Shared terms: analysis, c, cli, code, developer.

## Combined YAML source

View the package source record on GitHub. [combined/coccinelle.yml](https://github.com/automic-vault/db/blob/main/combined/coccinelle.yml)


## ソース

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
