From owner-freebsd-bugs@freebsd.org Wed Jan 24 16:32:12 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA72EEDBC0D for ; Wed, 24 Jan 2018 16:32:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 673D0681F2 for ; Wed, 24 Jan 2018 16:32:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 9A26F1AE2C for ; Wed, 24 Jan 2018 16:32:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w0OGWBZF062506 for ; Wed, 24 Jan 2018 16:32:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w0OGWBn3062504 for freebsd-bugs@FreeBSD.org; Wed, 24 Jan 2018 16:32:11 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Wed, 24 Jan 2018 16:32:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.1-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: vd@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 16:32:13 -0000 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.=