GNU bug report logs - #47540
[PATCH] gnu: Add prips.

Previous Next

Package: guix-patches;

Reported by: david larsson <david.larsson <at> selfhosted.xyz>

Date: Thu, 1 Apr 2021 13:13:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxime Devos <maximedevos <at> telenet.be>
To: david larsson <david.larsson <at> selfhosted.xyz>, 47540 <at> debbugs.gnu.org
Subject: [bug#47540] [PATCH] gnu: Add prips.
Date: Thu, 01 Apr 2021 21:44:46 +0200
[Message part 1 (text/plain, inline)]
Hi,

Some comments on the patch.

On Thu, 2021-04-01 at 15:11 +0200, david larsson wrote:
> [...]
> +(define-public prips
> +  (package
> +    (name "prips")
> +    (version "1.1.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://devel.ringlet.net/files/sys/"
> +                           name "/" name "-" version ".tar.xz"))
> +       (sha256
> +        (base32 
> "1a33vbl4w603mk6mm5r3vhk87fy3dfk5wdpch0yd3ncbkg3fmvqn"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     '(#:make-flags (list "CC=gcc")

As "CC=gcc" is a constant, I would write '("CC=gcc") here,
though admittedly this is largely a matter of taste.

Another problem: when cross-compiling, "gcc" will be a
compiler for the build system, not the host system (assuming
I got the terminology right).  Instead, write

     `(#:make-flags (list (string-append "CC" ,(cc-for-target)))
       ...)

(The quasiquote ` is important.)
(TODO to self: fix other packages that incorrectly set "CC=gcc" ...)

> +       #:phases (modify-phases
> +                    %standard-phases

%standard-phases shouldn't be on a separate line here.

> +                  (delete 'configure)
> +                  (delete 'check)

Prips has some tests, so don't delete this phase.

> +                  (replace 'install
> +                    (lambda _
> +                      (let*
> +                          ((bin-dir  (string-append %output "/bin"))
> +                           (bin-file (string-append bin-dir "/prips")))

The ((bin-dir ...)) should be on the same line as 'let*'.

> +                        (mkdir-p bin-dir)
> +                        (copy-file "prips" bin-file)
> +                        (chmod bin-file #o700)))))))

Why are you making bin/prips writable?  Shouldn't this be
(chmod bin-file #o600) instead?

> +    (synopsis "Tool that prints the IP addresses in a given range")
> +    (description "Prips can be used to print all of the IP addresses in
> + a given range.  This allows the enhancement of tools only work

‘Enhancement’ is rather vague and leaning towards marketing-speak.
I do not have an alternative suggestion however.

> + on one host at a time (e.g. whois).")
> +    (home-page "https://devel.ringlet.net/sysutils/prips/")
> +    (license license:gpl2)))

I looked at the source code and it seems prips is actually gpl2+.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 40 days ago.

Previous Next


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