* [Buildroot] [PATCH 1/3] downloads: add basic CVS support
@ 2013-09-11 12:12 Gustavo Zacarias
2013-09-11 12:12 ` [Buildroot] [PATCH 2/3] docs/manual: add CVS support documentation Gustavo Zacarias
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2013-09-11 12:12 UTC (permalink / raw)
To: buildroot
The support is for pserver mode anonymous CVS.
source-check is based on login since many servers don't support or have
ls/rls disabled.
Usage is pretty straightforward.
PKG_SITE defines the site hostname and remote directory.
The module is defined by the bare package name.
Version is date based.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
Config.in | 4 ++++
package/pkg-download.mk | 39 +++++++++++++++++++++++++++++----------
package/pkg-generic.mk | 2 ++
3 files changed, 35 insertions(+), 10 deletions(-)
diff --git a/Config.in b/Config.in
index 65c29b4..158a8ab 100644
--- a/Config.in
+++ b/Config.in
@@ -42,6 +42,10 @@ config BR2_GIT
string "Git command"
default "git"
+config BR2_CVS
+ string "Cvs command"
+ default "cvs"
+
config BR2_LOCALFILES
string "Local files retrieval command"
default "cp"
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 97c9226..8e4a1ec 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -10,6 +10,7 @@
# Download method commands
WGET := $(call qstrip,$(BR2_WGET)) $(QUIET)
SVN := $(call qstrip,$(BR2_SVN))
+CVS := $(call qstrip,$(BR2_CVS))
BZR := $(call qstrip,$(BR2_BZR))
GIT := $(call qstrip,$(BR2_GIT))
HG := $(call qstrip,$(BR2_HG)) $(QUIET)
@@ -55,22 +56,21 @@ notdomain=$(patsubst $(call domain,$(1),$(2))$(call domainseparator,$(2))%,%,$(c
domainseparator=$(if $(1),$(1),/)
################################################################################
-# The DOWNLOAD_{GIT,SVN,BZR,HG,LOCALFILES} helpers are in charge of getting a
-# working copy of the source repository for their corresponding SCM,
+# The DOWNLOAD_* 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,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 SOURCE_CHECK_* 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,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.
+# The SHOW_EXTERNAL_DEPS_* 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.
################################################################################
# Try a shallow clone - but that only works if the version is a ref (tag or
@@ -119,6 +119,24 @@ define SHOW_EXTERNAL_DEPS_BZR
echo $($(PKG)_SOURCE)
endef
+define DOWNLOAD_CVS
+ test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+ (pushd $(DL_DIR) > /dev/null && \
+ $(CVS) -z3 -d:pserver:anonymous@$(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \
+ co -d $($(PKG)_BASE_NAME) -r :$($(PKG)_DL_VERSION) -P $($(PKG)_RAWNAME) && \
+ $(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \
+ rm -rf $($(PKG)_DL_DIR) && \
+ popd > /dev/null)
+endef
+
+# Not all CVS servers support ls/rls, use login to see if we can connect
+define SOURCE_CHECK_CVS
+ $(CVS) -d:pserver:anonymous:@$(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) login
+endef
+
+define SHOW_EXTERNAL_DEPS_CVS
+ echo $($(PKG)_SOURCE)
+endef
define DOWNLOAD_SVN
test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
@@ -244,6 +262,7 @@ define DOWNLOAD_INNER
case "$$scheme" in \
git) $($(DL_MODE)_GIT) && exit ;; \
svn) $($(DL_MODE)_SVN) && exit ;; \
+ cvs) $($(DL_MODE)_CVS) && exit ;; \
bzr) $($(DL_MODE)_BZR) && exit ;; \
file) $($(DL_MODE)_LOCALFILES) && exit ;; \
scp) $($(DL_MODE)_SCP) && exit ;; \
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 4dd395b..bfc4dc1 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -542,6 +542,8 @@ else ifeq ($$($(2)_SITE_METHOD),scp)
DL_TOOLS_DEPENDENCIES += scp ssh
else ifeq ($$($(2)_SITE_METHOD),hg)
DL_TOOLS_DEPENDENCIES += hg
+else ifeq ($$($(2)_SITE_METHOD),cvs)
+DL_TOOLS_DEPENDENCIES += cvs
endif # SITE_METHOD
# $(firstword) is used here because the extractor can have arguments, like
--
1.8.1.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 2/3] docs/manual: add CVS support documentation
2013-09-11 12:12 [Buildroot] [PATCH 1/3] downloads: add basic CVS support Gustavo Zacarias
@ 2013-09-11 12:12 ` Gustavo Zacarias
2013-09-12 22:08 ` Peter Korsgaard
2013-09-11 12:12 ` [Buildroot] [PATCH 3/3] toolchain/gcc: add elf2flt to dependencies Gustavo Zacarias
2013-09-12 22:06 ` [Buildroot] [PATCH 1/3] downloads: add basic CVS support Peter Korsgaard
2 siblings, 1 reply; 6+ messages in thread
From: Gustavo Zacarias @ 2013-09-11 12:12 UTC (permalink / raw)
To: buildroot
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
docs/manual/adding-packages-generic.txt | 7 +++++++
docs/manual/prerequisite.txt | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index 67967a2..cb067bd 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -266,6 +266,13 @@ information is (assuming the package name is +libfoo+) :
Buildroot performs a checkout which is preserved as a tarball in
the download cache; subsequent builds use the tarball instead of
performing another checkout.
+ ** +cvs+ for retrieving source code from a CVS repository.
+ Used by default when +LIBFOO_SITE+ begins with +cvs://+.
+ The downloaded source code is cached as with the +svn+ method.
+ Only anonymous pserver mode is supported.
+ +LIBFOO_SITE+ 'must' contain the source URL as well as the remote
+ repository directory. The module is the package name.
+ +LIBFOO_VERSION+ is 'mandatory' and 'must' be a timestamp.
** +git+ for retrieving source code from a Git repository. Used by
default when +LIBFOO_SITE+ begins with +git://+. The downloaded
source code is cached as with the +svn+
diff --git a/docs/manual/prerequisite.txt b/docs/manual/prerequisite.txt
index 9d36402..78ce436 100644
--- a/docs/manual/prerequisite.txt
+++ b/docs/manual/prerequisite.txt
@@ -52,7 +52,7 @@ Optional packages
+
In the official tree, most of the package sources are retrieved
using +wget+; a few are only available through their +git+, +mercurial+,
-or +svn+ repository.
++svn+ or +cvs+ repository.
+
All other source fetching methods are implemented and may be used in a
development context (further details: refer to xref:download-infra[]).
--
1.8.1.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 3/3] toolchain/gcc: add elf2flt to dependencies
2013-09-11 12:12 [Buildroot] [PATCH 1/3] downloads: add basic CVS support Gustavo Zacarias
2013-09-11 12:12 ` [Buildroot] [PATCH 2/3] docs/manual: add CVS support documentation Gustavo Zacarias
@ 2013-09-11 12:12 ` Gustavo Zacarias
2013-09-12 22:08 ` Peter Korsgaard
2013-09-12 22:06 ` [Buildroot] [PATCH 1/3] downloads: add basic CVS support Peter Korsgaard
2 siblings, 1 reply; 6+ messages in thread
From: Gustavo Zacarias @ 2013-09-11 12:12 UTC (permalink / raw)
To: buildroot
Add host-elf2flt to the gcc common dependencies so we get it built after
binutils but before gcc/uclibc since it's required for all packages and
in some uClibc configuration scenarios.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/gcc/gcc.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 6654b51..157357c 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -86,7 +86,8 @@ endef
HOST_GCC_COMMON_DEPENDENCIES = \
host-binutils \
host-gmp \
- host-mpfr
+ host-mpfr \
+ $(if $(BR2_BINFMT_FLAT),host-elf2flt)
HOST_GCC_COMMON_CONF_OPT = \
--target=$(GNU_TARGET_NAME) \
--
1.8.1.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/3] downloads: add basic CVS support
2013-09-11 12:12 [Buildroot] [PATCH 1/3] downloads: add basic CVS support Gustavo Zacarias
2013-09-11 12:12 ` [Buildroot] [PATCH 2/3] docs/manual: add CVS support documentation Gustavo Zacarias
2013-09-11 12:12 ` [Buildroot] [PATCH 3/3] toolchain/gcc: add elf2flt to dependencies Gustavo Zacarias
@ 2013-09-12 22:06 ` Peter Korsgaard
2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2013-09-12 22:06 UTC (permalink / raw)
To: buildroot
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:
Gustavo> The support is for pserver mode anonymous CVS.
Gustavo> source-check is based on login since many servers don't support or have
Gustavo> ls/rls disabled.
Gustavo> Usage is pretty straightforward.
Gustavo> PKG_SITE defines the site hostname and remote directory.
Gustavo> The module is defined by the bare package name.
Gustavo> Version is date based.
Gustavo> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Gustavo> ---
Gustavo> Config.in | 4 ++++
Gustavo> package/pkg-download.mk | 39 +++++++++++++++++++++++++++++----------
Gustavo> package/pkg-generic.mk | 2 ++
Gustavo> 3 files changed, 35 insertions(+), 10 deletions(-)
Gustavo> diff --git a/Config.in b/Config.in
Gustavo> index 65c29b4..158a8ab 100644
Gustavo> --- a/Config.in
Gustavo> +++ b/Config.in
Gustavo> @@ -42,6 +42,10 @@ config BR2_GIT
Gustavo> string "Git command"
Gustavo> default "git"
Gustavo> +config BR2_CVS
Gustavo> + string "Cvs command"
I've changed this to "CVS command" and committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-12 22:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 12:12 [Buildroot] [PATCH 1/3] downloads: add basic CVS support Gustavo Zacarias
2013-09-11 12:12 ` [Buildroot] [PATCH 2/3] docs/manual: add CVS support documentation Gustavo Zacarias
2013-09-12 22:08 ` Peter Korsgaard
2013-09-11 12:12 ` [Buildroot] [PATCH 3/3] toolchain/gcc: add elf2flt to dependencies Gustavo Zacarias
2013-09-12 22:08 ` Peter Korsgaard
2013-09-12 22:06 ` [Buildroot] [PATCH 1/3] downloads: add basic CVS support Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox