The sbuild code assumes that the directory hosting the
UNSHARE_TMPDIR_TEMPLATE is mode 4777 (--chroot-mode=unshare). When it is
not, the following rm failure will appear under cleanup
+------------------------------------------------------------------------------+
| Cleanup |
+------------------------------------------------------------------------------+
Purging /<<BUILDDIR>>
Not cleaning session: cloned chroot in use
rm: cannot remove '/home/user/debian/sbuild-test/tmp.sbuild.4Gf6tS2': Permission denied
[...]
This happens for both successful and failed builds. The temporary
directory is properly cleaned regardless of this error (I guess there is
rm code both on the host and "inside" the chroot).
In my case, I changed UNSHARE_TMPDIR_TEMPLATE into a directory under my
user's HOME folder that I just created with mkdir -p. On my system, /tmp
is mounted with "noexec" and therefore the default could not be used.
Of the options presented, I would recommend the first one.
That option has my preference because:
A) It does not present an error to be ignored. I do not like such
behavior since I feel it promotes error blindness. The third
alternative fails this one in my view.
B) It does not hide unrelated errors (that is, if another error occurs
that message will not be hidden from the user). The second alternative
fails this one in my view.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 482 |
Nodes: | 16 (2 / 14) |
Uptime: | 59:57:38 |
Calls: | 9,567 |
Calls today: | 1 |
Files: | 13,663 |
Messages: | 6,143,311 |