Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 471666 - =net-misc/pump-0.8.24-r4 - Failed Patch: 00_all_retvals.patch with LC_ALL=cs_CZ.UTF8
Summary: =net-misc/pump-0.8.24-r4 - Failed Patch: 00_all_retvals.patch with LC_ALL=cs_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-05-29 08:11 UTC by Pavel Riha
Modified: 2013-06-21 23:57 UTC (History)
2 users (show)

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


Attachments
whole log (00_all_retvals.patch.out,2.36 KB, text/plain)
2013-05-29 08:11 UTC, Pavel Riha
Details
emerge info (emerge.info,4.38 KB, text/plain)
2013-05-29 14:35 UTC, Pavel Riha
Details
build log (build.log,2.21 KB, text/plain)
2013-05-29 14:36 UTC, Pavel Riha
Details
older ebuild pump-0.8.24-r3.ebuild (pump-0.8.24-r3.ebuild,1.11 KB, text/plain)
2013-05-30 07:54 UTC, Pavel Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Riha 2013-05-29 08:11:59 UTC
Created attachment 349528 [details]
whole log

compilation fail on applying patches.
I think the patch format is OK, but I din't even found the replaced lines in the orig source file (pump.c), so something is bad (bad version?)



 * Applying pump_0.8.24-7.diff 
 * Applying various patches (bugfixes/updates) ...
 *   00_all_retvals.patch ...

 * Failed Patch: 00_all_retvals.patch !
 *  ( patches/00_all_retvals.patch )



example from the log:

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

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch  < 'patches/00_all_retvals.patch'

================================
patching file pump.c
Hunk #1 FAILED at 555.
Hunk #2 FAILED at 731.
Hunk #3 FAILED at 774.
3 out of 3 hunks FAILED -- saving rejects to file pump.c.rej

patch program exited with status 1
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-29 14:21:57 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire build log to this bug report.
Comment 2 Pavel Riha 2013-05-29 14:35:57 UTC
Created attachment 349552 [details]
emerge info
Comment 3 Pavel Riha 2013-05-29 14:36:15 UTC
Created attachment 349554 [details]
build log
Comment 4 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-29 20:10:58 UTC
Apparently nobody is actively maintaining this.

You could try to temporarily fix this in a local overlay by commenting out the epatch line that applies this patch.

http://forums.gentoo.org/viewtopic-t-827407-start-0.html
Comment 5 Pavel Riha 2013-05-30 07:54:47 UTC
Created attachment 349624 [details]
older ebuild pump-0.8.24-r3.ebuild

yes, of course disabling the patch could work. But maybe it is important?

I have found in backup the previous ebuild (r3), it's little bit different, but it still works.
If somebody need this, I  attach it.
Comment 6 Sergey Popov gentoo-dev 2013-05-31 06:26:59 UTC
ebuild /usr/portage/net-misc/pump/pump-0.8.24-r4.ebuild clean prepare
(skip)
>>> Preparing source in /home/tmp/portage/net-misc/pump-0.8.24-r4/work/pump-0.8.24 ...
(skip)
*   00_all_retvals.patch ...                                         [ ok ]
(skip)


What version of sys-devel/patch do you use?

I have sys-devel/patch-2.6.1 installed and patch applied successfully on both of my boxes
Comment 7 Pavel Riha 2013-05-31 07:41:23 UTC
Hi Sergey,

I was in process of emerge world, so I'm up2date.
# equery l patch
[IP-] [  ] sys-devel/patch-2.6.1:0


I'm fine with the old r3 version, but now just curious, where the problem is, because if I by hand unpack the sources:
pump_0.8.24.orig.tar.gz and pump_0.8.24-7.diff.gz

as I see in the pump_0.8.24-7.diff the 00_all_retvals.patch, the first  it includes is:

--- pump-0.8.24/pump.c  2008-12-20 12:29:28.000000000 +0100
+++ pump.c      2008-12-20 12:28:47.000000000 +0100
@@ -555,7 +555,11 @@
   
                listen(sock, 5);
   
-               write(conn, &c, 1);
+               if (write(conn, &c, 1) < 0) {
+                   syslog(LOG_ERR, "failed to write to connection: %s\n",
+                          strerror(errno));
+                   exit(1);
+               }



but in the pump.c there is even NO line "write(conn, &c, 1)" in the whole file:

/tmp/pump-0.8.24# grep 'write(' pump.c 
                i = write(conn, &cmd, sizeof(cmd));
                        j = write(conn, &cmd, sizeof(cmd));
            i = write(conn, &cmd, sizeof(cmd));
    ret = write(cont, &cmd, sizeof(cmd));
        ret = write(cont, &cmd, sizeof(cmd));


If it's working for you, you have to use diferent files I think, so I have also deleted the files from distfiles and refetch them, but with the same result..


# l /usr/portage/distfiles/pump*
-rw-rw-r-- 1 portage  6381 Mar  7  2009 /usr/portage/distfiles/pump-0.8.24-1-patches.tar.bz2
-rw-rw-r-- 1 portage 22842 Dec 23  2008 /usr/portage/distfiles/pump_0.8.24-5.diff.gz
-rw-rw-r-- 1 portage 29280 Feb 27  2010 /usr/portage/distfiles/pump_0.8.24-7.diff.gz
-rw-rw-r-- 1 portage 79790 Apr 30  2006 /usr/portage/distfiles/pump_0.8.24.orig.tar.gz
Comment 8 Pavel Riha 2013-05-31 08:03:34 UTC
HA! 
I found it :)


the "write(conn, &c, 1);" line is included in other of the patchfiles!!!! 
In 00_00_all_debian.patch


so the problem is the ORDER of the patches


If I change the locale:

export LC_ALL=C

then emerge pump work 


I was using cs_CZ.UTF8 locale and the sorting features in this locale are realy annoying sometimes

patches# export LC_ALL=cs_CZ.UTF8
patches# l
-rw-r--r-- 1 root   133 31. kv� 09.25 series
-rw-r--r-- 1 root   865 31. kv� 09.25 00_all_retvals.patch
-rw-r--r-- 1 root 68282 31. kv� 09.25 00_00_all_debian.patch
-rw-r--r-- 1 root 17831 31. kv� 09.25 10_all_gentoo.patch
-rw-r--r-- 1 root   348 31. kv� 09.25 20_all_redefinition.patch
-rw-r--r-- 1 root   787 31. kv� 09.25 30_all_Makefile.patch
-rw-r--r-- 1 root   958 31. kv� 09.25 40_all_manpage.patch

patches# export LC_ALL=C         
patches# l
-rw-r--r-- 1 root 68282 May 31 09:25 00_00_all_debian.patch
-rw-r--r-- 1 root   865 May 31 09:25 00_all_retvals.patch
-rw-r--r-- 1 root 17831 May 31 09:25 10_all_gentoo.patch
-rw-r--r-- 1 root   348 May 31 09:25 20_all_redefinition.patch
-rw-r--r-- 1 root   787 May 31 09:25 30_all_Makefile.patch
-rw-r--r-- 1 root   958 May 31 09:25 40_all_manpage.patch
-rw-r--r-- 1 root   133 May 31 09:25 series


So it's not problem of the ebuild directly
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-31 15:40:40 UTC
--- pump-0.8.24-r4.ebuild       22 Feb 2013 17:25:23 -0000      1.9
+++ pump-0.8.24-r4.ebuild       31 May 2013 15:40:24 -0000
@@ -32,7 +32,7 @@
        # Apply Debians pump patchset - they fix things good :)
        # Debian patchset 7 include gentoo patchset too
        epatch "${WORKDIR}/${PN}_${PV}-${PATCHLEVEL}.diff"
-       EPATCH_FORCE="yes" EPATCH_SOURCE="patches" EPATCH_SUFFIX="patch" epatch
+       LC_ALL=C EPATCH_FORCE="yes" EPATCH_SOURCE="patches" EPATCH_SUFFIX="patch" epatch
 
        # respect AR, wrt bug #458482
        tc-export AR
Comment 10 Zac Medico gentoo-dev 2013-06-01 21:41:33 UTC
Maybe include the LC_ALL=C override in epatch?
Comment 11 Sergey Popov gentoo-dev 2013-06-01 21:43:01 UTC
+  01 Jun 2013; Sergey Popov <pinkbyte@gentoo.org> pump-0.8.24-r4.ebuild:
+  Add workaround to epatch call to make sure that patches are applied in right
+  order, wrt bug #471666. Thanks to Pavel Riha for discovering this issue and
+  Jeroen Roovers for suggested patch

Temp workaround to ebuild applied
Comment 12 Pavel Riha 2013-06-05 12:26:11 UTC
thanks, I can confirm that the pump-0.8.24-r4.ebuild now compile fine.
Comment 13 SpanKY gentoo-dev 2013-06-21 23:57:03 UTC
should be fixed now:
http://sources.gentoo.org/eclass/eutils.eclass?r1=1.423&r2=1.424