From 82d852d6b9d44ba4e19672a266214c1561fd39cd Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Thu, 26 Mar 2020 16:02:42 +0100 Subject: [PATCH 01/41] Revert "docs: Use master branch for release version" This reverts commit e263e2df303455eff7cb52e0353b51949a7508d4. --- README.md | 4 ++-- raspberry-pi/download-and-run.sh | 2 +- raspberry-pi/local/setup-vm.sh | 2 +- virtual-machine/setup.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 81cd0f1..a23758b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi 1. Install Retro-Cloud on the Raspberry Pi (creates the VM for step 2): ```bash - $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/master/raspberry-pi/download-and-run.sh | bash + $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/develop/raspberry-pi/download-and-run.sh | bash # Or this shortened URL: $ curl -sSL https://tiny.cc/retro-cloud-setup | bash ``` @@ -36,7 +36,7 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi * On the VM. Log into the VM from the RPi with `$ bash -i ssh-vm.sh`, or any other way you want, and then run: ```bash - $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/master/virtual-machine/setup.sh | bash + $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/develop/virtual-machine/setup.sh | bash # Or this shortened URL: $ curl -sSL https://tiny.cc/retro-cloud-setup-vm | bash ``` diff --git a/raspberry-pi/download-and-run.sh b/raspberry-pi/download-and-run.sh index 1a34d6c..9fb6aae 100644 --- a/raspberry-pi/download-and-run.sh +++ b/raspberry-pi/download-and-run.sh @@ -1,6 +1,6 @@ #!/bin/bash # Script takes optional parameter for branch name or commit hash. -branch=${1:-master} +branch=${1:-develop} # Abort on error, and error if variable is unset set -eu diff --git a/raspberry-pi/local/setup-vm.sh b/raspberry-pi/local/setup-vm.sh index 9e3872c..fde8270 100644 --- a/raspberry-pi/local/setup-vm.sh +++ b/raspberry-pi/local/setup-vm.sh @@ -1,6 +1,6 @@ #!/bin/bash # Script takes optional parameter for branch name or commit hash. -branch=${1:-master} +branch=${1:-develop} # Abort on error, and error if variable is unset set -eu diff --git a/virtual-machine/setup.sh b/virtual-machine/setup.sh index 6003b39..00bc7e4 100644 --- a/virtual-machine/setup.sh +++ b/virtual-machine/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Script takes optional parameter for branch name or commit hash. -branch=${1:-master} +branch=${1:-develop} # Abort on error set -e From 3820865ad1a1397526f6ba09c59223a36642d009 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 21 Mar 2020 08:43:53 +0000 Subject: [PATCH 02/41] test(docker): Validate the image with some rudimentary tests Build 949ad94d16fa seemed to be fine but the RetroPie-Setup script had failed to build all but N64: https://hub.docker.com/repository/registry-1.docker.io/seriema/retro-cloud/builds/38183daf-6bd1-432a-ada0-ada85af1ec02 `sudo ./retropie_packages.sh setup basic_install` is not intended for automation so it doesn't exit with an error code: https://retropie.org.uk/forum/post/213628 Added some basic tests to detect a similarly broken build. Also included some basic user tests as those parts were recently changed. --- docker/compose/directory-listing.sh | 15 +++++++++++++++ docker/compose/run_tests.sh | 12 ++++++++++++ docker/compose/user-access.sh | 16 ++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100755 docker/compose/directory-listing.sh create mode 100755 docker/compose/run_tests.sh create mode 100755 docker/compose/user-access.sh diff --git a/docker/compose/directory-listing.sh b/docker/compose/directory-listing.sh new file mode 100755 index 0000000..23e3143 --- /dev/null +++ b/docker/compose/directory-listing.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Abort on error, and error if variable is unset +set -eu + +echo 'Verify number of roms folders. There is one for each successful emultator installed.' +if [ ! $(ls ~/RetroPie/roms | wc -l) == '30' ]; then + echo "Not enough roms folders. Did an emulator fail to install?" + echo "These were installed:" + ls ~/RetroPie/roms + exit 1 +fi + +echo 'Verify that there are no builds left. There is one for each failed build.' +[ -z "`find /home/pi/RetroPie-Setup/tmp/build -maxdepth 3 -type f`" ] diff --git a/docker/compose/run_tests.sh b/docker/compose/run_tests.sh new file mode 100755 index 0000000..295c7bc --- /dev/null +++ b/docker/compose/run_tests.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Abort on error, and error if variable is unset +set -eu + +echo 'TEST: directory listing' +./docker/compose/directory-listing.sh + +echo 'TEST: user access' +./docker/compose/user-access.sh + +echo 'TEST: Done.' diff --git a/docker/compose/user-access.sh b/docker/compose/user-access.sh new file mode 100755 index 0000000..d366aa5 --- /dev/null +++ b/docker/compose/user-access.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Abort on error, and error if variable is unset +set -eu + +echo 'Verify access rights on user home and RetroPie' +[ $(stat -c %a /home/pi) -eq 755 ] +[ $(stat -c %a /home/pi/RetroPie) -eq 755 ] +[ $(stat -c %a /home/pi/RetroPie-Setup) -eq 755 ] + +echo 'Verify group memberships' +[ "$(groups | grep pi)" ] +[ "$(groups | grep sudo)" ] + +echo 'Verify username' +[ "$(whoami)" = "pi" ] From c4484fa9e77bf615e616dfaea65d0b4331cdcae8 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Mon, 23 Mar 2020 19:41:23 +0100 Subject: [PATCH 03/41] test(docker): Verify apt package sources Broken sources or mixed up Docker volumes can prevent packages from installing. --- docker/compose/packages.sh | 7 +++++++ docker/compose/run_tests.sh | 3 +++ 2 files changed, 10 insertions(+) create mode 100755 docker/compose/packages.sh diff --git a/docker/compose/packages.sh b/docker/compose/packages.sh new file mode 100755 index 0000000..dd03990 --- /dev/null +++ b/docker/compose/packages.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Abort on error, and error if variable is unset +set -eu + +echo 'Verify that apt-get is not broken' +[[ $(sudo apt-get update) ]] diff --git a/docker/compose/run_tests.sh b/docker/compose/run_tests.sh index 295c7bc..aa2242c 100755 --- a/docker/compose/run_tests.sh +++ b/docker/compose/run_tests.sh @@ -6,6 +6,9 @@ set -eu echo 'TEST: directory listing' ./docker/compose/directory-listing.sh +echo 'TEST: packages' +./docker/compose/packages.sh + echo 'TEST: user access' ./docker/compose/user-access.sh From ae24486fefe9b244a7af4e85cbb4c0c2367f47ce Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Mon, 23 Mar 2020 12:37:52 +0100 Subject: [PATCH 04/41] test(docker): Verify 30 emulators on amd and 32 on arm Two emulators aren't installed when running the container on Windows: * amiga * mame-mame4al --- docker/compose/directory-listing.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/compose/directory-listing.sh b/docker/compose/directory-listing.sh index 23e3143..4deadd7 100755 --- a/docker/compose/directory-listing.sh +++ b/docker/compose/directory-listing.sh @@ -4,7 +4,14 @@ set -eu echo 'Verify number of roms folders. There is one for each successful emultator installed.' -if [ ! $(ls ~/RetroPie/roms | wc -l) == '30' ]; then +# Two emulators aren't available on amd64: mame-mame4all, amiga +if [ "$(uname -m)" = 'armv7l' ]; then + emulators='32'; +else + emulators='30'; +fi + +if [ ! $(ls ~/RetroPie/roms | wc -l) == $emulators ]; then echo "Not enough roms folders. Did an emulator fail to install?" echo "These were installed:" ls ~/RetroPie/roms From 231c9b8d0e95ff3430a53c0252ab0b205a152f44 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Tue, 24 Mar 2020 12:41:20 +0100 Subject: [PATCH 05/41] test(docker): Verify file endings Sometimes when building the image on Windows the user bash profile files have Carriage Return (`\n`) in the line endings, which confuses the bash shell so it doesn't load the profile correctly and gives a warning. The RPi files in docker/rpi should have LF but sometimes git checks it out as CRLF, despite `.gitattributes`, and the COPY step in the Dockerfile doesn't convert. --- docker/compose/directory-listing.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/compose/directory-listing.sh b/docker/compose/directory-listing.sh index 4deadd7..09eb76a 100755 --- a/docker/compose/directory-listing.sh +++ b/docker/compose/directory-listing.sh @@ -20,3 +20,6 @@ fi echo 'Verify that there are no builds left. There is one for each failed build.' [ -z "`find /home/pi/RetroPie-Setup/tmp/build -maxdepth 3 -type f`" ] + +echo 'Verify that line endings of all files are LF. Windows uses CRLF which can get copied over by Docker ADD/COPY.' +[ ! "$(grep -r $'\r' * -l)" ] From 92fe6a1af114494ec6448f14d9209b2212c4ec54 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Tue, 24 Mar 2020 15:28:21 +0100 Subject: [PATCH 06/41] test(docker): Run all tests in debug mode --- docker/compose/directory-listing.sh | 4 ++-- docker/compose/packages.sh | 4 ++-- docker/compose/run_tests.sh | 4 ++-- docker/compose/user-access.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/compose/directory-listing.sh b/docker/compose/directory-listing.sh index 09eb76a..4f0e72b 100755 --- a/docker/compose/directory-listing.sh +++ b/docker/compose/directory-listing.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Abort on error, and error if variable is unset -set -eu +# Abort on error, error if variable is unset, and enable debug output +set -eux echo 'Verify number of roms folders. There is one for each successful emultator installed.' # Two emulators aren't available on amd64: mame-mame4all, amiga diff --git a/docker/compose/packages.sh b/docker/compose/packages.sh index dd03990..4d20ebd 100755 --- a/docker/compose/packages.sh +++ b/docker/compose/packages.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Abort on error, and error if variable is unset -set -eu +# Abort on error, error if variable is unset, and enable debug output +set -eux echo 'Verify that apt-get is not broken' [[ $(sudo apt-get update) ]] diff --git a/docker/compose/run_tests.sh b/docker/compose/run_tests.sh index aa2242c..ce20e37 100755 --- a/docker/compose/run_tests.sh +++ b/docker/compose/run_tests.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Abort on error, and error if variable is unset -set -eu +# Abort on error, error if variable is unset, and enable debug output +set -eux echo 'TEST: directory listing' ./docker/compose/directory-listing.sh diff --git a/docker/compose/user-access.sh b/docker/compose/user-access.sh index d366aa5..a6ce48b 100755 --- a/docker/compose/user-access.sh +++ b/docker/compose/user-access.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Abort on error, and error if variable is unset -set -eu +# Abort on error, error if variable is unset, and enable debug output +set -eux echo 'Verify access rights on user home and RetroPie' [ $(stat -c %a /home/pi) -eq 755 ] From 22ad1425afab2bb964619a9f7b9cfb555e8e77b9 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Tue, 24 Mar 2020 16:51:07 +0100 Subject: [PATCH 07/41] test(docker): Use double bracket tests It's built into Bash and is far safer than [. It's recommended by: * RetroPie: https://github.com/RetroPie/RetroPie-Setup/wiki/Shell-Style-Guide#test-and-square-braces * StackOverflow: https://stackoverflow.com/a/3427931/703921 ** Links to: http://mywiki.wooledge.org/BashGuide/Practices#Bash_Tests --- docker/compose/directory-listing.sh | 12 ++++++------ docker/compose/user-access.sh | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docker/compose/directory-listing.sh b/docker/compose/directory-listing.sh index 4f0e72b..206361c 100755 --- a/docker/compose/directory-listing.sh +++ b/docker/compose/directory-listing.sh @@ -5,13 +5,13 @@ set -eux echo 'Verify number of roms folders. There is one for each successful emultator installed.' # Two emulators aren't available on amd64: mame-mame4all, amiga -if [ "$(uname -m)" = 'armv7l' ]; then - emulators='32'; +if [[ $(uname -m) = 'armv7l' ]]; then + emulators=32; else - emulators='30'; + emulators=30; fi -if [ ! $(ls ~/RetroPie/roms | wc -l) == $emulators ]; then +if [[ $(ls ~/RetroPie/roms | wc -l) -ne $emulators ]]; then echo "Not enough roms folders. Did an emulator fail to install?" echo "These were installed:" ls ~/RetroPie/roms @@ -19,7 +19,7 @@ if [ ! $(ls ~/RetroPie/roms | wc -l) == $emulators ]; then fi echo 'Verify that there are no builds left. There is one for each failed build.' -[ -z "`find /home/pi/RetroPie-Setup/tmp/build -maxdepth 3 -type f`" ] +[[ -z $(find /home/pi/RetroPie-Setup/tmp/build -maxdepth 3 -type f) ]] echo 'Verify that line endings of all files are LF. Windows uses CRLF which can get copied over by Docker ADD/COPY.' -[ ! "$(grep -r $'\r' * -l)" ] +[[ -z $(grep -r $'\r' * -l) ]] diff --git a/docker/compose/user-access.sh b/docker/compose/user-access.sh index a6ce48b..f162f12 100755 --- a/docker/compose/user-access.sh +++ b/docker/compose/user-access.sh @@ -4,13 +4,13 @@ set -eux echo 'Verify access rights on user home and RetroPie' -[ $(stat -c %a /home/pi) -eq 755 ] -[ $(stat -c %a /home/pi/RetroPie) -eq 755 ] -[ $(stat -c %a /home/pi/RetroPie-Setup) -eq 755 ] +[[ $(stat -c %a /home/pi) -eq 755 ]] +[[ $(stat -c %a /home/pi/RetroPie) -eq 755 ]] +[[ $(stat -c %a /home/pi/RetroPie-Setup) -eq 755 ]] echo 'Verify group memberships' -[ "$(groups | grep pi)" ] -[ "$(groups | grep sudo)" ] +[[ $(groups | grep pi) ]] +[[ $(groups | grep sudo) ]] echo 'Verify username' -[ "$(whoami)" = "pi" ] +[[ $(whoami) = "pi" ]] From 984c2642e778405ee4c819fd49243bfb09f8a669 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Tue, 24 Mar 2020 11:41:02 +0100 Subject: [PATCH 08/41] test(docker): Add disabled runtime test of /dev/fuse Because the device /dev/fuse doesn't exist when building the Docker image this test is actually testing runtime access, so it would test how docker is running and not the image itself. I want to investigate further at a later date so I'm adding this test and the information here. When running the mount-vm-share script it can error when attempting to mount: `fuse: failed to open /dev/fuse: Permission denied` This is due to no write access on /dev/fuse for the user. It only happens when running an amd64 image on Windows (I haven't tried it on amd64 Linux, but it works on amd32v7 Linux and Raspbian). Comparison of access rights across platforms: ``` amd64 Windows: crw-rw---- 1 root root 10, 229 Mar 22 14:32 fuse arm32v7 Linux: crw-rw-rw- 1 root root 10, 229 Mar 22 05:58 fuse arm32v7 Raspbian: crw-rw-rw- 1 root root 10, 229 Mar 17 18:52 fuse ``` --- docker/compose/user-access.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/compose/user-access.sh b/docker/compose/user-access.sh index f162f12..2fb5493 100755 --- a/docker/compose/user-access.sh +++ b/docker/compose/user-access.sh @@ -7,6 +7,7 @@ echo 'Verify access rights on user home and RetroPie' [[ $(stat -c %a /home/pi) -eq 755 ]] [[ $(stat -c %a /home/pi/RetroPie) -eq 755 ]] [[ $(stat -c %a /home/pi/RetroPie-Setup) -eq 755 ]] +# [[ $(stat -c %a /dev/fuse) -eq 666 ]] echo 'Verify group memberships' [[ $(groups | grep pi) ]] From 97f707f84418916b8baa4bd0bb0e5527bdaf6068 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Wed, 25 Mar 2020 10:46:50 +0000 Subject: [PATCH 09/41] test(docker): List missing Emulators on missmatch Inspired by https://stackoverflow.com/a/28161520/703921 --- docker/compose/directory-listing.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/docker/compose/directory-listing.sh b/docker/compose/directory-listing.sh index 206361c..3c73e91 100755 --- a/docker/compose/directory-listing.sh +++ b/docker/compose/directory-listing.sh @@ -4,19 +4,14 @@ set -eux echo 'Verify number of roms folders. There is one for each successful emultator installed.' -# Two emulators aren't available on amd64: mame-mame4all, amiga +# Note: Export a new list with: $ ls -m ~/RetroPie/roms if [[ $(uname -m) = 'armv7l' ]]; then - emulators=32; + emulators="amiga, amstradcpc, arcade, atari2600, atari5200, atari7800, atari800, atarilynx, fba, fds, gamegear, gb, gba, gbc, genesis, mame-libretro, mame-mame4all, mastersystem, megadrive, n64, neogeo, nes, ngp, ngpc, pcengine, psx, sega32x, segacd, sg-1000, snes, vectrex, zxspectrum"; else - emulators=30; -fi - -if [[ $(ls ~/RetroPie/roms | wc -l) -ne $emulators ]]; then - echo "Not enough roms folders. Did an emulator fail to install?" - echo "These were installed:" - ls ~/RetroPie/roms - exit 1 + # Two emulators aren't available on amd64: mame-mame4all, amiga + emulators="amstradcpc, arcade, atari2600, atari5200, atari7800, atari800, atarilynx, fba, fds, gamegear, gb, gba, gbc, genesis, mame-libretro, mastersystem, megadrive, n64, neogeo, nes, ngp, ngpc, pcengine, psx, sega32x, segacd, sg-1000, snes, vectrex, zxspectrum"; fi +[[ -z $(echo $(echo $emulators | tr ',' '\n') $(ls -1 ~/RetroPie/roms) | tr ' ' '\n' | sort | uniq -u) ]] echo 'Verify that there are no builds left. There is one for each failed build.' [[ -z $(find /home/pi/RetroPie-Setup/tmp/build -maxdepth 3 -type f) ]] From ffa7bd79be7ccda8d94e037c5aede5ce49761876 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 28 Mar 2020 10:07:36 +0100 Subject: [PATCH 10/41] test(docker): Document why the tests are needed git blame is not enough to remember why a test was added. --- docker/compose/directory-listing.sh | 5 +++++ docker/compose/packages.sh | 4 +++- docker/compose/user-access.sh | 13 +++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docker/compose/directory-listing.sh b/docker/compose/directory-listing.sh index 3c73e91..e2f13f0 100755 --- a/docker/compose/directory-listing.sh +++ b/docker/compose/directory-listing.sh @@ -4,6 +4,7 @@ set -eux echo 'Verify number of roms folders. There is one for each successful emultator installed.' +# Added when RetroPie-Setup was failing silently and not installing all emulators. # Note: Export a new list with: $ ls -m ~/RetroPie/roms if [[ $(uname -m) = 'armv7l' ]]; then emulators="amiga, amstradcpc, arcade, atari2600, atari5200, atari7800, atari800, atarilynx, fba, fds, gamegear, gb, gba, gbc, genesis, mame-libretro, mame-mame4all, mastersystem, megadrive, n64, neogeo, nes, ngp, ngpc, pcengine, psx, sega32x, segacd, sg-1000, snes, vectrex, zxspectrum"; @@ -14,7 +15,11 @@ fi [[ -z $(echo $(echo $emulators | tr ',' '\n') $(ls -1 ~/RetroPie/roms) | tr ' ' '\n' | sort | uniq -u) ]] echo 'Verify that there are no builds left. There is one for each failed build.' +# Added when RetroPie-Setup was failing silently and not installing all emulators. [[ -z $(find /home/pi/RetroPie-Setup/tmp/build -maxdepth 3 -type f) ]] echo 'Verify that line endings of all files are LF. Windows uses CRLF which can get copied over by Docker ADD/COPY.' +# Added when running the container would throw '\r' parse errors when the users bash profile. Despite +# .gitattribute set to checkout all files in docker/rpi as LF it could still check them out as CRLF, +# and Docker has a tendency to use the host line endings when copying files. [[ -z $(grep -r $'\r' * -l) ]] diff --git a/docker/compose/packages.sh b/docker/compose/packages.sh index 4d20ebd..6aed2a1 100755 --- a/docker/compose/packages.sh +++ b/docker/compose/packages.sh @@ -3,5 +3,7 @@ # Abort on error, error if variable is unset, and enable debug output set -eux -echo 'Verify that apt-get is not broken' +echo 'Verify that apt-get is not broken due to wrong package sources, repo public keys, etc.' +# Added when apt-get would not update on Windows because there were Raspberry Pi Foundation apt-get +# sources expecting arm32, and when not having the right public keys validating those sources. [[ $(sudo apt-get update) ]] diff --git a/docker/compose/user-access.sh b/docker/compose/user-access.sh index 2fb5493..edb68dc 100755 --- a/docker/compose/user-access.sh +++ b/docker/compose/user-access.sh @@ -3,15 +3,24 @@ # Abort on error, error if variable is unset, and enable debug output set -eux -echo 'Verify access rights on user home and RetroPie' +echo 'Verify access permissions of different directories' +# Added when the user was created as root so the user didn't have regular access to $HOME. [[ $(stat -c %a /home/pi) -eq 755 ]] +# Added when RetroPie-Setup was running as another user than expected so the user didn't have access. [[ $(stat -c %a /home/pi/RetroPie) -eq 755 ]] +# Added when 'git clone' required chmod but shouldn't have needed to. [[ $(stat -c %a /home/pi/RetroPie-Setup) -eq 755 ]] +# Note: /dev/fuse test is only available at runtime so this test doesn't test the image. It would +# test the running container. It's only a problem when running the container on Windows/amd64 but +# it means that mounting won't work and running raspberry-pi/mount-vm-share.sh will fail. # [[ $(stat -c %a /dev/fuse) -eq 666 ]] echo 'Verify group memberships' +# Added when replacing 'useradd' with 'adduser' to verify that the user gets a group with the same name. [[ $(groups | grep pi) ]] +# Added when replacing 'useradd' with 'adduser' to verify that the user is still given sudo rights. [[ $(groups | grep sudo) ]] -echo 'Verify username' +echo 'Verify that the image default user is "pi"' +# Added when not setting "USER pi" as the last user in the Dockerfile. [[ $(whoami) = "pi" ]] From 441f11fd6ed8898a56ec6a4c1a224618bbcf1bb7 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 28 Mar 2020 10:25:18 +0100 Subject: [PATCH 11/41] doc: Add instruction for image validation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a23758b..63e1dc9 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi * `git clone git@github.com:seriema/retro-cloud.git && cd retro-cloud && git checkout develop` * Testing * `docker run --privileged -it --rm seriema/retro-cloud:develop` + * `docker/compose/run_tests.sh` * Docker * `docker build -t seriema/retro-cloud:amd64 .` * `docker push seriema/retro-cloud:amd64` From 7e22275eb71619cb663641456a8dc3f182460ad3 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 28 Mar 2020 10:26:37 +0100 Subject: [PATCH 12/41] ci: Add Docker image validation job Helps validate any new tests or changes to the tests by running them against the current develop image. It's important for working on RPi arm32 support. --- .circleci/config.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b0e029a..542988b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2 jobs: - infra: + scriptValidation: docker: - image: seriema/retro-cloud:develop shell: /bin/bash --login -eo pipefail @@ -101,8 +101,21 @@ jobs: rm teardown-az.ps1 when: always + imageValidation: + docker: + - image: seriema/retro-cloud:develop + working_directory: /home/pi/retro-cloud + steps: + + - checkout + + - run: + name: Validate Docker image + command: bash docker/compose/run_tests.sh + workflows: version: 2 - build: + commit: jobs: - - infra + - scriptValidation + - imageValidation From 31d8175e917a973a1b624697f35a312f58304f23 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 28 Mar 2020 10:11:15 +0100 Subject: [PATCH 13/41] test(docker): Add a Docker compose test for Docker Hub Autotest Verify the image as part of the image build on Docker Hub. Can also be run locally with `docker-compose -f docker-compose.test.yml up`. --- README.md | 1 + docker-compose.test.yml | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 docker-compose.test.yml diff --git a/README.md b/README.md index 63e1dc9..603bb17 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi * Testing * `docker run --privileged -it --rm seriema/retro-cloud:develop` * `docker/compose/run_tests.sh` + * `docker-compose -f docker-compose.test.yml up` * Docker * `docker build -t seriema/retro-cloud:amd64 .` * `docker push seriema/retro-cloud:amd64` diff --git a/docker-compose.test.yml b/docker-compose.test.yml new file mode 100644 index 0000000..551ffe3 --- /dev/null +++ b/docker-compose.test.yml @@ -0,0 +1,6 @@ +sut: + build: . + working_dir: /home/pi/retro-cloud-test + volumes: + - ./docker/compose:/home/pi/retro-cloud-test/docker/compose + command: bash docker/compose/run_tests.sh From cccb564305c933b6f321ac95c4828c455a56619f Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 28 Mar 2020 10:38:41 +0100 Subject: [PATCH 14/41] Revert "docker: Remove execute permission from bash configs on Windows builds" This reverts commit 49c317cbc10844532fa199edefa0ea39e8ad74e9. --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f068fe..a8df2c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,9 +15,7 @@ RUN apt-get update \ # These files were copied from a RetroPie 4.5.1 on a RaspberryPi 3 and # are included to make the image more realistic. One difference from # base docker image is that .bashrc has colors enabled. -# Note: Windows `COPY` sets execute permission (-rwxr-xr-x), which needs to be reverted. COPY docker/rpi/etc/skel /etc/skel -RUN if [ "$(uname -m)" = 'x86_64' ]; then chmod -R -x+X /etc/skel; fi # Mimic RaspberryPi: Create a user called "pi" without a password that's in the groups pi and sudo # Use `adduser` instead of `useradd`: From 8bda15d7f9d7d2a51731c87e493b2c21d6c20793 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 28 Mar 2020 10:38:55 +0100 Subject: [PATCH 15/41] Revert "docker: Make the pi-user bash config more realistic" This reverts commit 92f51294e0ec3d797798ada98140203624892ffc. --- .dockerignore | 1 - Dockerfile | 7 -- docker/rpi/etc/skel/.bash_logout | 7 -- docker/rpi/etc/skel/.bashrc | 113 ------------------------------- docker/rpi/etc/skel/.profile | 22 ------ 5 files changed, 150 deletions(-) delete mode 100644 docker/rpi/etc/skel/.bash_logout delete mode 100644 docker/rpi/etc/skel/.bashrc delete mode 100644 docker/rpi/etc/skel/.profile diff --git a/.dockerignore b/.dockerignore index 55c7104..72e8ffc 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1 @@ * -!docker/ diff --git a/Dockerfile b/Dockerfile index a8df2c8..96a1a17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,13 +10,6 @@ RUN apt-get update \ # Required to run image as non-root user sudo -# skel files are used as the basis for new users and include .bashrc etc: -# https://www.raspberrypi.org/documentation/linux/usage/users.md -# These files were copied from a RetroPie 4.5.1 on a RaspberryPi 3 and -# are included to make the image more realistic. One difference from -# base docker image is that .bashrc has colors enabled. -COPY docker/rpi/etc/skel /etc/skel - # Mimic RaspberryPi: Create a user called "pi" without a password that's in the groups pi and sudo # Use `adduser` instead of `useradd`: # * https://github.com/RetroPie/RetroPie-Setup/issues/2165#issuecomment-337932294 diff --git a/docker/rpi/etc/skel/.bash_logout b/docker/rpi/etc/skel/.bash_logout deleted file mode 100644 index de4f5f7..0000000 --- a/docker/rpi/etc/skel/.bash_logout +++ /dev/null @@ -1,7 +0,0 @@ -# ~/.bash_logout: executed by bash(1) when login shell exits. - -# when leaving the console clear the screen to increase privacy - -if [ "$SHLVL" = 1 ]; then - [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q -fi diff --git a/docker/rpi/etc/skel/.bashrc b/docker/rpi/etc/skel/.bashrc deleted file mode 100644 index d715992..0000000 --- a/docker/rpi/etc/skel/.bashrc +++ /dev/null @@ -1,113 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - -# don't put duplicate lines or lines starting with space in the history. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -#shopt -s globstar - -# make less more friendly for non-text input files, see lesspipe(1) -#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in - xterm-color|*-256color) color_prompt=yes;; -esac - -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) - ;; -esac - -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' -fi - -# colored GCC warnings and errors -#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - -# some more ls aliases -#alias ll='ls -l' -#alias la='ls -A' -#alias l='ls -CF' - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi diff --git a/docker/rpi/etc/skel/.profile b/docker/rpi/etc/skel/.profile deleted file mode 100644 index c9db459..0000000 --- a/docker/rpi/etc/skel/.profile +++ /dev/null @@ -1,22 +0,0 @@ -# ~/.profile: executed by the command interpreter for login shells. -# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login -# exists. -# see /usr/share/doc/bash/examples/startup-files for examples. -# the files are located in the bash-doc package. - -# the default umask is set in /etc/profile; for setting the umask -# for ssh logins, install and configure the libpam-umask package. -#umask 022 - -# if running bash -if [ -n "$BASH_VERSION" ]; then - # include .bashrc if it exists - if [ -f "$HOME/.bashrc" ]; then - . "$HOME/.bashrc" - fi -fi - -# set PATH so it includes user's private bin if it exists -if [ -d "$HOME/bin" ] ; then - PATH="$HOME/bin:$PATH" -fi From a445e967d7b48f7edf34a094a660cd458fb5d809 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 28 Mar 2020 10:42:20 +0100 Subject: [PATCH 16/41] Revert "docker: Keep LF on bash configs for Windows builds" This reverts commit 2ceb26599dae0eca9201caa4c175d4a187a5f265. --- docker/rpi/.gitattributes | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 docker/rpi/.gitattributes diff --git a/docker/rpi/.gitattributes b/docker/rpi/.gitattributes deleted file mode 100644 index a2a5874..0000000 --- a/docker/rpi/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# All files in this folder are taken from a Raspberry Pi so they should always use Linux file endings -* text eol=lf From 7e32d95bcad21d095d0838989e310721ee2f2c0b Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 28 Mar 2020 10:50:43 +0100 Subject: [PATCH 17/41] test(docker): Document why COPY-related tests are kept Even without COPY (or ADD) in the Dockerfile it could be added again in the future. There could also be other currently unknown reasons that would cause images built on Windows to have the wrong line endings. --- docker/compose/directory-listing.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/compose/directory-listing.sh b/docker/compose/directory-listing.sh index e2f13f0..f2a45ca 100755 --- a/docker/compose/directory-listing.sh +++ b/docker/compose/directory-listing.sh @@ -22,4 +22,7 @@ echo 'Verify that line endings of all files are LF. Windows uses CRLF which can # Added when running the container would throw '\r' parse errors when the users bash profile. Despite # .gitattribute set to checkout all files in docker/rpi as LF it could still check them out as CRLF, # and Docker has a tendency to use the host line endings when copying files. +# Note: The Dockerfile no longer copies bash files because COPY constantly invalidates the cache, forcing +# unnecessary rebuilds that take 30-60 minutes locally and 2-3 hours on Docker Hub. The test is kept +# as a regression test for future changes to the Dockerfile. [[ -z $(grep -r $'\r' * -l) ]] From e22a9a78d8bf60a38469dc95a765f67fd9f9a685 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Tue, 24 Mar 2020 09:07:25 +0100 Subject: [PATCH 18/41] docker: Resolve debconf warning about apt-utils Install apt-utils fixes this warning: "debconf: delaying package configuration, since apt-utils is not installed" --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 96a1a17..b3f1e2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,9 @@ RUN apt-get update \ # Required to run image as non-root user sudo +# Get rid of the warning: "debconf: delaying package configuration, since apt-utils is not installed" +RUN apt-get install -y apt-utils + # Mimic RaspberryPi: Create a user called "pi" without a password that's in the groups pi and sudo # Use `adduser` instead of `useradd`: # * https://github.com/RetroPie/RetroPie-Setup/issues/2165#issuecomment-337932294 From e389b984f88d1f4b13b7317825cbc7160c162a6b Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Tue, 24 Mar 2020 10:21:47 +0100 Subject: [PATCH 19/41] docker: Workaround for debconf warning about Dialog Configure Debian frontent to be non-interactive. Fixes this warning: "debconf: unable to initialize frontend: Dialog" Note: This is not recommended as it affects the built image, so all users of the image has this setting although it wouldn't make sense for them. The preferred approach is to use `ARG DEBIAN_FRONTEND=noninteractive` but this doesn't seem to work on Ubuntu (attempted in `docker-debconf-dialog`). Will revisit in `docker-multiarch`. --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index b3f1e2e..0f7d0cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,10 @@ RUN apt-get update \ # Required to run image as non-root user sudo +# Get rid of the warning: "debconf: unable to initialize frontend: Dialog" +# https://github.com/moby/moby/issues/27988 +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections + # Get rid of the warning: "debconf: delaying package configuration, since apt-utils is not installed" RUN apt-get install -y apt-utils From 873126317b44dcf62b8a73639813fdb314ed9487 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Wed, 18 Mar 2020 19:05:18 +0000 Subject: [PATCH 20/41] docker: Add rpi package sources on rpi When RetroPie-Setup runs on arm71 it tries to install certain packages only available from the Raspberry Pi Foundation and the Raspbian organization. Adding those repositories only on RPi/arm, otherwise it causes issues when building on Windows: "N: Skipping acquire of configured file [...] as repository 'http://raspbian.raspberrypi.org/raspbian stretch InRelease' doesn't support architecture 'amd64'" --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0f7d0cc..a66837c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,29 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # Get rid of the warning: "debconf: delaying package configuration, since apt-utils is not installed" RUN apt-get install -y apt-utils +# Add the raspberrypi.org and raspbian.org sources for packages expected by RetroPie-Setup when running on a RaspberryPi. +# Causes warnings on x86_64 (amd64) so it has to be conditional. Example: "N: Skipping acquire of configured file [...] as repository 'http://raspbian.raspberrypi.org/raspbian stretch InRelease' doesn't support architecture 'amd64'" +RUN if [ "$(uname -m)" = 'armv7l' ]; then \ + # + # 1. Get the packages needed to add sources + apt-get update && apt-get install -y \ + # curl is used to download the public keys in the next step (and used by the retro-cloud scripts) + curl \ + # gnupg is used by apt-key in the next step + gnupg \ + # + # 2. Add the sources and their public keys + # https://raspberrypi.stackexchange.com/questions/78427/what-repository-to-add-for-apt-to-find-raspberrypi-kernel + && echo "deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi" >> /etc/apt/sources.list \ + && echo "deb http://archive.raspberrypi.org/debian/ stretch main ui" >> /etc/apt/sources.list.d/raspi.list \ + && curl -L http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | apt-key add - \ + # https://www.raspbian.org/RaspbianRepository + && curl -L http://archive.raspbian.org/raspbian.public.key | apt-key add - \ + # + # 3. Refresh the source list to make sure it worked + && apt-get update; \ + fi + # Mimic RaspberryPi: Create a user called "pi" without a password that's in the groups pi and sudo # Use `adduser` instead of `useradd`: # * https://github.com/RetroPie/RetroPie-Setup/issues/2165#issuecomment-337932294 From b90f54d3d247a1089a4f3072366aef2360afcafb Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Mon, 16 Mar 2020 18:39:20 +0100 Subject: [PATCH 21/41] docker: Run RetroPie-Setup as RPi 3 on arm32v7 Set platform flag as RPi 3 for RetroPie-Setup when running on a arm32v7 processor, assuming the image is being built on a real RPi 3. Unsure what the flag does but requires multiple packages from the RaspberryPi foundation repo, which needs sources and their certificates to be added to apt. About the platform flag: * Noticed it in lasery/retropie Dockerfile: https://github.com/laseryuan/docker-apps/blob/db3c154ebebb20613125b1669483450725c79a63/retropie/Dockerfile.templ#L37 * Searched through RetroPie-Setup and found this: https://github.com/RetroPie/RetroPie-Setup/blob/729797916a1259165f03b24fd46672ddd9ba5c8e/scriptmodules/system.sh#L312-L325 About the architecture check: Note the single-equal. Double-equal is specific to bash so it didn't work in Docker. --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a66837c..f825bd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,7 +73,10 @@ WORKDIR /home/pi/RetroPie-Setup # Install RetroPie # WARNING! This takes hours. Changing anything above this point in the Dockerfile will invalidate the cache of this layer, forcing an install. -RUN sudo ./retropie_packages.sh setup basic_install +RUN if [ "$(uname -m)" = 'armv7l' ]; then sudo __platform="rpi3" ./retropie_packages.sh setup basic_install; fi +RUN if [ "$(uname -m)" = 'x86_64' ]; then sudo ./retropie_packages.sh setup basic_install; fi +# The lines above can be commented out to speed up builds for testing, but then needs the line below. +# RUN sudo mkdir -p /opt/retropie/configs/all && sudo chmod g+w -R /opt/retropie/configs/all # Exit the folder with the setup script WORKDIR /home/pi From ed2e7912503d2a7673b613418eea2344569d103d Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Fri, 20 Mar 2020 18:16:41 +0100 Subject: [PATCH 22/41] docker: Lockdown RetroPie-Setup to 4.5.16 There was a new release, 4.5.17, which was being used automatically and the setup was silently failing, but it only had one emulator so local development scenarios were suddenly not working. It turned out to be unrelated to the release but still decided to start locking down the version to avoid surprises. Especially while working on the arm32 Docker image as it makes testing easier to isolate issues. --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f825bd3..b667aae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,11 +66,14 @@ RUN sudo apt-get update \ git dialog unzip xmlstarlet # Download the latest RetroPie setup script: -RUN git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git +RUN git clone https://github.com/RetroPie/RetroPie-Setup.git # Enter the folder with the setup script WORKDIR /home/pi/RetroPie-Setup +# Checkout the last working version (4.5.16) +RUN git checkout 3b6947c0 + # Install RetroPie # WARNING! This takes hours. Changing anything above this point in the Dockerfile will invalidate the cache of this layer, forcing an install. RUN if [ "$(uname -m)" = 'armv7l' ]; then sudo __platform="rpi3" ./retropie_packages.sh setup basic_install; fi From 0b2fff40450daab41d8be95e38e506ec4b30297e Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Fri, 20 Mar 2020 18:07:49 +0000 Subject: [PATCH 23/41] docker: Create a fat cache layer of packages RetroPie-Setup will install these packages as needed, which means multiple `apt-get install` that always has an overhead cost. By making sure they're available lowers the total build time, but most importantly signtifantly cuts down the time on the RetroPie-Setup layer. Most of the cache invalidation has happened before RetroPie-Setup and can now happen inbetween. It works well with the version lockdown as well, as that invalidates RetroPie-Setup. --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Dockerfile b/Dockerfile index b667aae..0eb1563 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,6 +40,21 @@ RUN if [ "$(uname -m)" = 'armv7l' ]; then \ && apt-get update; \ fi +# +# Create a fat cache layer with most packages found per platform. +# Greatly reduces build time spent on the RetroPie-Setup layer (from >20min to <5min). +# WARNING! Rebuilding this cache layer takes a very long time! Don't modify it often. +RUN if [ "$(uname -m)" = 'armv7l' ]; then \ + apt-get update && apt-get install -y \ + adduser apt autoconf automake autopoint autotools-dev base-files base-passwd bash binutils binutils-arm-linux-gnueabihf binutils-common bsdmainutils bsdutils build-essential bzip2 ca-certificates cmake cmake-data coreutils cpp cpp-7 cron dash dbus debconf debhelper debianutils device-tree-compiler devscripts dh-autoreconf dh-strip-nondeterminism dialog diffutils dirmngr distro-info-data dpkg dpkg-dev e2fsprogs fbi fbset fcitx-bin fcitx-libs-dev fdisk file findutils fontconfig fontconfig-config fonts-dejavu-core fonts-freefont-ttf fuse g++ g++-7 gcc gcc-7 gcc-7-base gcc-8-base gettext gettext-base ghostscript gir1.2-fcitx-1.0 gir1.2-glib-2.0 gir1.2-ibus-1.0 git git-man gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grep groff-base gzip hostname init-system-helpers intltool-debian iso-codes krb5-locales less liba52-0.7.4 libaa1 libacl1 libapparmor1 libapt-inst2.0 libapt-pkg5.0 libarchive-zip-perl libarchive13 libasan4 libasn1-8-heimdal libasound2 libasound2-data libasound2-dev libass5 libass9 libassuan0 libasyncns0 libatomic1 libattr1 libaudio2 libaudit-common libaudit1 libavahi-client3 libavahi-common-data libavahi-common3 libavc1394-0 libavcodec-dev libavcodec57 libavdevice-dev libavdevice57 libavfilter-dev libavfilter6 libavformat-dev libavformat57 libavresample-dev libavresample3 libavutil-dev libavutil55 libbasicusageenvironment1 libbinutils libblkid1 libbluray2 libbs2b0 libbsd0 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcaca0 libcairo2 libcap-ng0 libcc1-0 libcddb2 libcdio-cdda2 libcdio-paranoia2 libcdio17 libchromaprint1 libcilkrts5 libcom-err2 libcroco3 libcups2 libcupsimage2 libcurl3-gnutls libcurl4 libcurl4-openssl-dev libdatrie1 libdb5.3 libdbus-1-3 libdbus-1-dev libdc1394-22 libdca0 libdebconfclient0 libdouble-conversion1 libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-dev libdrm-etnaviv1 libdrm-exynos1 libdrm-freedreno1 libdrm-nouveau2 libdrm-omap1 libdrm-radeon1 libdrm-tegra0 libdrm2 libdvbpsi10 libdvdnav4 libdvdread4 libebml4v5 libedit2 libegl-mesa0 libegl1 libegl1-mesa libegl1-mesa-dev libelf1 liberror-perl libevdev2 libexif12 libexpat1 libext2fs2 libfaad2 libfcitx-config4 libfcitx-core0 libfcitx-gclient1 libfcitx-qt0 libfcitx-utils0 libfdisk1 libffi6 libfftw3-double3 libfile-homedir-perl libfile-stripnondeterminism-perl libfile-which-perl libflac8 libflite1 libfontconfig1 libfreeimage-dev libfreeimage3 libfreetype6 libfreetype6-dev libfribidi0 libfuse2 libgbm-dev libgbm1 libgcc-7-dev libgcc1 libgcrypt20 libgdbm-compat4 libgdbm5 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgettextpo0 libgif7 libgirepository-1.0-1 libgl1 libgl1-mesa-dev libgl1-mesa-dri libglapi-mesa libgles1 libgles2 libgles2-mesa-dev libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libglu1-mesa libglu1-mesa-dev libglvnd-core-dev libglvnd-dev libglvnd0 libglx-mesa0 libglx0 libgme0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgpm2 libgraphite2-3 libgroupsock8 libgs9 libgs9-common libgsm1 libgssapi-krb5-2 libgssapi3-heimdal libgudev-1.0-0 libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libibus-1.0-5 libibus-1.0-dev libice-dev libice6 libicu60 libidn11 libidn2-0 libiec61883-0 libijs-0.35 libilmbase12 libinput-bin libinput10 libisl19 libjack-jackd2-0 libjbig0 libjbig2dec0 libjpeg62-turbo libjpeg8 libjsoncpp1 libjxr0 libk5crypto3 libkate1 libkeyutils1 libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 liblcms2-2 libldap-2.4-2 libldap-common liblirc-client0 liblivemedia57 libllvm9 liblua5.2-0 liblz4-1 liblzma5 liblzo2-2 libmad0 libmagic-mgc libmagic1 libmatroska6v5 libmicrodns0 libmng1 libmount1 libmp3lame0 libmpc3 libmpcdec6 libmpdec2 libmpeg2-4 libmpfr6 libmpg123-0 libmtdev1 libmtp-common libmtp9 libmysofa0 libncurses5 libncursesw5 libnettle6 libnfs8 libnghttp2-14 libnorm1 libnpth0 libogg0 libopenal-data libopenal1 libopenexr22 libopengl0 libopenjp2-7 libopenmpt-modplug1 libopenmpt0 libopus0 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper1 libpciaccess-dev libpciaccess0 libpcre16-3 libpcre3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libperl5.26 libpgm-5.2-0 libpipeline1 libpixman-1-0 libpng-dev libpng12-0 libpng16-16 libpostproc-dev libpostproc54 libprocps6 libprotobuf-lite10 libpsl5 libpthread-stubs0-dev libpulse0 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libqt4-dbus libqt4-xml libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libqt5x11extras5 libqtcore4 libqtdbus4 libqtgui4 libraspberrypi-bin libraspberrypi-dev libraspberrypi0 libraw1394-11 libraw15 libreadline7 libresid-builder0c2a librhash0 libroken18-heimdal librsvg2-2 librtmp1 librubberband2 libsamplerate0 libsamplerate0-dev libsasl2-2 libsasl2-modules libsasl2-modules-db libsdl-image1.2 libsdl1.2debian libsdl2-2.0-0 libsdl2-dev libseccomp2 libsecret-1-0 libsecret-common libselinux1 libsemanage-common libsemanage1 libsensors4 libsepol1 libshine3 libshout3 libsidplay2 libsigsegv2 libslang2 libsm-dev libsm6 libsmartcols1 libsnappy1v5 libsndfile1 libsndio-dev libsndio6.1 libsodium23 libsoxr0 libspeex-dev libspeex1 libspeexdsp-dev libspeexdsp1 libsqlite3-0 libss2 libssh-gcrypt-4 libssh2-1 libssl1.0.0 libssl1.1 libstdc++-7-dev libstdc++6 libswresample-dev libswresample2 libswscale-dev libswscale4 libsystemd0 libtag1v5 libtag1v5-vanilla libtasn1-6 libthai-data libthai0 libtheora0 libtiff5 libtimedate-perl libtinfo5 libtool libtwolame0 libubsan0 libudev-dev libudev1 libunistring2 libupnp6 libusageenvironment3 libusb-1.0-0 libusb-1.0-0-dev libuuid1 libuv1 libva-drm1 libva-drm2 libva-wayland1 libva-x11-1 libva-x11-2 libva1 libva2 libvdpau1 libvlc-bin libvlc-dev libvlc5 libvlccore-dev libvlccore9 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx5 libwacom-common libwacom2 libwavpack1 libwayland-bin libwayland-client0 libwayland-cursor0 libwayland-dev libwayland-egl1 libwayland-server0 libwebp6 libwebpmux2 libwebpmux3 libwind0-heimdal libwrap0 libx11-6 libx11-data libx11-dev libx11-xcb-dev libx11-xcb1 libx264-148 libx264-152 libx265-146 libx265-95 libxau-dev libxau6 libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render-util0 libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-shm0 libxcb-sync-dev libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb-xinerama0 libxcb-xkb1 libxcb-xv0 libxcb1 libxcb1-dev libxcursor-dev libxcursor1 libxdamage-dev libxdamage1 libxdmcp-dev libxdmcp6 libxext-dev libxext6 libxfixes-dev libxfixes3 libxi-dev libxi6 libxinerama-dev libxinerama1 libxkbcommon-dev libxkbcommon-x11-0 libxkbcommon0 libxml2 libxmuu1 libxrandr-dev libxrandr2 libxrender-dev libxrender1 libxshmfence-dev libxshmfence1 libxslt1.1 libxss-dev libxss1 libxt-dev libxt6 libxv-dev libxv1 libxvidcore4 libxxf86vm-dev libxxf86vm1 libzmq5 libzstd1 libzvbi-common libzvbi0 linux-libc-dev login lsb-base lsb-release m4 make man-db mawk mc mc-data mesa-common-dev meson mime-support mount multiarch-support nano ncurses-base ncurses-bin netbase ninja-build omxplayer openssh-client openssl passwd patch perl perl-base perl-modules-5.26 pinentry-curses pkg-config po-debconf poppler-data powermgmt-base procps publicsuffix python python-apt-common python-minimal python-pyudev python-six python2.7 python2.7-minimal python3 python3-apt python3-dbus python3-distutils python3-gi python3-lib2to3 python3-minimal python3-software-properties python3.6 python3.6-minimal qdbus qtchooser qtcore4-l10n rapidjson-dev raspberrypi-bootloader readline-common sed sensible-utils shared-mime-info software-properties-common sshfs sudo sysvinit-utils tar ubuntu-keyring ucf udev unattended-upgrades unzip util-linux vlc vlc-bin vlc-data vlc-l10n vlc-plugin-base vlc-plugin-qt vlc-plugin-video-output wget x11-common x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-fixes-dev x11proto-input-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xauth xdg-user-dirs xkb-data xmlstarlet xorg-sgml-doctools xtrans-dev xz-utils zlib1g zlib1g-dev \ + ; \ + fi +RUN if [ "$(uname -m)" = 'x86_64' ]; then \ + apt-get update && apt-get install -y \ + adduser adwaita-icon-theme apt base-files base-passwd bash binutils binutils-common binutils-x86-64-linux-gnu bison bsdutils build-essential bzip2 ca-certificates cmake cmake-data coreutils cpp cpp-7 cron dash dbus dbus-user-session dconf-gsettings-backend dconf-service debconf debianutils dialog diffutils dirmngr distro-info-data dpkg dpkg-dev e2fsprogs fdisk feh file findutils flex fontconfig fontconfig-config fonts-dejavu-core fonts-freefont-ttf freeglut3 fuse g++ g++-7 gcc gcc-7 gcc-7-base gcc-8-base gir1.2-glib-2.0 gir1.2-ibus-1.0 git git-man glib-networking glib-networking-common glib-networking-services gnome-terminal gnome-terminal-data gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grep gsettings-desktop-schemas gtk-update-icon-cache gzip hicolor-icon-theme hostname humanity-icon-theme init-system-helpers iso-codes krb5-locales less liba52-0.7.4 libaa1 libacl1 libapparmor1 libapt-inst2.0 libapt-pkg5.0 libarchive13 libargon2-0 libaribb24-0 libasan4 libasn1-8-heimdal libasound2 libasound2-data libasound2-dev libass9 libassuan0 libasyncns0 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatomic1 libatspi2.0-0 libattr1 libaudit-common libaudit1 libavahi-client3 libavahi-common-data libavahi-common3 libavc1394-0 libavcodec-dev libavcodec57 libavdevice-dev libavdevice57 libavfilter-dev libavfilter6 libavformat-dev libavformat57 libavresample-dev libavresample3 libavutil-dev libavutil55 libbasicusageenvironment1 libbinutils libbison-dev libblkid1 libbluray2 libboost-filesystem-dev libboost-filesystem1.65-dev libboost-filesystem1.65.1 libboost-system1.65-dev libboost-system1.65.1 libboost1.65-dev libbs2b0 libbsd0 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcaca0 libcairo-gobject2 libcairo2 libcap-ng0 libcap2 libcapnp-0.6.1 libcc1-0 libcddb2 libcdio-cdda2 libcdio-paranoia2 libcdio17 libcg libcggl libchromaprint1 libcilkrts5 libcolord2 libcom-err2 libcroco3 libcryptsetup12 libcrystalhd3 libcups2 libcurl3-gnutls libcurl4 libcurl4-openssl-dev libdatrie1 libdb5.3 libdbus-1-3 libdbus-1-dev libdc1394-22 libdca0 libdconf1 libdebconfclient0 libdevmapper1.02.1 libdouble-conversion1 libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdvbpsi10 libdvdnav4 libdvdread4 libebml4v5 libedit2 libegl-mesa0 libegl1 libegl1-mesa-dev libelf1 libepoxy0 liberror-perl libevdev2 libexif12 libexpat1 libext2fs2 libfaad2 libfdisk1 libffi6 libfftw3-double3 libflac8 libflite1 libfontconfig1 libfreeimage-dev libfreeimage3 libfreetype6 libfreetype6-dev libfribidi0 libfuse2 libgbm-dev libgbm1 libgcc-7-dev libgcc1 libgcrypt20 libgdbm-compat4 libgdbm5 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgif7 libgirepository-1.0-1 libgl1 libgl1-mesa-dev libgl1-mesa-dri libglapi-mesa libgles1 libgles2 libgles2-mesa-dev libglew-dev libglew2.0 libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libglu1-mesa libglu1-mesa-dev libglvnd-core-dev libglvnd-dev libglvnd0 libglx-mesa0 libglx0 libgme0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgpm2 libgraphite2-3 libgroupsock8 libgsm1 libgssapi-krb5-2 libgssapi3-heimdal libgtk-3-0 libgtk-3-common libgudev-1.0-0 libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libibus-1.0-5 libibus-1.0-dev libice-dev libice6 libicu60 libid3tag0 libidn11 libidn2-0 libiec61883-0 libilmbase12 libimlib2 libinput-bin libinput10 libip4tc0 libisl19 libitm1 libjack-jackd2-0 libjbig0 libjpeg-turbo8 libjpeg8 libjson-c3 libjson-glib-1.0-0 libjson-glib-1.0-common libjsoncpp1 libjxr0 libk5crypto3 libkate1 libkeyutils1 libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 liblcms2-2 libldap-2.4-2 libldap-common liblirc-client0 liblivemedia62 libllvm9 liblsan0 liblua5.2-0 liblz4-1 liblzma5 liblzo2-2 libmad0 libmagic-mgc libmagic1 libmatroska6v5 libmicrodns0 libmirclient-dev libmirclient9 libmircommon-dev libmircommon7 libmircookie-dev libmircookie2 libmircore-dev libmircore1 libmirprotobuf3 libmount1 libmp3lame0 libmpc3 libmpcdec6 libmpdec2 libmpeg2-4 libmpfr6 libmpg123-0 libmpx2 libmtdev1 libmtp-common libmtp9 libmysofa0 libncurses5 libncursesw5 libnettle6 libnfs11 libnghttp2-14 libnorm1 libnpth0 libnuma1 libogg0 libopenal-data libopenal1 libopenexr22 libopengl0 libopenjp2-7 libopenmpt-modplug1 libopenmpt0 libopus0 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess-dev libpciaccess0 libpcre16-3 libpcre3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libperl5.26 libpgm-5.2-0 libpixman-1-0 libplacebo4 libpng-dev libpng16-16 libpostproc-dev libpostproc54 libprocps6 libprotobuf-dev libprotobuf-lite10 libprotobuf10 libproxy1v5 libpsl5 libpthread-stubs0-dev libpulse-dev libpulse-mainloop-glib0 libpulse0 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libqt5x11extras5 libquadmath0 libraw1394-11 libraw16 libreadline7 libresid-builder0c2a librest-0.7-0 librhash0 libroken18-heimdal librsvg2-2 librsvg2-common librtmp1 librubberband2 libsamplerate0 libsamplerate0-dev libsasl2-2 libsasl2-modules libsasl2-modules-db libsdl-image1.2 libsdl1.2debian libsdl2-2.0-0 libsdl2-dev libseccomp2 libsecret-1-0 libsecret-common libselinux1 libsemanage-common libsemanage1 libsensors4 libsepol1 libshine3 libshout3 libsidplay2 libsigsegv2 libslang2 libsm-dev libsm6 libsmartcols1 libsnappy1v5 libsndfile1 libsndio-dev libsndio6.1 libsodium23 libsoup-gnome2.4-1 libsoup2.4-1 libsoxr0 libspeex-dev libspeex1 libspeexdsp-dev libspeexdsp1 libsqlite3-0 libss2 libssh-gcrypt-4 libssh2-1 libssl1.0.0 libssl1.1 libstdc++-7-dev libstdc++6 libswresample-dev libswresample2 libswscale-dev libswscale4 libsystemd0 libtag1v5 libtag1v5-vanilla libtasn1-6 libthai-data libthai0 libtheora0 libtiff5 libtinfo5 libtsan0 libtwolame0 libubsan0 libudev-dev libudev1 libunistring2 libupnp6 libusageenvironment3 libusb-1.0-0 libusb-1.0-0-dev libuuid1 libuv1 libva-drm2 libva-wayland2 libva-x11-2 libva2 libvdpau1 libvlc-bin libvlc-dev libvlc5 libvlccore-dev libvlccore9 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx5 libvte-2.91-0 libvte-2.91-common libvulkan-dev libvulkan1 libwacom-common libwacom2 libwavpack1 libwayland-bin libwayland-client0 libwayland-cursor0 libwayland-dev libwayland-egl1 libwayland-server0 libwebp6 libwebpmux3 libwind0-heimdal libwrap0 libx11-6 libx11-data libx11-dev libx11-xcb-dev libx11-xcb1 libx264-152 libx265-146 libxau-dev libxau6 libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render-util0 libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-shm0 libxcb-sync-dev libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb-xinerama0 libxcb-xkb1 libxcb-xv0 libxcb1 libxcb1-dev libxcomposite1 libxcursor-dev libxcursor1 libxdamage-dev libxdamage1 libxdmcp-dev libxdmcp6 libxext-dev libxext6 libxfixes-dev libxfixes3 libxi-dev libxi6 libxinerama-dev libxinerama1 libxkbcommon-dev libxkbcommon-x11-0 libxkbcommon0 libxml2 libxmuu1 libxrandr-dev libxrandr2 libxrender-dev libxrender1 libxshmfence-dev libxshmfence1 libxslt1.1 libxss-dev libxss1 libxt-dev libxt6 libxv-dev libxv1 libxvidcore4 libxxf86vm-dev libxxf86vm1 libzmq5 libzstd1 libzvbi-common libzvbi0 linux-libc-dev login lsb-base lsb-release m4 make mawk mc mc-data mesa-common-dev meson mime-support mount multiarch-support nasm ncurses-base ncurses-bin netbase ninja-build nvidia-cg-dev nvidia-cg-toolkit openssh-client openssl passwd patch perl perl-base perl-modules-5.26 pinentry-curses pkg-config powermgmt-base procps publicsuffix python python-apt-common python-minimal python-pyudev python-six python2.7 python2.7-minimal python3 python3-apt python3-dbus python3-distutils python3-gi python3-lib2to3 python3-minimal python3-software-properties python3.6 python3.6-minimal rapidjson-dev readline-common sed sensible-utils shared-mime-info software-properties-common sshfs sudo systemd systemd-sysv sysvinit-utils tar ubuntu-keyring ubuntu-mono ucf unattended-upgrades unzip util-linux vlc vlc-bin vlc-data vlc-plugin-base vlc-plugin-qt vlc-plugin-video-output wget x11-common x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-fixes-dev x11proto-input-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xauth xdg-user-dirs xkb-data xmlstarlet xorg-sgml-doctools xtrans-dev xz-utils yudit-common zlib1g zlib1g-dev \ + ; \ + fi + # Mimic RaspberryPi: Create a user called "pi" without a password that's in the groups pi and sudo # Use `adduser` instead of `useradd`: # * https://github.com/RetroPie/RetroPie-Setup/issues/2165#issuecomment-337932294 From 7f4c5f8ceb19acda7290f65b58dad9a9c7aaefb8 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sat, 21 Mar 2020 09:04:24 +0100 Subject: [PATCH 24/41] docker: Bump RetroPie-Setup to 4.5.17 with exit code fix After locking down the version I started a thread on the RetroPie forum about basic_install not exiting with an error code when it fails: https://retropie.org.uk/forum/topic/25175/basic_install-exits-without-error-despite-multiple-errors The retropie_package.sh script is not meant for automation, but there was some things in place for passing on the error so they released a new version worth locking on to. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0eb1563..73a6082 100644 --- a/Dockerfile +++ b/Dockerfile @@ -86,8 +86,9 @@ RUN git clone https://github.com/RetroPie/RetroPie-Setup.git # Enter the folder with the setup script WORKDIR /home/pi/RetroPie-Setup -# Checkout the last working version (4.5.16) -RUN git checkout 3b6947c0 +# Checkout a specific version to avoid sudden upgrades that break the image +# 4.5.17 + error code fix https://github.com/RetroPie/RetroPie-Setup/commit/50e8300 +RUN git checkout 50e8300 # Install RetroPie # WARNING! This takes hours. Changing anything above this point in the Dockerfile will invalidate the cache of this layer, forcing an install. From 9604f76ec5f6c83b57827f01f4fc29359b5f99e4 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Mon, 16 Mar 2020 14:38:35 +0100 Subject: [PATCH 25/41] docker: Switch to Debian:stretch based image Raspbian is based on Debian, so this is closer to a real Raspbian image. --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 73a6082..e49fb95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ # # CREATE A Fake Raspbian IMAGE # -FROM ubuntu:18.04 AS raspberrypi +FROM debian:stretch AS raspberrypi + +# Mentioned in https://hub.docker.com/_/debian and seen in https://github.com/laseryuan/docker-apps/blob/db3c154ebe/retropie/Dockerfile.templ#L13 +ENV LANG C.UTF-8 # Install prerequisites RUN apt-get update \ From 8bd5c7769e991e35174b856a4bfe139bf3a66012 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Mon, 23 Mar 2020 12:36:15 +0100 Subject: [PATCH 26/41] docker: Update amd64 dep list for Debian:stretch A lot of extra work required to install cmake 3.9+ as its not available on Debian:stretch. It's required for the N64 emulator "mupen64plus". --- Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e49fb95..d527060 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,8 +53,18 @@ RUN if [ "$(uname -m)" = 'armv7l' ]; then \ ; \ fi RUN if [ "$(uname -m)" = 'x86_64' ]; then \ + # Note: The N64 emulator mupen64plus is used on amd64 but requires a newer version of cmake (3.9+) than + # is available (3.7.2) on debian:stretch, so it will be installed separately. apt-get update && apt-get install -y \ - adduser adwaita-icon-theme apt base-files base-passwd bash binutils binutils-common binutils-x86-64-linux-gnu bison bsdutils build-essential bzip2 ca-certificates cmake cmake-data coreutils cpp cpp-7 cron dash dbus dbus-user-session dconf-gsettings-backend dconf-service debconf debianutils dialog diffutils dirmngr distro-info-data dpkg dpkg-dev e2fsprogs fdisk feh file findutils flex fontconfig fontconfig-config fonts-dejavu-core fonts-freefont-ttf freeglut3 fuse g++ g++-7 gcc gcc-7 gcc-7-base gcc-8-base gir1.2-glib-2.0 gir1.2-ibus-1.0 git git-man glib-networking glib-networking-common glib-networking-services gnome-terminal gnome-terminal-data gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grep gsettings-desktop-schemas gtk-update-icon-cache gzip hicolor-icon-theme hostname humanity-icon-theme init-system-helpers iso-codes krb5-locales less liba52-0.7.4 libaa1 libacl1 libapparmor1 libapt-inst2.0 libapt-pkg5.0 libarchive13 libargon2-0 libaribb24-0 libasan4 libasn1-8-heimdal libasound2 libasound2-data libasound2-dev libass9 libassuan0 libasyncns0 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatomic1 libatspi2.0-0 libattr1 libaudit-common libaudit1 libavahi-client3 libavahi-common-data libavahi-common3 libavc1394-0 libavcodec-dev libavcodec57 libavdevice-dev libavdevice57 libavfilter-dev libavfilter6 libavformat-dev libavformat57 libavresample-dev libavresample3 libavutil-dev libavutil55 libbasicusageenvironment1 libbinutils libbison-dev libblkid1 libbluray2 libboost-filesystem-dev libboost-filesystem1.65-dev libboost-filesystem1.65.1 libboost-system1.65-dev libboost-system1.65.1 libboost1.65-dev libbs2b0 libbsd0 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcaca0 libcairo-gobject2 libcairo2 libcap-ng0 libcap2 libcapnp-0.6.1 libcc1-0 libcddb2 libcdio-cdda2 libcdio-paranoia2 libcdio17 libcg libcggl libchromaprint1 libcilkrts5 libcolord2 libcom-err2 libcroco3 libcryptsetup12 libcrystalhd3 libcups2 libcurl3-gnutls libcurl4 libcurl4-openssl-dev libdatrie1 libdb5.3 libdbus-1-3 libdbus-1-dev libdc1394-22 libdca0 libdconf1 libdebconfclient0 libdevmapper1.02.1 libdouble-conversion1 libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdvbpsi10 libdvdnav4 libdvdread4 libebml4v5 libedit2 libegl-mesa0 libegl1 libegl1-mesa-dev libelf1 libepoxy0 liberror-perl libevdev2 libexif12 libexpat1 libext2fs2 libfaad2 libfdisk1 libffi6 libfftw3-double3 libflac8 libflite1 libfontconfig1 libfreeimage-dev libfreeimage3 libfreetype6 libfreetype6-dev libfribidi0 libfuse2 libgbm-dev libgbm1 libgcc-7-dev libgcc1 libgcrypt20 libgdbm-compat4 libgdbm5 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgif7 libgirepository-1.0-1 libgl1 libgl1-mesa-dev libgl1-mesa-dri libglapi-mesa libgles1 libgles2 libgles2-mesa-dev libglew-dev libglew2.0 libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libglu1-mesa libglu1-mesa-dev libglvnd-core-dev libglvnd-dev libglvnd0 libglx-mesa0 libglx0 libgme0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgpm2 libgraphite2-3 libgroupsock8 libgsm1 libgssapi-krb5-2 libgssapi3-heimdal libgtk-3-0 libgtk-3-common libgudev-1.0-0 libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libibus-1.0-5 libibus-1.0-dev libice-dev libice6 libicu60 libid3tag0 libidn11 libidn2-0 libiec61883-0 libilmbase12 libimlib2 libinput-bin libinput10 libip4tc0 libisl19 libitm1 libjack-jackd2-0 libjbig0 libjpeg-turbo8 libjpeg8 libjson-c3 libjson-glib-1.0-0 libjson-glib-1.0-common libjsoncpp1 libjxr0 libk5crypto3 libkate1 libkeyutils1 libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 liblcms2-2 libldap-2.4-2 libldap-common liblirc-client0 liblivemedia62 libllvm9 liblsan0 liblua5.2-0 liblz4-1 liblzma5 liblzo2-2 libmad0 libmagic-mgc libmagic1 libmatroska6v5 libmicrodns0 libmirclient-dev libmirclient9 libmircommon-dev libmircommon7 libmircookie-dev libmircookie2 libmircore-dev libmircore1 libmirprotobuf3 libmount1 libmp3lame0 libmpc3 libmpcdec6 libmpdec2 libmpeg2-4 libmpfr6 libmpg123-0 libmpx2 libmtdev1 libmtp-common libmtp9 libmysofa0 libncurses5 libncursesw5 libnettle6 libnfs11 libnghttp2-14 libnorm1 libnpth0 libnuma1 libogg0 libopenal-data libopenal1 libopenexr22 libopengl0 libopenjp2-7 libopenmpt-modplug1 libopenmpt0 libopus0 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess-dev libpciaccess0 libpcre16-3 libpcre3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libperl5.26 libpgm-5.2-0 libpixman-1-0 libplacebo4 libpng-dev libpng16-16 libpostproc-dev libpostproc54 libprocps6 libprotobuf-dev libprotobuf-lite10 libprotobuf10 libproxy1v5 libpsl5 libpthread-stubs0-dev libpulse-dev libpulse-mainloop-glib0 libpulse0 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libqt5x11extras5 libquadmath0 libraw1394-11 libraw16 libreadline7 libresid-builder0c2a librest-0.7-0 librhash0 libroken18-heimdal librsvg2-2 librsvg2-common librtmp1 librubberband2 libsamplerate0 libsamplerate0-dev libsasl2-2 libsasl2-modules libsasl2-modules-db libsdl-image1.2 libsdl1.2debian libsdl2-2.0-0 libsdl2-dev libseccomp2 libsecret-1-0 libsecret-common libselinux1 libsemanage-common libsemanage1 libsensors4 libsepol1 libshine3 libshout3 libsidplay2 libsigsegv2 libslang2 libsm-dev libsm6 libsmartcols1 libsnappy1v5 libsndfile1 libsndio-dev libsndio6.1 libsodium23 libsoup-gnome2.4-1 libsoup2.4-1 libsoxr0 libspeex-dev libspeex1 libspeexdsp-dev libspeexdsp1 libsqlite3-0 libss2 libssh-gcrypt-4 libssh2-1 libssl1.0.0 libssl1.1 libstdc++-7-dev libstdc++6 libswresample-dev libswresample2 libswscale-dev libswscale4 libsystemd0 libtag1v5 libtag1v5-vanilla libtasn1-6 libthai-data libthai0 libtheora0 libtiff5 libtinfo5 libtsan0 libtwolame0 libubsan0 libudev-dev libudev1 libunistring2 libupnp6 libusageenvironment3 libusb-1.0-0 libusb-1.0-0-dev libuuid1 libuv1 libva-drm2 libva-wayland2 libva-x11-2 libva2 libvdpau1 libvlc-bin libvlc-dev libvlc5 libvlccore-dev libvlccore9 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx5 libvte-2.91-0 libvte-2.91-common libvulkan-dev libvulkan1 libwacom-common libwacom2 libwavpack1 libwayland-bin libwayland-client0 libwayland-cursor0 libwayland-dev libwayland-egl1 libwayland-server0 libwebp6 libwebpmux3 libwind0-heimdal libwrap0 libx11-6 libx11-data libx11-dev libx11-xcb-dev libx11-xcb1 libx264-152 libx265-146 libxau-dev libxau6 libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render-util0 libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-shm0 libxcb-sync-dev libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb-xinerama0 libxcb-xkb1 libxcb-xv0 libxcb1 libxcb1-dev libxcomposite1 libxcursor-dev libxcursor1 libxdamage-dev libxdamage1 libxdmcp-dev libxdmcp6 libxext-dev libxext6 libxfixes-dev libxfixes3 libxi-dev libxi6 libxinerama-dev libxinerama1 libxkbcommon-dev libxkbcommon-x11-0 libxkbcommon0 libxml2 libxmuu1 libxrandr-dev libxrandr2 libxrender-dev libxrender1 libxshmfence-dev libxshmfence1 libxslt1.1 libxss-dev libxss1 libxt-dev libxt6 libxv-dev libxv1 libxvidcore4 libxxf86vm-dev libxxf86vm1 libzmq5 libzstd1 libzvbi-common libzvbi0 linux-libc-dev login lsb-base lsb-release m4 make mawk mc mc-data mesa-common-dev meson mime-support mount multiarch-support nasm ncurses-base ncurses-bin netbase ninja-build nvidia-cg-dev nvidia-cg-toolkit openssh-client openssl passwd patch perl perl-base perl-modules-5.26 pinentry-curses pkg-config powermgmt-base procps publicsuffix python python-apt-common python-minimal python-pyudev python-six python2.7 python2.7-minimal python3 python3-apt python3-dbus python3-distutils python3-gi python3-lib2to3 python3-minimal python3-software-properties python3.6 python3.6-minimal rapidjson-dev readline-common sed sensible-utils shared-mime-info software-properties-common sshfs sudo systemd systemd-sysv sysvinit-utils tar ubuntu-keyring ubuntu-mono ucf unattended-upgrades unzip util-linux vlc vlc-bin vlc-data vlc-plugin-base vlc-plugin-qt vlc-plugin-video-output wget x11-common x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-fixes-dev x11proto-input-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xauth xdg-user-dirs xkb-data xmlstarlet xorg-sgml-doctools xtrans-dev xz-utils yudit-common zlib1g zlib1g-dev \ + adduser adwaita-icon-theme apt aspell aspell-en at-spi2-core base-files base-passwd bash binutils bison bsdmainutils bsdutils build-essential bzip2 ca-certificates coreutils cpp cron dash dbus dbus-user-session dconf-gsettings-backend dconf-service debconf debianutils desktop-file-utils dialog dictionaries-common diffutils dirmngr distro-info-data dmsetup dosfstools dpkg dpkg-dev e2fsprogs eject emacsen-common enchant fakeroot feh file findutils flex fontconfig fontconfig-config fonts-dejavu-core fonts-freefont-ttf freeglut3 fuse g++ gcc gdisk git glib-networking glib-networking-common glib-networking-services gnome-terminal gnome-terminal-data gnupg gpg grep groff-base gsettings-desktop-schemas gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-pulseaudio gstreamer1.0-x gtk-update-icon-cache gvfs gvfs-common gvfs-daemons gvfs-libs gzip hicolor-icon-theme hostname hunspell-en-us i965-va-driver init-system-helpers iso-codes krb5-locales less libasound2-dev libavcodec-dev libavdevice-dev libavformat-dev libboost-filesystem-dev libcurl4-openssl-dev libfreeimage-dev libfreetype6-dev libglew-dev libpulse-dev libsamplerate0-dev libsdl2-dev libspeexdsp-dev libudev-dev libusb-1.0-0-dev libvlccore-dev libvlc-dev libvulkan-dev libxkbcommon-dev m4 make man-db manpages manpages-dev mawk mc mc-data mesa-common-dev mesa-va-drivers mesa-vdpau-drivers meson mime-support mount multiarch-support nasm ncurses-base ncurses-bin netbase ninja-build notification-daemon ntfs-3g openssh-client openssl parted passwd patch perl pinentry-curses pkg-config policykit-1 powermgmt-base procps publicsuffix python python2.7 python3 python-apt-common python-minimal python-pyudev python-six python-talloc qt5-gtk-platformtheme qttranslations5-l10n rapidjson-dev readline-common samba-libs sed sensible-utils shared-mime-info software-properties-common sshfs sudo systemd systemd-sysv sysvinit-utils tar ucf udev udisks2 unattended-upgrades unzip util-linux va-driver-all vdpau-driver-all vlc vlc-bin vlc-data vlc-l10n vlc-plugin-base vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba vlc-plugin-skins2 vlc-plugin-video-output vlc-plugin-video-splitter vlc-plugin-visualization wget x11-common xauth xdg-user-dirs xdg-utils xkb-data xmlstarlet xorg-sgml-doctools xtrans-dev xz-utils yelp yelp-xsl yudit-common zlib1g zlib1g-dev \ + ; \ + # Install cmake 3.9+ (which depends on libarchive13): https://backports.debian.org/ + echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" | sudo tee -a /etc/apt/sources.list >/dev/null \ + && sudo apt-get update \ + && sudo apt-get -t stretch-backports-sloppy install -y libarchive13 \ + && echo "deb http://deb.debian.org/debian stretch-backports main" | sudo tee -a /etc/apt/sources.list >/dev/null \ + && sudo apt-get update \ + && sudo apt-get -t stretch-backports install -y cmake \ ; \ fi @@ -94,7 +104,7 @@ WORKDIR /home/pi/RetroPie-Setup RUN git checkout 50e8300 # Install RetroPie -# WARNING! This takes hours. Changing anything above this point in the Dockerfile will invalidate the cache of this layer, forcing an install. +# WARNING! Rebuilding this cache layer takes a very long time! Don't modify it often. RUN if [ "$(uname -m)" = 'armv7l' ]; then sudo __platform="rpi3" ./retropie_packages.sh setup basic_install; fi RUN if [ "$(uname -m)" = 'x86_64' ]; then sudo ./retropie_packages.sh setup basic_install; fi # The lines above can be commented out to speed up builds for testing, but then needs the line below. From 6f9b1dcfe866bd9010ce5a2b84e6fdb6ce5875da Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Mon, 23 Mar 2020 18:51:11 +0100 Subject: [PATCH 27/41] docker: Update arm32v7 dep list for Debian:stretch --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d527060..84aec4f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ RUN if [ "$(uname -m)" = 'armv7l' ]; then \ # WARNING! Rebuilding this cache layer takes a very long time! Don't modify it often. RUN if [ "$(uname -m)" = 'armv7l' ]; then \ apt-get update && apt-get install -y \ - adduser apt autoconf automake autopoint autotools-dev base-files base-passwd bash binutils binutils-arm-linux-gnueabihf binutils-common bsdmainutils bsdutils build-essential bzip2 ca-certificates cmake cmake-data coreutils cpp cpp-7 cron dash dbus debconf debhelper debianutils device-tree-compiler devscripts dh-autoreconf dh-strip-nondeterminism dialog diffutils dirmngr distro-info-data dpkg dpkg-dev e2fsprogs fbi fbset fcitx-bin fcitx-libs-dev fdisk file findutils fontconfig fontconfig-config fonts-dejavu-core fonts-freefont-ttf fuse g++ g++-7 gcc gcc-7 gcc-7-base gcc-8-base gettext gettext-base ghostscript gir1.2-fcitx-1.0 gir1.2-glib-2.0 gir1.2-ibus-1.0 git git-man gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grep groff-base gzip hostname init-system-helpers intltool-debian iso-codes krb5-locales less liba52-0.7.4 libaa1 libacl1 libapparmor1 libapt-inst2.0 libapt-pkg5.0 libarchive-zip-perl libarchive13 libasan4 libasn1-8-heimdal libasound2 libasound2-data libasound2-dev libass5 libass9 libassuan0 libasyncns0 libatomic1 libattr1 libaudio2 libaudit-common libaudit1 libavahi-client3 libavahi-common-data libavahi-common3 libavc1394-0 libavcodec-dev libavcodec57 libavdevice-dev libavdevice57 libavfilter-dev libavfilter6 libavformat-dev libavformat57 libavresample-dev libavresample3 libavutil-dev libavutil55 libbasicusageenvironment1 libbinutils libblkid1 libbluray2 libbs2b0 libbsd0 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcaca0 libcairo2 libcap-ng0 libcc1-0 libcddb2 libcdio-cdda2 libcdio-paranoia2 libcdio17 libchromaprint1 libcilkrts5 libcom-err2 libcroco3 libcups2 libcupsimage2 libcurl3-gnutls libcurl4 libcurl4-openssl-dev libdatrie1 libdb5.3 libdbus-1-3 libdbus-1-dev libdc1394-22 libdca0 libdebconfclient0 libdouble-conversion1 libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-dev libdrm-etnaviv1 libdrm-exynos1 libdrm-freedreno1 libdrm-nouveau2 libdrm-omap1 libdrm-radeon1 libdrm-tegra0 libdrm2 libdvbpsi10 libdvdnav4 libdvdread4 libebml4v5 libedit2 libegl-mesa0 libegl1 libegl1-mesa libegl1-mesa-dev libelf1 liberror-perl libevdev2 libexif12 libexpat1 libext2fs2 libfaad2 libfcitx-config4 libfcitx-core0 libfcitx-gclient1 libfcitx-qt0 libfcitx-utils0 libfdisk1 libffi6 libfftw3-double3 libfile-homedir-perl libfile-stripnondeterminism-perl libfile-which-perl libflac8 libflite1 libfontconfig1 libfreeimage-dev libfreeimage3 libfreetype6 libfreetype6-dev libfribidi0 libfuse2 libgbm-dev libgbm1 libgcc-7-dev libgcc1 libgcrypt20 libgdbm-compat4 libgdbm5 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgettextpo0 libgif7 libgirepository-1.0-1 libgl1 libgl1-mesa-dev libgl1-mesa-dri libglapi-mesa libgles1 libgles2 libgles2-mesa-dev libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libglu1-mesa libglu1-mesa-dev libglvnd-core-dev libglvnd-dev libglvnd0 libglx-mesa0 libglx0 libgme0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgpm2 libgraphite2-3 libgroupsock8 libgs9 libgs9-common libgsm1 libgssapi-krb5-2 libgssapi3-heimdal libgudev-1.0-0 libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libibus-1.0-5 libibus-1.0-dev libice-dev libice6 libicu60 libidn11 libidn2-0 libiec61883-0 libijs-0.35 libilmbase12 libinput-bin libinput10 libisl19 libjack-jackd2-0 libjbig0 libjbig2dec0 libjpeg62-turbo libjpeg8 libjsoncpp1 libjxr0 libk5crypto3 libkate1 libkeyutils1 libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 liblcms2-2 libldap-2.4-2 libldap-common liblirc-client0 liblivemedia57 libllvm9 liblua5.2-0 liblz4-1 liblzma5 liblzo2-2 libmad0 libmagic-mgc libmagic1 libmatroska6v5 libmicrodns0 libmng1 libmount1 libmp3lame0 libmpc3 libmpcdec6 libmpdec2 libmpeg2-4 libmpfr6 libmpg123-0 libmtdev1 libmtp-common libmtp9 libmysofa0 libncurses5 libncursesw5 libnettle6 libnfs8 libnghttp2-14 libnorm1 libnpth0 libogg0 libopenal-data libopenal1 libopenexr22 libopengl0 libopenjp2-7 libopenmpt-modplug1 libopenmpt0 libopus0 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper1 libpciaccess-dev libpciaccess0 libpcre16-3 libpcre3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libperl5.26 libpgm-5.2-0 libpipeline1 libpixman-1-0 libpng-dev libpng12-0 libpng16-16 libpostproc-dev libpostproc54 libprocps6 libprotobuf-lite10 libpsl5 libpthread-stubs0-dev libpulse0 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libqt4-dbus libqt4-xml libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libqt5x11extras5 libqtcore4 libqtdbus4 libqtgui4 libraspberrypi-bin libraspberrypi-dev libraspberrypi0 libraw1394-11 libraw15 libreadline7 libresid-builder0c2a librhash0 libroken18-heimdal librsvg2-2 librtmp1 librubberband2 libsamplerate0 libsamplerate0-dev libsasl2-2 libsasl2-modules libsasl2-modules-db libsdl-image1.2 libsdl1.2debian libsdl2-2.0-0 libsdl2-dev libseccomp2 libsecret-1-0 libsecret-common libselinux1 libsemanage-common libsemanage1 libsensors4 libsepol1 libshine3 libshout3 libsidplay2 libsigsegv2 libslang2 libsm-dev libsm6 libsmartcols1 libsnappy1v5 libsndfile1 libsndio-dev libsndio6.1 libsodium23 libsoxr0 libspeex-dev libspeex1 libspeexdsp-dev libspeexdsp1 libsqlite3-0 libss2 libssh-gcrypt-4 libssh2-1 libssl1.0.0 libssl1.1 libstdc++-7-dev libstdc++6 libswresample-dev libswresample2 libswscale-dev libswscale4 libsystemd0 libtag1v5 libtag1v5-vanilla libtasn1-6 libthai-data libthai0 libtheora0 libtiff5 libtimedate-perl libtinfo5 libtool libtwolame0 libubsan0 libudev-dev libudev1 libunistring2 libupnp6 libusageenvironment3 libusb-1.0-0 libusb-1.0-0-dev libuuid1 libuv1 libva-drm1 libva-drm2 libva-wayland1 libva-x11-1 libva-x11-2 libva1 libva2 libvdpau1 libvlc-bin libvlc-dev libvlc5 libvlccore-dev libvlccore9 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx5 libwacom-common libwacom2 libwavpack1 libwayland-bin libwayland-client0 libwayland-cursor0 libwayland-dev libwayland-egl1 libwayland-server0 libwebp6 libwebpmux2 libwebpmux3 libwind0-heimdal libwrap0 libx11-6 libx11-data libx11-dev libx11-xcb-dev libx11-xcb1 libx264-148 libx264-152 libx265-146 libx265-95 libxau-dev libxau6 libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render-util0 libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-shm0 libxcb-sync-dev libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb-xinerama0 libxcb-xkb1 libxcb-xv0 libxcb1 libxcb1-dev libxcursor-dev libxcursor1 libxdamage-dev libxdamage1 libxdmcp-dev libxdmcp6 libxext-dev libxext6 libxfixes-dev libxfixes3 libxi-dev libxi6 libxinerama-dev libxinerama1 libxkbcommon-dev libxkbcommon-x11-0 libxkbcommon0 libxml2 libxmuu1 libxrandr-dev libxrandr2 libxrender-dev libxrender1 libxshmfence-dev libxshmfence1 libxslt1.1 libxss-dev libxss1 libxt-dev libxt6 libxv-dev libxv1 libxvidcore4 libxxf86vm-dev libxxf86vm1 libzmq5 libzstd1 libzvbi-common libzvbi0 linux-libc-dev login lsb-base lsb-release m4 make man-db mawk mc mc-data mesa-common-dev meson mime-support mount multiarch-support nano ncurses-base ncurses-bin netbase ninja-build omxplayer openssh-client openssl passwd patch perl perl-base perl-modules-5.26 pinentry-curses pkg-config po-debconf poppler-data powermgmt-base procps publicsuffix python python-apt-common python-minimal python-pyudev python-six python2.7 python2.7-minimal python3 python3-apt python3-dbus python3-distutils python3-gi python3-lib2to3 python3-minimal python3-software-properties python3.6 python3.6-minimal qdbus qtchooser qtcore4-l10n rapidjson-dev raspberrypi-bootloader readline-common sed sensible-utils shared-mime-info software-properties-common sshfs sudo sysvinit-utils tar ubuntu-keyring ucf udev unattended-upgrades unzip util-linux vlc vlc-bin vlc-data vlc-l10n vlc-plugin-base vlc-plugin-qt vlc-plugin-video-output wget x11-common x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-fixes-dev x11proto-input-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xauth xdg-user-dirs xkb-data xmlstarlet xorg-sgml-doctools xtrans-dev xz-utils zlib1g zlib1g-dev \ + autoconf automake autopoint autotools-dev binutils bison bsdmainutils build-essential bzip2 ca-certificates cmake cpp dbus debhelper device-tree-compiler devscripts dh-autoreconf dh-strip-nondeterminism dialog dirmngr distro-info-data dpkg-dev fbi fbset fcitx-bin fcitx-libs-dev file flex fontconfig fontconfig-config fonts-dejavu-core fonts-freefont-ttf g++ gcc gettext gettext-base ghostscript git gnupg gpg groff-base insserv intltool-debian krb5-locales less libasound2-dev libavcodec-dev libavdevice-dev libavformat-dev libcurl4-openssl-dev libdbus-1-dev libegl1-mesa-dev libfreeimage-dev libfreetype6-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libibus-1.0-dev libjpeg-dev libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libsamplerate0-dev libsndio-dev libspeexdsp-dev libudev-dev libusb-1.0-0-dev libvlccore-dev libvlc-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev lsb-release m4 make mc mesa-common-dev meson mime-support netbase ninja-build omxplayer openssh-client openssl patch perl pinentry-curses pkg-config po-debconf poppler-data procps publicsuffix python python2.7 python3 python-pyudev qdbus qtchooser qtcore4-l10n rapidjson-dev raspberrypi-bootloader readline-common shared-mime-info systemd ucf udev unzip vlc wget x11-common xauth xkb-data xmlstarlet xorg-sgml-doctools xtrans-dev xz-utils zlib1g-dev \ ; \ fi RUN if [ "$(uname -m)" = 'x86_64' ]; then \ From fe283f3f9ddda44f2e5c22ac468a2d7bbde83329 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Mon, 23 Mar 2020 12:36:15 +0100 Subject: [PATCH 28/41] docker: Add rpi specific prerequisites for RetroPie As seen in RetroPie documentation. --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 84aec4f..42c19f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -87,11 +87,11 @@ WORKDIR /home/pi ## Install RetroPie ## -# Install the needed packages for the RetroPie setup script on Debian/Ubuntu: -# https://retropie.org.uk/docs/Debian/ -RUN sudo apt-get update \ - && sudo apt-get install -y \ - git dialog unzip xmlstarlet +# Install the needed packages for the RetroPie setup script on Raspbian and Debian/Ubuntu respectively. +# RPi: https://retropie.org.uk/docs/Manual-Installation/ +RUN if [ "$(uname -m)" = 'armv7l' ]; then sudo apt-get update && sudo apt-get install -y git lsb-release; fi +# Linux: https://retropie.org.uk/docs/Debian/ +RUN if [ "$(uname -m)" = 'x86_64' ]; then sudo apt-get update && sudo apt-get install -y git dialog unzip xmlstarlet; fi # Download the latest RetroPie setup script: RUN git clone https://github.com/RetroPie/RetroPie-Setup.git From 14bcc7d8fb416c12c2464ec7e9fc0593839f5e07 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Tue, 24 Mar 2020 09:09:59 +0100 Subject: [PATCH 29/41] docker: Resolve debconf warning about Dialog Configure Debian frontent to be non-interactive. Fixes this warning: "debconf: unable to initialize frontend: Dialog" --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 42c19f7..529bb50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ RUN apt-get update \ sudo # Get rid of the warning: "debconf: unable to initialize frontend: Dialog" -# https://github.com/moby/moby/issues/27988 -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections +# https://serverfault.com/a/797318/565229 +ARG DEBIAN_FRONTEND=noninteractive # Get rid of the warning: "debconf: delaying package configuration, since apt-utils is not installed" RUN apt-get install -y apt-utils From 9bc2ccb7636e0afba039256cfc483c1b2cb1531c Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sun, 29 Mar 2020 12:11:40 +0200 Subject: [PATCH 30/41] ci: TMP use this branch's Docker image `docker-debconf-dialog-2` is based on `docker-multiarch`, and was 24h in queue to build on Docker Hub. Use it to verify `docker-multiarch`. Commit to be reverted after PR is merged. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 542988b..f3a3962 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: scriptValidation: docker: - - image: seriema/retro-cloud:develop + - image: seriema/retro-cloud:experimental-debconf-dialog-2 shell: /bin/bash --login -eo pipefail working_directory: /home/pi steps: @@ -103,7 +103,7 @@ jobs: imageValidation: docker: - - image: seriema/retro-cloud:develop + - image: seriema/retro-cloud:experimental-debconf-dialog-2 working_directory: /home/pi/retro-cloud steps: From c791a6f3d0bffef4cd60d7d0e8bf9e262477224e Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sun, 29 Mar 2020 12:11:40 +0200 Subject: [PATCH 31/41] Revert "ci: TMP use this branch's Docker image" This reverts commit 9bc2ccb7636e0afba039256cfc483c1b2cb1531c. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f3a3962..542988b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: scriptValidation: docker: - - image: seriema/retro-cloud:experimental-debconf-dialog-2 + - image: seriema/retro-cloud:develop shell: /bin/bash --login -eo pipefail working_directory: /home/pi steps: @@ -103,7 +103,7 @@ jobs: imageValidation: docker: - - image: seriema/retro-cloud:experimental-debconf-dialog-2 + - image: seriema/retro-cloud:develop working_directory: /home/pi/retro-cloud steps: From 4017ba2300f9875d9e12f1fc0e0c077f00984968 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sun, 15 Mar 2020 14:06:26 +0000 Subject: [PATCH 32/41] rpi: Teardown without user waiting Waiting 15-20 minutes for resource teardown without any output (despite Verbose and Debug) is indistinguishable from a hanged process. The `-AsJob` removes the prompt, even when combined with `-Confirm`, so a custom prompt is added. --- raspberry-pi/teardown-az.ps1 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/raspberry-pi/teardown-az.ps1 b/raspberry-pi/teardown-az.ps1 index a60e512..1db409e 100644 --- a/raspberry-pi/teardown-az.ps1 +++ b/raspberry-pi/teardown-az.ps1 @@ -9,9 +9,17 @@ $DebugPreference = "Continue" 'Delete resources from Azure ...' if (!$env:AZURE_SERVICE_PRINCIPAL_SECRET) { - '... are you sure?' - # Note: user prompt! - Remove-AzResourceGroup -Name $env:RETROCLOUD_AZ_RESOURCE_GROUP + '... Note: This operation takes a very long time (15-20 min) so it will only send a command to Azure and not wait for the removal to be complete.' + + $title = 'WARNING! You will lose all your ROMs and metadata!' + $question = 'Are you sure you want to proceed?' + $choices = '&Yes', '&No' + $decision = $Host.UI.PromptForChoice($title, $question, $choices, 1) + if ($decision -eq 0) { + Remove-AzResourceGroup -Name $env:RETROCLOUD_AZ_RESOURCE_GROUP -AsJob + } else { + Write-Host 'Cancelled.' + } } else { '... assuming automation with Service Principle. Do not wait for resources to be deleted.' Remove-AzResourceGroup -Name $env:RETROCLOUD_AZ_RESOURCE_GROUP -Force -AsJob From b3e6b2be975e1ced80518f4cb866b9c1b273232b Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sun, 15 Mar 2020 17:44:12 +0000 Subject: [PATCH 33/41] rpi: Early prompt for user informing about Azure log in Helps the user avoid starting the setup only to not have an Azure account and be able to continue. Leaving the user with PowerShell installed they won't use, which worsens the experience. --- raspberry-pi/setup.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/raspberry-pi/setup.sh b/raspberry-pi/setup.sh index c843517..ade3c42 100755 --- a/raspberry-pi/setup.sh +++ b/raspberry-pi/setup.sh @@ -3,6 +3,18 @@ # Abort on error, and error if variable is unset set -eu +# If this env var is set then it's running under automation and will skip the prompt. +if [[ "${AZURE_SERVICE_PRINCIPAL_SECRET:-missing}" == "missing" ]]; then + echo "You will eventually be prompted to log in to Azure." + echo "1. Log in to https://portal.azure.com on any device to make sure you're ready." + echo "2. Head to https://www.microsoft.com/devicelogin and be ready to input the code seen during the setup." + # https://stackoverflow.com/a/1885534 + read -p "Ready to continue [y/N]? " -r + if [[ ! $REPLY =~ ^y|Y|[yY][eE][sS]$ ]]; then + [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 + fi +fi + echo "SETUP: Install PowerShell" bash install-ps.sh From 9ff717ffa8fe80283a47d971469bbc08e37df7fb Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Thu, 26 Mar 2020 11:28:37 +0100 Subject: [PATCH 34/41] rpi: Clarify the PS Az module install message In the context of all the screen output it was hard to understand. --- raspberry-pi/install-az-module.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/raspberry-pi/install-az-module.ps1 b/raspberry-pi/install-az-module.ps1 index 56f1a05..06c80ec 100644 --- a/raspberry-pi/install-az-module.ps1 +++ b/raspberry-pi/install-az-module.ps1 @@ -9,10 +9,13 @@ $ErrorActionPreference = "Stop" ################################### # Install the Azure PowerShell module -'Install AZ for the active user, if not already installed.' +'Install the Azure module for PowerShell ...' if ((Get-Module -ListAvailable -Name Az) -eq $null) { + '...for the active user.' # The -Force parameter is needed to avoid a user prompt, but requires the if-installed check otherwise it reinstalls which takes time. Install-Module -Name Az -AllowClobber -Scope CurrentUser -Force +} else { + '...is not needed. Already installed.' } 'Log in to Azure ...' From 711273b975bb70f7525713ecb098e309159d9536 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Thu, 26 Mar 2020 12:33:20 +0100 Subject: [PATCH 35/41] vm: Sanity check before running setup Check that the VM script is not running on a RPi before downloading, installing, and eventually failing. Inform the user how to proceed and exit instead. --- virtual-machine/setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/virtual-machine/setup.sh b/virtual-machine/setup.sh index 00bc7e4..1268975 100644 --- a/virtual-machine/setup.sh +++ b/virtual-machine/setup.sh @@ -7,6 +7,13 @@ set -e # Error if variable is unset set -u +if [[ ! -z $(find /home/pi/RetroPie-Setup -maxdepth 1) ]]; then + echo "Are you running this script on the Raspberry Pi? It should be run from within the VM."; + echo "SSH to the VM with `bash -i ~/ssh-vm.sh` and then call this script again."; + echo "Or run `bash -i ~/setup-vm.sh` that will do it for you."; + exit 1 +fi + echo "SETUP: Download scripts to ~/tmp/retro-cloud" mkdir -p "$HOME/tmp/retro-cloud" cd "$HOME/tmp/retro-cloud" From ca2d3bf2ddd10163eb8606b12b853bb43742c2cc Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Thu, 26 Mar 2020 17:12:01 +0100 Subject: [PATCH 36/41] vmi: Make VM setup script chatty Skyscraper looks like it fails when it's silent and errors are visible. --- virtual-machine/install-skyscraper.sh | 6 +++--- virtual-machine/mount-az-share.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/virtual-machine/install-skyscraper.sh b/virtual-machine/install-skyscraper.sh index f0fede2..72f12c7 100644 --- a/virtual-machine/install-skyscraper.sh +++ b/virtual-machine/install-skyscraper.sh @@ -7,14 +7,14 @@ set -e set -u echo 'Install Prerequisites (over 500mb, so it takes a while)' -sudo apt-get update > /dev/null +sudo apt-get update # This is over 500mb! -sudo apt-get install build-essential qt5-default -y > /dev/null +sudo apt-get install build-essential qt5-default -y echo 'Install Skyscraper (takes a while)' mkdir -p "$HOME/skysource" cd "$HOME/skysource" -curl -L https://raw.githubusercontent.com/muldjord/skyscraper/master/update_skyscraper.sh | bash > /dev/null +curl -L https://raw.githubusercontent.com/muldjord/skyscraper/master/update_skyscraper.sh | bash cd - echo 'Configure Skyscraper' diff --git a/virtual-machine/mount-az-share.sh b/virtual-machine/mount-az-share.sh index d4683c2..c0ff482 100644 --- a/virtual-machine/mount-az-share.sh +++ b/virtual-machine/mount-az-share.sh @@ -8,8 +8,8 @@ set -u echo 'Install Prerequisites' -sudo apt-get update > /dev/null -sudo apt-get install cifs-utils > /dev/null +sudo apt-get update +sudo apt-get install cifs-utils echo 'Mount the Azure File Share in the VMs shared folder' From 1dfbbaee721d878350519c20e15d20cf0da36d15 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sun, 29 Mar 2020 18:08:44 +0100 Subject: [PATCH 37/41] rpi: Make installed scripts executable --- raspberry-pi/setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/raspberry-pi/setup.sh b/raspberry-pi/setup.sh index ade3c42..cb4c273 100755 --- a/raspberry-pi/setup.sh +++ b/raspberry-pi/setup.sh @@ -30,6 +30,10 @@ echo "SETUP: Copy run scripts to user root" cp -v local/run-scraper.sh "$HOME/run-scraper.sh" cp -v local/setup-vm.sh "$HOME/setup-vm.sh" cp -v local/ssh-vm.sh "$HOME/ssh-vm.sh" +# Make them executable +chmod +x "$HOME/run-scraper.sh" +chmod +x "$HOME/setup-vm.sh" +chmod +x "$HOME/ssh-vm.sh" echo "SETUP: Done!" From 63ea6afd1d4a3816d9e000f549b12c96920bf092 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sun, 29 Mar 2020 18:18:26 +0100 Subject: [PATCH 38/41] vm: Make setup similar to rpi * Download to ~/retro-cloud-setup instead of ~/tmp * Do not delete the scripts Also include the test-copy-rom.sh dev script so it's easier to verify the setup. --- virtual-machine/setup.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/virtual-machine/setup.sh b/virtual-machine/setup.sh index 1268975..091a418 100644 --- a/virtual-machine/setup.sh +++ b/virtual-machine/setup.sh @@ -14,9 +14,9 @@ if [[ ! -z $(find /home/pi/RetroPie-Setup -maxdepth 1) ]]; then exit 1 fi -echo "SETUP: Download scripts to ~/tmp/retro-cloud" -mkdir -p "$HOME/tmp/retro-cloud" -cd "$HOME/tmp/retro-cloud" +echo "SETUP: Download scripts to ~/retro-cloud-setup" +mkdir -p "$HOME/retro-cloud-setup" +cd "$HOME/retro-cloud-setup" curl -OL "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/install-skyscraper.sh" curl -OL "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/create-vm-share.sh" curl -OL "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/mount-az-share.sh" @@ -25,6 +25,8 @@ mkdir .skyscraper curl -L -o ".skyscraper/config.ini" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/.skyscraper/config.ini" mkdir "local" curl -L -o "local/run-skyscraper.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/local/run-skyscraper.sh" +mkdir "dev" +curl -L -o "dev/test-copy-rom.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/dev/test-copy-rom.sh" echo "SETUP: Mount Azure File Share" bash mount-az-share.sh @@ -39,10 +41,6 @@ echo "SETUP: Install Skyscraper" # https://stackoverflow.com/a/43660876 bash -i install-skyscraper.sh -echo "SETUP: Delete ~/tmp/retro-cloud" -cd -rm -r "$HOME/tmp/retro-cloud" - echo "SETUP: Done!" echo "Run the scraper with: ./run-skyscraper.sh" From a8a943349de05f875ee1d934359361a9f9c65e9b Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sun, 29 Mar 2020 20:18:19 +0200 Subject: [PATCH 39/41] ci: Create tmp directory for scraper verificatioin It was relying on the existing tmp folder from setup. --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 542988b..0356000 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,6 +44,7 @@ jobs: - run: name: Verify scraper output on VM command: | + bash -i ssh-vm.sh "mkdir -p ~/tmp" bash -i ssh-vm.sh "curl -L -o ~/tmp/test-gamelist.sh https://raw.githubusercontent.com/seriema/retro-cloud/${CIRCLE_SHA1}/virtual-machine/dev/test-gamelist.sh" bash -i ssh-vm.sh "curl -L -o ~/tmp/test-gamelist.xml https://raw.githubusercontent.com/seriema/retro-cloud/${CIRCLE_SHA1}/virtual-machine/dev/test-gamelist.xml" bash -i ssh-vm.sh "curl -L -o ~/tmp/test-gamelist-screenscraper-failed.xml https://raw.githubusercontent.com/seriema/retro-cloud/${CIRCLE_SHA1}/virtual-machine/dev/test-gamelist-screenscraper-failed.xml" From fa38e8af98673f08c856bb73cd36682deb6248f9 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sun, 29 Mar 2020 20:54:20 +0200 Subject: [PATCH 40/41] Revert "Revert "docs: Use master branch for release version"" This reverts commit 82d852d6b9d44ba4e19672a266214c1561fd39cd. --- README.md | 4 ++-- raspberry-pi/download-and-run.sh | 2 +- raspberry-pi/local/setup-vm.sh | 2 +- virtual-machine/setup.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 603bb17..d001b3c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi 1. Install Retro-Cloud on the Raspberry Pi (creates the VM for step 2): ```bash - $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/develop/raspberry-pi/download-and-run.sh | bash + $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/master/raspberry-pi/download-and-run.sh | bash # Or this shortened URL: $ curl -sSL https://tiny.cc/retro-cloud-setup | bash ``` @@ -36,7 +36,7 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi * On the VM. Log into the VM from the RPi with `$ bash -i ssh-vm.sh`, or any other way you want, and then run: ```bash - $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/develop/virtual-machine/setup.sh | bash + $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/master/virtual-machine/setup.sh | bash # Or this shortened URL: $ curl -sSL https://tiny.cc/retro-cloud-setup-vm | bash ``` diff --git a/raspberry-pi/download-and-run.sh b/raspberry-pi/download-and-run.sh index 9fb6aae..1a34d6c 100644 --- a/raspberry-pi/download-and-run.sh +++ b/raspberry-pi/download-and-run.sh @@ -1,6 +1,6 @@ #!/bin/bash # Script takes optional parameter for branch name or commit hash. -branch=${1:-develop} +branch=${1:-master} # Abort on error, and error if variable is unset set -eu diff --git a/raspberry-pi/local/setup-vm.sh b/raspberry-pi/local/setup-vm.sh index fde8270..9e3872c 100644 --- a/raspberry-pi/local/setup-vm.sh +++ b/raspberry-pi/local/setup-vm.sh @@ -1,6 +1,6 @@ #!/bin/bash # Script takes optional parameter for branch name or commit hash. -branch=${1:-develop} +branch=${1:-master} # Abort on error, and error if variable is unset set -eu diff --git a/virtual-machine/setup.sh b/virtual-machine/setup.sh index 091a418..827a103 100644 --- a/virtual-machine/setup.sh +++ b/virtual-machine/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # Script takes optional parameter for branch name or commit hash. -branch=${1:-develop} +branch=${1:-master} # Abort on error set -e From c6d637771cc06a449d35666dcb3a23c84b3a64c6 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Sun, 29 Mar 2020 20:57:13 +0200 Subject: [PATCH 41/41] docs: Add shortened links to dev scripts --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index d001b3c..679ccbb 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/master/raspberry-pi/download-and-run.sh | bash # Or this shortened URL: $ curl -sSL https://tiny.cc/retro-cloud-setup | bash + # Or get the latest development version: + $ curl -sSL https://tiny.cc/rc-rpi | bash ``` > **NOTE!** You will be prompted to log into your Azure account. The script pauses with the message: @@ -39,6 +41,8 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi $ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/master/virtual-machine/setup.sh | bash # Or this shortened URL: $ curl -sSL https://tiny.cc/retro-cloud-setup-vm | bash + # Or get the latest development version: + $ curl -sSL https://tiny.cc/rc-vm | bash ``` 1. Copy ROMs to Azure File Share. Alternatives: