All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Patching a BR package makefile
@ 2021-12-29 12:57 Jacques Samoun
  2022-01-01 17:37 ` Richard Ash
  0 siblings, 1 reply; 3+ messages in thread
From: Jacques Samoun @ 2021-12-29 12:57 UTC (permalink / raw)
  To: Buildroot Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 525 bytes --]

Hello,

I had to modify a OPENSSH_CONF_OPTS of the openssh.mk package makefile to
solve a known interoperability issue (openssh vs libopenssl). Now the fix
is verified, i would like to create a patch to be applied to this openssh.mk
.

However, while I already did a couple of patches to other packages, they
were always so far applied to the course code of the packages. In
this specific case, I do not know how to make this on the
buildroot/package/<package>.mk file.

Is there a preferred way to do so ?

Regards,
Jacques

[-- Attachment #1.2: Type: text/html, Size: 732 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] Patching a BR package makefile
  2021-12-29 12:57 [Buildroot] Patching a BR package makefile Jacques Samoun
@ 2022-01-01 17:37 ` Richard Ash
  2022-01-02  6:38   ` Jacques Samoun
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Ash @ 2022-01-01 17:37 UTC (permalink / raw)
  To: Jacques Samoun; +Cc: Buildroot Mailing List

On Wed, 29 Dec 2021 14:57:54 +0200
Jacques Samoun <jacques.samoun33@gmail.com> wrote:

> I had to modify a OPENSSH_CONF_OPTS of the openssh.mk package
> makefile to solve a known interoperability issue (openssh vs
> libopenssl). Now the fix is verified, i would like to create a patch
> to be applied to this openssh.mk .
> 
> However, while I already did a couple of patches to other packages,
> they were always so far applied to the course code of the packages. In
> this specific case, I do not know how to make this on the
> buildroot/package/<package>.mk file.
> 
> Is there a preferred way to do so ?

As far as I know, there isn't a way to do this within buildroot,
because the buildroot tree is (has to be) immutable by the time
buildroot runs. Put another way you can't patch what effectively
becomes one vast Makefile from within that Makefile without badly
upsetting make!

The only options I have found are:
1. Write a wrapper script to unpack the buildroot tarball and apply
your patches (note you may have problems if your patches change over
time).
2. Have your own fork of buildroot git, and then your own branch from
the relevant release tag with your changes on top. This means you can
rebase your changes with git's help when you want to move to a newer
buildroot. Convenient if the rest of your build is in git and you can
use a git submodule to fetch your forked git automatically.
3. Don't try to modify the buildroot package, create your own
custom-ssh package (copy of buildroot plus your patch) and maintain it
in a buildroot external (see the manual). Could be a pain to keep up to
date in the longer term.

I'm not in any way a buildroot maintainer however!

All of these are good reasons to get patches upstreamed (if possible)
into buildroot!

Richard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] Patching a BR package makefile
  2022-01-01 17:37 ` Richard Ash
@ 2022-01-02  6:38   ` Jacques Samoun
  0 siblings, 0 replies; 3+ messages in thread
From: Jacques Samoun @ 2022-01-02  6:38 UTC (permalink / raw)
  To: Richard Ash; +Cc: Buildroot Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 2131 bytes --]

Hi Richard,
thanks for that.
I think option 3 is the way to go, at least till this openssh/openssl issue
has been fixed, which should happen (there is an PR at openssh already).
Thanks,
Jacques

On Sat, Jan 1, 2022 at 7:37 PM Richard Ash <richard@audacityteam.org> wrote:

> On Wed, 29 Dec 2021 14:57:54 +0200
> Jacques Samoun <jacques.samoun33@gmail.com> wrote:
>
> > I had to modify a OPENSSH_CONF_OPTS of the openssh.mk package
> > makefile to solve a known interoperability issue (openssh vs
> > libopenssl). Now the fix is verified, i would like to create a patch
> > to be applied to this openssh.mk .
> >
> > However, while I already did a couple of patches to other packages,
> > they were always so far applied to the course code of the packages. In
> > this specific case, I do not know how to make this on the
> > buildroot/package/<package>.mk file.
> >
> > Is there a preferred way to do so ?
>
> As far as I know, there isn't a way to do this within buildroot,
> because the buildroot tree is (has to be) immutable by the time
> buildroot runs. Put another way you can't patch what effectively
> becomes one vast Makefile from within that Makefile without badly
> upsetting make!
>
> The only options I have found are:
> 1. Write a wrapper script to unpack the buildroot tarball and apply
> your patches (note you may have problems if your patches change over
> time).
> 2. Have your own fork of buildroot git, and then your own branch from
> the relevant release tag with your changes on top. This means you can
> rebase your changes with git's help when you want to move to a newer
> buildroot. Convenient if the rest of your build is in git and you can
> use a git submodule to fetch your forked git automatically.
> 3. Don't try to modify the buildroot package, create your own
> custom-ssh package (copy of buildroot plus your patch) and maintain it
> in a buildroot external (see the manual). Could be a pain to keep up to
> date in the longer term.
>
> I'm not in any way a buildroot maintainer however!
>
> All of these are good reasons to get patches upstreamed (if possible)
> into buildroot!
>
> Richard
>

[-- Attachment #1.2: Type: text/html, Size: 2844 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-02  6:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 12:57 [Buildroot] Patching a BR package makefile Jacques Samoun
2022-01-01 17:37 ` Richard Ash
2022-01-02  6:38   ` Jacques Samoun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.