Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Feb 2023 06:59:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 269432] ports: FETCH_ARGS / FETCH_CMD can't accept a string with spaces
Message-ID:  <bug-269432-7788@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 269432
           Summary: ports: FETCH_ARGS / FETCH_CMD can't accept a string
                    with spaces
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: pat@patmaddox.com

Created attachment 240020
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D240020&action=
=3Dedit
fix for string with spaces in FETCH_ARGS

Context: I am writing a port that fetches from a private GitHub repository,=
 to
be built on our company's internal poudriere system. It's possible to downl=
oad
zips from private repos by passing header e.g. "Authorization: token
<some-token-here>".

/usr/bin/fetch doesn't support HTTP headers as far as I can tell, so I am u=
sing
curl.

https://github.com/freebsd/freebsd-ports/blob/main/Mk/Scripts/do-fetch.sh#L=
151
currently expands the FETCH_BINARY / FETCH_ARGS etc combo in a way that
prevents it from working. Specifically, it turns the string "foo bar" into
'"foo' 'bar"'.

I have attached a one-line diff that fixes it. I have built 600+ packages u=
sing
poudriere with this fix in place.

--=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-269432-7788>