all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Helping with Guix on Hurd: my notes
@ 2017-02-18  7:22 Jan Nieuwenhuizen
  2017-04-27  6:25 ` Maxim Cournoyer
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Nieuwenhuizen @ 2017-02-18  7:22 UTC (permalink / raw)
  To: guix-devel

Hi,

I have just successfully built

    ./pre-inst-env guix package -i hello --keep-failed

on Debian/Hurd.  Find my notes below.

--janneke

--8<---------------cut here---------------start------------->8---
* Help with Hurd                                                  -*- mode: org -*-

In his talk @FOSDEM'17

    https://fosdem.org/2017/schedule/event/guixhurd/
    https://fosdem.org/2017/schedule/event/guixhurd/attachments/slides/1850/export/events/attachments/guixhurd/slides/1850/guix_to_hurd_fosdem_2017.pdf

Manolis sends out a call for help to get Hurd supported in Guix.  A lot
of work has been done.  Some bigger things remains, and there is also a
lot of small, simple things to be fixed.  So, get involved!

* Setup Guix build environment on Debian/Hurd

** Get Hurd image from Debian
*** Entry: https://www.debian.org/ports/hurd/hurd-install
*** Next: https://people.debian.org/~sthibault/hurd-i386/

wget http://people.debian.org/~sthibault/hurd-i386/debian-hurd.img.tar.gz
tar xzf debian-hurd.img.tar.gz

*** Boot it
qemu-system-i386 -enable-kvm -drive file=debian-hurd-20170115.img,cache=writeback -m 1G -net user,hostfwd=tcp:127.0.0.1:2223-:22 -net nic

*** Create additional storage

qemu-img create -f raw gnu.img 30G
fdisk gnu.img
mkfs.ext2 /dev/hd1s1

*** Setup fstab: TRAMP /ssh:root@hurd#2223:/etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/hd0s1      /               ext2    defaults        0       1
/dev/hd0s5      none            swap    sw              0       0
/dev/hd1s1      /gnu            ext4    defaults        0       0
/dev/hd2        /media/cdrom0   iso9660 noauto          0       0
/gnu/tmp        /tmp            none    defaults,bind   0       0

qemu-system-i386 -enable-kvm -drive file=debian-hurd-20170115.img,cache=writeback -m 1G -net user,hostfwd=tcp:127.0.0.1:2223-:22 -net nic -drive file=gnu.img

*** [@hurd] Create user

addgroup janneke
adduser janneke janneke
adduser janneke sudo
passwd janneke

*** [@GuixSD]: Add to .ssh/config
Host hurd
   HostName localhost
   Port 2223
   ForwardAgent yes

*** Build bootstrap binaries

    git checkout core-updates
    git show HEAD | head
    commit 7ca72ec44bf52d459f1fbd994037b792999fe0eb

    ./pre-inst-env guix build --target=i586-pc-gnu bootstrap-tarballs
    /gnu/store/7kxdhs1404n7pz66m2g8hv6hvymh8ing-bootstrap-tarballs-0 hurd:gnu/

    for i in /gnu/store/7kxdhs1404n7pz66m2g8hv6hvymh8ing-bootstrap-tarballs-0/*; \
        do echo $i; guix hash $i; done
    scp -r /gnu/store/7kxdhs1404n7pz66m2g8hv6hvymh8ing-bootstrap-tarballs-0 hurd:var/hurd/gnu/

*** [@hurd] Prepare to build Guix
**** Checkout Guix

    sudo apt-get install git
    mkdir src
    cd src
    git config --global url."git+ssh://git.sv.gnu.org/srv/git/".insteadOf gnu:
    git clone gnu:guix.git
    cd guix
    git remote add phant0mas git@github.com:Phant0mas/guix-on-hurd.git
    git fetch phant0mas
    git checkout wip-hurd-native

**** Add Debian build dependencies
sudo apt-get install build-essential dh-autoreconf dh-systemd autotools-dev graphviz guile-2.0-dev guile-json help2man libgcrypt20-dev libsqlite3-dev libbz2-dev texinfo

**** Add Hurd bootstrap binaries
mkdir -p gnu/packages/bootstrap/i586-gnu
tar xf ~/var/hurd/7kxdhs1404n7pz66m2g8hv6hvymh8ing-bootstrap-tarballs-0/static-binaries-0-i586-pc-gnu.tar.xz --strip=2 -C gnu/packages/bootstrap/i586-gnu ./bin/{xz,tar,mkdir,bash}

cp ~/var/hurd/7kxdhs1404n7pz66m2g8hv6hvymh8ing-bootstrap-tarballs-0/guile-static-stripped-2.0.13-i586-pc-gnu.tar.xz gnu/packages/bootstrap/i586-gnu/guile-2.0.12.tar.xz

./configure --with-courage --localstatedir=/var
make

*** Prepare to start guix-daemon, as root

     groupadd --system guixbuild
     for i in `seq -w 1 10`;
       do
         useradd -g guixbuild -G guixbuild           \
                 -d /var/empty -s `which nologin`    \
                 -c "Guix build user $i" --system    \
                 guixbuilder$i;
       done

sudo ./pre-inst-env guix archive --authorize < hydra.gnu.org.pub
mkdir /var/guix

* Do it
** [@GuixSD] Start qemu: additional resources: 4G of memory, 30G storage:

qemu-system-i386 -enable-kvm -drive file=debian-hurd-20170115.img,cache=writeback -m 4G -net user,hostfwd=tcp:127.0.0.1:2223-:22 -net nic -drive file=gnu.img,cache=writeback

** [@Hurd] Start daemon
sudo ./pre-inst-env guix-daemon --build-users-group=guixbuild &

** [@Hurd] build package
./pre-inst-env guix package -i hello --keep-failed
--8<---------------cut here---------------end--------------->8---

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

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

* Re: Helping with Guix on Hurd: my notes
  2017-02-18  7:22 Helping with Guix on Hurd: my notes Jan Nieuwenhuizen
@ 2017-04-27  6:25 ` Maxim Cournoyer
  2017-04-27  7:22   ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 3+ messages in thread
From: Maxim Cournoyer @ 2017-04-27  6:25 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

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

Thank you Jan for sharing these precious notes!

I've saved your message; I had started looking into Hurd last year, but
then turned my attention to Guix and have been (slowly) making myself at home here. I
intend to restart investigating Hurd as things stabilize on the Guix
side :). They are destined to work together anyway ;)

Maxim

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

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

* Re: Helping with Guix on Hurd: my notes
  2017-04-27  6:25 ` Maxim Cournoyer
@ 2017-04-27  7:22   ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Nieuwenhuizen @ 2017-04-27  7:22 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: guix-devel

Maxim Cournoyer writes:

H! Maxim

> Thank you Jan for sharing these precious notes!

At FOSDEM'17, Manolis [cc] inspired me with his talk to have a look at
HURD and help.

Sadly, the above recipe is all the help I found to offer until now, but hey.

> I've saved your message; I had started looking into Hurd last year, but
> then turned my attention to Guix and have been (slowly) making myself at home here. I
> intend to restart investigating Hurd as things stabilize on the Guix
> side :). They are destined to work together anyway ;)

That's how I feel too.  Guix should make working together on a project
like Hurd a lot easier.

I'm sure the recipe has bitrotten a bit, esp. names of branches and
hashes; it would be great if you could try it and help keep it up to
date.

Greetings--janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

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

end of thread, other threads:[~2017-04-27  7:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-18  7:22 Helping with Guix on Hurd: my notes Jan Nieuwenhuizen
2017-04-27  6:25 ` Maxim Cournoyer
2017-04-27  7:22   ` Jan Nieuwenhuizen

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.