GNU bug report logs - #49576
[PATCH] Add sterm

Previous Next

Package: guix-patches;

Reported by: phodina <phodina <at> protonmail.com>

Date: Thu, 15 Jul 2021 16:18:02 UTC

Severity: normal

Tags: patch

Done: 宋文武 <iyzsong <at> outlook.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 49576 in the body.
You can then email your comments to 49576 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 guix-patches <at> gnu.org:
bug#49576; Package guix-patches. (Thu, 15 Jul 2021 16:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to phodina <phodina <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 15 Jul 2021 16:18:02 GMT) Full text and rfc822 format available.

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

From: phodina <phodina <at> protonmail.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: [PATCH] Add sterm
Date: Thu, 15 Jul 2021 16:17:13 +0000
---
index 4429a2b75a..a6f866cbea 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -24,6 +24,7 @@
 ;;; Copyright © 2021 qblade <qblade <at> protonmail.com>
 ;;; Copyright © 2021 Gerd Heber <gerd.heber <at> gmail.com>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
+;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1297,6 +1298,35 @@ replacement for the OpenDWG libraries.")
     (description "@code{minicom} is a serial terminal emulator.")
     (license license:gpl2+)))

+(define-public sterm
+(package
+  (name "sterm")
+  (version "20200306")
+  (source (origin
+            (method git-fetch)
+            (uri
+	      (git-reference
+		(url "https://github.com/wentasah/sterm")
+		(commit version)))
+            (sha256
+             (base32
+              "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
+  (build-system gnu-build-system)
+  (arguments
+    '(#:tests? #f
+      #:make-flags (list "PREFIX=$out" "CC=gcc")
+      #:phases (modify-phases %standard-phases
+		(delete 'configure)
+		(replace 'install
+		  (lambda* (#:key outputs #:allow-other-keys)
+			  (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+			    (install-file "sterm" bin)
+			    #t))))))
+  (synopsis "Simple serial terminal")
+  (description "This is a minimalist terminal program like minicom or cu. The only thing it does is creating a bidirectional connection between stdin/stdout and a terminal device (e.g. serial line). It can also set serial line baudrate, manipulate DTR/RTS modem lines, send break and throttle transmission speed.")
+  (home-page "https://github.com/wentasah/sterm")
+  (license #f)))
+
 (define-public harminv
   (package
     (name "harminv")
--
2.31.1




Information forwarded to guix-patches <at> gnu.org:
bug#49576; Package guix-patches. (Fri, 16 Jul 2021 13:04:01 GMT) Full text and rfc822 format available.

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

From: 宋文武 <iyzsong <at> outlook.com>
To: phodina <phodina <at> protonmail.com>
Cc: 49576 <at> debbugs.gnu.org
Subject: Re: bug#49576: [PATCH] Add sterm
Date: Fri, 16 Jul 2021 21:03:15 +0800
Hello!

phodina <phodina <at> protonmail.com> writes:
> ---
> index 4429a2b75a..a6f866cbea 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -24,6 +24,7 @@
>  ;;; Copyright © 2021 qblade <qblade <at> protonmail.com>
>  ;;; Copyright © 2021 Gerd Heber <gerd.heber <at> gmail.com>
>  ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
> +;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1297,6 +1298,35 @@ replacement for the OpenDWG libraries.")
>      (description "@code{minicom} is a serial terminal emulator.")
>      (license license:gpl2+)))
>
> +(define-public sterm
> +(package
> +  (name "sterm")
> +  (version "20200306")
> +  (source (origin
> +            (method git-fetch)
> +            (uri
> +	      (git-reference
> +		(url "https://github.com/wentasah/sterm")
> +		(commit version)))
The indention seems wrong here, we usually use:
--8<---------------cut here---------------start------------->8---
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "...")
                    (commit ...)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "..."))))
--8<---------------cut here---------------end--------------->8---
Also a 'file-name' field is needed to get a better store directory name
for the checkout.

> +            (sha256
> +             (base32
> +              "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
> +  (build-system gnu-build-system)
> +  (arguments
> +    '(#:tests? #f

When disable tests, we should add a comment, a simple "no tests" will
do.

> +      #:make-flags (list "PREFIX=$out" "CC=gcc")

I think "PREFIX=$out" is no effect here, also instead of 'gcc' you can
use 'cc-for-target' for cross-compile support, examples can be found in
suckless.scm:
--8<---------------cut here---------------start------------->8---
       #:make-flags
       (list (string-append "CC=" ,(cc-for-target))
             (string-append "PREFIX=" %output))
--8<---------------cut here---------------end--------------->8---

> +      #:phases (modify-phases %standard-phases
> +		(delete 'configure)
> +		(replace 'install
> +		  (lambda* (#:key outputs #:allow-other-keys)
> +			  (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
> +			    (install-file "sterm" bin)
> +			    #t))))))

Doesn't the builtin Makefile works?  It also install a man page and
shell completion files.

> +  (synopsis "Simple serial terminal")
> +  (description "This is a minimalist terminal program like minicom or cu. The only thing it does is creating a bidirectional connection between stdin/stdout and a terminal device (e.g. serial line). It can also set serial line baudrate, manipulate DTR/RTS modem lines, send break and throttle transmission speed.")

Please keep lines below 80 characters, and use two spaces between
the two sentences.

> +  (home-page "https://github.com/wentasah/sterm")
> +  (license #f)))
According to the files, the license is GPLv3+.


Could you send an update patch?  Thank you!




Information forwarded to guix-patches <at> gnu.org:
bug#49576; Package guix-patches. (Sat, 17 Jul 2021 10:51:01 GMT) Full text and rfc822 format available.

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

From: phodina <phodina <at> protonmail.com>
To: 49576 <at> debbugs.gnu.org
Subject: Re: bug#49576: [PATCH] Add sterm
Date: Sat, 17 Jul 2021 10:50:10 +0000
Hi iyzsong!

here is the patch with the changes as you suggested.

> Doesn't the builtin Makefile works? It also install a man page and
>
> shell completion files.

Unfortunately, the Makefile tries to install the binary under /usr

> I think "PREFIX=$out" is no effect here, also instead of 'gcc' you can
>
> use 'cc-for-target' for cross-compile support, examples can be found in
>
> suckless.scm:

I made the changes as you suggested but now I get the error due to 'cc-for-target':

/gnu/store/gqp3fqgb9h5l7ibzvsnqkv6gahy3r97i-sterm-20200306-guile-builder:1:2534: unquote: expression not valid outside of quasiquote in form (unquote (cc-for-target))

Could you help me fix that? Thanks

---
index 4429a2b75a..4ffb6060fe 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1297,6 +1297,36 @@ replacement for the OpenDWG libraries.")
     (description "@code{minicom} is a serial terminal emulator.")
     (license license:gpl2+)))

+(define-public sterm
+(package
+  (name "sterm")
+  (version "20200306")
+  (source (origin
+            (method git-fetch)
+            (uri (git-reference
+		  (url "https://github.com/wentasah/sterm")
+		  (commit version)))
+	    (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
+  (build-system gnu-build-system)
+  (arguments
+    '(#:tests? #f ; no tests
+      #:make-flags
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
+      #:phases
+      (modify-phases %standard-phases (delete 'configure))))
+  (synopsis "Simple serial terminal")
+  (description "This is a minimalist terminal program like minicom or cu.
+The only thing it does is creating a bidirectional connection between
+stdin/stdout and a terminal device (e.g. serial line).
+It can also set serial line baudrate, manipulate DTR/RTS modem lines,
+send break and throttle transmission speed.")
+  (home-page "https://github.com/wentasah/sterm")
+  (license license:gpl3+)))
+
 (define-public harminv
   (package
     (name "harminv")
--
2.31.1

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Friday, July 16th, 2021 at 3:03 PM, 宋文武 <iyzsong <at> outlook.com> wrote:

> Hello!
>
> phodina phodina <at> protonmail.com writes:
>
> > index 4429a2b75a..a6f866cbea 100644
> >
> > --- a/gnu/packages/engineering.scm
> >
> > +++ b/gnu/packages/engineering.scm
> >
> > @@ -24,6 +24,7 @@
> >
> > ;;; Copyright © 2021 qblade qblade <at> protonmail.com
> >
> > ;;; Copyright © 2021 Gerd Heber gerd.heber <at> gmail.com
> >
> > ;;; Copyright © 2021 Guillaume Le Vaillant glv <at> posteo.net
> >
> > +;;; Copyright © 2021 Petr Hodina phodina <at> protonmail.com
> >
> > ;;;
> >
> > ;;; This file is part of GNU Guix.
> >
> > ;;;
> >
> > @@ -1297,6 +1298,35 @@ replacement for the OpenDWG libraries.")
> >
> > (description "@code{minicom} is a serial terminal emulator.")
> >
> > (license license:gpl2+)))
> >
> > +(define-public sterm
> >
> > +(package
> >
> > -   (name "sterm")
> > -   (version "20200306")
> > -   (source (origin
> > -              (method git-fetch)
> >
> >
> > -              (uri
> >
> >
> > -         (git-reference
> >
> >
> > -       (url "https://github.com/wentasah/sterm")
> >
> >
> > -       (commit version)))
> >
> >
>
> The indention seems wrong here, we usually use:
>
> --8<---------------cut here---------------start------------->8---
>
>     (source (origin
>               (method git-fetch)
>               (uri (git-reference
>                     (url "...")
>                     (commit ...)))
>               (file-name (git-file-name name version))
>               (sha256
>                (base32
>                 "..."))))
>
>
> --8<---------------cut here---------------end--------------->8---
>
> Also a 'file-name' field is needed to get a better store directory name
>
> for the checkout.
>
> > -              (sha256
> >
> >
> > -               (base32
> >
> >
> > -                "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
> >
> >
> > -   (build-system gnu-build-system)
> > -   (arguments
> > -   '(#:tests? #f
>
> When disable tests, we should add a comment, a simple "no tests" will
>
> do.
>
> > -        #:make-flags (list "PREFIX=$out" "CC=gcc")
> >
> >
>
> I think "PREFIX=$out" is no effect here, also instead of 'gcc' you can
>
> use 'cc-for-target' for cross-compile support, examples can be found in
>
> suckless.scm:
>
> --8<---------------cut here---------------start------------->8---
>
>        #:make-flags
>        (list (string-append "CC=" ,(cc-for-target))
>              (string-append "PREFIX=" %output))
>
>
> --8<---------------cut here---------------end--------------->8---
>
> > -        #:phases (modify-phases %standard-phases
> >
> >
> > -       (delete 'configure)
> >
> >
> > -       (replace 'install
> >
> >
> > -         (lambda* (#:key outputs #:allow-other-keys)
> >
> >
> > -       	  (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
> >
> >
> > -       	    (install-file "sterm" bin)
> >
> >
> > -       	    #t))))))
> >
> >
>
> Doesn't the builtin Makefile works? It also install a man page and
>
> shell completion files.
>
> > -   (synopsis "Simple serial terminal")
> > -   (description "This is a minimalist terminal program like minicom or cu. The only thing it does is creating a bidirectional connection between stdin/stdout and a terminal device (e.g. serial line). It can also set serial line baudrate, manipulate DTR/RTS modem lines, send break and throttle transmission speed.")
>
> Please keep lines below 80 characters, and use two spaces between
>
> the two sentences.
>
> > -   (home-page "https://github.com/wentasah/sterm")
> > -   (license #f)))
>
> According to the files, the license is GPLv3+.
>
> Could you send an update patch? Thank you!




Information forwarded to guix-patches <at> gnu.org:
bug#49576; Package guix-patches. (Sat, 17 Jul 2021 11:42:02 GMT) Full text and rfc822 format available.

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

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: phodina <phodina <at> protonmail.com>
Cc: 49576 <at> debbugs.gnu.org
Subject: Re: [bug#49576] [PATCH] Add sterm
Date: Sat, 17 Jul 2021 13:41:35 +0200
Petr,

[Hm, PREFIX=$out... Nixer? Welcome ;-]

On 2021-07-17 12:50, phodina via Guix-patches via wrote:
> I made the changes as you suggested but now I get the error due to
> 'cc-for-target':
> 
> /gnu/store/gqp3fqgb9h5l7ibzvsnqkv6gahy3r97i-sterm-20200306-guile-builder:1:2534:
> unquote: expression not valid outside of quasiquote in form (unquote
> (cc-for-target))

[...]

> +       (list (string-append "CC=" ,(cc-for-target))
                                     ^
This , is the 'unquote' from the error message, and a quasiquote would 
be...

> +    `(#:tests? #f ; no tests
       ^
...this.  Whilst this is a regular, boring, non-Chad quote:

> +    '(#:tests? #f ; no tests
       ^
Unquote 'escapes' from one level of quoting, but only if the surrounding 
expression is quasiquoted.

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.




Information forwarded to guix-patches <at> gnu.org:
bug#49576; Package guix-patches. (Sat, 17 Jul 2021 12:09:02 GMT) Full text and rfc822 format available.

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

From: phodina <phodina <at> protonmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 49576 <at> debbugs.gnu.org
Subject: Re: [bug#49576] [PATCH] Add sterm
Date: Sat, 17 Jul 2021 12:08:27 +0000
Thanks Tobias. Now it builds without errors.

Yes, I used Nix.

Here's the updated patch:
---
index 4429a2b75a..e0eb92967c 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1297,6 +1297,36 @@ replacement for the OpenDWG libraries.")
     (description "@code{minicom} is a serial terminal emulator.")
     (license license:gpl2+)))

+(define-public sterm
+(package
+  (name "sterm")
+  (version "20200306")
+  (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/wentasah/sterm")
+                  (commit version)))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "031pd8yz2bfzqbari6za1c3xcqmw94ap4vbrjzb3v6izjcrca58c"))))
+  (build-system gnu-build-system)
+  (arguments
+    `(#:tests? #f ; no tests
+      #:make-flags
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
+      #:phases
+      (modify-phases %standard-phases (delete 'configure))))
+  (synopsis "Simple serial terminal")
+  (description "This is a minimalist terminal program like minicom or cu.
+The only thing it does is creating a bidirectional connection between
+stdin/stdout and a terminal device (e.g. serial line).
+It can also set serial line baudrate, manipulate DTR/RTS modem lines,
+send break and throttle transmission speed.")
+  (home-page "https://github.com/wentasah/sterm")
+  (license license:gpl3+)))
+
 (define-public harminv
   (package
     (name "harminv")
--
2.31.1




Reply sent to 宋文武 <iyzsong <at> outlook.com>:
You have taken responsibility. (Sun, 18 Jul 2021 09:43:01 GMT) Full text and rfc822 format available.

Notification sent to phodina <phodina <at> protonmail.com>:
bug acknowledged by developer. (Sun, 18 Jul 2021 09:43:01 GMT) Full text and rfc822 format available.

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

From: 宋文武 <iyzsong <at> outlook.com>
To: phodina <phodina <at> protonmail.com>
Cc: 49576-done <at> debbugs.gnu.org, Tobias Geerinckx-Rice <me <at> tobias.gr>
Subject: Re: bug#49576: [PATCH] Add sterm
Date: Sun, 18 Jul 2021 17:42:33 +0800
phodina <phodina <at> protonmail.com> writes:

> Thanks Tobias. Now it builds without errors.
>
> Yes, I used Nix.
>
> Here's the updated patch:
> [...]

Pushed, thank you and Tobias!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 15 Aug 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 225 days ago.

Previous Next


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