<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot/package/pkg-utils.mk, branch 2016.08</title>
<subtitle>OpenPOWER buildroot sources</subtitle>
<id>https://git.raptorcs.com/git/buildroot/atom?h=2016.08</id>
<link rel='self' href='https://git.raptorcs.com/git/buildroot/atom?h=2016.08'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/'/>
<updated>2016-06-07T20:20:53+00:00</updated>
<entry>
<title>core/pkg-utils: add macro to escape-and-printf</title>
<updated>2016-06-07T20:20:53+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2016-06-06T20:43:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=cc05f407bcf77bc5a5c74c5e237d5a5aa5194bba'/>
<id>urn:sha1:cc05f407bcf77bc5a5c74c5e237d5a5aa5194bba</id>
<content type='text'>
In some cases we need to escape make variables and pass them to
printf(1).

This is the case in our fs infra, where we want to shoe-horn the
commands to generate the filesystems in the fakeroot script, or the
devices, permissions and users tables to their respective files.

We currently do so by replacing $(sep) with the literal '\n' but that's
not enough. This does not protect against strings with an embedded '%'
or a backslash.

Add a new macro that properly escapes a string and calls printf(1), so
that we get the expected output.

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>pkg-utils: mask tput failure for non-interactive sessions</title>
<updated>2016-02-21T17:30:09+00:00</updated>
<author>
<name>James Knight</name>
<email>james.d.knight@live.com</email>
</author>
<published>2016-02-21T16:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=2406955bce3e6371b5ebb3faac65d1aca9d3e108'/>
<id>urn:sha1:2406955bce3e6371b5ebb3faac65d1aca9d3e108</id>
<content type='text'>
When invoking a build from a non-interactive session (for example, a
Jenkins build), there is no terminal session to modify. When preparing
variables to track the bold and boldoff mode sequences, the `tput`
command will always fail as there is no terminal to query. The following
change masks the error message when `tput` fails; leaving the TERM_BOLD
and TERM_RESET variables empty.

Signed-off-by: James Knight &lt;james.d.knight@live.com&gt;
Acked-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>pkg-generic: support for lzma archives</title>
<updated>2015-06-21T07:47:12+00:00</updated>
<author>
<name>Petr Vorel</name>
<email>petr.vorel@gmail.com</email>
</author>
<published>2015-06-15T22:57:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=57d0d93efd4034c6d874568defe6fc77810b1e4c'/>
<id>urn:sha1:57d0d93efd4034c6d874568defe6fc77810b1e4c</id>
<content type='text'>
Signed-off-by: Petr Vorel &lt;petr.vorel@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>pkg-generic: substitute colon and space out of PKG_VERSION</title>
<updated>2015-04-25T08:30:52+00:00</updated>
<author>
<name>Arnout Vandecappelle</name>
<email>arnout@mind.be</email>
</author>
<published>2015-04-22T23:08:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=f17222f506fb4dabf2ecb83ce9f6791c48552d6c'/>
<id>urn:sha1:f17222f506fb4dabf2ecb83ce9f6791c48552d6c</id>
<content type='text'>
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) &lt;arnout@mind.be&gt;
Cc: Fabio Porcedda &lt;fabio.porcedda@gmail.com&gt;
Cc: Yann E. MORIN &lt;yann.morin.1998@free.fr&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>pkg-utils: update comments after renaming of package infra macros</title>
<updated>2015-04-13T20:25:45+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2015-04-13T09:53:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=2366661e4ff53a864e5e2386039165c26128ddfd'/>
<id>urn:sha1:2366661e4ff53a864e5e2386039165c26128ddfd</id>
<content type='text'>
The package infrastructure macros have a long time ago been renamed
from GENTARGETS, AUTOTARGETS to generic-package and
autotools-package. However, one comment in pkg-utils.mk keeps a
reference to these *TARGETS macros. This commit updates this comment
to match the new name of these macros.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Acked-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
</content>
</entry>
<entry>
<title>pkg-utils: describe the case conversion macros in more detail.</title>
<updated>2014-10-16T17:04:18+00:00</updated>
<author>
<name>Arnout Vandecappelle</name>
<email>arnout@mind.be</email>
</author>
<published>2014-10-14T09:23:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=9a89b98ae2a0af31dbad881fd47d29b1fe15d11f'/>
<id>urn:sha1:9a89b98ae2a0af31dbad881fd47d29b1fe15d11f</id>
<content type='text'>
After the refactoring of the case conversion macros in dd5e620ac, the
macro became even harder to understand. Improve this explanation a
little so future generations can make sense of what we're doing here.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Cc: Thomas De Schampheleire &lt;patrickdepinguin@gmail.com&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>.mk files: bulk aligment and whitespace cleanup of assignments</title>
<updated>2014-10-07T13:00:28+00:00</updated>
<author>
<name>Thomas De Schampheleire</name>
<email>thomas.de.schampheleire@gmail.com</email>
</author>
<published>2014-10-07T07:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=f268f7131b9e0ef90f1135461a719d9f5292853e'/>
<id>urn:sha1:f268f7131b9e0ef90f1135461a719d9f5292853e</id>
<content type='text'>
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.

This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.

Alignment of line continuation characters (\) is kept as-is.

The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'

Brief explanation of this command:
    ^\([A-Z0-9a-z_]\+\)     a regular variable at the beginning of the line
    \([?:+]\?=\)            any assignment character =, :=, ?=, +=
    \([^\\]\+\)             any string not containing a line continuation
    \([^\\ \t]\+\s*\\\)     string, optional whitespace, followed by a
                            line continuation character
    \(\s*\\\)               optional whitespace, followed by a line
                            continuation character

Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.

This expression was tested on following test text: (initial tab not
included)

	FOO     = spaces before
	FOO     =   spaces before and after
	FOO	= tab before
	FOO	  = tab and spaces before
	FOO =	tab after
	FOO =	   tab and spaces after
	FOO =   	spaces and tab after
	FOO =    \
	FOO = bar \
	FOO = bar space    \
	FOO   =		   \
	GENIMAGE_DEPENDENCIES   = host-pkgconf libconfuse
	FOO     += spaces before
	FOO     ?=   spaces before and after
	FOO     :=
	FOO     =
	FOO	=
	FOO	  =
	FOO =
	   $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
	AT91BOOTSTRAP3_DEFCONFIG = \
	AXEL_DISABLE_I18N=--i18n=0

After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
  expression leaves the number of whitespace between the value and line
  continuation character intact, but the whitespace before that could have
  changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
  actually makes the code more readable.

Finally, the end result was manually reviewed.

Signed-off-by: Thomas De Schampheleire &lt;thomas.de.schampheleire@gmail.com&gt;
Cc: Yann E. Morin &lt;yann.morin.1998@free.fr&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>check-deprecated-variable: move from pkg-generic.mk to pkg-utils.mk</title>
<updated>2014-10-05T11:38:06+00:00</updated>
<author>
<name>Thomas De Schampheleire</name>
<email>patrickdepinguin@gmail.com</email>
</author>
<published>2014-10-05T07:58:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=2dc51b7c4da119de9a5dd4d7fea1fc9053eb7925'/>
<id>urn:sha1:2dc51b7c4da119de9a5dd4d7fea1fc9053eb7925</id>
<content type='text'>
Suggested-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Thomas De Schampheleire &lt;thomas.de.schampheleire@gmail.com&gt;
Acked-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>pkg-utils: qstrip MESSAGE</title>
<updated>2014-09-29T06:40:32+00:00</updated>
<author>
<name>Yann E. MORIN</name>
<email>yann.morin.1998@free.fr</email>
</author>
<published>2014-09-28T22:08:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=57ae95be21f8e550bc387a54e8086b8abc48c612'/>
<id>urn:sha1:57ae95be21f8e550bc387a54e8086b8abc48c612</id>
<content type='text'>
Currently, the MESSAGE macro double-quotes the message. But a few call
sites also double-quote the message, resulting in a borked call to echo,
like:
    $(call MESSAGE,"user text")
would expand to:
    echo "Leading text "user message" trailign text"

Just use qstrip on the user message, so we get protected from either a
comma in the user text (so make does not interpret it), or a semi-colon
(so the shell does not interpret it.)

Signed-off-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Cc: Peter Korsgaard &lt;jacmet@uclibc.org&gt;
Cc: Thomas De Schampheleire &lt;patrickdepinguin@gmail.com&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>legal-info: Add site to legal info manifest</title>
<updated>2014-07-23T21:36:43+00:00</updated>
<author>
<name>Clayton Shotwell</name>
<email>clshotwe@rockwellcollins.com</email>
</author>
<published>2014-07-21T13:46:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=af629e49ad26bd2873c1e39c0f263704ed8957a1'/>
<id>urn:sha1:af629e49ad26bd2873c1e39c0f263704ed8957a1</id>
<content type='text'>
I would like to propose adding the site to the legal-info manifest
files. This gives a little more information on where the sources came
from without adding much overhead. Please note that is is only for
packages where the source is not local or set with OVERRIDE_SRCDIR.

Signed-off-by: Clayton Shotwell &lt;clayton.shotwell@rockwellcollins.com&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Tested-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
</feed>
