From 019f1ca440fcf2091d65f1b614da3d46de4f7cfc Mon Sep 17 00:00:00 2001 From: Kaj Forney Date: Sun, 28 Oct 2018 23:59:58 -0600 Subject: [PATCH] Testing Aptly stuff... --- modules/parrot-build/auto/config | 4 +- modules/parrot-build/auto/config.bak | 125 ++++++++++++++++++ .../common/archives/csec-archive-keyring.gpg | Bin 0 -> 1440 bytes .../templates/common/archives/csec.key | Bin 0 -> 1440 bytes 4 files changed, 127 insertions(+), 2 deletions(-) create mode 100755 modules/parrot-build/auto/config.bak create mode 100644 modules/parrot-build/templates/common/archives/csec-archive-keyring.gpg create mode 100644 modules/parrot-build/templates/common/archives/csec.key diff --git a/modules/parrot-build/auto/config b/modules/parrot-build/auto/config index a2b5e3d7..cb78b7ad 100755 --- a/modules/parrot-build/auto/config +++ b/modules/parrot-build/auto/config @@ -100,8 +100,8 @@ lb config noauto \ --distribution "$dist" \ --debian-installer-distribution "$dist" \ --archive-areas "main contrib non-free" \ - --debootstrap-options "--include=ca-certificates,parrot-archive-keyring,gnupg --keyring=templates/common/archives/parrot.key" \ - --keyring-packages parrot-archive-keyring \ + --debootstrap-options "--include=ca-certificates,csec-archive-keyring,gnupg --keyring=templates/common/archives/csec.key" \ + --keyring-packages csec-archive-keyring \ --updates false \ --security false \ --backports false \ diff --git a/modules/parrot-build/auto/config.bak b/modules/parrot-build/auto/config.bak new file mode 100755 index 00000000..a2b5e3d7 --- /dev/null +++ b/modules/parrot-build/auto/config.bak @@ -0,0 +1,125 @@ +#!/bin/bash + +set -e +set -o pipefail # Bashism + +parrot_mirror=http://archive.parrotsec.org/parrot +public_mirror=http://archive.parrotsec.org/parrot + +#public_mirror=http://deb.parrotsec.org/parrot + + +# Detect target architecture and filter args +if [ ! $arch ]; then + arch=$(dpkg --print-architecture) +fi +if [ ! $variant ]; then + variant="home" +fi +dist="parrot" +lb_opts="" +while [ $# -gt 0 ]; do + arg="$1" + case "$arg" in + -a|--arch|--architecture|--architectures) + arch="$2" + temp="$temp "'"'"$arg"'"' + temp="$temp "'"'"$2"'"' + shift + ;; + --distribution) + dist="$2" + shift + ;; + --variant) + variant="$2" + shift + ;; + -p|--proposed-updates) + enable_pu="1" + ;; + --) + ;; + *) + temp="$temp "'"'"$arg"'"' + ;; + esac + shift +done +eval set -- "$temp" + +# live-build doesn't work if --parent-debian-distribution is unknown of +# debian-cd => we have to put a symlink so that it deals with kali like sid +if [ ! -e ${LIVE_BUILD:-/usr/share/live/build}/data/debian-cd/$dist ]; then + if [ -w ${LIVE_BUILD:-/usr/share/live/build}/data/debian-cd ]; then + ln -sf sid ${LIVE_BUILD:-/usr/share/live/build}/data/debian-cd/$dist + else + echo "ERROR: Run this first:" + echo "ln -sf sid ${LIVE_BUILD:-/usr/share/live/build}/data/debian-cd/$dist" + exit 1 + fi +fi + +case "$arch" in + amd64) + lb_opts="$lb_opts --binary-images iso-hybrid --architecture amd64 --debian-installer live --linux-flavours amd64" + ;; + i386) + lb_opts="$lb_opts --binary-images iso-hybrid --architecture i386 --debian-installer live --linux-flavours 686-pae" + ;; + 486) + lb_opts="$lb_opts --binary-images iso-hybrid --architecture i386 --debian-installer live --linux-flavours 486" + ;; + armel|armhf|arm64) + lb_opts="$lb_opts --binary-images hdd --binary-filesystem ext4 --chroot-filesystem none" + ;; + *) + echo "WARNING: configuration not tested on arch $arch" >&2 + ;; +esac + +# Setup configuration files from variant and options + +# Drop all files that a former run might have put into place +for file in $(cd config && find . -type f); do + file=${file#./*/} + rm -f config/$file || true +done + +cp -rT templates/common config +[ ! -d templates/parrot-$variant ] || cp -rTL templates/parrot-$variant config + +[ ! $arch ] || sed -i "s/ISO_ARCH/$arch/g" config/includes.binary/isolinux/menu.cfg +[ ! $arch ] || sed -i "s/ISO_ARCH/$arch/g" config/includes.binary/boot/grub/live-theme/theme.txt +[ ! $version ] || sed -i "s/ISO_VERSION/$version/g" config/includes.binary/isolinux/menu.cfg +[ ! $version ] || sed -i "s/ISO_VERSION/$version/g" config/includes.binary/boot/grub/live-theme/theme.txt +[ ! $variant ] || sed -i "s/ISO_TITLE/Parrot $variant/g" config/includes.binary/isolinux/menu.cfg +[ ! $variant ] || sed -i "s/ISO_TITLE/Parrot $variant/g" config/includes.binary/boot/grub/live-theme/theme.txt + +lb config noauto \ + --distribution "$dist" \ + --debian-installer-distribution "$dist" \ + --archive-areas "main contrib non-free" \ + --debootstrap-options "--include=ca-certificates,parrot-archive-keyring,gnupg --keyring=templates/common/archives/parrot.key" \ + --keyring-packages parrot-archive-keyring \ + --updates false \ + --security false \ + --backports false \ + --firmware-binary false \ + --firmware-chroot false \ + --compression xz \ + --mirror-bootstrap "$parrot_mirror" \ + --mirror-chroot "$parrot_mirror" \ + --mirror-debian-installer "$parrot_mirror" \ + --mirror-binary "$public_mirror" \ + --iso-application "Parrot" \ + --iso-publisher "Parrot Project" \ + --iso-volume "ParrotSec" \ + --linux-packages linux-image \ + --bootappend-live "boot=live hostname=parrot splash noautomount" \ + --source false \ + $lb_opts \ + "$@" + +#use overlay instead of aufs as union filesystem support for squashfs +sed -i "s/LB_UNION_FILESYSTEM=\"aufs\"/LB_UNION_FILESYSTEM=\"overlay\"/g" config/chroot diff --git a/modules/parrot-build/templates/common/archives/csec-archive-keyring.gpg b/modules/parrot-build/templates/common/archives/csec-archive-keyring.gpg new file mode 100644 index 0000000000000000000000000000000000000000..d9f4b7cd3da604b4f3372ea6830aa88e66bd02f5 GIT binary patch literal 1440 zcmZQzU{GLWWMJ}kib!Jsg6M1W_k%Eq4FRkTOpIVw9RmZ)I|e2OnI|uV&q`BCimFlg;3`Cvb|MrSoge|D;dslMC@B;PN80k zZGEEB**W`f?R~s&PV>81rd?m_yOg3dE-3_mJhA`Kf^NBa!DbEYS2rxCfFyHr&`OpmgH?-j8># zT=|-*aVF^Yj8kjOpX>e=p1dve^d99^tNiwc6r4BS{MWa3%W)S8kzkLoyM`yEZ@l~< ze0qh-{AFw3AFV6;&-BT*BqRbo9aR@&Tf7vL6|w&(Gm`QMtZWSPF1drIT% zgvgEMK@(J0h%V{2`ne%$xvq}=u33SBTZ@;6_SK_+Z%L z>>Tc?;2iAgte^oVee#nNa}Cw*_}TSW${7<+EOmbWQNc7YXhO*{ zwU#$lub-@9oe^4_>-aJvAh$r+$)W7Tj1>n`Slq2lCnzXzXq#F)eK>OD)~>RgN@43Y zU!AN!pJ$x-_pdx>DjohLJW*p~a>a9b-ao|$ zURnJzab3D%`un)K=bpuNRNvo~oN#RV@&zde|1G&D)718Vn|MyPk?a-ysiND2k6A2S zwxPJQ@QYG!v*(xj8nQme!?TZQH67T0Mk`)@ni}sxpF-{(-a&^ir&~v_%a@8fmv52n z>ZK+6SCvD&$=WGA^P#@5Z0+8geCE&kpJ;7hV_*ix4Z}`Enq4!^eXCxfxLme~%Is&^ z;=CPd{j!S3zAymT+*%RSU)3YUmm+5~iEi;@^AhkZ!`Hk%CvMkq{KBFK(uL&=A zsorSht4ZLKS!93I^$ttuVk6f*59c0yZ{53F;YHw<1$hlyg0>!boS@kmWf||=wBwfh zsh(eHf0F#(N9uWOIePYF@~b5I7dxL`Zb*;Z%o!q~bMToagMLz_smJV#~!&R@T1{P zrwZE=-4K<7PHpc!E191kiP{>Nqp?Ehk5}z4yOPstDc4G7$A(z`PP}}O?>9Kjb~4Jd zNC1-*CoD7K_?7o3SVF<6GG5 zAk`dx|9(}){bzz(W52e&%@)pi6}57UNO9T!4g6uNSWn+nat0JZ)bxOG$mtlHH%fWHUqj;`PJDy}ZjFy$M_C`uxHtHF@JF%2G0U4eikr zZrk@PbWAT^?8g0KbN+Gn3kNtu5BL;(hNYbE0@=prcK_HO?5+8n`TFUSyx5R80ERGI Ai2wiq literal 0 HcmV?d00001 diff --git a/modules/parrot-build/templates/common/archives/csec.key b/modules/parrot-build/templates/common/archives/csec.key new file mode 100644 index 0000000000000000000000000000000000000000..d9f4b7cd3da604b4f3372ea6830aa88e66bd02f5 GIT binary patch literal 1440 zcmZQzU{GLWWMJ}kib!Jsg6M1W_k%Eq4FRkTOpIVw9RmZ)I|e2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