all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* question re. packaging, build, init and shepherd
@ 2019-05-09 16:07 Miles Fidelman
  2019-05-09 17:03 ` Christopher Baines
  0 siblings, 1 reply; 5+ messages in thread
From: Miles Fidelman @ 2019-05-09 16:07 UTC (permalink / raw)
  To: help-guix

The GUIX documentation is great when it comes to installing GUIX, and 
then installing packaged software.

It's not so clear on how do install software that isn't in the package 
repository - whether by creating a package, or via the classic 
./configure;make;make install, or if there are tools that can bring 
classically installed software under package management (e.g., the 
Debian alien tool).

And then there's the question of init systems:  Until systemd came 
along, ./configure;make;make install generally just works - leaving init 
files in the right places, starting up daemons, etc.

Which leads to the question of, if I want to install something 
complicated in GUIX - say the Sympa list manager (to pick a non-random 
example), which comes with standard sysvinit scripts - can I just 
./configure;make;make install?  Does Shepherd do the right thing with 
sysvinit scripts?  Can I invoke them through Shepherd (e.g, after a 
config change)?  Can I still edit & invoke the init scripts in the 
classic ways (vi, /etc/init.d/<foo> restart).

---

I'm sure I'm not the only one looking at GUIX as an alternative to the 
various distributions that have gone down the systemd rathole - 
particularly those of us who run Linux in production server environments 
that have been heavily customized over the years.  GUIX seems to be 
reaching a maturity level where it can be considered for production use 
- but there's an awful paucity of information that might let us evaluate it.

Miles Fidelman


-- 
In theory, there is no difference between theory and practice.
In practice, there is.  .... Yogi Berra

Theory is when you know everything but nothing works.
Practice is when everything works but no one knows why.
In our lab, theory and practice are combined:
nothing works and no one knows why.  ... unknown

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

* Re: question re. packaging, build, init and shepherd
  2019-05-09 16:07 question re. packaging, build, init and shepherd Miles Fidelman
@ 2019-05-09 17:03 ` Christopher Baines
  2019-05-09 21:22   ` Miles Fidelman
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Baines @ 2019-05-09 17:03 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 2608 bytes --]


Miles Fidelman <mfidelman@meetinghouse.net> writes:

> The GUIX documentation is great when it comes to installing GUIX, and
> then installing packaged software.
>
> It's not so clear on how do install software that isn't in the package
> repository - whether by creating a package, or via the classic
> ./configure;make;make install, or if there are tools that can bring
> classically installed software under package management (e.g., the
> Debian alien tool).

I can't really think of a situation where creating a package would be a
bad approach, and the manual does describe this. There's also the
packaging tutorial blog post [1]

1: https://www.gnu.org/software/guix/blog/2018/a-packaging-tutorial-for-guix/

I think there could indeed be a lack of guidance about where do perhaps
deviate from the instructions or common steps for installing software.

Taking the shepherd as an example, the INSTALL file distributed with the
source contains the common: './configure && make && make install'

With a Guix System, that would probably work, at least initially. But
you'd be missing out on some of the advantages Guix packages offer, and
would possibly run in to problems with garbage collection.

As Guix doesn't really have binary packages like Debian, there isn't
really the possibility of a Alien like tool. The dependencies between
the "binary" package forms are very strict, using exact store paths,
which would make generating a package to slot in to a system difficult.

> And then there's the question of init systems:  Until systemd came
> along, ./configure;make;make install generally just works - leaving
> init files in the right places, starting up daemons, etc.
>
> Which leads to the question of, if I want to install something
> complicated in GUIX - say the Sympa list manager (to pick a non-random
> example), which comes with standard sysvinit scripts - can I just
> ./configure;make;make install?  Does Shepherd do the right thing with
> sysvinit scripts?  Can I invoke them through Shepherd (e.g, after a
> config change)?  Can I still edit & invoke the init scripts in the
> classic ways (vi, /etc/init.d/<foo> restart).

The configuration of the shepherd is normally entirely managed through
your Guix operating-system definition. The configuration is generated in
te store, and shepherd looks at that.

This is important as it allows you to boot in to previous generations of
your system, which is useful for recovering the system if things go
wrong.

So, whereas I think things like systemd are aware of sysvinit scripts in
the usual place, the shepherd is completely unaware.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

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

* Re: question re. packaging, build, init and shepherd
  2019-05-09 17:03 ` Christopher Baines
@ 2019-05-09 21:22   ` Miles Fidelman
  2019-05-10  7:12     ` Giovanni Biscuolo
  2019-05-10  7:28     ` Christopher Baines
  0 siblings, 2 replies; 5+ messages in thread
From: Miles Fidelman @ 2019-05-09 21:22 UTC (permalink / raw)
  To: help-guix

Ok... a few follow-on questions (in-line):


On 5/9/19 1:03 PM, Christopher Baines wrote:

> Miles Fidelman <mfidelman@meetinghouse.net> writes:
>
>> The GUIX documentation is great when it comes to installing GUIX, and
>> then installing packaged software.
>>
>> It's not so clear on how do install software that isn't in the package
>> repository - whether by creating a package, or via the classic
>> ./configure;make;make install, or if there are tools that can bring
>> classically installed software under package management (e.g., the
>> Debian alien tool).
> I can't really think of a situation where creating a package would be a
> bad approach, and the manual does describe this. There's also the
> packaging tutorial blog post [1]
>
> 1: https://www.gnu.org/software/guix/blog/2018/a-packaging-tutorial-for-guix/
>
> I think there could indeed be a lack of guidance about where do perhaps
> deviate from the instructions or common steps for installing software.
>
> Taking the shepherd as an example, the INSTALL file distributed with the
> source contains the common: './configure && make && make install'

Ok.. see that.  So it basically does what one would do manually, 
following the instructions in the configure & make files.

>
> With a Guix System, that would probably work, at least initially. But
> you'd be missing out on some of the advantages Guix packages offer, and
> would possibly run in to problems with garbage collection.
>
> As Guix doesn't really have binary packages like Debian, there isn't
> really the possibility of a Alien like tool. The dependencies between
> the "binary" package forms are very strict, using exact store paths,
> which would make generating a package to slot in to a system difficult.
>
>> And then there's the question of init systems:  Until systemd came
>> along, ./configure;make;make install generally just works - leaving
>> init files in the right places, starting up daemons, etc.
>>
>> Which leads to the question of, if I want to install something
>> complicated in GUIX - say the Sympa list manager (to pick a non-random
>> example), which comes with standard sysvinit scripts - can I just
>> ./configure;make;make install?  Does Shepherd do the right thing with
>> sysvinit scripts?  Can I invoke them through Shepherd (e.g, after a
>> config change)?  Can I still edit & invoke the init scripts in the
>> classic ways (vi, /etc/init.d/<foo> restart).
> The configuration of the shepherd is normally entirely managed through
> your Guix operating-system definition. The configuration is generated in
> te store, and shepherd looks at that.
>
> This is important as it allows you to boot in to previous generations of
> your system, which is useful for recovering the system if things go
> wrong.
>
> So, whereas I think things like systemd are aware of sysvinit scripts in
> the usual place, the shepherd is completely unaware.

So... that kind of leaves out automatically setting up servers. I mean, 
most server software still comes with init files, maybe with systemd or 
other init files, but generally make install sets things up so that 
servers start & run.

So how does GUIX support this?

And, for that matter, how does GUIX handle any kind of post-install 
configuration?  E.g., the kind of things that debconf might be used for.

Thanks,

Miles Fidelman

-- 
In theory, there is no difference between theory and practice.
In practice, there is.  .... Yogi Berra

Theory is when you know everything but nothing works.
Practice is when everything works but no one knows why.
In our lab, theory and practice are combined:
nothing works and no one knows why.  ... unknown

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

* Re: question re. packaging, build, init and shepherd
  2019-05-09 21:22   ` Miles Fidelman
@ 2019-05-10  7:12     ` Giovanni Biscuolo
  2019-05-10  7:28     ` Christopher Baines
  1 sibling, 0 replies; 5+ messages in thread
From: Giovanni Biscuolo @ 2019-05-10  7:12 UTC (permalink / raw)
  To: Miles Fidelman, help-guix

[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]

Hello Miles,

Miles Fidelman <mfidelman@meetinghouse.net> writes:

> On 5/9/19 1:03 PM, Christopher Baines wrote:

[...]

>> So, whereas I think things like systemd are aware of sysvinit scripts in
>> the usual place,

no: rc script are **wrapped** to service units by systemd-sysv-generator
at boot or systemd service reload

https://unix.stackexchange.com/a/233581 is a good summary
also https://www.turnkeylinux.org/blog/debugging-systemd-sysv-init-compat

that's not the solution, a full rewrite of rc script is often needed

>> the shepherd is completely unaware.
>
> So... that kind of leaves out automatically setting up servers. I mean, 
> most server software still comes with init files, maybe with systemd or 
> other init files, but generally make install sets things up so that 
> servers start & run.

I'm an absolute beginner here, but AFAIU...

each Guix service comes with a service definition written in guix
language, as documented
https://www.gnu.org/software/guix/manual/en/html_node/Defining-Services.html

e.g. OpenSSH definition is:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/ssh.scm#n263

guix services definition and activation is "another story" compared to
what happens in other init systems

...and yes, we (including me) have to study Guile and Guix to be able to
define guix services... and that's a lot of fun :-)

> So how does GUIX support this?

AFAIK Guix does not support wrapping rc scripts

> And, for that matter, how does GUIX handle any kind of post-install 
> configuration?  E.g., the kind of things that debconf might be used
> for.

declaratively, via
https://www.gnu.org/software/guix/manual/en/html_node/System-Configuration.html

that's much more than
apt+debconf+devops(ansible,puppet,cfengine,younameit)

[...]

HTH! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: question re. packaging, build, init and shepherd
  2019-05-09 21:22   ` Miles Fidelman
  2019-05-10  7:12     ` Giovanni Biscuolo
@ 2019-05-10  7:28     ` Christopher Baines
  1 sibling, 0 replies; 5+ messages in thread
From: Christopher Baines @ 2019-05-10  7:28 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 2851 bytes --]


Miles Fidelman <mfidelman@meetinghouse.net> writes:

>>> And then there's the question of init systems:  Until systemd came
>>> along, ./configure;make;make install generally just works - leaving
>>> init files in the right places, starting up daemons, etc.
>>>
>>> Which leads to the question of, if I want to install something
>>> complicated in GUIX - say the Sympa list manager (to pick a non-random
>>> example), which comes with standard sysvinit scripts - can I just
>>> ./configure;make;make install?  Does Shepherd do the right thing with
>>> sysvinit scripts?  Can I invoke them through Shepherd (e.g, after a
>>> config change)?  Can I still edit & invoke the init scripts in the
>>> classic ways (vi, /etc/init.d/<foo> restart).
>> The configuration of the shepherd is normally entirely managed through
>> your Guix operating-system definition. The configuration is generated in
>> te store, and shepherd looks at that.
>>
>> This is important as it allows you to boot in to previous generations of
>> your system, which is useful for recovering the system if things go
>> wrong.
>>
>> So, whereas I think things like systemd are aware of sysvinit scripts in
>> the usual place, the shepherd is completely unaware.
>
> So... that kind of leaves out automatically setting up servers. I
> mean, most server software still comes with init files, maybe with
> systemd or other init files, but generally make install sets things up
> so that servers start & run.
>
> So how does GUIX support this?
>
> And, for that matter, how does GUIX handle any kind of post-install
> configuration?  E.g., the kind of things that debconf might be used
> for.

So, I used to write Debian packages, including the debconf stuff, so I
have some experience of this

While a Debian package installs effectively with root privileges and can
modify the state of the system as much as it wants to, when you install
a Guix package, all you're saying is I want these specific things to
exist in /gnu/store, make it so. When you install a Guix package,
nothing can be changed, you're only adding entries to the store, if they
weren't already there.

With Debian packages, the service management can be included in the
package, so you can dpkg-reconfigure the package, and have the debconf
scripts modify the configuration for you.

With Guix, packages are entirely separate from services, services just
use packages. Guix has a framework for defining services and managing
the configuration.

So, like packages, the best way of getting a service running on a Guix
System, is to write a service-type definition. This can be quite short,
if the configuration is simple, or you don't manage it. Or they can be
quite complex if lots of the configuration can be managed from Guile.

So, Guix supports system services through it's own abstraction.

Hope that helps,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

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

end of thread, other threads:[~2019-05-10  7:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-09 16:07 question re. packaging, build, init and shepherd Miles Fidelman
2019-05-09 17:03 ` Christopher Baines
2019-05-09 21:22   ` Miles Fidelman
2019-05-10  7:12     ` Giovanni Biscuolo
2019-05-10  7:28     ` Christopher Baines

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.