[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) |
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: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:127.0.0.1:2223-:22 -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
hurd:var/hurd/gnu/
*** address@hidden 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 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
~/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
** 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:127.0.0.1:2223-:22 -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 http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.nl
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Helping with Guix on Hurd: my notes,
Jan Nieuwenhuizen <=