problem with recipe build

Jelmer Vernooij jelmer at samba.org
Mon Mar 5 14:54:14 UTC 2012


On 03/05/2012 03:37 PM, Scott Moser wrote:
> On Sat, 3 Mar 2012, Jelmer Vernooij wrote:
>
>> On Fri, 2012-03-02 at 22:02 -0500, Scott Moser wrote:
>>>>> Which seems sane to me.  The upstream source doesn't have tags named
>>>>> 'upstream-<version>', but only 'release-<version>'.
>>>>>
>>>>> Help?
>>>> [...]
>>>>
>>>>> bzr: ERROR: Unable to find the upstream source. Import it as tag upstream-0.9.4+r4177 or build with --allow-fallback-to-native.
>>>> Your version number is saying this is a non-native package, which
>>>> requires an upstream tarball to build against.
>>> Well, its not a native package, so it makes sense (to me) that the
>>> version number would reflect that.
>> Non-native packages require a .orig.tar.gz. bzr-builder tries to
>> retrieve the contents of that tarball by taking the contents of the tree
>> at that particular tag.
> That does make sense.  I just was expecting that the daily build code for
> a non-native version string would essentially do:
>    $ bzr branch $UPSTREAM_BRANCH upstream
>    $ ( cd upstream&&  bzr export \
>       --root ${PKG_NAME}-${UPSTREAM_VERSION_PART}>  \
>       ../${PKG_NAME}_${UPSTREAM_VERSION_PART}.orig.tar.gz )
> Where UPSTREAM_VERSION_PART in this case would be '0.9.4+r4177'.
>
> And the error message does suggest the right path, but it just seemed
> wrong.
The recipe doesn't know the upstream branch, so it doesn't have a way to 
do this. It is just a set of operations to combine branches, none of 
them really have any special properties.


>
>>> I did verify that '--allow-fallback-to-native' worked, but it is just
>>> confusing to me, as this is clearly not a native package, and somehow the
>>> recipe above works, and works on launchpad.
>> This makes sense, as Launchpad has --allow-fallback-to-native enabled by
>> default.
> That makes sense as to why it builds.
>
> Is the following basic form for an upstream build sane:
> | # bzr-builder format 0.3 deb-version
> | # 2.0.0~bzr{revno}~{revno:packaging}-0ubuntu2
> | lp:euca2ools
> | nest-part packaging lp:~smoser/ubuntu/oneiric/euca2ools/upstream-pkg debian debian
Yep, that makes sense. I would generally put ~{revno:packaging} after 
the debian revision though, as that's what it relates to.

You can also use {debupstream} to extract the upstream version string 
from the packaging branch. That way you don't have to update the recipe 
each time there is a new upstream version.

E.g.:

{debupstream}~bzr{revno}-0ubuntu2~bzr{revno:packaging}

Hope this helps.

Cheers,

Jelmer




More information about the ubuntu-distributed-devel mailing list