openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
820 stars 251 forks source link

check for apt-transport-https prequisite (pine64) #66

Closed dmcwhinnie closed 7 years ago

dmcwhinnie commented 7 years ago

While setting up openhabian on a pine64, the "apt update" commands would just hang.

Turns out the pine64 default Linux images do not have "apt-transport-https" installed. It may make sense to add this a default check on pre-requisites. The openhab distributions use HTTPS.

EliasGabrielsson commented 7 years ago

Do you know anyway of identifying an pine64?

I think its motivated to give support for this plattform as well in the image if possible. It's not require that much extra effort and create great value. Pine64 offer great value for running openhab.

dmcwhinnie commented 7 years ago

I don't think this is really just a Pine64 issue, I just happened to see it on this platform. my guess is any system missing the apt-transport-https package will have the same issue.

was thinking this could be a generic pre-req.

BClark09 commented 7 years ago

RPIs by default don't have apt-transport-https installed, so it must be installed somewhere along the line on openHABian. On a related note, we are in the process of moving the apt repo over to bintray, which uses http and is much faster.

ThomDietrich commented 7 years ago

@BClark09 apt-transport-https is also needed by other packages ;)

@dmcwhinnie Thanks for reporting the problem. The package is installed in needed_packages(), which is part of "Basic Setup". It didn't get clear to me if (1) apt-transport-https is not installed on your system or (2) it's not available in your repositories. If 1 is the case, I don't see an issue here!? The only improvement I could think of is additionally ensuring it's availability inside the openHAB installation function, just as here but as @BClark09 said, that's not even needed anymore.

@EliasGabrielsson did you check /proc/cpuinfo just as in https://github.com/openhab/openhabian/blob/master/openhabian-setup.sh#L92 ?

EliasGabrielsson commented 7 years ago

@ThomDietrich I saw that, we just need an unique identifier for Pine64. I don't own any myself. But when you say it, @dmcwhinnie could you run cat /proc/cpuinfo and post the output here?

dmcwhinnie commented 7 years ago

@ThomDietrich. I think I figured out the apt-trasnport-https issue. it is actually related to the java issue on the pine64. When the needed_packages() is run, it includes oracle-java8-jdk. The problem is on the pine that java install results in this error

Package oracle-java8-jdk is a virtual package provided by: oracle-java9-installer 9b149+9b149arm-1~webupd8~0 oracle-java8-installer 8u111+8u111arm-1~webupd8~0 You should explicitly select one to install. the command then stops at that point, and as a result the apt-trasnport-https is never installed. Sp I think when we get java 32-bit working for the pine, that will resolves this issue. It may be worht installing java separate from the other required packages at that time.

dmcwhinnie commented 7 years ago

@EliasGabrielsson Here is the /proc/cpuinfo

root@openhab:/opt/openhabian#  cat /proc/cpuinfo
Processor       : AArch64 Processor rev 4 (aarch64)
processor       : 0
processor       : 1
processor       : 2
processor       : 3
Features        : fp asimd aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4
Hardware        : sun50iw1p1
ThomDietrich commented 7 years ago

@kaikreuzer if you would find the time, could you please post your output of this command on your pine as a second reference? I'll also write a posting in the pine64 forum. Thank you!

kaikreuzer commented 7 years ago

Here you go:

Processor   : AArch64 Processor rev 4 (aarch64)
processor   : 0
processor   : 1
processor   : 2
processor   : 3
Features    : fp asimd aes pmull sha1 sha2 crc32 
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4
Hardware    : sun50iw1p1

Looks pretty similar :-)

kaikreuzer commented 7 years ago

While setting up openhabian on a pine64

Now this is probably a very stupid question: But I was so far not aware that openhabian can be used on other platforms than RPi as well! How is this done? What is the base image to use?

ThomDietrich commented 7 years ago

It's a bit embarrassing I can not link to the docs.openhab.org article on that ^^

openHABian started as an Raspberry Pi image including and executing scripts to configure everything. Now these files can actually be executed on any other debian/ubuntu based system. You'd just have to clone the Repository and execute openhabian-setup.sh. However: At the moment these scripts assume a few RPi specific details like the user "pi" being the end users username or some packages are specifically installed for an arm architecture. These have to be sorted out step by step - which is already in process.

@dmcwhinnie was the first one to ask about another base (pine64), hence this thread ;)

kaikreuzer commented 7 years ago

Thanks for the background infos, sounds wonderful! I was specifically interested, since I currently still provide the pine SD card image by manually constructing it - being able to use openhabian for it would be gorgeous :-)

dmcwhinnie commented 7 years ago

Yeah I was using your original pine image. Decided I would see if I could start from scratch, then wanted to setup samba, nginx etc. So I figured I would see if I could help get Openhabian working on the pine. plus I figured you had enough going on and removing the need to maintain an image just for pine would give you all sorts of free time.

If you also have any documented steps you used to take the original pine image and enable the zwave serial device, we could incorporate that. I tried myself, but ended going back to your modified image for that piece of functionality.

ThomDietrich commented 7 years ago

I could probably provide that image. It would be a minimal system self-configuring at first boot with the latest openHAB build and so on. Of course I could also provide you with the details. I have no further knowledge of the pine64 but if I were to order one, would I have to do that in their official store?

dmcwhinnie commented 7 years ago

Yeah can buy it here: https://www.pine64.org/?post_type=product

I think most of us got it through their kickstarter, which included Wifi/Bluetooth and ZWave modules.

kaikreuzer commented 7 years ago

I could probably provide that image. It would be a minimal system self-configuring at first boot with the latest openHAB build and so on.

Would indeed be great to have such! We might find ways to get you a PINE64...

removing the need to maintain an image just for pine would give you all sorts of free time.

Haha, free time, what's that? Can you elaborate? ;-)

ThomDietrich commented 7 years ago

We might find ways to get you a PINE64...

That would be a good start ;) Whichever way, if I get my hands on one, I'll build that image in probably just a few days. Plus I agree with Davids argument ;)

@dmcwhinnie I'm still betting on you for further testing. Especially with the mentioned ZWave module. I settled with Homematic in my home.

dmcwhinnie commented 7 years ago

I don't have any actual zwave devices yet. I got this with the assumption I would try a few devices, but haven't gotten there yet. But I can at least see the binding come online.

kaikreuzer commented 7 years ago

We might find ways to get you a PINE64...

It's on its way, you should receive it on Monday :-)

ThomDietrich commented 7 years ago

https://community.openhab.org/t/64-bit-arm-serial/8493/41