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)
Wed, Dec 24, 7:12 PM
Unknown Object (File)
Mon, Dec 22, 6:52 PM
Unknown Object (File)
Tue, Dec 9, 10:45 PM
Unknown Object (File)
Mon, Dec 8, 2:36 AM
Unknown Object (File)
Nov 19 2025, 12:47 PM
Unknown Object (File)
Nov 12 2025, 11:16 PM
Unknown Object (File)
Oct 24 2025, 12:30 PM
Unknown Object (File)
Oct 21 2025, 7:22 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