Hi Caglar,

On 07/12/2017 01:21 PM, Kilimci, Caglar wrote:
Hi all,

I have been using RAUC and it is fantastic.

Normally, my system has two root file systems and install other part and 
reboots. Nothing special, neither handlers nor hooks. But I have wondered, if I 
create a bundle that contains a script and runs that script instead of regular 
`rauc install` command. So I created one without any root fs but handler. But 
installation failed.

Here is my manifest file:
[update]
compatible=Phytec
version=caglar_v2
description=update-bundle
build=20170711235827

[handler]
filename=/usr/bin/custom_install.sh
args=install

Here is the output of install and log messages:
root@phyboard-regor-am335x-1:/update# rauc install caglar.raucb
trying to contact rauc service
rauc-Message: installing /update/caglar.raucb: installing

(rauc:756): rauc-WARNING **: rauc service disappeared

D-Bus error while installing `/update/caglar.raucb`
root@phyboard-regor-am335x-1:/update# Jul 12 11:03:20 phyboard-regor-am335x-1 
daemon.notice dbus[205]: [system] Activating via systemd: service 
name='de.pengutronix.rauc' unit='rauc.service'
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info systemd[1]: Starting Rauc 
Update Service...
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.notice dbus[205]: [system] 
Successfully activated service 'de.pengutronix.rauc'
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info systemd[1]: Started Rauc 
Update Service.
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info rauc[759]: input bundle: 
/update/caglar.raucb
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info rauc[759]: Active slot 
bootname: system2
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info rauc[759]: rauc-Message: 
Mounting bundle '/update/caglar.raucb' to '/run/rauc/bundle'
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info rauc[759]: rauc-Message: 
installing /update/caglar.raucb: started
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info rauc[759]: rauc-Message: 
installing /update/caglar.raucb: Checking and mounting bundle...
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info rauc[759]: rauc-Message: 
Reading bundle: /update/caglar.raucb
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info rauc[759]: rauc-Message: 
Verifying bundle...
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info rauc[759]: **
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.info rauc[759]: 
rauc:ERROR:../git/src/install.c:294:determine_target_install_group: assertion failed 
(slotclasses->len > 0): (0 > 0)
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.notice systemd[1]: rauc.service: 
Main process exited, code=killed, status=6/ABRT
Jul 12 11:03:20 phyboard-regor-am335x-1 daemon.notice systemd[1]: rauc.service: 
Unit entered failed state.
Jul 12 11:03:21 phyboard-regor-am335x-1 daemon.warn systemd[1]: rauc.service: 
Failed with result 'signal'.

hm, it looks as if you have a system.conf that does not have any slots defined, yet. Is that true? RAUC is not designed for this very special case it seems and I am not sure if it should support this.

PS: By the way, documentation of handler [1] is out of date, I guess. Group 
name is changed from handlers to handler and does not accept key value of 
*install. If you explain more, I can update and send you pull request.

Thank you for your help.

Well, this can truely be a bit confusing, but I thing everything is fine for now.


* [handler]
This section is for the Bundle *Manifest* and its only purpose is to define a full-custom installation behavior (something that should be used for debugging or system fixing, only)

* [handlers]
This section is for the *System Configuration* and allows to specify some handler scripts that can be called during the default installation routine, for example as pre- or post-install handlers.

Finally, the similar mechanism as [handlers] exists for Bundle *Manifests*, too. Here they are referred to as [hooks] (to not confuse too much with then [handler] section).


Hope that pointed it out a bit more clearly?


Best regards

Enrico

--
Pengutronix e.K.                           | Enrico Jörns                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
RAUC mailing list

Reply via email to