* Re: create a symlink
@ 2019-03-12 20:57 Rene
2019-03-13 11:25 ` Danny Milosavljevic
2019-03-13 14:52 ` Ludovic Courtès
0 siblings, 2 replies; 16+ messages in thread
From: Rene @ 2019-03-12 20:57 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
Hi,
Danny Milosavljevic <dannym@scratchpost.org> writes:
>
> But as far as I understand, you boot Debian/Hurd or something and then
> it loads Guix, right?
>
Yes, I use Guix as package manager like another linux distro.
I currently use `./pre-inst-env guix system init doc/os-config-hurd.scm
/guix`, where /guix is an empty partition to populate GuixSD os.
>
> It should be easy to adapt gnu/bootloader/grub.scm's grub-configuration-file
> to emit those and then reconfigure.
>
> (Later, we could add "multiboot" and "modules" to <menu-entry> in
> gnu/bootloader.scm)
>
> However, it's a dangerous part to modify since this part cannot be rolled
> back easily. So don't make a typo ;)
>
I get It.
I found a conversation in bug-hurd, maybe it will work to avoid links like /hurd.
http://lists.gnu.org/archive/html/bug-hurd/2015-07/msg00002.html
How I can change "/hurd/" by "/gnu/store/abc..-hurd-0.9/hurd/" in
<hurd/paths.h> through Guix?
--8<---------------cut here---------------start------------->8---
/* Hurd servers are specified by symbols _HURD_FOO,
the canonical pathname being /hurd/foo. */
#define _HURD "/hurd/"
#define _HURD_STARTUP _HURD "startup"
#define _HURD_PROC _HURD "proc"
#define _HURD_AUTH _HURD "auth"
--8<---------------cut here---------------end--------------->8---
--
Rene
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2019-03-12 20:57 create a symlink Rene
@ 2019-03-13 11:25 ` Danny Milosavljevic
2019-03-13 14:52 ` Ludovic Courtès
1 sibling, 0 replies; 16+ messages in thread
From: Danny Milosavljevic @ 2019-03-13 11:25 UTC (permalink / raw)
To: Rene; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]
Hi Rene,
On Tue, 12 Mar 2019 14:57:59 -0600
Rene <ikhuuma@gmail.com> wrote:
> How I can change "/hurd/" by "/gnu/store/abc..-hurd-0.9/hurd/" in
> <hurd/paths.h> through Guix?
>
> --8<---------------cut here---------------start------------->8---
> /* Hurd servers are specified by symbols _HURD_FOO,
> the canonical pathname being /hurd/foo. */
>
> #define _HURD "/hurd/"
> #define _HURD_STARTUP _HURD "startup"
> #define _HURD_PROC _HURD "proc"
> #define _HURD_AUTH _HURD "auth"
> --8<---------------cut here---------------end--------------->8---
Hmm, try to patch it out of the source code.
Modify /gnu/packages/hurd.scm to be something like:
(define-public hurd
(package
[...]
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "hurd/paths.h"
(("\"/hurd/\"")
(string-append "\"" (assoc-ref outputs "out") "\"")))
#t))
[...]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2019-03-12 20:57 create a symlink Rene
2019-03-13 11:25 ` Danny Milosavljevic
@ 2019-03-13 14:52 ` Ludovic Courtès
2019-03-25 23:06 ` Danny Milosavljevic
1 sibling, 1 reply; 16+ messages in thread
From: Ludovic Courtès @ 2019-03-13 14:52 UTC (permalink / raw)
To: Rene; +Cc: guix-devel
Hello,
Rene <ikhuuma@gmail.com> skribis:
> How I can change "/hurd/" by "/gnu/store/abc..-hurd-0.9/hurd/" in
> <hurd/paths.h> through Guix?
I think /hurd is hard to avoid; it’s akin to /bin/sh, which is also
hard-coded in libc (for the ‘system’ function). As you found out, you’d
need to change macros in libc headers, which means that libc could only
talk to a specific instance of the Hurd servers. Furthermore, /hurd
needs to be writable.
So I would recommend keeping /hurd, at least as a first approach.
Happy hacking!
Ludo’.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2019-03-13 14:52 ` Ludovic Courtès
@ 2019-03-25 23:06 ` Danny Milosavljevic
0 siblings, 0 replies; 16+ messages in thread
From: Danny Milosavljevic @ 2019-03-25 23:06 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel, Rene
[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]
On Wed, 13 Mar 2019 15:52:36 +0100
Ludovic Courtès <ludo@gnu.org> wrote:
> Hello,
>
> Rene <ikhuuma@gmail.com> skribis:
>
> > How I can change "/hurd/" by "/gnu/store/abc..-hurd-0.9/hurd/" in
> > <hurd/paths.h> through Guix?
>
> I think /hurd is hard to avoid; it’s akin to /bin/sh, which is also
> hard-coded in libc (for the ‘system’ function). As you found out, you’d
> need to change macros in libc headers, which means that libc could only
> talk to a specific instance of the Hurd servers. Furthermore, /hurd
> needs to be writable.
>
> So I would recommend keeping /hurd, at least as a first approach.
In that case, /hurd could be handled like we handle /run/booted-system .
Rene could use service extension like
(service-extension boot-service-type hurd-boot-gexp)
in order to create the "/hurd" symlink (in hurd-boot-gexp).
That is, if the Hurd can boot that far (until the root filesystem is mounted).
In fact, as a hack, we could create a dummy service that does the service
extension and use it for the Hurd.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
@ 2019-03-28 1:54 Rene
2019-04-03 7:12 ` Chris Marusich
0 siblings, 1 reply; 16+ messages in thread
From: Rene @ 2019-03-28 1:54 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
Hello Danny,
Danny Milosavljevic <dannym@scratchpost.org> writes:
>
> In that case, /hurd could be handled like we handle /run/booted-system .
>
As I understand Guix, /run/booted-system is created during the
boot(activation) process; however, I think that to perform the
activation there should already be /hurd (binaries like ext2fs.static,exec..).
> Rene could use service extension like
>
> (service-extension boot-service-type hurd-boot-gexp)
>
> in order to create the "/hurd" symlink (in hurd-boot-gexp).
>
> That is, if the Hurd can boot that far (until the root filesystem is mounted).
>
> In fact, as a hack, we could create a dummy service that does the service
> extension and use it for the Hurd.
>
For now, I did the following:
--8<---------------cut here---------------start------------->8---
lrwxr-xr-x 1 root root 37 Mar 28 00:19 bin -> /var/guix/profiles/system/profile/bin
drwxr-xr-x 3 root root 4096 Mar 28 00:19 boot
drwxr-xr-x 4 root root 4096 Mar 27 17:31 dev
drwxr-xr-x 3 root root 4096 Mar 27 18:05 etc
drwxr-xr-x 3 root root 4096 Mar 28 00:15 gnu
drwxr-xr-x 3 root root 4096 Mar 27 17:31 home
lrwxr-xr-x 1 root root 38 Mar 28 00:19 hurd -> /var/guix/profiles/system/profile/hurd
drwxr-xr-x 2 root root 4096 Mar 28 00:19 lib
lrwxr-xr-x 1 root root 41 Mar 28 00:19 libexec -> /var/guix/profiles/system/profile/libexec
drwx------ 2 root root 16384 Mar 28 00:10 lost+found
drwxr-xr-x 2 root root 4096 Mar 28 00:19 mnt
dr-xr-xr-x 0 root root 0 Dec 31 1969 proc
drwxr-xr-x 3 root root 4096 Mar 27 17:35 root
drwxr-xr-x 3 root root 4096 Mar 27 17:31 run
lrwxr-xr-x 1 root root 38 Mar 28 00:19 sbin -> /var/guix/profiles/system/profile/sbin
drwxr-xr-x 3 root root 4096 Mar 28 00:19 servers
drwxrwxrwt 2 root root 4096 Mar 27 18:01 tmp
drwxr-xr-x 10 root root 4096 Mar 27 17:31 var
--8<---------------cut here---------------end--------------->8---
In this way the gnumach kernel can find /hurd and the binaries needed to
start the whole system.
On the other hand, in linux there is `--system` argument, how does this
argument work?, Is there a script that uses it?. To test `--system`, I
removed it from my linux system and when loging in with my user it does not
detect any command.
--8<---------------cut here---------------start------------->8---
BOOT_IMAGE=/gnu/store/fiqgyafknihbvmz4j62ddb67p79kfcbk-linux-libre-4.19.13/bzImage --root=my-root --system=/var/guix/profiles/system-87-link --load=/var/guix/profiles/system-87-link/boot
--8<---------------cut here---------------end--------------->8---
Thank you
--
Rene
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2019-03-28 1:54 Rene
@ 2019-04-03 7:12 ` Chris Marusich
0 siblings, 0 replies; 16+ messages in thread
From: Chris Marusich @ 2019-04-03 7:12 UTC (permalink / raw)
To: Rene; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
Hi Rene,
Rene <ikhuuma@gmail.com> writes:
> On the other hand, in linux there is `--system` argument, how does this
> argument work?, Is there a script that uses it?. To test `--system`, I
> removed it from my linux system and when loging in with my user it does not
> detect any command.
>
> BOOT_IMAGE=/gnu/store/fiqgyafknihbvmz4j62ddb67p79kfcbk-linux-libre-4.19.13/bzImage --root=my-root --system=/var/guix/profiles/system-87-link --load=/var/guix/profiles/system-87-link/boot
To see how the Linux kernel argument "--system" is used, check out the
"boot-time-system" procedure in gnu/build/activation.scm. Ultimately
this is used by the activation-service-type, defined in
gnu/services.scm.
In short, when the system boots, the activation service will atomically
flip the "/run/current-system" symlink. and then run all the activation
scripts defined by services that extend the activation service. The
value of "--system" can be overridden by setting the GUIX_NEW_SYSTEM
environment variable; in fact, we do that in the switch-to-system
procedure in guix/scripts/system.scm, which is used when running
commands like "guix system reconfigure", "guix system roll-back," and
"guix system switch-generation".
Hopefully that helps!
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
@ 2019-03-08 21:13 Rene
2019-03-09 8:22 ` Danny Milosavljevic
0 siblings, 1 reply; 16+ messages in thread
From: Rene @ 2019-03-08 21:13 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
Hello,
Danny Milosavljevic <dannym@scratchpost.org> writes:
>
> What is supposed to load the "/hurd" that would be created ?
>
After starting GNU Mach microkernel, the hurd translators are required to start
the operating system.
At the moment all components like gnumach, hurd servers point to /hurd.
Maybe there is a way to avoid links?
--
Rene
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2019-03-08 21:13 Rene
@ 2019-03-09 8:22 ` Danny Milosavljevic
0 siblings, 0 replies; 16+ messages in thread
From: Danny Milosavljevic @ 2019-03-09 8:22 UTC (permalink / raw)
To: Rene; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]
Hi Rene,
On Fri, 08 Mar 2019 15:13:13 -0600
Rene <ikhuuma@gmail.com> wrote:
> Danny Milosavljevic <dannym@scratchpost.org> writes:
>
> >
> > What is supposed to load the "/hurd" that would be created ?
> >
>
> After starting GNU Mach microkernel, the hurd translators are required to start
> the operating system.
>
> At the moment all components like gnumach, hurd servers point to /hurd.
>
> Maybe there is a way to avoid links?
I see. I ask because usually the part that loads that can be adapted and
is also a better place to do the adaption in the first place--instead of
hard-coding "/hurd". After all, we want eventually to have the ability
to roll back the system by selecting a previous generation in the
bootloader menu again. That doesn't work all that well with the "/hurd"
link.
But as far as I understand, you boot Debian/Hurd or something and then
it loads Guix, right?
In that case, we can understand the GNU Mach microkernel as a bootloader
(from our vantage point) and thus emit the /hurd link in the "bootloader"
configuration. It's not that clean, but it works (sans rollback, though).
Cleaner would be to also boot Guix's gnumach microkernel.
It seems that https://www.gnu.org/software/hurd/grub.html documents
how to get grub to boot mach and then hurd--and it seems that there, the
paths are specified.
It should be easy to adapt gnu/bootloader/grub.scm's grub-configuration-file
to emit those and then reconfigure.
(Later, we could add "multiboot" and "modules" to <menu-entry> in
gnu/bootloader.scm)
However, it's a dangerous part to modify since this part cannot be rolled
back easily. So don't make a typo ;)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* create a symlink
@ 2018-04-19 2:54 Rene
2018-04-19 6:26 ` Danny Milosavljevic
0 siblings, 1 reply; 16+ messages in thread
From: Rene @ 2018-04-19 2:54 UTC (permalink / raw)
To: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]
Hello,
In 'gnu/build/install.scm', I try to create a symlink from '/gnu/store/..hurd-0.9' to /hurd during 'guix system init '.
But Guix waits for a string, is it possible to use a package to do the symlink?
--------CODE---------------
(let ((hurd-1 (string-append target
"/hurd")))
(let try ()
(catch 'system-error
(lambda ()
(symlink hurd hurd-1))
(lambda args
;; If hurd-1 already exists, overwrite it.
(if (= EEXIST (system-error-errno args))
(begin
(delete-file hurd-1)
(try))
(apply throw args))))))
-----------------------
-----------ERROR-------------
In guix/scripts/system.scm:
181: 4 [#<procedure b1fd9c0 at guix/scripts/system.scm:183:4 (state)> #]
In ice-9/eval.scm:
432: 3 [eval # #]
In ice-9/boot-9.scm:
157: 2 [catch system-error #<procedure afcd888 at ice-9/eval.scm:416:20 ()> ...]
157: 1 [catch system-error #<procedure afcd858 at guix/ui.scm:359:2 ()> ...]
In unknown file:
?: 0 [symlink # "/home/jin/subhurd/rfs/hurd"]
ERROR: In procedure symlink:
ERROR: Wrong type (expecting string): #<package hurd@0.9 gnu/packages/hurd.scm:251 98c7120>
--------------------------
Thank you
Rene
[-- Attachment #2: Type: text/html, Size: 14950 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2018-04-19 2:54 Rene
@ 2018-04-19 6:26 ` Danny Milosavljevic
2018-04-19 21:23 ` Joshua Branson
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Danny Milosavljevic @ 2018-04-19 6:26 UTC (permalink / raw)
To: Rene; +Cc: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
Hi Rene,
> But Guix waits for a string, is it possible to use a package to do the symlink?
Not directly - but you can "convert" a package to a string by putting in guix/scripts/system.scm :
(install-hurd #$hurd)
or so (where "install-hurd" is your procedure in gnu/build/install.scm).
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2018-04-19 6:26 ` Danny Milosavljevic
@ 2018-04-19 21:23 ` Joshua Branson
2018-04-21 14:31 ` Rene
2018-04-27 5:20 ` Rene
2 siblings, 0 replies; 16+ messages in thread
From: Joshua Branson @ 2018-04-19 21:23 UTC (permalink / raw)
To: guix-devel
I guess I'm a little behind. What's this install-hurd procedure? Is
this getting the hurd running in a vm on a guixSD system?
Danny Milosavljevic <dannym@scratchpost.org> writes:
> Hi Rene,
>
>> But Guix waits for a string, is it possible to use a package to do the symlink?
>
> Not directly - but you can "convert" a package to a string by putting in guix/scripts/system.scm :
>
> (install-hurd #$hurd)
>
> or so (where "install-hurd" is your procedure in gnu/build/install.scm).
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2018-04-19 6:26 ` Danny Milosavljevic
2018-04-19 21:23 ` Joshua Branson
@ 2018-04-21 14:31 ` Rene
2018-04-27 5:20 ` Rene
2 siblings, 0 replies; 16+ messages in thread
From: Rene @ 2018-04-21 14:31 UTC (permalink / raw)
To: guix-devel@gnu.org
Hi Joshua,
On top of Debian/Hurd, We are trying to populate a partition with the binaries required to boot GNU Mach and GNU Hurd, through Guix with:
'guix system init'
You can see more on guix-devel mailing list and here:
https://github.com/Phant0mas/Guix-on-Hurd
https://github.com/methalo/guix.git
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2018-04-19 6:26 ` Danny Milosavljevic
2018-04-19 21:23 ` Joshua Branson
2018-04-21 14:31 ` Rene
@ 2018-04-27 5:20 ` Rene
2018-04-27 15:08 ` Danny Milosavljevic
2 siblings, 1 reply; 16+ messages in thread
From: Rene @ 2018-04-27 5:20 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel@gnu.org
Hello Danny,
after adding the line (install-hurd #$hurd), I have an error, I'm missing some module?
---------
1238: 15 [run-guix-command system "init" ...]
In ice-9/boot-9.scm:
157: 14 [catch srfi-34 #<procedure 9c07b10 at guix/ui.scm:433:2 ()> ...]
157: 13 [catch system-error #<procedure 9d05000 at ice-9/eval.scm:416:20 ()> ...]
In ice-9/eval.scm:
481: 12 [lp (#<fluid 32>) (#t)]
In ice-9/r4rs.scm:
90: 11 [dynamic-wind #<procedure 9ce9800 at ice-9/boot-9.scm:1133:2 _> ...]
In guix/store.scm:
1250: 10 [run-with-store # #<procedure 9d50ac8 at ice-9/eval.scm:416:20 (a)> # ...]
In ice-9/eval.scm:
386: 9 [eval #<memoized ((<3> <1>) <0>)> (# #t # ...)]
387: 8 [eval # #]
387: 7 [eval # #]
432: 6 [eval # #]
In ice-9/boot-9.scm:
157: 5 [catch system-error #<procedure af39c78 at ice-9/eval.scm:416:20 ()> ...]
In ice-9/eval.scm:
387: 4 [eval # #]
387: 3 [eval # #]
386: 2 [eval # #]
393: 1 [eval # #]
In unknown file:
?: 0 [memoize-variable-access! #<memoized ungexp> #<directory # 89b0c60>]
ERROR: In procedure memoize-variable-access!:
ERROR: Unbound variable: ungexp
---------
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On April 19, 2018 1:26 AM, Danny Milosavljevic <dannym@scratchpost.org> wrote:
> Hi Rene,
>
> > But Guix waits for a string, is it possible to use a package to do the symlink?
>
> Not directly - but you can "convert" a package to a string by putting in guix/scripts/system.scm :
>
> (install-hurd #$hurd)
>
> or so (where "install-hurd" is your procedure in gnu/build/install.scm).
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2018-04-27 5:20 ` Rene
@ 2018-04-27 15:08 ` Danny Milosavljevic
2019-03-07 22:11 ` Rene
0 siblings, 1 reply; 16+ messages in thread
From: Danny Milosavljevic @ 2018-04-27 15:08 UTC (permalink / raw)
To: Rene; +Cc: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
Hi Rene,
are you sure you put the call into guix/scripts/system.scm ?
There are a lot of #$ things there already - should work.
In gnu/build/install.scm it's not going to work.
The Guix high-level packaging stuff is not available build-side, only host-side.
Can you provide a patch of what you did?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: create a symlink
2018-04-27 15:08 ` Danny Milosavljevic
@ 2019-03-07 22:11 ` Rene
2019-03-08 8:15 ` Danny Milosavljevic
0 siblings, 1 reply; 16+ messages in thread
From: Rene @ 2019-03-07 22:11 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]
Hello Danny, sorry for delay.
I have updated my repository with commit
dc7d6d4ece30c7ab25e9f1927d64f2b409ab896c(version 14).
Danny Milosavljevic <dannym@scratchpost.org> writes:
> are you sure you put the call into guix/scripts/system.scm ?
>
> There are a lot of #$ things there already - should work.
>
> In gnu/build/install.scm it's not going to work.
>
> The Guix high-level packaging stuff is not available build-side, only host=
> -side.
>
> Can you provide a patch of what you did?
>
When doing `make` shows the error message:
--8<---------------cut here---------------start------------->8---
Backtrace:
14 (primitive-load "/home/jin/guix/./build-aux/compile-all…")
In guix/build/compile.scm:
158:6 13 (compile-files _ _ ("guix/scripts/system.scm" "gnu/b…") …)
107:11 12 (load-files "." _ #:report-load _ #:debug-port _)
In ice-9/boot-9.scm:
2800:17 11 (resolve-interface (guix scripts system) #:select _ # _ …)
In ice-9/threads.scm:
390:8 10 (_ _)
In ice-9/boot-9.scm:
2726:13 9 (_)
In ice-9/threads.scm:
390:8 8 (_ _)
In ice-9/boot-9.scm:
2994:20 7 (_)
2312:4 6 (save-module-excursion _)
3014:26 5 (_)
In unknown file:
4 (primitive-load-path "guix/scripts/system" #<procedure …>)
In ice-9/eval.scm:
191:35 3 (_ #f)
191:27 2 (_ #f)
223:20 1 (proc #<directory (guix scripts system) e2f050>)
In unknown file:
0 (%resolve-variable (7 . ungexp) #<directory (guix scrip…>)
ERROR: In procedure %resolve-variable:
ungexp: unbound variable
Makefile:5463: recipe for target 'make-go' failed
make[2]: *** [make-go] Error 1
make[2]: Leaving directory '/home/jin/guix'
Makefile:4536: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/jin/guix'
Makefile:3078: recipe for target 'all' failed
make: *** [all] Error 2
--8<---------------cut here---------------end--------------->8---
Attached patch.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-symlink.patch --]
[-- Type: text/x-patch, Size: 1827 bytes --]
From c0756c7dd90c038f5daddcf4893f57e9701ab033 Mon Sep 17 00:00:00 2001
From: Rene <ikhuuma@gmail.com>
Date: Thu, 7 Mar 2019 20:46:59 -0800
Subject: [PATCH] Add symlink.
---
gnu/build/install.scm | 19 +++++++++++++++++++
guix/scripts/system.scm | 2 ++
2 files changed, 21 insertions(+)
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index 9e30c0d23..202a9672d 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -27,6 +27,7 @@
populate-root-file-system
reset-timestamps
register-closure
+ install-hurd
populate-single-profile-directory))
;;; Commentary:
@@ -144,6 +145,24 @@ includes /etc, /var, /run, /bin/sh, etc., and all the symlinks to SYSTEM."
(try))
(apply throw args)))))))
+(define (install-hurd pkg)
+ "Create a link to /gnu/store/..hurd-1.9 with the name /hurd."
+
+ ;; Add /hurd link.
+ (let ((link-1 (string-append target
+ "/hurd")))
+ (let try ()
+ (catch 'system-error
+ (lambda ()
+ (symlink pkg link-1))
+ (lambda args
+ ;; If /hurd already exists, overwrite it.
+ (if (= EEXIST (system-error-errno args))
+ (begin
+ (delete-file link-1)
+ (try))
+ (apply throw args)))))))
+
(define (reset-timestamps directory)
"Reset the timestamps of all the files under DIRECTORY, so that they appear
as created and modified at the Epoch."
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index b688bb68c..be8e639b7 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -1151,3 +1151,5 @@ argument list and OPTS is the option alist."
;;; End:
;;; system.scm ends here
+
+(install-hurd #$hurd)
--
2.17.1
[-- Attachment #3: Type: text/plain, Size: 11 bytes --]
--
Rene
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: create a symlink
2019-03-07 22:11 ` Rene
@ 2019-03-08 8:15 ` Danny Milosavljevic
0 siblings, 0 replies; 16+ messages in thread
From: Danny Milosavljevic @ 2019-03-08 8:15 UTC (permalink / raw)
To: Rene; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
Hi Rene,
+++ b/guix/scripts/system.scm
@@ -1151,3 +1151,5 @@ argument list and OPTS is the option alist."
;;; End:
;;; system.scm ends here
+
+(install-hurd #$hurd)
That is not going to work there.
#$ unquotes from a build-side g-expression (similar to what "," would do in a quasiquote).
You are not in a g-expression at the position above.
In order to enter the g-expression environment, you could use #~ .
That would give you a lowerable object which someone has to lower in order
to get a derivation for it. Then someone has to do derivation->output-path
in order to get an output path for that derivation.
Or put it into an existing block with #~ .
In your case, I would put the (install-hurd #$hurd) into a bootloader
module, I guess (inside "installer" there--which has a #~ ).
What is supposed to load the "/hurd" that would be created ?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2019-04-03 7:12 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 20:57 create a symlink Rene
2019-03-13 11:25 ` Danny Milosavljevic
2019-03-13 14:52 ` Ludovic Courtès
2019-03-25 23:06 ` Danny Milosavljevic
-- strict thread matches above, loose matches on Subject: below --
2019-03-28 1:54 Rene
2019-04-03 7:12 ` Chris Marusich
2019-03-08 21:13 Rene
2019-03-09 8:22 ` Danny Milosavljevic
2018-04-19 2:54 Rene
2018-04-19 6:26 ` Danny Milosavljevic
2018-04-19 21:23 ` Joshua Branson
2018-04-21 14:31 ` Rene
2018-04-27 5:20 ` Rene
2018-04-27 15:08 ` Danny Milosavljevic
2019-03-07 22:11 ` Rene
2019-03-08 8:15 ` Danny Milosavljevic
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.