public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>, Dylan Whyte <d.whyte@proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup 4/4] fix #3296: use proxy client to retrieve changelog
Date: Mon, 10 May 2021 09:25:20 +0200	[thread overview]
Message-ID: <5841804e-b619-fdea-1b6c-32b2ad9e31e1@proxmox.com> (raw)
In-Reply-To: <20210507105303.7793-4-d.whyte@proxmox.com>

applied

On 5/7/21 12:53 PM, Dylan Whyte wrote:
> Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
> ---
>   src/api2/node/apt.rs | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/api2/node/apt.rs b/src/api2/node/apt.rs
> index 44b13edd..96a0f530 100644
> --- a/src/api2/node/apt.rs
> +++ b/src/api2/node/apt.rs
> @@ -6,6 +6,7 @@ use proxmox::list_subdirs_api_method;
>   use proxmox::api::{api, RpcEnvironment, RpcEnvironmentType, Permission};
>   use proxmox::api::router::{Router, SubdirMap};
>   
> +use crate::config::node;
>   use crate::server::WorkerTask;
>   use crate::tools::{apt, http::SimpleHttp, subscription};
>   
> @@ -194,7 +195,13 @@ fn apt_get_changelog(
>           bail!("Package '{}' not found", name);
>       }
>   
> -    let mut client = SimpleHttp::new(None); // TODO: pass proxy_config
> +    let proxy_config = if let Ok((node_config, _digest)) = node::config() {
> +        node_config.http_proxy()
> +    } else {
> +        None
> +    };
> +
> +    let mut client = SimpleHttp::new(proxy_config);
>   
>       let changelog_url = &pkg_info[0].change_log_url;
>       // FIXME: use 'apt-get changelog' for proxmox packages as well, once repo supports it




  reply	other threads:[~2021-05-10  7:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 10:53 [pbs-devel] [PATCH proxmox-backup 1/4] fix 3296: add api endpoint for set, get, rm proxy Dylan Whyte
2021-05-07 10:53 ` [pbs-devel] [PATCH proxmox-backup 2/4] fix #3296: node conf: add http_proxy to config Dylan Whyte
2021-05-07 10:53 ` [pbs-devel] [PATCH proxmox-backup 3/4] fix #3296: use proxy for subscriptions Dylan Whyte
2021-05-10  6:44   ` Dietmar Maurer
2021-05-10  7:25   ` [pbs-devel] applied: " Dietmar Maurer
2021-05-07 10:53 ` [pbs-devel] [PATCH proxmox-backup 4/4] fix #3296: use proxy client to retrieve changelog Dylan Whyte
2021-05-10  7:25   ` Dietmar Maurer [this message]
2021-05-10  5:21 ` [pbs-devel] [PATCH proxmox-backup 1/4] fix 3296: add api endpoint for set, get, rm proxy Dietmar Maurer

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=5841804e-b619-fdea-1b6c-32b2ad9e31e1@proxmox.com \
    --to=dietmar@proxmox.com \
    --cc=d.whyte@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal