All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/9 v4] support/download: add download wrapper
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
@ 2014-08-03 17:53 ` Yann E. MORIN
  2014-08-03 19:50   ` Thomas De Schampheleire
  2014-08-03 17:53 ` [Buildroot] [PATCH 2/9 v4] support/download: convert bzr to use the wrapper Yann E. MORIN
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

The download wrapper is responsible for ensuring the atomicity
of saving into $(BR2_DL_DIR).

It calls the appropriate download helper, telling it to save the
downloaded content to a temporary file in $(BUILD_DIR) (so it does
not clutter $(BR2_DL_DIR) with partial, failed downloads.

Then, only if the download helper was successful, does the wrapper
save the downloaded content to the final location, yet still in a
temporary file, and finally atomically renames it to the final output
file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 support/download/wrapper | 99 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)
 create mode 100755 support/download/wrapper

diff --git a/support/download/wrapper b/support/download/wrapper
new file mode 100755
index 0000000..8ae2797
--- /dev/null
+++ b/support/download/wrapper
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+# This script is a wrapper to the other download helpers.
+# Its role is to ensure atomicity when saving downloaded files
+# back to BR2_DL_DIR, and not clutter BR2_DL_DIR with partial,
+# failed downloads.
+#
+# Call it with:
+#   $1: name of the helper (eg. cvs, git, cp...)
+#   $2: full path to the file in which to save the download
+#   $*: additional arguments to the helper in $1
+# Environment:
+#   BUILD_DIR: the path to Buildroot's build dir
+
+# To avoid cluttering BR2_DL_DIR, we download to a trashable
+# location, namely in $(BUILD_DIR).
+# Then, we move the downloaded file to a temporary file in the
+# same directory as the final output file.
+# This allows us to finally atomically rename it to its final
+# name.
+# If anything goes wrong, we just remove all the temporaries
+# created so far.
+
+# We want to catch any unexpected failure, and exit immediately.
+set -e
+
+helper="${1}"
+output="${2}"
+shift 2
+
+# tmpd is a temporary directory in which helpers may store intermediate
+# by-products of the download.
+# tmpf is the file in which the helpers should put the downloaded content.
+# tmpd is located in $(BUILD_DIR), so as not to clutter the (precious)
+# $(BR2_DL_DIR)
+# We let the helpers create tmpf, so they are able to set whatever
+# permission bits they want (although we're only really interested in
+# the executable bit.)
+tmpd="$( mktemp -d "${BUILD_DIR}/.${output##*/}.XXXXXX" )"
+tmpf="${tmpd}/output"
+
+# Helpers expect to run in a directory that is *really* trashable, so
+# they are free to create whatever files and/or sub-dirs they might need.
+# Doing the 'cd' here rather than in all helpers is easier.
+cd "${tmpd}"
+
+# If the helper fails, we can just remove the temporary directory to
+# remove all the cruft it may have left behind. Then we just exit in
+# error too.
+if ! "${OLDPWD}/support/download/${helper}" "${tmpf}" "${@}"; then
+    rm -rf "${tmpd}"
+    exit 1
+fi
+
+# cd back to free the temp-dir, so we can remove it later
+cd "${OLDPWD}"
+
+# tmp_output is in the same directory as the final output, so we can
+# later move it atomically.
+tmp_output="$( mktemp "${output}.XXXXXX" )"
+
+# 'mktemp' creates files with 'go=-rwx', so the files are not accessible
+# to users other than the one doing the download (and root, of course).
+# This can be problematic when a shared BR2_DL_DIR is used by different
+# users (e.g. on a build server), where all users may write to the shared
+# location, since other users would not be allowed to read the files
+# another user downloaded.
+# So, we restore the 'go' access rights to a more sensible value, while
+# still abiding by the current user's umask. We must do that before the
+# final 'mv', so just do it now.
+# Some helpers (cp and scp) may create executable files, so we need to
+# carry the executable bit if needed.
+[ -x "${tmpf}" ] && new_mode=755 || new_mode=644
+new_mode=$( printf "%04o" $((0${new_mode} & ~0$(umask))) )
+chmod ${new_mode} "${tmp_output}"
+
+# We must *not* unlink tmp_output, otherwise there is a small window
+# during which another download process may create the same tmp_output
+# name (very, very unlikely; but not impossible.)
+# Using 'cp' is not reliable, since 'cp' may unlink the destination file
+# if it is unable to open it with O_WRONLY|O_TRUNC; see:
+#   http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html
+# Since the destination filesystem can be anything, it might not support
+# O_TRUNC, so 'cp' would unlink it first.
+# Use 'cat' and append-redirection '>>' to save to the final location,
+# since that is the only way we can be 100% sure of the behaviour.
+if ! cat "${tmpf}" >>"${tmp_output}"; then
+    rm -rf "${tmpd}" "${tmp_output}"
+    exit 1
+fi
+rm -rf "${tmpd}"
+# tmp_output and output are on the same filesystem, so POSIX guarantees
+# that 'mv' is atomic, because it then uses rename() that POSIX mandates
+# to be atomic, see:
+#   http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html
+if ! mv "${tmp_output}" "${output}"; then
+    rm -f "${tmp_output}"
+    exit 1
+fi
-- 
1.9.1

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

* [Buildroot] [PATCH 2/9 v4] support/download: convert bzr to use the wrapper
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 1/9 v4] support/download: add download wrapper Yann E. MORIN
@ 2014-08-03 17:53 ` Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 3/9 v4] support/download: convert localfiles " Yann E. MORIN
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

This drastically simplifies the bzr helper, as it no longer has to
deal with atomically saving the downloaded archive.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
Changes v3 -> v4:
  - fix root dir of the archive  (Thomas DS)
  - tweak the usage comment  (Thomas DS)
---
 package/pkg-download.mk |  6 +++++-
 support/download/bzr    | 42 ++++++++++++------------------------------
 2 files changed, 17 insertions(+), 31 deletions(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 118591c..0c9397a 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -112,7 +112,11 @@ endef
 
 define DOWNLOAD_BZR
 	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	$(EXTRA_ENV) support/download/bzr $($(PKG)_SITE) $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE)
+	$(EXTRA_ENV) support/download/wrapper bzr \
+		$(DL_DIR)/$($(PKG)_SOURCE) \
+		$($(PKG)_SITE) \
+		$($(PKG)_DL_VERSION) \
+		$($(PKG)_BASE_NAME)
 endef
 
 define SOURCE_CHECK_BZR
diff --git a/support/download/bzr b/support/download/bzr
index 19d837d..b545cb1 100755
--- a/support/download/bzr
+++ b/support/download/bzr
@@ -1,38 +1,20 @@
 #!/bin/bash
 
-# We want to catch any command failure, and exit immediately
+# We want to catch any unexpected failure, and exit immediately
 set -e
 
-# Download helper for bzr
-# Call it with:
-#   $1: bzr repo
-#   $2: bzr revision
-#   $3: output file
+# Download helper for bzr, to be called from the download wrapper script
+# Expected arguments:
+#   $1: output file
+#   $2: bzr repo
+#   $3: bzr revision
+#   $4: basename
 # And this environment:
 #   BZR      : the bzr command to call
-#   BUILD_DIR: path to Buildroot's build dir
 
-repo="${1}"
-rev="${2}"
-output="${3}"
+output="${1}"
+repo="${2}"
+rev="${3}"
+basename="${4}"
 
-tmp_dl="$( mktemp "${BUILD_DIR}/.XXXXXX" )"
-tmp_output="$( mktemp "${output}.XXXXXX" )"
-
-# Play tic-tac-toe with temp files
-# - first, we download to a trashable location (the build-dir)
-# - the we move to a temp file in the final location, so it is
-#   on the same filesystem as the final file
-# - finally, we atomically rename to the final file
-
-ret=1
-if ${BZR} export --format=tgz "${tmp_dl}" "${repo}" -r "${rev}"; then
-    if mv "${tmp_dl}" "${tmp_output}"; then
-        mv "${tmp_output}" "${output}"
-        ret=0
-    fi
-fi
-
-# Cleanup
-rm -f "${tmp_dl}" "${tmp_output}"
-exit ${ret}
+${BZR} export --root="${basename}/" --format=tgz "${output}" "${repo}" -r "${rev}"
-- 
1.9.1

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

* [Buildroot] [PATCH 3/9 v4] support/download: convert localfiles to use the wrapper
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 1/9 v4] support/download: add download wrapper Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 2/9 v4] support/download: convert bzr to use the wrapper Yann E. MORIN
@ 2014-08-03 17:53 ` Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 4/9 v4] support/download: convert cvs " Yann E. MORIN
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

This drastically simplifies the localfiles helper, as it no longer has
to deal with atomically saving the downloaded archive.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
(Tested by setting BUSYBOX_SITE = file:///tmp and running 'make busybox-source')

--
Changes v3 -> v4:
  - tweak the usage comment  (Thomas DS)
---
 package/pkg-download.mk |  5 +++--
 support/download/cp     | 26 ++++++++------------------
 2 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 0c9397a..f10aad8 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -209,8 +209,9 @@ endef
 
 define DOWNLOAD_LOCALFILES
 	test -e $(DL_DIR)/$(2) || \
-	$(EXTRA_ENV) support/download/cp $(call stripurischeme,$(call qstrip,$(1))) \
-					 $(DL_DIR)/$(2) && \
+	$(EXTRA_ENV) support/download/wrapper cp \
+		$(DL_DIR)/$(2) \
+		$(call stripurischeme,$(call qstrip,$(1))) && \
 	$(call VERIFY_HASH,$(PKGDIR)/$($(PKG)_NAME).hash,$(DL_DIR)/$(2))
 endef
 
diff --git a/support/download/cp b/support/download/cp
index 8f6bc06..264f5dc 100755
--- a/support/download/cp
+++ b/support/download/cp
@@ -1,26 +1,16 @@
 #!/bin/bash
 
-# We want to catch any command failure, and exit immediately
+# We want to catch any unexpected failure, and exit immediately
 set -e
 
-# Download helper for cp
-# Call it with:
-#   $1: source file
-#   $2: output file
+# Download helper for cp, to be called from the download wrapper script
+# Expected arguments:
+#   $1: output file
+#   $2: source file
 # And this environment:
 #   LOCALFILES: the cp command to call
 
-source="${1}"
-output="${2}"
+output="${1}"
+source="${2}"
 
-tmp_output="$( mktemp "${output}.XXXXXX" )"
-
-ret=1
-if ${LOCALFILES} "${source}" "${tmp_output}"; then
-    mv "${tmp_output}" "${output}"
-    ret=0
-fi
-
-# Cleanup
-rm -f "${tmp_output}"
-exit ${ret}
+${LOCALFILES} "${source}" "${output}"
-- 
1.9.1

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

* [Buildroot] [PATCH 4/9 v4] support/download: convert cvs to use the wrapper
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
                   ` (2 preceding siblings ...)
  2014-08-03 17:53 ` [Buildroot] [PATCH 3/9 v4] support/download: convert localfiles " Yann E. MORIN
@ 2014-08-03 17:53 ` Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 5/9 v4] support/download: convert git " Yann E. MORIN
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

This drastically simplifies the cvs helper, as it no longer has to deal
with atomically saving the downloaded archive.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
Changes v3 -> v4:
  - tweak the usage comment  (Thomas DS)
---
 package/pkg-download.mk |  9 ++++++---
 support/download/cvs    | 54 +++++++++++++++----------------------------------
 2 files changed, 22 insertions(+), 41 deletions(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index f10aad8..66ce02c 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -129,9 +129,12 @@ endef
 
 define DOWNLOAD_CVS
 	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	$(EXTRA_ENV) support/download/cvs $(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \
-					  $($(PKG)_DL_VERSION) $($(PKG)_RAWNAME) \
-					  $($(PKG)_BASE_NAME) $(DL_DIR)/$($(PKG)_SOURCE)
+	$(EXTRA_ENV) support/download/wrapper cvs \
+		$(DL_DIR)/$($(PKG)_SOURCE) \
+		$(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \
+		$($(PKG)_DL_VERSION) \
+		$($(PKG)_RAWNAME) \
+		$($(PKG)_BASE_NAME)
 endef
 
 # Not all CVS servers support ls/rls, use login to see if we can connect
diff --git a/support/download/cvs b/support/download/cvs
index 9aeed79..c92d491 100755
--- a/support/download/cvs
+++ b/support/download/cvs
@@ -1,47 +1,25 @@
 #!/bin/bash
 
-# We want to catch any command failure, and exit immediately
+# We want to catch any unexpected failure, and exit immediately
 set -e
 
-# Download helper for cvs
-# Call it with:
-#   $1: cvs repo
-#   $2: cvs revision
-#   $3: package's name (eg. foobar)
-#   $4: package's basename (eg. foobar-1.2.3)
-#   $5: output file
+# Download helper for cvs, to be called from the download wrapper script
+# Expected arguments:
+#   $1: output file
+#   $2: cvs repo
+#   $3: cvs revision
+#   $4: package's name (eg. foobar)
+#   $5: package's basename (eg. foobar-1.2.3)
 # And this environment:
 #   CVS      : the cvs command to call
-#   BUILD_DIR: path to Buildroot's build dir
 
-repo="${1}"
-rev="${2}"
-rawname="${3}"
-basename="${4}"
-output="${5}"
+output="${1}"
+repo="${2}"
+rev="${3}"
+rawname="${4}"
+basename="${5}"
 
-repodir="${basename}.tmp-cvs-checkout"
-tmp_output="$( mktemp "${output}.XXXXXX" )"
+${CVS} -z3 -d":pserver:anonymous@${repo}" \
+       co -d "${basename}" -r ":${rev}" -P "${rawname}"
 
-cd "${BUILD_DIR}"
-# Remove leftovers from a previous failed run
-rm -rf "${repodir}"
-
-# Play tic-tac-toe with temp files
-# - first, we download to a trashable location (the build-dir)
-# - then we create a temporary tarball in the final location, so it is
-#   on the same filesystem as the final file
-# - finally, we atomically rename to the final file
-
-ret=1
-if ${CVS} -z3 -d":pserver:anonymous@${repo}" \
-           co -d "${repodir}" -r ":${rev}" -P "${rawname}"; then
-    if tar czf "${tmp_output}" "${repodir}"; then
-        mv "${tmp_output}" "${output}"
-        ret=0
-    fi
-fi
-
-# Cleanup
-rm -rf "${repodir}" "${tmp_output}"
-exit ${ret}
+tar czf "${output}" "${basename}"
-- 
1.9.1

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

* [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads)
@ 2014-08-03 17:53 Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 1/9 v4] support/download: add download wrapper Yann E. MORIN
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

Hello All!

This series is a follow-up to the previous download series. Following
the advice from Arnout, I introduced a wrapper script that is responsible
for the saving atomically in BR2_DL_DIR. If also manages all the temporary
files, and properly cleans up.

Consequently, the helpers are now nuch more simple, and no longer need to
duplicate the complex handling of atomicity in BR2_DL_DIR, nor do they
need to manage temporary files.

Changes v3 -> v4:
  - fix root-dir in bzr-generated archives  (Thomas DS)
  - enhance the usage comment in every hepers  (Thomas DS)
  - typoes  (Thomas DS)

Changes v2 -> v3:
  - complete rewrite of the series


Regards,
Yann E. MORIN.


The following changes since commit 01370132c10cb2d194042e08fefbc9cec8392c66:

  gst-fsl-plugins, libfslvpuwrap: add missing select (2014-08-03 14:47:03 +0200)

are available in the git repository at:

  git://gitorious.org/buildroot/buildroot.git yem/check-downloads

for you to fetch changes up to d43ab6ef106a7a55948b533b22ad7215fc580c51:

  support/download: convert wget to use the wrapper (2014-08-03 19:49:55 +0200)

----------------------------------------------------------------
Yann E. MORIN (9):
      support/download: add download wrapper
      support/download: convert bzr to use the wrapper
      support/download: convert localfiles to use the wrapper
      support/download: convert cvs to use the wrapper
      support/download: convert git to use the wrapper
      support/download: convert Hg to use the wrapper
      support/download: convert scp to use the wrapper
      support/download: convert svn to use the wrapper
      support/download: convert wget to use the wrapper

 package/pkg-download.mk  | 50 ++++++++++++++++--------
 support/download/bzr     | 42 ++++++--------------
 support/download/cp      | 26 ++++---------
 support/download/cvs     | 54 ++++++++------------------
 support/download/git     | 62 ++++++++++--------------------
 support/download/hg      | 52 ++++++++-----------------
 support/download/scp     | 28 ++++----------
 support/download/svn     | 48 +++++++----------------
 support/download/wget    | 35 ++++-------------
 support/download/wrapper | 99 ++++++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 234 insertions(+), 262 deletions(-)
 create mode 100755 support/download/wrapper

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 5/9 v4] support/download: convert git to use the wrapper
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
                   ` (3 preceding siblings ...)
  2014-08-03 17:53 ` [Buildroot] [PATCH 4/9 v4] support/download: convert cvs " Yann E. MORIN
@ 2014-08-03 17:53 ` Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 6/9 v4] support/download: convert Hg " Yann E. MORIN
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

This drastically simplifies the git helper, as it no longer has to deal
with atomically saving the downloaded archive.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
(Tested by running 'make fmc-fsl-sdk-source')

---
Changes v3 -> v4:
  - tweak the usage comment  (Thomas DS)
---
 package/pkg-download.mk |  7 ++++--
 support/download/git    | 62 ++++++++++++++++---------------------------------
 2 files changed, 25 insertions(+), 44 deletions(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 66ce02c..1649c83 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -95,8 +95,11 @@ endef
 # problems
 define DOWNLOAD_GIT
 	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	$(EXTRA_ENV) support/download/git $($(PKG)_SITE) $($(PKG)_DL_VERSION) \
-					  $($(PKG)_BASE_NAME) $(DL_DIR)/$($(PKG)_SOURCE)
+	$(EXTRA_ENV) support/download/wrapper git \
+		$(DL_DIR)/$($(PKG)_SOURCE) \
+		$($(PKG)_SITE) \
+		$($(PKG)_DL_VERSION) \
+		$($(PKG)_BASE_NAME)
 endef
 
 # TODO: improve to check that the given PKG_DL_VERSION exists on the remote
diff --git a/support/download/git b/support/download/git
index 116e5a9..6edaa90 100755
--- a/support/download/git
+++ b/support/download/git
@@ -1,60 +1,38 @@
 #!/bin/bash
 
-# We want to catch any command failure, and exit immediately
+# We want to catch any unexpected failure, and exit immediately
 set -e
 
-# Download helper for git
-# Call it with:
-#   $1: git repo
-#   $2: git cset
-#   $3: package's basename (eg. foobar-1.2.3)
-#   $4: output file
+# Download helper for git, to be called from the download wrapper script
+# Expected arguments:
+#   $1: output file
+#   $2: git repo
+#   $3: git cset
+#   $4: package's basename (eg. foobar-1.2.3)
 # And this environment:
 #   GIT      : the git command to call
-#   BUILD_DIR: path to Buildroot's build dir
 
-repo="${1}"
-cset="${2}"
-basename="${3}"
-output="${4}"
+output="${1}"
+repo="${2}"
+cset="${3}"
+basename="${4}"
 
-repodir="${basename}.tmp-git-checkout"
-tmp_tar="$( mktemp "${BUILD_DIR}/.XXXXXX" )"
-tmp_output="$( mktemp "${output}.XXXXXX" )"
-
-# Play tic-tac-toe with temp files
-# - first, we download to a trashable location (the build-dir)
-# - then we create the uncomporessed tarball in tht same trashable location
-# - then we create a temporary compressed tarball in the final location, so
-#   it is on the same filesystem as the final file
-# - finally, we atomically rename to the final file
-
-cd "${BUILD_DIR}"
-# Remove leftovers from a previous failed run
-rm -rf "${repodir}"
-
-git_done=0
+# Try to see if we can do a shallow clone, since it is faster
+# than a full clone.
 if [ -n "$(${GIT} ls-remote "${repo}" "${cset}" 2>&1)" ]; then
     printf "Doing shallow clone\n"
-    if ${GIT} clone --depth 1 -b "${cset}" --bare "${repo}" "${repodir}"; then
+    if ${GIT} clone --depth 1 -b "${cset}" --bare "${repo}" "${basename}"; then
         git_done=1
+    else
+        printf "Shallow clone failed, falling back to doing a full clone\n"
     fi
 fi
 if [ ${git_done} -eq 0 ]; then
     printf "Doing full clone\n"
-    ${GIT} clone --bare "${repo}" "${repodir}"
+    ${GIT} clone --bare "${repo}" "${basename}"
 fi
 
-ret=1
-pushd "${repodir}" >/dev/null
-if ${GIT} archive --prefix="${basename}/" -o "${tmp_tar}" \
-                  --format=tar "${cset}"; then
-    if gzip -c "${tmp_tar}" >"${tmp_output}"; then
-        mv "${tmp_output}" "${output}"
-        ret=0
-    fi
-fi
-popd >/dev/null
+GIT_DIR="${basename}" \
+${GIT} archive --prefix="${basename}/" -o "${output}" --format=tar "${cset}"
 
-rm -rf "${repodir}" "${tmp_tar}" "${tmp_output}"
-exit ${ret}
+gzip "${output}"
-- 
1.9.1

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

* [Buildroot] [PATCH 6/9 v4] support/download: convert Hg to use the wrapper
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
                   ` (4 preceding siblings ...)
  2014-08-03 17:53 ` [Buildroot] [PATCH 5/9 v4] support/download: convert git " Yann E. MORIN
@ 2014-08-03 17:53 ` Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 7/9 v4] support/download: convert scp " Yann E. MORIN
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

This drastically simplifies the hg helper, as it no longer has to deal
with atomically saving the downloaded archive.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
(Tested by running 'make vim-source')

---
Changes v3 -> v4:
  - tweak the usage comment  (Thomas DS)
---
 package/pkg-download.mk |  7 +++++--
 support/download/hg     | 52 ++++++++++++++-----------------------------------
 2 files changed, 20 insertions(+), 39 deletions(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 1649c83..7878c66 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -184,8 +184,11 @@ endef
 
 define DOWNLOAD_HG
 	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	$(EXTRA_ENV) support/download/hg $($(PKG)_SITE) $($(PKG)_DL_VERSION) \
-					  $($(PKG)_BASE_NAME) $(DL_DIR)/$($(PKG)_SOURCE)
+	$(EXTRA_ENV) support/download/wrapper hg \
+		$(DL_DIR)/$($(PKG)_SOURCE) \
+		$($(PKG)_SITE) \
+		$($(PKG)_DL_VERSION) \
+		$($(PKG)_BASE_NAME)
 endef
 
 # TODO: improve to check that the given PKG_DL_VERSION exists on the remote
diff --git a/support/download/hg b/support/download/hg
index 6e9e26b..747dd34 100755
--- a/support/download/hg
+++ b/support/download/hg
@@ -1,46 +1,24 @@
 #!/bin/bash
 
-# We want to catch any command failure, and exit immediately
+# We want to catch any unexpected failure, and exit immediately
 set -e
 
-# Download helper for hg
-# Call it with:
-#   $1: hg repo
-#   $2: hg cset
-#   $3: package's basename (eg. foobar-1.2.3)
-#   $4: output file
+# Download helper for hg, to be called from the download wrapper script
+# Expected arguments:
+#   $1: output file
+#   $2: hg repo
+#   $3: hg cset
+#   $4: package's basename (eg. foobar-1.2.3)
 # And this environment:
 #   HG       : the hg command to call
-#   BUILD_DIR: path to Buildroot's build dir
 
-repo="${1}"
-cset="${2}"
-basename="${3}"
-output="${4}"
+output="${1}"
+repo="${2}"
+cset="${3}"
+basename="${4}"
 
-repodir="${basename}.tmp-hg-checkout"
-tmp_output="$( mktemp "${output}.XXXXXX" )"
+${HG} clone --noupdate --rev "${cset}" "${repo}" "${basename}"
 
-cd "${BUILD_DIR}"
-# Remove leftovers from a previous failed run
-rm -rf "${repodir}"
-
-# Play tic-tac-toe with temp files
-# - first, we download to a trashable location (the build-dir)
-# - then we create a temporary tarball in the final location, so it is
-#   on the same filesystem as the final file
-# - finally, we atomically rename to the final file
-
-ret=1
-if ${HG} clone --noupdate --rev "${cset}" "${repo}" "${repodir}"; then
-    if ${HG} archive --repository "${repodir}" --type tgz \
-                     --prefix "${basename}" --rev "${cset}" \
-                     "${tmp_output}"; then
-        mv "${tmp_output}" "${output}"
-        ret=0
-    fi
-fi
-
-# Cleanup
-rm -rf "${repodir}" "${tmp_output}"
-exit ${ret}
+${HG} archive --repository "${basename}" --type tgz \
+              --prefix "${basename}" --rev "${cset}" \
+              "${output}"
-- 
1.9.1

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

* [Buildroot] [PATCH 7/9 v4] support/download: convert scp to use the wrapper
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
                   ` (5 preceding siblings ...)
  2014-08-03 17:53 ` [Buildroot] [PATCH 6/9 v4] support/download: convert Hg " Yann E. MORIN
@ 2014-08-03 17:53 ` Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 8/9 v4] support/download: convert svn " Yann E. MORIN
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

This drastically simplifies the scp helper, as it no longer has to deal
with atomically saving the downloaded archive.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
(Tested by setting a primary site to 'scp://localhost:/tmp' and
running 'make vim-source')

---
Changes v3 -> v4:
  - tweak the usage comment  (Thomas DS)
---
 package/pkg-download.mk |  5 +++--
 support/download/scp    | 28 ++++++++--------------------
 2 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 7878c66..d749b54 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -168,8 +168,9 @@ endef
 # to prepend the path with a slash: scp://[user@]host:/absolutepath
 define DOWNLOAD_SCP
 	test -e $(DL_DIR)/$(2) || \
-	$(EXTRA_ENV) support/download/scp '$(call stripurischeme,$(call qstrip,$(1)))' \
-					  $(DL_DIR)/$(2) && \
+	$(EXTRA_ENV) support/download/wrapper scp \
+		$(DL_DIR)/$(2) \
+		'$(call stripurischeme,$(call qstrip,$(1)))' && \
 	$(call VERIFY_HASH,$(PKGDIR)/$($(PKG)_NAME).hash,$(DL_DIR)/$(2))
 endef
 
diff --git a/support/download/scp b/support/download/scp
index d3aad43..1676929 100755
--- a/support/download/scp
+++ b/support/download/scp
@@ -1,28 +1,16 @@
 #!/bin/bash
 
-# We want to catch any command failure, and exit immediately
+# We want to catch any unexpected failure, and exit immediately
 set -e
 
-# Download helper for scp
-# Call it with:
-#   $1: URL
-#   $2: output file
+# Download helper for scp, to be called from the download wrapper script
+# Expected arguments:
+#   $1: output file
+#   $2: URL
 # And this environment:
 #   SCP       : the scp command to call
 
-url="${1}"
-output="${2}"
-tmp_dl="$( mktemp "${BUILD_DIR}/.XXXXXX" )"
-tmp_output="$( mktemp "${output}.XXXXXX" )"
+output="${1}"
+url="${2}"
 
-ret=1
-if ${SCP} "${url}" "${tmp_dl}"; then
-    if mv "${tmp_dl}" "${tmp_output}"; then
-        mv "${tmp_output}" "${output}"
-        ret=0
-    fi
-fi
-
-# Cleanup
-rm -f "${tmp_dl}" "${tmp_output}"
-exit ${ret}
+${SCP} "${url}" "${output}"
-- 
1.9.1

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

* [Buildroot] [PATCH 8/9 v4] support/download: convert svn to use the wrapper
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
                   ` (6 preceding siblings ...)
  2014-08-03 17:53 ` [Buildroot] [PATCH 7/9 v4] support/download: convert scp " Yann E. MORIN
@ 2014-08-03 17:53 ` Yann E. MORIN
  2014-08-03 17:53 ` [Buildroot] [PATCH 9/9 v4] support/download: convert wget " Yann E. MORIN
  2014-08-04 18:29 ` [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Thomas Petazzoni
  9 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

This drastically simplifies the svn helper, as it no longer has to deal
with atomically saving the downloaded archive.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
(Tested by running 'make open2300-source')

---
Changes v3 -> v4:
  - tweak the usage comment  (Thomas DS)
---
 package/pkg-download.mk |  7 +++++--
 support/download/svn    | 48 +++++++++++++-----------------------------------
 2 files changed, 18 insertions(+), 37 deletions(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index d749b54..c23dcfa 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -151,8 +151,11 @@ endef
 
 define DOWNLOAD_SVN
 	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	$(EXTRA_ENV) support/download/svn $($(PKG)_SITE) $($(PKG)_DL_VERSION) \
-					  $($(PKG)_BASE_NAME) $(DL_DIR)/$($(PKG)_SOURCE)
+	$(EXTRA_ENV) support/download/wrapper svn \
+		$(DL_DIR)/$($(PKG)_SOURCE) \
+		$($(PKG)_SITE) \
+		$($(PKG)_DL_VERSION) \
+		$($(PKG)_BASE_NAME)
 endef
 
 define SOURCE_CHECK_SVN
diff --git a/support/download/svn b/support/download/svn
index 39cbbcb..3a9512d 100755
--- a/support/download/svn
+++ b/support/download/svn
@@ -1,44 +1,22 @@
 #!/bin/bash
 
-# We want to catch any command failure, and exit immediately
+# We want to catch any unexpected failure, and exit immediately
 set -e
 
-# Download helper for svn
-# Call it with:
-#   $1: svn repo
-#   $2: svn revision
-#   $3: package's basename (eg. foobar-1.2.3)
-#   $4: output file
+# Download helper for svn, to be called from the download wrapper script
+# Expected arguments:
+#   $1: output file
+#   $2: svn repo
+#   $3: svn revision
+#   $4: package's basename (eg. foobar-1.2.3)
 # And this environment:
 #   SVN      : the svn command to call
-#   BUILD_DIR: path to Buildroot's build dir
 
-repo="${1}"
-rev="${2}"
-basename="${3}"
-output="${4}"
+output="${1}"
+repo="${2}"
+rev="${3}"
+basename="${4}"
 
-repodir="${basename}.tmp-svn-checkout"
-tmp_output="$( mktemp "${output}.XXXXXX" )"
+${SVN} export "${repo}@${rev}" "${basename}"
 
-cd "${BUILD_DIR}"
-# Remove leftovers from a previous failed run
-rm -rf "${repodir}"
-
-# Play tic-tac-toe with temp files
-# - first, we download to a trashable location (the build-dir)
-# - then we create a temporary tarball in the final location, so it is
-#   on the same filesystem as the final file
-# - finally, we atomically rename to the final file
-
-ret=1
-if ${SVN} export "${repo}@${rev}" "${repodir}"; then
-    if tar czf "${tmp_output}" "${repodir}"; then
-        mv "${tmp_output}" "${output}"
-        ret=0
-    fi
-fi
-
-# Cleanup
-rm -rf "${repodir}" "${tmp_output}"
-exit ${ret}
+tar czf "${output}" "${basename}"
-- 
1.9.1

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

* [Buildroot] [PATCH 9/9 v4] support/download: convert wget to use the wrapper
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
                   ` (7 preceding siblings ...)
  2014-08-03 17:53 ` [Buildroot] [PATCH 8/9 v4] support/download: convert svn " Yann E. MORIN
@ 2014-08-03 17:53 ` Yann E. MORIN
  2014-08-04 18:29 ` [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Thomas Petazzoni
  9 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-08-03 17:53 UTC (permalink / raw)
  To: buildroot

This drastically simplifies the wget helper, as it no longer has to deal
with atomically saving the downloaded archive.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
(Tested by running 'make busybox-source')

---
Changes v3 -> v4:
  - tweak the usage comment  (Thomas DS)
---
 package/pkg-download.mk |  4 +++-
 support/download/wget   | 35 ++++++++---------------------------
 2 files changed, 11 insertions(+), 28 deletions(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index c23dcfa..0761736 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -208,7 +208,9 @@ endef
 
 define DOWNLOAD_WGET
 	test -e $(DL_DIR)/$(2) || \
-	$(EXTRA_ENV) support/download/wget '$(call qstrip,$(1))' $(DL_DIR)/$(2) && \
+	$(EXTRA_ENV) support/download/wrapper wget \
+		$(DL_DIR)/$(2) \
+		'$(call qstrip,$(1))' && \
 	$(call VERIFY_HASH,$(PKGDIR)/$($(PKG)_NAME).hash,$(DL_DIR)/$(2))
 endef
 
diff --git a/support/download/wget b/support/download/wget
index cbeca3b..2cea100 100755
--- a/support/download/wget
+++ b/support/download/wget
@@ -1,35 +1,16 @@
 #!/bin/bash
 
-# We want to catch any command failure, and exit immediately
+# We want to catch any unexpected failure, and exit immediately
 set -e
 
-# Download helper for wget
-# Call it with:
-#   $1: URL
-#   $2: output file
+# Download helper for wget, to be called from the download wrapper script
+# Expected arguments:
+#   $1: output file
+#   $2: URL
 # And this environment:
 #   WGET     : the wget command to call
-#   BUILD_DIR: path to Buildroot's build dir
 
-url="${1}"
-output="${2}"
+output="${1}"
+url="${2}"
 
-tmp_dl="$( mktemp "${BUILD_DIR}/.XXXXXX" )"
-tmp_output="$( mktemp "${output}.XXXXXX" )"
-
-# Play tic-tac-toe with temp files
-# - first, we download to a trashable location (the build-dir)
-# - then we copy to a temporary tarball in the final location, so it is
-#   on the same filesystem as the final file
-# - finally, we atomically rename to the final file
-
-ret=1
-if ${WGET} -O "${tmp_dl}" "${url}"; then
-    if mv "${tmp_dl}" "${tmp_output}"; then
-        mv "${tmp_output}" "${output}"
-        ret=0
-    fi
-fi
-
-rm -f "${tmp_dl}" "${tmp_output}"
-exit ${ret}
+${WGET} -O "${output}" "${url}"
-- 
1.9.1

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

* [Buildroot] [PATCH 1/9 v4] support/download: add download wrapper
  2014-08-03 17:53 ` [Buildroot] [PATCH 1/9 v4] support/download: add download wrapper Yann E. MORIN
@ 2014-08-03 19:50   ` Thomas De Schampheleire
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas De Schampheleire @ 2014-08-03 19:50 UTC (permalink / raw)
  To: buildroot

"Yann E. MORIN" <yann.morin.1998@free.fr> schreef:
>The download wrapper is responsible for ensuring the atomicity
>of saving into $(BR2_DL_DIR).
>
>It calls the appropriate download helper, telling it to save the
>downloaded content to a temporary file in $(BUILD_DIR) (so it does
>not clutter $(BR2_DL_DIR) with partial, failed downloads.
>
>Then, only if the download helper was successful, does the wrapper
>save the downloaded content to the final location, yet still in a
>temporary file, and finally atomically renames it to the final output
>file.
>
>Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>---
> support/download/wrapper | 99 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 99 insertions(+)
> create mode 100755 support/download/wrapper
>
>diff --git a/support/download/wrapper b/support/download/wrapper
>new file mode 100755
>index 0000000..8ae2797
>--- /dev/null
>+++ b/support/download/wrapper
>@@ -0,0 +1,99 @@
>+#!/bin/bash
>+
>+# This script is a wrapper to the other download helpers.
>+# Its role is to ensure atomicity when saving downloaded files
>+# back to BR2_DL_DIR, and not clutter BR2_DL_DIR with partial,
>+# failed downloads.
>+#
>+# Call it with:
>+#   $1: name of the helper (eg. cvs, git, cp...)
>+#   $2: full path to the file in which to save the download
>+#   $*: additional arguments to the helper in $1
>+# Environment:
>+#   BUILD_DIR: the path to Buildroot's build dir
>+
>+# To avoid cluttering BR2_DL_DIR, we download to a trashable
>+# location, namely in $(BUILD_DIR).
>+# Then, we move the downloaded file to a temporary file in the
>+# same directory as the final output file.
>+# This allows us to finally atomically rename it to its final
>+# name.
>+# If anything goes wrong, we just remove all the temporaries
>+# created so far.
>+
>+# We want to catch any unexpected failure, and exit immediately.
>+set -e
>+
>+helper="${1}"
>+output="${2}"
>+shift 2
>+
>+# tmpd is a temporary directory in which helpers may store intermediate
>+# by-products of the download.
>+# tmpf is the file in which the helpers should put the downloaded content.
>+# tmpd is located in $(BUILD_DIR), so as not to clutter the (precious)
>+# $(BR2_DL_DIR)
>+# We let the helpers create tmpf, so they are able to set whatever
>+# permission bits they want (although we're only really interested in
>+# the executable bit.)
>+tmpd="$( mktemp -d "${BUILD_DIR}/.${output##*/}.XXXXXX" )"
>+tmpf="${tmpd}/output"
>+
>+# Helpers expect to run in a directory that is *really* trashable, so
>+# they are free to create whatever files and/or sub-dirs they might need.
>+# Doing the 'cd' here rather than in all helpers is easier.
>+cd "${tmpd}"
>+
>+# If the helper fails, we can just remove the temporary directory to
>+# remove all the cruft it may have left behind. Then we just exit in
>+# error too.
>+if ! "${OLDPWD}/support/download/${helper}" "${tmpf}" "${@}"; then
>+    rm -rf "${tmpd}"
>+    exit 1
>+fi
>+
>+# cd back to free the temp-dir, so we can remove it later
>+cd "${OLDPWD}"
>+
>+# tmp_output is in the same directory as the final output, so we can
>+# later move it atomically.
>+tmp_output="$( mktemp "${output}.XXXXXX" )"
>+
>+# 'mktemp' creates files with 'go=-rwx', so the files are not accessible
>+# to users other than the one doing the download (and root, of course).
>+# This can be problematic when a shared BR2_DL_DIR is used by different
>+# users (e.g. on a build server), where all users may write to the shared
>+# location, since other users would not be allowed to read the files
>+# another user downloaded.
>+# So, we restore the 'go' access rights to a more sensible value, while
>+# still abiding by the current user's umask. We must do that before the
>+# final 'mv', so just do it now.
>+# Some helpers (cp and scp) may create executable files, so we need to
>+# carry the executable bit if needed.
>+[ -x "${tmpf}" ] && new_mode=755 || new_mode=644
>+new_mode=$( printf "%04o" $((0${new_mode} & ~0$(umask))) )
>+chmod ${new_mode} "${tmp_output}"
>+
>+# We must *not* unlink tmp_output, otherwise there is a small window
>+# during which another download process may create the same tmp_output
>+# name (very, very unlikely; but not impossible.)
>+# Using 'cp' is not reliable, since 'cp' may unlink the destination file
>+# if it is unable to open it with O_WRONLY|O_TRUNC; see:
>+#   http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html
>+# Since the destination filesystem can be anything, it might not support
>+# O_TRUNC, so 'cp' would unlink it first.
>+# Use 'cat' and append-redirection '>>' to save to the final location,
>+# since that is the only way we can be 100% sure of the behaviour.
>+if ! cat "${tmpf}" >>"${tmp_output}"; then
>+    rm -rf "${tmpd}" "${tmp_output}"
>+    exit 1
>+fi
>+rm -rf "${tmpd}"
>+# tmp_output and output are on the same filesystem, so POSIX guarantees
>+# that 'mv' is atomic, because it then uses rename() that POSIX mandates
>+# to be atomic, see:
>+#   http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html
>+if ! mv "${tmp_output}" "${output}"; then
>+    rm -f "${tmp_output}"
>+    exit 1
>+fi

Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

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

* [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads)
  2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
                   ` (8 preceding siblings ...)
  2014-08-03 17:53 ` [Buildroot] [PATCH 9/9 v4] support/download: convert wget " Yann E. MORIN
@ 2014-08-04 18:29 ` Thomas Petazzoni
  9 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2014-08-04 18:29 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun,  3 Aug 2014 19:53:38 +0200, Yann E. MORIN wrote:

> Yann E. MORIN (9):
>       support/download: add download wrapper
>       support/download: convert bzr to use the wrapper
>       support/download: convert localfiles to use the wrapper
>       support/download: convert cvs to use the wrapper
>       support/download: convert git to use the wrapper
>       support/download: convert Hg to use the wrapper
>       support/download: convert scp to use the wrapper
>       support/download: convert svn to use the wrapper
>       support/download: convert wget to use the wrapper

Series applied. Thanks for your work, and thanks a lot to Thomas DS for
the testing.

I've also tested it here locally with a few packages (using wget, git,
bzr and svn) while pointing to an empty BR2_DL_DIR, and it worked fine.
Let's see if it survives the autobuilder testing :)

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2014-08-04 18:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-03 17:53 [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Yann E. MORIN
2014-08-03 17:53 ` [Buildroot] [PATCH 1/9 v4] support/download: add download wrapper Yann E. MORIN
2014-08-03 19:50   ` Thomas De Schampheleire
2014-08-03 17:53 ` [Buildroot] [PATCH 2/9 v4] support/download: convert bzr to use the wrapper Yann E. MORIN
2014-08-03 17:53 ` [Buildroot] [PATCH 3/9 v4] support/download: convert localfiles " Yann E. MORIN
2014-08-03 17:53 ` [Buildroot] [PATCH 4/9 v4] support/download: convert cvs " Yann E. MORIN
2014-08-03 17:53 ` [Buildroot] [PATCH 5/9 v4] support/download: convert git " Yann E. MORIN
2014-08-03 17:53 ` [Buildroot] [PATCH 6/9 v4] support/download: convert Hg " Yann E. MORIN
2014-08-03 17:53 ` [Buildroot] [PATCH 7/9 v4] support/download: convert scp " Yann E. MORIN
2014-08-03 17:53 ` [Buildroot] [PATCH 8/9 v4] support/download: convert svn " Yann E. MORIN
2014-08-03 17:53 ` [Buildroot] [PATCH 9/9 v4] support/download: convert wget " Yann E. MORIN
2014-08-04 18:29 ` [Buildroot] [PATCH 0/9 v4] Cleanups in download helpers (branch yem/check-downloads) Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.