Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2018 16:32:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 225434] [patch] Treat set but empty environment variables as unset in /usr/libexec/phttpget
Message-ID:  <bug-225434-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225434

            Bug ID: 225434
           Summary: [patch] Treat set but empty environment variables as
                    unset in /usr/libexec/phttpget
           Product: Base System
           Version: 11.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: vd@FreeBSD.org
          Keywords: patch

Created attachment 190037
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D190037&action=
=3Dedit
patch to treat set-to-empty environment variables as not-set

If http_proxy is set to an empty string in the environment of portsnap, then
this is propagated to /usr/libexec/phttpget (which is used by portsnap) and
this tool then fails, but the error is silenced and ignored by portsnap,
leading to "metadata corrupt" error down the execution of portsnap:

root# portsnap --debug --interactive fetch
...
Fetching 5 metadata files...
/usr/libexec/phttpget ec2-eu-west-1.portsnap.freebsd.org f/34c6...
phttpget: host =3D , port =3D 3128: hostname nor servname provided, or not =
known
Verifying 34c6... /usr/sbin/portsnap: cannot open 34c6....gz: No such file =
or
directory
metadata is corrupt.

The mailing lists and forums are littered with similar reports, for example:
https://forums.freebsd.org/threads/901/page-2

A shell script may contain http_proxy=3D${http_proxy:-""} in which case
http_proxy will be set to an empty string and phttpget should treat that as=
 if
the variable is not set (no proxy provided).

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-225434-8>