Questions tagged [patch]

A patch is a piece of software designed to fix problems with, or update a computer program or its supporting data. This includes fixing security vulnerabilities and other bugs, and improving the usability or performance.

Programmers publish and apply patches in various forms. Because proprietary software authors withhold their source code, their patches are distributed as binary executables instead of source. This type of patch modifies the program executable—the program the user actually runs—either by modifying the binary file to include the fixes or by completely replacing it.

Patches can also circulate in the form of source code modifications. In these cases, the patches consist of textual differences between two source code files. These types of patches commonly come out of open source projects. In these cases, developers expect users to compile the new or changed files themselves.

Because the word "patch" carries the connotation of a small fix, large fixes may use different nomenclature. Bulky patches or patches that significantly change a program may circulate as "service packs" or as "software updates". Microsoft Windows NT and its successors (including Windows 2000, Windows XP, and later versions) use the "service pack" terminology.

In several Unix-like systems, particularly Linux, updates between releases are delivered as new software packages. These updates are in the same format as the original installation so they can be used either to update an existing package in-place (effectively patching) or be used directly for new installations.

2809 questions
14
votes
5 answers

Self updating py2exe/py2app application

I maintain a cross platform application, based on PyQt that runs on linux mac and windows. The windows and mac versions are distributed using py2exe and py2app, which produces quite large bundles (~40 MB). I would like to add an "auto update"…
Luper Rouch
  • 9,304
  • 7
  • 42
  • 56
14
votes
2 answers

Binary diff and patch utility for a virtual machine image

I need to release some software quite frequently, and the software is contained as a VMWare disk file, i.e., .vmdk file. What I want is some kind of binary diff and patch utility to make the delta generated as small as possible.
tianyapiaozi
  • 1,928
  • 2
  • 15
  • 19
14
votes
7 answers

Mercurial Patch Creation and Usage

I have come across a problem that I "think" can only be resolved using patches. I cloned a project from our main repository, made quite a few changes (updates, deletion of files & directory and additions) to it. These changes are not even committed.…
Abidi
  • 7,846
  • 14
  • 43
  • 65
14
votes
2 answers

git create patch from unpushed commits

I cannot push when working remotely, so I want to create a single patch from all the commits that have not yet been pushed on my develop branch to email it. How do I do that?
Kosmotaur
  • 1,686
  • 14
  • 20
14
votes
5 answers

How to apply this mutt sidebar patch?

Since the homebrew guys now have removed the option of appying the mutt sidebar patch during installation i went searching and found someone who had created an updated mutt sidebar patch for version 1.5.22 of mutt (every mutt sidebar versions seems…
user2959896
14
votes
5 answers

How to use patches created in windows (with CRLF) in linux?I

Standard linux patch hard-coded only for unix text files. PS: I do no want convert ALL to unix and then convert result back.
vitaly.v.ch
  • 2,485
  • 4
  • 26
  • 36
14
votes
5 answers

Apply failed hunk with TortoiseSVN

How can I apply a patch with TortoiseSVN that initially fails with one or more rejected hunks? Is it possible to use TortoiseMerge to review the patch/the failed result and pick the lines I want to be applied? If not, what do I do after I encounter…
knittl
  • 246,190
  • 53
  • 318
  • 364
14
votes
4 answers

git: Patch does not have a valid e-mail address

I have a patch-file. I want to apply this patch to my code in git repository. When I used subversion this process was quite simple: right click -> tortoise svn -> apply patch. It always works as I expected. But I cannot do this using git. Git…
tmporaries
  • 1,523
  • 8
  • 25
  • 39
14
votes
2 answers

Elastic Beanstalk security patches

I currently use Ubuntu with unattended-upgrades on all my ec2-instances, to keep any nasty holes closed, but when running apps via Elastic beanstalk i can't see any option on how to handle patches to them. The only alternative is to manually log in…
glance
  • 141
  • 5
14
votes
2 answers

Is there a commonly-used filename extension for unified diff format?

E.g. .difffile, .diff?
Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
13
votes
1 answer

git format-patch without committing

How can I generate the patch between HEAD and the staging area (without committing)? e.g. echo text > some.file git add some.file git format-patch (what-the-sha?)..HEAD Do I have to commit then reset?
takeshin
  • 49,108
  • 32
  • 120
  • 164
13
votes
2 answers

Why is git apply not finding the file to patch in the current directory?

I want to apply a patch to a file in the current directory. The path in the patch file says just a/FILETOPATCH.something b/FILETOPATCH.something. If I use this with git apply it isn't working. The file to patch and the .patch file are in the same…
marcusx
  • 307
  • 2
  • 11
13
votes
2 answers

kubectl patch: Is it possible to add multiple values to an array within a sinlge patch execution

I tried to use kubectl patch to add two more values to the args list of a kubernetes deployment. I've gone over the officially documented (https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/) variants but did…
jonny
  • 133
  • 1
  • 1
  • 7
13
votes
2 answers

What are patches used for in SVN?

I'm guessing it allows you to "save" a merge process so I could create a patch for some Open Source project, and submit a patch so they don't have to handle the merge themselves? When and how would you use patches in SVN?
KingNestor
  • 65,976
  • 51
  • 121
  • 152
13
votes
2 answers

How can I save an incompletely merged index in git?

I'm working on a lenghty merging process with several conflicts. What can I do to save the intermediate state, in order to periodically keep backups in case disaster strikes?
Marcus
  • 5,104
  • 2
  • 28
  • 24