help-guix
[Top][All Lists]
Advanced

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

Data dirs and shepherd services


From: Edouard KLEIN
Subject: Data dirs and shepherd services
Date: Mon, 12 Nov 2018 08:45:00 +0100

Hi guys !

I'm packaging a piece of software that is due in the next few days and I'm cutting corners everywhere. I'll come back to it later and clean things up, in the process I've packaged some free software lacking from the distribution, that I'll send the patches for.

In the meantime, I have some questions:

- My software needs to serve a bunch of static files. Those belong to a package that is 'propagated-input' installed with the big metapackage of the whole software. 
By using
$guix package list-installed
I can see the store directory of the metapackage, but the propagated-inputs packages are not listed, and I don't know how to find their store directories. The question here is multifold:
- Those static files are linked in .guix-profile: is referring to those links the correct way of referring to them ? Because I need to serve them via a webserver and I don't want to serve my whole .guix-profile dir, it may prove cumbersome.
- Is there a way of knowing the store dir of an arbitrary package ? Would this be the correct way of referring to those static files ?
- Can I specify an out-of-store static dir (such as e.g. /opt/var/www) where to copy or link the files when installing the package ? Ideally I'd like to do that in the package description, but a command line switch would be OK as well.


Next, my software needs a temp zone where to store user files (those can be destroyed across reboots). This zone should be organized with multiple dirs, some static files, etc. I assume the store dir of the package is not the correct place to put these dirs, yet it is the only directory in which I know how to create things in the package description.
- Is it OK to use the store dir as a user-provided data storage place ? I assume not.
- How can I specify an out-of-store storage place (e.g. /opt/share/my_software)  in the package description ?
- Failing that, how can I specify it as a command line flag ?


Finally, I hope to use GNU shepherd to start my software, but the documentation on how to write a service is not there yet:
https://www.gnu.org/software/shepherd/manual/shepherd.html#Service-Examples

Do you know of any examples I could draw inspiration from ?


Cheers, and thanks in advance for the help :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]