20
Quick Introduction to Quilt Jean Delvare Level 3 Support Engineer SUSE Based on work from Petr Tesařík

Kernel Recipes 2014 - Introduction to Quilt

Embed Size (px)

Citation preview

Page 1: Kernel Recipes 2014 - Introduction to Quilt

Quick Introduction to Quilt

Jean DelvareLevel 3 Support Engineer

SUSE

Based on work from Petr Tesařík

Page 2: Kernel Recipes 2014 - Introduction to Quilt

2

Introduction

Quilt lets you manage a series of patches on top of a working directory. You can:

• Import and remove patches

• Navigate through the series

• Modify patches

• Create new patches anywhere

• Merge patches together

• Export patches in various ways and formats

• And more...

Page 3: Kernel Recipes 2014 - Introduction to Quilt

3

Quilt Patch Series

original source tree Patch #1+

Patch #2+

Patch #3+

Patch #n+

…Patch series

(stack)

patched source tree

Note: quilt modifies the source tree in place,but it keeps a backup copy of every file it touches.

Page 4: Kernel Recipes 2014 - Introduction to Quilt

4

Partially Applied Patch Series

original source tree Patch #1+

…Patch series

(stack)

Patch #3+

Patch #n+

Patch #2+ Top of stack

partially patched tree

Only first two patches are applied.

Page 5: Kernel Recipes 2014 - Introduction to Quilt

5

Basic Operations

• Move the top of the patch stack‒ quilt push [number|patchname|-a]quilt pop [number|patchname|-a]

• Start a new patch after the topmost patch

quilt new patchname

• Add files to the current patch

quilt add file …

quilt edit file …

• Refresh the current patch

quilt refresh

Page 6: Kernel Recipes 2014 - Introduction to Quilt

6

Querying the Patch Series

• Get the current/preceding/following patch

quilt topquilt previousquilt next

• List all/applied/unapplied patches in the series

quilt series [-v]quilt appliedquilt unapplied

• Which patches modify a given file

quilt patches filenamequilt annotate filename

Page 7: Kernel Recipes 2014 - Introduction to Quilt

7

Other Commands

• See the diff output (not refreshing the patch)

quilt diff

• Print/modify the patch header

quilt headerquilt header -e

• Rename the current patch

quilt rename newname

• Remove a patch‒ quilt delete [-r] [patchname|-n]

Page 8: Kernel Recipes 2014 - Introduction to Quilt

8

Import and Export

• Import a single patch

quilt import [-P patchname] patchfile

• Set up quilt metadata from an RPM specfile

quilt setup specfile

• Send a patch series per email

quilt mail --send --to recipient

• Prepare emails in an mbox file

quilt mail --mbox file --to recipient

• Convert a quilt series to git commits‒ git quiltimport [--patches directory]

Page 9: Kernel Recipes 2014 - Introduction to Quilt

Corporate HeadquartersMaxfeldstrasse 590409 NurembergGermany

+49 911 740 53 0 (Worldwide)+www.suse.com

Join us on:www.opensuse.org

9

Page 10: Kernel Recipes 2014 - Introduction to Quilt

This document could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein. These changes may be incorporated in new editions of this document. SUSE may make improvements in or changes to the software described in this document at any time.

Copyright © 2011 Novell, Inc. All rights reserved.

All SUSE marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States. All third-party trademarks are the property of their respective owners.

Page 11: Kernel Recipes 2014 - Introduction to Quilt

Quick Introduction to Quilt

Jean DelvareLevel 3 Support Engineer

SUSE

Based on work from Petr Tesařík

Page 12: Kernel Recipes 2014 - Introduction to Quilt
Page 13: Kernel Recipes 2014 - Introduction to Quilt
Page 14: Kernel Recipes 2014 - Introduction to Quilt
Page 15: Kernel Recipes 2014 - Introduction to Quilt
Page 16: Kernel Recipes 2014 - Introduction to Quilt
Page 17: Kernel Recipes 2014 - Introduction to Quilt
Page 18: Kernel Recipes 2014 - Introduction to Quilt
Page 19: Kernel Recipes 2014 - Introduction to Quilt
Page 20: Kernel Recipes 2014 - Introduction to Quilt