From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 1/4] doc: document git patch workflow
Date: Fri, 14 Jul 2017 14:42:55 +0200 [thread overview]
Message-ID: <20170714124255.73ro6t2dffhhazaj@pengutronix.de> (raw)
In-Reply-To: <20170714105715.27051-1-r.hieber@pengutronix.de>
On Fri, Jul 14, 2017 at 12:57:12PM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
> doc/dev_manual.rst | 40 +++++++++++++++++++++++++++++++++++++---
> 1 file changed, 37 insertions(+), 3 deletions(-)
>
> diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
> index a54888b43..3fe64a343 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
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> @@ -1248,6 +1247,9 @@ and an empty ``patch`` file.
> $ touch patches/foo-1.1.0/dummy
> $ echo dummy > patches/foo-1.1.0/series
>
> +Using quilt
> +"""""""""""
> +
> Next is to extract the package (if already done, we must remove it
> first):
>
> @@ -1263,11 +1265,43 @@ 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 for more information.
Maybe put the link into the sentence that mentions the docs?
> +
> +.. _quilt: http://savannah.nongnu.org/projects/quilt
> +
> +Using Git
> +"""""""""
> +
> +After touching the series file like above, apply an additional command line
> +switch to extract the package into a Git repository:
> +
> +::
> +
> + $ ptxdist --git extract foo
> +
> +.. note:: Optionally, you can enable the setting *Developer Options → use git to
> + apply patches* in `ptxdist setup` to enable this permanently.
> + However, note that this setting is still experimental.
> +
> +Then, change into the package build directory, patch the required 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
> +
> +After commit your patches, call ``git ptx-patches`` to regenerate the patches
> +and the series file in the ``patches/foo-0.1`` folder, so they don't get lost
> +when cleaning the package.
Add something like this:
Note: PTXdist will only create a git repository for packages with patches.
To use git to generate the first patch, creates an empty series file
``patches/foobar-1.1.0/series`` before extracting the packages. This will
tell PTXdist to use git anyways and ``git ptx-patches`` will put the
patches there.
Michael
>
> -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
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2017-07-14 12:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 10:57 Roland Hieber
2017-07-14 10:57 ` [ptxdist] [PATCH 2/4] doc: promote faq to own section Roland Hieber
2017-07-14 10:57 ` [ptxdist] [PATCH 3/4] doc: faq: apply more structure Roland Hieber
2017-07-14 12:35 ` Michael Olbrich
2017-07-14 10:57 ` [ptxdist] [PATCH 4/4] doc: faq: copy editing, small rewrites for more clarity Roland Hieber
2017-07-14 12:34 ` Michael Olbrich
2017-07-14 12:21 ` [ptxdist] [PATCH 1/4] doc: document git patch workflow Bastian Stender
2017-07-14 12:28 ` Roland Hieber
2017-07-14 12:42 ` Michael Olbrich [this message]
2017-07-17 6:49 ` Uwe Kleine-König
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=20170714124255.73ro6t2dffhhazaj@pengutronix.de \
--to=m.olbrich@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