You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by "rich.peters" <rp...@sandia.gov> on 2014/04/15 17:28:55 UTC

Karaf console command enhancements for osgi

Hi,

we have had a hard time working around installing some updates to osgi
bundles that our security required we make.  There is currently not an easy
way to get the bundle id of an arbitrary package.


Life would be a lot easier if there were two new features:

 
  1.  There was an osgi command to query the bundle id of a package name in
the maven format:

               osgi:bundle org.springframework/spring-core/3.1.4.RELEASE

       currently there is no way to get the bundle id of a package easily

 

  2.  The osgi:install command accepted a bundle bundle-level as an optional
parameter (as in the osgi:bundle-level command)

       if you do 1.  you dont absolutely need this, but it would be
convenient

 

These two features would make scripting upgrades easier

 

thanks

Rich



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-console-command-enhancements-for-osgi-tp4032774.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf console command enhancements for osgi

Posted by Jon Anstey <ja...@gmail.com>.
Ah of course, I see how this could be handy now. We'll leave the ticket
open then :-)


On Wed, Apr 16, 2014 at 11:13 PM, Jamie G. <ja...@gmail.com> wrote:

> In regards to #2 the '-s' start flag operates on all the bundles
> listed, it would appear to be fare game to set a list of bundles to a
> particular start level as well. The 'help' entry should have
> appropriate notice of how it operates of course.
>
> --Jamie
>
> On Wed, Apr 16, 2014 at 8:05 PM, Jon Anstey <ja...@gmail.com> wrote:
> > I've opened https://issues.apache.org/jira/browse/KARAF-2917 to track
> #1. I
> > would find this useful too... or maybe we need a "sed" command in Karaf
> :-)
> >
> > Not sure we should implement #2 as bundle:install operates on a bundle
> list
> > so the args should applicable to the whole bundle list IMO.
> >
> >
> > On Tue, Apr 15, 2014 at 12:58 PM, rich.peters <rp...@sandia.gov> wrote:
> >>
> >> Hi,
> >>
> >> we have had a hard time working around installing some updates to osgi
> >> bundles that our security required we make.  There is currently not an
> >> easy
> >> way to get the bundle id of an arbitrary package.
> >>
> >>
> >> Life would be a lot easier if there were two new features:
> >>
> >>
> >>   1.  There was an osgi command to query the bundle id of a package name
> >> in
> >> the maven format:
> >>
> >>                osgi:bundle org.springframework/spring-core/3.1.4.RELEASE
> >>
> >>        currently there is no way to get the bundle id of a package
> easily
> >>
> >>
> >>
> >>   2.  The osgi:install command accepted a bundle bundle-level as an
> >> optional
> >> parameter (as in the osgi:bundle-level command)
> >>
> >>        if you do 1.  you dont absolutely need this, but it would be
> >> convenient
> >>
> >>
> >>
> >> These two features would make scripting upgrades easier
> >>
> >>
> >>
> >> thanks
> >>
> >> Rich
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://karaf.922171.n3.nabble.com/Karaf-console-command-enhancements-for-osgi-tp4032774.html
> >> Sent from the Karaf - User mailing list archive at Nabble.com.
> >
> >
> >
> >
> > --
> > Cheers,
> > Jon
> > ---------------
> > Red Hat, Inc.
> > Email: janstey@redhat.com
> > Web: http://redhat.com
> > Twitter: jon_anstey
> > Blog: http://janstey.blogspot.com
> > Author of Camel in Action: http://manning.com/ibsen
>



-- 
Cheers,
Jon
---------------
Red Hat, Inc.
Email: janstey@redhat.com
Web: http://redhat.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen

Re: Karaf console command enhancements for osgi

Posted by "Jamie G." <ja...@gmail.com>.
In regards to #2 the '-s' start flag operates on all the bundles
listed, it would appear to be fare game to set a list of bundles to a
particular start level as well. The 'help' entry should have
appropriate notice of how it operates of course.

--Jamie

On Wed, Apr 16, 2014 at 8:05 PM, Jon Anstey <ja...@gmail.com> wrote:
> I've opened https://issues.apache.org/jira/browse/KARAF-2917 to track #1. I
> would find this useful too... or maybe we need a "sed" command in Karaf :-)
>
> Not sure we should implement #2 as bundle:install operates on a bundle list
> so the args should applicable to the whole bundle list IMO.
>
>
> On Tue, Apr 15, 2014 at 12:58 PM, rich.peters <rp...@sandia.gov> wrote:
>>
>> Hi,
>>
>> we have had a hard time working around installing some updates to osgi
>> bundles that our security required we make.  There is currently not an
>> easy
>> way to get the bundle id of an arbitrary package.
>>
>>
>> Life would be a lot easier if there were two new features:
>>
>>
>>   1.  There was an osgi command to query the bundle id of a package name
>> in
>> the maven format:
>>
>>                osgi:bundle org.springframework/spring-core/3.1.4.RELEASE
>>
>>        currently there is no way to get the bundle id of a package easily
>>
>>
>>
>>   2.  The osgi:install command accepted a bundle bundle-level as an
>> optional
>> parameter (as in the osgi:bundle-level command)
>>
>>        if you do 1.  you dont absolutely need this, but it would be
>> convenient
>>
>>
>>
>> These two features would make scripting upgrades easier
>>
>>
>>
>> thanks
>>
>> Rich
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Karaf-console-command-enhancements-for-osgi-tp4032774.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
>
>
> --
> Cheers,
> Jon
> ---------------
> Red Hat, Inc.
> Email: janstey@redhat.com
> Web: http://redhat.com
> Twitter: jon_anstey
> Blog: http://janstey.blogspot.com
> Author of Camel in Action: http://manning.com/ibsen

Re: Karaf console command enhancements for osgi

Posted by "rich.peters" <rp...@sandia.gov>.
Jon,

thanks for looking at this.  It will make our scripting very easy.

Rich




--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-console-command-enhancements-for-osgi-tp4032774p4032840.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf console command enhancements for osgi

Posted by Jon Anstey <ja...@gmail.com>.
I've opened https://issues.apache.org/jira/browse/KARAF-2917 to track #1. I
would find this useful too... or maybe we need a "sed" command in Karaf :-)

Not sure we should implement #2 as bundle:install operates on a bundle list
so the args should applicable to the whole bundle list IMO.


On Tue, Apr 15, 2014 at 12:58 PM, rich.peters <rp...@sandia.gov> wrote:

> Hi,
>
> we have had a hard time working around installing some updates to osgi
> bundles that our security required we make.  There is currently not an easy
> way to get the bundle id of an arbitrary package.
>
>
> Life would be a lot easier if there were two new features:
>
>
>   1.  There was an osgi command to query the bundle id of a package name in
> the maven format:
>
>                osgi:bundle org.springframework/spring-core/3.1.4.RELEASE
>
>        currently there is no way to get the bundle id of a package easily
>
>
>
>   2.  The osgi:install command accepted a bundle bundle-level as an
> optional
> parameter (as in the osgi:bundle-level command)
>
>        if you do 1.  you dont absolutely need this, but it would be
> convenient
>
>
>
> These two features would make scripting upgrades easier
>
>
>
> thanks
>
> Rich
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Karaf-console-command-enhancements-for-osgi-tp4032774.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Jon
---------------
Red Hat, Inc.
Email: janstey@redhat.com
Web: http://redhat.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen

Re: Karaf console command enhancements for osgi

Posted by "rich.peters" <rp...@sandia.gov>.
Thanks for the response,  I will try that

Rich




--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-console-command-enhancements-for-osgi-tp4032774p4032782.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf console command enhancements for osgi

Posted by "rich.peters" <rp...@sandia.gov>.
Jamie,

thanks for add the feature request.  The export doesn't really work for what
I need, but the new feature proposed will be just great.

Thanks
Rich
  



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-console-command-enhancements-for-osgi-tp4032774p4032841.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf console command enhancements for osgi

Posted by "Jamie G." <ja...@gmail.com>.
I've taken a quick look in our Jira and didn't see a feature
enhancement request for setting BundleLevel during install so I've
created https://issues.apache.org/jira/browse/KARAF-2915.

--Jamie

On Tue, Apr 15, 2014 at 1:19 PM, Jamie G. <ja...@gmail.com> wrote:
> Hi Rich,
>
> Thank you for your feature enhancement requests.
>
> In the case of obtaining a package's BundleID, try using the exports
> command and grep for the package name - the BundleID providing it will
> be printed.
>
> Ex: On Karaf 3.0.1
> karaf@root()> exports | grep spring-core
> Package Name | Version | BundleID | BundleName
> ...
> org.springframework.util                              | 4.0.2.RELEASE
>   | 129 | org.apache.servicemix.bundles.spring-core
> karaf@root()>
>
> Above the Bundle exporting spring framework util is ID 129.
>
> I like the idea of adding a bundle-level flag on install, I'll look
> through our Jira to see if we already have a request for the feature.
>
> ex:
> karaf@root()> install -s -l 65 mvn:org.slf4j/slf4j-api/1.7.2
>
> Cheers,
> Jamie
>
> On Tue, Apr 15, 2014 at 12:58 PM, rich.peters <rp...@sandia.gov> wrote:
>> Hi,
>>
>> we have had a hard time working around installing some updates to osgi
>> bundles that our security required we make.  There is currently not an easy
>> way to get the bundle id of an arbitrary package.
>>
>>
>> Life would be a lot easier if there were two new features:
>>
>>
>>   1.  There was an osgi command to query the bundle id of a package name in
>> the maven format:
>>
>>                osgi:bundle org.springframework/spring-core/3.1.4.RELEASE
>>
>>        currently there is no way to get the bundle id of a package easily
>>
>>
>>
>>   2.  The osgi:install command accepted a bundle bundle-level as an optional
>> parameter (as in the osgi:bundle-level command)
>>
>>        if you do 1.  you dont absolutely need this, but it would be
>> convenient
>>
>>
>>
>> These two features would make scripting upgrades easier
>>
>>
>>
>> thanks
>>
>> Rich
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-console-command-enhancements-for-osgi-tp4032774.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf console command enhancements for osgi

Posted by "Jamie G." <ja...@gmail.com>.
Hi Rich,

Thank you for your feature enhancement requests.

In the case of obtaining a package's BundleID, try using the exports
command and grep for the package name - the BundleID providing it will
be printed.

Ex: On Karaf 3.0.1
karaf@root()> exports | grep spring-core
Package Name | Version | BundleID | BundleName
...
org.springframework.util                              | 4.0.2.RELEASE
  | 129 | org.apache.servicemix.bundles.spring-core
karaf@root()>

Above the Bundle exporting spring framework util is ID 129.

I like the idea of adding a bundle-level flag on install, I'll look
through our Jira to see if we already have a request for the feature.

ex:
karaf@root()> install -s -l 65 mvn:org.slf4j/slf4j-api/1.7.2

Cheers,
Jamie

On Tue, Apr 15, 2014 at 12:58 PM, rich.peters <rp...@sandia.gov> wrote:
> Hi,
>
> we have had a hard time working around installing some updates to osgi
> bundles that our security required we make.  There is currently not an easy
> way to get the bundle id of an arbitrary package.
>
>
> Life would be a lot easier if there were two new features:
>
>
>   1.  There was an osgi command to query the bundle id of a package name in
> the maven format:
>
>                osgi:bundle org.springframework/spring-core/3.1.4.RELEASE
>
>        currently there is no way to get the bundle id of a package easily
>
>
>
>   2.  The osgi:install command accepted a bundle bundle-level as an optional
> parameter (as in the osgi:bundle-level command)
>
>        if you do 1.  you dont absolutely need this, but it would be
> convenient
>
>
>
> These two features would make scripting upgrades easier
>
>
>
> thanks
>
> Rich
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-console-command-enhancements-for-osgi-tp4032774.html
> Sent from the Karaf - User mailing list archive at Nabble.com.