A patch is file used to alter a source code package, e.g. in order to correct a bug or add a feature.

learn more… | top users | synonyms

2
votes
1answer
14 views

How to find a specific patch for a kernel file

I've been debugging an issue in my linux kernel and have found a fix for the issue. Checking cross reference, I can see that the fix was applied to that file between kernel version A and kernel ...
0
votes
1answer
26 views

Linux red-hat + kernel patch update

I need to run the yum update on my Linux redHat machine during the yum update , I sow that yum perform some patch kernel update therefore I little worry to perform a reboot , because the patches of ...
1
vote
0answers
36 views

A patch that doesn't contain line numbers, is it possible?

I would add two lines of text to a file if they don't exist there yet. The lines can be in various positions in that file. So a regular patch will rather not work. Can there be a simplified patch, ...
0
votes
0answers
20 views

Identifying cumulative patch version in Jboss

We are trying to identify the patch level that is applied to our Jboss servers. For Jboss 4, the information is available in boot.log as follows 09:44:51,674 INFO [Server] Release ID: JBoss [EAP] ...
5
votes
2answers
385 views

How to create a patch ignoring indentation differences in the code?

I'm trying to create patch a file using diff tool.But facing an issues.The way I am doing is below. I've created one Directory named a and put original file in to it. a/original_file.c Now I have ...
0
votes
1answer
19 views

Applying a single patch to files in multiple directories

Directory structures looks like this: orig/l1/l2/file2patch orig/l1-2/file2patch Diff'd with new/l1/l2/file2patch new/l1-2/file2patch I get the correct diff between these files and save it in a ...
3
votes
1answer
2k views

How to fix “Hunk #1 FAILED at 1 (different line endings)” message?

I am trying to create a patch with the command git diff sourcefile >/var/lib/laymab/overlay/category/ebuild/files/thepatch.patch when I apply the patch, it gives me $ patch -v GNU patch 2.7.5 ...
9
votes
1answer
128 views

Display only relevant hunks of a diff/patch based on a regexp

git log -G<regex> -p is a wonderful tool to search a codebase's history for changes that match the specified pattern. However, it can be overwhelming to locate the relevant hunk in the ...
2
votes
3answers
3k views

How can I know if patch command is working?

I am trying to apply a patch that is provided by the seek-for-android project to code I downloaded from Cyanogenmod. The code compiled successfully with make, so I know all the files are there. I just ...
1
vote
1answer
93 views

patch: “bad file descriptor” in combination with pipe and LD_PRELOAD/ libtrash

Very short summary: cat "$file" | patch produces a Bad file descriptor-error, but patch < "$file" works, when libtrash is preloaded with LD_PRELOAD, and only on bigger projects. Description: For ...
1
vote
3answers
34 views

diff without including removed content

I'm using diff and patch to patch some files. In my situation, I am not permitted to distribute any of the original file. Right now, the diffs look something like this: 1c1 < Hello, this is the ...
2
votes
3answers
102 views

Patch a shell script prior to running

I have a shell script (arch-chroot from the Arch Linux arch-install-scripts package) that handles the mounting and unmounting of devices (with error checking) prior to starting a chroot. It starts the ...
0
votes
2answers
32 views

Patching diff-files

I've downloaded a tarballed version of 0.85 "MTR" -> http://www.bitwizard.nl/mtr/ and installed it. I later saw that a 0.86 diff file exists. I downloaded this in order to patch it, but am confused ...
-3
votes
1answer
65 views

What does root directory mean? [closed]

What does it means when they say "Move into the root directory of the kernel you wish to patch" please explain me in detail cause I'm new to this environment.
9
votes
3answers
7k views

Check if a file or folder has been patched already

Is it possible to know if a file has been patched already, before apply the patch? I need to do this in a script, any thoughts?
2
votes
1answer
45 views

Using dkms to patch kernel

I need to apply a kernel patch(https://lkml.org/lkml/2015/3/31/929) to get my touch-pad working properly. I am thinking that I should be using dkms, to do this. Most of the stuff I am reading is about ...
4
votes
3answers
357 views

How to make and apply (patch) one side diff?

I want to make a shell script that updates a config file. The file present on the server has information, like various IP addresses. The new file has more code, from new configs added to the system, ...
1
vote
2answers
70 views

Packaging a directory and its contents as a diff patch?

I have a small project folder with text files, which I'd like to post somewhere in order to ask a question on a forum. Let's take, in the simplest case, that I have something like this: mkdir aaa cd ...
0
votes
1answer
105 views

How to write a Patch for VyOS kernel

I am new to VyOS development. I have written a patch which will fetch info from the VyOS kernel module and write it on a netlink socket. But the problem is I am not sure if I should edit the kernel ...
2
votes
0answers
37 views

Patching using multiple independent patch files?

I'm naïve vis-à-vis patch and unified diffs. I have a C source file that needs two independent patch files applied. In other words, file Frodo.patch contains Frodo-specific patches; file Bilbo.patch ...
1
vote
0answers
20 views

How to make patch not so strict?

To give you the background, I'm trying to "port" "commit only parts of hunks" workflow from git to svn. In git there is interactive staging, and you can even edit hunks to be committed (chose which ...
0
votes
1answer
44 views

changed df -h output format after yum update in rhel6.5

changed df -h output after yum update (after patching). Anybpdy help on this ? Anybody knows the reason behind this ? df -h output before yum update (rhel patching) : Filesystem ...
0
votes
0answers
15 views

How To Patch Bugs Manually in Software [duplicate]

We have been experiencing issues with winbind on our servers and I found a thread on Bugzilla regarding a bug which sounds much like the issue we are experiencing. Throughout the discussion, the ...
2
votes
2answers
37 views

How can I get FreeBSD `patch` to tolerate null bytes?

The patch of the final line fails on FreeBSD 10.2, but works on GNU: #!/bin/sh echo a > f1 printf '\0' >> f1 echo c >> f1 cp f1 f2 echo d >> f2 diff -au f1 f2 > diff patch ...
6
votes
4answers
5k views

Running “patch” without generating *.orig and *.rej files

Is it possible to tell patch not to generate .orig and .rej files? I find it extremely annoying that patch creates these.
2
votes
1answer
237 views

How to apply simple patch (reverse detected)

I'm trying to create and apply a simple patch to fix a bug with gradle. I copy the file (/usr/bin/gradle) to my working directory, then make the change. I then create the patch: diff -u ...
0
votes
2answers
43 views

A question about patch

I did a patch file with diff -Naur src/bacula.h src/bacula.h.old and give me a file like this --- src/bacula.h 2015-08-13 15:52:24 +0200 +++ src/bacula.h 2015-10-05 19:21:09 +0200 ...
2
votes
2answers
259 views

Applying a diff patch

I've never patched anything in Linux, and I can't exactly figure out what the guy who wrote this post (second paragraph) means. That target source is qemu from github and the changes to apply are: ...
11
votes
3answers
5k views

How do I get a linux kernel patch set from the mailing list?

I don't subscribe to the linux-kernel mailing list, but I want to get a set of patches that were posted a few weeks ago and apply them to my kernel for testing. I'm very familiar with patching, ...
17
votes
5answers
2k views

Why use diff/patch when it is easier to just use cp

diff -u file1.txt file2.txt > patchfile creates a patch file which consists of instruction for patch to convert file1.txt to be exactly like file2.txt As the title says, Can't this be done using ...
1
vote
1answer
143 views

How download complete patch series from patchwork?

I want to download the patch series RFC PATCH 00/26 i.MX5/6 IPUv3 CSI/IC In patchwork I can get access to individual patches https://patchwork.linuxtv.org/patch/24331/. But downloading 26 patches and ...
0
votes
0answers
124 views

scripts/checkpatch.pl: Warning: consider using a completion

I'm currently writing a kernel driver that involves moving large amounts data from userspace to or from a peripheral, via a ring of bounce buffers. The buffer completion callback ups a semaphore, and ...
3
votes
0answers
66 views

Patching X11 to remove SELECTION clipboard

How would I patch the X11 source to disable or remove the SELECTION clipboard?
3
votes
0answers
38 views

Kernel config diffs - better way to maintain

I maintain one Linux distro (LEAF) with multiple kernel targets, so it needs to have multiple kernel configs (one reference config + usual patch files for other targets). But this adds headache on ...
0
votes
0answers
37 views

up2date login & patch APIs for RHEL7

I am trying to achieve controlled patching of the RHEL machines in my network, for which I need to get the patch binaries downloaded onto a windows machine. I have already familiazired myself with ...
24
votes
2answers
2k views

Patching a binary with dd

I have read this quote (below) several times, most recently here, and am continually puzzled at how dd can be used to patch anything let alone a compiler: The Unix system I used at school, 30 ...
0
votes
1answer
214 views

Suse: How to update a single package in SLES10 SP4

I am in the middle of an activity and have never worked with SLES10 SP4 In SLES11 zypper update glibc* update all glibc packages .. but this is not working in SLES10 SP4 .. can someone tell me how to ...
2
votes
0answers
209 views

Fetch patches from mailing list with mutt and vim

How can I fetch patches from a subscribed development mailinglist with mutt and vim so that they can be applied with "git am" or "git apply" command easily? Is it either possible to save it ...
2
votes
1answer
224 views

Linux kernel patches: can I skip some?

I have the source of Linux 3.4.0 to which I added some modifications. I know that here (ftp://ftp.kernel.org/pub/linux/kernel/v3.x/) I can find all the 107 patches that need to be applied to my source ...
3
votes
1answer
5k views

Patch command - can't find file to patch at input line

I generated patch using diff command with the number of context lines as 1 (-c option). My patch file contents: *** /home/sk/abc/def/src/klm/a.py 2015-05-18 16:25:50.348398554 +0530 --- ...
2
votes
1answer
227 views

How do I apply a patch?

I need to apply the following patch, and I don't want to mess up what I have so far. Below I have posted the complete content I found online, which was someone's response to a question similar to ...
0
votes
1answer
824 views

Linux Kernel Live Patching - WHATIS and HOWTO? [closed]

I am trying to understand a new concept I got to know recently as the Linux 4.0 makes it way to the mainline - "Live Patching". Supposedly this is a new feature enhancement of the Linux kernel. It ...
1
vote
1answer
387 views

Using filterdiff to exclude a diff

I have a big patch (foo), consisting of diffs from many files. I want to exclude a specific diff (corresponding to a single file) from this patch. The beginning of this diff looks like this: diff ...
1
vote
0answers
152 views

Source code of the patches for Shellshock

I have a project for my grad level OS class, and I have decided to choose the Shellshock vulnerability bugs as my topic. There is a lot of great information out there, but I was curious if it is ...
0
votes
1answer
67 views

Unified Patch: only use diff file

Is it possible to create a diff file that would work without having the actual files in the diff file? e.g.: I have a folder /a and a copy of a: /b. In /b I edit multiple files and create a .diff ...
2
votes
1answer
4k views

How to apply a patch correctly?

I am trying to patch a linux 3.13.7 source tree to 3.13.8 using the patch-3.13.8.xz file. Since the patch file is in xz format, I used the following command to apply it while in the source tree: unxz ...
0
votes
1answer
91 views

Patch: auto answer no

Suppose patch tell me Assume -R? [n] in already patched source Is there a way to say n no automatically? I can use yes n|patch but i prefer a more clean solution
0
votes
1answer
196 views

Applying Linux rt patch

I'm trying to apply the rt-patch to the standard kernel from kernel.org. So far I have tried 3.14 and 3.10 from here: https://www.kernel.org/pub/linux/kernel/projects/rt/ with the corresponding ...
1
vote
1answer
107 views

Applying patch to the uClibc

I have a buildroot package that I need to build. When I issue the 'make' command, it runs until it errors out with "lutimes undeclared". After lengthy research, it appears that uClibc needs to be ...
0
votes
1answer
65 views

Migrate old custom patches to new Linux versions

I previously used Linux 3.0.35 to customize the OS for an IMX based board. I'm now planning to upgrade it to Linux 3.10.17. The customization was compiled into patches, (80+ patches!). My problem now ...