From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH] gnu: Add slurm. Date: Sat, 13 Feb 2016 15:38:46 -0500 Message-ID: <20160213203846.GA9644@jasmine> References: <20160212122042.GA14275@thebird.nl> <20160212123010.GA6019@debian.eduroam.u-bordeaux.fr> <20160212123141.GB14324@thebird.nl> <20160212125719.GA14615@thebird.nl> <20160213085940.GA18223@thebird.nl> <20160213102825.GA19194@debian> <20160213164257.GA19241@thebird.nl> <20160213170119.GA19344@thebird.nl> <20160213172001.GA3956@debian> <20160213201337.GA9218@jasmine> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YiEDa0DAkWCtVeE4" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUgxr-000166-0d for guix-devel@gnu.org; Sat, 13 Feb 2016 15:38:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUgxl-0003Xe-Q1 for guix-devel@gnu.org; Sat, 13 Feb 2016 15:38:46 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUgxl-0003Xa-JH for guix-devel@gnu.org; Sat, 13 Feb 2016 15:38:41 -0500 Content-Disposition: inline In-Reply-To: <20160213201337.GA9218@jasmine> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andreas Enge Cc: guix-devel@gnu.org --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Feb 13, 2016 at 03:13:37PM -0500, Leo Famulari wrote: > On Sat, Feb 13, 2016 at 06:20:01PM +0100, Andreas Enge wrote: > > On Sat, Feb 13, 2016 at 06:01:19PM +0100, Pjotr Prins wrote: > > > cat 0001-gnu-Add-slurm.patch |patch -p1 # same patch, different name > > > patching file gnu/packages/parallel.scm > > > patching file gnu/packages/patches/slurm-wlm-configure-remove-nonfree-contribs.patch > > > Works fine. Maybe because I used an attachment previously? > > > > No, that should not be a problem (after I removed the first line ">From..." > > of the attachment). I still get: > > > > patching file gnu/packages/parallel.scm > > Hunk #1 FAILED at 2. > > 1 out of 3 hunks FAILED -- saving rejects to file gnu/packages/parallel.scm.rej > > patching file gnu/packages/patches/slurm-wlm-configure-remove-nonfree-contribs.patch > > > > The thing that does not work is adding your copyright line. Very strange; > > we seem to have the same white-space in the file. > > I had the same issue with some of Jan's patches yesterday. > > I used diffoscope to compare the non-working patch and a "should-be" > identical patch that I generated locally. The only differences were in > the patch headers and the encoding of the file (UTF-8 vs ISO-8859-1). > > I couldn't figure out why these differences would matter and moved on, > but it's disturbing that others are hitting the same issue! I investigated some more. I used the patch that is upthread of what I am replying to. I applied the patch with `patch -p1 < ...`. I could have used `git am` but I'm not doing it again ;) Everything applied except for Pjotr's attribution in parallel.scm, so I manually copied that into the file. Then, I added all the changes to the index, committed, and used `git format-patch` to create a patch on master. I'll show you: $ git add -u $ git add gnu/packages/patches/slurm-wlm-configure-remove-nonfree-contribs.patch $ git commit -m "patch-test" $ git format-patch -n --thread=shallow master $ git reset --hard HEAD^ # roll back one commit $ git am 0001-patch-test.patch $ echo $? 0 $ diffoscope --html report.html 0001-patch-test.patch 0001-gnu-Add-slurm.patch I've attached report.html and 0001-patch-test.patch for your inspection. I wonder if the version of git is a factor? 2.1.4 vs 2.6.3. Jan was also using 2.1.4, and his patches also failed *only* on the attribution line. --YiEDa0DAkWCtVeE4 Content-Type: text/html; charset=us-ascii Content-Disposition: attachment; filename="report.html" Content-Transfer-Encoding: quoted-printable /gnu/store/l0a7x49wsxhvgnc33zazfiml7dfi150s-diffoscope-34/bin/.dif= foscope-real --html report.html 0001-patch-test.patch 0001-gnu-Add-slurm.pa= tch =20
0001-patch-test.patch vs.
0001-gnu-Add-slurm.patch
Offset 1, 13 lines modified Offset 1, 15 lines modified
1 =46rom·788a22631663d1e4060eb​e87b4272c590f138a25·​Mon·​Sep&m= iddot;​17·​00:&#= 8203;00:​00·​2001 1 =46rom·ef998204cde384d35b605​509be09b25170c28fb8·​Mon·​Sep&m= iddot;​17·​00:&#= 8203;00:​00·​2001
2 Me<= span class=3D"diffchanged2">ssage-​Id:​·<788a22631663d1e4060e​be87b4272c590f138a25.​1455395436.​git.​leo@famulari.​n<= span class=3D"diffchanged2">ame> 2 Fr<= span class=3D"diffchanged2">om:&= #8203;·Pjotr&middo= t;Prins·<pjotr.​public01@= thebird.​nl>
3 Fr<= span class=3D"diffchanged2">om:&= #8203;·Leo&midd= ot;Famulari·<leo@famulari.​name> 3 Da<= span class=3D"diffchanged2">te:&= #8203;·Sat,​·13·Fe= b·​201= 6·​09:​45:​30·+0100
4 Da<= span class=3D"diffchanged2">te:​·Sat,​= ·13·​= ;Fe= b·= 201= 6·15:​30:​30·-​0500 4 Su<= span class=3D"diffchanged2">bject:​·= ;[PATCH]·gnu:​·Add·​<= /span>slurm.R= 03;
5 Subject:​·​[PATCH·​1/​1]·​patch·= 203;test 5
6 6
  7 *·​gnu/​packages/​= ;parallel.​scm·​(slurm)= ​:​·​New·​variable.​
  8 *·​gnu/​packages/​= ;patches/​slurm-​wlm-​configure-​remove-​nonf= ree-​contribs.​patch:​·<= /span>​New·​file.​
  9 *·​gnu/​packages/​= ;parallel.​scm·​(parall= el)​:​·​Introduce= ·​license·​name·&#= 8203;space.​
7 -​-​-​ 10 -​-​-​
8 ·​gnu/​packages/​= parallel.​scm···<= /span>​···= ​···​= ;·= ···&middo= t;···​···= 203;····&mi= ddot;·​|·​67&middo= t;​++++++++++++++++++++-​-​ 11 ·​gnu/​packages/​= parallel.​scm···<= /span>​···= ​···​= ;·= ···&middo= t;···​···= 203;····&mi= ddot;·​|·​67&middo= t;​++++++++++++++++++++-​-​
9 ·​.​.​.​urm= -​wlm-​configure-​remove-​nonfree-​contribs.&= #8203;patch·​|·​43·​++++++++++++++ 12 ·​.​.​.​urm= -​wlm-​configure-​remove-​nonfree-​contribs.&= #8203;patch·​|·​43·​++++++++++++++
10 ·​2= ·​files·​= changed,​·​105·​insertions(+)​,​·​5·= ​deletions(-​)​ 13 ·​2= ·​files·​= changed,​·​105·​insertions(+)​,​·​5·= ​deletions(-​)​
11 ·​create·​mode·= 203;100644·​gnu/​packag= es/​patches/​slurm-​wlm-​configure-​remove-&#= 8203;nonfree-​contribs.​patch 14 ·​create·​mode·= 203;100644·​gnu/​packag= es/​patches/​slurm-​wlm-​configure-​remove-&#= 8203;nonfree-​contribs.​patch
12 15
13 diff·​-​-​git·​a/​gnu/​packages/&#= 8203;parallel.​scm·​b/&= #8203;gnu/​packages/​parallel.​scm 16 diff·​-​-​git·​a/​gnu/​packages/&#= 8203;parallel.​scm·​b/&= #8203;gnu/​packages/​parallel.​scm
Offset 147, 9 lines modified Offset 149, 9 lines modified
147 +·= »       ​»       R= 03;·​doc/​Makefile 149 +·= »       ​»       R= 03;·​doc/​Makefile
148 +·= »       ​»       R= 03;·​doc/​man/​Ma= kefile 150 +·= »       ​»       R= 03;·​doc/​man/​Ma= kefile
149 +·= »       ​»       R= 03;·​doc/​man/​ma= n1/​Makefile 151 +·= »       ​»       R= 03;·​doc/​man/​ma= n1/​Makefile
150 +-​-​· 152 +-​-​·
151 +2.​1.​4 153 +2.​1.​4
152 + 154 +
153 -​-​· 155 -​-​·
154 2.​6.​3 156 2.​1.​4
155 157
encoding
Offset 1, 1 lines modified Offset 1, 1 lines modified
1 ut<= span class=3D"diffchanged2">f-​8 1 is<= span class=3D"diffchanged2">o-​8<= /span>859<= /span>-​1
Generated by diffoscope 34
--YiEDa0DAkWCtVeE4 Content-Type: text/x-diff; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-patch-test.patch" Content-Transfer-Encoding: 8bit >From 788a22631663d1e4060ebe87b4272c590f138a25 Mon Sep 17 00:00:00 2001 Message-Id: <788a22631663d1e4060ebe87b4272c590f138a25.1455395436.git.leo@famulari.name> From: Leo Famulari Date: Sat, 13 Feb 2016 15:30:30 -0500 Subject: [PATCH 1/1] patch test --- gnu/packages/parallel.scm | 67 ++++++++++++++++++++-- ...urm-wlm-configure-remove-nonfree-contribs.patch | 43 ++++++++++++++ 2 files changed, 105 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/slurm-wlm-configure-remove-nonfree-contribs.patch diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index 8f63bda..a52e554 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013,2014 Eric Bavier ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2016 Pjotr Prins ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,12 +20,18 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages parallel) - #:use-module (guix packages) - #:use-module (guix licenses) - #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) #:use-module (gnu packages) - #:use-module (gnu packages perl)) + #:use-module (gnu packages admin) + #:use-module (gnu packages autotools) + #:use-module (gnu packages linux) + #:use-module (gnu packages perl) + #:use-module (gnu packages python) + #:use-module (gnu packages tcl) + #:use-module (gnu packages tls)) (define-public parallel (package @@ -46,4 +53,54 @@ "GNU Parallel is a tool for executing shell jobs in parallel using one or more computers. Jobs can consist of single commands or of scripts and they are executed on lists of files, hosts, users or other items.") - (license gpl3+))) + (license license:gpl3+))) + +(define-public slurm + (package + (name "slurm") + (version "15.08.7.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/SchedMD/slurm/archive/slurm-" + (string-join (string-split version #\.) "-") ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1rmi35l4img00dr4vic8cv8s7b6n1yx1mkq2s7kjf5hvqdh6s2ki")) + (patches (list (search-patch "slurm-wlm-configure-remove-nonfree-contribs.patch"))) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "contribs") + #t)))) + (inputs `(("openssl" ,openssl) + ("munge" ,munge) + ("perl" ,perl) + ("expect" ,expect) + ("python" ,python) + ("linux-pam" , linux-pam))) + (native-inputs + `(("autoconf" ,autoconf))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags '("--enable-pam") + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'autogen + (lambda _ (zero? (system* "autoconf")))) ; configure.ac was patched + (add-before + 'autogen 'rewrite-usr-bin + (lambda* (#:key inputs #:allow-other-keys) + ;; replace python call with python3 + (substitute* "./doc/html/shtml2html.py" + (("#!/usr/bin/env python") + (string-append "#!" (which "python3")))) + (substitute* "src/common/env.c" + (("/usr/bin/env") (which "env")))))))) + (home-page "http://slurm.schedmd.com/") + (synopsis "Workload manager for cluster computing") + (description + "Fault-tolerant and highly scalable cluster management and job +scheduling system for large and small clusters.") + (license license:gpl2+))) diff --git a/gnu/packages/patches/slurm-wlm-configure-remove-nonfree-contribs.patch b/gnu/packages/patches/slurm-wlm-configure-remove-nonfree-contribs.patch new file mode 100644 index 0000000..b63d5bb --- /dev/null +++ b/gnu/packages/patches/slurm-wlm-configure-remove-nonfree-contribs.patch @@ -0,0 +1,43 @@ +From 53eda9102b969a4be2882cea4befee03591a7436 Mon Sep 17 00:00:00 2001 +From: Pjotr Prins +Date: Fri, 12 Feb 2016 12:43:33 +0100 +Subject: [PATCH] Remove contribs + +--- + configure.ac | 20 -------------------- + 1 file changed, 20 deletions(-) + +diff --git a/configure.ac b/configure.ac +index fedf354..e010732 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -438,26 +438,6 @@ dnl All slurm Makefiles: + AC_CONFIG_FILES([Makefile + config.xml + auxdir/Makefile +- contribs/Makefile +- contribs/cray/Makefile +- contribs/cray/csm/Makefile +- contribs/lua/Makefile +- contribs/mic/Makefile +- contribs/pam/Makefile +- contribs/pam_slurm_adopt/Makefile +- contribs/perlapi/Makefile +- contribs/perlapi/libslurm/Makefile +- contribs/perlapi/libslurm/perl/Makefile.PL +- contribs/perlapi/libslurmdb/Makefile +- contribs/perlapi/libslurmdb/perl/Makefile.PL +- contribs/torque/Makefile +- contribs/phpext/Makefile +- contribs/phpext/slurm_php/config.m4 +- contribs/sgather/Makefile +- contribs/sgi/Makefile +- contribs/sjobexit/Makefile +- contribs/slurmdb-direct/Makefile +- contribs/pmi2/Makefile + doc/Makefile + doc/man/Makefile + doc/man/man1/Makefile +-- +2.1.4 + -- 2.6.3 --YiEDa0DAkWCtVeE4--