summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes/lib
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2018-09-23 21:43:55 +0200
committersegfault <segfault@riseup.net>2018-09-23 21:44:52 +0200
commitd4bd6d00f5d912a0e701a1e849b85b7a2a2b4a1f (patch)
tree21ecac8b1f8e374dc9476e549c1a75df941340a5 /config/chroot_local-includes/lib
parent2ac25fcd2fd78e4773aefdfd9db9ce245716cf7d (diff)
Fix APT pinning for stretch-backports
In our own repo, we use "o=Debian", but the official Debian repo uses "o=Debian Backports" for backports. Since we change the repo from ours to Debian, we also have to change the origin. In passing, add a log message and simplify another regex.
Diffstat (limited to 'config/chroot_local-includes/lib')
-rwxr-xr-xconfig/chroot_local-includes/lib/live/config/1500-reconfigure-APT16
1 files changed, 13 insertions, 3 deletions
diff --git a/config/chroot_local-includes/lib/live/config/1500-reconfigure-APT b/config/chroot_local-includes/lib/live/config/1500-reconfigure-APT
index c9237dd..9bc9b43 100755
--- a/config/chroot_local-includes/lib/live/config/1500-reconfigure-APT
+++ b/config/chroot_local-includes/lib/live/config/1500-reconfigure-APT
@@ -89,17 +89,27 @@ s{
' | perl -pi - /etc/apt/sources.list /etc/apt/sources.list.d/*.list
+echo "- configuring APT preferences"
echo '
-### APT preferences
+### Custom APT repository
s{
^
- (Pin[:]\s+origin\s+)
- deb[.]tails[.]boum[.]org
+ (Pin:\s+origin\s+)
+ deb.tails.boum.org
$
}{$1jenw7xbd6tf7vfhp.onion}xms;
+### Fix origin for backports
+
+s{
+ ^
+ (Pin:\s+release\s+)
+ o=Debian
+ (,[a,n]=stretch-backports)
+ $
+}{$1o=Debian Backports$2}xms;
' | perl -pi - /etc/apt/preferences
find /etc/apt/sources.list* -size 0 -delete