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

Re: combining fakeroot and distcc/SSH



Daniel Schepler <schepler@math.berkeley.edu> writes:

> martin f krafft <madduck@debian.org> writes:
>
>> also sprach Petter Reinholdtsen <pere@hungry.com> [2005.03.05.1225 +0100]:
>>> > I am trying to use distcc to compile Debian packages and kernels,
>>> > and am failing. The reason is that I need to use distcc-over-SSH,
>>> > but the Debian compile process is run as (fake)root.
>>> 
>>> Why isn't it enough to do 'make install' as root?  Is there something
>>> in the build process requiring root access?
>>
>> Weird; some packages have dh_testroot in the build target. I tried
>> removing that and using fakeroot only for install. It seems like it
>> works now, but we'll see... argh. It seems that some people
>> (including myself when I wrote these scripts) think that `fakeroot
>> dpkg-buildpackage` is the same as `dpkg-buildpackage -rfakeroot`).
>
> Any such packages are broken and should have a serious FTBFS bug filed
> against them.  That said, I haven't seen any such packages running
> pbuilder locally.  If you mean dh_testroot in the clean target, on the
> other hand, that's a different story; clean is allowed to require root
> access.  (IIRC, the reason is to be able to clean files created in the
> build directory during the make install phase.)
> -- 
> Daniel Schepler              "Please don't disillusion me.  I
> schepler@math.berkeley.edu    haven't had breakfast yet."
>                                  -- Orson Scott Card

No, clean is not allowed to required root access. Policy only say
clean might need root rights to clean up a previous build (done as
root or sudo). It does not say clean will/must be called as root as it
says for other targets.

Imho dh_testroot in clean is wrong. Newly downloaded sources should
never ever need it and building with fakeroot avoids the need for root
in clean later too.


Maybe dh_testroot should create a stamp dir+file and clean target
should remove the stamp dir+file, e.g. with dh_testroot_clean,
ensuring clean has sufficient permissions to cleanup after a
build (otherwise removing the stamp file fails with permission denied).

MfG
        Goswin



Reply to: