On 2012-02-03 19:57, Jakub Adam wrote:
> Hi Niels,
> 

Hi,

Sorry for the latency, but at least I got progress...

>> I cannot build it, it fails at:
>>
>> """
>> [...]
>> """
>>
>> I suspect the issue was that X11 was not running/available in my chroot.
>>   Maybe even just that $HOME existed but was not writable.  Come to think
>> of it, you are probably missing a -Duser.home=<somewhere>  as well.
>> Eclipse has been notoriously poor at staying out of $HOME in our
>> automated builds.
> 
> I tried many times but I couldn't reproduce your crash. Can you please
> describe in
> more detail the way how you build the package? This is what I did:
> 
> - got Debian testing in virtual machine so that it is independent of my
> normal
>   environment, dist-upgraded to latest version
> - removed X11 so that it is not running nor installed on the machine
> - installed pbuilder, initialized base unstable tarball with
> 
>    pbuilder --create --distribution sid
> 
> - cloned eclipse-mylyn from git.debian.org
> - created .orig tarball from latest upstream/* tag
> - run
> 
>    pdebuild --
> 
>   (user entry in /etc/sudoers required)
> - standard procedure of build-dependencies download into chroot and
> compilation succeeds
> 
> I even tried to run (as a regular user)
> 
>   HOME=/root dpkg-buildpackage
> 

Sure, see for my build setup/configuration[1].  Also, I am not sure how
much Eclipse (or Java) pays attention $HOME (vs reading it from
/etc/passwd).

> and add -Duser.home=/root to antRunner invocation in d/rules to make it
> crash because
> of inaccessible home location, but with no success.
> 
> What am I doing wrong that it doesn't crash? :)
> 
> Regards
> 
> Jakub
> 
> 


Meanwhile, I managed to get something comprehensible out of the
eclipse-mylin build.  The build failed the same step, but with some
tricks I got an X11 dialog out of it:

"""
The configuration area at
'/home/<user>/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration'
could not be created.  Please choose a writable location using the
'-configuration' command line option.
"""

If I clear my DISPLAY, it goes back to seg. faulting.  Anyhow, with this
I am certain it tries to write to my $HOME. :P  You may find [3] useful
as inspiration for running eclipse during builds, though it does not set
"-configuration".

~Niels

[1] Build setup:

My chroot is maintained by cowbuilder (using --update).  For builds I
copy the "chroot" to a tmpfs.  A couple of directories are bind-mounted
into the build-root (/proc, /dev/pts and my debian work-dir).  Before
chroot'ing into the build dir, the following ENV variables are changed:

"""
unset LANG
unset DISPLAY
LC_ALL=C
DEBIAN_FRONTEND=noninteractive
export LC_ALL DEBIAN_FRONTEND
"""

Inside the build dir, I install pbuilder + fakeroot and cd to the source
dir (inside the "debian work-dir").  There I run [2] to install
build-deps, create a user inside the chroot (with same ID as my regular
user) and su to that user.  From there I use dpkg-buildpackage to build
the package.

My "debian work-dir" is a subdir of my regular user's home and is
mounted as such in the build-root.  However, $HOME (inside the root) is
owned by root/root and cannot be written by my user.  I have found it
useful in catching eclipse trying to do "naughty" things during
automated builds.

[2] /usr/lib/pbuilder/pbuilder-satisfydepends-aptitude

[3] /usr/lib/eclipse/buildscripts/pde-build


-- 
To UNSUBSCRIBE, email to debian-java-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f38ce61.7030...@thykier.net

Reply via email to