Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/7 v4] tools: move test-pkg out of support/scripts
  2017-07-01 14:31 [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
@ 2017-07-01 14:31 ` Yann E. MORIN
  2017-07-01 14:31 ` [Buildroot] [PATCH 2/7 v4] tools: move get-developers out of support/scripts/ Yann E. MORIN
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2017-07-01 14:31 UTC (permalink / raw)
  To: buildroot

Move it to the top-level tools/ directory, so that it is easier to
find for users.

Add a legacy symlink for those users who already used them, so as
not to break their habits.

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>

---
Changes v3 -> v4:
  - drop legacy symlink  (Arnout, Thomas)
---
 docs/manual/adding-packages-tips.txt | 12 ++++++------
 tools/readme.txt                     |  8 ++++++++
 {support/scripts => tools}/test-pkg  |  0
 3 files changed, 14 insertions(+), 6 deletions(-)
 create mode 100644 tools/readme.txt
 rename {support/scripts => tools}/test-pkg (100%)

diff --git a/docs/manual/adding-packages-tips.txt b/docs/manual/adding-packages-tips.txt
index d1eab2b440..0047dfd14f 100644
--- a/docs/manual/adding-packages-tips.txt
+++ b/docs/manual/adding-packages-tips.txt
@@ -45,9 +45,9 @@ continuously test random configurations. However, these only build the
 `master` branch of the git tree, and your new fancy package is not yet
 there.
 
-Buildroot provides a script in +support/scripts/test-pkg+ that uses the
-same base configurations as used by the autobuilders so you can test
-your package in the same conditions.
+Buildroot provides a script in +tools/test-pkg+ that uses the same base
+configurations as used by the autobuilders so you can test your package
+in the same conditions.
 
 First, create a config snippet that contains all the necessary options
 needed to enable your package, but without any architecture or toolchain
@@ -74,7 +74,7 @@ Then run the +test-pkg+ script, by telling it what config snippet to use
 and what package to test:
 
 ----
-$ ./support/scripts/test-pkg -c libcurl.config -p libcurl
+$ ./tools/test-pkg -c libcurl.config -p libcurl
 ----
 
 This will try to build your package against all the toolchains used
@@ -83,7 +83,7 @@ too long to do so). The output lists all toolchains and the corresponding
 result (excerpt, results are fake):
 
 ----
-$ ./support/scripts/test-pkg -c libcurl.config -p libcurl
+$ ./tools/test-pkg -c libcurl.config -p libcurl
                 armv5-ctng-linux-gnueabi [ 1/11]: OK
               armv7-ctng-linux-gnueabihf [ 2/11]: OK
                         br-aarch64-glibc [ 3/11]: SKIPPED
@@ -124,7 +124,7 @@ The +test-pkg+ script accepts a few options, for which you can get some
 help by running:
 
 ----
-$ ./support/scripts/test-pkg -h
+$ ./tools/test-pkg -h
 ----
 
 [[github-download-url]]
diff --git a/tools/readme.txt b/tools/readme.txt
new file mode 100644
index 0000000000..5b418dd41f
--- /dev/null
+++ b/tools/readme.txt
@@ -0,0 +1,8 @@
+This directory contains various useful scripts and tools for working
+with Buildroot. You need not add this directory in your PATH to use
+any of those tools, but you may do so if you want.
+
+test-pkg
+    a script that tests a specific package against a set of various
+    toolchains, with the goal to detect toolchain-related dependencies
+    (wchar, threads...)
diff --git a/support/scripts/test-pkg b/tools/test-pkg
similarity index 100%
rename from support/scripts/test-pkg
rename to tools/test-pkg
-- 
2.11.0

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

* [Buildroot] [PATCH 2/7 v4] tools: move get-developers out of support/scripts/
  2017-07-01 14:31 [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
  2017-07-01 14:31 ` [Buildroot] [PATCH 1/7 v4] tools: move test-pkg out of support/scripts Yann E. MORIN
@ 2017-07-01 14:31 ` Yann E. MORIN
  2017-07-01 14:31 ` [Buildroot] [PATCH 3/7 v4] tools: move check-package " Yann E. MORIN
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2017-07-01 14:31 UTC (permalink / raw)
  To: buildroot

Move it to the top-level tools/ directory, so that it is easier to
find for users.

Add a legacy symlink for those users who already used them, so as
not to break their habits.

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>

---
Changes v3 -> v4:
  - drop legacy symlink  (Arnout, Thomas)
---
 docs/manual/contribute.txt                    | 2 +-
 {support/scripts => tools}/get-developers     | 0
 {support/scripts => tools}/getdeveloperlib.py | 0
 tools/readme.txt                              | 5 +++++
 4 files changed, 6 insertions(+), 1 deletion(-)
 rename {support/scripts => tools}/get-developers (100%)
 rename {support/scripts => tools}/getdeveloperlib.py (100%)

diff --git a/docs/manual/contribute.txt b/docs/manual/contribute.txt
index 719032bcc4..c10587726c 100644
--- a/docs/manual/contribute.txt
+++ b/docs/manual/contribute.txt
@@ -295,7 +295,7 @@ information). This tool reads your patches and outputs the appropriate
 +git send-email+ command to use:
 
 ---------------------
-$ ./support/scripts/get-developers outgoing/*
+$ ./tools/get-developers outgoing/*
 ---------------------
 
 Use the output of +get-developers+ to send your patches:
diff --git a/support/scripts/get-developers b/tools/get-developers
similarity index 100%
rename from support/scripts/get-developers
rename to tools/get-developers
diff --git a/support/scripts/getdeveloperlib.py b/tools/getdeveloperlib.py
similarity index 100%
rename from support/scripts/getdeveloperlib.py
rename to tools/getdeveloperlib.py
diff --git a/tools/readme.txt b/tools/readme.txt
index 5b418dd41f..1439a0a99f 100644
--- a/tools/readme.txt
+++ b/tools/readme.txt
@@ -2,6 +2,11 @@ This directory contains various useful scripts and tools for working
 with Buildroot. You need not add this directory in your PATH to use
 any of those tools, but you may do so if you want.
 
+get-developpers
+    a script to return the list of people interested in a specific part
+    of Buildroot, so they can be Cc:ed on a mail. Accepts a patch as
+    input, a package name or and architecture name.
+
 test-pkg
     a script that tests a specific package against a set of various
     toolchains, with the goal to detect toolchain-related dependencies
-- 
2.11.0

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

* [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools
@ 2017-07-01 14:31 Yann E. MORIN
  2017-07-01 14:31 ` [Buildroot] [PATCH 1/7 v4] tools: move test-pkg out of support/scripts Yann E. MORIN
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Yann E. MORIN @ 2017-07-01 14:31 UTC (permalink / raw)
  To: buildroot

Hello All!

Currently, we provide a few user-facing utilities, like get-developers,
in support/scripts/ . But this directory also contains internal scripts
that a user should not be directly concerned with. Besides, it is
two-level deep in the hierarchy, which is not really nice.

So, we introduce tools/ as a top-level directory, with the goal to store
and expose all user-facing utilities, while keeping our internal scripts
in support/scripts/ .

The last patch in the series introduces a new utility, brmake, a wrapper
around make that stores all the output to a log file and displays only
the >>> lines.

Changes v3 -> v4:
  - drop legacy symlinks  (Thomas)
  - reorder series  (Thomas, Arnout)
  - drop options parsing in brmake  (Arnout, Samuel)
  - drop moving xorg-release  (Thomas)

Changes v2 -> v3:
  - rename readme file  (Arnout, Thomas)
  - fix DEVELOPPERS  (Ricardo)

Changes v1 -> v2:
  - rename contrib -> tools  (Arnout)
  - move more scripts


Regards,
Yann E. MORIN.


The following changes since commit 9bb306bd6411071cd07529923b825627502c794d

  support/testing: large timeout for login prompt (2017-07-01 16:05:14 +0200)


are available in the git repository at:

  git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to 99c3ef336521def728a1e5d80da5d7de7fd3fac1

  tools: new tool to filter the output of make (2017-07-01 16:26:12 +0200)


----------------------------------------------------------------
Yann E. MORIN (7):
      tools: move test-pkg out of support/scripts
      tools: move get-developers out of support/scripts/
      tools: move check-package out of support/scripts/
      tools: move size-stat-compare out of support/scripts/
      tools: move scancpan out of support/scripts/
      tools: move scanpypi out of support/scripts/
      tools: new tool to filter the output of make

 DEVELOPERS                                         |  3 +-
 docs/manual/adding-packages-tips.txt               | 12 +++----
 docs/manual/contribute.txt                         |  2 +-
 docs/manual/writing-rules.txt                      |  5 +--
 support/scripts/pkg-stats                          |  2 +-
 tools/brmake                                       | 37 ++++++++++++++++++++
 {support/scripts => tools}/check-package           |  2 +-
 .../scripts => tools}/checkpackagelib/__init__.py  |  0
 {support/scripts => tools}/checkpackagelib/base.py |  2 +-
 {support/scripts => tools}/checkpackagelib/lib.py  |  2 +-
 .../checkpackagelib/lib_config.py                  |  2 +-
 .../scripts => tools}/checkpackagelib/lib_hash.py  |  2 +-
 .../scripts => tools}/checkpackagelib/lib_mk.py    |  2 +-
 .../scripts => tools}/checkpackagelib/lib_patch.py |  2 +-
 .../scripts => tools}/checkpackagelib/readme.txt   | 10 +++---
 {support/scripts => tools}/get-developers          |  0
 {support/scripts => tools}/getdeveloperlib.py      |  0
 tools/readme.txt                                   | 40 ++++++++++++++++++++++
 {support/scripts => tools}/scancpan                |  0
 {support/scripts => tools}/scanpypi                |  0
 {support/scripts => tools}/size-stats-compare      |  0
 {support/scripts => tools}/test-pkg                |  0
 22 files changed, 102 insertions(+), 23 deletions(-)
 create mode 100755 tools/brmake
 rename {support/scripts => tools}/check-package (98%)
 rename {support/scripts => tools}/checkpackagelib/__init__.py (100%)
 rename {support/scripts => tools}/checkpackagelib/base.py (78%)
 rename {support/scripts => tools}/checkpackagelib/lib.py (95%)
 rename {support/scripts => tools}/checkpackagelib/lib_config.py (98%)
 rename {support/scripts => tools}/checkpackagelib/lib_hash.py (96%)
 rename {support/scripts => tools}/checkpackagelib/lib_mk.py (99%)
 rename {support/scripts => tools}/checkpackagelib/lib_patch.py (96%)
 rename {support/scripts => tools}/checkpackagelib/readme.txt (91%)
 rename {support/scripts => tools}/get-developers (100%)
 rename {support/scripts => tools}/getdeveloperlib.py (100%)
 create mode 100644 tools/readme.txt
 rename {support/scripts => tools}/scancpan (100%)
 rename {support/scripts => tools}/scanpypi (100%)
 rename {support/scripts => tools}/size-stats-compare (100%)
 rename {support/scripts => tools}/test-pkg (100%)

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

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

* [Buildroot] [PATCH 3/7 v4] tools: move check-package out of support/scripts/
  2017-07-01 14:31 [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
  2017-07-01 14:31 ` [Buildroot] [PATCH 1/7 v4] tools: move test-pkg out of support/scripts Yann E. MORIN
  2017-07-01 14:31 ` [Buildroot] [PATCH 2/7 v4] tools: move get-developers out of support/scripts/ Yann E. MORIN
@ 2017-07-01 14:31 ` Yann E. MORIN
  2017-07-01 14:31 ` [Buildroot] [PATCH 4/7 v4] tools: move size-stat-compare " Yann E. MORIN
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2017-07-01 14:31 UTC (permalink / raw)
  To: buildroot

Move it to the top-level tools/ directory, so that it is easier to
find for users.

Add a legacy symlink for those users who already used them, so as
not to break their habits.

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>

---
Changes v3 -> v4:
  - drop legacy symlink  (Arnout, Thomas)

Changes v2 -> v3:
  - fix leftover paths in comments  (Ricardo)
  - update paths in DEVELOPPERS  (Ricardo)
---
 DEVELOPERS                                               |  3 ++-
 support/scripts/pkg-stats                                |  2 +-
 {support/scripts => tools}/check-package                 |  2 +-
 {support/scripts => tools}/checkpackagelib/__init__.py   |  0
 {support/scripts => tools}/checkpackagelib/base.py       |  2 +-
 {support/scripts => tools}/checkpackagelib/lib.py        |  2 +-
 {support/scripts => tools}/checkpackagelib/lib_config.py |  2 +-
 {support/scripts => tools}/checkpackagelib/lib_hash.py   |  2 +-
 {support/scripts => tools}/checkpackagelib/lib_mk.py     |  2 +-
 {support/scripts => tools}/checkpackagelib/lib_patch.py  |  2 +-
 {support/scripts => tools}/checkpackagelib/readme.txt    | 10 +++++-----
 tools/readme.txt                                         |  4 ++++
 12 files changed, 19 insertions(+), 14 deletions(-)
 rename {support/scripts => tools}/check-package (98%)
 rename {support/scripts => tools}/checkpackagelib/__init__.py (100%)
 rename {support/scripts => tools}/checkpackagelib/base.py (78%)
 rename {support/scripts => tools}/checkpackagelib/lib.py (95%)
 rename {support/scripts => tools}/checkpackagelib/lib_config.py (98%)
 rename {support/scripts => tools}/checkpackagelib/lib_hash.py (96%)
 rename {support/scripts => tools}/checkpackagelib/lib_mk.py (99%)
 rename {support/scripts => tools}/checkpackagelib/lib_patch.py (96%)
 rename {support/scripts => tools}/checkpackagelib/readme.txt (91%)

diff --git a/DEVELOPERS b/DEVELOPERS
index df974f9f64..700123f7f1 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1389,7 +1389,8 @@ N:	Rhys Williams <github@wilberforce.co.nz>
 F:	package/lirc-tools/
 
 N:	Ricardo Martincoski <ricardo.martincoski@gmail.com>
-F:	support/scripts/check*package*
+F:	tools/check-package
+F:	tools/checkpackagelib/
 
 N:	Richard Braun <rbraun@sceen.net>
 F:	package/curlftpfs/
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index 4cf1f82518..f827877052 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -337,7 +337,7 @@ for i in $(find boot/ linux/ package/ toolchain/ -name '*.mk' | sort) ; do
     fi
 
     file_list=$(find ${package_dir} -name '*.mk' -o -name '*.in*' -o -name '*.hash')
-    nwarnings=$(./support/scripts/check-package ${file_list} 2>&1 | sed '/\([0-9]*\) warnings generated/!d; s//\1/')
+    nwarnings=$(./tools/check-package ${file_list} 2>&1 | sed '/\([0-9]*\) warnings generated/!d; s//\1/')
     if [ ${nwarnings} -eq 0 ] ; then
 	echo "<td class=\"centered correct\">${nwarnings}</td>"
     else
diff --git a/support/scripts/check-package b/tools/check-package
similarity index 98%
rename from support/scripts/check-package
rename to tools/check-package
index 74ea46f819..cdbac94929 100755
--- a/support/scripts/check-package
+++ b/tools/check-package
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# See support/scripts/checkpackagelib/readme.txt before editing this file.
+# See tools/checkpackagelib/readme.txt before editing this file.
 
 from __future__ import print_function
 import argparse
diff --git a/support/scripts/checkpackagelib/__init__.py b/tools/checkpackagelib/__init__.py
similarity index 100%
rename from support/scripts/checkpackagelib/__init__.py
rename to tools/checkpackagelib/__init__.py
diff --git a/support/scripts/checkpackagelib/base.py b/tools/checkpackagelib/base.py
similarity index 78%
rename from support/scripts/checkpackagelib/base.py
rename to tools/checkpackagelib/base.py
index 7669775f06..4b376f0597 100644
--- a/support/scripts/checkpackagelib/base.py
+++ b/tools/checkpackagelib/base.py
@@ -1,4 +1,4 @@
-# See support/scripts/checkpackagelib/readme.txt before editing this file.
+# See tools/checkpackagelib/readme.txt before editing this file.
 
 
 class _CheckFunction(object):
diff --git a/support/scripts/checkpackagelib/lib.py b/tools/checkpackagelib/lib.py
similarity index 95%
rename from support/scripts/checkpackagelib/lib.py
rename to tools/checkpackagelib/lib.py
index 3077f518b3..1a7db44b38 100644
--- a/support/scripts/checkpackagelib/lib.py
+++ b/tools/checkpackagelib/lib.py
@@ -1,4 +1,4 @@
-# See support/scripts/checkpackagelib/readme.txt before editing this file.
+# See tools/checkpackagelib/readme.txt before editing this file.
 
 from base import _CheckFunction
 
diff --git a/support/scripts/checkpackagelib/lib_config.py b/tools/checkpackagelib/lib_config.py
similarity index 98%
rename from support/scripts/checkpackagelib/lib_config.py
rename to tools/checkpackagelib/lib_config.py
index 8f49224e95..9e93c05eb8 100644
--- a/support/scripts/checkpackagelib/lib_config.py
+++ b/tools/checkpackagelib/lib_config.py
@@ -1,4 +1,4 @@
-# See support/scripts/checkpackagelib/readme.txt before editing this file.
+# See tools/checkpackagelib/readme.txt before editing this file.
 # Kconfig generates errors if someone introduces a typo like "boool" instead of
 # "bool", so below check functions don't need to check for things already
 # checked by running "make menuconfig".
diff --git a/support/scripts/checkpackagelib/lib_hash.py b/tools/checkpackagelib/lib_hash.py
similarity index 96%
rename from support/scripts/checkpackagelib/lib_hash.py
rename to tools/checkpackagelib/lib_hash.py
index c76abb43f1..cc1a5e43c3 100644
--- a/support/scripts/checkpackagelib/lib_hash.py
+++ b/tools/checkpackagelib/lib_hash.py
@@ -1,4 +1,4 @@
-# See support/scripts/checkpackagelib/readme.txt before editing this file.
+# See tools/checkpackagelib/readme.txt before editing this file.
 # The validity of the hashes itself is checked when building, so below check
 # functions don't need to check for things already checked by running
 # "make package-dirclean package-source".
diff --git a/support/scripts/checkpackagelib/lib_mk.py b/tools/checkpackagelib/lib_mk.py
similarity index 99%
rename from support/scripts/checkpackagelib/lib_mk.py
rename to tools/checkpackagelib/lib_mk.py
index a51e0e3ce6..8cbb358b1b 100644
--- a/support/scripts/checkpackagelib/lib_mk.py
+++ b/tools/checkpackagelib/lib_mk.py
@@ -1,4 +1,4 @@
-# See support/scripts/checkpackagelib/readme.txt before editing this file.
+# See tools/checkpackagelib/readme.txt before editing this file.
 # There are already dependency checks during the build, so below check
 # functions don't need to check for things already checked by exploring the
 # menu options using "make menuconfig" and by running "make" with appropriate
diff --git a/support/scripts/checkpackagelib/lib_patch.py b/tools/checkpackagelib/lib_patch.py
similarity index 96%
rename from support/scripts/checkpackagelib/lib_patch.py
rename to tools/checkpackagelib/lib_patch.py
index c191d262e2..3e1dae5f98 100644
--- a/support/scripts/checkpackagelib/lib_patch.py
+++ b/tools/checkpackagelib/lib_patch.py
@@ -1,4 +1,4 @@
-# See support/scripts/checkpackagelib/readme.txt before editing this file.
+# See tools/checkpackagelib/readme.txt before editing this file.
 # The format of the patch files is tested during the build, so below check
 # functions don't need to check for things already checked by running
 # "make package-dirclean package-patch".
diff --git a/support/scripts/checkpackagelib/readme.txt b/tools/checkpackagelib/readme.txt
similarity index 91%
rename from support/scripts/checkpackagelib/readme.txt
rename to tools/checkpackagelib/readme.txt
index 0444d17992..8012c72e39 100644
--- a/support/scripts/checkpackagelib/readme.txt
+++ b/tools/checkpackagelib/readme.txt
@@ -57,19 +57,19 @@ Some hints when changing this code:
 Usage examples:
 - to get a list of check functions that would be called without actually
   calling them you can use the --dry-run option:
-$ support/scripts/check-package --dry-run package/yourfavorite/*
+$ tools/check-package --dry-run package/yourfavorite/*
 
 - when you just added a new check function, e.g. Something, check how it behaves
   for all current packages:
-$ support/scripts/check-package --include-only Something $(find package -type f)
+$ tools/check-package --include-only Something $(find package -type f)
 
 - the effective processing time (when the .pyc were already generated and all
   files to be processed are cached in the RAM) should stay in the order of few
   seconds:
-$ support/scripts/check-package $(find package -type f) >/dev/null ; \
-  time support/scripts/check-package $(find package -type f) >/dev/null
+$ tools/check-package $(find package -type f) >/dev/null ; \
+  time tools/check-package $(find package -type f) >/dev/null
 
 - vim users can navigate the warnings (most editors probably have similar
   function) since warnings are generated in the form 'path/file:line: warning':
 $ find package/ -name 'Config.*' > filelist && vim -c \
-  'set makeprg=support/scripts/check-package\ $(cat\ filelist)' -c make -c copen
+  'set makeprg=tools/check-package\ $(cat\ filelist)' -c make -c copen
diff --git a/tools/readme.txt b/tools/readme.txt
index 1439a0a99f..fc1108fded 100644
--- a/tools/readme.txt
+++ b/tools/readme.txt
@@ -2,6 +2,10 @@ This directory contains various useful scripts and tools for working
 with Buildroot. You need not add this directory in your PATH to use
 any of those tools, but you may do so if you want.
 
+check-package
+    a script that checks the coding style of a package's Config.in and
+    .mk files, and also tests them for various types of typoes.
+
 get-developpers
     a script to return the list of people interested in a specific part
     of Buildroot, so they can be Cc:ed on a mail. Accepts a patch as
-- 
2.11.0

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

* [Buildroot] [PATCH 4/7 v4] tools: move size-stat-compare out of support/scripts/
  2017-07-01 14:31 [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
                   ` (2 preceding siblings ...)
  2017-07-01 14:31 ` [Buildroot] [PATCH 3/7 v4] tools: move check-package " Yann E. MORIN
@ 2017-07-01 14:31 ` Yann E. MORIN
  2017-07-01 16:02   ` Thomas De Schampheleire
  2017-07-01 14:31 ` [Buildroot] [PATCH 5/7 v4] tools: move scancpan " Yann E. MORIN
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Yann E. MORIN @ 2017-07-01 14:31 UTC (permalink / raw)
  To: buildroot

Move it to the top-level tools/ directory, so that it is easier to
find for users.

Add a legacy symlink for those users who already used them, so as
not to break their habits.

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>

---
Changes v3 -> v4:
  - drop legacy symlink  (Arnout, Thomas)
---
 tools/readme.txt                              | 6 ++++++
 {support/scripts => tools}/size-stats-compare | 0
 2 files changed, 6 insertions(+)
 rename {support/scripts => tools}/size-stats-compare (100%)

diff --git a/tools/readme.txt b/tools/readme.txt
index fc1108fded..dd8a1d4494 100644
--- a/tools/readme.txt
+++ b/tools/readme.txt
@@ -11,6 +11,12 @@ get-developpers
     of Buildroot, so they can be Cc:ed on a mail. Accepts a patch as
     input, a package name or and architecture name.
 
+size-stat-compare
+    a script to compare the rootfs size between two differnt Buildroot
+    configurations. This can be used to identify the size impact of
+    a specific option, or of a set of specific options, or an update
+    to a newer Buildroot version...
+
 test-pkg
     a script that tests a specific package against a set of various
     toolchains, with the goal to detect toolchain-related dependencies
diff --git a/support/scripts/size-stats-compare b/tools/size-stats-compare
similarity index 100%
rename from support/scripts/size-stats-compare
rename to tools/size-stats-compare
-- 
2.11.0

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

* [Buildroot] [PATCH 5/7 v4] tools: move scancpan out of support/scripts/
  2017-07-01 14:31 [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
                   ` (3 preceding siblings ...)
  2017-07-01 14:31 ` [Buildroot] [PATCH 4/7 v4] tools: move size-stat-compare " Yann E. MORIN
@ 2017-07-01 14:31 ` Yann E. MORIN
  2017-07-01 14:31 ` [Buildroot] [PATCH 6/7 v4] tools: move scanpypi " Yann E. MORIN
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2017-07-01 14:31 UTC (permalink / raw)
  To: buildroot

Move it to the top-level tools/ directory, so that it is easier to
find for users.

Add a legacy symlink for those users who already used them, so as
not to break their habits.

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>

---
Changes v3 -> v4:
  - drop legacy symlink  (Arnout, Thomas)
---
 tools/readme.txt                    | 4 ++++
 {support/scripts => tools}/scancpan | 0
 2 files changed, 4 insertions(+)
 rename {support/scripts => tools}/scancpan (100%)

diff --git a/tools/readme.txt b/tools/readme.txt
index dd8a1d4494..20581740cb 100644
--- a/tools/readme.txt
+++ b/tools/readme.txt
@@ -11,6 +11,10 @@ get-developpers
     of Buildroot, so they can be Cc:ed on a mail. Accepts a patch as
     input, a package name or and architecture name.
 
+scancpan
+    a script to create a Buildroot package by scanning a CPAN module
+    description.
+
 size-stat-compare
     a script to compare the rootfs size between two differnt Buildroot
     configurations. This can be used to identify the size impact of
diff --git a/support/scripts/scancpan b/tools/scancpan
similarity index 100%
rename from support/scripts/scancpan
rename to tools/scancpan
-- 
2.11.0

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

* [Buildroot] [PATCH 6/7 v4] tools: move scanpypi out of support/scripts/
  2017-07-01 14:31 [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
                   ` (4 preceding siblings ...)
  2017-07-01 14:31 ` [Buildroot] [PATCH 5/7 v4] tools: move scancpan " Yann E. MORIN
@ 2017-07-01 14:31 ` Yann E. MORIN
  2017-07-01 14:31 ` [Buildroot] [PATCH 7/7 v4] tools: new tool to filter the output of make Yann E. MORIN
  2017-07-01 16:26 ` [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Thomas Petazzoni
  7 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2017-07-01 14:31 UTC (permalink / raw)
  To: buildroot

Move it to the top-level tools/ directory, so that it is easier to
find for users.

Add a legacy symlink for those users who already used them, so  as
not to break their habits.

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>

---
Changes v3 -> v4:
  - drop legacy symlink  (Arnout, Thomas)
---
 tools/readme.txt                    | 4 ++++
 {support/scripts => tools}/scanpypi | 0
 2 files changed, 4 insertions(+)
 rename {support/scripts => tools}/scanpypi (100%)

diff --git a/tools/readme.txt b/tools/readme.txt
index 20581740cb..94843332c9 100644
--- a/tools/readme.txt
+++ b/tools/readme.txt
@@ -15,6 +15,10 @@ scancpan
     a script to create a Buildroot package by scanning a CPAN module
     description.
 
+scanpypi
+    a script to create a Buildroot package by scanning a PyPI package
+    description.
+
 size-stat-compare
     a script to compare the rootfs size between two differnt Buildroot
     configurations. This can be used to identify the size impact of
diff --git a/support/scripts/scanpypi b/tools/scanpypi
similarity index 100%
rename from support/scripts/scanpypi
rename to tools/scanpypi
-- 
2.11.0

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

* [Buildroot] [PATCH 7/7 v4] tools: new tool to filter the output of make
  2017-07-01 14:31 [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
                   ` (5 preceding siblings ...)
  2017-07-01 14:31 ` [Buildroot] [PATCH 6/7 v4] tools: move scanpypi " Yann E. MORIN
@ 2017-07-01 14:31 ` Yann E. MORIN
  2017-07-01 16:26 ` [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Thomas Petazzoni
  7 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2017-07-01 14:31 UTC (permalink / raw)
  To: buildroot

Add brmake, a small script that redirects the build output log to a
file, keeping just Buildroot's own messages, with the date+time added
at the start of the line.

We need to unbuffer the output of make so that, when the script is
interrupted (SIGINT, ^C), there is no lingering output not yet digested
by the logger loop.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Samuel Martin <s.martin49@gmail.com>

---
Changes v3 -> v4:
  - drop options parsing, expand readme  (Arnout, Samuel, Thomas)
  - nove to the end of the series  (Thomas, Arnout)

Changes v2 -> v3:
  - detect unconfigured build tree  (Ricardo)
  - rename 00-README -> readme.txt  (Thomas, Arnout)

Changes v1 -> v2:
  - rename contrib -> tools  (Arnout)
  - detect missing unbuffer  (Arnout)

Notes:
  - Arnout suggested using 'stdbuf' instead of 'unbuffer', but that has
    some shortcomings in weird corner-cases because it uses LD_PRELOAD
    to call a constructor that forces settings on stdout/stderr/stdin
    (it cost me three days to investigate a build failure because of
    that). So, I stuck with 'unbuffer'...
  - I also tried to use bash' coproc, but it seems there was a
    regression in later bash versions that causes an incorrect
    redirect. So, I stuck with 'unbuffer'...
---
 docs/manual/writing-rules.txt |  5 +++--
 tools/brmake                  | 37 +++++++++++++++++++++++++++++++++++++
 tools/readme.txt              |  9 +++++++++
 3 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100755 tools/brmake

diff --git a/docs/manual/writing-rules.txt b/docs/manual/writing-rules.txt
index 3a2c8dcb37..c144874a0d 100644
--- a/docs/manual/writing-rules.txt
+++ b/docs/manual/writing-rules.txt
@@ -146,5 +146,6 @@ syntax, refer to http://www.methods.co.nz/asciidoc/userguide.html[].
 
 === Support scripts
 
-Some scripts in the +support/+ directory are written in Python and should follow
-the https://www.python.org/dev/peps/pep-0008/[PEP8 Style Guide for Python Code].
+Some scripts in the +support/+ and +tools/+ directories are written in
+Python and should follow the
+https://www.python.org/dev/peps/pep-0008/[PEP8 Style Guide for Python Code].
diff --git a/tools/brmake b/tools/brmake
new file mode 100755
index 0000000000..3c6f8485ab
--- /dev/null
+++ b/tools/brmake
@@ -0,0 +1,37 @@
+#!/bin/bash
+# (C) 2016, "Yann E. MORIN" <yann.morin.1998@free.fr>
+# License: WTFPL, https://spdx.org/licenses/WTFPL.html
+
+main() {
+    local found ret start d h m mf
+
+    if ! which unbuffer >/dev/null 2>&1; then
+        printf "you need to install 'unbuffer' (from package expect or expect-dev)\n" >&2
+        exit 1
+    fi
+
+    start=${SECONDS}
+
+    ( exec 2>&1; unbuffer make "${@}"; ) \
+    > >( while read line; do
+             printf "%(%Y-%m-%dT%H:%M:%S)T %s\n" -1 "${line}"
+         done \
+         |tee -a br.log \
+         |grep --colour=never -E '>>>'
+       )
+    ret=${?}
+
+    d=$((SECONDS-start))
+    printf "Done in "
+    h=$((d/3600))
+    d=$((d%3600))
+    [ ${h} -eq 0 ] || { printf "%dh " ${h}; mf="02"; }
+    m=$((d/60))
+    d=$((d%60))
+    [ ${m} -eq 0 ] || { printf "%${mf}dmin " ${m}; sf="02"; }
+    printf "%${sf}ds\n" ${d}
+
+    return ${ret}
+}
+
+main "${@}"
diff --git a/tools/readme.txt b/tools/readme.txt
index 94843332c9..a90805fb00 100644
--- a/tools/readme.txt
+++ b/tools/readme.txt
@@ -2,6 +2,15 @@ This directory contains various useful scripts and tools for working
 with Buildroot. You need not add this directory in your PATH to use
 any of those tools, but you may do so if you want.
 
+brmake
+    a script that can be run instead of make, that prepends the date in
+    front of each line, redirects all of the build output to a file
+    ("'br.log' in the current directory), and just outputs the Buildroot
+    messages (those lines starting with >>>) on stdout.
+    Do not run this script for interactive configuration (e.g. menuconfig)
+    or on an unconfigured directory. The output is redirected so you will see
+    nothing.
+
 check-package
     a script that checks the coding style of a package's Config.in and
     .mk files, and also tests them for various types of typoes.
-- 
2.11.0

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

* [Buildroot] [PATCH 4/7 v4] tools: move size-stat-compare out of support/scripts/
  2017-07-01 14:31 ` [Buildroot] [PATCH 4/7 v4] tools: move size-stat-compare " Yann E. MORIN
@ 2017-07-01 16:02   ` Thomas De Schampheleire
  2017-07-01 16:27     ` Thomas Petazzoni
  2017-07-01 16:33     ` Yann E. MORIN
  0 siblings, 2 replies; 12+ messages in thread
From: Thomas De Schampheleire @ 2017-07-01 16:02 UTC (permalink / raw)
  To: buildroot

Hi Yann,

2017-07-01 16:31 GMT+02:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> Move it to the top-level tools/ directory, so that it is easier to
> find for users.
>
> Add a legacy symlink for those users who already used them, so as
> not to break their habits.
>
> 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>
>
> ---
> Changes v3 -> v4:
>   - drop legacy symlink  (Arnout, Thomas)
> ---
>  tools/readme.txt                              | 6 ++++++
>  {support/scripts => tools}/size-stats-compare | 0
>  2 files changed, 6 insertions(+)
>  rename {support/scripts => tools}/size-stats-compare (100%)
>
> diff --git a/tools/readme.txt b/tools/readme.txt
> index fc1108fded..dd8a1d4494 100644
> --- a/tools/readme.txt
> +++ b/tools/readme.txt
> @@ -11,6 +11,12 @@ get-developpers
>      of Buildroot, so they can be Cc:ed on a mail. Accepts a patch as
>      input, a package name or and architecture name.
>
> +size-stat-compare
> +    a script to compare the rootfs size between two differnt Buildroot

You must have missed my comment about 'differnt' -> 'different'

> +    configurations. This can be used to identify the size impact of
> +    a specific option, or of a set of specific options, or an update
> +    to a newer Buildroot version...

While you're at it, the last clause would either also need 'of': 'or
of an update...',
or otherwise it would need to be removed on the second clause, but now
it is inconsistent.

Thanks,
Thomas

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

* [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools
  2017-07-01 14:31 [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
                   ` (6 preceding siblings ...)
  2017-07-01 14:31 ` [Buildroot] [PATCH 7/7 v4] tools: new tool to filter the output of make Yann E. MORIN
@ 2017-07-01 16:26 ` Thomas Petazzoni
  7 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2017-07-01 16:26 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  1 Jul 2017 16:31:03 +0200, Yann E. MORIN wrote:

> Yann E. MORIN (7):
>       tools: move test-pkg out of support/scripts
>       tools: move get-developers out of support/scripts/
>       tools: move check-package out of support/scripts/
>       tools: move size-stat-compare out of support/scripts/
>       tools: move scancpan out of support/scripts/
>       tools: move scanpypi out of support/scripts/
>       tools: new tool to filter the output of make

All applied. As discussed, I have changed the name of the directory
from "tools/" to "utils/" in order to avoid the tab-completion conflict
with the top-level "toolchain/" folder.

Thanks!

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

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

* [Buildroot] [PATCH 4/7 v4] tools: move size-stat-compare out of support/scripts/
  2017-07-01 16:02   ` Thomas De Schampheleire
@ 2017-07-01 16:27     ` Thomas Petazzoni
  2017-07-01 16:33     ` Yann E. MORIN
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2017-07-01 16:27 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 1 Jul 2017 18:02:57 +0200, Thomas De Schampheleire wrote:

> > diff --git a/tools/readme.txt b/tools/readme.txt
> > index fc1108fded..dd8a1d4494 100644
> > --- a/tools/readme.txt
> > +++ b/tools/readme.txt
> > @@ -11,6 +11,12 @@ get-developpers
> >      of Buildroot, so they can be Cc:ed on a mail. Accepts a patch as
> >      input, a package name or and architecture name.
> >
> > +size-stat-compare
> > +    a script to compare the rootfs size between two differnt Buildroot  
> 
> You must have missed my comment about 'differnt' -> 'different'
> 
> > +    configurations. This can be used to identify the size impact of
> > +    a specific option, or of a set of specific options, or an update
> > +    to a newer Buildroot version...  
> 
> While you're at it, the last clause would either also need 'of': 'or
> of an update...',
> or otherwise it would need to be removed on the second clause, but now
> it is inconsistent.

Sorry, I have already pushed. Can you send a patch? :-)

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

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

* [Buildroot] [PATCH 4/7 v4] tools: move size-stat-compare out of support/scripts/
  2017-07-01 16:02   ` Thomas De Schampheleire
  2017-07-01 16:27     ` Thomas Petazzoni
@ 2017-07-01 16:33     ` Yann E. MORIN
  1 sibling, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2017-07-01 16:33 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2017-07-01 18:02 +0200, Thomas De Schampheleire spake thusly:
> 2017-07-01 16:31 GMT+02:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> > Move it to the top-level tools/ directory, so that it is easier to
> > find for users.
> >
> > Add a legacy symlink for those users who already used them, so as
> > not to break their habits.
> >
> > 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>
> >
> > ---
> > Changes v3 -> v4:
> >   - drop legacy symlink  (Arnout, Thomas)
> > ---
> >  tools/readme.txt                              | 6 ++++++
> >  {support/scripts => tools}/size-stats-compare | 0
> >  2 files changed, 6 insertions(+)
> >  rename {support/scripts => tools}/size-stats-compare (100%)
> >
> > diff --git a/tools/readme.txt b/tools/readme.txt
> > index fc1108fded..dd8a1d4494 100644
> > --- a/tools/readme.txt
> > +++ b/tools/readme.txt
> > @@ -11,6 +11,12 @@ get-developpers
> >      of Buildroot, so they can be Cc:ed on a mail. Accepts a patch as
> >      input, a package name or and architecture name.
> >
> > +size-stat-compare
> > +    a script to compare the rootfs size between two differnt Buildroot
> 
> You must have missed my comment about 'differnt' -> 'different'

Damn, I forgot it. And Thomas already applied it...

Sorry..

> > +    configurations. This can be used to identify the size impact of
> > +    a specific option, or of a set of specific options, or an update
> > +    to a newer Buildroot version...
> 
> While you're at it, the last clause would either also need 'of': 'or
> of an update...',
> or otherwise it would need to be removed on the second clause, but now
> it is inconsistent.

I'm not sure I follow you...

Regards,
Yann E. MORIN.

> Thanks,
> Thomas

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

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

end of thread, other threads:[~2017-07-01 16:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-01 14:31 [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
2017-07-01 14:31 ` [Buildroot] [PATCH 1/7 v4] tools: move test-pkg out of support/scripts Yann E. MORIN
2017-07-01 14:31 ` [Buildroot] [PATCH 2/7 v4] tools: move get-developers out of support/scripts/ Yann E. MORIN
2017-07-01 14:31 ` [Buildroot] [PATCH 3/7 v4] tools: move check-package " Yann E. MORIN
2017-07-01 14:31 ` [Buildroot] [PATCH 4/7 v4] tools: move size-stat-compare " Yann E. MORIN
2017-07-01 16:02   ` Thomas De Schampheleire
2017-07-01 16:27     ` Thomas Petazzoni
2017-07-01 16:33     ` Yann E. MORIN
2017-07-01 14:31 ` [Buildroot] [PATCH 5/7 v4] tools: move scancpan " Yann E. MORIN
2017-07-01 14:31 ` [Buildroot] [PATCH 6/7 v4] tools: move scanpypi " Yann E. MORIN
2017-07-01 14:31 ` [Buildroot] [PATCH 7/7 v4] tools: new tool to filter the output of make Yann E. MORIN
2017-07-01 16:26 ` [Buildroot] [PATCH 0/7 v4] tools: add a directory to contain usefull user-facing tools Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox