Page MenuHomeFreeBSD

Make pkg use environment variables specified in pkg.conf
ClosedPublic

Authored by moritz_schmi.tt on Apr 18 2021, 2:15 PM.
Tags
None
Referenced Files
F132981218: D29820.id87648.diff
Tue, Oct 21, 7:22 PM
Unknown Object (File)
Thu, Oct 16, 10:14 AM
Unknown Object (File)
Thu, Oct 16, 10:14 AM
Unknown Object (File)
Thu, Oct 16, 10:14 AM
Unknown Object (File)
Wed, Oct 15, 10:30 PM
Unknown Object (File)
Sat, Sep 27, 12:27 AM
Unknown Object (File)
Wed, Sep 24, 3:40 AM
Unknown Object (File)
Sep 21 2025, 9:47 PM

Details

Summary

Modify /usr/sbin/pkg to use environment variables specified in pkg.conf.
This allows control over underlying libraries like fetch(3), which can
be configured by setting HTTP_PROXY.

Test Plan

On a freshly installed FreeBSD system that needs to use a proxy for
accessing the internet, set http_proxy as shown in the example in
pkg.conf(5). Without the patch bootstrapping full pkg does not work;
with the patch, everything works as expected.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable