GNU bug report logs - #39283
[PATCH] gnu: Add earlyoom.

Previous Next

Package: guix-patches;

Reported by: Pkill -9 <pkill9 <at> runbox.com>

Date: Sat, 25 Jan 2020 21:25:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39283 in the body.
You can then email your comments to 39283 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#39283; Package guix. (Sat, 25 Jan 2020 21:25:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pkill -9 <pkill9 <at> runbox.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 25 Jan 2020 21:25:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pkill -9 <pkill9 <at> runbox.com>
To: bug-guix <at> gnu.org
Cc: Pkill -9 <pkill9 <at> runbox.com>
Subject: [PATCH] gnu: Add earlyoom.
Date: Sat, 25 Jan 2020 21:23:20 +0000
* gnu/packages/linux.scm (earlyoom): New variable.
---
 gnu/packages/linux.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index e5cc773ecc..892906cc70 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -6215,3 +6215,40 @@ the Linux kernel, C standard library, and libdl (for dynamic linking).  While
 ELL is designed to be efficient and compact enough for use on embedded Linux
 platforms, it is not limited to resource-constrained systems.")
     (license license:lgpl2.1+)))
+
+(define-public earlyoom
+  (package
+   (name "earlyoom")
+   (version "1.3")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/rfjakob/earlyoom.git")
+                  (commit (string-append "v" version))))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "0fwbx0y80nqgkxrc9kf9j3iwa0wbps2jmqir3pgqbc2cj0wjh0lr"))))
+   (build-system gnu-build-system)
+   (arguments
+    `(#:make-flags `("CC=gcc"
+                     ,(string-append "DESTDIR="
+                                     (assoc-ref %outputs "out"))
+                     "PREFIX=")
+      #:tests? #f ;; no tests
+      #:phases (modify-phases
+                %standard-phases
+                (delete 'configure)
+                (add-after 'install 'remove-systemd-service
+                           (lambda* (#:key outputs #:allow-other-keys)
+                             (let ((out (assoc-ref outputs "out")))
+                               (delete-file-recursively
+                                (string-append out "/etc/systemd")))
+                             #t)))))
+   (home-page "https://github.com/rfjakob/earlyoom")
+   (synopsis "Automatically kill processes in low-memory situations")
+   (description "Earlyoom checks the amount of available memory and free swap
+up to 10 times a second (less often if there is a lot of free memory).  By
+default if both are below 10%, it will kill the largest process (highest
+oom_score).  The percentage value is configurable via command line arguments.")
+   (license license:expat)))
-- 
2.25.0





bug reassigned from package 'guix' to 'guix-patches'. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 27 Jan 2020 21:26:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#39283; Package guix-patches. (Fri, 31 Jan 2020 07:44:02 GMT) Full text and rfc822 format available.

Message #10 received at 39283 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Pkill -9 <pkill9 <at> runbox.com>
Cc: 39283 <at> debbugs.gnu.org
Subject: Re: bug#39283: [PATCH] gnu: Add earlyoom.
Date: Fri, 31 Jan 2020 02:43:44 -0500
[Message part 1 (text/plain, inline)]
Hello Pkill -9,

Pkill -9 <pkill9 <at> runbox.com> writes:

> * gnu/packages/linux.scm (earlyoom): New variable.
> ---
>  gnu/packages/linux.scm | 37 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index e5cc773ecc..892906cc70 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -6215,3 +6215,40 @@ the Linux kernel, C standard library, and libdl (for dynamic linking).  While
>  ELL is designed to be efficient and compact enough for use on embedded Linux
>  platforms, it is not limited to resource-constrained systems.")
>      (license license:lgpl2.1+)))
> +
> +(define-public earlyoom
> +  (package
> +   (name "earlyoom")
> +   (version "1.3")
> +   (source (origin
> +            (method git-fetch)
> +            (uri (git-reference
> +                  (url "https://github.com/rfjakob/earlyoom.git")
> +                  (commit (string-append "v" version))))
> +            (file-name (git-file-name name version))
> +            (sha256
> +             (base32
> +              "0fwbx0y80nqgkxrc9kf9j3iwa0wbps2jmqir3pgqbc2cj0wjh0lr"))))
> +   (build-system gnu-build-system)
> +   (arguments
> +    `(#:make-flags `("CC=gcc"
> +                     ,(string-append "DESTDIR="
> +                                     (assoc-ref %outputs "out"))
> +                     "PREFIX=")
> +      #:tests? #f ;; no tests
> +      #:phases (modify-phases
> +                %standard-phases
> +                (delete 'configure)
> +                (add-after 'install 'remove-systemd-service
> +                           (lambda* (#:key outputs #:allow-other-keys)
> +                             (let ((out (assoc-ref outputs "out")))
> +                               (delete-file-recursively
> +                                (string-append out "/etc/systemd")))
> +                             #t)))))
> +   (home-page "https://github.com/rfjakob/earlyoom")
> +   (synopsis "Automatically kill processes in low-memory situations")
> +   (description "Earlyoom checks the amount of available memory and free swap
> +up to 10 times a second (less often if there is a lot of free memory).  By
> +default if both are below 10%, it will kill the largest process (highest
> +oom_score).  The percentage value is configurable via command line arguments.")
> +   (license license:expat)))


I happened to have prepared earlyoom recently, but delayed its inclusion
due to finishing a service for it (only the doc remains).

I'm attaching it.  My version seems slightly more complete (I generate
the doc and run the tests).  If you don't have an objection I could push
it to master.

[0001-gnu-Add-earlyoom.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Then there is a Shepherd service for convenience.  I haven't tried all
the switches, but I presume it'd work, given that they seem to be
translated correctly into earyloom's command line options (there's a
unit test for it).

[0002-gnu-Add-earlyoom-service-type.patch (text/x-patch, attachment)]
[Message part 5 (text/plain, inline)]
And then enjoy your hang free system :-)

Thank you,

Maxim

Information forwarded to guix-patches <at> gnu.org:
bug#39283; Package guix-patches. (Fri, 31 Jan 2020 12:32:01 GMT) Full text and rfc822 format available.

Message #13 received at 39283 <at> debbugs.gnu.org (full text, mbox):

From: pkill9 <pkill9 <at> runbox.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 39283 <at> debbugs.gnu.org
Subject: Re: bug#39283: [PATCH] gnu: Add earlyoom.
Date: Fri, 31 Jan 2020 12:31:39 +0000
Hi Maxim,

> I happened to have prepared earlyoom recently, but delayed its
> inclusion due to finishing a service for it (only the doc remains).
> 
> I'm attaching it.  My version seems slightly more complete (I generate
> the doc and run the tests).  If you don't have an objection I could
> push it to master.

I have no objection, go for it :)




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Sat, 01 Feb 2020 04:40:01 GMT) Full text and rfc822 format available.

Notification sent to Pkill -9 <pkill9 <at> runbox.com>:
bug acknowledged by developer. (Sat, 01 Feb 2020 04:40:01 GMT) Full text and rfc822 format available.

Message #18 received at 39283-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: pkill9 <pkill9 <at> runbox.com>
Cc: 39283-done <at> debbugs.gnu.org
Subject: Re: [bug#39283] [PATCH] gnu: Add earlyoom.
Date: Fri, 31 Jan 2020 23:39:09 -0500
pkill9 <pkill9 <at> runbox.com> writes:

> Hi Maxim,
>
>> I happened to have prepared earlyoom recently, but delayed its
>> inclusion due to finishing a service for it (only the doc remains).
>> 
>> I'm attaching it.  My version seems slightly more complete (I generate
>> the doc and run the tests).  If you don't have an objection I could
>> push it to master.
>
> I have no objection, go for it :)

Merged (with the service) with commit d3e439e355.  Thank you!

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 29 Feb 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.