all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#72514] [PATCH v1 0/2] Add perp support in guix-install.sh for Dragora.
@ 2024-08-07 15:00 Denis 'GNUtoo' Carikli
  2024-08-07 15:39 ` [bug#72514] [PATCH v1 1/2] gnu: Add perp Denis 'GNUtoo' Carikli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2024-08-07 15:00 UTC (permalink / raw)
  To: 72514, selk; +Cc: Denis 'GNUtoo' Carikli

Hi,

When installing guix through guix-install.sh in Dragora the init system is not
detected, so this serie fixes that.

I also included a package for perp itself in case that can help getting
familiar with it to review the patch for guix-install.sh. I've not tested if
it works on top of Guix though, but it's handy as the manuals are present for
instance.

Also note that for the perp service for guix-install.sh, I took inspiration
from the perp services inside the examples directory in perp source code.

As for the guix-install.sh I've tested various pieces separately but not
together as doing that would require the patch to be in Guix in the fist
place:

* I've tested that the guix daemon is started and stopped correctly by
  guix-install.sh once the files are in the right place.

* I've tested that the logs are produced. They end up in
  /var/log/guix-daemon/current.

* I've also tested (without guix-install.sh) that 'perpctl A guix-daemon'
  really starts the service and that then at the next boot the service is
  running too. I also tested 'perpctl X guix-daemon' in the same way.

* I've tested that /etc/perp/guix-daemon/{rc.main,rc.log} are in the right
  place.

* I've tested that the variables are passed to the guix-daemon by replacing it
  with very simple C code below that prints variables, and by also exporting
  TESTGNUTOO (and assigining it some value) to make sure that the variable is
  really passed by /etc/perp/rc.main and not by something else like bashrc.

  /*
  * Copyright © 2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  *
  * This file is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or (at
  * your option) any later version.
  *
  * This file is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this file.  If not, see <http://www.gnu.org/licenses/>.
  */
  
  #include <stdio.h>
  #include <string.h>
  #include <unistd.h>
  
  extern char **environ;
  
  int print_entry(char *var1, char *var2)
  {
  	int i;
  	char *curr;
  
  	for (i=0; ; i++) {
  		curr = environ[i];
  		if (curr == NULL)
  			break;
  
  		if (!strncmp(var1, curr, strlen(var1)))
  			printf("%s: [%s]\n", var1, curr);
  		else if (!strncmp(var2, curr, strlen(var2)))
  			printf("%s: [%s]\n", var2, curr);
  	}  
  }
  
  int main()
  {
  	while(1) {
  		print_entry("GUIX_LOCPATH", "TESTGNUTOO");
  		sleep(1);
  	}
  }

Denis 'GNUtoo' Carikli (2):
  gnu: Add perp.
  guix-install.sh: Support perp.

 .gitignore             |  2 ++
 etc/guix-install.sh    | 25 +++++++++++++++++++++++
 etc/perp/rc.log.in     | 24 ++++++++++++++++++++++
 etc/perp/rc.main.in    | 45 ++++++++++++++++++++++++++++++++++++++++++
 gnu/packages/admin.scm | 33 +++++++++++++++++++++++++++++++
 nix/local.mk           | 17 +++++++++++++++-
 6 files changed, 145 insertions(+), 1 deletion(-)
 create mode 100644 etc/perp/rc.log.in
 create mode 100644 etc/perp/rc.main.in


base-commit: 5e567587dd4abf51f9a6fa44f5a852dde1115ce9
-- 
2.45.2





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

end of thread, other threads:[~2024-08-08  9:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07 15:00 [bug#72514] [PATCH v1 0/2] Add perp support in guix-install.sh for Dragora Denis 'GNUtoo' Carikli
2024-08-07 15:39 ` [bug#72514] [PATCH v1 1/2] gnu: Add perp Denis 'GNUtoo' Carikli
2024-08-07 15:39 ` [bug#72514] [PATCH v1 2/2] guix-install.sh: Support perp Denis 'GNUtoo' Carikli
2024-08-08  9:08 ` [bug#72514] [PATCH v1 0/2] Add perp support in guix-install.sh for Dragora Vincent Legoll

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.