Skip to content
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

Root FS Builds with Ubuntu 20.04 #19

Merged
merged 62 commits into from
Jan 7, 2021
Merged

Root FS Builds with Ubuntu 20.04 #19

merged 62 commits into from
Jan 7, 2021

Conversation

dack-fe
Copy link
Contributor

@dack-fe dack-fe commented Dec 19, 2020

Updated Root FS to Ubuntu 20.04 - Closes #15
Automatically adds Frost Edge and the supporting packages

Closes #22

tvannoy and others added 30 commits August 6, 2020 14:21
In particular, we are using avahi for mDNS, balena-io wifi-connect
for managing the wifi connection process, and we are using a ralink
wifi adapter that needs firmware files to be installed.

Co-authored-by: Jevitate <55113801+Jevitate@users.noreply.github.com>
…-arm-static

Suddenly, chrooting into the armhf rootfs is not working in WSL 2 (using the Linux filesystem)
or in Docker on Arch Linux. Explicitly enabling ARM emulation lets QEMU automatically choose
to use ARM emulation when executing ARM binaries. This commit makes chrooting works in WSL 2 and Docker.
Created Service for Web App and Deployment Manager
Updated the Packaging to Copy, Install, and Uninstall new services
@dack-fe
Copy link
Contributor Author

dack-fe commented Dec 21, 2020

We should be able to eliminate the need for using dos2unix by creating the following .gitattributes file:

* text=auto  eol=lf

We can use finer-grained control if we want, e.g. only sh files are forced to use lf endings in the repo and in checkout.

https://www.git-scm.com/docs/gitattributes
https://docs.github.com/en/free-pro-team@latest/github/using-git/configuring-git-to-handle-line-endings

Added as Enhancement Issue #22

@tvannoy
Copy link
Member

tvannoy commented Dec 21, 2020

This was never designed for a straight WSL Build due to permissions.
Gotcha. I think I had it working on WSL at some point, but I don't remember. I guess I would have likely needed to build it in the WSL filesystem.

I didn't have a proper Ubuntu machine to test on, but I imagine it still works fine since that's what I originally developed on. Either way, docker handles any OS so it doesn't matter.

rootfs/ReadMe.md Outdated Show resolved Hide resolved
@dack-fe
Copy link
Contributor Author

dack-fe commented Dec 21, 2020

This was never designed for a straight WSL Build due to permissions.
Gotcha. I think I had it working on WSL at some point, but I don't remember. I guess I would have likely needed to build it in the WSL filesystem.

I didn't have a proper Ubuntu machine to test on, but I imagine it still works fine since that's what I originally developed on. Either way, docker handles any OS so it doesn't matter.

Jenkins is currently building on Ubuntu 20.04 with Docker

Copy link
Member

@tvannoy tvannoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 💯

@fe-wickham
Copy link
Member

fe-wickham commented Dec 21, 2020

A straight WSL build is not working for me, but I suspect the problem is on my end; apt complains about invalid gpg signatures:

Did you try running it directly through WSL on the Windows filesystem or the WSL filesystem? It will fail running it directly on the Windows filesystem because it can't handle the chroot properly. I recall getting errors in that same area but I don't know if they were the exact same error from running it on the Windows filesystem.

Edit:

I guess I would have likely needed to build it in the WSL filesystem.

Just saw you posted this, that is almost certainly the issue.

@fe-wickham
Copy link
Member

We should be able to eliminate the need for using dos2unix by creating the following .gitattributes file:

* text=auto  eol=lf

We can use finer-grained control if we want, e.g. only sh files are forced to use lf endings in the repo and in checkout.

https://www.git-scm.com/docs/gitattributes
https://docs.github.com/en/free-pro-team@latest/github/using-git/configuring-git-to-handle-line-endings

I agree and needing to run dos2unix becomes rather annoying pretty quickly since things dont just work. I have fixed this with de1b2e9 which closes #22

Copy link
Member

@fe-wickham fe-wickham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@tvannoy
Copy link
Member

tvannoy commented Dec 21, 2020

A straight WSL build is not working for me, but I suspect the problem is on my end; apt complains about invalid gpg signatures:

Did you try running it directly through WSL on the Windows filesystem or the WSL filesystem? It will fail running it directly on the Windows filesystem because it can't handle the chroot properly. I recall getting errors in that same area but I don't know if they were the exact same error from running it on the Windows filesystem.

Edit:

I guess I would have likely needed to build it in the WSL filesystem.

Just saw you posted this, that is almost certainly the issue.

Just built it in the WSL filesystem -- worked flawlessly. I now recall @fe-wickham mentioning chroot issues in the Windows filesystem before...

I can also confirm that the frost-edge deb download worked, and there was no need to run dos2unix on a fresh clone, so the eol conversions seemed to work as well.

It's beautiful! 🥳

@tvannoy
Copy link
Member

tvannoy commented Dec 21, 2020

I did get an npm error about certificates, though -- not sure if it's actually important:

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz failed, reason: unable to get local issuer certificate

I also get some warnings around sudo when the wifi-connect installer runs:

sudo: unable to resolve host trevvvyx1carbon: Name or service not known

I suspect this is because we are running as root, so sudo doesn't really make sense. This isn't really an issue, but we could squelch that warning by using sed to remove sudo from the wifi-connect install script.

@dack-fe
Copy link
Contributor Author

dack-fe commented Dec 21, 2020

I did get an npm error about certificates, though -- not sure if it's actually important:

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz failed, reason: unable to get local issuer certificate
  • I am not seeing these NPM Errors in Jenkins. @tvannoy Did you test the Frost Web App?

I also get some warnings around sudo when the wifi-connect installer runs:

sudo: unable to resolve host trevvvyx1carbon: Name or service not known

I suspect this is because we are running as root, so sudo doesn't really make sense. This isn't really an issue, but we could squelch that warning by using sed to remove sudo from the wifi-connect install script.

  • We do not use a sudo call when configuring the WiFi

@tvannoy
Copy link
Member

tvannoy commented Dec 21, 2020

I did get an npm error about certificates, though -- not sure if it's actually important:

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz failed, reason: unable to get local issuer certificate

I am not seeing these NPM Errors in Jenkins.

Interesting, I am getting them in the docker build and the WSL build. It appears to be solved by npm config set strict-ssl false, which is in frost-edge packaging scripts; I wonder if the version that is being downloaded from S3 does not have that npm setting.

@tvannoy Did you test the Frost Web App?

I am out of town, so I do not currently have an audio mini with me to test with.

I also get some warnings around sudo when the wifi-connect installer runs:

We do not use a sudo call when configuring the WiFi

We don't, but Balena's install script that we download does.

@dack-fe
Copy link
Contributor Author

dack-fe commented Dec 21, 2020 via email

@dack-fe dack-fe merged commit e138651 into dev Jan 7, 2021
@dack-fe dack-fe deleted the rootfs branch January 7, 2021 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updated .sh End Of Line Characters with Git Attributes rootfs build fails
6 participants