* [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
* [Buildroot] [PATCH v3 1/4] Remove trailing slash from all package site URLs
2015-09-28 16:10 [Buildroot] [PATCH v3 0/4] Cleanup trailing slashed from FOO_SITE Luca Ceresoli
@ 2015-09-28 16:10 ` 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
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: Luca Ceresoli @ 2015-09-28 16:10 UTC (permalink / raw)
To: buildroot
The recommended form is without the trailing slash, and will become
mandatory in a coming commit.
This avoids the need for the $$($(2)_SITE:/=) magic in package/pkg-generic.mk
to avoid double slashes in download URLs, like
"https://mosh.mit.edu//mosh-1.2.5.tar.gz".
^^
Note: this work has already been done in b0b9606530dfc6de4030 a few
months ago and earlier in c7f4b964718bc5a3329b and 4a9eb20de817fa64,
but no check has been added at that time to avoid new slashes to slip
in, and so they did. This time a patch will follow immediately to
prevent future mistakes from being unnoticed.
Mass-replaced with the following command:
git grep -l '_SITE.*/$' | xargs sed -i '/_SITE.*=/s|/$||'
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Changes v2 -> v3:
- rebased on current master.
---
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/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 +-
| 2 +-
package/stress-ng/stress-ng.mk | 2 +-
30 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/package/angularjs/angularjs.mk b/package/angularjs/angularjs.mk
index 1dbd7a7..60dbdb6 100644
--- a/package/angularjs/angularjs.mk
+++ b/package/angularjs/angularjs.mk
@@ -6,7 +6,7 @@
ANGULARJS_VERSION = 1.4.3
ANGULARJS_SOURCE = angular-$(ANGULARJS_VERSION).zip
-ANGULARJS_SITE = https://code.angularjs.org/$(ANGULARJS_VERSION)/
+ANGULARJS_SITE = https://code.angularjs.org/$(ANGULARJS_VERSION)
ANGULARJS_LICENSE = MIT
# There's no separate license file in the archive, so use angular.js instead.
ANGULARJS_LICENSE_FILES = angular.js
diff --git a/package/audit/audit.mk b/package/audit/audit.mk
index 61e876b..6ff0986 100644
--- a/package/audit/audit.mk
+++ b/package/audit/audit.mk
@@ -5,7 +5,7 @@
################################################################################
AUDIT_VERSION = 2.4.3
-AUDIT_SITE = http://people.redhat.com/sgrubb/audit/
+AUDIT_SITE = http://people.redhat.com/sgrubb/audit
AUDIT_LICENSE = GPLv2
AUDIT_LICENSE_FILES = COPYING
diff --git a/package/c-icap-modules/c-icap-modules.mk b/package/c-icap-modules/c-icap-modules.mk
index aeab580..5252a81 100644
--- a/package/c-icap-modules/c-icap-modules.mk
+++ b/package/c-icap-modules/c-icap-modules.mk
@@ -6,7 +6,7 @@
C_ICAP_MODULES_VERSION = 0.3.2
C_ICAP_MODULES_SOURCE = c_icap_modules-$(C_ICAP_MODULES_VERSION).tar.gz
-C_ICAP_MODULES_SITE = http://downloads.sourceforge.net/c-icap/
+C_ICAP_MODULES_SITE = http://downloads.sourceforge.net/c-icap
C_ICAP_MODULES_LICENSE = GPLv2+
C_ICAP_MODULES_LICENSE_FILES = COPYING
C_ICAP_MODULES_DEPENDENCIES = c-icap
diff --git a/package/c-icap/c-icap.mk b/package/c-icap/c-icap.mk
index 0e27cc4..b4defb8 100644
--- a/package/c-icap/c-icap.mk
+++ b/package/c-icap/c-icap.mk
@@ -6,7 +6,7 @@
C_ICAP_VERSION = 0.3.5
C_ICAP_SOURCE = c_icap-$(C_ICAP_VERSION).tar.gz
-C_ICAP_SITE = http://downloads.sourceforge.net/c-icap/
+C_ICAP_SITE = http://downloads.sourceforge.net/c-icap
C_ICAP_LICENSE = LGPLv2.1+
C_ICAP_LICENSE_FILES = COPYING
C_ICAP_INSTALL_STAGING = YES
diff --git a/package/doxygen/doxygen.mk b/package/doxygen/doxygen.mk
index 6f81a56..14dd090 100644
--- a/package/doxygen/doxygen.mk
+++ b/package/doxygen/doxygen.mk
@@ -6,7 +6,7 @@
DOXYGEN_VERSION = 1.8.9.1
DOXYGEN_SOURCE = doxygen-$(DOXYGEN_VERSION).src.tar.gz
-DOXYGEN_SITE = http://ftp.stack.nl/pub/users/dimitri/
+DOXYGEN_SITE = http://ftp.stack.nl/pub/users/dimitri
DOXYGEN_LICENSE = GPLv2
DOXYGEN_LICENSE_FILES = LICENSE
DOXYGEN_DEPENDENCIES = host-flex host-bison
diff --git a/package/drbd-utils/drbd-utils.mk b/package/drbd-utils/drbd-utils.mk
index 75bc854..88d2729 100644
--- a/package/drbd-utils/drbd-utils.mk
+++ b/package/drbd-utils/drbd-utils.mk
@@ -5,7 +5,7 @@
################################################################################
DRBD_UTILS_VERSION = 8.9.4
-DRBD_UTILS_SITE = http://oss.linbit.com/drbd/
+DRBD_UTILS_SITE = http://oss.linbit.com/drbd
DRBD_UTILS_LICENSE = GPLv2+
DRBD_UTILS_LICENSE_FILES = COPYING
DRBD_UTILS_DEPENDENCIES = host-flex
diff --git a/package/ebtables/ebtables.mk b/package/ebtables/ebtables.mk
index e6cdd26..6395930 100644
--- a/package/ebtables/ebtables.mk
+++ b/package/ebtables/ebtables.mk
@@ -6,7 +6,7 @@
EBTABLES_VERSION = 2.0.10-4
EBTABLES_SOURCE = ebtables-v$(EBTABLES_VERSION).tar.gz
-EBTABLES_SITE = http://ftp.netfilter.org/pub/ebtables/
+EBTABLES_SITE = http://ftp.netfilter.org/pub/ebtables
EBTABLES_LICENSE = GPLv2+
EBTABLES_LICENSE_FILES = COPYING
EBTABLES_STATIC = $(if $(BR2_STATIC_LIBS),static)
diff --git a/package/ibrcommon/ibrcommon.mk b/package/ibrcommon/ibrcommon.mk
index 97eced3..5fa2cb5 100644
--- a/package/ibrcommon/ibrcommon.mk
+++ b/package/ibrcommon/ibrcommon.mk
@@ -6,7 +6,7 @@
IBRCOMMON_VERSION = 1.0.1
IBRCOMMON_SOURCE = ibrcommon-$(IBRCOMMON_VERSION).tar.gz
-IBRCOMMON_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/
+IBRCOMMON_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
IBRCOMMON_INSTALL_STAGING = YES
IBRCOMMON_LICENSE = Apache-2.0
IBRCOMMON_LICENSE_FILES = COPYING README
diff --git a/package/ibrdtn-tools/ibrdtn-tools.mk b/package/ibrdtn-tools/ibrdtn-tools.mk
index c9a585d..34f05a6 100644
--- a/package/ibrdtn-tools/ibrdtn-tools.mk
+++ b/package/ibrdtn-tools/ibrdtn-tools.mk
@@ -5,7 +5,7 @@
################################################################################
IBRDTN_TOOLS_VERSION = 1.0.1
-IBRDTN_TOOLS_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/
+IBRDTN_TOOLS_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
IBRDTN_TOOLS_LICENSE = Apache-2.0
IBRDTN_TOOLS_LICENSE_FILES = COPYING
IBRDTN_TOOLS_DEPENDENCIES = ibrcommon ibrdtn host-pkgconf
diff --git a/package/ibrdtn/ibrdtn.mk b/package/ibrdtn/ibrdtn.mk
index f899843..7bd9b9b 100644
--- a/package/ibrdtn/ibrdtn.mk
+++ b/package/ibrdtn/ibrdtn.mk
@@ -6,7 +6,7 @@
IBRDTN_VERSION = 1.0.1
IBRDTN_SOURCE = ibrdtn-$(IBRDTN_VERSION).tar.gz
-IBRDTN_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/
+IBRDTN_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
IBRDTN_INSTALL_STAGING = YES
IBRDTN_LICENSE = Apache-2.0
IBRDTN_LICENSE_FILES = COPYING
diff --git a/package/ibrdtnd/ibrdtnd.mk b/package/ibrdtnd/ibrdtnd.mk
index 8a37fa3..e9fa43d 100644
--- a/package/ibrdtnd/ibrdtnd.mk
+++ b/package/ibrdtnd/ibrdtnd.mk
@@ -6,7 +6,7 @@
IBRDTND_VERSION = 1.0.1
IBRDTND_SOURCE = ibrdtnd-$(IBRDTND_VERSION).tar.gz
-IBRDTND_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/
+IBRDTND_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
IBRDTND_LICENSE = Apache-2.0
IBRDTND_LICENSE_FILES = COPYING
IBRDTND_DEPENDENCIES = ibrdtn ibrcommon
diff --git a/package/ipmiutil/ipmiutil.mk b/package/ipmiutil/ipmiutil.mk
index 6f462b9..4861c81 100644
--- a/package/ipmiutil/ipmiutil.mk
+++ b/package/ipmiutil/ipmiutil.mk
@@ -5,7 +5,7 @@
################################################################################
IPMIUTIL_VERSION = 2.9.5
-IPMIUTIL_SITE = http://sourceforge.net/projects/ipmiutil/files/
+IPMIUTIL_SITE = http://sourceforge.net/projects/ipmiutil/files
IPMIUTIL_LICENSE = BSD-3c
IPMIUTIL_LICENSE_FILES = COPYING
# We're patching configure.ac , lib/Makefile.am and lib/lanplus/Makefile.am
diff --git a/package/libcddb/libcddb.mk b/package/libcddb/libcddb.mk
index 7ddb1e7..96b265a 100644
--- a/package/libcddb/libcddb.mk
+++ b/package/libcddb/libcddb.mk
@@ -6,7 +6,7 @@
LIBCDDB_VERSION = 1.3.2
LIBCDDB_SOURCE = libcddb-$(LIBCDDB_VERSION).tar.bz2
-LIBCDDB_SITE = http://downloads.sourceforge.net/libcddb/
+LIBCDDB_SITE = http://downloads.sourceforge.net/libcddb
LIBCDDB_LICENSE = LGPLv2+
LIBCDDB_LICENSE_FILES = COPYING
LIBCDDB_INSTALL_STAGING = YES
diff --git a/package/libftdi1/libftdi1.mk b/package/libftdi1/libftdi1.mk
index 201feb7..e77f37b 100644
--- a/package/libftdi1/libftdi1.mk
+++ b/package/libftdi1/libftdi1.mk
@@ -6,7 +6,7 @@
LIBFTDI1_VERSION = 1.2
LIBFTDI1_SOURCE = libftdi1-$(LIBFTDI1_VERSION).tar.bz2
-LIBFTDI1_SITE = http://www.intra2net.com/en/developer/libftdi/download/
+LIBFTDI1_SITE = http://www.intra2net.com/en/developer/libftdi/download
LIBFTDI1_INSTALL_STAGING = YES
LIBFTDI1_DEPENDENCIES = libusb
LIBFTDI1_LICENSE = LGPLv2 (libftdi1), GPLv2 with exception (ftdipp1)
diff --git a/package/libpam-radius-auth/libpam-radius-auth.mk b/package/libpam-radius-auth/libpam-radius-auth.mk
index 42acffd..5ed5953 100644
--- a/package/libpam-radius-auth/libpam-radius-auth.mk
+++ b/package/libpam-radius-auth/libpam-radius-auth.mk
@@ -5,7 +5,7 @@
################################################################################
LIBPAM_RADIUS_AUTH_VERSION = 1.4.0
-LIBPAM_RADIUS_AUTH_SITE = ftp://ftp.freeradius.org/pub/radius/
+LIBPAM_RADIUS_AUTH_SITE = ftp://ftp.freeradius.org/pub/radius
LIBPAM_RADIUS_AUTH_SOURCE = pam_radius-$(LIBPAM_RADIUS_AUTH_VERSION).tar.gz
LIBPAM_RADIUS_AUTH_DEPENDENCIES = linux-pam
LIBPAM_RADIUS_AUTH_INSTALL_STAGING = YES
diff --git a/package/lirc-tools/lirc-tools.mk b/package/lirc-tools/lirc-tools.mk
index 6837042..2052b72 100644
--- a/package/lirc-tools/lirc-tools.mk
+++ b/package/lirc-tools/lirc-tools.mk
@@ -6,7 +6,7 @@
LIRC_TOOLS_VERSION = 0.9.2
LIRC_TOOLS_SOURCE = lirc-$(LIRC_TOOLS_VERSION).tar.bz2
-LIRC_TOOLS_SITE = http://downloads.sourceforge.net/project/lirc/LIRC/$(LIRC_TOOLS_VERSION)/
+LIRC_TOOLS_SITE = http://downloads.sourceforge.net/project/lirc/LIRC/$(LIRC_TOOLS_VERSION)
LIRC_TOOLS_LICENSE = GPLv2+
LIRC_TOOLS_LICENSE_FILES = COPYING
LIRC_TOOLS_DEPENDENCIES = host-pkgconf
diff --git a/package/monkey/monkey.mk b/package/monkey/monkey.mk
index 73fbd62..67c8f35 100644
--- a/package/monkey/monkey.mk
+++ b/package/monkey/monkey.mk
@@ -6,7 +6,7 @@
MONKEY_VERSION_MAJOR = 1.5
MONKEY_VERSION = $(MONKEY_VERSION_MAJOR).6
-MONKEY_SITE = http://monkey-project.com/releases/$(MONKEY_VERSION_MAJOR)/
+MONKEY_SITE = http://monkey-project.com/releases/$(MONKEY_VERSION_MAJOR)
MONKEY_LICENSE = Apache-2.0
MONKEY_LICENSE_FILES = LICENSE
diff --git a/package/mono-gtksharp3/mono-gtksharp3.mk b/package/mono-gtksharp3/mono-gtksharp3.mk
index fa63d66..cccfcde 100644
--- a/package/mono-gtksharp3/mono-gtksharp3.mk
+++ b/package/mono-gtksharp3/mono-gtksharp3.mk
@@ -6,7 +6,7 @@
MONO_GTKSHARP3_VERSION_MAJOR = 2.99
MONO_GTKSHARP3_VERSION = $(MONO_GTKSHARP3_VERSION_MAJOR).3
-MONO_GTKSHARP3_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/$(MONO_GTKSHARP3_VERSION_MAJOR)/
+MONO_GTKSHARP3_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/$(MONO_GTKSHARP3_VERSION_MAJOR)
MONO_GTKSHARP3_SOURCE = gtk-sharp-$(MONO_GTKSHARP3_VERSION).tar.xz
MONO_GTKSHARP3_LICENSE = LGPLv2, MIT (cairo)
MONO_GTKSHARP3_LICENSE_FILES = COPYING
diff --git a/package/mosh/mosh.mk b/package/mosh/mosh.mk
index 02954f9..f8c45e8 100644
--- a/package/mosh/mosh.mk
+++ b/package/mosh/mosh.mk
@@ -5,7 +5,7 @@
################################################################################
MOSH_VERSION = 1.2.5
-MOSH_SITE = https://mosh.mit.edu/
+MOSH_SITE = https://mosh.mit.edu
MOSH_DEPENDENCIES = zlib ncurses protobuf openssl host-pkgconf
MOSH_LICENSE = GPLv3+ with exception
MOSH_LICENSE_FILES = COPYING COPYING.iOS
diff --git a/package/openipmi/openipmi.mk b/package/openipmi/openipmi.mk
index 4a813ad..85bd6b4 100644
--- a/package/openipmi/openipmi.mk
+++ b/package/openipmi/openipmi.mk
@@ -5,7 +5,7 @@
################################################################################
OPENIPMI_VERSION = 2.0.21
-OPENIPMI_SITE = http://sourceforge.net/projects/openipmi/files/OpenIPMI%202.0%20Library/
+OPENIPMI_SITE = http://sourceforge.net/projects/openipmi/files/OpenIPMI%202.0%20Library
OPENIPMI_SOURCE = OpenIPMI-2.0.21.tar.gz
OPENIPMI_LICENSE = LGPLv2+, GPLv2+, BSD-3c
OPENIPMI_LICENSE_FILES = COPYING.LIB COPYING COPYING.BSD
diff --git a/package/powertop/powertop.mk b/package/powertop/powertop.mk
index 87da5a4..53be483 100644
--- a/package/powertop/powertop.mk
+++ b/package/powertop/powertop.mk
@@ -5,7 +5,7 @@
################################################################################
POWERTOP_VERSION = 2.7
-POWERTOP_SITE = https://01.org/sites/default/files/downloads/powertop/
+POWERTOP_SITE = https://01.org/sites/default/files/downloads/powertop
POWERTOP_DEPENDENCIES = pciutils ncurses libnl host-gettext host-pkgconf
POWERTOP_LICENSE = GPLv2
POWERTOP_LICENSE_FILES = COPYING
diff --git a/package/python-can/python-can.mk b/package/python-can/python-can.mk
index 53d5e0f..c7b06a5 100644
--- a/package/python-can/python-can.mk
+++ b/package/python-can/python-can.mk
@@ -5,7 +5,7 @@
################################################################################
PYTHON_CAN_VERSION = ae5b6cf
-PYTHON_CAN_SITE = https://bitbucket.org/hardbyte/python-can/get/
+PYTHON_CAN_SITE = https://bitbucket.org/hardbyte/python-can/get
PYTHON_CAN_SOURCE = $(PYTHON_CAN_VERSION).tar.bz2
PYTHON_CAN_LICENSE = LGPLv3
PYTHON_CAN_LICENSE_FILES = LICENSE.txt
diff --git a/package/python-pycli/python-pycli.mk b/package/python-pycli/python-pycli.mk
index 2d83acd..8e48a06 100644
--- a/package/python-pycli/python-pycli.mk
+++ b/package/python-pycli/python-pycli.mk
@@ -6,7 +6,7 @@
PYTHON_PYCLI_VERSION = devel
PYTHON_PYCLI_SOURCE = pyCLI-$(PYTHON_PYCLI_VERSION).tar.gz
-PYTHON_PYCLI_SITE = https://pypi.python.org/packages/source/p/pyCLI/
+PYTHON_PYCLI_SITE = https://pypi.python.org/packages/source/p/pyCLI
PYTHON_PYCLI_LICENSE = ISC-like
PYTHON_PYCLI_LICENSE_FILES = lib/cli/__init__.py
PYTHON_PYCLI_SETUP_TYPE = setuptools
diff --git a/package/python-pyxml/python-pyxml.mk b/package/python-pyxml/python-pyxml.mk
index 40435f4..7ccce8e 100644
--- a/package/python-pyxml/python-pyxml.mk
+++ b/package/python-pyxml/python-pyxml.mk
@@ -6,7 +6,7 @@
PYTHON_PYXML_VERSION = 0.8.4
PYTHON_PYXML_SOURCE = PyXML-$(PYTHON_PYXML_VERSION).tar.gz
-PYTHON_PYXML_SITE = http://downloads.sourceforge.net/project/pyxml/pyxml/$(PYTHON_PYXML_VERSION)/
+PYTHON_PYXML_SITE = http://downloads.sourceforge.net/project/pyxml/pyxml/$(PYTHON_PYXML_VERSION)
PYTHON_PYXML_LICENSE = BSD-3c
PYTHON_PYXML_LICENSE_FILES = LICENCE
PYTHON_PYXML_SETUP_TYPE = distutils
diff --git a/package/python-pyyaml/python-pyyaml.mk b/package/python-pyyaml/python-pyyaml.mk
index ef10dac..f3d7283 100644
--- a/package/python-pyyaml/python-pyyaml.mk
+++ b/package/python-pyyaml/python-pyyaml.mk
@@ -6,7 +6,7 @@
PYTHON_PYYAML_VERSION = 3.11
PYTHON_PYYAML_SOURCE = PyYAML-$(PYTHON_PYYAML_VERSION).tar.gz
-PYTHON_PYYAML_SITE = https://pypi.python.org/packages/source/P/PyYAML/
+PYTHON_PYYAML_SITE = https://pypi.python.org/packages/source/P/PyYAML
PYTHON_PYYAML_SETUP_TYPE = distutils
PYTHON_PYYAML_LICENSE = Python software foundation license v2
PYTHON_PYYAML_LICENSE_FILES = LICENSE
diff --git a/package/quazip/quazip.mk b/package/quazip/quazip.mk
index 178a531..adccf90 100644
--- a/package/quazip/quazip.mk
+++ b/package/quazip/quazip.mk
@@ -5,7 +5,7 @@
################################################################################
QUAZIP_VERSION = 0.7.1
-QUAZIP_SITE = http://sourceforge.net/projects/quazip/files/quazip/$(QUAZIP_VERSION)/
+QUAZIP_SITE = http://sourceforge.net/projects/quazip/files/quazip/$(QUAZIP_VERSION)
QUAZIP_INSTALL_STAGING = YES
QUAZIP_DEPENDENCIES = \
zlib \
diff --git a/package/rapidxml/rapidxml.mk b/package/rapidxml/rapidxml.mk
index 4356d8d..a76a21b 100644
--- a/package/rapidxml/rapidxml.mk
+++ b/package/rapidxml/rapidxml.mk
@@ -6,7 +6,7 @@
RAPIDXML_VERSION = 1.13
RAPIDXML_SOURCE = rapidxml-$(RAPIDXML_VERSION).zip
-RAPIDXML_SITE = http://downloads.sourceforge.net/project/rapidxml/rapidxml/rapidxml%20$(RAPIDXML_VERSION)/
+RAPIDXML_SITE = http://downloads.sourceforge.net/project/rapidxml/rapidxml/rapidxml%20$(RAPIDXML_VERSION)
RAPIDXML_LICENSE = Boost Software License 1.0 or MIT
RAPIDXML_LICENSE_FILES = license.txt
diff --git a/package/setools/setools.mk b/package/setools/setools.mk
index 71301c7..c993171 100644
--- a/package/setools/setools.mk
+++ b/package/setools/setools.mk
@@ -6,7 +6,7 @@
SETOOLS_VERSION = 3.3.8
SETOOLS_SOURCE = setools-$(SETOOLS_VERSION).tar.bz2
-SETOOLS_SITE = https://raw.githubusercontent.com/wiki/TresysTechnology/setools3/files/dists/setools-$(SETOOLS_VERSION)/
+SETOOLS_SITE = https://raw.githubusercontent.com/wiki/TresysTechnology/setools3/files/dists/setools-$(SETOOLS_VERSION)
SETOOLS_DEPENDENCIES = libselinux libsepol sqlite libxml2 bzip2 host-bison
SETOOLS_INSTALL_STAGING = YES
SETOOLS_LICENSE = GPLv2+ LGPLv2.1+
--git a/package/sp-oops-extract/sp-oops-extract.mk b/package/sp-oops-extract/sp-oops-extract.mk
index 5882431..9919807 100644
--- a/package/sp-oops-extract/sp-oops-extract.mk
+++ b/package/sp-oops-extract/sp-oops-extract.mk
@@ -5,7 +5,7 @@
################################################################################
SP_OOPS_EXTRACT_VERSION = 0.0.7-1
-SP_OOPS_EXTRACT_SITE = http://repository.maemo.org/pool/maemo5.0/free/s/sp-oops-extract/
+SP_OOPS_EXTRACT_SITE = http://repository.maemo.org/pool/maemo5.0/free/s/sp-oops-extract
SP_OOPS_EXTRACT_SOURCE = sp-oops-extract_$(SP_OOPS_EXTRACT_VERSION).tar.gz
SP_OOPS_EXTRACT_LICENSE = GPLv2
SP_OOPS_EXTRACT_LICENSE_FILES = COPYING
diff --git a/package/stress-ng/stress-ng.mk b/package/stress-ng/stress-ng.mk
index 7169c2b..114c427 100644
--- a/package/stress-ng/stress-ng.mk
+++ b/package/stress-ng/stress-ng.mk
@@ -5,7 +5,7 @@
################################################################################
STRESS_NG_VERSION = 0.04.16
-STRESS_NG_SITE = http://kernel.ubuntu.com/~cking/tarballs/stress-ng/
+STRESS_NG_SITE = http://kernel.ubuntu.com/~cking/tarballs/stress-ng
STRESS_NG_LICENSE = GPLv2+
STRESS_NG_LICENSE_FILES = COPYING
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash
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-28 16:10 ` Luca Ceresoli
2015-09-28 17:27 ` Baruch Siach
2015-09-30 10:45 ` Thomas Petazzoni
2015-09-28 16:10 ` [Buildroot] [PATCH v3 3/4] docs/manual: FOO_SITE must not have " Luca Ceresoli
2015-09-28 16:10 ` [Buildroot] [PATCH v3 4/4] download: get rid of trailing slash removal hack for FOO_SITE Luca Ceresoli
3 siblings, 2 replies; 14+ messages in thread
From: Luca Ceresoli @ 2015-09-28 16:10 UTC (permalink / raw)
To: buildroot
A trailing slash in FOO_SITE is useless, since Buildroot automatically adds
a slash between FOO_SITE and the filename as appropriate.
Moreover they are 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.
So let's ban trailing slashes entirely. They have all been removed in
a recent commit, now add a check to error out loudly in case a new one
is added.
Example commands to test this check:
$ make busybox-dirclean busybox-source
rm -Rf /home/murray/devel/buildroot/output/build/busybox-1.23.2
busybox-1.23.2.tar.bz2: OK (md5: 7925683d7dd105aabe9b6b618d48cc73)
busybox-1.23.2.tar.bz2: OK (sha1: 7f37193cb249f27630e0b2a2c6c9bbb7b1d24c16)
$
$ make BUSYBOX_SITE=http://www.busybox.net/downloads/ busybox-dirclean busybox-source
rm -Rf /home/murray/devel/buildroot/output/build/busybox-1.23.2
BUSYBOX_SITE (http://www.busybox.net/downloads/) cannot have a trailing slash
make[1]: *** [/home/murray/devel/buildroot/output/build/busybox-1.23.2/.stamp_downloaded] Error 1
make: *** [_all] Error 2
$
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Changed v2 -> v3:
- Simplify the check logic removing a useless "&& true".
- Expand commit log message. This is a pretty important change, so it
should be well justified.
---
package/pkg-generic.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 5201fca..73353aa 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -70,6 +70,8 @@ endif
# Retrieve the archive
$(BUILD_DIR)/%/.stamp_downloaded:
+ @(echo "$($(PKG)_SITE)" | grep -Eq "[^/]$$" || \
+ (echo "$(PKG)_SITE ($($(PKG)_SITE)) cannot have a trailing slash" && false))
$(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
# Only show the download message if it isn't already downloaded
$(Q)for p in $($(PKG)_ALL_DOWNLOADS); do \
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 3/4] docs/manual: FOO_SITE must not have a trailing slash
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-28 16:10 ` [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash Luca Ceresoli
@ 2015-09-28 16:10 ` 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
3 siblings, 1 reply; 14+ messages in thread
From: Luca Ceresoli @ 2015-09-28 16:10 UTC (permalink / raw)
To: buildroot
This has been the best practice since a long time, but it was not
clearly stated in the manual. Now it is mandatory, so mention it
explicitly.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Changed v2 -> v3:
- Improve commit message.
---
docs/manual/adding-packages-generic.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index 4c12b42..40798c0 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -227,7 +227,9 @@ information is (assuming the package name is +libfoo+) :
* +LIBFOO_SITE+ provides the location of the package, which can be a
URL or a local filesystem path. HTTP, FTP and SCP are supported URL
- types for retrieving package tarballs. Git, Subversion, Mercurial,
+ types for retrieving package tarballs. In these cases don't include a
+ trailing slash: it will be added by Buildroot between the directory
+ and the filename as appropriate. Git, Subversion, Mercurial,
and Bazaar are supported URL types for retrieving packages directly
from source code management systems. There is a helper function to make
it easier to download source tarballs from GitHub (refer to
@@ -246,7 +248,7 @@ information is (assuming the package name is +libfoo+) :
+LIBFOO_SITE=http://www.libfoosoftware.org/libfoo+ +
+LIBFOO_SITE=http://svn.xiph.org/trunk/Tremor+ +
+LIBFOO_SITE=/opt/software/libfoo.tar.gz+ +
- +LIBFOO_SITE=$(TOPDIR)/../src/libfoo/+
+ +LIBFOO_SITE=$(TOPDIR)/../src/libfoo+
* +LIBFOO_EXTRA_DOWNLOADS+ is a space-separated list of additional
files that Buildroot should download. If an entry contains +://+
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 4/4] download: get rid of trailing slash removal hack for FOO_SITE
2015-09-28 16:10 [Buildroot] [PATCH v3 0/4] Cleanup trailing slashed from FOO_SITE Luca Ceresoli
` (2 preceding siblings ...)
2015-09-28 16:10 ` [Buildroot] [PATCH v3 3/4] docs/manual: FOO_SITE must not have " Luca Ceresoli
@ 2015-09-28 16:10 ` Luca Ceresoli
3 siblings, 0 replies; 14+ messages in thread
From: Luca Ceresoli @ 2015-09-28 16:10 UTC (permalink / raw)
To: buildroot
Not needed anymore since the URLs have been cleared, the manual states
they are illegal and a check has been introduced to notice future
mistakes.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Changes v2 -> v3:
- move after the commit on docs/manual, update commit message.
Changes v1 -> v2:
- redo on current master.
---
package/pkg-generic.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 73353aa..8491a4f 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -390,7 +390,7 @@ endif
$(2)_ALL_DOWNLOADS = \
$$(foreach p,$$($(2)_SOURCE) $$($(2)_PATCH) $$($(2)_EXTRA_DOWNLOADS),\
$$(if $$(findstring ://,$$(p)),$$(p),\
- $$($(2)_SITE:/=)/$$(p)))
+ $$($(2)_SITE)/$$(p)))
ifndef $(2)_SITE
ifdef $(3)_SITE
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash
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
1 sibling, 1 reply; 14+ messages in thread
From: Baruch Siach @ 2015-09-28 17:27 UTC (permalink / raw)
To: buildroot
Hi Luca,
On Mon, Sep 28, 2015 at 06:10:32PM +0200, Luca Ceresoli wrote:
> A trailing slash in FOO_SITE is useless, since Buildroot automatically adds
> a slash between FOO_SITE and the filename as appropriate.
>
> Moreover they are potentially armful, which led to introducing a workaround
harmful?
> to strip them:
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash
2015-09-28 17:27 ` Baruch Siach
@ 2015-09-28 19:00 ` Luca Ceresoli
0 siblings, 0 replies; 14+ messages in thread
From: Luca Ceresoli @ 2015-09-28 19:00 UTC (permalink / raw)
To: buildroot
Dear Baruch,
Baruch Siach wrote:
> Hi Luca,
>
> On Mon, Sep 28, 2015 at 06:10:32PM +0200, Luca Ceresoli wrote:
>> A trailing slash in FOO_SITE is useless, since Buildroot automatically adds
>> a slash between FOO_SITE and the filename as appropriate.
>>
>> Moreover they are potentially armful, which led to introducing a workaround
>
> harmful?
Of course!
Thanks for spotting it.
--
Luca
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash
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-30 10:45 ` Thomas Petazzoni
2015-10-03 12:01 ` Arnout Vandecappelle
1 sibling, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2015-09-30 10:45 UTC (permalink / raw)
To: buildroot
Dear Luca Ceresoli,
On Mon, 28 Sep 2015 18:10:32 +0200, Luca Ceresoli wrote:
> # Retrieve the archive
> $(BUILD_DIR)/%/.stamp_downloaded:
> + @(echo "$($(PKG)_SITE)" | grep -Eq "[^/]$$" || \
> + (echo "$(PKG)_SITE ($($(PKG)_SITE)) cannot have a trailing slash" && false))
You could use $(error ...) instead:
> + @(echo "$($(PKG)_SITE)" | grep -Eq "[^/]$$" || \
> + $(error "$(PKG)_SITE ($($(PKG)_SITE)) cannot have a trailing slash"))
I am wondering if there are indeed no places left where a final / could
sneak in. For example, when you specify a custom tarball location for
packages like U-Boot, the Linux kernel and so on.
For Linux and U-Boot, it is taken care of:
UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL)))
LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL)))
But for example, for the external toolchain site:
TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
I believe this means that the TOOLCHAIN_EXTERNAL_SITE variable will
contain a final /. But that's indeed the only case I could find from a
quick inspection.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 1/4] Remove trailing slash from all package site URLs
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
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2015-09-30 10:47 UTC (permalink / raw)
To: buildroot
Dear Luca Ceresoli,
On Mon, 28 Sep 2015 18:10:31 +0200, Luca Ceresoli wrote:
> The recommended form is without the trailing slash, and will become
> mandatory in a coming commit.
>
> This avoids the need for the $$($(2)_SITE:/=) magic in package/pkg-generic.mk
> to avoid double slashes in download URLs, like
> "https://mosh.mit.edu//mosh-1.2.5.tar.gz".
> ^^
>
> Note: this work has already been done in b0b9606530dfc6de4030 a few
> months ago and earlier in c7f4b964718bc5a3329b and 4a9eb20de817fa64,
> but no check has been added at that time to avoid new slashes to slip
> in, and so they did. This time a patch will follow immediately to
> prevent future mistakes from being unnoticed.
>
> Mass-replaced with the following command:
>
> git grep -l '_SITE.*/$' | xargs sed -i '/_SITE.*=/s|/$||'
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>
> ---
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 3/4] docs/manual: FOO_SITE must not have a trailing slash
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
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2015-10-02 20:13 UTC (permalink / raw)
To: buildroot
Dear Luca Ceresoli,
On Mon, 28 Sep 2015 18:10:33 +0200, Luca Ceresoli wrote:
> This has been the best practice since a long time, but it was not
> clearly stated in the manual. Now it is mandatory, so mention it
> explicitly.
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>
> ---
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash
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
0 siblings, 2 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2015-10-03 12:01 UTC (permalink / raw)
To: buildroot
On 30-09-15 11:45, Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Mon, 28 Sep 2015 18:10:32 +0200, Luca Ceresoli wrote:
>
>> # Retrieve the archive
>> $(BUILD_DIR)/%/.stamp_downloaded:
>> + @(echo "$($(PKG)_SITE)" | grep -Eq "[^/]$$" || \
>> + (echo "$(PKG)_SITE ($($(PKG)_SITE)) cannot have a trailing slash" && false))
>
> You could use $(error ...) instead:
>
>> + @(echo "$($(PKG)_SITE)" | grep -Eq "[^/]$$" || \
>> + $(error "$(PKG)_SITE ($($(PKG)_SITE)) cannot have a trailing slash"))
That's not going to work AFAIK. The whole thing would have to be converted to a
make condition.
BTW, Luca, you should indicate in your commit message why this has to be part
of .stamp_downloaded and not a static check in inner-generic-package.
>
> I am wondering if there are indeed no places left where a final / could
> sneak in. For example, when you specify a custom tarball location for
> packages like U-Boot, the Linux kernel and so on.
>
> For Linux and U-Boot, it is taken care of:
>
> UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL)))
>
> LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL)))
>
> But for example, for the external toolchain site:
>
> TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
>
> I believe this means that the TOOLCHAIN_EXTERNAL_SITE variable will
> contain a final /. But that's indeed the only case I could find from a
> quick inspection.
Well, to be consistent, the removal should not be done for U-Boot or Linux
either, and instead the user should get this error message when he builds.
Regards,
Arnout
>
> Best regards,
>
> Thomas
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash
2015-10-03 12:01 ` Arnout Vandecappelle
@ 2015-10-03 14:01 ` Arnout Vandecappelle
2015-10-03 15:07 ` Luca Ceresoli
1 sibling, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2015-10-03 14:01 UTC (permalink / raw)
To: buildroot
On 03-10-15 13:01, Arnout Vandecappelle wrote:
> On 30-09-15 11:45, Thomas Petazzoni wrote:
>> > Dear Luca Ceresoli,
>> >
>> > On Mon, 28 Sep 2015 18:10:32 +0200, Luca Ceresoli wrote:
>> >
>>> >> # Retrieve the archive
>>> >> $(BUILD_DIR)/%/.stamp_downloaded:
>>> >> + @(echo "$($(PKG)_SITE)" | grep -Eq "[^/]$$" || \
>>> >> + (echo "$(PKG)_SITE ($($(PKG)_SITE)) cannot have a trailing slash" && false))
>> >
>> > You could use $(error ...) instead:
>> >
>>> >> + @(echo "$($(PKG)_SITE)" | grep -Eq "[^/]$$" || \
>>> >> + $(error "$(PKG)_SITE ($($(PKG)_SITE)) cannot have a trailing slash"))
> That's not going to work AFAIK. The whole thing would have to be converted to a
> make condition.
E.g.:
ifeq ($(patsubst %/,ERROR,$($(PKG)_SITE)),ERROR)
$(error ...)
endif
Or if that doesn't work:
ifeq ($(shell echo "$($(PKG)_SITE)" | grep -Eq "[^/]$$" || echo n),n)
$(error ...)
endif
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash
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
1 sibling, 1 reply; 14+ messages in thread
From: Luca Ceresoli @ 2015-10-03 15:07 UTC (permalink / raw)
To: buildroot
Hi Arnout, Thomas,
Arnout Vandecappelle wrote:
[...]
>
>>
>> I am wondering if there are indeed no places left where a final / could
>> sneak in. For example, when you specify a custom tarball location for
>> packages like U-Boot, the Linux kernel and so on.
>>
>> For Linux and U-Boot, it is taken care of:
>>
>> UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL)))
>>
>> LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL)))
>>
>> But for example, for the external toolchain site:
>>
>> TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
>>
>> I believe this means that the TOOLCHAIN_EXTERNAL_SITE variable will
>> contain a final /. But that's indeed the only case I could find from a
>> quick inspection.
>
> Well, to be consistent, the removal should not be done for U-Boot or Linux
> either, and instead the user should get this error message when he builds.
But FOO_SITE is generated internally when the user chooses to fetch from
a custom URL. The user has no access to FOO_SITE in these cases, so
Buildroot should strip them.
So I guess I'll add a patsubst to toolchain-external too, and hunt for
other places where it might be needed.
--
Luca
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH v3 2/4] pkg-generic: prevent _SITE URLs with a trailing slash
2015-10-03 15:07 ` Luca Ceresoli
@ 2015-10-03 15:14 ` Arnout Vandecappelle
0 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2015-10-03 15:14 UTC (permalink / raw)
To: buildroot
On 03-10-15 16:07, Luca Ceresoli wrote:
> Hi Arnout, Thomas,
>
> Arnout Vandecappelle wrote:
> [...]
>>
>>>
>>> I am wondering if there are indeed no places left where a final / could
>>> sneak in. For example, when you specify a custom tarball location for
>>> packages like U-Boot, the Linux kernel and so on.
>>>
>>> For Linux and U-Boot, it is taken care of:
>>>
>>> UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL)))
>>>
>>> LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL)))
>>>
>>> But for example, for the external toolchain site:
>>>
>>> TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
>>>
>>> I believe this means that the TOOLCHAIN_EXTERNAL_SITE variable will
>>> contain a final /. But that's indeed the only case I could find from a
>>> quick inspection.
>>
>> Well, to be consistent, the removal should not be done for U-Boot or Linux
>> either, and instead the user should get this error message when he builds.
>
> But FOO_SITE is generated internally when the user chooses to fetch from
> a custom URL. The user has no access to FOO_SITE in these cases, so
> Buildroot should strip them.
You're completely right, sorry!
> So I guess I'll add a patsubst to toolchain-external too, and hunt for
> other places where it might be needed.
I can't think of an easy grep for that :-(
Regards,
Arnout
--
Arnout Vandecappelle arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ 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