Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123237 - cpio is broken on some non-glibc systems due to an unexistent stpcpy function
Summary: cpio is broken on some non-glibc systems due to an unexistent stpcpy function
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-18 00:36 UTC by Benigno B. Junior (RETIRED)
Modified: 2006-04-12 10:50 UTC (History)
1 user (show)

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


Attachments
cpio-2.6-bsd.patch (cpio-2.6-bsd.patch,902 bytes, patch)
2006-02-18 00:37 UTC, Benigno B. Junior (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benigno B. Junior (RETIRED) gentoo-dev 2006-02-18 00:36:37 UTC
NetBSD has no such stpcpy function. I created a patch to fix this on systems that have no stpcpy.

The patch must be applied after all the patches (especially after cpio-2.6-writeOutHeaderBufferOverflow.patch from #112140).
Comment 1 Benigno B. Junior (RETIRED) gentoo-dev 2006-02-18 00:37:00 UTC
Created attachment 80068 [details, diff]
cpio-2.6-bsd.patch

There goes the patch.
Comment 2 Robert Sebastian Gerus 2006-02-18 00:46:46 UTC
Compiled on DragonFly with this patch. Failed without it.
Comment 3 Karol Pasternak (RETIRED) gentoo-dev 2006-02-18 02:09:16 UTC
On OpenBSD too,
base-system, please apply this patch.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-02-18 03:56:48 UTC
Going to commit in overlay in the mean time.

Oh it needs an AT_M4DIR="m4" eautoreconf as it changes configure.ac, but it works otherwise.

Benigno, did you send it to upstream already?
Comment 5 Benigno B. Junior (RETIRED) gentoo-dev 2006-02-18 04:32:00 UTC
Yes, I just sent him a notification of this patch and the one from #112140, because this patch depends on cpio-2.6-writeOutHeaderBufferOverflow.patch.
Thanks for adding it.
Comment 6 SpanKY gentoo-dev 2006-02-18 11:31:56 UTC
i dont think that's the right fix at all

cpio already has a lib subdir for functions that the host doesnt support, you should be putting stpcpy.c in there like the other stuff and then updating AC_REPLACE_FUNCS
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-02-18 11:41:32 UTC
Uh that's gnulib stuff... it's quite difficult to patch it out, this solution works with the least changes. And it's already fixed upstream in next version.
Comment 8 SpanKY gentoo-dev 2006-02-18 11:56:10 UTC
i wasnt talking about the source tarball but about the upstream repo ... the patch posted is not correct for upstream

but they've committed a fix upstream that involves pulling in stpcpy from gnulib
Comment 9 Benigno B. Junior (RETIRED) gentoo-dev 2006-02-18 12:53:01 UTC
This replacing is not wrong. If this stpcpy implementation used by gnulib is something like this, I would say that this patch "cpio-2.6-bsd.patch" is better than it:
http://cvs.savannah.nongnu.org/viewcvs/bison/bison/lib/Attic/stpcpy.c?view=markup

Btw, the problem seems to be finished, and that's very good. :)
Comment 10 SpanKY gentoo-dev 2006-02-18 13:31:49 UTC
> This replacing is not wrong.

it is wrong for upstream ... but it's a non issue since it's been fixed correctly in upstream cpio cvs
Comment 11 SpanKY gentoo-dev 2006-02-18 13:47:49 UTC
added a revised version of this patch to cvs