aboutsummaryrefslogtreecommitdiff
path: root/support
Commit message (Collapse)AuthorAgeFilesLines
* support/download: restore mandatory check of hashesGravatar Yann E. MORIN2015-04-251-1/+1
| | | | | | | | | | | | | | Now that custom external toolchains to be downloaded properly instruct to not fail on a missing hash, restore the mandatory hash check for everything else. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: add possibility to not fail on missing hashGravatar Yann E. MORIN2015-04-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In very constrained cases, it might be needed to not fail if a hash is missing. This is notably the case for custom external toolchains to be downloaded, because we do have a .hash file for external toolchains, but we obviously can not have hashes for all existing custom toolchains (he, "custom"!). So, add a way to avoid failing in that case. >From the Makefile, we export the list of files for which not to check the hash. Then, from the check-hash script, if no check was done, and the file we were trying to match in in this exclusion list, we just exit without error. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> changes v6 -> v7: - /beautify/ the pattern in the case clause Changed v5 -> v6: (Arnout) - fix the pattern in the case clause Changes v4 -> v5: - micro-optimisation, use case-esac instead of a for-loop (Arnout) - typoes (Arnout) Changes v3 -> v4: - drop the magic value, use a list of excluded files (Arnout) Changes v1 -> v2: - fix typoes in commit log Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Makefile: rename TARGETS to PACKAGESGravatar Thomas Petazzoni2015-04-141-1/+1
| | | | | | | | | | For clarity, this commit renames the TARGETS variable to the more meaningful PACKAGES variable. Indeed, only packages (handled by one of the package infrastructures) should be listed in this variable, and not other random non-package targets. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* Fix typos in comment blocksGravatar Masahiro Yamada2015-04-082-2/+2
| | | | | | | | | | | [Thomas: fix issues noticed by Arnout: - Rewrap the linux/Config.in paragraph - Revert the "is a toolchain dependency" -> "has a toolchain dependency" change from pkg-generic.mk, as the original was correct.] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: do not warn about missing hash file for repositoriesGravatar Yann E. MORIN2015-04-061-1/+5
| | | | | | | | | | | | | | | | | | | | | When downloading from a repository, we explicitly pass no hash file, because we can't check hashes in that case. However, we're still printing a message that there is a missign hash file. Beside being a bit annoying (since we can't do anything about it), it may also be wrong, especially for packages for which we support multiple versions, with some being downloaded via a git clone and others as tarballs. Just print no warning when the path to the hash file is empty. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: quick fix to avoid breaking on custom toolchainsGravatar Yann E. MORIN2015-04-031-1/+1
| | | | | | | | | | | | | | When the user selects a custom toolchain to be downloaded, there's no hash for that toolchain, so the download fails, now that hashes are mandatory. Fix that by simply exiting as if there was no error, until we have a better fix... Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: warn when there's no .hash fileGravatar Yann E. MORIN2015-04-031-0/+1
| | | | | | | | | | | | Instead of silently accepting a missing .hash file, print a warning. This can be grepped from a build log, to find packages that still have no hash, with the long-term goal of adding hashes for all packages. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: always fail when there's no hashGravatar Yann E. MORIN2015-04-031-6/+2
| | | | | | | | | | | | | | | | | | At the time we introduced hashes, we did not want to be too harsh in the beginning, and give people some time to adapt and accept the hashes. So we so far only whined^Wwarned about a missing hash (when the .hash file exists). Some time has passed now, and people are still missing updating hashes when bumping packages. Let's make that warning a little bit more annoying... Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: properly catch missing hashesGravatar Yann E. MORIN2015-04-031-1/+10
| | | | | | | | | | | | | When checking hashes reports no hash for a file, and this is treated as an error (now: because BR2_ENFORCE_CHECK_HASH is set; later: because that will be the new and only behaviour), exit promptly in error. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: return different exit codes for different failuresGravatar Yann E. MORIN2015-04-031-3/+12
| | | | | | | | | | | | | | | | | | | | Return different exit codes depending on the error that occured: 0: no error (hash file missing, or all hashes match) 1: unknown option 2: hash file exists, but at least one hash in error 3: hash file exists, but no hash for file to check 4: hash file exists, but at least one hash type unknown This will be used in a later patch to decide whether the downloaded file should be kept or removed. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Samuel Martin <s.martin49@gmail.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: add explicit no-hash supportGravatar Yann E. MORIN2015-04-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to explicitly state that an archive has no hash. This can be used for archives downloaded from a repository, like a git-clone or a subversion checkout, or using the github helper. This will come in handy when we'll eventually make hashes mandatory as soon as a .hash file exists: for some packages, like gcc, some versions are downloaded as archives from upstream, while other versions may come from a GitHub repository (via the github herlper). In this case, a .hash file would exist, that contains hashes for the downloaded tarballs, but archives downloaded from the repository would not have a hash (since it is currently not possible to have reproducible such archives). So, we'd need a way to explicitly state there is no hash, on purpose, for those archives. So, add 'none' as a new type of hash. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: make hash file optionalGravatar Yann E. MORIN2015-04-032-4/+1
| | | | | | | | | | | | | | | | | | | | Currently, specifying a hash file for our download wrapper is mandatory. However, when we download a git, svn, bzr, hg or cvs tree, there's by design no hash to check the download against. Since we're going to have hash checking mandatory when a hash file exists, this would break those downloads from a repository. So, make specifying a hash file optional when calling our download wrapper and bail out early from the check-hash script if no hash file is specified. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/graph-depends: allow excluding virtual packagesGravatar Yann E. MORIN2015-04-011-0/+4
| | | | | | | | | Like for --stop-on, make --exclude recognise the keyword 'virtual', to stop on virtual packages (as explained in the help...). Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/graph-depends: add option to completely exclude a packageGravatar Yann E. MORIN2015-03-311-2/+15
| | | | | | | | | | Similar to --stop-on, but also omits the package from the graph. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Francois Perrad <fperrad@gmail.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/graph-depends: accepts globs to stop on packageGravatar Yann E. MORIN2015-03-311-2/+5
| | | | | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Francois Perrad <fperrad@gmail.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/graph-depends: add option to stop on specific packagesGravatar Yann E. MORIN2015-03-311-1/+13
| | | | | | | | | | | | | | Add a new option to graph-depends, that users can set to stop the graph on a specific (set of) package(s). This accepts any actual package name, or the 'virtual' keyword to stop on virtual packages. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Francois Perrad <fperrad@gmail.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/mkusers: enhance error messagesGravatar Yann E. MORIN2015-03-291-8/+14
| | | | | | | | | | | The current error messages are a bit terse, and do not provide all the required information. Expand them to provide more context. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Tom Elliott <tommygunsster@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchainfile.cmake: only search the sysroot for CMake moduleGravatar Samuel Martin2015-03-161-0/+1
| | | | | | | | | This change prevents CMake from searching outside the sysroot location for CMake modules when cross-compiling. Signed-off-by: Samuel Martin <s.martin49@gmail.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-depends: remove absent targets from TARGET_EXCEPTIONSGravatar Alexey Brodkin2015-03-111-9/+0
| | | | | | | | | | | | | Most of targets listed in TARGET_EXCEPTIONS these days are long gone, so why still keep them? Most of those targets were removed in this commit: http://git.buildroot.net/buildroot/commit/?id=02b88600312554bf166f6cfd71f7f2ede783096a Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* graph-depends: display virtual package with italic styleGravatar Francois Perrad2015-03-081-1/+29
| | | | | | | | | | virtual packages are found by their version, so we retrieve the version of all packages Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: ignore linux-ext-fbtft.mk and doc-asciidoc.mkGravatar Fabio Porcedda2015-02-151-0/+2
| | | | | Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* pkg-stats: add kconfig and rebar infrastructuresGravatar Fabio Porcedda2015-02-151-0/+32
| | | | | Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* kconfig/lxdialog: get ncurses CFLAGS with pkg-configGravatar Bjørn Forsman2015-01-073-1/+56
| | | | | | | | | | | | | | | | | | | | | | This makes "make menuconfig" also work on systems where ncurses is not installed in a standard location (such as on NixOS). This patch changes ccflags() so that it tries pkg-config first, and only if pkg-config fails does it go back to the fallback/manual checks. This is the same algorithm that ldflags() already uses. [This patch is already applied upstream (is part of linux v3.18): https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be8af2d54a66911693eddc556e4f7a866670082b I'm adding this instead of doing a full upstream kconfig sync because there was a conflict in one of the Buildroot kconfig patches (against linux 3.18-rc1), which I was unable to resolve. Just drop this patch next time Buildroot kconfig is synced against upstream. ] Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: further silence the git helperGravatar Yann E. MORIN2015-01-051-1/+1
| | | | | | | | | | | | | | We expresely call printf in the git helper, calls which were not addresed in the previous silent-build patchset. Just redirect stdout to oblivion when being silent. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Fabio Porcedda <fabio.porcedda@gmail.com> Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-download: silence downloads if make is silentGravatar Fabio Porcedda2015-01-041-6/+7
| | | | | | | | | | | If doing a silent build (make -s -> QUIET=-q), silence all downloads, by passing the -q flag downward to backends as well as to check-hash. Change a printf to use the trace functions. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/download: support -q in all download backendsGravatar Yann E. MORIN2015-01-049-53/+131
| | | | | | | | | | | | | | | Add an option flag to all backends, as well as the check-hash script, so as to silence download helpers when the user wants a silent build. Additionaly, make the default be verbose. Inspired by Fabio's patch on git/svn. [Thomas: fix a typo "Environemnt" -> "Environment" Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Fabio Porcedda <fabio.porcedda@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/libtool: add patch for newer versionsGravatar Gustavo Zacarias2014-12-211-0/+95
| | | | | | | | | | | | Add patch to support newer (>2.4.2) versions. Adjust patch logic to check for patchlevel greater than 2 (apply new patch) or not (apply current patch). Some people/distributions used unreleased versions, with the string being 2.4.2.x, this packages are AUTORECONFed and have to be kept like this since the up-to-2.4.2 patch doesn't work, neither does the from-2.4.3 version patch. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-download: check hashes for locally cached filesGravatar Yann E. MORIN2014-12-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, upstream just update their releases in-place, without renaming them. When that package is updated in Buildroot, a new hash to match the new upstream release is included in the corresponding .hash file. As a consequence, users who previously downloaded that package's tarball with an older version of Buildroot, will get stuck with an old archive for that package, and after updating their Buildroot copy, will be greeted with a failed download, due to the local file not matching the new hashes. Also, an upstream would sometime serve us HTML garbage instead of the actual tarball we requested, like SourceForge does from time for as-yet unknown reasons. So, to avoid this situation, check the hashes prior to doing the download. If the hashes match, consider the locally cached file genuine, and do not download it. However, if the locally cached file does not match the known hashes we have for it, it is promptly removed, and a download is re-attempted. Note: this does not add any overhead compared to the previous situation, because we were already checking hashes of locally cached files. It just changes the order in which we do the checks. For the records, here is the overhead of hashing a 231MiB file (qt-everywhere-opensource-src-4.8.6.tar.gz) on a core-i5 @2.5GHz: cache-cold cache-hot sha1 1.914s 0.762s sha256 2.109s 1.270s But again, this overhead already existed before this patch. 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>
* pkg-download: verify the hashes from the download wrapperGravatar Yann E. MORIN2014-12-112-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pkg-download: check for already downloaded file in the download wrapperGravatar Yann E. MORIN2014-12-111-0/+5
| | | | | | | | | | | | | | | | 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>
* support/download: add option parsing to the download wrapperGravatar Yann E. MORIN2014-12-112-99/+165
| | | | | | | | | | | | | | | | 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>
* Rename BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBSGravatar Thomas Petazzoni2014-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed from "prefer static libraries when possible" to "use only static libraries". The former semantic didn't make much sense, since the user had absolutely no control/idea of which package would use static libraries, and which packages would not. Therefore, for quite some time, we have been starting to enforce that BR2_PREFER_STATIC_LIB should really build everything with static libraries. As a consequence, this patch renames BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS, and adjust the Config.in option accordingly. This also helps preparing the addition of other options to select shared, shared+static or just static. Note that we have verified that this commit can be reproduced by simply doing a global rename of BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* pkg-cmake.mk: Set CMAKE_SYSTEM_PROCESSOR.Gravatar Volker Krause2014-12-091-0/+1
| | | | | | | | | | | | | | | | This is rarely needed by packages, but convenient to have when it is. [Thomas: - don't define ARM_VARIANT as this name is too global, use CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT instead. - don't use ifndef, but a more traditional else clause, for the non-ARM cases.] Signed-off-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Bernd Kuhls <bernd.kuhls@t-online.de> Reviewed-by: Romain Naour <romain.naour@openwide.fr> Acked-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/script/scancpan: remove duplicated dependencyGravatar Francois Perrad2014-12-091-9/+9
| | | | | | | | | | | | | | Dependencies from metacpan comes as a list of modules which is transformed in a list of distribution for BR. Different modules could be included in the same distribution, so duplication is possible. This can for example be seen with the HTTP-Daemon module, which would get two times the dependencies on HTTP-Message without this commit. [Thomas: slightly extend commit log.] Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/dependencies.sh: cleanup the output of the 32 bits gcc testGravatar Jens Stimpfle2014-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The screen is cluttered when we build for 32 bit target and 32 bit gcc is missing. ~/buildroot$ make [...] /usr/bin/ld: cannot find crt1.o: No such file or directory /usr/bin/ld: cannot find crti.o: No such file or directory /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_s.so when searching for -lgcc_s /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lc /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_s.so when searching for -lgcc_s /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status [...] Your Buildroot configuration needs a compiler capable of building 32 bits binaries. The final note is enough, and adding 2>/dev/null to the gcc test invocation is also more consistent with the rest of the script. The patch makes the '/usr/bin/ld:' and 'collect2:' lines go away. Signed-off-by: Jens Stimpfle <debian@jstimpfle.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/dependencies.sh: improve g++ test to avoid misleading outputGravatar Jens Stimpfle2014-12-081-0/+2
| | | | | | | | | | | | | | | | | When g++ is not installed, a misleading error message turns up because of a bad combination of an unquoted shell variable and control flow. ~/buildroot$ make You may have to install 'g++' on your build machine /home/testuser/buildroot/support/dependencies/dependencies.sh: 136: [: -lt: unexpected operator [Thomas: - fixed commit log, as per the suggestion of Yann E. Morin. - don't change existing empty new lines, suggested by Yann. - use positive logic in the newly added test, suggested by Yann.] Signed-off-by: Jens Stimpfle <debian@jstimpfle.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/script/scancpan: fix corelist checkGravatar Francois Perrad2014-12-071-2/+2
| | | | | | | | | module could be removed of the core, so check if the module is currently in the core, but not if the module was once time included in the core. Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-download: fix arguments to hash checking scriptGravatar Yann E. MORIN2014-12-071-2/+2
| | | | | | | | The argument are correctly used, but incorrectly documented. Inverse the comments to match the actual usage. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Merge branch 'next'Gravatar Peter Korsgaard2014-12-011-0/+26
|\ | | | | | | | | | | | | | | | | Conflicts: Makefile package/flac/0001-fix-altivec-logic.patch package/grantlee/Config.in Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
| * support/scripts/scancpan: generate hash fileGravatar Francois Perrad2014-11-221-0/+26
| | | | | | | | | | | | | | | | | | | | | | retrieve MD5 and SHA256 from metacpan.org, and store them in the hash file for each package. [Thomas: remove the odd indentation of the filename for the md5 hash lines in the hash file.] Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* | infra: do not append an empty LD_LIBRARY_PATHGravatar Yann E. MORIN2014-11-301-0/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we set LD_LIBRARY_PATH when building our host tools, we append any pre-existing value to our custom path: LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" But then if LD_LIBRARY_PATH was previously empty, we end up with an LD_LIBRARY_PATH that ends with a colon. Also, when we check that an existing LD_LIBRARY_PATH does not contain CWD, we previously did not look for a zero-length prefix. Since 'man ld.so' says of LD_LIBRARY_PATH: A colon-separated list of directories in which to search for ELF libraries at execution-time. Similar to the PATH environment variable. And POSIX states about PATH: A zero-length prefix is a legacy feature that indicates the current working directory. And bash also recognises a zero-length prefix to search in CWD: A zero-length (null) directory name in the value of PATH indicates the current directory. We may thus end up on a system where a zero-length prefix in LD_LIBRARY_PATH is interpreted as CWD. Do not append the previous LD_LIBRARY_PATH if it was empty, and check for a zero-length prefix when checking dependencies. 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> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Change /bin/bash shebangs into /usr/bin/env bashGravatar Bjørn Forsman2014-10-2514-14/+14
| | | | | | | | | | | | | | | | | Not all systems have /bin/bash (e.g. NixOS[1] doesn't). Buildroot already uses /usr/bin/env shebangs for other interpreters (perl, python), so why not bash? This changes only the shebangs used by Buildroot itself; stuff installed to the target system is left unchanged. With this applied I can run Buildroot unmodified on NixOS. [1]: http://nixos.org/ Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* apply-patches.sh: don't print anything when "make -s" is usedGravatar Fabio Porcedda2014-10-251-3/+14
| | | | | | | | | | | | The make "-s" option is used to enable the "Silent operation" so if that option is used don't print anything as far as there isn't any error. Add the "-s" option to "apply-patches.sh" to enable silent operation. [Peter: use the existing QUIET variable] Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package: indentation cleanupGravatar Jerzy Grzegorek2014-10-252-4/+4
| | | | | Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* scripts/mkusers: allow the creation of groups aloneGravatar Gustavo Zacarias2014-10-221-0/+2
| | | | | | | | | | Let mkusers create groups alone, useful for supplementary permissions in udev/systemd for example where users can be added to later at runtime. Use a magic string "-" to signal that user creation should be skipped. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: add statistics about hash filesGravatar Thomas Petazzoni2014-10-191-0/+26
| | | | | | | | | | | As discussed during the Buildroot meeting, this commit extends the pkg-stats script to include statistics about the number of packages having vs. not having the hash file. As of today, we have 104 packages with the hash file, and 1274 packages without. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* scripts/graph-build-time: properly warn about missing modulesGravatar Luca Ceresoli2014-10-121-3/+8
| | | | | | | | | Currently the graph-build-time script prints a python exception if a needed module cannot be imported. Catch the exception and tell the user which packages are missing, as we do for other missing dependencies. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* scripts/graph-build-time: clarify backend selectionGravatar Luca Ceresoli2014-10-121-0/+5
| | | | | | | | | | | | | | | | | | This instruction in the middle of 'import' lines looks very strange. Also, it was not obvious to me what the 'Agg' backend is. Both things are actually correct, but it took a while to find out why. So clarify with a comment to save someone else's time. [Peter: fix s/soe/some/ typo] Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Sascha Arthur <sascha.arthur@gmail.com> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* .mk files: bulk aligment and whitespace cleanup of assignmentsGravatar Thomas De Schampheleire2014-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* support/script/scancpan: add -test optionGravatar Francois Perrad2014-10-041-3/+10
| | | | | | | | | | | | | | | | | | | Perl modules can have three different types of dependencies: - configure/build time dependency which becomes host dependency - runtime dependency which becomes target dependency - test time dependency which is useless in a cross-compiling context like BR Before this patch, test time dependencies are handled like runtime dependencies. After this patch, test time dependencies are ignored by default. The newly added -test option allows to add them anyway if needed. [Thomas: reword commit log using Francois proposal.] Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>