Add support for plugins, move all distribution-specific code there

While at it, also change name of local repo to pkgs-for-tmplate (was
yum_repo_qubes).
This commit is contained in:
Marek Marczykowski-Górecki 2015-03-10 04:19:28 +01:00
parent 518b0a39da
commit 3092bb2d71
200 changed files with 32 additions and 3896 deletions

6
.gitignore vendored
View File

@ -1,11 +1,7 @@
*~
appmenus
build_timestamp_*
cache_*
mnt_*
*.iso
*.fs
*.img
install-templates.sh
yum_repo_qubes/*
scripts_fedora/base_rpms_fc21/*
pkgs-for-template/*

View File

@ -3,24 +3,21 @@ $(error "You must set DIST variable, e.g. DIST=fc14")
endif
export DIST
dist_ver := $(shell DIST=$(DIST) ./builder_setup)
DISTRIBUTION := $(word 1,$(dist_ver))
DIST_VERSION := $(word 2,$(dist_ver))
TEMPLATE_NAME := $(word 3,$(dist_ver))
TEMPLATE_BUILDER = 1
-include $(addsuffix /Makefile.builder,$(BUILDER_PLUGINS_DIRS))
ifeq (,$(TEMPLATE_NAME))
TEMPLATE_NAME := $(DISTRIBUTION)-$(DIST_VERSION)-x64
TEMPLATE_NAME := $(DIST)
ifdef TEMPLATE_FLAVOR
TEMPLATE_NAME := $(TEMPLATE_NAME)-$(TEMPLATE_FLAVOR)
endif
endif
# Make sure names are < 32 characters, process aliases
fix_up := $(shell TEMPLATE_NAME=$(TEMPLATE_NAME) ./builder_fix_filenames)
TEMPLATE_NAME := $(word 1,$(fix_up))
export DISTRIBUTION
export TEMPLATE_NAME
export TEMPLATE_SCRIPTS
export DISTRIBUTION
VERSION := $(shell cat version)
TIMESTAMP := $(shell date -u +%Y%m%d%H%M)
@ -32,7 +29,7 @@ help:
prepare:
@echo $(TIMESTAMP) > build_timestamp_$(DIST)
@echo $(TIMESTAMP) > build_timestamp_$(TEMPLATE_NAME)
rpms: prepare rootimg-build
@echo "Building template: $(TEMPLATE_NAME)"
@ -40,7 +37,10 @@ rpms: prepare rootimg-build
./create_template_list.sh || :
rootimg-build:
sudo -E ./prepare_image prepared_images/$(TEMPLATE_NAME).img && \
ifeq (,$(TEMPLATE_SCRIPTS))
$(error Building template $(DIST) not supported by any of configured plugins)
endif
sudo -E ./prepare_image prepared_images/$(TEMPLATE_NAME).img
sudo -E ./qubeize_image prepared_images/$(TEMPLATE_NAME).img $(TEMPLATE_NAME)
update-repo-installer:
@ -48,8 +48,8 @@ update-repo-installer:
ln -f rpm/noarch/qubes-template-$(TEMPLATE_NAME)-$(VERSION)-$(shell cat build_timestamp_$(DIST))*.noarch.rpm $$UPDATE_REPO/rpm
prepare-repo-template:
rm -rf yum_repo_qubes/$(DIST)
mkdir -p yum_repo_qubes/$(DIST)/rpm yum_repo_qubes/$(DIST)/repodata
rm -rf pkgs-for-template/$(DIST)
mkdir -p pkgs-for-template/$(DIST)
clean:
sudo rm -fr qubeized_images/root.img.*

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
nautilus.desktop
firefox.desktop
mozilla-thunderbird.desktop
libreoffice-startcenter.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-prefs.desktop
gpk-update-viewer.desktop
system-config-date.desktop
system-config-printer.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
nautilus.desktop
firefox.desktop
mozilla-thunderbird.desktop
libreoffice-startcenter.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-prefs.desktop
gpk-update-viewer.desktop
system-config-date.desktop
system-config-printer.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,3 +0,0 @@
gnome-terminal.desktop
nautilus.desktop
firefox.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-prefs.desktop
system-config-date.desktop
system-config-printer.desktop

View File

@ -1 +0,0 @@
xterm.desktop

View File

@ -1 +0,0 @@
xterm.desktop

View File

@ -1 +0,0 @@
xterm.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,3 +0,0 @@
gnome-terminal.desktop
nautilus.desktop
firefox.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-prefs.desktop
system-config-date.desktop
system-config-printer.desktop

View File

@ -1 +0,0 @@
xterm.desktop

View File

@ -1 +0,0 @@
xterm.desktop

View File

@ -1 +0,0 @@
xterm.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
org.gnome.Nautilus.desktop
iceweasel.desktop
icedove.desktop
yelp.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,16 +0,0 @@
evolution.desktop
gimp.desktop
yelp.desktop
iceweasel.desktop
eog.desktop
rhythmbox.desktop
gnome-system-log.desktop
gnome-terminal.desktop
gnome-calculator.desktop
org.gnome.Cheese.desktop
org.gnome.Nautilus.desktop
org.gnome.gedit.desktop
shotwell.desktop
org.gnome.Totem.desktop
libreoffice-startcenter.desktop
session-properties.desktop

View File

@ -1,10 +0,0 @@
gdebi.desktop
yelp.desktop
gpk-log.desktop
gpk-prefs.desktop
gpk-update-viewer.desktop
gpk-application.desktop
gnome-printers-panel.desktop
tracker-preferences.desktop
gnome-system-log.desktop
gnome-terminal.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
firefox.desktop
thunderbird.desktop
nautilus.desktop
yelp.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
firefox.desktop
thunderbird.desktop
nautilus.desktop
yelp.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
firefox.desktop
thunderbird.desktop
nautilus.desktop
yelp.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
firefox.desktop
thunderbird.desktop
nautilus.desktop
yelp.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
firefox.desktop
thunderbird.desktop
nautilus.desktop
yelp.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
firefox.desktop
thunderbird.desktop
nautilus.desktop
yelp.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,5 +0,0 @@
gnome-terminal.desktop
iceweasel.desktop
icedove.desktop
nautilus.desktop
yelp.desktop

View File

@ -1,6 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,15 +0,0 @@
gnome-terminal.desktop
gcalctool.desktop
evolution.desktop
nautilus.desktop
iceweasel.desktop
libreoffice-startcenter.desktop
gedit.desktop
gimp.desktop
eog.desktop
totem.desktop
rhythmbox.desktop
gnome-system-log.desktop
cheese.desktop
session-properties.desktop
yelp.desktop

View File

@ -1,11 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
gnome-panel.desktop
gnome-printers-panel.desktop
gnome-system-log.desktop
gdebi.desktop
tracker-preferences.desktop
yelp.desktop

View File

@ -1,16 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop
gateway-firewall30default.desktop
gateway-firewall50user.desktop
gateway-torrc.desktop
gateway-torrcexamples.desktop
gateway-firewall30default.desktop
gateway-firewall50user.desktop
gateway-firsttimesetup.desktop
gateway-torrc.desktop
gateway-torrcexamples.desktop
whonix_repository.desktop

View File

@ -1,10 +0,0 @@
gnome-terminal.desktop
nautilus.desktop
yelp.desktop
gateway-arm.desktop
gateway-reloadfirewall.desktop
gateway-reloadtor.desktop
gateway-restarttor.desktop
gateway-stoptor.desktop
timesync.desktop
whonixcheck.desktop

View File

@ -1,16 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop
gateway-firewall30default.desktop
gateway-firewall50user.desktop
gateway-torrc.desktop
gateway-torrcexamples.desktop
gateway-firewall30default.desktop
gateway-firewall50user.desktop
gateway-firsttimesetup.desktop
gateway-torrc.desktop
gateway-torrcexamples.desktop
whonix_repository.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,14 +0,0 @@
gnome-terminal.desktop
nautilus.desktop
yelp.desktop
anondist-torbrowser.desktop
timesync.desktop
whonixcheck.desktop
whonix-contribute.desktop
whonix-documentation.desktop
whonix-donate.desktop
whonix-featureblog.desktop
whonix-forum.desktop
whonix-importantblog.desktop
whonix-irc-chat-support.desktop
whonix-mailinglist.desktop

View File

@ -1,12 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
yelp.desktop
gnome-panel.desktop
gnome-printers-panel.desktop
gnome-system-log.desktop
tracker-preferences.desktop
anondist-torbrowser_update.desktop
whonix_repository.desktop

View File

@ -1 +0,0 @@
gnome-terminal.desktop

View File

@ -1,22 +0,0 @@
gnome-terminal.desktop
nautilus.desktop
gcalctool.desktop
evolution.desktop
libreoffice-startcenter.desktop
gimp.desktop
eog.desktop
totem.desktop
shotwell.desktop
rhythmbox.desktop
anondist-torbrowser.desktop
timesync.desktop
whonixcheck.desktop
whonix-contribute.desktop
whonix-documentation.desktop
whonix-donate.desktop
whonix-featureblog.desktop
whonix-forum.desktop
whonix-importantblog.desktop
whonix-irc-chat-support.desktop
whonix-mailinglist.desktop
yelp.desktop

View File

@ -1,14 +0,0 @@
gnome-terminal.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gpk-log.desktop
gpk-application.desktop
gpk-update-viewer.desktop
gpk-prefs.desktop
gnome-panel.desktop
gnome-printers-panel.desktop
gnome-system-log.desktop
tracker-preferences.desktop
anondist-torbrowser_update.desktop
yelp.desktop

View File

@ -11,8 +11,6 @@ fi
rpmbuild --target noarch \
--define "template_name $NAME" \
--define "DIST $DIST" \
--define "DISTRIBUTION $DISTRIBUTION" \
--define "VERSION $VERSION" \
--define "_topdir $PWD/rpmbuild" \
--define "_tmppath $PWD/rpmbuild/tmp" \
-bb templates.spec

View File

@ -2,44 +2,14 @@
# Setup env variables
case "$DIST" in
fc*)
DISTRIBUTION=fedora
VERSION=${DIST/fc/}
;;
wheezy)
DISTRIBUTION=debian
VERSION=7
;;
jessie)
DISTRIBUTION=debian
VERSION=8
;;
trusty)
DISTRIBUTION=qubuntu
VERSION=14.04
;;
utopic)
DISTRIBUTION=qubuntu
VERSION=14.10
;;
vivid)
DISTRIBUTION=qubuntu
VERSION=15.04
;;
*)
DISTRIBUTION="$DIST"
VERSION=
;;
esac
if [ -d "scripts_$DIST" ]; then
SCRIPTSDIR="scripts_$DIST"
else
SCRIPTSDIR="scripts_$DISTRIBUTION"
SCRIPTSDIR=$TEMPLATE_SCRIPTS
if [ ! -d "$SCRIPTSDIR" ]; then
echo "Scripts directory $SCRIPTSDIR does not exists"
exit 1
fi
CACHEDIR=cache_$DIST
if [ -z "$CACHEDIR" ]; then
CACHEDIR=cache_$DIST
fi
export SCRIPTSDIR CACHEDIR
echo $DISTRIBUTION $VERSION

Binary file not shown.

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
<comps>
<group>
<id>qubes-vm</id>
<name>Qubes Environment</name>
<default>true</default>
<packagelist>
<packagereq type="mandatory">qubes-core-vm-systemd</packagereq>
<packagereq type="mandatory">qubes-core-vm</packagereq>
<packagereq type="mandatory">qubes-gui-vm</packagereq>
<packagereq type="mandatory">xen-libs</packagereq>
<packagereq type="mandatory">xen-qubes-vm-essentials</packagereq>
<packagereq type="default">qubes-doc-vm</packagereq>
<packagereq type="optional">thunderbird-qubes</packagereq>
<packagereq type="optional">qubes-pdf-converter</packagereq>
<packagereq type="optional">qubes-gpg-split</packagereq>
</packagelist>
</group>
</comps>

View File

@ -10,15 +10,15 @@ RETCODE=0
: ${DIST=fc14}
. ./builder_setup >/dev/null
. ./umount_kill.sh >/dev/null
if [ "${VERBOSE}" -ge 2 -o "${DEBUG}" == "1" ]; then
set -x
else
set -e
fi
. ./builder_setup >/dev/null
. ./umount_kill.sh >/dev/null
if ! [ $# -eq 1 ]; then
echo "usage ${0} <img_file_name>"
exit

View File

@ -78,10 +78,12 @@ export INSTALLDIR=mnt
# ------------------------------------------------------------------------------
echo "--> Choosing appmenus whitelists..."
rm -f appmenus
if [ -d "appmenus_${DIST}_${TEMPLATE_FLAVOR}" ]; then
ln -s "appmenus_${DIST}_${TEMPLATE_FLAVOR}" appmenus
elif [ -d "appmenus_$DIST" ]; then
ln -s "appmenus_$DIST" appmenus
if [ -d "${SCRIPTSDIR}/appmenus_${DIST}_${TEMPLATE_FLAVOR}" ]; then
ln -s "${SCRIPTSDIR}/appmenus_${DIST}_${TEMPLATE_FLAVOR}" appmenus
elif [ -d "${SCRIPTSDIR}/appmenus_$DIST" ]; then
ln -s "${SCRIPTSDIR}/appmenus_$DIST" appmenus
elif [ -d "${SCRIPTSDIR}/appmenus" ]; then
ln -s "${SCRIPTSDIR}/appmenus" appmenus
else
ln -s "appmenus_generic" appmenus
fi
@ -91,17 +93,12 @@ fi
# ------------------------------------------------------------------------------
echo "--> Linking /home to /rw/home..."
mv mnt/home mnt/home.orig
ln -sf /rw/home mnt/home
mkdir mnt/home
echo "--> Linking /usr/local to /rw/usrlocal..."
mv mnt/usr/local mnt/usr/local.orig
ln -sf /rw/usrlocal mnt/usr/local
if [ -e mnt/etc/sysconfig/i18n ]; then
echo "--> Setting up default locale..."
echo LC_CTYPE=en_US.UTF-8 > mnt/etc/sysconfig/i18n
fi
# ------------------------------------------------------------------------------
# Finsh - unmount image
# ------------------------------------------------------------------------------
@ -112,3 +109,4 @@ echo "Qubeized image stored at: $IMG"
echo "Reducing image size (calling cleanup_image)..."
./cleanup_image "$IMG"
chown -R --reference=. qubeized_images/$NAME

View File

@ -1 +0,0 @@
*

View File

@ -1,25 +0,0 @@
#!/bin/sh
ISO_VERSION=`date +%Y.%m`.01
mkdir -p $CACHEDIR
echo "Downloading Archlinux dvd..."
wget -N -P $CACHEDIR "http://mir.archlinux.fr/iso/$ISO_VERSION/archlinux-$ISO_VERSION-dual.iso"
wget -N -P $CACHEDIR "http://mir.archlinux.fr/iso/$ISO_VERSION/archlinux-$ISO_VERSION-dual.iso.sig"
echo "Verifying dvd..."
gpg --import "$SCRIPTSDIR/archlinux-master-keys.asc"
gpg --verify "$CACHEDIR/archlinux-$ISO_VERSION-dual.iso.sig" "$CACHEDIR/archlinux-$ISO_VERSION-dual.iso" || exit
if [ "$CACHEDIR/archlinux-$ISO_VERSION-dual.iso" -nt $CACHEDIR/root-image.fs ]; then
echo "Extracting squash filesystem from DVD..."
mkdir mnt_archlinux_dvd
mount -o loop "$CACHEDIR/archlinux-$ISO_VERSION-dual.iso" mnt_archlinux_dvd || echo "!!Error mounting iso to mnt_archlinux_dvd"
cp mnt_archlinux_dvd/arch/x86_64/airootfs.sfs $CACHEDIR/ || echo "!!Error copying root sfs file to \$CACHEDIR"
umount mnt_archlinux_dvd
mount -o loop $CACHEDIR/airootfs.sfs mnt_archlinux_dvd || echo "!!Error mounting root sfs"
cp mnt_archlinux_dvd/airootfs.img $CACHEDIR/ || echo "!!Error copying root fs file"
umount mnt_archlinux_dvd
rm $CACHEDIR/airootfs.sfs
fi

View File

@ -1,38 +0,0 @@
#!/bin/sh
set -e
echo "Mounting archlinux install system into mnt_archlinux_dvd..."
mkdir -p mnt_archlinux_dvd
mount $CACHEDIR/airootfs.img mnt_archlinux_dvd
echo "Fix bug intruduced in arch-chroot causing arguments not to be passed"
sed "s/unshare --fork --pid//" -i mnt_archlinux_dvd/usr/bin/arch-chroot
echo "Fix chroot cannot be umounted because of gpg-agent started by pacman"
sed "/chroot_umount() {/a pkill gpg-agent" -i mnt_archlinux_dvd/usr/bin/arch-chroot
cat mnt_archlinux_dvd/usr/bin/arch-chroot
echo "Creating chroot bootstrap environment"
mount --bind $INSTALLDIR mnt_archlinux_dvd/mnt
cp /etc/resolv.conf mnt_archlinux_dvd/etc
echo "-> Initializing pacman keychain"
# Note: pacman-key starts gpg-agent automatically, which locks /dev
./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ pacman-key --init
./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ pacman-key --populate
echo "-> Installing core pacman packages..."
./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ sh -c 'pacstrap /mnt base'
echo "--> Removing non required linux kernel (can be added manually through a package)"
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc linux
echo "-> Cleaning up bootstrap environment"
umount mnt_archlinux_dvd/mnt
umount mnt_archlinux_dvd
cp $SCRIPTSDIR/resolv.conf $INSTALLDIR/etc

View File

@ -1,27 +0,0 @@
#!/bin/sh
if [ -n "${TEMPLATE_FLAVOR}" ]; then
PKGLISTFILE="$SCRIPTSDIR/packages_${TEMPLATE_FLAVOR}.list"
if ! [ -r "${PKGLISTFILE}" ]; then
echo "ERROR: ${PKGLISTFILE} does not exists!"
exit 1
fi
else
PKGLISTFILE="$SCRIPTSDIR/packages.list"
fi
set -e
echo "Mounting archlinux install system into mnt_archlinux_dvd..."
mount $CACHEDIR/airootfs.img mnt_archlinux_dvd
echo "Fix bug intruduced in arch-chroot causing arguments not to be passed"
sed "s/unshare --fork --pid//" -i mnt_archlinux_dvd/usr/bin/arch-chroot
PKGGROUPS=`cat $PKGLISTFILE`
echo "-> Installing archlinux package groups..."
echo "-> Selected packages:"
echo "$PKGGROUPS"
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --needed --noconfirm -S $PKGGROUPS
umount mnt_archlinux_dvd

View File

@ -1,77 +0,0 @@
#!/bin/sh
set -e
echo "Mounting archlinux install system into mnt_archlinux_dvd..."
mkdir -p mnt_archlinux_dvd
mount $CACHEDIR/airootfs.img mnt_archlinux_dvd
echo "Fix bug intruduced in arch-chroot causing arguments not to be passed"
sed "s/unshare --fork --pid//" -i mnt_archlinux_dvd/usr/bin/arch-chroot
# Note: Enable x86 repos
su -c "echo '[multilib]' >> $INSTALLDIR/etc/pacman.conf"
su -c "echo 'SigLevel = PackageRequired' >> $INSTALLDIR/etc/pacman.conf"
su -c "echo 'Include = /etc/pacman.d/mirrorlist' >> $INSTALLDIR/etc/pacman.conf"
echo "--> Registering Qubes custom repository"
cat >> $INSTALLDIR/etc/pacman.conf <<EOF
[qubes] # QubesTMP
SigLevel = Optional TrustAll # QubesTMP
Server = file:///mnt/qubes-rpms-mirror-repo/pkgs # QubesTMP
EOF
export CUSTOMREPO=$PWD/yum_repo_qubes/archlinux
mkdir -p $INSTALLDIR/mnt/qubes-rpms-mirror-repo
mount --bind $CUSTOMREPO $INSTALLDIR/mnt/qubes-rpms-mirror-repo
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "cd /mnt/qubes-rpms-mirror-repo/;repo-add pkgs/qubes.db.tar.gz pkgs/*.pkg.tar.xz"
chown -R --reference=$CUSTOMREPO $CUSTOMREPO
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "pacman -Sy"
echo "--> Installing qubes-packages..."
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "pacman -S --noconfirm qubes-vm-xen"
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "pacman -S --noconfirm qubes-vm-core"
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "pacman -S --noconfirm qubes-vm-gui"
echo "--> Updating template fstab file..."
cat >> $INSTALLDIR/etc/fstab <<EOF
/dev/mapper/dmroot / ext4 defaults,noatime 1 1
/dev/xvdb /rw ext4 defaults,noatime 1 2
/dev/xvdc1 swap swap defaults 0 0
/rw/home /home none noauto,bind,defaults 0 0
EOF
echo "--> Configuring system to our preferences"
# Name network devices using simple names (ethX)
ln -s /dev/null $INSTALLDIR/etc/udev/rules.d/80-net-name-slot.rules
# Initialize encoding to qubes standards
ln -s /etc/sysconfig/i18n $INSTALLDIR/etc/locale.conf
# Enable some locales (incl. UTF-8
sed 's/#en_US/en_US/g' -i $INSTALLDIR/etc/locale.gen
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "locale-gen"
# Creating a random file in /lib/modules to ensure that the directory in never deleted when packages are removed
mkdir -p $INSTALLDIR/lib/modules
touch $INSTALLDIR/lib/modules/QUBES
# Ensure os-release is setup correctly or Fedora dracut will fail when displaying the OS
# also ensure that the path is relative, because root is in /newroot before dracut switch root
ln -s ../usr/lib/os-release $INSTALLDIR/etc/os-release
# Disable qubes local repository
sed '/QubesTMP/d' -i $INSTALLDIR/etc/pacman.conf
# Reregistering qubes repository to the remote version
echo "--> Registering Qubes remote repository"
cat >> $INSTALLDIR/etc/pacman.conf <<EOF
[qubes]
Server = http://olivier.medoc.free.fr/archlinux/pkgs/
EOF
echo "--> Cleaning up..."
umount $INSTALLDIR/mnt/qubes-rpms-mirror-repo
umount mnt_archlinux_dvd

View File

@ -1,37 +0,0 @@
#!/bin/sh
set -e
echo "Mounting archlinux install system into mnt_archlinux_dvd..."
mount $CACHEDIR/airootfs.img mnt_archlinux_dvd
echo "Fix bug intruduced in arch-chroot causing arguments not to be passed"
sed "s/unshare --fork --pid//" -i mnt_archlinux_dvd/usr/bin/arch-chroot
echo "--> Starting cleanup actions"
# Remove unused packages and their dependencies (make dependencies)
cleanuppkgs=`./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman -Qdt | grep -v kernel | cut -d " " -f 1`
echo "--> Packages that can be cleaned up: $cleanuppkgs"
if [ -n "$cleanuppkgs" ] ; then
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc $cleanuppkgs
fi
# Remove video plugins
echo "--> Removing video plugins"
VIDEOPKGS=`./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman -Qs -q xf86-video`
echo $VIDEOPKGS | ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc -
# Remove other font package
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc xorg-fonts-100dpi xorg-fonts-75dpi
# Clean pacman cache
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Scc
umount mnt_archlinux_dvd
#rm -f $INSTALLDIR/var/lib/rpm/__db.00* $INSTALLDIR/var/lib/rpm/.rpm.lock
#yum -c $PWD/yum.conf $YUM_OPTS clean packages --installroot=$INSTALLDIR
# Make sure that rpm database has right format (for rpm version in template, not host)
#echo "--> Rebuilding rpm database..."
#chroot `pwd`/mnt /bin/rpm --rebuilddb 2> /dev/null

View File

@ -1,411 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.13 (GNU/Linux)
mQGNBE7Gu3MBDACGmD2FPejnpbdjOxuEDKYmIC1y2SkD1W97KwS9tOSceGy1gni9
uObZsiiiUqzu9p8uOpX0kxdykgk9cliH6QxFQr5e1WOSG6MkkDqYLAjP5kVFnT4T
E6lDklYQ6YW7j3lJVwFDNXV6yobt6ApMHaDGqERpcgs6prKb9wZZ/EdyqBblYTyJ
t0s3RpE5AolNHSboaJZ5YRf5s/T0mteJ37pAIljgXhfeiqxAl1Yp+RkRglaiHLhZ
pcJW2HRACmYv9SYSuLV0JcCAG4qeUyiHSoz93gAaf6VCv5JsYVg2Mwt5rGqE7CXg
XDHV4Klq/KrmaHmp81qpB1ngK1g6cCz34mdnLBMbyt5G2EdrIOiv/bBo5LsXtEhz
C6I/LZ75sXV3xC60+6ZWKkeZFtyXq0g9X5Gxc+wf79K2EVkAC1UwEylK/n8rfP01
vk6fkNJsSb42BEchyECo5iMY2BMGXQ6mlJqpEx3bxE4W1Di01XaT29nB/8hP3xbk
kJ1bu4hMa35sQQEAEQEAAbRIUGllcnJlIFNjaG1pdHogKEFyY2ggTGludXggTWFz
dGVyIEtleSkgPHBpZXJyZUBtYXN0ZXIta2V5LmFyY2hsaW51eC5vcmc+iQG4BBMB
AgAiBQJOxrtzAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAzSIgvasak
wqLMC/9NV/ZY0nhUIZ/8I+U6ez60cr11i4Oq1NtZmNoNta6ER0OXrlunu6h+ZKiH
ET0jva0XS2B5eDBipDY7PHSuF7v2b0MbBR603FVryHrmL4SosJoZ/dC4T8Xr8L9d
k+fY65aIXt0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6Qk2/e0at1jplSeG9dczC6nAlLufr3u
OP4OxbDk+sFwmPm1eZ7qwWoguTTmhHBq8u1qCQ+GMUY9BUS7gTxmOVfIM1ieZ+GD
rLrAK+sPKUuIypJR7p2yrH5FPsYTrUpTnA4e0OkFZ8uwk+m723VE00SsX6k2+K4k
MloWiALRvwFBEiXalOjQ8JJZ5Qom/eudwxGLtwoQn+g0lD5FppMPILTIGz9hPp9N
Y1qXvVh4XOixwBW6wnYzQ/k/7eHgx0HP/N3iTkdnFxF+i4+BPnkfyP6oCFQwx34V
KqO0aJPQecl0TU8MWIOg3RoYG+7lW4keY356iQE1icm8N/1TVJgvPTi7qNLH1MKo
V3FB0o0exwGVWvXlwfOpp9dAz36hil7fdVjkdzfncfiTbK0l0h3zv4SA08bg0WwY
X6h6uJ2DrEByb8H66KdqctrvBJrqeIPDhHtGQgMs/HY2MlGF+2VXls+5njcYGWGz
5DxTas1c+amVpD/7PbpTuT/Xa8EF3Bv6kn193eJwLTdFXQop/n+Z+MOYnIa2oof5
kDhkBn75MUMckZFOFzuq0cMfZ6B48BTboK8ZJJ7QSDWUSqIzeljmaALD1njCisIV
YCzquW0BmPQhV9tmq7hdj4nwPmLOrra2g+f2VwqF30QFBadvtIS1jz8uiQIcBBAB
AgAGBQJOwE4IAAoJEChPw0yOSxol1y4QAIzLUT1v6Ot9m2SyDOXMc6Qk2/e0at1j
plSeG9dczC6nAlLufr3uOP4OxbDk+sFwmPm1eZ7qwWoguTTmhHBq8u1qCQ+GMUY9
BUS7gTxmOVfIM1ieZ+GDrLrAK+sPKUuIypJR7p2yrH5FPsYTrUpTnA4e0OkFZ8uw
k+m723VE00SsX6k2+K4kMloWiALRvwFBEiXalOjQ8JJZ5Qom/eudwxGLtwoQn+g0
lD5FppMPILTIG///////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////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dW/EXGbGpdb
F3OxABEBAAGJAR8EGAECAAkFAk2heeUCGwwACgkQfy1DS5dB6Ky85gf9HtPMsnJI
qizJd5s2oRkpYxPiyLKpq+0lH2R+yPo1Qyt7zpR1SV8iSVDaTiaxfF4BwZQz0Qt0
FnIprzWuIw2FjElE/tVFH+Fw9SW5t31ly+v/jXa+iGcMXIblDX5I0gqffXVJRGzZ
zPQDV0Yv4zyP/2Hsv0F250N2N8/cZqPaX5J0dKrOhDmi5yc5WoYJzzZVzXRuXwzC
ncn0ymZteOGwcaW4kmaTQPb33idmTE89pXnskgQFpftAdvPw9Qf/zjVhTtFX95wt
oNPcYOtMIARp/OejazBHaRW+NIWyCvj78MRoy9s0TOAzwcyOCWpjzHuPvslg/U0H
ErbDGhNsa8/dnA==
=TmI0
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -1 +0,0 @@
NETWORKING=yes

View File

@ -1,25 +0,0 @@
xorg
xterm
python2
artwiz-fonts
ethtool
font-bitstream-speedo
net-tools
sudo
ttf-dejavu
ttf-freefont
wget
zsh
networkmanager
network-manager-applet
linux-firmware
gnome-settings-daemon
gvfs
lxappearance
gtk-engines
firefox
thunderbird
xfce4-terminal
leafpad
thunar
thunar-volman

View File

@ -1,8 +0,0 @@
xorg
xterm
python2
sudo
wget
zsh
ethtool
net-tools

Binary file not shown.

View File

@ -1 +0,0 @@
# This file intentionally left blank

View File

@ -1,82 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
# Source external scripts
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
INSTALLDIR="$(readlink -m mnt)"
# Make sure ${INSTALLDIR} is not mounted
umount_all "${INSTALLDIR}" || true
# ==============================================================================
# Execute any template flavor or sub flavor 'pre' scripts
# ==============================================================================
buildStep "${0}" "pre"
# ==============================================================================
# Use a snapshot of the debootstraped debian image
# ==============================================================================
manage_snapshot() {
local snapshot="${1}"
umount_kill "${INSTALLDIR}" || true
mount -o loop "${IMG}" "${INSTALLDIR}" || exit 1
# Remove old snapshots if groups completed
if [ -e "${INSTALLDIR}/${TMPDIR}/.prepared_groups" ]; then
outputc stout "Removing stale snapshots"
umount_kill "${INSTALLDIR}" || true
rm -rf "${debootstrap_snapshot}"
rm -rf "${packages_snapshot}"
return
fi
outputc stout "Replacing ${IMG} with snapshot ${snapshot}"
umount_kill "${INSTALLDIR}" || true
cp -f "${snapshot}" "${IMG}"
}
# ==============================================================================
# Determine if a snapshot should be used, reuse an existing image or
# delete the existing image to start fresh based on configuration options
#
# SNAPSHOT=1 - Use snapshots; Will remove after successful build
# If debootstrap did not complete, the existing image will be deleted
# ==============================================================================
splitPath "${IMG}" path_parts
packages_snapshot="${path_parts[dir]}${path_parts[base]}-packages${path_parts[dotext]}"
debootstrap_snapshot="${path_parts[dir]}${path_parts[base]}-debootstrap${path_parts[dotext]}"
if [ -f "${IMG}" ]; then
if [ -f "${packages_snapshot}" -a "${SNAPSHOT}" == "1" ]; then
# Use 'packages' snapshot
manage_snapshot "${packages_snapshot}"
elif [ -f "${debootstrap_snapshot}" -a "${SNAPSHOT}" == "1" ]; then
# Use 'debootstrap' snapshot
manage_snapshot "${debootstrap_snapshot}"
else
# Use '$IMG' if debootstrap did not fail
mount -o loop "${IMG}" "${INSTALLDIR}" || exit 1
# Assume a failed debootstrap installation if .prepared_debootstrap does not exist
if [ -e "${INSTALLDIR}/${TMPDIR}/.prepared_debootstrap" ]; then
debug "Reusing existing image ${IMG}"
else
outputc stout "Removing stale or incomplete ${IMG}"
umount_kill "${INSTALLDIR}" || true
rm -f "${IMG}"
fi
# Umount image; don't fail if its already umounted
umount_kill "${INSTALLDIR}" || true
fi
fi
# ==============================================================================
# Execute any template flavor or sub flavor 'post' scripts
# ==============================================================================
buildStep "${0}" "post"

View File

@ -1,61 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
# Source external scripts
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### '-------------------------------------------------------------------------
debug ' Installing base system using debootstrap'
##### '-------------------------------------------------------------------------
# ==============================================================================
# Execute any template flavor or sub flavor 'pre' scripts
# ==============================================================================
buildStep "${0}" "pre"
if ! [ -f "${INSTALLDIR}/${TMPDIR}/.prepared_debootstrap" ]; then
#### "------------------------------------------------------------------
info " $(templateName): Installing base '${DISTRIBUTION}-${DIST}' system"
#### "------------------------------------------------------------------
COMPONENTS="" debootstrap \
--arch=amd64 \
--include="ncurses-term locales tasksel" \
--components=main \
--keyring="${SCRIPTSDIR}/keys/${DIST}-${DISTRIBUTION}-archive-keyring.gpg" \
"${DIST}" "${INSTALLDIR}" "${DEBIAN_MIRROR}" || {
error "Debootstrap failed!";
exit 1;
}
#### '----------------------------------------------------------------------
info ' Configure keyboard'
#### '----------------------------------------------------------------------
configureKeyboard
#### '----------------------------------------------------------------------
info ' Update locales'
#### '----------------------------------------------------------------------
updateLocale
#### '----------------------------------------------------------------------
info 'Link mtab'
#### '----------------------------------------------------------------------
chroot rm -f /etc/mtab
chroot ln -s /proc/self/mounts /etc/mtab
# TMPDIR is set in vars. /tmp should not be used since it will be cleared
# if building template with LXC contaniners on a reboot
mkdir -p "${INSTALLDIR}/${TMPDIR}"
# Mark section as complete
touch "${INSTALLDIR}/${TMPDIR}/.prepared_debootstrap"
# If SNAPSHOT=1, Create a snapshot of the already debootstraped image
createSnapshot "debootstrap"
fi
# ==============================================================================
# Execute any template flavor or sub flavor 'post' scripts
# ==============================================================================
buildStep "${0}" "post"

View File

@ -1,84 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### "=========================================================================
debug " Configuring and Installing packages for ${DIST}"
##### "=========================================================================
# If .prepared_debootstrap has not been completed, don't continue
exitOnNoFile "${INSTALLDIR}/${TMPDIR}/.prepared_debootstrap" "prepared_debootstrap installataion has not completed!... Exiting"
# Create system mount points
prepareChroot
# Make sure there is a resolv.conf with network of this AppVM for building
createResolvConf
# ==============================================================================
# Execute any template flavor or sub flavor 'pre' scripts
# ==============================================================================
buildStep "${0}" "pre"
# ==============================================================================
# Configure base system and install any adddtional packages which could
# include +TEMPLATE_FLAVOR such as gnome as set in configuration file
# ==============================================================================
if ! [ -f "${INSTALLDIR}/${TMPDIR}/.prepared_groups" ]; then
#### '----------------------------------------------------------------------
info ' Trap ERR and EXIT signals and cleanup (umount)'
#### '----------------------------------------------------------------------
trap cleanup ERR
trap cleanup EXIT
#### '----------------------------------------------------------------------
info 'Install standard Debian packages'
#### '----------------------------------------------------------------------
if ! [ -f "${INSTALLDIR}/${TMPDIR}/.debian_packages" ]; then
packages="$(chroot tasksel --new-install --task-packages standard)"
aptInstall ${packages}
touch "${INSTALLDIR}/${TMPDIR}/.debian_packages"
fi
#### '----------------------------------------------------------------------
info ' Distribution specific steps (install systemd, add sources, etc)'
#### '----------------------------------------------------------------------
buildStep "$0" "${DIST}"
#### '----------------------------------------------------------------------
info " Installing extra packages in script_${DIST}/packages.list file"
#### '----------------------------------------------------------------------
installPackages
createSnapshot "packages"
touch "${INSTALLDIR}/${TMPDIR}/.prepared_packages"
#### '----------------------------------------------------------------------
info ' Execute any template flavor or sub flavor scripts after packages are installed'
#### '----------------------------------------------------------------------
buildStep "$0" "packages_installed"
#### '----------------------------------------------------------------------
info ' apt-get dist-upgrade'
#### '----------------------------------------------------------------------
aptDistUpgrade
#### '----------------------------------------------------------------------
info ' Cleanup'
#### '----------------------------------------------------------------------
touch "${INSTALLDIR}/${TMPDIR}/.prepared_groups"
trap - ERR EXIT
trap
fi
# ==============================================================================
# Execute any template flavor or sub flavor 'post' scripts
# ==============================================================================
buildStep "${0}" "post"
# ==============================================================================
# Kill all processes and umount all mounts within ${INSTALLDIR}, but not
# ${INSTALLDIR} itself (extra '/' prevents ${INSTALLDIR} from being umounted)
# ==============================================================================
umount_all "${INSTALLDIR}/" || true

View File

@ -1,36 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### "=========================================================================
debug " Installing custom packages and customizing ${DIST}"
##### "=========================================================================
#### '--------------------------------------------------------------------------
info ' Adding contrib, non-free and Debian security to repository.'
#### '--------------------------------------------------------------------------
updateDebianSourceList
aptUpdate
##### '=========================================================================
debug ' Replacing sysvinit with systemd'
##### '=========================================================================
#### '--------------------------------------------------------------------------
info ' Remove sysvinit'
#### '--------------------------------------------------------------------------
aptRemove sysvinit
#### '--------------------------------------------------------------------------
info ' Install Systemd'
#### '--------------------------------------------------------------------------
aptUpdate
aptInstall systemd-sysv
#### '--------------------------------------------------------------------------
info ' Set multu-user.target as the default target (runlevel 3)'
#### '--------------------------------------------------------------------------
chroot rm -f /etc/systemd/system/default.target
chroot ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

View File

@ -1,89 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### "=========================================================================
debug " Installing custom packages and customizing ${DIST}"
##### "=========================================================================
#### '--------------------------------------------------------------------------
info ' Adding contrib, non-free and Debian security to repository.'
#### '--------------------------------------------------------------------------
updateDebianSourceList
#### '----------------------------------------------------------------------
info ' Adding wheezy backports repository.'
#### '----------------------------------------------------------------------
source="deb ${DEBIAN_MIRROR} wheezy-backports main"
if ! grep -r -q "$source" "${INSTALLDIR}/etc/apt/sources.list"*; then
touch "${INSTALLDIR}/etc/apt/sources.list"
echo "$source" >> "${INSTALLDIR}/etc/apt/sources.list"
fi
aptUpdate
##### '=========================================================================
debug ' Replace sysvinit with systemd'
##### '=========================================================================
#### '----------------------------------------------------------------------
info ' Remove sysvinit'
#### '----------------------------------------------------------------------
echo 'Yes, do as I say!' | aptRemove sysvinit
#### '----------------------------------------------------------------------
info ' Preventing sysvinit re-installation'
#### '----------------------------------------------------------------------
chroot apt-mark hold sysvinit
#### '----------------------------------------------------------------------
info ' Pin sysvinit to prevent being re-installed'
#### '----------------------------------------------------------------------
cat > "${INSTALLDIR}/etc/apt/preferences.d/qubes_sysvinit" <<EOF
Package: sysvinit
Pin: version *
Pin-Priority: -100
EOF
chmod 0644 "${INSTALLDIR}/etc/apt/preferences.d/qubes_sysvinit"
#### '----------------------------------------------------------------------
info ' Install Systemd'
#### '----------------------------------------------------------------------
aptUpdate
aptInstall systemd-sysv
#### '----------------------------------------------------------------------
info ' Set multu-user.target as the default target (runlevel 3)'
#### '----------------------------------------------------------------------
chroot rm -f /etc/systemd/system/default.target
chroot ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
# ==============================================================================
# Install backports
#
# NOTE: This needs to be done after systemd has been installed or risk backport
# being un-installed
# ==============================================================================
#### '----------------------------------------------------------------------
info ' Installing init-system-helpers'
#### '----------------------------------------------------------------------
aptUpdate
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
chroot apt-get ${APT_GET_OPTIONS} -t wheezy-backports install init-system-helpers
#### '----------------------------------------------------------------------
info ' Installing pulseaudo backport'
#### '----------------------------------------------------------------------
# /usr/lib/pulse-4.0/modules/
# start-pulseaudio-with-vchan
#DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
# chroot apt-get ${APT_GET_OPTIONS} -t wheezy-backports install pulseaudio \
# libpulse0 \
# pulseaudio-utils \
# libpulse-mainloop-glib0 \
# pulseaudio-module-x11

View File

@ -1,61 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### '-------------------------------------------------------------------------
debug ' Installing Qubes packages'
##### '-------------------------------------------------------------------------
# If .prepared_debootstrap has not been completed, don't continue
exitOnNoFile "${INSTALLDIR}/${TMPDIR}/.prepared_groups" "prepared_groups installataion has not completed!... Exiting"
# Create system mount points
prepareChroot
# ==============================================================================
# Execute any template flavor or sub flavor 'pre' scripts
# ==============================================================================
buildStep "${0}" "pre"
if ! [ -f "${INSTALLDIR}/${TMPDIR}/.prepared_qubes" ]; then
#### '----------------------------------------------------------------------
info ' Trap ERR and EXIT signals and cleanup (umount)'
#### '----------------------------------------------------------------------
trap cleanup ERR
trap cleanup EXIT
#### '----------------------------------------------------------------------
info ' Install Qubes packages listed in packages_qubes.list file(s)'
#### '----------------------------------------------------------------------
installQubesRepo
aptUpdate
installPackages packages_qubes.list
uninstallQubesRepo
#### '----------------------------------------------------------------------
info ' Re-update locales'
# Locales get reset during package installation sometimes
#### '----------------------------------------------------------------------
updateLocale
#### '----------------------------------------------------------------------
info ' Cleanup'
#### '----------------------------------------------------------------------
umount_all "${INSTALLDIR}/" || true
touch "${INSTALLDIR}/${TMPDIR}/.prepared_qubes"
trap - ERR EXIT
trap
fi
# ==============================================================================
# Execute any template flavor or sub flavor 'post' scripts
# ==============================================================================
buildStep "${0}" "post"
# ==============================================================================
# Kill all processes and umount all mounts within ${INSTALLDIR}, but not
# ${INSTALLDIR} itself (extra '/' prevents ${INSTALLDIR} from being umounted)
# ==============================================================================
umount_all "${INSTALLDIR}/" || true

View File

@ -1,27 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### '=========================================================================
debug ' Cleaning up...'
##### '=========================================================================
# ==============================================================================
# Execute any template flavor or sub flavor 'pre' scripts
# ==============================================================================
buildStep "${0}" "pre"
#### '-------------------------------------------------------------------------
info ' Cleaning up any left over files from installation'
#### '-------------------------------------------------------------------------
rm -rf "${INSTALLDIR}/var/cache/apt/archives"
rm -f "${INSTALLDIR}/etc/apt/sources.list.d/qubes-builder.list"
rm -f "${INSTALLDIR}/etc/apt/trusted.gpg.d/qubes-builder.gpg"
rm -rf "${INSTALLDIR}/${TMPDIR}"
# ==============================================================================
# Execute any template flavor or sub flavor 'post' scripts
# ==============================================================================
buildStep "${0}" "post"

View File

@ -1,75 +0,0 @@
issues
------
Think it makes most sense to run whonix setup right after qubes, then whonix can install qubes-whonix last.
hook into bfore qubes removes its links to repo
installing whonix after qubes-whonix; wq thinks its a template; tries to use proxy. Need to add
a chroot option maybe' touch /var/run/qubes/qubes-service/choot and ignore everything; maybe even
in postinit? -- gotta be sure IP addresses don't get changed
tests
-----
test all the vms listed below plus make sure each works with:
- netvm
- proxyvm
- sound
- notifications
NOTE: Backup EXISTING jessie-gnome; its what I use for web access!
Make a special version name; test with that and copy my root.img to it after test as my future template to keep
wheezy
wheezy+gnome
jessie
jessie+gnome
whonix-gateway
whonix-workstation
# Before building ubuntu again; combine code base again
trusty
trusty+gnome
utopic
utopic+gnome
test qubes-whonix package update... at first just add a local file base repo in appvm
ubuntu fixups
-------------
network manager
application menus
- can I convert the hvm? -- or install real ubuntu from live but automated?
- combine codebase of ubuntu / debian
whonix fixups
-------------
move code to qhonix-qubes that can go there
see if I can get rid of grub yet with new APT-opts command
review all snapshot code; remove remerences to /run; swap with tmp
todo
----
add firfox, etc to installed apps like fedora has - gnome only build; keep minimum debian builds
flashplayer
mirror list
automated test? build, deploy to dom0, install guest + appvm, run some tests in appvm
add in qubes-apps-linux-* during qubes-setup; maybe need to remove thunderbird?
duplicate 01proxy
fix the gui-linux commmit
restore dash -- fix any qubes scripts to use dash or indicated they need bash
fix any qubes scripts that use sysconfig; since we dont
condsider
---------
salt module; maybe can use for tests
merge
-----
merge to debian first
then from debian to master
then from master to ubuntu -- rebase whonix again

View File

@ -1,385 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source ./functions.sh >/dev/null
source ./umount_kill.sh >/dev/null
setVerboseMode
output "${bold}${under}INFO: ${SCRIPTSDIR}/distribution.sh imported by: ${0}${reset}"
# ==============================================================================
# Cleanup function
# ==============================================================================
function cleanup() {
errval=$?
trap - ERR EXIT
trap
error "${1:-"${0}: Error. Cleaning up and un-mounting any existing mounts"}"
umount_all || true
# Return xtrace to original state
[[ -n "${XTRACE}" ]] && [[ "${XTRACE}" -eq 0 ]] && set -x || set +x
exit $errval
}
# ==============================================================================
# If .prepared_debootstrap has not been completed, don't continue
# ==============================================================================
function exitOnNoFile() {
file="${1}"
message="${2}"
if ! [ -f "${file}" ]; then
error "${message}"
umount_all || true
exit 1
fi
}
# ==============================================================================
# Umount everthing within INSTALLDIR or $1 but kill all processes within first
# ==============================================================================
function umount_all() {
directory="${1:-"${INSTALLDIR}"}"
# Only remove dirvert policies, etc if base INSTALLDIR mount is being umounted
if [ "${directory}" == "${INSTALLDIR}" -o "${directory}" == "${INSTALLDIR}/" ]; then
if [ -n "$(mountPoints)" ]; then
removeDbusUuid
removeDivertPolicy
fi
fi
umount_kill "${directory}" || true
}
# ==============================================================================
# Create snapshot
# ==============================================================================
function createSnapshot() {
snapshot_name="${1}"
if [ "${SNAPSHOT}" == "1" ]; then
splitPath "${IMG}" path_parts
snapshot_path="${path_parts[dir]}${path_parts[base]}-${snapshot_name}${path_parts[dotext]}"
# create snapshot
info "Creating snapshot of ${IMG} to ${snapshot_path}"
sync
cp -f "${IMG}" "${snapshot_path}"
fi
}
# ==============================================================================
# Create DBUS uuid
# ==============================================================================
function createDbusUuid() {
outputc green "Creating DBUS uuid..."
removeDbusUuid
if [ -e "${INSTALLDIR}/bin/dbus-uuidgen" ]; then
chroot dbus-uuidgen --ensure 1>/dev/null 2>&1
fi
}
# ==============================================================================
# Remove DBUS uuid
# ==============================================================================
function removeDbusUuid() {
if [ -e "${INSTALLDIR}"/var/lib/dbus/machine-id ]; then
outputc red "Removing generated machine uuid..."
rm -f "${INSTALLDIR}/var/lib/dbus/machine-id"
fi
}
# ==============================================================================
# Set up a temporary dpkg-divert policy to prevent apt from starting services
# on package installation
# ==============================================================================
function addDivertPolicy() {
outputc green "Deactivating initctl..."
chroot dpkg-divert --local --rename --add /sbin/initctl || true
# utopic systemd install still broken...
outputc green "Hacking invoke-rc.d to ignore missing init scripts..."
chroot sed -i -e "s/exit 100/exit 0 #exit 100/" /usr/sbin/invoke-rc.d
}
# ==============================================================================
# Remove temporary dpkg-divert policy
# ==============================================================================
function removeDivertPolicy() {
outputc red "Reactivating initctl..."
chroot dpkg-divert --local --rename --remove /sbin/initctl || true
outputc red "Restoring invoke-rc.d..."
chroot sed -i -e "s/exit 0 #exit 100/exit 100/" /usr/sbin/invoke-rc.d
}
# ==============================================================================
# Create system mount points
# ==============================================================================
function prepareChroot() {
# Make sure nothing is mounted within $INSTALLDIR
umount_kill "${INSTALLDIR}/"
mount -t tmpfs none "${INSTALLDIR}/run"
if [ "${SYSTEMD_NSPAWN_ENABLE}" != "1" ]; then
mount -t proc proc "${INSTALLDIR}/proc"
mount -t sysfs sys "${INSTALLDIR}/sys"
fi
createDbusUuid
addDivertPolicy
}
# ==============================================================================
# apt-get upgrade
# ==============================================================================
function aptUpgrade() {
aptUpdate
DEBIAN_FRONTEND="noninteractive" DEBIAN_PRIORITY="critical" DEBCONF_NOWARNINGS="yes" \
chroot env APT_LISTCHANGES_FRONTEND=none apt-get dist-upgrade -u -y --force-yes
}
# ==============================================================================
# apt-get dist-upgrade
# ==============================================================================
function aptDistUpgrade() {
aptUpdate
DEBIAN_FRONTEND="noninteractive" DEBIAN_PRIORITY="critical" DEBCONF_NOWARNINGS="yes" \
chroot env APT_LISTCHANGES_FRONTEND=none apt-get dist-upgrade -u -y --force-yes
}
# ==============================================================================
# apt-get update
# ==============================================================================
function aptUpdate() {
debug "Updating system"
DEBIAN_FRONTEND="noninteractive" DEBIAN_PRIORITY="critical" DEBCONF_NOWARNINGS="yes" \
chroot apt-get update
}
# ==============================================================================
# apt-get remove
# ==============================================================================
function aptRemove() {
files="$@"
DEBIAN_FRONTEND="noninteractive" DEBIAN_PRIORITY="critical" DEBCONF_NOWARNINGS="yes" \
chroot apt-get ${APT_GET_OPTIONS} remove ${files[@]}
}
# ==============================================================================
# apt-get install
# ==============================================================================
function aptInstall() {
files="$@"
DEBIAN_FRONTEND="noninteractive" DEBIAN_PRIORITY="critical" DEBCONF_NOWARNINGS="yes" \
chroot apt-get ${APT_GET_OPTIONS} install ${files[@]}
}
# ==============================================================================
# Install extra packages in script_${DIST}/packages.list file
# -and / or- TEMPLATE_FLAVOR directories
# ==============================================================================
function installPackages() {
if [ -n "${1}" ]; then
# Locate packages within sub dirs
if [ ${#@} == "1" ]; then
getFileLocations packages_list "${1}" ""
else
packages_list="$@"
fi
else
getFileLocations packages_list "packages.list" "${DIST}"
if [ -z "${packages_list}" ]; then
error "Can not locate a package.list file!"
umount_all || true
exit 1
fi
fi
for package_list in ${packages_list[@]}; do
debug "Installing extra packages from: ${package_list}"
declare -a packages
readarray -t packages < "${package_list}"
info "Packages: "${packages[@]}""
aptInstall "${packages[@]}" || return $?
done
}
# ==============================================================================
# Install Systemd
# ==============================================================================
function installSystemd() {
buildStep "$0" "pre-systemd"
chroot apt-get update
aptInstall systemd
createDbusUuid
# Set multi-user.target as default target
chroot rm -f /etc/systemd/system/default.target
chroot ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
# XXX: TEMP lets see how stuff work with upstart in control for now
# Boot using systemd
chroot rm -f /sbin/init
chroot ln -sf /lib/systemd/systemd /sbin/init
buildStep "$0" "post-systemd"
}
# ==============================================================================
# ------------------------------------------------------------------------------
# C O N F I G U R A T I O N R E L A T E D
# ------------------------------------------------------------------------------
# ==============================================================================
# ==============================================================================
# Add universe to sources.list
# ==============================================================================
function updateDebianSourceList() {
# Add contrib and non-free component to repository
touch "${INSTALLDIR}/etc/apt/sources.list"
sed -i "s/${DIST} main$/${DIST} main contrib non-free/g" "${INSTALLDIR}/etc/apt/sources.list"
# Add Debian security repositories
source="deb http://security.debian.org ${DEBIANVERSION}/updates main"
if ! grep -r -q "$source" "${INSTALLDIR}/etc/apt/sources.list"*; then
touch "${INSTALLDIR}/etc/apt/sources.list"
echo "$source" >> "${INSTALLDIR}/etc/apt/sources.list"
fi
source="deb-src http://security.debian.org ${DEBIANVERSION}/updates main"
if ! grep -r -q "$source" "${INSTALLDIR}/etc/apt/sources.list"*; then
touch "${INSTALLDIR}/etc/apt/sources.list"
echo "$source" >> "${INSTALLDIR}/etc/apt/sources.list"
fi
}
# ==============================================================================
# Add universe to sources.list
# ==============================================================================
function updateQubuntuSourceList() {
sed -i "s/${DIST} main$/${DIST} main universe multiverse restricted/g" "${INSTALLDIR}/etc/apt/sources.list"
source="deb http://archive.canonical.com/ubuntu ${DIST} partner"
if ! grep -r -q "$source" "${INSTALLDIR}/etc/apt/sources.list"*; then
touch "${INSTALLDIR}/etc/apt/sources.list"
echo "$source" >> "${INSTALLDIR}/etc/apt/sources.list"
fi
source="deb-src http://archive.canonical.com/ubuntu ${DIST} partner"
if ! grep -r -q "$source" "${INSTALLDIR}/etc/apt/sources.list"*; then
touch "${INSTALLDIR}/etc/apt/sources.list"
echo "$source" >> "${INSTALLDIR}/etc/apt/sources.list"
fi
chroot apt-get update
}
# ==============================================================================
# Make sure there is a resolv.conf with network of this AppVM for building
# ==============================================================================
function createResolvConf() {
rm -f "${INSTALLDIR}/etc/resolv.conf"
cp /etc/resolv.conf "${INSTALLDIR}/etc/resolv.conf"
}
# ==============================================================================
# Ensure umask set in /etc/login.defs is used (022)
# ==============================================================================
function configureUmask() {
echo "session optional pam_umask.so" >> "${INSTALLDIR}/etc/pam.d/common-session"
}
# ==============================================================================
# Configure keyboard
# ==============================================================================
function configureKeyboard() {
debug "Setting keyboard layout"
cat > "${INSTALLDIR}/tmp/keyboard.conf" <<'EOF'
keyboard-configuration keyboard-configuration/variant select English (US)
keyboard-configuration keyboard-configuration/layout select English (US)
keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC
keyboard-configuration keyboard-configuration/modelcode string pc105
keyboard-configuration keyboard-configuration/layoutcode string us
keyboard-configuration keyboard-configuration/variantcode string
keyboard-configuration keyboard-configuration/optionscode string
EOF
chroot debconf-set-selections /tmp/keyboard.conf
}
# ==============================================================================
# Update locale
# ==============================================================================
function updateLocale() {
debug "Updating locales"
chroot localedef -f UTF-8 -i en_US -c en_US.UTF-8
chroot update-locale LC_ALL=en_US.UTF-8
}
# ==============================================================================
# ------------------------------------------------------------------------------
# Q U B E S S P E C I F I C F U N C T I O N S
# ------------------------------------------------------------------------------
# ==============================================================================
# ==============================================================================
# Install Keyrings
# ==============================================================================
function installKeyrings() {
if ! [ -e "${CACHEDIR}/repo-secring.gpg" ]; then
mkdir -p "${CACHEDIR}"
gpg --gen-key --batch <<EOF
Key-Type: RSA
Key-Length: 1024
Key-Usage: sign
Name-Real: Qubes builder
Expire-Date: 0
%pubring ${CACHEDIR}/repo-pubring.gpg
%secring ${CACHEDIR}/repo-secring.gpg
%commit
EOF
fi
if [ ! -e "${CUSTOMREPO}/dists/${DIST}/Release.gpg" ]; then
gpg -abs --no-default-keyring \
--secret-keyring "${CACHEDIR}/repo-secring.gpg" \
--keyring "${CACHEDIR}/repo-pubring.gpg" \
-o "${CUSTOMREPO}/dists/${DIST}/Release.gpg" \
"${CUSTOMREPO}/dists/${DIST}/Release"
cp "${CACHEDIR}/repo-pubring.gpg" "${INSTALLDIR}/etc/apt/trusted.gpg.d/qubes-builder.gpg"
fi
}
# ==============================================================================
# Install Qubes Repo
# ==============================================================================
installQubesRepo() {
info " Defining Qubes CUSTOMREPO Location: ${PWD}/yum_repo_qubes/${DIST}"
export CUSTOMREPO="${PWD}/yum_repo_qubes/${DIST}"
info "Mounting local qubes_repo"
mkdir -p "${INSTALLDIR}/tmp/qubes_repo"
mount --bind "${CUSTOMREPO}" "${INSTALLDIR}/tmp/qubes_repo"
cat > "${INSTALLDIR}/etc/apt/sources.list.d/qubes-builder.list" <<EOF
deb file:/tmp/qubes_repo ${DIST} main
EOF
# XXX: Moved keyring install last in process; not sure if mount was ready
# all the time in its previous place
info ' Installing keyrings' # Relies on $CUSTOMREPO
installKeyrings
}
# ==============================================================================
# Uninstall Qubes Repo
# ==============================================================================
uninstallQubesRepo() {
info ' Removing Quebes build repo from sources.list.d'
# Lets not umount; we do that anyway when 04 exits
umount_kill "${INSTALLDIR}/tmp/qubes_repo"
rm -f "${INSTALLDIR}/etc/apt/sources.list.d/qubes-builder.list"
}

View File

@ -1,10 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
#### '----------------------------------------------------------------------
info ' Installing flash plugin'
#### '----------------------------------------------------------------------
aptInstall flashplugin-nonfree

View File

@ -1,13 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
#### '----------------------------------------------------------------------
info ' Installing Gnome'
#### '----------------------------------------------------------------------
#packages="$(chroot tasksel --new-install --task-packages desktop)"
#packages+=" $(chroot tasksel --new-install --task-packages gnome-desktop)"
packages="$(chroot tasksel --new-install --task-packages gnome-desktop)"
aptInstall ${packages}

View File

@ -1,22 +0,0 @@
ncurses-term
aptitude
tasksel
sudo
locales
dmsetup
psmisc
emacs
vim-nox
gnupg
iceweasel
icedove
keepassx
git
gnome-terminal
xterm
libfile-mimeinfo-perl
libglib2.0-bin
ltrace
strace
haveged
firmware-linux

View File

@ -1,15 +0,0 @@
qubes-core-agent
qubes-gui-agent
xdg-user-dirs
gnome-themes-standard
xsettingsd
gnome-packagekit
chrony
ntpdate
libxvmc1
x11-session-utils
xfonts-100dpi
xfonts-75dpi
xfonts-scalable

View File

@ -1,22 +0,0 @@
ncurses-term
aptitude
tasksel
sudo
locales
dmsetup
psmisc
emacs
vim-nox
gnupg
iceweasel
icedove
keepassx
git
gnome-terminal
xterm
libfile-mimeinfo-perl
libglib2.0-bin
ltrace
strace
haveged
firmware-linux

View File

@ -1,36 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source ./functions.sh
# ==============================================================================
# Global variables and functions
# ==============================================================================
# ------------------------------------------------------------------------------
# Temp directory to place installation files and progress markers
# (Do not use /tmp since if built in a real VM, /tmp will be empty on a reboot)
# ------------------------------------------------------------------------------
TMPDIR="/var/lib/qubes-whonix/install"
# ------------------------------------------------------------------------------
# The codename of the debian version to install.
# jessie = testing, wheezy = stable
# ------------------------------------------------------------------------------
DEBIANVERSION=${DIST}
# ------------------------------------------------------------------------------
# Location to grab Debian packages
# ------------------------------------------------------------------------------
DEBIAN_MIRROR=http://ftp.us.debian.org/debian
# TODO: Not yet implemented
DEBIAN_MIRRORS=('http://ftp.us.debian.org/debian',
'http://http.debian.net/debian,
'http://ftp.ca.debian.org/debian,
)
# ------------------------------------------------------------------------------
# apt-get configuration options
# ------------------------------------------------------------------------------
APT_GET_OPTIONS="-o Dpkg::Options::="--force-confnew" --force-yes --yes"

View File

@ -1,246 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### '-------------------------------------------------------------------------
debug ' Installing and building Whonix'
##### '-------------------------------------------------------------------------
#### '--------------------------------------------------------------------------
info ' Trap ERR and EXIT signals and cleanup (umount)'
#### '--------------------------------------------------------------------------
trap cleanup ERR
trap cleanup EXIT
if ! [ -f "${INSTALLDIR}/${TMPDIR}/.whonix_prepared_groups" ]; then
#### '----------------------------------------------------------------------
info ' Installing extra packages in packages_whonix.list file'
#### '----------------------------------------------------------------------
installPackages packages_whonix.list
touch "${INSTALLDIR}/${TMPDIR}/.whonix_prepared_groups"
fi
# ------------------------------------------------------------------------------
# chroot Whonix build script
# ------------------------------------------------------------------------------
read -r -d '' WHONIX_BUILD_SCRIPT <<'EOF' || true
################################################################################
# Pre Fixups
sudo mkdir -p /boot/grub2
sudo touch /boot/grub2/grub.cfg
sudo mkdir -p /boot/grub
sudo touch /boot/grub/grub.cfg
sudo mkdir --parents --mode=g+rw "/tmp/uwt"
# Whonix seems to re-install sysvinit even though there is a hold
# on the package. Things seem to work anyway. BUT hopfully the
# hold on grub* don't get removed
sudo apt-mark hold sysvinit
sudo apt-mark hold grub-pc grub-pc-bin grub-common grub2-common
# Whonix expects haveged to be started
sudo /etc/init.d/haveged start
################################################################################
# Whonix installation
export WHONIX_BUILD_UNATTENDED_PKG_INSTALL="1"
pushd ~/Whonix
sudo ~/Whonix/whonix_build \
--build $1 \
--64bit-linux \
--current-sources \
--enable-whonix-apt-repository \
--whonix-apt-repository-distribution $2 \
--install-to-root \
--skip-verifiable \
--minimal-report \
--skip-sanity-tests || { exit 1; }
popd
EOF
##### '-------------------------------------------------------------------------
debug ' Preparing Whonix for installation'
##### '-------------------------------------------------------------------------
if [ -f "${INSTALLDIR}/${TMPDIR}/.whonix_prepared_groups" ] && ! [ -f "${INSTALLDIR}/${TMPDIR}/.whonix_prepared" ]; then
info "Preparing Whonix system"
#### '----------------------------------------------------------------------
info ' Initializing Whonix submodules'
#### '----------------------------------------------------------------------
pushd "${WHONIX_DIR}"
{
git add Makefile || true
git commit Makefile -m 'Added Makefile' || true
su $(logname) -c "git submodule update --init --recursive";
}
popd
#### '----------------------------------------------------------------------
info ' Faking grub installation since Whonix has depends on grub-pc'
#### '----------------------------------------------------------------------
mkdir -p "${INSTALLDIR}/boot/grub"
cp "${INSTALLDIR}/usr/lib/grub/i386-pc/"* "${INSTALLDIR}/boot/grub"
rm -f "${INSTALLDIR}/usr/sbin/update-grub"
chroot ln -s /bin/true /usr/sbin/update-grub
#### '----------------------------------------------------------------------
info ' Adding a user account for Whonix to build with'
#### '----------------------------------------------------------------------
chroot id -u 'user' >/dev/null 2>&1 || \
{
# UID needs match host user to have access to Whonix sources
chroot groupadd -f user
[ -n "$SUDO_UID" ] && USER_OPTS="-u $SUDO_UID"
chroot useradd -g user $USER_OPTS -G sudo,audio -m -s /bin/bash user
if [ `chroot id -u user` != 1000 ]; then
chroot useradd -g user -u 1000 -M -s /bin/bash user-placeholder
fi
}
#### '----------------------------------------------------------------------
info ' Installing Whonix build scripts'
#### '----------------------------------------------------------------------
echo "${WHONIX_BUILD_SCRIPT}" > "${INSTALLDIR}/home/user/whonix_build.sh"
chmod 0755 "${INSTALLDIR}/home/user/whonix_build.sh"
#### '----------------------------------------------------------------------
info ' Removing apt-listchanges if it exists,so no prompts appear'
#### '----------------------------------------------------------------------
# Whonix does not handle this properly, but aptInstall packages will
aptRemove apt-listchanges || true
#### '----------------------------------------------------------------------
info ' Copying additional files required for build'
#### '----------------------------------------------------------------------
copyTree "files"
touch "${INSTALLDIR}/${TMPDIR}/.whonix_prepared"
fi
##### '-------------------------------------------------------------------------
debug ' Installing Whonix code base'
##### '-------------------------------------------------------------------------
if [ -f "${INSTALLDIR}/${TMPDIR}/.whonix_prepared" ] && ! [ -f "${INSTALLDIR}/${TMPDIR}/.whonix_installed" ]; then
if ! [ -d "${INSTALLDIR}/home/user/Whonix" ]; then
chroot su user -c 'mkdir /home/user/Whonix'
fi
mount --bind "../Whonix" "${INSTALLDIR}/home/user/Whonix"
if [ "${TEMPLATE_FLAVOR}" == "whonix-gateway" ]; then
BUILD_TYPE="--torgateway"
elif [ "${TEMPLATE_FLAVOR}" == "whonix-workstation" ]; then
BUILD_TYPE="--torworkstation"
else
error "Incorrent Whonix type \"${TEMPLATE_FLAVOR}\" selected. Not building Whonix modules"
error "You need to set TEMPLATE_FLAVOR environment variable to either"
error "whonix-gateway OR whonix-workstation"
exit 1
fi
# Whonix needs /dev/pts mounted during build
mount --bind /dev "${INSTALLDIR}/dev"
mount --bind /dev/pts "${INSTALLDIR}/dev/pts"
chroot su user -c "cd ~; ./whonix_build.sh ${BUILD_TYPE} ${DIST}" || { exit 1; }
touch "${INSTALLDIR}/${TMPDIR}/.whonix_installed"
fi
##### '-------------------------------------------------------------------------
debug ' Whonix Post Installation Configurations'
##### '-------------------------------------------------------------------------
if [ -f "${INSTALLDIR}/${TMPDIR}/.whonix_installed" ] && ! [ -f "${INSTALLDIR}/${TMPDIR}/.whonix_post" ]; then
#### '----------------------------------------------------------------------
info ' Restoring original network interfaces'
#### '----------------------------------------------------------------------
pushd "${INSTALLDIR}/etc/network"
{
rm -f interfaces;
ln -s interfaces.backup interfaces;
}
popd
#### '----------------------------------------------------------------------
info ' Temporarily retore original resolv.conf for remainder of install process'
info ' (Will be restored back in wheezy+whonix/04_qubes_install_post.sh)'
#### '----------------------------------------------------------------------
pushd "${INSTALLDIR}/etc"
{
rm -f resolv.conf;
cp -p resolv.conf.backup resolv.conf;
}
popd
#### '----------------------------------------------------------------------
info ' Temporarily retore original hosts for remainder of install process'
info ' (Will be restored on initial boot)'
#### '----------------------------------------------------------------------
pushd "${INSTALLDIR}/etc"
{
rm -f hosts;
cp -p hosts.anondist-orig hosts;
}
popd
#### '----------------------------------------------------------------------
info ' Restore default user UID set to so same in all builds regardless of build host'
#### '----------------------------------------------------------------------
if [ -n "`chroot id -u user-placeholder`" ]; then
chroot userdel user-placeholder
chroot usermod -u 1000 user
fi
#### '----------------------------------------------------------------------
info ' Enable some aliases in .bashrc'
#### '----------------------------------------------------------------------
sed -i "s/^# export/export/g" "${INSTALLDIR}/root/.bashrc"
sed -i "s/^# eval/eval/g" "${INSTALLDIR}/root/.bashrc"
sed -i "s/^# alias/alias/g" "${INSTALLDIR}/root/.bashrc"
sed -i "s/^#force_color_prompt/force_color_prompt/g" "${INSTALLDIR}/home/user/.bashrc"
sed -i "s/#alias/alias/g" "${INSTALLDIR}/home/user/.bashrc"
sed -i "s/alias l='ls -CF'/alias l='ls -l'/g" "${INSTALLDIR}/home/user/.bashrc"
#### '----------------------------------------------------------------------
info ' Remove apt-cacher-ng'
#### '----------------------------------------------------------------------
chroot service apt-cacher-ng stop || :
chroot update-rc.d apt-cacher-ng disable || :
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
chroot apt-get.anondist-orig -y --force-yes remove --purge apt-cacher-ng
#### '----------------------------------------------------------------------
info ' Remove original sources.list (Whonix copied them to .../debian.list)'
#### '----------------------------------------------------------------------
rm -f "${INSTALLDIR}/etc/apt/sources.list"
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
chroot apt-get.anondist-orig update
touch "${INSTALLDIR}/${TMPDIR}/.whonix_post"
fi
##### '-------------------------------------------------------------------------
debug ' Temporarily retore original apt-get for remainder of install process'
##### '-------------------------------------------------------------------------
pushd "${INSTALLDIR}/usr/bin"
{
rm -f apt-get;
cp -p apt-get.anondist-orig apt-get;
}
popd
#### '----------------------------------------------------------------------
info ' Cleanup'
#### '----------------------------------------------------------------------
trap - ERR EXIT
trap

View File

@ -1,40 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### '-------------------------------------------------------------------------
debug ' Installing qubes-whonix package(s)'
##### '-------------------------------------------------------------------------
# If .prepared_debootstrap has not been completed, don't continue
exitOnNoFile "${INSTALLDIR}/${TMPDIR}/.prepared_qubes" "prepared_qubes installataion has not completed!... Exiting"
# Create system mount points.
prepareChroot
#### '--------------------------------------------------------------------------
info ' Trap ERR and EXIT signals and cleanup (umount)'
#### '--------------------------------------------------------------------------
trap cleanup ERR
trap cleanup EXIT
#### '--------------------------------------------------------------------------
info ' Installing qubes-whonix and other required packages'
#### '--------------------------------------------------------------------------
# whonix-setup-wizard expects '/usr/local/share/applications' directory to exist
chroot mkdir -p '/usr/local/share/applications' # whonix-setup-wizard needs this
installQubesRepo
aptInstall python-guimessages whonix-setup-wizard qubes-whonix
uninstallQubesRepo
#### '--------------------------------------------------------------------------
info ' Cleanup'
#### '--------------------------------------------------------------------------
umount_all "${INSTALLDIR}/" || true
trap - ERR EXIT
trap

View File

@ -1,40 +0,0 @@
#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### '-------------------------------------------------------------------------
debug ' Whonix post installation cleanup'
##### '-------------------------------------------------------------------------
#### '--------------------------------------------------------------------------
info ' Restoring Whonix apt-get'
#### '--------------------------------------------------------------------------
pushd "${INSTALLDIR}/usr/bin"
{
rm -f apt-get;
cp -p apt-get.anondist apt-get;
}
popd
#### '--------------------------------------------------------------------------
info ' Restoring Whonix resolv.conf'
#### '--------------------------------------------------------------------------
pushd "${INSTALLDIR}/etc"
{
rm -f resolv.conf;
cp -p resolv.conf.anondist resolv.conf;
}
popd
#### '--------------------------------------------------------------------------
info ' Removing files created during installation that are no longer required'
#### '--------------------------------------------------------------------------
rm -rf "${INSTALLDIR}/home.orig/user/Whonix"
rm -rf "${INSTALLDIR}/home.orig/user/whonix_binary"
rm -f "${INSTALLDIR}/home.orig/user/whonix_fix"
rm -f "${INSTALLDIR}/home.orig/user/whonix_build.sh"
rm -f "${INSTALLDIR}/etc/sudoers.d/whonix-build"
rm -f "${TMPDIR}/etc/sudoers.d/whonix-build"

View File

@ -1,21 +0,0 @@
# file: etc/hostname
# owner: root
# group: root
user::rw-
group::r--
other::r--
# file: etc/sudoers.d
# owner: root
# group: root
user::rwx
group::--x
other::---
# file: etc/sudoers.d/whonix-build
# owner: root
# group: root
user::r--
group::r--
other::---

View File

@ -1 +0,0 @@
user ALL=(ALL) NOPASSWD: ALL

Some files were not shown because too many files have changed in this diff Show More