tasmota / docker-tasmota

Docker container with a complete build environment for Tasmota using PlatformIO
78 stars 49 forks source link

Fedora: Build failure #24

Open darrylb123 opened 1 year ago

darrylb123 commented 1 year ago

This is my first attempt to compile Tasmota. I believe I have followed the documentation. I tried both grabbing the pre-built blakadder docker container and building my own. With the same result.

$ cd /var/tmp $ git clone https://github.com/tasmota/docker-tasmota $ cd docker-tasmota $ docker build -t docker-tasmota . $ cd .. $ git clone https://github.com/arendst/Tasmota.git $ docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota-minimal Compiling Tasmota... Usage: pio run [OPTIONS] Try 'pio run -h' for help.

Error: Invalid value for '-d' / '--project-dir': Path '/tasmota' is not readable. All done! Find your builds in Tasmota/build_output/firmware/

barbudor commented 1 year ago

Are $UID and $GID variable correctly set on your system?

darrylb123 commented 1 year ago

UID was but GID wasn't. Didn't help though $ docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $(id -u):$(id -g) docker-tasmota -e tasmota-minimal Compiling Tasmota... Usage: pio run [OPTIONS] Try 'pio run -h' for help.

Error: Invalid value for '-d' / '--project-dir': Path '/tasmota' is not readable. All done! Find your builds in Tasmota/build_output/firmware/

On Mon, Jun 19, 2023 at 4:16 PM Barbudor @.***> wrote:

Are $UID and $GID variable correctly set on your system?

— Reply to this email directly, view it on GitHub https://github.com/tasmota/docker-tasmota/issues/24#issuecomment-1596574502, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTSUVO75I4MQNQHTXNZFM3XL7VFLANCNFSM6AAAAAAZLIKW74 . You are receiving this because you authored the thread.Message ID: @.***>

barbudor commented 1 year ago
barbu@mini-server:~/tasmota/build$ docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota-minimal
Compiling Tasmota...
Processing tasmota-minimal (platform: https://github.com/tasmota/platform-espressif8266/releases/download/2023.04.00/platform-espressif8266.zip; framework: arduino; board: esp8266_1M)
....
========================================================= [SUCCESS] Took 64.77 seconds =========================================================

Environment      Status    Duration
---------------  --------  ------------
tasmota-minimal  SUCCESS   00:01:04.771
========================================================== 1 succeeded in 00:01:04.771 ==========================================================
blakadder commented 1 year ago

this is a file permission issue... try building it in your users home dir first

barbudor commented 1 year ago

I agree it is a persmission issue but works like a charm in /var/tmp too:

barbu@mini-server:/var/tmp$ docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota-minimal
Compiling Tasmota...
Processing tasmota-minimal (platform: https://github.com/tasmota/platform-espressif8266/releases/download/2023.04.00/platform-espressif8266.zip; framework: arduino; board: esp8266_1M)
-------------------------------------------------------------------------------------------------------------------------------------------------
Platform Manager: Installing https://github.com/tasmota/platform-espressif8266/releases/download/2023.04.00/platform-espressif8266.zip
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Platform Manager: espressif8266@2023.4.0 has been installed!
Tool Manager: Installing platformio/toolchain-xtensa @ ~2.40802.0
Downloading  [####################################]  100%

I believe that he is not executing the docker with the same user that did the git clone

darrylb123 commented 1 year ago

I ran it out of /var/tmp. If it's file permissions, it might be selinux. I run Fedora with selinux enabled. I'll try it later.

On Tue, 20 Jun 2023, 2:09 am Barbudor, @.***> wrote:

I agree it is a persmission issue but works like a charm in /var/tmp too:

@.***:/var/tmp$ docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota-minimal Compiling Tasmota... Processing tasmota-minimal (platform: https://github.com/tasmota/platform-espressif8266/releases/download/2023.04.00/platform-espressif8266.zip; framework: arduino; board: esp8266_1M)

Platform Manager: Installing https://github.com/tasmota/platform-espressif8266/releases/download/2023.04.00/platform-espressif8266.zip Downloading [####################################] 100% Unpacking [####################################] 100% Platform Manager: @.*** has been installed! Tool Manager: Installing platformio/toolchain-xtensa @ ~2.40802.0 Downloading [####################################] 100%

I believe that he is not executing the docker with the same user that did the git clone

— Reply to this email directly, view it on GitHub https://github.com/tasmota/docker-tasmota/issues/24#issuecomment-1597443067, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTSUVJFG5HZJQZWXKNBHPTXMB2UJANCNFSM6AAAAAAZLIKW74 . You are receiving this because you authored the thread.Message ID: @.***>

darrylb123 commented 1 year ago

And that was it. setenforce 0 and it ran through. It doesn't work in my home directory either, so it's something to do with docker on Fedora Thanks guys.

On Tue, Jun 20, 2023 at 7:04 AM Darryl Bond @.***> wrote:

I ran it out of /var/tmp. If it's file permissions, it might be selinux. I run Fedora with selinux enabled. I'll try it later.

On Tue, 20 Jun 2023, 2:09 am Barbudor, @.***> wrote:

I agree it is a persmission issue but works like a charm in /var/tmp too:

@.***:/var/tmp$ docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota-minimal Compiling Tasmota... Processing tasmota-minimal (platform: https://github.com/tasmota/platform-espressif8266/releases/download/2023.04.00/platform-espressif8266.zip; framework: arduino; board: esp8266_1M)

Platform Manager: Installing https://github.com/tasmota/platform-espressif8266/releases/download/2023.04.00/platform-espressif8266.zip Downloading [####################################] 100% Unpacking [####################################] 100% Platform Manager: @.*** has been installed! Tool Manager: Installing platformio/toolchain-xtensa @ ~2.40802.0 Downloading [####################################] 100%

I believe that he is not executing the docker with the same user that did the git clone

— Reply to this email directly, view it on GitHub https://github.com/tasmota/docker-tasmota/issues/24#issuecomment-1597443067, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTSUVJFG5HZJQZWXKNBHPTXMB2UJANCNFSM6AAAAAAZLIKW74 . You are receiving this because you authored the thread.Message ID: @.***>