-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[systeminfo] Migrate to BND #5455
Conversation
693e036
to
e494bc3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
The karaf feature file need to be modified. The libraries need to be added there as well so that openHAB knows of them and can install them during runtime.
4789637
to
b2dc0e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise looks good.
@@ -847,7 +847,10 @@ | |||
|
|||
<feature name="openhab-binding-systeminfo" description="System Info Binding" version="${project.version}"> | |||
<feature>openhab-runtime-base</feature> | |||
<bundle start-level="80">mvn:org.openhab.binding/org.openhab.binding.systeminfo/${project.version}</bundle> | |||
<bundle dependency="true">wrap:mvn:com.github.oshi/oshi-core/3.13.0</bundle> | |||
<bundle dependency="true">wrap:mvn:net.java.dev.jna/jna/5.2.0</bundle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapping should not be necessary, this is already an OSGi bundle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Played around to solve travis issues. Sadly, still no progress. see below
<bundle start-level="80">mvn:org.openhab.binding/org.openhab.binding.systeminfo/${project.version}</bundle> | ||
<bundle dependency="true">wrap:mvn:com.github.oshi/oshi-core/3.13.0</bundle> | ||
<bundle dependency="true">wrap:mvn:net.java.dev.jna/jna/5.2.0</bundle> | ||
<bundle dependency="true">wrap:mvn:net.java.dev.jna/jna-platform/5.2.0</bundle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapping should not be necessary, this is already an OSGi bundle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Played around to solve travis issues. Sadly, still no progress. See below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don‘t think Travis failure is related to your changes. Travis fails on all PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My local build fails too :-( I mean: Build binding only works. I i try to build all addons on top level, then feature verification fails...
@@ -847,7 +847,10 @@ | |||
|
|||
<feature name="openhab-binding-systeminfo" description="System Info Binding" version="${project.version}"> | |||
<feature>openhab-runtime-base</feature> | |||
<bundle start-level="80">mvn:org.openhab.binding/org.openhab.binding.systeminfo/${project.version}</bundle> | |||
<bundle dependency="true">wrap:mvn:com.github.oshi/oshi-core/3.13.0</bundle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapping should not be necessary, this is already an OSGi bundle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Played around to solve travis issues. Sadly, still no progress: See below.
b2dc0e7
to
6bbb2ee
Compare
I stuck with karaf feature verification: openHAB Add-ons :: Features :: Karaf :: Add-ons .... FAILURE
Build runs smoothly. Any hint? |
Seems to be a bug in JNA 5.2.0: java-native-access/jna#1054 Did this ever work under Linux? Edit: this probably broke by updating the libs in #4834. We should check if we can revert that. |
You can try removing the dependency to
I did not try but that should export all packages. |
Hi @J-N-K , thank you :-) I've traced the dependecies down to jna 4.2.1: still the same problem. It seems, that it's broken for the long time and nobody catched the bug. On Raspberry jna 5.2.0 runs as expected. Therefore it seems, that we must live with workaround. According to oshi/oshi#752, bugfix is planned for 3.13.1: https://github.com/oshi/oshi/milestone/11 |
6bbb2ee
to
3a3b625
Compare
The export works? |
Build and verification was OK. Currently i rebase my other PR and test all the stuff. |
Ok. Rebased, updated eclipse, wait till workspace build... And new fail...
Ok, embed jna-5.2.0.jar the same way as jna-platform-5.2.0.jar. Rebuilt, new attempt...
Ok, embed oshi-core-3.13.0.jar the same way as jna-5.2.0.jar. Rebuilt, new attempt...
Built on Windows and run on raspberry... |
Did it work with the old buildsystem? If not we are not loosing anything if we merge this PR for now and keep investigating later |
This is probably due to the missing dependencies which are defined in the feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you check that the itests successfully run?
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add jna-platform as lib (see e.g. allplay)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in current version
<version>3.13.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this dependency (always provided if embedded)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -855,7 +855,10 @@ | |||
|
|||
<feature name="openhab-binding-systeminfo" description="System Info Binding" version="${project.version}"> | |||
<feature>openhab-runtime-base</feature> | |||
<bundle start-level="80">mvn:org.openhab.binding/org.openhab.binding.systeminfo/${project.version}</bundle> | |||
<bundle dependency="true">mvn:com.github.oshi/oshi-core/3.13.0</bundle> | |||
<bundle dependency="true">mvn:net.java.dev.jna/jna-platform/5.2.0</bundle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove feature dependency (always provided if embedded)
@davidgraeff : Yes it run bevore @J-N-K I already performed requested changes yesterday, just not pushed them, since it will not run... |
As I said before: the feature resolution in your production setup will not work because it is using the old feature.xml. It should work if you install the missing bundles manually. Did you try that? |
Signed-off-by: Alexander Falkenstern <[email protected]>
3a3b625
to
3af9574
Compare
I run two environments: production (2.5.0M1) and development with latest snapshot. The strange thing is, i get
if i try to load the binding, but according to oshi-core manifest file, it's provided by oshi-core.jar... |
I raised a PR against your repo. With those fixes everything compiles and I verified that the binding is working on two systems (both Linux). The tests fail, though. Maybe you can have a look at that. |
@falkena, thanks to @matthiasblaesing JNA 5.3.0 was released very fast. I have updated my PR to your repo, please merge that, the tests now run fine, too. |
Signed-off-by: Jan N. Klug <[email protected]>
Hi @J-N-K : I've merged your PR. Thank you for help! I'll rebase my another PR and test the stuff this week. If something will go wrong, i'll fix it. May be @dbwiddis can find some time and update the oshi dependency to JNA 5.3.0. Officially OSHI depends now still on JNA 5.2.0 |
Hah. I’ve been waiting on JNA 5.3 and checking almost daily. But missed a day. |
But it works with 5.3.0. so no need to hurry. |
* Migrate systeminfo to bnd * fix dependencies, update JNA, fix tests (openhab#8) Signed-off-by: Jan N. Klug <[email protected]>
* Migrate systeminfo to bnd * fix dependencies, update JNA, fix tests (openhab#8) Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: Pshatsillo <[email protected]>
* Migrate systeminfo to bnd * fix dependencies, update JNA, fix tests (openhab#8) Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: Maximilian Hess <[email protected]>
Signed-off-by: Alexander Falkenstern [email protected]