summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2017-02-14 19:36:50 +0100
committeranonym <anonym@riseup.net>2017-02-14 19:36:50 +0100
commit3ee8649272b56478456a8f562b22c1c354ebfbc4 (patch)
treed3f67bc1fdd89be2ccd0f7b2b2705028a24705cc
parent440b9cc73a6050376d6f63c9c5ef135eb1a39ef1 (diff)
WIP: ship APT lists on the image using some ugly hacks.feature/12238-ship-apt-lists
Also note that this commits prevents Tails from being reproducible. Refs: #12238
-rwxr-xr-xconfig/chroot_local-hooks/99-zz_apt-lists24
-rw-r--r--config/chroot_local-includes/usr/share/amnesia/build/mksquashfs-excludes1
2 files changed, 24 insertions, 1 deletions
diff --git a/config/chroot_local-hooks/99-zz_apt-lists b/config/chroot_local-hooks/99-zz_apt-lists
new file mode 100755
index 0000000..56aae11
--- /dev/null
+++ b/config/chroot_local-hooks/99-zz_apt-lists
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+set -e
+
+echo "Ship cached APT lists"
+
+rm -fr /var/lib/apt/lists/*
+cp -a /etc/apt /etc/apt.orig
+/lib/live/config/1500-reconfigure-APT
+sed -i -e 's,tor[+]https\?://,http://,' \
+ -e 's/vwakviie2ienjx6t[.]onion/ftp.us.debian.org/' \
+ -e 's/sgvtcaew4bxjd7ln[.]onion/security.debian.org/' \
+ -e 's/sdscoq7snqtznauu[.]onion/deb.torproject.org/' \
+ -e 's/jenw7xbd6tf7vfhp[.]onion/deb.tails.boum.org/' \
+ /etc/apt/sources.list /etc/apt/sources.list.d/*
+apt update
+rm -fr /etc/apt
+mv /etc/apt.orig /etc/apt
+for expr in 's/ftp[.]us[.]debian[.]org/vwakviie2ienjx6t.onion/' \
+ 's/security[.]debian[.]org/sgvtcaew4bxjd7ln.onion/' \
+ 's/deb[.]torproject[.]org/sdscoq7snqtznauu.onion/' \
+ 's/deb[.]tails[.]boum[.]org/jenw7xbd6tf7vfhp.onion/'; do
+ rename -e "${expr}" /var/lib/apt/lists/*
+done
diff --git a/config/chroot_local-includes/usr/share/amnesia/build/mksquashfs-excludes b/config/chroot_local-includes/usr/share/amnesia/build/mksquashfs-excludes
index 87b68e9..fb09c27 100644
--- a/config/chroot_local-includes/usr/share/amnesia/build/mksquashfs-excludes
+++ b/config/chroot_local-includes/usr/share/amnesia/build/mksquashfs-excludes
@@ -16,4 +16,3 @@ var/cache/apt/archives/partial/*.deb
var/cache/apt/pkgcache.bin
var/cache/apt/srcpkgcache.bin
var/cache/man/*
-var/lib/apt/lists/*