All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Ege <chege@cybertux.de>
To: yocto@yoctoproject.org
Subject: Re: How to handle src.rpm packages
Date: Sat, 01 Dec 2012 15:00:34 +0100	[thread overview]
Message-ID: <50BA0D82.3070001@cybertux.de> (raw)
In-Reply-To: <c7e075a69adcbd736ab89d241cd10ec3-EhVcXlhFQwBWRwoYGgwbZ1dfaANWUkNeXENbAF9TNkFYXEYJVl1oA1RTQ15eQioDXF9aSFxTXQhb-webmailer2@server03.webmailer.hosteurope.de>

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 :~



      reply	other threads:[~2012-12-01 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-25 12:28 How to handle src.rpm packages Christian Ege
2012-12-01 14:00 ` Christian Ege [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50BA0D82.3070001@cybertux.de \
    --to=chege@cybertux.de \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.