legends-of-equestria: init at 2024.05.01 (#296316)
[NixPkgs.git] / pkgs / os-specific / linux / udisks / fix-paths.patch
blob76d44b96d551a2205028454ac550fea45d0f1154
1 diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules
2 index ca802cce..bfd1c29e 100644
3 --- a/data/80-udisks2.rules
4 +++ b/data/80-udisks2.rules
5 @@ -17,9 +17,9 @@ ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="?*", GOTO="udisks_probe_end"
7 # TODO: file bug against mdadm(8) to have --export-prefix option that can be used with e.g. UDISKS_MD_MEMBER
9 -SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="raid", ENV{ID_FS_TYPE}=="linux_raid_member", ENV{UDISKS_MD_MEMBER_LEVEL}=="", IMPORT{program}="/bin/sh -c '/sbin/mdadm --examine --export $tempnode | /bin/sed s/^MD_/UDISKS_MD_MEMBER_/g'"
10 +SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="raid", ENV{ID_FS_TYPE}=="linux_raid_member", ENV{UDISKS_MD_MEMBER_LEVEL}=="", IMPORT{program}="@sh@ -c '@mdadm@ --examine --export $tempnode | @sed@ s/^MD_/UDISKS_MD_MEMBER_/g'"
12 -SUBSYSTEM=="block", KERNEL=="md*", ENV{DEVTYPE}!="partition", IMPORT{program}="/bin/sh -c '/sbin/mdadm --detail --export $tempnode | /bin/sed s/^MD_/UDISKS_MD_/g'"
13 +SUBSYSTEM=="block", KERNEL=="md*", ENV{DEVTYPE}!="partition", IMPORT{program}="@sh@ -c '@mdadm@ --detail --export $tempnode | @sed@ s/^MD_/UDISKS_MD_/g'"
15 LABEL="udisks_probe_end"
17 diff --git a/src/tests/test.c b/src/tests/test.c
18 index 3ddbdf2c..a87f960a 100644
19 --- a/src/tests/test.c
20 +++ b/src/tests/test.c
21 @@ -71,7 +71,7 @@ test_spawned_job_successful (void)
23 UDisksSpawnedJob *job;
25 - job = udisks_spawned_job_new ("/bin/true", NULL, getuid (), geteuid (), NULL, NULL);
26 + job = udisks_spawned_job_new ("@true@", NULL, getuid (), geteuid (), NULL, NULL);
27 udisks_spawned_job_start (job);
28 _g_assert_signal_received (job, "completed", G_CALLBACK (on_completed_expect_success), NULL);
29 g_object_unref (job);
30 @@ -84,10 +84,10 @@ test_spawned_job_failure (void)
32 UDisksSpawnedJob *job;
34 - job = udisks_spawned_job_new ("/bin/false", NULL, getuid (), geteuid (), NULL, NULL);
35 + job = udisks_spawned_job_new ("@false@", NULL, getuid (), geteuid (), NULL, NULL);
36 udisks_spawned_job_start (job);
37 _g_assert_signal_received (job, "completed", G_CALLBACK (on_completed_expect_failure),
38 - (gpointer) "Command-line `/bin/false' exited with non-zero exit status 1: ");
39 + (gpointer) "Command-line `@false@' exited with non-zero exit status 1: ");
40 g_object_unref (job);
43 @@ -119,7 +119,7 @@ test_spawned_job_cancelled_at_start (void)
45 cancellable = g_cancellable_new ();
46 g_cancellable_cancel (cancellable);
47 - job = udisks_spawned_job_new ("/bin/true", NULL, getuid (), geteuid (), NULL, cancellable);
48 + job = udisks_spawned_job_new ("@true@", NULL, getuid (), geteuid (), NULL, cancellable);
49 udisks_spawned_job_start (job);
50 _g_assert_signal_received (job, "completed", G_CALLBACK (on_completed_expect_failure),
51 (gpointer) "Operation was cancelled (g-io-error-quark, 19)");
52 @@ -144,7 +144,7 @@ test_spawned_job_cancelled_midway (void)
53 GCancellable *cancellable;
55 cancellable = g_cancellable_new ();
56 - job = udisks_spawned_job_new ("/bin/sleep 0.5", NULL, getuid (), geteuid (), NULL, cancellable);
57 + job = udisks_spawned_job_new ("@sleep@ 0.5", NULL, getuid (), geteuid (), NULL, cancellable);
58 udisks_spawned_job_start (job);
59 g_timeout_add (10, on_timeout, cancellable); /* 10 msec */
60 _g_assert_signal_received (job, "completed", G_CALLBACK (on_completed_expect_failure),
61 @@ -197,7 +197,7 @@ test_spawned_job_premature_termination (void)
63 UDisksSpawnedJob *job;
65 - job = udisks_spawned_job_new ("/bin/sleep 1000", NULL, getuid (), geteuid (), NULL, NULL /* GCancellable */);
66 + job = udisks_spawned_job_new ("@sleep@ 1000", NULL, getuid (), geteuid (), NULL, NULL /* GCancellable */);
67 udisks_spawned_job_start (job);
68 g_object_unref (job);