Package: debhelper Version: 13.6ubuntu1 Severity: wishlist Dear Maintainer,
I'm working on a use-case which can be generalized as wanting to be able to perform a build with debhelper in a read-only source directory. Not simply that the files themselves are read-only, but that the full directory tree is read-only. Think of building source from a directory on a CD-ROM, a NFS mount with read-only permissions, or in my case a Docker container with the source code on a read-only bind mount. Many of the required capabilities are already supported. For example, the --builddirectory flag allows the building step to be placed in a different directory. The autotools like automake and autoconf support building out-of-tree. However, I'm left with debhelper and related scripts themselves. The debhelper scripts are causing a few issues. The immediate issue which has led me to file this ticket is that debhelper really wants to write log files into the source directory. This results in an error such as: dh_autoreconf_clean: error: failed to write to debian/<package>.debhelper.log: Read-only file system I tried to work around this by hacking up the debhelper scripts in the Docker image by doing: RUN sed -i -e 's!"debian/${ext}debhelper.log"!"/working/debian/${ext}debhelper.log"!g' /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm RUN sed -i -e 's!debian/\*.debhelper.log!/working/debian/\*.debhelper.log!g' /usr/share/perl5/Debian/Debhelper/SequencerUtil.pm RUN sed -i -e 's!debian/\*.debhelper.log!/working/debian/\*.debhelper.log!g' /usr/bin/dh_clean This failed because the script was unable to find the log file to delete, with error message: dh_autoreconf_clean: error: failed to write to /working/debian/<package>.debhelper.log: No such file or directory The changes required are clearly more extensive than a little string substitution. And if the work involved is going to be extensive, it should probably be handled by someone with knowledge of (and the wisdom to) alter the architecture as well. One other possibly-related item of note (I can file a separate bug if you like) and which may have an existing solution: Passing in --buildinfo-option=-u/out still results in a -O option which refers to the wrong directory. That is, I get the following: dpkg-genbuildinfo -u/out --build=binary -O../<package>_2.0.6-1_amd64.buildinfo dpkg-genbuildinfo: error: cannot write ../<package>_2.0.6-1_amd64.buildinfo.new: Permission denied This resulted from an experiment where I was copying the source code to a temporary directory with read/write permissions, but where the parent directory was not writable. Thank you for your time, - Garrett *** Reporter, please consider answering these questions, where appropriate *** * What led up to the situation? * What exactly did you do (or not do) that was effective (or ineffective)? * What was the outcome of this action? * What outcome did you expect instead? *** End of the template - remove these template lines ***