Page MenuHomePhabricator

e 22+ meson: Program "/usr/sbin/" not found or not executable
Closed, ResolvedPublic


Switching an ebuild from autotools to meson I ran into build issues with E under meson. It seems to be looking for a file that does not exist on Gentoo. This does not seem to be a fatal or blocking issue for autotools.

Program found: NO
Program /etc/acpi/ found: NO
Program /sbin/ found: NO
Program /usr/sbin/ found: NO

Meson encountered an error in file data/etc/, line 24, column 4:
Program "/usr/sbin/" not found or not executable

I do have /bin/sleep and /usr/bin/sleep, but it is a binary not a script. I do have acpi and pm-utils. Not sure what provides, if something should, if I need it. Seems to only matter to meson. Maybe should not be blocking, fatal error?

wltjr created this task.Oct 13 2017, 12:30 PM

Looks like this should be a conditional on install-sysactions. E does not use that file directly. It is only referenced in data/etc/sysactions.conf. Thus the in data/etc/ having the sleep bit. Which should likely be optional on the global sleep variable from the master/root

wltjr added a comment.Oct 13 2017, 1:18 PM

This should fix it

diff --git a/data/etc/ b/data/etc/
index b5a43a5cf..14baf7253 100644
--- a/data/etc/
+++ b/data/etc/
@@ -21,7 +21,7 @@ else
     SUSPEND   = '/usr/bin/systemctl suspend'
     HIBERNATE = '/usr/bin/systemctl hibernate'
-    sleep = find_program('', '/etc/acpi/', '/sbin/', '/usr/sbin/')
+    sleep = find_program('', '/etc/acpi/', '/sbin/', '/usr/sbin/', required : false)
     if sleep.found() == true
       SUSPEND = sleep.path()
       if sleep.path() == '/etc/acpi/'
@@ -34,7 +34,7 @@ else

-    hibernate_sh = find_program('', '/etc/acpi/', '/sbin/', '/usr/sbin/')
+    hibernate_sh = find_program('', '/etc/acpi/', '/sbin/', '/usr/sbin/', required : false)
     if hibernate_sh.found() == true
       HIBERNATE = hibernate_sh.path()
       if hibernate_sh.path() == '/etc/acpi/'
wltjr added a comment.Oct 13 2017, 1:27 PM

As a patch

or Differential Added the wrong way :P

zmike added a subscriber: raster.Oct 18 2017, 6:07 AM

@raster what do you think about this?

this patch makes sense. these shell scripts are optional, not needed. it's one of various helper tools searched for to generate a sysactions.conf file that is appropriate for your system (without packagers having to hand edit one for integration).