Excerpts from Herbies's message of 2016-06-06 11:53:41 +0200:
> Hi,
> I'd like to start to write code on Qubes.
Read at
https://www.qubes-os.org/doc/ the part titled *For Developers*.
> I have developed some easy bash scripts that run in dom0, but now I want
> to do more. I want to convert this script from bash to python and play
> with qubes-manager.
Depending on what you do, you probably want to play with qubes-core-admin
(
https://github.com/QubesOS/qubes-core-admin/) not the qubes-manager. Qubes
Manager is just an ui which interacts with the logic in qubes-core-admin.
What you probably want to do is to study qubes-core-admin and what kind of
python modules and functions it offers. Then you can just write your python
script — which reuses the `qubes.qubes` module — in the dom0 and you don't need
a whole build environment. Have also a look at the default tools (i.e.: vim
`which qvm-ls`) to see how the Python qubes modules are used.
> How do you develop on Qubes?
This is how packages are build
https://www.qubes-os.org/doc/qubes-builder/
> how do you perform test on software that run in dom0?
There're two options:
① If you develop for current QubesOS version, you can build your package in you
BUILDVM and copy it to the dom0.
② Have a secondary hardware running QubesOS, with a network card attached to the
dom0. You build your code in a BUILDVM. The dom0, on your secondary hardware,
runs an SSH daemon. BUILDVM can deploy packages and run tests via SSH on the
secondary hardware.
The second options is preferable and cleaner.
> The process is "test-driven"?
Depends on the component and your definition of test-driven. There're tests for
some components.
kalkin-