Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS
@ 2017-03-17 16:06 Arnout Vandecappelle
  2017-03-17 16:06 ` [Buildroot] [PATCH v2 2/3] acl: add host variant Arnout Vandecappelle
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Arnout Vandecappelle @ 2017-03-17 16:06 UTC (permalink / raw)
  To: buildroot

The acl build system doesn't use automake, therefore it is broken. It
doesn't use the CFLAGS passed by configure. Work around this by passing
CFLAGS in the environment. The makefiles append to CFLAGS, so this
works.

This issue hasn't led to build failures, but it is visible e.g. when
stack protector is enabled: the stack protector options are not applied
to acl. Also debug and optimisation options aren't applied.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
---
v2: new patch
---
 package/acl/acl.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/acl/acl.mk b/package/acl/acl.mk
index cbe5e93961..9fd5de18a4 100644
--- a/package/acl/acl.mk
+++ b/package/acl/acl.mk
@@ -15,7 +15,13 @@ ACL_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL
 
 # While the configuration system uses autoconf, the Makefiles are
 # hand-written and do not use automake. Therefore, we have to hack
-# around their deficiencies by passing installation paths.
+# around their deficiencies by:
+# - explicitly passing CFLAGS (LDFLAGS are passed on from configure,
+#   CFLAGS are not).
+# - explicitly passing the installation prefix, not using DESTDIR.
+
+ACL_MAKE_ENV = CFLAGS="$(TARGET_CFLAGS)"
+
 ACL_INSTALL_STAGING_OPTS = \
 	prefix=$(STAGING_DIR)/usr \
 	exec_prefix=$(STAGING_DIR)/usr \
-- 
2.11.0

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

* [Buildroot] [PATCH v2 2/3] acl: add host variant
  2017-03-17 16:06 [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS Arnout Vandecappelle
@ 2017-03-17 16:06 ` Arnout Vandecappelle
  2017-03-17 16:06 ` [Buildroot] [PATCH v2 3/3] fakeroot: depend on acl Arnout Vandecappelle
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Arnout Vandecappelle @ 2017-03-17 16:06 UTC (permalink / raw)
  To: buildroot

We need host-acl to fix issues with fakeroot.

Unfortunately, all the hacks (except the .la fixup) have to be repeated.

Cc: Yegor Yefremov <yegorslists@googlemail.com>
Cc: Andreas Naumann <dev@andin.de>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v2: - propagate CFLAGS (Andreas Naumann)
    - mention that .la hack isn't needed for host.
---
 package/acl/acl.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/package/acl/acl.mk b/package/acl/acl.mk
index 9fd5de18a4..e1462b60aa 100644
--- a/package/acl/acl.mk
+++ b/package/acl/acl.mk
@@ -43,4 +43,15 @@ endef
 
 ACL_POST_INSTALL_STAGING_HOOKS += ACL_FIX_LIBTOOL_LA_LIBDIR
 
+HOST_ACL_DEPENDENCIES = host-attr
+HOST_ACL_CONF_OPTS = --enable-gettext=no
+HOST_ACL_MAKE_ENV = CFLAGS="$(HOST_CFLAGS)"
+HOST_ACL_INSTALL_OPTS = \
+	prefix=$(HOST_DIR)/usr \
+	exec_prefix=$(HOST_DIR)/usr \
+	PKG_DEVLIB_DIR=$(HOST_DIR)/usr/lib \
+	install-dev install-lib
+# For the host, libacl.la is correct, no fixup needed.
+
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
2.11.0

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

* [Buildroot] [PATCH v2 3/3] fakeroot: depend on acl
  2017-03-17 16:06 [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS Arnout Vandecappelle
  2017-03-17 16:06 ` [Buildroot] [PATCH v2 2/3] acl: add host variant Arnout Vandecappelle
@ 2017-03-17 16:06 ` Arnout Vandecappelle
  2017-03-17 22:17 ` [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS Andreas Naumann
  2017-03-18 13:12 ` Thomas Petazzoni
  3 siblings, 0 replies; 8+ messages in thread
From: Arnout Vandecappelle @ 2017-03-17 16:06 UTC (permalink / raw)
  To: buildroot

Recent versions of fakeroot have grown support for acl. We don't really
need this since we don't use acls in Buildroot. However, it turns out
that "cp -a" does something funky with acls, with the result that
fakeroot without acl support looses the ownership and permissions on
the copied file. "cp -a" may be (is even likely to be) used in a
BR2_ROOTFS_POST_FAKEROOT_SCRIPT, so we need to support this.

Note that host-acl itself depends on host-attr, so this pulls in two
extra packages in each build. The impact on build time is about 10s.

Cc: Andreas Naumann <dev@andin.de>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v2: no change
---
 package/fakeroot/fakeroot.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/fakeroot/fakeroot.mk b/package/fakeroot/fakeroot.mk
index 168cd13a48..731b06a5f4 100644
--- a/package/fakeroot/fakeroot.mk
+++ b/package/fakeroot/fakeroot.mk
@@ -7,6 +7,8 @@
 FAKEROOT_VERSION = 1.20.2
 FAKEROOT_SOURCE = fakeroot_$(FAKEROOT_VERSION).orig.tar.bz2
 FAKEROOT_SITE = http://snapshot.debian.org/archive/debian/20141005T221953Z/pool/main/f/fakeroot
+
+HOST_FAKEROOT_DEPENDENCIES = host-acl
 # Force capabilities detection off
 # For now these are process capabilities (faked) rather than file
 # so they're of no real use
-- 
2.11.0

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

* [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS
  2017-03-17 16:06 [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS Arnout Vandecappelle
  2017-03-17 16:06 ` [Buildroot] [PATCH v2 2/3] acl: add host variant Arnout Vandecappelle
  2017-03-17 16:06 ` [Buildroot] [PATCH v2 3/3] fakeroot: depend on acl Arnout Vandecappelle
@ 2017-03-17 22:17 ` Andreas Naumann
  2017-03-17 22:20   ` Arnout Vandecappelle
  2017-03-18 13:12 ` Thomas Petazzoni
  3 siblings, 1 reply; 8+ messages in thread
From: Andreas Naumann @ 2017-03-17 22:17 UTC (permalink / raw)
  To: buildroot

Hi Arnout,
tested and works :-)

thanks,
Andreas

Am 17.03.2017 um 17:06 schrieb Arnout Vandecappelle (Essensium/Mind):
> The acl build system doesn't use automake, therefore it is broken. It
> doesn't use the CFLAGS passed by configure. Work around this by passing
> CFLAGS in the environment. The makefiles append to CFLAGS, so this
> works.
>
> This issue hasn't led to build failures, but it is visible e.g. when
> stack protector is enabled: the stack protector options are not applied
> to acl. Also debug and optimisation options aren't applied.
>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Yegor Yefremov <yegorslists@googlemail.com>
> ---
> v2: new patch
> ---
>  package/acl/acl.mk | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/package/acl/acl.mk b/package/acl/acl.mk
> index cbe5e93961..9fd5de18a4 100644
> --- a/package/acl/acl.mk
> +++ b/package/acl/acl.mk
> @@ -15,7 +15,13 @@ ACL_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL
>
>  # While the configuration system uses autoconf, the Makefiles are
>  # hand-written and do not use automake. Therefore, we have to hack
> -# around their deficiencies by passing installation paths.
> +# around their deficiencies by:
> +# - explicitly passing CFLAGS (LDFLAGS are passed on from configure,
> +#   CFLAGS are not).
> +# - explicitly passing the installation prefix, not using DESTDIR.
> +
> +ACL_MAKE_ENV = CFLAGS="$(TARGET_CFLAGS)"
> +
>  ACL_INSTALL_STAGING_OPTS = \
>  	prefix=$(STAGING_DIR)/usr \
>  	exec_prefix=$(STAGING_DIR)/usr \
>

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

* [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS
  2017-03-17 22:17 ` [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS Andreas Naumann
@ 2017-03-17 22:20   ` Arnout Vandecappelle
  2017-03-20  7:54     ` Andreas Naumann
  0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2017-03-17 22:20 UTC (permalink / raw)
  To: buildroot



On 17-03-17 23:17, Andreas Naumann wrote:
> Hi Arnout,
> tested and works :-)

 You can formalize this by replying with

 Tested-by: Andreas Naumann <dev@andin.de>

(but then without a space in front). It gets picked up by Patchwork and it will
be added to the git log.

 By the way, did you actually test *this patch*, or just that fakeroot works
after the entire series is applied? In the latter case, you should only add your
Tested-by to the last patch (and perhaps 2/3). This particular patch has no
impact on fakeroot.

 Regards,
 Arnout

> 
> thanks,
> Andreas
> 
> Am 17.03.2017 um 17:06 schrieb Arnout Vandecappelle (Essensium/Mind):
>> The acl build system doesn't use automake, therefore it is broken. It
>> doesn't use the CFLAGS passed by configure. Work around this by passing
>> CFLAGS in the environment. The makefiles append to CFLAGS, so this
>> works.
>>
>> This issue hasn't led to build failures, but it is visible e.g. when
>> stack protector is enabled: the stack protector options are not applied
>> to acl. Also debug and optimisation options aren't applied.
>>
>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>> Cc: Yegor Yefremov <yegorslists@googlemail.com>
>> ---
>> v2: new patch
>> ---
>>  package/acl/acl.mk | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/acl/acl.mk b/package/acl/acl.mk
>> index cbe5e93961..9fd5de18a4 100644
>> --- a/package/acl/acl.mk
>> +++ b/package/acl/acl.mk
>> @@ -15,7 +15,13 @@ ACL_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL
>>
>>  # While the configuration system uses autoconf, the Makefiles are
>>  # hand-written and do not use automake. Therefore, we have to hack
>> -# around their deficiencies by passing installation paths.
>> +# around their deficiencies by:
>> +# - explicitly passing CFLAGS (LDFLAGS are passed on from configure,
>> +#   CFLAGS are not).
>> +# - explicitly passing the installation prefix, not using DESTDIR.
>> +
>> +ACL_MAKE_ENV = CFLAGS="$(TARGET_CFLAGS)"
>> +
>>  ACL_INSTALL_STAGING_OPTS = \
>>      prefix=$(STAGING_DIR)/usr \
>>      exec_prefix=$(STAGING_DIR)/usr \
>>

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS
  2017-03-17 16:06 [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS Arnout Vandecappelle
                   ` (2 preceding siblings ...)
  2017-03-17 22:17 ` [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS Andreas Naumann
@ 2017-03-18 13:12 ` Thomas Petazzoni
  3 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2017-03-18 13:12 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 17 Mar 2017 17:06:14 +0100, Arnout Vandecappelle
(Essensium/Mind) wrote:
> The acl build system doesn't use automake, therefore it is broken. It
> doesn't use the CFLAGS passed by configure. Work around this by passing
> CFLAGS in the environment. The makefiles append to CFLAGS, so this
> works.
> 
> This issue hasn't led to build failures, but it is visible e.g. when
> stack protector is enabled: the stack protector options are not applied
> to acl. Also debug and optimisation options aren't applied.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Yegor Yefremov <yegorslists@googlemail.com>
> ---
> v2: new patch
> ---
>  package/acl/acl.mk | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Series applied, thanks!

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

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

* [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS
  2017-03-17 22:20   ` Arnout Vandecappelle
@ 2017-03-20  7:54     ` Andreas Naumann
  2017-03-20 21:53       ` Arnout Vandecappelle
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Naumann @ 2017-03-20  7:54 UTC (permalink / raw)
  To: buildroot

Hi,

Am 17.03.2017 um 23:20 schrieb Arnout Vandecappelle:
>
>
> On 17-03-17 23:17, Andreas Naumann wrote:
>> Hi Arnout,
>> tested and works :-)
>
>  You can formalize this by replying with
>
>  Tested-by: Andreas Naumann <dev@andin.de>
>
> (but then without a space in front). It gets picked up by Patchwork and it will
> be added to the git log.
I guess too late now. Will do next time.

>
>  By the way, did you actually test *this patch*, or just that fakeroot works
> after the entire series is applied? In the latter case, you should only add your
> Tested-by to the last patch (and perhaps 2/3). This particular patch has no
> impact on fakeroot.
I did test this patch in in so far that host-acl successfully builds 
without the attr/xattr.h header being picked up from the host machine. 
And of course subsequently that fakeroot with acl works as expected.

regards,
Andreas

>
>  Regards,
>  Arnout
>
>>
>> thanks,
>> Andreas
>>
>> Am 17.03.2017 um 17:06 schrieb Arnout Vandecappelle (Essensium/Mind):
>>> The acl build system doesn't use automake, therefore it is broken. It
>>> doesn't use the CFLAGS passed by configure. Work around this by passing
>>> CFLAGS in the environment. The makefiles append to CFLAGS, so this
>>> works.
>>>
>>> This issue hasn't led to build failures, but it is visible e.g. when
>>> stack protector is enabled: the stack protector options are not applied
>>> to acl. Also debug and optimisation options aren't applied.
>>>
>>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>>> Cc: Yegor Yefremov <yegorslists@googlemail.com>
>>> ---
>>> v2: new patch
>>> ---
>>>  package/acl/acl.mk | 8 +++++++-
>>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/package/acl/acl.mk b/package/acl/acl.mk
>>> index cbe5e93961..9fd5de18a4 100644
>>> --- a/package/acl/acl.mk
>>> +++ b/package/acl/acl.mk
>>> @@ -15,7 +15,13 @@ ACL_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL
>>>
>>>  # While the configuration system uses autoconf, the Makefiles are
>>>  # hand-written and do not use automake. Therefore, we have to hack
>>> -# around their deficiencies by passing installation paths.
>>> +# around their deficiencies by:
>>> +# - explicitly passing CFLAGS (LDFLAGS are passed on from configure,
>>> +#   CFLAGS are not).
>>> +# - explicitly passing the installation prefix, not using DESTDIR.
>>> +
>>> +ACL_MAKE_ENV = CFLAGS="$(TARGET_CFLAGS)"
>>> +
>>>  ACL_INSTALL_STAGING_OPTS = \
>>>      prefix=$(STAGING_DIR)/usr \
>>>      exec_prefix=$(STAGING_DIR)/usr \
>>>
>

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

* [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS
  2017-03-20  7:54     ` Andreas Naumann
@ 2017-03-20 21:53       ` Arnout Vandecappelle
  0 siblings, 0 replies; 8+ messages in thread
From: Arnout Vandecappelle @ 2017-03-20 21:53 UTC (permalink / raw)
  To: buildroot



On 20-03-17 08:54, Andreas Naumann wrote:
> Hi,
> 
> Am 17.03.2017 um 23:20 schrieb Arnout Vandecappelle:
>>
>>
>> On 17-03-17 23:17, Andreas Naumann wrote:
>>> Hi Arnout,
>>> tested and works :-)
>>
>>  You can formalize this by replying with
>>
>>  Tested-by: Andreas Naumann <dev@andin.de>
>>
>> (but then without a space in front). It gets picked up by Patchwork and it will
>> be added to the git log.
> I guess too late now. Will do next time.
> 
>>
>>  By the way, did you actually test *this patch*, or just that fakeroot works
>> after the entire series is applied? In the latter case, you should only add your
>> Tested-by to the last patch (and perhaps 2/3). This particular patch has no
>> impact on fakeroot.
> I did test this patch in in so far that host-acl successfully builds without the
> attr/xattr.h header being picked up from the host machine. And of course
> subsequently that fakeroot with acl works as expected.

 My point is: this patch is about target-acl, not host-acl, that's why I asked.
So you didn't actually test this patch :-)

 Regards,
 Arnout

> 
> regards,
> Andreas
> 
>>
>>  Regards,
>>  Arnout
>>
>>>
>>> thanks,
>>> Andreas
>>>
>>> Am 17.03.2017 um 17:06 schrieb Arnout Vandecappelle (Essensium/Mind):
>>>> The acl build system doesn't use automake, therefore it is broken. It
>>>> doesn't use the CFLAGS passed by configure. Work around this by passing
>>>> CFLAGS in the environment. The makefiles append to CFLAGS, so this
>>>> works.
>>>>
>>>> This issue hasn't led to build failures, but it is visible e.g. when
>>>> stack protector is enabled: the stack protector options are not applied
>>>> to acl. Also debug and optimisation options aren't applied.
>>>>
>>>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>>>> Cc: Yegor Yefremov <yegorslists@googlemail.com>
>>>> ---
>>>> v2: new patch
>>>> ---
>>>>  package/acl/acl.mk | 8 +++++++-
>>>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/package/acl/acl.mk b/package/acl/acl.mk
>>>> index cbe5e93961..9fd5de18a4 100644
>>>> --- a/package/acl/acl.mk
>>>> +++ b/package/acl/acl.mk
>>>> @@ -15,7 +15,13 @@ ACL_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL
>>>>
>>>>  # While the configuration system uses autoconf, the Makefiles are
>>>>  # hand-written and do not use automake. Therefore, we have to hack
>>>> -# around their deficiencies by passing installation paths.
>>>> +# around their deficiencies by:
>>>> +# - explicitly passing CFLAGS (LDFLAGS are passed on from configure,
>>>> +#   CFLAGS are not).
>>>> +# - explicitly passing the installation prefix, not using DESTDIR.
>>>> +
>>>> +ACL_MAKE_ENV = CFLAGS="$(TARGET_CFLAGS)"
>>>> +
>>>>  ACL_INSTALL_STAGING_OPTS = \
>>>>      prefix=$(STAGING_DIR)/usr \
>>>>      exec_prefix=$(STAGING_DIR)/usr \
>>>>
>>
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

end of thread, other threads:[~2017-03-20 21:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-17 16:06 [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS Arnout Vandecappelle
2017-03-17 16:06 ` [Buildroot] [PATCH v2 2/3] acl: add host variant Arnout Vandecappelle
2017-03-17 16:06 ` [Buildroot] [PATCH v2 3/3] fakeroot: depend on acl Arnout Vandecappelle
2017-03-17 22:17 ` [Buildroot] [PATCH v2 1/3] acl: make sure build picks up TARGET_CFLAGS Andreas Naumann
2017-03-17 22:20   ` Arnout Vandecappelle
2017-03-20  7:54     ` Andreas Naumann
2017-03-20 21:53       ` Arnout Vandecappelle
2017-03-18 13:12 ` Thomas Petazzoni

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