Newbie: applying hv.c patch to redhat 9 rpms

I just joined the list today, beacuse I’m trying to solve this problem,
based on responses that applying the hv.c patch works. I don’t have
a lot of experience with patch files, so I going to assume I am doing
something wrong.

Trying to rpmbuild -ba perl.spec throws:
Patch #32002 (perl-5.8.0-storable.patch):

  • patch -p1 -s
    2 out of 2 hunks FAILED – saving rejects to file hv.c.rej
    error: Bad exit status from /var/tmp/rpm-tmp.23516 (%prep)

Here’s what I did:

I installed all the redhat perl SRPMS.

Make a file in /usr/src/redhat/SOURCES/perl-5.8.0-storable.patch (see end of msg for
my patchfile. i adjusted the paths by looking at the pagerfix.patch)

Changed SPECS/perl.spec to include
Patch32002: perl-5.8.0-storable.patch
%patch32002 -p1

then ran rpmbuild -ba perl.spec.

– ams

— perl-5.8.0/hv.c~ Sat Aug 9 23:43:53 2003
+++ perl-5.8.0/hv.c Sun Aug 10 00:25:09 2003
@@ -308,6 +308,8 @@ S_hv_fetch_flags(pTHX_ HV *hv, const cha
}
else
HeKFLAGS(entry) =3D flags;

  •        if (flags)
    
  •            HvHASKFLAGS_on(hv);
       }
       if (flags & HVhek_FREEKEY)
           Safefree(key);
    

@@ -478,6 +480,8 @@ Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keys
}
else
HeKFLAGS(entry) =3D flags;

  •        if (flags)
    
  •            HvHASKFLAGS_on(hv);
       }
      if (key !=3D keysave)
          Safefree(key);
    

here’s the hv.c.rej file:

*** 308,313 ****
}
else
HeKFLAGS(entry) =3D flags;
}
if (flags & HVhek_FREEKEY)
Safefree(key);
— 308,315 ----
}
else
HeKFLAGS(entry) =3D flags;

  •         if (flags)
    
  •             HvHASKFLAGS_on(hv);
        }
        if (flags & HVhek_FREEKEY)
            Safefree(key);
    

*** 478,483 ****
}
else
HeKFLAGS(entry) =3D flags;
}
if (key !=3D keysave)
Safefree(key);
— 480,487 ----
}
else
HeKFLAGS(entry) =3D flags;

  •         if (flags)
    
  •             HvHASKFLAGS_on(hv);
        }
       if (key !=3D keysave)
           Safefree(key);
    

[from the rt3 on redhat thread]

i confirme, i have rebuild the RPMS of perl on a
redhat 9, after i have aplied the patch. and now i
have no more probleme with the storable

le 26 Aug, Nathan Affleck a écrit :
I applied the hv.c patch to the redhat-9-perl-5.8.0 rpm source, rebuilt
it, and it’s running smoothly. I think that’s the only real solution,
unless Storable.pm gets “patched” for the perl bug, or you wait until
5.8.1 ?? Does this problem only occur on 5.8.0 and Redhat? Why hasn’t
anyone else been complaining about other systems with 5.8.0?

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-
8&threadm=057001c35155%242f5622b0%249a06000a%40VinnyPavillion&rnum=10&p
rev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-
8%26q%3Dstorable.pm%2B5.8.0