[Top][All Lists]

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

Helping with Guix on Hurd: my notes

From: Jan Nieuwenhuizen
Subject: Helping with Guix on Hurd: my notes
Date: Sat, 18 Feb 2017 08:22:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)


I have just successfully built

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

on Debian/Hurd.  Find my notes below.


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

In his talk @FOSDEM'17

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:
*** Next:

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: -net nic

*** Create additional storage

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

*** Setup fstab: TRAMP /ssh:address@hidden:/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: -net nic -drive file=gnu.img

*** address@hidden Create user

addgroup janneke
adduser janneke janneke
adduser janneke sudo
passwd janneke

*** address@hidden: 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 

*** address@hidden Prepare to build Guix
**** Checkout Guix

    sudo apt-get install git
    mkdir src
    cd src
    git config --global url."git+ssh://".insteadOf gnu:
    git clone gnu:guix.git
    cd guix
    git remote add phant0mas address@hidden: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 
 --strip=2 -C gnu/packages/bootstrap/i586-gnu ./bin/{xz,tar,mkdir,bash}


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

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

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

sudo ./pre-inst-env guix archive --authorize <
mkdir /var/guix

* Do it
** address@hidden 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: -net nic -drive file=gnu.img,cache=writeback

** address@hidden Start daemon
sudo ./pre-inst-env guix-daemon --build-users-group=guixbuild &

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

Jan Nieuwenhuizen <address@hidden> | GNU LilyPond
Freelance IT | Avatar®  

reply via email to

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