--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: live-build: support for apt-transport-https
- From: Ronny Standtke <ronny.standtke@gmx.net>
- Date: Fri, 11 Aug 2017 15:06:30 +0200
- Message-id: <c03c6502-f3ad-3af0-803a-fc6ed1a2d699@gmx.net>
Package: live-build
Version: 1:20170807
Severity: normal
Tags: patch
Debian Live currently doesn't support https archives (needed for e.g. the upstream archives of itch.io or jitsi).
The attached patch fixes this issue.
Cheers
Ronny
diff --git a/functions/apt-transport-https.sh b/functions/apt-transport-https.sh
new file mode 100755
index 0000000..fcd55da
--- /dev/null
+++ b/functions/apt-transport-https.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+## live-build(7) - System Build Scripts
+## Copyright (C) 2017 Ronny Standtke <ronny.standtke@gmx.net>
+##
+## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+Enable_apt_transport_https ()
+{
+ # Install apt-transport-https (if it is not installed yet) and we have repositories that use HTTPS
+ if [ ! -x "chroot/usr/lib/apt/methods/https" ]
+ then
+ for FILE in chroot/etc/apt/sources.list.d/*.list
+ do
+ # Check if repository contains HTTPS URLs
+ if grep -q "^deb https" "${FILE}"
+ then
+ # temporarily disable https repositories so that calling "apt-get update" doesn't fail before installing apt-transport-https
+ sed -i "s/^deb https/#bootstrapping deb https/" "${FILE}"
+ _APT_HTTPS="true"
+ fi
+ done
+ if [ "${_APT_HTTPS}" = "true" ]
+ then
+ Chroot chroot "apt-get ${APT_OPTIONS} update"
+ Chroot chroot "apt-get ${APT_OPTIONS} --force-yes install apt-transport-https"
+ # re-enable https repositories
+ for FILE in chroot/etc/apt/sources.list.d/*.list
+ do
+ sed -i "s/#bootstrapping deb https/deb https/" "${FILE}"
+ done
+ Chroot chroot "apt-get ${APT_OPTIONS} update"
+ fi
+ fi
+}
diff --git a/scripts/build/bootstrap_archives b/scripts/build/bootstrap_archives
index f7bf7d8..3314628 100755
--- a/scripts/build/bootstrap_archives
+++ b/scripts/build/bootstrap_archives
@@ -240,6 +240,8 @@ then
done
fi
+Enable_apt_transport_https
+
# Installing aptitude
if [ "${LB_APT}" = "aptitude" ] && [ ! -x chroot/usr/bin/aptitude ]
then
diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives
index 85ad35b..ff46b5f 100755
--- a/scripts/build/chroot_archives
+++ b/scripts/build/chroot_archives
@@ -212,6 +212,8 @@ EOF
fi
done
+ Enable_apt_transport_https
+
# Configure local package repository
if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb
then
@@ -649,6 +651,8 @@ EOF
fi
done
+ Enable_apt_transport_https
+
# Updating indices
Apt chroot update
--- End Message ---
--- Begin Message ---
- To: Ronny Standtke <ronny.standtke@gmx.net>, 871780-done@bugs.debian.org
- Subject: Re: Bug#871780: live-build: support for apt-transport-https
- From: Raphael Hertzog <hertzog@debian.org>
- Date: Sat, 24 Feb 2018 17:01:02 +0100
- Message-id: <20180224160102.GA28148@home.ouaza.com>
- In-reply-to: <c03c6502-f3ad-3af0-803a-fc6ed1a2d699@gmx.net>
- References: <c03c6502-f3ad-3af0-803a-fc6ed1a2d699@gmx.net>
Hello,
On Fri, 11 Aug 2017, Ronny Standtke wrote:
> Debian Live currently doesn't support https archives (needed for e.g.
> the upstream archives of itch.io or jitsi).
The subsequent discussion has shown that we can already support https
repositories without changing anything. Furthermore apt-transport-https
is gone in buster, APT supports https natively (you might still have to
ensure that ca-certificates is installed early).
So I'm just going to close this bug.
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/
--- End Message ---