8000 dev_setup.sh: add support for Alpine Linux by PureTryOut · Pull Request #2584 · MycroftAI/mycroft-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

dev_setup.sh: add support for Alpine Linux #2584

Merged
merged 1 commit into from
May 12, 2020
Merged

dev_setup.sh: add support for Alpine Linux #2584

merged 1 commit into from
May 12, 2020

Conversation

PureTryOut
Copy link
Contributor
@PureTryOut PureTryOut commented May 12, 2020

Description

This adds Alpine Linux support to the dev_setup.sh script.

Also make the Arch check use is_os, as it already thought my Alpine installation was Arch Linux just because I had pacman installed. Distros often have package managers for other distros available in their repositories for bootstrapping, so you can't guess an OS just by their package managers installed.

How to test

Run the script on Alpine Linux and see if everything builds and runs correctly

Contributor license agreement signed?

CLA [x]

@devs-mycroft devs-mycroft added the CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) label May 12, 2020
@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@forslund
Copy link
Collaborator

I'm getting a bunch of errors when running this in my alpine VM, logs here: http://termbin.com/ygs2

wonder if the grep -P can be replaced with a normal grep regexp, seems to only be used in os_is_like()

The error collecting packages I'm not sure about

@forslund
Copy link
Collaborator

Am I missing something in my alpine setup to get those packages?

@PureTryOut
Copy link
Contributor Author
PureTryOut commented May 12, 2020

Ah my system has the GNU coreutils installed, which I didn't think about. Seems to be a dep of the script. That makes it a tad annoying to fix, as we'd need to make the whole script POSIX compliant. If grep -P is the only GNUism used it shouldn't be too bad, but I know basically no regex...

@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@PureTryOut
Copy link
Contributor Author

As for the packages it couldn't find, make sure you have the community repository enabled as they're all in that repository.

@forslund
Copy link
Collaborator

I'll see if I can figure out what actually needs the -P flag...

@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@forslund
Copy link
Collaborator
forslund commented May 12, 2020

Seems like the following is a working replacement for the os_is_like method:

function os_is_like() {
    grep "^ID_LIKE=" /etc/os-release | awk -F'=' '/^ID_LIKE/ {print $2}' | sed 's/\"//g' | grep -q "\\b$1\\b"
}

I needed to add swig, python3-dev, portaudio-dev and libjpeg-dev to the list of deps to get it to finish the dev_setup script (libjpeg-dev is technically only a Mark-1 dependency and can probably be removed in the future)

@PureTryOut
Copy link
Contributor Author

Thanks for that find! I updated the PR with your grep and package changes.

@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@forslund
Copy link
Collaborator

Looks good, merging.

@forslund forslund merged commit db58e18 into MycroftAI:dev May 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0