* GuixSD distro detection during configuration
@ 2021-09-16 7:54 phodina via
2021-09-16 9:52 ` Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: phodina via @ 2021-09-16 7:54 UTC (permalink / raw)
To: help-guix
Hi,
what is the best way to detect the GuixSD OS during the build?
I encountered the problem during build of realmd in the configure.ac [1].
Some distros have special file in /etc. So my first idea was to use /etc/config.scm. However, this is not visible during the package build.
Therefore I went with the /gnu/store. This works but I'm interested if there isn't even a better option.
[1] https://github.com/freedesktop/realmd/blob/master/configure.ac
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GuixSD distro detection during configuration
2021-09-16 7:54 GuixSD distro detection during configuration phodina via
@ 2021-09-16 9:52 ` Ricardo Wurmus
2021-09-16 10:24 ` phodina
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2021-09-16 9:52 UTC (permalink / raw)
To: phodina; +Cc: help-guix
phodina via <help-guix@gnu.org> writes:
> Hi,
> what is the best way to detect the GuixSD OS during the build?
Why is distro detection desirable? I often found myself trying to
work around buggy distro detection.
(BTW: it’s called “Guix System”, not “GuixSD”.)
> I encountered the problem during build of realmd in the
> configure.ac [1].
>
> Some distros have special file in /etc. So my first idea was to
> use /etc/config.scm. However, this is not visible during the
> package build.
It is also not necessary to have /etc/config.scm. I, for example,
have all my system configurations in a different directory.
> Therefore I went with the /gnu/store. This works but I'm
> interested if there isn't even a better option.
> [1]
> https://github.com/freedesktop/realmd/blob/master/configure.ac
Guix is often used on top of other distros, so the presence of
/gnu/store is not enough to be sure that the distro is Guix
System.
--
Ricardo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GuixSD distro detection during configuration
2021-09-16 9:52 ` Ricardo Wurmus
@ 2021-09-16 10:24 ` phodina
0 siblings, 0 replies; 3+ messages in thread
From: phodina @ 2021-09-16 10:24 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: help-guix
Hi Ricardo,
> phodina via help-guix@gnu.org writes:
>
> > Hi,
> >
> > what is the best way to detect the GuixSD OS during the build?
>
> Why is distro detection desirable? I often found myself trying to
>
> work around buggy distro detection.
>
> (BTW: it’s called “Guix System”, not “GuixSD”.)
>
Well it's not exactly desirable but the configure script wants to know in order to copy the correct files.
My idea was to create a patch with Guix System support and submit it upstream.
> > I encountered the problem during build of realmd in the
> >
> > configure.ac [1].
> >
> > Some distros have special file in /etc. So my first idea was to
> >
> > use /etc/config.scm. However, this is not visible during the
> >
> > package build.
>
> It is also not necessary to have /etc/config.scm. I, for example,
>
> have all my system configurations in a different directory.
True, I also have there just a symlink but it's not mandatory.
>
> > Therefore I went with the /gnu/store. This works but I'm
> >
> > interested if there isn't even a better option.
> >
> > [1]
> >
> > https://github.com/freedesktop/realmd/blob/master/configure.ac
>
> Guix is often used on top of other distros, so the presence of
>
> /gnu/store is not enough to be sure that the distro is Guix
>
> System.
>
Yes it can be the case it's installed on a foreign distro.
>
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Ricardo
Well in that case I agree with you that it's not desirable to use buggy distro detection and the result will be therefore to keep the patch with the pkg definition.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-16 10:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 7:54 GuixSD distro detection during configuration phodina via
2021-09-16 9:52 ` Ricardo Wurmus
2021-09-16 10:24 ` phodina
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).