All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/fakeroot: fix glibc detection on patch for new wrappers
@ 2021-02-21 22:38 Ryan Barnett
  2021-02-21 22:56 ` Yann E. MORIN
  2021-02-27 18:11 ` Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Ryan Barnett @ 2021-02-21 22:38 UTC (permalink / raw)
  To: buildroot

Commit f45925a951318e9e53bead80b363e004301adc6f add the patch:

0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch

which allowed fakeroot to be compiled with GLIBC 2.33 or above.
However, this introduce a bug for building with a non-GLIBC based
toolchain as a GLIBC macro - __GLIBC_PREREQ - is used on the same line
as the detection of GLIBC.

Fix this by backporting the fix to this incorrect macro from upstream
commit:

https://salsa.debian.org/clint/fakeroot/-/commit/8090dffdad8fda86dccd47ce7a7db8840bdf7d7b

CC: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
---
v1 -> v2:
 - added patch as standalone patch (suggested by Yann)
---
 .../0005-fix-build-regression-on-macOS.patch  | 64 +++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 package/fakeroot/0005-fix-build-regression-on-macOS.patch

diff --git a/package/fakeroot/0005-fix-build-regression-on-macOS.patch b/package/fakeroot/0005-fix-build-regression-on-macOS.patch
new file mode 100644
index 0000000000..71152b850d
--- /dev/null
+++ b/package/fakeroot/0005-fix-build-regression-on-macOS.patch
@@ -0,0 +1,64 @@
+From 3590b817df703a256f2c1de9a5f5469eaa1c86e9 Mon Sep 17 00:00:00 2001
+From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
+Date: Mon, 15 Feb 2021 11:07:56 -0800
+Subject: [PATCH] fix build regression on macOS
+
+Backported from: 8090dffdad8fda86dccd47ce7a7db8840bdf7d7b
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
+Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
+---
+ configure.ac  | 6 ++++++
+ libfakeroot.c | 4 +++-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index d85566f..d635df1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -181,6 +181,9 @@ AC_MSG_CHECKING([for type of arg of __xmknod])
+        #include <fcntl.h>
+        #include <unistd.h>
+   ]], [[
++#ifndef __GLIBC__
++#error no extra *
++#endif
+        int __xmknod  ( int ver,
+                        const char *pathname ,
+                        mode_t  mode ,  dev_t *dev);
+@@ -207,6 +210,9 @@ AC_MSG_CHECKING([for type of arg of __xmknodat])
+        #include <fcntl.h>
+        #include <unistd.h>
+   ]], [[
++#ifndef __GLIBC__
++#error no extra *
++#endif
+        int __xmknodat  ( int ver,
+                          int dirfd,
+                          const char *pathname ,
+diff --git a/libfakeroot.c b/libfakeroot.c
+index d75c51f..ec4e577 100644
+--- a/libfakeroot.c
++++ b/libfakeroot.c
+@@ -1352,7 +1352,8 @@ int renameat(int olddir_fd, const char *oldpath,
+ #endif /* HAVE_FSTATAT */
+ 
+ 
+-#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)
++#if defined(__GLIBC__)
++#if __GLIBC_PREREQ(2,33)
+ /* Glibc 2.33 exports symbols for these functions in the shared lib */
+   int lstat(const char *file_name, struct stat *statbuf) {
+      return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf);
+@@ -1397,6 +1398,7 @@ int renameat(int olddir_fd, const char *oldpath,
+        return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev);
+     }
+   #endif
++#endif /* __GLIBC__ */
+ #endif /* GLIBC_PREREQ */
+ 
+ 
+-- 
+2.25.1
+
-- 
2.25.1

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

* [Buildroot] [PATCH v2] package/fakeroot: fix glibc detection on patch for new wrappers
  2021-02-21 22:38 [Buildroot] [PATCH v2] package/fakeroot: fix glibc detection on patch for new wrappers Ryan Barnett
@ 2021-02-21 22:56 ` Yann E. MORIN
  2021-02-27 18:11 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2021-02-21 22:56 UTC (permalink / raw)
  To: buildroot

Ryan, All,

On 2021-02-21 16:38 -0600, Ryan Barnett spake thusly:
> Commit f45925a951318e9e53bead80b363e004301adc6f add the patch:
> 
> 0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch
> 
> which allowed fakeroot to be compiled with GLIBC 2.33 or above.
> However, this introduce a bug for building with a non-GLIBC based
> toolchain as a GLIBC macro - __GLIBC_PREREQ - is used on the same line
> as the detection of GLIBC.
> 
> Fix this by backporting the fix to this incorrect macro from upstream
> commit:
> 
> https://salsa.debian.org/clint/fakeroot/-/commit/8090dffdad8fda86dccd47ce7a7db8840bdf7d7b
> 
> CC: Yann E. MORIN <yann.morin.1998@free.fr>
> Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> v1 -> v2:
>  - added patch as standalone patch (suggested by Yann)
> ---
>  .../0005-fix-build-regression-on-macOS.patch  | 64 +++++++++++++++++++
>  1 file changed, 64 insertions(+)
>  create mode 100644 package/fakeroot/0005-fix-build-regression-on-macOS.patch
> 
> diff --git a/package/fakeroot/0005-fix-build-regression-on-macOS.patch b/package/fakeroot/0005-fix-build-regression-on-macOS.patch
> new file mode 100644
> index 0000000000..71152b850d
> --- /dev/null
> +++ b/package/fakeroot/0005-fix-build-regression-on-macOS.patch
> @@ -0,0 +1,64 @@
> +From 3590b817df703a256f2c1de9a5f5469eaa1c86e9 Mon Sep 17 00:00:00 2001
> +From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
> +Date: Mon, 15 Feb 2021 11:07:56 -0800
> +Subject: [PATCH] fix build regression on macOS
> +
> +Backported from: 8090dffdad8fda86dccd47ce7a7db8840bdf7d7b
> +
> +Signed-off-by: Felix Fietkau <nbd@nbd.name>
> +Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
> +Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
> +---
> + configure.ac  | 6 ++++++
> + libfakeroot.c | 4 +++-
> + 2 files changed, 9 insertions(+), 1 deletion(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index d85566f..d635df1 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -181,6 +181,9 @@ AC_MSG_CHECKING([for type of arg of __xmknod])
> +        #include <fcntl.h>
> +        #include <unistd.h>
> +   ]], [[
> ++#ifndef __GLIBC__
> ++#error no extra *
> ++#endif
> +        int __xmknod  ( int ver,
> +                        const char *pathname ,
> +                        mode_t  mode ,  dev_t *dev);
> +@@ -207,6 +210,9 @@ AC_MSG_CHECKING([for type of arg of __xmknodat])
> +        #include <fcntl.h>
> +        #include <unistd.h>
> +   ]], [[
> ++#ifndef __GLIBC__
> ++#error no extra *
> ++#endif
> +        int __xmknodat  ( int ver,
> +                          int dirfd,
> +                          const char *pathname ,
> +diff --git a/libfakeroot.c b/libfakeroot.c
> +index d75c51f..ec4e577 100644
> +--- a/libfakeroot.c
> ++++ b/libfakeroot.c
> +@@ -1352,7 +1352,8 @@ int renameat(int olddir_fd, const char *oldpath,
> + #endif /* HAVE_FSTATAT */
> + 
> + 
> +-#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)
> ++#if defined(__GLIBC__)
> ++#if __GLIBC_PREREQ(2,33)
> + /* Glibc 2.33 exports symbols for these functions in the shared lib */
> +   int lstat(const char *file_name, struct stat *statbuf) {
> +      return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf);
> +@@ -1397,6 +1398,7 @@ int renameat(int olddir_fd, const char *oldpath,
> +        return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev);
> +     }
> +   #endif
> ++#endif /* __GLIBC__ */
> + #endif /* GLIBC_PREREQ */
> + 
> + 
> +-- 
> +2.25.1
> +
> -- 
> 2.25.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] 4+ messages in thread

* [Buildroot] [PATCH v2] package/fakeroot: fix glibc detection on patch for new wrappers
  2021-02-21 22:38 [Buildroot] [PATCH v2] package/fakeroot: fix glibc detection on patch for new wrappers Ryan Barnett
  2021-02-21 22:56 ` Yann E. MORIN
@ 2021-02-27 18:11 ` Peter Korsgaard
  2021-02-27 18:35   ` Ryan Barnett
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2021-02-27 18:11 UTC (permalink / raw)
  To: buildroot

>>>>> "Ryan" == Ryan Barnett <ryanbarnett3@gmail.com> writes:

 > Commit f45925a951318e9e53bead80b363e004301adc6f add the patch:
 > 0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch

 > which allowed fakeroot to be compiled with GLIBC 2.33 or above.
 > However, this introduce a bug for building with a non-GLIBC based
 > toolchain as a GLIBC macro - __GLIBC_PREREQ - is used on the same line
 > as the detection of GLIBC.

 > Fix this by backporting the fix to this incorrect macro from upstream
 > commit:

 > https://salsa.debian.org/clint/fakeroot/-/commit/8090dffdad8fda86dccd47ce7a7db8840bdf7d7b

 > CC: Yann E. MORIN <yann.morin.1998@free.fr>
 > Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
 > ---
 > v1 -> v2:
 >  - added patch as standalone patch (suggested by Yann)

Committed to 2020.11.x, thanks.

The patch does not apply to 2020.02.x. Is it needed there as well?
Presumably yes - Care to send a patch?

Are you really running Buildroot under MacOS? Does that work?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v2] package/fakeroot: fix glibc detection on patch for new wrappers
  2021-02-27 18:11 ` Peter Korsgaard
@ 2021-02-27 18:35   ` Ryan Barnett
  0 siblings, 0 replies; 4+ messages in thread
From: Ryan Barnett @ 2021-02-27 18:35 UTC (permalink / raw)
  To: buildroot

Peter,

On Sat, Feb 27, 2021 at 12:11 PM Peter Korsgaard <peter@korsgaard.com> wrote:
>
> >>>>> "Ryan" == Ryan Barnett <ryanbarnett3@gmail.com> writes:
>
>  > Commit f45925a951318e9e53bead80b363e004301adc6f add the patch:
>  > 0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch
>
>  > which allowed fakeroot to be compiled with GLIBC 2.33 or above.
>  > However, this introduce a bug for building with a non-GLIBC based
>  > toolchain as a GLIBC macro - __GLIBC_PREREQ - is used on the same line
>  > as the detection of GLIBC.
>
>  > Fix this by backporting the fix to this incorrect macro from upstream
>  > commit:
>
>  > https://salsa.debian.org/clint/fakeroot/-/commit/8090dffdad8fda86dccd47ce7a7db8840bdf7d7b
>
>  > CC: Yann E. MORIN <yann.morin.1998@free.fr>
>  > Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
>  > ---
>  > v1 -> v2:
>  >  - added patch as standalone patch (suggested by Yann)
>
> Committed to 2020.11.x, thanks.
>
> The patch does not apply to 2020.02.x. Is it needed there as well?
> Presumably yes - Care to send a patch?

Yes it appears that this would apply to 2020.02.x since it is carry a
patch to add support glibc 2.33:

https://git.busybox.net/buildroot/tree/package/fakeroot/0006-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch?h=2020.02.x

> Are you really running Buildroot under MacOS? Does that work?

I was looking at using buildroot on the bare minimum Alpine Linux
Docker container to help with finding issues with missing host
dependencies. Specifically looking at building on a non-glibc host
machine since Alpine is a musl based distro. Eventually my goal is to
have an autobuilder somewhere that actually builds with the minimum
package list which is listed in the buildroot manual.

Hopefully soon I can send a patch series which describes what issues
I've found and some patches for some missing host dependencies on some
packages.

Thanks,
-Ryan

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

end of thread, other threads:[~2021-02-27 18:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-21 22:38 [Buildroot] [PATCH v2] package/fakeroot: fix glibc detection on patch for new wrappers Ryan Barnett
2021-02-21 22:56 ` Yann E. MORIN
2021-02-27 18:11 ` Peter Korsgaard
2021-02-27 18:35   ` Ryan Barnett

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.