Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238248 - media-libs/tiff-3.8.2-r4 - absolute paths in tiff-3.8.2-tiff2pdf.patch.gz
Summary: media-libs/tiff-3.8.2-r4 - absolute paths in tiff-3.8.2-tiff2pdf.patch.gz
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major with 1 vote (vote)
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords:
: 238359 238383 238391 238454 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-21 03:56 UTC by Oscar Hellström
Modified: 2008-09-25 09:21 UTC (History)
13 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 Oscar Hellström 2008-09-21 03:56:19 UTC
* Failed Patch: tiff-3.8.2-tiff2pdf.patch !
 *  ( /var/tmp/portage/media-libs/tiff-3.8.2-r4/work/tiff-3.8.2-tiff2pdf.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/media-libs/tiff-3.8.2-r4/temp/tiff-3.8.2-tiff2pdf.patch-28912.out

Contents of  /var/tmp/portage/media-libs/tiff-3.8.2-r4/temp/tiff-3.8.2-tiff2pdf.patch-28912.out:

Can't apply patch, output from emerge:

***** tiff-3.8.2-tiff2pdf.patch *****

NOTE: skipping -p0 due to absolute paths in patch:
2:+++ /home/sarnold/src/libtiff/tools/tiff2pdf.c        2006-06-08 04:27:11.000000000 -0700
=====================================

PATCH COMMAND:   patch -p1 -g0 -E --no-backup-if-mismatch < /var/tmp/portage/media-libs/tiff-3.8.2-r4/work/tiff-3.8.2-tiff2pdf.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:
--------------------------
|--- tools/tiff2pdf.c   2006-03-21 08:42:51.000000000 -0800
|+++ /home/sarnold/src/libtiff/tools/tiff2pdf.c 2006-06-08 04:27:11.000000000 -0700
--------------------------
No file to patch.  Skipping patch.
75 out of 75 hunks ignored
=====================================

PATCH COMMAND:   patch -p2 -g0 -E --no-backup-if-mismatch < /var/tmp/portage/media-libs/tiff-3.8.2-r4/work/tiff-3.8.2-tiff2pdf.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:
--------------------------
|--- tools/tiff2pdf.c   2006-03-21 08:42:51.000000000 -0800
|+++ /home/sarnold/src/libtiff/tools/tiff2pdf.c 2006-06-08 04:27:11.000000000 -0700
--------------------------
No file to patch.  Skipping patch.
75 out of 75 hunks ignored
=====================================

PATCH COMMAND:   patch -p3 -g0 -E --no-backup-if-mismatch < /var/tmp/portage/media-libs/tiff-3.8.2-r4/work/tiff-3.8.2-tiff2pdf.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:
--------------------------
|--- tools/tiff2pdf.c   2006-03-21 08:42:51.000000000 -0800
|+++ /home/sarnold/src/libtiff/tools/tiff2pdf.c 2006-06-08 04:27:11.000000000 -0700
--------------------------
No file to patch.  Skipping patch.
75 out of 75 hunks ignored
=====================================

PATCH COMMAND:   patch -p4 -g0 -E --no-backup-if-mismatch < /var/tmp/portage/media-libs/tiff-3.8.2-r4/work/tiff-3.8.2-tiff2pdf.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:
--------------------------
|--- tools/tiff2pdf.c   2006-03-21 08:42:51.000000000 -0800
|+++ /home/sarnold/src/libtiff/tools/tiff2pdf.c 2006-06-08 04:27:11.000000000 -0700
--------------------------
No file to patch.  Skipping patch.
75 out of 75 hunks ignored


Reproducible: Always

Steps to Reproduce:
1. emerge --sync
2. emere tiff
Comment 1 Till Korten 2008-09-21 11:51:23 UTC
same here...
Comment 2 Christian Gut 2008-09-21 16:33:11 UTC
same here.
Comment 3 emdej 2008-09-21 16:53:31 UTC
same here.
Comment 4 Wicher Minnaard 2008-09-21 16:56:11 UTC
Same here. Bug seems to originate upstream, as the b0rked patch is in the tarball, not in the filesdir.
Comment 5 airyk 2008-09-21 17:11:52 UTC
Here's a quick fix, as I would hope this gets fixed properly soon anyway

I created a local overlay ebuild for tiff-3.8.2-4, and put the offending patchfile (tiff-3.8.2-tiff2pdf.patch) into the files directory in the overlay ebuild.

Patch the ebuild file with this:
--- tiff-3.8.2-r4.ebuild	2008-09-21 08:51:16.000000000 -0400
+++ tiff-3.8.2-r4.ebuild	2008-09-21 08:53:19.000000000 -0400
@@ -6,8 +6,7 @@
 
 DESCRIPTION="Library for manipulation of TIFF (Tag Image File Format) images"
 HOMEPAGE="http://www.remotesensing.org/libtiff/"
-SRC_URI="ftp://ftp.remotesensing.org/pub/libtiff/${P}.tar.gz
-	mirror://gentoo/${P}-tiff2pdf.patch.bz2"
+SRC_URI="ftp://ftp.remotesensing.org/pub/libtiff/${P}.tar.gz"
 
 LICENSE="as-is"
 SLOT="0"
@@ -21,7 +20,7 @@
 src_unpack() {
 	unpack ${A}
 	cd "${S}"
-	epatch "${WORKDIR}"/${P}-tiff2pdf.patch
+	epatch "${FILESDIR}"/${P}-tiff2pdf.patch
 	epatch "${FILESDIR}"/${P}-tiffsplit.patch
 	if use jbig; then
 		epatch "${FILESDIR}"/${PN}-jbig.patch


then patch tiff-3.8.2-tiff2pdf.patch with this:
--- tiff-3.8.2-tiff2pdf.patch	2008-09-21 09:02:52.000000000 -0400
+++ tiff-3.8.2-tiff2pdf.patch	2008-09-21 08:49:08.000000000 -0400
@@ -1,5 +1,5 @@
 --- tools/tiff2pdf.c	2006-03-21 08:42:51.000000000 -0800
-+++ /home/sarnold/src/libtiff/tools/tiff2pdf.c	2006-06-08 04:27:11.000000000 -0700
++++ tools/tiff2pdf.c	2006-06-08 04:27:11.000000000 -0700
Comment 6 c0rnoTa 2008-09-21 18:41:14 UTC
I have modified /usr/portage/distfiles/tiff-3.8.2-tiff2pdf.patch.gz :

line 3 was: 
--- tools/tiff2pdf.c   2006-03-21 08:42:51.000000000 -0800
set to: 
--tiff-3.8.2/libtiff/tools/tiff2pdf.c   2006-03-21 08:42:51.000000000 -0800

and line 4 was: 
+++ /home/sarnold/src/libtiff/tools/tiff2pdf.c 2006-06-08 04:27:11.000000000 -0700
set to:
+++ tiff-3.8.2/libtiff/tools/tiff2pdf.c 2006-06-08 04:27:11.000000000 -0700

then generate new SHA256:
sha256sum /usr/porttage/distfiles/tiff-3.8.2-tiff2pdf.patch.gz

and finally put new sha256 sum into /usr/portage/media-libs/tiff/Manifest

it works for me
Comment 7 Ryan Anderson 2008-09-22 02:19:32 UTC
You can get around this by using the "unstable" version:
# ACCEPT_KEYWORDS="~amd64" emerge tiff -av

or ~x86 if you are on a 32bit arch.
Comment 8 Markus Meier gentoo-dev 2008-09-22 05:00:56 UTC
this happens due to a change of epatch behavior.
@nerdboy: do you/me want to create a new patch (with a correct directory) or change the directory of the diff with sed in the ebuild?

RCS file: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v
Working file: eutils.eclass
head: 1.307
branch:
locks: strict
access list:
symbolic names:
        RELEASE-1_4: 1.46.0.2
        GENTOO_1_4_SNAP_2003010800: 1.12
keyword substitution: kv
total revisions: 308;   selected revisions: 308
description:
----------------------------
revision 1.307
date: 2008-09-20 21:03:31 +0200;  author: vapier;  state: Exp;  lines: +6 -4;  commitid: e5248d549014567;
even better: dont whine about abs paths, just transparently skip the -p0 step and log why we are
----------------------------
revision 1.306
date: 2008-09-20 20:58:57 +0200;  author: vapier;  state: Exp;  lines: +4 -2;  commitid: dbd48d547ee4567;
filter /dev/null from abs path check and include the offending line in the warning
----------------------------
revision 1.305
date: 2008-09-20 20:55:07 +0200;  author: vapier;  state: Exp;  lines: +8 -1;  commitid: d6048d547094567;
start whining about absolute paths in patch files
----------------------------
Comment 9 Thomas Sachau gentoo-dev 2008-09-22 14:14:16 UTC
*** Bug 238359 has been marked as a duplicate of this bug. ***
Comment 10 Thomas Sachau gentoo-dev 2008-09-22 14:19:06 UTC
*** Bug 238383 has been marked as a duplicate of this bug. ***
Comment 11 Thomas Sachau gentoo-dev 2008-09-22 14:20:55 UTC
*** Bug 238391 has been marked as a duplicate of this bug. ***
Comment 13 Kobboi 2008-09-22 18:02:32 UTC
(In reply to comment #7)
> You can get around this by using the "unstable" version:
> # ACCEPT_KEYWORDS="~amd64" emerge tiff -av
> 
> or ~x86 if you are on a 32bit arch.

The right way to do that is to use /etc/portage/package.* files or directories for that. Also, emerge a package with the -1 option if you don't want it to end up in your world file (you probably don't in this case).

Anyway, I confirm that the 3.8.2-r5 works like a charm.
Comment 14 André Terpstra 2008-09-23 04:50:03 UTC
Solution confirmed.
Comment 15 Peter Alfredsen (RETIRED) gentoo-dev 2008-09-23 09:44:41 UTC
*** Bug 238454 has been marked as a duplicate of this bug. ***
Comment 16 stootch 2008-09-23 16:15:23 UTC
(In reply to comment #7)
> You can get around this by using the "unstable" version:
> # ACCEPT_KEYWORDS="~amd64" emerge tiff -av
> 
> or ~x86 if you are on a 32bit arch.
> 

Afterwards emerge it normally (without ACCEPT_KEYWORDS) and you'll end up with stable version :)