You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by amit mehta <gm...@gmail.com> on 2017/03/23 00:46:23 UTC

Query on repository and packaging

Hi,

I was testing Mynewt's packaging and distribution system.and was
able to add additional repository to my project and build a simple
led toggling application for nrf52 DK.

I think that the repository system is a very nice idea as it allows to
a) Roll out various _independent_ releases.
b) User can pick and choose different repositories.

To test this, I created a repository on github and created a sample
blinky application that requires two different repositories (glue logic
in project.yml and pkg.yml). As, at the moment, the idea is to have
a repository, containing some application, I was wondering if this is
a good way of doing it ? I think, the source management in this case,
should be similar to mynewt's core repository (apache-mynewt-core),
and contains:
a) project.yml (so that, i can build applications, which have dependencies
with other repositories)
b) repository.yml (so that, other users can add this repo in their
project.yml file)
c) pkg.yml at the package level (say, under apps/blinky/)

In nutshell, the different glue logic files look like as below:

<snip from project.yml>

project.name: "my_project"

project.repositories:
    - apache-mynewt-core
    - mynewt_nordic

# Use github's distribution mechanism for core ASF libraries.
# This provides mirroring automatically for us.
#
repository.apache-mynewt-core:
    type: github
    vers: 0-latest
    user: apache
    repo: incubator-mynewt-core

# nRF5xxx specific external libraries
#
repository.mynewt_nordic:
    type: github
    vers: 0-latest
    user: runtimeinc
    repo: mynewt_nordic

<snip from project.yml>
--------------------------------------

<snip from repository.yml>

repo.name: mynewt-nrf52-prph
repo.versions:
    "0.0.0": "develop"
    "0-latest": "0.0.0"

<snip from repository.yml>
-----------------------------------------

<snip from apps/blinky/pkg.yml>

pkg.name: apps/blinky
pkg.type: app
pkg.description: blinky example for NRF52 DK
pkg.author: "Kumar Amit Mehta <gm...@gmail.com>"
pkg.homepage: "https://github.com/bartledan"
pkg.keywords:
pkg.deps:
   - "@apache-mynewt-core/kernel/os"
   - "@apache-mynewt-core/hw/hal"
   - "@apache-mynewt-core/sys/console/full"
   - "@mynewt_nordic/hw/mcu/nordic_sdk"

<snip from apps/blinky/pkg.yml>
------------------------------------------------

The application builds and loads fine on the nRF52 Dev-Kit.

Thanks,
Amit

-- 
Sent from Bahamas, while drinking chi-chi and piña colada.

Re: Query on repository and packaging

Posted by Fabio Utzig <ut...@utzig.org>.
> I was little tired by the time, I hit the send button, hence I think, I
> did
> not made the question very clear, hence let me rephrase the question;
> Is this approach of creating repository, indeed correct ? or I'm missing
> something ?

Looks correct to me.

Re: Query on repository and packaging

Posted by marko kiiskila <ma...@runtime.io>.
> On Mar 23, 2017, at 3:15 PM, amit mehta <gm...@gmail.com> wrote:
> 
> On Thu, Mar 23, 2017 at 2:38 AM, Fabio Utzig <ut...@utzig.org> wrote:
>> Very cool Amit!
>> 
>> Although your email is basically informational, I would suggest one
>> change: you should be using "runtimeco" instead of "runtimeinc". We're
>> moving projects there, in your case the correct repo would be:
>> 
>> https://github.com/runtimeco/mynewt_nordic
> 
> Fabio, thank you so much.
> 
> I was little tired by the time, I hit the send button, hence I think, I did
> not made the question very clear, hence let me rephrase the question;
> Is this approach of creating repository, indeed correct ? or I'm missing
> something ?
> 
> Thanks,
> Amit

Indeed it is correct. The observation regarding independent releases
is also right.


Re: Query on repository and packaging

Posted by amit mehta <gm...@gmail.com>.
On Thu, Mar 23, 2017 at 2:38 AM, Fabio Utzig <ut...@utzig.org> wrote:
> Very cool Amit!
>
> Although your email is basically informational, I would suggest one
> change: you should be using "runtimeco" instead of "runtimeinc". We're
> moving projects there, in your case the correct repo would be:
>
> https://github.com/runtimeco/mynewt_nordic

Fabio, thank you so much.

I was little tired by the time, I hit the send button, hence I think, I did
not made the question very clear, hence let me rephrase the question;
Is this approach of creating repository, indeed correct ? or I'm missing
something ?

Thanks,
Amit

Re: Query on repository and packaging

Posted by Fabio Utzig <ut...@utzig.org>.
Very cool Amit!

Although your email is basically informational, I would suggest one
change: you should be using "runtimeco" instead of "runtimeinc". We're
moving projects there, in your case the correct repo would be:

https://github.com/runtimeco/mynewt_nordic

Cheers,
Fabio Utzig

On Wed, Mar 22, 2017, at 09:46 PM, amit mehta wrote:
> Hi,
> 
> I was testing Mynewt's packaging and distribution system.and was
> able to add additional repository to my project and build a simple
> led toggling application for nrf52 DK.
> 
> I think that the repository system is a very nice idea as it allows to
> a) Roll out various _independent_ releases.
> b) User can pick and choose different repositories.
> 
> To test this, I created a repository on github and created a sample
> blinky application that requires two different repositories (glue logic
> in project.yml and pkg.yml). As, at the moment, the idea is to have
> a repository, containing some application, I was wondering if this is
> a good way of doing it ? I think, the source management in this case,
> should be similar to mynewt's core repository (apache-mynewt-core),
> and contains:
> a) project.yml (so that, i can build applications, which have
> dependencies
> with other repositories)
> b) repository.yml (so that, other users can add this repo in their
> project.yml file)
> c) pkg.yml at the package level (say, under apps/blinky/)
> 
> In nutshell, the different glue logic files look like as below:
> 
> <snip from project.yml>
> 
> project.name: "my_project"
> 
> project.repositories:
>     - apache-mynewt-core
>     - mynewt_nordic
> 
> # Use github's distribution mechanism for core ASF libraries.
> # This provides mirroring automatically for us.
> #
> repository.apache-mynewt-core:
>     type: github
>     vers: 0-latest
>     user: apache
>     repo: incubator-mynewt-core
> 
> # nRF5xxx specific external libraries
> #
> repository.mynewt_nordic:
>     type: github
>     vers: 0-latest
>     user: runtimeinc
>     repo: mynewt_nordic
> 
> <snip from project.yml>
> --------------------------------------
> 
> <snip from repository.yml>
> 
> repo.name: mynewt-nrf52-prph
> repo.versions:
>     "0.0.0": "develop"
>     "0-latest": "0.0.0"
> 
> <snip from repository.yml>
> -----------------------------------------
> 
> <snip from apps/blinky/pkg.yml>
> 
> pkg.name: apps/blinky
> pkg.type: app
> pkg.description: blinky example for NRF52 DK
> pkg.author: "Kumar Amit Mehta <gm...@gmail.com>"
> pkg.homepage: "https://github.com/bartledan"
> pkg.keywords:
> pkg.deps:
>    - "@apache-mynewt-core/kernel/os"
>    - "@apache-mynewt-core/hw/hal"
>    - "@apache-mynewt-core/sys/console/full"
>    - "@mynewt_nordic/hw/mcu/nordic_sdk"
> 
> <snip from apps/blinky/pkg.yml>
> ------------------------------------------------
> 
> The application builds and loads fine on the nRF52 Dev-Kit.
> 
> Thanks,
> Amit
> 
> -- 
> Sent from Bahamas, while drinking chi-chi and piña colada.