Commit Graph

13 Commits

Author SHA1 Message Date
Jonathan Lebon
582650e9c7 daemon: add TaskBegin, TaskEnd, and PercentProgress
Closes: #260
Approved by: cgwalters
2016-05-11 15:03:38 +00:00
Colin Walters
a9a49e72cd build: Use git.mk, make git status clean
Having a clean `git status` is really important for not missing files
one wants to `git add`.
2016-03-10 14:36:44 -05:00
Matthew Barnes
aaadcba77b daemon: Rename all the things!
Use 'rpmostreed' as the symbol prefix.
2015-09-09 22:00:05 -04:00
Matthew Barnes
495bf4c3f3 daemon: Simplify authorization policy
The current policy is to only allow the root user access to the Sysroot
and OS interfaces, but this can be expressed in the static bus config.

The long-term intention is to integrate with PolicyKit.  Leave comments
in the code stating so but remove the unnecessary authorization handler
for the time being, just so there's less code to review.
2015-09-09 22:00:05 -04:00
Matthew Barnes
d69cb7d7c1 daemon: Convert transactions to subclasses
Implementing a template pattern for transactions.

The TransactionClass is now abstract, and transaction_new() is replaced
with various method-specific functions like transaction_new_upgrade().
These custom subclasses live in a new file transaction-types.[ch].

Further, transaction_monitor_new_transaction() is replaced with
transaction_monitor_add().  So the handlers for "OS" interface methods
need only create an appropriate transaction instance and hand it off to
the transaction monitor.
2015-09-09 22:00:05 -04:00
Matthew Barnes
cfc52adfea daemon: Catch systemd journal messages by redirecting stdout
libostree logs messages to systemd's journal and also to stdout.
Redirect our own stdout back to ourselves so we can capture those
messages and pass them on to clients.  Admittedly hokey but avoids
hacking libostree directly (for now).
2015-09-09 22:00:05 -04:00
Matthew Barnes
b6691cbdca daemon: Rework transactions
A few changes:

- Modify the D-Bus API to include a Finish() method instead of a Start()
  method, the idea being the client calls Finish() to obtain the final
  status and optional message once the transaction indicates it's done.
  Calling Finish() also removes the transaction object from the bus.

- Introduce Transaction class as a thin wrapper for RPMOSTreeTransaction.
  Stores the status info for Finish(), detects when the caller's bus name
  vanishes, and emits various status signals to TransactionMonitor.

- Introduce TransactionMonitor as a factory class for Transactions that
  also handles book keeping chores like tracking the active Transaction.
  The Sysroot and OS interfaces share a TransactionMonitor instance.
2015-09-09 22:00:05 -04:00
Matthew Barnes
a4be570c62 docs: Add generated D-Bus interfaces 2015-09-09 22:00:04 -04:00
petervo
0114507865 daemon: Start implementing transaction methods 2015-09-09 22:00:04 -04:00
petervo
075d6bdad0 daemon: Implement package diff methods 2015-09-09 22:00:04 -04:00
petervo
19fde3a50a daemon: Start of sysroot interface implementation 2015-09-09 22:00:04 -04:00
Matthew Barnes
8f5993e220 daemon: Add factory function for Transaction objects
Creates, configures and exports an RPMOSTreeTransaction object from a
GDBusMethodInvocation.  The interface is exported relative to the object
path on which the D-Bus method was called.
2015-09-09 22:00:04 -04:00
petervo
c0d15a66ad daemon: Start of work on daemon 2015-09-09 22:00:04 -04:00