I downloaded Ubuntu's Linux 4.4 patchset from the arch wiki for snapd, it downloaded as a tar ball and after extracting it I go a directory name linux_4.4.0-21.37.diff with a files inside named data, debugfs-aufs, namespace.txt and sysfs-aufs, according to the arch wiki page for snapd the patch is required for the reason shown below

Warning: snap-confine is built with the --disable-apparmor option; full confinement relies on an AppArmor enabled kernel with Ubuntu's Linux 4.4 patchset applied and a related profile for the snap.

I have had problems with snaps before and I think installing this patch will fix it, so can anyone please tell how to install this patch, Thank you.


The diff file is the output of the diff command which gives the differences between two (usually fairly similar) files. There is a command patch, which can take this list of differences and one version of the file and produce the other file.

Exactly how you invoke patch depends on how the diff was produced in the first place.

I would try patch < /the/path/to/one/of/the/patch/files first, and if that fails or produces error messages (hit ctrl-c if it asks questions) try again adding -p1. Otherwise show us the first few lines from the patch files.

| improve this answer | |
  • this is my output after using the command on the data file $ patch < data can't find file to patch at input line 3 Perhaps you should have used the -p or --strip option? The text leading up to this was: |--- linux-4.4.0.orig/Documentation/ABI/stable/sysfs-bus-vmbus |+++ linux-4.4.0/Documentation/ABI/stable/sysfs-bus-vmbus File to patch: What should I do now – Harikesha Suresh Jan 8 '18 at 4:12
  • when I use $patch --help and see the help of the '-p' and it says -p NUM --strip=NUM Strip NUM leading components from file names I need more explanation on this – Harikesha Suresh Jan 8 '18 at 5:34
  • 1
    The patch is trying to update a file called linux-4.4.0/Documentation/ABI/stable/sysfs-bus-vmbus so you want to be at the top of the Linux source tree if you are using -p1, i.e there should be a directory called Documentation when you type ls. I am assuming that you know you are going to be building your own kernel. – icarus Jan 8 '18 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.