Summary: | DAHLIN-00090: When using DESTDIR, depmod is run on the host, not on the staging directory | ||
Reporter: | David Woolley (davidw) | Labels: | |
Date Opened: | 2009-04-08 13:17:00 | Date Closed: | 2010-09-29 16:35:27 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | General |
Versions: | 2.1.0.4 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | If you set DESTDIR, in order to install into a tree other than the real OS tree, the Makefile still runs depmod without the -b option. There are two subcases: 1) one is building a complete OS image in a staging directory - no modules.dep will be created for dahdi unless a later make install does it properly; 2) you are making a selective binary archive of just what is needed to install Asterisk (our case) - the depmod is redundant, and potentially dangerous if the system were to go down when it was running. Because of case (2), it might be safer not to run it at all if DESTDIR is set. Also, in case (2), testing for udev/rules.d in the staging directory is not useful. Because of case (1) and cross builds, there may be cases where using the host one is the wrong strategy, so maybe we just have to fudge that one. | ||
Comments: | By: Tzafrir Cohen (tzafrir) 2009-04-13 07:22:22 Why is there a need to run an explicit depmod? Doesn't modules_install run depmod? By: Tzafrir Cohen (tzafrir) 2009-04-13 07:23:43 For the record: the obvious workaround is to build as a non-root user. By: Shaun Ruffell (sruffell) 2010-09-29 16:35:27 Suspending as there is a work around available. Patches are welcome otherwise. |