GNU bug report logs - #62698
bind:utils

Previous Next

Package: guix;

Reported by: Αντώνιος Τσώλης <tsolis.antonios <at> gmail.com>

Date: Thu, 6 Apr 2023 15:06:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.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 62698 in the body.
You can then email your comments to 62698 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 bug-guix <at> gnu.org:
bug#62698; Package guix. (Thu, 06 Apr 2023 15:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Αντώνιος Τσώλης <tsolis.antonios <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 06 Apr 2023 15:06:02 GMT) Full text and rfc822 format available.

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

From: Αντώνιος Τσώλης
 <tsolis.antonios <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: bind:utils
Date: Thu, 6 Apr 2023 14:43:29 +0300
[Message part 1 (text/plain, inline)]
The bind:utils (dig, host, nslookup) are not copied/included in any bin
path.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#62698; Package guix. (Thu, 06 Apr 2023 18:28:02 GMT) Full text and rfc822 format available.

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

From: Brian Cully <bjc <at> spork.org>
To: Αντώνιος Τσώλης
 <tsolis.antonios <at> gmail.com>
Cc: 62698 <at> debbugs.gnu.org
Subject: Re: bug#62698: bind:utils
Date: Thu, 06 Apr 2023 14:27:26 -0400
They are included for me:

--8<---------------cut here---------------start------------->8---
bjc <at> psyduck:~/.config/emacs% for i in dig host nslookup; do which $i; done
/net/snorlax/home/bjc/.guix-home/profile/bin/dig
/net/snorlax/home/bjc/.guix-home/profile/bin/host
/net/snorlax/home/bjc/.guix-home/profile/bin/nslookup
--8<---------------cut here---------------end--------------->8---

or from ‘guix shell’:

--8<---------------cut here---------------start------------->8---
bjc <at> psyduck:~/.config/emacs% guix shell --pure bash bind:utils -- sh -c 'for i in dig host nslookup; do $i gnu.org; done'
The following derivation will be built:
  /gnu/store/frdbdpa3klj5r87pm468v4qi8lfcx4y7-profile.drv

building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building profile with 2 packages...

; <<>> DiG 9.16.38 <<>> gnu.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6793
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;gnu.org.                       IN      A

;; ANSWER SECTION:
gnu.org.                300     IN      A       209.51.188.116

;; Query time: 27 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Apr 06 14:26:52 EDT 2023
;; MSG SIZE  rcvd: 52

gnu.org has address 209.51.188.116
gnu.org has IPv6 address 2001:470:142:5::116
gnu.org mail is handled by 10 eggs.gnu.org.
Server:         192.168.1.1
Address:        192.168.1.1#53

Non-authoritative answer:
Name:   gnu.org
Address: 209.51.188.116
Name:   gnu.org
Address: 2001:470:142:5::116
--8<---------------cut here---------------end--------------->8---




Information forwarded to bug-guix <at> gnu.org:
bug#62698; Package guix. (Thu, 06 Apr 2023 20:05:02 GMT) Full text and rfc822 format available.

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

From: Αντώνιος Τσώλης
 <tsolis.antonios <at> gmail.com>
To: Brian Cully <bjc <at> spork.org>
Cc: 62698 <at> debbugs.gnu.org
Subject: Re: bug#62698: bind:utils
Date: Thu, 6 Apr 2023 23:03:47 +0300
[Message part 1 (text/plain, inline)]
Yes, they are included when "guix shell ..." etc.
BUT they are not included when "sudo guix system reconfigure ..."


On Thu, 6 Apr 2023 at 21:27, Brian Cully <bjc <at> spork.org> wrote:

> They are included for me:
>
> --8<---------------cut here---------------start------------->8---
> bjc <at> psyduck:~/.config/emacs% for i in dig host nslookup; do which $i; done
> /net/snorlax/home/bjc/.guix-home/profile/bin/dig
> /net/snorlax/home/bjc/.guix-home/profile/bin/host
> /net/snorlax/home/bjc/.guix-home/profile/bin/nslookup
> --8<---------------cut here---------------end--------------->8---
>
> or from ‘guix shell’:
>
> --8<---------------cut here---------------start------------->8---
> bjc <at> psyduck:~/.config/emacs% guix shell --pure bash bind:utils -- sh -c
> 'for i in dig host nslookup; do $i gnu.org; done'
> The following derivation will be built:
>   /gnu/store/frdbdpa3klj5r87pm468v4qi8lfcx4y7-profile.drv
>
> building CA certificate bundle...
> listing Emacs sub-directories...
> building fonts directory...
> building directory of Info manuals...
> building profile with 2 packages...
>
> ; <<>> DiG 9.16.38 <<>> gnu.org
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6793
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
>
> ;; OPT PSEUDOSECTION:
> ; EDNS: version: 0, flags:; udp: 1232
> ;; QUESTION SECTION:
> ;gnu.org.                       IN      A
>
> ;; ANSWER SECTION:
> gnu.org.                300     IN      A       209.51.188.116
>
> ;; Query time: 27 msec
> ;; SERVER: 192.168.1.1#53(192.168.1.1)
> ;; WHEN: Thu Apr 06 14:26:52 EDT 2023
> ;; MSG SIZE  rcvd: 52
>
> gnu.org has address 209.51.188.116
> gnu.org has IPv6 address 2001:470:142:5::116
> gnu.org mail is handled by 10 eggs.gnu.org.
> Server:         192.168.1.1
> Address:        192.168.1.1#53
>
> Non-authoritative answer:
> Name:   gnu.org
> Address: 209.51.188.116
> Name:   gnu.org
> Address: 2001:470:142:5::116
> --8<---------------cut here---------------end--------------->8---
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#62698; Package guix. (Fri, 07 Apr 2023 13:27:01 GMT) Full text and rfc822 format available.

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

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: 62698 <at> debbugs.gnu.org
Subject: bind:utils
Date: Fri, 7 Apr 2023 15:26:13 +0200
Works for me even in config.scm:

(packages
  (append
    (map (compose list specification->package+output)
     (list "audacity"
           "bind:utils" "borg" "bridge-utils"
           ;;..
           "zstd"))
     %base-packages))




Information forwarded to bug-guix <at> gnu.org:
bug#62698; Package guix. (Fri, 07 Apr 2023 22:27:02 GMT) Full text and rfc822 format available.

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

From: Brian Cully <bjc <at> spork.org>
To: Αντώνιος Τσώλης
 <tsolis.antonios <at> gmail.com>
Cc: 62698 <at> debbugs.gnu.org
Subject: Re: bug#62698: bind:utils
Date: Fri, 07 Apr 2023 18:25:45 -0400
With the config below, I have ‘host’, ‘dig’, and ‘nslookup’ in my
path. Note that I'm using the ‘(compose list
specification->package+output)’ form, though. If you're not using that,
you may be accidentally loading the ‘bind’ package with the default
‘out’ output, instead of the ‘utils’ one. If that's the case, then
you're not going to have the utils in your PATH because they haven't
been installed.

--8<---------------cut here---------------start------------->8---
;; Testing whether ‘bind:utils’ gets installed in the path (see: #62698)

(use-modules (gnu)
             (gnu system setuid))
(use-package-modules networking)

(operating-system
  (locale "en_US.utf8")
  (timezone "America/New_York")
  (keyboard-layout (keyboard-layout "us"))
  (host-name "wireshark-test")

  (users (cons* (user-account
                 (name "test")
                 (group "users")
                 (password (crypt "test" "$6$test")))
                %base-user-accounts))
  (packages
   (cons*
    ((compose list specification->package+output) "bind:utils")
    %base-packages))

  (bootloader
   (bootloader-configuration
    (bootloader grub-efi-bootloader)
    (targets '("/boot/efi"))
    (keyboard-layout keyboard-layout)))

  (file-systems
   (cons* (file-system
            (mount-point "/")
            (device
             (uuid "14f4e958-be9e-41bb-bd25-e90a7330093c"
                   'btrfs))
            (type "btrfs"))
          (file-system
            (mount-point "/boot/efi")
            (device (uuid "6866-56B1" 'fat32))
            (type "vfat"))
          %base-file-systems)))
--8<---------------cut here---------------end--------------->8---

Running with ‘sh -c $(guix system vm --no-graphic
bind-utils-config.scm)’:

--8<---------------cut here---------------start------------->8---
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
GC Warning: Couldn't read /proc/stat
Welcome, this is GNU's early boot Guile.
Use 'gnu.repl' for an initrd REPL.

loading kernel modules...
loading '/gnu/store/z0w00ijl944lzc263gzaw17wmlg7k08f-system/boot'...
making '/gnu/store/z0w00ijl944lzc263gzaw17wmlg7k08f-system' the current system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/rs296i8fpqx2gvy8w0za9wyd1spgmy2k-etc...
Please wait while gathering entropy to generate the key pair;
this may take time...
[    2.966863] udevd[75]: no sender credentials received, message ignored
[    3.306595] Error: Driver 'pcspkr' is already registered, aborting...
nscd: 99 monitoring file `/etc/hosts` (1)
nscd: 99 monitoring directory `/etc` (2)
nscd: 99 monitoring file `/etc/resolv.conf` (3)
nscd: 99 monitoring directory `/etc` (2)
nscd: 99 monitoring file `/etc/services` (4)
nscd: 99 monitoring directory `/etc` (2)
nscd: 99 monitoring file `/etc/nsswitch.conf` (5)
nscd: 99 monitoring directory `/etc` (2)
nscd: 99 monitoring file `/etc/nsswitch.conf` (5)
nscd: 99 monitoring directory `/etc` (2)


This is the GNU system.  Welcome.
wireshark-test login: test
Password: 
This is the GNU operating system, welcome!

test <at> wireshark-test ~$ which host
/run/current-system/profile/bin/host
test <at> wireshark-test ~$ which dig
/run/current-system/profile/bin/dig
test <at> wireshark-test ~$ which nslookup
/run/current-system/profile/bin/nslookup
--8<---------------cut here---------------end--------------->8---




Information forwarded to bug-guix <at> gnu.org:
bug#62698; Package guix. (Sat, 08 Apr 2023 05:44:02 GMT) Full text and rfc822 format available.

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

From: Αντώνιος Τσώλης
 <tsolis.antonios <at> gmail.com>
To: Brian Cully <bjc <at> spork.org>
Cc: 62698 <at> debbugs.gnu.org
Subject: Re: bug#62698: bind:utils
Date: Sat, 8 Apr 2023 08:43:03 +0300
[Message part 1 (text/plain, inline)]
Well, I use this:

  (packages
     (append
       (map specification->package+output
          '("bind:utils" ... ))
     %base-packages))

But I am new to scheme/guile/guix, so maybe I do something wrong. Anyway,
thanks for confirming that it works on your side. It's probably an issue
with my configuration. :)

On Sat, 8 Apr 2023 at 01:26, Brian Cully <bjc <at> spork.org> wrote:

> With the config below, I have ‘host’, ‘dig’, and ‘nslookup’ in my
> path. Note that I'm using the ‘(compose list
> specification->package+output)’ form, though. If you're not using that,
> you may be accidentally loading the ‘bind’ package with the default
> ‘out’ output, instead of the ‘utils’ one. If that's the case, then
> you're not going to have the utils in your PATH because they haven't
> been installed.
>
> --8<---------------cut here---------------start------------->8---
> ;; Testing whether ‘bind:utils’ gets installed in the path (see: #62698)
>
> (use-modules (gnu)
>              (gnu system setuid))
> (use-package-modules networking)
>
> (operating-system
>   (locale "en_US.utf8")
>   (timezone "America/New_York")
>   (keyboard-layout (keyboard-layout "us"))
>   (host-name "wireshark-test")
>
>   (users (cons* (user-account
>                  (name "test")
>                  (group "users")
>                  (password (crypt "test" "$6$test")))
>                 %base-user-accounts))
>   (packages
>    (cons*
>     ((compose list specification->package+output) "bind:utils")
>     %base-packages))
>
>   (bootloader
>    (bootloader-configuration
>     (bootloader grub-efi-bootloader)
>     (targets '("/boot/efi"))
>     (keyboard-layout keyboard-layout)))
>
>   (file-systems
>    (cons* (file-system
>             (mount-point "/")
>             (device
>              (uuid "14f4e958-be9e-41bb-bd25-e90a7330093c"
>                    'btrfs))
>             (type "btrfs"))
>           (file-system
>             (mount-point "/boot/efi")
>             (device (uuid "6866-56B1" 'fat32))
>             (type "vfat"))
>           %base-file-systems)))
> --8<---------------cut here---------------end--------------->8---
>
> Running with ‘sh -c $(guix system vm --no-graphic
> bind-utils-config.scm)’:
>
> --8<---------------cut here---------------start------------->8---
> GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main
> thread
> GC Warning: Couldn't read /proc/stat
> Welcome, this is GNU's early boot Guile.
> Use 'gnu.repl' for an initrd REPL.
>
> loading kernel modules...
> loading '/gnu/store/z0w00ijl944lzc263gzaw17wmlg7k08f-system/boot'...
> making '/gnu/store/z0w00ijl944lzc263gzaw17wmlg7k08f-system' the current
> system...
> setting up setuid programs in '/run/setuid-programs'...
> populating /etc from /gnu/store/rs296i8fpqx2gvy8w0za9wyd1spgmy2k-etc...
> Please wait while gathering entropy to generate the key pair;
> this may take time...
> [    2.966863] udevd[75]: no sender credentials received, message ignored
> [    3.306595] Error: Driver 'pcspkr' is already registered, aborting...
> nscd: 99 monitoring file `/etc/hosts` (1)
> nscd: 99 monitoring directory `/etc` (2)
> nscd: 99 monitoring file `/etc/resolv.conf` (3)
> nscd: 99 monitoring directory `/etc` (2)
> nscd: 99 monitoring file `/etc/services` (4)
> nscd: 99 monitoring directory `/etc` (2)
> nscd: 99 monitoring file `/etc/nsswitch.conf` (5)
> nscd: 99 monitoring directory `/etc` (2)
> nscd: 99 monitoring file `/etc/nsswitch.conf` (5)
> nscd: 99 monitoring directory `/etc` (2)
>
>
> This is the GNU system.  Welcome.
> wireshark-test login: test
> Password:
> This is the GNU operating system, welcome!
>
> test <at> wireshark-test ~$ which host
> /run/current-system/profile/bin/host
> test <at> wireshark-test ~$ which dig
> /run/current-system/profile/bin/dig
> test <at> wireshark-test ~$ which nslookup
> /run/current-system/profile/bin/nslookup
> --8<---------------cut here---------------end--------------->8---
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#62698; Package guix. (Sat, 08 Apr 2023 15:16:01 GMT) Full text and rfc822 format available.

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

From: Brian Cully <bjc <at> spork.org>
To: Αντώνιος Τσώλης
 <tsolis.antonios <at> gmail.com>
Cc: 62698 <at> debbugs.gnu.org
Subject: Re: bug#62698: bind:utils
Date: Sat, 08 Apr 2023 11:12:54 -0400
Αντώνιος Τσώλης <tsolis.antonios <at> gmail.com> writes:

> Well, I use this:
>
>   (packages
>      (append 
>        (map specification->package+output
>           '("bind:utils" ... ))
>      %base-packages))
>
> But I am new to scheme/guile/guix, so maybe I do something 
> wrong. Anyway, thanks for confirming that it works on your
> side. It's probably an issue with my configuration. :)

I suspected this was the problem. You really do need to use:

(map (compose list specification->package+output)
    '("bind:utils"))

Because ‘specification->package+output’ returns two values, and 
you'll need to combine those into a list for the second value (the 
‘utils’ output) to be seen.

-bjc




Information forwarded to bug-guix <at> gnu.org:
bug#62698; Package guix. (Wed, 03 May 2023 13:02:01 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Brian Cully <bjc <at> spork.org>
Cc: Αντώνιος Τσώλης
 <tsolis.antonios <at> gmail.com>, 62698 <at> debbugs.gnu.org
Subject: Re: bug#62698: bind:utils
Date: Wed, 03 May 2023 09:01:34 -0400
Hi,

Brian Cully <bjc <at> spork.org> writes:

> Αντώνιος Τσώλης <tsolis.antonios <at> gmail.com> writes:
>
>> Well, I use this:
>>
>>   (packages
>>      (append        (map specification->package+output
>>           '("bind:utils" ... ))
>>      %base-packages))
>>
>> But I am new to scheme/guile/guix, so maybe I do something
>> wrong. Anyway, thanks for confirming that it works on your
>> side. It's probably an issue with my configuration. :)
>
> I suspected this was the problem. You really do need to use:
>
> (map (compose list specification->package+output)
>     '("bind:utils"))
>
> Because ‘specification->package+output’ returns two values, and you'll
> need to combine those into a list for the second value (the ‘utils’
> output) to be seen.

Thanks for finding the problem.  Should we leave this bug open until
specification->package+output is properly documented in our manual, with
an example?  If yes, would you like to try your hand at adding it?

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#62698; Package guix. (Wed, 03 May 2023 17:05:01 GMT) Full text and rfc822 format available.

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

From: Brian Cully <bjc <at> spork.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Αντώνιος Τσώλης
 <tsolis.antonios <at> gmail.com>, 62698 <at> debbugs.gnu.org
Subject: Re: bug#62698: bind:utils
Date: Wed, 03 May 2023 12:58:33 -0400
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Thanks for finding the problem.  Should we leave this bug open 
> until
> specification->package+output is properly documented in our 
> manual, with
> an example?  If yes, would you like to try your hand at adding 
> it?

I've looked at this briefly, and can't figure out a good place to 
document this (I'm also not particularly good with TexInfo).

I'm okay with closing the bug. Though I will say that I think this 
procedure is a bit of a foot-gun. Multiple value returns are 
always kind of weird, and in this particular case I don't see the 
value at all; the only reason to use 
‘specification->package+output’ would be to get both the package 
and the output, so the minor advantages of multi-value returns are 
obviated. On top of that, does this even get used outside of 
system/home definitions? And in those places you always want a 
list.

I realize a lot of code uses the current semantics, so changing 
them would be extremely difficult at this late stage. It's worth 
thinking about adding another procedure that does the expected 
thing (returning a list of package and output), IMHO, and 
transitioning over to that.

-bjc




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Thu, 04 May 2023 12:44:02 GMT) Full text and rfc822 format available.

Notification sent to Αντώνιος Τσώλης <tsolis.antonios <at> gmail.com>:
bug acknowledged by developer. (Thu, 04 May 2023 12:44:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Brian Cully <bjc <at> spork.org>
Cc: Αντώνιος Τσώλης
 <tsolis.antonios <at> gmail.com>, 62698-done <at> debbugs.gnu.org
Subject: Re: bug#62698: bind:utils
Date: Thu, 04 May 2023 08:43:34 -0400
Hi Brian,

Brian Cully <bjc <at> spork.org> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> Thanks for finding the problem.  Should we leave this bug open until
>> specification->package+output is properly documented in our manual,
>> with
>> an example?  If yes, would you like to try your hand at adding it?
>
> I've looked at this briefly, and can't figure out a good place to
> document this (I'm also not particularly good with TexInfo).

Hm, looking at '(guix) Packages with Multiple Outputs', we already have
an example, which simply append packages and (list package "output")
lists, so perhaps that should be preferred instead.  The
'specification->package+output' procedure mostly appears to be used
internally, in (guix scripts environment) for example.

> I'm okay with closing the bug. Though I will say that I think this
> procedure is a bit of a foot-gun. Multiple value returns are always
> kind of weird, and in this particular case I don't see the value at
> all; the only reason to use ‘specification->package+output’ would be
> to get both the package and the output, so the minor advantages of
> multi-value returns are obviated. On top of that, does this even get
> used outside of system/home definitions? And in those places you
> always want a list.
>
> I realize a lot of code uses the current semantics, so changing them
> would be extremely difficult at this late stage. It's worth thinking
> about adding another procedure that does the expected thing (returning
> a list of package and output), IMHO, and transitioning over to that.

Note that for user profiles, it seems better to use manifest with the
convenient 'specifications->manifest' procedure that allows directly
providing package name/outputs via a "bind:utils" specification, for
example.

Closing!

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 02 Jun 2023 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 329 days ago.

Previous Next


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