summaryrefslogtreecommitdiff
path: root/linux-basics
diff options
context:
space:
mode:
authorJan Altenberg <jan@linutronix.de>2014-08-21 14:44:03 +0200
committerJan Altenberg <jan@linutronix.de>2014-08-21 14:44:03 +0200
commit78ec44a5b56997b2638eb4def9e62c3c12921a3d (patch)
tree9e51549b405e1c4976421a136ee0de84e36df6cc /linux-basics
parentafad0a44ab025371baad7774efab2b2206cd82d0 (diff)
Quick reference to quilt: First version
Diffstat (limited to 'linux-basics')
-rw-r--r--linux-basics/Kconfig1
-rw-r--r--linux-basics/quilt/Kconfig5
-rw-r--r--linux-basics/quilt/Makefile1
-rw-r--r--linux-basics/quilt/pres_quilt_en.tex163
4 files changed, 170 insertions, 0 deletions
diff --git a/linux-basics/Kconfig b/linux-basics/Kconfig
index b45048a..dde029d 100644
--- a/linux-basics/Kconfig
+++ b/linux-basics/Kconfig
@@ -16,4 +16,5 @@ if LINUX_BASICS
source "linux-basics/udev-basics/Kconfig"
source "linux-basics/what-is-linux/Kconfig"
source "linux-basics/xorg-basics/Kconfig"
+ source "linux-basics/quilt/Kconfig"
endif
diff --git a/linux-basics/quilt/Kconfig b/linux-basics/quilt/Kconfig
new file mode 100644
index 0000000..dbbf626
--- /dev/null
+++ b/linux-basics/quilt/Kconfig
@@ -0,0 +1,5 @@
+config LINUX_QUILT
+ bool "Managing Patches with quilt"
+ default y
+ help
+ A basic introduction to the quilt utility for patch management.
diff --git a/linux-basics/quilt/Makefile b/linux-basics/quilt/Makefile
new file mode 100644
index 0000000..84128a2
--- /dev/null
+++ b/linux-basics/quilt/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_LINUX_QUILT) += pres_quilt_en.pdf
diff --git a/linux-basics/quilt/pres_quilt_en.tex b/linux-basics/quilt/pres_quilt_en.tex
new file mode 100644
index 0000000..6bed0b2
--- /dev/null
+++ b/linux-basics/quilt/pres_quilt_en.tex
@@ -0,0 +1,163 @@
+% on the following slides, include icon in the left sidebar
+\def\lximg{/usr/share/lx/icons/fueller.png}
+
+\input{configpres}
+
+\section{Managing patches with quilt}
+
+\title{Quilt - Organize your patches!}
+\maketitle
+
+% stop displaying 'fueller.png' on the following slides
+\def\lximg{none}
+
+\begin{frame}
+\frametitle{What is quilt?}
+Quilt is a commandline tool for creating and managing ''patch queues''
+\end{frame}
+
+\begin{frame}
+\frametitle{Why do I need quilt?}
+\begin{itemize}
+\item usually changes are split into separate patches
+\item so, using a patch series is quite common
+\item using quilt, it's quite easy to add and remove patches
+\item using quilt, it's quite easy to create patches
+\end{itemize}
+\end{frame}
+
+
+\begin{frame}
+\frametitle{How does quilt work?}
+\begin{itemize}
+\item It manages your patches in a stack
+\item The patches are placed in a sub-directory called patches/
+\item All changes are tracked in a sub-directory called .pc/
+\item The control file patches/series contains all patches and the order in which they should be applied
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt push}
+Apply the next patch in the stack
+\begin{verbatim}
+$ quilt push
+\end{verbatim}
+Apply all patches
+\begin{verbatim}
+$ quilt push -a
+\end{verbatim}
+Apply even if there is a merge conflict
+\begin{verbatim}
+$ quilt push -f
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt pop}
+Remove the topmost patch
+\begin{verbatim}
+$ quilt pop
+\end{verbatim}
+Remove all patches
+\begin{verbatim}
+$ quilt pop -a
+\end{verbatim}
+Remove even if it can't be removed cleanly
+\begin{verbatim}
+$ quilt pop -f
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt top}
+Show the name of the topmost patch, the current stack position:
+\begin{verbatim}
+$ quilt top
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt series}
+Show which patches are available in the series file:
+\begin{verbatim}
+$ quilt series
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt applied}
+Show which patches are currently applied:
+\begin{verbatim}
+$ quilt applied
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt new / quild add}
+Create a new patch and place it at the current stack position:
+\begin{verbatim}
+$ quilt new mypatch.diff
+\end{verbatim}
+Add files which should be tracked by that patch
+\begin{verbatim}
+$ quilt add filename(s)
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt edit}
+Add a file to the topmost patch and open it in the default editor:
+\begin{verbatim}
+$ quilt edit filename
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt refresh}
+Note: All changes are tracked for each patch in the .pc/ directory. Changes are written to the patch with quilt refresh. This will rewrite the topmost patch:
+\begin{verbatim}
+$ quilt refresh
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt diff}
+Review all changes of the topmost patch since the last refresh
+\begin{verbatim}
+$ quilt diff -z
+\end{verbatim}
+See all changes which are introduced by a patch
+\begin{verbatim}
+$ quilt diff
+\end{verbatim}
+See the changes on a specific file introduced by the topmost patch
+\begin{verbatim}
+$ quilt diff filename
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Important quilt commands: quilt import}
+Import a pre-existing patch at the current stack position:
+\begin{verbatim}
+$ quilt import mypatch.diff
+\end{verbatim}
+And then apply it using the push command:
+\begin{verbatim}
+$ quilt push
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{How quilt can influence your workflow?}
+If you don't do frequent changes on your kernel or your kernel changes
+are pretty small, you can use quilt to manage your changes. So, instead of
+having the whole kernel tree under version control:
+\begin{itemize}
+\item put your changes into a quilt queue
+\item and put that quilt queue under version control
+\end{itemize}
+\end{frame}
+
+\input{tailpres}