* [PATCH] gnu: procps: Make procps build on non Linux systems.
@ 2016-04-28 8:30 Manolis Ragkousis
2016-04-28 9:55 ` John Darrington
2016-04-28 12:19 ` Ludovic Courtès
0 siblings, 2 replies; 5+ messages in thread
From: Manolis Ragkousis @ 2016-04-28 8:30 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 58 bytes --]
With this patch procps can be built on the Hurd.
Manolis
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-procps-Make-procps-build-on-non-Linux-systems.patch --]
[-- Type: text/x-patch; name="0001-gnu-procps-Make-procps-build-on-non-Linux-systems.patch", Size: 2796 bytes --]
From 00c2d2ec11a75e3d74704150488e73ee7c8c6fe8 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Wed, 27 Apr 2016 23:33:56 +0300
Subject: [PATCH] gnu: procps: Make procps build on non Linux systems.
* gnu/packages/patches/procps-non-linux.patch.patch: New patch.
* gnu/packages/linux.scm (procps)[source]: Use it.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/linux.scm | 4 +++-
gnu/packages/patches/procps-non-linux.patch | 23 +++++++++++++++++++++++
3 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/procps-non-linux.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 80017ea..036e649 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -673,6 +673,7 @@ dist_patch_DATA = \
gnu/packages/patches/polkit-drop-test.patch \
gnu/packages/patches/portaudio-audacity-compat.patch \
gnu/packages/patches/procmail-ambiguous-getline-debian.patch \
+ gnu/packages/patches/procps-non-linux.patch \
gnu/packages/patches/pt-scotch-build-parallelism.patch \
gnu/packages/patches/pulseaudio-fix-mult-test.patch \
gnu/packages/patches/pulseaudio-longer-test-timeout.patch \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a26e641..f3c04cd 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -523,7 +523,9 @@ block devices, UUIDs, TTYs, and many other tools.")
"procps-ng-" version ".tar.xz"))
(sha256
(base32
- "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))))
+ "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))
+ (patches
+ (list (search-patch "procps-non-linux.patch")))))
(build-system gnu-build-system)
(arguments
'(#:modules ((guix build utils)
diff --git a/gnu/packages/patches/procps-non-linux.patch b/gnu/packages/patches/procps-non-linux.patch
new file mode 100644
index 0000000..dd21c82
--- /dev/null
+++ b/gnu/packages/patches/procps-non-linux.patch
@@ -0,0 +1,23 @@
+--- a/lib/test_process.c
++++ b/lib/test_process.c
+@@ -21,7 +21,9 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
++#ifdef __linux__
+ #include <sys/prctl.h>
++#endif
+ #include "c.h"
+
+ #define DEFAULT_SLEEPTIME 300
+@@ -78,8 +80,10 @@
+ sigaction(SIGUSR1, &signal_action, NULL);
+ sigaction(SIGUSR2, &signal_action, NULL);
+
++#ifdef __linux__
+ /* set process name */
+ prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL);
++#endif
+
+ while (sleep_time > 0) {
+ sleep_time = sleep(sleep_time);
\ No newline at end of file
--
2.8.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: procps: Make procps build on non Linux systems.
2016-04-28 8:30 [PATCH] gnu: procps: Make procps build on non Linux systems Manolis Ragkousis
@ 2016-04-28 9:55 ` John Darrington
2016-04-28 12:19 ` Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: John Darrington @ 2016-04-28 9:55 UTC (permalink / raw)
To: Manolis Ragkousis; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 3593 bytes --]
Can upstream be persauded to apply it?
J'
On Thu, Apr 28, 2016 at 11:30:09AM +0300, Manolis Ragkousis wrote:
With this patch procps can be built on the Hurd.
Manolis
From 00c2d2ec11a75e3d74704150488e73ee7c8c6fe8 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Wed, 27 Apr 2016 23:33:56 +0300
Subject: [PATCH] gnu: procps: Make procps build on non Linux systems.
* gnu/packages/patches/procps-non-linux.patch.patch: New patch.
* gnu/packages/linux.scm (procps)[source]: Use it.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/linux.scm | 4 +++-
gnu/packages/patches/procps-non-linux.patch | 23 +++++++++++++++++++++++
3 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/procps-non-linux.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 80017ea..036e649 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -673,6 +673,7 @@ dist_patch_DATA = \
gnu/packages/patches/polkit-drop-test.patch \
gnu/packages/patches/portaudio-audacity-compat.patch \
gnu/packages/patches/procmail-ambiguous-getline-debian.patch \
+ gnu/packages/patches/procps-non-linux.patch \
gnu/packages/patches/pt-scotch-build-parallelism.patch \
gnu/packages/patches/pulseaudio-fix-mult-test.patch \
gnu/packages/patches/pulseaudio-longer-test-timeout.patch \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a26e641..f3c04cd 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -523,7 +523,9 @@ block devices, UUIDs, TTYs, and many other tools.")
"procps-ng-" version ".tar.xz"))
(sha256
(base32
- "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))))
+ "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))
+ (patches
+ (list (search-patch "procps-non-linux.patch")))))
(build-system gnu-build-system)
(arguments
'(#:modules ((guix build utils)
diff --git a/gnu/packages/patches/procps-non-linux.patch b/gnu/packages/patches/procps-non-linux.patch
new file mode 100644
index 0000000..dd21c82
--- /dev/null
+++ b/gnu/packages/patches/procps-non-linux.patch
@@ -0,0 +1,23 @@
+--- a/lib/test_process.c
++++ b/lib/test_process.c
+@@ -21,7 +21,9 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
++#ifdef __linux__
+ #include <sys/prctl.h>
++#endif
+ #include "c.h"
+
+ #define DEFAULT_SLEEPTIME 300
+@@ -78,8 +80,10 @@
+ sigaction(SIGUSR1, &signal_action, NULL);
+ sigaction(SIGUSR2, &signal_action, NULL);
+
++#ifdef __linux__
+ /* set process name */
+ prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL);
++#endif
+
+ while (sleep_time > 0) {
+ sleep_time = sleep(sleep_time);
\ No newline at end of file
--
2.8.0
--
Avoid eavesdropping. Send strong encryted email.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: procps: Make procps build on non Linux systems.
2016-04-28 8:30 [PATCH] gnu: procps: Make procps build on non Linux systems Manolis Ragkousis
2016-04-28 9:55 ` John Darrington
@ 2016-04-28 12:19 ` Ludovic Courtès
2016-05-03 14:58 ` Manolis Ragkousis
1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2016-04-28 12:19 UTC (permalink / raw)
To: Manolis Ragkousis; +Cc: guix-devel
Manolis Ragkousis <manolis837@gmail.com> skribis:
> From 00c2d2ec11a75e3d74704150488e73ee7c8c6fe8 Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Wed, 27 Apr 2016 23:33:56 +0300
> Subject: [PATCH] gnu: procps: Make procps build on non Linux systems.
>
> * gnu/packages/patches/procps-non-linux.patch.patch: New patch.
> * gnu/packages/linux.scm (procps)[source]: Use it.
> * gnu/local.mk (dist_patch_DATA): Add it.
[...]
> --- /dev/null
> +++ b/gnu/packages/patches/procps-non-linux.patch
Please add a couple of lines saying what it does and what its upstream
status is.
OK for ‘core-updates’ with this change!
Then I second John’s comment: you should propose the change upstream.
They might do it differently (by checking for the header and function at
configure time, typically), but I guess there’s no reason why they would
refuse it.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: procps: Make procps build on non Linux systems.
2016-04-28 12:19 ` Ludovic Courtès
@ 2016-05-03 14:58 ` Manolis Ragkousis
2016-05-03 20:03 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Manolis Ragkousis @ 2016-05-03 14:58 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 125 bytes --]
It seems upstream commit aa9bd38d0a6fe53aff7f78fb2d9f61e55677c7b5 fixed
the issue. I updated the patch to use that.
Manolis
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-procps-Make-procps-build-on-non-Linux-systems.patch --]
[-- Type: text/x-patch; name="0001-gnu-procps-Make-procps-build-on-non-Linux-systems.patch", Size: 3272 bytes --]
From 49daecfda965fab7b528b4333ef864a4681ac470 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Wed, 27 Apr 2016 23:33:56 +0300
Subject: [PATCH] gnu: procps: Make procps build on non Linux systems.
* gnu/packages/patches/procps-non-linux.patch.patch: New patch.
* gnu/packages/linux.scm (procps)[source]: Use it.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/linux.scm | 4 +++-
gnu/packages/patches/procps-non-linux.patch | 37 +++++++++++++++++++++++++++++
3 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/procps-non-linux.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 08698cc..2238506 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -672,6 +672,7 @@ dist_patch_DATA = \
gnu/packages/patches/polkit-drop-test.patch \
gnu/packages/patches/portaudio-audacity-compat.patch \
gnu/packages/patches/procmail-ambiguous-getline-debian.patch \
+ gnu/packages/patches/procps-non-linux.patch \
gnu/packages/patches/pt-scotch-build-parallelism.patch \
gnu/packages/patches/pulseaudio-fix-mult-test.patch \
gnu/packages/patches/pulseaudio-longer-test-timeout.patch \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a26e641..f3c04cd 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -523,7 +523,9 @@ block devices, UUIDs, TTYs, and many other tools.")
"procps-ng-" version ".tar.xz"))
(sha256
(base32
- "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))))
+ "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))
+ (patches
+ (list (search-patch "procps-non-linux.patch")))))
(build-system gnu-build-system)
(arguments
'(#:modules ((guix build utils)
diff --git a/gnu/packages/patches/procps-non-linux.patch b/gnu/packages/patches/procps-non-linux.patch
new file mode 100644
index 0000000..7a64386
--- /dev/null
+++ b/gnu/packages/patches/procps-non-linux.patch
@@ -0,0 +1,37 @@
+From aa9bd38d0a6fe53aff7f78fb2d9f61e55677c7b5 Mon Sep 17 00:00:00 2001
+From: Craig Small <csmall@enc.com.au>
+Date: Sun, 17 Apr 2016 09:09:41 +1000
+Subject: [PATCH] tests: Conditionally add prctl to test process
+
+prctl was already bypassed on Cygwin systems. This extends to
+non-Linux systems such as kFreeBSD and Hurd.
+
+---
+ lib/test_process.c | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/test_process.c b/lib/test_process.c
+index 6e652ed..6a4776c 100644
+--- a/lib/test_process.c
++++ b/lib/test_process.c
+@@ -21,7 +21,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
+-#ifndef __CYGWIN__
++#ifdef __linux__
+ #include <sys/prctl.h>
+ #endif
+ #include "c.h"
+@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
+ sigaction(SIGUSR1, &signal_action, NULL);
+ sigaction(SIGUSR2, &signal_action, NULL);
+
+-#ifndef __CYGWIN__
++#ifdef __linux__
+ /* set process name */
+ prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL);
+ #endif
+--
+2.8.2
+
--
2.8.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: procps: Make procps build on non Linux systems.
2016-05-03 14:58 ` Manolis Ragkousis
@ 2016-05-03 20:03 ` Ludovic Courtès
0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2016-05-03 20:03 UTC (permalink / raw)
To: Manolis Ragkousis; +Cc: guix-devel
Manolis Ragkousis <manolis837@gmail.com> skribis:
> It seems upstream commit aa9bd38d0a6fe53aff7f78fb2d9f61e55677c7b5 fixed
> the issue. I updated the patch to use that.
>
> Manolis
>
> From 49daecfda965fab7b528b4333ef864a4681ac470 Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Wed, 27 Apr 2016 23:33:56 +0300
> Subject: [PATCH] gnu: procps: Make procps build on non Linux systems.
>
> * gnu/packages/patches/procps-non-linux.patch.patch: New patch.
> * gnu/packages/linux.scm (procps)[source]: Use it.
> * gnu/local.mk (dist_patch_DATA): Add it.
Awesome, please push to ‘core-updates’!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-03 20:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28 8:30 [PATCH] gnu: procps: Make procps build on non Linux systems Manolis Ragkousis
2016-04-28 9:55 ` John Darrington
2016-04-28 12:19 ` Ludovic Courtès
2016-05-03 14:58 ` Manolis Ragkousis
2016-05-03 20:03 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).