From 7f8b94f8a4b4a4b3d3dc4dfcee06a9c6828b5421 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Fri, 25 Oct 2019 14:47:21 -0700 Subject: mycroft: Fixup remaining issues This patch combines a few fixups: - Don't bother users about missing package manager - Use pocketsphinx by default (as it works on RISC-V) - Add Upstream-Status to all patches Signed-off-by: Alistair Francis Signed-off-by: Khem Raj --- .../mycroft/files/0001-Remove-python-venv.patch | 2 +- ...02-dev_setup.sh-Remove-the-git-dependency.patch | 2 +- ...3-dev_setup.sh-Remove-the-TERM-dependency.patch | 3 +- ...v_setup.sh-Ignore-missing-package-manager.patch | 31 ++++++ ...ments-Don-t-install-requirements-with-pip.patch | 103 ------------------ ...ython3-and-pip3-instead-of-python-and-pip.patch | 121 --------------------- ...ments-Don-t-install-requirements-with-pip.patch | 103 ++++++++++++++++++ ...ython3-and-pip3-instead-of-python-and-pip.patch | 121 +++++++++++++++++++++ ...-mycroft.conf-Use-pocketsphinx-by-default.patch | 30 +++++ .../recipes-multimedia/mycroft/mycroft_19.8.1.bb | 6 +- 10 files changed, 293 insertions(+), 229 deletions(-) create mode 100644 meta-multimedia/recipes-multimedia/mycroft/files/0004-dev_setup.sh-Ignore-missing-package-manager.patch delete mode 100644 meta-multimedia/recipes-multimedia/mycroft/files/0004-pip-requirements-Don-t-install-requirements-with-pip.patch delete mode 100644 meta-multimedia/recipes-multimedia/mycroft/files/0005-Use-python3-and-pip3-instead-of-python-and-pip.patch create mode 100644 meta-multimedia/recipes-multimedia/mycroft/files/0005-pip-requirements-Don-t-install-requirements-with-pip.patch create mode 100644 meta-multimedia/recipes-multimedia/mycroft/files/0006-Use-python3-and-pip3-instead-of-python-and-pip.patch create mode 100644 meta-multimedia/recipes-multimedia/mycroft/files/0007-mycroft.conf-Use-pocketsphinx-by-default.patch diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0001-Remove-python-venv.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0001-Remove-python-venv.patch index 43994e0cac..245785c826 100644 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0001-Remove-python-venv.patch +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0001-Remove-python-venv.patch @@ -1,7 +1,7 @@ From 07fce2101d83b5334de78e661ba0361c2874ebdf Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Mon, 18 Mar 2019 16:30:45 -0700 -Subject: [PATCH 1/5] Remove python venv +Subject: [PATCH 1/7] Remove python venv Remove the python venv requirements and instead just use the native python and pip pacakges. diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0002-dev_setup.sh-Remove-the-git-dependency.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0002-dev_setup.sh-Remove-the-git-dependency.patch index dd2431fdf9..637854fdfc 100644 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0002-dev_setup.sh-Remove-the-git-dependency.patch +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0002-dev_setup.sh-Remove-the-git-dependency.patch @@ -1,7 +1,7 @@ From 88696037af52d6a7f57bc0fb82598de1a25365cc Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Fri, 29 Mar 2019 16:09:57 -0700 -Subject: [PATCH 2/5] dev_setup.sh: Remove the git dependency +Subject: [PATCH 2/7] dev_setup.sh: Remove the git dependency Signed-off-by: Alistair Francis Upstream-Status: Inappropriate [embedded specific] diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0003-dev_setup.sh-Remove-the-TERM-dependency.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0003-dev_setup.sh-Remove-the-TERM-dependency.patch index a4290d1cda..d803f526de 100644 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0003-dev_setup.sh-Remove-the-TERM-dependency.patch +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0003-dev_setup.sh-Remove-the-TERM-dependency.patch @@ -1,9 +1,10 @@ From 5ef52cdea278a1dff966a912549cb6708f2cb699 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Tue, 17 Sep 2019 11:31:47 -0700 -Subject: [PATCH 3/5] dev_setup.sh: Remove the TERM dependency +Subject: [PATCH 3/7] dev_setup.sh: Remove the TERM dependency Signed-off-by: Alistair Francis +Upstream-Status: Inappropriate [embedded specific] --- dev_setup.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0004-dev_setup.sh-Ignore-missing-package-manager.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0004-dev_setup.sh-Ignore-missing-package-manager.patch new file mode 100644 index 0000000000..d2dc179ca6 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0004-dev_setup.sh-Ignore-missing-package-manager.patch @@ -0,0 +1,31 @@ +From e3b6ca995caca22e65d012a54bc2aeb08eb7e9d4 Mon Sep 17 00:00:00 2001 +From: Alistair Francis +Date: Tue, 15 Oct 2019 17:09:06 -0700 +Subject: [PATCH 4/7] dev_setup.sh: Ignore missing package manager + +Signed-off-by: Alistair Francis +Upstream-Status: Inappropriate [embedded specific] +--- + dev_setup.sh | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/dev_setup.sh b/dev_setup.sh +index 72f734f36bf..0c8e11b8170 100755 +--- a/dev_setup.sh ++++ b/dev_setup.sh +@@ -317,12 +317,6 @@ Please review the following package changes carefully." + echo -e "${YELLOW}Could not find package manager + ${YELLOW}Make sure to manually install:$BLUE git python3 python-setuptools python-venv pygobject libtool libffi libjpg openssl autoconf bison swig glib2.0 portaudio19 mpg123 flac curl fann g++ jq\n$RESET" + +- echo 'Warning: Failed to install all dependencies. Continue? y/N' +- read -n1 continue +- if [[ $continue != 'y' ]] ; then +- exit 1 +- fi +- + fi + } + +-- +2.23.0 + diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0004-pip-requirements-Don-t-install-requirements-with-pip.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0004-pip-requirements-Don-t-install-requirements-with-pip.patch deleted file mode 100644 index 3063e7f8d7..0000000000 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0004-pip-requirements-Don-t-install-requirements-with-pip.patch +++ /dev/null @@ -1,103 +0,0 @@ -From ac749f2512e8d121e8a64a8d5e6f226f16735dda Mon Sep 17 00:00:00 2001 -From: Alistair Francis -Date: Tue, 19 Mar 2019 13:32:54 -0700 -Subject: [PATCH 4/5] pip requirements: Don't install requirements with pip - -Signed-off-by: Alistair Francis -Upstream-Status: Inappropriate [embedded specific] ---- - dev_setup.sh | 15 +-------------- - requirements.txt | 36 ------------------------------------ - test-requirements.txt | 7 ------- - 3 files changed, 1 insertion(+), 57 deletions(-) - delete mode 100644 requirements.txt - delete mode 100644 test-requirements.txt - -diff --git a/dev_setup.sh b/dev_setup.sh -index 72f734f36bf..b5ca6851631 100755 ---- a/dev_setup.sh -+++ b/dev_setup.sh -@@ -357,19 +357,6 @@ fi - - PYTHON=$(python -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))") - --# install required python modules --if ! pip install -r requirements.txt ; then -- echo 'Warning: Failed to install all requirements. Continue? y/N' -- read -n1 continue -- if [[ $continue != 'y' ]] ; then -- exit 1 -- fi --fi -- --if ! pip install -r test-requirements.txt ; then -- echo "Warning test requirements wasn't installed, Note: normal operation should still work fine..." --fi -- - SYSMEM=$(free | awk '/^Mem:/ { print $2 }') - MAXCORES=$(($SYSMEM / 512000)) - MINCORES=1 -@@ -426,4 +413,4 @@ if [[ ! -w /var/log/mycroft/ ]] ; then - fi - - #Store a fingerprint of setup --md5sum requirements.txt test-requirements.txt dev_setup.sh > .installed -+md5sum dev_setup.sh > .installed -diff --git a/requirements.txt b/requirements.txt -deleted file mode 100644 -index 0140d5465dc..00000000000 ---- a/requirements.txt -+++ /dev/null -@@ -1,36 +0,0 @@ --six==1.10.0 --cryptography==2.6.1 --requests==2.20.0 --gTTS==2.0.3 --gTTS-token==1.1.3 --PyAudio==0.2.11 --pyee==5.0.0 --SpeechRecognition==3.8.1 --tornado==4.5.3 --websocket-client==0.54.0 --requests-futures==0.9.5 --pyalsaaudio==0.8.2 --xmlrunner==1.7.7 --pyserial==3.0 --psutil==5.2.1 --pocketsphinx==0.1.0 --inflection==0.3.1 --pillow==4.1.1 --python-dateutil==2.6.0 --pychromecast==3.2.2 --python-vlc==1.1.2 --google-api-python-client==1.6.4 --fasteners==0.14.1 --PyYAML==3.13 -- --msm==0.8.3 --msk==0.3.13 --adapt-parser==0.3.3 --padatious==0.4.6 --fann2==1.0.7 --padaos==0.1.9 --precise-runner==0.2.1 --petact==0.1.2 -- --# dev setup tools --pep8==1.7.0 -diff --git a/test-requirements.txt b/test-requirements.txt -deleted file mode 100644 -index fd129e3f66d..00000000000 ---- a/test-requirements.txt -+++ /dev/null -@@ -1,7 +0,0 @@ --pycodestyle===2.5.0 --coveralls==1.5.0 --pytest==3.5.0 --pytest-cov==2.5.1 --cov-core==1.15.0 --sphinx==1.8.2 --sphinx-rtd-theme==0.4.2 --- -2.23.0 - diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0005-Use-python3-and-pip3-instead-of-python-and-pip.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0005-Use-python3-and-pip3-instead-of-python-and-pip.patch deleted file mode 100644 index 189b686c9c..0000000000 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0005-Use-python3-and-pip3-instead-of-python-and-pip.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 9a0bd09706da3949db17ea7272d6647a487bb6ad Mon Sep 17 00:00:00 2001 -From: Alistair Francis -Date: Tue, 19 Mar 2019 13:38:44 -0700 -Subject: [PATCH 5/5] Use python3 and pip3 instead of python and pip - -Signed-off-by: Alistair Francis -Upstream-Status: Inappropriate [embedded specific] ---- - bin/mycroft-cli-client | 2 +- - bin/mycroft-pip | 2 +- - bin/mycroft-say-to | 2 +- - bin/mycroft-skill-testrunner | 4 ++-- - bin/mycroft-speak | 2 +- - dev_setup.sh | 6 +++--- - scripts/install-pocketsphinx.sh | 2 +- - 7 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/bin/mycroft-cli-client b/bin/mycroft-cli-client -index f40a316e3f6..de2040d9e67 100755 ---- a/bin/mycroft-cli-client -+++ b/bin/mycroft-cli-client -@@ -21,4 +21,4 @@ DIR="$( dirname "$SOURCE" )" - source "$DIR/../venv-activate.sh" -q - - # Invoke the Command Line Interface --python -m mycroft.client.text $@ -+python3 -m mycroft.client.text $@ -diff --git a/bin/mycroft-pip b/bin/mycroft-pip -index a42b16b847a..81bd5bfb3cf 100755 ---- a/bin/mycroft-pip -+++ b/bin/mycroft-pip -@@ -21,4 +21,4 @@ DIR="$( dirname "$SOURCE" )" - source "$DIR/../venv-activate.sh" -q - - # Install pip packages within the Mycroft venv --pip $@ -\ No newline at end of file -+pip3 $@ -\ No newline at end of file -diff --git a/bin/mycroft-say-to b/bin/mycroft-say-to -index 4ae597f3062..8bb4039996d 100755 ---- a/bin/mycroft-say-to -+++ b/bin/mycroft-say-to -@@ -26,4 +26,4 @@ set -- "${1:-$( +Date: Tue, 19 Mar 2019 13:32:54 -0700 +Subject: [PATCH 5/7] pip requirements: Don't install requirements with pip + +Signed-off-by: Alistair Francis +Upstream-Status: Inappropriate [embedded specific] +--- + dev_setup.sh | 15 +-------------- + requirements.txt | 36 ------------------------------------ + test-requirements.txt | 7 ------- + 3 files changed, 1 insertion(+), 57 deletions(-) + delete mode 100644 requirements.txt + delete mode 100644 test-requirements.txt + +diff --git a/dev_setup.sh b/dev_setup.sh +index 0c8e11b8170..be4a19de0c3 100755 +--- a/dev_setup.sh ++++ b/dev_setup.sh +@@ -351,19 +351,6 @@ fi + + PYTHON=$(python -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))") + +-# install required python modules +-if ! pip install -r requirements.txt ; then +- echo 'Warning: Failed to install all requirements. Continue? y/N' +- read -n1 continue +- if [[ $continue != 'y' ]] ; then +- exit 1 +- fi +-fi +- +-if ! pip install -r test-requirements.txt ; then +- echo "Warning test requirements wasn't installed, Note: normal operation should still work fine..." +-fi +- + SYSMEM=$(free | awk '/^Mem:/ { print $2 }') + MAXCORES=$(($SYSMEM / 512000)) + MINCORES=1 +@@ -420,4 +407,4 @@ if [[ ! -w /var/log/mycroft/ ]] ; then + fi + + #Store a fingerprint of setup +-md5sum requirements.txt test-requirements.txt dev_setup.sh > .installed ++md5sum dev_setup.sh > .installed +diff --git a/requirements.txt b/requirements.txt +deleted file mode 100644 +index 0140d5465dc..00000000000 +--- a/requirements.txt ++++ /dev/null +@@ -1,36 +0,0 @@ +-six==1.10.0 +-cryptography==2.6.1 +-requests==2.20.0 +-gTTS==2.0.3 +-gTTS-token==1.1.3 +-PyAudio==0.2.11 +-pyee==5.0.0 +-SpeechRecognition==3.8.1 +-tornado==4.5.3 +-websocket-client==0.54.0 +-requests-futures==0.9.5 +-pyalsaaudio==0.8.2 +-xmlrunner==1.7.7 +-pyserial==3.0 +-psutil==5.2.1 +-pocketsphinx==0.1.0 +-inflection==0.3.1 +-pillow==4.1.1 +-python-dateutil==2.6.0 +-pychromecast==3.2.2 +-python-vlc==1.1.2 +-google-api-python-client==1.6.4 +-fasteners==0.14.1 +-PyYAML==3.13 +- +-msm==0.8.3 +-msk==0.3.13 +-adapt-parser==0.3.3 +-padatious==0.4.6 +-fann2==1.0.7 +-padaos==0.1.9 +-precise-runner==0.2.1 +-petact==0.1.2 +- +-# dev setup tools +-pep8==1.7.0 +diff --git a/test-requirements.txt b/test-requirements.txt +deleted file mode 100644 +index fd129e3f66d..00000000000 +--- a/test-requirements.txt ++++ /dev/null +@@ -1,7 +0,0 @@ +-pycodestyle===2.5.0 +-coveralls==1.5.0 +-pytest==3.5.0 +-pytest-cov==2.5.1 +-cov-core==1.15.0 +-sphinx==1.8.2 +-sphinx-rtd-theme==0.4.2 +-- +2.23.0 + diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0006-Use-python3-and-pip3-instead-of-python-and-pip.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0006-Use-python3-and-pip3-instead-of-python-and-pip.patch new file mode 100644 index 0000000000..6f1f6f78d1 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0006-Use-python3-and-pip3-instead-of-python-and-pip.patch @@ -0,0 +1,121 @@ +From 86a1d18d96f827baa0c1029c85a53fc89d436e17 Mon Sep 17 00:00:00 2001 +From: Alistair Francis +Date: Tue, 19 Mar 2019 13:38:44 -0700 +Subject: [PATCH 6/7] Use python3 and pip3 instead of python and pip + +Signed-off-by: Alistair Francis +Upstream-Status: Inappropriate [embedded specific] +--- + bin/mycroft-cli-client | 2 +- + bin/mycroft-pip | 2 +- + bin/mycroft-say-to | 2 +- + bin/mycroft-skill-testrunner | 4 ++-- + bin/mycroft-speak | 2 +- + dev_setup.sh | 6 +++--- + scripts/install-pocketsphinx.sh | 2 +- + 7 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/bin/mycroft-cli-client b/bin/mycroft-cli-client +index f40a316e3f6..de2040d9e67 100755 +--- a/bin/mycroft-cli-client ++++ b/bin/mycroft-cli-client +@@ -21,4 +21,4 @@ DIR="$( dirname "$SOURCE" )" + source "$DIR/../venv-activate.sh" -q + + # Invoke the Command Line Interface +-python -m mycroft.client.text $@ ++python3 -m mycroft.client.text $@ +diff --git a/bin/mycroft-pip b/bin/mycroft-pip +index a42b16b847a..81bd5bfb3cf 100755 +--- a/bin/mycroft-pip ++++ b/bin/mycroft-pip +@@ -21,4 +21,4 @@ DIR="$( dirname "$SOURCE" )" + source "$DIR/../venv-activate.sh" -q + + # Install pip packages within the Mycroft venv +-pip $@ +\ No newline at end of file ++pip3 $@ +\ No newline at end of file +diff --git a/bin/mycroft-say-to b/bin/mycroft-say-to +index 4ae597f3062..8bb4039996d 100755 +--- a/bin/mycroft-say-to ++++ b/bin/mycroft-say-to +@@ -26,4 +26,4 @@ set -- "${1:-$( +Date: Wed, 16 Oct 2019 09:18:39 -0700 +Subject: [PATCH 7/7] mycroft.conf: Use pocketsphinx by default + +precise only works on certain architectures, to make Mycroft more +versitle use pocketsphinx as it is architecture independent. + +Signed-off-by: Alistair Francis +Upstream-Status: Inappropriate [embedded specific] +--- + mycroft/configuration/mycroft.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mycroft/configuration/mycroft.conf b/mycroft/configuration/mycroft.conf +index 1d0be0dcd2b..d2dc75dac44 100644 +--- a/mycroft/configuration/mycroft.conf ++++ b/mycroft/configuration/mycroft.conf +@@ -196,7 +196,7 @@ + // Hotword configurations + "hotwords": { + "hey mycroft": { +- "module": "precise", ++ "module": "pocketsphinx", + "phonemes": "HH EY . M AY K R AO F T", + "threshold": 1e-90, + "lang": "en-us" +-- +2.23.0 + diff --git a/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb b/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb index d4ac4096bc..3c7bd89635 100644 --- a/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb +++ b/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb @@ -11,8 +11,10 @@ SRC_URI = "git://github.com/MycroftAI/mycroft-core.git;branch=master \ file://0001-Remove-python-venv.patch \ file://0002-dev_setup.sh-Remove-the-git-dependency.patch \ file://0003-dev_setup.sh-Remove-the-TERM-dependency.patch \ - file://0004-pip-requirements-Don-t-install-requirements-with-pip.patch \ - file://0005-Use-python3-and-pip3-instead-of-python-and-pip.patch \ + file://0004-dev_setup.sh-Ignore-missing-package-manager.patch \ + file://0005-pip-requirements-Don-t-install-requirements-with-pip.patch \ + file://0006-Use-python3-and-pip3-instead-of-python-and-pip.patch \ + file://0007-mycroft.conf-Use-pocketsphinx-by-default.patch \ file://dev_opts.json \ file://mycroft-setup.service \ file://mycroft.service \ -- cgit 1.2.3-korg