diff mbox series

[4/4] Makefile.subtrees: document how to update kconfig

Message ID 20220204214131.1306843-5-mcgrof@kernel.org (mailing list archive)
State New, archived
Headers show
Series backports: use kconfig from git subtree | expand

Commit Message

Luis Chamberlain Feb. 4, 2022, 9:41 p.m. UTC
Now that kconfig is a git sub tree document what we need to do
to update version of config. We use squash here so we don't
carry the kconfig tree update logs in our commit log.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 Makefile.subtrees | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 Makefile.subtrees

Comments

Johannes Berg Feb. 4, 2022, 9:43 p.m. UTC | #1
On Fri, 2022-02-04 at 13:41 -0800, Luis Chamberlain wrote:
> 
> +add-kconfig-remote:
> +	git remote add kconfig https://github.com/mcgrof/kconfig.git
> 

Does this really make sense?

We could do what we do for a lot of other code, and just copy it from
the kernel while generating the backport. Why depend on another project?

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Luis Chamberlain Feb. 4, 2022, 9:43 p.m. UTC | #2
On Fri, Feb 04, 2022 at 01:41:31PM -0800, Luis Chamberlain wrote:
> Now that kconfig is a git sub tree document what we need to do
> to update version of config. We use squash here so we don't
> carry the kconfig tree update logs in our commit log.
> 
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> ---
>  Makefile.subtrees | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>  create mode 100644 Makefile.subtrees
> 
> diff --git a/Makefile.subtrees b/Makefile.subtrees
> new file mode 100644
> index 00000000..49bb13b3
> --- /dev/null
> +++ b/Makefile.subtrees
> @@ -0,0 +1,10 @@
> +# If you need to use a git subtree, please add it here.
> +add-kconfig-remote:
> +	git remote add kconfig https://github.com/mcgrof/kconfig.git
> +
> +add-kconfig:
> +	git subtree add --prefix=backport/kconf --squash kconfig master
> +
> +refresh-kconfig:
> +	git fetch kconfig
> +	git subtree pull --prefix=backport/kconf --squash kconfig master
> -- 
> 2.34.1
> 

To be clear:

a new maintainer later wishes to update kconfig, all they have to do is:

make -f Makefile.subtrees add-kconfig-remote
make -f Makefile.subtrees refresh-kconfig

After doing this once all you have to do is:

make -f Makefile.subtrees refresh-kconfig

  Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Luis Chamberlain Feb. 4, 2022, 9:44 p.m. UTC | #3
On Fri, Feb 04, 2022 at 10:43:14PM +0100, Johannes Berg wrote:
> On Fri, 2022-02-04 at 13:41 -0800, Luis Chamberlain wrote:
> > 
> > +add-kconfig-remote:
> > +	git remote add kconfig https://github.com/mcgrof/kconfig.git
> > 
> 
> Does this really make sense?
> 
> We could do what we do for a lot of other code, and just copy it from
> the kernel while generating the backport. Why depend on another project?

Up to you, it took me 3-4 hours to figure out how to update without
breaking things. Now I just do that work once and can benefit from
the same effort *once*.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Luis Chamberlain Feb. 4, 2022, 9:56 p.m. UTC | #4
On Fri, Feb 04, 2022 at 01:44:36PM -0800, Luis Chamberlain wrote:
> On Fri, Feb 04, 2022 at 10:43:14PM +0100, Johannes Berg wrote:
> > On Fri, 2022-02-04 at 13:41 -0800, Luis Chamberlain wrote:
> > > 
> > > +add-kconfig-remote:
> > > +	git remote add kconfig https://github.com/mcgrof/kconfig.git
> > > 
> > 
> > Does this really make sense?
> > 
> > We could do what we do for a lot of other code, and just copy it from
> > the kernel while generating the backport. Why depend on another project?
> 
> Up to you, it took me 3-4 hours to figure out how to update without
> breaking things. Now I just do that work once and can benefit from
> the same effort *once*.

Look at it this way, you can apply this and then get upates in the
future by just using one command (and folks do the effort as a group)
or you can try to do the update now yourself and deal with the effort.

As it is right Thomas was waiting on some update on kconfig on
backports, so he can update the integration work. Which way do you
prefer to go?

  Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Johannes Berg Feb. 4, 2022, 9:59 p.m. UTC | #5
On Fri, 2022-02-04 at 13:56 -0800, Luis Chamberlain wrote:
> 
> Look at it this way, you can apply this and then get upates in the
> future by just using one command (and folks do the effort as a group)
> or you can try to do the update now yourself and deal with the effort.
> 

No no, I meant
 - remove the kconfig code
 - add a rule to copy the kconfig code from the kernel we're generating
   the backport from

That might not really be ideal since you'd end up using kconfig from a
newer kernel against an older kernel, but we have that either way, even
if we take your github tree?

> As it is right Thomas was waiting on some update on kconfig on
> backports, so he can update the integration work. Which way do you
> prefer to go?

That just needs patch 1, no? In integration I assume you don't use
backports's kconfig at all.

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Luis Chamberlain Feb. 4, 2022, 10:17 p.m. UTC | #6
On Fri, Feb 04, 2022 at 10:59:18PM +0100, Johannes Berg wrote:
> On Fri, 2022-02-04 at 13:56 -0800, Luis Chamberlain wrote:
> > 
> > Look at it this way, you can apply this and then get upates in the
> > future by just using one command (and folks do the effort as a group)
> > or you can try to do the update now yourself and deal with the effort.
> > 
> 
> No no, I meant
>  - remove the kconfig code
>  - add a rule to copy the kconfig code from the kernel we're generating
>    the backport from
> 
> That might not really be ideal since you'd end up using kconfig from a
> newer kernel against an older kernel,

Yes.

> but we have that either way, even
> if we take your github tree?

Indeed.

> > As it is right Thomas was waiting on some update on kconfig on
> > backports, so he can update the integration work. Which way do you
> > prefer to go?
> 
> That just needs patch 1, no?

Um, it requires updating kconfig to work with some newer stuff.
So no, I think it requires picking either updating kconfig manually or
using this git subtree.

> In integration I assume you don't use
> backports's kconfig at all.

It does, it uses the kernel target's kconfig.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in
diff mbox series

Patch

diff --git a/Makefile.subtrees b/Makefile.subtrees
new file mode 100644
index 00000000..49bb13b3
--- /dev/null
+++ b/Makefile.subtrees
@@ -0,0 +1,10 @@ 
+# If you need to use a git subtree, please add it here.
+add-kconfig-remote:
+	git remote add kconfig https://github.com/mcgrof/kconfig.git
+
+add-kconfig:
+	git subtree add --prefix=backport/kconf --squash kconfig master
+
+refresh-kconfig:
+	git fetch kconfig
+	git subtree pull --prefix=backport/kconf --squash kconfig master