gnu: enlightenment: Update to 0.23.0.

* gnu/packages/enlightenment.scm (enlightenment): Update to 0.23.0.
[build-system]: Switch to meson-build-system.
[arguments]: Add configure-flag to build without systemd.  Remove
'bootstrap phase.  Update substitutions in custom
'set-system-actions phase.
[inputs]: Add bluez, pulseaudio.
* gnu/packages/patches/enlightenment-fix-setuid-path.patch: Update.
* gnu/services/desktop.scm (enlightenment-setuid-programs): Update
location of 'freqset binary.  Add 'cpuclock_sys to setuid binaries.
This commit is contained in:
Efraim Flashner 2019-08-28 11:14:30 +03:00
parent 3ecbda71aa
commit dd2031169a
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
3 changed files with 100 additions and 35 deletions

View File

@ -273,7 +273,7 @@ Libraries with some extra bells and whistles.")
(define-public enlightenment (define-public enlightenment
(package (package
(name "enlightenment") (name "enlightenment")
(version "0.22.4") (version "0.23.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (uri
@ -281,12 +281,14 @@ Libraries with some extra bells and whistles.")
"enlightenment/enlightenment-" version ".tar.xz")) "enlightenment/enlightenment-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0ygy891rrw5c7lhk539nhif77j88phvz2h0fhx172iaridy9kx2r")) "1y7x594gvyvl5zbb1rnf3clj2pm6j97n8wl5mp9x6xjmhx0d1idq"))
(patches (search-patches "enlightenment-fix-setuid-path.patch")))) (patches (search-patches "enlightenment-fix-setuid-path.patch"))))
(build-system gnu-build-system) (build-system meson-build-system)
(arguments (arguments
`(#:phases `(#:configure-flags '("-Dsystemd=false")
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'bootstrap) ; We don't want to run the autogen script.
(add-before 'configure 'set-system-actions (add-before 'configure 'set-system-actions
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(setenv "HOME" "/tmp") (setenv "HOME" "/tmp")
@ -294,6 +296,7 @@ Libraries with some extra bells and whistles.")
(setxkbmap (assoc-ref inputs "setxkbmap")) (setxkbmap (assoc-ref inputs "setxkbmap"))
(utils (assoc-ref inputs "util-linux")) (utils (assoc-ref inputs "util-linux"))
(libc (assoc-ref inputs "libc")) (libc (assoc-ref inputs "libc"))
(bluez (assoc-ref inputs "bluez"))
(efl (assoc-ref inputs "efl"))) (efl (assoc-ref inputs "efl")))
;; We need to patch the path to 'base.lst' to be able ;; We need to patch the path to 'base.lst' to be able
;; to switch the keyboard layout in E. ;; to switch the keyboard layout in E.
@ -314,12 +317,14 @@ Libraries with some extra bells and whistles.")
(string-append efl "/bin/edje_cc -v %s %s %s\""))) (string-append efl "/bin/edje_cc -v %s %s %s\"")))
(substitute* "src/modules/everything/evry_plug_apps.c" (substitute* "src/modules/everything/evry_plug_apps.c"
(("/usr/bin/") "")) (("/usr/bin/") ""))
(substitute* "configure" (substitute* "data/etc/meson.build"
(("/bin/mount") (string-append utils "/bin/mount")) (("/bin/mount") (string-append utils "/bin/mount"))
(("/bin/umount") (string-append utils "/bin/umount")) (("/bin/umount") (string-append utils "/bin/umount"))
(("/usr/bin/eject") (string-append utils "/bin/eject")) (("/usr/bin/eject") (string-append utils "/bin/eject"))
(("/etc/acpi/sleep.sh force") "/run/current-system/profile/bin/loginctl suspend") (("/usr/bin/l2ping") (string-append bluez "/bin/l2ling"))
(("/etc/acpi/hibernate.sh force") "/run/current-system/profile/bin/loginctl hibernate") (("/bin/rfkill") (string-append utils "/sbin/rfkill"))
(("SUSPEND = ''") "SUSPEND = '/run/current-system/profile/bin/loginctl suspend'")
(("HIBERNATE = ''") "HIBERNATE = '/run/current-system/profile/bin/loginctl hibernate'")
(("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now") (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now")
(("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now")) (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now"))
#t)))))) #t))))))
@ -329,12 +334,14 @@ Libraries with some extra bells and whistles.")
("util-linux" ,util-linux))) ("util-linux" ,util-linux)))
(inputs (inputs
`(("alsa-lib" ,alsa-lib) `(("alsa-lib" ,alsa-lib)
("bluez" ,bluez)
("dbus" ,dbus) ("dbus" ,dbus)
("efl" ,efl) ("efl" ,efl)
("freetype" ,freetype) ("freetype" ,freetype)
("libxcb" ,libxcb) ("libxcb" ,libxcb)
("libxext" ,libxext) ("libxext" ,libxext)
("linux-pam" ,linux-pam) ("linux-pam" ,linux-pam)
("puleseaudio" ,pulseaudio)
("setxkbmap" ,setxkbmap) ("setxkbmap" ,setxkbmap)
("xcb-util-keysyms" ,xcb-util-keysyms) ("xcb-util-keysyms" ,xcb-util-keysyms)
("xkeyboard-config" ,xkeyboard-config))) ("xkeyboard-config" ,xkeyboard-config)))

View File

@ -28,7 +28,7 @@ index 2bced6766..208e583ba 100644
} }
#endif // HAVE_EEZE || __FreeBSD_kernel__ #endif // HAVE_EEZE || __FreeBSD_kernel__
diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c
index b7d9e3eba..d8a9eb82c 100644 index 0fcffa249..c1921121d 100644
--- a/src/bin/e_fm/e_fm_main_eeze.c --- a/src/bin/e_fm/e_fm_main_eeze.c
+++ b/src/bin/e_fm/e_fm_main_eeze.c +++ b/src/bin/e_fm/e_fm_main_eeze.c
@@ -318,7 +318,7 @@ _e_fm_main_eeze_volume_eject(E_Volume *v) @@ -318,7 +318,7 @@ _e_fm_main_eeze_volume_eject(E_Volume *v)
@ -59,10 +59,10 @@ index b7d9e3eba..d8a9eb82c 100644
} }
v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v); v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v);
diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c
index 6781a9b5a..8cd140f1b 100644 index 671fbcd9a..90ee04cf1 100644
--- a/src/bin/e_sys.c --- a/src/bin/e_sys.c
+++ b/src/bin/e_sys.c +++ b/src/bin/e_sys.c
@@ -653,20 +653,16 @@ _e_sys_cb_timer(void *data EINA_UNUSED) @@ -702,20 +702,16 @@ _e_sys_cb_timer(void *data EINA_UNUSED)
e_init_status_set(_("Checking System Permissions")); e_init_status_set(_("Checking System Permissions"));
snprintf(buf, sizeof(buf), snprintf(buf, sizeof(buf),
@ -87,9 +87,9 @@ index 6781a9b5a..8cd140f1b 100644
_e_sys_hibernate_check_exe = ecore_exe_run(buf, NULL); _e_sys_hibernate_check_exe = ecore_exe_run(buf, NULL);
return ECORE_CALLBACK_CANCEL; return ECORE_CALLBACK_CANCEL;
} }
@@ -1079,8 +1075,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) @@ -1134,8 +1130,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
/* shutdown -h now */
if (e_util_immortal_check()) return 0; if (e_util_immortal_check()) return 0;
e_fm2_die();
snprintf(buf, sizeof(buf), snprintf(buf, sizeof(buf),
- "%s/enlightenment/utils/enlightenment_sys halt", - "%s/enlightenment/utils/enlightenment_sys halt",
- e_prefix_lib_get()); - e_prefix_lib_get());
@ -97,9 +97,9 @@ index 6781a9b5a..8cd140f1b 100644
if (_e_sys_exe) if (_e_sys_exe)
{ {
if ((ecore_time_get() - _e_sys_begin_time) > 2.0) if ((ecore_time_get() - _e_sys_begin_time) > 2.0)
@@ -1114,8 +1109,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) @@ -1170,8 +1165,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
/* shutdown -r now */
if (e_util_immortal_check()) return 0; if (e_util_immortal_check()) return 0;
e_fm2_die();
snprintf(buf, sizeof(buf), snprintf(buf, sizeof(buf),
- "%s/enlightenment/utils/enlightenment_sys reboot", - "%s/enlightenment/utils/enlightenment_sys reboot",
- e_prefix_lib_get()); - e_prefix_lib_get());
@ -107,7 +107,7 @@ index 6781a9b5a..8cd140f1b 100644
if (_e_sys_exe) if (_e_sys_exe)
{ {
if ((ecore_time_get() - _e_sys_begin_time) > 2.0) if ((ecore_time_get() - _e_sys_begin_time) > 2.0)
@@ -1148,8 +1142,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) @@ -1204,8 +1198,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
case E_SYS_SUSPEND: case E_SYS_SUSPEND:
/* /etc/acpi/sleep.sh force */ /* /etc/acpi/sleep.sh force */
snprintf(buf, sizeof(buf), snprintf(buf, sizeof(buf),
@ -117,7 +117,7 @@ index 6781a9b5a..8cd140f1b 100644
if (_e_sys_exe) if (_e_sys_exe)
{ {
if ((ecore_time_get() - _e_sys_begin_time) > 2.0) if ((ecore_time_get() - _e_sys_begin_time) > 2.0)
@@ -1208,8 +1201,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) @@ -1265,8 +1258,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw)
case E_SYS_HIBERNATE: case E_SYS_HIBERNATE:
/* /etc/acpi/hibernate.sh force */ /* /etc/acpi/hibernate.sh force */
snprintf(buf, sizeof(buf), snprintf(buf, sizeof(buf),
@ -152,11 +152,26 @@ index 4b5148634..47d34b07f 100644
autolock_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL); autolock_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL);
eina_strbuf_free(buf); eina_strbuf_free(buf);
diff --git a/src/modules/bluez5/e_mod_main.c b/src/modules/bluez5/e_mod_main.c
index a581c466c..095d8f360 100644
--- a/src/modules/bluez5/e_mod_main.c
+++ b/src/modules/bluez5/e_mod_main.c
@@ -321,8 +321,8 @@ ebluez5_rfkill_unblock(const char *name)
if (buf)
{
eina_strbuf_append_printf
- (buf, "%s/enlightenment/utils/enlightenment_sys rfkill-unblock %s",
- e_prefix_lib_get(), name);
+ (buf, "/run/setuid-programs/enlightenment_sys rfkill-unblock %s",
+ name);
_rfkill_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL);
eina_strbuf_free(buf);
}
diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c
index f4ba259b6..ae228bae3 100644 index b66b365d8..bab0802cc 100644
--- a/src/modules/cpufreq/e_mod_main.c --- a/src/modules/cpufreq/e_mod_main.c
+++ b/src/modules/cpufreq/e_mod_main.c +++ b/src/modules/cpufreq/e_mod_main.c
@@ -1450,8 +1450,7 @@ e_modapi_init(E_Module *m) @@ -1452,8 +1452,7 @@ e_modapi_init(E_Module *m)
} }
E_CONFIG_LIMIT(cpufreq_config->poll_interval, 1, 1024); E_CONFIG_LIMIT(cpufreq_config->poll_interval, 1, 1024);
@ -166,3 +181,40 @@ index f4ba259b6..ae228bae3 100644
cpufreq_config->set_exe_path = strdup(buf); cpufreq_config->set_exe_path = strdup(buf);
if (stat(buf, &st) < 0) if (stat(buf, &st) < 0)
diff --git a/src/modules/sysinfo/cpuclock/cpuclock.c b/src/modules/sysinfo/cpuclock/cpuclock.c
index 938916e53..00d5067d0 100644
--- a/src/modules/sysinfo/cpuclock/cpuclock.c
+++ b/src/modules/sysinfo/cpuclock/cpuclock.c
@@ -80,8 +80,7 @@ _cpuclock_set_governor(const char *governor)
char buf[4096 + 100], exe[4096];
struct stat st;
- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs",
- e_module_dir_get(sysinfo_config->module), MODULE_ARCH);
+ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs");
if (stat(exe, &st) < 0) return;
snprintf(buf, sizeof(buf),
@@ -108,8 +107,7 @@ _cpuclock_set_frequency(int frequency)
if (system(buf) != 0)
ERR("Error code from trying to run \"%s\"", buf);
#else
- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs",
- e_module_dir_get(sysinfo_config->module), MODULE_ARCH);
+ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs");
if (stat(exe, &st) < 0) return;
snprintf(buf, sizeof(buf),
"%s %s %i", exe, "frequency", frequency);
@@ -127,8 +125,7 @@ _cpuclock_set_pstate(int min, int max, int turbo)
char buf[4096 + 100], exe[4096];
struct stat st;
- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs",
- e_module_dir_get(sysinfo_config->module), MODULE_ARCH);
+ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs");
if (stat(exe, &st) < 0) return;
snprintf(buf, sizeof(buf),
"%s %s %i %i %i", exe, "pstate", min, max, turbo);
--
2.23.0

View File

@ -963,23 +963,29 @@ with the administrator's password."
(match-record enlightenment-desktop-configuration (match-record enlightenment-desktop-configuration
<enlightenment-desktop-configuration> <enlightenment-desktop-configuration>
(enlightenment) (enlightenment)
(list (file-append enlightenment (let ((module-arch (match (string-tokenize (%current-system)
"/lib/enlightenment/utils/enlightenment_sys") (char-set-complement (char-set #\-)))
(file-append enlightenment ((arch "linux") (string-append "linux-gnu-" arch))
"/lib/enlightenment/utils/enlightenment_backlight") ((arch "gnu") (string-append "gnu-" arch)))))
;; TODO: Move this binary to a screen-locker service. (list (file-append enlightenment
(file-append enlightenment "/lib/enlightenment/utils/enlightenment_sys")
"/lib/enlightenment/utils/enlightenment_ckpasswd") (file-append enlightenment
(file-append enlightenment "/lib/enlightenment/utils/enlightenment_backlight")
(string-append ;; TODO: Move this binary to a screen-locker service.
"/lib/enlightenment/modules/cpufreq/" (file-append enlightenment
(match (string-tokenize (%current-system) "/lib/enlightenment/utils/enlightenment_ckpasswd")
(char-set-complement (char-set #\-))) (file-append enlightenment
((arch "linux") (string-append "linux-gnu-" arch)) (string-append
((arch "gnu") (string-append "gnu-" arch))) "/lib/enlightenment/modules/cpufreq/"
"-" module-arch "-"
(version-major+minor (package-version enlightenment)) (package-version enlightenment)
"/freqset"))))) "/freqset"))
(file-append enlightenment
(string-append
"/lib/enlightenment/modules/sysinfo/"
module-arch "-"
(package-version enlightenment)
"/cpuclock_sysfs"))))))
(define enlightenment-desktop-service-type (define enlightenment-desktop-service-type
(service-type (service-type