tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Rust: how do I patch a vendored crate in a pkgsrc package?



On Wed, 18 Mar 2020 15:39:00 +0100
Benny Siegert <bsiegert%gmail.com@localhost> wrote:

> Hi!
> 
> I need to patch something in a crate that wip/tealdeer depends on. I
> managed to create the necessary patch by hand (with a path of
> ../vendor/x/y/z), matching the canonical example of www/geckodriver.
> mkpatches (which I usually use) only acts in WRKSRC, but the vendor
> directory is one level higher for some reason.
> 
> Is this a bug in cargo.mk? A bug in mkpatches? Working as intended?

Working as intended, but there is certainly room for improvement.
Now that we have some actual use cases it is perhaps time to think
about how to deal with this.

It is likely that a patch to a vendor crate will be desirable
in all cargo-using packages that depend on that create. It might
therefore make sense to store all such patches in a central pkgsrc
location. Care must also be taken to only apply patches to specific
create versions since we want to upstream patches and delete them.

We could also keep doing it the geckodriver way until it becomes too
cumbersome to manage manually.

-Tobias



Home | Main Index | Thread Index | Old Index