Description

systemd v257 comes with a nice new technology: varlink With soft-reboot, the rebootmgr dbus interface needs a clean rewrite anyways, so change that to sd-varlink. Problem: sd-varlink in systemd v257 is not documented, Lennarts comment: who is interested to use that should look at the code.

Goals

Have at least a minimal server/client with polkit authentication running.

Sources

Results

  • At first fix upstream to make a simple non-systemd App linking against sd-varlink, PR: https://github.com/systemd/systemd/pull/35240
  • First communication to get rebootmgr status:
    # echo "{}" | varlinkctl call /tmp/rebootmgr.socket org.openSUSE.rebootmgr.Status
    {
       "RebootStatus" : 1,
       "RebootMethod" : "soft-reboot"
    }
  • Server communication is fully implemented (except one sd_json problem...), client can at least trigger a reboot:
    # ./rebootmgrd -d
    Starting rebootmgrd (rebootmgr) 3.0...
    Varlink method "Reboot" called...
    Reboot request: 1, force: 0
    Client:
    # ./rebootmgrctl reboot
    method=1, forced=0
    Segmentation fault (core dumped)
    Ok, who cares that the client seg.faults at the end, the main thing is the machine will reboot add-emoji
  • rebootmgrctl [status|status --full|reboot|cancel] is implemented and works:
    Starting rebootmgrd (rebootmgr) 3.0...
    Varlink method "Reboot" called...
    Reboot request: reboot, force: false
    Reboot in 18310 seconds at Sat 2024-11-23 03:59:43 CET
    Varlink method "Cancel" called...
    Varlink method "Reboot" called...
    Reboot request: reboot, force: false
    Reboot in 18595 seconds at Sat 2024-11-23 04:04:46 CET
    time_handler called
  • polkit: the sd-varlink polkit authentication support is systemd internal, so needs another 1-2 hackweeks to write support from scratch.

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 24

Activity

  • 8 months ago: crameleon liked this project.
  • 8 months ago: afeijoo liked this project.
  • 8 months ago: epaolantonio liked this project.
  • 8 months ago: wagi liked this project.
  • 8 months ago: kukuk started this project.
  • 8 months ago: kukuk originated this project.

  • Comments

    • leedsd204
      17 days ago by leedsd204 | Reply

      Great initiative replacing dbus with sd_varlink—streamlining rebootmgr makes perfect sense with systemd v257. For more tools and utilities, visit https://rutificadrut.cl/

    • Johanpainters
      3 days ago by Johanpainters | Reply

      Impressive step! Replacing DBus with sd-varlink in rebootmgr is a smart move for cleaner, faster system interactions—especially with soft-reboot support. aslo check our webiste professional painting services

    • ericmenk33
      2 days ago by ericmenk33 | Reply

      While exploring lightweight system tools like sd-varlink for streamlined server control, it's equally useful to consider efficient media solutions that minimize system overhead. For IPTV on Windows, magis.tv apk offers a simple player to load your own M3U playlists, though caution is advised due to third-party risks. Both examples reflect how minimal, modular software choices can enhance control and performance.

    Similar Projects

    This project is one of its kind!