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

0
votes
0answers
3 views

Apply patch to file that's under Git without using Git? [migrated]

I checked out the latest OpenSSL from Git: git clone git://git.openssl.org/openssl.git One of the devs sent me a patch for AARCH64 to test: $ cat RT4237.diff diff --git ...
1
vote
1answer
51 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
31 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
82 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
28 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
60 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.
1
vote
2answers
38 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 ...
2
votes
0answers
24 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
17 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
36 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
34 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 ...
0
votes
1answer
45 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 ...
1
vote
1answer
585 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 ...
2
votes
1answer
101 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
39 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
170 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: ...
17
votes
5answers
1k 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
62 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
88 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
31 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 ...
3
votes
0answers
58 views

Patching X11 to remove SELECTION clipboard

How would I patch the X11 source to disable or remove the SELECTION clipboard?
5
votes
0answers
80 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 ...
0
votes
0answers
36 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 ...
2
votes
1answer
161 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
3k 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
38 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 ...
0
votes
1answer
127 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
165 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
172 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 ...
1
vote
1answer
599 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
292 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
129 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
52 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 ...
0
votes
1answer
74 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
151 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 ...
0
votes
1answer
61 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 ...
0
votes
1answer
168 views

rt patch for latest stable 3.17.4 vanilla kernel

I want to apply an rt patch to the latest stable vanilla kernel, which is 3.17.4 currently. The latest rt-patch found are for 3.14.24. Does that mean I have to use the the 3.14.x family, and can not ...
0
votes
1answer
777 views

What is “fuzz” in applying patches?

I was applying a patch with quilt in Debian packaging that an error occurred: Applying patch debian/patches/fixshare.patch patching file net/slirp.c Hunk #1 FAILED at 529. 1 out of 1 hunk FAILED -- ...
-1
votes
1answer
98 views

how to patch bash vulnerability (shellshock) bug on RHEL? [duplicate]

We have over 10000 servers to patch for bash vulnerability (shellshock) bug. Now my question is what is the command to patch this bug ? And how we can check whether the patch has been installed and ...
1
vote
1answer
87 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 ...
6
votes
1answer
3k views

How can I apply a -p0 patch from any working directory?

I have a patch with absolute paths that I wish to use. i.e. the first few lines are as follows. --- /usr/share/apps/plasma/packages/org.kde.pager/contents/ui/main.qml 2014-10-10 18:47:23.000000000 ...
0
votes
1answer
444 views

How can I check if a certain patch is already installed in my system?

I am about to install a patch for wireless drivers named Compat Wireless in order to solve a problem with my WiFi channel (it locks on the not existing -1 channel) on my Ubuntu Linux v12.04 and Kali ...
1
vote
1answer
84 views

Latest libxml2 port to RHEL4

I am currently installing ModSecurity on our development servers and the problem that I am running into with the latest version is that we are utilizing RHEL 4 on our servers. They have no intention ...
0
votes
1answer
166 views

How can I list the patches of an installed package in SUSE?

Let's say that I am using a program called "hello" which I have downloaded using the zypper. The question is how can I see if a specific .patch is included into this hello package? Basically, what I ...
0
votes
1answer
123 views

Is this a good way to create a patch?

I would like to create a patch from a specific gcc branch comparing it to the official releases; so when I unpack the tarball from the stable release, I can apply the patch and get the equivalent of ...
0
votes
1answer
517 views

Applying patch for bash failing

The bash shell in my production box is vulnerable to 'bashbug' vulnerability. https://securityblog.redhat.com/2014/09/24/bash-specially-crafted-environment-variables-code-injection-attack/ The ...
-1
votes
1answer
433 views

CentOS, Can I install 5.10 rpm into 5.8?

I heard that bash-3.2-33.el5_10.4 is a CVE-7169 patch for CentOS 5. So I found an announcement from CentOS website below. http://lists.centos.org/pipermail/centos-announce/2014-September/020594.html ...
3
votes
2answers
111 views

Linux kernel patch and development source tree

We are using linux3.12 and its led driver has a bug which got fixed in later version of Linux. We see that driver change in Linux 3.15 see Linux Cross Reference Now my question is how can I find a ...