Cannot guix refresh -ru util-linux to get updated lsblk

  • Done
  • quality assurance status badge
Details
3 participants
  • Bengt Richter
  • Ludovic Courtès
  • Marius Bakke
Owner
unassigned
Submitted by
Bengt Richter
Severity
normal

Debbugs page

Bengt Richter wrote 5 years ago
(name . New-Bug)(address . bug-guix@gnu.org)
20191026012248.GA119672@PhantoNv4ArchGx.localdomain
Hi Guix,

IpPulled and updated to guix describe:
---------------------
Generation 19 Oct 24 2019 22:37:20 (current)
guix 6caa739
branch: master
commit: 6caa7392d8e51f5ef26e9efaa867ca5f9e1cac91
---------------------

but lsblk -f still looks like this:
---------------------
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
├─sda1
├─sda2
├─sda3
├─sda4
├─sda5
├─sda6
└─sda7
sdb
└─sdb1
nvme0n1
├─nvme0n1p1 510M 50% /boot
├─nvme0n1p2
├─nvme0n1p3 [SWAP]
└─nvme0n1p4 12.6G 71% /
---------------------
where it should look like: (got this using foreign /usr/bin/lsblk -f)
---------------------
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
├─sda1 vfat Phanto1EFI 98AB-229C
├─sda2 ext4 d8ce4206-fc92-4248-8164-3fe5397c28fb
├─sda3 swap 59e8ffd8-a2df-4021-ba59-c8dda6215f83
├─sda4 ext4 Phanto4ArchGx 617f2280-d34a-4dea-ac50-a1222dd18c26
├─sda5 ext4 Phanto5ArchGxOn 71e61e41-81d0-48ac-b50f-a00668723c32
├─sda6 ext4 Phanto6Arch e5760f87-71bc-4318-92f1-d108e5c9e332
└─sda7 ext4 Phanto7GuixSD a60eac5f-2306-49c5-8c87-7cab28ff6d37
sdb
└─sdb1 ext4 Cruz1GxArchivA 18fb1d34-47b0-4d62-baea-43681ec2e5a4
nvme0n1
├─nvme0n1p1 vfat PhantoV1EFI 6E3C-D410 510M 50% /boot
├─nvme0n1p2 ext4 PhantoNv2Empty 76bc8f68-126c-4a6c-8b77-afc89bd2726a
├─nvme0n1p3 swap 24151091-f47a-46e2-a6cb-e5219eddae7c [SWAP]
└─nvme0n1p4 ext4 PhantoNv4ArchGx 12eec2bf-bc81-48a8-b444-26913c078302 12.6G 71% /
---------------------

So I tried:

[17:59 ~/bs]$ guix refresh -r util-linux
guix/build-system/gnu.scm:143:8: findutils would be upgraded from 4.6.0 to 4.7.0
gnu/packages/commencement.scm:2183:2: binutils would be upgraded from 2.32 to 2.33.1
gnu/packages/commencement.scm:2244:2: gcc would be upgraded from 7.4.0 to 9.2.0
gnu/packages/commencement.scm:2142:2: glibc would be upgraded from 2.29 to 2.30
[18:01 ~/bs]$ guix refresh -ru util-linux
guix/build-system/gnu.scm:143:8: error: cannot download for this method: #<procedure 7f277de49100 at gnu/packages/bootstrap.scm:155:4 (url hash-algo hash #:opti
onal name #:key system)>
[18:02 ~/bs]$ lsblk --version
lsblk from util-linux 2.34
[18:04 ~/bs]$ guix package -I util-linux
util-linux 2.34 out /gnu/store/xymkwf57x988q8cny2is1dgzrbr9xdfi-util-linux-2.34
[18:04 ~/bs]$ # was -ru combination a problem?
[18:05 ~/bs]$ guix refresh -u util-linux
[18:06 ~/bs]$ guix refresh -r util-linux
guix/build-system/gnu.scm:143:8: findutils would be upgraded from 4.6.0 to 4.7.0
gnu/packages/commencement.scm:2183:2: binutils would be upgraded from 2.32 to 2.33.1
gnu/packages/commencement.scm:2244:2: gcc would be upgraded from 7.4.0 to 9.2.0
gnu/packages/commencement.scm:2142:2: glibc would be upgraded from 2.29 to 2.30
[18:06 ~/bs]$ guix refresh -ur util-linux
guix/build-system/gnu.scm:143:8: error: cannot download for this method: #<procedure 7fb30f394e80 at gnu/packages/bootstrap.scm:155:4 (url hash-algo hash #:opti
onal name #:key system)>
[18:06 ~/bs]$ su -c 'setterm -file refresh-errors.txt -dump 1'

TIA for any help :)
--
Regards,
Bengt Richter
Marius Bakke wrote 5 years ago
87tv7stsg3.fsf@devup.no
Hi Bengt,

Bengt Richter <bokr@bokr.com> writes:

Toggle quote (50 lines)
> Hi Guix,
>
> IpPulled and updated to guix describe:
> ---------------------
> Generation 19 Oct 24 2019 22:37:20 (current)
> guix 6caa739
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 6caa7392d8e51f5ef26e9efaa867ca5f9e1cac91
> ---------------------
>
> but lsblk -f still looks like this:
> ---------------------
> NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
> sda
> ├─sda1
> ├─sda2
> ├─sda3
> ├─sda4
> ├─sda5
> ├─sda6
> └─sda7
> sdb
> └─sdb1
> nvme0n1
> ├─nvme0n1p1 510M 50% /boot
> ├─nvme0n1p2
> ├─nvme0n1p3 [SWAP]
> └─nvme0n1p4 12.6G 71% /
> ---------------------
> where it should look like: (got this using foreign /usr/bin/lsblk -f)
> ---------------------
> NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
> sda
> ├─sda1 vfat Phanto1EFI 98AB-229C
> ├─sda2 ext4 d8ce4206-fc92-4248-8164-3fe5397c28fb
> ├─sda3 swap 59e8ffd8-a2df-4021-ba59-c8dda6215f83
> ├─sda4 ext4 Phanto4ArchGx 617f2280-d34a-4dea-ac50-a1222dd18c26
> ├─sda5 ext4 Phanto5ArchGxOn 71e61e41-81d0-48ac-b50f-a00668723c32
> ├─sda6 ext4 Phanto6Arch e5760f87-71bc-4318-92f1-d108e5c9e332
> └─sda7 ext4 Phanto7GuixSD a60eac5f-2306-49c5-8c87-7cab28ff6d37
> sdb
> └─sdb1 ext4 Cruz1GxArchivA 18fb1d34-47b0-4d62-baea-43681ec2e5a4
> nvme0n1
> ├─nvme0n1p1 vfat PhantoV1EFI 6E3C-D410 510M 50% /boot
> ├─nvme0n1p2 ext4 PhantoNv2Empty 76bc8f68-126c-4a6c-8b77-afc89bd2726a
> ├─nvme0n1p3 swap 24151091-f47a-46e2-a6cb-e5219eddae7c [SWAP]
> └─nvme0n1p4 ext4 PhantoNv4ArchGx 12eec2bf-bc81-48a8-b444-26913c078302 12.6G 71% /
> ---------------------

The `lsblk` program requires root privileges in order to detect file
systems and UUIDs. I'm guessing your distribution makes it setuid root?

To do the same on Guix System, see the "Setuid programs" section of the
manual. You would need something along these lines in your config:

(operating-system
[...]
(setuid-programs (cons #~(string-append #$util-linux "/bin/lsblk"))
%setuid-programs))

Does that work for you?

Toggle quote (11 lines)
> So I tried:
>
> [17:59 ~/bs]$ guix refresh -r util-linux
> guix/build-system/gnu.scm:143:8: findutils would be upgraded from 4.6.0 to 4.7.0
> gnu/packages/commencement.scm:2183:2: binutils would be upgraded from 2.32 to 2.33.1
> gnu/packages/commencement.scm:2244:2: gcc would be upgraded from 7.4.0 to 9.2.0
> gnu/packages/commencement.scm:2142:2: glibc would be upgraded from 2.29 to 2.30
> [18:01 ~/bs]$ guix refresh -ru util-linux
> guix/build-system/gnu.scm:143:8: error: cannot download for this method: #<procedure 7f277de49100 at gnu/packages/bootstrap.scm:155:4 (url hash-algo hash #:opti
> onal name #:key system)>

'guix refresh -u' only works in combination with the './pre-inst-env'
script, because it tries to modify your Guix directly.

In any case util-linux is already the latest version.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl23a7wACgkQoqBt8qM6
VPpQVgf/VsRNYwr98LRSeSDNeLYTP7CpdQUXcijOwxQPLrrsrKZERaMsDlXs3xXk
AZYpgWZlG2N8Zzl3WPSycWDfwEIXU5C/ujJ2Wg0ZwSUpzmOQDIjQRt0diKuduOYg
06A02Mhu312GTlT1zd7AQjeZx/kQbfjR4bom0xjI1O/ZL+IwKS0NxBgRwhZr4GjI
N2C4nFgAt35Y/HGrncyPQrZA5g/2/I8WHZH+0i4zRoHpQxGbLiSMxps58Xk2nF4g
oupJ2NeCwxuurbiFQHwgJls24i04opNaxqamKh41RESjAs008beb3B2CSvQxHczO
C/MZ7PjNQq1T8waKmQUOO8bbl6kPpA==
=TK8/
-----END PGP SIGNATURE-----

Bengt Richter wrote 5 years ago
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 37931@debbugs.gnu.org)
20191102144256.GA931@PhantoNv4ArchGx.localdomain
Attachment: file
Marius Bakke wrote 5 years ago
(name . Bengt Richter)(address . bokr@bokr.com)(address . 37931@debbugs.gnu.org)
87mudcoomv.fsf@devup.no
Bengt Richter <bokr@bokr.com> writes:
Toggle quote (7 lines)
> On +2019-10-28 23:29:16 +0100, Marius Bakke wrote:
>> The `lsblk` program requires root privileges in order to detect file
>> systems and UUIDs. I'm guessing your distribution makes it setuid root?
>>
>
> It doesn't look like it to me (the following snip is from TTY4, where I enabled guix paths and environment,
> so I can see ~/.guix-profile and /usr stuff at the same time):
[...]
Toggle quote (21 lines)
> $ which -a lsblk|xargs readlink -f|xargs stat
> File: /gnu/store/xymkwf57x988q8cny2is1dgzrbr9xdfi-util-linux-2.34/bin/lsblk
> Size: 135560 Blocks: 272 IO Block: 4096 regular file
> Device: 10304h/66308d Inode: 1186253 Links: 2
> Access: (0555/-r-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
> Access: 2019-11-01 02:38:11.782574923 -0700
> Modify: 1969-12-31 16:00:01.000000000 -0800
> Change: 2019-10-08 18:18:48.226579757 -0700
> Birth: -
> File: /usr/bin/lsblk
> Size: 124992 Blocks: 248 IO Block: 4096 regular file
> Device: 10304h/66308d Inode: 264652 Links: 1
> Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
> Access: 2019-11-01 02:38:55.354524750 -0700
> Modify: 2019-06-27 03:04:01.000000000 -0700
> Change: 2019-07-06 00:59:13.620416635 -0700
> Birth: -
> $
> ┌───────────────────────────────────────────────────────────────────┐
> │ I see Access: is 0555 vs 0755, so doubt if that should be changed │
> └───────────────────────────────────────────────────────────────────┘
Indeed, there are no setuid bits there.
I had a look at the lsblkd source code, and found that it has an
optional dependency on udev:
I tried building util-linux with udev support, and got the same output
you expected without needing root privileges:
(define-public util-linux/udev
(package/inherit
util-linux
(name "util-linux-with-udev")
(inputs
`(("udev" ,eudev)
,@(package-inputs util-linux)))))
Now, eudev already depends on util-linux, so adding udev support to the
regular 'util-linux' package would introduce a circular dependency.
I'm not sure what the best approach here is. We could add a
'util-linux-minimal' for use in package inputs, and/or add a
udev-enabled variant to %base-packages.
Thoughts?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl2/DkgACgkQoqBt8qM6
VPqjGAgAuLAmDE0K3mRe+OX8Ue96YpxxitwdqmK+0CbG0P3fMYSmsfGuy11IJIqn
4fqW+Prk0yP991icIV9WIY4LbOVs9diCa3t5iDhQ9ACL1bsMSAyntIOe1DSiYWiD
7Yz5kSnCziAt/qQb487M5fxYdEFQLqC5/1h9cnz28n/0UivLCbrw4RI47aFnOhKD
8/N5MMFmbhSr6xZPFEZRxeaAq+1f0CDs0N9Ok3NUYnCzSDm4882Ira6jUJwTpmKY
uEw0TPVfAn63kKU5+6TR6fFsEPMotwze7UJTmtffq7J3gm87LdcKPTA5AqIi2PpE
UNWoikFcxMIud5QhL1rdRqyoSallCw==
=3LhQ
-----END PGP SIGNATURE-----

Ludovic Courtès wrote 5 years ago
util-linux dependency on udev
(name . Marius Bakke)(address . mbakke@fastmail.com)
877e4d109p.fsf_-_@gnu.org
Hi,

Marius Bakke <mbakke@fastmail.com> skribis:

Toggle quote (23 lines)
> I had a look at the lsblkd source code, and found that it has an
> optional dependency on udev:
>
> https://github.com/karelzak/util-linux/blob/ccafadb7c58865f73d209fcfc74483be96cdf64d/misc-utils/lsblk-properties.c
>
> I tried building util-linux with udev support, and got the same output
> you expected without needing root privileges:
>
> (define-public util-linux/udev
> (package/inherit
> util-linux
> (name "util-linux-with-udev")
> (inputs
> `(("udev" ,eudev)
> ,@(package-inputs util-linux)))))
>
> Now, eudev already depends on util-linux, so adding udev support to the
> regular 'util-linux' package would introduce a circular dependency.
>
> I'm not sure what the best approach here is. We could add a
> 'util-linux-minimal' for use in package inputs, and/or add a
> udev-enabled variant to %base-packages.

I think the latter is fine and can be done right away on ‘master’.

WDYT?

Ludo’.
Bengt Richter wrote 5 years ago
Re: bug#37931: Cannot guix refresh -ru util-linux to get updated lsblk
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 37931@debbugs.gnu.org)
20191106223910.GC55508@PhantoNv4ArchGx.localdomain
Attachment: file
Marius Bakke wrote 5 years ago
(name . Bengt Richter)(address . bokr@bokr.com)(address . 37931-done@debbugs.gnu.org)
87tv55221h.fsf@devup.no
Bengt Richter <bokr@bokr.com> writes:
Toggle quote (67 lines)
> Hi Marius,
>
> On +2019-11-03 18:28:40 +0100, Marius Bakke wrote:
>> Bengt Richter <bokr@bokr.com> writes:
>>
>> > On +2019-10-28 23:29:16 +0100, Marius Bakke wrote:
>> >> The `lsblk` program requires root privileges in order to detect file
>> >> systems and UUIDs. I'm guessing your distribution makes it setuid root?
>> >>
>> >
>> > It doesn't look like it to me (the following snip is from TTY4, where I enabled guix paths and environment,
>> > so I can see ~/.guix-profile and /usr stuff at the same time):
>>
>> [...]
>>
>>
>> > $ which -a lsblk|xargs readlink -f|xargs stat
>> > File: /gnu/store/xymkwf57x988q8cny2is1dgzrbr9xdfi-util-linux-2.34/bin/lsblk
>> > Size: 135560 Blocks: 272 IO Block: 4096 regular file
>> > Device: 10304h/66308d Inode: 1186253 Links: 2
>> > Access: (0555/-r-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
>> > Access: 2019-11-01 02:38:11.782574923 -0700
>> > Modify: 1969-12-31 16:00:01.000000000 -0800
>> > Change: 2019-10-08 18:18:48.226579757 -0700
>> > Birth: -
>> > File: /usr/bin/lsblk
>> > Size: 124992 Blocks: 248 IO Block: 4096 regular file
>> > Device: 10304h/66308d Inode: 264652 Links: 1
>> > Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
>> > Access: 2019-11-01 02:38:55.354524750 -0700
>> > Modify: 2019-06-27 03:04:01.000000000 -0700
>> > Change: 2019-07-06 00:59:13.620416635 -0700
>> > Birth: -
>> > $
>> > ┌───────────────────────────────────────────────────────────────────┐
>> > │ I see Access: is 0555 vs 0755, so doubt if that should be changed │
>> > └───────────────────────────────────────────────────────────────────┘
>>
>> Indeed, there are no setuid bits there.
>>
>> I had a look at the lsblkd source code, and found that it has an
>> optional dependency on udev:
>>
>> https://github.com/karelzak/util-linux/blob/ccafadb7c58865f73d209fcfc74483be96cdf64d/misc-utils/lsblk-properties.c
>>
>> I tried building util-linux with udev support, and got the same output
>> you expected without needing root privileges:
>>
>
> Sounds great ;-)
>
>> (define-public util-linux/udev
>> (package/inherit
>> util-linux
>> (name "util-linux-with-udev")
>> (inputs
>> `(("udev" ,eudev)
>> ,@(package-inputs util-linux)))))
>>
>> Now, eudev already depends on util-linux, so adding udev support to the
>> regular 'util-linux' package would introduce a circular dependency.
>>
>> I'm not sure what the best approach here is. We could add a
>> 'util-linux-minimal' for use in package inputs, and/or add a
>> udev-enabled variant to %base-packages.
>>
>> Thoughts?
This was finally committed in 71e0f1e9adbce4a6476a70bddabf13f6d7af2d40
and 01bb039e7b408893009d15f56cfcbdc8af70a4af.
Toggle quote (8 lines)
>
> I'm a guix newbie :)
>
> I don't yet understand the internal dependency machinery of guix,
> so I'm wondering about the exact nature of the circularity.
>
> Is it really a kind of (let((... that needs to be a let*((...
> at some level? And which level of dependency are we talking about?
The circular dependency is straightforward: eudev *requires* util-linux
as part of its build process. Thus, eudev has util-linux as an input.
That version of util-linux can not depend on eudev, because we can not
build eudev without a working util-linux package.
Wrt the rest of the message, I share your sentiment, and think we will
get there. 'guix build --with-git-url' is pretty close already. :-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4WKioACgkQoqBt8qM6
VPrjCwf/YWSWw+j3Q+ccLMUlPweNo8Lxb+1TUklvhoBuhEuVAV2KVDbrdPgiNZV3
USLTHyoJaKf+XCuOfO6ulwTtsXSKUNBww1G0R7vfAHRJ32ZUvVSdIXM4kQ8gOvxp
RZ922Z5WWzCz4gbyWqBcfW9WqvakC/+HDjzpQv8FGIAKmJAcKiMjCLc+KiZEt2OV
NNbeMVJ/ghDhkgXwl67m19RO6xDbrhchKWJAyttBLuj4UzANCXPwZDSYqQiNqZP3
PrIbAbHhv0JTeLDw5yhfYRbrfax/GlpTHjM1IHLhTq59IfVe86sb1uGwR8nHg69J
m9GfuDQZlgjUn7i/EPpfOpUNpod6wA==
=xlaC
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 37931@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 37931
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help