package/fakeroot: fix glibc detection on patch for new wrappers
PATCH 1/1 package/fakeroot: fix glibc detection on patch for new wrappers
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
--- ...d-wrappers-for-new-glibc-2.33-symbol.patch | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-)
package/fakeroot/0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch +15 -7
@@ -1,4 +1,4 @@ -From feda578ca3608b7fc9a28a3a91293611c0ef47b7 Mon Sep 17 00:00:00 2001 +From 2c15ff6dda7ad3ea45590e262288569862fb3b90 Mon Sep 17 00:00:00 2001 From: Ilya Lipnitskiy <[email protected]> Date: Thu, 11 Feb 2021 21:00:04 -0800 Subject: [PATCH] libfakeroot.c: add wrappers for new glibc 2.33+ symbols
@@ -9,22 +9,29 @@ Content-Transfer-Encoding: 8bit This patch add wrappers for newly exported symbols in glibc 2.33. Backported from: feda578ca3608b7fc9a28a3a91293611c0ef47b7 +Backported from: 8090dffdad8fda86dccd47ce7a7db8840bdf7d7b Signed-off-by: Ilya Lipnitskiy <[email protected]> Signed-off-by: J?rg Krause <[email protected]> +Signed-off-by: Ryan Barnett <[email protected]> --- - libfakeroot.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) +v1 -> v2 + - [ryan] incorporated fix to allow libfakeroot to compile on non + GLIBC hosts since __GLIBC_PREREQ macro is not defined +--- + libfakeroot.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) diff --git a/libfakeroot.c b/libfakeroot.c -index 14cdbc4..d75c51f 100644 +index 14cdbc4..ec4e577 100644 --- a/libfakeroot.c +++ b/libfakeroot.c -@@ -1352,6 +1352,54 @@ int renameat(int olddir_fd, const char *oldpath, +@@ -1352,6 +1352,56 @@ 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);
@@ -69,6 +76,7 @@ index 14cdbc4..d75c51f 100644 + return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev); + } + #endif ++#endif /* __GLIBC__ */ +#endif /* GLIBC_PREREQ */ + +
@@ -76,5 +84,5 @@ index 14cdbc4..d75c51f 100644 pid_t fork(void) { -- -2.30.1 +2.25.1
Signature · 1 line
2.25.1
PATCH 1/1 package/fakeroot: fix glibc detection on patch for new wrappers
Ryan, All,
On 2021-02-21 12:38 -0600, Ryan Barnett spake thusly:
Quoted 9 lines
Commit
f45925a951318e9e53bead80b363e004301adc6fadd 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.
Quoted 4 lines
Fix this by backporting the fix to this incorrect macro from upstream commit:
https://salsa.debian.org/clint/fakeroot/-/commit/8090dffdad8fda86dccd47ce7a7db8840bdf7d7b
Why are you mangling an existing patch, instead of simply backporting the upstream commit into a new patch?
We want each patch that we carry to be individual patches, not a mix of squashed patches...
Regards,
Yann E. MORIN.
Quoted 72 lines
Signed-off-by Ryan Barnett <[email protected]>--- ...d-wrappers-for-new-glibc-2.33-symbol.patch | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-)package/fakeroot/0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch +15
-7@@ -1,4 +1,4 @@ -From feda578ca3608b7fc9a28a3a91293611c0ef47b7 Mon Sep 17 00:00:00 2001 +From 2c15ff6dda7ad3ea45590e262288569862fb3b90 Mon Sep 17 00:00:00 2001 From: Ilya Lipnitskiy <[email protected]> Date: Thu, 11 Feb 2021 21:00:04 -0800 Subject: [PATCH] libfakeroot.c: add wrappers for new glibc 2.33+ symbols@@ -9,22 +9,29 @@ Content-Transfer-Encoding: 8bit This patch add wrappers for newly exported symbols in glibc 2.33. Backported from: feda578ca3608b7fc9a28a3a91293611c0ef47b7 +Backported from: 8090dffdad8fda86dccd47ce7a7db8840bdf7d7b Signed-off-by: Ilya Lipnitskiy <[email protected]> Signed-off-by: J?rg Krause <[email protected]> +Signed-off-by: Ryan Barnett <[email protected]> --- - libfakeroot.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) +v1 -> v2 + - [ryan] incorporated fix to allow libfakeroot to compile on non + GLIBC hosts since __GLIBC_PREREQ macro is not defined +--- + libfakeroot.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) diff --git a/libfakeroot.c b/libfakeroot.c -index 14cdbc4..d75c51f 100644 +index 14cdbc4..ec4e577 100644 --- a/libfakeroot.c +++ b/libfakeroot.c -@@ -1352,6 +1352,54 @@ int renameat(int olddir_fd, const char *oldpath, +@@ -1352,6 +1352,56 @@ 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);@@ -69,6 +76,7 @@ index 14cdbc4..d75c51f 100644 + return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev); + } + #endif ++#endif /* __GLIBC__ */ +#endif /* GLIBC_PREREQ */ + +@@ -76,5 +84,5 @@ index 14cdbc4..d75c51f 100644 pid_t fork(void) { -- -2.30.1 +2.25.1Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'