All of lore.kernel.org
 help / color / mirror / Atom feed
* How to handle src.rpm packages
@ 2012-11-25 12:28 Christian Ege
  2012-12-01 14:00 ` Christian Ege
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Ege @ 2012-11-25 12:28 UTC (permalink / raw)
  To: yocto

 Hello,

 I am interested in how to handle source code inside of a src.rpm 
 package. There had been a patch from Mark Hatle which handles the rpm 
 packages inside the fetcher2. In his patch he suggests to handle Patches 
 inside the rpm in the following way:


 file://${WORKDIR}/mypatch.patch

 When I tried this inside the SRC_URI declaration I always get en error 
 like this:

 NOTE: Running task 439 of 669 (ID: 4, 
 /home/chris/src/poky-denzil/meta-stlinux/recipes-core/stslave/stslave_0.7.bb, 
 do_fetch)
 NOTE: package stslave-0.7-r1: task do_fetch: Started
 ERROR: Function failed: Fetcher failure for URL: 
 'file:///home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz'. 
 Unable to fetch URL from any source.
 ERROR: Logfile of failure stored in: 
 /home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/temp/log.do_fetch.25817
 Log data follows:
 | DEBUG: Trying PREMIRRORS
 | DEBUG: For url ['file', '', 
 '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
 '', '', {}] comparing ['bzr', '.*', '/.*', '', '', {}] to ['http', 
 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
 | DEBUG: For url ['file', '', 
 '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
 '', '', {}] comparing ['cvs', '.*', '/.*', '', '', {}] to ['http', 
 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
 | DEBUG: For url ['file', '', 
 '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
 '', '', {}] comparing ['git', '.*', '/.*', '', '', {}] to ['http', 
 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
 | DEBUG: For url ['file', '', 
 '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
 '', '', {}] comparing ['hg', '.*', '/.*', '', '', {}] to ['http', 
 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
 | DEBUG: For url ['file', '', 
 '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
 '', '', {}] comparing ['osc', '.*', '/.*', '', '', {}] to ['http', 
 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
 | DEBUG: For url ['file', '', 
 '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
 '', '', {}] comparing ['p4', '.*', '/.*', '', '', {}] to ['http', 
 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
 | DEBUG: For url ['file', '', 
 '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
 '', '', {}] comparing ['svk', '.*', '/.*', '', '', {}] to ['http', 
 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
 | DEBUG: For url ['file', '', 
 '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
 '', '', {}] comparing ['svn', '.*', '/.*', '', '', {}] to ['http', 
 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
 | DEBUG: Trying Upstream
 | ERROR: Function failed: Fetcher failure for URL: 
 'file:///home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz'. 
 Unable to fetch URL from any source.

 Yes of course I can just let fetcher2 extract all the files an 
 afterwards apply the patches by hand. But I think there should be a more 
 generic way to handle this. I hope I can get some hints how to solve 
 this.




 with kind regards,

 Christian




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to handle src.rpm packages
  2012-11-25 12:28 How to handle src.rpm packages Christian Ege
@ 2012-12-01 14:00 ` Christian Ege
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Ege @ 2012-12-01 14:00 UTC (permalink / raw)
  To: yocto

Hi,

I think src rpms are not that interesting stuff for a lot of you. I've 
fixed this by my own by adding a class to my meta-stlinux layer which 
handles the extra sources and patches within the *.src.rpm.

The idea was taken from the lsof package.

LOCAL_SRC ??= ""

def src_rpm_do_base(d,func):
     bb.build.exec_func(func, d)
     src_uri = d.getVar('SRC_URI')
     d.setVar('SRC_URI', '${LOCAL_SRC}')
     bb.build.exec_func(func, d)
     d.setVar('SRC_URI', src_uri)



python do_unpack () {
     src_rpm_do_base(d,'base_do_unpack')
}

python do_patch () {
     src_rpm_do_base(d,'base_d
}

https://github.com/project-magpie/meta-stlinux/blob/master/classes/src_rpm.bbclass

I hope this is the way things like this should be handled.

regards,

Christian



> Hello,
>
> I am interested in how to handle source code inside of a src.rpm 
> package. There had been a patch from Mark Hatle which handles the rpm 
> packages inside the fetcher2. In his patch he suggests to handle 
> Patches inside the rpm in the following way:
>
>
> file://${WORKDIR}/mypatch.patch
>
> When I tried this inside the SRC_URI declaration I always get en error 
> like this:
>
> NOTE: Running task 439 of 669 (ID: 4, 
> /home/chris/src/poky-denzil/meta-stlinux/recipes-core/stslave/stslave_0.7.bb, 
> do_fetch)
> NOTE: package stslave-0.7-r1: task do_fetch: Started
> ERROR: Function failed: Fetcher failure for URL: 
> 'file:///home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz'. 
> Unable to fetch URL from any source.
> ERROR: Logfile of failure stored in: 
> /home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/temp/log.do_fetch.25817
> Log data follows:
> | DEBUG: Trying PREMIRRORS
> | DEBUG: For url ['file', '', 
> '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
> '', '', {}] comparing ['bzr', '.*', '/.*', '', '', {}] to ['http', 
> 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
> | DEBUG: For url ['file', '', 
> '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
> '', '', {}] comparing ['cvs', '.*', '/.*', '', '', {}] to ['http', 
> 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
> | DEBUG: For url ['file', '', 
> '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
> '', '', {}] comparing ['git', '.*', '/.*', '', '', {}] to ['http', 
> 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
> | DEBUG: For url ['file', '', 
> '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
> '', '', {}] comparing ['hg', '.*', '/.*', '', '', {}] to ['http', 
> 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
> | DEBUG: For url ['file', '', 
> '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
> '', '', {}] comparing ['osc', '.*', '/.*', '', '', {}] to ['http', 
> 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
> | DEBUG: For url ['file', '', 
> '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
> '', '', {}] comparing ['p4', '.*', '/.*', '', '', {}] to ['http', 
> 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
> | DEBUG: For url ['file', '', 
> '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
> '', '', {}] comparing ['svk', '.*', '/.*', '', '', {}] to ['http', 
> 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
> | DEBUG: For url ['file', '', 
> '/home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz', 
> '', '', {}] comparing ['svn', '.*', '/.*', '', '', {}] to ['http', 
> 'downloads.yoctoproject.org', '/mirror/sources/', '', '', {}]
> | DEBUG: Trying Upstream
> | ERROR: Function failed: Fetcher failure for URL: 
> 'file:///home/chris/src/poky-denzil/spark7162-build/tmp/work/sh4-poky-linux/stslave-0.7-r1/stslave-0.7.tar.gz'. 
> Unable to fetch URL from any source.
>
> Yes of course I can just let fetcher2 extract all the files an 
> afterwards apply the patches by hand. But I think there should be a 
> more generic way to handle this. I hope I can get some hints how to 
> solve this.
>
>
>
>
> with kind regards,
>
> Christian
>
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


-- 
~: https://github.com/project-magpie/meta-stlinux :~



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-01 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-25 12:28 How to handle src.rpm packages Christian Ege
2012-12-01 14:00 ` Christian Ege

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.