summaryrefslogtreecommitdiffstats
path: root/support/scripts
Commit message (Collapse)AuthorAgeFilesLines
...
* support/check-rpath: recognise PIEYann E. MORIN2017-09-271-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We sanity-check the host executables that they have a correct RPATH pointing to the host libraries. This is currently done by looking for all files in $(HOST_DIR) that match the 'ELF executable' pattern (a bit more complex, but that's idea). However, when an executable is built with -fPIE of -fpie, it no longer appears to be an 'ELF executable', but it rather looks like an 'ELF sheard object' (like if it were an library. So, we miss those files. It turns out that the problem is a real one, because quite a few mainline distros, expecially those based on Debian for example, have already switched to generating PIE code by default, and thus we miss on a whole class of systems.. We fix that by simply looking if we can find an ELF interpreter in each file. If we there is one, this is an ELF executable; if not, it may be anything else: we don't care (not even about ELF libraries). Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* support/scripts/apply-patches.sh: do not apply patches with renamesThomas Petazzoni2017-09-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | Patches with renames apply properly with patch >= 2.7, but not with older patch versions. Since "git format-patch" by default generates patches with renames, Buildroot developers often don't realize that their patches will not apply properly on build machines that have patch < 2.7. In order to prevent such a situation from happening again, this commit adds some logic in apply-patches.sh to refuse applying patches that contain renames. Note that just searching for '^rename' is not sufficient, since the patch commit message may contain the words "rename from" or "rename to" as well. Therefore, the grep expression is made as accurate as possible, checking both. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Arnout: spaces instead of tabs (suggested by Yann); extend commit message.] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* support/scripts/check-bin-arch: fix symbolic link checkThomas Petazzoni2017-09-051-1/+1
| | | | | | | | | | | | Commit c96b8675ea03a5d3194d439f740c725dd239ed1a ("support/scripts/check-bin-arch: ignore symbolic links") was bogus, because it tested ${f}, which is the relative path of the file inside ${TARGET_DIR}, so we end up testing if ${f} on the system is a symbolic link. This commit fixes that by testing ${TARGET_DIR}/${f}. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/check-bin-arch: ignore symbolic linksThomas Petazzoni2017-09-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit da32b49f0091ee9dfb613e0f00973bf6893bfa84 ("instrumentation: extend packages-file-list.txt with symlinks and directories"), the packages-file-list.txt also contains symbolic links. Therefore, check-bin-arch is now also checking symbolic links. However, symbolic links in $(TARGET_DIR) can have absolute path as targets, such as: $ ls -l output/target/sbin/ifdown lrwxrwxrwx 1 thomas thomas 10 Sep 3 15:55 output/target/sbin/ifdown -> /sbin/ifup Therefore, we are now potentially checking a host binary, which obviously makes check-bin-arch fail. This commit changes check-bin-arch to ignore symbolic links. Indeed, we have two cases: - The symbolic link really points to something that will in the rootfs (such as /sbin/ifup above). In this case, /sbin/ifup will be checked separately by check-bin-arch. - The symbolic link doesn't point to something that will be in the rootfs, and that is not a problem from the perspective of check-bin-arch, which checks the architecture of target binaries. Fixes: http://autobuild.buildroot.net/results/16d384a0183d477646ac7692feb65f00dde7d068/ (vim) http://autobuild.buildroot.net/results/50429c0f63a8befff9e20899327b9a8d754d99be/ (ifupdown) http://autobuild.buildroot.net/results/1db65973e782bfa61abcbccd3501bfd235f77288/ (gawk) Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/fix-rpath: typo fix and unneeded "; " removedWolfgang Grandegger2017-07-221-2/+2
| | | | | | Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/fix-rpath: check if the patchelf utility is executableWolfgang Grandegger2017-07-221-0/+8
| | | | | | Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: add fix-rpath script to sanitize the rpathSamuel Martin2017-07-201-0/+133
| | | | | | | | | | | | This commit introduces the script "fix-rpath" able to scan a tree, detect ELF files, check their RPATH and fix it in a proper way. The RPATH fixup is done by the patchelf utility using the option "--make-rpath-relative <root-directory>". Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: add exception for nvidia-tegra23.mkThomas Petazzoni2017-07-061-0/+1
| | | | | | | This file is not a package per-se, it includes other .mk files that are packages. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: take into account waf packagesThomas Petazzoni2017-07-061-0/+12
| | | | | | | The waf package infrastructure was not known by the pkg-stats script, so let's add it. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: allow to sort by columnRicardo Martincoski2017-07-061-1/+12
| | | | | | | | | | | | | | | | | | | | With 2000+ packages it's not trivial to identify i.e.: - all packages that don't have a hash file; - all packages that have patches; - all packages that have code style warnings; User experience can be improved by dynamically sorting the resulting table. There is an open-source solution that does that in the client-side and requires minimal changes to our script: sorttable.js. The script is MIT licensed as stated in its website. Also add a hint to the user that the table can be sorted. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-host-rpath: no longer allow $(HOST_DIR)/usrArnout Vandecappelle2017-07-051-3/+1
| | | | | | | | | | Now all packages have been updated to install things in $(HOST_DIR)/lib instead of $(HOST_DIR)/usr/lib, there should no longer be any reason to have $(HOST_DIR)/usr/lib in the RPATH, so we don't allow it any more. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* eclipse-register-toolchain: toolchain is no longer installed in $(HOST_DIR)/usrArnout Vandecappelle2017-07-051-1/+1
| | | | | Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-host-rpath: no longer check $(HOST_DIR)/usr/{bin, sbin}Arnout Vandecappelle2017-07-051-2/+2
| | | | | | | | | | Since $(HOST_DIR)/usr/{bin,sbin} are now symlinks to $(HOST_DIR)/{bin,sbin}, it makes no sense to check them - they are already covered. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Move $(HOST_DIR)/usr/lib to $(HOST_DIR)/libArnout Vandecappelle2017-07-051-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a step towards eliminating $(HOST_DIR)/usr. It allows us to convert all packages installing things into $(HOST_DIR)/usr/lib without affecting the rest. To allow compatibility with packages that still use $(HOST_DIR)/usr as the prefix, create a symlink from usr/lib to ../lib. Note that the symlink creation will break when $(HOST_DIR)/usr/lib already exists as a directory, i.e. when rebuilding in an existing output directory. This is necessary: if we don't break it now, the following commits (which remove the usr part from various variables) _will_ break it. At the same time as creating this symlink, we also have to update the check-host-rpath script to accept both $(HOST_DIR)/usr/lib and $(HOST_DIR)/lib, because depending on how the package derives the path, it may be different. Since there are some dependency chains that involve $(STAGING_DIR), $(STAGING_DIR) may in fact be created before $(HOST_DIR). Since $(STAGING_DIR) is a subdirectory of $(HOST_DIR), it is possible that the newly added rule for $(HOST_DIR) never triggers. To make sure that the rule does trigger, add an order-only dependency from $(STAGING_DIR) to $(HOST_DIR). Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* setlocalversion: fix detection of hg revision for untagged versionsThomas De Schampheleire2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, cut prints the entire line if the specified delimiter is not present at all: $ printf "foo bar" | cut -d' ' -f2 bar $ printf "foobar" | cut -d' ' -f2 foobar In setlocalversion, cut is presented with the output of 'hg id' which has the format: "<revision> <tags-if-any>" If the current revision is not tagged, the output of 'hg id' does not contain the delimiter (space), cut prints the entire string, and setlocalversion thinks the version is the tag. As setlocalversion does not print anything for tagged versions, there is no output overall, and no correct indication of the mercurial revision. Fix by passing the extra cut option '--only-delimited', which suppresses output if no delimiter is found. This problem likely went unnoticed for so long, because the tag 'tip' (i.e. most recent revision of the branch) is treated specially: in this case the mercurial revision _is_ printed, i.e. the situation is treated as 'untagged'. The problem is only seen when you are _not_ at the most recent revision in your branch. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/scripts: check-host-rpath now handles $ORIGIN as wellWolfgang Grandegger2017-07-021-1/+1
| | | | | | | | | | | "$ORIGIN/../../usr/lib" is also a valid RPATH for binaries in "$hostdir/usr/bin". After RPATH sanitation, all RPATH directories start with "$ORIGIN". Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: rename to 'utils'Thomas Petazzoni2017-07-011-1/+1
| | | | | | | | | | | After some discussion, we found out that "tools" has the four first letters identical to the "toolchain" subfolder, which makes it a bit unpractical with tab-completion. So, this commit renames "tools" to "utils", which is more tab-completion-friendly. This has been discussed with Arnout and Yann. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move scanpypi out of support/scripts/Yann E. MORIN2017-07-011-653/+0
| | | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Yegor Yefremov <yegorslists@googlemail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move scancpan out of support/scripts/Yann E. MORIN2017-07-011-858/+0
| | | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: "François Perrad" <francois.perrad@gadz.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move size-stat-compare out of support/scripts/Yann E. MORIN2017-07-011-127/+0
| | | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move check-package out of support/scripts/Yann E. MORIN2017-07-0110-785/+1
| | | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move get-developers out of support/scripts/Yann E. MORIN2017-07-012-283/+0
| | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. 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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move test-pkg out of support/scriptsYann E. MORIN2017-07-011-197/+0
| | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. 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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: allow /etc/shadow to be symlinkedJens Maus2017-06-241-4/+5
| | | | | | | | | | | | | | | | This commit fixes a problem where it was not possible to replace /etc/shadow with a symlink to a e.g. a user partition where the shadow file is placed. This is required, e.g. for systems where the rootfs is mounted read-only but users should still be able to be added. Thus, if within an filesystem overlay setup a user tries to replace /etc/shadow with a symlink to the real file on a user partition a buildroot build stops with an error message because sed is called on the symlink instead of following the symlink. This commit fixes this shortcoming. Signed-off-by: Jens Maus <mail@jens-maus.de> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* scanpypi: fix comment typoBernd Kuhls2017-06-171-1/+1
| | | | | Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* scancpan: refactor with $mirrorFrancois Perrad2017-06-151-2/+4
| | | | | Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* scancpan: refactor with MetaCPAN::API source()Francois Perrad2017-06-151-8/+3
| | | | | | | instead of get_manifest() Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* scancpan: update with MetaCPAN API v1Francois Perrad2017-06-151-2/+2
| | | | | | | | The API v0 is shutdown. see https://bugs.busybox.net/show_bug.cgi?id=9951 Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: fix shebang with bashFrancois Perrad2017-06-086-6/+6
| | | | | | Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: fix shebang with pythonFrancois Perrad2017-06-073-3/+3
| | | | | Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* genimage.sh: fix calling from BR2_ROOTFS_POST_IMAGE_SCRIPTAbhimanyu Vishwakarma2017-04-271-5/+14
| | | | | | | | | | | | | | | | | When called from BR2_ROOTFS_POST_IMAGE_SCRIPT, this script ends up with following error: Error: Missing argument This is because, an extra positional argument is also passed along with BR2_ROOTFS_POST_SCRIPT_ARGS. genimage.sh didn't have support to parse positional and optional arguments together. Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.V@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* check-package: move parts to subdirectoryRicardo Martincoski2017-04-209-37/+36
| | | | | | | | | | | | | | | | | | | | Currently the check-package script uses many files in the same directory. This commit keeps the main script in support/scripts/ and moves the rest into a subdirectory. The modules were previously prefixed to make it easy to identify which script they belong to. This is no longer needed when using a subdirectory, so the prefix is removed. Note: if this commit is checked out and the script is run, and later on a previous version is checked out, the file support/scripts/checkpackagelib/__init__.pyc needs to be manually removed to prevent Python interpreter to look for checkpackagelib package when only the checkpackagelib module is available. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/test-pkg: run legal-infoYann E. MORIN2017-04-171-2/+13
| | | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/test-pkg: calculate toolchain name only onceArnout Vandecappelle2017-04-171-10/+7
| | | | | | | | | | | The toolchain name was calculated in main() for reporting to the user, and again in build_one() for creating the build directory. Calculate it only once, in main(), and pass the build directory as an argument to build_one(). Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: also parse toolchain packagesThomas Petazzoni2017-04-091-2/+12
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: ignore additional package infra .mk filesThomas Petazzoni2017-04-091-0/+2
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: add new column with check-package warningsThomas Petazzoni2017-04-081-0/+9
| | | | | | | This allows the page at http://autobuild.buildroot.net/stats/ to show how many warnings returned by check-package affect each package. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-package: check *.mk for typo in variableRicardo Martincoski2017-04-081-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warn when a variable is defined in a .mk file and it don't start with the package name. This function generates false warnings and the maintenance of the whitelist can be an extra burden, but it catches some typos really hard to see: - POPLER_CONF_OPTS [1] - BALELD_LICENSE [2] - DRDB_UTILS_DEPENDENCIES [3] - PERL_LIBWWW_LICENSE_FILES [4] - AVRDUDR_LICENSE_FILES [5] - GST1_PLUGINS_ULGY_HAS_GPL_LICENSE [6] - ON2_8170_LICENSE [7] - LIBFDTI_CONF_OPTS [8][9] - IPSEC_DEPENDENCIES [10] [1] http://patchwork.ozlabs.org/patch/681533 [2] http://patchwork.ozlabs.org/patch/643293 [3] http://patchwork.ozlabs.org/patch/449589 [4] http://patchwork.ozlabs.org/patch/464545 [5] http://patchwork.ozlabs.org/patch/305060 [6] http://patchwork.ozlabs.org/patch/253089 [7] http://patchwork.ozlabs.org/patch/250523 [8] http://patchwork.ozlabs.org/patch/394125 [9] https://github.com/buildroot/buildroot/commit/fe7a4b524b72bcb448f7e723873d8244620cb2f1 [10] https://github.com/buildroot/buildroot/commit/dff1d590b2a0fadf58b6eed60029b2ecbab7c710 Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-package: check Config.* filesRicardo Martincoski2017-04-081-0/+128
| | | | | | | | | | | | Warn when help text is larger than 72 columns, see [1]. Warn for wrongly indented attributes, see [1]. Warn when the convention of attributes order is not followed, see [2]. [1] http://nightly.buildroot.org/#writing-rules-config-in [2] http://nightly.buildroot.org/#_config_files Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-package: check *.mk filesRicardo Martincoski2017-04-081-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warn when there are obvious indentation errors: - the number of expect tabs is not yet checked since it is more complex to achieve; - the content inside define ... endef should be indented with tab(s), see [1]; - line just after a backslash should be indented with tab(s), see [2]; - other lines should not be indented, see [3]; - ignore empty lines and comments. Warn when there is no well-formatted header in the file: - 80 hashes at lines 1 and 5; - 1 hash at lines 2 and 4; - empty line at line 6; - see [4]; - ignore files that only include other mk files. Warn when there are more than one space before backslash, see [5]. Warn when there is a trailing backslash [6]. Warn for flags set to default value YES or NO, see [7], [8], [9]. [1] http://patchwork.ozlabs.org/patch/681429/ [2] http://patchwork.ozlabs.org/patch/681430/ [3] http://patchwork.ozlabs.org/patch/559209/ [4] http://nightly.buildroot.org/#writing-rules-mk [5] http://patchwork.ozlabs.org/patch/649084/ [6] http://patchwork.ozlabs.org/patch/535550/ [7] http://patchwork.ozlabs.org/patch/704718/ [8] http://nightly.buildroot.org/#_infrastructure_for_packages_with_specific_build_systems [9] http://nightly.buildroot.org/#_infrastructure_for_autotools_based_packages Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-package: check *.patch filesRicardo Martincoski2017-04-081-0/+55
| | | | | | | | | | | | | | | | | Warn when the name of the patch file does not start with number (apply order), see [1]. Warn when the patch was generated using git format-patch without -N, see [2]. Warn when the patch file has no SoB, see [3]. [1] http://nightly.buildroot.org/#_providing_patches [2] http://patchwork.ozlabs.org/patch/704753/ [3] http://nightly.buildroot.org/#_format_and_licensing_of_the_package_patches Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-package: check *.hash filesRicardo Martincoski2017-04-081-0/+62
| | | | | | | | | | | | | | Check each hash entry (see [1]) and warn when: - it does not have three fields; - its type is unknown; - its length does not match its type; - the name of the file contains a directory component. [1] http://nightly.buildroot.org/#adding-packages-hash Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-package: check whitespace and empty linesRicardo Martincoski2017-04-084-0/+44
| | | | | | | | | | | | | | | | | Create 3 new check functions to warn when: - there are consecutive empty lines in the file, see [1]; - the last line of the file is empty, see [2]; - there are lines with trailing whitespace, see [3]. Apply these functions to Config.*, *.mk and *.hash, but not for *.patch files since they can contain any of these and still be valid. [1] http://patchwork.ozlabs.org/patch/682660/ [2] http://patchwork.ozlabs.org/patch/643288/ [3] http://patchwork.ozlabs.org/patch/398984/ Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/check-package: new scriptRicardo Martincoski2017-04-088-0/+284
| | | | | | | | | | | | | | | | | | | | | | | | | Create the infra to check the style of new packages before submitting. The overall function of the script is described inside a txt file. It is designed to process the actual files and NOT the patch files generated by git format-patch. Also add the first check function, to warn if a file (Config.*, *.mk, *.hash, *.patch) has no newline at the last line of the file, see [1]. Basic usage for simple packages: support/scripts/check-package -vvv package/newpackage/* Basic usage for packages with subdirs: support/scripts/check-package -vvv $(find package/newpackage/ -type f) See "checkpackage" in [2]. [1] http://patchwork.ozlabs.org/patch/631129/ [2] http://elinux.org/Buildroot#Todo_list Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/test-pkg: print number of toolchains and progressYann E. MORIN2017-04-061-15/+9
| | | | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: add generic genimage scriptPhelip Etienne2017-04-011-0/+27
| | | | | | | | | | This script is a wrapper for the genimage tool used by most boards. The board postimage script can now call this script instead of invoking genimage command themselves. Signed-off-by: Etienne Phelip <etienne.phelip@savoirfairelinux.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* scripts/scanpypi: use SPDX short identifier for licenseRahul Bedarkar2017-04-011-11/+11
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* scripts/scancpan: use SPDX short identifier for licenseRahul Bedarkar2017-04-011-1/+1
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core/br2-external: properly report unexpected errorsYann E. MORIN2017-03-261-0/+3
| | | | | | | | | | | | | | | | | | | Unextected error in the br2-external script are properly caught, but they are not reported properly, and we end up in either of two situations: - the .br2-external.mk file is not generated, in which case make will try to find a rule to generate it (because the 'include' directive tries to generate missing files); - the .br-external.mk file is generated but does not contain the error variable, and thus the build might not get interrupted. We fix that by using a trap on the pseudo ERR signal, to emit the error variable on unexpected errors. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/check-bin-arch: fix after "fix for filenames with spaces"Thomas Petazzoni2017-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 2f6c5e513cf6688f9343a25ac90138e9ad751eb5 ("support/check-bin-arch: fix for filenames with spaces"), Yann adjuste the check-bin-arch script to properly handle filenames with spaces. However, he also did a subtle change of the regexp that extracts the path of the files. It was: "/^${package},(.+)$/!d; s//\1/;" and Yann changed it to: "/^${package},\.(.+)$/!d; s//\1/;" So the file paths used to start with a dot (like "./usr/share/foo"), and now they no longer start with a dot (like "/usr/share/foo"). While this modification is good and makes sense, the match for /lib/firmware/ was not adjusted accordingly, and the follow-up patch also ignoring /usr/share was not adjusted as well. This commit fixes those /lib/firmware/ and /usr/share/ special cases, which will fix: http://autobuild.buildroot.net/results/76a1475f4cdedb80426fb022ef2e644aa5625660/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
OpenPOWER on IntegriCloud