Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/4] Cleanup trailing slashed from FOO_SITE
@ 2015-09-28 16:10 Luca Ceresoli
  2015-09-28 16:10 ` [Buildroot] [PATCH v3 1/4] Remove trailing slash from all package site URLs Luca Ceresoli
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Luca Ceresoli @ 2015-09-28 16:10 UTC (permalink / raw)
  To: buildroot

Hi,

after several months since v1 [0], here's the respin of my patch set to
clean up the form of FOO_SITE variables by removing all trailing slashes.

Those slashes are useless and potentially armful, which led to introducing a
workaround to strip them:

    commit 1cbffbd015106ea90fe49e27433375769dc1035b
    Author: Shawn J. Goff <shawn7400@gmail.com>
    Date:   Fri Apr 12 09:40:30 2013 +0000

        eliminate double slashes caused by FOO_SITE ending in a slash
    
        When a FOO_SITE variable ends in a slash and gets joined with a
        FOO_SOURCE variable like $(FOO_SITE)/$(FOO_SOURCE), the resulting URI
        has a double slash. While double-slashes are fine in unix paths, they
        are reserved in URIs - the part following '//' must be an authority.
    
        Signed-off-by: Shawn J. Goff <shawn7400@gmail.com>
        Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

v1 removed all these slashes but did not add a check to prevent some more
ones from slipping in new pagkages, and of course they did. So I took
Thomas' suggestion to add a check, and here it is.

In this patchset first I remove the slashes that are currently in
Buildroot, then I add a check so it doesn't happen again unnoticed. Finally
I remove the workaround that is not needed anymore and explicitly state in
the manual that trailing slashes are incorrect.

This work has been inspired by this comment from Arnout Vandecappelle [1]:
>>>>>> >>> >> > +else
>>>>>> >>> >> > +ifneq ($$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_SOURCE))
>>>>>> >>> >> > +          $(call DOWNLOAD,$$($(2)_ACTUAL_SOURCE_SITE:/=)/$$($(2)$($(PKG)_SITE:/=)_ACTUAL_SOURCE_TARBALL))
>> > > 
>> > >  I think the $($(PKG)_SITE:/=) construct was just introduced because for some
>> > > packages, the _SITE ends with a / and that should be stripped, and we were too
>> > > lazy to fix the packages. Hm, looks like all the the external toolchain _SITEs
>> > > end with a /...

[0] http://lists.busybox.net/pipermail/buildroot/2015-March/121502.html
[1] https://patchwork.ozlabs.org/patch/424980/

Luca Ceresoli (4):
  Remove trailing slash from all package site URLs
  pkg-generic: prevent _SITE URLs with a trailing slash
  docs/manual: FOO_SITE must not have a trailing slash
  download: get rid of trailing slash removal hack for FOO_SITE

 docs/manual/adding-packages-generic.txt          | 6 ++++--
 package/angularjs/angularjs.mk                   | 2 +-
 package/audit/audit.mk                           | 2 +-
 package/c-icap-modules/c-icap-modules.mk         | 2 +-
 package/c-icap/c-icap.mk                         | 2 +-
 package/doxygen/doxygen.mk                       | 2 +-
 package/drbd-utils/drbd-utils.mk                 | 2 +-
 package/ebtables/ebtables.mk                     | 2 +-
 package/ibrcommon/ibrcommon.mk                   | 2 +-
 package/ibrdtn-tools/ibrdtn-tools.mk             | 2 +-
 package/ibrdtn/ibrdtn.mk                         | 2 +-
 package/ibrdtnd/ibrdtnd.mk                       | 2 +-
 package/ipmiutil/ipmiutil.mk                     | 2 +-
 package/libcddb/libcddb.mk                       | 2 +-
 package/libftdi1/libftdi1.mk                     | 2 +-
 package/libpam-radius-auth/libpam-radius-auth.mk | 2 +-
 package/lirc-tools/lirc-tools.mk                 | 2 +-
 package/monkey/monkey.mk                         | 2 +-
 package/mono-gtksharp3/mono-gtksharp3.mk         | 2 +-
 package/mosh/mosh.mk                             | 2 +-
 package/openipmi/openipmi.mk                     | 2 +-
 package/pkg-generic.mk                           | 4 +++-
 package/powertop/powertop.mk                     | 2 +-
 package/python-can/python-can.mk                 | 2 +-
 package/python-pycli/python-pycli.mk             | 2 +-
 package/python-pyxml/python-pyxml.mk             | 2 +-
 package/python-pyyaml/python-pyyaml.mk           | 2 +-
 package/quazip/quazip.mk                         | 2 +-
 package/rapidxml/rapidxml.mk                     | 2 +-
 package/setools/setools.mk                       | 2 +-
 package/sp-oops-extract/sp-oops-extract.mk       | 2 +-
 package/stress-ng/stress-ng.mk                   | 2 +-
 32 files changed, 37 insertions(+), 33 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-10-03 15:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28 16:10 [Buildroot] [PATCH v3 0/4] Cleanup trailing slashed from FOO_SITE Luca Ceresoli
2015-09-28 16:10 ` [Buildroot] [PATCH v3 1/4] Remove trailing slash from all package site URLs Luca Ceresoli
2015-09-30 10:47   ` Thomas Petazzoni
2015-09-28 16:10 ` [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash Luca Ceresoli
2015-09-28 17:27   ` Baruch Siach
2015-09-28 19:00     ` Luca Ceresoli
2015-09-30 10:45   ` Thomas Petazzoni
2015-10-03 12:01     ` Arnout Vandecappelle
2015-10-03 14:01       ` Arnout Vandecappelle
2015-10-03 15:07       ` Luca Ceresoli
2015-10-03 15:14         ` Arnout Vandecappelle
2015-09-28 16:10 ` [Buildroot] [PATCH v3 3/4] docs/manual: FOO_SITE must not have " Luca Ceresoli
2015-10-02 20:13   ` Thomas Petazzoni
2015-09-28 16:10 ` [Buildroot] [PATCH v3 4/4] download: get rid of trailing slash removal hack for FOO_SITE Luca Ceresoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox