All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libcap: fix regression for static linking issue
@ 2020-11-11  8:18 Heiko Thiery
  2020-11-11 10:32 ` Heiko Thiery
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Heiko Thiery @ 2020-11-11  8:18 UTC (permalink / raw)
  To: buildroot

9c13e02c35c74eca56e69f2bbfde452b51860f5e already fixed the static linking
issue for host-libcap on some distros (e.g. on Fedora32 and openSUSE).

This regression was introduced by 8d38eb052e7006b6e74e9453351d7f245144481e.

An upstream patch [1] is added to address this problem [2].

Fixes:
Bug 13296

[1] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9b1c003748d4df78416d50fce139f0875224440b
[2] https://bugzilla.kernel.org/show_bug.cgi?id=210135

Cc: Peter Seiderer <ps.report@gmx.net>
Cc: Dr I J Ormshaw <ian_ormshaw@waters.com>
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 ...ding-progs-tcapsh-static-to-sudotest.patch | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch

diff --git a/package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch b/package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch
new file mode 100644
index 0000000000..856b7b1bbf
--- /dev/null
+++ b/package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch
@@ -0,0 +1,79 @@
+From 9b1c003748d4df78416d50fce139f0875224440b Mon Sep 17 00:00:00 2001
+From: "Andrew G. Morgan" <morgan@kernel.org>
+Date: Tue, 10 Nov 2020 20:47:45 -0800
+Subject: [PATCH] Migrate building progs/tcapsh-static to sudotest
+
+This addresses:
+
+  https://bugzilla.kernel.org/show_bug.cgi?id=210135
+  https://bugs.busybox.net/show_bug.cgi?id=13296
+
+Some notes on expectations:
+
+When building DYNAMIC=yes folk want to avoid depending on a
+static libc.a file in their build tree. The best we can do is
+to move building static test tool objects to sudotest.
+
+  make DYNAMIC=yes clean all test
+
+will build the progs binaries and run the tests with all dynamic
+linking. It will, however, build the libcap.a etc libraries too
+even though they are not used for linking.
+
+  make DYNAMIC=no clean all test
+
+will build the progs binaries and run the tests with all static
+linking. It will, however, build the libcap.so etc libraries too
+even though they are not used for linking.
+
+  make SHARED=no clean all test
+
+will build and link progs and test binaries statically against
+libcap.a. No shared libraries (libcap.so etc) will be built.
+
+In all cases, whether linked against or not, libcap.a is built.
+
+Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
+[Patch taken from upstream:
+https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9b1c003748d4df78416d50fce139f0875224440b]
+Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
+---
+ tests/Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/Makefile b/tests/Makefile
+index fc39fee..1e7039d 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -17,13 +17,13 @@ install: all
+ 
+ ifeq ($(DYNAMIC),yes)
+ LINKEXTRA=-Wl,-rpath,../libcap
+-DEPS=../libcap/libcap.so ../progs/tcapsh-static
++DEPS=../libcap/libcap.so
+ ifeq ($(PTHREADS),yes)
+ DEPS += ../libcap/libpsx.so
+ endif
+ else
+ LDFLAGS += --static
+-DEPS=../libcap/libcap.a ../progs/tcapsh-static
++DEPS=../libcap/libcap.a
+ ifeq ($(PTHREADS),yes)
+ DEPS +=  ../libcap/libpsx.a
+ endif
+@@ -71,10 +71,10 @@ libcap_psx_test: libcap_psx_test.c $(DEPS)
+ 	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
+ 
+ # privileged
+-run_libcap_launch_test: libcap_launch_test noop
++run_libcap_launch_test: libcap_launch_test noop ../progs/tcapsh-static
+ 	sudo ./libcap_launch_test
+ 
+-run_libcap_psx_launch_test: libcap_psx_launch_test
++run_libcap_psx_launch_test: libcap_psx_launch_test ../progs/tcapsh-static
+ 	sudo ./libcap_psx_launch_test
+ 
+ libcap_launch_test: libcap_launch_test.c $(DEPS)
+-- 
+2.20.1
+
-- 
2.20.1

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

* [Buildroot] [PATCH 1/1] package/libcap: fix regression for static linking issue
  2020-11-11  8:18 [Buildroot] [PATCH 1/1] package/libcap: fix regression for static linking issue Heiko Thiery
@ 2020-11-11 10:32 ` Heiko Thiery
  2020-11-11 14:25   ` Heiko Thiery
  2020-11-11 18:29 ` Peter Seiderer
  2020-11-11 21:22 ` Yann E. MORIN
  2 siblings, 1 reply; 5+ messages in thread
From: Heiko Thiery @ 2020-11-11 10:32 UTC (permalink / raw)
  To: buildroot

Hi Peter, Hi Jan,

Am Mi., 11. Nov. 2020 um 09:27 Uhr schrieb Heiko Thiery
<heiko.thiery@gmail.com>:
>
> 9c13e02c35c74eca56e69f2bbfde452b51860f5e already fixed the static linking
> issue for host-libcap on some distros (e.g. on Fedora32 and openSUSE).
>
> This regression was introduced by 8d38eb052e7006b6e74e9453351d7f245144481e.
>
> An upstream patch [1] is added to address this problem [2].
>
> Fixes:
> Bug 13296
>
> [1] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9b1c003748d4df78416d50fce139f0875224440b
> [2] https://bugzilla.kernel.org/show_bug.cgi?id=210135
>
> Cc: Peter Seiderer <ps.report@gmx.net>
> Cc: Dr I J Ormshaw <ian_ormshaw@waters.com>
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

Could someone please recheck that patch and add a tested-by?

Thank you. Regards
-- 
Heiko

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

* [Buildroot] [PATCH 1/1] package/libcap: fix regression for static linking issue
  2020-11-11 10:32 ` Heiko Thiery
@ 2020-11-11 14:25   ` Heiko Thiery
  0 siblings, 0 replies; 5+ messages in thread
From: Heiko Thiery @ 2020-11-11 14:25 UTC (permalink / raw)
  To: buildroot

Hi All,

Am Mi., 11. Nov. 2020 um 11:32 Uhr schrieb Heiko Thiery
<heiko.thiery@gmail.com>:
>
> Hi Peter, Hi Jan,
>
> Am Mi., 11. Nov. 2020 um 09:27 Uhr schrieb Heiko Thiery
> <heiko.thiery@gmail.com>:
> >
> > 9c13e02c35c74eca56e69f2bbfde452b51860f5e already fixed the static linking
> > issue for host-libcap on some distros (e.g. on Fedora32 and openSUSE).
> >
> > This regression was introduced by 8d38eb052e7006b6e74e9453351d7f245144481e.
> >
> > An upstream patch [1] is added to address this problem [2].
> >
> > Fixes:
> > Bug 13296
> >
> > [1] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9b1c003748d4df78416d50fce139f0875224440b
> > [2] https://bugzilla.kernel.org/show_bug.cgi?id=210135
> >
> > Cc: Peter Seiderer <ps.report@gmx.net>
> > Cc: Dr I J Ormshaw <ian_ormshaw@waters.com>
> > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

Tested-by: Ian Ormshaw <ian_ormshaw@waters.com>

I've got feedback from Ian about testing the patch. Unfortunately he
is not registered to the mailing list to send the tested-by by
himself. So I will do that in his name.



Thank you
-- 
Heiko

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

* [Buildroot] [PATCH 1/1] package/libcap: fix regression for static linking issue
  2020-11-11  8:18 [Buildroot] [PATCH 1/1] package/libcap: fix regression for static linking issue Heiko Thiery
  2020-11-11 10:32 ` Heiko Thiery
@ 2020-11-11 18:29 ` Peter Seiderer
  2020-11-11 21:22 ` Yann E. MORIN
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Seiderer @ 2020-11-11 18:29 UTC (permalink / raw)
  To: buildroot

Hello Heiko,

On Wed, 11 Nov 2020 09:18:07 +0100, Heiko Thiery <heiko.thiery@gmail.com> wrote:

> 9c13e02c35c74eca56e69f2bbfde452b51860f5e already fixed the static linking
> issue for host-libcap on some distros (e.g. on Fedora32 and openSUSE).
>
> This regression was introduced by 8d38eb052e7006b6e74e9453351d7f245144481e.
>
> An upstream patch [1] is added to address this problem [2].
>
> Fixes:
> Bug 13296
>
> [1] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9b1c003748d4df78416d50fce139f0875224440b
> [2] https://bugzilla.kernel.org/show_bug.cgi?id=210135
>
> Cc: Peter Seiderer <ps.report@gmx.net>
> Cc: Dr I J Ormshaw <ian_ormshaw@waters.com>
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> ---
>  ...ding-progs-tcapsh-static-to-sudotest.patch | 79 +++++++++++++++++++
>  1 file changed, 79 insertions(+)
>  create mode 100644 package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch
>
> diff --git a/package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch b/package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch
> new file mode 100644
> index 0000000000..856b7b1bbf
> --- /dev/null
> +++ b/package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch
> @@ -0,0 +1,79 @@
> +From 9b1c003748d4df78416d50fce139f0875224440b Mon Sep 17 00:00:00 2001
> +From: "Andrew G. Morgan" <morgan@kernel.org>
> +Date: Tue, 10 Nov 2020 20:47:45 -0800
> +Subject: [PATCH] Migrate building progs/tcapsh-static to sudotest
> +
> +This addresses:
> +
> +  https://bugzilla.kernel.org/show_bug.cgi?id=210135
> +  https://bugs.busybox.net/show_bug.cgi?id=13296
> +
> +Some notes on expectations:
> +
> +When building DYNAMIC=yes folk want to avoid depending on a
> +static libc.a file in their build tree. The best we can do is
> +to move building static test tool objects to sudotest.
> +
> +  make DYNAMIC=yes clean all test
> +
> +will build the progs binaries and run the tests with all dynamic
> +linking. It will, however, build the libcap.a etc libraries too
> +even though they are not used for linking.
> +
> +  make DYNAMIC=no clean all test
> +
> +will build the progs binaries and run the tests with all static
> +linking. It will, however, build the libcap.so etc libraries too
> +even though they are not used for linking.
> +
> +  make SHARED=no clean all test
> +
> +will build and link progs and test binaries statically against
> +libcap.a. No shared libraries (libcap.so etc) will be built.
> +
> +In all cases, whether linked against or not, libcap.a is built.
> +
> +Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
> +[Patch taken from upstream:
> +https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9b1c003748d4df78416d50fce139f0875224440b]
> +Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> +---
> + tests/Makefile | 8 ++++----
> + 1 file changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/tests/Makefile b/tests/Makefile
> +index fc39fee..1e7039d 100644
> +--- a/tests/Makefile
> ++++ b/tests/Makefile
> +@@ -17,13 +17,13 @@ install: all
> +
> + ifeq ($(DYNAMIC),yes)
> + LINKEXTRA=-Wl,-rpath,../libcap
> +-DEPS=../libcap/libcap.so ../progs/tcapsh-static
> ++DEPS=../libcap/libcap.so
> + ifeq ($(PTHREADS),yes)
> + DEPS += ../libcap/libpsx.so
> + endif
> + else
> + LDFLAGS += --static
> +-DEPS=../libcap/libcap.a ../progs/tcapsh-static
> ++DEPS=../libcap/libcap.a
> + ifeq ($(PTHREADS),yes)
> + DEPS +=  ../libcap/libpsx.a
> + endif
> +@@ -71,10 +71,10 @@ libcap_psx_test: libcap_psx_test.c $(DEPS)
> + 	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
> +
> + # privileged
> +-run_libcap_launch_test: libcap_launch_test noop
> ++run_libcap_launch_test: libcap_launch_test noop ../progs/tcapsh-static
> + 	sudo ./libcap_launch_test
> +
> +-run_libcap_psx_launch_test: libcap_psx_launch_test
> ++run_libcap_psx_launch_test: libcap_psx_launch_test ../progs/tcapsh-static
> + 	sudo ./libcap_psx_launch_test
> +
> + libcap_launch_test: libcap_launch_test.c $(DEPS)
> +--
> +2.20.1
> +

Fixes the build problem on openSUSE Tumbleweed...

Tested-by: Peter Seiderer <ps.report@gmx.net>

Regards,
Peter

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

* [Buildroot] [PATCH 1/1] package/libcap: fix regression for static linking issue
  2020-11-11  8:18 [Buildroot] [PATCH 1/1] package/libcap: fix regression for static linking issue Heiko Thiery
  2020-11-11 10:32 ` Heiko Thiery
  2020-11-11 18:29 ` Peter Seiderer
@ 2020-11-11 21:22 ` Yann E. MORIN
  2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2020-11-11 21:22 UTC (permalink / raw)
  To: buildroot

Heiko, All,

On 2020-11-11 09:18 +0100, Heiko Thiery spake thusly:
> 9c13e02c35c74eca56e69f2bbfde452b51860f5e already fixed the static linking
> issue for host-libcap on some distros (e.g. on Fedora32 and openSUSE).
> 
> This regression was introduced by 8d38eb052e7006b6e74e9453351d7f245144481e.
> 
> An upstream patch [1] is added to address this problem [2].
> 
> Fixes:
> Bug 13296
> 
> [1] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9b1c003748d4df78416d50fce139f0875224440b
> [2] https://bugzilla.kernel.org/show_bug.cgi?id=210135
> 
> Cc: Peter Seiderer <ps.report@gmx.net>
> Cc: Dr I J Ormshaw <ian_ormshaw@waters.com>
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...ding-progs-tcapsh-static-to-sudotest.patch | 79 +++++++++++++++++++
>  1 file changed, 79 insertions(+)
>  create mode 100644 package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch
> 
> diff --git a/package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch b/package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch
> new file mode 100644
> index 0000000000..856b7b1bbf
> --- /dev/null
> +++ b/package/libcap/0001-Migrate-building-progs-tcapsh-static-to-sudotest.patch
> @@ -0,0 +1,79 @@
> +From 9b1c003748d4df78416d50fce139f0875224440b Mon Sep 17 00:00:00 2001
> +From: "Andrew G. Morgan" <morgan@kernel.org>
> +Date: Tue, 10 Nov 2020 20:47:45 -0800
> +Subject: [PATCH] Migrate building progs/tcapsh-static to sudotest
> +
> +This addresses:
> +
> +  https://bugzilla.kernel.org/show_bug.cgi?id=210135
> +  https://bugs.busybox.net/show_bug.cgi?id=13296
> +
> +Some notes on expectations:
> +
> +When building DYNAMIC=yes folk want to avoid depending on a
> +static libc.a file in their build tree. The best we can do is
> +to move building static test tool objects to sudotest.
> +
> +  make DYNAMIC=yes clean all test
> +
> +will build the progs binaries and run the tests with all dynamic
> +linking. It will, however, build the libcap.a etc libraries too
> +even though they are not used for linking.
> +
> +  make DYNAMIC=no clean all test
> +
> +will build the progs binaries and run the tests with all static
> +linking. It will, however, build the libcap.so etc libraries too
> +even though they are not used for linking.
> +
> +  make SHARED=no clean all test
> +
> +will build and link progs and test binaries statically against
> +libcap.a. No shared libraries (libcap.so etc) will be built.
> +
> +In all cases, whether linked against or not, libcap.a is built.
> +
> +Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
> +[Patch taken from upstream:
> +https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9b1c003748d4df78416d50fce139f0875224440b]
> +Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> +---
> + tests/Makefile | 8 ++++----
> + 1 file changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/tests/Makefile b/tests/Makefile
> +index fc39fee..1e7039d 100644
> +--- a/tests/Makefile
> ++++ b/tests/Makefile
> +@@ -17,13 +17,13 @@ install: all
> + 
> + ifeq ($(DYNAMIC),yes)
> + LINKEXTRA=-Wl,-rpath,../libcap
> +-DEPS=../libcap/libcap.so ../progs/tcapsh-static
> ++DEPS=../libcap/libcap.so
> + ifeq ($(PTHREADS),yes)
> + DEPS += ../libcap/libpsx.so
> + endif
> + else
> + LDFLAGS += --static
> +-DEPS=../libcap/libcap.a ../progs/tcapsh-static
> ++DEPS=../libcap/libcap.a
> + ifeq ($(PTHREADS),yes)
> + DEPS +=  ../libcap/libpsx.a
> + endif
> +@@ -71,10 +71,10 @@ libcap_psx_test: libcap_psx_test.c $(DEPS)
> + 	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
> + 
> + # privileged
> +-run_libcap_launch_test: libcap_launch_test noop
> ++run_libcap_launch_test: libcap_launch_test noop ../progs/tcapsh-static
> + 	sudo ./libcap_launch_test
> + 
> +-run_libcap_psx_launch_test: libcap_psx_launch_test
> ++run_libcap_psx_launch_test: libcap_psx_launch_test ../progs/tcapsh-static
> + 	sudo ./libcap_psx_launch_test
> + 
> + libcap_launch_test: libcap_launch_test.c $(DEPS)
> +-- 
> +2.20.1
> +
> -- 
> 2.20.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

end of thread, other threads:[~2020-11-11 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11  8:18 [Buildroot] [PATCH 1/1] package/libcap: fix regression for static linking issue Heiko Thiery
2020-11-11 10:32 ` Heiko Thiery
2020-11-11 14:25   ` Heiko Thiery
2020-11-11 18:29 ` Peter Seiderer
2020-11-11 21:22 ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.