use script cubic to create a new image

Asked by Gergely Windisch

Hi,

I would like to use Cubic to create linux images containg the actual version of our own application preinstalled. When a new version comes out, I would replace the old files with the new ones and generate the iso. Would it be possible somehow to do this automatically from a script without any user interaction on the GUI (or better yet, no gui at all?)
So from the command line tell cubic the name of the project to load and a script to execute in the chroot environment, and then have the iso created...

is there a way for Cubic to be used like this?
Thanks,
Gergely

Question information

Language:
English Edit question
Status:
Answered
For:
Cubic Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

Gergely,

Cubic doesn't have a command-line interface, so scripting is not possible with the software.

You would have to write your own script to do the steps that Cubic does: extract the ISO, extract the compressed Linux file system, enter the chroot environment, and then repackage everything.

If it helps, the extracted Linux filesystem Cubic uses is <Your Cubic Project>/squashfs-root.

Another option might be to use software that automates user interactions (mouse and keyboard clicks) on GUI applications.

Revision history for this message
D L (dl-ubuntu) said :
#2

Only recently have I started exploring Cubic to customise images before pushing to a remote host.
I agree that automation scripting would be useful.
The Cubic GUI is not easily driven (although that is still one option I am exploring). For example I cannot easily resize/position the GUI although devilspie2 lua script offers promise.
But perhaps the most promising option is to install ansible in the host machine running Cubic to orchestrate the building of custom image.
I thought that ansible was mainly for local to remote automation but apparently ansible can be used in local to local mode using delegate.
Here is one link I found ..

https://www.decodingdevops.com/ansible-copy-file-locally/

I think that a hybrid of these two options (GUI automation plus ansible) might be a way forward. Look at Actiona automation tool in Ubuntu repo for ideas (although that developer suffered a server fault and lost chunks of the forum).

Revision history for this message
Distro Maker (mhzayt) said :
#3

Although the Overview says it is a GUI Wizard, more than one person has asked if there is a command line interface.
https://answers.launchpad.net/cubic/+question/677976

There are also similar questions on askubuntu so it isn't obvious that there isn't a way to script Cubic.

Can you add the fact that it is not possible to script Cubic to the description on the Overview page so that it is very clear and people don't have to ask questions to find this out.

Can you help with this problem?

Provide an answer of your own, or ask Gergely Windisch for more information if necessary.

To post a message you must log in.