blob: 9c6bf44a1b3f1026667a907cc3c58fe27c37853f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#!/usr/bin/env bash
# Say Hello to Vasile, a modular script to build Kogaion/Argent Linux packages && ISO images using a clean squashfs + overlayfs chroot
# Main author : Ghiunhan Mamut (aka V3n3RiX) @ RogentOS Development Group
# Dependencies : kernel built with squashfs + overlayfs + loopback support && sys-fs/grub:2 && sys-fs/squashfs-tools && dev-libs/libisoburn && sys-fs/mtools
#
# generic variables
export local releasename="kogaion"
export local releasetarget="desktop"
export local releaseversion="3"
export local kernelver="3.14.50-"$releasename""
export local chrootx64=""$releasename"_"$releaseversion"_core_x64.squashfs"
export local chrootx64md5=""$chrootx64".md5"
# build variables
export local rodir="rodir"
export local rwdir="rwdir"
export local workdir="workdir" # only needed for overlayfs on kernel greather than 3.18
export local overlaydir="overlaydir"
export local chrootuser="root"
export local chroottarget="${@:2}"
export local chrootbuildtarget="emerge -kav "$chroottarget""
export local chroottree="/usr/share/vasile-kogaion/devmod"
export local chrootmainoverlay="layman -f -a "$releasename"-"$releasetarget" -o https://gitlab.com/"$releasename"/"$releasename"-"$releasetarget"/raw/master/overlay.xml"
export local chrootbuildgit="cd /opt && git clone https://gitlab.com/"$releasename"/"$releasename"-build.git"
export local chrootportageconfig="ln -sf /opt/"$releasename"-build/conf/intel/portage /etc/portage"
export local chrootmakeconfx64="ln -sf /opt/"$releasename"-build/conf/intel/portage/make.conf.amd64-devel /etc/portage/make.conf"
export local chrootenvupdate="/usr/sbin/env-update && . /etc/profile"
export local chrootprofile="eselect profile set 1"
# iso variables
export local bootcorepath="/tmp/bootcore"
export local bootcorefiles="/tmp/bootcore/cdroot/boot"
export local isouser="root"
export local isotarget="${@:2}"
export local isoinstalltarget="emerge -Kav "$isotarget""
export local isomainoverlay="layman -f -a "$releasename"-"$releasetarget" -o https://gitlab.com/"$releasename"/"$releasename"-"$releasetarget"/raw/master/overlay.xml"
export local isobuildgit="cd /opt && git clone https://gitlab.com/"$releasename"/"$releasename"-build.git"
export local isoportageconfig="ln -sf /opt/"$releasename"-build/conf/intel/portage /etc/portage"
export local isoenvupdate="/usr/sbin/env-update && . /etc/profile"
export local isoprofile="eselect profile set 1"
export local isodracutcmd="dracut -N -a dmsquash-live -a pollcdrom -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --force --kver "$kernelver""
export local isodracutrd="initramfs-"$kernelver".img"
export local isoeficmd="grub2-mkimage -d /usr/lib64/grub/x86_64-efi -o bootx64.efi -O x86_64-efi ext2 fat udf btrfs ntfs reiserfs xfs hfsplus lvm ata part_msdos part_gpt part_apple bsd search_fs_uuid normal chain iso9660 configfile help loadenv reboot cat search memdisk tar boot linux chain"
export local isomainarchx64="x86_64"
export local isomakeconfx64="ln -sf /opt/"$releasename"-build/conf/intel/portage/make.conf.amd64-user /etc/portage/make.conf"
export local isorootdirx64=""$releasename"-"$releasetarget"-"$releaseversion"-"$isomainarchx64""
export local isokernelnamex64="kernel-genkernel-"$isomainarchx64"-"$kernelver""
export local isostagingdirx64="/tmp/"$isorootdirx64""
export local isosupersquashdirx64=""$isorootdirx64"/CDroot"
export local isolivesqfsdirx64=""$isosupersquashdirx64"/LiveOS"
export local isoliveosdirx64=""$isorootdirx64"/LiveOS"
export local isosyncdirx64=""$isorootdirx64"/rootfs"
export local isobootdirx64=""$isorootdirx64"/boot/grub"
export local isoefibootdirx64=""$isorootdirx64"/efi/boot"
export local dracutrdx64="initramfs-genkernel-"$isomainarchx64"-"$kernelver""
export local dracutcmdx64="dracut -N -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --force --kver "$kernelver" "/boot/"$dracutrdx64"""
source /usr/lib/vasile-kogaion/libvasile-kogaion
case $1 in
--build) source /usr/share/vasile-kogaion/build
;;
--iso) source /usr/share/vasile-kogaion/iso
;;
--help) echo -e ""
echo -e "Usage: vasile-kogaion [options]"
echo -e ""
echo -e "Options:"
echo -e "--build64 : build package/target in a clean x64 squashed core"
echo -e "--iso64 : build x64 iso based on clean squashed core + targets"
echo -e "--help : display this help and exit"
echo -e ""
;;
*) echo -e "error: no operation specified, use --help for help"
;;
esac
exit 0
|