Coder Social home page Coder Social logo

Comments (11)

mnhu avatar mnhu commented on June 7, 2024

Oh, the current version is 0.1.1:

root@armada-388-db:~# rauc --version
rauc 0.1.1

from rauc.

ejoerns avatar ejoerns commented on June 7, 2024

Mh, from the log it seems to stop somewhere around the compatible check. Do you use the standard compatible check or an install-check hook for this?

Maybe its worth trying to pick #126 and see if it provides you any details about what happened at the client side, especially why it assumes to have 'failed'.

from rauc.

mnhu avatar mnhu commented on June 7, 2024

I'm using the standard check. Also tried to change the compatible string to provoke a mismatch, but it made no difference.

I will try to pick the dbus-error-logging tonight...

from rauc.

mnhu avatar mnhu commented on June 7, 2024

Testing with #126 does reveal a little more:

root@armada-388-db:~# rauc install rauc-bundle-armada-388-db.raucb 
trying to contact rauc service                             
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: installing                                        
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 020% Determining slot states done.                
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 020% Checking bundle                              
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 020% Verifying signature                          
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 040% Verifying signature done.                    
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 040% Checking bundle done.                        
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 050% Verifying manifest checksums                 
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 060% Verifying manifest checksums done.           
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 060% Verifying manifest done.                     
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 060% Determining target install group             
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 080% Determining target install group done.       
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: 100% Installing failed.                           
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: LastError: Handler error: Failed marking slot system.0 non-bootable
rauc-Message: installing /home/root/rauc-bundle-armada-388-db.raucb: idle                                              
installing `/home/root/rauc-bundle-armada-388-db.raucb` failed

Still it works when starting rauc service prior to running rauc install (logs similar to the working log in the first post).

from rauc.

mnhu avatar mnhu commented on June 7, 2024

Yep, using full path when calling fw_setenv makes it work without starting rauc service first:

git diff        
diff --git a/src/bootchooser.c b/src/bootchooser.c         
index d45ca9b..428c7f0 100644                              
--- a/src/bootchooser.c      
+++ b/src/bootchooser.c      
@@ -11,7 +11,7 @@            
 #define BAREBOX_STATE_ATTEMPS_PRIMARY  3                  
 #define BAREBOX_STATE_DEFAULT_PRIORITY 10                 
 #define BAREBOX_STATE_PRIORITY_PRIMARY 20                 
-#define UBOOT_FWSETENV_NAME "fw_setenv"                   
+#define UBOOT_FWSETENV_NAME "/sbin/fw_setenv"             
                             
 #if 0                       
 static gboolean barebox_state_get_int(const gchar* name, int *value) {

from rauc.

ejoerns avatar ejoerns commented on June 7, 2024

Yes, great to see you already worked out the issue with the help of #126, and thanks for testing in different scenarios. Seems as if we should merge it soon.

The issue you revealed is, that when started via D-Bus activation, there is no shell context, or more detailed, a clean environment that does not have any PATH set. Thus looking up fw_setenv fails. We should consider allowing to use a (configurable) absolute path for these cases.

from rauc.

mnhu avatar mnhu commented on June 7, 2024

It would be great if you could merge #126 soonish... I noticed that grubenv had an config option to set a path, so maybe a similar thing is needed for uboot (and barebox), or a general path config for all of them.

from rauc.

jluebbe avatar jluebbe commented on June 7, 2024

I'd like to avoid hard-coding the path in rauc, as one tool may be located in /bin on one distribution and /sbin on another. systemd doesn't remove PATH from the environment when activating via D-Bus. If specifying the PATH in D-Bus .service files is not supported, we could have a small wrapper shell script to set it with the same values as systemd.

from rauc.

mnhu avatar mnhu commented on June 7, 2024

Agreed, hard-coded paths should be avoided.

It doesn't seem like there is a way to set the PATH environment variable in D-Bus service files, so I am looking into installing a wrapper script in /usr/libexec/rauc-service.sh.

According to https://github.com/systemd/systemd/blob/master/src/basic/path-util.h#L34 the default systemd-path is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin.

Would something like this work:

#!/bin/sh
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
@bindir@/rauc service

And then update /usr/share/dbus-1/system-services/de.pengutronix.rauc.service to call /usr/libexec/rauc-service.sh.

from rauc.

mnhu avatar mnhu commented on June 7, 2024

This is fixed in dcd184d

from rauc.

ejoerns avatar ejoerns commented on June 7, 2024

👍 Great work! I guess we can close this one now.

from rauc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.