All of lore.kernel.org
 help / color / mirror / Atom feed
* Need help for custom recipe
@ 2015-02-02 14:04 Bipnesh, Abhinav (Abhinav)
  2015-02-02 16:41 ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Bipnesh, Abhinav (Abhinav) @ 2015-02-02 14:04 UTC (permalink / raw)
  To: yocto, Bipnesh, Abhinav (Abhinav)

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

Hi,

I am trying to write an custom recipe for one of the application. In the do_install() I am using an external script for creating rpm of the application. Below is the recipe file which I have written.

SUMMARY = "Hello World"
DESCRIPTION = "A recipe for HelloWorld"

LICENSE = "MIT"
LIC_FILES_CHKSUM = file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302<file:///\\$%7bCOMMON_LICENSE_DIR%7d\MIT;md5=0835ade698e0bcf8506ecda2f7b4f302>

# Upstream names releases after SVN revs
#SRCREV = "100"
SRCREV = "${AUTOREV}"
PV = "r${SRCREV}"
DEPENDS = "boost util-linux curl"

SRC_URI = "file://helloworld.c"
S = "${WORKDIR}

do_install () {
    sh ${WORKDIR}/ build.sh

}

Now as this is a makefile based project. Now when I fire bitbake helloworld I am able to build the RPM of the package using build.sh file.

But when I try to check these RPM under <build_dir>/tmp/deploy it is not found.

Any thoughts how to fix the same.

Thanks,
Abhinav

[-- Attachment #2: Type: text/html, Size: 3878 bytes --]

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

* Re: Need help for custom recipe
  2015-02-02 14:04 Need help for custom recipe Bipnesh, Abhinav (Abhinav)
@ 2015-02-02 16:41 ` Paul Eggleton
  2015-02-02 16:46   ` Bipnesh, Abhinav (Abhinav)
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2015-02-02 16:41 UTC (permalink / raw)
  To: Bipnesh, Abhinav (Abhinav); +Cc: yocto

Hi Abhinav,

On Monday 02 February 2015 14:04:49 Bipnesh, Abhinav wrote:
> I am trying to write an custom recipe for one of the application. In the
> do_install() I am using an external script for creating rpm of the
> application. Below is the recipe file which I have written.
> 
> SUMMARY = "Hello World"
> DESCRIPTION = "A recipe for HelloWorld"
> 
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302<file:
> ///\\$%7bCOMMON_LICENSE_DIR%7d\MIT;md5=0835ade698e0bcf8506ecda2f7b4f302>
> 
> # Upstream names releases after SVN revs
> #SRCREV = "100"
> SRCREV = "${AUTOREV}"
> PV = "r${SRCREV}"
> DEPENDS = "boost util-linux curl"
> 
> SRC_URI = "file://helloworld.c"
> S = "${WORKDIR}
> 
> do_install () {
>     sh ${WORKDIR}/ build.sh
> 
> }
> 
> Now as this is a makefile based project. Now when I fire bitbake helloworld
> I am able to build the RPM of the package using build.sh file.
> 
> But when I try to check these RPM under <build_dir>/tmp/deploy it is not
> found.

My first question is why do you need to create the RPMs in a custom manner like 
this? By doing so you are bypassing quite a lot of well-tested logic that we 
have written around packaging.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: Need help for custom recipe
  2015-02-02 16:41 ` Paul Eggleton
@ 2015-02-02 16:46   ` Bipnesh, Abhinav (Abhinav)
  2015-02-02 16:54     ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Bipnesh, Abhinav (Abhinav) @ 2015-02-02 16:46 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto

Hi Paul,

Actually we do have existing scripts which create RPM's for other platform i.e. Linux. We would be cross compile the code and want to use the existing scripts for doing it. As the existing RPM spec contain lot of logic for post install, upgrade use case etc. So we can use the current infrastructure but it will be a re-work for us.
So we were thinking to use it.

Thanks,
Abhinav
________________________________________
From: Paul Eggleton [paul.eggleton@linux.intel.com]
Sent: Monday, February 02, 2015 10:11 PM
To: Bipnesh, Abhinav (Abhinav)
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Need help for custom recipe

Hi Abhinav,

On Monday 02 February 2015 14:04:49 Bipnesh, Abhinav wrote:
> I am trying to write an custom recipe for one of the application. In the
> do_install() I am using an external script for creating rpm of the
> application. Below is the recipe file which I have written.
>
> SUMMARY = "Hello World"
> DESCRIPTION = "A recipe for HelloWorld"
>
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302<file:
> ///\\$%7bCOMMON_LICENSE_DIR%7d\MIT;md5=0835ade698e0bcf8506ecda2f7b4f302>
>
> # Upstream names releases after SVN revs
> #SRCREV = "100"
> SRCREV = "${AUTOREV}"
> PV = "r${SRCREV}"
> DEPENDS = "boost util-linux curl"
>
> SRC_URI = "file://helloworld.c"
> S = "${WORKDIR}
>
> do_install () {
>     sh ${WORKDIR}/ build.sh
>
> }
>
> Now as this is a makefile based project. Now when I fire bitbake helloworld
> I am able to build the RPM of the package using build.sh file.
>
> But when I try to check these RPM under <build_dir>/tmp/deploy it is not
> found.

My first question is why do you need to create the RPMs in a custom manner like
this? By doing so you are bypassing quite a lot of well-tested logic that we
have written around packaging.

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: Need help for custom recipe
  2015-02-02 16:46   ` Bipnesh, Abhinav (Abhinav)
@ 2015-02-02 16:54     ` Paul Eggleton
  2015-02-02 17:14       ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2015-02-02 16:54 UTC (permalink / raw)
  To: Bipnesh, Abhinav (Abhinav); +Cc: yocto

On Monday 02 February 2015 16:46:37 Bipnesh, Abhinav wrote:
> Paul Eggleton wrote:
> > On Monday 02 February 2015 14:04:49 Bipnesh, Abhinav wrote:
> > > I am trying to write an custom recipe for one of the application. In the
> > > do_install() I am using an external script for creating rpm of the
> > > application.
> >
> > My first question is why do you need to create the RPMs in a custom manner
> > like this? By doing so you are bypassing quite a lot of well-tested logic
> > that we have written around packaging.
>
> Actually we do have existing scripts which create RPM's for other platform
> i.e. Linux. We would be cross compile the code and want to use the existing
> scripts for doing it. As the existing RPM spec contain lot of logic for
> post install, upgrade use case etc. So we can use the current
> infrastructure but it will be a re-work for us. So we were thinking to use
> it.

I'd have to say this is something we don't support. If you want to do this you 
would need to disable the current packaging tasks and stage the package files 
yourself, but that's going to take almost as much work as converting over your 
postinstall scripts to be specified within the recipe. You would also lose all 
of the package QA checks that we currently run.

Cheers,
Paul

-- 



Paul Eggleton
Intel Open Source Technology Centre


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

* Re: Need help for custom recipe
  2015-02-02 16:54     ` Paul Eggleton
@ 2015-02-02 17:14       ` Burton, Ross
  2015-02-02 17:33         ` Bipnesh, Abhinav (Abhinav)
  0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2015-02-02 17:14 UTC (permalink / raw)
  To: Bipnesh, Abhinav (Abhinav); +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

On 2 February 2015 at 16:54, Paul Eggleton <paul.eggleton@linux.intel.com>
wrote:

> I'd have to say this is something we don't support. If you want to do this
> you
> would need to disable the current packaging tasks and stage the package
> files
> yourself, but that's going to take almost as much work as converting over
> your
> postinstall scripts to be specified within the recipe. You would also lose
> all
> of the package QA checks that we currently run.
>

If you *really* want to do this then you'll probably need a custom
do_package to put the RPMs you've generated in the place that bitbake
expects them, or maybe a custom do_deploy.  At this point you're subverting
the system so you'll have to look at the default tasks to work out how they
operate and how to replace them.

Ross

[-- Attachment #2: Type: text/html, Size: 1248 bytes --]

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

* Re: Need help for custom recipe
  2015-02-02 17:14       ` Burton, Ross
@ 2015-02-02 17:33         ` Bipnesh, Abhinav (Abhinav)
  0 siblings, 0 replies; 6+ messages in thread
From: Bipnesh, Abhinav (Abhinav) @ 2015-02-02 17:33 UTC (permalink / raw)
  To: Burton, Ross, paul.eggleton; +Cc: yocto

Hi,

Thanks for providing input. I would need to evaluate the modification required to override such thing. One quick query in the do_install() can we have the check as we do normally in the RPM spec file.
I mean to say %file and some logic like if this exist then execute a particular block. A post and prerun section. As what I can understand is that do_install or internally do_package generate its own SPEC file and create RPM.
Sorry for ask such thing as I am not able to find a document reference or an example which shows how we can achieve the same.

Thanks,
Abhinav
________________________________________
From: Burton, Ross [ross.burton@intel.com]
Sent: Monday, February 02, 2015 10:44 PM
To: Bipnesh, Abhinav (Abhinav)
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Need help for custom recipe

On 2 February 2015 at 16:54, Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> wrote:
I'd have to say this is something we don't support. If you want to do this you
would need to disable the current packaging tasks and stage the package files
yourself, but that's going to take almost as much work as converting over your
postinstall scripts to be specified within the recipe. You would also lose all
of the package QA checks that we currently run.

If you *really* want to do this then you'll probably need a custom do_package to put the RPMs you've generated in the place that bitbake expects them, or maybe a custom do_deploy.  At this point you're subverting the system so you'll have to look at the default tasks to work out how they operate and how to replace them.

Ross


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

end of thread, other threads:[~2015-02-02 17:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 14:04 Need help for custom recipe Bipnesh, Abhinav (Abhinav)
2015-02-02 16:41 ` Paul Eggleton
2015-02-02 16:46   ` Bipnesh, Abhinav (Abhinav)
2015-02-02 16:54     ` Paul Eggleton
2015-02-02 17:14       ` Burton, Ross
2015-02-02 17:33         ` Bipnesh, Abhinav (Abhinav)

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.