Il Mar 27 Set 2022, 15:20 Roberto A. Foglietta <roberto.foglietta@gmail.com> ha scritto:
Dear all,

 I found another corner case about compiling a 3rd party driver into ISAR and I need to execute a command at make level but as root. Unfortunately su cannot authenticate seamlessly and without the root permission the command fails. Suggestions?

override_dh_auto_build:
      sudo cp -arf /usr/lib/modules/*/source/* /usr/lib/modules/*/build/
       cp -arf /usr/lib/modules/*/source/* /usr/lib/modules/*/build/
       $(MAKE) -n modules ${PARALLEL_MAKE}

The problem of Executing commands with root priviledge in the sbuild, I have solved using chmod +s the command (cfr. the patch attached, in the commented line a generalisation).

About the module compile, I should have checked what's wrong in the makefile & Co. but at the moment the approach is not pointing the finger on the lacks of others but manage it.

Cheers, R-