util-linux runstatedir is not actually a state directory

  • Open
  • quality assurance status badge
Details
3 participants
  • Danny Milosavljevic
  • Leo Famulari
  • Marius Bakke
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal
D
D
Danny Milosavljevic wrote on 2 May 2020 11:55
(address . bug-guix@gnu.org)
20200502115525.1cafc459@scratchpost.org
Hi,

util-linux tries to use a "uuidd" daemon to generate uuids. It tries to
communicate with it via socket in $runstatedir/var/run/uuidd/ .

Unfortunately, we do not set runstatedir which means that we'll uselessly
refer to a socket inside util-linux's derivation output directory that never
will be there.

Better would be to refer to /var/run directly, or to remove that functionality
from our version of util-linux.

Git checkout:
repository: /home/dannym/src/guix-raghav/guix
branch: master
commit: 807986a55fc2849d6986efb79f9a015cf4132e09

I stumbled upon that while trying to get F2FS's fsck to work (bug 41015).
We try to build a static version of f2fs-tools (f2fs-tools-static in
guix master), but it retains a reference from mkfs to the non-static
util-linux because of the problem above.

Details of that part of util-linux:

./libuuid/src/uuidd.h: * Definitions used by the uuidd daemon
./libuuid/src/uuidd.h:#define UUIDD_DIR _PATH_RUNSTATEDIR "/uuidd"
./libuuid/src/uuidd.h:#define UUIDD_PIDFILE_PATH UUIDD_DIR "/uuidd.pid"
./libuuid/src/uuidd.h:#define UUIDD_PATH "/usr/sbin/uuidd"
./libuuid/src/gen_uuid.c:#include "uuidd.h"
./libuuid/src/gen_uuid.c: * Try using the uuidd daemon to generate the UUID
./libuuid/src/gen_uuid.c: * Tries to guarantee uniqueness of the generated UUIDs
by obtaining them from the uuidd daemon,
./libuuid/src/gen_uuid.c: * or, if uuidd is not usable, by using the global cloc
k state counter (see get_clock()).
UUIDD_SOCKET_PATH
./libuuid/src/uuidd.h:#define UUIDD_SOCKET_PATH UUIDD_DIR "/request"
./libuuid/src/uuidd.h:#define UUIDD_DIR _PATH_RUNSTATEDIR "/uuidd"

/gnu/store/xymkwf57x988q8cny2is1dgzrbr9xdfi-util-linux-2.34/var/run/uuidd
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6tQ40ACgkQ5xo1VCww
uqXGywf9FX5TdCu6jJs2LWU6+Dl+X2vAM8IphTpJ8Jit+TtB6Taon5Z3YafDPffV
tygtdvwnvP4yZIx86fmGeCHZCz7/Su+rEYOPqMDFIONsgwKr4Hn8Of+inFGAkk30
zMuM9JaBUGhCU71nuw3rxi1951uNARA2bLM2SW0PGuib1cMgXgj66X9DutcqsrnA
+xwUh9IjUDix/sptKsG6ikg27elT21Or90oFdBNqUTQL3QDC5soW5OVfwakg5wtA
cxPbGhvcw2uqqzf5CrJ5edNsY3lrswFyQKl6MT4kYbXpci/MZZTKQl+IkypvNOlB
c23WUhjO/n/sO+H4SRzdZuAviR/nng==
=7IAg
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 2 May 2020 12:14
(address . 41019@debbugs.gnu.org)
20200502121409.3e458a57@scratchpost.org
Note: once that bug is fixed, still have to add:

Toggle diff (14 lines)
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 44ee4f10aa..6a1840dbf6 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -245,6 +245,9 @@ FILE-SYSTEMS."
'())
,@(if (find (file-system-type-predicate "jfs") file-systems)
(list jfs_fsck/static)
+ '())
+ ,@(if (find (file-system-type-predicate "f2fs") file-systems)
+ (list f2fs-fsck/static)
'())))
(define-syntax vhash ;TODO: factorize
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6tR/EACgkQ5xo1VCww
uqWYpQgAkjtF/qwvT6FTsrPmYvWkW8iVyA/4e7Sjj7J0xAqYl7ueTvBaLIMV0Q2j
wUsPUk5nq/qq8OzwREKeYeqPqCgy4XMwS6Qhgoe6r94SESYub66/FsOTsX3EDY57
qi9yRcN3Sa9YrIGXvCrM6+mubFfAQ1hq6ZDp1qIS0+pBjP/CvgbZsnccJjlh9w58
VmAvYR93xd5gE8RXDJRhecii5UfCCZ0ON+OT7MyyIF3nVxAYazM0txIyW6YI24K+
P2x5GQazf3zbsLgHrj0vCALrgpzKjT5LXBkyDu6FVRJW90BMkKzNvm0zrFedsYtk
NLBsGJDdMPWG6LxxtV/uxPVSXR9E6g==
=FdpL
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 4 May 2020 00:14
(address . 41019@debbugs.gnu.org)
20200504001444.19925c30@scratchpost.org
Toggle quote (15 lines)
> Note: once that bug is fixed, still have to add:
>
> diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
> index 44ee4f10aa..6a1840dbf6 100644
> --- a/gnu/system/linux-initrd.scm
> +++ b/gnu/system/linux-initrd.scm
> @@ -245,6 +245,9 @@ FILE-SYSTEMS."
> '())
> ,@(if (find (file-system-type-predicate "jfs") file-systems)
> (list jfs_fsck/static)
> + '())
> + ,@(if (find (file-system-type-predicate "f2fs") file-systems)
> + (list f2fs-fsck/static)
> '())))

Added that in guix master in commit 33eab4a10dcd2a6580f168f18455df1d4653d14b.

Also added horrible workaround for this bug in commit
da09c63e78ebebeabb347f483d7284b87ff51c2f.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6vQlQACgkQ5xo1VCww
uqUnSgf+KTdNy1ZXoyTRzs7jwelNMsGmfyZUBhGE3EZxC2IDSF+w0mxk8lYBm7Cs
POFqHYBraoP7OW4EPotwbFknM1uPC6h5JFm1LWWu0IMWNl+nj0UsYu08fYi+2uVx
Iu1hmxKXD0u416AXeqYGQVolfrLaIepTxSJnuBUzTA/QyAetZUXny8kwfE00KaF+
mF7TOJzS/h3FbN9qO2YBX3mJNPvKFnzJNlTrgxIa1poaQKgr/HafTUA20l3WJv0Y
D7n3VEnEc2MF1Ll2hQMfKI1S5uQL5KTo0YOYkeh68NZV3O978yOdJSfusBX8fhY0
yFhJUdWgf6rA3WvVwm5t/IMMoPGrMg==
=TRYV
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 5 May 2020 18:17
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 41019@debbugs.gnu.org)
20200505161716.GC31092@jasmine.lan
On Mon, May 04, 2020 at 12:14:44AM +0200, Danny Milosavljevic wrote:
Toggle quote (3 lines)
> Also added horrible workaround for this bug in commit
> da09c63e78ebebeabb347f483d7284b87ff51c2f.

Do you want to leave the bug ticket open? Or is it "done"?
D
D
Danny Milosavljevic wrote on 5 May 2020 19:16
(name . Leo Famulari)(address . leo@famulari.name)(address . 41019@debbugs.gnu.org)
20200505191650.1ecce3ee@scratchpost.org
I'd prefer if we left the bug report still open and eventually fixed this
bug--although util-linux has a huge number of dependents.

The workaround is just removing the store reference from the executable file,
after the fact.
I mean it works because then libuuid.a can't find the socket for uuidd using
the name "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", but that's not the right way :P
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6xn4IACgkQ5xo1VCww
uqXV0wgAgvBXcEnjS4TFVphrZBMWgWG4KSa+qRT/88ILc+B2AaWdK4suZBv2ibtP
wXORFyMgZ6vUrIW2kYxIqjrLX/g3jAe8mM+DKZGQNfV96c+wPFZl4DGEmJiblz/s
+YJr1FH8NWCJVYop9i1PkviHKI7w9A1QaTo38BUcWtr2KR+gca4hc8vccXqrWKoR
RDGX/QRHLfN4UHuhVUuoGggxBHto7Cq8P6+xVo+r6p7lmgdNpBESw3WJ/jtCKHGS
l5ySxvObGGT4jogQTxAVCRljwnM1ogurkNixYAmGB1b2Txjk3LZpJQfUI+H03h++
usbXkcy9BNBSyZfoN4lqH9lBrvp/lg==
=tIFP
-----END PGP SIGNATURE-----


M
M
Marius Bakke wrote on 5 May 2020 20:08
(address . 41019@debbugs.gnu.org)
87ftcexnj0.fsf@devup.no
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (3 lines)
> I'd prefer if we left the bug report still open and eventually fixed this
> bug--although util-linux has a huge number of dependents.

You could create a 'util-linux/fixed' variable for this package if you
know how to fix it, and merge it with util-linux in the next
core-updates round.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6xq6MACgkQoqBt8qM6
VPrS7ggAznngKifjl1+SL0+HqvMHSYmZ5pEiZrCjdn8Mz1DRgHXmpbfF0b1wjaTz
JWyVhN/iWlXwNm52EbKWLdKEqwfn/M7n0PKRhC21h7y/j+dP4x6AYryaZAJuJzEz
bgZPuuDHjyjs3Mu8A/XfbJKiD3a6n6iTkELPbmAwl1hiAQeKQJpLGPw9D3cWUg0C
thEBy+RdNPkGx5Z/538X34yJVQxxXlKdDgZhWf4uh6tBgEB4XTXdqKUXx5dyDiZx
3Vs2kFITYZBhv0B3zLe8feCrwjGsO+jj5u6GFukHADEmYjbs6gcKroTEjgsoJ8ra
uj7UtVXXXaK/R767kGsfz4Foa/qncA==
=S2X0
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

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

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