Subject: [bug#72766] [PATCH v4] gnu: slurm: Enable REST API.

From: Ludovic Courtès <[email-masked]>
Date: Tue, 12 Nov 2024 11:35:51 +0100

Hello,

Arun Isaac <[email-masked]> skribis:

> Rename slurm and slurm-* to slurm-minimal and slurm-minimal-*. Add new slurm
> packages that inherit from slurm-minimal and have the REST API enabled.
>
> * gnu/packages/parallel.scm (make-slurm): New function.
> (slurm-minimal, slurm-minimal-23.02, slurm-minimal-22.05, slurm-minimal-21.08,
> slurm-minimal-20.11, slurm-minimal-20.02, slurm-minimal-19.05,
> slurm-minimal-18.08): New variables.
> (slurm, slurm-23.02, slurm-22.05, slurm-21.08, slurm-20.11, slurm-20.02,
> slurm-19.05, slurm-18.08): Inherit from slurm-minimal, slurm-minimal-23.02,
> slurm-minimal-22.05, slurm-minimal-21.08, slurm-minimal-20.11,
> slurm-minimal-20.02, slurm-minimal-19.05 and slurm-minimal-18.08 respectively.
>
> Change-Id: I6410ac385d8876f4b6a908ddb1272172475a87bb

[...]

> +(define (make-slurm base-slurm)
> +  "Make a slurm package with all optional features enabled. Base it off of the
> +minimal slurm package BASE-SLURM."
> +  (package
> +    (inherit base-slurm)
> +    (name "slurm")
> +    (arguments
> +     (substitute-keyword-arguments (package-arguments base-slurm)
> +       ((#:configure-flags flags #~'())
> +        #~(cons* "--enable-slurmrestd"
> +                 (string-append "--with-bpf="
> +                                (dirname
> +                                 (dirname (search-input-directory
> +                                           %build-inputs "include/linux"))))
> +                 (string-append "--with-http-parser="
> +                                #$(this-package-input "http-parser"))
> +                 (string-append "--with-rdkafka="
> +                                #$(this-package-input "librdkafka"))
> +                 (string-append "--with-yaml="
> +                                #$(this-package-input "libyaml"))
> +                 #$flags))))
> +    ;; FIXME: More optional inputs could be added.
> +    (inputs
> +     (modify-inputs (package-inputs base-slurm)
> +       (prepend dbus freeipmi http-parser
> +                libjwt librdkafka libyaml (list mariadb "dev"))))))

Could you add a comment and/or synopsis stating that these dependencies
enable support for the REST API?

Otherwise LGTM.  Feel free to commit with this change.

Thanks!

Ludo’.