From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2 1/5] doc: document git patch workflow
Date: Fri, 14 Jul 2017 15:47:47 +0200 [thread overview]
Message-ID: <20170714134751.21182-1-r.hieber@pengutronix.de> (raw)
Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
v2:
- expanded warning about git option in ptxdist setup
- foo-0.1 -> foo-1.1.0 everywhere
- mention quilt manpage
- separate quilt and git sections further and give more explanation
---
doc/dev_manual.rst | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 50 insertions(+), 3 deletions(-)
diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index a54888b43..b99296894 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -1223,7 +1223,6 @@ Creating Patches for a Package
PTXdist uses the utilities *git*, *patch* or *quilt* to work with
patches or patch series. We recommend *git*, as it can manage patch
series in a very easy way.
-For this manual and the example we use *quilt* instead.
Creating a Patch Series for a Package
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1231,6 +1230,9 @@ Creating a Patch Series for a Package
To create a patch series for the first time, we can run the following
steps. We are still using our *foo-1.1.0* example package here:
+Using quilt
+"""""""""""
+
We create a special directory for the patch series in the local project
directory:
@@ -1263,11 +1265,56 @@ present in ``patches/foo-1.1.0`` and can be used the next time we
extract the package again.
All we have to do now is to do the modification we need to make the
-package work. We change into the build directory and use *quilt* to
+package work. We change into the build directory and use quilt_ to
create new patches, add files to respective patches, modify these files
and refresh the patches to save our changes.
+See the *quilt* documentation (``man 1 quilt``) for more information.
+
+.. _quilt: http://savannah.nongnu.org/projects/quilt
+
+Using Git
+"""""""""
+
+Create the patch directory like above for *quilt*,
+but only add an empty series file::
+
+ $ mkdir -p patches/foo-1.1.0
+ $ touch patches/foo-1.1.0/series
+
+Then extract the package with an additional command line switch:
+
+::
+
+ $ ptxdist --git extract foo
+
+The empty series file makes PTXdist create a Git repository in the
+respective package build directory,
+and import the package source as the first commit.
+
+.. note:: Optionally, you can enable the setting *Developer Options →
+ use git to apply patches* in `ptxdist setup` to get this behaviour
+ as a default for every package.
+ However, note that this setting is still experimental and can lead to
+ failures for some packages.
+
+Then you can change into the package build directory
+(``platform-<name>/build-target/foo-1.1.0``),
+patch the required source files,
+and make Git commits on the way.
+The Git history should now look something like this:
+
+::
+
+ $ git log --oneline --decorate
+ * df343e821851 (HEAD -> master) Makefile: don't build the tests
+ * 65a360c2bd60 strfry.c: frobnicate the excusator
+ * fdc315f6844c (tag: foobar-1.1.0, tag: base) initial commit
+
+Finally, call ``git ptx-patches`` to regenerate the patch series in the
+``patches/foo-1.1.0`` folder.
+This way they don't get lost when cleaning the package.
-We recommend this way when modifying source files. But this way is
+We recommend working with patches when modifying source files. But this way is
improper when an autotools based buildsystem itself needs modifications.
Refer to section :ref:`configure_rebuild` on how PTXdist can
handle this special task.
--
2.11.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next reply other threads:[~2017-07-14 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 13:47 Roland Hieber [this message]
2017-07-14 13:47 ` [ptxdist] [PATCH v2 2/5] doc: promote faq to own section Roland Hieber
2017-07-14 13:47 ` [ptxdist] [PATCH v2 3/5] doc: faq: apply more structure Roland Hieber
2017-07-14 13:47 ` [ptxdist] [PATCH v2 4/5] doc: faq: copy editing, small rewrites for more clarity Roland Hieber
2017-07-14 13:47 ` [ptxdist] [PATCH 5/5] doc: css: use more ptxdist-like colors for admonitions Roland Hieber
2017-07-17 23:20 ` [ptxdist] [PATCH v3 1/5] doc: document git patch workflow Roland Hieber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170714134751.21182-1-r.hieber@pengutronix.de \
--to=r.hieber@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox