diff mbox series

[bug#53319] gnu: Add n2n.

Message ID CAGNyvej_2Sus+6Sbhb_DtLB81MZms_6TNEdpXEpQH3zXU+cdgQ@mail.gmail.com
State Accepted
Headers show
Series [bug#53319] gnu: Add n2n. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

路辉 March 20, 2022, 12:20 p.m. UTC
Nicolas Goaziou <mail@nicolasgoaziou.fr> 于2022年2月22日周二 18:49写道:
>
> Hello,
>
> Maxime Devos <maximedevos@telenet.be> writes:
>
> > 'configure' is run during build, so for cross-compilation, a sh from
> > 'native-inputs' shoud be used instead of 'inputs':
> >
> >   (("/bin/sh") (search-input-file (or native-inputs inputs) "/bin/sh"))
>
> True, I keep forgetting about this. It would be more natural to use
> (search-input-file native-inputs "/bin/sh"), but, IIRC, native-inputs
> may be empty if we are not cross-compiling.
>
> I will fix it.
>
> > or simpler:
> >
> >   (("/bin/sh") (which "sh"))
>
> IIUC, search-input-file is a replacement for `which', so that seems to
> be going backwards.
>
> Of course, if `which' is the preferred solution for package style, I'd
> love to hear a confirmation about it.
>
> > Also, this package definition packages version 2.8. Why not package
> > the latest version instead?
>
> The OP waited one month without any feedback. I consider this is more
> respectful to apply the patch in its current version rather than
> requesting more changes now. YMMV.
>
> Of course, the update can happen in a later, very welcome, patch.
>
> > Also, looking at
> > <https://github.com/ntop/n2n/blob/472a9878f72299466ddbce2a232ea9e081159fa9/configure.seed#L94>,
> > it seems that n2n might not be bit-for-bit reproducible.
>
> I agree this package has room for improvement. Hopefully, 路辉 can have
> a look at it.
>
> Regards,
> --
> Nicolas Goaziou
diff mbox series

Patch

From a6c98dfaedebba172d451d62ba2d4c9b18aea3b8 Mon Sep 17 00:00:00 2001
From: Lu Hui <luhux76@gmail.com>
Date: Sun, 20 Mar 2022 19:16:52 +0800
Subject: [PATCH 1/4] gnu: n2n: more reproducible.

* gnu/packages/vpn.scm (n2n): [phases]: New Variable.
---
 gnu/packages/vpn.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 5bf5a62481..4b0e7d751a 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -322,6 +322,11 @@  (define-public n2n
             (lambda _
               (substitute* "autogen.sh"
                 (("./configure") ""))))
+          (add-before 'bootstrap 'more-reproducible
+            (lambda _
+              (substitute* "configure.seed"
+                (("DATE=`date +\"%Y-%m-%d\"`")
+                 "DATE=`TZ=utc date -d @0 +\"%Y-%m-%d\"`"))))
           (add-before 'configure 'fix-configure
             (lambda* (#:key inputs native-inputs #:allow-other-keys)
               (substitute* "configure"
-- 
2.34.0