Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259322 - sci-misc/boinc-6.4.5-r1 - failed on patch
Summary: sci-misc/boinc-6.4.5-r1 - failed on patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tomáš Chvátal (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-17 06:32 UTC by DaggyStyle
Modified: 2009-02-17 16:40 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DaggyStyle 2009-02-17 06:32:06 UTC
here is the output:
>>> Emerging (6 of 9) sci-misc/boinc-6.4.5-r1
 * boinc-6.4.5.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                   [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
>>> Unpacking source...
>>> Unpacking boinc-6.4.5.tar.bz2 to /var/tmp/portage/sci-misc/boinc-6.4.5-r1/work
>>> Source unpacked in /var/tmp/portage/sci-misc/boinc-6.4.5-r1/work
 * Applying 6.4.5-RSA_security.patch ...

 * Failed Patch: 6.4.5-RSA_security.patch !
 *  ( /usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch )
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/6.4.5-RSA_security.patch-13912.out

 *
 * ERROR: sci-misc/boinc-6.4.5-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 2724:  Called epatch '/usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch'
 *             environment, line 1309:  Called die
 * The specific snippet of code:
 *                   die "Failed Patch: ${patchname}!";
 *  The die message:
 *   Failed Patch: 6.4.5-RSA_security.patch!
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/environment'.
 *

>>> Failed to emerge sci-misc/boinc-6.4.5-r1, Log file:

>>>  '/var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/build.log'

 * Messages for package sys-kernel/gentoo-sources-2.6.28-r2:

 * If you are upgrading from a previous kernel, you may be interested
 * in the following document:
 *   - General upgrade guide: http://www.gentoo.org/doc/en/kernel-upgrade.xml

 * Messages for package sys-kernel/tuxonice-sources-2.6.28-r2:

 * If you are upgrading from a previous kernel, you may be interested
 * in the following document:
 *   - General upgrade guide: http://www.gentoo.org/doc/en/kernel-upgrade.xml
 * If there are issues with this kernel, please direct
 * any queries to the tuxonice-users mailing list:
 * http://lists.tuxonice.net/mailman/listinfo/tuxonice-users/

 * Messages for package sci-misc/boinc-6.4.5-r1:

 * Failed Patch: 6.4.5-RSA_security.patch !
 *  ( /usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch )
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/6.4.5-RSA_security.patch-13912.out
 *
 * ERROR: sci-misc/boinc-6.4.5-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 2724:  Called epatch '/usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch'
 *             environment, line 1309:  Called die
 * The specific snippet of code:
 *                   die "Failed Patch: ${patchname}!";
 *  The die message:
 *   Failed Patch: 6.4.5-RSA_security.patch!
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/environment'.
 *
content of 6.4.5-RSA_security.patch-13912.out:
***** 6.4.5-RSA_security.patch *****

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

PATCH COMMAND:   patch -p0 -g0 -E --no-backup-if-mismatch < /usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch

====================================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- boinc-6.4.5/lib/crypt.cpp  2009-02-15 05:27:43.284347370 +0100
|+++ boinc-6.4.5/lib/crypt.cpp  2009-02-15 05:31:25.554348346 +0100
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
can't find file to patch at input line 52
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|
|--- boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:27:43.292347379 +0100
|+++ boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:31:25.560347422 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 70
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|
|--- boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:27:43.290347301 +0100
|+++ boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:31:25.558348407 +0100
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
====================================

PATCH COMMAND:   patch -p1 -g0 -E --no-backup-if-mismatch < /usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch

====================================
patching file lib/crypt.cpp
Hunk #3 FAILED at 694.
1 out of 3 hunks FAILED -- saving rejects to file lib/crypt.cpp.rej
patching file lib/str_util.cpp
Hunk #2 FAILED at 877.
1 out of 2 hunks FAILED -- saving rejects to file lib/str_util.cpp.rej
patching file lib/error_numbers.h
Hunk #1 succeeded at 185 with fuzz 2.
====================================

PATCH COMMAND:   patch -p2 -g0 -E --no-backup-if-mismatch < /usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch

====================================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- boinc-6.4.5/lib/crypt.cpp  2009-02-15 05:27:43.284347370 +0100
|+++ boinc-6.4.5/lib/crypt.cpp  2009-02-15 05:31:25.554348346 +0100
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
can't find file to patch at input line 52
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|
|--- boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:27:43.292347379 +0100
|+++ boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:31:25.560347422 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 70
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|
|--- boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:27:43.290347301 +0100
|+++ boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:31:25.558348407 +0100
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
====================================

PATCH COMMAND:   patch -p3 -g0 -E --no-backup-if-mismatch < /usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch

====================================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- boinc-6.4.5/lib/crypt.cpp  2009-02-15 05:27:43.284347370 +0100
|+++ boinc-6.4.5/lib/crypt.cpp  2009-02-15 05:31:25.554348346 +0100
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
missing header for unified diff at line 52 of patch
can't find file to patch at input line 52
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|
|--- boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:27:43.292347379 +0100
|+++ boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:31:25.560347422 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
missing header for unified diff at line 70 of patch
can't find file to patch at input line 70
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|
|--- boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:27:43.290347301 +0100
|+++ boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:31:25.558348407 +0100
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
====================================

PATCH COMMAND:   patch -p4 -g0 -E --no-backup-if-mismatch < /usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch

====================================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- boinc-6.4.5/lib/crypt.cpp  2009-02-15 05:27:43.284347370 +0100
|+++ boinc-6.4.5/lib/crypt.cpp  2009-02-15 05:31:25.554348346 +0100
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
missing header for unified diff at line 52 of patch
can't find file to patch at input line 52
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|
|--- boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:27:43.292347379 +0100
|+++ boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:31:25.560347422 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
missing header for unified diff at line 70 of patch
can't find file to patch at input line 70
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|
|--- boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:27:43.290347301 +0100
|+++ boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:31:25.558348407 +0100
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored


Reproducible: Always

Steps to Reproduce:
Comment 1 urcindalo 2009-02-17 08:03:06 UTC
Same here on a mainly stable amd64 box.
Comment 2 Fabien MAUREL 2009-02-17 08:46:16 UTC
Same here :
 * boinc-6.4.5.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                         [ ok ]
 * checking ebuild checksums ;-) ...                                                                                           [ ok ]
 * checking auxfile checksums ;-) ...                                                                                          [ ok ]
 * checking miscfile checksums ;-) ...                                                                                         [ ok ]
>>> Unpacking source...                                                                                                              
>>> Unpacking boinc-6.4.5.tar.bz2 to /var/tmp/portage/sci-misc/boinc-6.4.5-r1/work                                                   
>>> Source unpacked in /var/tmp/portage/sci-misc/boinc-6.4.5-r1/work                                                                 
 * Applying 6.4.5-RSA_security.patch ...                                                                                             

 * Failed Patch: 6.4.5-RSA_security.patch !
 *  ( /usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch )
 *                                                                
 * Include in your bugreport the contents of:                     
 *                                                                
 *   /var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/6.4.5-RSA_security.patch-19137.out

 * 
 * ERROR: sci-misc/boinc-6.4.5-r1 failed.
 * Call stack:                           
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 2712:  Called epatch '/usr/portage/sci-misc/boinc/files/6.4.5-RSA_security.patch'
 *             environment, line 1297:  Called die                                                                
 * The specific snippet of code:                                                                                  
 *                   die "Failed Patch: ${patchname}!";                                                           
 *  The die message:                                                                                              
 *   Failed Patch: 6.4.5-RSA_security.patch!                                                                      
 *                                                                                                                
 * If you need support, post the topmost build error, and the call stack if relevant.                             
 * A complete build log is located at '/var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/build.log'.                  
 * The ebuild environment file is located at '/var/tmp/portage/sci-misc/boinc-6.4.5-r1/temp/environment'.
 *


emerge --info

Portage 2.1.6.7 (default/linux/amd64/2008.0/no-multilib, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.27.17 x86_64)
=================================================================
System uname: Linux-2.6.27.17-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Tue, 17 Feb 2009 05:30:01 +0000
app-shells/bash:     3.2_p48-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.3.7
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -msse3 -msse2 -msse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.free.fr/mirrors/ftp.gentoo.org"
LANG="fr_FR@euro"
LC_ALL="fr_FR@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="fr"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="   "
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl alsa amd64 avahi berkdb bzip2 cairo cddb cli cracklib crypt dbus dga dri dvb dvd fat ffmpeg firefox flac fortran gdbm gif gpm gtk hal iconv ipv6 isdnlog jpeg kdeprefix lm_sensors logitech-mouse logrotate mad mdnsresponder-compat midi mmx mmxext mp3 mp4 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin ntfs ogg opengl openmp pam pcre pdf perl png pppd pulseaudio python qt4 readline reflection reiserfs sdl session spl sqlite sse sse2 ssl ssse3 sysfs tcpd theora threads truetype unicode v4l v4l2 visualization vorbis webinterface webkit wma x264 xcomposite xine xorg xscreensaver xulrunner xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2009-02-17 09:11:51 UTC
Confirmed.
Comment 4 John (EBo) David 2009-02-17 11:05:21 UTC
I found the same thing and decided to delve into the error a bit more.  The
problem appears to be that the patch was not diff'ed from the clean source but
from a previously patched source file.  I was able to hack the RSA patch by
hand to change the BOINC_RCSID_ab90e1e and BOINC_RCSID_4f0c2e42ea to give the
following:

@@ -684,4 +694,4 @@
     return verified;
 }

-const char *BOINC_RCSID_4f0c2e42ea = "$Id: crypt.cpp 16069 2008-09-26
18:20:24Z davea $";
+const char *BOINC_RCSID_4f0c2e42ea = "$Id: 6.4.5-RSA_security.patch,v 1.1
2009/02/16 19:48:26 scarabeus Exp $";

@@ -876,4 +877,4 @@
     return retval;
 }

-const char *BOINC_RCSID_ab90e1e = "$Id: str_util.cpp 16069 2008-09-26
18:20:24Z davea $";
+const char *BOINC_RCSID_ab90e1e = "$Id: 6.4.5-RSA_security.patch,v 1.1
2009/02/16 19:48:26 scarabeus Exp $";

Appended is the full modified diff which allowed me to compile.  After
compiling and running this though I cannot run any of my tasks, but that is for
another bug report ;-)

  EBo --

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

--- boinc-6.4.5/lib/crypt.cpp   2009-02-15 05:27:43.284347370 +0100
+++ boinc-6.4.5/lib/crypt.cpp   2009-02-15 05:31:25.554348346 +0100
@@ -243,7 +243,7 @@
 // The output block must be decrypted in its entirety.
 //
 int encrypt_private(R_RSA_PRIVATE_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out) {
-    int n, modulus_len;
+    int n, modulus_len, retval;

     modulus_len = (key.bits+7)/8;
     n = in.len;
@@ -252,17 +252,27 @@
     }
     RSA* rp = RSA_new();
     private_to_openssl(key, rp);
-    RSA_private_encrypt(n, in.data, out.data, rp, RSA_PKCS1_PADDING);
+    retval = RSA_private_encrypt(n, in.data, out.data, rp, RSA_PKCS1_PADDING);
+    if (retval < 0) {
+        RSA_free(rp);
+        return ERR_CRYPTO;
+    }
     out.len = RSA_size(rp);
     RSA_free(rp);
     return 0;
 }

 int decrypt_public(R_RSA_PUBLIC_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out) {
+    int retval;
     RSA* rp = RSA_new();
     public_to_openssl(key, rp);
-    RSA_public_decrypt(in.len, in.data, out.data, rp, RSA_PKCS1_PADDING);
+    retval = RSA_public_decrypt(in.len, in.data, out.data, rp,
RSA_PKCS1_PADDING);
+    if (retval < 0) {
+        RSA_free(rp);
+        return ERR_CRYPTO;
+    }
     out.len = RSA_size(rp);
+    RSA_free(rp);
     return 0;
 }

@@ -684,4 +694,4 @@
     return verified;
 }

-const char *BOINC_RCSID_4f0c2e42ea = "$Id: crypt.cpp 16069 2008-09-26
18:20:24Z davea $";
+const char *BOINC_RCSID_4f0c2e42ea = "$Id: 6.4.5-RSA_security.patch,v 1.1
2009/02/16 19:48:26 scarabeus Exp $";


--- boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:27:43.292347379 +0100
+++ boinc-6.4.5/lib/str_util.cpp        2009-02-15 05:31:25.560347422 +0100
@@ -735,6 +735,7 @@
         case ERR_RMDIR: return "rmdir() failed";
         case ERR_SYMLINK: return "symlink() failed";
         case ERR_DB_CONN_LOST: return "DB connection lost during enumeration";
+        case ERR_CRYPTO: return "encryption error";
         case 404: return "HTTP file not found";
         case 407: return "HTTP proxy authentication failure";
         case 416: return "HTTP range request error";
@@ -876,4 +877,4 @@
     return retval;
 }

-const char *BOINC_RCSID_ab90e1e = "$Id: str_util.cpp 16069 2008-09-26
18:20:24Z davea $";
+const char *BOINC_RCSID_ab90e1e = "$Id: 6.4.5-RSA_security.patch,v 1.1
2009/02/16 19:48:26 scarabeus Exp $";


--- boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:27:43.290347301 +0100
+++ boinc-6.4.5/lib/error_numbers.h     2009-02-15 05:31:25.558348407 +0100
@@ -185,6 +185,7 @@
 #define ERR_RMDIR           -227
 #define ERR_SYMLINK         -229
 #define ERR_DB_CONN_LOST    -230
+#define ERR_CRYPTO          -231

 // PLEASE: add a text description of your error to
 // the text description function boincerror() in str_util.C.
Comment 5 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-17 12:12:53 UTC
Hm, interesting, it was not failing on my pc.
Will fix in next few hours when i get to the pc with boinc.
Sorry :(
Comment 6 Ferris McCormick (RETIRED) gentoo-dev 2009-02-17 14:07:38 UTC
Same failure for me on sparc.
Comment 7 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-17 16:40:01 UTC
Updated patch in the tree.