Github messages for voidlinux
 help / color / mirror / Atom feed
* Re: [PR PATCH] [Updated] libnss-cache: unbreak on musl
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-13343@inbox.vuxu.org>
  2019-07-27  5:12 ` [PR PATCH] [Updated] libnss-cache: unbreak on musl voidlinux-github
@ 2019-07-27  5:12 ` voidlinux-github
  1 sibling, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2019-07-27  5:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

There is an updated pull request by the-maldridge against master on the void-packages repository

https://github.com/the-maldridge/void-packages libnss-cache
https://github.com/void-linux/void-packages/pull/13343

libnss-cache: unbreak on musl


A patch file from https://github.com/void-linux/void-packages/pull/13343.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libnss-cache-13343.patch --]
[-- Type: text/x-diff, Size: 4074 bytes --]

From 67956ff2f86b6ea57b8d5b2c04d89b070a72109d Mon Sep 17 00:00:00 2001
From: Michael Aldridge <maldridge@VoidLinux.eu>
Date: Fri, 26 Jul 2019 00:19:49 -0700
Subject: [PATCH] libnss-cache: unbreak on musl

---
 ...1-Add-compatibility-for-non-GNU-libc.patch | 92 +++++++++++++++++++
 srcpkgs/libnss-cache/template                 |  3 +-
 2 files changed, 93 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libnss-cache/patches/0001-Add-compatibility-for-non-GNU-libc.patch

diff --git a/srcpkgs/libnss-cache/patches/0001-Add-compatibility-for-non-GNU-libc.patch b/srcpkgs/libnss-cache/patches/0001-Add-compatibility-for-non-GNU-libc.patch
new file mode 100644
index 00000000000..78b8628419c
--- /dev/null
+++ b/srcpkgs/libnss-cache/patches/0001-Add-compatibility-for-non-GNU-libc.patch
@@ -0,0 +1,92 @@
+diff --git compat/getgrent_r.c compat/getgrent_r.c
+index 1d20465..863413f 100644
+--- compat/getgrent_r.c
++++ compat/getgrent_r.c
+@@ -26,9 +26,9 @@
+  *  Copyright © 2015 Kevin Bowling <k@kev009.com>
+  */
+ 
+-#include <sys/param.h>
+-
+-#ifdef BSD
++// This compat layer is only built for BSD, or Linux without the GNU C
++// Library.
++#if defined(BSD) || (defined(__linux__) && !defined(__GLIBC__))
+ 
+ #include <grp.h>
+ #include <stddef.h>
+@@ -37,6 +37,16 @@
+ #include <errno.h>
+ #include <string.h>
+ 
++#if defined(BSD)
++#include <sys/param.h>
++#else
++// This branch is necessarily Linux and not GNU because of the checks
++// defined above that guard the rest of the compat layer.  On Linux we
++// don't pull in param.h as it is very obsolete.
++#include <stdint.h>
++#define ALIGNBYTES _Alignof(max_align_t)
++#define ALIGN(p)(((uintptr_t)(p) + ALIGNBYTES & ~ALIGNBYTES))
++#endif // defined(BSD)
+ static unsigned atou(char **s)
+ {
+ 	unsigned x;
+@@ -104,5 +114,4 @@ end:
+ 	if(rv) errno = rv;
+ 	return rv;
+ }
+-
+-#endif // ifdef BSD
++#endif //#if defined(BSD) || defined(__LINUX__) && !defined(__GLIBC__)
+diff --git compat/getpwent_r.c compat/getpwent_r.c
+index b1be6fc..de785a6 100644
+--- compat/getpwent_r.c
++++ compat/getpwent_r.c
+@@ -26,9 +26,9 @@
+  *  Copyright © 2015 Kevin Bowling <k@kev009.com>
+  */
+ 
+-#include <sys/param.h>
+-
+-#ifdef BSD
++// This compat layer is only built for BSD, or Linux without the GNU C
++// Library.
++#if defined(BSD) || (defined(__linux__) && !defined(__GLIBC__))
+ 
+ #include <pwd.h>
+ #include <stdio.h>
+@@ -83,5 +83,4 @@ int fgetpwent_r(FILE *f, struct passwd *pw, char *line, size_t size, struct pass
+ 	if (rv) errno = rv;
+ 	return rv;
+ }
+-
+-#endif // ifdef BSD
++#endif //#if defined(BSD) || defined(__LINUX__) && !defined(__GLIBC__)
+diff --git nss_cache.c nss_cache.c
+index 0cd113b..aabc0ef 100644
+--- nss_cache.c
++++ nss_cache.c
+@@ -730,7 +730,10 @@ enum nss_status _nss_cache_getgrnam_r(const char *name, struct group *result,
+ //
+ //  Routines for shadow map defined here.
+ //
+-#ifndef BSD
++#if defined(__LINUX__) && defined(__GLIBC__)
++// This is only built on GLIBC as caching the shadow file is generally
++// not permissable from the perspective of other libc's, so the
++// symbols are simply unused in those environments.
+ 
+ // _nss_cache_setspent_path()
+ // Helper function for testing
+@@ -915,6 +918,8 @@ enum nss_status _nss_cache_getspnam_r(const char *name, struct spwd *result,
+ 
+   return ret;
+ }
+-#else
++#endif
++
++#ifdef BSD
+ #include "bsdnss.c"
+-#endif  // ifndef BSD
++#endif  // #if defined(__LINUX__) && defined(__GLIBC__)
diff --git a/srcpkgs/libnss-cache/template b/srcpkgs/libnss-cache/template
index d0cefeed9c6..5b842a97aa0 100644
--- a/srcpkgs/libnss-cache/template
+++ b/srcpkgs/libnss-cache/template
@@ -1,7 +1,7 @@
 # Template file for 'libnss-cache'
 pkgname=libnss-cache
 version=0.16
-revision=1
+revision=2
 wrksrc=$pkgname-version-$version
 build_style=gnu-makefile
 make_use_env=1
@@ -15,7 +15,6 @@ checksum=09099ce2a3becb9cc4c282f7809198ac9707929dbc767030e32da8b824110bfe
 case "$XBPS_TARGET_MACHINE" in
 	*musl)
 		makedepends="musl-nscd-devel"
-		broken="Requires glibc reentrant extensions"
 		;;
 esac
 

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

* Re: [PR PATCH] [Updated] libnss-cache: unbreak on musl
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-13343@inbox.vuxu.org>
@ 2019-07-27  5:12 ` voidlinux-github
  2019-07-27  5:12 ` voidlinux-github
  1 sibling, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2019-07-27  5:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

There is an updated pull request by the-maldridge against master on the void-packages repository

https://github.com/the-maldridge/void-packages libnss-cache
https://github.com/void-linux/void-packages/pull/13343

libnss-cache: unbreak on musl


A patch file from https://github.com/void-linux/void-packages/pull/13343.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libnss-cache-13343.patch --]
[-- Type: text/x-diff, Size: 4074 bytes --]

From 67956ff2f86b6ea57b8d5b2c04d89b070a72109d Mon Sep 17 00:00:00 2001
From: Michael Aldridge <maldridge@VoidLinux.eu>
Date: Fri, 26 Jul 2019 00:19:49 -0700
Subject: [PATCH] libnss-cache: unbreak on musl

---
 ...1-Add-compatibility-for-non-GNU-libc.patch | 92 +++++++++++++++++++
 srcpkgs/libnss-cache/template                 |  3 +-
 2 files changed, 93 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libnss-cache/patches/0001-Add-compatibility-for-non-GNU-libc.patch

diff --git a/srcpkgs/libnss-cache/patches/0001-Add-compatibility-for-non-GNU-libc.patch b/srcpkgs/libnss-cache/patches/0001-Add-compatibility-for-non-GNU-libc.patch
new file mode 100644
index 00000000000..78b8628419c
--- /dev/null
+++ b/srcpkgs/libnss-cache/patches/0001-Add-compatibility-for-non-GNU-libc.patch
@@ -0,0 +1,92 @@
+diff --git compat/getgrent_r.c compat/getgrent_r.c
+index 1d20465..863413f 100644
+--- compat/getgrent_r.c
++++ compat/getgrent_r.c
+@@ -26,9 +26,9 @@
+  *  Copyright © 2015 Kevin Bowling <k@kev009.com>
+  */
+ 
+-#include <sys/param.h>
+-
+-#ifdef BSD
++// This compat layer is only built for BSD, or Linux without the GNU C
++// Library.
++#if defined(BSD) || (defined(__linux__) && !defined(__GLIBC__))
+ 
+ #include <grp.h>
+ #include <stddef.h>
+@@ -37,6 +37,16 @@
+ #include <errno.h>
+ #include <string.h>
+ 
++#if defined(BSD)
++#include <sys/param.h>
++#else
++// This branch is necessarily Linux and not GNU because of the checks
++// defined above that guard the rest of the compat layer.  On Linux we
++// don't pull in param.h as it is very obsolete.
++#include <stdint.h>
++#define ALIGNBYTES _Alignof(max_align_t)
++#define ALIGN(p)(((uintptr_t)(p) + ALIGNBYTES & ~ALIGNBYTES))
++#endif // defined(BSD)
+ static unsigned atou(char **s)
+ {
+ 	unsigned x;
+@@ -104,5 +114,4 @@ end:
+ 	if(rv) errno = rv;
+ 	return rv;
+ }
+-
+-#endif // ifdef BSD
++#endif //#if defined(BSD) || defined(__LINUX__) && !defined(__GLIBC__)
+diff --git compat/getpwent_r.c compat/getpwent_r.c
+index b1be6fc..de785a6 100644
+--- compat/getpwent_r.c
++++ compat/getpwent_r.c
+@@ -26,9 +26,9 @@
+  *  Copyright © 2015 Kevin Bowling <k@kev009.com>
+  */
+ 
+-#include <sys/param.h>
+-
+-#ifdef BSD
++// This compat layer is only built for BSD, or Linux without the GNU C
++// Library.
++#if defined(BSD) || (defined(__linux__) && !defined(__GLIBC__))
+ 
+ #include <pwd.h>
+ #include <stdio.h>
+@@ -83,5 +83,4 @@ int fgetpwent_r(FILE *f, struct passwd *pw, char *line, size_t size, struct pass
+ 	if (rv) errno = rv;
+ 	return rv;
+ }
+-
+-#endif // ifdef BSD
++#endif //#if defined(BSD) || defined(__LINUX__) && !defined(__GLIBC__)
+diff --git nss_cache.c nss_cache.c
+index 0cd113b..aabc0ef 100644
+--- nss_cache.c
++++ nss_cache.c
+@@ -730,7 +730,10 @@ enum nss_status _nss_cache_getgrnam_r(const char *name, struct group *result,
+ //
+ //  Routines for shadow map defined here.
+ //
+-#ifndef BSD
++#if defined(__LINUX__) && defined(__GLIBC__)
++// This is only built on GLIBC as caching the shadow file is generally
++// not permissable from the perspective of other libc's, so the
++// symbols are simply unused in those environments.
+ 
+ // _nss_cache_setspent_path()
+ // Helper function for testing
+@@ -915,6 +918,8 @@ enum nss_status _nss_cache_getspnam_r(const char *name, struct spwd *result,
+ 
+   return ret;
+ }
+-#else
++#endif
++
++#ifdef BSD
+ #include "bsdnss.c"
+-#endif  // ifndef BSD
++#endif  // #if defined(__LINUX__) && defined(__GLIBC__)
diff --git a/srcpkgs/libnss-cache/template b/srcpkgs/libnss-cache/template
index d0cefeed9c6..5b842a97aa0 100644
--- a/srcpkgs/libnss-cache/template
+++ b/srcpkgs/libnss-cache/template
@@ -1,7 +1,7 @@
 # Template file for 'libnss-cache'
 pkgname=libnss-cache
 version=0.16
-revision=1
+revision=2
 wrksrc=$pkgname-version-$version
 build_style=gnu-makefile
 make_use_env=1
@@ -15,7 +15,6 @@ checksum=09099ce2a3becb9cc4c282f7809198ac9707929dbc767030e32da8b824110bfe
 case "$XBPS_TARGET_MACHINE" in
 	*musl)
 		makedepends="musl-nscd-devel"
-		broken="Requires glibc reentrant extensions"
 		;;
 esac
 

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

end of thread, other threads:[~2019-07-27  5:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-13343@inbox.vuxu.org>
2019-07-27  5:12 ` [PR PATCH] [Updated] libnss-cache: unbreak on musl voidlinux-github
2019-07-27  5:12 ` voidlinux-github

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).