unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Custom wireguard shepherd service
@ 2020-03-12  3:24 Gregory Katz via
  2020-03-12  7:09 ` Gábor Boskovits
  0 siblings, 1 reply; 4+ messages in thread
From: Gregory Katz via @ 2020-03-12  3:24 UTC (permalink / raw)
  To: help-guix@gnu.org

Hi all,

I'm trying to put together a wireguard shepherd service that operates similar to the current nftables service, i.e., the service works by running a utility program (in this case a shell script called wg-quick) with a configuration file.  Unfortunately, wg-quick, which is included in the wireguard-tools package, does not work with files interred by guix (the file names are too long).  To make it work, I have to patch wg-quick.

Can anyone point me to where I can read up on how to apply a patch during the wireguard-tools build process?

Thanks very much for the help,

Greg

Sent with [ProtonMail](https://protonmail.com) Secure Email.

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

* Re: Custom wireguard shepherd service
  2020-03-12  3:24 Custom wireguard shepherd service Gregory Katz via
@ 2020-03-12  7:09 ` Gábor Boskovits
  2020-03-12 12:30   ` Gregory Katz via
  0 siblings, 1 reply; 4+ messages in thread
From: Gábor Boskovits @ 2020-03-12  7:09 UTC (permalink / raw)
  To: Gregory Katz; +Cc: help-guix

Hello Gregory,

Gregory Katz via <help-guix@gnu.org> ezt írta (időpont: 2020. márc. 12.,
Csü 4:48):

> Hi all,
>
> I'm trying to put together a wireguard shepherd service that operates
> similar to the current nftables service, i.e., the service works by running
> a utility program (in this case a shell script called wg-quick) with a
> configuration file.  Unfortunately, wg-quick, which is included in the
> wireguard-tools package, does not work with files interred by guix (the
> file names are too long).  To make it work, I have to patch wg-quick.
>
> Can anyone point me to where I can read up on how to apply a patch during
> the wireguard-tools build process?
>

You can run a search against the keyword search-patches in a package module
to see how patches are included in a package definition. If the patch only
does simple regexp substitution, you can also consider using a phase with
substitute*. There are a lot of packages using that. If you need to have a
patch, then you should add it to the gnu/packages/patches directory, and
also to the local.mk file patches variable, so that the build picks it up.
You can search the git log for adding or removing a patch, so that you see
how it is done.

>
> Thanks very much for the help,
>
> Greg
>
> Sent with [ProtonMail](https://protonmail.com) Secure Email.

Best regards,
g_bor

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

* Re: Custom wireguard shepherd service
  2020-03-12  7:09 ` Gábor Boskovits
@ 2020-03-12 12:30   ` Gregory Katz via
  2020-03-12 12:39     ` Gábor Boskovits
  0 siblings, 1 reply; 4+ messages in thread
From: Gregory Katz via @ 2020-03-12 12:30 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: help-guix

Thank you very much g_bor.  I believe you've given me the information I need to make this work.  I think I may be able to get away with regexp substitution for this very simple change.  If you know of an example in the source tree of regexp substitution of the top of your head please let me know, otherwise, I'm sure I'll be able to find an example on my own.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, March 12, 2020 3:09 AM, Gábor Boskovits <boskovits@gmail.com> wrote:

> Hello Gregory,
>
> Gregory Katz via <help-guix@gnu.org> ezt írta (időpont: 2020. márc. 12., Csü 4:48):
>
>> Hi all,
>>
>> I'm trying to put together a wireguard shepherd service that operates similar to the current nftables service, i.e., the service works by running a utility program (in this case a shell script called wg-quick) with a configuration file.  Unfortunately, wg-quick, which is included in the wireguard-tools package, does not work with files interred by guix (the file names are too long).  To make it work, I have to patch wg-quick.
>>
>> Can anyone point me to where I can read up on how to apply a patch during the wireguard-tools build process?
>
> You can run a search against the keyword search-patches in a package module to see how patches are included in a package definition. If the patch only does simple regexp substitution, you can also consider using a phase with substitute*. There are a lot of packages using that. If you need to have a patch, then you should add it to the gnu/packages/patches directory, and also to the local.mk file patches variable, so that the build picks it up. You can search the git log for adding or removing a patch, so that you see how it is done.
>
>> Thanks very much for the help,
>>
>> Greg
>>
>> Sent with [ProtonMail](https://protonmail.com) Secure Email.
>
> Best regards,
> g_bor

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

* Re: Custom wireguard shepherd service
  2020-03-12 12:30   ` Gregory Katz via
@ 2020-03-12 12:39     ` Gábor Boskovits
  0 siblings, 0 replies; 4+ messages in thread
From: Gábor Boskovits @ 2020-03-12 12:39 UTC (permalink / raw)
  To: Gregory Katz; +Cc: help-guix

Hello,

Gregory Katz <gregkatz@protonmail.com> ezt írta (időpont: 2020. márc.
12., Cs, 13:30):
>
> Thank you very much g_bor.  I believe you've given me the information I need to make this work.  I think I may be able to get away with regexp substitution for this very simple change.  If you know of an example in the source tree of regexp substitution of the top of your head please let me know, otherwise, I'm sure I'll be able to find an example on my own.

You can see an easy example in acl. In line 65.

>
>
> Sent with ProtonMail Secure Email.
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Thursday, March 12, 2020 3:09 AM, Gábor Boskovits <boskovits@gmail.com> wrote:
>
> Hello Gregory,
>
> Gregory Katz via <help-guix@gnu.org> ezt írta (időpont: 2020. márc. 12., Csü 4:48):
>>
>> Hi all,
>>
>> I'm trying to put together a wireguard shepherd service that operates similar to the current nftables service, i.e., the service works by running a utility program (in this case a shell script called wg-quick) with a configuration file.  Unfortunately, wg-quick, which is included in the wireguard-tools package, does not work with files interred by guix (the file names are too long).  To make it work, I have to patch wg-quick.
>>
>> Can anyone point me to where I can read up on how to apply a patch during the wireguard-tools build process?
>
>
> You can run a search against the keyword search-patches in a package module to see how patches are included in a package definition. If the patch only does simple regexp substitution, you can also consider using a phase with substitute*. There are a lot of packages using that. If you need to have a patch, then you should add it to the gnu/packages/patches directory, and also to the local.mk file patches variable, so that the build picks it up. You can search the git log for adding or removing a patch, so that you see how it is done.
>>
>>
>> Thanks very much for the help,
>>
>> Greg
>>
>> Sent with [ProtonMail](https://protonmail.com) Secure Email.
>
> Best regards,
> g_bor
>
>


-- 
OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21

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

end of thread, other threads:[~2020-03-12 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12  3:24 Custom wireguard shepherd service Gregory Katz via
2020-03-12  7:09 ` Gábor Boskovits
2020-03-12 12:30   ` Gregory Katz via
2020-03-12 12:39     ` Gábor Boskovits

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).