From: 路辉 <luhux76@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: 53319@debbugs.gnu.org, Maxime Devos <maximedevos@telenet.be>
Subject: [bug#53319] [PATCH] gnu: Add n2n.
Date: Sun, 20 Mar 2022 12:20:58 +0000 [thread overview]
Message-ID: <CAGNyvej_2Sus+6Sbhb_DtLB81MZms_6TNEdpXEpQH3zXU+cdgQ@mail.gmail.com> (raw)
In-Reply-To: <87ilt63fep.fsf@nicolasgoaziou.fr>
[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]
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
[-- Attachment #2: 0004-gnu-n2n-Update-to-3.0.patch --]
[-- Type: text/x-patch, Size: 1069 bytes --]
From de6bd8d8dd3d4b14999361f66d15f0827ada0b1b Mon Sep 17 00:00:00 2001
From: Lu Hui <luhux76@gmail.com>
Date: Sun, 20 Mar 2022 20:13:13 +0800
Subject: [PATCH 4/4] gnu: n2n: Update to 3.0
* gnu/packages/vpn.scm (n2n): [version]: Update to 3.0.
---
gnu/packages/vpn.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index f066bfa689..6c63c3d671 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -299,7 +299,7 @@ (define-public gvpe
(define-public n2n
(package
(name "n2n")
- (version "2.8")
+ (version "3.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -308,7 +308,7 @@ (define-public n2n
(file-name (git-file-name name version))
(sha256
(base32
- "1ph2npvnqh1xnmkp96pdzpxm033jkb8zznd3nc59l9arhn0pq4nv"))))
+ "0kgqmqcn6s2y2rxa0i6myq3sgk2aliv1gkfhzvn32zgym9rrqy9r"))))
(build-system gnu-build-system)
(arguments
(list
--
2.34.0
[-- Attachment #3: 0002-gnu-n2n-remove-hardcodepath.patch --]
[-- Type: text/x-patch, Size: 1114 bytes --]
From f9f12ca9c8a890322385d0ad695f370e21f4465b Mon Sep 17 00:00:00 2001
From: Lu Hui <luhux76@gmail.com>
Date: Sun, 20 Mar 2022 19:45:33 +0800
Subject: [PATCH 2/4] gnu: n2n: remove hardcodepath
* gnu/packages/vpn.scm (n2n): [phases]: New phase
---
gnu/packages/vpn.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 4b0e7d751a..db9e8cb059 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -327,6 +327,13 @@ (define-public n2n
(substitute* "configure.seed"
(("DATE=`date +\"%Y-%m-%d\"`")
"DATE=`TZ=utc date -d @0 +\"%Y-%m-%d\"`"))))
+ (add-before 'bootstrap 'remove-hardcodepath
+ (lambda _
+ (substitute* "configure.seed"
+ (("-I/usr/local/opt/openssl@1.1/include")
+ "")
+ (("-I/usr/local/opt/openssl@1.1/lib")
+ ""))))
(add-before 'configure 'fix-configure
(lambda* (#:key inputs native-inputs #:allow-other-keys)
(substitute* "configure"
--
2.34.0
[-- Attachment #4: 0003-gnu-n2n-add-compression-AES-crypto-method-support.patch --]
[-- Type: text/x-patch, Size: 923 bytes --]
From 85c40a89ea1458f5abc9ac8c22f4a6968b48decf Mon Sep 17 00:00:00 2001
From: Lu Hui <luhux76@gmail.com>
Date: Sun, 20 Mar 2022 20:07:23 +0800
Subject: [PATCH 3/4] gnu: n2n: add compression,AES crypto method support.
* gnu/packages/vpn.scm (n2n): [inputs]: Add zstd-lib libpcap openssl libcap.
---
gnu/packages/vpn.scm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index db9e8cb059..f066bfa689 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -340,6 +340,8 @@ (define-public n2n
(("/bin/sh")
(search-input-file (or native-inputs inputs) "/bin/sh"))))))
#:tests? #f)) ;there is no check target
+ (inputs
+ (list `(,zstd "lib") libpcap openssl libcap))
(native-inputs
(list autoconf automake bash-minimal pkg-config))
(home-page "https://github.com/ntop/n2n")
--
2.34.0
[-- Attachment #5: 0001-gnu-n2n-more-reproducible.patch --]
[-- Type: text/x-patch, Size: 1012 bytes --]
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
next prev parent reply other threads:[~2022-03-20 12:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 14:47 [bug#53319] [PATCH] gnu: Add n2n 路辉
2022-01-28 10:10 ` Nicolas Goaziou
2022-02-22 11:36 ` Maxime Devos
2022-02-22 18:49 ` Nicolas Goaziou
2022-03-20 12:20 ` 路辉 [this message]
2022-02-22 11:20 ` bug#53319: " Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGNyvej_2Sus+6Sbhb_DtLB81MZms_6TNEdpXEpQH3zXU+cdgQ@mail.gmail.com \
--to=luhux76@gmail.com \
--cc=53319@debbugs.gnu.org \
--cc=mail@nicolasgoaziou.fr \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).