Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81837 - Commons-discovery build fails with patch failure
Summary: Commons-discovery build fails with patch failure
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-13 02:01 UTC by Stefan Schulz
Modified: 2005-04-18 05:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
commons-discovery-0.2-gentoo.diff (commons-discovery-0.2-gentoo.diff,1.42 KB, text/plain)
2005-04-17 06:55 UTC, rajas
Details
commons-discovery-0.2-r2.ebuild.patch (commons-discovery-0.2-r2.ebuild.patch,245 bytes, patch)
2005-04-17 07:01 UTC, rajas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schulz 2005-02-13 02:01:22 UTC
The ebuild fails in the patch step, and produces the following error message in it's output file:

***** commons-discovery-0.2-gentoo.diff *****

=============================================

PATCH COMMAND:  patch -p0 -g0 < /usr/portage/dev-java/commons-discovery/files/commons-discovery-0.2-gentoo.diff

=============================================
patching file build.xml
=============================================

ACTUALLY APPLYING commons-discovery-0.2-gentoo.diff ...

=============================================
patching file build.xml
patch: **** Can't rename file /var/tmp/portage/commons-discovery-0.2-r2/temp/posdHVM5 to build.xml : Permission denied

Reproducible: Always
Steps to Reproduce:
1. Just type "emerge commons-discovery"
Actual Results:  
The following output was produced (after merging dependencies)

Calculating dependencies ...done!
>>> emerge (1 of 1) dev-java/commons-discovery-0.2-r2 to /
>>> md5 src_uri ;-) commons-discovery-0.2-src.tar.gz
>>> Unpacking source...
>>> Unpacking commons-discovery-0.2-src.tar.gz to
/var/tmp/portage/commons-discovery-0.2-r2/work
 * Applying commons-discovery-0.2-gentoo.diff ...

 * A dry-run of patch command succeeded, but actually
 * applying the patch failed!

 * Failed Patch: commons-discovery-0.2-gentoo.diff!
 *
 * Include in your bugreport the contents of:
 *
 *  
/var/tmp/portage/commons-discovery-0.2-r2/temp/commons-discovery-0.2-gentoo.diff-20823.out

Expected Results:  
Install cleanly? ;)

I am using sun-jdk 1.5.0.01, but the error seems unrelated to the JDK used,
since it is a permission problem. Strangly enough, when i ls -hal the source
directory while the build is active, user portage owns everything.

Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5,
glibc-2.3.4.20040808-r1, 2.6.10 i686)
=================================================================
System uname: 2.6.10 i686 AMD Athlon(tm) MP 2000+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 20:29:12)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.21-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-mp -m3dnow -msse -mmmx -fomit-frame-pointer -Os -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-mp -m3dnow -msse -mmmx -fomit-frame-pointer -Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms userpriv
usersandbox"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
http://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 3dnow X alsa avi berkdb bitmap-fonts crypt encode esd f77 fam
font-server fortran gdbm gif gnome gstreamer gtk gtk2 imlib imlib2 ipv6 java
jpeg junit latex libg++ libwww mad mikmod mmx motif mozilla mpeg mplayer ncurses
network nls no-old-linux noreiserfs offensive oggvorbis opengl oss pam pdflib
perl png posix python quicktime radeon readline rtc sdl shared sharedmem sockets
spell ssl tcpd tetex tiff truetype truetype-fonts type1-fonts xml xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Stefan Schulz 2005-02-13 10:36:54 UTC
Can be worked around by inserting a "sleep" into the ebuild, and doing a 'chmod -R 777' to the work directory. Not what i would call a solution, though.
Comment 2 Thomas Matthijs (RETIRED) gentoo-dev 2005-02-13 11:22:14 UTC
works fine for me
can you try compiling sys-devel/patch with clean cflags and try again?
Comment 3 Stefan Schulz 2005-02-13 11:29:40 UTC
Re-merging patch with "-O0 -march=i386" did not solve the problem, however since this seems to be a permissions problem, there might some very subtile problem with the C library... but i don't want to replace that. 
Comment 4 Jan Brinkmann (RETIRED) gentoo-dev 2005-03-12 15:49:54 UTC
seems to be related to your specific system, maybe you played around with the permissions or something.
Comment 5 rajas 2005-04-17 06:53:47 UTC
Does not not work at all. Same problem as the initial bug-report. The commons-discovery-0.2-gentoo.diff uses M$ Win linebreaks. So there is indeed something really wrong ;).

After fixing this the patch failed due to insufficient permissions. Seems like portage may not write to the working-directory. The quick and dirty workaround is to set the permissions by chmod.

Patches will be there in a minute...

Please reopen this bug!
Comment 6 rajas 2005-04-17 06:55:48 UTC
Created attachment 56511 [details]
commons-discovery-0.2-gentoo.diff

Corrected version of the gentoo-diff
Comment 7 rajas 2005-04-17 07:01:07 UTC
Created attachment 56512 [details, diff]
commons-discovery-0.2-r2.ebuild.patch

Patch for the commons-discovery.ebuild. Makes the workdir writable so the
gentoo.diff can be applied
Comment 8 Jan Brinkmann (RETIRED) gentoo-dev 2005-04-17 07:13:02 UTC
reopening...
Comment 9 Thomas Matthijs (RETIRED) gentoo-dev 2005-04-17 07:36:23 UTC
the patch has CRLF line breaks because the build.xml in the tar has them too

Dunno about the persmission don't see why that would happend
userpriv drops to portage user, and its all read/writable by portage
Comment 10 Jan Brinkmann (RETIRED) gentoo-dev 2005-04-17 07:43:44 UTC
commited a new version of the patch, thanks.
Comment 11 rajas 2005-04-18 05:35:46 UTC
Thanks for the fast response.