unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62698: bind:utils
@ 2023-04-06 11:43 Αντώνιος Τσώλης
  2023-04-06 18:27 ` Brian Cully via Bug reports for GNU Guix
  2023-04-07 13:26 ` Jonathan Brielmaier
  0 siblings, 2 replies; 10+ messages in thread
From: Αντώνιος Τσώλης @ 2023-04-06 11:43 UTC (permalink / raw)
  To: 62698

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

The bind:utils (dig, host, nslookup) are not copied/included in any bin
path.

[-- Attachment #2: Type: text/html, Size: 144 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#62698: bind:utils
  2023-04-06 11:43 bug#62698: bind:utils Αντώνιος Τσώλης
@ 2023-04-06 18:27 ` Brian Cully via Bug reports for GNU Guix
  2023-04-06 20:03   ` Αντώνιος Τσώλης
  2023-04-07 13:26 ` Jonathan Brielmaier
  1 sibling, 1 reply; 10+ messages in thread
From: Brian Cully via Bug reports for GNU Guix @ 2023-04-06 18:27 UTC (permalink / raw)
  To: Αντώνιος Τσώλης
  Cc: 62698

They are included for me:

--8<---------------cut here---------------start------------->8---
bjc@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@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---




^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#62698: bind:utils
  2023-04-06 18:27 ` Brian Cully via Bug reports for GNU Guix
@ 2023-04-06 20:03   ` Αντώνιος Τσώλης
  2023-04-07 22:25     ` Brian Cully via Bug reports for GNU Guix
  0 siblings, 1 reply; 10+ messages in thread
From: Αντώνιος Τσώλης @ 2023-04-06 20:03 UTC (permalink / raw)
  To: Brian Cully; +Cc: 62698

[-- Attachment #1: Type: text/plain, Size: 2105 bytes --]

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@spork.org> wrote:

> They are included for me:
>
> --8<---------------cut here---------------start------------->8---
> bjc@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@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---
>

[-- Attachment #2: Type: text/html, Size: 3294 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#62698: bind:utils
  2023-04-06 11:43 bug#62698: bind:utils Αντώνιος Τσώλης
  2023-04-06 18:27 ` Brian Cully via Bug reports for GNU Guix
@ 2023-04-07 13:26 ` Jonathan Brielmaier
  1 sibling, 0 replies; 10+ messages in thread
From: Jonathan Brielmaier @ 2023-04-07 13:26 UTC (permalink / raw)
  To: 62698

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))




^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#62698: bind:utils
  2023-04-06 20:03   ` Αντώνιος Τσώλης
@ 2023-04-07 22:25     ` Brian Cully via Bug reports for GNU Guix
  2023-04-08  5:43       ` Αντώνιος Τσώλης
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Cully via Bug reports for GNU Guix @ 2023-04-07 22:25 UTC (permalink / raw)
  To: Αντώνιος Τσώλης
  Cc: 62698

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@wireshark-test ~$ which host
/run/current-system/profile/bin/host
test@wireshark-test ~$ which dig
/run/current-system/profile/bin/dig
test@wireshark-test ~$ which nslookup
/run/current-system/profile/bin/nslookup
--8<---------------cut here---------------end--------------->8---




^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#62698: bind:utils
  2023-04-07 22:25     ` Brian Cully via Bug reports for GNU Guix
@ 2023-04-08  5:43       ` Αντώνιος Τσώλης
  2023-04-08 15:12         ` Brian Cully via Bug reports for GNU Guix
  0 siblings, 1 reply; 10+ messages in thread
From: Αντώνιος Τσώλης @ 2023-04-08  5:43 UTC (permalink / raw)
  To: Brian Cully; +Cc: 62698

[-- Attachment #1: Type: text/plain, Size: 4080 bytes --]

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@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@wireshark-test ~$ which host
> /run/current-system/profile/bin/host
> test@wireshark-test ~$ which dig
> /run/current-system/profile/bin/dig
> test@wireshark-test ~$ which nslookup
> /run/current-system/profile/bin/nslookup
> --8<---------------cut here---------------end--------------->8---
>

[-- Attachment #2: Type: text/html, Size: 5061 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#62698: bind:utils
  2023-04-08  5:43       ` Αντώνιος Τσώλης
@ 2023-04-08 15:12         ` Brian Cully via Bug reports for GNU Guix
  2023-05-03 13:01           ` Maxim Cournoyer
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Cully via Bug reports for GNU Guix @ 2023-04-08 15:12 UTC (permalink / raw)
  To: Αντώνιος Τσώλης
  Cc: 62698


Αντώνιος Τσώλης <tsolis.antonios@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




^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#62698: bind:utils
  2023-04-08 15:12         ` Brian Cully via Bug reports for GNU Guix
@ 2023-05-03 13:01           ` Maxim Cournoyer
  2023-05-03 16:58             ` Brian Cully via Bug reports for GNU Guix
  0 siblings, 1 reply; 10+ messages in thread
From: Maxim Cournoyer @ 2023-05-03 13:01 UTC (permalink / raw)
  To: Brian Cully
  Cc: Αντώνιος Τσώλης,
	62698

Hi,

Brian Cully <bjc@spork.org> writes:

> Αντώνιος Τσώλης <tsolis.antonios@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




^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#62698: bind:utils
  2023-05-03 13:01           ` Maxim Cournoyer
@ 2023-05-03 16:58             ` Brian Cully via Bug reports for GNU Guix
  2023-05-04 12:43               ` Maxim Cournoyer
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Cully via Bug reports for GNU Guix @ 2023-05-03 16:58 UTC (permalink / raw)
  To: Maxim Cournoyer
  Cc: Αντώνιος Τσώλης,
	62698


Maxim Cournoyer <maxim.cournoyer@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




^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#62698: bind:utils
  2023-05-03 16:58             ` Brian Cully via Bug reports for GNU Guix
@ 2023-05-04 12:43               ` Maxim Cournoyer
  0 siblings, 0 replies; 10+ messages in thread
From: Maxim Cournoyer @ 2023-05-04 12:43 UTC (permalink / raw)
  To: Brian Cully
  Cc: Αντώνιος Τσώλης,
	62698-done

Hi Brian,

Brian Cully <bjc@spork.org> writes:

> Maxim Cournoyer <maxim.cournoyer@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




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-05-04 12:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06 11:43 bug#62698: bind:utils Αντώνιος Τσώλης
2023-04-06 18:27 ` Brian Cully via Bug reports for GNU Guix
2023-04-06 20:03   ` Αντώνιος Τσώλης
2023-04-07 22:25     ` Brian Cully via Bug reports for GNU Guix
2023-04-08  5:43       ` Αντώνιος Τσώλης
2023-04-08 15:12         ` Brian Cully via Bug reports for GNU Guix
2023-05-03 13:01           ` Maxim Cournoyer
2023-05-03 16:58             ` Brian Cully via Bug reports for GNU Guix
2023-05-04 12:43               ` Maxim Cournoyer
2023-04-07 13:26 ` Jonathan Brielmaier

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