Possibly -- dkms is currently just su'ing to nobody, which doesn't reset
any env vars. The following seems to work, though I'm not sure if
something can fail for some modules as nobody's $HOME does not exist:

--- dkms.orig   2009-10-14 22:32:24.882924512 +0300
+++ dkms        2009-10-14 22:41:40.002269942 +0300
@@ -1522,8 +1522,8 @@
     local the_make_command=`echo $make_command | sed "s/^make/make 
KERNELRELEASE=${kernelver_array[0]}/"`
 
     #if we're root, try to run as a user instead
-    if [ "$USER" = "root" ] && getent passwd nobody 1>/dev/null && su nobody 
-c "/bin/true" 1>/dev/null; then
-        the_make_command="su nobody -c \"$the_make_command\""
+    if [ "$USER" = "root" ] && getent passwd nobody 1>/dev/null && sudo -H -u 
nobody /bin/true 1>/dev/null; then
+        the_make_command="sudo -H -u nobody /bin/sh -c \"$the_make_command\""
         chmod +x $dkms_tree/$module/$module_version/build
         chown -R nobody $dkms_tree/$module/$module_version/build
     fi

-- 
DKMS module fails to build if CC env-var set but not OK (=> "sudo -H"?)
https://bugs.launchpad.net/bugs/438393
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to