libdevuansdk

common library for devuan's simple distro kits
git clone https://git.parazyd.org/libdevuansdk
Log | Files | Refs | Submodules | README | LICENSE

commit ca24af741afcbdc4b803bf73e87157c7c27e1fd4
parent 0cd07161900da9aad7c72ac1816a8406c44ccc5b
Author: Jaromil <jaromil@dyne.org>
Date:   Wed,  8 Jun 2016 19:36:16 +0200

progress on iso making

also more configs and kernel install helper

Diffstat:
Mconfig | 6++++++
Mlibdevuansdk | 2++
Mzlibs/iso | 26++++++++++++++++++--------
Mzlibs/sysconf | 9+++++++++
4 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/config b/config @@ -40,8 +40,13 @@ section="main" # core packages for the system core_packages=(devuan-keyring debian-keyring) +<<<<<<< HEAD core_packages+=(binutils ca-certificates curl) core_packages+=(console-common less nano vim) +======= +core_packages+=(initramfs-tools binutils ca-certificates curl) +core_packages+=(locales console-common less nano vim) +>>>>>>> progress on iso making # base packages for the system base_packages=(bzip2 dialog apt-utils fakeroot e2fsprogs parted) @@ -55,6 +60,7 @@ imgsize=1337 ## libdevuansdk-specific settings workdir="$H/workdir" strapdir="${workdir}/${os}-${release}-${version}" +outdir="$H/builds" # declare zuper globals vars+=(os release version mirror section) diff --git a/libdevuansdk b/libdevuansdk @@ -58,8 +58,10 @@ source $E/config source $R/zlibs/debootstrap source $R/zlibs/helpers source $R/zlibs/imaging +source $R/zlibs/iso source $R/zlibs/sysconf + # conclude initialization if [[ -r $R/zuper/zuper.init ]]; then source $R/zuper/zuper.init diff --git a/zlibs/iso b/zlibs/iso @@ -24,15 +24,15 @@ vars+=(iso isodir) iso_prepare() { - fn iso_prepare + fn iso_prepare $@ req=(strapdir os release version arch) root=$strapdir freq=($strapdir/bin/bash) # freq=($R/chroot/$chroot_arch/$iso/initrd.gz) reqck || return 1 - iso=$os_$release_$version_$arch.iso - isodir=$workdir/iso_$os_$release_$version_$arch + iso=${os}_${release}_${version}_${arch}.iso + isodir=$workdir/iso_${os}_${release}_${version}_${arch} notice "Preparing ISO in $isodir" mkdir -p $isodir @@ -46,7 +46,14 @@ iso_prepare() { } iso_mkinitrd() { - # TODO: mkinitrd here, Katolaz? + fn iso_mkinitrd $@ + req=(iso isodir arch) + freq=($isodir/isolinux.bin) + ckreq || return 1 + + escalate root "chroot $strapdir update-initramfs -c -k all" + cp -v $strapdir/initrd.img $isodir/ + cp -v $strapdir/vmlinuz $isodir/ } iso_mkusr() { @@ -54,15 +61,18 @@ iso_mkusr() { } iso_make() { - fn iso_make - req=(iso isodir) + fn iso_make $@ + req=(iso isodir outdir) freq=($isodir/isolinux.bin) ckreq || return 1 - xorriso -as mkisofs -output $outdir/$iso \ + mkdir -p $outdir + + escalate root " +xorriso -as mkisofs -output $outdir/$iso \ -iso-level 3 -full-iso9660-filenames -r -J -no-emul-boot -boot-load-size 4 \ -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16 \ - -boot-info-table -b isolinux.bin -c boot.cat $isodir + -boot-info-table -b isolinux.bin -c boot.cat $isodir" notice "$iso ready" ls -lh $outdir/$iso diff --git a/zlibs/sysconf b/zlibs/sysconf @@ -23,6 +23,15 @@ ## Default system configuration +conf_install_kernel() { + fn conf_install_kernel + req=(arch strapdir) + freq=($strapdir/bin/bash) + ckreq || return 1 + + escalate root "chroot $strapdir apt-get install linux-image-$arch" +} + conf_print_debconf() { fn conf_print_debconf