summaryrefslogtreecommitdiffstats
path: root/package/pkg-generic.mk
Commit message (Collapse)AuthorAgeFilesLines
* legal-info: remove outdated commentLuca Ceresoli2016-03-061-2/+1
| | | | | | | | | | | | | This comment is outdated since the assignment of $(2)_MANIFEST_TARBALL and $(2)_MANIFEST_SITE have been removed, which happened in b9f4727ff4d512868352494f5209fff4da147473. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Thomas: adjust comment as suggested by Yann E. MORIN.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* legal-info: fix detection of "override" packagesLuca Ceresoli2016-03-061-3/+1
| | | | | | | | | | | | | | | | | | The ifneq ($$($(2)_SITE_METHOD),override) test will always match because SITE_METHOD is never set to "override". The result is that some packages are downloaded and extracted unnecessarily, although they are (correctly) not saved in output/legal-info/. Fix by simply testing $(2)_OVERRIDE_SRCDIR instead: when empty, it indicates that the packages is neither a "local" site-method package nor a package that has its source directory overridden. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: catch failures in graph-dependsYann E. MORIN2016-02-071-3/+5
| | | | | | | | | | | | | | | | | | | | | Currently, we generate the dependency graph in a single command, piping the stdout of support/scripts/.graph-depends to the stdin of dot. Unfortunately, this means we can't catch a failure of graph-depends, as the shell can only treturn the exit code of the last command in a pipe. Still, we do want to keep the output of graph-depends, and we in fact do keep it by mean of a tee. graph-depends has just gained the ability to generate its output to a file, so we break the pipe in two differnet commands, so we can bail out on graph-depends errors. Do that for the two call sites. 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>
* pkg-generic: improve incorrectly used package detectionThomas Petazzoni2016-01-031-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the check that packages we build are indeed enabled is done at the time a package is configured. This can come quite late in the build process, and does not provide direct knowledge of the real culprit for the incorrect dependency. However, we can improve these two issues quite easily, albeit at the expense of a very slightly more complicated make code. First, the check can not be done at the time we define the package, i.e. in the inner-generic-pacakge, because all its dependencies might have not been parsed yet, so we can't yet know whether it is enabled or not (because we can't match the package name of the dependency to its Kconfig variable yet). But then, we know we have all packages definitions after we scanned the the bundled packages, kernel, bootloaders and toolchains, as well as the br2-external tree (if any). So, at this location, we iterate through the list of enabled packages, and check that the packages they each depend on are indeed enabled. This allows us to: 1- do the check very early, before any build action, 2- report on the exact offending package very easily. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* core/pkg-virtual: do not check they are neabledYann E. MORIN2015-12-301-1/+4
| | | | | | | | | | | | | | | | | Virtual packages do not have a Kconfig symbol, so we must not check that they are enabled. Fixes: http://autobuild.buildroot.org/results/287/28713478cc6edf8e5d5c3e830fee86a42f0afa8d/ ... and numerous similar failures ... [Thomas: - use "$($(PKG)_IS_VIRTUAL)" != "YES" instead of ! "$($(PKG)_IS_VIRTUAL)" = "YES"] 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>
* pkg-generic: detect incorrectly used packageThomas Petazzoni2015-12-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | In Buildroot, the selection of a package from a Config.in level and from a Makefile level are completely disconnected. This can lead to issues where the build of a package is triggered at the Makefile level due to the package being listed in another package <pkg>_DEPENDENCIES variable, even if that package is not enabled in the configuration. This has for example been the case recently with python-can having 'python' in its <pkg>_DEPENDENCIES, while python-can could be enabled when Python 3.x is used, in which case the 'python' package should not be built. To detect such issues more easily, this patch adds a check in the package infrastructure. When the build process of a package is being triggered, we verify that the package is enabled in the configuration. We do this check in the "configure" step, since this step is the first common step between the normal download case and the "local site method" / "package override" case. [Thomas: adjust the error message as suggested by Yann, to take into account the fact that the problem might not be in a direct reverse dependency, but in something higher up in the tree of reverse dependencies.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-generic: remove unused NAMEVERArnout Vandecappelle2015-12-171-1/+0
| | | | | | | | Commit 5538e476 (from 2013!) removed the use of the NAMEVER variable in .stamp_patched, but it was still defined. So remove the definition now. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: check host executables have appropriate RPATHYann E. MORIN2015-11-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we build our host programs, and they depend on a host library we also build, we want to ensure that program actually uses that library at runtime, and not the one from the system. We currently ensure that in two ways: - we add a RPATH tag that points to our host library directory, - we export LD_LIBRARY_PATH to point to that same directory. With these two in place, we're pretty much confident that our host libraries will be used by our host programs. However, it turns our that not all the host programs we build end up with an RPATH tag: - some packages do not use our $(HOST_LDFLAGS) - some packages' build system are oblivious to those LDFLAGS In this case, there are two situations: - the program is not linked to one of our host libraries: it in fact does not need an RPATH tag [0] - the program actually uses one of our host libraries: in that case it should have had an RPATH tag pointing to the host directory. For libraries, they only need an RPATH if they depend on another library that is not installed in the standard library path. However, any system library will already be in the standard library path, and any library we install ourselves is in $(HOST_DIR)/usr/lib so already in RPATH. We add a new support script that checks that all ELF executables have a proper DT_RPATH (or DT_RUNPATH) tag when they link to our host libraries, and reports those file that are missing an RPATH. If a file missing an RPATH is an executable, the script aborts; if only libraries are are missing an RPATH, the script does not abort. [0] Except if it were to dlopen() it, of course, but the only program I'm aware of that does that is openssl, and it has a correct RPATH tag. [Peter: reworded as suggested by Arnout, fix HOT_DIR typo in comment] 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> Cc: Peter Korsgaard <jacmet@uclibc.org> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* core/legal-info: fix missing double-$Yann E. MORIN2015-11-171-1/+1
| | | | | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* core/pkg-generic: allow step hooks to fail a stepYann E. MORIN2015-11-041-8/+8
| | | | | | | | | | | | | | | | | Currently, we touch our stamp files before we call the step hooks. This means a step hook can not properly fail a step, since the stamp file exists even if the hook exits in error, thus a subsequent 'make' would not try to redo that step. Fix that by calling the hooks before we touch the stamp files. 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> Cc: Peter Seiderer <ps.report@gmx.net> Cc: Romain Naour <romain.naour@openwide.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: do not accept multiple definitions of a packageYann E. MORIN2015-11-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | One of the selling points for br2-external is to provide a mean to add new packages. However, it is not supported that a package be defined by Buildroot and then redefined in a br2-external tree. This situation may occur without the user noticing or even willing to redefine the package, for example: - br2-external is first created against a version of Buildroot - a package (missing in Buildroot) is added to that br2-external tree - upstream Buildroot adds this package - user updates to the new Buildroot In this case, the result in undefined, and we can't make any guarantee on the result (working or not). Add a sanity check so that a package redefinition gets caught. 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: 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>
* core/pkg-generic: allow packages to exclude files when extractingYann E. MORIN2015-11-031-1/+4
| | | | | | | | | | | | | | | | | Currently, packages that need to exclude parts of the archives when extracting (e.g. to gain space), like gcc or toolchain-external, have to provide custom extract commands, just for the sake of adding a bunch of --exclude directives when calling tar. Add a new variable that packages may set, to provide a space-separated list of patterns to exclude. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Reviewed-by: Romain Naour <romain.naour@openwide.fr> Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-generic: add step_pkg_size global instrumentation hookThomas Petazzoni2015-10-171-0/+32
| | | | | | | | | | | | | | | | | | | | | | | This patch adds a global instrumentation hook that collects the list of files installed in $(TARGET_DIR) by each package, and stores this list into a file called $(BUILD_DIR)/packages-file-list.txt. It can later be used to determine the size contribution of each package to the target root filesystem. Note that in order to detect if a file installed by one package is later overriden by another package, we calculate the md5 of installed files and compare them at each installation of a new package. Collecting the list of files installed by each package is done unconditionally, as tests have shown that the performance impact of doing this is negligible. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Ryan Barnett <ryanbarnett3@gmail.com> Tested-by: Ryan Barnett <ryanbarnett3@gmail.com> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* legal-info: allow to declare the actual sources for binary packagesLuca Ceresoli2015-10-041-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FOO_SITE/FOO_SOURCE variables usually point to a tarball containing source code. For the downloaded external toolchains this is not true, the "source" tarball actually contains binaries. This is fine for making Buildroot work, but for legal-info we really want to ship real source code, not binaries. Luckily, some (hopefully all) toolchain vendors publish a downloadable tarball containing the source code counterpart for their binary packages. Here we allow the user to declare the URL of this other tarball in the pair of variables FOO_ACTUAL_SOURCE_TARBALL (by default equal to FOO_SOURCE) and FOO_ACTUAL_SOURCE_SITE (by default equal to FOO_SITE). If the "actual source" package can be downloaded from the same directory as the binary package, then only FOO_ACTUAL_SOURCE_TARBALL needs to be set. Note this change is not strictly toolchain-specific: it might be useful for other packages that happen to ship binaries in the same way. [Thomas: - remove "the source code has not been saved" warning that could never be triggered due to how the conditions were organized. Discussed with Luca live during the meeting.] Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* download: get rid of trailing slash removal hack for FOO_SITELuca Ceresoli2015-10-041-1/+1
| | | | | | | | | | Not needed anymore since the URLs have been cleared, the manual states they are illegal and a check has been introduced to notice future mistakes. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-generic: prevent _SITE URLs with a trailing slashLuca Ceresoli2015-10-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A trailing slash in FOO_SITE is useless, since Buildroot automatically adds a slash between FOO_SITE and the filename as appropriate. Moreover it is potentially harmful, which led to introducing a workaround to strip them: commit 1cbffbd015106ea90fe49e27433375769dc1035b Author: Shawn J. Goff <shawn7400@gmail.com> Date: Fri Apr 12 09:40:30 2013 +0000 eliminate double slashes caused by FOO_SITE ending in a slash When a FOO_SITE variable ends in a slash and gets joined with a FOO_SOURCE variable like $(FOO_SITE)/$(FOO_SOURCE), the resulting URI has a double slash. While double-slashes are fine in unix paths, they are reserved in URIs - the part following '//' must be an authority. So let's ban trailing slashes entirely. They have all been removed in a 7b0e757fb85fd, now add a check to error out loudly in case a new one is added. Example commands to test this check: $ make busybox-dirclean busybox-source rm -Rf /home/murray/devel/buildroot/output/build/busybox-1.23.2 busybox-1.23.2.tar.bz2: OK (md5: 7925683d7dd105aabe9b6b618d48cc73) busybox-1.23.2.tar.bz2: OK (sha1: 7f37193cb249f27630e0b2a2c6c9bbb7b1d24c16) $ $ make BUSYBOX_SITE=http://www.busybox.net/downloads/ busybox-dirclean busybox-source rm -Rf /home/murray/devel/buildroot/output/build/busybox-1.23.2 BUSYBOX_SITE (http://www.busybox.net/downloads/) cannot have a trailing slash make[1]: *** [/home/murray/devel/buildroot/output/build/busybox-1.23.2/.stamp_downloaded] Error 1 make: *** [_all] Error 2 $ Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core/pkg-generic: use tabs, not spacesYann E. MORIN2015-09-271-3/+3
| | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core/pkg-generic: host variants inherits target's override-srcdirYann E. MORIN2015-07-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | When a package has both a target and a host variants, and there is an override-srcdir set for the target variant, the host variant should inherit the target's override-srcdir, unless explicitly set, like we do for all other target-variant properties. However, do not override it if expressly set to empty (i.e. when the user wants to override only the target variant). Also, as we do for the other variables, the target variant never inherits from the host variant. Reported-by: Mike <mikez@OpenPlayer.org> 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: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Tested-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-infra: munging .la files is not limited to autotools packagesYann E. MORIN2015-07-191-0/+30
| | | | | | | | | | | | | | | | | | | Currently, we're only fixing libtool's .la files for autotools packages, and even more so, only for those that do not define their own _INSTALL_STAGING_CMDS. However, .la files might also be installed by non-autotools packages, like the NVidia GPU binary blob (libGL.la). So, move that code into the global build rule, so all packages get their .la files fixed, whether they be autotools packages or not, and whether they define their own _INSTALL_STAGING_CMDS or not. Also print a message. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* skeleton: New packageMaxime Hadjinlian2015-07-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a proper package for the skeleton. The main Makefile is modified to remove the skeleton support. The 'dirs' target, will create the $(TARGET_DIR). The file 'output/target/.root' doesn't exists anymore, as there's no Make rule to statisfy. The infrastructure are modified to filter host-skeleton. It's needed becauses the host-dependencies are derived from the dependencies of the target package where 'host-' is preprended to the depedency name. In the pkg-generic we add skeleton as a dependency to every package. The whole system/system.mk is now removed at the profit of package/skeleton/skeleton.mk [Thomas: - rebase on top of master and fix some minor conflicts - remove the 'select BR2_PACKAGE_SKELETON' in BR2_ROOTFS_SKELETON_DEFAULT and BR2_ROOTFS_SKELETON_CUSTOM, since anyway the skeleton package is always enabled. - fixup a few mistakes in the getty handling due to misnamed variables.] Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-generic.mk: don't depend on external package permissionsGuido Martínez2015-07-131-1/+1
| | | | | | | | | | | | | Reset permissions for rsynced packages (when using OVERRIDE_SRCDIR) to 755/644. We do this under the assumption that source files shouldn't care about their permissions, except possibly for the exec bit. This guarantees that if a package uses 'rsync -a' or 'cp -p' to copy a file from its build dir to the target, it'll end up with the same permissions on the target every time. Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Fix selection of bootloaders from $(BR2_EXTERNAL)Eric Le Bihan2015-07-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | If a package is based on "generic-package", pkg-generic.mk will compute the name of the Kconfig variable to use for checking if this package has been selected by the user. Unfortunately, this mechanism does not take into account the case where a bootloader is declared in a $(BR2_EXTERNAL)/boot directory. So, even if the bootloader has been selected, it will not be added to $(TARGETS) and will not be built. This patch fixes this issue. [Arnout: use single filter line, also apply this to toolchain] Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Cc: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-generic: fix fallout of <pkg>_STRIP_COMPONENTS introductionThomas Petazzoni2015-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of <pkg>_STRIP_COMPONENTS broke the build of the target tar package, because support/dependencies/check-host-tar.mk defines TAR_STRIP_COMPONENTS to --strip-components. Which leads to have the package infrastructure do: $$(TAR_STRIP_COMPONENTS)=$$($(2)_STRIP_COMPONENTS) which for the tar package evaluates to: $$(TAR_STRIP_COMPONENTS)=$$(TAR_STRIP_COMPONENTS) which evalutes to: --strip-components=--strip-components Which obviously doesn't work really well. And in fact the TAR_STRIP_COMPONENTS definition in support/dependencies/check-host-tar.mk is no longer necessary: it was needed in the days where we were trying to support old tar versions that did not support --strip-components. But nowadays, when such an old tar version is encountered, we build our own host-tar which supports --strip-components. Fixes: http://autobuild.buildroot.org/results/ae2/ae20df67f99f75b1ba5d5b7316ad265d66f3aa66/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballsLuca Ceresoli2015-07-121-1/+9
| | | | | | | | | | | | | | | | | | | | Usually package tarballs contain only a directory named "<pkg-name>-<pkg-version>" which contains the actual source tree. To properly extract the source files in $(BUILD_DIR), Buildroot passes the --strip-components=1 option to tar. Unfortunately a few packages ship in a non-standard way, with no root directory or with more than one. In Buildroot these packages must be handled by overriding the <PKG>_DOWNLOAD_CMDS. As the number of such packages is growing, introduce a <PKG>_STRIP_COMPONENTS variable for packages to request a number of components to strip different from 1. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Arnout Vandecappelle <arnout@mind.be> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-generic: Fix host _DL_VERSION corner caseClayton Shotwell2015-07-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | In the case when a package has a host version, the package is dependent on the host version, and the version contains a '/', the host version does not evaluate properly. The host version will contain a '_' instead of a '/', resulting in a failed download. To solve this corner case, add a check to see if the _DL_VERSION of the package has been defined before defining the host _DL_VERSION. If the package _DL_VERSION has not been defined yet, then the version string has not been formatted yet and is still good to use. [Arnout: further simplify things by lifting the override over _VERSION out of the condition - it is always the same.] This error occured on a package in a BR2_EXTERNAL that uses a git repo for its remote storage with '/' in the tag names. I do not believe this affects any packages in the Buildroot mainline but it could in the future. [Arnout: rebase on master, fix existing whitespace error in the else branch.] Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core/pkg-generic: sanitise FOO_OVERRIDE_SRCDIRYann E. MORIN2015-07-041-1/+1
| | | | | | | | | | | | | | | | | In case FOO_OVERRIDE_SRCDIR has trailing spaces, like so: FOO_OVERRIDE_SRCDIR = /path/to/sources\x20 we would end up with a rsync command like so: rsync -au /path/to/sources / /path/to/build/foo which would effectively rsync the whole vfs, eventually filling the whole disk... :-( So, just qstrip the variable before use. 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>
* pkg-generic: introduce a <pkg>_ALL_DOWNLOADS variable and factorize codeThomas Petazzoni2015-04-261-18/+8
| | | | | | | | | | | | | | | | Now, both the download and source-check code are iterating over <pkg>_SOURCE, <pkg>_PATCH and <pkg>_EXTRA_DOWNLOADS elements, figuring out whether they contain full URLs or not. Instead of doing this repeatdly, this patch introduces an internal <pkg>_ALL_DOWNLOADS variable, which contains the list of everything that needs to be downloaded, with URLs already expanded to take into account <pkg>_SITE if needed. This allows to simplify quite significantly the .stamp_download and source-check implementation. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* pkg-generic: don't use DL_MODE in .stamp_downloadedThomas Petazzoni2015-04-261-4/+0
| | | | | | | | | | | | The .stamp_downloaded target is now only being used to really download, and no longer for other activities like "source check" or "external deps". So the check on DL_MODE being equal to DOWNLOAD is no longer necessary. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* pkg-generic: remove the .stamp_rsync_sourced fake stamp fileThomas Petazzoni2015-04-261-12/+1
| | | | | | | | | | | | | The only reason for the .stamp_rsync_sourced fake stamp file target to exist was to handle the SOURCE_CHECK operation on packages using the OVERRIDE_SRCDIR mechanism. Now that this is handled directly inside $(1)-source-check, there is no longer any need for this part of the code. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* pkg-generic: implement source-check targetsThomas Petazzoni2015-04-261-1/+15
| | | | | | | | | | | | | | | | | | This commits extends the common package infrastructure with the $(1)-source-check and $(1)-all-source-check targets. The $(1)-source-check target simply calls the newly added SOURCE_CHECK macro on all items to be downloaded. The $(1)-all-source-check target will depend on the $(1)-all-source-check targets of all dependent packages and the $(1)-source-check target of the current package, which allows to do a recursive source-check in the dependency tree. [Thomas: move the code around a bit to avoid repeating the <pkg>_OVERRIDE_SRCDIR condition, as suggested by Yann.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-download: remove support for the SHOW_EXTERNAL_DEPS DL_MODEThomas Petazzoni2015-04-261-4/+1
| | | | | | | | | | | | Now that the external-deps implementation relies on the per-package <pkg>-all-external-deps and <pkg>-external-deps targets and no longer on the 'source' target with a custom DL_MODE, we can get rid of the support for the SHOW_EXTERNAL_DEPS DL_MODE value in the pkg-download logic. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* pkg-generic: take into account patch dependencies in source, external-deps ↵Thomas Petazzoni2015-04-261-4/+8
| | | | | | | | | | | | | | and legal-info The $(1)-all-{source,external-deps,legal-info} targets currently only take care of the dependencies in <pkg>_DEPENDENCIES, but not <pkg>_PATCH_DEPENDENCIES. This patch fixes that by introducing a <pkg>_FINAL_ALL_DEPENDENCIES. It also reworks the $(1)-show-depends target to make use of <pkg>_FINALL_ALL_DEPENDENCIES. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* pkg-generic: substitute colon and space out of PKG_VERSIONArnout Vandecappelle2015-04-251-2/+4
| | | | | | | | | | | | | | | | | Using a colon or a space in a make target doesn't work, so they have to be filtered out of the PKG_VERSION variable just like the / currently already is. This will be needed for date-based CVS versions. Add a helper macro 'sanitize' in pkg-utils.mk to implement this. This also moves the strip to the inner level for the target branch. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Makefile: rename TARGETS to PACKAGESThomas 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>
* package infra: add patch-dependenciesYann E. MORIN2015-04-091-1/+4
| | | | | | | | | | | | | | | Some packages need to vampirise files from one or more other packages. This is the case, for example, of the Linux kernel and its /extensions/. Add a new type of dependencies, that are guaranteed to be extracted and patched before a package is patched. [Thomas: remove <pkg>-show-build-depends and <pkg>-show-patch-depends, since they don't seem to really be necessary and very useful.] 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>
* pkg-generic: declare phony targets as suchThomas Petazzoni2015-04-061-0/+30
| | | | | | | | | | | | | This commit improves the pkg-generic package infrastructure so that it declares all the <pkg>-<something> targets as PHONY, which they actually are. [Thomas: - add some missing phony targets, noticed by Yann E. Morin; - put one target per line, order alphabetically. Makes it easier to spot missing targets.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-generic: implement <pkg>-all-{source, legal-info, external-deps} targetsThomas Petazzoni2015-04-061-0/+6
| | | | | | | | | | | | In order to implement the global 'make source', 'make legal-info' and 'make external-deps' using the package infrastructure logic, this commit introduces a set of per-package targets that allow to recursively run the source/legal-info/external-deps actions on the dependencies of a given package. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* pkg-generic: implement a <pkg>-external-deps targetThomas Petazzoni2015-04-061-0/+8
| | | | | | | | | | | | | | | | | This commit implements a new <pkg>-external-deps target in the pkg-generic package infrastructure. This target simply displays the list of file names that are needed for <pkg> to build (source tarball, patches, extra downloads). In the case of the usage of <pkg>_OVERRIDE_SRCDIR, the path to the overriden source directory is displayed, prepended by file://. This matches what the code is currently doing in .stamp_rsync_sourced. This new target is not currently being used in this commit, but followup commits will make use of it. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* Makefile: remove the graphs/ dir on 'make clean'Thomas Petazzoni2015-04-031-3/+3
| | | | | | | | | | | | Currently, a 'make clean' leaves the graphs/ subdirectory in the output directory. This commit defines a GRAPHS_DIR variable, used by the different graph-generating targets, and which gets cleaned up in the 'clean' target. [Thomas: use the new GRAPHS_DIR variable in more places, as suggested by Yann.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-generic: allow full URLs for <pkg>_EXTRA_DOWNLOADSThomas Petazzoni2015-03-301-1/+6
| | | | | | | | | | | | | | The current logic for <pkg>_EXTRA_DOWNLOADS assumes that it is a list of files, all hosted at <pkg>_SITE. However, just like for <pkg>_PATCH, it may be useful to specify <pkg>_EXTRA_DOWNLOADS entries that are hosted on a different site than the package <pkg>_SITE. This commit implements this, by re-using the same logic as the one used for <pkg>_PATCH. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Romain Naour <romain.naour@openwide.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* pkg-generic: refactor the "Downloading" message logicThomas Petazzoni2015-03-301-10/+6
| | | | | | | | | | | | | | In the .stamp_downloaded hook, the logic to decide whether or not to display the "Downloading" message is treating the check of <pkg>_SOURCE as a special case. But in fact, there is no real reason to do so: the existing loop used for <pkg>_PATCH and <pkg>_EXTRA_DOWNLOADS could work just as well. This commit therefore refactors this piece of code, to have a single loop checking <pkg>_SOURCE, <pkg>_PATCH and <pkg>_EXTRA_DOWNLOADS. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* pkg-generic: take into account <pkg>_EXTRA_DOWNLOADS to display ↵Thomas Petazzoni2015-03-301-1/+1
| | | | | | | | | | | | | | | | | | "Downloading" message The .stamp_downloaded target displays the "Downloading" message even if there is really something to download. However, this logic only checks for <pkg>_SOURCE and <pkg>_PATCH: it does not check if something needs to be downloaded in <pkg>_EXTRA_DOWNLOADS. This commit fixes that, which makes sure that the "Downloading" message is displayed if one of the items in <pkg>_EXTRA_DOWNLOADS has not yet been downloaded. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Romain Naour <romain.naour@openwide.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* pkg-generic: fix the logic showing the "Downloading" messageThomas Petazzoni2015-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Even though the .stamp_downloaded target is executed for each package being built, the pkg-generic infrastructure tries to not display the "Downloading" message when there is in fact nothing to download. Unfortunately, the logic was incorrect for the patch download: it forgot the fact that <pkg>_PATCH can contain either file names (in which case we assume the patch should be downloaded from <pkg>_SITE), or full URLs. The latter case was not properly handled, as we were checking if $(DL_DIR)/<full URL> existed, while we should be testing if $(DL_DIR)/`basename <full URL>` exists. This patch fixes that, which makes sure the "Downloading" message is displayed only when necessary. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Romain Naour <romain.naour@openwide.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* graph-depends: display virtual package with italic styleFrancois Perrad2015-03-081-0/+3
| | | | | | | | | | 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-generic: reinstall targetDoug Kehn2015-02-031-2/+6
| | | | | | | | | Add a <pkg>-reinstall target, just like <pkg>-rebuild and <pkg>-reconfigure, but that only retrigger the install step of the package. Signed-off-by: Doug Kehn <rdkehn@yahoo.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* legal-info: remove FOO_MANIFEST_TARBALL and FOO_MANIFEST_SITE defaultsLuca Ceresoli2015-02-021-2/+0
| | | | | | | | | | | | | | | | | | | | When FOO_SOURCE is non-empty, FOO_MANIFEST_TARBALL is always set. When FOO_SOURCE is empty, FOO_MANIFEST_TARBALL is not set, but also never used, due to the if below which defuses the whole legal-info processing for packages that have FOO_SOURCE explicitly set to an empty string. So get rid of the default assignment to "not saved". Do it for FOO_MANIFEST_SITE as well: it is pointless to have FOO_MANIFEST_SITE with an empty FOO_SOURCE in a package. A quick grep session in the sources confirmed this assumption is indeed true for the current code. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Complain loudly if BR2_GLOBAL_PATCH_DIR does not exitMichal Sojka2014-10-251-0/+5
| | | | | | | | | | | | If the BR2_GLOBAL_PATCH_DIR is misspelled in the .config or if somebody renamed the existing directory with patches, buildroot happily builds everything but without the patches. As this can lead to surprising results, it is better to fail and give a user a message that BR2_GLOBAL_PATCH_DIR is wrongly configured. Signed-off-by: Michal Sojka <sojka@merica.cz> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* apply-patches.sh: Use the "APPLY_PATCHES" variable to call the scriptFabio Porcedda2014-10-251-3/+3
| | | | | | | | | | To easy up adding optional parameters when calling the "apply-patches.sh" add and use the "APPLY_PATCHES" variable to execute the script. 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>
* pkg-generic.mk: strip leading/trailing spacesPeter Korsgaard2014-10-121-4/+4
| | | | | | | | | | | | | | | | The manual gives this example for using the github macro: FOO_VERSION = v1.0 # tag or full commit ID Unfortunately, people copy/pasting this example will face weird make errors, because it leads the FOO_VERSION variable to end with a space. Similar problems can happen when testing a version bump or similar, so strip leading/trailing spaces before the version is used to construct the build directory path. Reported-by: Edd Robbins <edd.robbins@gmail.com> Cc: Edd Robbins <edd.robbins@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package-infra: comment why all checks are done in pkg-genericYann E. MORIN2014-10-051-1/+5
| | | | | | | | | | [Thomas: fix duplicate -> duplicating.] Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
OpenPOWER on IntegriCloud