diff --git a/.getopt.sh b/.getopt.sh index 3c2940f..073750f 100644 --- a/.getopt.sh +++ b/.getopt.sh @@ -1,13 +1,18 @@ -# Supported options are: +# Supported options are (from build.sh): # -d | --distribution # -p | --proposed-updates # -a | --arch -# --subdir -# --version -# --variant -# --installer -# --no-clean # -v | --verbose +# -D | --debug # -s | --salt -BUILD_OPTS_SHORT="d:pa:vs" -BUILD_OPTS_LONG="distribution:,proposed-updates,arch:,subdir:,version:,variant:,verbose,salt,installer,no-clean" +# --installer +# --live +# --variant +# --version +# --subdir +# --get-image-path +# --no-clean +# --clean + +BUILD_OPTS_SHORT="d:pa:vDs" +BUILD_OPTS_LONG="distribution:,proposed-updates,arch:,verbose,debug,salt,installer,live,variant:,version:,subdir:,get-image-path,no-clean,clean" diff --git a/.gitignore b/.gitignore index 53e8da0..44c5d8b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,32 @@ -binary.* -prepare.log -binary -images -cache -chroot +# Directories +.build/* +binary/* +binary.*/* +cache/* +chroot/* +config/* +images/* +local/* +simple-cdd/images/* +simple-cdd/tmp/* +# Files +.mirror +build.log +chroot.files chroot.packages.install chroot.packages.live -.mirror -.stage -.lock -.build/ config/binary config/bootstrap config/common config/source -simple-cdd/debian-cd +live-image-*.contents +live-image-*.files +live-image-*.hybrid.iso.zsync +live-image-*.packages +# Overwritten due to build.sh +simple-cdd/debian-cd/* simple-cdd/profiles/kali.downloads -simple-cdd/tmp +# Miscellaneous +.lock +.stage +prepare.log diff --git a/auto/clean b/auto/clean index 8221855..70f1b17 100755 --- a/auto/clean +++ b/auto/clean @@ -1,7 +1,15 @@ #!/bin/sh lb clean noauto "$@" -rm -f config/binary config/bootstrap \ - config/chroot config/common config/source \ - config/package-lists/live.list.chroot -find config/hooks/ -type l | xargs --no-run-if-empty rm -f + +rm -f config/binary \ + config/bootstrap \ + config/chroot \ + config/common \ + config/source \ + config/package-lists/live.list.chroot + +if [ -e config/hooks/ ]; then + find config/hooks/ -type l \ + | xargs --no-run-if-empty rm -f +fi diff --git a/bin/kali-finish-install b/bin/kali-finish-install deleted file mode 100755 index 1aaac7a..0000000 --- a/bin/kali-finish-install +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -# The reference version of this script is maintained in -# live-build-config/bin/kali-finish-install. -# -# It is used in multiple places to finish configuring the target system -# and build.sh copies it where required (in the simple-cdd configuration -# and in the live-build configuration). - -configure_sources_list() { - if grep -q '^deb ' /etc/apt/sources.list; then - echo "INFO: sources.list is configured, everything is fine" - return - fi - - echo "INFO: sources.list is empty, setting up a default one for Kali" - - cat >/etc/apt/sources.list </dev/null; then - echo "WARNING: user '$user' is invalid but /home/$user exists" - continue - fi - echo "$user" - done - echo "root" -} - -configure_zsh() { - if grep -q 'nozsh' /proc/cmdline; then - echo "INFO: user opted out of zsh by default" - return - fi - if [ ! -x /usr/bin/zsh ]; then - echo "INFO: /usr/bin/zsh is not available" - return - fi - for user in $(get_user_list); do - echo "INFO: changing default shell of user '$user' to zsh" - chsh --shell /usr/bin/zsh $user - done -} - -# This is generically named in case we want to add other groups in the future. -configure_usergroups() { - # Create the kaboxer group if needed - addgroup --system kaboxer || true - # Create the wireshark group if needed - addgroup --system wireshark || true - - # kaboxer - for kaboxer - # dialout - for serial access - # wireshark - capture sessions in wireshark - kali_groups="kaboxer,dialout,wireshark" - - for user in $(get_user_list); do - echo "INFO: adding user '$user' to groups '$kali_groups'" - usermod -a -G "$kali_groups" $user || true - done -} - -configure_sources_list -configure_zsh -configure_usergroups diff --git a/build.sh b/build.sh index b2ea340..ae1e1a8 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,11 @@ #!/bin/bash +# If a command fails, make the whole script exit set -e -set -o pipefail # Bashism +# Use return code for any command errors in part of a pipe +set -o pipefail # Bashism +# Kali's default values KALI_DIST="kali-rolling" KALI_VERSION="" KALI_VARIANT="default" @@ -11,6 +14,7 @@ TARGET_DIR="$(dirname $0)/images" TARGET_SUBDIR="" SUDO="sudo" VERBOSE="" +DEBUG="" HOST_ARCH=$(dpkg --print-architecture) image_name() { @@ -24,7 +28,6 @@ image_name() { esac } - live_image_name() { case "$KALI_ARCH" in i386|amd64|arm64) @@ -74,22 +77,24 @@ target_build_log() { default_version() { case "$1" in - kali-*) - echo "${1#kali-}" + kali-*) + echo "${1#kali-}" ;; - *) - echo "$1" + *) + echo "$1" ;; esac } failure() { echo "Build of $KALI_DIST/$KALI_VARIANT/$KALI_ARCH $IMAGE_TYPE image failed (see build.log for details)" >&2 + echo "Log: $BUILD_LOG" >&2 exit 2 } run_and_log() { - if [ -n "$VERBOSE" ]; then + if [ -n "$VERBOSE" ] || [ -n "$DEBUG" ]; then + echo "RUNNING: $@" >&2 "$@" 2>&1 | tee -a $BUILD_LOG else "$@" >>$BUILD_LOG 2>&1 @@ -97,9 +102,32 @@ run_and_log() { return $? } +debug() { + if [ -n "$DEBUG" ]; then + echo "DEBUG: $*" >&2 + fi +} + +clean() { + debug "Cleaning" + + # Live + run_and_log $SUDO lb clean --purge + + # Installer + run_and_log $SUDO rm -rf simple-cdd/tmp + run_and_log $SUDO rm -rf simple-cdd/debian-cd +} + +# Allowed command line options . $(dirname $0)/.getopt.sh -# Parsing command line options +BUILD_LOG=$(pwd)/build.log +debug "BUILD_LOG: $BUILD_LOG" +# Create empty file +: > $BUILD_LOG + +# Parsing command line options (see .getopt.sh) temp=$(getopt -o "$BUILD_OPTS_SHORT" -l "$BUILD_OPTS_LONG,get-image-path" -- "$@") eval set -- "$temp" while true; do @@ -108,25 +136,37 @@ while true; do -p|--proposed-updates) OPT_pu="1"; shift 1; ;; -a|--arch) KALI_ARCH="$2"; shift 2; ;; -v|--verbose) VERBOSE="1"; shift 1; ;; + -D|--debug) DEBUG="1"; shift 1; ;; -s|--salt) shift; ;; --installer) IMAGE_TYPE="installer"; shift 1 ;; + --live) IMAGE_TYPE="live"; shift 1 ;; --variant) KALI_VARIANT="$2"; shift 2; ;; --version) KALI_VERSION="$2"; shift 2; ;; --subdir) TARGET_SUBDIR="$2"; shift 2; ;; --get-image-path) ACTION="get-image-path"; shift 1; ;; + --clean) ACTION="clean"; shift 1; ;; --no-clean) NO_CLEAN="1"; shift 1 ;; --) shift; break; ;; *) echo "ERROR: Invalid command-line option: $1" >&2; exit 1; ;; - esac + esac done # Set default values KALI_ARCH=${KALI_ARCH:-$HOST_ARCH} +if [ "$KALI_ARCH" == "x64" ]; then + KALI_ARCH="amd64" +elif [ "$KALI_ARCH" == "x86" ]; then + KALI_ARCH="i386" +fi +debug "KALI_ARCH: $KALI_ARCH" + if [ -z "$KALI_VERSION" ]; then KALI_VERSION="$(default_version $KALI_DIST)" fi +debug "KALI_VERSION: $KALI_VERSION" # Check parameters +debug "HOST_ARCH: $HOST_ARCH" if [ "$HOST_ARCH" != "$KALI_ARCH" ] && [ "$IMAGE_TYPE" != "installer" ]; then case "$HOST_ARCH/$KALI_ARCH" in amd64/i386|i386/amd64) @@ -140,15 +180,26 @@ fi # Build parameters for lb config KALI_CONFIG_OPTS="--distribution $KALI_DIST -- --variant $KALI_VARIANT" -CODENAME=$KALI_DIST # for simple-cdd/debian-cd +CODENAME=$KALI_DIST # for simple-cdd/debian-cd if [ -n "$OPT_pu" ]; then KALI_CONFIG_OPTS="$KALI_CONFIG_OPTS --proposed-updates" KALI_DIST="$KALI_DIST+pu" fi +debug "KALI_CONFIG_OPTS: $KALI_CONFIG_OPTS" +debug "CODENAME: $CODENAME" +debug "KALI_DIST: $KALI_DIST" # Set sane PATH (cron seems to lack /sbin/ dirs) export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +debug "PATH: $PATH" +if [ -e /etc/debian_version ]; then + debug "OS: $( cat /etc/debian_version )" +else + echo "ERROR: Non Debin-based OS" >&2 +fi + +debug "IMAGE_TYPE: $IMAGE_TYPE" case "$IMAGE_TYPE" in live) if [ ! -d "$(dirname $0)/kali-config/variant-$KALI_VARIANT" ]; then @@ -160,11 +211,14 @@ case "$IMAGE_TYPE" in echo "ERROR: You need live-build (>= 1:20151215kali1), you have $ver_live_build" >&2 exit 1 fi + debug "ver_live_build: $ver_live_build" + ver_debootstrap=$(dpkg-query -f '${Version}' -W debootstrap) if dpkg --compare-versions "$ver_debootstrap" lt "1.0.97"; then echo "ERROR: You need debootstrap (>= 1.0.97), you have $ver_debootstrap" >&2 exit 1 fi + debug "ver_debootstrap: $ver_debootstrap" ;; installer) if [ ! -d "$(dirname $0)/kali-config/installer-$KALI_VARIANT" ]; then @@ -176,11 +230,18 @@ case "$IMAGE_TYPE" in echo "ERROR: You need debian-cd (>= 3.1.28~kali1), you have $ver_debian_cd" >&2 exit 1 fi + debug "ver_debian_cd: $ver_debian_cd" + ver_simple_cdd=$(dpkg-query -f '${Version}' -W simple-cdd) if dpkg --compare-versions "$ver_simple_cdd" lt 0.6.8~kali1; then echo "ERROR: You need simple-cdd (>= 0.6.8~kali1), you have $ver_simple_cdd" >&2 exit 1 fi + debug "ver_simple_cdd: $ver_simple_cdd" + ;; + *) + echo "ERROR: Unsupported IMAGE_TYPE selected ($IMAGE_TYPE)" >&2 + exit 1 ;; esac @@ -193,100 +254,120 @@ if [ "$(whoami)" != "root" ]; then else SUDO="" # We're already root fi +debug "SUDO: $SUDO" +IMAGE_NAME="$(image_name $KALI_ARCH)" +debug "IMAGE_NAME: $IMAGE_NAME" + +debug "ACTION: $ACTION" if [ "$ACTION" = "get-image-path" ]; then echo $(target_image_name $KALI_ARCH) exit 0 fi +if [ "$NO_CLEAN" = "" ]; then + clean +fi +if [ "$ACTION" = "clean" ]; then + exit 0 +fi + cd $(dirname $0) mkdir -p $TARGET_DIR/$TARGET_SUBDIR -IMAGE_NAME="$(image_name $KALI_ARCH)" +# Don't quit on any errors now set +e -BUILD_LOG=$(pwd)/build.log -: > $BUILD_LOG case "$IMAGE_TYPE" in live) - if [ "$NO_CLEAN" = "" ]; then - run_and_log $SUDO lb clean --purge - fi - cp bin/kali-finish-install kali-config/common/includes.installer/ - [ $? -eq 0 ] || failure + debug "Stage 1/2 - Config" run_and_log lb config -a $KALI_ARCH $KALI_CONFIG_OPTS "$@" [ $? -eq 0 ] || failure + + debug "Stage 2/2 - Build" run_and_log $SUDO lb build if [ $? -ne 0 ] || [ ! -e $IMAGE_NAME ]; then failure fi ;; installer) - if [ "$NO_CLEAN" = "" ]; then - run_and_log $SUDO rm -rf simple-cdd/tmp - run_and_log $SUDO rm -rf simple-cdd/debian-cd - fi - - # Setup custom debian-cd to make our changes - cp -aT /usr/share/debian-cd simple-cdd/debian-cd - # Keep 686-pae udebs as we changed the default from 686 - # to 686-pae in the debian-installer images - sed -i -e '/686-pae/d' \ - simple-cdd/debian-cd/data/$CODENAME/exclude-udebs-i386 - # Override some debian-cd environment variables export BASEDIR=$(pwd)/simple-cdd/debian-cd export ARCHES=$KALI_ARCH export ARCH=$KALI_ARCH export DEBVERSION=$KALI_VERSION + debug "BASEDIR: $BASEDIR" + debug "ARCHES: $ARCHES" + debug "ARCH: $ARCH" + debug "DEBVERSION: $DEBVERSION" if [ "$KALI_VARIANT" = "netinst" ]; then - export DISKTYPE="NETINST" + export DISKTYPE="NETINST" else - export DISKTYPE="DVD" + export DISKTYPE="DVD" fi + debug "DISKTYPE: $DISKTYPE" + if [ -e .mirror ]; then - kali_mirror=$(cat .mirror) + kali_mirror=$(cat .mirror) else - kali_mirror=http://archive.kali.org/kali/ + kali_mirror=http://archive.kali.org/kali/ fi if ! echo "$kali_mirror" | grep -q '/$'; then - kali_mirror="$kali_mirror/" + kali_mirror="$kali_mirror/" fi + debug "kali_mirror: $kali_mirror" + + debug "Stage 1/2 - File(s)" + # Setup custom debian-cd to make our changes + run_and_log cp -aT /usr/share/debian-cd simple-cdd/debian-cd + [ $? -eq 0 ] || failure + + # Keep 686-pae udebs as we changed the default from 686 + # to 686-pae in the debian-installer images + run_and_log sed -i -e '/686-pae/d' \ + simple-cdd/debian-cd/data/$CODENAME/exclude-udebs-i386 + [ $? -eq 0 ] || failure # Configure the kali profile with the packages we want - grep -v '^#' kali-config/installer-$KALI_VARIANT/packages \ - >simple-cdd/profiles/kali.downloads + run_and_log grep -v '^#' kali-config/installer-$KALI_VARIANT/packages \ + > simple-cdd/profiles/kali.downloads + [ $? -eq 0 ] || failure + # Tasksel is required in the mirror for debian-cd - echo tasksel >>simple-cdd/profiles/kali.downloads + run_and_log echo "tasksel" >> simple-cdd/profiles/kali.downloads + [ $? -eq 0 ] || failure + # Grub is the only supported bootloader on arm64 # so ensure it's on the iso for arm64. if [ "$KALI_ARCH" = "arm64" ]; then - echo "grub-efi-arm64" >>simple-cdd/profiles/kali.downloads + run_and_log echo "grub-efi-arm64" >> simple-cdd/profiles/kali.downloads + [ $? -eq 0 ] || failure fi - # Update the postinst script - cp bin/kali-finish-install simple-cdd/profiles/kali.postinst - # Run simple-cdd - cd simple-cdd + debug "Stage 2/2 - Build" + cd simple-cdd/ run_and_log build-simple-cdd \ - --verbose \ - --debug \ - --force-root \ - --conf simple-cdd.conf \ - --dist $CODENAME \ - --debian-mirror $kali_mirror + --verbose \ + --debug \ + --force-root \ + --conf simple-cdd.conf \ + --dist $CODENAME \ + --debian-mirror $kali_mirror res=$? - cd .. + cd ../ if [ $res -ne 0 ] || [ ! -e $IMAGE_NAME ]; then failure fi ;; esac +# If a command fails, make the whole script exit set -e -mv $IMAGE_NAME $TARGET_DIR/$(target_image_name $KALI_ARCH) -mv $BUILD_LOG $TARGET_DIR/$(target_build_log $KALI_ARCH) + +debug "Moving files" +run_and_log mv -f $IMAGE_NAME $TARGET_DIR/$(target_image_name $KALI_ARCH) +run_and_log mv -f $BUILD_LOG $TARGET_DIR/$(target_build_log $KALI_ARCH) run_and_log echo -e "\n***\nGENERATED KALI IMAGE: $TARGET_DIR/$(target_image_name $KALI_ARCH)\n***" diff --git a/kali-config/common/bootloaders/grub-pc/config.cfg b/kali-config/common/bootloaders/grub-pc/config.cfg index 9de39f6..02e3e99 100644 --- a/kali-config/common/bootloaders/grub-pc/config.cfg +++ b/kali-config/common/bootloaders/grub-pc/config.cfg @@ -1,3 +1,4 @@ +# Live Image (UEFI boot) set default=0 loadfont $prefix/dejavu-bold-16.pf2 diff --git a/kali-config/common/bootloaders/grub-pc/grub.cfg b/kali-config/common/bootloaders/grub-pc/grub.cfg index 1c2f834..ebe5c20 100644 --- a/kali-config/common/bootloaders/grub-pc/grub.cfg +++ b/kali-config/common/bootloaders/grub-pc/grub.cfg @@ -1,17 +1,18 @@ +# Live Image (UEFI boot) source /boot/grub/config.cfg # Live boot LINUX_LIVE -menuentry "Live system (forensic mode)" { +menuentry "Live (forensic mode)" { linux KERNEL_LIVE APPEND_LIVE noswap noautomount initrd INITRD_LIVE } -menuentry "Live system (persistence, check kali.org/prst)" { +menuentry "Live USB Persistence (check kali.org/prst)" { linux KERNEL_LIVE APPEND_LIVE persistence initrd INITRD_LIVE } -menuentry "Live system (encrypted persistence, check kali.org/prst)" { +menuentry "Live USB Encrypted Persistence (check kali.org/prst)" { linux KERNEL_LIVE APPEND_LIVE persistent=cryptsetup persistence-encryption=luks persistence initrd INITRD_LIVE } @@ -21,12 +22,12 @@ LINUX_INSTALL if [ ! -e /boot/grub/install.cfg ]; then menuentry "Start installer with speech synthesis" { - linux KERNEL_GI speakup.synth=soft APPEND_GI + linux KERNEL_GI speakup.synth=soft APPEND_GI initrd INITRD_GI } fi -submenu 'Advanced options...' { +submenu 'Advanced options' { source /boot/grub/theme.cfg diff --git a/kali-config/common/bootloaders/grub-pc/live-theme/theme.txt b/kali-config/common/bootloaders/grub-pc/live-theme/theme.txt index 28fcc75..ad8b044 100644 --- a/kali-config/common/bootloaders/grub-pc/live-theme/theme.txt +++ b/kali-config/common/bootloaders/grub-pc/live-theme/theme.txt @@ -1,3 +1,4 @@ +# Live Image (UEFI boot) desktop-image: "../splash.png" title-color: "#ffffff" title-font: "DejaVu Sans Bold 16" @@ -25,7 +26,7 @@ terminal-font: "Unifont Regular 16" height = 35 align = "center" color = "#ffffff" - text = "Kali Linux Live Boot Menu" + text = "Kali Linux live menu (UEFI)" font = "DejaVu Sans Bold 16" } diff --git a/kali-config/common/hooks/live/accessibility-menu.binary b/kali-config/common/hooks/live/accessibility-menu.binary deleted file mode 100755 index 56d94b3..0000000 --- a/kali-config/common/hooks/live/accessibility-menu.binary +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ ! -d isolinux ]; then - cd binary -fi - -if ! grep "speakup.synth=soft" isolinux/install.cfg >/dev/null; then -cat >>isolinux/install.cfg <>isolinux/live.cfg < +# Metapackages # You can customize the set of Kali metapackages (groups of tools) to install # For the complete list see: https://tools.kali.org/kali-metapackages +#kali-linux-core +#kali-tools-top10 kali-linux-default -# kali-linux-large -# kali-linux-everything -# kali-tools-top10 +#kali-linux-large +#kali-linux-everything # Graphical desktop kali-desktop-e17 + +# Kali applications +# diff --git a/kali-config/variant-gnome/package-lists/kali.list.chroot b/kali-config/variant-gnome/package-lists/kali.list.chroot index 03c692d..672be48 100644 --- a/kali-config/variant-gnome/package-lists/kali.list.chroot +++ b/kali-config/variant-gnome/package-lists/kali.list.chroot @@ -1,15 +1,19 @@ -# You always want those +# Live image +# You always want these: kali-linux-core kali-desktop-live -# Kali applications -# +# Metapackages # You can customize the set of Kali metapackages (groups of tools) to install # For the complete list see: https://tools.kali.org/kali-metapackages +#kali-linux-core +#kali-tools-top10 kali-linux-default -# kali-linux-large -# kali-linux-everything -# kali-tools-top10 +#kali-linux-large +#kali-linux-everything # Graphical desktop kali-desktop-gnome + +# Kali applications +# diff --git a/kali-config/variant-i3wm/package-lists/kali.list.chroot b/kali-config/variant-i3wm/package-lists/kali.list.chroot index 0cb1002..9d8c491 100644 --- a/kali-config/variant-i3wm/package-lists/kali.list.chroot +++ b/kali-config/variant-i3wm/package-lists/kali.list.chroot @@ -1,15 +1,19 @@ -# You always want those +# Live image +# You always want these: kali-linux-core kali-desktop-live -# Kali applications -# +# Metapackages # You can customize the set of Kali metapackages (groups of tools) to install # For the complete list see: https://tools.kali.org/kali-metapackages +#kali-linux-core +#kali-tools-top10 kali-linux-default -# kali-linux-large -# kali-linux-everything -# kali-tools-top10 +#kali-linux-large +#kali-linux-everything # Graphical desktop kali-desktop-i3 + +# Kali applications +# diff --git a/kali-config/variant-kde/package-lists/kali.list.chroot b/kali-config/variant-kde/package-lists/kali.list.chroot index 2393ed5..a611035 100644 --- a/kali-config/variant-kde/package-lists/kali.list.chroot +++ b/kali-config/variant-kde/package-lists/kali.list.chroot @@ -1,15 +1,19 @@ -# You always want those +# Live image +# You always want these: kali-linux-core kali-desktop-live -# Kali applications -# +# Metapackages # You can customize the set of Kali metapackages (groups of tools) to install # For the complete list see: https://tools.kali.org/kali-metapackages +#kali-linux-core +#kali-tools-top10 kali-linux-default -# kali-linux-large -# kali-linux-everything -# kali-tools-top10 +#kali-linux-large +#kali-linux-everything # Graphical desktop kali-desktop-kde + +# Kali applications +# diff --git a/kali-config/variant-large/package-lists/kali.list.chroot b/kali-config/variant-large/package-lists/kali.list.chroot index 8ba636c..386852a 100644 --- a/kali-config/variant-large/package-lists/kali.list.chroot +++ b/kali-config/variant-large/package-lists/kali.list.chroot @@ -1,15 +1,19 @@ -# You always want those +# Live image +# You always want these: kali-linux-core kali-desktop-live -# Kali applications -# +# Metapackages # You can customize the set of Kali metapackages (groups of tools) to install # For the complete list see: https://tools.kali.org/kali-metapackages -# kali-linux-default +#kali-linux-core +#kali-tools-top10 +#kali-linux-default kali-linux-large -# kali-linux-everything -# kali-tools-top10 +#kali-linux-everything # Graphical desktop kali-desktop-xfce + +# Kali applications +# diff --git a/kali-config/variant-light/package-lists/kali.list.chroot b/kali-config/variant-light/package-lists/kali.list.chroot index bdcb590..da621b2 100644 --- a/kali-config/variant-light/package-lists/kali.list.chroot +++ b/kali-config/variant-light/package-lists/kali.list.chroot @@ -1,10 +1,19 @@ -# You always want those +# Live image +# You always want these: kali-linux-core kali-desktop-live -# Kali applications +# Metapackages # You can customize the set of Kali metapackages (groups of tools) to install # For the complete list see: https://tools.kali.org/kali-metapackages +#kali-linux-core +#kali-tools-top10 +#kali-linux-default +#kali-linux-large +#kali-linux-everything # Graphical desktop kali-desktop-xfce + +# Kali applications +# diff --git a/kali-config/variant-lxde/package-lists/kali.list.chroot b/kali-config/variant-lxde/package-lists/kali.list.chroot index 6efcb0d..599e91b 100644 --- a/kali-config/variant-lxde/package-lists/kali.list.chroot +++ b/kali-config/variant-lxde/package-lists/kali.list.chroot @@ -1,15 +1,19 @@ -# You always want those +# Live image +# You always want these: kali-linux-core kali-desktop-live -# Kali applications -# +# Metapackages # You can customize the set of Kali metapackages (groups of tools) to install # For the complete list see: https://tools.kali.org/kali-metapackages +#kali-linux-core +#kali-tools-top10 kali-linux-default -# kali-linux-large -# kali-linux-everything -# kali-tools-top10 +#kali-linux-large +#kali-linux-everything # Graphical desktop kali-desktop-lxde + +# Kali applications +# diff --git a/kali-config/variant-mate/package-lists/kali.list.chroot b/kali-config/variant-mate/package-lists/kali.list.chroot index fa8613a..b8b9192 100644 --- a/kali-config/variant-mate/package-lists/kali.list.chroot +++ b/kali-config/variant-mate/package-lists/kali.list.chroot @@ -1,15 +1,16 @@ -# You always want those +# Live image +# You always want these: kali-linux-core kali-desktop-live -# Kali applications -# +# Metapackages # You can customize the set of Kali metapackages (groups of tools) to install # For the complete list see: https://tools.kali.org/kali-metapackages +#kali-linux-core +#kali-tools-top10 kali-linux-default -# kali-linux-large -# kali-linux-everything -# kali-tools-top10 +#kali-linux-large +#kali-linux-everything # Graphical desktop kali-desktop-mate @@ -18,3 +19,6 @@ kali-desktop-mate #if DISTRIBUTION moto mate-archive-keyring #endif + +# Kali applications +# diff --git a/kali-config/variant-minimal/.empty b/kali-config/variant-minimal/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/kali-config/variant-xfce/package-lists/kali.list.chroot b/kali-config/variant-xfce/package-lists/kali.list.chroot index c017a59..d08d2d8 100644 --- a/kali-config/variant-xfce/package-lists/kali.list.chroot +++ b/kali-config/variant-xfce/package-lists/kali.list.chroot @@ -1,15 +1,19 @@ -# You always want those +# Live image +# You always want these: kali-linux-core kali-desktop-live -# Kali applications -# +# Metapackages # You can customize the set of Kali metapackages (groups of tools) to install # For the complete list see: https://tools.kali.org/kali-metapackages +#kali-linux-core +#kali-tools-top10 kali-linux-default -# kali-linux-large -# kali-linux-everything -# kali-tools-top10 +#kali-linux-large +#kali-linux-everything # Graphical desktop kali-desktop-xfce + +# Kali applications +# diff --git a/simple-cdd/local_packages/.empty b/simple-cdd/local_packages/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/simple-cdd/profiles/default.downloads b/simple-cdd/profiles/default.downloads deleted file mode 120000 index 024fb11..0000000 --- a/simple-cdd/profiles/default.downloads +++ /dev/null @@ -1 +0,0 @@ -/usr/share/simple-cdd/profiles/default.downloads \ No newline at end of file diff --git a/simple-cdd/profiles/default.excludes b/simple-cdd/profiles/default.excludes deleted file mode 120000 index 0b5629f..0000000 --- a/simple-cdd/profiles/default.excludes +++ /dev/null @@ -1 +0,0 @@ -/usr/share/simple-cdd/profiles/default.excludes \ No newline at end of file diff --git a/simple-cdd/profiles/default.packages b/simple-cdd/profiles/default.packages deleted file mode 100644 index 8bc8527..0000000 --- a/simple-cdd/profiles/default.packages +++ /dev/null @@ -1 +0,0 @@ -# Disable default packages from simple-cdd diff --git a/simple-cdd/profiles/default.preseed b/simple-cdd/profiles/default.preseed deleted file mode 100644 index 75bff77..0000000 --- a/simple-cdd/profiles/default.preseed +++ /dev/null @@ -1,3 +0,0 @@ -# loads the simple-cdd-profiles udeb to which asks for which profiles to use, -# load the debconf preseeding and queue packages for installation. -d-i preseed/early_command string anna-install simple-cdd-profiles diff --git a/simple-cdd/profiles/default.udebs b/simple-cdd/profiles/default.udebs deleted file mode 100644 index ee104d8..0000000 --- a/simple-cdd/profiles/default.udebs +++ /dev/null @@ -1 +0,0 @@ -simple-cdd-profiles diff --git a/simple-cdd/profiles/kali.postinst b/simple-cdd/profiles/kali.postinst deleted file mode 100755 index 462ba03..0000000 --- a/simple-cdd/profiles/kali.postinst +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -# The reference version of this script is maintained in -# live-build-config/bin/kali-finish-install. -# -# It is used in multiple places to finish configuring the target system -# and build.sh copies it where required (in the simple-cdd configuration -# and in the live-build configuration). - -configure_sources_list() { - if grep -q '^deb ' /etc/apt/sources.list; then - echo "INFO: sources.list is configured, everything is fine" - return - fi - - echo "INFO: sources.list is empty, setting up a default one for Kali" - - cat >/etc/apt/sources.list </dev/null; then - echo "WARNING: user '$user' is invalid but /home/$user exists" - continue - fi - echo "$user" - done - echo "root" -} - -configure_zsh() { - if grep -q 'nozsh' /proc/cmdline; then - echo "INFO: user opted out of zsh by default" - return - fi - if [ ! -x /usr/bin/zsh ]; then - echo "INFO: /usr/bin/zsh is not available" - return - fi - for user in $(get_user_list); do - echo "INFO: changing default shell of user '$user' to zsh" - chsh --shell /usr/bin/zsh $user - done -} - -configure_kaboxer() { - # Create the group if needed - addgroup --system kaboxer || true - - # Add the users to the group - for user in $(get_user_list); do - echo "INFO: adding user '$user' to group 'kaboxer'" - adduser $user kaboxer || true - done -} - -configure_sources_list -configure_zsh -configure_kaboxer diff --git a/simple-cdd/profiles/kali.postinst b/simple-cdd/profiles/kali.postinst new file mode 120000 index 0000000..a0e67f7 --- /dev/null +++ b/simple-cdd/profiles/kali.postinst @@ -0,0 +1 @@ +../../kali-config/common/includes.installer/kali-finish-install \ No newline at end of file diff --git a/simple-cdd/simple-cdd.conf b/simple-cdd/simple-cdd.conf index 5d533af..6992657 100644 --- a/simple-cdd/simple-cdd.conf +++ b/simple-cdd/simple-cdd.conf @@ -8,21 +8,20 @@ # Profile Selection # # The following four files get included on the CD if present: -# $profile.preseed +# $profile.preseed # Debconf selections. -# $profile.packages -# Packages to be installed with the profile. Dependencies also will +# $profile.packages +# Packages to be installed with the profile. Dependencies also will # be installed. -# $profile.downloads -# Additional packages to be included on the CD with this profile, but +# $profile.downloads +# Additional packages to be included on the CD with this profile, but # not installed by default. -# $profile.postinst +# $profile.postinst # Post-install script that is run after installing packages. # -# During the install after base system setup, it will give you the +# During the install after base system setup, it will give you the # options to determine which profiles you want to install. - # Profiles to include on the CD #profiles="" #profiles="x-basic ltsp" @@ -111,7 +110,7 @@ local_packages="$(pwd)/local_packages" # Call mirror tools at each build- defaults to true. #do_mirror="false" -# Set your proxy (if any). +# Set your proxy (if any). #export http_proxy=http://localhost:3128 # Location of debian-cd files