* [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers
@ 2011-10-19 7:25 Thomas De Schampheleire
2011-10-19 7:25 ` [Buildroot] [PATCH 1 of 2 v2] GENTARGETS: add support for scp:// Thomas De Schampheleire
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Thomas De Schampheleire @ 2011-10-19 7:25 UTC (permalink / raw)
To: buildroot
This patch series adds download methods for scp and Mercurial.
Documentation was updated in the first version of this series, but this update
was left out in this series because of the move to asciidoc that is not yet
complete. Once the new documentation format is in master, it needs to be
updated with these new features.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v2: update scp patch based on comments.
Config.in | 17 ++++++++++++++++-
package/Makefile.package.in | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 91 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 1 of 2 v2] GENTARGETS: add support for scp://
2011-10-19 7:25 [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers Thomas De Schampheleire
@ 2011-10-19 7:25 ` Thomas De Schampheleire
2011-10-25 8:59 ` Thomas De Schampheleire
2011-11-27 21:37 ` Peter Korsgaard
2011-10-19 7:25 ` [Buildroot] [PATCH 2 of 2 v2] Add support for packages stored in Mercurial (hg) repositories Thomas De Schampheleire
` (2 subsequent siblings)
3 siblings, 2 replies; 9+ messages in thread
From: Thomas De Schampheleire @ 2011-10-19 7:25 UTC (permalink / raw)
To: buildroot
This patch adds support for scp:// both for use in the package Makefiles, as for
the BR2_PRIMARY_SITE variable.
This patch was based on the work of Richard Guy Briggs
(see https://bugs.busybox.net/show_bug.cgi?id=3343).
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v2: update based on comments of Thomas Petazzoni
Config.in | 13 ++++++++++++-
package/Makefile.package.in | 55
+++++++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 61 insertions(+), 7 deletions(-)
diff --git a/Config.in b/Config.in
--- a/Config.in
+++ b/Config.in
@@ -36,6 +36,14 @@ config BR2_LOCALFILES
string "Local files retrieval command"
default "cp"
+config BR2_SCP
+ string "Secure copy (scp) command"
+ default "scp"
+
+config BR2_SSH
+ string "Secure shell (ssh) command"
+ default "ssh"
+
config BR2_ZCAT
string "zcat command"
default "gzip -d -c"
@@ -102,7 +110,10 @@ config BR2_PRIMARY_SITE
Primary site to download from. If this option is set then buildroot
will try to download package source first from this site and try the
default if the file is not found.
- NOTE: This only works for packages using the Makefile.autotools.in
+ Valid URIs are URIs recognized by $(WGET) and scp URIs of the form
+ scp://[user@]host:path .
+ NOTE: This works for all packages using the central package
+ infrastructure (generic, autotools, cmake, ...)
config BR2_BACKUP_SITE
string "Backup download site"
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -92,6 +92,8 @@ WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET
SVN:=$(call qstrip,$(BR2_SVN))
BZR:=$(call qstrip,$(BR2_BZR))
GIT:=$(call qstrip,$(BR2_GIT))
+SCP:=$(call qstrip,$(BR2_SCP)) $(QUIET)
+SSH:=$(call qstrip,$(BR2_SSH)) $(QUIET)
LOCALFILES:=$(call qstrip,$(BR2_LOCALFILES))
# Default spider mode is 'DOWNLOAD'. Other possible values are 'SOURCE_CHECK'
@@ -104,20 +106,39 @@ ifeq ($(DL_DIR),)
DL_DIR:=$(TOPDIR)/dl
endif
+#
+# URI scheme helper functions
+# Example URIs:
+# * http://www.example.com/dir/file
+# * scp://www.example.com:dir/file (with domainseparator :)
+#
+# geturischeme: http
+geturischeme=$(firstword $(subst ://, ,$(call qstrip,$(1))))
+# stripurischeme: www.example.com/dir/file
+stripurischeme=$(lastword $(subst ://, ,$(call qstrip,$(1))))
+# domain: www.example.com
+domain=$(firstword $(subst $(call domainseparator,$(2)), ,$(call stripurischeme,$(1))))
+# notdomain: dir/file
+notdomain=$(patsubst $(call domain,$(1),$(2))$(call domainseparator,$(2))%,%,$(call stripurischeme,$(1)))
+#
+# default domainseparator is /, specify alternative value as first argument
+domainseparator=$(if $(1),$(1),/)
+
################################################################################
# The DOWNLOAD_{GIT,SVN,BZR,LOCALFILES} helpers are in charge of getting a
# working copy of the source repository for their corresponding SCM,
# checking out the requested version / commit / tag, and create an
-# archive out of it. DOWNLOAD_WGET is the normal wget-based download
+# archive out of it. DOWNLOAD_SCP uses scp to obtain a remote file with
+# ssh authentication. DOWNLOAD_WGET is the normal wget-based download
# mechanism.
#
-# The SOURCE_CHECK_{GIT,SVN,BZR,WGET,LOCALFILES} helpers are in charge of simply
-# checking that the source is available for download. This can be used
+# The SOURCE_CHECK_{GIT,SVN,BZR,WGET,LOCALFILES,SCP} helpers are in charge of
+# simply checking that the source is available for download. This can be used
# to make sure one will be able to get all the sources needed for
# one's build configuration.
#
-# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET,LOCALFILES} helpers simply output to
-# the console the names of the files that will be downloaded, or path
+# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET,LOCALFILES,SCP} helpers simply output
+# to the console the names of the files that will be downloaded, or path
# and revision of the source repositories, producing a list of all the
# "external dependencies" of a given build configuration.
################################################################################
@@ -176,6 +197,22 @@ define SHOW_EXTERNAL_DEPS_SVN
echo $($(PKG)_SOURCE)
endef
+# SCP URIs should be of the form scp://[user@]host:filepath
+# Note that filepath is relative to the user's home directory, so you may want
+# to prepend the path with a slash: scp://[user@]host:/absolutepath
+define DOWNLOAD_SCP
+ test -e $(DL_DIR)/$(2) || \
+ $(SCP) $(call stripurischeme,$(call qstrip,$(1)))/$(2) $(DL_DIR)
+endef
+
+define SOURCE_CHECK_SCP
+ $(SSH) $(call domain,$(1),:) ls $(call notdomain,$(1)/$(2),:) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_SCP
+ echo $(2)
+endef
+
define DOWNLOAD_WGET
test -e $(DL_DIR)/$(2) || \
@@ -218,7 +255,10 @@ endef
define DOWNLOAD
$(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
- $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ; \
+ case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \
+ scp) $(call $(DL_MODE)_SCP,$(BR2_PRIMARY_SITE),$(2)) && exit ;; \
+ *) $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ;; \
+ esac ; \
fi ; \
if test -n "$(1)" ; then \
case "$($(PKG)_SITE_METHOD)" in \
@@ -226,6 +266,7 @@ define DOWNLOAD
svn) $($(DL_MODE)_SVN) && exit ;; \
bzr) $($(DL_MODE)_BZR) && exit ;; \
file) $($(DL_MODE)_LOCALFILES) && exit ;; \
+ scp) $($(DL_MODE)_SCP) && exit ;; \
*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
esac ; \
fi ; \
@@ -655,6 +696,8 @@ else ifeq ($$($(2)_SITE_METHOD),git)
DL_TOOLS_DEPENDENCIES += git
else ifeq ($$($(2)_SITE_METHOD),bzr)
DL_TOOLS_DEPENDENCIES += bzr
+else ifeq ($$($(2)_SITE_METHOD),scp)
+DL_TOOLS_DEPENDENCIES += scp ssh
endif # SITE_METHOD
endif # $(2)_KCONFIG_VAR
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 2 of 2 v2] Add support for packages stored in Mercurial (hg) repositories
2011-10-19 7:25 [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers Thomas De Schampheleire
2011-10-19 7:25 ` [Buildroot] [PATCH 1 of 2 v2] GENTARGETS: add support for scp:// Thomas De Schampheleire
@ 2011-10-19 7:25 ` Thomas De Schampheleire
2011-10-25 9:00 ` Thomas De Schampheleire
2011-11-27 21:39 ` Peter Korsgaard
2011-10-25 8:59 ` [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers Thomas De Schampheleire
2011-11-13 20:43 ` Thomas De Schampheleire
3 siblings, 2 replies; 9+ messages in thread
From: Thomas De Schampheleire @ 2011-10-19 7:25 UTC (permalink / raw)
To: buildroot
Add support for packages stored in Mercurial (hg) repositories.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
Config.in | 4 ++++
package/Makefile.package.in | 33 +++++++++++++++++++++++++++++----
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/Config.in b/Config.in
--- a/Config.in
+++ b/Config.in
@@ -44,6 +44,10 @@ config BR2_SSH
string "Secure shell (ssh) command"
default "ssh"
+config BR2_HG
+ string "Mercurial (hg) command"
+ default "hg"
+
config BR2_ZCAT
string "zcat command"
default "gzip -d -c"
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -92,6 +92,7 @@ WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET
SVN:=$(call qstrip,$(BR2_SVN))
BZR:=$(call qstrip,$(BR2_BZR))
GIT:=$(call qstrip,$(BR2_GIT))
+HG:=$(call qstrip,$(BR2_HG)) $(QUIET)
SCP:=$(call qstrip,$(BR2_SCP)) $(QUIET)
SSH:=$(call qstrip,$(BR2_SSH)) $(QUIET)
LOCALFILES:=$(call qstrip,$(BR2_LOCALFILES))
@@ -125,20 +126,20 @@ notdomain=$(patsubst $(call domain,$(1),
domainseparator=$(if $(1),$(1),/)
################################################################################
-# The DOWNLOAD_{GIT,SVN,BZR,LOCALFILES} helpers are in charge of getting a
+# The DOWNLOAD_{GIT,SVN,BZR,HG,LOCALFILES} helpers are in charge of getting a
# working copy of the source repository for their corresponding SCM,
# checking out the requested version / commit / tag, and create an
# archive out of it. DOWNLOAD_SCP uses scp to obtain a remote file with
# ssh authentication. DOWNLOAD_WGET is the normal wget-based download
# mechanism.
#
-# The SOURCE_CHECK_{GIT,SVN,BZR,WGET,LOCALFILES,SCP} helpers are in charge of
+# The SOURCE_CHECK_{GIT,SVN,BZR,HG,WGET,LOCALFILES,SCP} helpers are in charge of
# simply checking that the source is available for download. This can be used
# to make sure one will be able to get all the sources needed for
# one's build configuration.
#
-# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET,LOCALFILES,SCP} helpers simply output
-# to the console the names of the files that will be downloaded, or path
+# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,HG,WGET,LOCALFILES,SCP} helpers simply
+# output to the console the names of the files that will be downloaded, or path
# and revision of the source repositories, producing a list of all the
# "external dependencies" of a given build configuration.
################################################################################
@@ -214,6 +215,27 @@ define SHOW_EXTERNAL_DEPS_SCP
endef
+define DOWNLOAD_HG
+ test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+ (pushd $(DL_DIR) > /dev/null && \
+ $(HG) clone --noupdate --rev $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
+ $(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz --prefix $($(PKG)_BASE_NAME)/ \
+ --rev $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE) && \
+ rm -rf $($(PKG)_DL_DIR) && \
+ popd > /dev/null)
+endef
+
+# TODO: improve to check that the given PKG_DL_VERSION exists on the remote
+# repository
+define SOURCE_CHECK_HG
+ $(HG) incoming --force -l1 $($(PKG)_SITE) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_HG
+ echo $($(PKG)_SOURCE)
+endef
+
+
define DOWNLOAD_WGET
test -e $(DL_DIR)/$(2) || \
$(WGET) -P $(DL_DIR) $(call qstrip,$(1))/$(2)
@@ -267,6 +289,7 @@ define DOWNLOAD
bzr) $($(DL_MODE)_BZR) && exit ;; \
file) $($(DL_MODE)_LOCALFILES) && exit ;; \
scp) $($(DL_MODE)_SCP) && exit ;; \
+ hg) $($(DL_MODE)_HG) && exit ;; \
*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
esac ; \
fi ; \
@@ -698,6 +721,8 @@ else ifeq ($$($(2)_SITE_METHOD),bzr)
DL_TOOLS_DEPENDENCIES += bzr
else ifeq ($$($(2)_SITE_METHOD),scp)
DL_TOOLS_DEPENDENCIES += scp ssh
+else ifeq ($$($(2)_SITE_METHOD),hg)
+DL_TOOLS_DEPENDENCIES += hg
endif # SITE_METHOD
endif # $(2)_KCONFIG_VAR
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers
2011-10-19 7:25 [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers Thomas De Schampheleire
2011-10-19 7:25 ` [Buildroot] [PATCH 1 of 2 v2] GENTARGETS: add support for scp:// Thomas De Schampheleire
2011-10-19 7:25 ` [Buildroot] [PATCH 2 of 2 v2] Add support for packages stored in Mercurial (hg) repositories Thomas De Schampheleire
@ 2011-10-25 8:59 ` Thomas De Schampheleire
2011-11-13 20:43 ` Thomas De Schampheleire
3 siblings, 0 replies; 9+ messages in thread
From: Thomas De Schampheleire @ 2011-10-25 8:59 UTC (permalink / raw)
To: buildroot
On Wed, Oct 19, 2011 at 5:06 PM, Thomas De Schampheleire
<patrickdepinguin+buildroot@gmail.com> wrote:
> This patch series adds download methods for scp and Mercurial.
>
> Documentation was updated in the first version of this series, but this update
> was left out in this series because of the move to asciidoc that is not yet
> complete. Once the new documentation format is in master, it needs to be
> updated with these new features.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
> ---
> v2: update scp patch based on comments.
>
> ?Config.in ? ? ? ? ? ? ? ? ? | ?17 ++++++++++++++++-
> ?package/Makefile.package.in | ?82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
> ?2 files changed, 91 insertions(+), 8 deletions(-)
>
>
>
bump
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 1 of 2 v2] GENTARGETS: add support for scp://
2011-10-19 7:25 ` [Buildroot] [PATCH 1 of 2 v2] GENTARGETS: add support for scp:// Thomas De Schampheleire
@ 2011-10-25 8:59 ` Thomas De Schampheleire
2011-11-27 21:37 ` Peter Korsgaard
1 sibling, 0 replies; 9+ messages in thread
From: Thomas De Schampheleire @ 2011-10-25 8:59 UTC (permalink / raw)
To: buildroot
On Wed, Oct 19, 2011 at 5:06 PM, Thomas De Schampheleire
<patrickdepinguin+buildroot@gmail.com> wrote:
> This patch adds support for scp:// both for use in the package Makefiles, as for
> the BR2_PRIMARY_SITE variable.
>
> This patch was based on the work of Richard Guy Briggs
> (see https://bugs.busybox.net/show_bug.cgi?id=3343).
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
> ---
> v2: update based on comments of Thomas Petazzoni
>
> ?Config.in ? ? ? ? ? ? ? ? ? | ?13 ++++++++++++-
> ?package/Makefile.package.in | ?55
> +++++++++++++++++++++++++++++++++++++++++++++++++------
> ?2 files changed, 61 insertions(+), 7 deletions(-)
>
> diff --git a/Config.in b/Config.in
> --- a/Config.in
> +++ b/Config.in
> @@ -36,6 +36,14 @@ config BR2_LOCALFILES
> ? ? ? ?string "Local files retrieval command"
> ? ? ? ?default "cp"
>
> +config BR2_SCP
> + ? ? ? string "Secure copy (scp) command"
> + ? ? ? default "scp"
> +
> +config BR2_SSH
> + ? ? ? string "Secure shell (ssh) command"
> + ? ? ? default "ssh"
> +
> ?config BR2_ZCAT
> ? ? ? ?string "zcat command"
> ? ? ? ?default "gzip -d -c"
> @@ -102,7 +110,10 @@ config BR2_PRIMARY_SITE
> ? ? ? ? ?Primary site to download from. If this option is set then buildroot
> ? ? ? ? ?will try to download package source first from this site and try the
> ? ? ? ? ?default if the file is not found.
> - ? ? ? ? NOTE: This only works for packages using the Makefile.autotools.in
> + ? ? ? ? Valid URIs are URIs recognized by $(WGET) and scp URIs of the form
> + ? ? ? ? scp://[user@]host:path .
> + ? ? ? ? NOTE: This works for all packages using the central package
> + ? ? ? ? infrastructure (generic, autotools, cmake, ...)
>
> ?config BR2_BACKUP_SITE
> ? ? ? ?string "Backup download site"
> diff --git a/package/Makefile.package.in b/package/Makefile.package.in
> --- a/package/Makefile.package.in
> +++ b/package/Makefile.package.in
> @@ -92,6 +92,8 @@ WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET
> ?SVN:=$(call qstrip,$(BR2_SVN))
> ?BZR:=$(call qstrip,$(BR2_BZR))
> ?GIT:=$(call qstrip,$(BR2_GIT))
> +SCP:=$(call qstrip,$(BR2_SCP)) $(QUIET)
> +SSH:=$(call qstrip,$(BR2_SSH)) $(QUIET)
> ?LOCALFILES:=$(call qstrip,$(BR2_LOCALFILES))
>
> ?# Default spider mode is 'DOWNLOAD'. Other possible values are 'SOURCE_CHECK'
> @@ -104,20 +106,39 @@ ifeq ($(DL_DIR),)
> ?DL_DIR:=$(TOPDIR)/dl
> ?endif
>
> +#
> +# URI scheme helper functions
> +# Example URIs:
> +# * http://www.example.com/dir/file
> +# * scp://www.example.com:dir/file (with domainseparator :)
> +#
> +# geturischeme: http
> +geturischeme=$(firstword $(subst ://, ,$(call qstrip,$(1))))
> +# stripurischeme: www.example.com/dir/file
> +stripurischeme=$(lastword $(subst ://, ,$(call qstrip,$(1))))
> +# domain: www.example.com
> +domain=$(firstword $(subst $(call domainseparator,$(2)), ,$(call stripurischeme,$(1))))
> +# notdomain: dir/file
> +notdomain=$(patsubst $(call domain,$(1),$(2))$(call domainseparator,$(2))%,%,$(call stripurischeme,$(1)))
> +#
> +# default domainseparator is /, specify alternative value as first argument
> +domainseparator=$(if $(1),$(1),/)
> +
> ?################################################################################
> ?# The DOWNLOAD_{GIT,SVN,BZR,LOCALFILES} helpers are in charge of getting a
> ?# working copy of the source repository for their corresponding SCM,
> ?# checking out the requested version / commit / tag, and create an
> -# archive out of it. DOWNLOAD_WGET is the normal wget-based download
> +# archive out of it. DOWNLOAD_SCP uses scp to obtain a remote file with
> +# ssh authentication. DOWNLOAD_WGET is the normal wget-based download
> ?# mechanism.
> ?#
> -# The SOURCE_CHECK_{GIT,SVN,BZR,WGET,LOCALFILES} helpers are in charge of simply
> -# checking that the source is available for download. This can be used
> +# The SOURCE_CHECK_{GIT,SVN,BZR,WGET,LOCALFILES,SCP} helpers are in charge of
> +# simply checking that the source is available for download. This can be used
> ?# to make sure one will be able to get all the sources needed for
> ?# one's build configuration.
> ?#
> -# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET,LOCALFILES} helpers simply output to
> -# the console the names of the files that will be downloaded, or path
> +# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET,LOCALFILES,SCP} helpers simply output
> +# to the console the names of the files that will be downloaded, or path
> ?# and revision of the source repositories, producing a list of all the
> ?# "external dependencies" of a given build configuration.
> ?################################################################################
> @@ -176,6 +197,22 @@ define SHOW_EXTERNAL_DEPS_SVN
> ? echo $($(PKG)_SOURCE)
> ?endef
>
> +# SCP URIs should be of the form scp://[user@]host:filepath
> +# Note that filepath is relative to the user's home directory, so you may want
> +# to prepend the path with a slash: scp://[user@]host:/absolutepath
> +define DOWNLOAD_SCP
> + ? ? ? test -e $(DL_DIR)/$(2) || \
> + ? ? ? $(SCP) $(call stripurischeme,$(call qstrip,$(1)))/$(2) $(DL_DIR)
> +endef
> +
> +define SOURCE_CHECK_SCP
> + ? ? ? $(SSH) $(call domain,$(1),:) ls $(call notdomain,$(1)/$(2),:) > /dev/null
> +endef
> +
> +define SHOW_EXTERNAL_DEPS_SCP
> + ? ? ? echo $(2)
> +endef
> +
>
> ?define DOWNLOAD_WGET
> ? ? ? ?test -e $(DL_DIR)/$(2) || \
> @@ -218,7 +255,10 @@ endef
>
> ?define DOWNLOAD
> ? ? ? ?$(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
> - ? ? ? ? ? ? ? $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ; \
> + ? ? ? ? ? ? ? case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \
> + ? ? ? ? ? ? ? ? ? ? ? scp) $(call $(DL_MODE)_SCP,$(BR2_PRIMARY_SITE),$(2)) && exit ;; \
> + ? ? ? ? ? ? ? ? ? ? ? *) $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ;; \
> + ? ? ? ? ? ? ? esac ; \
> ? ? ? ?fi ; \
> ? ? ? ?if test -n "$(1)" ; then \
> ? ? ? ? ? ? ? ?case "$($(PKG)_SITE_METHOD)" in \
> @@ -226,6 +266,7 @@ define DOWNLOAD
> ? ? ? ? ? ? ? ? ? ? ? ?svn) $($(DL_MODE)_SVN) && exit ;; \
> ? ? ? ? ? ? ? ? ? ? ? ?bzr) $($(DL_MODE)_BZR) && exit ;; \
> ? ? ? ? ? ? ? ? ? ? ? ?file) $($(DL_MODE)_LOCALFILES) && exit ;; \
> + ? ? ? ? ? ? ? ? ? ? ? scp) $($(DL_MODE)_SCP) && exit ;; \
> ? ? ? ? ? ? ? ? ? ? ? ?*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
> ? ? ? ? ? ? ? ?esac ; \
> ? ? ? ?fi ; \
> @@ -655,6 +696,8 @@ else ifeq ($$($(2)_SITE_METHOD),git)
> ?DL_TOOLS_DEPENDENCIES += git
> ?else ifeq ($$($(2)_SITE_METHOD),bzr)
> ?DL_TOOLS_DEPENDENCIES += bzr
> +else ifeq ($$($(2)_SITE_METHOD),scp)
> +DL_TOOLS_DEPENDENCIES += scp ssh
> ?endif # SITE_METHOD
>
> ?endif # $(2)_KCONFIG_VAR
>
>
bump
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 2 of 2 v2] Add support for packages stored in Mercurial (hg) repositories
2011-10-19 7:25 ` [Buildroot] [PATCH 2 of 2 v2] Add support for packages stored in Mercurial (hg) repositories Thomas De Schampheleire
@ 2011-10-25 9:00 ` Thomas De Schampheleire
2011-11-27 21:39 ` Peter Korsgaard
1 sibling, 0 replies; 9+ messages in thread
From: Thomas De Schampheleire @ 2011-10-25 9:00 UTC (permalink / raw)
To: buildroot
On Wed, Oct 19, 2011 at 5:06 PM, Thomas De Schampheleire
<patrickdepinguin+buildroot@gmail.com> wrote:
> Add support for packages stored in Mercurial (hg) repositories.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
> ---
> ?Config.in ? ? ? ? ? ? ? ? ? | ? 4 ++++
> ?package/Makefile.package.in | ?33 +++++++++++++++++++++++++++++----
> ?2 files changed, 33 insertions(+), 4 deletions(-)
>
> diff --git a/Config.in b/Config.in
> --- a/Config.in
> +++ b/Config.in
> @@ -44,6 +44,10 @@ config BR2_SSH
> ? ? ? ?string "Secure shell (ssh) command"
> ? ? ? ?default "ssh"
>
> +config BR2_HG
> + ? ? ? string "Mercurial (hg) command"
> + ? ? ? default "hg"
> +
> ?config BR2_ZCAT
> ? ? ? ?string "zcat command"
> ? ? ? ?default "gzip -d -c"
> diff --git a/package/Makefile.package.in b/package/Makefile.package.in
> --- a/package/Makefile.package.in
> +++ b/package/Makefile.package.in
> @@ -92,6 +92,7 @@ WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET
> ?SVN:=$(call qstrip,$(BR2_SVN))
> ?BZR:=$(call qstrip,$(BR2_BZR))
> ?GIT:=$(call qstrip,$(BR2_GIT))
> +HG:=$(call qstrip,$(BR2_HG)) $(QUIET)
> ?SCP:=$(call qstrip,$(BR2_SCP)) $(QUIET)
> ?SSH:=$(call qstrip,$(BR2_SSH)) $(QUIET)
> ?LOCALFILES:=$(call qstrip,$(BR2_LOCALFILES))
> @@ -125,20 +126,20 @@ notdomain=$(patsubst $(call domain,$(1),
> ?domainseparator=$(if $(1),$(1),/)
>
> ?################################################################################
> -# The DOWNLOAD_{GIT,SVN,BZR,LOCALFILES} helpers are in charge of getting a
> +# The DOWNLOAD_{GIT,SVN,BZR,HG,LOCALFILES} helpers are in charge of getting a
> ?# working copy of the source repository for their corresponding SCM,
> ?# checking out the requested version / commit / tag, and create an
> ?# archive out of it. DOWNLOAD_SCP uses scp to obtain a remote file with
> ?# ssh authentication. DOWNLOAD_WGET is the normal wget-based download
> ?# mechanism.
> ?#
> -# The SOURCE_CHECK_{GIT,SVN,BZR,WGET,LOCALFILES,SCP} helpers are in charge of
> +# The SOURCE_CHECK_{GIT,SVN,BZR,HG,WGET,LOCALFILES,SCP} helpers are in charge of
> ?# simply checking that the source is available for download. This can be used
> ?# to make sure one will be able to get all the sources needed for
> ?# one's build configuration.
> ?#
> -# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET,LOCALFILES,SCP} helpers simply output
> -# to the console the names of the files that will be downloaded, or path
> +# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,HG,WGET,LOCALFILES,SCP} helpers simply
> +# output to the console the names of the files that will be downloaded, or path
> ?# and revision of the source repositories, producing a list of all the
> ?# "external dependencies" of a given build configuration.
> ?################################################################################
> @@ -214,6 +215,27 @@ define SHOW_EXTERNAL_DEPS_SCP
> ?endef
>
>
> +define DOWNLOAD_HG
> + ? ? ? test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
> + ? ? ? (pushd $(DL_DIR) > /dev/null && \
> + ? ? ? $(HG) clone --noupdate --rev $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
> + ? ? ? $(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz --prefix $($(PKG)_BASE_NAME)/ \
> + ? ? ? ? ? ? ? ? ? ? --rev $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE) && \
> + ? ? ? rm -rf $($(PKG)_DL_DIR) && \
> + ? ? ? popd > /dev/null)
> +endef
> +
> +# TODO: improve to check that the given PKG_DL_VERSION exists on the remote
> +# repository
> +define SOURCE_CHECK_HG
> + ?$(HG) incoming --force -l1 $($(PKG)_SITE) > /dev/null
> +endef
> +
> +define SHOW_EXTERNAL_DEPS_HG
> + ?echo $($(PKG)_SOURCE)
> +endef
> +
> +
> ?define DOWNLOAD_WGET
> ? ? ? ?test -e $(DL_DIR)/$(2) || \
> ? ? ? ?$(WGET) -P $(DL_DIR) $(call qstrip,$(1))/$(2)
> @@ -267,6 +289,7 @@ define DOWNLOAD
> ? ? ? ? ? ? ? ? ? ? ? ?bzr) $($(DL_MODE)_BZR) && exit ;; \
> ? ? ? ? ? ? ? ? ? ? ? ?file) $($(DL_MODE)_LOCALFILES) && exit ;; \
> ? ? ? ? ? ? ? ? ? ? ? ?scp) $($(DL_MODE)_SCP) && exit ;; \
> + ? ? ? ? ? ? ? ? ? ? ? hg) $($(DL_MODE)_HG) && exit ;; \
> ? ? ? ? ? ? ? ? ? ? ? ?*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
> ? ? ? ? ? ? ? ?esac ; \
> ? ? ? ?fi ; \
> @@ -698,6 +721,8 @@ else ifeq ($$($(2)_SITE_METHOD),bzr)
> ?DL_TOOLS_DEPENDENCIES += bzr
> ?else ifeq ($$($(2)_SITE_METHOD),scp)
> ?DL_TOOLS_DEPENDENCIES += scp ssh
> +else ifeq ($$($(2)_SITE_METHOD),hg)
> +DL_TOOLS_DEPENDENCIES += hg
> ?endif # SITE_METHOD
>
> ?endif # $(2)_KCONFIG_VAR
>
>
>
bump
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers
2011-10-19 7:25 [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers Thomas De Schampheleire
` (2 preceding siblings ...)
2011-10-25 8:59 ` [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers Thomas De Schampheleire
@ 2011-11-13 20:43 ` Thomas De Schampheleire
3 siblings, 0 replies; 9+ messages in thread
From: Thomas De Schampheleire @ 2011-11-13 20:43 UTC (permalink / raw)
To: buildroot
Hi Peter,
On Fri, Oct 14, 2011 at 4:32 PM, Thomas De Schampheleire
<patrickdepinguin+buildroot@gmail.com> wrote:
> This patch series adds download methods for scp and Mercurial.
>
> Documentation was updated in the first version of this series, but this update
> was left out in this series because of the move to asciidoc that is not yet
> complete. Once the new documentation format is in master, it needs to be
> updated with these new features.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
> ---
> v2: update scp patch based on comments.
>
> ?Config.in ? ? ? ? ? ? ? ? ? | ?17 ++++++++++++++++-
> ?package/Makefile.package.in | ?82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
> ?2 files changed, 91 insertions(+), 8 deletions(-)
>
I think we should include these two patches also in 2011.11.
I'll try to prepare a documentation update for this as well and send
out this week.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 1 of 2 v2] GENTARGETS: add support for scp://
2011-10-19 7:25 ` [Buildroot] [PATCH 1 of 2 v2] GENTARGETS: add support for scp:// Thomas De Schampheleire
2011-10-25 8:59 ` Thomas De Schampheleire
@ 2011-11-27 21:37 ` Peter Korsgaard
1 sibling, 0 replies; 9+ messages in thread
From: Peter Korsgaard @ 2011-11-27 21:37 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:
Thomas> This patch adds support for scp:// both for use in the package
Thomas> Makefiles, as for the BR2_PRIMARY_SITE variable.
Thomas> This patch was based on the work of Richard Guy Briggs
Thomas> (see https://bugs.busybox.net/show_bug.cgi?id=3343).
Committed to next, sorry for the slow response.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH 2 of 2 v2] Add support for packages stored in Mercurial (hg) repositories
2011-10-19 7:25 ` [Buildroot] [PATCH 2 of 2 v2] Add support for packages stored in Mercurial (hg) repositories Thomas De Schampheleire
2011-10-25 9:00 ` Thomas De Schampheleire
@ 2011-11-27 21:39 ` Peter Korsgaard
1 sibling, 0 replies; 9+ messages in thread
From: Peter Korsgaard @ 2011-11-27 21:39 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:
Thomas> Add support for packages stored in Mercurial (hg) repositories.
Thomas> Signed-off-by: Thomas De Schampheleire
Thomas> <thomas.de.schampheleire@gmail.com>
Committed to next, sorry for the slow response.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-11-27 21:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-19 7:25 [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers Thomas De Schampheleire
2011-10-19 7:25 ` [Buildroot] [PATCH 1 of 2 v2] GENTARGETS: add support for scp:// Thomas De Schampheleire
2011-10-25 8:59 ` Thomas De Schampheleire
2011-11-27 21:37 ` Peter Korsgaard
2011-10-19 7:25 ` [Buildroot] [PATCH 2 of 2 v2] Add support for packages stored in Mercurial (hg) repositories Thomas De Schampheleire
2011-10-25 9:00 ` Thomas De Schampheleire
2011-11-27 21:39 ` Peter Korsgaard
2011-10-25 8:59 ` [Buildroot] [PATCH 0 of 2 v2] gentargets: add scp and Mercurial download helpers Thomas De Schampheleire
2011-11-13 20:43 ` Thomas De Schampheleire
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox