summaryrefslogtreecommitdiff
path: root/package/pkg-download.mk
AgeCommit message (Collapse)Author
2014-12-11pkg-download: verify the hashes from the download wrapperYann E. MORIN
Instead of repeating the check in our download rules, delegate the check of the hashes to the download wrapper. This needs three different changes: - add a new argument to the download wrapper, that is the full path to the hash file; if the hash file does not exist, that does not change the current behaviour, as the existence of the hash file is checked for in the check-hash script; - add a third argument to the check-hash script, to be the basename of the file to check; this is required because we no longer check the final file with the final filename, but an intermediate file with a temporary filename; - do the actual call to the check-hash script from within the download wrapper. This further paves the way to doing pre-download checks of the hashes for the locally cached files. Note: this patch removes the check for hashes for already downloaded files, since the wrapper script exits early. The behaviour to check localy cached files will be restored and enhanced in the following patch. [Thomas: fix minor typo in comment.] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Peter Korsgaard <jacmet@uclibc.org> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-12-11pkg-download: check for already downloaded file in the download wrapperYann E. MORIN
Instead of repeating the same test again and again in all our download rules, just delegate the check for an already downloaded file to the download wrapper. This clears up the path for doing the hash checks on a cached file before the download. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Peter Korsgaard <jacmet@uclibc.org> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-12-11support/download: add option parsing to the download wrapperYann E. MORIN
Instead of relying on argument ordering, use actual options in the download wrapper. Download backends (bzr, cp, hg...) are left as-is, because it does not make sense to complexify them, since they are almost very trivial shell scripts, and adding option parsing would be really overkill. This commit also renames the script to dl-wrapper so it looks better in the traces, and it is not confused with another wrapper. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-12-08pkg-download: VERIFY_HASH: use same hash file for host and target downloadsPeter Korsgaard
Fixes (or atleast stops the build with a saner description): http://autobuild.buildroot.net/results/1a9/1a9643f8633db038d4fe5ca4a32e4d52e70a3a1a/ We're using the same sources for host and target downloads, so it makes sense to use the same <pkg>.hash file as well to ensure the host version gets verified without us having to maintain a seperate host-<pkg>.hash file. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-25check-hash: silence hash ok messages when make -s is usedPeter Korsgaard
Similar to what we do for apply-patches.sh Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07.mk files: bulk aligment and whitespace cleanup of assignmentsThomas De Schampheleire
The Buildroot coding style defines one space around make assignments and does not align the assignment symbols. This patch does a bulk fix of offending packages. The package infrastructures (or more in general assignments to calculated variable names, like $(2)_FOO) are not touched. Alignment of line continuation characters (\) is kept as-is. The sed command used to do this replacement is: find * -name "*.mk" | xargs sed -i \ -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#' -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#' -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#' -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#' Brief explanation of this command: ^\([A-Z0-9a-z_]\+\) a regular variable at the beginning of the line \([?:+]\?=\) any assignment character =, :=, ?=, += \([^\\]\+\) any string not containing a line continuation \([^\\ \t]\+\s*\\\) string, optional whitespace, followed by a line continuation character \(\s*\\\) optional whitespace, followed by a line continuation character Hence, the first subexpression handles empty assignments, the second handles regular assignments, the third handles regular assignments with line continuation, and the fourth empty assignments with line continuation. This expression was tested on following test text: (initial tab not included) FOO = spaces before FOO = spaces before and after FOO = tab before FOO = tab and spaces before FOO = tab after FOO = tab and spaces after FOO = spaces and tab after FOO = \ FOO = bar \ FOO = bar space \ FOO = \ GENIMAGE_DEPENDENCIES = host-pkgconf libconfuse FOO += spaces before FOO ?= spaces before and after FOO := FOO = FOO = FOO = FOO = $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C AT91BOOTSTRAP3_DEFCONFIG = \ AXEL_DISABLE_I18N=--i18n=0 After this bulk change, following manual fixups were done: - fix line continuation alignment in cegui06 and spice (the sed expression leaves the number of whitespace between the value and line continuation character intact, but the whitespace before that could have changed, causing misalignment. - qt5base was reverted, as this package uses extensive alignment which actually makes the code more readable. Finally, the end result was manually reviewed. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Cc: Yann E. Morin <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-08-04support/download: convert wget to use the wrapperYann E. MORIN
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') Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04support/download: convert svn to use the wrapperYann E. MORIN
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') Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04support/download: convert scp to use the wrapperYann E. MORIN
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') Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04support/download: convert Hg to use the wrapperYann E. MORIN
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') Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04support/download: convert git to use the wrapperYann E. MORIN
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') Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04support/download: convert cvs to use the wrapperYann E. MORIN
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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04support/download: convert localfiles to use the wrapperYann E. MORIN
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') Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-04support/download: convert bzr to use the wrapperYann E. MORIN
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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-18pkg-download: Fix DOWNLOAD_LOCALFILESAndreas Naumann
The cp helperscript expects a filename as target, but just the folder name was given. Signed-off-by: Andreas Naumann <anaumann@ultratronik.de> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-07-04pkg-infra: add possiblity to check downloaded files against known hashesYann E. MORIN
Some of the packages that Buildroot might build are sensitive packages, related to security: openssl, dropbear, ca-certificates... Some of those packages are downloaded over plain http, because there is no way to get them over a secure channel, such as https. In these dark times of pervasive surveillance, the potential for harm that a tampered-with package could generate, we may want to check the integrity of those sensitive packages. So, each package may now provide a list of hashes for all files that needs to be downloaded, and Buildroot will just fail if any downloaded file does not match its known hash, in which case it is removed. Hashes can be any of the md5, sha1 or sha2 variants, and will be checked even if the file was pre-downloaded. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-03pkg-infra: move the cp (aka localfiles) download helper to a scriptYann E. MORIN
Maintaining the download helpers in the Makefile has proved to be a bit complex, so move it to a shell script. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-03pkg-infra: move the scp download helper to a scriptYann E. MORIN
Maintaining the download helpers in the Makefile has proved to be a bit complex, so move it to a shell script. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-03pkg-infra: move the bzr download helper to a scriptYann E. MORIN
Maintaining the download helpers in the Makefile has proved to be a bit complex, so move it to a shell script. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-03pkg-infra: move the wget download helper to a scriptYann E. MORIN
Maintaining the download helpers in the Makefile has proved to be a bit complex, so move it to a shell script. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-02pkg-infra: move the hg download helper to a scriptYann E. MORIN
Maintaining the download helpers in the Makefile has proved to be a bit complex, so move it to a shell script. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> [tested a particular scenario that used to fail, when the 'hg archive' step is interrupted, now working fine] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-02pkg-infra: move the cvs download helper to a scriptYann E. MORIN
Maintaining the download helpers in the Makefile has proved to be a bit complex, so move it to a shell script. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-02pkg-infra: move the svn download helper to a scriptYann E. MORIN
Maintaining the download helpers in the Makefile has proved to be a bit complex, so move it to a shell script. [Peter: redirect pushd/popd output to /dev/null] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Reviewed-by: Ryan Barnett <ryan.barnett@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-02pkg-infra: move the git download helper to a scriptYann E. MORIN
The git download helper is getting a bit more complex. Fixing it in the Makefile when it breaks (like the recent breakage with a non-existing sha1-cset) proves to be challenging, to say the least. Move it into a shell script in support/download/git, which will make it much easier to read, maintain, fix and enhance in the future. [Peter: redirect pushd/popd output to /dev/null] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Peter Korsgaard <jacmet@uclibc.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-06-29pkg-download: fix svn download for deleted pathRyan Barnett
If a SVN path has been deleted in a future revision, downloading a package's source will fail using 'svn checkout -r'. Fix using URL@REV syntax since the SVN command will then verify the path at the specified version. Without using the URL@REV syntax, the SVN command will attempt to verify the path exists on the the HEAD revision before checking out the path at the specified revision. Error seen if SVN path has been deleted in HEAD using svn checkout -r: svn: E160013: '/svn/path/' path not found Signed-off-by: Ryan Barnett <ryan.barnett@rockwellcollins.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-06-04replace github with GitHubSimon Dawson
The correct capitalisation pattern is "GitHub"; fix manual and makefile commentary. Signed-off-by: Simon Dawson <spdawson@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-04-06pkg-download: update the github helperSamuel Martin
Once again, github updates the source download url. Even if only the zip archive link is advertised on the repositories' page, the *.tar.gz is still available. It is worthy to note that the tarball's content differs depending if it has been fetched from the former and the new url (the root directory name changes). Signed-off-by: Samuel Martin <s.martin49@gmail.com> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-02pkg-infra: DOWNLOAD is never called with two argumentsYann E. MORIN
Currently, the DOWNLOAD helper accepts one or two arguments: - the source URI - the source filename; if missing, it is derived from the URI But we have no caller of DOWNLOAD that passes a second argument. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-02-11Makefile.legacy: fix recursive invocation with BUILDROOT_DL_DIR and _CONFIGArnout Vandecappelle
The legacy support for the old BUILDROOT_DL_DIR and BUILDROOT_CONFIG breaks down when make is invoked recursively - which is done in a few cases, e.g. silentoldconfig, external-defs, ... These targets always give a legacy error. For BUILDROOT_DL_DIR, this is fixed by making sure that the original value of BR2_DL_DIR taken from the environment is also exported again. For BUILDROOT_CONFIG, this is fixed with an additional comparison of the environment variable's value with the fake value that we introduce ourselves. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-09infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR.Arnout Vandecappelle
To make the naming consistent (all user-visible options should be prefixed BR2_). An entry is added to Makefile.legacy to warn users who have set BUILDROOT_DL_DIR but not BR2_DL_DIR. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-04pkg-download: make sure git downloads fail for unknown versionsThomas Petazzoni
The current git download helper creates the tarball by doing: git archive <version> | gzip -c > <tarball> Unfortunately, even if "git archive" fails and returns a non-zero error code, gzip ignores that, compresses nothing, and returns success (zero error code). The consequence of this behavior is that when the git version provided in the package is incorrect, we are not failing during the download step, but later on when trying to extract the tarball (which was incorrectly created as a result of the failing git archive). To fix this, we change the tarball creation logic to: git archive -o <tarball>.tmp <version> && gzip -c <tarball>.tmp > <tarball> && rm -f <tarball>.tmp If the build is interrupted during the "gzip" command, we may leave the .tmp file behind us, but this also happens with wget downloads, and is generally not considered a problem, since this temporary file will be overwritten next time we attempt to do download this package. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-25package: make package download from Mercurial repositories more robustMathias De Maré
Previously, when cloning a Mercurial repository, aborting the clone could (in some cases) leave behind an empty directory. As a result, a later clone would fail. Signed-off-by: Mathias De Maré <mathias.demare@gmail.com> Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-12-06infra: introduce github helper functionMischa Jonker
In order to make it easier to cope with changes in github download-URL's, this patch introduces the github helper function. It generates the site URL of a github repository. It's usage is $(call github,user,pkg,version). [Thomas: extracted from Mischa original commit, macro moved to pkg-download.mk] Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-09-13downloads: add basic CVS supportGustavo Zacarias
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> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-20fix white spacesJerzy Grzegorek
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-06Normalize separator size to 80Alexandre Belloni
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-12-09pkg-download.mk: fix multiple matches in shallow clone testDanomi Manchego
Move the git reference directly to git-ls-remote rather than piping the output to grep, to help avoid reporting partial matches rather than the actual requested reference. Also, add quotes to protest "test" from failing when multiple strings are reported. Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-12-02pkg-download.mk: Fix shallow cloneStephan Hoffmann
Some git versions (e.g. 1.7.0) do not treat trying to shallow clone a non existing branch or tag as a fatal error but report a warning and clone HEAD instead. Thus the fallback mechanism does not work in this case. This patch introduces a check for the presence of the requested version as a branch or tag before trying the shallow clone. It also removes the need to do two clones when a sha1 is given as a packege version. [Peter: use cut -f2-] Signed-off-by: Stephan Hoffmann <sho@relinux.de> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-04pkg-download: Make a shallow clone for git downloadsArnout Vandecappelle (Essensium/Mind)
When downloading from git, we clone the whole repository and then only use the latest commit. That's a lot of redundant stuff. So instead, make a shallow clone. Unfortunately that's only possible when downloading a branch or tag, so fall back to the old method if git gives an error. This speeds up the cloning of a linux git from more than 2 hours to 20 minutes on a 200KB/s link). Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-09-10pkg-download: allow relative BR2_DL_DIRPeter Korsgaard
And move the BUILDROOT_DL_DIR override here as well for consistency. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-07-22Package downloads: allow restricting to primary site onlyThomas De Schampheleire
This patch adds a new config option BR2_PRIMARY_SITE_ONLY that, when set, restricts package downloads to the specified BR2_PRIMARY_SITE. If the package is not present on the primary site, the download fails. This is useful for project developers who want to ensure that the project can be built even if the upstream tarball locations disappear. [thomas.petazzoni@free-electrons.com: Extend config option help message with more details coming from the commit log. Added a dependency on the fact that a primary site has been defined. Without any primary site (the default configuration), this new option does not make any sense.] Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-22pkg-download.mk: support detection of URI schemes in DOWNLOADThomas De Schampheleire
When using one of the package infrastructures, the DOWNLOAD function uses $(PKG)_SITE_METHOD to determine the appropriate download method, which is autodetected based on the URI if none was explicitly set. When the DOWNLOAD function is called directly, for example when downloading a toolchain, or from a package that does not use one of the package infrastructures, the SITE_METHOD is not autodetected, and thus the download defaults to wget. This patch adds URI scheme detection directly to the DOWNLOAD method, in case no SITE_METHOD was detected yet. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-22pkg-download.mk: use stripurischeme function in localfiles download methodThomas De Schampheleire
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-22pkg-download.mk: allow using localfiles outside of package infrastructureThomas De Schampheleire
The localfiles download method uses $($(PKG)_SITE))) and $($(PKG)_SOURCE) instead of $(1) and $(2). This means that it can only be used for package downloads (through gentargets, autotargets, ...) and not for other downloads like external toolchains. This patch changes localfiles to allow this, just as the wget and scp download methods already did. For the version control download methods, nothing changes. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-01pkg-download: handle interrupted wget downloadsArnout Vandecappelle
When a wget download is interrupted, the downloaded file is still created. It will therefore not be re-downloaded in the next build, and the extraction will fail. To avoid this, download to a temporary file first and rename when the download is successful. The existing mechanism doesn't work for interrupted downloads because the whole sub-shell is interrupted, so the rm-part never gets executed. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-05-23pkg-download.mk: Add missing argument when downloading from primary mirror (scp)Thomas De Schampheleire
This problem was already fixed by Markos Chandras for wget, but not for scp. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-05-05pkg-download.mk: Add missing argument when downloading from primary mirrorMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-04-19pkg-*.mk: add some comments, update some existing commentsThomas Petazzoni
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-04-19Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mkThomas Petazzoni
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>