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
Unknown Object (File)
Sat, Sep 19, 6:03 PM
Unknown Object (File)
Sun, Sep 6, 4:53 PM
Unknown Object (File)
Thu, Sep 3, 6:23 AM
Unknown Object (File)
Aug 19 2026, 6:50 PM
Unknown Object (File)
Aug 18 2026, 4:18 PM
Unknown Object (File)
Aug 11 2026, 10:04 AM
Unknown Object (File)
Aug 11 2026, 10:02 AM
Unknown Object (File)
Aug 5 2026, 9:25 AM

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