1
0
mirror of git://git.2f30.org/morpheus.git synced 2024-06-16 13:18:33 +00:00
morpheus/misc/install-crux
Hiltjo Posthuma f1159c02d4 install-crux: copy core pkg, add more info
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-07-22 22:59:12 +00:00

61 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
# Things you might want to do after setup:
# - use misc/run-chroot to chroot to it.
#
# Properly install packages and install prt-get:
# - cd /pkg/core; for i in *; do pkgadd -f $i; done
# - ports -u
# - prt-get sysup
#
# Setup morpheus building environment:
# - remove gcc, binutils, pkg-config etc packages.
# - remove libraries such as libpng (png-config), these can mess up
# the builds.
# - remove /usr/include or move to /usr/include.old, note that
# python for example uses files from /usr/include/python2.7 at runtime (oh oh).
# - add a separate morpheus user to build stuff.
# - copy static plan9 mk to /bin.
# - prt-get install git.
#
# Links to iso:
# wget http://www.mirrorservice.org/sites/crux.nu/crux/latest/iso/crux-3.0.iso
# wget http://serverop.de/crux/crux-3.1/iso/crux-3.1.iso
set -e -x
iso="crux-3.1.iso"
mnt="/mnt/crux"
root="/ns/crux-3.1"
test x"$1" != x"" && root="$1"
# mount
dev=$(losetup -f)
losetup "${dev}" "${iso}"
mkdir -p "${mnt}"
mount -t iso9660 -o ro "${dev}" "${mnt}"
# install
mkdir -p "${root}"
cd "${root}"
tar -xJf "${mnt}/rootfs.tar.xz"
# copy packages (core only).
mkdir -p "${root}/pkg/"
cp -a "${mnt}/crux/core" "${root}/pkg/"
# make package dir needed by crux.
mkdir -p "${root}/var/lib/pkg"
touch "${root}/var/lib/pkg/db"
# copy etc/resolv.conf
mkdir -p "${root}/etc"
cp /etc/resolv.conf "${root}/etc/resolv.conf"
chmod 644 "${root}/etc/resolv.conf"
# unmount
cd /
umount "${mnt}"
losetup -d "${dev}" || true
# rmdir "${mnt}"