All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] customizations to package recipes in BR2_EXTERNAL?
@ 2018-06-17 21:30 Liam Staskawicz
  2018-06-18 11:48 ` Carlos Santos
  0 siblings, 1 reply; 3+ messages in thread
From: Liam Staskawicz @ 2018-06-17 21:30 UTC (permalink / raw)
  To: buildroot

Hello,

I'd like to slightly modify an existing package (nvidia-driver) to target a different version (not the latest version, just the specific version my project is using). The changes are simple - updating the version string, and .hash entries - but it's not clear how best to manage these changes in a BR2_EXTERNAL based workflow, as patches in BR2_GLOBAL_PATCH_DIR get applied after the sources have been downloaded and unpacked.

I'd like to avoid maintaining a clone of the buildroot repo with these changes, if possible. Is there a recommended workflow for this situation?

Thanks,
Liam

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

* [Buildroot] customizations to package recipes in BR2_EXTERNAL?
  2018-06-17 21:30 [Buildroot] customizations to package recipes in BR2_EXTERNAL? Liam Staskawicz
@ 2018-06-18 11:48 ` Carlos Santos
  2018-06-18 17:16   ` Liam Staskawicz
  0 siblings, 1 reply; 3+ messages in thread
From: Carlos Santos @ 2018-06-18 11:48 UTC (permalink / raw)
  To: buildroot

> From: "Liam Staskawicz" <liam@stask.net>
> To: "buildroot" <buildroot@busybox.net>
> Sent: Sunday, June 17, 2018 6:30:14 PM
> Subject: [Buildroot] customizations to package recipes in BR2_EXTERNAL?

> Hello,
> 
> I'd like to slightly modify an existing package (nvidia-driver) to target a
> different version (not the latest version, just the specific version my project
> is using). The changes are simple - updating the version string, and .hash
> entries - but it's not clear how best to manage these changes in a BR2_EXTERNAL
> based workflow, as patches in BR2_GLOBAL_PATCH_DIR get applied after the
> sources have been downloaded and unpacked.
> 
> I'd like to avoid maintaining a clone of the buildroot repo with these changes,
> if possible. Is there a recommended workflow for this situation?
> 
> Thanks,
> Liam

Allowing users to customize existing packages in a BR2_EXTERNAL could
lead to unpredictable results. If you need a custom nvidia-driver then
copy/edit the original package definition to <my-project>-nvidia-driver
in your BR2_EXTERNAL. That's quite easy, since no other package depends
on nvidia-driver.

A more generic solution would be allowing the user to select the desired
version by means of a sub-menu. This seems to make sense for a package
that install pre-compiled binaries, like nvidia-driver does.

Let's ask the opinion of the package maintainers (in CC).

-- 
Carlos Santos (Casantos) - DATACOM, P&D
?Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.? ? Epitaph of a volunteer

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

* [Buildroot] customizations to package recipes in BR2_EXTERNAL?
  2018-06-18 11:48 ` Carlos Santos
@ 2018-06-18 17:16   ` Liam Staskawicz
  0 siblings, 0 replies; 3+ messages in thread
From: Liam Staskawicz @ 2018-06-18 17:16 UTC (permalink / raw)
  To: buildroot


> On Jun 18, 2018, at 4:48 AM, Carlos Santos <casantos@datacom.com.br> wrote:
> 
>> From: "Liam Staskawicz" <liam@stask.net>
>> To: "buildroot" <buildroot@busybox.net>
>> Sent: Sunday, June 17, 2018 6:30:14 PM
>> Subject: [Buildroot] customizations to package recipes in BR2_EXTERNAL?
> 
>> Hello,
>> 
>> I'd like to slightly modify an existing package (nvidia-driver) to target a
>> different version (not the latest version, just the specific version my project
>> is using). The changes are simple - updating the version string, and .hash
>> entries - but it's not clear how best to manage these changes in a BR2_EXTERNAL
>> based workflow, as patches in BR2_GLOBAL_PATCH_DIR get applied after the
>> sources have been downloaded and unpacked.
>> 
>> I'd like to avoid maintaining a clone of the buildroot repo with these changes,
>> if possible. Is there a recommended workflow for this situation?
>> 
>> Thanks,
>> Liam
> 
> Allowing users to customize existing packages in a BR2_EXTERNAL could
> lead to unpredictable results. If you need a custom nvidia-driver then
> copy/edit the original package definition to <my-project>-nvidia-driver
> in your BR2_EXTERNAL. That's quite easy, since no other package depends
> on nvidia-driver.

Thanks. This is not exactly straightforward, as it requires significant renaming of variables in the package to match the new package name, which is a bit brittle.

If there were a mechanism that allowed for a copy of the package in BR2_EXTERNAL to take precedence over a package with the same name in the core buildroot packages directory, that could address some of those issues, but perhaps there are other issues with it that I'm not aware of.

If this is really the best option, I would probably just maintain a clone of the buildroot repo with my changes in it, as that would be simpler (though as I originally mentioned, not desirable).

> 
> A more generic solution would be allowing the user to select the desired
> version by means of a sub-menu. This seems to make sense for a package
> that install pre-compiled binaries, like nvidia-driver does.

If that's workable, that would address my concern.

Thanks,
Liam

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

end of thread, other threads:[~2018-06-18 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-17 21:30 [Buildroot] customizations to package recipes in BR2_EXTERNAL? Liam Staskawicz
2018-06-18 11:48 ` Carlos Santos
2018-06-18 17:16   ` Liam Staskawicz

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.