glib propagates util-linux

  • Done
  • quality assurance status badge
Details
3 participants
  • Diego Nicola Barbato
  • Ludovic Courtès
  • Marius Bakke
Owner
unassigned
Submitted by
Diego Nicola Barbato
Severity
important
D
D
Diego Nicola Barbato wrote on 13 Oct 2019 13:40
mps-youtube propagates util-linux
(address . bug-guix@gnu.org)
875zks27rf.fsf@GlaDOS.home
Hi Guix,

An unfortunate chain of propagated-inputs causes 'util-linux' (mount,
umount, etc.) to be installed alongside 'mps-youtube': 'mps-youtube'
propagates 'python-pygobject', which propagates 'glib', which propagates
'util-linux'. It seems to have been introduced with commit 6c237a2,
when 'util-linux' was moved to the propagated-inputs of 'glib'.

This is a problem on foreign distributions, where the stowaway 'mount'
and 'umount' commands installed by Guix shadow the setuid ones provided
by the distro.

I am currently on commit ecf3a3a (post core-updates merge).

Regards,

Diego
M
M
Marius Bakke wrote on 13 Oct 2019 16:26
878spo3en3.fsf@devup.no
Hello Diego,

Thanks for the report!

Diego Nicola Barbato <dnbarbato@posteo.de> writes:

Toggle quote (12 lines)
> Hi Guix,
>
> An unfortunate chain of propagated-inputs causes 'util-linux' (mount,
> umount, etc.) to be installed alongside 'mps-youtube': 'mps-youtube'
> propagates 'python-pygobject', which propagates 'glib', which propagates
> 'util-linux'. It seems to have been introduced with commit 6c237a2,
> when 'util-linux' was moved to the propagated-inputs of 'glib'.
>
> This is a problem on foreign distributions, where the stowaway 'mount'
> and 'umount' commands installed by Guix shadow the setuid ones provided
> by the distro.

I have attached a WIP patch that fixes this "long term", by moving the
util-linux libraries to a separate output. It rebuilds 7753 packages
and is intended for the 'core-updates' branch.
The size of 'fontconfig' (as reported by `guix size`) decreases from
103.6 MiB to 92.1 MiB with this patch. \o/

Short term I'm not sure what to do. Perhaps we can add a
"glib-sans-util-linux" variant that does not propagate util-linux? Or a
variant that propagates a util-linux-sans-binaries?

Diego: one work-around you can try in the meantime is to create a
~/setuid-programs, add it first on PATH, and symlink the required
binaries in there. Sorry for the inconvenience!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl2jNCAACgkQoqBt8qM6
VPpHXggAlC6rqVd2hB4qSJOKFkhTwPvLk7LL9ewHjT6DJWae5IfVdrLcIvr5I8mC
nd4r3REdQKR70AYazaAj8WhxqTI8ZVsR9uFJUxiXgxdMZeH/Mi+W1N2Q6YTVkU3M
Z94CSHCoF0c1cimYBnVtZRrI1zW9anXlkhU8AgRKeU6FNYB9HMByldWj/fYHTo6U
HhE9RkVECQz9YRWw1BHR1B/U6UT6TwsPenSRVltEkfGFlk+bR9HHu9PoDYSrQmJx
ZjLCcE6gxjMiXw/Jaw6FPP/X+n8ih9Q7epcfvSaXLf2ElcWTh+jPcoZ6f0bFgtys
7B8JLvxQ/chNjXxmTFI0F/QkpPpO1w==
=QuVo
-----END PGP SIGNATURE-----

D
D
Diego Nicola Barbato wrote on 15 Oct 2019 16:29
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 37732@debbugs.gnu.org)
87ftjuytdh.fsf@GlaDOS.home
Hello Marius,

Marius Bakke <mbakke@fastmail.com> writes:


[...]


Toggle quote (4 lines)
> Diego: one work-around you can try in the meantime is to create a
> ~/setuid-programs, add it first on PATH, and symlink the required
> binaries in there. Sorry for the inconvenience!

No worries. I have simply removed 'mps-youtube' from my profile and use
it with 'guix environment --ad-hoc mps-youtube -- mpsyt' instead. The
difficult part was finding out which package propagated 'util-linux'. I
used 'emacs-guix' and lucky guesses to find it (fortunately the profile
only contained 12 packages).

Is there a more convenient way to recursively show all propagated-inputs
of a given package? It would be interesting to check how prevalent this
propagation pollution is (another example that comes to mind is 'jami',
which installs 125 programs under bin/, of which only about half can be
attributed to 'util-linux').

Thanks,

Diego
L
L
Ludovic Courtès wrote on 1 Nov 2019 15:33
control message for bug #37732
(address . control@debbugs.gnu.org)
87tv7nbr9i.fsf@gnu.org
retitle 37732 glib propagates util-linux
quit
L
L
Ludovic Courtès wrote on 1 Nov 2019 15:33
(address . control@debbugs.gnu.org)
87sgn7br9e.fsf@gnu.org
severity 37732 important
quit
L
L
Ludovic Courtès wrote on 1 Nov 2019 15:41
Re: bug#37732: mps-youtube propagates util-linux
(name . Marius Bakke)(address . mbakke@fastmail.com)
87eeyrbqw5.fsf@gnu.org
Hi!

Marius Bakke <mbakke@fastmail.com> skribis:

Toggle quote (10 lines)
> Diego Nicola Barbato <dnbarbato@posteo.de> writes:
>
>> Hi Guix,
>>
>> An unfortunate chain of propagated-inputs causes 'util-linux' (mount,
>> umount, etc.) to be installed alongside 'mps-youtube': 'mps-youtube'
>> propagates 'python-pygobject', which propagates 'glib', which propagates
>> 'util-linux'. It seems to have been introduced with commit 6c237a2,
>> when 'util-linux' was moved to the propagated-inputs of 'glib'.

Do we know why this commit moved ‘util-linux’ to propagated-inputs?
Presumably because of this line in ‘gio-2.0.pc’, right?

Requires.private: gmodule-no-export-2.0, zlib, mount >= 2.23, libselinux

If it’s “just” because of this, I’d say we don’t need to propagate
‘util-linux’: we only build shared libraries for GLib anyway, so none of
our packages actually use ‘Requires.private’. If we were to add
packages requiring it, it’s fine to just add ‘mount’ as an explicit
inputs of these packages IMO.

We could follow the same reasoning for the other things that are
propagated due to their being listed in ‘Requires.private’.

Thoughts?

Moving ‘util-linux’ back to ‘inputs’ could perhaps be done on the next
‘staging’ or on ‘core-updates’.

Toggle quote (20 lines)
> I have attached a WIP patch that fixes this "long term", by moving the
> util-linux libraries to a separate output. It rebuilds 7753 packages
> and is intended for the 'core-updates' branch.
>
> From b9cbe08694ddd8248ac32ce60d5fc40d5c619a54 Mon Sep 17 00:00:00 2001
> From: Marius Bakke <mbakke@fastmail.com>
> Date: Sun, 13 Oct 2019 16:07:44 +0200
> Subject: [PATCH] gnu: util-linux: Move libraries to separate output.
>
> Fixes <https://bugs.gnu.org/37732>.
> Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.
>
> * gnu/packages/linux.scm (util-linux)[outputs]: Add "dev".
> [arguments]: Update #:configure-flags accordingly. Add phase
> "adjust-bindirs", and rename "move-static-libraries" to "move-libraries",
> while adding a substitution for the .pc files.
> * gnu/packages/fontutils.scm (fontconfig)[propagated-inputs]: Use the "dev"
> output of UTIL-LINUX.
> * gnu/packages/glib.scm (glib)[propagated-inputs]: Likewise.

[...]

Toggle quote (12 lines)
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -1089,19 +1089,40 @@ providing the system administrator with some help in common tasks.")
> (("build_kill=yes") "build_kill=no"))
> #t))))
> (build-system gnu-build-system)
> - (outputs '("out"
> - "static")) ; >2 MiB of static .a libraries
> + (outputs '("out" ;6.4 MiB executables and documentation
> + "dev" ;8.8 MiB shared libraries, headers and locales
> + "static")) ;2.9 MiB static .a libraries

Shared libraries are not just for development, so I’d say it should be
“lib” instead, no?

Thanks,
Ludo’.
M
M
Marius Bakke wrote on 3 Nov 2019 17:47
(name . Ludovic Courtès)(address . ludo@gnu.org)
875zk0q53t.fsf@devup.no
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (19 lines)
> Hi!
>
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> Diego Nicola Barbato <dnbarbato@posteo.de> writes:
>>
>>> Hi Guix,
>>>
>>> An unfortunate chain of propagated-inputs causes 'util-linux' (mount,
>>> umount, etc.) to be installed alongside 'mps-youtube': 'mps-youtube'
>>> propagates 'python-pygobject', which propagates 'glib', which propagates
>>> 'util-linux'. It seems to have been introduced with commit 6c237a2,
>>> when 'util-linux' was moved to the propagated-inputs of 'glib'.
>
> Do we know why this commit moved ‘util-linux’ to propagated-inputs?
> Presumably because of this line in ‘gio-2.0.pc’, right?
>
> Requires.private: gmodule-no-export-2.0, zlib, mount >= 2.23, libselinux

I assume so.

Toggle quote (11 lines)
> If it’s “just” because of this, I’d say we don’t need to propagate
> ‘util-linux’: we only build shared libraries for GLib anyway, so none of
> our packages actually use ‘Requires.private’. If we were to add
> packages requiring it, it’s fine to just add ‘mount’ as an explicit
> inputs of these packages IMO.
>
> We could follow the same reasoning for the other things that are
> propagated due to their being listed in ‘Requires.private’.
>
> Thoughts?

Right. You know, I had forgotten that Requires.private were for static
libraries. Thanks for pointing that out. I think quite a few packages
propagate Requires.private dependencies without using static libraries.

Something to watch out for in the ongoing quest to purge static
libraries from Guix.

Toggle quote (3 lines)
> Moving ‘util-linux’ back to ‘inputs’ could perhaps be done on the next
> ‘staging’ or on ‘core-updates’.

util-linux now has 7880 dependent packages, as 'fontconfig' recently
started depending on it. So it must go through 'core-updates'. Luckily
that branch is slated to start by the end of this month, so the waiting
time should not be too long.

Toggle quote (37 lines)
>> I have attached a WIP patch that fixes this "long term", by moving the
>> util-linux libraries to a separate output. It rebuilds 7753 packages
>> and is intended for the 'core-updates' branch.
>>
>> From b9cbe08694ddd8248ac32ce60d5fc40d5c619a54 Mon Sep 17 00:00:00 2001
>> From: Marius Bakke <mbakke@fastmail.com>
>> Date: Sun, 13 Oct 2019 16:07:44 +0200
>> Subject: [PATCH] gnu: util-linux: Move libraries to separate output.
>>
>> Fixes <https://bugs.gnu.org/37732>.
>> Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.
>>
>> * gnu/packages/linux.scm (util-linux)[outputs]: Add "dev".
>> [arguments]: Update #:configure-flags accordingly. Add phase
>> "adjust-bindirs", and rename "move-static-libraries" to "move-libraries",
>> while adding a substitution for the .pc files.
>> * gnu/packages/fontutils.scm (fontconfig)[propagated-inputs]: Use the "dev"
>> output of UTIL-LINUX.
>> * gnu/packages/glib.scm (glib)[propagated-inputs]: Likewise.
>
> [...]
>
>> --- a/gnu/packages/linux.scm
>> +++ b/gnu/packages/linux.scm
>> @@ -1089,19 +1089,40 @@ providing the system administrator with some help in common tasks.")
>> (("build_kill=yes") "build_kill=no"))
>> #t))))
>> (build-system gnu-build-system)
>> - (outputs '("out"
>> - "static")) ; >2 MiB of static .a libraries
>> + (outputs '("out" ;6.4 MiB executables and documentation
>> + "dev" ;8.8 MiB shared libraries, headers and locales
>> + "static")) ;2.9 MiB static .a libraries
>
> Shared libraries are not just for development, so I’d say it should be
> “lib” instead, no?

Agreed. Will adjust this patch accordingly once I get around to start
working on 'core-updates'. :-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl2/BKYACgkQoqBt8qM6
VPr73Qf/TAyTfm9Nv5zHKQZ6U2NJB9GUIg0lxIKB9HH/O0qzxgS2svJlxR/kzxn/
b+ldgZ5tLkvpGBekV48W+h4endb3bB8OldYbRH3C0esSZA3YuBTjPABulmbRcygi
mNN9e/EDCxkDG/zHlDB3u9ZQCdaDZ8IdCjaCCY9neagANd+mcmQ92/S9UPn+AzpG
ETM0qserK5DtOr5BIZdbLXy7YfAiZk/FRrlF+w1FxotEpz1FJdiuMOiGjyOr6qBi
PpLp+SaKPgcnjZsO5UegYHv6rKRRa2GEtct6J7Oz6RYHeomFG4+sOhzMgGG9poi8
4PQ/WZnS9sgxP5Auf30wOdFWnKPFQg==
=7JWZ
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 15 Jan 2020 00:39
(name . Ludovic Courtès)(address . ludo@gnu.org)
87o8v5vc9i.fsf@devup.no
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (18 lines)
>>> --- a/gnu/packages/linux.scm
>>> +++ b/gnu/packages/linux.scm
>>> @@ -1089,19 +1089,40 @@ providing the system administrator with some help in common tasks.")
>>> (("build_kill=yes") "build_kill=no"))
>>> #t))))
>>> (build-system gnu-build-system)
>>> - (outputs '("out"
>>> - "static")) ; >2 MiB of static .a libraries
>>> + (outputs '("out" ;6.4 MiB executables and documentation
>>> + "dev" ;8.8 MiB shared libraries, headers and locales
>>> + "static")) ;2.9 MiB static .a libraries
>>
>> Shared libraries are not just for development, so I’d say it should be
>> “lib” instead, no?
>
> Agreed. Will adjust this patch accordingly once I get around to start
> working on 'core-updates'. :-)

I opted for a more conventional "lib" output and pushed the patch to the
'core-updates' branch in bb93042c8beb881ab907fa802eefb3c4091039a2.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4eUSkACgkQoqBt8qM6
VPrDgQf+Le+dXvRfJznouqC0341vcda6s5lHp7B6zGF1Khdmdhk4rEH7TwLdh4/T
08iaql3Yb/iXwrU5aFaVyy3/WoH9uveu86zNYczmcg7vJeUQVAc03Y1gxV/hLCwj
PiVWIlJImv1J9eeW1qmYt6lvjCZNFEaiFB7W7K51Vsb0fMfT4MDXlCCJWrc2gTbh
GQLyTYwG/WjWscftxB+FPztI9zUeAz1APaIhAnOde/sfYLnG2KptxR7g6GXhfJ+q
mQkhAf70KieOB+YVQ8VRy37uwvCNZvuhmqj5qCOY2vde/DH8qciSnb62HMXoCefA
v4ev/5sRuHKj6A5TJBhlQ0Y/iUnGzA==
=Y2AJ
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 37732
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