From: Lennart Poettering Date: Mon, 16 Apr 2018 19:41:40 +0000 (+0200) Subject: add new portable service framework X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1fa1ee057d4c0cdd6ee3b0af99ed9c2bbddc1613;p=elogind.git add new portable service framework This adds a small service "systemd-portabled" and a matching client "portablectl", which implement the "portable service" concept. The daemon implements the actual operations, is PolicyKit-enabled and is activated on demand with exit-on-idle. Both the daemon and the client are an optional build artifact, enabled by default rhough. --- diff --git a/meson.build b/meson.build index 780abcc6b..c8eff6dce 100644 --- a/meson.build +++ b/meson.build @@ -164,6 +164,7 @@ modprobedir = join_paths(rootprefixdir, 'lib/modprobe.d') # systemdstatedir = join_paths(localstatedir, 'lib/systemd') # catalogstatedir = join_paths(systemdstatedir, 'catalog') # randomseeddir = join_paths(localstatedir, 'lib/systemd') +# profiledir = join_paths(rootlibexecdir, 'portable', 'profile') # # docdir = get_option('docdir') # if docdir == '' @@ -1342,6 +1343,7 @@ foreach term : ['utmp', # 'hostnamed', # 'localed', # 'machined', +# 'portabled', # 'networkd', # 'timedated', # 'timesyncd', @@ -1560,6 +1562,7 @@ subdir('src/shared') # subdir('src/kernel-install') # subdir('src/locale') # subdir('src/machine') +# subdir('src/portable') # subdir('src/nspawn') # subdir('src/resolve') # subdir('src/timedate') @@ -1917,6 +1920,7 @@ executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', +executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', user_runtime_dir_sources, include_directories : includes, @@ -1990,6 +1994,26 @@ endif # install_dir : rootbindir) # public_programs += [exe] # +# if conf.get('ENABLE_PORTABLED') == 1 +# executable('systemd-portabled', +# systemd_portabled_sources, +# include_directories : includes, +# link_with : [libshared], +# dependencies : [threads], +# install_rpath : rootlibexecdir, +# install : true, +# install_dir : rootlibexecdir) +# +# exe = executable('portablectl', 'src/portable/portablectl.c', +# include_directories : includes, +# link_with : [libshared], +# dependencies : [threads], +# install_rpath : rootlibexecdir, +# install : true, +# install_dir : rootlibexecdir) +# public_programs += [exe] +# endif +# # foreach alias : ['halt', 'poweroff', 'reboot', 'runlevel', 'shutdown', 'telinit'] # meson.add_install_script(meson_make_symlink, # join_paths(rootbindir, 'systemctl'), @@ -3057,9 +3081,8 @@ if git.found() 'tags', output : 'tags', command : [env, 'etags', '-o', '@0@/TAGS'.format(meson.current_source_dir())] + all_files) - custom_target( + run_target( 'ctags', - output : 'ctags', command : [env, 'ctags', '-o', '@0@/tags'.format(meson.current_source_dir())] + all_files) endif @@ -3246,6 +3269,7 @@ foreach tuple : [ # ['rfkill'], # ['logind'], # ['machined'], +# ['portabled'], # ['importd'], # ['hostnamed'], # ['timedated'], diff --git a/meson_options.txt b/meson_options.txt index f39bed270..cf093a615 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -108,6 +108,8 @@ option('utmp', type : 'boolean', # description : 'install the systemd-localed stack') # option('machined', type : 'boolean', # description : 'install the systemd-machined stack') +# option('portabled', type : 'boolean', +# description : 'install the systemd-portabled stack') # option('networkd', type : 'boolean', # description : 'install the systemd-networkd stack') # option('timedated', type : 'boolean', diff --git a/src/libelogind/sd-bus/bus-common-errors.h b/src/libelogind/sd-bus/bus-common-errors.h index 7a483ce54..7a1e499d1 100644 --- a/src/libelogind/sd-bus/bus-common-errors.h +++ b/src/libelogind/sd-bus/bus-common-errors.h @@ -45,6 +45,8 @@ #define BUS_ERROR_NO_SUCH_GROUP_MAPPING "org.freedesktop.machine1.NoSuchGroupMapping" #endif // 0 +#define BUS_ERROR_NO_SUCH_PORTABLE_IMAGE "org.freedesktop.portable1.NoSuchImage" + #define BUS_ERROR_NO_SUCH_SESSION "org.freedesktop.login1.NoSuchSession" #define BUS_ERROR_NO_SESSION_FOR_PID "org.freedesktop.login1.NoSessionForPID" #define BUS_ERROR_NO_SUCH_USER "org.freedesktop.login1.NoSuchUser"