[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: live-build - bootstrap with http proxy



Hi,
that's is true if the bootstrap stage is fresh, not already done.

There's also another issue inside the chroot:
apt requests are done by proxy
but if a package exec wget (like prism2-usb-firmware-installer),
and if you can reach internet only by a proxy,
he fails :)

With this patch i fix the issue in live-build (git)

[[[
diff --git a/scripts/build/chroot_apt b/scripts/build/chroot_apt
index 09ece39..7f8f43e 100755
--- a/scripts/build/chroot_apt
+++ b/scripts/build/chroot_apt
@@ -42,16 +42,24 @@ case "${1}" in
 
  mkdir -p chroot/etc/apt/apt.conf.d
 
+ if [ -f "chroot/etc/environment" ]
+ then
+ rm chroot/etc/environment
+ fi
+
  # Configuring apt ftp proxy
  if [ -n "${LB_APT_FTP_PROXY}" ]
  then
  echo "Acquire::ftp::Proxy \"${LB_APT_FTP_PROXY}\";" > chroot/etc/apt/apt.conf.d/00ftp-proxy
+ echo "ftp_proxy=${LB_APT_FTP_PROXY}" >> chroot/etc/environment
  fi
 
  # Configuring apt http proxy
  if [ -n "${LB_APT_HTTP_PROXY}" ]
  then
  echo "Acquire::http::Proxy \"${LB_APT_HTTP_PROXY}\";" > chroot/etc/apt/apt.conf.d/00http-proxy
+ echo "http_proxy=${LB_APT_HTTP_PROXY}" >> chroot/etc/environment
+ echo "https_proxy=${LB_APT_HTTP_PROXY}" >> chroot/etc/environment
  fi
 
  # Configuring apt pipeline
@@ -221,6 +229,9 @@ EOF
  # Creating lock file
  Create_lockfile .lock
 
+ # Deconfiguring global environment
+ rm -f chroot/etc/environment
+
  # Deconfiguring aptitude ftp proxy
  rm -f chroot/etc/apt/apt.conf.d/00ftp-proxy
 
]]]


Reply to: