chiark / gitweb /
add new portable service framework
authorLennart Poettering <lennart@poettering.net>
Mon, 16 Apr 2018 19:41:40 +0000 (21:41 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
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.

meson.build
meson_options.txt
src/libelogind/sd-bus/bus-common-errors.h

index 780abcc6bbc22e1663120fdadd74389229b545bb..c8eff6dcea5872dd95e6eac7aa57c20ceeb49d24 100644 (file)
@@ -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'],
index f39bed270c535e2608514c136aea265f28ac0fde..cf093a615d1eb930d19da55ac9c4b6ad989ae800 100644 (file)
@@ -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',
index 7a483ce548ab066146976d389bb62fe2c82695bd..7a1e499d1b9f6d866aa3baf028dd36bdd437fa1b 100644 (file)
@@ -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"