all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 61750@debbugs.gnu.org
Subject: [bug#61750] [PATCH] gnu: shepherd: Build Shepherd from git.
Date: Mon, 13 Nov 2023 09:38:52 +0000	[thread overview]
Message-ID: <jcQ2CBnKpBoKokQQqZOszB_UzKoGrbUmAEDHXmDYr5xKuV7AqYJZE_0ALVNK78unZkbIJTFyQlWkcNsgL7MvxYebxnnhg_rzXDF9nXxapiQ=@lendvai.name> (raw)
In-Reply-To: <87o7g81cm0.fsf@gnu.org>

> Apologies. I’m not convinced about the patch, mainly because I’ve been
> using Shepherd as a channel for testing, which I think makes fine
> details about the ‘shepherd’ package in Guix less interesting.
> 
> For info on how to do that, see:
> 
> https://git.savannah.gnu.org/cgit/shepherd.git/tree/README
> 
> The added bonus when doing this is that ‘guix system describe’ tells you
> precisely which Shepherd commit you’re using.
> 
> WDYT?


ouch, we've been here before, sorry for my loss of memory!

but after having read the README once again, i'm still not sure how this would work. please confirm my assumption:

if i add shepherd as a channel, then i unavoidably need to issue a `guix pull` (slow!) before i can test any shepherd changes, even if the channel points to a local checkout. also, i need to record any pending changes that i want to test into a git commit.

this is my objective:
 - be able to edit files in a shepherd checkout
 - issue a command that runs a vm with my shepherd changes included
 - keep this cycle reasonably fast to avoid frustration

my ultimate objective:

fix a shepherd-action bug that doesn't manifest in my `guix system vm` tests, only when i pull stuff to my server (slow!). i have zero info on what goes wrong besides a non-zero return code from tar that my action invokes. to gain more info i'm planning to add extensive logging to shepherd, especially around its fork+exec-command calls.

this is how i used to hack shepherd, when i need to test it in its real environment:

i have a guix system test that i have extracted from the guix test suite. it defines an OPERATING-SYSTEM object that is run using `guix system vm`:

https://github.com/attila-lendvai/guix-crypto/blob/main/tests/swarm-tests.scm

a custom shepherd package is defined for this OS object by modifying its SHEPHERD-ROOT-SERVICE-TYPE.

my custom shepherd package inherits from the shepherd package from guix, and replaces its source to point to my own shepherd checkout. for this to work, my local guix contains the patch to compile shepherd from git.

this worked fine, but something broke my setup recently. it was that some heavy packages started to depend on shepherd, which means that if i include my patch to compile shepherd from git, then all those packages need to be recompiled locally, which is pohibitively slow (it's added to the edit-compile-run cycle).

a tangential: i think these new dependencies are only needed for the CLI tools provided by the shepherd package. splitting shepherd into two packages (CLI tools and service) would also resolve this problem of mine.

possible solutions:
 1) i learn some better way to hack on shepherd

 2) shepherd in guix is compiled from git, so that i can easily inherit from it

 3) i give up on getting this merged, and try to keep a completely standalone shepherd package in sync with what's in guix. i also give up on adding detailed instructions to the docs on how to hack on shepherd (https://issues.guix.gnu.org/54199).

i'd appreciate some guidance on how to proceed from here. i don't want to waste anyone's time further with this. if this change is not welcome in guix proper, then reject the patch and i'll try to find another way (probably option 3) to achieve my goals.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Think what you do when you run in debt; you give to another power over your liberty.”
	— Benjamin Franklin (1706–1790), 'The Way to Wealth' (1758)





  reply	other threads:[~2023-11-13  9:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 14:02 [bug#61750] [PATCH 1/2] gnu: shepherd: Build Shepherd from git Attila Lendvai
2023-02-24 14:07 ` [bug#61750] [PATCH 2/2] WIP failing attempt to get the man page while cross-compiling Attila Lendvai
2023-07-29 14:31 ` [bug#61750] [PATCH] gnu: shepherd: Build Shepherd from git Attila Lendvai
2023-10-31 17:03   ` Attila Lendvai
2023-11-05 14:47     ` Ludovic Courtès
2023-11-13  9:38       ` Attila Lendvai [this message]
2023-11-17 15:26         ` Attila Lendvai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='jcQ2CBnKpBoKokQQqZOszB_UzKoGrbUmAEDHXmDYr5xKuV7AqYJZE_0ALVNK78unZkbIJTFyQlWkcNsgL7MvxYebxnnhg_rzXDF9nXxapiQ=@lendvai.name' \
    --to=attila@lendvai.name \
    --cc=61750@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

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.