Ubuntu Pastebin

Paste from cedian_linux at Fri, 12 Jun 2015 14:51:14 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
checkout the backport branch you want to base your kernel port on.

git checkout <backport kernel>

find the sha1 of the base apparmor3 patch. It will have a description similar to UBUNTU: SAUCE: (no-up) apparmor: Sync to apparmor 3 .... The full commit message will depend on the version it was synced from eg. alpha4, or beta1, ... git log --oneline
checkout the sha1 of the base apparmor3 patch

git checkout <sha1 of base apparmor3 patch discovered in step 2>
copy the apparmor directory to a temporary location

cp -r security/apparmor /tmp/
create a new branch of the backport kernel which will become your new backport branch

git checkout -b <new-branch> <backport kernel>
rebase your branch onto the kernel you are porting onto

git rebase --onto <branch of kernel you are porting to> <sha1 of base apparmor3 patch used above>
this will start the rebase but stop with conflict errors you need to resolve. Instead of directly resolving them, copy the apparmor directory into the branch (this avoids all the work of trying to resolve the conflicts)

cp -r /tmp/apparmor/* security/apparmor/
find which files are new

git status
add the new and updated files

git add <file1> <file2> <...>
continue the rebase

git rebase --continue
resolve conflicts in the remaining backport patches as needed (see ??? on resolving conflicts with rebase)
Build your kernel
Test your kernel 
Download as text