Ahmad Khalifa <ah...@khalifa.ws> writes:

> On 11/12/2024 14:04, Simon Josefsson wrote:
>> Ahmad Khalifa <ah...@khalifa.ws> writes:
>>> - github.com/olebedev/when - small library, should I ITP for it separately?
>> +1
>> 
>>> - github.com/urfave/cli/v2/altsrc - package
>>>    golang-github-urfave-cli-v2-dev exists already, but altsrc package
>>>   is specifically excluded from d/rules. How to deal with this? add it
>>> back in? Separate package?
>> Fork that salsa project, re-add altsrc and try to get it to build,
>> and
>> then post patches for discussion on the list.  Sometimes adding things
>> is easy, sometimes it ends up getting really complex.
>
> Good point. I'll get some more details and come back.
>
>>> - github.com/stripe/stripe-go - this I'm afraid is beyond my
>>>    paygrade. It's massive. Is there a way to exclude stripe from the
>>>   source package if I know how to patch it out or is this just
>>> ultimately incompatible until stripe is packaged?
>> Depends on how important stripe-go is for ntfy -- sometimes you can
>> patch things out, and sometimes you can strip down the dependent package
>> into "mini" variant with only the library functions required by ntfy.
>
> So patching it out is an option, that's good.
> I'll dig in a bit, but for the basic server functionality, stripe is
> not needed, but it's intertwined because there is a paid-hosted
> version.
>
> May I ask if there is a good example of patching out go apps? I'm
> familiar with quilt/etc.. but where and when you patch things could be 
> interesting to learn.

Some inspiration:

https://salsa.debian.org/go-team/packages/cosign/-/tree/debian/sid/debian/patches?ref_type=heads
https://salsa.debian.org/go-team/packages/rekor/-/blob/debian/sid/debian/patches/disable-rpmtuf.patch?ref_type=heads
https://salsa.debian.org/go-team/packages/golang-github-sigstore-sigstore/-/tree/debian/sid/debian/patches?ref_type=heads

Also consider disabling stuff in debian/rules:

https://salsa.debian.org/go-team/packages/golang-github-sigstore-sigstore/-/blob/debian/sid/debian/rules?ref_type=heads
https://salsa.debian.org/go-team/packages/golang-github-foxboron-go-tpm-keyfiles/-/blob/debian/sid/debian/rules?ref_type=heads

Some other common patterns:
https://salsa.debian.org/go-team/packages/tkey-ssh-agent/-/blob/debian/sid/debian/patches/use-go-pinentry-instead-of-minimal.patch?ref_type=heads
https://salsa.debian.org/go-team/packages/tkey-ssh-agent/-/blob/debian/sid/debian/rules?ref_type=heads

/Simon

Attachment: signature.asc
Description: PGP signature

Reply via email to