Questions tagged [patch]
A patch is file used to alter a source code package, e.g. in order to correct a bug or add a feature.
219 questions
1
vote
1
answer
85
views
Continuously patch and deliver a Debian package
We have an issue with a Debian package that would have to be addressed upstream. (So it's not Debian specific.) I've managed to patch the C source, build my custom package version, and fix the issue.
...
-1
votes
1
answer
70
views
patch fails on unified diff, but works fine with context diff
I am struggling with understanding how diff and patch are supposed to work. Here's my use case: I use Betterfox user.js config file for my Firefox profile, but I add some overrides to it. I want to ...
0
votes
0
answers
59
views
Blackmagic Module Patches for Fedora do not work on Arch Linux
I am trying to get my Blackmagic Quad HDMI Recorder working on Arch Linux. Since rebooting after the first installation, the device was never recognized by Blackmagic Software on Arch, while it ...
0
votes
1
answer
62
views
Debian DSC patch file format has changed and not recognized by dpkg-source
For a long time I receieved some software as a patched set of files and it includes DSC file which was a text file and I run dpkg-source -x *.dsc command to extract sources. But this DSC file now is a ...
1
vote
1
answer
215
views
Patch line receives error
I have a script and patch that I took somewhere to compile an image (linux build root) and I added some lines and now I got one error during patch, the error is like that:
diff --git a/package/base-...
0
votes
1
answer
40
views
How do I change the Subject/Title of patchwork patch?
I have created a patch for the Linux kernel. It can be found at the following website: https://patchwork.kernel.org/project/bluetooth/patch/[email protected]/
Unfortunately, I ...
0
votes
1
answer
214
views
Difference between security and LTS support in Debian
Total newbie here so please bear with me.
I have a laptop on which I have installed Debian 11.6
I want to check if my OS has reached EOL.
In the official Debian webpage, I see the following list (...
0
votes
0
answers
49
views
How to successfully patch openSSL?
I have a computer with unix and an old binary version of OpenSSL installed (version 1.0.2h). I came across the link below:
https://github.com/cloudflare/sslconfig/tree/master
and it suggests I could ...
1
vote
0
answers
43
views
dh_auto_test Error (Lubuntu)
I am trying to restore typeahead behavior in my file picker by using this tutorial: https://blobfolio.com/2019/restoring-gtk3-typeahead-in-ubuntu-19-10-eoan-ermine/
I got the patch, and the gtk3 ...
0
votes
1
answer
79
views
Getting SLES RMT Server IP or hostname from client
We have multiple RMT Servers for patching SLES servers in our environment, how can we check which rmt server is the client currently registered to. Currently we check the baseurl of repo file.
Is ...
0
votes
1
answer
57
views
Force Patch character differences to a file
Hello,
I have an englishStrings.json file and when I make new edits/ additions to it, I need to copy the new changes to all the other language string.json files.
Before making any changes to ...
0
votes
1
answer
184
views
How to Patch and Compile Linux Kernel for a specific issue? (No sound in HP ENVY x360 2-in-1 Laptop 15-ey0xxx)
I got the exact same problem as the person here:
HP Envy x360 2022 Ryzen edition speakers not working
and I want to patch and recompile my kernel with:
https://lore.kernel.org/lkml/20220811053950....
0
votes
1
answer
316
views
What is the purpose of timestamps in unified diffs?
An Example of Unified Format:
--- lao 2002-02-21 23:30:39.942229878 -0800
+++ tzu 2002-02-21 23:30:50.442260588 -0800
@@ -1,7 +1,6 @@
-The Way that can be told of is not the eternal Way;
-The name ...
0
votes
0
answers
409
views
Patch malformed error
patch: **** malformed patch at line 225: diff --git
the line 225 is this one :
diff --git a/files/etc/Compile_info.txt b/files/etc/Compile_info.txt
I have a many patches in one file patch and I ...
2
votes
2
answers
1k
views
How to apply a patch as part of a pipe? In other words, how to patch stdin?
I want to apply a unified diff from mypatch.diff to stdin and output the result to stdout.
So far, I have tried:
patch -i mypatch.diff -o - -u originalfile
Which successfully applies mypatch.diff and ...
1
vote
1
answer
951
views
Applying patch file to ubuntu server
Can someone please explain how to apply a patch file to ubuntu server kernel? I'm trying to apply this patch file which enables the tcp_collapse_max_bytes option in the TCP communication options on an ...
1
vote
0
answers
220
views
Patch compressed file
is there any way to patch a file, that is compressed via gzip without decompressing it first? I tried
patch -n <(gzip -d file.gz) patch_to_file.diff > new_file
but I only got
patch: **** Can't ...
1
vote
1
answer
229
views
Automated patching of packages on upstream updates
Is there a way to automatically merge custom patches to upstream packages when they update? From what I gathered so far modifying source code requires you to maintain a separate fork of packages that ...
1
vote
1
answer
535
views
patch command output `patch unexpectedly ends in middle of line`
I am attempting to script diff and patch commands. Facing some warning like this if bzcat is used
# bzcat consolidated.patch.tar.bz2 | patch -d dev -p1
patch unexpectedly ends in middle of line
...
0
votes
1
answer
642
views
How to apply a patch containing with absolute file path names?
I'd like to apply this generated patch but the patch command is asking me for a file path name :
administrator@server:~$ diff -Nau /etc/php/8.1/fpm/pool.d/www.conf /etc/php/8.1/fpm/pool.d/www.NEW.conf ...
1
vote
1
answer
794
views
How do I prevent "patch" from creating backup files with a tilde at the end?
I am running diff and patch like this:
diff --unified --ignore-space-change old.txt new.txt > changed.patch
patch --version-control=none third.txt changed.patch
The --version-control=none is ...
0
votes
0
answers
140
views
Extracting from patch lists only those possibly relevant (with regards to a given install)
I am used to downloading very dense changelogs like this one (linux-5.4.211 log), this in order to carefully decide for each change if it is pertinent on some system of mine or not. (*1)
Of course, ...
0
votes
0
answers
74
views
How to patch source code tree from within the dir to be modified?
A source code tree contains a modified dnsmasq-2.80test4 source (and git files).
Now I'd like to apply the newest 2.86 dnsmasq source code to that modified 2.80test4 using diff and patch, while ...
0
votes
1
answer
339
views
patch without reject
This might be answered already but it is hard to search for -- basically,
When patch find a block/hunk unable to apply, it will reject the changed hunk into reject file.
How not to put the conflicts ...
1
vote
0
answers
53
views
Live kernel patching in ubuntu
I am trying to see the advantages & disadvantages of live kernel patching over a newly built kernel with intended patches. I read live kernel patching uses ftrace's framework. Since ftrace keep ...
0
votes
1
answer
212
views
Patch 2nd Linux kernel: "module is in use"
how to patch kernel with a DKMS module if the module is 'in use'?
The Kernel which should be used to get patched is not the one which is actual running on this machine. (uname -r)
It is about hpsa ...
3
votes
0
answers
210
views
How to use the output of wdiff (per word diff) to patch a file?
Is it possible to use the output of wdiff (per word diff) to patch a file?
I have a file with not only word changes but also added/removed newlines. I can use wdiff to view the word changes. But can I ...
1
vote
1
answer
364
views
removing last patching kernel
I build openwrt firmware and I just used a pr (patch kernel update) with patch -p1 < filename.patch and I want to remove to reapply a new one, what would be the best?
thank you
3
votes
1
answer
16k
views
How to resolve error about patching, hunk failed
I try to add a patch about last kernel and don't know why is not working.. idea?
thanks
openwrtt$ patch -p1 < kernel.patch
patching file include/kernel-version.mk
Hunk #1 FAILED at 7.
1 out of 1 ...
-1
votes
1
answer
78
views
Makefile: 1037: recipe for target '../src/ap/beacon.o' failed
I am installing hosatpd-wpe as on kali linux rolling 2017.2 follows:
wget https://raw.githubusercontent.com/aircrack-ng/aircrack-ng/master/patches/wpe/hostapd-wpe/hostapd-wpe.patch
wget https://w1.fi/...
3
votes
3
answers
3k
views
How to create a patch for renaming a file
Suppose I have a file (myfile.txt) containing this text:
The quick brown fox jumps over the lazy dog.
I rename this file from myfile.txt to mystory.txt. How do I create a diff that represents this ...
2
votes
1
answer
35k
views
how to show when last time RHEL system was "patched"?
At work we are tasked with (i.e during and inspection or audit) showing when the system was last patched. This is all that is asked.
Of course I asked the inspector how do you want me to show you ...
1
vote
1
answer
7k
views
How can I apply a patch file to the kernel of my current Linux installation?
I want to apply a patch file to my current Ubuntu install (patch file example). What is the process to properly apply a patch file to my Linux kernel?
Do I need to go through the whole process of ...
0
votes
1
answer
314
views
How can I get a set of patch files that can be applied to increase a Linux version?
I need a method to get a set of patches, that when applied in succession, can take Linux 5.x to Linux 5.y.
Here's what I've tried (I would greatly appreciate feedback on why this doesn't work):
(...
2
votes
0
answers
83
views
Supplying RDiff Base File Using Pipe Results in Illegal Seek Error
If I run the following rdiff command
rdiff patch basefile patchfile outputfile
everything works as expected, however, if I try to use stdin to provide the base file like this
xz -d -c basefile.xz | ...
1
vote
1
answer
11k
views
Installing PREEMPT_RT kernel on Ubuntu 20.04
I am trying to install a PREEMPT_RT kernel for my ubuntu distribution as this is a requirement for a robot I am working on. But no matter what I do I get errors when compiling the kernel. I've ...
1
vote
2
answers
5k
views
Yocto - patch has not been applied
I am working with Linux built with Yocto. I need to add some changes to /etc/ssh/sshd_config file. I created the following patch file using meld:
--- a/sshd_config
+++ b/sshd_config
@@ -116,3 +116,8 @@...
3
votes
1
answer
12k
views
Kernel patching prompts “Reversed (or previously applied) patch detected! Assume -R? [n]”
I am trying kernel patching for the first time. I am not sure the following is encountered with an error and if I am doing it correctly. But in all tutorials and videos shows, .patch extension files, ...
2
votes
2
answers
2k
views
Ignore certain lines when creating/applying a patch with diff/patch?
File A
Apples
Bananas
Clementines
Dates
File B
Apples
Blueberries
Cherries
Dates
I want to diff A and B to generate a patch that when applied to C will change the line Clementines > Cherries but ...
0
votes
1
answer
236
views
how to diff automatically between file.txt.orig and file.txt
Currently, I am editing files on vim by setting patchmode=.orig and then, having two files:
file.txt.orig <- backup without changes
file.txt <- update file
However, I would like to generate a ...
1
vote
0
answers
1k
views
Patch unable to find file
I am currently in directory - /usr/lib/llvm-9/build
The include/ directory is a symlink -
reikdas@reikdas-VirtualBox:/usr/lib/llvm-9/build$ ls -l
lrwxrwxrwx 1 root root 10 Jan 31 2020 include -> ../...
0
votes
1
answer
1k
views
Remove window border in dwm monocle layout
I was wondering whether there is some patch to remove the window border in dwm monocle layout, because I really don't want to use "real" fullscreen, but just want to hide the top bar and ...
1
vote
1
answer
944
views
Rebasing a patch without using git?
I've never used maintained files created with patch and diff. But what is the work flow when the patch drifts? As in this case. I can see the the failures when I do -m in the same format git would ...
1
vote
1
answer
3k
views
Using the patch -p option when the new and old contain a different number of subdirectories
I have received a patch that I need to apply, however the filenames make it difficult to predict what -p option to use:
--- /home/user/foo/bar/baz.c
+++ /data/myproj/project/version/foo/bar/baz.c
I'm ...
2
votes
1
answer
1k
views
Is there a way to hotpatch a kernel in Debian
Is there any equivalent in Debian for hotpatching kernels, similar to kpatch in Red Hat Linux?
3
votes
2
answers
2k
views
How to patch a debian package?
I have Debian stable and I have found some weird bug which was already fix.
The fix were merged into the stable branch which version was
gnome-settings-daemon 3.32.1
but I have
gnome-settings-daemon 3....
1
vote
0
answers
168
views
Why does the dd program not work as expecting when patching a binary?
I'm trying to patch a binary using the instructions provided at this answer.
Initial setup:
wget https://f000.backblazeb2.com/file/altstore/altserver/1_4_1.zip
unzip 1_4_1.zip
This program basically ...
7
votes
2
answers
6k
views
Can I write comments inside a "normal" diff/patch file?
I used diff to produce a patch file. diff old.txt new.txt:
1c1
< Lorem ipsum dolor sit amet, consectetur adipiscing
---
> The quick brown fox jumps over the lazy dog.
The output is in the ...
1
vote
1
answer
791
views
Patch Multiple Strings in a Binary file
I have a binary file type (many instances of these files) where I would like to replace the string "DC-GX850" with "DMC-GX95". Fortunately the two strings are of equal length. The ...
0
votes
2
answers
890
views
DWM Gaps not aligned
is there a way I can fix this?
If you check it a little closely, you can see that firefox actually goes a little bit under the terminal and I really don't like it.
I am using DWM with vanity-gaps.
...