Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] xbps-src: keep http_proxy and other lowercase proxy variables
Date: Wed, 04 Jan 2023 14:35:21 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41435@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

There is a new pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages http_proxy
https://github.com/void-linux/void-packages/pull/41435

xbps-src: keep http_proxy and other lowercase proxy variables
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

From `curl` manpage:
```
ENVIRONMENT
       The environment variables can be specified in lower case or upper case.
       The lower case version has precedence. http_proxy is an exception as it
       is only available in lower case.
```

I have `http_proxy` and `https_proxy` set, and then `xbps-src update-check` would not use the proxy. With this commit, it works as expected.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41435.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-http_proxy-41435.patch --]
[-- Type: text/x-diff, Size: 1657 bytes --]

From 238eee31e52c394e1d1aeaa155482eed3d103666 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 4 Jan 2023 10:25:10 -0300
Subject: [PATCH] xbps-src: keep http_proxy and other lowercase proxy variables

---
 common/environment/setup/sourcepkg.sh | 2 ++
 common/xbps-src/shutils/chroot.sh     | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh
index a7f98b57d6f7..4e3b4e98ba43 100644
--- a/common/environment/setup/sourcepkg.sh
+++ b/common/environment/setup/sourcepkg.sh
@@ -25,6 +25,8 @@ for var in $(awk 'BEGIN{for (i in ENVIRON) {print i}}' </dev/null); do
 		;;
 	FTP_PROXY | FTP_RETRIES)
 		;;
+	http_proxy | https_proxy | ftp_proxy | all_proxy | no_proxy)
+		;;
 	*)
 		unset -v "$var"
 		;;
diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh
index a7100d4ea56f..823705030b97 100644
--- a/common/xbps-src/shutils/chroot.sh
+++ b/common/xbps-src/shutils/chroot.sh
@@ -165,6 +165,11 @@ chroot_handler() {
     else
         env -i -- PATH="/usr/bin:$PATH" SHELL=/bin/sh \
             HOME=/tmp IN_CHROOT=1 LC_COLLATE=C LANG=en_US.UTF-8 \
+            ${http_proxy:+http_proxy="${http_proxy}"} \
+            ${https_proxy:+https_proxy="${https_proxy}"} \
+            ${ftp_proxy:+ftp_proxy="${ftp_proxy}"} \
+            ${all_proxy:+all_proxy="${all_proxy}"} \
+            ${no_proxy:+no_proxy="${no_proxy}"} \
             ${HTTP_PROXY:+HTTP_PROXY="${HTTP_PROXY}"} \
             ${HTTPS_PROXY:+HTTPS_PROXY="${HTTPS_PROXY}"} \
             ${FTP_PROXY:+FTP_PROXY="${FTP_PROXY}"} \

             reply	other threads:[~2023-01-04 13:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 13:35 tornaria [this message]
2023-01-04 15:24 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41435@inbox.vuxu.org \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).