[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pbuilder + ccache suddenly fails



On Sun, May 6, 2012 at 2:40 PM, Steve M. Robbins <steve@sumost.ca> wrote:
> On Sun, May 06, 2012 at 01:21:57PM -0400, Andres Mejia wrote:
>> On Sat, May 5, 2012 at 9:57 PM, Steve M. Robbins <steve@sumost.ca> wrote:
>> > I've routinely used pbuilder to build packages for years.
>> > Yesterday, I have started to see the following failure:
>> >
>> > ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/0/f: Permission denied
>
>
>> You should instead not enable ccache inside builds using pbuilder or
>> sbuild since the directories where these builds occur end up being
>> deleted, thus deleting the output generated from ccache.
>
> I haven't been explicitly using ccache inside pbuilder.  In fact, I
> just put a build-conflict against ccache to avoid using it (#671173).
> Two years ago, pbuilder itself added support for ccache:
>
> pbuilder (0.197) unstable; urgency=low
>
>   * Add builtin support for using ccache in pbuilder and enable it by default.
>     Ship a new /var/cache/pbuilder/ccache dir and bind-mount and chown it to
>     BUILDUSERID at build time.  Install/remove ccache automatically on
>     create/update if CCACHEDIR is set/unset.  Update docs and remove old
>     ccache config example.  Add a NEWS entry featuring the change.  Stop
>     intalling ccache sample config
>
>  -- Junichi Uekawa <dancer@debian.org>  Wed, 23 Jun 2010 07:21:11 +0900
>
>
> I haven't done anything different recently so I'm quite mystified by
> my recent trouble.  To work around this, I simply gave the world write
> permissions on /var/cache/pbuilder/ccache.
>
> Thanks,
> -Steve

Part of the reason to use pbuilder or sbuild is to build packages in a
clean chroot. Providing ccache support in this way isn't clean and
apparently it's prone to problems such as the bug you pointed out. See
also [1].

If you're going to upload to the archive, simply disable ccache.

1. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430765#35

-- 
~ Andres


Reply to: