# NOTE: This file gets sourced by the actual buildscript - so place it in the same directory as the buildscript or adjust the path in the buildscript. # simple check for apt-cacher-ng being active - if # we have a successful connect on port 3142, assume # it's apt-cacher-ng and use it # if nc -z 127.0.0.1 3142 ; then # bad idea with apt-cacher-ng, but will work with e.g. squid # export https_proxy=http://127.0.0.1:3128/ # export http_proxy=http://127.0.0.1:3128/ # export ftp_proxy=http://127.0.0.1:3128/ export LB_APT_FTP_PROXY=http://127.0.0.1:3142/ export LB_APT_HTTP_PROXY=http://127.0.0.1:3142/ fi # set these to true to save source files #export LB_SOURCE="true" #export LBX2GO_GETSRC="true" # Select ONE of the following git reposities #export LBX2GO_CONFIG='https://gitlab.x2go.org/x2go/live-build-x2go.git::feature/openbox-magic-pixel-workaround-bullseye' export LBX2GO_CONFIG='https://gitlab.x2go.org/x2go/live-build-x2go.git::feature/openbox-magic-pixel-workaround-bookworm' #export LBX2GO_CONFIG='https://gitlab.x2go.org/x2go/live-build-x2go.git::feature/mate-minidesktop-bullseye' #export LBX2GO_CONFIG='https://gitlab.x2go.org/x2go/live-build-x2go.git::feature/mate-minidesktop-bookworm' #export LBX2GO_CONFIG='https://github.com/bauritcs/live-build-x2go.git::feature/openbox-magic-pixel-workaround-bookworm' #export LBX2GO_CONFIG='https://github.com/bauritcs/live-build-x2go.git::feature/openbox-microdesktop-bookworm' #export LBX2GO_CONFIG='https://github.com/bauritcs/live-build-x2go.git::feature/mate-minidesktop-bookworm' # NOTES: 1) https://gitlab.x2go.org/x2go loosely corresponds to "stable" # 2) https://github.com/bauritcs loosely corresponds to "heuler" # 3) Minidesktop builds are work in progress and not production-ready. Cont(r)act us if you need them; feel free to submit patches. # 4) Microdesktop builds are currently only available via https://github.com/bauritcs, but are actually more production-ready than the Minidesktop builds. Feel free to try them out! # 5) Add "-stretch" to the end of the LBX2GO_CONFIG string to create a stretch build, # add "-buster" to the end of the LBX2GO_CONFIG string to create a buster build, # add "-bullseye" to the end of the LBX2GO_CONFIG string to create a bullseye build # add "-bookworm" to the end of the LBX2GO_CONFIG string to create a bookworm build # Select ONE of the following LBX2GO_ARCH lines and comment out the others # (feel free to use long or short options) # for 64-Bit builds, use: export LBX2GO_ARCH='-a amd64 -k amd64' # 32-Bit, larger memory footprint, but faster performance on i686 and newer #export LBX2GO_ARCH='-a i386 -k 686-pae' # 32-Bit, smallest memory footprint - not available on buster # export LBX2GO_ARCH='--architectures i386 --linux-flavours 586' # For ARM (Raspberry Pi): #export LBX2GO_ARCH='-a arm64' #export LBX2GO_ARCH_MODEL='Pi4' # you can also set this to 'Pi3'. Note that there must not be any whitespace between 'Pi' and the digit. # If you want to use the stock ISO image as created by this script, add your boot parameters here # export LBX2GO_BOOTAPPEND_LIVE="boot=live components noswap lang=de vconsole.keymap=de keyboard-layouts=de locales=de_DE.UTF-8 silent quiet pubkey=http://x2go/x2go-tce/config/authorized_keys sessionsurl=http://x2go/x2go-tce/config/sessions toram" export LBX2GO_BOOTAPPEND_LIVE="boot=live components noswap lang=de vconsole.keymap=de keyboard-layouts=de locales=de_DE.UTF-8 silent quiet sessionsurl=https://your_server_here/config/sessions pubkey=https://your_server_here/config/authorized_keys toram " if echo -e "$LBX2GO_CONFIG" | grep -q "minidesktop"; then LBX2GO_BOOTAPPEND_LIVE+='timezone=Europe/Berlin noautologin ' # if you use nottyautologin instead of noautologin, an autologin will be set for the account "user", which conflicts our setting for the account "x2gothinclient" export LBX2GO_BOOTAPPEND_LIVE elif echo -e "$LBX2GO_CONFIG" | grep -q "microdesktop"; then LBX2GO_BOOTAPPEND_LIVE+='timezone=Europe/Berlin ' export LBX2GO_BOOTAPPEND_LIVE elif echo -e "$LBX2GO_CONFIG" | grep -q "openbox"; then LBX2GO_BOOTAPPEND_LIVE+="fastpo " export LBX2GO_BOOTAPPEND_LIVE fi # detect if the selected git repo is meant to build a buster, stretch or jessie image if [ -z "${LBX2GO_CONFIG##*-stretch}" ] ; then export LBX2GO_DEBVERSION="stretch" export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0" elif [ -z "${LBX2GO_CONFIG##*-buster-heuler}" ] ; then export LBX2GO_DEBVERSION="buster" export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0" elif [ -z "${LBX2GO_CONFIG##*-buster-heuler-bpo}" ] ; then export LBX2GO_DEBVERSION="buster" export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0" elif [ -z "${LBX2GO_CONFIG##*-buster}" ] ; then export LBX2GO_DEBVERSION="buster" export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0" elif [ -z "${LBX2GO_CONFIG##*-bullseye}" ] ; then export LBX2GO_DEBVERSION="bullseye" export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0" elif [ -z "${LBX2GO_CONFIG##*-bookworm}" ] ; then export LBX2GO_DEBVERSION="bookworm" export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0" export LBX2GO_ARCHIVE_AREAS="non-free-firmware " else export LBX2GO_DEBVERSION="jessie" fi # newer versions of live-build use the plural form of this parameter if $(LANG=C lb config --help | grep -q bootloaders) ; then export LBX2GO_BOOTLOADERPARAMNAME="--bootloaders" else export LBX2GO_BOOTLOADERPARAMNAME="--bootloader" fi # set boot loader type - leave this unchanged unless you really know what you're doing if echo $LBX2GO_ARCH | awk '{print $2}' | grep -q "arm" ; then # This is part of our experimental ARM support LBX2GO_BOOTLOADERPARAMNAME=" " LBX2GO_BOOTLOADER=" " else export LBX2GO_BOOTLOADER="syslinux" fi # These options are meant to reduce the image size. # Feel free to adapt them after consulting "man lb_config" # FIXME export LBX2GO_SPACE='--apt-indices none export LBX2GO_SPACE='--apt-indices false --apt-recommends false --cache false --checksums none --firmware-binary false --memtest none --win32-loader false' # fixing some peculiarities for Ubuntu here if $(lsb_release -i | grep -i ubuntu -q ) ; then [ -f /usr/lib/live/build/binary_rootfs ] || ln -s /usr/lib/live/build/lb_binary_rootfs /usr/lib/live/build/binary_rootfs export LBX2GO_MIRROR=" -m http://deb.debian.org/debian --mirror-chroot-security http://security.debian.org/debian-security/ --mirror-binary-security http://security.debian.org/debian-security/ --parent-mirror-chroot-security http://security.debian.org/debian-security/ --parent-mirror-binary-security http://security.debian.org/debian-security/" else export LBX2GO_UPDATES="--updates true" fi # These are default values that should not require tuning export LBX2GO_DEFAULTS="--backports true --firmware-chroot true --initsystem sysvinit --security true $LBX2GO_UPDATES $LBX2GO_MIRROR $LBX2GO_BOOTLOADERPARAMNAME $LBX2GO_BOOTLOADER --distribution $LBX2GO_DEBVERSION" # This is part of our experimental ARM support if echo $LBX2GO_ARCH | grep -q 'arm' && ! dpkg --print-architecture | grep -q 'arm' ; then export LBX2GO_DEFAULTS+=" --bootstrap-qemu-arch arm64 \ --bootstrap-qemu-static /usr/bin/qemu-aarch64-static \ --apt-options \"--yes -oAPT::Default-Release=${LBX2GO_DEBVERSION} -oAPT::Immediate-Configure=false\" " fi # This is part of our experimental ARM support # This makes sure the resulting disk image is at least 1GB in size, even though our build currently requires way less. # It's unlikely that anyone will need to boot from a smaller partition; but if we let live-build pick the minimum size automatically, # we will not have enough space left to copy the firmware blobs into the right location. if echo $LBX2GO_ARCH | grep -q 'arm' ; then export LBX2GO_DEFAULTS+=" --binary-filesystem fat32 \ --hdd-size 1024" fi export LBX2GO_ARCHIVE_AREAS="main contrib non-free $LBX2GO_ARCHIVE_AREAS" # This is for minidesktop builds and currently only adds firefox-esr language packs # export LBX2GO_LANG='de' # This is to optimize squashfs size, based on a suggestion by intrigeri from the TAILS team # note that this will permanently change /usr/lib/live/build/binary_rootfs # # if dpkg --print-architecture | grep -q 'arm' || echo $LBX2GO_ARCH | grep -q 'arm' ; then # on arm, these parameters must not be used; if they're there, we need to reinstall the package to undo our patch if grep -q -- '-Xbcj x86 -b 1024K -Xdict-size 1024K' /usr/lib/live/build/binary_rootfs; then apt install --reinstall live-build fi # feel free to experiment with these options, but be prepared for subtle breakage #export MKSQUASHFS_OPTIONS=' -Xbcj arm ' #export MKSQUASHFS_OPTIONS=' -b 1024K -Xdict-size 1024K ' #export MKSQUASHFS_OPTIONS=' -Xbcj arm -b 1024K -Xdict-size 1024K ' export MKSQUASHFS_OPTIONS='' else export MKSQUASHFS_OPTIONS=' -Xbcj x86 -b 1024K -Xdict-size 1024K ' fi # This removes documentation, locales and man pages # You can safely enable this if you intend to run X2GoClient in fullscreen mode all the time, or when building the ssh-only rescue image. # For all other uses of the TCE-Live image creator (i.e. Minidesktop), your results may vary ... use at your own risk. export LBX2GO_TCE_SHRINK="true" # This patches the squashfs file into the initrd. Only parsed when image type "netboot" is set. # Will require boot parameter live-media=/ instead of fetch=... # Both TFTP client and TFTP server must support file transfers >32MB for this to work, if you want to deploy this initrd via TFTP, # so e.g. atftpd will not work - tftpd-hpa, however, seems to have no problem with larger files. # When using iPXE, you can use http instead of TFTP. # This is especially helpful if you want to netboot via http and cannot use the server's IP, but must specify a DNS name - as "fetch=..." only understands IPs. #export LBX2GO_NOSQUASHFS="true" # Select ONE of the following LBX2GO_IMAGETYPE lines and comment out the others # to create an iso image: # export LBX2GO_IMAGETYPE='iso' # to create an iso image that can also be dd'ed to USB media: # export LBX2GO_IMAGETYPE='iso-hybrid' # to create a netboot-image: export LBX2GO_IMAGETYPE='netboot' # /!\ The options below are NOT RECOMMENDED unless you use live-build from Debian Buster/Debian 10 or newer /!\ # to create an image that can be written to a hard disk (for older live-build versions, this always results # in a "build failed" message, even though the build might have worked - use live-build from Buster or newer # and things will work): #export LBX2GO_IMAGETYPE='hdd' ## This might be required for hdd builds, especially for (u)efi #export LBX2GO_BOOTLOADER="syslinux grub-pc grub-efi" # to create a tar file only (seems to be broken in older live-build versions - Buster works): # export LBX2GO_IMAGETYPE='tar' # This is part of our experimental ARM support if echo "$LBX2GO_ARCH" | grep -q "arm" ; then # enforce hdd image for arm at the moment (might need to support netboot later on too) if ! [ "$LBX2GO_IMAGETYPE" = "hdd" ] ; then echo "WARNING: Replacing selected image type with 'hdd'. That's all we currently support on ARM." export LBX2GO_IMAGETYPE="hdd" fi fi if [ "$LBX2GO_IMAGETYPE" = "netboot" ]; then export LBX2GO_DEFAULTS+=" $LBX2GO_BOOTLOADER" fi