macOS
brew install gpatchlocal Homebrew formula metadata
sudo port install gpatchMacPorts ports tree · devel/gpatch/Portfile · 来源: api.github.com
安装
brew install gpatchlocal Homebrew formula metadata
sudo port install gpatchMacPorts ports tree · devel/gpatch/Portfile · 来源: api.github.com
sudo apk add patchAlpine Linux edge package indexes · patch · 来源: dl-cdn.alpinelinux.org
sudo dnf install patchFedora Rawhide package metadata · patch · 来源: dl.fedoraproject.org
nix profile install nixpkgs#patchnixpkgs package indexes · patch · 来源: raw.githubusercontent.com
sudo pacman -S patchArch Linux sync databases · patch · 来源: geo.mirror.pkgbuild.com
sudo zypper install patchopenSUSE Tumbleweed package metadata · patch · 来源: download.opensuse.org
choco install patchChocolatey community package catalog · patch · 来源: community.chocolatey.org
scoop install main/patchScoop official bucket manifest trees · bucket/patch.json · 来源: api.github.com
winget install --id GnuWin32.Patch -eWindows Package Manager source index · GnuWin32.Patch · 来源: cdn.winget.microsoft.com
概览
Apply a diff file to an original
历史
GNU patch applies diff output to original files to produce modified files. It descends from Larry Wall's patch program and became one of the basic tools of Unix source distribution, mailing-list development, and package-manager patch application.
The GNU patch README states that this GNU version applies diff files to original files and includes many Free Software Foundation changes: binary and large-file handling, unified diff support, merge behavior, GNU-style backup files, improved RCS and SCCS interaction, GNU option parsing/configure conventions, and better POSIX compliance.
The README also explains why the FSF distributed GNU patch independently: Larry Wall had not released a new version since mid-1988, and he agreed to GNU distribution under the GNU General Public License. GNU bulletins from the 1990s describe patch as GNU's version of Larry Wall's program for applying diff output.
patch became a standard Unix packaging primitive because source distributions could ship small textual changes instead of whole replacement trees. GNU patch's support for unified diffs, reject files, backup naming, and POSIX/GNU build conventions made it fit naturally into Autotools-era source packages and distribution build recipes.
The GNU diffutils manual shows the common form `patch <patchfile`, with optional original-file and patch-file arguments. If no patch file is supplied, patch reads diff output from standard input; if no input file is supplied, it tries to infer the file to edit from leading patch text.
For package maintainers, GNU patch is infrastructure rather than just a user command. It is the tool behind downstream patch queues, source RPM and Debian patch application, vendor backports, portability fixes, and decades of email-driven source exchange before pull-request platforms normalized repository-hosted review.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
patch | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://savannah.gnu.org/projects/patch/
安装元数据
| 软件包键 | brew:gpatch |
|---|---|
| 版本 | 2.8 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/gpatch |
| 主页 | https://savannah.gnu.org/projects/patch/ |
| 仓库 | https://git.savannah.gnu.org/cgit/patch.git |
| 上游文档 | https://savannah.gnu.org/projects/patch |
| 许可证 | GPL-3.0-or-later |
| 源码归档 | https://ftpmirror.gnu.org/gnu/patch/patch-2.8.tar.xz |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
| 注意事项 | GNU "patch" has been installed as "gpatch". If you need to use it as "patch", you can add a "gnubin" directory to your PATH from your bashrc like: PATH="$HOMEBREW_PREFIX/opt/gpatch/libexec/gnubin:$PATH" |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | gpatch |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
gpatch
sudo port install gpatchpatch 2.8-2
Apply a diff file to an original
https://savannah.gnu.org/projects/patch/
sudo apt install patchpatch
nix profile install nixpkgs#patchpatch 2.7.6-7build3
Apply a diff file to an original
https://savannah.gnu.org/projects/patch/
sudo apt install patchpatch 2.8-r0
Utility to apply diffs to files
https://www.gnu.org/software/patch/patch.html
sudo apk add patchpatch-doc 2.8-r0
Utility to apply diffs to files (documentation)
https://www.gnu.org/software/patch/patch.html
sudo apk add patch-docpatch 2.8-4.fc44
Utility for modifying/upgrading files
https://savannah.gnu.org/projects/patch/
sudo dnf install patchpatch 2.8-1
A utility to apply patch files to original sources
https://www.gnu.org/software/patch/
sudo pacman -S patchpatch 2.8-2.3
GNU patch
https://ftp.gnu.org/gnu/patch/
sudo zypper install patchpatch
choco install patchmain/patch
scoop install main/patchGnuWin32.Patch
winget install --id GnuWin32.Patch -e来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.