Bug#632046: [Piuparts-devel] Bug#632046: Bug#632046: Bug#632046: piuparts: Use HTTP_PROXY
tags 632046 + pending thanks On Mittwoch, 6. Juli 2011, Scott Schaefer wrote: Revised patch attached. Should apply cleanly against SVN r 907. Uses env HTTP_PROXY in preference to apt_config value, if present. thanks, commited to svn. cheers, Holger -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#632046: [Piuparts-devel] Bug#632046: Bug#632046: piuparts: Use HTTP_PROXY
Hi Scott, On Montag, 4. Juli 2011, Scott Schaefer wrote: awesome than you already are, you could include debian/changelog entries in your patches too :-) Um ... OK. I will have to learn how to do that. I will add to my Learn About ... list :-) sudo apt-get install devscripts man dch dch :-) it also seems to contain unwanted noise about force-confdef :/ I didn't see that in my (limited) testing. I will re-test (after mod described below) and look specifically for anything about confdef. In meantime, do you recall precisely what it reports ? You misunderstood me: it's in the patch you posted, not in the output of the code running... I already found 'apt-config' (which addresses all three of my issues). I have it on my list to execute it and pull any Acquire::Proxy value from there if HTTP_PROXY is not in os.environ. So I'll send revised patch in next 3-4 days. Cool! cheers, Holger -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#632046: [Piuparts-devel] Bug#632046: Bug#632046: Bug#632046: piuparts: Use HTTP_PROXY
On 07/05/2011 05:49 AM, Holger Levsen wrote: Hi Scott, On Montag, 4. Juli 2011, Scott Schaefer wrote: awesome than you already are, you could include debian/changelog entries in your patches too :-) Um ... OK. I will have to learn how to do that. I will add to my Learn About ... list :-) sudo apt-get install devscripts man dch dch :-) Ah ... That will get us into long discussion about host of topics concerning development workflows, packaging/release workflows, patch approvals, testing, policies, reposibilities, etc., etc. For now, I would like to continue to rely on you to update the changelog. it also seems to contain unwanted noise about force-confdef :/ I didn't see that in my (limited) testing. I will re-test (after mod described below) and look specifically for anything about confdef. In meantime, do you recall precisely what it reports ? You misunderstood me: it's in the patch you posted, not in the output of the code running... Hm .. This is against svn r907 ... $ svn log|head r907 | holger | 2011-06-27 03:17:41 -0400 (Mon, 27 Jun 2011) | 1 line piuparts-report.py: correct a typo from the patch for #523950. And piuparts.py: $ cksum piuparts.py 1279739423 86368 piuparts.py Applies with fuzz, since patch is against version with dpkg_divert.patch already applied $ patch -p1 .hg/patches/apt_proxy.patch patching file piuparts.py Hunk #1 succeeded at 677 (offset -5 lines). Applies cleanly with dpkg_divert.patch popped $ hg qpop popping apt_proxy.patch $ patch -p1 .hg/patches/apt_proxy.patch patching file piuparts.py I have run result with both HTTP_PROXY set and unset, with both --dpkg-force-confdef and without. I will test against the piuparts.conf I have from piatti for master/slave testing. Or perhaps I'll just get the revision for apt-config coded, and test the revised one :-) I already found 'apt-config' (which addresses all three of my issues). I have it on my list to execute it and pull any Acquire::Proxy value from there if HTTP_PROXY is not in os.environ. So I'll send revised patch in next 3-4 days. Cool! cheers, Holger ___ Piuparts-devel mailing list piuparts-de...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/piuparts-devel -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#632046: [Piuparts-devel] Bug#632046: Bug#632046: Bug#632046: piuparts: Use HTTP_PROXY
On 07/05/2011 08:12 PM, Scott Schaefer wrote: On 07/05/2011 05:49 AM, Holger Levsen wrote: Hi Scott, On Montag, 4. Juli 2011, Scott Schaefer wrote: awesome than you already are, you could include debian/changelog entries in your patches too :-) Um ... OK. I will have to learn how to do that. I will add to my Learn About ... list :-) sudo apt-get install devscripts man dch dch :-) Ah ... That will get us into long discussion about host of topics concerning development workflows, packaging/release workflows, patch approvals, testing, policies, reposibilities, etc., etc. For now, I would like to continue to rely on you to update the changelog. it also seems to contain unwanted noise about force-confdef :/ I didn't see that in my (limited) testing. I will re-test (after mod described below) and look specifically for anything about confdef. In meantime, do you recall precisely what it reports ? You misunderstood me: it's in the patch you posted, not in the output of the code running... Hm .. This is against svn r907 ... $ svn log|head r907 | holger | 2011-06-27 03:17:41 -0400 (Mon, 27 Jun 2011) | 1 line piuparts-report.py: correct a typo from the patch for #523950. And piuparts.py: $ cksum piuparts.py 1279739423 86368 piuparts.py Applies with fuzz, since patch is against version with dpkg_divert.patch already applied $ patch -p1 .hg/patches/apt_proxy.patch patching file piuparts.py Hunk #1 succeeded at 677 (offset -5 lines). Applies cleanly with dpkg_divert.patch popped $ hg qpop popping apt_proxy.patch $ patch -p1 .hg/patches/apt_proxy.patch patching file piuparts.py I have run result with both HTTP_PROXY set and unset, with both --dpkg-force-confdef and without. I will test against the piuparts.conf I have from piatti for master/slave testing. Or perhaps I'll just get the revision for apt-config coded, and test the revised one :-) I already found 'apt-config' (which addresses all three of my issues). I have it on my list to execute it and pull any Acquire::Proxy value from there if HTTP_PROXY is not in os.environ. So I'll send revised patch in next 3-4 days. Cool! cheers, Holger ___ Piuparts-devel mailing list piuparts-de...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/piuparts-devel Revised patch attached. Should apply cleanly against SVN r 907. Uses env HTTP_PROXY in preference to apt_config value, if present. diff --git a/piuparts.py b/piuparts.py --- a/piuparts.py +++ b/piuparts.py @@ -677,14 +677,32 @@ def create_apt_conf(self): Create /etc/apt/apt.conf inside the chroot. +lines = [ +'APT::Get::Assume-Yes yes;\n', +'APT::Install-Recommends 0;\n', +'APT::Install-Suggests 0;\n', +] +lines.append('APT::Get::AllowUnauthenticated %s;\n' % settings.apt_unauthenticated) +if HTTP_PROXY in os.environ: +proxy = os.environ[HTTP_PROXY] +else: +proxy = None; +pat = re.compile(r^Acquire::http::Proxy\s+\([^\]+)\, re.I); +p = subprocess.Popen([apt-config, dump], + stdout=subprocess.PIPE) +stdout, _ = p.communicate() +if stdout: +for line in stdout.split(\n): +m = re.match(pat, line) +if proxy is None and m: +proxy = m.group(1) +if proxy: +lines.append('Acquire::http::Proxy %s;\n' % proxy) +if settings.dpkg_force_confdef: +lines.append('Dpkg::Options {--force-confdef;};\n') + create_file(self.relative(etc/apt/apt.conf), -'APT::Get::AllowUnauthenticated %s;\n' % settings.apt_unauthenticated + -'APT::Get::Assume-Yes yes;\n' + -'APT::Install-Recommends 0;\n' + -'APT::Install-Suggests 0;\n') -if settings.dpkg_force_confdef: - append_to_file(self.relative(etc/apt/apt.conf), - 'Dpkg::Options {--force-confdef;};\n') +.join(lines)) def create_dpkg_conf(self): Create /etc/dpkg/dpkg.cfg.d/piuparts inside the chroot.
Bug#632046: [Piuparts-devel] Bug#632046: piuparts: Use HTTP_PROXY
Hi Scott, thanks for your bug report with patch. If you want to be even more awesome than you already are, you could include debian/changelog entries in your patches too :-) On Mittwoch, 29. Juni 2011, Scott Schaefer wrote: Attached patch causes piuparts to add appropriate line to apt.conf in chroot to cause apt to use current HTTP_PROXY variable from OS environment. it also seems to contain unwanted noise about force-confdef :/ It PROBABLY should also read current apt config and duplicate any Acquire::http::proxy value from there. However, there are at least three issues with that: I think the ability to specify the proxy like this is well sufficient. If a user wants to configure apt further, she can always do this via a custom script :-) cheers, Holger -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#632046: [Piuparts-devel] Bug#632046: piuparts: Use HTTP_PROXY
On 07/04/2011 10:06 AM, Holger Levsen wrote: Hi Scott, thanks for your bug report with patch. If you want to be even more awesome than you already are, you could include debian/changelog entries in your patches too :-) Um ... OK. I will have to learn how to do that. I will add to my Learn About ... list :-) On Mittwoch, 29. Juni 2011, Scott Schaefer wrote: Attached patch causes piuparts to add appropriate line to apt.conf in chroot to cause apt to use current HTTP_PROXY variable from OS environment. it also seems to contain unwanted noise about force-confdef :/ I didn't see that in my (limited) testing. I will re-test (after mod described below) and look specifically for anything about confdef. In meantime, do you recall precisely what it reports ? It PROBABLY should also read current apt config and duplicate any Acquire::http::proxy value from there. However, there are at least three issues with that: I think the ability to specify the proxy like this is well sufficient. If a user wants to configure apt further, she can always do this via a custom script :-) I already found 'apt-config' (which addresses all three of my issues). I have it on my list to execute it and pull any Acquire::Proxy value from there if HTTP_PROXY is not in os.environ. So I'll send revised patch in next 3-4 days. cheers, Holger -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#632046: piuparts: Use HTTP_PROXY
Package: piuparts Version: 0.40 Severity: wishlist Tags: patch Attached patch causes piuparts to add appropriate line to apt.conf in chroot to cause apt to use current HTTP_PROXY variable from OS environment. It PROBABLY should also read current apt config and duplicate any Acquire::http::proxy value from there. However, there are at least three issues with that: 1) should it copy other Acquire config elements ? Note users may be rate-limiting their downloads with use of 'unattended-upgrades.conf' 2) requires research to determine priority/interaction of various locations/files from which apt reads its config (e.g. ~/apt.conf), 3) substantially more difficult to parse :-) -- System Information: Debian Release: 6.0.1 APT prefers stable APT policy: (990, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-686 (SMP w/4 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages piuparts depends on: ii apt 0.8.10.3 Advanced front-end for dpkg ii debootstrap 1.0.26+squeeze1 Bootstrap a basic Debian system ii lsb-release 3.2-23.2squeeze1 Linux Standard Base version report ii lsof4.81.dfsg.1-1List open files ii python 2.6.6-3+squeeze6 interactive high-level object-orie ii python-debian 0.1.18 Python modules to work with Debian piuparts recommends no packages. Versions of packages piuparts suggests: ii ghostscript 8.71~dfsg2-9 The GPL Ghostscript PostScript/PDF pn python-rpy none (no description available) -- no debconf information diff --git a/piuparts.py b/piuparts.py --- a/piuparts.py +++ b/piuparts.py @@ -682,14 +682,19 @@ def create_apt_conf(self): Create /etc/apt/apt.conf inside the chroot. +lines = [ +'APT::Get::Assume-Yes yes;\n', +'APT::Install-Recommends 0;\n', +'APT::Install-Suggests 0;\n', +] +lines.append('APT::Get::AllowUnauthenticated %s;\n' % settings.apt_unauthenticated) +if HTTP_PROXY in os.environ: +lines.append('Acquire::http::Proxy %s;\n' % os.environ[HTTP_PROXY]) +if settings.dpkg_force_confdef: +lines.append('Dpkg::Options {--force-confdef;};\n') + create_file(self.relative(etc/apt/apt.conf), -'APT::Get::AllowUnauthenticated %s;\n' % settings.apt_unauthenticated + -'APT::Get::Assume-Yes yes;\n' + -'APT::Install-Recommends 0;\n' + -'APT::Install-Suggests 0;\n') -if settings.dpkg_force_confdef: - append_to_file(self.relative(etc/apt/apt.conf), - 'Dpkg::Options {--force-confdef;};\n') +.join(lines)) def create_dpkg_conf(self): Create /etc/dpkg/dpkg.cfg.d/piuparts inside the chroot.