Hey, On Sun, Jun 12, 2011 at 01:15:22AM +0200, Pietro Battiston wrote: > Package name: dynare-matlab > Source directory: /usr/src/matlab/dynare-matlab/mex/build/matlab > MEX dir: /usr/lib/matlab/site/dynare-matlab > M dir: /usr/share/matlab/site/m/dynare-matlab > Build user (if any): pietro > Build command: ./configure --with-matlab=$(dirname $(dirname $(readlink > -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab -nodesktop > -nodisplay -nosplash 2>/dev/null | grep -A2 "ans ="|tail -1| cut -d "." -f > 1,2) && make > Install command: mkdir -p /usr/lib/dynare/mex/matlab && install -m644 > /usr/src/matlab/dynare-matlab/mex/matlab/* /usr/lib/dynare/mex/matlab > Clean command: make distclean && rmdir > /usr/src/matlab/dynare-matlab/mex/matlab
> sudo -H -u pietro sh -c "./configure --with-matlab=$(dirname $(dirname > $(readlink -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab > -nodesktop -nodisplay -nosplash 2>/dev/null | grep -A2 "ans ="|tail -1| cut > -d "." -f 1,2) && make" > Making all in mjdgges > make[1]: Entering directory > `/usr/src/matlab/dynare-matlab/mex/build/matlab/mjdgges' > /bin/mkdir -p ../../../matlab > make[1]: Leaving directory > `/usr/src/matlab/dynare-matlab/mex/build/matlab/mjdgges' So the problem is that the build command that is configured in the dynare-matlab package is ran as the matlab user that you have configured. However, as part of the build it wants to create a directory and the matlab users doesn't have permission to do so. I'm not sure how do handle this in the matlab-support package. I see no way to infer whether any particular command needs to run as the matlab user, or as root. One possibility would be to add some settings where the dynare-matlab package could define some directories that get craeted before the build command runs. Alternatively, it might be possible to change the build command in the dynare-matlab package to build the extensions in a temporary source tree where the matlab user has write permissions (e.g. /tmp) and later on install the extensions as root. I'd be glad to get some thoughts on whether it is possible to generalize this into a setup that always builds in a temp-dir. However, it seems to me that a mandatory copying into another location, would limit the flexibility. OTOH any build setup that requires such flexibilty, might be incompatible with a dedicated matlab user setup. Michael -- Michael Hanke http://mih.voxindeserto.de -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org