Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] pdsh: fix build on musl
@ 2022-12-26 14:48 hazen2215
  2022-12-26 15:12 ` [PR PATCH] [Updated] " hazen2215
  2022-12-27  1:34 ` [PR PATCH] [Merged]: " sgn
  0 siblings, 2 replies; 3+ messages in thread
From: hazen2215 @ 2022-12-26 14:48 UTC (permalink / raw)
  To: ml

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

There is a new pull request by hazen2215 against master on the void-packages repository

https://github.com/hazen2215/void-packages pdsh
https://github.com/void-linux/void-packages/pull/41299

pdsh: fix build on musl
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-musl)


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

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

From 1acc9ba2db950f9ba0df75b2c7ea4b54db91f40e Mon Sep 17 00:00:00 2001
From: hazen2215 <haz@disroot.org>
Date: Mon, 19 Dec 2022 00:10:28 +0900
Subject: [PATCH] pdsh: fix build on musl

---
 srcpkgs/pdsh/patches/without-rresvport.patch | 95 ++++++++++++++++++++
 srcpkgs/pdsh/template                        |  3 +-
 2 files changed, 96 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/pdsh/patches/without-rresvport.patch

diff --git a/srcpkgs/pdsh/patches/without-rresvport.patch b/srcpkgs/pdsh/patches/without-rresvport.patch
new file mode 100644
index 000000000000..0a5e0d91d796
--- /dev/null
+++ b/srcpkgs/pdsh/patches/without-rresvport.patch
@@ -0,0 +1,95 @@
+From 48c728dfefa3b9aff01f598ff9d3f909001b8e81 Mon Sep 17 00:00:00 2001
+From: Mark Grondona <grondo@eris.llnl.gov>
+Date: Thu, 10 Mar 2016 16:01:18 -0800
+Subject: [PATCH] privsep: do nothing if !HAVE_RRESVPORT
+
+If we don't have rresvport() do not enable privsep during
+privsep_init() (it probably isn't used anyway). Also be sure
+to undefine usage of rresvport and rresvport_af since these
+symbols won't be found at compile or runtime.
+
+Fixes #74
+---
+ src/pdsh/privsep.c | 23 ++++++++++++++++++++++-
+ 1 file changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/src/pdsh/privsep.c b/src/pdsh/privsep.c
+index 7e4134f2..2297b175 100644
+--- a/src/pdsh/privsep.c
++++ b/src/pdsh/privsep.c
+@@ -123,6 +123,10 @@ static int send_rresvport (int pipefd, int fd, int lport)
+ 
+ 	cmsg = (struct cmsghdr *) &buf;
+ #endif
++#if !HAVE_RRESVPORT
++	errno = ENOSYS;
++	return (-1);
++#endif
+ 
+ 	memset (&msg, 0, sizeof (msg));
+ 
+@@ -162,6 +166,7 @@ static int send_rresvport (int pipefd, int fd, int lport)
+ 	return (0);
+ }
+ 
++#if HAVE_RRESVPORT
+ static int recv_rresvport (int pipefd, int *lptr)
+ {
+ 	int            fd = -1;
+@@ -203,19 +208,23 @@ static int recv_rresvport (int pipefd, int *lptr)
+ 
+ 	return (fd);
+ }
++#endif /* HAVE_RRESVPORT */
+ 
+ 
+ static int p_rresvport_af (int *port, int family)
+ {
+ #if HAVE_RRESVPORT_AF
+ 	return rresvport_af (port, family);
+-#else
++#elif HAVE_RRESVPORT
+ 	/*  Family must be AF_INET
+ 	 */
+ 	if (family != AF_INET)
+ 		err ("%p: rresvport called with family != AF_INET!\n");
+ 	/* ignore family != AF_INET */
+ 	return rresvport (port);
++#else
++	errno = ENOSYS;
++	return (-1);
+ #endif
+ }
+ 
+@@ -274,6 +283,9 @@ static int create_privileged_child (void)
+ 
+ int privsep_init (void)
+ {
++#if !HAVE_RRESVPORT
++	return (0);
++#endif
+ 	if (geteuid() == getuid())
+ 		return 0;
+ 
+@@ -285,6 +297,9 @@ int privsep_init (void)
+ 
+ int privsep_fini (void)
+ {
++#if !HAVE_RRESVPORT
++	return (0);
++#endif
+ 	int status;
+ 	if (client_fd < 0 || cpid < 0)
+ 		return (0);
+@@ -334,5 +349,11 @@ int privsep_rresvport_af (int *lport, int family)
+ 
+ int privsep_rresvport (int *lport)
+ {
++#if HAVE_RRESVPORT
+ 	return privsep_rresvport_af (lport, AF_INET);
++#else
++	errno = ENOSYS;
++	return -1;
++#endif /* HAVE_RRESVPORT */
++	
+ }
diff --git a/srcpkgs/pdsh/template b/srcpkgs/pdsh/template
index 422b6489065d..a775a6bc5cee 100644
--- a/srcpkgs/pdsh/template
+++ b/srcpkgs/pdsh/template
@@ -1,8 +1,7 @@
 # Template file for 'pdsh'
 pkgname=pdsh
 version=2.34
-revision=1
-archs="~*-musl"
+revision=2
 build_style=gnu-configure
 configure_args="
  --disable-static-modules

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

* Re: [PR PATCH] [Updated] pdsh: fix build on musl
  2022-12-26 14:48 [PR PATCH] pdsh: fix build on musl hazen2215
@ 2022-12-26 15:12 ` hazen2215
  2022-12-27  1:34 ` [PR PATCH] [Merged]: " sgn
  1 sibling, 0 replies; 3+ messages in thread
From: hazen2215 @ 2022-12-26 15:12 UTC (permalink / raw)
  To: ml

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

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

https://github.com/hazen2215/void-packages pdsh
https://github.com/void-linux/void-packages/pull/41299

pdsh: fix build on musl
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-musl)


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

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

From 333061b50c97195cd85a66d68826f5a8cc3fe922 Mon Sep 17 00:00:00 2001
From: hazen2215 <haz@disroot.org>
Date: Mon, 19 Dec 2022 00:10:28 +0900
Subject: [PATCH] pdsh: fix build on musl

---
 srcpkgs/pdsh/patches/without-rresvport.patch | 95 ++++++++++++++++++++
 srcpkgs/pdsh/template                        |  4 +-
 2 files changed, 97 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/pdsh/patches/without-rresvport.patch

diff --git a/srcpkgs/pdsh/patches/without-rresvport.patch b/srcpkgs/pdsh/patches/without-rresvport.patch
new file mode 100644
index 000000000000..0a5e0d91d796
--- /dev/null
+++ b/srcpkgs/pdsh/patches/without-rresvport.patch
@@ -0,0 +1,95 @@
+From 48c728dfefa3b9aff01f598ff9d3f909001b8e81 Mon Sep 17 00:00:00 2001
+From: Mark Grondona <grondo@eris.llnl.gov>
+Date: Thu, 10 Mar 2016 16:01:18 -0800
+Subject: [PATCH] privsep: do nothing if !HAVE_RRESVPORT
+
+If we don't have rresvport() do not enable privsep during
+privsep_init() (it probably isn't used anyway). Also be sure
+to undefine usage of rresvport and rresvport_af since these
+symbols won't be found at compile or runtime.
+
+Fixes #74
+---
+ src/pdsh/privsep.c | 23 ++++++++++++++++++++++-
+ 1 file changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/src/pdsh/privsep.c b/src/pdsh/privsep.c
+index 7e4134f2..2297b175 100644
+--- a/src/pdsh/privsep.c
++++ b/src/pdsh/privsep.c
+@@ -123,6 +123,10 @@ static int send_rresvport (int pipefd, int fd, int lport)
+ 
+ 	cmsg = (struct cmsghdr *) &buf;
+ #endif
++#if !HAVE_RRESVPORT
++	errno = ENOSYS;
++	return (-1);
++#endif
+ 
+ 	memset (&msg, 0, sizeof (msg));
+ 
+@@ -162,6 +166,7 @@ static int send_rresvport (int pipefd, int fd, int lport)
+ 	return (0);
+ }
+ 
++#if HAVE_RRESVPORT
+ static int recv_rresvport (int pipefd, int *lptr)
+ {
+ 	int            fd = -1;
+@@ -203,19 +208,23 @@ static int recv_rresvport (int pipefd, int *lptr)
+ 
+ 	return (fd);
+ }
++#endif /* HAVE_RRESVPORT */
+ 
+ 
+ static int p_rresvport_af (int *port, int family)
+ {
+ #if HAVE_RRESVPORT_AF
+ 	return rresvport_af (port, family);
+-#else
++#elif HAVE_RRESVPORT
+ 	/*  Family must be AF_INET
+ 	 */
+ 	if (family != AF_INET)
+ 		err ("%p: rresvport called with family != AF_INET!\n");
+ 	/* ignore family != AF_INET */
+ 	return rresvport (port);
++#else
++	errno = ENOSYS;
++	return (-1);
+ #endif
+ }
+ 
+@@ -274,6 +283,9 @@ static int create_privileged_child (void)
+ 
+ int privsep_init (void)
+ {
++#if !HAVE_RRESVPORT
++	return (0);
++#endif
+ 	if (geteuid() == getuid())
+ 		return 0;
+ 
+@@ -285,6 +297,9 @@ int privsep_init (void)
+ 
+ int privsep_fini (void)
+ {
++#if !HAVE_RRESVPORT
++	return (0);
++#endif
+ 	int status;
+ 	if (client_fd < 0 || cpid < 0)
+ 		return (0);
+@@ -334,5 +349,11 @@ int privsep_rresvport_af (int *lport, int family)
+ 
+ int privsep_rresvport (int *lport)
+ {
++#if HAVE_RRESVPORT
+ 	return privsep_rresvport_af (lport, AF_INET);
++#else
++	errno = ENOSYS;
++	return -1;
++#endif /* HAVE_RRESVPORT */
++	
+ }
diff --git a/srcpkgs/pdsh/template b/srcpkgs/pdsh/template
index 422b6489065d..cd2dc54745f0 100644
--- a/srcpkgs/pdsh/template
+++ b/srcpkgs/pdsh/template
@@ -1,8 +1,7 @@
 # Template file for 'pdsh'
 pkgname=pdsh
 version=2.34
-revision=1
-archs="~*-musl"
+revision=2
 build_style=gnu-configure
 configure_args="
  --disable-static-modules
@@ -19,6 +18,7 @@ makedepends="
  $(vopt_if mrsh munge-devel)
  $(vopt_if readline readline-devel)
 "
+checkdepends="which"
 short_desc="High performance, parallel remote shell utility"
 maintainer="Kyle Nusbaum <knusbaum+void@sdf.org>"
 license="GPL-2.0-or-later"

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

* Re: [PR PATCH] [Merged]: pdsh: fix build on musl
  2022-12-26 14:48 [PR PATCH] pdsh: fix build on musl hazen2215
  2022-12-26 15:12 ` [PR PATCH] [Updated] " hazen2215
@ 2022-12-27  1:34 ` sgn
  1 sibling, 0 replies; 3+ messages in thread
From: sgn @ 2022-12-27  1:34 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

pdsh: fix build on musl
https://github.com/void-linux/void-packages/pull/41299

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-musl)


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

end of thread, other threads:[~2022-12-27  1:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-26 14:48 [PR PATCH] pdsh: fix build on musl hazen2215
2022-12-26 15:12 ` [PR PATCH] [Updated] " hazen2215
2022-12-27  1:34 ` [PR PATCH] [Merged]: " sgn

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).