Commit 1267d7c7 authored by tchou's avatar tchou

Merge branch 'master' into web/10623-css-improvements

Conflicts:
	wiki/src/install/expert/usb.de.po
	wiki/src/install/expert/usb.fa.po
	wiki/src/install/expert/usb.fr.po
	wiki/src/install/expert/usb.mdwn
	wiki/src/install/expert/usb.pt.po
	wiki/src/install/inc/overview.de.po
	wiki/src/install/inc/overview.fa.po
	wiki/src/install/inc/overview.fr.po
	wiki/src/install/inc/overview.html
	wiki/src/install/inc/overview.it.po
	wiki/src/install/inc/overview.pt.po
	wiki/src/install/inc/steps/create_persistence.inline.mdwn
	wiki/src/install/inc/steps/install_intermediary_outro.inline.mdwn
	wiki/src/install/inc/steps/you_are_done.inline.mdwn
	wiki/src/install/inc/stylesheets/assistant.css
	wiki/src/install/inc/stylesheets/expert.css
	wiki/src/install/mac/dvd.mdwn
	wiki/src/upgrade.de.po
	wiki/src/upgrade.fa.po
	wiki/src/upgrade.fr.po
	wiki/src/upgrade.it.po
	wiki/src/upgrade.pt.po
parents 27d7724b dbeac4be

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -3,11 +3,14 @@
*.po~
*.pot~
*.swp
/*.apt-sources
/*.build-manifest
/*.buildlog
/*.img
/*.iso
/*.list
/*.packages
/*.rake_tasks~
/*.vdi
/binary
/cache
......
......@@ -4,3 +4,10 @@
[submodule "submodules/jenkins-tools"]
path = submodules/jenkins-tools
url = https://git-tails.immerda.ch/jenkins-tools
[submodule "submodules/chutney"]
path = submodules/chutney
url = https://git-tails.immerda.ch/chutney
branch = feature/tails_test_suite
[submodule "submodules/mirror-pool-dispatcher"]
path = submodules/mirror-pool-dispatcher
url = https://git-tails.immerda.ch/mirror-pool-dispatcher
This diff is collapsed.
......@@ -63,6 +63,8 @@ chmod go+rX config/chroot_local-includes/home
chmod go+rX config/chroot_local-includes/lib
chmod go+rX config/chroot_local-includes/lib/live
chmod -R go+rx config/chroot_local-includes/lib/live/config
chmod go+rX config/chroot_local-includes/lib/live/mount
chmod -R go+rX config/chroot_local-includes/lib/systemd
chmod go+rX config/chroot_local-includes/live
chmod -R go+rX config/chroot_local-includes/usr
chmod -R go+rx config/chroot_local-includes/usr/local/bin
......@@ -74,6 +76,17 @@ chmod -R go+rX config/chroot_sources
# build the image
# we need /debootstrap/deburis to build a manifest of used packages:
DEBOOTSTRAP_OPTIONS="$DEBOOTSTRAP_OPTIONS --keep-debootstrap-dir"
# use our own APT repository's key:
DEBOOTSTRAP_GNUPG_HOMEDIR=$(mktemp -d)
gpg --homedir "$DEBOOTSTRAP_GNUPG_HOMEDIR" \
--import config/chroot_sources/tails.chroot.gpg
DEBOOTSTRAP_OPTIONS="$DEBOOTSTRAP_OPTIONS --keyring=$DEBOOTSTRAP_GNUPG_HOMEDIR/pubring.gpg"
export DEBOOTSTRAP_OPTIONS
: ${MKSQUASHFS_OPTIONS:='-comp xz -Xbcj x86 -b 1024K -Xdict-size 1024K'}
MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef chroot/usr/share/amnesia/build/mksquashfs-excludes"
export MKSQUASHFS_OPTIONS
......@@ -160,7 +173,8 @@ case "$LB_BINARY_IMAGES" in
;;
esac
BUILD_DEST_FILENAME="${BUILD_BASENAME}.${BUILD_FILENAME_EXT}"
BUILD_MANIFEST="${BUILD_DEST_FILENAME}.list"
BUILD_MANIFEST="${BUILD_DEST_FILENAME}.build-manifest"
BUILD_APT_SOURCES="${BUILD_DEST_FILENAME}.apt-sources"
BUILD_PACKAGES="${BUILD_DEST_FILENAME}.packages"
BUILD_LOG="${BUILD_DEST_FILENAME}.buildlog"
BUILD_START_FILENAME="${BUILD_DEST_FILENAME}.start.timestamp"
......@@ -172,30 +186,38 @@ trap "kill -9 $! 2>/dev/null" EXIT HUP INT QUIT TERM
exec 2> >(tee -a "$BUILD_LOG" >&2)
trap "kill -9 $! 2>/dev/null" EXIT HUP INT QUIT TERM
(
echo "Mirrors:"
apt-mirror debian
apt-mirror debian-security
apt-mirror torproject
echo "Additional sources:"
cat config/chroot_sources/*.chroot
) > "$BUILD_APT_SOURCES"
echo "Building $LB_BINARY_IMAGES image ${BUILD_BASENAME}..."
set -o pipefail
[ -z "$JENKINS_URL" ] || date --utc '+%s' > "$BUILD_START_FILENAME"
time eatmydata lb build noauto ${@}
RET=$?
if [ -e "${BUILD_FILENAME}.${BUILD_FILENAME_EXT}" ]; then
if [ "$RET" -eq 0 ]; then
[ -z "$JENKINS_URL" ] || date --utc '+%s' > "$BUILD_END_FILENAME"
echo "Image was successfully created"
if [ "$LB_BINARY_IMAGES" = iso ]; then
ISO_FILE="${BUILD_FILENAME}.${BUILD_FILENAME_EXT}"
print_iso_size "$ISO_FILE"
echo "Hybriding it..."
isohybrid $AMNESIA_ISOHYBRID_OPTS "$ISO_FILE"
print_iso_size "$ISO_FILE"
truncate -s %2048 "$ISO_FILE"
print_iso_size "$ISO_FILE"
fi
else
echo "Warning: image created, but lb build exited with code $RET"
echo "Image was successfully created"
[ "$RET" -eq 0 ] || \
echo "Warning: lb build exited with code $RET"
[ -z "$JENKINS_URL" ] || date --utc '+%s' > "$BUILD_END_FILENAME"
if [ "$LB_BINARY_IMAGES" = iso ]; then
ISO_FILE="${BUILD_FILENAME}.${BUILD_FILENAME_EXT}"
print_iso_size "$ISO_FILE"
echo "Hybriding it..."
isohybrid $AMNESIA_ISOHYBRID_OPTS "$ISO_FILE"
print_iso_size "$ISO_FILE"
truncate -s %2048 "$ISO_FILE"
print_iso_size "$ISO_FILE"
fi
echo "Renaming generated files..."
mv -i "${BUILD_FILENAME}.${BUILD_FILENAME_EXT}" "${BUILD_DEST_FILENAME}"
mv -i binary.packages "${BUILD_PACKAGES}"
generate-build-manifest chroot/debootstrap "${BUILD_MANIFEST}"
else
fatal "lb build failed ($?)."
fi
......@@ -16,30 +16,65 @@ fi
export LB_BOOTSTRAP_INCLUDE='eatmydata'
# sanity checks
if grep -qs -E '^Pin:\s+release\s+.*a=' config/chroot_apt/preferences ; then
echo "Found unsupported a= syntax in config/chroot_apt/preferences,"
echo "use n= instead. Exiting."
exit 1
fi
if grep -qs -E '^Pin:\s+release\s+.*o=Debian Backports' \
config/chroot_apt/preferences ; then
echo "Found unsupported 'o=Debian Backports' syntax,"
echo "in config/chroot_apt/preferences. Use o=Debian instead. Exiting."
exit 1
fi
# init variables
RUN_LB_CONFIG="lb config noauto"
# init config/ with defaults for the target distribution
$RUN_LB_CONFIG --distribution wheezy ${@}
$RUN_LB_CONFIG --distribution jessie ${@}
# set up everything for time-based snapshots:
apt-snapshots-serials prepare-build
DEBIAN_MIRROR="$(apt-mirror debian)"
DEBIAN_SECURITY_MIRROR="$(apt-mirror debian-security)"
TORPROJECT_MIRROR="$(apt-mirror torproject)"
[ -n "$DEBIAN_MIRROR" ] || exit 1
[ -n "$DEBIAN_SECURITY_MIRROR" ] || exit 1
[ -n "$TORPROJECT_MIRROR" ] || exit 1
perl -pi \
-E \
"s|^(deb(?:-src)?\s+)https?://ftp[.]us[.]debian[.]org/debian/?(\s+)|\$1$DEBIAN_MIRROR\$2| ; \
s|^(deb(?:-src)?\s+)https?://deb[.]torproject[.]org/torproject[.]org/?(\s+)|\$1$TORPROJECT_MIRROR\$2|" \
config/chroot_sources/*.chroot \
|| exit 1
# set Amnesia's general options
$RUN_LB_CONFIG \
--verbose \
--apt-recommends false \
--backports false \
--binary-images iso \
--binary-indices false \
--checksums none \
--bootappend-live "${AMNESIA_APPEND}" \
--bootstrap "cdebootstrap" \
--bootstrap debootstrap \
--bootstrap-config tails-build-jessie \
--archive-areas "main contrib non-free" \
--includes none \
--iso-application="The Amnesic Incognito Live System" \
--iso-publisher="https://tails.boum.org/" \
--iso-volume="TAILS ${AMNESIA_FULL_VERSION}" \
--memtest none \
--mirror-binary "http://ftp.us.debian.org/debian/" \
--mirror-bootstrap "http://ftp.us.debian.org/debian/" \
--mirror-chroot "http://ftp.us.debian.org/debian/" \
--mirror-binary "$DEBIAN_MIRROR" \
--mirror-bootstrap "$DEBIAN_MIRROR" \
--mirror-chroot "$DEBIAN_MIRROR" \
--mirror-binary-security "$DEBIAN_SECURITY_MIRROR" \
--mirror-chroot-security "$DEBIAN_SECURITY_MIRROR" \
--packages-lists="standard" \
--tasks="standard" \
--linux-packages="linux-image-3.16.0-4" \
......@@ -97,3 +132,20 @@ fi
# custom APT sources
tails-custom-apt-sources > config/chroot_sources/tails.chroot
# tails-transform-mirror-url and its dependencies
install -m 0755 \
submodules/mirror-pool-dispatcher/bin/tails-transform-mirror-url \
config/chroot_local-includes/usr/local/bin/
install -m 0755 -d config/chroot_local-includes/usr/local/lib/nodejs
install -m 0755 \
submodules/mirror-pool-dispatcher/lib/js/mirror-dispatcher.js \
config/chroot_local-includes/usr/local/lib/nodejs/
# custom debootstrap script, setting some APT magic to log downloads:
patch \
--follow-symlinks \
--output=/usr/share/debootstrap/scripts/tails-build-jessie \
/usr/share/debootstrap/scripts/jessie \
data/debootstrap/scripts/jessie.patch
sed -i "s,%%topdir%%,$(pwd)," /usr/share/debootstrap/scripts/tails-build-jessie
#!/bin/bash
set -e
set -u
. "$(dirname $0)/utils.sh"
ARCHIVE="$1"
output_tagged_snapshot() {
local archive="$1"
local tag="$2"
local snapshot=$(branch_name_to_suite "$tag")
echo "http://tagged.snapshots.deb.tails.boum.org/$snapshot/$archive"
}
output_time_based_snapshot() {
local archive="$1"
local serial="$2"
echo "http://time-based.snapshots.deb.tails.boum.org/$archive/$serial"
}
### Sanity checks
[ -n "$ARCHIVE" ] || exit 1
### Main
SERIAL=$(cat "config/APT_snapshots.d/$ARCHIVE/serial")
RESOLVED_SERIAL=$(cat "tmp/APT_snapshots.d/$ARCHIVE/serial")
if [ "$(base_branch)" = stable ]; then
if version_was_released "$(version_in_changelog)"; then
on_a_tag \
|| fatal "Not building from stable, but last version in changelog" \
"was released"
output_tagged_snapshot "$ARCHIVE" "$(version_in_changelog)"
else
version_was_released "$(previous_version_in_changelog)" \
|| fatal "None of the two last version in changelog were released"
case "$ARCHIVE" in
debian-security)
</