<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>238248</bug_id>
          
          <creation_ts>2008-09-21 03:56 0000</creation_ts>
          <short_desc>media-libs/tiff-3.8.2-r4 - absolute paths in tiff-3.8.2-tiff2pdf.patch.gz</short_desc>
          <delta_ts>2008-09-25 09:21:14 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <votes>10</votes>
          <everconfirmed>1</everconfirmed>
          <reporter>oscar@oscarh.net</reporter>
          <assigned_to>nerdboy@gentoo.org</assigned_to>
          <cc>4glitch@gmail.com</cc>
    
    <cc>adhalanay@gmail.com</cc>
    
    <cc>andre@terpstra.nu</cc>
    
    <cc>emdej@emdej.com</cc>
    
    <cc>esigra@gmail.com</cc>
    
    <cc>farrel.lifson@gmail.com</cc>
    
    <cc>graphics@gentoo.org</cc>
    
    <cc>i.turturica@f5.com</cc>
    
    <cc>mmokrejs@ribosome.natur.cuni.cz</cc>
    
    <cc>mousemax@gmail.com</cc>
    
    <cc>stootch@tlen.pl</cc>
    
    <cc>vapier@gentoo.org</cc>
    
    <cc>webmaster@korten-privat.de</cc>

      

      
          <long_desc isprivate="0">
            <who>oscar@oscarh.net</who>
            <bug_when>2008-09-21 03:56:19 0000</bug_when>
            <thetext>* 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&apos;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 &lt; /var/tmp/portage/media-libs/tiff-3.8.2-r4/work/tiff-3.8.2-tiff2pdf.patch

=====================================
can&apos;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 &lt; /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&apos;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 &lt; /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&apos;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 &lt; /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&apos;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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>webmaster@korten-privat.de</who>
            <bug_when>2008-09-21 11:51:23 0000</bug_when>
            <thetext>same here...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cycloon@is-root.org</who>
            <bug_when>2008-09-21 16:33:11 0000</bug_when>
            <thetext>same here.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>emdej@emdej.com</who>
            <bug_when>2008-09-21 16:53:31 0000</bug_when>
            <thetext>same here.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wicher@gavagai.eu</who>
            <bug_when>2008-09-21 16:56:11 0000</bug_when>
            <thetext>Same here. Bug seems to originate upstream, as the b0rked patch is in the tarball, not in the filesdir.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>airyk@sabowski.com</who>
            <bug_when>2008-09-21 17:11:52 0000</bug_when>
            <thetext>Here&apos;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=&quot;Library for manipulation of TIFF (Tag Image File Format) images&quot;
 HOMEPAGE=&quot;http://www.remotesensing.org/libtiff/&quot;
-SRC_URI=&quot;ftp://ftp.remotesensing.org/pub/libtiff/${P}.tar.gz
-	mirror://gentoo/${P}-tiff2pdf.patch.bz2&quot;
+SRC_URI=&quot;ftp://ftp.remotesensing.org/pub/libtiff/${P}.tar.gz&quot;
 
 LICENSE=&quot;as-is&quot;
 SLOT=&quot;0&quot;
@@ -21,7 +20,7 @@
 src_unpack() {
 	unpack ${A}
 	cd &quot;${S}&quot;
-	epatch &quot;${WORKDIR}&quot;/${P}-tiff2pdf.patch
+	epatch &quot;${FILESDIR}&quot;/${P}-tiff2pdf.patch
 	epatch &quot;${FILESDIR}&quot;/${P}-tiffsplit.patch
 	if use jbig; then
 		epatch &quot;${FILESDIR}&quot;/${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
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>instnt@mail.ru</who>
            <bug_when>2008-09-21 18:41:14 0000</bug_when>
            <thetext>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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>RyanA@bsifargo.com</who>
            <bug_when>2008-09-22 02:19:32 0000</bug_when>
            <thetext>You can get around this by using the &quot;unstable&quot; version:
# ACCEPT_KEYWORDS=&quot;~amd64&quot; emerge tiff -av

or ~x86 if you are on a 32bit arch.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>maekke@gentoo.org</who>
            <bug_when>2008-09-22 05:00:56 0000</bug_when>
            <thetext>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
----------------------------
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tommy@gentoo.org</who>
            <bug_when>2008-09-22 14:14:16 0000</bug_when>
            <thetext>*** Bug 238359 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tommy@gentoo.org</who>
            <bug_when>2008-09-22 14:19:06 0000</bug_when>
            <thetext>*** Bug 238383 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tommy@gentoo.org</who>
            <bug_when>2008-09-22 14:20:55 0000</bug_when>
            <thetext>*** Bug 238391 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-09-22 15:34:49 0000</bug_when>
            <thetext>fixed in cvs

http://sources.gentoo.org/media-libs/tiff/tiff-3.8.2-r4.ebuild?r1=1.4&amp;r2=1.5</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@lermytte.be</who>
            <bug_when>2008-09-22 18:02:32 0000</bug_when>
            <thetext>(In reply to comment #7)
&gt; You can get around this by using the &quot;unstable&quot; version:
&gt; # ACCEPT_KEYWORDS=&quot;~amd64&quot; emerge tiff -av
&gt; 
&gt; 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&apos;t want it to end up in your world file (you probably don&apos;t in this case).

Anyway, I confirm that the 3.8.2-r5 works like a charm.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>andre@terpstra.nu</who>
            <bug_when>2008-09-23 04:50:03 0000</bug_when>
            <thetext>Solution confirmed.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>loki_val@gentoo.org</who>
            <bug_when>2008-09-23 09:44:41 0000</bug_when>
            <thetext>*** Bug 238454 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>stootch@tlen.pl</who>
            <bug_when>2008-09-23 16:15:23 0000</bug_when>
            <thetext>(In reply to comment #7)
&gt; You can get around this by using the &quot;unstable&quot; version:
&gt; # ACCEPT_KEYWORDS=&quot;~amd64&quot; emerge tiff -av
&gt; 
&gt; or ~x86 if you are on a 32bit arch.
&gt; 

Afterwards emerge it normally (without ACCEPT_KEYWORDS) and you&apos;ll end up with stable version :)</thetext>
          </long_desc>
      
    </bug>

</bugzilla>