unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: david larsson <david.larsson@selfhosted.xyz>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 47540@debbugs.gnu.org
Subject: [bug#47540] [PATCH] gnu: Add prips.
Date: Mon, 05 Apr 2021 15:09:23 +0200	[thread overview]
Message-ID: <04a8eb1efe98cd5ada24e870b39a3671@selfhosted.xyz> (raw)
In-Reply-To: <94325c646a58888160ed6548dc5f646629e8374d.camel@telenet.be>

On 2021-04-01 21:44, Maxime Devos wrote:

>> +    (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.)

Fixed.

>> +       #:phases (modify-phases
>> +                    %standard-phases
> 
> %standard-phases shouldn't be on a separate line here.

Fixed.

> 
>> +                  (delete 'configure)
>> +                  (delete 'check)
> 
> Prips has some tests, so don't delete this phase.

I tried to fix but this fails.

> 
>> +                  (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?

I don't know for sure why that happened, but it's fixed to #o600 now.

>> +    (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.

This was an exact quote from website or something.

>> +    (license license:gpl2)))
> 
> I looked at the source code and it seems prips is actually gpl2+.

Fixed.

> Greetings,
> Maxime.

Thanks for your review!

This is what it looks like now, and failing the check phase:

(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 (string-append "CC=" ,(cc-for-target)))
        #:phases (modify-phases %standard-phases
                   (delete 'configure)
                                         ;(delete 'check)
                   (replace 'install
                     (lambda _
                       (let*
                           ((bin-dir  (string-append %output "/bin"))
                            (bin-file (string-append bin-dir "/prips")))
                         (mkdir-p bin-dir)
                         (copy-file "prips" bin-file)
                         (chmod bin-file #o600)))))))
     (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
  on one host at a time (e.g. whois).")
     (home-page "https://devel.ringlet.net/sysutils/prips/")
     (license license:gpl2+)))

The logs:
---------------

starting phase `check'
make: *** No rule to make target 'check'.  Stop.

Test suite failed, dumping logs.
command "make" "check" "-j" "2" "CC=gcc" failed with status 2



Best regards,
David

---------------




  reply	other threads:[~2021-04-05 13:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 13:11 [bug#47540] [PATCH] gnu: Add prips david larsson
2021-04-01 19:44 ` Maxime Devos
2021-04-05 13:09   ` david larsson [this message]
2021-04-05 17:38     ` david larsson
2021-04-06 14:04       ` Maxime Devos
2021-04-08 19:28         ` david larsson
2021-04-12 10:47           ` bug#47540: " Ludovic Courtès

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=04a8eb1efe98cd5ada24e870b39a3671@selfhosted.xyz \
    --to=david.larsson@selfhosted.xyz \
    --cc=47540@debbugs.gnu.org \
    --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).