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

  • 15 days ago: crameleon liked this project.
  • 19 days ago: afeijoo liked this project.
  • 19 days ago: epaolantonio liked this project.
  • 19 days ago: wagi liked this project.
  • 19 days ago: kukuk started this project.
  • 19 days ago: kukuk originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    This project is one of its kind!